├── .gitignore ├── LICENSE ├── vm-enter-freebsd-14.2-amd64 ├── vm-enter-netbsd-10.1-amd64 ├── vm-boot-freebsd-14.2-amd64 ├── vm-boot-netbsd-10.1-amd64 ├── vm-buildjob-freebsd-14.2-amd64 ├── vm-buildjob-netbsd-10.1-amd64 ├── vm-enter-openindiana-hipster-amd64 ├── vm-boot-daemon-freebsd-14.2-amd64 ├── vm-boot-daemon-netbsd-10.1-amd64 ├── vm-boot-video-freebsd-14.2-amd64 ├── vm-boot-video-netbsd-10.1-amd64 ├── vm-boot-openindiana-hipster-amd64 ├── vm-boot-video-openindiana-hipster-amd64 ├── vm-buildjob-openindiana-hipster-amd64 ├── vm-boot-daemon-openindiana-hipster-amd64 ├── lib ├── os │ ├── debian │ │ ├── hostfunc.sh │ │ ├── targetfunc.sh │ │ └── target-package-install │ ├── freebsd │ │ ├── target-package-install │ │ ├── hostfunc.sh │ │ └── targetfunc.sh │ ├── netbsd │ │ ├── target-package-install │ │ ├── hostfunc.sh │ │ └── targetfunc.sh │ ├── illumos │ │ ├── target-package-install │ │ ├── hostfunc.sh │ │ ├── targetfunc.sh │ │ └── files │ │ │ └── srn.h │ └── openbsd │ │ ├── target-package-install │ │ ├── hostfunc.sh │ │ └── targetfunc.sh ├── util.sh ├── cmd │ ├── vm-boot-console.sh │ ├── vm-buildjob.sh │ ├── vm-boot-daemon.sh │ ├── vm-boot-video.sh │ └── vm-enter.sh ├── jail │ ├── jailrun-chroot │ ├── jailrun-sandboxctl │ ├── jailrun-schroot │ ├── jailrun-illumos-chroot │ └── jailrun-bsdjail ├── bootstrap.sh ├── build-xserver.sh ├── base.sh ├── builder.sh └── vm.sh ├── etc ├── hosts │ ├── debian.cf │ ├── netbsd.cf │ ├── openbsd.cf │ ├── illumos.cf │ └── freebsd.cf ├── vm │ ├── freebsd-14.2-amd64.cf │ ├── netbsd-10.1-amd64.cf │ └── openindiana-hipster-amd64.cf ├── site.cf ├── targets │ ├── freebsd-14.cf │ ├── debian-bookworm.cf │ ├── netbsd-10.cf │ ├── openbsd-7.5.cf │ └── openindiana-hipster.cf ├── sources.cf └── sources-upstream.cf ├── .github └── ISSUE_TEMPLATE │ ├── config.yml │ ├── 04-doc-update.yml │ ├── 05-org-task.yml │ ├── 02-feature-request.yml │ ├── 03-code-cleanup.yml │ └── 01-bug-report.yml ├── README.md └── agpl-3.0.txt /.gitignore: -------------------------------------------------------------------------------- 1 | /vm 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | agpl-3.0.txt -------------------------------------------------------------------------------- /vm-enter-freebsd-14.2-amd64: -------------------------------------------------------------------------------- 1 | lib/cmd/vm-enter.sh -------------------------------------------------------------------------------- /vm-enter-netbsd-10.1-amd64: -------------------------------------------------------------------------------- 1 | lib/cmd/vm-enter.sh -------------------------------------------------------------------------------- /vm-boot-freebsd-14.2-amd64: -------------------------------------------------------------------------------- 1 | lib/cmd/vm-boot-console.sh -------------------------------------------------------------------------------- /vm-boot-netbsd-10.1-amd64: -------------------------------------------------------------------------------- 1 | lib/cmd/vm-boot-console.sh -------------------------------------------------------------------------------- /vm-buildjob-freebsd-14.2-amd64: -------------------------------------------------------------------------------- 1 | lib/cmd/vm-buildjob.sh -------------------------------------------------------------------------------- /vm-buildjob-netbsd-10.1-amd64: -------------------------------------------------------------------------------- 1 | lib/cmd/vm-buildjob.sh -------------------------------------------------------------------------------- /vm-enter-openindiana-hipster-amd64: -------------------------------------------------------------------------------- 1 | lib/cmd/vm-enter.sh -------------------------------------------------------------------------------- /vm-boot-daemon-freebsd-14.2-amd64: -------------------------------------------------------------------------------- 1 | lib/cmd/vm-boot-daemon.sh -------------------------------------------------------------------------------- /vm-boot-daemon-netbsd-10.1-amd64: -------------------------------------------------------------------------------- 1 | lib/cmd/vm-boot-daemon.sh -------------------------------------------------------------------------------- /vm-boot-video-freebsd-14.2-amd64: -------------------------------------------------------------------------------- 1 | lib/cmd/vm-boot-video.sh -------------------------------------------------------------------------------- /vm-boot-video-netbsd-10.1-amd64: -------------------------------------------------------------------------------- 1 | lib/cmd/vm-boot-video.sh -------------------------------------------------------------------------------- /vm-boot-openindiana-hipster-amd64: -------------------------------------------------------------------------------- 1 | lib/cmd/vm-boot-console.sh -------------------------------------------------------------------------------- /vm-boot-video-openindiana-hipster-amd64: -------------------------------------------------------------------------------- 1 | lib/cmd/vm-boot-video.sh -------------------------------------------------------------------------------- /vm-buildjob-openindiana-hipster-amd64: -------------------------------------------------------------------------------- 1 | lib/cmd/vm-buildjob.sh -------------------------------------------------------------------------------- /vm-boot-daemon-openindiana-hipster-amd64: -------------------------------------------------------------------------------- 1 | lib/cmd/vm-boot-daemon.sh -------------------------------------------------------------------------------- /lib/os/debian/hostfunc.sh: -------------------------------------------------------------------------------- 1 | # this file is only included on $HOST_OS_TYPE="debian" 2 | host_os_setup() { 3 | sudo apt-get -qq install -y $HOST_PACKAGES 4 | } 5 | -------------------------------------------------------------------------------- /etc/hosts/debian.cf: -------------------------------------------------------------------------------- 1 | HOST_JAIL_TYPE="schroot" 2 | HOST_OS_TYPE="debian" 3 | HOST_PACKAGES="mmdebstrap schroot" 4 | 5 | [ "$TARGET_ID" ] || export TARGET_ID="$DEBIAN_TARGET_ID" 6 | -------------------------------------------------------------------------------- /etc/hosts/netbsd.cf: -------------------------------------------------------------------------------- 1 | HOST_OS_TYPE="netbsd" 2 | HOST_JAIL_TYPE="sandboxctl" 3 | HOST_PACKAGES="sudo rsync sandboxctl" 4 | 5 | [ "$TARGET_ID" ] || export TARGET_ID="$NETBSD_TARGET_ID" 6 | -------------------------------------------------------------------------------- /etc/vm/freebsd-14.2-amd64.cf: -------------------------------------------------------------------------------- 1 | OS_TYPE="freebsd" 2 | OS_RELEASE="14.2" 3 | OS_ARCH="amd64" 4 | OS_EFI="1" 5 | 6 | VM_MEMSIZE=8192 7 | VM_SSH_PORT=2022 8 | 9 | VM_PACKAGES="bash" 10 | -------------------------------------------------------------------------------- /etc/vm/netbsd-10.1-amd64.cf: -------------------------------------------------------------------------------- 1 | OS_TYPE="netbsd" 2 | OS_RELEASE="10.1" 3 | OS_ARCH="amd64" 4 | OS_EFI="1" 5 | 6 | VM_MEMSIZE=8192 7 | VM_SSH_PORT=2023 8 | 9 | VM_PACKAGES="bash" 10 | -------------------------------------------------------------------------------- /etc/hosts/openbsd.cf: -------------------------------------------------------------------------------- 1 | HOST_OS_TYPE="openbsd" 2 | HOST_JAIL_TYPE="chroot" 3 | HOST_PACKAGES="sudo-1.9.15.5 rsync-3.2.7p1 curl" 4 | 5 | [ "$TARGET_ID" ] || export TARGET_ID="$OPENBSD_TARGET_ID" 6 | -------------------------------------------------------------------------------- /lib/os/freebsd/target-package-install: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # call be inside chroot to install target packages 4 | # 5 | 6 | set -e 7 | 8 | echo "installing packages: $@" 9 | pkg install -y "$@" 10 | -------------------------------------------------------------------------------- /lib/os/netbsd/target-package-install: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # call be inside chroot to install target packages 4 | # 5 | 6 | set -e 7 | 8 | echo "installing packages: $@" 9 | pkgin -y install "$@" 10 | -------------------------------------------------------------------------------- /etc/hosts/illumos.cf: -------------------------------------------------------------------------------- 1 | HOST_OS_TYPE="illumos" 2 | HOST_JAIL_TYPE="illumos-chroot" 3 | HOST_CHROOT_RPOOL="rpool/chroot" 4 | HOST_CHROOT_DIR="/$HOST_CHROOT_RPOOL" 5 | HOST_PACKAGES="rsync" 6 | 7 | [ "$TARGET_ID" ] || export TARGET_ID="$ILLUMOS_TARGET_ID" 8 | -------------------------------------------------------------------------------- /lib/os/debian/targetfunc.sh: -------------------------------------------------------------------------------- 1 | # this file is only included on $TARGET_OS="debian" 2 | target_bootstrap_chroot() { 3 | needvar TARGET_OS TARGET_RELEASE 4 | local chroot_dir="$(get_builder_chroot_dir)" 5 | sudo mmdebstrap "$TARGET_RELEASE" "$chroot_dir" 6 | } 7 | -------------------------------------------------------------------------------- /lib/util.sh: -------------------------------------------------------------------------------- 1 | die() { 2 | echo "$0: FATAL: $*" >&2 3 | exit 1 4 | } 5 | 6 | log() { 7 | echo "$script_name: $*" >&2 8 | } 9 | 10 | needvar() { 11 | for v in "$@"; do 12 | [ "${!v}" ] || die "missing config variable $v" 13 | done 14 | } 15 | -------------------------------------------------------------------------------- /etc/hosts/freebsd.cf: -------------------------------------------------------------------------------- 1 | HOST_JAIL_TYPE="bsdjail" 2 | HOST_OS_TYPE="freebsd" 3 | HOST_PACKAGES="sudo rsync boost-all" 4 | HOST_PORTS_REPO="https://git.freebsd.org/ports.git" 5 | HOST_PORTS_REF="master" 6 | HOST_PORTS_PKG="cmake" 7 | 8 | [ "$TARGET_ID" ] || export TARGET_ID="$FREEBSD_TARGET_ID" 9 | -------------------------------------------------------------------------------- /lib/os/debian/target-package-install: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # call be inside chroot to install target packages 4 | # 5 | 6 | set -e 7 | 8 | echo "installing packages: $@" 9 | apt-get update -q | (grep -vE "^Hit:[0-9]+"||true) | (grep -vE "^Reading package lists" ||true) 10 | apt-get install "-qqy" "$@" 11 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: XLibre Community Support 4 | url: https://github.com/orgs/X11Libre/discussions 5 | about: Please ask and answer questions here. 6 | - name: Mailing List 7 | url: https://www.freelists.org/list/xlibre 8 | about: You can join the discussions on our mailing list. 9 | -------------------------------------------------------------------------------- /lib/cmd/vm-boot-console.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | SCRIPT_ROOT_DIR="$(cd "$(dirname "$0")" && pwd -P)" 5 | 6 | . $SCRIPT_ROOT_DIR/lib/util.sh 7 | 8 | bn=`basename $0` 9 | bn="${bn/vm-boot-/}" 10 | 11 | . $SCRIPT_ROOT_DIR/etc/vm/$bn.cf || die "cant find config for $bn" 12 | . $SCRIPT_ROOT_DIR/lib/vm.sh 13 | 14 | needvar VM_SSH_PORT 15 | 16 | boot_vm_console 17 | -------------------------------------------------------------------------------- /lib/cmd/vm-buildjob.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | SCRIPT_ROOT_DIR="$(cd "$(dirname "$0")" && pwd -P)" 5 | 6 | . $SCRIPT_ROOT_DIR/lib/util.sh 7 | 8 | bn=`basename $0` 9 | bn="${bn/vm-buildjob-/}" 10 | 11 | . $SCRIPT_ROOT_DIR/etc/vm/$bn.cf || die "cant find config for $bn" 12 | . $SCRIPT_ROOT_DIR/lib/vm.sh 13 | 14 | boot_and_wait_for_vm 15 | vm_build_testing_jail 16 | -------------------------------------------------------------------------------- /lib/cmd/vm-boot-daemon.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | SCRIPT_ROOT_DIR="$(cd "$(dirname "$0")" && pwd -P)" 5 | 6 | . $SCRIPT_ROOT_DIR/lib/util.sh 7 | 8 | bn=`basename $0` 9 | bn="${bn/vm-boot-daemon-/}" 10 | 11 | . $SCRIPT_ROOT_DIR/etc/vm/$bn.cf || die "cant find config for $bn" 12 | . $SCRIPT_ROOT_DIR/lib/vm.sh 13 | 14 | needvar VM_SSH_PORT 15 | 16 | boot_vm_daemon 17 | -------------------------------------------------------------------------------- /lib/cmd/vm-boot-video.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | SCRIPT_ROOT_DIR="$(cd "$(dirname "$0")" && pwd -P)" 5 | 6 | . $SCRIPT_ROOT_DIR/lib/util.sh 7 | 8 | bn=`basename $0` 9 | bn="${bn/vm-boot-video-/}" 10 | 11 | . $SCRIPT_ROOT_DIR/etc/vm/$bn.cf || die "cant find config for $bn" 12 | . $SCRIPT_ROOT_DIR/lib/vm.sh 13 | 14 | needvar VM_SSH_PORT 15 | 16 | boot_vm_graphics 17 | -------------------------------------------------------------------------------- /lib/cmd/vm-enter.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | SCRIPT_ROOT_DIR="$(cd "$(dirname "$0")" && pwd -P)" 5 | 6 | . $SCRIPT_ROOT_DIR/lib/util.sh 7 | 8 | bn=`basename $0` 9 | bn="${bn/vm-enter-/}" 10 | 11 | . $SCRIPT_ROOT_DIR/etc/vm/$bn.cf || die "cant find config for $bn" 12 | . $SCRIPT_ROOT_DIR/lib/vm.sh 13 | 14 | needvar VM_SSH_PORT 15 | 16 | ssh root@localhost -p $VM_SSH_PORT 17 | -------------------------------------------------------------------------------- /lib/os/illumos/target-package-install: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # call be inside chroot to install target packages 4 | # 5 | 6 | set -e 7 | 8 | echo "(illumos) installing packages: $@" 9 | 10 | if [ "$1" != "" ]; then 11 | pkg install --no-refresh "$@"|| retval="$?" 12 | if [ "$retval" != "" ] && [ "$retval" != 0 ] && [ "$retval" != 4 ]; then 13 | echo "package installation failed: retval=$retval" >&2 14 | exit 1 15 | fi 16 | fi 17 | 18 | echo "(illumos) package intallation finished" 19 | -------------------------------------------------------------------------------- /lib/os/openbsd/target-package-install: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # call be inside chroot to install target packages 4 | # 5 | 6 | set -e 7 | 8 | # pkg_add needs this 9 | chmod ugo+rwx tmp 10 | 11 | while [ "$1" ]; do 12 | if [ ! -f "/.installed.$1" ]; then 13 | echo "Need to install $1" 14 | pkg_add -I "$1" 15 | touch "/.installed.$1" 16 | fi 17 | shift 18 | done 19 | 20 | mkdir -p /var/run 21 | ldconfig 22 | ldconfig -R /usr/local/lib /usr/X11R6/lib/ || (echo "ldconfig failed"; false) 23 | -------------------------------------------------------------------------------- /lib/os/netbsd/hostfunc.sh: -------------------------------------------------------------------------------- 1 | # this file is only included on $HOST_OS_TYPE="freebsd" 2 | host_os_setup() { 3 | if [ "$HOST_PACKAGES" ]; then 4 | pkgin -y install $HOST_PACKAGES 5 | fi 6 | } 7 | 8 | host_fetch_tarball() { 9 | local url="$1" 10 | local fn="$2" 11 | 12 | mkdir -p "$(dirname "$fn")" 13 | 14 | if [ ! -f "$fn" ]; then 15 | echo "fetching tarball: $url" 16 | ftp -o "$fn.TMP" "$url" 17 | mv "$fn.TMP" "$fn" 18 | else 19 | echo "tarball already present: $fn" 20 | fi 21 | } 22 | -------------------------------------------------------------------------------- /lib/os/openbsd/hostfunc.sh: -------------------------------------------------------------------------------- 1 | # this file is only included on $HOST_OS_TYPE="freebsd" 2 | host_os_setup() { 3 | if [ "$HOST_PACKAGES" ]; then 4 | pkg_add $HOST_PACKAGES 5 | fi 6 | ldconfig -R /usr/local/lib 7 | } 8 | 9 | host_fetch_tarball() { 10 | local url="$1" 11 | local fn="$2" 12 | 13 | mkdir -p "$(dirname "$fn")" 14 | 15 | if [ ! -f "$fn" ]; then 16 | echo "fetching tarball: $url" 17 | rm -f "$fn.TMP" 18 | curl "$url" -o "$fn.TMP" 19 | mv "$fn.TMP" "$fn" 20 | else 21 | echo "tarball already present: $fn" 22 | fi 23 | } 24 | -------------------------------------------------------------------------------- /lib/os/freebsd/hostfunc.sh: -------------------------------------------------------------------------------- 1 | # this file is only included on $HOST_OS_TYPE="freebsd" 2 | host_os_setup() { 3 | needvar HOST_PORTS_REPO HOST_PORTS_REF 4 | if [ "$HOST_PACKAGES" ]; then 5 | pkg install -y $HOST_PACKAGES 6 | fi 7 | } 8 | 9 | host_fetch_tarball() { 10 | local url="$1" 11 | local fn="$2" 12 | 13 | mkdir -p "$(dirname "$fn")" 14 | 15 | if [ ! -f "$fn" ]; then 16 | echo "fetching tarball: $url" 17 | rm -f "$fn.TMP" 18 | fetch "$url" -o "$fn.TMP" 19 | mv "$fn.TMP" "$fn" 20 | else 21 | echo "tarball already present: $fn" 22 | fi 23 | } 24 | -------------------------------------------------------------------------------- /etc/site.cf: -------------------------------------------------------------------------------- 1 | # not set - autodetect 2 | # HOST_OS="freebsd" 3 | 4 | # NOTE: etc/hosts/illumos.cf overwrite this, since there it needs 5 | # to be in the rpool 6 | HOST_CHROOT_DIR="/var/chroots/xorg-testing" 7 | 8 | GIT_CLONE_ARGS="--depth 1" 9 | XORG_PREFIX="/usr/local/X11" 10 | 11 | # target when running on FreeBSD host 12 | FREEBSD_TARGET_ID="freebsd-14" 13 | 14 | # target when running on Debian host 15 | DEBIAN_TARGET_ID="debian-bookworm" 16 | 17 | # target when running on NetBSD host 18 | NETBSD_TARGET_ID="netbsd-10" 19 | 20 | # target when running on OpenBSD host 21 | OPENBSD_TARGET_ID="openbsd-7.5" 22 | 23 | # target when running on illumos/openindiana host 24 | ILLUMOS_TARGET_ID="openindiana-hipster" 25 | -------------------------------------------------------------------------------- /lib/os/illumos/hostfunc.sh: -------------------------------------------------------------------------------- 1 | # this file is only included on $HOST_OS_TYPE="illumos" 2 | host_os_setup() { 3 | local retval 4 | if [ "$HOST_PACKAGES" ]; then 5 | pkg install --no-refresh $HOST_PACKAGES || retval="$?" 6 | if [ "$retval" != "" ] && [ "$retval" != 0 ] && [ "$retval" != 4 ]; then 7 | die "package installation failed: retval=$retval" 8 | fi 9 | fi 10 | log "host OS setup done" 11 | } 12 | 13 | host_fetch_tarball() { 14 | local url="$1" 15 | local fn="$2" 16 | 17 | mkdir -p "$(dirname "$fn")" 18 | 19 | if [ ! -f "$fn" ]; then 20 | echo "fetching tarball: $url" 21 | rm -f "$fn.TMP" 22 | curl "$url" -o "$fn.TMP" 23 | mv "$fn.TMP" "$fn" 24 | else 25 | echo "tarball already present: $fn" 26 | fi 27 | } 28 | 29 | sudo() { 30 | echo "Illumos fake sudo: $@" 31 | eval $@ 32 | } 33 | -------------------------------------------------------------------------------- /etc/targets/freebsd-14.cf: -------------------------------------------------------------------------------- 1 | TARGET_OS="freebsd" 2 | TARGET_WORKDIR="/srv/xorg-playground" 3 | TARGET_RELEASE="14.2" 4 | TARGET_ARCH="amd64" 5 | TARGET_PACKAGES=" 6 | bash git gcc pkgconf autoconf automake libtool xorg-macros xorgproto meson 7 | ninja pixman xtrans libXau libXdmcp libXfont libXfont2 libxkbfile libxcvt 8 | libpciaccess font-util libepoll-shim libdrm mesa-libs libglu mesa-dri 9 | libepoxy nettle xkbcomp libXvMC xcb-util valgrind libXcursor libXScrnSaver 10 | libXinerama libXtst evdev-proto libevdev libmtdev libinput spice-protocol 11 | libspice-server libX11 libxshmfence python3 py311-StrEnum fontconfig 12 | mkfontscale gmake 13 | " 14 | 15 | PACKAGE_XSERVER_BUILD_ARGS="-Ddri3=true -Dudev=false -Dudev_kms=false" 16 | 17 | [ "${FREEBSD_14_DRIVERS}" ] || FREEBSD_14_DRIVERS="xf86-input-keyboard xf86-input-mouse xf86-input-evdev xf86-input-libinput xf86-video-vesa xf86-video-intel" 18 | 19 | XORG_DRIVERS="${XORG_DRIVERS} ${FREEBSD_14_DRIVERS}" 20 | 21 | export TARGET_MAKE=gmake 22 | -------------------------------------------------------------------------------- /lib/jail/jailrun-chroot: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # jail helper for schroot 4 | # it's needed as external script, in order to bridge sudo 5 | # Note: assuming we can be called ourselves in jail at the same path 6 | 7 | set -e 8 | SCRIPT_ROOT_DIR="$(cd "$(dirname "$0")/../../" && pwd -P)" 9 | 10 | . $SCRIPT_ROOT_DIR/lib/base.sh 11 | 12 | needvar TARGET_ID HOST_JAIL_TYPE 13 | 14 | command="$1" 15 | shift || true 16 | 17 | chroot_dir="$(get_builder_chroot_dir)" 18 | 19 | if [ ! "$command" ]; then 20 | die "missing command" 21 | fi 22 | 23 | case "$command" in 24 | exec) 25 | TARGET_ID="$TARGET_ID" sudo chroot "${chroot_dir}" "$@" || die "failed jail command: $@" 26 | ;; 27 | install) 28 | sudo chroot "${chroot_dir}" "$SCRIPT_ROOT_DIR/lib/os/$TARGET_OS/target-package-install" "$@" 29 | ;; 30 | register) 31 | ;; 32 | syncme) 33 | sudo rsync --no-acls -r "$SCRIPT_ROOT_DIR/" "$chroot_dir/$SCRIPT_ROOT_DIR" 34 | ;; 35 | stop) 36 | ;; 37 | *) 38 | die "unknown command $0 $@" 39 | ;; 40 | esac 41 | -------------------------------------------------------------------------------- /etc/vm/openindiana-hipster-amd64.cf: -------------------------------------------------------------------------------- 1 | # Creating the CI image: 2 | # 3 | # download and unpack: 4 | # 1) https://dlc.openindiana.org/isos/openindiana/20240426/OI-hipster-cloudimage.img.zstd" 5 | # 2) resize to 30G (truncate --size=30G ) 6 | # 3) convert it to qcow2: qemu-img convert -f raw -O qcow2 OI-hipster-cloudimage.img hipster-amd64.qcow2 7 | # 4) boot and initial setup: 8 | # 1) enable vioif0: `echo "plumb" > /etc/hostname.vioif0` 9 | # 2) enabled dhcp: `touch /etc/dhcp.vioif0` 10 | # 3) edit /etc/ssh/sshd_config to enable root w/ passwd and allow empty passwords 11 | # sed -i /etc/ssh/sshd_config -e 's~PermitRootLogin no~PermitRootLogin yes~' 12 | # sed -i /etc/ssh/sshd_config -e 's~PermitEmptyPasswords no~PermitEmptyPasswords yes~' 13 | # `svcadm restart ssh` 14 | # sed -i "s/ListenAddress ::/#ListenAddress ::/g" /etc/ssh/sshd_config 15 | # 4) run `pkg update` 16 | # 5) poweroff and pack the image 17 | 18 | OS_TYPE="openindiana" 19 | OS_RELEASE="hipster" 20 | OS_ARCH="amd64" 21 | OS_EFI="1" 22 | 23 | VM_MEMSIZE=8192 24 | VM_SSH_PORT=2024 25 | -------------------------------------------------------------------------------- /etc/targets/debian-bookworm.cf: -------------------------------------------------------------------------------- 1 | TARGET_OS="debian" 2 | TARGET_PACKAGES="build-essential git meson autoconf xorg-dev xutils-dev 3 | libudev-dev libssl-dev libepoxy-dev libdrm-dev yacc 4 | xfonts-utils fontconfig libtool libevdev-dev libmtdev-dev 5 | libinput-dev libx11-xcb-dev libxcb-dri2-0-dev libxcb-util-dev 6 | valgrind libxshmfence-dev libxcb-dri3-dev libxv-dev 7 | libspice-protocol-dev libxcb-shape0-dev libxcb-icccm4-dev 8 | libxcb-xkb-dev libgbm-dev" 9 | TARGET_WORKDIR="/srv/xorg-playground" 10 | TARGET_RELEASE="bookworm" 11 | 12 | PACKAGE_XSERVER_BUILD_ARGS="-Ddri3=true" 13 | PACKAGE_LIBDRM_BUILD_ARGS="-Domap=enabled" 14 | 15 | [ "${DEBIAN_BOOKWORM_DRIVERS}" ] || DEBIAN_BOOKWORM_DRIVERS=" 16 | xf86-input-evdev 17 | xf86-input-libinput 18 | xf86-video-amdgpu 19 | xf86-video-ati 20 | xf86-video-intel 21 | xf86-video-nouveau 22 | xf86-video-omap 23 | xf86-video-qxl 24 | xf86-video-r128 25 | xf86-video-vesa 26 | xf86-video-vmware 27 | " 28 | 29 | XORG_DRIVERS="${XORG_DRIVERS} ${DEBIAN_BOOKWORM_DRIVERS}" 30 | -------------------------------------------------------------------------------- /etc/targets/netbsd-10.cf: -------------------------------------------------------------------------------- 1 | TARGET_OS="netbsd" 2 | TARGET_WORKDIR="/srv/xorg-playground" 3 | TARGET_RELEASE="10.0" 4 | TARGET_ARCH="amd64" 5 | TARGET_PACKAGES=" 6 | bash git pkgconf autoconf automake libtool xorgproto meson pixman xtrans 7 | libxkbfile libxcvt libpciaccess font-util libepoll-shim libepoxy nettle 8 | xkbcomp xcb-util libXcursor libXScrnSaver spice-protocol fontconfig 9 | mkfontscale python311 gmake 10 | " 11 | TARGET_SETS="base comp debug etc misc tests text xbase xcomp xdebug xetc xfont xserver" 12 | 13 | PACKAGE_XSERVER_BUILD_ARGS="-Ddri3=true -Dudev=false -Dudev_kms=false" 14 | PACKAGE_LIBDRM_BUILD_ARGS="-Dnouveau=disabled" 15 | 16 | [ "${NETBSD_10_DRIVERS}" ] || NETBSD_10_DRIVERS="xf86-input-keyboard 17 | xf86-input-mouse 18 | xf86-input-ws 19 | xf86-video-vesa 20 | xf86-video-intel 21 | xf86-video-wsfb" 22 | 23 | XORG_DRIVERS="${XORG_DRIVERS} ${NETBSD_10_DRIVERS}" 24 | 25 | export TARGET_MAKE=gmake 26 | -------------------------------------------------------------------------------- /lib/os/freebsd/targetfunc.sh: -------------------------------------------------------------------------------- 1 | # this file is only included on $TARGET_OS="freebsd" 2 | target_bootstrap_chroot() { 3 | needvar TARGET_OS TARGET_RELEASE TARGET_ARCH 4 | 5 | [ "$HOST_OS_TYPE" == "freebsd" ] || die "FreeBSD jails are only supported on FreeBSD hosts" 6 | 7 | local chroot_dir="$(get_builder_chroot_dir)" 8 | local tarball_dir="$(get_builder_tarball_dir)" 9 | local tarball_url="https://download.freebsd.org/ftp/releases/$TARGET_ARCH/$TARGET_ARCH/$TARGET_RELEASE-RELEASE/base.txz" 10 | local tarball_fn="$tarball_dir/$TARGET_RELEASE-RELEASE-base.txz" 11 | 12 | host_fetch_tarball "$tarball_url" "$tarball_fn" 13 | 14 | mkdir -p "$chroot_dir" 15 | chflags -R noschg "$chroot_dir" 16 | rm -Rf "$chroot_dir" 17 | mkdir -p "$chroot_dir" 18 | tar -xf "$tarball_fn" -C "$chroot_dir" 19 | chflags -R noschg "$chroot_dir" 20 | 21 | if [ -f /etc/resolv.conf ]; then cp /etc/resolv.conf "$chroot_dir/etc/" ; fi 22 | if [ -f /etc/localtime ]; then cp /etc/localtime "$chroot_dir/etc/" ; fi 23 | 24 | # fixme: put this into jail, so we're independent of guest OS 25 | freebsd-update -y -b "$chroot_dir" fetch install 26 | } 27 | -------------------------------------------------------------------------------- /lib/os/illumos/targetfunc.sh: -------------------------------------------------------------------------------- 1 | target_bootstrap_chroot() { 2 | log "bootstrapping Illumos target from host" 3 | 4 | needvar HOST_CHROOT_RPOOL 5 | 6 | [ "$HOST_OS_TYPE" == "$TARGET_OS" ] || die "host $HOST_OS_TYPE mismatch target $TARGET_OS" 7 | 8 | local chroot_dir="$(get_builder_chroot_dir)" 9 | local chroot_name="$(get_builder_chroot_name)" 10 | local chroot_rpool="$HOST_CHROOT_RPOOL/$chroot_name" 11 | 12 | zfs create -p -P $chroot_rpool || true 13 | 14 | # FIXME: should support bootstrapping other releases, too 15 | log "initialize chroot" 16 | mkdir -p "$chroot_dir/var/pkg" \ 17 | "$chroot_dir/tmp" \ 18 | "$chroot_dir/etc" \ 19 | "$chroot_dir/dev" \ 20 | "$chroot_dir/devices" \ 21 | "$chroot_dir/proc" 22 | cp /var/pkg/pkg5.image "$chroot_dir/var/pkg" 23 | 24 | log "installing initial packages" 25 | pkg -R "$chroot_dir" install pkg bash 26 | 27 | if [ ! -f "$chroot_dir/usr/include/sys/srn.h" ]; then 28 | log "need to copy sys/srn.h" 29 | cp $SCRIPT_ROOT_DIR/lib/os/illumos/files/srn.h "$chroot_dir/usr/include/sys/srn.h" 30 | fi 31 | } 32 | -------------------------------------------------------------------------------- /etc/targets/openbsd-7.5.cf: -------------------------------------------------------------------------------- 1 | TARGET_OS="openbsd" 2 | TARGET_WORKDIR="/srv/xorg-playground" 3 | TARGET_RELEASE="7.5" 4 | TARGET_ARCH="amd64" 5 | TARGET_PACKAGES=" 6 | bash git pkgconf autoconf-2.71 automake-1.16.5 libtool meson 7 | spice-protocol epoll-shim py3-backports-strenum 8 | " 9 | TARGET_SETS="base75 comp75 man75 xbase75 xfont75 xserv75 xshare75" 10 | TARGET_MIRROR="https://cdn.openbsd.org/pub/OpenBSD" 11 | 12 | PACKAGE_XSERVER_BUILD_ARGS="-Ddri3=true -Dudev=false -Dudev_kms=false" 13 | PACKAGE_LIBDRM_BUILD_ARGS="-Dnouveau=disabled" 14 | 15 | [ "${OPENBSD_7_5_DRIVERS}" ] || OPENBSD_7_5_DRIVERS="xf86-input-keyboard 16 | xf86-input-mouse 17 | xf86-video-vesa 18 | xf86-video-intel 19 | xf86-video-wsfb" 20 | 21 | XORG_DRIVERS="${XORG_DRIVERS} ${OPENBSD_7_5_DRIVERS}" 22 | 23 | # autotools wrappers on OpenBSD need this 24 | export AUTOCONF_VERSION=2.71 25 | export AUTOMAKE_VERSION=1.16 26 | 27 | # needed for extra python modules 28 | export PYTHONPATH=/usr/local/lib/python3.10/site-packages/backports 29 | -------------------------------------------------------------------------------- /lib/bootstrap.sh: -------------------------------------------------------------------------------- 1 | chroot_bootstrap_distro() { 2 | local chroot_dir="$(get_builder_chroot_dir)" 3 | local chroot_prefix="$(dirname $chroot_dir)" 4 | local chroot_lock="$chroot_dir.LOCK" 5 | needvar TARGET_OS TARGET_RELEASE 6 | 7 | if [ ! "$chroot_dir" ]; then 8 | die "schroot_bootstrap_distro " 9 | fi 10 | 11 | if [ -f "$chroot_lock" ]; then 12 | sudo rm -Rf "$chroot_dir" 13 | sudo rm -f "$chroot_lock" 14 | fi 15 | 16 | if [ -d "$chroot_dir" ]; then 17 | log "chroot for $TARGET_OS $TARGET_RELEASE already exists" 18 | log "to rebuild it, remove $chroot_dir" 19 | return 0 20 | fi 21 | 22 | sudo mkdir -p "$chroot_prefix" 23 | sudo touch "$chroot_lock" 24 | 25 | log "need to boostrap $TARGET_OS $TARGET_RELEASE chroot dir $chroot_dir" 26 | 27 | target_bootstrap_chroot 28 | 29 | sudo rm -f "$chroot_lock" 30 | } 31 | 32 | builder_bootstrap() { 33 | needvar TARGET_PACKAGES 34 | 35 | # call the host-OS specific setup function 36 | host_os_setup 37 | 38 | chroot_bootstrap_distro 39 | 40 | jailrun register "$(get_builder_chroot_dir)" 41 | jailrun syncme 42 | jailrun install $TARGET_PACKAGES || die "installing target packages failed" 43 | } 44 | -------------------------------------------------------------------------------- /lib/jail/jailrun-sandboxctl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # jail helper for sandbox(1) 4 | # it's needed as external script, in order to bridge sudo 5 | # Note: assuming we can be called ourselves in jail at the same path 6 | 7 | set -e 8 | SCRIPT_ROOT_DIR="$(cd "$(dirname "$0")/../../" && pwd -P)" 9 | 10 | . $SCRIPT_ROOT_DIR/lib/base.sh 11 | 12 | needvar TARGET_ID HOST_JAIL_TYPE 13 | 14 | command="$1" 15 | shift || true 16 | 17 | sandbox_name=$(get_builder_chroot_name) 18 | 19 | selfcmd="$script_libdir/jailrun-$HOST_JAIL_TYPE" 20 | chroot_dir="$(get_builder_chroot_dir)" 21 | 22 | if [ ! "$command" ]; then 23 | die "missing command" 24 | fi 25 | 26 | case "$command" in 27 | exec) 28 | log "sandbox exec: $@" 29 | TARGET_ID="$TARGET_ID" sandboxctl -c "${sandbox_name}" run "$@" || die "failed jail command: $@" 30 | ;; 31 | execroot) 32 | sudo TARGET_ID="$TARGET_ID" $selfcmd exec "$@" 33 | ;; 34 | install) 35 | sudo sandboxctl -c "${sandbox_name}" run "$SCRIPT_ROOT_DIR/lib/os/$TARGET_OS/target-package-install" "$@" 36 | ;; 37 | register) 38 | echo "sandbox register" 39 | sudo cp /etc/resolv.conf "$chroot_dir/etc" 40 | ;; 41 | syncme) 42 | sudo rsync -r "$SCRIPT_ROOT_DIR/" "$chroot_dir/$SCRIPT_ROOT_DIR" 43 | ;; 44 | stop) 45 | sudo sandboxctl -c "${sandbox_name}" unmount -f 46 | ;; 47 | *) 48 | die "unknown command $@" 49 | ;; 50 | esac 51 | -------------------------------------------------------------------------------- /etc/targets/openindiana-hipster.cf: -------------------------------------------------------------------------------- 1 | TARGET_OS="illumos" 2 | TARGET_WORKDIR="/srv/xorg-playground" 3 | TARGET_RELEASE="hipster" 4 | TARGET_ARCH="amd64" 5 | TARGET_PACKAGES=" 6 | gcc-13 7 | developer/build/autoconf 8 | developer/build/meson 9 | developer/build/libtool 10 | developer/build/automake 11 | developer/build/gnu-make 12 | developer/build/pkgconf 13 | developer/build/pkg-config 14 | developer/build/cmake 15 | developer/lexer/re2c 16 | developer/versioning/git 17 | file/gnu-coreutils 18 | library/python/pip-39 19 | shell/bash 20 | service/opengl/ogl-select 21 | system/header/header-audio 22 | system/header/header-drm 23 | system/header/header-usb 24 | text/gawk 25 | x11/keyboard/xkbcomp 26 | x11/library/libepoxy 27 | x11/library/libxfont2 28 | x11/library/libxshmfence 29 | x11/library/mesa 30 | x11/library/xtrans 31 | x11/mkfontdir 32 | x11/mkfontscale 33 | " 34 | 35 | PACKAGE_LIBDRM_BUILD_ARGS="-Dnouveau=disabled" 36 | 37 | [ "${OPENINDIANA_HIPSTER_DRIVERS}" ] || OPENINDIANA_HIPSTER_DRIVERS="xf86-input-keyboard 38 | xf86-input-mouse 39 | xf86-video-vesa 40 | xf86-video-intel" 41 | 42 | XORG_DRIVERS="${XORG_DRIVERS} ${OPENINDIANA_HIPSTER_DRIVERS}" 43 | XORG_EXTRA_DEPS="libxcvt" 44 | 45 | # need extra tools 46 | export PATH="$PATH:/usr/gnu/bin" 47 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/04-doc-update.yml: -------------------------------------------------------------------------------- 1 | name: 🔖 Documentation update 2 | description: Make your mark for better documentation 3 | 4 | labels: [documentation, needs-triage] 5 | 6 | body: 7 | - type: markdown 8 | attributes: 9 | value: | 10 | Please fill out the sections below to help others understand our software. If you have a general idea or question then please use the [discussions](https://github.com/orgs/X11Libre/discussions). 11 | - type: textarea 12 | id: description 13 | attributes: 14 | label: Describe the update 15 | placeholder: These things need to be better documented. 16 | validations: 17 | required: true 18 | - type: textarea 19 | id: environment 20 | attributes: 21 | label: Additional Information 22 | description: Additional information you want to provide such as tickets related to changes in the software, affected files, screenshots, etc. 23 | placeholder: | 24 | Add any other context about the update here. 25 | - type: checkboxes 26 | id: checks 27 | attributes: 28 | label: Extra fields 29 | options: 30 | - label: I have checked the existing [issues](https://github.com/X11Libre/xorg-testing/issues) 31 | required: true 32 | - label: I have read the [Contributing Guidelines](https://github.com/X11Libre/xserver/blob/master/CONTRIBUTING.md) 33 | required: true 34 | - label: I'd like to work on this issue 35 | - type: markdown 36 | attributes: 37 | value: | 38 | Thanks for requesting this update! We will get back to you as soon as possible. 39 | -------------------------------------------------------------------------------- /lib/jail/jailrun-schroot: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # jail helper for schroot 4 | # it's needed as external script, in order to bridge sudo 5 | # Note: assuming we can be called ourselves in jail at the same path 6 | 7 | set -e 8 | SCRIPT_ROOT_DIR="$(cd "$(dirname "$0")/../../" && pwd -P)" 9 | 10 | . $SCRIPT_ROOT_DIR/lib/base.sh 11 | 12 | needvar TARGET_ID HOST_JAIL_TYPE 13 | 14 | command="$1" 15 | shift || true 16 | 17 | builder_chroot_name=`get_builder_chroot_name` 18 | 19 | selfcmd="$script_libdir/jailrun-$HOST_JAIL_TYPE" 20 | 21 | if [ ! "$command" ]; then 22 | die "missing command" 23 | fi 24 | 25 | case "$command" in 26 | exec) 27 | TARGET_ID="$TARGET_ID" schroot -c "$builder_chroot_name" -- "$@" || die "failed jail command: $@" 28 | ;; 29 | install) 30 | sudo schroot -c "$builder_chroot_name" -- "$SCRIPT_ROOT_DIR/lib/os/$TARGET_OS/target-package-install" "$@" 31 | ;; 32 | register) 33 | chroot_dir="$1" 34 | sudo mkdir -p `dirname "$chroot_dir" /etc/schroot/chroot.d` 35 | ( 36 | echo "[$builder_chroot_name]" 37 | echo "description=Xorg playground: $TARGET_OS $TARGET_RELEASE" 38 | echo "type=directory" 39 | echo "directory=$chroot_dir" 40 | echo "users=$(whoami)" 41 | echo "root-groups=root" 42 | echo "preserve-environment=true" 43 | ) | sudo tee "/etc/schroot/chroot.d/$builder_chroot_name.conf" >/dev/null 44 | ;; 45 | syncme) 46 | log "no need to sync ourself on schroot" 47 | ;; 48 | stop) 49 | ;; 50 | *) 51 | die "unknown command $0 $@" 52 | ;; 53 | esac 54 | -------------------------------------------------------------------------------- /lib/jail/jailrun-illumos-chroot: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # jail helper for schroot 4 | # it's needed as external script, in order to bridge sudo 5 | # Note: assuming we can be called ourselves in jail at the same path 6 | 7 | set -e 8 | SCRIPT_ROOT_DIR="$(cd "$(dirname "$0")/../../" && pwd -P)" 9 | 10 | . $SCRIPT_ROOT_DIR/lib/base.sh 11 | 12 | needvar TARGET_ID HOST_JAIL_TYPE 13 | 14 | command="$1" 15 | shift || true 16 | 17 | chroot_dir="$(get_builder_chroot_dir)" 18 | 19 | [ `uname` == "SunOS" ] || die "can only run on SunOS (Illumos)" 20 | 21 | case "$command" in 22 | exec) 23 | TARGET_ID="$TARGET_ID" sudo chroot "$chroot_dir" "$@" || die "failed jail command: $@" 24 | ;; 25 | install) 26 | sudo chroot "$chroot_dir" "$SCRIPT_ROOT_DIR/lib/os/$TARGET_OS/target-package-install" "$@" 27 | ;; 28 | register) 29 | mkdir -p "$chroot_dir/dev" "$chroot_dir/devices" "$chroot_dir/proc" 30 | # FIXME: need error handling 31 | mount -F lofs /dev "$chroot_dir/dev" || true 32 | mount -F lofs /devices "$chroot_dir/devices" || true 33 | mount -F lofs /proc "$chroot_dir/proc" || true 34 | cp /etc/resolv.conf "$chroot_dir/etc" 35 | cp /etc/nsswitch.conf "$chroot_dir/etc" 36 | ;; 37 | syncme) 38 | sudo rsync --no-acls -r "$SCRIPT_ROOT_DIR/" "$chroot_dir/$SCRIPT_ROOT_DIR" 39 | ;; 40 | stop) 41 | # FIXME: need error handling 42 | umount "$chroot_dir/dev" || true 43 | umount "$chroot_dir/devices" || true 44 | umount "$chroot_dir/proc" || true 45 | ;; 46 | *) 47 | die "unknown command: $command -- $0 -- $@" 48 | ;; 49 | esac 50 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/05-org-task.yml: -------------------------------------------------------------------------------- 1 | name: ✅ Organizational task 2 | description: Create a task for project organization 3 | 4 | labels: [needs-triage, organization] 5 | 6 | body: 7 | - type: markdown 8 | attributes: 9 | value: | 10 | Please fill out the sections below to get organizational things done. If you have a general idea or question then please use the [discussions](https://github.com/orgs/X11Libre/discussions). 11 | - type: textarea 12 | id: description 13 | attributes: 14 | label: Describe the task 15 | placeholder: These things need to be done. 16 | validations: 17 | required: true 18 | - type: textarea 19 | id: rationale 20 | attributes: 21 | label: "It should be done because" 22 | placeholder: Doing Y is needed for Z. 23 | - type: textarea 24 | id: environment 25 | attributes: 26 | label: Additional Information 27 | description: Additional information you want to provide such as the context for bigger tasks, the implicatons on existing workflows, related issues, etc. 28 | placeholder: | 29 | Add any other context about the task here. 30 | - type: checkboxes 31 | id: checks 32 | attributes: 33 | label: Extra fields 34 | options: 35 | - label: I have checked the existing [issues](https://github.com/X11Libre/xorg-testing/issues) 36 | required: true 37 | - label: I have read the [Contributing Guidelines](https://github.com/X11Libre/xserver/blob/master/CONTRIBUTING.md) 38 | required: true 39 | - label: I'd like to work on this issue 40 | - type: markdown 41 | attributes: 42 | value: | 43 | Thanks for adding this task! We will get back to you as soon as possible. 44 | -------------------------------------------------------------------------------- /lib/os/openbsd/targetfunc.sh: -------------------------------------------------------------------------------- 1 | # this file is only included on $TARGET_OS="openbsd" 2 | 3 | __copytojail() { 4 | local fn="$1" 5 | local dn="$(dirname $fn)" 6 | local chroot_dir="$(get_builder_chroot_dir)" 7 | 8 | log "copying to chroot: $fn" 9 | mkdir -p "$chroot_dir/$dn" 10 | cp "$fn" "$chroot_dir/$dn" 11 | } 12 | 13 | copytojail() { 14 | for i in "$@" ; do 15 | __copytojail "$i" 16 | done 17 | } 18 | 19 | target_bootstrap_chroot() { 20 | needvar TARGET_OS TARGET_RELEASE TARGET_ARCH TARGET_MIRROR TARGET_SETS 21 | 22 | [ "$HOST_OS_TYPE" == "openbsd" ] || die "OpenBSD chroot's are only supported on OpenBSD hosts" 23 | 24 | local chroot_dir="$(get_builder_chroot_dir)" 25 | local tarball_dir="$(get_builder_tarball_dir)" 26 | 27 | local tarball_dir="$(get_builder_tarball_dir)/openbsd/$TARGET_RELEASE/$TARGET_ARCH" 28 | local tarball_mirror="$TARGET_MIRROR/$TARGET_RELEASE/$TARGET_ARCH" 29 | 30 | mkdir -p "$tarball_dir/binary/sets" 31 | for i in ${TARGET_SETS}; do 32 | host_fetch_tarball "$tarball_mirror/$i.tgz" "$tarball_dir/$i.tgz" 33 | release_sets="$release_sets $i.tgz" 34 | done 35 | 36 | rm -Rf "$chroot_dir" 37 | mkdir -p "$chroot_dir" 38 | 39 | log "bootstrap: unpacking tarballs" 40 | for i in $TARGET_SETS; do 41 | tar -xzf "$tarball_dir/$i.tgz" -C "$chroot_dir" 42 | done 43 | 44 | log "bootstrap: now creating /dev" 45 | mkdir -p "$chroot_dir/dev" 46 | ( cd "$chroot_dir/dev" && echo "in chroot dir" && pwd && /dev/MAKEDEV all ) 47 | 48 | log "bootstrap: copying /etc files" 49 | copytojail /etc/installurl /etc/resolv.conf /etc/localtime /etc/passwd \ 50 | /etc/master.passwd /etc/pwd.db /etc/spwd.db /etc/ssl/cert.pem 51 | } 52 | -------------------------------------------------------------------------------- /lib/build-xserver.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # execute me in ONLY in jail, never on host 4 | 5 | set -e 6 | set +x 7 | SCRIPT_ROOT_DIR="$(cd "$(dirname "$0")/../" && pwd -P)" 8 | 9 | . $SCRIPT_ROOT_DIR/lib/builder.sh 10 | 11 | if [ ! "$CC" ]; then 12 | if mycc=`which cc` >/dev/null ; then 13 | export CC="$mycc" 14 | elif mycc=`which gcc` >/dev/null ; then 15 | export CC="$mycc" 16 | elif mycc=`which clang` >/dev/null ; then 17 | export CC="$mycc" 18 | else 19 | die "cant find a C compiler" 20 | fi 21 | fi 22 | 23 | log "C-Compiler: $CC" 24 | 25 | TARGET_CC_ARCH=$($CC -dumpmachine) 26 | ARCH_LIBDIR="lib/$TARGET_CC_ARCH/" 27 | 28 | # fixme: speciality for Illumos 29 | if [ "$(uname)" == "SunOS" ]; then 30 | mkdir -p /var/run/opengl/include/ /usr/include/GL/internal 31 | ln -sf ../../../../usr/include/mesa/gl.h var/run/opengl/include/gl.h 32 | ln -sf ../../../../usr/include/mesa/glext.h var/run/opengl/include/glext.h 33 | ln -sf ../../mesa/internal/dri_interface.h /usr/include/GL/internal/dri_interface.h 34 | build_ninja 35 | fi 36 | 37 | # fixme: this could be os/distro specific 38 | export PKG_CONFIG_PATH="$XORG_PREFIX/share/pkgconfig:$XORG_PREFIX/lib/pkgconfig:$XORG_PREFIX/$ARCH_LIBDIR/pkgconfig:$XORG_PREFIX/libdata/pkgconfig:/usr/local/libdata" 39 | 40 | build_package xorg-util-macros 41 | build_package xorgproto 42 | build_package xorg-font-util 43 | build_package libdrm 44 | build_package xcb-proto 45 | build_package libxcb 46 | build_package libxcb-wm 47 | build_package libxcb-util 48 | 49 | for i in $XORG_EXTRA_DEPS ; do 50 | build_package $i 51 | done 52 | 53 | # special hack for Illumos 54 | if [ "$(uname)" == "SunOS" ]; then 55 | pip install strenum 56 | fi 57 | 58 | build_package xserver 59 | build_package xkeyboard-config 60 | build_package xkbcomp 61 | build_package font-xfree86-type-1 62 | 63 | for i in $XORG_DRIVERS ; do 64 | build_driver $i 65 | done 66 | 67 | fc-cache 68 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/02-feature-request.yml: -------------------------------------------------------------------------------- 1 | name: ✨ Feature request 2 | description: Suggest a feature for this software 3 | labels: [enhancement, needs-triage] 4 | 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | Please fill out the sections below to properly describe the new software feature you are suggesting. If you have a general idea or question then please use the [discussions](https://github.com/orgs/X11Libre/discussions). 10 | - type: textarea 11 | id: description 12 | attributes: 13 | label: "Describe the feature" 14 | placeholder: A thing in X that allows to do Y. 15 | validations: 16 | required: true 17 | - type: textarea 18 | id: rationale 19 | attributes: 20 | label: "It should be done because" 21 | placeholder: Doing Y is needed for Z. 22 | validations: 23 | required: true 24 | - type: textarea 25 | id: alternative 26 | attributes: 27 | label: "What are the alternatives?" 28 | placeholder: We could do A or B instead. 29 | - type: textarea 30 | id: context 31 | attributes: 32 | label: Additional context 33 | description: Additional information you want to provide such as references to related issues or protocols, the implications on existing use cases, etc. 34 | placeholder: | 35 | Add any other context about the feature request here. 36 | - type: checkboxes 37 | id: checks 38 | attributes: 39 | label: Extra fields 40 | options: 41 | - label: I have checked the existing [issues](https://github.com/X11Libre/xorg-testing/issues) 42 | required: true 43 | - label: I have read the [Contributing Guidelines](https://github.com/X11Libre/xserver/blob/master/CONTRIBUTING.md) 44 | required: true 45 | - label: I'd like to work on this issue 46 | - type: markdown 47 | attributes: 48 | value: | 49 | Thanks for your suggestion! Let's see together if it can be done. 50 | -------------------------------------------------------------------------------- /lib/base.sh: -------------------------------------------------------------------------------- 1 | 2 | . $SCRIPT_ROOT_DIR/lib/util.sh 3 | 4 | needvar SCRIPT_ROOT_DIR 5 | 6 | script_libdir="$SCRIPT_ROOT_DIR/lib" 7 | script_name=$(basename "$0") 8 | 9 | . $SCRIPT_ROOT_DIR/etc/site.cf 10 | 11 | ## probe the host OS 12 | if [ ! "$HOST_OS" ]; then 13 | case $(uname) in 14 | Linux) 15 | log "detected Linux - assuming debian (set HOST_OS if I'm wrong)" 16 | export HOST_OS="debian" 17 | ;; 18 | FreeBSD) 19 | log "detected FreeBSD" 20 | export HOST_OS="freebsd" 21 | ;; 22 | NetBSD) 23 | log "detected NetBSD" 24 | export HOST_OS="netbsd" 25 | ;; 26 | OpenBSD) 27 | log "detected OpenBSD" 28 | export HOST_OS="openbsd" 29 | ;; 30 | SunOS) 31 | log "detected SunOS" 32 | export HOST_OS="illumos" 33 | ;; 34 | *) 35 | die "unknown uname: $(uname)" 36 | ;; 37 | esac 38 | fi 39 | 40 | . $SCRIPT_ROOT_DIR/etc/hosts/$HOST_OS.cf 41 | 42 | needvar TARGET_ID 43 | export TARGET_ID 44 | 45 | . $SCRIPT_ROOT_DIR/etc/targets/$TARGET_ID.cf 46 | . $SCRIPT_ROOT_DIR/lib/os/$HOST_OS/hostfunc.sh 47 | 48 | needvar HOST_JAIL_TYPE 49 | 50 | needvar TARGET_OS 51 | . $SCRIPT_ROOT_DIR/lib/os/$TARGET_OS/targetfunc.sh 52 | 53 | get_builder_chroot_name() { 54 | needvar TARGET_ID 55 | echo -n "xorg-$TARGET_ID" 56 | } 57 | 58 | get_builder_chroot_dir() { 59 | needvar TARGET_ID HOST_CHROOT_DIR 60 | echo -n "$HOST_CHROOT_DIR/$(get_builder_chroot_name $TARGET_ID)" 61 | } 62 | 63 | get_builder_tarball_dir() { 64 | needvar HOST_CHROOT_DIR 65 | echo -n "$HOST_CHROOT_DIR/tarballs" 66 | } 67 | 68 | jailrun() { 69 | needvar HOST_JAIL_TYPE 70 | $script_libdir/jail/jailrun-$HOST_JAIL_TYPE "$@" 71 | return $? 72 | } 73 | 74 | jailrun_root() { 75 | needvar TARGET_ID 76 | sudo TARGET_ID="$TARGET_ID" $script_libdir/jail/jailrun-$HOST_JAIL_TYPE "$@" 77 | return $? 78 | } 79 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/03-code-cleanup.yml: -------------------------------------------------------------------------------- 1 | name: 🔧 Code cleanup 2 | description: Level up the source code 3 | labels: [code-cleanup, needs-triage] 4 | 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | Please fill out the sections below to properly describe the code cleanup you are suggesting. If you have a general idea or question then please use the [discussions](https://github.com/orgs/X11Libre/discussions). 10 | - type: textarea 11 | id: description 12 | attributes: 13 | label: "Describe the cleanup" 14 | placeholder: C in X needs to be changed into D. 15 | validations: 16 | required: true 17 | - type: textarea 18 | id: rationale 19 | attributes: 20 | label: "It should be done because" 21 | placeholder: Having D is needed for E. 22 | validations: 23 | required: true 24 | - type: textarea 25 | id: alternative 26 | attributes: 27 | label: "What are the alternatives?" 28 | placeholder: We could do A or B instead. 29 | - type: textarea 30 | id: context 31 | attributes: 32 | label: Additional context 33 | description: Additional information you want to provide such as implications on existing code, how to ensure API/ABI stability, which tests are needed or to be run, related issues, etc. 34 | placeholder: | 35 | Add any other context about the cleanup here. 36 | - type: checkboxes 37 | id: checks 38 | attributes: 39 | label: Extra fields 40 | options: 41 | - label: I have checked the existing [issues](https://github.com/X11Libre/xorg-testing/issues) 42 | required: true 43 | - label: I have read the [Contributing Guidelines](https://github.com/X11Libre/xserver/blob/master/CONTRIBUTING.md) 44 | required: true 45 | - label: I'd like to work on this issue 46 | - type: markdown 47 | attributes: 48 | value: | 49 | Thanks for looking at the source code! Let's see together how it can be improved. 50 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/01-bug-report.yml: -------------------------------------------------------------------------------- 1 | name: 🐞 Bug report 2 | description: Create a report to help us improve 3 | 4 | labels: [bug, needs-triage] 5 | 6 | body: 7 | - type: markdown 8 | attributes: 9 | value: | 10 | Please fill out the sections below to help everyone identify and fix the bug. If you have a general idea or question then please use the [discussions](https://github.com/orgs/X11Libre/discussions). 11 | - type: dropdown 12 | id: affected-version 13 | attributes: 14 | label: Affected version 15 | options: 16 | - 0.1.0 17 | - Git master branch 18 | - other or don't know 19 | default: 1 20 | validations: 21 | required: true 22 | - type: textarea 23 | id: description 24 | attributes: 25 | label: Describe your issue 26 | placeholder: When I did X then Y happened. 27 | validations: 28 | required: true 29 | - type: textarea 30 | id: steps 31 | attributes: 32 | label: Steps to reproduce 33 | placeholder: | 34 | 1. Start ... 35 | 2. Do this 36 | 3. Do that 37 | validations: 38 | required: true 39 | - type: textarea 40 | id: expected 41 | attributes: 42 | label: What did you expect? 43 | placeholder: I expected this to happen. 44 | - type: textarea 45 | id: environment 46 | attributes: 47 | label: Additional Information 48 | description: | 49 | Additional information you want to provide such as logs, system info, environment, screenshots, etc. 50 | placeholder: | 51 | Add any other context about the bug here. 52 | - type: checkboxes 53 | id: checks 54 | attributes: 55 | label: Extra fields 56 | options: 57 | - label: I have checked the existing [issues](https://github.com/X11Libre/xorg-testing/issues) 58 | required: true 59 | - label: I have read the [Contributing Guidelines](https://github.com/X11Libre/xserver/blob/master/CONTRIBUTING.md) 60 | required: true 61 | - label: I'd like to work on this issue 62 | - type: markdown 63 | attributes: 64 | value: | 65 | Thanks for reporting this issue! We will get back to you as soon as possible. 66 | -------------------------------------------------------------------------------- /lib/os/illumos/files/srn.h: -------------------------------------------------------------------------------- 1 | /* 2 | * CDDL HEADER START 3 | * 4 | * The contents of this file are subject to the terms of the 5 | * Common Development and Distribution License (the "License"). 6 | * You may not use this file except in compliance with the License. 7 | * 8 | * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 | * or http://www.opensolaris.org/os/licensing. 10 | * See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | * 13 | * When distributing Covered Code, include this CDDL HEADER in each 14 | * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 | * If applicable, add the following below this CDDL HEADER, with the 16 | * fields enclosed by brackets "[]" replaced with your own identifying 17 | * information: Portions Copyright [yyyy] [name of copyright owner] 18 | * 19 | * CDDL HEADER END 20 | */ 21 | 22 | /* 23 | * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 24 | * Use is subject to license terms. 25 | */ 26 | 27 | #ifndef _SYS_SRN_H 28 | #define _SYS_SRN_H 29 | 30 | #ifdef __cplusplus 31 | extern "C" { 32 | #endif 33 | 34 | /* 35 | * The following ioctl commands and structures may not exist 36 | * or may have a different interpretation in a future release. 37 | */ 38 | 39 | 40 | #define SRN_STANDBY_REQ 0xa01 41 | #define SRN_SUSPEND_REQ 0xa02 42 | #define SRN_NORMAL_RESUME 0xa03 43 | #define SRN_CRIT_RESUME 0xa04 44 | #define SRN_BATTERY_LOW 0xa05 45 | #define SRN_POWER_CHANGE 0xa06 46 | #define SRN_UPDATE_TIME 0xa07 47 | #define SRN_CRIT_SUSPEND_REQ 0xa08 48 | #define SRN_USER_STANDBY_REQ 0xa09 49 | #define SRN_USER_SUSPEND_REQ 0xa0a 50 | #define SRN_SYS_STANDBY_RESUME 0xa0b 51 | #define SRN_IOC_NEXTEVENT 0xa0c 52 | #define SRN_IOC_RESUME 0xa0d 53 | #define SRN_IOC_SUSPEND 0xa0e 54 | #define SRN_IOC_STANDBY 0xa0f 55 | #define SRN_IOC_AUTOSX 0xa10 /* change behavior of driver */ 56 | 57 | typedef struct srn_event_info 58 | { 59 | int ae_type; 60 | 61 | } srn_event_info_t; 62 | 63 | #ifdef _KERNEL 64 | 65 | #define SRN_MAX_CLONE 8 /* only two consumer known */ 66 | 67 | #define SRN_TYPE_APM 1 68 | #define SRN_TYPE_AUTOSX 2 69 | 70 | #endif 71 | 72 | 73 | #ifdef __cplusplus 74 | } 75 | #endif 76 | 77 | #endif /* _SYS_SRN_H */ 78 | -------------------------------------------------------------------------------- /etc/sources.cf: -------------------------------------------------------------------------------- 1 | . $SCRIPT_ROOT_DIR/etc/sources-upstream.cf 2 | 3 | # needs master, until release is made 4 | # SOURCE_XORGPROTO_REF="master" 5 | 6 | # testing branch 7 | SOURCE_XSERVER_REPO="https://gitlab.freedesktop.org/metux/xserver.git" 8 | SOURCE_XSERVER_REF="incubate" # for collected open MRs use branch "incubate" 9 | 10 | # incubator branch 11 | SOURCE_XF86_VIDEO_AMDGPU_REPO="https://gitlab.freedesktop.org/metux/xf86-video-amdgpu.git" 12 | SOURCE_XF86_VIDEO_AMDGPU_REF="incubate" 13 | 14 | # incubator branch 15 | SOURCE_XF86_VIDEO_ARMSOC_REPO="https://gitlab.freedesktop.org/metux/xf86-video-armsoc.git" 16 | SOURCE_XF86_VIDEO_ARMSOC_REF="incubate" 17 | 18 | # incubator branch 19 | SOURCE_XF86_VIDEO_ATI_REPO="https://gitlab.freedesktop.org/metux/xf86-video-ati.git" 20 | SOURCE_XF86_VIDEO_ATI_REF="incubate" 21 | 22 | # incubator branch 23 | SOURCE_XF86_VIDEO_FREEDRENO_REPO="https://gitlab.freedesktop.org/metux/xf86-video-freedreno.git" 24 | SOURCE_XF86_VIDEO_FREEDRENO_REF="incubate" 25 | 26 | # needs some fixes, upstream version won't build yet 27 | SOURCE_XF86_VIDEO_INTEL_REPO="https://gitlab.freedesktop.org/metux/xf86-video-intel.git" 28 | SOURCE_XF86_VIDEO_INTEL_REF="incubate" 29 | 30 | # incubator branch 31 | SOURCE_XF86_VIDEO_OMAP_REPO="https://gitlab.freedesktop.org/metux/xf86-video-omap.git" 32 | SOURCE_XF86_VIDEO_OMAP_REF="incubate" 33 | 34 | # incubator branch 35 | SOURCE_XF86_VIDEO_NOUVEAU_REPO="https://gitlab.freedesktop.org/metux/xf86-video-nouveau.git" 36 | SOURCE_XF86_VIDEO_NOUVEAU_REF="incubate" 37 | 38 | # incubator branch 39 | SOURCE_XF86_VIDEO_QXL_REPO="https://gitlab.freedesktop.org/metux/xf86-video-qxl.git" 40 | SOURCE_XF86_VIDEO_QXL_REF="incubate" 41 | 42 | # incubator branch 43 | SOURCE_XF86_VIDEO_R128_REPO="https://gitlab.freedesktop.org/metux/xf86-video-r128.git" 44 | SOURCE_XF86_VIDEO_R128_REF="incubate" 45 | 46 | # incubator branch 47 | SOURCE_XF86_VIDEO_VMWARE_REPO="https://gitlab.freedesktop.org/metux/xf86-video-vmware.git" 48 | SOURCE_XF86_VIDEO_VMWARE_REF="incubate" 49 | 50 | # testing branch 51 | SOURCE_XF86_VIDEO_WSFB_REPO="https://gitlab.freedesktop.org/metux/xf86-video-wsfb.git" 52 | SOURCE_XF86_VIDEO_WSFB_REF="incubate" 53 | 54 | # testing branch 55 | SOURCE_XF86_INPUT_LIBINPUT_REPO="https://gitlab.freedesktop.org/metux/xf86-input-libinput.git" 56 | SOURCE_XF86_INPUT_LIBINPUT_REF="incubate" 57 | -------------------------------------------------------------------------------- /lib/os/netbsd/targetfunc.sh: -------------------------------------------------------------------------------- 1 | # this file is only included on $TARGET_OS="netbsd" 2 | target_bootstrap_chroot() { 3 | needvar TARGET_OS TARGET_RELEASE TARGET_ARCH TARGET_SETS 4 | 5 | export PATH="$PATH:/bin:/sbin:/usr/bin:/usr/sbin:/usr/pkg/bin:/usr/pkg/sbin" 6 | 7 | echo "bootstrapping NetBSD" 8 | [ "$HOST_OS_TYPE" == "netbsd" ] || die "NetBSD jails are only supported on NetBSD hosts" 9 | 10 | local chroot_dir="$(get_builder_chroot_dir)" 11 | local tarball_dir="$(get_builder_tarball_dir)/netbsd/${TARGET_RELEASE}/${TARGET_ARCH}" 12 | local tarball_mirror="https://cdn.netbsd.org/pub/NetBSD/NetBSD-${TARGET_RELEASE}/${TARGET_ARCH}/binary/sets" 13 | local sandbox_name="$(get_builder_chroot_name)" 14 | local pkgsrc_mirror="https://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/${TARGET_ARCH}/${TARGET_RELEASE}/All/" 15 | local release_sets="" 16 | 17 | mkdir -p "$tarball_dir/binary/sets" 18 | for i in ${TARGET_SETS}; do 19 | host_fetch_tarball "$tarball_mirror/$i.tar.xz" "$tarball_dir/binary/sets/$i.tar.xz" 20 | release_sets="$release_sets $i.tar.xz" 21 | done 22 | 23 | # FIXME: put this into jalirun register 24 | mkdir -p /usr/pkg/etc/sandboxctl 25 | sudo tee "/usr/pkg/etc/sandboxctl//$sandbox_name.conf" >/dev/null << __EOF__ 26 | ## generated by xorg-testing ground - DO NOT EDIT 27 | SANDBOX_TYPE=netbsd-release 28 | SANDBOX_ROOT="$chroot_dir" 29 | 30 | NETBSD_RELEASE_RELEASEDIR="${tarball_dir}" 31 | NETBSD_RELEASE_SETS="${release_sets}" 32 | __EOF__ 33 | 34 | log "now creating sandbox ..." 35 | sandboxctl -c "${sandbox_name}" create 36 | 37 | log "deploy ca-certificates" 38 | if [ -f /etc/resolv.conf ]; then cp /etc/resolv.conf "$chroot_dir/etc/" ; fi 39 | mkdir -p $chroot_dir/etc/openssl/certs 40 | cp /etc/openssl/certs/* $chroot_dir/etc/openssl/certs || true 41 | 42 | sudo sandboxctl -c "${sandbox_name}" run tee /etc/pkg_install.conf >/dev/null << __EOF__ 43 | PKG_PATH=${pkgsrc_mirror} 44 | __EOF__ 45 | 46 | log "installing pkgin in sandbox ${sandbox_name}" 47 | sudo sandboxctl -c "${sandbox_name}" run pkg_add pkgin 48 | sudo sandboxctl -c "${sandbox_name}" run pkgin -y install python312 49 | sudo sandboxctl -c "${sandbox_name}" run ln -s /usr/pkg/bin/python3.11 /usr/pkg/bin/python3 50 | 51 | log "finished bootstrapping ${sandbox_name}" 52 | } 53 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # X.org testing ground 2 | 3 | A little toolkit to help in testing X.org Xserver 4 | 5 | ## Getting started 6 | 7 | This little toolkit aims helping building and testing Xorg in a jail. 8 | 9 | As for now *(as host as well as jail)* only Debian-based distros supported, 10 | for jailing just schroot. But much more planned for the future. 11 | 12 | The idea is giving testers a tool for installing latest Xorg directly 13 | from git heads, so they don't need to do this manually, anymore. 14 | 15 | For the future also planned adding test cases that can be run automatically. 16 | Possibly also test cycle automation *(eg. via labgrid)*, so one doesn't even 17 | need to manually log on individual DUTs anymore. 18 | 19 | ## Supported platforms 20 | 21 | * GNU/Linux (apt-based, eg. Debian) 22 | * FreeBSD 14 23 | * NetBSD 10 24 | * OpenBSD 7.5 25 | * Illumos: OpenIndiana Hipster 26 | 27 | ## Prerequisites 28 | 29 | * git (for cloning this repo) 30 | * bash (this script) 31 | * on NetBSD: pkgin 32 | * anything else should be pulled in automatically 33 | 34 | ## Configuration 35 | 36 | * all configs residing under [`./etc`](etc) subdirectory 37 | * some site specific things can be configured in [`etc/site.cf`](etc/site.cf) 38 | * [`etc/hosts/`](etc/hosts) there's one config per host type *(as used in $HOST_OS in [`site.cf`](etc/site.cf))* 39 | * [`etc/targets/`](etc/targets) there's one config per target type *(as used in $TARGET_ID in [`site.cf`](etc/site.cf))* 40 | 41 | ## Running 42 | 43 | * currently just building basic Xserver: placed under `/usr/local` 44 | * call [`build-tesing-jail`](build-testing-jail) for that 45 | * NOTE: this will automatically install few host packages *(schroot, mdebootstrap, ...)* 46 | * NOTE: if started as non-root, it will ask for password *(sudo)* 47 | 48 | ## Troubleshooting 49 | 50 | * chroot's are stored under `$HOST_CHROOT_DIR` *(default `/var/chroots/xorg-testing/`)* 51 | * in worst case the chroot can always be removed *(`/var/chroots/xorg-testing/`)* 52 | * forcing re-clone and rebuild: remove the git clone *(in chroot, under `/srv/xorg-testing/...`)* as well as the corresponding `*.DONE` file 53 | * automatic rebuild also happens when the HEAD of the package's git clone changes *(eg. pulled, committed or changed branch)* 54 | 55 | ## Project status 56 | 57 | It's all pretty early yet. If you encounter any problems or like to have enhancements, 58 | feel free to submit bug reports or pull requests. 59 | 60 | ## Author & Contact 61 | 62 | Enrico Weigelt, metux IT consult 63 | -------------------------------------------------------------------------------- /lib/jail/jailrun-bsdjail: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # jail helper for schroot 4 | # it's needed as external script, in order to bridge sudo 5 | # Note: assuming we can be called ourselves in jail at the same path 6 | 7 | set -e 8 | SCRIPT_ROOT_DIR="$(cd "$(dirname "$0")/../../" && pwd -P)" 9 | 10 | . $SCRIPT_ROOT_DIR/lib/base.sh 11 | 12 | needvar TARGET_ID HOST_JAIL_TYPE 13 | 14 | command="$1" 15 | shift || true 16 | 17 | builder_jail_name=$(get_builder_chroot_name) 18 | 19 | selfcmd="$script_libdir/jailrun-$HOST_JAIL_TYPE" 20 | 21 | if [ ! "$command" ]; then 22 | die "missing command" 23 | fi 24 | 25 | case "$command" in 26 | exec) 27 | log "jail exec: $@" 28 | TARGET_ID="$TARGET_ID" jexec "$builder_jail_name" "$@" || die "failed jail command: $@" 29 | ;; 30 | install) 31 | sudo jexec "$builder_jail_name" "$SCRIPT_ROOT_DIR/lib/os/$TARGET_OS/target-package-install" "$@" 32 | ;; 33 | register) 34 | chroot_dir="$1" 35 | sudo cp /etc/resolv.conf "$chroot_dir/etc" 36 | sudo mkdir -p /etc/jail.conf.d 37 | sudo tee "/etc/jail.conf.d/$builder_jail_name.conf" >/dev/null << __EOF__ 38 | ## generated by xorg-testing ground - DO NOT EDIT 39 | ${builder_jail_name} { 40 | # STARTUP/LOGGING' 41 | exec.start = "/bin/sh /etc/rc"; 42 | exec.stop = "/bin/sh /etc/rc.shutdown"; 43 | exec.consolelog = "/var/log/jail_console_${builder_jail_name}.log"; 44 | # PERMISSIONS 45 | allow.raw_sockets; 46 | # exec.clean; 47 | mount.devfs; 48 | 49 | # HOSTNAME/PATH 50 | host = "inherit"; 51 | host.hostname = "${builder_jail_name}"; 52 | path = "${chroot_dir}"; 53 | 54 | # NETWORK 55 | ip4 = "inherit"; 56 | # ip4.addr = 192.168.1.151; 57 | # interface = em0; 58 | } 59 | __EOF__ 60 | if [ ! -f /etc/jail.conf ]; then 61 | log "creating new /etc/jail.conf" 62 | sudo tee "/etc/jail.conf" >/dev/null << __EOF__ 63 | ## generated by xorg-testing ground 64 | ## it's only written once when not existing yet 65 | ## feel free to edit at will, but leave in including /etc/jail.conf.d/* 66 | .include "/etc/jail.conf.d/*.conf"; 67 | __EOF__ 68 | else 69 | log "/etc/jail.conf already existing. not touching it" 70 | fi 71 | sudo jail -cm "${builder_jail_name}" 72 | ;; 73 | syncme) 74 | sudo rsync -r "$SCRIPT_ROOT_DIR/" "$(get_builder_chroot_dir)/$SCRIPT_ROOT_DIR" 75 | ;; 76 | stop) 77 | sudo jail -r "${builder_jail_name}" 78 | ;; 79 | *) 80 | die "unknown command $0 $@" 81 | ;; 82 | esac 83 | -------------------------------------------------------------------------------- /lib/builder.sh: -------------------------------------------------------------------------------- 1 | . $SCRIPT_ROOT_DIR/lib/base.sh 2 | . $SCRIPT_ROOT_DIR/etc/sources.cf 3 | 4 | # get the cloned git working directory path 5 | get_workdir() { 6 | local id="$1" 7 | needvar TARGET_WORKDIR 8 | echo -n "$TARGET_WORKDIR/$id.git" 9 | } 10 | 11 | # get the actual source tree path (possibly subdir of get_workdir()) 12 | get_work_tree() { 13 | local id="$1" 14 | local wd=`get_workdir "$id"` 15 | local subdir=`cf_source_subtree $id` 16 | echo -n "${wd}/${subdir}" 17 | } 18 | 19 | get_source_repo() { 20 | local id="$1" 21 | local var="${id^^}" 22 | var="SOURCE_${var//-/_}_REPO" 23 | var="${!var}" 24 | [ "$var" ] || die "missing source repo for: $id" 25 | echo "${var}" 26 | } 27 | 28 | get_source_ref() { 29 | local id="$1" 30 | id="${id^^}" 31 | id="SOURCE_${id//-/_}_REF" 32 | echo "${!id}" 33 | } 34 | 35 | cf_source_subtree() { 36 | local id="$1" 37 | id="${id^^}" 38 | id="SOURCE_${id//-/_}_SUBTREE" 39 | echo "${!id}" 40 | } 41 | 42 | get_pkg_args() { 43 | local id="$1" 44 | id="${id^^}" 45 | id="PACKAGE_${id//-/_}_BUILD_ARGS" 46 | echo "${!id}" 47 | } 48 | 49 | get_pkg_cflags() { 50 | local id="$1" 51 | id="${id^^}" 52 | id="PACKAGE_${id//-/_}_EXTRA_CFLAGS" 53 | echo "${!id}" 54 | } 55 | 56 | clone_work_repo() { 57 | local id="$1" 58 | local repo="$(get_source_repo "$id")" 59 | local ref="$(get_source_ref "$id")" 60 | local workdir="$(get_workdir "$id")" 61 | 62 | if [ -f "$workdir/.git/config" ]; then 63 | log "git repo $workdir already cloned. remove it to reclone" 64 | return 0 65 | fi 66 | 67 | mark_undone "$1" 68 | git clone --recurse-submodules $repo $workdir --branch="$ref" $GIT_CLONE_ARGS 69 | } 70 | 71 | clone_work_repos() { 72 | while [ "$1" ]; do 73 | clone_work_repo "$1" 74 | shift 75 | done 76 | } 77 | 78 | mark_done() { 79 | local id="$1" 80 | needvar TARGET_WORKDIR 81 | git --git-dir=$(get_workdir "$id")/.git rev-parse HEAD > "$TARGET_WORKDIR/$id.DONE" 82 | } 83 | 84 | mark_undone() { 85 | local id="$1" 86 | needvar TARGET_WORKDIR 87 | rm -f "$TARGET_WORKDIR/$id.DONE" 88 | } 89 | 90 | if_done() { 91 | local id="$1" 92 | needvar TARGET_WORKDIR 93 | 94 | local newrev="$(git --git-dir=$(get_workdir "$id")/.git rev-parse HEAD)" 95 | local oldrev="$(cat $TARGET_WORKDIR/$id.DONE 2>/dev/null || true)" 96 | 97 | log "$id: oldrev=$oldrev newrev=$newrev" 98 | 99 | if [ "$oldrev" == "$newrev" ]; then 100 | log "package $id already built. skipping" 101 | return 0 102 | else 103 | return 1 104 | fi 105 | } 106 | 107 | ## special magic for ninja 108 | build_ninja() { 109 | local id="ninja" 110 | local workdir=$(get_work_tree "$id") 111 | local args=$(get_pkg_args "$id") 112 | 113 | clone_work_repo "$id" 114 | 115 | if_done "$id" && return 0 116 | 117 | ( 118 | cd $workdir 119 | ./configure.py --bootstrap 120 | mkdir -p /usr/bin 121 | cp ninja /usr/bin 122 | chmod ugo+x /usr/bin/ninja 123 | ) 124 | 125 | log "installed ninja" 126 | mark_done "$id" 127 | } 128 | 129 | build_package() { 130 | local id="$1" 131 | local workdir=$(get_work_tree "$id") 132 | local args=$(get_pkg_args "$id") 133 | shift 134 | 135 | clone_work_repo "$id" 136 | 137 | if_done "$id" && return 0 138 | 139 | rm -Rf $workdir/_build 140 | mkdir -p $workdir/_build 141 | 142 | if [ ! "$TARGET_MAKE" ]; then 143 | export TARGET_MAKE=make 144 | fi 145 | 146 | log "package $id build args: $args" 147 | log "workdir=$workdir" 148 | 149 | if [ -f $workdir/autogen.sh ]; then 150 | ( 151 | log "building by autotools: $id" 152 | chmod +x $workdir/autogen.sh 153 | cd $workdir/_build 154 | ACLOCAL_PATH="$XORG_PREFIX/share/aclocal:/usr/share/aclocal" $workdir/autogen.sh --prefix="$XORG_PREFIX" $args "$@" 155 | $TARGET_MAKE 156 | $TARGET_MAKE install 157 | ) 158 | else 159 | ( 160 | log "building by meson: $id" 161 | cd $workdir/_build 162 | CFLAGS="$CFLAGS $(get_pkg_cflags $id)" meson setup -Dprefix="$XORG_PREFIX" $args 163 | meson compile 164 | meson install 165 | ) 166 | fi 167 | mark_done "$id" 168 | } 169 | 170 | build_driver() { 171 | local id="$1" 172 | shift 173 | log "building driver: $id" 174 | 175 | build_package "$id" --with-xorg-module-dir="$XORG_PREFIX/lib/${TARGET_CC_ARCH}/xorg/modules" 176 | } 177 | -------------------------------------------------------------------------------- /etc/sources-upstream.cf: -------------------------------------------------------------------------------- 1 | # 2 | # source URLs for upstreams 3 | # 4 | # using latest release tags when possible. 5 | # 6 | # since several repos need some patching yet, we need to override 7 | # those entries after loading this file 8 | # 9 | SOURCE_XSERVER_REPO="https://gitlab.freedesktop.org/xorg/xserver.git" 10 | SOURCE_XSERVER_REF="master" 11 | 12 | SOURCE_XORGPROTO_REPO="https://gitlab.freedesktop.org/xorg/proto/xorgproto.git" 13 | SOURCE_XORGPROTO_REF="xorgproto-2024.1" 14 | 15 | SOURCE_LIBDRM_REPO="https://gitlab.freedesktop.org/mesa/drm.git" 16 | SOURCE_LIBDRM_REF="libdrm-2.4.124" 17 | 18 | SOURCE_XF86_INPUT_EVDEV_REPO="https://gitlab.freedesktop.org/xorg/driver/xf86-input-evdev.git" 19 | SOURCE_XF86_INPUT_EVDEV_REF="xf86-input-evdev-2.11.0" 20 | 21 | SOURCE_XF86_INPUT_ELOGRAPHICS_REPO="https://gitlab.freedesktop.org/xorg/driver/xf86-input-elographics" 22 | SOURCE_XF86_INPUT_ELOGRAPHICS_REF="xf86-input-elographics-1.4.4" 23 | 24 | SOURCE_XF86_INPUT_LIBINPUT_REPO="https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput.git" 25 | SOURCE_XF86_INPUT_LIBINPUT_REF="xf86-input-libinput-1.5.0" 26 | 27 | SOURCE_XF86_INPUT_MOUSE_REPO="https://gitlab.freedesktop.org/xorg/driver/xf86-input-mouse.git" 28 | SOURCE_XF86_INPUT_MOUSE_REF="master" 29 | 30 | SOURCE_XF86_INPUT_KEYBOARD_REPO="https://gitlab.freedesktop.org/xorg/driver/xf86-input-keyboard.git" 31 | SOURCE_XF86_INPUT_KEYBOARD_REF="master" 32 | 33 | SOURCE_XF86_VIDEO_AMDGPU_REPO="https://gitlab.freedesktop.org/xorg/driver/xf86-video-amdgpu.git" 34 | SOURCE_XF86_VIDEO_AMDGPU_REF="master" 35 | 36 | SOURCE_XF86_VIDEO_ARMSOC_REPO="https://gitlab.freedesktop.org/xorg/driver/xf86-video-armsoc.git" 37 | SOURCE_XF86_VIDEO_ARMSOC_REF="master" 38 | 39 | SOURCE_XF86_VIDEO_ATI_REPO="https://gitlab.freedesktop.org/xorg/driver/xf86-video-ati.git" 40 | SOURCE_XF86_VIDEO_ATI_REF="master" 41 | 42 | SOURCE_XF86_VIDEO_FREEDRENO_REPO="https://gitlab.freedesktop.org/xorg/driver/xf86-video-freedreno.git" 43 | SOURCE_XF86_VIDEO_FREEDRENO_REF="master" 44 | 45 | SOURCE_XF86_VIDEO_INTEL_REPO="https://gitlab.freedesktop.org/xorg/driver/xf86-video-intel.git" 46 | SOURCE_XF86_VIDEO_INTEL_REF="master" 47 | 48 | SOURCE_XF86_VIDEO_OMAP_REPO="https://gitlab.freedesktop.org/xorg/driver/xf86-video-omap.git" 49 | SOURCE_XF86_VIDEO_OMAP_REF="master" 50 | 51 | SOURCE_XF86_VIDEO_NOUVEAU_REPO="https://gitlab.freedesktop.org/xorg/driver/xf86-video-nouveau.git" 52 | SOURCE_XF86_VIDEO_NOUVEAU_REF="master" 53 | 54 | SOURCE_XF86_VIDEO_QXL_REPO="https://gitlab.freedesktop.org/xorg/driver/xf86-video-qxl.git" 55 | SOURCE_XF86_VIDEO_QXL_REF="master" 56 | 57 | SOURCE_XF86_VIDEO_R128_REPO="https://gitlab.freedesktop.org/xorg/driver/xf86-video-r128.git" 58 | SOURCE_XF86_VIDEO_R128_REF="master" 59 | 60 | SOURCE_XF86_VIDEO_VESA_REPO="https://gitlab.freedesktop.org/xorg/driver/xf86-video-vesa.git" 61 | SOURCE_XF86_VIDEO_VESA_REF="master" 62 | 63 | SOURCE_XF86_VIDEO_VMWARE_REPO="https://gitlab.freedesktop.org/xorg/driver/xf86-video-vmware.git" 64 | SOURCE_XF86_VIDEO_VMWARE_REF="master" 65 | 66 | SOURCE_XF86_VIDEO_WSFB_REPO="https://gitlab.freedesktop.org/xorg/driver/xf86-video-wsfb.git" 67 | SOURCE_XF86_VIDEO_WSFB_REF="master" 68 | 69 | SOURCE_XKEYBOARD_CONFIG_REPO="https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config.git" 70 | SOURCE_XKEYBOARD_CONFIG_REF="xkeyboard-config-2.43" 71 | 72 | SOURCE_XKBCOMP_REPO="https://gitlab.freedesktop.org/xorg/app/xkbcomp.git" 73 | SOURCE_XKBCOMP_REF="xkbcomp-1.4.7" 74 | 75 | SOURCE_FONT_XFREE86_TYPE_1_REPO="https://gitlab.freedesktop.org/xorg/font/xfree86-type1.git" 76 | SOURCE_FONT_XFREE86_TYPE_1_REF="font-xfree86-type1-1.0.5" 77 | 78 | SOURCE_XORG_UTIL_MACROS_REPO="https://gitlab.freedesktop.org/xorg/util/macros.git" 79 | SOURCE_XORG_UTIL_MACROS_REF="util-macros-1.20.2" 80 | 81 | SOURCE_XORG_FONT_UTIL_REPO="https://gitlab.freedesktop.org/xorg/font/util.git" 82 | SOURCE_XORG_FONT_UTIL_REF="font-util-1.4.1" 83 | 84 | SOURCE_LIBXCVT_REPO="https://gitlab.freedesktop.org/xorg/lib/libxcvt.git" 85 | SOURCE_LIBXCVT_REF="libxcvt-0.1.0" 86 | 87 | SOURCE_LIBXCB_REPO="https://gitlab.freedesktop.org/xorg/lib/libxcb.git" 88 | SOURCE_LIBXCB_REF="libxcb-1.17.0" 89 | 90 | SOURCE_XCB_PROTO_REPO="https://gitlab.freedesktop.org/xorg/proto/xcbproto" 91 | SOURCE_XCB_PROTO_REF="xcb-proto-1.17.0" 92 | 93 | SOURCE_LIBXCB_WM_REPO="https://gitlab.freedesktop.org/xorg/lib/libxcb-wm.git" 94 | SOURCE_LIBXCB_WM_REF="xcb-util-wm-0.4.2" 95 | 96 | SOURCE_LIBXCB_UTIL_REPO="https://gitlab.freedesktop.org/xorg/lib/libxcb-util.git" 97 | SOURCE_LIBXCB_UTIL_REF="xcb-util-0.4.1-gitlab" 98 | 99 | SOURCE_NINJA_REPO="https://github.com/ninja-build/ninja.git" 100 | SOURCE_NINJA_REF="release" 101 | 102 | SOURCE_XF86_INPUT_WS_REPO="https://github.com/NetBSD/xsrc.git" 103 | SOURCE_XF86_INPUT_WS_REF="trunk" 104 | SOURCE_XF86_INPUT_WS_SUBTREE="external/mit/xf86-input-ws/dist" 105 | -------------------------------------------------------------------------------- /lib/vm.sh: -------------------------------------------------------------------------------- 1 | set -e 2 | 3 | log() { 4 | echo "VM: $*" 5 | } 6 | 7 | [ "$VM_DISK_IMAGE" ] || VM_DISK_IMAGE="$SCRIPT_ROOT_DIR/vm/images/$OS_TYPE/$OS_TYPE-$OS_RELEASE-$OS_ARCH-ci.qcow2" 8 | [ "$OS_TEMPLATE_TYPE" ] || OS_TEMPLATE_TYPE="qcow2.zstd" 9 | [ "$OS_TEMPLATE_URL" ] || OS_TEMPLATE_URL="https://basepackages.vnc.biz/metux/cloudimages/${OS_TYPE}/${OS_TYPE}-${OS_RELEASE}-${OS_ARCH}-ci.${OS_TEMPLATE_TYPE}" 10 | [ "$TEMPLATE" ] || TEMPLATE="$SCRIPT_ROOT_DIR/vm/templates/$OS_TYPE/$OS_TYPE-$OS_RELEASE-$OS_ARCH-ci.$OS_TEMPLATE_TYPE" 11 | [ "$VM_NAME" ] || VM_NAME="$OS_TYPE-$OS_RELEASE-$OS_ARCH" 12 | 13 | if [ ! "$VM_QEMU_ARCH" ]; then 14 | case "$OS_ARCH" in 15 | amd64) 16 | export VM_QEMU_ARCH=x86_64 17 | ;; 18 | *) 19 | export VM_QEMU_ARCH="$OS_ARCH" 20 | ;; 21 | esac 22 | log "guessed VM_QEMU_ARCH: $VM_QEMU_ARCH" 23 | fi 24 | 25 | if [ ! "$VM_CORES" ]; then 26 | VM_CORES=`nproc` 27 | fi 28 | 29 | die() { 30 | echo "ERROR: $@" >&2 31 | exit 1 32 | } 33 | 34 | download_template() { 35 | mkdir -p `dirname "${TEMPLATE}"` 36 | rm -f "${TEMPLATE}.tmp" 37 | 38 | if [ -f "${TEMPLATE}" ]; then 39 | log "template already present: ${TEMPLATE}" 40 | return 0 41 | fi 42 | 43 | log "need to fetch template: ${TEMPLATE}" 44 | if [ ! "${OS_TEMPLATE_URL}" ]; then 45 | OS_TEMPLATE_URL="https://basepackages.vnc.biz/metux/cloudimages/${OS_TYPE}/${OS_TYPE}-${OS_RELEASE}-${OS_ARCH}-ci.${OS_TEMPLATE_TYPE}" 46 | fi 47 | wget "${OS_TEMPLATE_URL}" -O "${TEMPLATE}.tmp" && mv "${TEMPLATE}.tmp" "${TEMPLATE}" 48 | } 49 | 50 | unpack_image() { 51 | mkdir -p `dirname "${VM_DISK_IMAGE}"` 52 | rm -f "${VM_DISK_IMAGE}.tmp" 53 | 54 | if [ -f "${VM_DISK_IMAGE}" ]; then 55 | log "image already present: ${VM_DISK_IMAGE}" 56 | return 0 57 | fi 58 | 59 | download_template 60 | log "uncompressing image template ${TEMPLATE}" 61 | case "${TEMPLATE}" in 62 | *.zstd | *.zst) 63 | time zstd -d "${TEMPLATE}" -o "${VM_DISK_IMAGE}.tmp" && mv "${VM_DISK_IMAGE}.tmp" "${VM_DISK_IMAGE}" 64 | ;; 65 | *.xz) 66 | time xz -d --stdout "${TEMPLATE}" > "${VM_DISK_IMAGE}.tmp" && mv "${VM_DISK_IMAGE}.tmp" "${VM_DISK_IMAGE}" 67 | ;; 68 | *) 69 | die "unsupported compression format for ${TEMPLATE}" 70 | ;; 71 | esac 72 | log "finished image decompression" 73 | } 74 | 75 | vm_opt_bios() { 76 | if [ "${OS_EFI}" ]; then 77 | echo -n "-bios /usr/share/ovmf/OVMF.fd" 78 | fi 79 | } 80 | 81 | vm_pidfile() { 82 | mkdir -p "$SCRIPT_ROOT_DIR/vm/pid" 83 | echo -n "$SCRIPT_ROOT_DIR/vm/pid/$OS_TYPE-$OS_RELEASE-$OS_ARCH.pid" 84 | } 85 | 86 | vm_start() { 87 | unpack_image 88 | qemu-system-$VM_QEMU_ARCH \ 89 | -pidfile `vm_pidfile` \ 90 | -name "$VM_NAME" \ 91 | -smp "$VM_CORES" \ 92 | -m "$VM_MEMSIZE" \ 93 | -hda $VM_DISK_IMAGE \ 94 | -enable-kvm \ 95 | -machine q35 \ 96 | -cpu max \ 97 | -k de_de \ 98 | -nic user,model=virtio-net-pci,hostfwd=tcp::${VM_SSH_PORT}-:22 \ 99 | `vm_opt_bios` \ 100 | "$@" 101 | } 102 | 103 | boot_vm_daemon() { 104 | vm_start --daemonize -display none 105 | } 106 | 107 | boot_vm_console() { 108 | vm_start -nographic -serial mon:stdio "$@" 109 | } 110 | 111 | boot_vm_graphics() { 112 | vm_start -vga std "$@" 113 | } 114 | 115 | boot_and_wait_for_vm() { 116 | if [ ! -f `vm_pidfile` ]; then 117 | log "Need to start VM" 118 | boot_vm_daemon 119 | else 120 | log "VM already booted" 121 | fi 122 | 123 | while ! nc -z localhost $VM_SSH_PORT ; do 124 | sleep 0.1 # wait for 1/10 of the second before check again 125 | done 126 | } 127 | 128 | vm_exec() { 129 | ssh -o "StrictHostKeyChecking=no" -p "$VM_SSH_PORT" root@localhost "$@" 130 | } 131 | 132 | vm_install_netbsd() { 133 | if [ "$VM_PACKAGES" ]; then 134 | vm_exec pkgin -y install $VM_PACKAGES 135 | fi 136 | } 137 | 138 | vm_install_freebsd() { 139 | if [ "$VM_PACKAGES" ]; then 140 | vm_exec pkg -4 update 141 | vm_exec pkg -4 install -y $VM_PACKAGES 142 | fi 143 | } 144 | 145 | vm_install_openindiana() { 146 | if [ "$VM_PACKAGES" ]; then 147 | vm_exec pkg -4 install $VM_PACKAGES 148 | fi 149 | } 150 | 151 | vm_install_packages() { 152 | case "$OS_TYPE" in 153 | netbsd) 154 | vm_install_netbsd "$@" 155 | ;; 156 | freebsd) 157 | vm_install_freebsd "$@" 158 | ;; 159 | openindiana) 160 | vm_install_openindiana "$@" 161 | ;; 162 | *) 163 | die "vm_install_packages: unknown OS type \"$VM_OS_TYPE\"" 164 | ;; 165 | esac 166 | } 167 | 168 | vm_sync_xorg_testing() { 169 | local prefix="$SCRIPT_ROOT_DIR" 170 | rm -Rf .trans.tmp 171 | mkdir -p .trans.tmp 172 | cp --preserve -R $prefix/etc $prefix/lib $prefix/build-* $prefix/vm-boot-* .trans.tmp 173 | scp -P "$VM_SSH_PORT" -r .trans.tmp/* root@localhost:/xorg-testing/ 174 | rm -Rf .trans.tmp 175 | } 176 | 177 | vm_build_testing_jail() { 178 | vm_sync_xorg_testing 179 | vm_install_packages 180 | ssh -p "$VM_SSH_PORT" root@localhost "cd /xorg-testing && ./build-testing-jail" 181 | } 182 | -------------------------------------------------------------------------------- /agpl-3.0.txt: -------------------------------------------------------------------------------- 1 | GNU AFFERO GENERAL PUBLIC LICENSE 2 | Version 3, 19 November 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU Affero General Public License is a free, copyleft license for 11 | software and other kinds of works, specifically designed to ensure 12 | cooperation with the community in the case of network server software. 13 | 14 | The licenses for most software and other practical works are designed 15 | to take away your freedom to share and change the works. By contrast, 16 | our General Public Licenses are intended to guarantee your freedom to 17 | share and change all versions of a program--to make sure it remains free 18 | software for all its users. 19 | 20 | When we speak of free software, we are referring to freedom, not 21 | price. Our General Public Licenses are designed to make sure that you 22 | have the freedom to distribute copies of free software (and charge for 23 | them if you wish), that you receive source code or can get it if you 24 | want it, that you can change the software or use pieces of it in new 25 | free programs, and that you know you can do these things. 26 | 27 | Developers that use our General Public Licenses protect your rights 28 | with two steps: (1) assert copyright on the software, and (2) offer 29 | you this License which gives you legal permission to copy, distribute 30 | and/or modify the software. 31 | 32 | A secondary benefit of defending all users' freedom is that 33 | improvements made in alternate versions of the program, if they 34 | receive widespread use, become available for other developers to 35 | incorporate. Many developers of free software are heartened and 36 | encouraged by the resulting cooperation. However, in the case of 37 | software used on network servers, this result may fail to come about. 38 | The GNU General Public License permits making a modified version and 39 | letting the public access it on a server without ever releasing its 40 | source code to the public. 41 | 42 | The GNU Affero General Public License is designed specifically to 43 | ensure that, in such cases, the modified source code becomes available 44 | to the community. It requires the operator of a network server to 45 | provide the source code of the modified version running there to the 46 | users of that server. Therefore, public use of a modified version, on 47 | a publicly accessible server, gives the public access to the source 48 | code of the modified version. 49 | 50 | An older license, called the Affero General Public License and 51 | published by Affero, was designed to accomplish similar goals. This is 52 | a different license, not a version of the Affero GPL, but Affero has 53 | released a new version of the Affero GPL which permits relicensing under 54 | this license. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | TERMS AND CONDITIONS 60 | 61 | 0. Definitions. 62 | 63 | "This License" refers to version 3 of the GNU Affero General Public License. 64 | 65 | "Copyright" also means copyright-like laws that apply to other kinds of 66 | works, such as semiconductor masks. 67 | 68 | "The Program" refers to any copyrightable work licensed under this 69 | License. Each licensee is addressed as "you". "Licensees" and 70 | "recipients" may be individuals or organizations. 71 | 72 | To "modify" a work means to copy from or adapt all or part of the work 73 | in a fashion requiring copyright permission, other than the making of an 74 | exact copy. The resulting work is called a "modified version" of the 75 | earlier work or a work "based on" the earlier work. 76 | 77 | A "covered work" means either the unmodified Program or a work based 78 | on the Program. 79 | 80 | To "propagate" a work means to do anything with it that, without 81 | permission, would make you directly or secondarily liable for 82 | infringement under applicable copyright law, except executing it on a 83 | computer or modifying a private copy. Propagation includes copying, 84 | distribution (with or without modification), making available to the 85 | public, and in some countries other activities as well. 86 | 87 | To "convey" a work means any kind of propagation that enables other 88 | parties to make or receive copies. Mere interaction with a user through 89 | a computer network, with no transfer of a copy, is not conveying. 90 | 91 | An interactive user interface displays "Appropriate Legal Notices" 92 | to the extent that it includes a convenient and prominently visible 93 | feature that (1) displays an appropriate copyright notice, and (2) 94 | tells the user that there is no warranty for the work (except to the 95 | extent that warranties are provided), that licensees may convey the 96 | work under this License, and how to view a copy of this License. If 97 | the interface presents a list of user commands or options, such as a 98 | menu, a prominent item in the list meets this criterion. 99 | 100 | 1. Source Code. 101 | 102 | The "source code" for a work means the preferred form of the work 103 | for making modifications to it. "Object code" means any non-source 104 | form of a work. 105 | 106 | A "Standard Interface" means an interface that either is an official 107 | standard defined by a recognized standards body, or, in the case of 108 | interfaces specified for a particular programming language, one that 109 | is widely used among developers working in that language. 110 | 111 | The "System Libraries" of an executable work include anything, other 112 | than the work as a whole, that (a) is included in the normal form of 113 | packaging a Major Component, but which is not part of that Major 114 | Component, and (b) serves only to enable use of the work with that 115 | Major Component, or to implement a Standard Interface for which an 116 | implementation is available to the public in source code form. A 117 | "Major Component", in this context, means a major essential component 118 | (kernel, window system, and so on) of the specific operating system 119 | (if any) on which the executable work runs, or a compiler used to 120 | produce the work, or an object code interpreter used to run it. 121 | 122 | The "Corresponding Source" for a work in object code form means all 123 | the source code needed to generate, install, and (for an executable 124 | work) run the object code and to modify the work, including scripts to 125 | control those activities. However, it does not include the work's 126 | System Libraries, or general-purpose tools or generally available free 127 | programs which are used unmodified in performing those activities but 128 | which are not part of the work. For example, Corresponding Source 129 | includes interface definition files associated with source files for 130 | the work, and the source code for shared libraries and dynamically 131 | linked subprograms that the work is specifically designed to require, 132 | such as by intimate data communication or control flow between those 133 | subprograms and other parts of the work. 134 | 135 | The Corresponding Source need not include anything that users 136 | can regenerate automatically from other parts of the Corresponding 137 | Source. 138 | 139 | The Corresponding Source for a work in source code form is that 140 | same work. 141 | 142 | 2. Basic Permissions. 143 | 144 | All rights granted under this License are granted for the term of 145 | copyright on the Program, and are irrevocable provided the stated 146 | conditions are met. This License explicitly affirms your unlimited 147 | permission to run the unmodified Program. The output from running a 148 | covered work is covered by this License only if the output, given its 149 | content, constitutes a covered work. This License acknowledges your 150 | rights of fair use or other equivalent, as provided by copyright law. 151 | 152 | You may make, run and propagate covered works that you do not 153 | convey, without conditions so long as your license otherwise remains 154 | in force. You may convey covered works to others for the sole purpose 155 | of having them make modifications exclusively for you, or provide you 156 | with facilities for running those works, provided that you comply with 157 | the terms of this License in conveying all material for which you do 158 | not control copyright. Those thus making or running the covered works 159 | for you must do so exclusively on your behalf, under your direction 160 | and control, on terms that prohibit them from making any copies of 161 | your copyrighted material outside their relationship with you. 162 | 163 | Conveying under any other circumstances is permitted solely under 164 | the conditions stated below. Sublicensing is not allowed; section 10 165 | makes it unnecessary. 166 | 167 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 168 | 169 | No covered work shall be deemed part of an effective technological 170 | measure under any applicable law fulfilling obligations under article 171 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 172 | similar laws prohibiting or restricting circumvention of such 173 | measures. 174 | 175 | When you convey a covered work, you waive any legal power to forbid 176 | circumvention of technological measures to the extent such circumvention 177 | is effected by exercising rights under this License with respect to 178 | the covered work, and you disclaim any intention to limit operation or 179 | modification of the work as a means of enforcing, against the work's 180 | users, your or third parties' legal rights to forbid circumvention of 181 | technological measures. 182 | 183 | 4. Conveying Verbatim Copies. 184 | 185 | You may convey verbatim copies of the Program's source code as you 186 | receive it, in any medium, provided that you conspicuously and 187 | appropriately publish on each copy an appropriate copyright notice; 188 | keep intact all notices stating that this License and any 189 | non-permissive terms added in accord with section 7 apply to the code; 190 | keep intact all notices of the absence of any warranty; and give all 191 | recipients a copy of this License along with the Program. 192 | 193 | You may charge any price or no price for each copy that you convey, 194 | and you may offer support or warranty protection for a fee. 195 | 196 | 5. Conveying Modified Source Versions. 197 | 198 | You may convey a work based on the Program, or the modifications to 199 | produce it from the Program, in the form of source code under the 200 | terms of section 4, provided that you also meet all of these conditions: 201 | 202 | a) The work must carry prominent notices stating that you modified 203 | it, and giving a relevant date. 204 | 205 | b) The work must carry prominent notices stating that it is 206 | released under this License and any conditions added under section 207 | 7. This requirement modifies the requirement in section 4 to 208 | "keep intact all notices". 209 | 210 | c) You must license the entire work, as a whole, under this 211 | License to anyone who comes into possession of a copy. This 212 | License will therefore apply, along with any applicable section 7 213 | additional terms, to the whole of the work, and all its parts, 214 | regardless of how they are packaged. This License gives no 215 | permission to license the work in any other way, but it does not 216 | invalidate such permission if you have separately received it. 217 | 218 | d) If the work has interactive user interfaces, each must display 219 | Appropriate Legal Notices; however, if the Program has interactive 220 | interfaces that do not display Appropriate Legal Notices, your 221 | work need not make them do so. 222 | 223 | A compilation of a covered work with other separate and independent 224 | works, which are not by their nature extensions of the covered work, 225 | and which are not combined with it such as to form a larger program, 226 | in or on a volume of a storage or distribution medium, is called an 227 | "aggregate" if the compilation and its resulting copyright are not 228 | used to limit the access or legal rights of the compilation's users 229 | beyond what the individual works permit. Inclusion of a covered work 230 | in an aggregate does not cause this License to apply to the other 231 | parts of the aggregate. 232 | 233 | 6. Conveying Non-Source Forms. 234 | 235 | You may convey a covered work in object code form under the terms 236 | of sections 4 and 5, provided that you also convey the 237 | machine-readable Corresponding Source under the terms of this License, 238 | in one of these ways: 239 | 240 | a) Convey the object code in, or embodied in, a physical product 241 | (including a physical distribution medium), accompanied by the 242 | Corresponding Source fixed on a durable physical medium 243 | customarily used for software interchange. 244 | 245 | b) Convey the object code in, or embodied in, a physical product 246 | (including a physical distribution medium), accompanied by a 247 | written offer, valid for at least three years and valid for as 248 | long as you offer spare parts or customer support for that product 249 | model, to give anyone who possesses the object code either (1) a 250 | copy of the Corresponding Source for all the software in the 251 | product that is covered by this License, on a durable physical 252 | medium customarily used for software interchange, for a price no 253 | more than your reasonable cost of physically performing this 254 | conveying of source, or (2) access to copy the 255 | Corresponding Source from a network server at no charge. 256 | 257 | c) Convey individual copies of the object code with a copy of the 258 | written offer to provide the Corresponding Source. This 259 | alternative is allowed only occasionally and noncommercially, and 260 | only if you received the object code with such an offer, in accord 261 | with subsection 6b. 262 | 263 | d) Convey the object code by offering access from a designated 264 | place (gratis or for a charge), and offer equivalent access to the 265 | Corresponding Source in the same way through the same place at no 266 | further charge. You need not require recipients to copy the 267 | Corresponding Source along with the object code. If the place to 268 | copy the object code is a network server, the Corresponding Source 269 | may be on a different server (operated by you or a third party) 270 | that supports equivalent copying facilities, provided you maintain 271 | clear directions next to the object code saying where to find the 272 | Corresponding Source. Regardless of what server hosts the 273 | Corresponding Source, you remain obligated to ensure that it is 274 | available for as long as needed to satisfy these requirements. 275 | 276 | e) Convey the object code using peer-to-peer transmission, provided 277 | you inform other peers where the object code and Corresponding 278 | Source of the work are being offered to the general public at no 279 | charge under subsection 6d. 280 | 281 | A separable portion of the object code, whose source code is excluded 282 | from the Corresponding Source as a System Library, need not be 283 | included in conveying the object code work. 284 | 285 | A "User Product" is either (1) a "consumer product", which means any 286 | tangible personal property which is normally used for personal, family, 287 | or household purposes, or (2) anything designed or sold for incorporation 288 | into a dwelling. In determining whether a product is a consumer product, 289 | doubtful cases shall be resolved in favor of coverage. For a particular 290 | product received by a particular user, "normally used" refers to a 291 | typical or common use of that class of product, regardless of the status 292 | of the particular user or of the way in which the particular user 293 | actually uses, or expects or is expected to use, the product. A product 294 | is a consumer product regardless of whether the product has substantial 295 | commercial, industrial or non-consumer uses, unless such uses represent 296 | the only significant mode of use of the product. 297 | 298 | "Installation Information" for a User Product means any methods, 299 | procedures, authorization keys, or other information required to install 300 | and execute modified versions of a covered work in that User Product from 301 | a modified version of its Corresponding Source. The information must 302 | suffice to ensure that the continued functioning of the modified object 303 | code is in no case prevented or interfered with solely because 304 | modification has been made. 305 | 306 | If you convey an object code work under this section in, or with, or 307 | specifically for use in, a User Product, and the conveying occurs as 308 | part of a transaction in which the right of possession and use of the 309 | User Product is transferred to the recipient in perpetuity or for a 310 | fixed term (regardless of how the transaction is characterized), the 311 | Corresponding Source conveyed under this section must be accompanied 312 | by the Installation Information. But this requirement does not apply 313 | if neither you nor any third party retains the ability to install 314 | modified object code on the User Product (for example, the work has 315 | been installed in ROM). 316 | 317 | The requirement to provide Installation Information does not include a 318 | requirement to continue to provide support service, warranty, or updates 319 | for a work that has been modified or installed by the recipient, or for 320 | the User Product in which it has been modified or installed. Access to a 321 | network may be denied when the modification itself materially and 322 | adversely affects the operation of the network or violates the rules and 323 | protocols for communication across the network. 324 | 325 | Corresponding Source conveyed, and Installation Information provided, 326 | in accord with this section must be in a format that is publicly 327 | documented (and with an implementation available to the public in 328 | source code form), and must require no special password or key for 329 | unpacking, reading or copying. 330 | 331 | 7. Additional Terms. 332 | 333 | "Additional permissions" are terms that supplement the terms of this 334 | License by making exceptions from one or more of its conditions. 335 | Additional permissions that are applicable to the entire Program shall 336 | be treated as though they were included in this License, to the extent 337 | that they are valid under applicable law. If additional permissions 338 | apply only to part of the Program, that part may be used separately 339 | under those permissions, but the entire Program remains governed by 340 | this License without regard to the additional permissions. 341 | 342 | When you convey a copy of a covered work, you may at your option 343 | remove any additional permissions from that copy, or from any part of 344 | it. (Additional permissions may be written to require their own 345 | removal in certain cases when you modify the work.) You may place 346 | additional permissions on material, added by you to a covered work, 347 | for which you have or can give appropriate copyright permission. 348 | 349 | Notwithstanding any other provision of this License, for material you 350 | add to a covered work, you may (if authorized by the copyright holders of 351 | that material) supplement the terms of this License with terms: 352 | 353 | a) Disclaiming warranty or limiting liability differently from the 354 | terms of sections 15 and 16 of this License; or 355 | 356 | b) Requiring preservation of specified reasonable legal notices or 357 | author attributions in that material or in the Appropriate Legal 358 | Notices displayed by works containing it; or 359 | 360 | c) Prohibiting misrepresentation of the origin of that material, or 361 | requiring that modified versions of such material be marked in 362 | reasonable ways as different from the original version; or 363 | 364 | d) Limiting the use for publicity purposes of names of licensors or 365 | authors of the material; or 366 | 367 | e) Declining to grant rights under trademark law for use of some 368 | trade names, trademarks, or service marks; or 369 | 370 | f) Requiring indemnification of licensors and authors of that 371 | material by anyone who conveys the material (or modified versions of 372 | it) with contractual assumptions of liability to the recipient, for 373 | any liability that these contractual assumptions directly impose on 374 | those licensors and authors. 375 | 376 | All other non-permissive additional terms are considered "further 377 | restrictions" within the meaning of section 10. If the Program as you 378 | received it, or any part of it, contains a notice stating that it is 379 | governed by this License along with a term that is a further 380 | restriction, you may remove that term. If a license document contains 381 | a further restriction but permits relicensing or conveying under this 382 | License, you may add to a covered work material governed by the terms 383 | of that license document, provided that the further restriction does 384 | not survive such relicensing or conveying. 385 | 386 | If you add terms to a covered work in accord with this section, you 387 | must place, in the relevant source files, a statement of the 388 | additional terms that apply to those files, or a notice indicating 389 | where to find the applicable terms. 390 | 391 | Additional terms, permissive or non-permissive, may be stated in the 392 | form of a separately written license, or stated as exceptions; 393 | the above requirements apply either way. 394 | 395 | 8. Termination. 396 | 397 | You may not propagate or modify a covered work except as expressly 398 | provided under this License. Any attempt otherwise to propagate or 399 | modify it is void, and will automatically terminate your rights under 400 | this License (including any patent licenses granted under the third 401 | paragraph of section 11). 402 | 403 | However, if you cease all violation of this License, then your 404 | license from a particular copyright holder is reinstated (a) 405 | provisionally, unless and until the copyright holder explicitly and 406 | finally terminates your license, and (b) permanently, if the copyright 407 | holder fails to notify you of the violation by some reasonable means 408 | prior to 60 days after the cessation. 409 | 410 | Moreover, your license from a particular copyright holder is 411 | reinstated permanently if the copyright holder notifies you of the 412 | violation by some reasonable means, this is the first time you have 413 | received notice of violation of this License (for any work) from that 414 | copyright holder, and you cure the violation prior to 30 days after 415 | your receipt of the notice. 416 | 417 | Termination of your rights under this section does not terminate the 418 | licenses of parties who have received copies or rights from you under 419 | this License. If your rights have been terminated and not permanently 420 | reinstated, you do not qualify to receive new licenses for the same 421 | material under section 10. 422 | 423 | 9. Acceptance Not Required for Having Copies. 424 | 425 | You are not required to accept this License in order to receive or 426 | run a copy of the Program. Ancillary propagation of a covered work 427 | occurring solely as a consequence of using peer-to-peer transmission 428 | to receive a copy likewise does not require acceptance. However, 429 | nothing other than this License grants you permission to propagate or 430 | modify any covered work. These actions infringe copyright if you do 431 | not accept this License. Therefore, by modifying or propagating a 432 | covered work, you indicate your acceptance of this License to do so. 433 | 434 | 10. Automatic Licensing of Downstream Recipients. 435 | 436 | Each time you convey a covered work, the recipient automatically 437 | receives a license from the original licensors, to run, modify and 438 | propagate that work, subject to this License. You are not responsible 439 | for enforcing compliance by third parties with this License. 440 | 441 | An "entity transaction" is a transaction transferring control of an 442 | organization, or substantially all assets of one, or subdividing an 443 | organization, or merging organizations. If propagation of a covered 444 | work results from an entity transaction, each party to that 445 | transaction who receives a copy of the work also receives whatever 446 | licenses to the work the party's predecessor in interest had or could 447 | give under the previous paragraph, plus a right to possession of the 448 | Corresponding Source of the work from the predecessor in interest, if 449 | the predecessor has it or can get it with reasonable efforts. 450 | 451 | You may not impose any further restrictions on the exercise of the 452 | rights granted or affirmed under this License. For example, you may 453 | not impose a license fee, royalty, or other charge for exercise of 454 | rights granted under this License, and you may not initiate litigation 455 | (including a cross-claim or counterclaim in a lawsuit) alleging that 456 | any patent claim is infringed by making, using, selling, offering for 457 | sale, or importing the Program or any portion of it. 458 | 459 | 11. Patents. 460 | 461 | A "contributor" is a copyright holder who authorizes use under this 462 | License of the Program or a work on which the Program is based. The 463 | work thus licensed is called the contributor's "contributor version". 464 | 465 | A contributor's "essential patent claims" are all patent claims 466 | owned or controlled by the contributor, whether already acquired or 467 | hereafter acquired, that would be infringed by some manner, permitted 468 | by this License, of making, using, or selling its contributor version, 469 | but do not include claims that would be infringed only as a 470 | consequence of further modification of the contributor version. For 471 | purposes of this definition, "control" includes the right to grant 472 | patent sublicenses in a manner consistent with the requirements of 473 | this License. 474 | 475 | Each contributor grants you a non-exclusive, worldwide, royalty-free 476 | patent license under the contributor's essential patent claims, to 477 | make, use, sell, offer for sale, import and otherwise run, modify and 478 | propagate the contents of its contributor version. 479 | 480 | In the following three paragraphs, a "patent license" is any express 481 | agreement or commitment, however denominated, not to enforce a patent 482 | (such as an express permission to practice a patent or covenant not to 483 | sue for patent infringement). To "grant" such a patent license to a 484 | party means to make such an agreement or commitment not to enforce a 485 | patent against the party. 486 | 487 | If you convey a covered work, knowingly relying on a patent license, 488 | and the Corresponding Source of the work is not available for anyone 489 | to copy, free of charge and under the terms of this License, through a 490 | publicly available network server or other readily accessible means, 491 | then you must either (1) cause the Corresponding Source to be so 492 | available, or (2) arrange to deprive yourself of the benefit of the 493 | patent license for this particular work, or (3) arrange, in a manner 494 | consistent with the requirements of this License, to extend the patent 495 | license to downstream recipients. "Knowingly relying" means you have 496 | actual knowledge that, but for the patent license, your conveying the 497 | covered work in a country, or your recipient's use of the covered work 498 | in a country, would infringe one or more identifiable patents in that 499 | country that you have reason to believe are valid. 500 | 501 | If, pursuant to or in connection with a single transaction or 502 | arrangement, you convey, or propagate by procuring conveyance of, a 503 | covered work, and grant a patent license to some of the parties 504 | receiving the covered work authorizing them to use, propagate, modify 505 | or convey a specific copy of the covered work, then the patent license 506 | you grant is automatically extended to all recipients of the covered 507 | work and works based on it. 508 | 509 | A patent license is "discriminatory" if it does not include within 510 | the scope of its coverage, prohibits the exercise of, or is 511 | conditioned on the non-exercise of one or more of the rights that are 512 | specifically granted under this License. You may not convey a covered 513 | work if you are a party to an arrangement with a third party that is 514 | in the business of distributing software, under which you make payment 515 | to the third party based on the extent of your activity of conveying 516 | the work, and under which the third party grants, to any of the 517 | parties who would receive the covered work from you, a discriminatory 518 | patent license (a) in connection with copies of the covered work 519 | conveyed by you (or copies made from those copies), or (b) primarily 520 | for and in connection with specific products or compilations that 521 | contain the covered work, unless you entered into that arrangement, 522 | or that patent license was granted, prior to 28 March 2007. 523 | 524 | Nothing in this License shall be construed as excluding or limiting 525 | any implied license or other defenses to infringement that may 526 | otherwise be available to you under applicable patent law. 527 | 528 | 12. No Surrender of Others' Freedom. 529 | 530 | If conditions are imposed on you (whether by court order, agreement or 531 | otherwise) that contradict the conditions of this License, they do not 532 | excuse you from the conditions of this License. If you cannot convey a 533 | covered work so as to satisfy simultaneously your obligations under this 534 | License and any other pertinent obligations, then as a consequence you may 535 | not convey it at all. For example, if you agree to terms that obligate you 536 | to collect a royalty for further conveying from those to whom you convey 537 | the Program, the only way you could satisfy both those terms and this 538 | License would be to refrain entirely from conveying the Program. 539 | 540 | 13. Remote Network Interaction; Use with the GNU General Public License. 541 | 542 | Notwithstanding any other provision of this License, if you modify the 543 | Program, your modified version must prominently offer all users 544 | interacting with it remotely through a computer network (if your version 545 | supports such interaction) an opportunity to receive the Corresponding 546 | Source of your version by providing access to the Corresponding Source 547 | from a network server at no charge, through some standard or customary 548 | means of facilitating copying of software. This Corresponding Source 549 | shall include the Corresponding Source for any work covered by version 3 550 | of the GNU General Public License that is incorporated pursuant to the 551 | following paragraph. 552 | 553 | Notwithstanding any other provision of this License, you have 554 | permission to link or combine any covered work with a work licensed 555 | under version 3 of the GNU General Public License into a single 556 | combined work, and to convey the resulting work. The terms of this 557 | License will continue to apply to the part which is the covered work, 558 | but the work with which it is combined will remain governed by version 559 | 3 of the GNU General Public License. 560 | 561 | 14. Revised Versions of this License. 562 | 563 | The Free Software Foundation may publish revised and/or new versions of 564 | the GNU Affero General Public License from time to time. Such new versions 565 | will be similar in spirit to the present version, but may differ in detail to 566 | address new problems or concerns. 567 | 568 | Each version is given a distinguishing version number. If the 569 | Program specifies that a certain numbered version of the GNU Affero General 570 | Public License "or any later version" applies to it, you have the 571 | option of following the terms and conditions either of that numbered 572 | version or of any later version published by the Free Software 573 | Foundation. If the Program does not specify a version number of the 574 | GNU Affero General Public License, you may choose any version ever published 575 | by the Free Software Foundation. 576 | 577 | If the Program specifies that a proxy can decide which future 578 | versions of the GNU Affero General Public License can be used, that proxy's 579 | public statement of acceptance of a version permanently authorizes you 580 | to choose that version for the Program. 581 | 582 | Later license versions may give you additional or different 583 | permissions. However, no additional obligations are imposed on any 584 | author or copyright holder as a result of your choosing to follow a 585 | later version. 586 | 587 | 15. Disclaimer of Warranty. 588 | 589 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 590 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 591 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 592 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 593 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 594 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 595 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 596 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 597 | 598 | 16. Limitation of Liability. 599 | 600 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 601 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 602 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 603 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 604 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 605 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 606 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 607 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 608 | SUCH DAMAGES. 609 | 610 | 17. Interpretation of Sections 15 and 16. 611 | 612 | If the disclaimer of warranty and limitation of liability provided 613 | above cannot be given local legal effect according to their terms, 614 | reviewing courts shall apply local law that most closely approximates 615 | an absolute waiver of all civil liability in connection with the 616 | Program, unless a warranty or assumption of liability accompanies a 617 | copy of the Program in return for a fee. 618 | 619 | END OF TERMS AND CONDITIONS 620 | 621 | How to Apply These Terms to Your New Programs 622 | 623 | If you develop a new program, and you want it to be of the greatest 624 | possible use to the public, the best way to achieve this is to make it 625 | free software which everyone can redistribute and change under these terms. 626 | 627 | To do so, attach the following notices to the program. It is safest 628 | to attach them to the start of each source file to most effectively 629 | state the exclusion of warranty; and each file should have at least 630 | the "copyright" line and a pointer to where the full notice is found. 631 | 632 | 633 | Copyright (C) 634 | 635 | This program is free software: you can redistribute it and/or modify 636 | it under the terms of the GNU Affero General Public License as published by 637 | the Free Software Foundation, either version 3 of the License, or 638 | (at your option) any later version. 639 | 640 | This program is distributed in the hope that it will be useful, 641 | but WITHOUT ANY WARRANTY; without even the implied warranty of 642 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 643 | GNU Affero General Public License for more details. 644 | 645 | You should have received a copy of the GNU Affero General Public License 646 | along with this program. If not, see . 647 | 648 | Also add information on how to contact you by electronic and paper mail. 649 | 650 | If your software can interact with users remotely through a computer 651 | network, you should also make sure that it provides a way for users to 652 | get its source. For example, if your program is a web application, its 653 | interface could display a "Source" link that leads users to an archive 654 | of the code. There are many ways you could offer source, and different 655 | solutions will be better for different programs; see section 13 for the 656 | specific requirements. 657 | 658 | You should also get your employer (if you work as a programmer) or school, 659 | if any, to sign a "copyright disclaimer" for the program, if necessary. 660 | For more information on this, and how to apply and follow the GNU AGPL, see 661 | . 662 | --------------------------------------------------------------------------------