summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libre-testing/bash/PKGBUILD128
-rw-r--r--libre-testing/bash/dot.bash_logout3
-rw-r--r--libre-testing/bash/dot.bash_profile5
-rw-r--r--libre-testing/bash/dot.bashrc9
-rw-r--r--libre-testing/bash/system.bash_logout3
-rw-r--r--libre-testing/bash/system.bashrc22
-rw-r--r--libre-testing/bzip2/PKGBUILD67
-rw-r--r--libre-testing/bzip2/bzip2-1.0.4-bzip2recover.patch12
-rw-r--r--libre-testing/coreutils/PKGBUILD53
-rw-r--r--libre-testing/cryptsetup/PKGBUILD46
-rw-r--r--libre-testing/cryptsetup/hooks-encrypt144
-rw-r--r--libre-testing/cryptsetup/install-encrypt47
-rw-r--r--libre-testing/cryptsetup/install-sd-encrypt48
-rw-r--r--libre-testing/dhcpcd/PKGBUILD64
-rw-r--r--libre-testing/dhcpcd/dhcpcd.service13
-rw-r--r--libre-testing/dhcpcd/dhcpcd_.service15
-rw-r--r--libre-testing/diffutils/PKGBUILD35
-rw-r--r--libre-testing/e2fsprogs/MIT-LICENSE25
-rw-r--r--libre-testing/e2fsprogs/PKGBUILD66
-rw-r--r--libre-testing/file/PKGBUILD59
-rw-r--r--libre-testing/filesystem/PKGBUILD126
-rw-r--r--libre-testing/filesystem/crypttab12
-rwxr-xr-xlibre-testing/filesystem/env-generator3
-rw-r--r--libre-testing/filesystem/fstab4
-rw-r--r--libre-testing/filesystem/group1
-rw-r--r--libre-testing/filesystem/gshadow1
-rw-r--r--libre-testing/filesystem/host.conf4
-rw-r--r--libre-testing/filesystem/hosts2
-rw-r--r--libre-testing/filesystem/issue2
-rw-r--r--libre-testing/filesystem/ld.so.conf4
-rw-r--r--libre-testing/filesystem/locale.sh22
-rw-r--r--libre-testing/filesystem/motd0
-rw-r--r--libre-testing/filesystem/nsswitch.conf18
-rw-r--r--libre-testing/filesystem/os-release8
-rw-r--r--libre-testing/filesystem/passwd1
-rw-r--r--libre-testing/filesystem/profile40
-rw-r--r--libre-testing/filesystem/resolv.conf2
-rw-r--r--libre-testing/filesystem/securetty12
-rw-r--r--libre-testing/filesystem/shadow1
-rw-r--r--libre-testing/filesystem/shells5
-rw-r--r--libre-testing/filesystem/sysctl3
-rw-r--r--libre-testing/filesystem/sysusers28
-rw-r--r--libre-testing/filesystem/tmpfiles17
-rw-r--r--libre-testing/findutils/PKGBUILD37
-rw-r--r--libre-testing/gawk/PKGBUILD37
-rw-r--r--libre-testing/gettext/PKGBUILD50
-rw-r--r--libre-testing/gettext/gettext-0.19.8-its-segfault.patch43
-rw-r--r--libre-testing/grep/PKGBUILD34
-rw-r--r--libre-testing/gzip/PKGBUILD47
-rw-r--r--libre-testing/inetutils/PKGBUILD89
-rw-r--r--libre-testing/inetutils/ftpd.service12
-rw-r--r--libre-testing/inetutils/inetutils.install9
-rw-r--r--libre-testing/inetutils/rlogin.pam13
-rw-r--r--libre-testing/inetutils/rlogin.socket9
-rw-r--r--libre-testing/inetutils/rlogin.xinetd10
-rw-r--r--libre-testing/inetutils/rlogin@.service7
-rw-r--r--libre-testing/inetutils/rsh.pam11
-rw-r--r--libre-testing/inetutils/rsh.socket9
-rw-r--r--libre-testing/inetutils/rsh.xinetd10
-rw-r--r--libre-testing/inetutils/rsh@.service7
-rw-r--r--libre-testing/inetutils/talk.service12
-rw-r--r--libre-testing/inetutils/talk.socket9
-rw-r--r--libre-testing/inetutils/talk.xinetd10
-rw-r--r--libre-testing/inetutils/telnet.socket10
-rw-r--r--libre-testing/inetutils/telnet.xinetd10
-rw-r--r--libre-testing/inetutils/telnet@.service7
-rw-r--r--libre-testing/iproute2/0001-make-iproute2-fhs-compliant.patch101
-rw-r--r--libre-testing/iproute2/PKGBUILD58
-rw-r--r--libre-testing/iputils/PKGBUILD50
-rw-r--r--libre-testing/iputils/iputils.install9
-rw-r--r--libre-testing/iputils/tftp.xinetd10
-rw-r--r--libre-testing/jfsutils/PKGBUILD41
-rw-r--r--libre-testing/jfsutils/inttypes.patch12
-rw-r--r--libre-testing/jfsutils/sysmacros.patch15
-rw-r--r--libre-testing/less/PKGBUILD31
-rw-r--r--libre-testing/logrotate/PKGBUILD52
-rw-r--r--libre-testing/logrotate/logrotate.conf38
-rw-r--r--libre-testing/lvm2/11-dm-initramfs.rules3
-rw-r--r--libre-testing/lvm2/PKGBUILD124
-rw-r--r--libre-testing/lvm2/lvm2.install25
-rw-r--r--libre-testing/lvm2/lvm2_hook25
-rw-r--r--libre-testing/lvm2/lvm2_install43
-rw-r--r--libre-testing/lvm2/sd-lvm2_install46
-rw-r--r--libre-testing/man-db/PKGBUILD66
-rw-r--r--libre-testing/man-db/convert-mans11
-rw-r--r--libre-testing/man-db/man-db.install11
-rw-r--r--libre-testing/man-db/man-db.service12
-rw-r--r--libre-testing/man-db/man-db.timer7
-rw-r--r--libre-testing/mdadm/PKGBUILD52
-rw-r--r--libre-testing/mdadm/disable-werror.patch11
-rw-r--r--libre-testing/mdadm/linux-3.0.patch45
-rw-r--r--libre-testing/mdadm/mdadm-fix-udev-rules.patch137
-rw-r--r--libre-testing/mdadm/mdadm.conf67
-rwxr-xr-xlibre-testing/mdadm/mdadm_hook49
-rw-r--r--libre-testing/mdadm/mdadm_install46
-rw-r--r--libre-testing/mdadm/mdadm_udev_install25
-rw-r--r--libre-testing/mdadm/repos/core-x86_64/PKGBUILD53
-rw-r--r--libre-testing/mdadm/repos/core-x86_64/disable-werror.patch11
-rw-r--r--libre-testing/mdadm/repos/core-x86_64/linux-3.0.patch45
-rw-r--r--libre-testing/mdadm/repos/core-x86_64/mdadm-fix-udev-rules.patch137
-rw-r--r--libre-testing/mdadm/repos/core-x86_64/mdadm.conf67
-rwxr-xr-xlibre-testing/mdadm/repos/core-x86_64/mdadm_hook49
-rw-r--r--libre-testing/mdadm/repos/core-x86_64/mdadm_install46
-rw-r--r--libre-testing/mdadm/repos/core-x86_64/mdadm_udev_install25
-rw-r--r--libre-testing/nano/PKGBUILD37
-rw-r--r--libre-testing/pciutils/PKGBUILD34
-rw-r--r--libre-testing/perl/CVE-2016-2381_duplicate_env.diff104
-rw-r--r--libre-testing/perl/PKGBUILD234
-rw-r--r--libre-testing/perl/detect-old-perl-modules.hook10
-rw-r--r--libre-testing/perl/detect-old-perl-modules.sh36
-rwxr-xr-xlibre-testing/perl/generate-rebuild-list.sh11
-rwxr-xr-xlibre-testing/perl/patchprov260
-rw-r--r--libre-testing/perl/perlbin.csh15
-rw-r--r--libre-testing/perl/perlbin.fish10
-rwxr-xr-xlibre-testing/perl/perlbin.sh18
-rw-r--r--libre-testing/perl/upgpkg4
-rw-r--r--libre-testing/procps-ng/PKGBUILD47
-rw-r--r--libre-testing/procps-ng/install14
-rw-r--r--libre-testing/psmisc/PKGBUILD24
-rw-r--r--libre-testing/reiserfsprogs/PKGBUILD31
-rw-r--r--libre-testing/s-nail/PKGBUILD52
-rw-r--r--libre-testing/sed/PKGBUILD36
-rw-r--r--libre-testing/shadow/LICENSE31
-rw-r--r--libre-testing/shadow/PKGBUILD149
-rw-r--r--libre-testing/shadow/chgpasswd4
-rw-r--r--libre-testing/shadow/chpasswd6
-rw-r--r--libre-testing/shadow/defaults.pam6
-rw-r--r--libre-testing/shadow/login.defs208
-rw-r--r--libre-testing/shadow/newusers6
-rw-r--r--libre-testing/shadow/passwd4
-rw-r--r--libre-testing/shadow/shadow-strncpy-usage.patch25
-rw-r--r--libre-testing/shadow/shadow.install9
-rw-r--r--libre-testing/shadow/shadow.service11
-rw-r--r--libre-testing/shadow/shadow.timer7
-rw-r--r--libre-testing/shadow/useradd.defaults9
-rw-r--r--libre-testing/shadow/xstrdup.patch9
-rw-r--r--libre-testing/sysfsutils/PKGBUILD30
-rw-r--r--libre-testing/systemd/0001-Use-Arch-Linux-device-access-groups.patch75
-rw-r--r--libre-testing/systemd/PKGBUILD274
-rw-r--r--libre-testing/systemd/arch.conf7
-rw-r--r--libre-testing/systemd/initcpio-hook-udev22
-rw-r--r--libre-testing/systemd/initcpio-install-systemd202
-rw-r--r--libre-testing/systemd/initcpio-install-udev29
-rw-r--r--libre-testing/systemd/loader.conf1
-rw-r--r--libre-testing/systemd/splash-arch.bmpbin0 -> 378226 bytes
-rw-r--r--libre-testing/systemd/systemd-binfmt.hook10
-rw-r--r--libre-testing/systemd/systemd-catalog.hook11
-rw-r--r--libre-testing/systemd/systemd-daemon-reload.hook11
-rw-r--r--libre-testing/systemd/systemd-hook32
-rw-r--r--libre-testing/systemd/systemd-hwdb.hook11
-rw-r--r--libre-testing/systemd/systemd-sysctl.hook10
-rw-r--r--libre-testing/systemd/systemd-sysusers.hook10
-rw-r--r--libre-testing/systemd/systemd-tmpfiles.hook10
-rw-r--r--libre-testing/systemd/systemd-udev-reload.hook11
-rw-r--r--libre-testing/systemd/systemd-update.hook11
-rw-r--r--libre-testing/systemd/systemd-user.pam5
-rw-r--r--libre-testing/systemd/systemd.install99
-rw-r--r--libre-testing/tar/PKGBUILD49
-rw-r--r--libre-testing/texinfo/PKGBUILD38
-rw-r--r--libre-testing/texinfo/texinfo-install.hook11
-rw-r--r--libre-testing/texinfo/texinfo-remove.hook10
-rw-r--r--libre-testing/usbutils/PKGBUILD30
-rw-r--r--libre-testing/vi/PKGBUILD51
-rw-r--r--libre-testing/vi/fix-tubesize-short-overflow.patch12
-rw-r--r--libre-testing/vi/navkeys.patch55
-rw-r--r--libre-testing/vi/preserve-dir.patch99
-rw-r--r--libre-testing/which/PKGBUILD30
-rw-r--r--libre-testing/xfsprogs/PKGBUILD33
168 files changed, 6077 insertions, 0 deletions
diff --git a/libre-testing/bash/PKGBUILD b/libre-testing/bash/PKGBUILD
new file mode 100644
index 000000000..e74ca9e23
--- /dev/null
+++ b/libre-testing/bash/PKGBUILD
@@ -0,0 +1,128 @@
+# Maintainer: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
+# Contributor: Allan McRae <allan@archlinux.org>
+# Contributor: Aaron Griffin <aaron@archlinux.org>
+
+pkgname=bash
+_basever=4.4
+_patchlevel=023
+pkgver=${_basever}.${_patchlevel}
+pkgrel=1
+pkgdesc='The GNU Bourne Again shell'
+arch=(x86_64 ppc64le)
+license=(GPL)
+url='http://www.gnu.org/software/bash/bash.html'
+groups=(base)
+backup=(etc/bash.bash{rc,_logout} etc/skel/.bash{rc,_profile,_logout})
+depends=('readline>=7.0' glibc ncurses)
+optdepends=('bash-completion: for tab completion')
+provides=('sh')
+source=(https://ftp.gnu.org/gnu/bash/bash-$_basever.tar.gz{,.sig}
+ dot.bashrc
+ dot.bash_profile
+ dot.bash_logout
+ system.bashrc
+ system.bash_logout)
+validpgpkeys=('7C0135FB088AAF6C66C650B9BB5869F064EA74AB') # Chet Ramey
+
+if [[ $((10#${_patchlevel})) -gt 0 ]]; then
+ for (( _p=1; _p<=$((10#${_patchlevel})); _p++ )); do
+ source=(${source[@]} https://ftp.gnu.org/gnu/bash/bash-$_basever-patches/bash${_basever//.}-$(printf "%03d" $_p){,.sig})
+ done
+fi
+
+prepare() {
+ cd $pkgname-$_basever
+
+ for (( _p=1; _p<=$((10#${_patchlevel})); _p++ )); do
+ msg "applying patch bash${_basever//.}-$(printf "%03d" $_p)"
+ patch -p0 -i ../bash${_basever//.}-$(printf "%03d" $_p)
+ done
+}
+
+build() {
+ cd $pkgname-$_basever
+
+ _bashconfig=(-DDEFAULT_PATH_VALUE=\'\"/usr/local/sbin:/usr/local/bin:/usr/bin\"\'
+ -DSTANDARD_UTILS_PATH=\'\"/usr/bin\"\'
+ -DSYS_BASHRC=\'\"/etc/bash.bashrc\"\'
+ -DSYS_BASH_LOGOUT=\'\"/etc/bash.bash_logout\"\'
+ -DNON_INTERACTIVE_LOGIN_SHELLS)
+ export CFLAGS="${CFLAGS} ${_bashconfig[@]}"
+
+ ./configure --prefix=/usr --with-curses --enable-readline \
+ --without-bash-malloc --with-installed-readline
+ make
+}
+
+check() {
+ make -C $pkgname-$_basever check
+}
+
+package() {
+ make -C $pkgname-$_basever DESTDIR="$pkgdir" install
+ ln -s bash "$pkgdir/usr/bin/sh"
+
+ # system-wide configuration files
+ install -Dm644 system.bashrc "$pkgdir/etc/bash.bashrc"
+ install -Dm644 system.bash_logout "$pkgdir/etc/bash.bash_logout"
+
+ # user configuration file skeletons
+ install -dm755 "$pkgdir/etc/skel/"
+ install -m644 dot.bashrc "$pkgdir/etc/skel/.bashrc"
+ install -m644 dot.bash_profile "$pkgdir/etc/skel/.bash_profile"
+ install -m644 dot.bash_logout "$pkgdir/etc/skel/.bash_logout"
+}
+
+md5sums=('148888a7c95ac23705559b6f477dfe25'
+ 'SKIP'
+ '027d6bd8f5f6a06b75bb7698cb478089'
+ '2902e0fee7a9168f3a4fd2ccd60ff047'
+ '42f4400ed2314bd7519c020d0187edc5'
+ 'd8f3f334e72c0e30032eae1a1229aef1'
+ '472f536d7c9e8250dc4568ec4cfaf294'
+ '817d01a6c0af6f79308a8b7b649e53d8'
+ 'SKIP'
+ '765e14cff12c7284009772e8e24f2fe0'
+ 'SKIP'
+ '49e7da93bf07f510a2eb6bb43ac3e5a2'
+ 'SKIP'
+ '4557d674ab5831a5fa98052ab19edaf4'
+ 'SKIP'
+ 'cce96dd77cdd1d293beec10848f6cbb5'
+ 'SKIP'
+ 'd3379f8d8abce5c6ee338f931ad008d5'
+ 'SKIP'
+ 'ec38c76ca439ca7f9c178e9baede84fc'
+ 'SKIP'
+ 'e0ba18c1e3b94f905da9b5bf9d38b58b'
+ 'SKIP'
+ 'e952d4f44e612048930c559d90eb99bb'
+ 'SKIP'
+ '57b5b35955d68f9a09dbef6b86d2c782'
+ 'SKIP'
+ 'cc896e1fa696b93ded568e557e2392d5'
+ 'SKIP'
+ 'fa47fbfa56fb7e9e5367f19a9df5fc9e'
+ 'SKIP'
+ '5e6a20166efe166267972cc78025417b'
+ 'SKIP'
+ '00a8877a8787dbd78d97767db1115b0a'
+ 'SKIP'
+ '2409586fd19e3104197ead86ce549eca'
+ 'SKIP'
+ '4b31183db086daf8be8943d7f7ea7526'
+ 'SKIP'
+ 'c15c8844f1eb87bdbcde71417c9bd342'
+ 'SKIP'
+ 'b25e3373fc8de00523116dfe151ac4e0'
+ 'SKIP'
+ '8f43e1d277b02f3319a34c1cd4a4ff3e'
+ 'SKIP'
+ '5217ff08c444446ec306dce60437c288'
+ 'SKIP'
+ '282c7d9b38da8005d25b4f816328a2f4'
+ 'SKIP'
+ '0b709c9d7f8e6cf267a8b863efb899f7'
+ 'SKIP'
+ 'fe2e0ca4cf9409ff0e9428e1236f983e'
+ 'SKIP')
diff --git a/libre-testing/bash/dot.bash_logout b/libre-testing/bash/dot.bash_logout
new file mode 100644
index 000000000..0e4e4f184
--- /dev/null
+++ b/libre-testing/bash/dot.bash_logout
@@ -0,0 +1,3 @@
+#
+# ~/.bash_logout
+#
diff --git a/libre-testing/bash/dot.bash_profile b/libre-testing/bash/dot.bash_profile
new file mode 100644
index 000000000..5545f007e
--- /dev/null
+++ b/libre-testing/bash/dot.bash_profile
@@ -0,0 +1,5 @@
+#
+# ~/.bash_profile
+#
+
+[[ -f ~/.bashrc ]] && . ~/.bashrc
diff --git a/libre-testing/bash/dot.bashrc b/libre-testing/bash/dot.bashrc
new file mode 100644
index 000000000..a355b0cd3
--- /dev/null
+++ b/libre-testing/bash/dot.bashrc
@@ -0,0 +1,9 @@
+#
+# ~/.bashrc
+#
+
+# If not running interactively, don't do anything
+[[ $- != *i* ]] && return
+
+alias ls='ls --color=auto'
+PS1='[\u@\h \W]\$ '
diff --git a/libre-testing/bash/system.bash_logout b/libre-testing/bash/system.bash_logout
new file mode 100644
index 000000000..a76e48e4a
--- /dev/null
+++ b/libre-testing/bash/system.bash_logout
@@ -0,0 +1,3 @@
+#
+# /etc/bash.bash_logout
+#
diff --git a/libre-testing/bash/system.bashrc b/libre-testing/bash/system.bashrc
new file mode 100644
index 000000000..c484b2bc7
--- /dev/null
+++ b/libre-testing/bash/system.bashrc
@@ -0,0 +1,22 @@
+#
+# /etc/bash.bashrc
+#
+
+# If not running interactively, don't do anything
+[[ $- != *i* ]] && return
+
+[[ $DISPLAY ]] && shopt -s checkwinsize
+
+PS1='[\u@\h \W]\$ '
+
+case ${TERM} in
+ xterm*|rxvt*|Eterm|aterm|kterm|gnome*)
+ PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'
+
+ ;;
+ screen*)
+ PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033_%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'
+ ;;
+esac
+
+[ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion
diff --git a/libre-testing/bzip2/PKGBUILD b/libre-testing/bzip2/PKGBUILD
new file mode 100644
index 000000000..3b0785751
--- /dev/null
+++ b/libre-testing/bzip2/PKGBUILD
@@ -0,0 +1,67 @@
+# Maintainer: Ronald van Haren <ronald.archlinux.org>
+# Contributor: Judd <jvinet@zeroflux.org>
+
+pkgname=bzip2
+pkgver=1.0.6
+pkgrel=8
+pkgdesc="A high-quality data compression program"
+arch=(x86_64 ppc64le)
+license=('custom')
+url="http://sources.redhat.com/bzip2"
+groups=('base')
+depends=('glibc' 'sh')
+source=(https://sources.archlinux.org/other/packages/bzip2/bzip2-$pkgver.tar.gz
+ bzip2-1.0.4-bzip2recover.patch
+ fix-heap-use-after-free-bzip2recover.patch::https://gitweb.gentoo.org/repo/gentoo.git/plain/app-arch/bzip2/files/bzip2-1.0.6-CVE-2016-3189.patch)
+sha256sums=('a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd'
+ '0585fb92a4b409404147a3f940ed2ca03b3eaed1ec4fb68ae6ad74db668bea83'
+ 'e8792b2c7943486ab35893ffd9e638bbf2edbcab4f9f7b87544519bb3564af41')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ # add large-file support
+ sed -e 's/^CFLAGS=\(.*\)$/CFLAGS=\1 \$(BIGFILES)/' -i ./Makefile-libbz2_so
+
+ # use our optimization
+ sed -i "s|-O2|${CFLAGS}|g" Makefile
+ sed -i "s|-O2|${CFLAGS}|g" Makefile-libbz2_so
+
+ patch -Np1 < ../bzip2-1.0.4-bzip2recover.patch
+ # CVE-2016-3189
+ patch -Np1 -i "${srcdir}/fix-heap-use-after-free-bzip2recover.patch"
+
+ make -f Makefile-libbz2_so
+ make bzip2 bzip2recover
+}
+
+check() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make test
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ install -dm755 $pkgdir/usr/{bin,lib,include,share/man/man1}
+
+ install -m755 bzip2-shared $pkgdir/usr/bin/bzip2
+ install -m755 bzip2recover bzdiff bzgrep bzmore $pkgdir/usr/bin
+ ln -sf bzip2 $pkgdir/usr/bin/bunzip2
+ ln -sf bzip2 $pkgdir/usr/bin/bzcat
+
+ install -m755 libbz2.so.1.0.6 $pkgdir/usr/lib
+ ln -s libbz2.so.1.0.6 $pkgdir/usr/lib/libbz2.so
+ ln -s libbz2.so.1.0.6 $pkgdir/usr/lib/libbz2.so.1
+ ln -s libbz2.so.1.0.6 $pkgdir/usr/lib/libbz2.so.1.0
+
+ install -m644 bzlib.h $pkgdir/usr/include/
+
+ install -m644 bzip2.1 $pkgdir/usr/share/man/man1/
+ ln -sf bzip2.1 $pkgdir/usr/share/man/man1/bunzip2.1
+ ln -sf bzip2.1 $pkgdir/usr/share/man/man1/bzcat.1
+ ln -sf bzip2.1 $pkgdir/usr/share/man/man1/bzip2recover.1
+
+ install -Dm644 $srcdir/${pkgname}-${pkgver}/LICENSE \
+ $pkgdir/usr/share/licenses/${pkgname}/LICENSE
+}
diff --git a/libre-testing/bzip2/bzip2-1.0.4-bzip2recover.patch b/libre-testing/bzip2/bzip2-1.0.4-bzip2recover.patch
new file mode 100644
index 000000000..e2bfe1cc1
--- /dev/null
+++ b/libre-testing/bzip2/bzip2-1.0.4-bzip2recover.patch
@@ -0,0 +1,12 @@
+--- bzip2-1.0.4/bzip2recover.c.pom 2007-01-03 03:00:55.000000000 +0100
++++ bzip2-1.0.4/bzip2recover.c 2007-02-05 11:55:17.000000000 +0100
+@@ -309,7 +309,8 @@
+ UInt32 buffHi, buffLo, blockCRC;
+ Char* p;
+
+- strcpy ( progName, argv[0] );
++ strncpy ( progName, argv[0], BZ_MAX_FILENAME-1);
++ progName[BZ_MAX_FILENAME-1]='\0';
+ inFileName[0] = outFileName[0] = 0;
+
+ fprintf ( stderr,
diff --git a/libre-testing/coreutils/PKGBUILD b/libre-testing/coreutils/PKGBUILD
new file mode 100644
index 000000000..28f99f37d
--- /dev/null
+++ b/libre-testing/coreutils/PKGBUILD
@@ -0,0 +1,53 @@
+# Maintainer: Sébastien "Seblu" Luttringer
+# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
+# Contributor: Allan McRae <allan@archlinux.org>
+# Contributor: judd <jvinet@zeroflux.org>
+
+pkgname=coreutils
+pkgver=8.30
+pkgrel=1
+pkgdesc='The basic file, shell and text manipulation utilities of the GNU operating system'
+arch=(x86_64 ppc64le)
+license=('GPL3')
+url='https://www.gnu.org/software/coreutils/'
+groups=('base')
+depends=('glibc' 'acl' 'attr' 'gmp' 'libcap' 'openssl')
+source=("https://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz"{,.sig})
+validpgpkeys=('6C37DC12121A5006BC1DB804DF6FD971306037D9') # Pádraig Brady
+md5sums=('ab06d68949758971fe744db66b572816'
+ 'SKIP')
+
+prepare() {
+ cd $pkgname-$pkgver
+ # apply patch from the source array (should be a pacman feature)
+ local filename
+ for filename in "${source[@]}"; do
+ if [[ "$filename" =~ \.patch$ ]]; then
+ msg2 "Applying patch ${filename##*/}"
+ patch -p1 -N -i "$srcdir/${filename##*/}"
+ fi
+ done
+ :
+}
+
+build() {
+ cd $pkgname-$pkgver
+ ./configure \
+ --prefix=/usr \
+ --libexecdir=/usr/lib \
+ --with-openssl \
+ --enable-no-install-program=groups,hostname,kill,uptime
+ make
+}
+
+check() {
+ cd $pkgname-$pkgver
+ #make check
+}
+
+package() {
+ cd $pkgname-$pkgver
+ make DESTDIR="$pkgdir" install
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/libre-testing/cryptsetup/PKGBUILD b/libre-testing/cryptsetup/PKGBUILD
new file mode 100644
index 000000000..6d92a605f
--- /dev/null
+++ b/libre-testing/cryptsetup/PKGBUILD
@@ -0,0 +1,46 @@
+# Maintainer: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
+# Contributor: Thomas Bächler <thomas@archlinux.org>
+
+pkgname=cryptsetup
+pkgver=2.0.4
+pkgrel=1
+pkgdesc='Userspace setup tool for transparent encryption of block devices using dm-crypt'
+arch=(x86_64 ppc64le)
+license=('GPL')
+url='https://gitlab.com/cryptsetup/cryptsetup/'
+groups=('base')
+depends=('device-mapper' 'libgcrypt' 'popt' 'libutil-linux' 'json-c' 'argon2')
+makedepends=('util-linux')
+options=('!emptydirs')
+validpgpkeys=('2A2918243FDE46648D0686F9D9B0577BD93E98FC') # Milan Broz <gmazyland@gmail.com>
+source=("https://www.kernel.org/pub/linux/utils/cryptsetup/v2.0/${pkgname}-${pkgver}.tar."{xz,sign}
+ 'hooks-encrypt'
+ 'install-encrypt'
+ 'install-sd-encrypt')
+sha256sums=('9d3a3c7033293e0c97f0ad0501fd5b4d4913ae497cbf70cca06633ccc54b5734'
+ 'SKIP'
+ '416aa179ce3c6a7a5eee0861f1f0a4fafac91b69e84a2aae82b6e5a6140e31e2'
+ '7b8c8a189f1b63cb4a0c0dd93d3452615bdc05f0e33570c78b338446a59ca750'
+ '95a16baa273a0ea5c531bc4b65e7f142ae7cb6423b5e512f4413d1dd4a545421')
+
+build() {
+ cd "${srcdir}"/$pkgname-${pkgver}
+
+ ./configure \
+ --prefix=/usr \
+ --sbindir=/usr/bin \
+ --enable-libargon2 \
+ --disable-static
+ make
+}
+
+package() {
+ cd "${srcdir}"/$pkgname-${pkgver}
+
+ make DESTDIR="${pkgdir}" install
+
+ # install hook
+ install -D -m0644 "${srcdir}"/hooks-encrypt "${pkgdir}"/usr/lib/initcpio/hooks/encrypt
+ install -D -m0644 "${srcdir}"/install-encrypt "${pkgdir}"/usr/lib/initcpio/install/encrypt
+ install -D -m0644 "${srcdir}"/install-sd-encrypt "${pkgdir}"/usr/lib/initcpio/install/sd-encrypt
+}
diff --git a/libre-testing/cryptsetup/hooks-encrypt b/libre-testing/cryptsetup/hooks-encrypt
new file mode 100644
index 000000000..882d5fb44
--- /dev/null
+++ b/libre-testing/cryptsetup/hooks-encrypt
@@ -0,0 +1,144 @@
+#!/usr/bin/ash
+
+run_hook() {
+ modprobe -a -q dm-crypt >/dev/null 2>&1
+ [ "${quiet}" = "y" ] && CSQUIET=">/dev/null"
+
+ # Get keyfile if specified
+ ckeyfile="/crypto_keyfile.bin"
+ if [ -n "$cryptkey" ]; then
+ IFS=: read ckdev ckarg1 ckarg2 <<EOF
+$cryptkey
+EOF
+
+ if [ "$ckdev" = "rootfs" ]; then
+ ckeyfile=$ckarg1
+ elif resolved=$(resolve_device "${ckdev}" ${rootdelay}); then
+ case ${ckarg1} in
+ *[!0-9]*)
+ # Use a file on the device
+ # ckarg1 is not numeric: ckarg1=filesystem, ckarg2=path
+ mkdir /ckey
+ mount -r -t "$ckarg1" "$resolved" /ckey
+ dd if="/ckey/$ckarg2" of="$ckeyfile" >/dev/null 2>&1
+ umount /ckey
+ ;;
+ *)
+ # Read raw data from the block device
+ # ckarg1 is numeric: ckarg1=offset, ckarg2=length
+ dd if="$resolved" of="$ckeyfile" bs=1 skip="$ckarg1" count="$ckarg2" >/dev/null 2>&1
+ ;;
+ esac
+ fi
+ [ ! -f ${ckeyfile} ] && echo "Keyfile could not be opened. Reverting to passphrase."
+ fi
+
+ if [ -n "${cryptdevice}" ]; then
+ DEPRECATED_CRYPT=0
+ IFS=: read cryptdev cryptname cryptoptions <<EOF
+$cryptdevice
+EOF
+ else
+ DEPRECATED_CRYPT=1
+ cryptdev="${root}"
+ cryptname="root"
+ fi
+
+ # This may happen if third party hooks do the crypt setup
+ if [ -b "/dev/mapper/${cryptname}" ]; then
+ echo "Device ${cryptname} already exists, not doing any crypt setup."
+ return 0
+ fi
+
+ warn_deprecated() {
+ echo "The syntax 'root=${root}' where '${root}' is an encrypted volume is deprecated"
+ echo "Use 'cryptdevice=${root}:root root=/dev/mapper/root' instead."
+ }
+
+ for cryptopt in ${cryptoptions//,/ }; do
+ case ${cryptopt} in
+ allow-discards)
+ cryptargs="${cryptargs} --allow-discards"
+ ;;
+ *)
+ echo "Encryption option '${cryptopt}' not known, ignoring." >&2
+ ;;
+ esac
+ done
+
+ if resolved=$(resolve_device "${cryptdev}" ${rootdelay}); then
+ if cryptsetup isLuks ${resolved} >/dev/null 2>&1; then
+ [ ${DEPRECATED_CRYPT} -eq 1 ] && warn_deprecated
+ dopassphrase=1
+ # If keyfile exists, try to use that
+ if [ -f ${ckeyfile} ]; then
+ if eval cryptsetup --key-file ${ckeyfile} open --type luks ${resolved} ${cryptname} ${cryptargs} ${CSQUIET}; then
+ dopassphrase=0
+ else
+ echo "Invalid keyfile. Reverting to passphrase."
+ fi
+ fi
+ # Ask for a passphrase
+ if [ ${dopassphrase} -gt 0 ]; then
+ echo ""
+ echo "A password is required to access the ${cryptname} volume:"
+
+ #loop until we get a real password
+ while ! eval cryptsetup open --type luks ${resolved} ${cryptname} ${cryptargs} ${CSQUIET}; do
+ sleep 2;
+ done
+ fi
+ if [ -e "/dev/mapper/${cryptname}" ]; then
+ if [ ${DEPRECATED_CRYPT} -eq 1 ]; then
+ export root="/dev/mapper/root"
+ fi
+ else
+ err "Password succeeded, but ${cryptname} creation failed, aborting..."
+ return 1
+ fi
+ elif [ -n "${crypto}" ]; then
+ [ ${DEPRECATED_CRYPT} -eq 1 ] && warn_deprecated
+ msg "Non-LUKS encrypted device found..."
+ if echo "$crypto" | awk -F: '{ exit(NF == 5) }'; then
+ err "Verify parameter format: crypto=hash:cipher:keysize:offset:skip"
+ err "Non-LUKS decryption not attempted..."
+ return 1
+ fi
+ exe="cryptsetup open --type plain $resolved $cryptname $cryptargs"
+ IFS=: read c_hash c_cipher c_keysize c_offset c_skip <<EOF
+$crypto
+EOF
+ [ -n "$c_hash" ] && exe="$exe --hash '$c_hash'"
+ [ -n "$c_cipher" ] && exe="$exe --cipher '$c_cipher'"
+ [ -n "$c_keysize" ] && exe="$exe --key-size '$c_keysize'"
+ [ -n "$c_offset" ] && exe="$exe --offset '$c_offset'"
+ [ -n "$c_skip" ] && exe="$exe --skip '$c_skip'"
+ if [ -f "$ckeyfile" ]; then
+ exe="$exe --key-file $ckeyfile"
+ else
+ echo ""
+ echo "A password is required to access the ${cryptname} volume:"
+ fi
+ eval "$exe $CSQUIET"
+
+ if [ $? -ne 0 ]; then
+ err "Non-LUKS device decryption failed. verify format: "
+ err " crypto=hash:cipher:keysize:offset:skip"
+ return 1
+ fi
+ if [ -e "/dev/mapper/${cryptname}" ]; then
+ if [ ${DEPRECATED_CRYPT} -eq 1 ]; then
+ export root="/dev/mapper/root"
+ fi
+ else
+ err "Password succeeded, but ${cryptname} creation failed, aborting..."
+ return 1
+ fi
+ else
+ err "Failed to open encryption mapping: The device ${cryptdev} is not a LUKS volume and the crypto= paramater was not specified."
+ fi
+ fi
+ rm -f ${ckeyfile}
+}
+
+# vim: set ft=sh ts=4 sw=4 et:
diff --git a/libre-testing/cryptsetup/install-encrypt b/libre-testing/cryptsetup/install-encrypt
new file mode 100644
index 000000000..017ba0030
--- /dev/null
+++ b/libre-testing/cryptsetup/install-encrypt
@@ -0,0 +1,47 @@
+#!/bin/bash
+
+build() {
+ local mod
+
+ add_module "dm-crypt"
+ if [[ $CRYPTO_MODULES ]]; then
+ for mod in $CRYPTO_MODULES; do
+ add_module "$mod"
+ done
+ else
+ add_all_modules "/crypto/"
+ fi
+
+ add_binary "cryptsetup"
+ add_binary "dmsetup"
+ add_file "/usr/lib/udev/rules.d/10-dm.rules"
+ add_file "/usr/lib/udev/rules.d/13-dm-disk.rules"
+ add_file "/usr/lib/udev/rules.d/95-dm-notify.rules"
+ add_file "/usr/lib/initcpio/udev/11-dm-initramfs.rules" "/usr/lib/udev/rules.d/11-dm-initramfs.rules"
+
+ # cryptsetup calls pthread_create(), which dlopen()s libgcc_s.so.1
+ add_binary "/usr/lib/libgcc_s.so.1"
+
+ add_runscript
+}
+
+help() {
+ cat <<HELPEOF
+This hook allows for an encrypted root device. Users should specify the device
+to be unlocked using 'cryptdevice=device:dmname' on the kernel command line,
+where 'device' is the path to the raw device, and 'dmname' is the name given to
+the device after unlocking, and will be available as /dev/mapper/dmname.
+
+For unlocking via keyfile, 'cryptkey=device:fstype:path' should be specified on
+the kernel cmdline, where 'device' represents the raw block device where the key
+exists, 'fstype' is the filesystem type of 'device' (or auto), and 'path' is
+the absolute path of the keyfile within the device.
+
+Without specifying a keyfile, you will be prompted for the password at runtime.
+This means you must have a keyboard available to input it, and you may need
+the keymap hook as well to ensure that the keyboard is using the layout you
+expect.
+HELPEOF
+}
+
+# vim: set ft=sh ts=4 sw=4 et:
diff --git a/libre-testing/cryptsetup/install-sd-encrypt b/libre-testing/cryptsetup/install-sd-encrypt
new file mode 100644
index 000000000..4b2aa5038
--- /dev/null
+++ b/libre-testing/cryptsetup/install-sd-encrypt
@@ -0,0 +1,48 @@
+#!/bin/bash
+
+build() {
+ local mod
+
+ add_module "dm-crypt"
+ if [[ $CRYPTO_MODULES ]]; then
+ for mod in $CRYPTO_MODULES; do
+ add_module "$mod"
+ done
+ else
+ add_all_modules "/crypto/"
+ fi
+
+ add_binary "dmsetup"
+ add_file "/usr/lib/udev/rules.d/10-dm.rules"
+ add_file "/usr/lib/udev/rules.d/13-dm-disk.rules"
+ add_file "/usr/lib/udev/rules.d/95-dm-notify.rules"
+ add_file "/usr/lib/initcpio/udev/11-dm-initramfs.rules" "/usr/lib/udev/rules.d/11-dm-initramfs.rules"
+
+ add_systemd_unit "cryptsetup.target"
+ add_binary "/usr/lib/systemd/system-generators/systemd-cryptsetup-generator"
+ add_binary "/usr/lib/systemd/systemd-cryptsetup"
+
+ add_systemd_unit "systemd-ask-password-console.path"
+ add_systemd_unit "systemd-ask-password-console.service"
+
+ # cryptsetup calls pthread_create(), which dlopen()s libgcc_s.so.1
+ add_binary "/usr/lib/libgcc_s.so.1"
+
+ # add mkswap for creating swap space on the fly (see 'swap' in crypttab(5))
+ add_binary "mkswap"
+
+ [[ -f /etc/crypttab.initramfs ]] && add_file "/etc/crypttab.initramfs" "/etc/crypttab"
+}
+
+help() {
+ cat <<HELPEOF
+This hook allows for an encrypted root device with systemd initramfs.
+
+See the manpage of systemd-cryptsetup-generator(8) for available kernel
+command line options. Alternatively, if the file /etc/crypttab.initramfs
+exists, it will be added to the initramfs as /etc/crypttab. See the
+crypttab(5) manpage for more information on crypttab syntax.
+HELPEOF
+}
+
+# vim: set ft=sh ts=4 sw=4 et:
diff --git a/libre-testing/dhcpcd/PKGBUILD b/libre-testing/dhcpcd/PKGBUILD
new file mode 100644
index 000000000..02c07cf84
--- /dev/null
+++ b/libre-testing/dhcpcd/PKGBUILD
@@ -0,0 +1,64 @@
+# Maintainer: Ronald van Haren <ronald.archlinux.org>
+# Contributor: Tom Killian <tom.archlinux.org>
+# Contributor: Judd Vinet <jvinet.zeroflux.org>
+
+pkgname=dhcpcd
+pkgver=7.0.8
+pkgrel=1
+pkgdesc="RFC2131 compliant DHCP client daemon"
+url="http://roy.marples.name/projects/dhcpcd/"
+arch=(x86_64 ppc64le)
+license=('BSD')
+groups=('base')
+depends=('glibc' 'sh' 'udev' 'libsystemd')
+optdepends=('openresolv: resolvconf support')
+provides=('dhcp-client')
+backup=('etc/dhcpcd.conf')
+options=('emptydirs') # We Need the Empty /var/lib/dhcpcd Directory
+source=("https://roy.marples.name/downloads/$pkgname/$pkgname-$pkgver.tar.xz"
+ 'dhcpcd_.service'
+ 'dhcpcd.service')
+validpgpkeys=('A785ED2755955D9E93EA59F6597F97EA9AD45549') # Roy Marples (NetBSD) <roy@NetBSD.org>
+sha256sums=('96968e883369ab4afd11eba9dfd9bb109f5dfff65b2814ce6c432f36362dc9b5'
+ '72dba5d6e7a99cf6d9a796f79ee395e2434af12d6d4e76573d428c6d0c2986ed'
+ '782ba5fc31518e6f499d119120efe5ea68ce29ebbb797306d5e17b2a545c2f9e')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ # configure variables
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --sbindir=/usr/bin \
+ --libexecdir=/usr/lib/dhcpcd \
+ --dbdir=/var/lib/dhcpcd \
+ --rundir=/run
+
+ # Build
+ make
+}
+
+
+check() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ make test
+}
+
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+
+ # Install License
+ install -Dm644 "${srcdir}/${pkgname}-${pkgver}/LICENSE" \
+ "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+ # Set Options in /etc/dhcpcd.conf
+ echo noipv4ll >> "${pkgdir}/etc/dhcpcd.conf" # Disable ip4vall
+
+ # install systemd files
+ install -Dm644 "${srcdir}/dhcpcd_.service" "${pkgdir}/usr/lib/systemd/system/dhcpcd@.service"
+ install -Dm644 "${srcdir}/dhcpcd.service" "${pkgdir}/usr/lib/systemd/system/dhcpcd.service" # FS#31543
+}
diff --git a/libre-testing/dhcpcd/dhcpcd.service b/libre-testing/dhcpcd/dhcpcd.service
new file mode 100644
index 000000000..e7dc2890a
--- /dev/null
+++ b/libre-testing/dhcpcd/dhcpcd.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=dhcpcd on all interfaces
+Wants=network.target
+Before=network.target
+
+[Service]
+Type=forking
+PIDFile=/run/dhcpcd.pid
+ExecStart=/usr/bin/dhcpcd -q -b
+ExecStop=/usr/bin/dhcpcd -x
+
+[Install]
+WantedBy=multi-user.target
diff --git a/libre-testing/dhcpcd/dhcpcd_.service b/libre-testing/dhcpcd/dhcpcd_.service
new file mode 100644
index 000000000..e7bc5caf8
--- /dev/null
+++ b/libre-testing/dhcpcd/dhcpcd_.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=dhcpcd on %I
+Wants=network.target
+Before=network.target
+BindsTo=sys-subsystem-net-devices-%i.device
+After=sys-subsystem-net-devices-%i.device
+
+[Service]
+Type=forking
+PIDFile=/run/dhcpcd-%I.pid
+ExecStart=/usr/bin/dhcpcd -q -w %I
+ExecStop=/usr/bin/dhcpcd -x %I
+
+[Install]
+WantedBy=multi-user.target
diff --git a/libre-testing/diffutils/PKGBUILD b/libre-testing/diffutils/PKGBUILD
new file mode 100644
index 000000000..9d5740517
--- /dev/null
+++ b/libre-testing/diffutils/PKGBUILD
@@ -0,0 +1,35 @@
+# Mainainer: Sébastien Luttringer <seblu@archlinux.org>
+# Contributor: Allan McRae <allan@archlinux.org>
+# Contributor: Andreas Radke <andyrtr@archlinux.org>
+
+pkgname=diffutils
+pkgver=3.6
+pkgrel=1
+pkgdesc='Utility programs used for creating patch files'
+arch=(x86_64 ppc64le)
+url='https://www.gnu.org/software/diffutils'
+license=('GPL3')
+groups=('base')
+depends=('glibc' 'bash')
+validpgpkeys=('155D3FC500C834486D1EEA677FD9FCCB000BEEEE') # Jim Meyering
+source=("https://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz"{,.sig})
+md5sums=('07cf286672ced26fba54cd0313bdc071'
+ 'SKIP')
+
+build() {
+ cd $pkgname-$pkgver
+ ./configure --prefix=/usr
+ make
+}
+
+check() {
+ cd $pkgname-$pkgver
+ make check
+}
+
+package() {
+ cd $pkgname-$pkgver
+ make DESTDIR="$pkgdir" install
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/libre-testing/e2fsprogs/MIT-LICENSE b/libre-testing/e2fsprogs/MIT-LICENSE
new file mode 100644
index 000000000..d849b28f2
--- /dev/null
+++ b/libre-testing/e2fsprogs/MIT-LICENSE
@@ -0,0 +1,25 @@
+Copyright (c) 2003-2007 Theodore Ts'o <tytso@mit.edu>
+Copyright (c) 1997-2003 Yann Dirson <dirson@debian.org>
+Copyright (c) 2001 Alcove <http://www.alcove.com/>
+Copyright (c) 1997 Klee Dienes
+Copyright (c) 1995-1996 Michael Nonweiler <mrn20@cam.ac.uk>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject
+to the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
+IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/libre-testing/e2fsprogs/PKGBUILD b/libre-testing/e2fsprogs/PKGBUILD
new file mode 100644
index 000000000..49a789f4b
--- /dev/null
+++ b/libre-testing/e2fsprogs/PKGBUILD
@@ -0,0 +1,66 @@
+# Maintainer: Ronald van Haren <ronald.archlinux.org>
+# Contributor: judd <jvinet@zeroflux.org>
+
+pkgname=e2fsprogs
+pkgver=1.44.4
+pkgrel=1
+pkgdesc="Ext2/3/4 filesystem utilities"
+arch=(x86_64 ppc64le)
+license=('GPL' 'LGPL' 'MIT')
+url="http://e2fsprogs.sourceforge.net"
+groups=('base')
+depends=('sh' 'libutil-linux')
+makedepends=('util-linux')
+backup=('etc/mke2fs.conf')
+options=('staticlibs')
+validpgpkeys=('3AB057B7E78D945C8C5591FBD36F769BC11804F0') # Theodore Ts'o <tytso@mit.edu>
+source=("https://www.kernel.org/pub/linux/kernel/people/tytso/${pkgname}/v${pkgver}/${pkgname}-${pkgver}.tar."{xz,sign}
+ 'MIT-LICENSE')
+sha256sums=('ee03b2f2180614c5ae5f6dd2666f8808de61c3d8b37d22ba86cc6daea25be55a'
+ 'SKIP'
+ 'cc45386c1d71f438ad648fd7971e49e3074ad9dbacf9dd3a5b4cb61fd294ecbb')
+
+
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ # Remove unnecessary init.d directory
+ sed -i '/init\.d/s|^|#|' misc/Makefile.in
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ ./configure \
+ --prefix=/usr \
+ --with-root-prefix="" \
+ --libdir=/usr/lib \
+ --sbindir=/usr/bin \
+ --enable-elf-shlibs \
+ --disable-fsck \
+ --disable-uuidd \
+ --disable-libuuid \
+ --disable-libblkid
+
+ make
+}
+
+package() {
+ unset MAKEFLAGS
+
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install install-libs
+
+ sed -i -e 's/^AWK=.*/AWK=awk/' "${pkgdir}/usr/bin/compile_et"
+
+ # remove references to build directory
+ sed -i -e 's#^SS_DIR=.*#SS_DIR="/usr/share/ss"#' "${pkgdir}/usr/bin/mk_cmds"
+ sed -i -e 's#^ET_DIR=.*#ET_DIR="/usr/share/et"#' "${pkgdir}/usr/bin/compile_et"
+
+ # remove static libraries with a shared counterpart
+ rm "${pkgdir}"/usr/lib/lib{com_err,e2p,ext2fs,ss}.a
+
+ # install MIT license
+ install -Dm644 "${srcdir}/MIT-LICENSE" \
+ "${pkgdir}/usr/share/licenses/${pkgname}/MIT-LICENSE"
+}
diff --git a/libre-testing/file/PKGBUILD b/libre-testing/file/PKGBUILD
new file mode 100644
index 000000000..7a0a5f590
--- /dev/null
+++ b/libre-testing/file/PKGBUILD
@@ -0,0 +1,59 @@
+# Maintainer: Sébastien Luttringer <seblu@archlinux.org>
+# Contributor: Allan McRae <allan@archlinux.org>
+# Contributor: Andreas Radke <andyrtr@archlinux.org>
+
+pkgname=file
+pkgver=5.34
+pkgrel=1
+pkgdesc='File type identification utility'
+arch=(x86_64 ppc64le)
+license=('custom')
+groups=('base' 'base-devel')
+url='https://www.darwinsys.com/file/'
+depends=('glibc' 'zlib')
+source=("ftp://ftp.astron.com/pub/$pkgname/$pkgname-$pkgver.tar.gz"{,.asc})
+validpgpkeys=('BE04995BA8F90ED0C0C176C471112AB16CB33B3A') # Christos Zoulas
+md5sums=('44b0b6983462b18f96403d4d3ad80254'
+ 'SKIP')
+
+prepare() {
+ cd $pkgname-$pkgver
+ # apply patch from the source array (should be a pacman feature)
+ local filename
+ for filename in "${source[@]}"; do
+ if [[ "$filename" =~ \.patch$ ]]; then
+ msg2 "Applying patch ${filename##*/}"
+ patch -p1 -N -i "$srcdir/${filename##*/}"
+ fi
+ done
+ :
+}
+
+build() {
+ cd $pkgname-$pkgver
+
+ # seccomp breaks file -z foo.xz
+ # does a whole pipe-fork-exec dance with /bin/xz, so difficult to fix
+ # this breaks makepkg, specifically on the linux PKGBUILD's patch-*.xz
+
+ ./configure \
+ --prefix=/usr \
+ --datadir=/usr/share/file \
+ --enable-fsect-man5 \
+ --disable-libseccomp
+ sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
+ make
+}
+
+check() {
+ cd $pkgname-$pkgver
+ make check
+}
+
+package() {
+ cd $pkgname-$pkgver
+ make DESTDIR="$pkgdir" install
+ install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/libre-testing/filesystem/PKGBUILD b/libre-testing/filesystem/PKGBUILD
new file mode 100644
index 000000000..769e6acf5
--- /dev/null
+++ b/libre-testing/filesystem/PKGBUILD
@@ -0,0 +1,126 @@
+# Maintainer: Sébastien Luttringer
+# Contributor: Tom Gundersen <teg@jklm.no>
+
+pkgname=filesystem
+pkgver=2018.8
+pkgrel=1
+pkgdesc='Base Arch Linux files'
+arch=(x86_64 ppc64le)
+license=('GPL')
+url='https://www.archlinux.org'
+groups=('base')
+depends=('iana-etc')
+backup=('etc/crypttab' 'etc/fstab' 'etc/group' 'etc/gshadow' 'etc/host.conf'
+ 'etc/hosts' 'etc/issue' 'etc/ld.so.conf' 'etc/motd' 'etc/nsswitch.conf'
+ 'etc/passwd' 'etc/profile' 'etc/resolv.conf' 'etc/securetty'
+ 'etc/shadow' 'etc/shells')
+source=('crypttab' 'env-generator' 'fstab' 'group' 'gshadow' 'host.conf' 'hosts'
+ 'issue' 'ld.so.conf' 'locale.sh' 'motd' 'nsswitch.conf' 'os-release'
+ 'passwd' 'profile' 'resolv.conf' 'securetty' 'shadow' 'shells' 'sysctl'
+ 'sysusers' 'tmpfiles')
+md5sums=('5fa6674df7645d7f5895f2d12b4ef4e9'
+ '2b0344e9639f35f3c0d5637a23556089'
+ 'e33f6dfdd61978fcb3ddf1431286e05a'
+ '7fed1e1fb855e41a6d64d41f8521d69a'
+ '1c1e3b08acfa286f4b417c49de3e4366'
+ '7d119a9cce152aa182fb3392ddeecea7'
+ 'a1315ea3e2b64d197b6efaf9c14ff778'
+ '7813c481156f6b280a3ba91fc6236368'
+ '5deb9f890a4d08a245e9752ede77271e'
+ '580cf8b59eebfaac4fad373ffadc9912'
+ 'd41d8cd98f00b204e9800998ecf8427e'
+ '981ee4d7e506a9d6d9ed2d872e16004b'
+ '0a0fbb8e64faabb40023bd180d7190a1'
+ '5182ac38a0de85da8ade93ef71975ca4'
+ '2c79e1762978235e7b4a9ef595f6c029'
+ '0ee015fad07732676d9488ae498eed41'
+ 'f04bcb2803afc4dcb95670fe87343b4d'
+ 'f64466dd77c7bec37a8b47681468211a'
+ 'a78cd8d7f8240a8448edee82f503c34e'
+ 'a51847c012555c843dbdf8df0da171d3'
+ 'af7832eabaac9804c22f1f2b53816a49'
+ '0267a3a463f35eec8a31f40a720dfd86')
+
+package() {
+ cd "$pkgdir"
+
+ # setup root filesystem
+ for d in boot dev etc home mnt usr var opt srv/http run; do
+ install -d -m755 $d
+ done
+ install -d -m555 proc
+ install -d -m555 sys
+ install -d -m0750 root
+ install -d -m1777 tmp
+ # vsftpd won't run with write perms on /srv/ftp
+ # ftp (uid 14/gid 11)
+ install -d -m555 -g 11 srv/ftp
+
+ # setup /etc and /usr/share/factory/etc
+ install -d etc/{ld.so.conf.d,skel,profile.d} usr/share/factory/etc
+ for f in fstab group host.conf hosts issue ld.so.conf motd nsswitch.conf \
+ passwd resolv.conf securetty shells profile; do
+ install -m644 "$srcdir"/$f etc/
+ install -m644 "$srcdir"/$f usr/share/factory/etc/
+ done
+ ln -s ../proc/self/mounts etc/mtab
+ for f in gshadow shadow crypttab; do
+ install -m600 "$srcdir"/$f etc/
+ install -m600 "$srcdir"/$f usr/share/factory/etc/
+ done
+ touch etc/arch-release
+ install -m755 "$srcdir"/locale.sh etc/profile.d/locale.sh
+ install -Dm644 "$srcdir"/os-release usr/lib/os-release
+
+ # setup /var
+ for d in cache local opt log/old lib/misc empty; do
+ install -d -m755 var/$d
+ done
+ install -d -m1777 var/{tmp,spool/mail}
+
+ # allow setgid games (gid 50) to write scores
+ install -d -m775 -g 50 var/games
+ ln -s spool/mail var/mail
+ ln -s ../run var/run
+ ln -s ../run/lock var/lock
+
+ # setup /usr hierarchy
+ for d in bin include lib share/misc src; do
+ install -d -m755 usr/$d
+ done
+ for d in {1..8}; do
+ install -d -m755 usr/share/man/man$d
+ done
+
+ # add lib symlinks
+ ln -s usr/lib lib
+ [[ $CARCH = 'x86_64' ]] && {
+ ln -s usr/lib lib64
+ ln -s lib usr/lib64
+ }
+
+ # add bin symlinks
+ ln -s usr/bin bin
+ ln -s usr/bin sbin
+ ln -s bin usr/sbin
+
+ # setup /usr/local hierarchy
+ for d in bin etc games include lib man sbin share src; do
+ install -d -m755 usr/local/$d
+ done
+ ln -s ../man usr/local/share/man
+
+ # setup systemd-sysctl
+ install -D -m644 "$srcdir"/sysctl usr/lib/sysctl.d/10-arch.conf
+
+ # setup systemd-sysusers
+ install -D -m644 "$srcdir"/sysusers usr/lib/sysusers.d/arch.conf
+
+ # setup systemd-tmpfiles
+ install -D -m644 "$srcdir"/tmpfiles usr/lib/tmpfiles.d/arch.conf
+
+ # setup systemd.environment-generator
+ install -D -m755 "$srcdir"/env-generator usr/lib/systemd/system-environment-generators/10-arch
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/libre-testing/filesystem/crypttab b/libre-testing/filesystem/crypttab
new file mode 100644
index 000000000..3dbc8a46c
--- /dev/null
+++ b/libre-testing/filesystem/crypttab
@@ -0,0 +1,12 @@
+# Configuration for encrypted block devices.
+# See crypttab(5) for details.
+
+# NOTE: Do not list your root (/) partition here, it must be set up
+# beforehand by the initramfs (/etc/mkinitcpio.conf).
+
+# <name> <device> <password> <options>
+# home UUID=b8ad5c18-f445-495d-9095-c9ec4f9d2f37 /etc/mypassword1
+# data1 /dev/sda3 /etc/mypassword2
+# data2 /dev/sda5 /etc/cryptfs.key
+# swap /dev/sdx4 /dev/urandom swap,cipher=aes-cbc-essiv:sha256,size=256
+# vol /dev/sdb7 none
diff --git a/libre-testing/filesystem/env-generator b/libre-testing/filesystem/env-generator
new file mode 100755
index 000000000..5f6391407
--- /dev/null
+++ b/libre-testing/filesystem/env-generator
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+echo 'PATH=/usr/local/sbin:/usr/local/bin:/usr/bin'
diff --git a/libre-testing/filesystem/fstab b/libre-testing/filesystem/fstab
new file mode 100644
index 000000000..903906d27
--- /dev/null
+++ b/libre-testing/filesystem/fstab
@@ -0,0 +1,4 @@
+# Static information about the filesystems.
+# See fstab(5) for details.
+
+# <file system> <dir> <type> <options> <dump> <pass>
diff --git a/libre-testing/filesystem/group b/libre-testing/filesystem/group
new file mode 100644
index 000000000..18acc30a0
--- /dev/null
+++ b/libre-testing/filesystem/group
@@ -0,0 +1 @@
+root:x:0:root
diff --git a/libre-testing/filesystem/gshadow b/libre-testing/filesystem/gshadow
new file mode 100644
index 000000000..3d5d11168
--- /dev/null
+++ b/libre-testing/filesystem/gshadow
@@ -0,0 +1 @@
+root:::root
diff --git a/libre-testing/filesystem/host.conf b/libre-testing/filesystem/host.conf
new file mode 100644
index 000000000..f6df15f6b
--- /dev/null
+++ b/libre-testing/filesystem/host.conf
@@ -0,0 +1,4 @@
+# Resolver configuration file.
+# See host.conf(5) for details.
+
+multi on
diff --git a/libre-testing/filesystem/hosts b/libre-testing/filesystem/hosts
new file mode 100644
index 000000000..37a930617
--- /dev/null
+++ b/libre-testing/filesystem/hosts
@@ -0,0 +1,2 @@
+# Static table lookup for hostnames.
+# See hosts(5) for details.
diff --git a/libre-testing/filesystem/issue b/libre-testing/filesystem/issue
new file mode 100644
index 000000000..dd702dcfb
--- /dev/null
+++ b/libre-testing/filesystem/issue
@@ -0,0 +1,2 @@
+Arch Linux \r (\l)
+
diff --git a/libre-testing/filesystem/ld.so.conf b/libre-testing/filesystem/ld.so.conf
new file mode 100644
index 000000000..1f620fa67
--- /dev/null
+++ b/libre-testing/filesystem/ld.so.conf
@@ -0,0 +1,4 @@
+# Dynamic linker/loader configuration.
+# See ld.so(8) and ldconfig(8) for details.
+
+include /etc/ld.so.conf.d/*.conf
diff --git a/libre-testing/filesystem/locale.sh b/libre-testing/filesystem/locale.sh
new file mode 100644
index 000000000..48dd748da
--- /dev/null
+++ b/libre-testing/filesystem/locale.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# load locale.conf in XDG paths.
+# /etc/locale.conf loads and overrides by kernel command line is done by systemd
+# But we override it here, see FS#56688
+if [ -z "$LANG" ]; then
+ if [ -n "$XDG_CONFIG_HOME" ] && [ -r "$XDG_CONFIG_HOME/locale.conf" ]; then
+ . "$XDG_CONFIG_HOME/locale.conf"
+ elif [ -n "$HOME" ] && [ -r "$HOME/.config/locale.conf" ]; then
+ . "$HOME/.config/locale.conf"
+ elif [ -r /etc/locale.conf ]; then
+ . /etc/locale.conf
+ fi
+fi
+
+# define default LANG to C if not already defined
+LANG=${LANG:-C}
+
+# export all locale (7) variables when they exist
+export LANG LANGUAGE LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY \
+ LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT \
+ LC_IDENTIFICATION
diff --git a/libre-testing/filesystem/motd b/libre-testing/filesystem/motd
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/libre-testing/filesystem/motd
diff --git a/libre-testing/filesystem/nsswitch.conf b/libre-testing/filesystem/nsswitch.conf
new file mode 100644
index 000000000..4a7d9c7e2
--- /dev/null
+++ b/libre-testing/filesystem/nsswitch.conf
@@ -0,0 +1,18 @@
+# Name Service Switch configuration file.
+# See nsswitch.conf(5) for details.
+
+passwd: files mymachines systemd
+group: files mymachines systemd
+shadow: files
+
+publickey: files
+
+hosts: files mymachines myhostname resolve [!UNAVAIL=return] dns
+networks: files
+
+protocols: files
+services: files
+ethers: files
+rpc: files
+
+netgroup: files
diff --git a/libre-testing/filesystem/os-release b/libre-testing/filesystem/os-release
new file mode 100644
index 000000000..d28fdf2c3
--- /dev/null
+++ b/libre-testing/filesystem/os-release
@@ -0,0 +1,8 @@
+NAME="Arch Linux"
+PRETTY_NAME="Arch Linux"
+ID=arch
+ID_LIKE=archlinux
+ANSI_COLOR="0;36"
+HOME_URL="https://www.archlinux.org/"
+SUPPORT_URL="https://bbs.archlinux.org/"
+BUG_REPORT_URL="https://bugs.archlinux.org/"
diff --git a/libre-testing/filesystem/passwd b/libre-testing/filesystem/passwd
new file mode 100644
index 000000000..909d89bca
--- /dev/null
+++ b/libre-testing/filesystem/passwd
@@ -0,0 +1 @@
+root:x:0:0::/root:/bin/bash
diff --git a/libre-testing/filesystem/profile b/libre-testing/filesystem/profile
new file mode 100644
index 000000000..a4f717734
--- /dev/null
+++ b/libre-testing/filesystem/profile
@@ -0,0 +1,40 @@
+# /etc/profile
+
+# Set our umask
+umask 022
+
+# Append our default paths
+appendpath () {
+ case ":$PATH:" in
+ *:"$1":*)
+ ;;
+ *)
+ PATH="${PATH:+$PATH:}$1"
+ esac
+}
+
+appendpath '/usr/local/sbin'
+appendpath '/usr/local/bin'
+appendpath '/usr/bin'
+unset appendpath
+
+export PATH
+
+# Load profiles from /etc/profile.d
+if test -d /etc/profile.d/; then
+ for profile in /etc/profile.d/*.sh; do
+ test -r "$profile" && . "$profile"
+ done
+ unset profile
+fi
+
+# Source global bash config
+if test "$PS1" && test "$BASH" && test -z ${POSIXLY_CORRECT+x} && test -r /etc/bash.bashrc; then
+ . /etc/bash.bashrc
+fi
+
+# Termcap is outdated, old, and crusty, kill it.
+unset TERMCAP
+
+# Man is much better than us at figuring this out
+unset MANPATH
diff --git a/libre-testing/filesystem/resolv.conf b/libre-testing/filesystem/resolv.conf
new file mode 100644
index 000000000..7a7d4293c
--- /dev/null
+++ b/libre-testing/filesystem/resolv.conf
@@ -0,0 +1,2 @@
+# Resolver configuration file.
+# See resolv.conf(5) for details.
diff --git a/libre-testing/filesystem/securetty b/libre-testing/filesystem/securetty
new file mode 100644
index 000000000..67fb10cff
--- /dev/null
+++ b/libre-testing/filesystem/securetty
@@ -0,0 +1,12 @@
+# File which lists terminals from which root can log in.
+# See securetty(5) for details.
+
+console
+tty1
+tty2
+tty3
+tty4
+tty5
+tty6
+ttyS0
+hvc0
diff --git a/libre-testing/filesystem/shadow b/libre-testing/filesystem/shadow
new file mode 100644
index 000000000..7edfd69be
--- /dev/null
+++ b/libre-testing/filesystem/shadow
@@ -0,0 +1 @@
+root::14871::::::
diff --git a/libre-testing/filesystem/shells b/libre-testing/filesystem/shells
new file mode 100644
index 000000000..19324ea83
--- /dev/null
+++ b/libre-testing/filesystem/shells
@@ -0,0 +1,5 @@
+# Pathnames of valid login shells.
+# See shells(5) for details.
+
+/bin/sh
+/bin/bash
diff --git a/libre-testing/filesystem/sysctl b/libre-testing/filesystem/sysctl
new file mode 100644
index 000000000..b585ea2cc
--- /dev/null
+++ b/libre-testing/filesystem/sysctl
@@ -0,0 +1,3 @@
+# Raise inotify resource limits
+fs.inotify.max_user_instances = 1024
+fs.inotify.max_user_watches = 524288
diff --git a/libre-testing/filesystem/sysusers b/libre-testing/filesystem/sysusers
new file mode 100644
index 000000000..000917158
--- /dev/null
+++ b/libre-testing/filesystem/sysusers
@@ -0,0 +1,28 @@
+# default arch groups
+# groups first, because we have user/group id mismatch on ftp and mail
+g sys 3 - -
+g mem 8 - -
+g ftp 11 - -
+g mail 12 - -
+g log 19 - -
+g smmsp 25 - -
+g proc 26 - -
+g games 50 - -
+g lock 54 - -
+g network 90 - -
+g floppy 94 - -
+g scanner 96 - -
+g power 98 - -
+
+# default arch users
+u bin 1 - -
+u daemon 2 - -
+u mail 8 - /var/spool/mail
+u ftp 14 - /srv/ftp
+u http 33 - /srv/http
+
+# default membership
+m bin daemon
+m bin sys
+m daemon adm
+m daemon bin
diff --git a/libre-testing/filesystem/tmpfiles b/libre-testing/filesystem/tmpfiles
new file mode 100644
index 000000000..8fc77b57f
--- /dev/null
+++ b/libre-testing/filesystem/tmpfiles
@@ -0,0 +1,17 @@
+# copy from factory when missing
+
+C /etc/crypttab
+C /etc/fstab
+C /etc/group
+C /etc/gshadow
+C /etc/host.conf
+C /etc/hosts
+C /etc/issue
+C /etc/ld.so.conf
+C /etc/motd
+C /etc/nsswitch.conf
+C /etc/passwd
+C /etc/profile
+C /etc/securetty
+C /etc/shadow
+C /etc/shells
diff --git a/libre-testing/findutils/PKGBUILD b/libre-testing/findutils/PKGBUILD
new file mode 100644
index 000000000..b58332a10
--- /dev/null
+++ b/libre-testing/findutils/PKGBUILD
@@ -0,0 +1,37 @@
+# Maintainer:
+
+pkgname=findutils
+pkgver=4.6.0
+pkgrel=2
+pkgdesc="GNU utilities to locate files"
+arch=(x86_64 ppc64le)
+license=('GPL3')
+groups=('base' 'base-devel')
+depends=('glibc' 'sh')
+url='https://www.gnu.org/software/findutils/'
+source=("https://ftp.gnu.org/pub/gnu/findutils/${pkgname}-${pkgver}.tar.gz")
+sha1sums=('f18e8aaee3f3d4173a1f598001003be8706d28b0')
+#validpgpkeys=('A15B725964A95EE5') # James Youngman <james@youngman.org>
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ # Don't build or install locate because we use mlocate,
+ # which is a secure version of locate.
+ sed -i '/^SUBDIRS/s/locate//' Makefile.in
+
+ ./configure --prefix=/usr
+ # don't build locate, but the docs want a file in there.
+ make -C locate dblocation.texi
+ make
+}
+
+check() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make check
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR=$pkgdir install
+}
diff --git a/libre-testing/gawk/PKGBUILD b/libre-testing/gawk/PKGBUILD
new file mode 100644
index 000000000..d8bde7fdd
--- /dev/null
+++ b/libre-testing/gawk/PKGBUILD
@@ -0,0 +1,37 @@
+# Maintainer:
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+
+pkgname=gawk
+pkgver=4.2.1
+pkgrel=1
+pkgdesc="GNU version of awk"
+arch=(x86_64 ppc64le)
+url="http://www.gnu.org/software/gawk/"
+license=('GPL')
+groups=('base' 'base-devel')
+depends=('sh' 'glibc' 'mpfr')
+provides=('awk')
+source=(https://ftp.gnu.org/pub/gnu/${pkgname}/${pkgname}-${pkgver}.tar.gz{,.sig})
+md5sums=('0256724a0af50cb83ac92f833488673d'
+ 'SKIP')
+validpgpkeys=('D1967C63788713177D861ED7DF597815937EC0D2') # Arnold Robbins
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ ./configure --prefix=/usr --libexecdir=/usr/lib --sysconfdir=/etc --without-libsigsegv
+ make
+}
+
+check() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make check
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make DESTDIR=${pkgdir} install
+
+ #install -dm755 ${pkgdir}/bin
+ #ln -sf /usr/bin/gawk ${pkgdir}/bin/
+ #ln -sf gawk ${pkgdir}/bin/awk
+}
diff --git a/libre-testing/gettext/PKGBUILD b/libre-testing/gettext/PKGBUILD
new file mode 100644
index 000000000..dedc2f11b
--- /dev/null
+++ b/libre-testing/gettext/PKGBUILD
@@ -0,0 +1,50 @@
+# Maintainer:
+
+pkgname=gettext
+pkgver=0.19.8.1
+pkgrel=2
+pkgdesc="GNU internationalization library"
+url="https://www.gnu.org/software/gettext/"
+arch=(x86_64 ppc64le)
+license=(GPL)
+groups=(base base-devel)
+depends=(gcc-libs acl sh glib2 libunistring libcroco)
+makedepends=(gettext emacs git)
+optdepends=('git: for autopoint infrastructure updates')
+options=(!docs)
+source=(https://ftp.gnu.org/pub/gnu/gettext/$pkgname-$pkgver.tar.gz{,.sig}
+ gettext-0.19.8-its-segfault.patch)
+sha256sums=('ff942af0e438ced4a8b0ea4b0b6e0d6d657157c5e2364de57baa279c1c125c43'
+ 'SKIP'
+ '0e3b19ea94e956a6a484ca4c4ecea32a01a83f10a413e586183de464c51f158d')
+validpgpkeys=('462225C3B46F34879FC8496CD605848ED7E69871') # Daiki Ueno
+
+prepare() {
+ cd $pkgname-$pkgver
+ patch -Np1 -i ../gettext-0.19.8-its-segfault.patch
+}
+
+build() {
+ cd $pkgname-$pkgver
+ ./configure \
+ --prefix=/usr \
+ --enable-csharp \
+ --enable-nls \
+ --with-xz \
+ --without-included-gettext
+
+ sed -e 's/ -shared / -Wl,-O1,--as-needed\0/g' \
+ -i gettext-{tools,runtime,runtime/libasprintf}/libtool
+
+ make
+}
+
+check() {
+ cd $pkgname-$pkgver
+ make check
+}
+
+package() {
+ cd $pkgname-$pkgver
+ make DESTDIR="$pkgdir" install
+}
diff --git a/libre-testing/gettext/gettext-0.19.8-its-segfault.patch b/libre-testing/gettext/gettext-0.19.8-its-segfault.patch
new file mode 100644
index 000000000..430719f65
--- /dev/null
+++ b/libre-testing/gettext/gettext-0.19.8-its-segfault.patch
@@ -0,0 +1,43 @@
+From a0cab23332a254e3500cac2a3a984472d02180e5 Mon Sep 17 00:00:00 2001
+From: Bruno Haible <bruno@clisp.org>
+Date: Fri, 9 Dec 2016 21:04:31 +0100
+Subject: [PATCH] Fix crash of xgettext with --its option.
+
+* gettext-tools/src/xgettext.c (main): Free contents of its_dirs only when it
+was initialized. Fixes bug introduced on 2016-05-16.
+---
+ gettext-tools/src/xgettext.c | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/gettext-tools/src/xgettext.c b/gettext-tools/src/xgettext.c
+index f848d76d1..a80ee51ac 100644
+--- a/gettext-tools/src/xgettext.c
++++ b/gettext-tools/src/xgettext.c
+@@ -330,7 +330,7 @@ main (int argc, char *argv[])
+ bool sort_by_msgid = false;
+ bool sort_by_filepos = false;
+ char **dirs;
+- char **its_dirs;
++ char **its_dirs = NULL;
+ char *explicit_its_filename = NULL;
+ const char *file_name;
+ const char *files_from = NULL;
+@@ -1016,9 +1016,12 @@ warning: file '%s' extension '%s' is unknown; will try C"), filename, extension)
+ if (its_locating_rules)
+ locating_rule_list_free (its_locating_rules);
+
+- for (i = 0; its_dirs[i] != NULL; i++)
+- free (its_dirs[i]);
+- free (its_dirs);
++ if (its_dirs != NULL)
++ {
++ for (i = 0; its_dirs[i] != NULL; i++)
++ free (its_dirs[i]);
++ free (its_dirs);
++ }
+
+ exit (EXIT_SUCCESS);
+ }
+--
+2.14.3
+
diff --git a/libre-testing/grep/PKGBUILD b/libre-testing/grep/PKGBUILD
new file mode 100644
index 000000000..14a30174c
--- /dev/null
+++ b/libre-testing/grep/PKGBUILD
@@ -0,0 +1,34 @@
+# Maintainer: Sébastien Luttringer <seblu@archlinux.org>
+# Contributor: Allan McRae <allan@archlinux.org>
+# Contributor: judd <jvinet@zeroflux.org>
+
+pkgname=grep
+pkgver=3.1
+pkgrel=1
+pkgdesc='A string search utility'
+arch=(x86_64 ppc64le)
+license=('GPL3')
+url='https://www.gnu.org/software/grep/'
+groups=('base' 'base-devel')
+depends=('glibc' 'pcre')
+makedepends=('texinfo')
+validpgpkeys=('155D3FC500C834486D1EEA677FD9FCCB000BEEEE') # Jim Meyering
+source=("https://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz"{,.sig})
+md5sums=('feca7b3e7c7f4aab2b42ecbfc513b070'
+ 'SKIP')
+
+build() {
+ cd $pkgname-$pkgver
+ ./configure --prefix=/usr --without-included-regex
+ make
+}
+
+check() {
+ cd $pkgname-$pkgver
+ make check
+}
+
+package() {
+ cd $pkgname-$pkgver
+ make DESTDIR=$pkgdir install
+}
diff --git a/libre-testing/gzip/PKGBUILD b/libre-testing/gzip/PKGBUILD
new file mode 100644
index 000000000..6af2a172e
--- /dev/null
+++ b/libre-testing/gzip/PKGBUILD
@@ -0,0 +1,47 @@
+# Mainainer: Sébastien "Seblu" Luttringer <seblu@archlinux.org>
+# Contributor: Allan McRae <allan@archlinux.org>
+# Contributor: judd <jvinet@zeroflux.org>
+
+pkgname=gzip
+pkgver=1.9
+pkgrel=1
+pkgdesc='GNU compression utility'
+arch=(x86_64 ppc64le)
+url='https://www.gnu.org/software/gzip/'
+license=('GPL3')
+groups=('base' 'base-devel')
+depends=('glibc' 'bash' 'less')
+validpgpkeys=('155D3FC500C834486D1EEA677FD9FCCB000BEEEE') # Jim Meyering
+source=("https://ftp.gnu.org/pub/gnu/gzip/gzip-$pkgver.tar.xz"{,.sig})
+md5sums=('9492c6ccb2239ff679a5475a7bb543ed'
+ 'SKIP')
+prepare() {
+ cd $pkgname-$pkgver
+ # apply patch from the source array (should be a pacman feature)
+ local filename
+ for filename in "${source[@]}"; do
+ if [[ "$filename" =~ \.patch$ ]]; then
+ msg2 "Applying patch ${filename##*/}"
+ patch -p1 -N -i "$srcdir/${filename##*/}"
+ fi
+ done
+ :
+}
+
+build() {
+ cd $pkgname-$pkgver
+ ./configure --prefix=/usr
+ make
+}
+
+check() {
+ cd $pkgname-$pkgver
+ make check
+}
+
+package() {
+ cd $pkgname-$pkgver
+ make prefix="$pkgdir/usr" install
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/libre-testing/inetutils/PKGBUILD b/libre-testing/inetutils/PKGBUILD
new file mode 100644
index 000000000..a6d2bd59d
--- /dev/null
+++ b/libre-testing/inetutils/PKGBUILD
@@ -0,0 +1,89 @@
+# Maintainer: Eric Bélanger <eric@archlinux.org>
+
+pkgname=inetutils
+pkgver=1.9.4
+pkgrel=5
+pkgdesc="A collection of common network programs"
+arch=(x86_64 ppc64le)
+url="http://www.gnu.org/software/inetutils/"
+license=('GPL3')
+groups=('base')
+depends=('pam' 'libcap')
+makedepends=('help2man')
+backup=('etc/xinetd.d/telnet' 'etc/xinetd.d/talk'
+ 'etc/xinetd.d/rlogin' 'etc/xinetd.d/rsh'
+ 'etc/pam.d/rlogin' 'etc/pam.d/rsh')
+options=('!emptydirs')
+install=inetutils.install
+source=("https://ftp.gnu.org/gnu/inetutils/${pkgname}-${pkgver}.tar.xz"{,.sig}
+ 'ftpd.service' 'rlogin.pam' 'rlogin@.service' 'rlogin.socket' 'rlogin.xinetd'
+ 'rsh.pam' 'rsh@.service' 'rsh.socket' 'rsh.xinetd' 'talk.service' 'talk.socket'
+ 'talk.xinetd' 'telnet@.service' 'telnet.socket' 'telnet.xinetd')
+sha1sums=('5e515cc9da142cb73bb1beda137b4c2dcf2b528c'
+ 'SKIP'
+ '026181500b71f0c09ef5c262450be718651e5658'
+ '387b371cbaa3611b95d30f806c0dd08b621a584a'
+ '6f9a304391610a17b8ae3ad35b742c78c86aee16'
+ '0455126fa18d2a9422469d79b9e73dd928b15652'
+ 'd9b8f8aab094ecb779d0f16f21b4683ab327516f'
+ '556b5372cbab8794e931e110b896fa8a61628bb1'
+ '828da7bce49ffc4e9645288759b275a98a2fbc40'
+ '7071da32d42a133ead039197ed891b518bb0f773'
+ '26763ae31b8a5be256666a0ba55746941d75d6ee'
+ '4486c966d28736897bce1280d85d139bd10a5689'
+ 'd1813d42c5c9d2c60f03ebe33961de357a4b8b43'
+ 'b15ab4faa9d97652e182c98c1e3a3b3cbbf6383c'
+ '0917dc6b5a80d914bf550065b1733b7da2c776f3'
+ 'a7ac7bbe917ff80fd8cd4357fbc62fab50595c34'
+ '2b2dd71eb3233e5090f4c2df8abe9b4924d323f3')
+validpgpkeys=('4FBD67621082C4C502448E3B180551BAD95A3C35')
+
+build() {
+ cd ${pkgname}-${pkgver}
+ ./configure --prefix=/usr --libexec=/usr/bin \
+ --localstatedir=/var --sysconfdir=/etc \
+ --without-wrap --with-pam \
+ --enable-ftp --enable-ftpd \
+ --enable-telnet --enable-telnetd \
+ --enable-talk --enable-talkd \
+ --enable-rlogin --enable-rlogind \
+ --enable-rsh --enable-rshd \
+ --enable-rcp --enable-hostname --enable-dnsdomainname \
+ --disable-rexec --disable-rexecd \
+ --disable-tftp --disable-tftpd \
+ --disable-ping --disable-ping6 \
+ --disable-logger --disable-syslogd \
+ --disable-inetd --disable-whois \
+ --disable-uucpd --disable-ifconfig --disable-traceroute
+ make
+}
+
+check() {
+ cd ${pkgname}-${pkgver}
+ make check
+}
+
+package() {
+ cd ${pkgname}-${pkgver}
+ make DESTDIR="${pkgdir}" install
+
+ chmod -s "${pkgdir}"/usr/bin/{rcp,rlogin,rsh}
+
+ install -D -m644 "${srcdir}/telnet.xinetd" "${pkgdir}/etc/xinetd.d/telnet"
+ install -D -m644 "${srcdir}/talk.xinetd" "${pkgdir}/etc/xinetd.d/talk"
+ install -D -m644 "${srcdir}/rlogin.xinetd" "${pkgdir}/etc/xinetd.d/rlogin"
+ install -D -m644 "${srcdir}/rsh.xinetd" "${pkgdir}/etc/xinetd.d/rsh"
+
+ install -D -m644 "${srcdir}/rlogin.pam" "${pkgdir}/etc/pam.d/rlogin"
+ install -D -m644 "${srcdir}/rsh.pam" "${pkgdir}/etc/pam.d/rsh"
+
+ install -D -m644 "${srcdir}/ftpd.service" "${pkgdir}/usr/lib/systemd/system/ftpd.service"
+ install -D -m644 "${srcdir}/rlogin@.service" "${pkgdir}/usr/lib/systemd/system/rlogin@.service"
+ install -D -m644 "${srcdir}/rlogin.socket" "${pkgdir}/usr/lib/systemd/system/rlogin.socket"
+ install -D -m644 "${srcdir}/rsh@.service" "${pkgdir}/usr/lib/systemd/system/rsh@.service"
+ install -D -m644 "${srcdir}/rsh.socket" "${pkgdir}/usr/lib/systemd/system/rsh.socket"
+ install -D -m644 "${srcdir}/talk.service" "${pkgdir}/usr/lib/systemd/system/talk.service"
+ install -D -m644 "${srcdir}/talk.socket" "${pkgdir}/usr/lib/systemd/system/talk.socket"
+ install -D -m644 "${srcdir}/telnet@.service" "${pkgdir}/usr/lib/systemd/system/telnet@.service"
+ install -D -m644 "${srcdir}/telnet.socket" "${pkgdir}/usr/lib/systemd/system/telnet.socket"
+}
diff --git a/libre-testing/inetutils/ftpd.service b/libre-testing/inetutils/ftpd.service
new file mode 100644
index 000000000..c1deb0d52
--- /dev/null
+++ b/libre-testing/inetutils/ftpd.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=FTPD Daemon
+After=network.target
+
+[Service]
+Type=forking
+PIDFile=/run/ftpd.pid
+ExecStart=/usr/bin/ftpd -D
+ExecStopPost=/usr/bin/rm -f /run/ftpd.pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/libre-testing/inetutils/inetutils.install b/libre-testing/inetutils/inetutils.install
new file mode 100644
index 000000000..4776e7e04
--- /dev/null
+++ b/libre-testing/inetutils/inetutils.install
@@ -0,0 +1,9 @@
+post_install() {
+ setcap cap_net_bind_service=+ep usr/bin/rcp 2>/dev/null || chmod +s usr/bin/rcp
+ setcap cap_net_bind_service=+ep usr/bin/rlogin 2>/dev/null || chmod +s usr/bin/rlogin
+ setcap cap_net_bind_service=+ep usr/bin/rsh 2>/dev/null || chmod +s usr/bin/rsh
+}
+
+post_upgrade() {
+ post_install
+}
diff --git a/libre-testing/inetutils/rlogin.pam b/libre-testing/inetutils/rlogin.pam
new file mode 100644
index 000000000..d92a5da40
--- /dev/null
+++ b/libre-testing/inetutils/rlogin.pam
@@ -0,0 +1,13 @@
+#%PAM-1.0
+# For root login to succeed here with pam_securetty, "rlogin" must be
+# listed in /etc/securetty.
+auth required pam_nologin.so
+auth required pam_securetty.so
+auth required pam_env.so
+auth sufficient pam_rhosts.so
+auth include system-auth
+account include system-auth
+password include system-auth
+session optional pam_keyinit.so force revoke
+session required pam_loginuid.so
+session include system-auth
diff --git a/libre-testing/inetutils/rlogin.socket b/libre-testing/inetutils/rlogin.socket
new file mode 100644
index 000000000..c8c276c59
--- /dev/null
+++ b/libre-testing/inetutils/rlogin.socket
@@ -0,0 +1,9 @@
+[Unit]
+Description=Remote Login Facilities Activation Socket
+
+[Socket]
+ListenStream=513
+Accept=true
+
+[Install]
+WantedBy=sockets.target
diff --git a/libre-testing/inetutils/rlogin.xinetd b/libre-testing/inetutils/rlogin.xinetd
new file mode 100644
index 000000000..bffdb9011
--- /dev/null
+++ b/libre-testing/inetutils/rlogin.xinetd
@@ -0,0 +1,10 @@
+service login
+{
+ flags = REUSE
+ socket_type = stream
+ wait = no
+ user = root
+ server = /usr/bin/rlogind
+ log_on_failure += USERID
+ disable = yes
+}
diff --git a/libre-testing/inetutils/rlogin@.service b/libre-testing/inetutils/rlogin@.service
new file mode 100644
index 000000000..77c18caa9
--- /dev/null
+++ b/libre-testing/inetutils/rlogin@.service
@@ -0,0 +1,7 @@
+[Unit]
+Description=Remote Login Facilities Server
+After=local-fs.target
+
+[Service]
+ExecStart=-/usr/bin/rlogind
+StandardInput=socket
diff --git a/libre-testing/inetutils/rsh.pam b/libre-testing/inetutils/rsh.pam
new file mode 100644
index 000000000..3c04bc7d6
--- /dev/null
+++ b/libre-testing/inetutils/rsh.pam
@@ -0,0 +1,11 @@
+#%PAM-1.0
+# For root login to succeed here with pam_securetty, "rsh" must be
+# listed in /etc/securetty.
+auth required pam_nologin.so
+auth required pam_securetty.so
+auth required pam_env.so
+auth required pam_rhosts.so
+account include system-auth
+session optional pam_keyinit.so force revoke
+session required pam_loginuid.so
+session include system-auth
diff --git a/libre-testing/inetutils/rsh.socket b/libre-testing/inetutils/rsh.socket
new file mode 100644
index 000000000..4d44b99eb
--- /dev/null
+++ b/libre-testing/inetutils/rsh.socket
@@ -0,0 +1,9 @@
+[Unit]
+Description=Remote Shell Facilities Activation Socket
+
+[Socket]
+ListenStream=514
+Accept=true
+
+[Install]
+WantedBy=sockets.target
diff --git a/libre-testing/inetutils/rsh.xinetd b/libre-testing/inetutils/rsh.xinetd
new file mode 100644
index 000000000..c8848ce7f
--- /dev/null
+++ b/libre-testing/inetutils/rsh.xinetd
@@ -0,0 +1,10 @@
+service shell
+{
+ flags = REUSE
+ socket_type = stream
+ wait = no
+ user = root
+ server = /usr/bin/rshd
+ log_on_failure += USERID
+ disable = yes
+}
diff --git a/libre-testing/inetutils/rsh@.service b/libre-testing/inetutils/rsh@.service
new file mode 100644
index 000000000..403754a9f
--- /dev/null
+++ b/libre-testing/inetutils/rsh@.service
@@ -0,0 +1,7 @@
+[Unit]
+Description=Remote Shell Facilities Server
+After=local-fs.target
+
+[Service]
+ExecStart=-/usr/bin/rshd
+StandardInput=socket
diff --git a/libre-testing/inetutils/talk.service b/libre-testing/inetutils/talk.service
new file mode 100644
index 000000000..25eb6732d
--- /dev/null
+++ b/libre-testing/inetutils/talk.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Talk Server
+Documentation=man:talkd(8) man:talk(1)
+
+[Service]
+User=nobody
+Group=tty
+ExecStart=/usr/bin/talkd
+StandardInput=socket
+
+[Install]
+Also=talk.socket
diff --git a/libre-testing/inetutils/talk.socket b/libre-testing/inetutils/talk.socket
new file mode 100644
index 000000000..b09e07cbb
--- /dev/null
+++ b/libre-testing/inetutils/talk.socket
@@ -0,0 +1,9 @@
+[Unit]
+Description=Talk Server Activation Socket
+Documentation=man:talkd(8) man:talk(1)
+
+[Socket]
+ListenDatagram=0.0.0.0:518
+
+[Install]
+WantedBy=sockets.target
diff --git a/libre-testing/inetutils/talk.xinetd b/libre-testing/inetutils/talk.xinetd
new file mode 100644
index 000000000..b62e56310
--- /dev/null
+++ b/libre-testing/inetutils/talk.xinetd
@@ -0,0 +1,10 @@
+service ntalk
+{
+ flags = REUSE
+ socket_type = dgram
+ wait = yes
+ user = root
+ server = /usr/bin/talkd
+ log_on_failure += USERID
+ disable = yes
+}
diff --git a/libre-testing/inetutils/telnet.socket b/libre-testing/inetutils/telnet.socket
new file mode 100644
index 000000000..811b6725f
--- /dev/null
+++ b/libre-testing/inetutils/telnet.socket
@@ -0,0 +1,10 @@
+[Unit]
+Description=Telnet Server Activation Socket
+Documentation=man:telnetd(8)
+
+[Socket]
+ListenStream=23
+Accept=true
+
+[Install]
+WantedBy=sockets.target
diff --git a/libre-testing/inetutils/telnet.xinetd b/libre-testing/inetutils/telnet.xinetd
new file mode 100644
index 000000000..c56f33985
--- /dev/null
+++ b/libre-testing/inetutils/telnet.xinetd
@@ -0,0 +1,10 @@
+service telnet
+{
+ flags = REUSE
+ socket_type = stream
+ wait = no
+ user = root
+ server = /usr/bin/telnetd
+ log_on_failure += USERID
+ disable = yes
+}
diff --git a/libre-testing/inetutils/telnet@.service b/libre-testing/inetutils/telnet@.service
new file mode 100644
index 000000000..d92af371b
--- /dev/null
+++ b/libre-testing/inetutils/telnet@.service
@@ -0,0 +1,7 @@
+[Unit]
+Description=Telnet Server
+After=local-fs.target
+
+[Service]
+ExecStart=-/usr/bin/telnetd
+StandardInput=socket
diff --git a/libre-testing/iproute2/0001-make-iproute2-fhs-compliant.patch b/libre-testing/iproute2/0001-make-iproute2-fhs-compliant.patch
new file mode 100644
index 000000000..ef6a07761
--- /dev/null
+++ b/libre-testing/iproute2/0001-make-iproute2-fhs-compliant.patch
@@ -0,0 +1,101 @@
+From f0624f6cc656cb177b64e2664f2a806221bfab58 Mon Sep 17 00:00:00 2001
+From: Christian Hesse <mail@eworm.de>
+Date: Thu, 28 Jul 2016 08:49:20 +0200
+Subject: [PATCH 1/1] make iproute2 fhs compliant
+
+Signed-off-by: Christian Hesse <mail@eworm.de>
+---
+ Makefile | 2 +-
+ netem/Makefile | 4 ++--
+ tc/q_netem.c | 2 +-
+ tc/tc_util.c | 15 +++++++++++++++
+ tc/tc_util.h | 1 +
+ 5 files changed, 20 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index eb571a5..db0a04c 100644
+--- a/Makefile
++++ b/Makefile
+@@ -14,7 +14,7 @@ DBM_INCLUDE:=$(DESTDIR)/usr/include
+
+ SHARED_LIBS = y
+
+-DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\"
++DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\" -DDATADIR=\"$(DATADIR)\"
+ ifneq ($(SHARED_LIBS),y)
+ DEFINES+= -DNO_SHARED_LIBS
+ endif
+diff --git a/netem/Makefile b/netem/Makefile
+index e52e125..5b4d283 100644
+--- a/netem/Makefile
++++ b/netem/Makefile
+@@ -20,9 +20,9 @@ stats: stats.c
+ $(HOSTCC) $(CCOPTS) -I../include -o $@ $@.c -lm
+
+ install: all
+- mkdir -p $(DESTDIR)$(LIBDIR)/tc
++ mkdir -p $(DESTDIR)$(DATADIR)/tc
+ for i in $(DISTDATA); \
+- do install -m 644 $$i $(DESTDIR)$(LIBDIR)/tc; \
++ do install -m 644 $$i $(DESTDIR)$(DATADIR)/tc; \
+ done
+
+ clean:
+diff --git a/tc/q_netem.c b/tc/q_netem.c
+index 8fe2204..a15a5c7 100644
+--- a/tc/q_netem.c
++++ b/tc/q_netem.c
+@@ -113,7 +113,7 @@ static int get_distribution(const char *type, __s16 *data, int maxdata)
+ char *line = NULL;
+ char name[128];
+
+- snprintf(name, sizeof(name), "%s/%s.dist", get_tc_lib(), type);
++ snprintf(name, sizeof(name), "%s/%s.dist", get_tc_datadir(), type);
+ if ((f = fopen(name, "r")) == NULL) {
+ fprintf(stderr, "No distribution data for %s (%s: %s)\n",
+ type, name, strerror(errno));
+diff --git a/tc/tc_util.c b/tc/tc_util.c
+index afc4cf5..728b854 100644
+--- a/tc/tc_util.c
++++ b/tc/tc_util.c
+@@ -32,6 +32,10 @@
+ #define LIBDIR "/usr/lib"
+ #endif
+
++#ifndef DATADIR
++#define DATADIR "/usr/share"
++#endif
++
+ static struct db_names *cls_names;
+
+ #define NAMES_DB "/etc/iproute2/tc_cls"
+@@ -73,6 +77,17 @@ const char *get_tc_lib(void)
+ return lib_dir;
+ }
+
++const char *get_tc_datadir(void)
++{
++ const char *data_dir;
++
++ data_dir = getenv("TC_DATA_DIR");
++ if (!data_dir)
++ data_dir = DATADIR "/tc/";
++
++ return data_dir;
++}
++
+ int get_qdisc_handle(__u32 *h, const char *str)
+ {
+ __u32 maj;
+diff --git a/tc/tc_util.h b/tc/tc_util.h
+index 61e60b1..6d448de 100644
+--- a/tc/tc_util.h
++++ b/tc/tc_util.h
+@@ -55,6 +55,7 @@ struct exec_util {
+ };
+
+ const char *get_tc_lib(void);
++const char *get_tc_datadir(void);
+
+ struct qdisc_util *get_qdisc_kind(const char *str);
+ struct filter_util *get_filter_kind(const char *str);
diff --git a/libre-testing/iproute2/PKGBUILD b/libre-testing/iproute2/PKGBUILD
new file mode 100644
index 000000000..2dbb69516
--- /dev/null
+++ b/libre-testing/iproute2/PKGBUILD
@@ -0,0 +1,58 @@
+# Maintainer: Christian Hesse <mail@eworm.de>
+# Maintainer: Ronald van Haren <ronald.archlinux.org>
+# Contributor: Judd Vinet <jvinet@zeroflux.org>
+
+pkgname=iproute2
+pkgver=4.18.0
+pkgrel=1
+pkgdesc='IP Routing Utilities'
+arch=(x86_64 ppc64le)
+license=('GPL2')
+url='https://git.kernel.org/pub/scm/network/iproute2/iproute2.git'
+depends=('glibc' 'iptables' 'libelf')
+optdepends=('linux-atm: ATM support')
+groups=('base')
+provides=('iproute')
+backup=('etc/iproute2/ematch_map'
+ 'etc/iproute2/rt_dsfield'
+ 'etc/iproute2/rt_protos'
+ 'etc/iproute2/rt_realms'
+ 'etc/iproute2/rt_scopes'
+ 'etc/iproute2/rt_tables')
+makedepends=('linux-atm')
+options=('staticlibs')
+validpgpkeys=('9F6FC345B05BE7E766B83C8F80A77F6095CDE47E') # Stephen Hemminger
+source=("https://www.kernel.org/pub/linux/utils/net/${pkgname}/${pkgname}-${pkgver}.tar."{xz,sign}
+ '0001-make-iproute2-fhs-compliant.patch')
+sha256sums=('a9e6c70c95f513871c5e1f4e452c04fcb3c4d8a05be651bd794cd994a52daa45'
+ 'SKIP'
+ 'f60fefe4c17d3b768824bb50ae6416292bcebba06d73452e23f4147b46b827d3')
+
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ # set correct fhs structure
+ patch -Np1 -i "${srcdir}/0001-make-iproute2-fhs-compliant.patch"
+
+ # do not treat warnings as errors
+ sed -i 's/-Werror//' Makefile
+
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ ./configure
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ make DESTDIR="${pkgdir}" SBINDIR="/usr/bin" install
+
+ # libnetlink isn't installed, install it FS#19385
+ install -Dm0644 include/libnetlink.h "${pkgdir}/usr/include/libnetlink.h"
+ install -Dm0644 lib/libnetlink.a "${pkgdir}/usr/lib/libnetlink.a"
+}
+
diff --git a/libre-testing/iputils/PKGBUILD b/libre-testing/iputils/PKGBUILD
new file mode 100644
index 000000000..d52bd0a07
--- /dev/null
+++ b/libre-testing/iputils/PKGBUILD
@@ -0,0 +1,50 @@
+# Maintainer: Stéphane Gaudreault <stephane@archlinux.org>
+# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
+# Contributor: Aaron Griffin <aaron@archlinux.org>
+
+pkgname=iputils
+# Commit date + git rev-parse --short origin/master
+_rev=f6aac8d
+pkgver=20180629.${_rev}
+pkgrel=2
+pkgdesc="Network monitoring tools, including ping"
+arch=(x86_64 ppc64le)
+license=('GPL')
+url="http://www.skbuff.net/iputils/"
+groups=('base')
+depends=('openssl' 'libcap' 'libidn2')
+optdepends=('xinetd: for tftpd')
+makedepends=('perl-sgmls' 'git' 'docbook-xsl')
+conflicts=('netkit-base' 'arping' 'netkit-tftpd')
+replaces=('netkit-base')
+backup=(etc/xinetd.d/tftp)
+install=${pkgname}.install
+source=("git+https://github.com/iputils/iputils.git#commit=${_rev}"
+ tftp.xinetd)
+sha1sums=('SKIP'
+ 'fc2ae26f5609725e3f4aeaf4ab82dfa6d2e378fd')
+
+build() {
+ cd "${srcdir}/${pkgname}"
+
+ make USE_NETTLE=no USE_GNUTLS=no CCOPTOPT="$CFLAGS"
+ # fix perl-sgmls
+ sed -i -e 's#sgmlspl#sgmlspl.pl#g' "${srcdir}/${pkgname}/doc/Makefile"
+ make -C doc man
+}
+
+package() {
+ cd "${srcdir}/${pkgname}"
+
+ install -dm755 "${pkgdir}"/usr/bin
+
+ install -m755 arping clockdiff ping rarpd rdisc tftpd tracepath "${pkgdir}"/usr/bin/
+
+ install -dm755 "${pkgdir}"/usr/share/man/man8
+ install -m644 doc/{arping,clockdiff,ping,rarpd,rdisc,tftpd,tracepath}.8 \
+ "${pkgdir}"/usr/share/man/man8/
+
+ # FS#24768
+ install -dm755 "${pkgdir}"/etc/xinetd.d/
+ install -m644 "${srcdir}"/tftp.xinetd "${pkgdir}"/etc/xinetd.d/tftp
+}
diff --git a/libre-testing/iputils/iputils.install b/libre-testing/iputils/iputils.install
new file mode 100644
index 000000000..1684c2e72
--- /dev/null
+++ b/libre-testing/iputils/iputils.install
@@ -0,0 +1,9 @@
+post_install() {
+ setcap cap_net_raw=ep usr/bin/ping 2>/dev/null || chmod +s usr/bin/ping
+}
+
+post_upgrade() {
+ post_install "$1"
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/libre-testing/iputils/tftp.xinetd b/libre-testing/iputils/tftp.xinetd
new file mode 100644
index 000000000..26041a3f9
--- /dev/null
+++ b/libre-testing/iputils/tftp.xinetd
@@ -0,0 +1,10 @@
+service tftp
+{
+ socket_type = dgram
+ protocol = udp
+ wait = yes
+ user = nobody
+ server = /usr/sbin/tftpd
+ server_args = /var/tftpboot
+ disable = yes
+}
diff --git a/libre-testing/jfsutils/PKGBUILD b/libre-testing/jfsutils/PKGBUILD
new file mode 100644
index 000000000..81a5d3aa3
--- /dev/null
+++ b/libre-testing/jfsutils/PKGBUILD
@@ -0,0 +1,41 @@
+# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
+# Maintainer: Gaetan Bisson <bisson@archlinux.org>
+
+pkgname=jfsutils
+pkgver=1.1.15
+pkgrel=6
+pkgdesc='JFS filesystem utilities'
+url='http://jfs.sourceforge.net'
+arch=(x86_64 ppc64le)
+license=('GPL')
+depends=('util-linux')
+source=("http://jfs.sourceforge.net/project/pub/${pkgname}-${pkgver}.tar.gz"
+ 'inttypes.patch'
+ 'sysmacros.patch')
+sha256sums=('244a15f64015ce3ea17e49bdf6e1a0fb4f9af92b82fa9e05aa64cb30b5f07a4d'
+ '15ea88350c240b23fe322d4adafbb79c8473b9850495d61efafc7bf68be391b3'
+ 'fd1a4e794a3bf2ebdb4b81f582e147655d70aadd59689aacea0ccc32c6381a28')
+
+groups=('base')
+
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -p1 -i ../inttypes.patch
+ patch -p1 -i ../sysmacros.patch
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --sbindir=/usr/bin
+ make
+}
+
+check() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make check
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/libre-testing/jfsutils/inttypes.patch b/libre-testing/jfsutils/inttypes.patch
new file mode 100644
index 000000000..2018bb8a8
--- /dev/null
+++ b/libre-testing/jfsutils/inttypes.patch
@@ -0,0 +1,12 @@
+diff -Naur old/libfs/devices.h new/libfs/devices.h
+--- old/libfs/devices.h 2005-11-23 07:43:55.000000000 +1100
++++ new/libfs/devices.h 2013-01-06 11:30:25.381538024 +1100
+@@ -40,6 +40,8 @@
+ #define ERROR_INVALID_PARAMETER 87
+ #define ERROR_DISK_FULL 112
+
++#include <inttypes.h>
++
+ struct stat;
+
+ int ujfs_get_dev_size(FILE *, int64_t * size);
diff --git a/libre-testing/jfsutils/sysmacros.patch b/libre-testing/jfsutils/sysmacros.patch
new file mode 100644
index 000000000..82f9d632a
--- /dev/null
+++ b/libre-testing/jfsutils/sysmacros.patch
@@ -0,0 +1,15 @@
+https://bugs.gentoo.org/580056
+
+--- a/libfs/devices.c
++++ b/libfs/devices.c
+@@ -30,6 +30,10 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+
++#if HAVE_SYS_SYSMACROS_H
++#include <sys/sysmacros.h>
++#endif
++
+ #ifdef HAVE_SYS_MOUNT_H
+ #ifdef HAVE_SYS_PARAM_H
+ #include <sys/param.h>
diff --git a/libre-testing/less/PKGBUILD b/libre-testing/less/PKGBUILD
new file mode 100644
index 000000000..8c41216bf
--- /dev/null
+++ b/libre-testing/less/PKGBUILD
@@ -0,0 +1,31 @@
+# Maintainer: Sébastien "Seblu" Luttringer <seblu@archlinux.org>
+# Contributor: Allan McRae <allan@archlinux.org>
+# Contributor: judd <jvinet@zeroflux.org>
+
+pkgname=less
+pkgver=530
+pkgrel=1
+pkgdesc='A terminal based program for viewing text files'
+license=('GPL3')
+arch=('x86_64' 'ppc64le')
+url='http://www.greenwoodsoftware.com/less'
+groups=('base')
+depends=('glibc' 'ncurses' 'pcre')
+validpgpkeys=('AE27252BD6846E7D6EAE1DD6F153A7C833235259') # Mark Nudelman
+source=("http://www.greenwoodsoftware.com/$pkgname/$pkgname-$pkgver.tar.gz"
+ "$pkgname-$pkgver.tar.gz::http://www.greenwoodsoftware.com/$pkgname/$pkgname-$pkgver.sig")
+md5sums=('6a39bccf420c946b0fd7ffc64961315b'
+ 'SKIP')
+
+build() {
+ cd $pkgname-$pkgver
+ sh configure --prefix=/usr --sysconfdir=/etc --with-regex=pcre
+ make
+}
+
+package() {
+ cd $pkgname-$pkgver
+ make DESTDIR="$pkgdir" install
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/libre-testing/logrotate/PKGBUILD b/libre-testing/logrotate/PKGBUILD
new file mode 100644
index 000000000..15b86d1c9
--- /dev/null
+++ b/libre-testing/logrotate/PKGBUILD
@@ -0,0 +1,52 @@
+# Maintainer: Pierre Schmitz <pierre@archlinux.de>
+
+pkgname=logrotate
+pkgver=3.14.0
+pkgrel=1
+pkgdesc="Rotates system logs automatically"
+arch=(x86_64 ppc64le)
+url="https://github.com/logrotate/logrotate"
+license=('GPL')
+groups=('base')
+depends=('popt' 'gzip' 'acl')
+backup=('etc/logrotate.conf')
+source=("https://github.com/logrotate/logrotate/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.xz"{,.asc}
+ 'logrotate.conf')
+md5sums=('1c0f6e6e490c4bcac0a1e77ad1310683'
+ 'SKIP'
+ '94dae4d3eded2fab9ae879533d3680db')
+validpgpkeys=('992A96E075056E79CD8214F9873DB37572A37B36')
+
+build() {
+ cd "$srcdir/${pkgname}-${pkgver}"
+
+ ./configure \
+ --prefix=/usr \
+ --sbindir=/usr/bin \
+ --mandir=/usr/share/man \
+ --with-compress-command=/usr/bin/gzip \
+ --with-uncompress-command=/usr/bin/gunzip \
+ --with-default-mail-command=/usr/bin/mail \
+ --with-acl
+ make
+}
+
+check() {
+ cd "$srcdir/${pkgname}-${pkgver}"
+
+ make test
+}
+
+package() {
+ cd "$srcdir/${pkgname}-${pkgver}"
+
+ make DESTDIR="$pkgdir" install
+
+ install -dm755 "$pkgdir/etc/logrotate.d"
+ install -Dm644 "$srcdir/logrotate.conf" "$pkgdir/etc/logrotate.conf"
+
+ install -D -m644 examples/logrotate.timer ${pkgdir}/usr/lib/systemd/system/logrotate.timer
+ install -D -m644 examples/logrotate.service ${pkgdir}/usr/lib/systemd/system/logrotate.service
+ install -d -m755 $pkgdir/usr/lib/systemd/system/timers.target.wants
+ ln -s ../logrotate.timer $pkgdir/usr/lib/systemd/system/timers.target.wants/logrotate.timer
+}
diff --git a/libre-testing/logrotate/logrotate.conf b/libre-testing/logrotate/logrotate.conf
new file mode 100644
index 000000000..4193a3a7f
--- /dev/null
+++ b/libre-testing/logrotate/logrotate.conf
@@ -0,0 +1,38 @@
+# see "man logrotate" for details
+# rotate log files weekly
+weekly
+
+# keep 4 weeks worth of backlogs
+rotate 4
+
+# restrict maximum size of log files
+#size 20M
+
+# create new (empty) log files after rotating old ones
+create
+
+# uncomment this if you want your log files compressed
+#compress
+
+# Logs are moved into directory for rotation
+# olddir /var/log/archive
+
+# Ignore pacman saved files
+tabooext + .pacorig .pacnew .pacsave
+
+# Arch packages drop log rotation information into this directory
+include /etc/logrotate.d
+
+/var/log/wtmp {
+ monthly
+ create 0664 root utmp
+ minsize 1M
+ rotate 1
+}
+
+/var/log/btmp {
+ missingok
+ monthly
+ create 0600 root utmp
+ rotate 1
+}
diff --git a/libre-testing/lvm2/11-dm-initramfs.rules b/libre-testing/lvm2/11-dm-initramfs.rules
new file mode 100644
index 000000000..d2c167324
--- /dev/null
+++ b/libre-testing/lvm2/11-dm-initramfs.rules
@@ -0,0 +1,3 @@
+# needed with new udev/mkinitcpio and as implemented in dracut:
+# <http://git.kernel.org/?p=boot/dracut/dracut.git;a=commitdiff;h=12b9736228f2b34c15a9cb63be79cf7b6e865b54>
+SUBSYSTEM=="block", KERNEL=="dm-[0-9]*", ACTION=="add|change", OPTIONS="db_persist"
diff --git a/libre-testing/lvm2/PKGBUILD b/libre-testing/lvm2/PKGBUILD
new file mode 100644
index 000000000..d833669ab
--- /dev/null
+++ b/libre-testing/lvm2/PKGBUILD
@@ -0,0 +1,124 @@
+# Maintainer: Eric Bélanger <eric@archlinux.org>
+# Maintainer: Thomas Bächler <thomas@archlinux.org>
+
+pkgbase=lvm2
+pkgname=('lvm2' 'device-mapper')
+pkgver=2.02.181
+pkgrel=1
+arch=(x86_64 ppc64le)
+url='https://sourceware.org/lvm2/'
+license=('GPL2' 'LGPL2.1')
+makedepends=('git' 'systemd' 'thin-provisioning-tools')
+groups=('base')
+validpgpkeys=('88437EF5C077BD113D3B7224228191C1567E2C17' # Alasdair G Kergon <agk@redhat.com>
+ 'D501A478440AE2FD130A1BE8B9112431E509039F') # Marian Csontos <marian.csontos@gmail.com>
+source=("git+https://sourceware.org/git/lvm2.git#tag=v${pkgver//./_}?signed"
+ 'lvm2_install'
+ 'lvm2_hook'
+ 'sd-lvm2_install'
+ '11-dm-initramfs.rules')
+sha256sums=('SKIP'
+ 'cc51940a8437f3c8339bb9cec7e929b2cc0852ffc8a0b2463e6f67ca2b9950f6'
+ '97d7c92e4954bc0108e7cd183b2eb5fe7ecc97e6f56369669e6537cb6ed45d80'
+ 'b749c2da0e9307b0c2c3858d024a19c268e01e393e876a284fe1a302427f72f1'
+ 'e10f24b57582d6e2da71f7c80732a62e0ee2e3b867fe84591ccdb53e80fa92e0')
+
+prepare() {
+ cd lvm2/
+
+ # remove install section from systemd units that are enabled by default
+ sed -i -e '/^\[Install\]$/,$d' \
+ scripts/dm_event_systemd_red_hat.socket.in \
+ scripts/lvm2_lvmetad_systemd_red_hat.socket.in \
+ scripts/lvm2_lvmpolld_systemd_red_hat.socket.in \
+ scripts/lvm2_monitoring_systemd_red_hat.service.in
+}
+
+build() {
+ local _CONFIGUREOPTS=(
+ --prefix=/usr
+ --sbindir=/usr/bin
+ --sysconfdir=/etc
+ --localstatedir=/var
+ --enable-applib
+ --enable-cmdlib
+ --enable-dmeventd
+ --enable-lvmetad
+ --enable-lvmpolld
+ --enable-pkgconfig
+ --enable-readline
+ --enable-udev_rules
+ --enable-udev_sync
+ --enable-use-lvmetad
+ --with-cache=internal
+ --with-default-dm-run-dir=/run
+ --with-default-locking-dir=/run/lock/lvm
+ --with-default-pid-dir=/run
+ --with-default-run-dir=/run/lvm
+ --with-systemdsystemunitdir=/usr/lib/systemd/system
+ --with-thin=internal
+ --with-udev-prefix=/usr
+ )
+
+ cp -a lvm2/ lvm2-initramfs/
+
+ cd lvm2/
+
+ ./configure "${_CONFIGUREOPTS[@]}" --enable-udev-systemd-background-jobs
+ make
+
+ # Build legacy udev rule for initramfs
+ cd ../lvm2-initramfs
+ ./configure "${_CONFIGUREOPTS[@]}" --enable-udev-systemd-background-jobs=no
+ cd udev
+ make 69-dm-lvm-metad.rules
+}
+
+package_device-mapper() {
+ pkgdesc="Device mapper userspace library and tools"
+ url="http://sourceware.org/dm/"
+ depends=('glibc' 'libsystemd')
+
+ cd lvm2/
+
+ make DESTDIR="${pkgdir}" install_device-mapper
+ # extra udev rule for device-mapper in initramfs
+ install -D -m644 "${srcdir}/11-dm-initramfs.rules" "${pkgdir}/usr/lib/initcpio/udev/11-dm-initramfs.rules"
+ # Install dmeventd socket and service
+ make DESTDIR="${pkgdir}" install_systemd_units
+ rm -f "${pkgdir}/usr/lib/systemd/system/"{blk-availability.service,lvm2-*}
+ install -d -m755 "${pkgdir}/usr/lib/systemd/system/sockets.target.wants"
+ ln -sf ../dm-event.socket "${pkgdir}/usr/lib/systemd/system/sockets.target.wants/dm-event.socket"
+}
+
+package_lvm2() {
+ pkgdesc="Logical Volume Manager 2 utilities"
+ depends=('bash' "device-mapper>=${pkgver}" 'libsystemd' 'libutil-linux' 'readline' 'thin-provisioning-tools')
+ conflicts=('lvm' 'mkinitcpio<0.7')
+ backup=('etc/lvm/lvm.conf'
+ 'etc/lvm/lvmlocal.conf')
+ options=('!makeflags')
+ install=lvm2.install
+
+ cd lvm2/
+
+ make DESTDIR="${pkgdir}" install_lvm2
+ # install applib
+ make -C liblvm DESTDIR="${pkgdir}" install
+ # /etc directories
+ install -d "${pkgdir}"/etc/lvm/{archive,backup}
+ # mkinitcpio hook
+ install -D -m644 "${srcdir}/lvm2_hook" "${pkgdir}/usr/lib/initcpio/hooks/lvm2"
+ install -D -m644 "${srcdir}/lvm2_install" "${pkgdir}/usr/lib/initcpio/install/lvm2"
+ install -D -m644 "${srcdir}/sd-lvm2_install" "${pkgdir}/usr/lib/initcpio/install/sd-lvm2"
+ # extra udev rule for lvmetad in non-systemd initramfs
+ install -D -m644 "${srcdir}/lvm2-initramfs/udev/69-dm-lvm-metad.rules" "${pkgdir}/usr/lib/initcpio/udev/69-dm-lvm-metad.rules"
+ # systemd support
+ make DESTDIR="${pkgdir}" install_systemd_units
+ rm -f "${pkgdir}/usr/lib/systemd/system/"dm-*
+ install -d -m755 "${pkgdir}/usr/lib/systemd/system/sysinit.target.wants"
+ ln -sf ../lvm2-lvmetad.socket "${pkgdir}/usr/lib/systemd/system/sysinit.target.wants/lvm2-lvmetad.socket"
+ ln -sf ../lvm2-lvmpolld.socket "${pkgdir}/usr/lib/systemd/system/sysinit.target.wants/lvm2-lvmpolld.socket"
+ ln -sf ../lvm2-monitor.service "${pkgdir}/usr/lib/systemd/system/sysinit.target.wants/lvm2-monitor.service"
+ make DESTDIR="${pkgdir}" install_systemd_generators
+}
diff --git a/libre-testing/lvm2/lvm2.install b/libre-testing/lvm2/lvm2.install
new file mode 100644
index 000000000..e11834d44
--- /dev/null
+++ b/libre-testing/lvm2/lvm2.install
@@ -0,0 +1,25 @@
+post_upgrade() {
+ if [ $(vercmp $2 2.02.98-2) -lt 0 ]; then
+ echo "Changes to the lvm2 package:"
+ echo " + Activating lvm in mkinitcpio now requires both the 'udev' and 'lvm2' hooks."
+ echo " + LVM volumes are automatically activated by udev (full hotplug support)."
+ echo " + You MUST have use_lvmetad = 1 in /etc/lvm/lvm.conf (the default)."
+ echo " + If you uncomment auto_activation_volume_list in /etc/lvm/lvm.conf, only the"
+ echo " volumes listed there will be activated (default: it is commented out)."
+ if [ -f /etc/lvm/lvm.conf.pacnew ]; then
+ echo "WARNING: /etc/lvm/lvm.conf.pacnew exists. You MUST merge the required changes"
+ echo " into /etc/lvm/lvm.conf or LVM will fail to work."
+ fi
+ fi
+
+ if [ $(vercmp $2 2.02.106-2) -lt 0 ]; then
+ if [ -L /etc/systemd/system/sysinit.target.wants/lvm-monitoring.service ]; then
+ echo "rm /etc/systemd/system/sysinit.target.wants/lvm-monitoring.service"
+ rm /etc/systemd/system/sysinit.target.wants/lvm-monitoring.service
+ echo "ln -s /usr/lib/systemd/system/lvm2-monitor.service /etc/systemd/system/sysinit.target.wants/lvm2-monitor.service"
+ ln -s /usr/lib/systemd/system/lvm2-monitor.service /etc/systemd/system/sysinit.target.wants/lvm2-monitor.service
+ fi
+ fi
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/libre-testing/lvm2/lvm2_hook b/libre-testing/lvm2/lvm2_hook
new file mode 100644
index 000000000..3c28d67ff
--- /dev/null
+++ b/libre-testing/lvm2/lvm2_hook
@@ -0,0 +1,25 @@
+#!/usr/bin/ash
+
+run_earlyhook() {
+ mkdir /run/lvm
+ lvmetad
+}
+
+# We are suffering a race condition in non-systemd initramfs: If lvmetad is
+# killed before pvscan processes finish we have stale processes and
+# uninitialized physical volumes. So wait for pvscan processes to finish.
+# Break after 10 seconds (50*0.2s) to avaid infinite loop.
+run_latehook() {
+ local i=50
+
+ while pgrep -f pvscan >/dev/null 2>/dev/null && [ $i -gt 0 ]; do
+ sleep 0.2
+ i=$((i - 1))
+ done
+}
+
+run_cleanuphook() {
+ kill $(cat /run/lvmetad.pid)
+}
+
+# vim: set ft=sh ts=4 sw=4 et:
diff --git a/libre-testing/lvm2/lvm2_install b/libre-testing/lvm2/lvm2_install
new file mode 100644
index 000000000..d7a63332a
--- /dev/null
+++ b/libre-testing/lvm2/lvm2_install
@@ -0,0 +1,43 @@
+#!/usr/bin/bash
+
+build() {
+ local mod
+ local symlink
+
+ # device mapper modules
+ for mod in dm-mod dm-snapshot dm-mirror dm-cache dm-cache-smq dm-thin-pool; do
+ add_module "$mod"
+ done
+
+ # binaries from lvm2
+ add_binary "lvm"
+ add_binary "lvmetad"
+
+ # beinaries from device-mapper
+ add_binary "dmsetup"
+
+ # from thin-provisioning-tools
+ add_binary "pdata_tools"
+ for symlink in cache_{check,dump,metadata_size,repair,restore} thin_{check,delta,dump,ls,metadata_size,repair,restore,rmap,trim}; do
+ add_symlink "/usr/bin/${symlink}" "pdata_tools"
+ done
+
+ # udev rules and lvm configuration
+ add_file "/usr/lib/udev/rules.d/10-dm.rules"
+ add_file "/usr/lib/udev/rules.d/11-dm-lvm.rules"
+ add_file "/usr/lib/udev/rules.d/13-dm-disk.rules"
+ add_file "/usr/lib/udev/rules.d/95-dm-notify.rules"
+ add_file "/usr/lib/initcpio/udev/11-dm-initramfs.rules" "/usr/lib/udev/rules.d/11-dm-initramfs.rules"
+ add_file "/usr/lib/initcpio/udev/69-dm-lvm-metad.rules" "/usr/lib/udev/rules.d/69-dm-lvm-metad.rules"
+ add_file "/etc/lvm/lvm.conf"
+
+ add_runscript
+}
+
+help() {
+ cat <<HELPEOF
+This hook enables LVM2 volumes in initramfs.
+HELPEOF
+}
+
+# vim: set ft=sh ts=4 sw=4 et:
diff --git a/libre-testing/lvm2/sd-lvm2_install b/libre-testing/lvm2/sd-lvm2_install
new file mode 100644
index 000000000..5579b1c90
--- /dev/null
+++ b/libre-testing/lvm2/sd-lvm2_install
@@ -0,0 +1,46 @@
+#!/usr/bin/bash
+
+build() {
+ local mod
+ local symlink
+
+ # device mapper modules
+ for mod in dm-mod dm-snapshot dm-mirror dm-cache dm-cache-smq dm-thin-pool; do
+ add_module "$mod"
+ done
+
+ # device mapper and lvm2 systemd units
+ # binaries and libraries are pull automatically, except ...
+ add_systemd_unit "lvm2-lvmetad.service"
+ add_systemd_unit "lvm2-pvscan@.service"
+
+ # binaries from lvm2
+ add_binary "lvm"
+ add_binary "lvmetad"
+
+ # beinaries from device-mapper
+ add_binary "dmsetup"
+
+ # from thin-provisioning-tools
+ add_binary "pdata_tools"
+ for symlink in cache_{check,dump,metadata_size,repair,restore} thin_{check,delta,dump,ls,metadata_size,repair,restore,rmap,trim}; do
+ add_symlink "/usr/bin/${symlink}" "pdata_tools"
+ done
+
+ # udev rules and lvm configuration
+ add_file "/usr/lib/udev/rules.d/10-dm.rules"
+ add_file "/usr/lib/udev/rules.d/11-dm-lvm.rules"
+ add_file "/usr/lib/udev/rules.d/13-dm-disk.rules"
+ add_file "/usr/lib/udev/rules.d/69-dm-lvm-metad.rules"
+ add_file "/usr/lib/udev/rules.d/95-dm-notify.rules"
+ add_file "/usr/lib/initcpio/udev/11-dm-initramfs.rules" "/usr/lib/udev/rules.d/11-dm-initramfs.rules"
+ add_file "/etc/lvm/lvm.conf"
+}
+
+help() {
+ cat <<HELPEOF
+This hook enables LVM2 volumes in systemd-based initramfs.
+HELPEOF
+}
+
+# vim: set ft=sh ts=4 sw=4 et:
diff --git a/libre-testing/man-db/PKGBUILD b/libre-testing/man-db/PKGBUILD
new file mode 100644
index 000000000..721319c18
--- /dev/null
+++ b/libre-testing/man-db/PKGBUILD
@@ -0,0 +1,66 @@
+# Maintainer: Andreas Radke <andyrtr@archlinux.org>
+# Contributor: Sergej Pupykin <sergej@aur.archlinux.org>
+
+pkgname=man-db
+pkgver=2.8.4
+pkgrel=1
+pkgdesc="A utility for reading man pages"
+arch=(x86_64 ppc64le)
+url="http://www.nongnu.org/man-db/"
+license=('GPL' 'LGPL')
+groups=('base')
+depends=( 'bash' 'gdbm' 'zlib' 'groff' 'libpipeline' 'less' 'libseccomp')
+makedepends=('po4a')
+optdepends=('gzip')
+backup=('etc/man_db.conf')
+conflicts=('man')
+provides=('man')
+replaces=('man')
+install=${pkgname}.install
+source=(#https://download-mirror.savannah.gnu.org/releases/man-db/$pkgname-$pkgver.tar.xz{,.sig}
+ https://savannah.nongnu.org/download/man-db/$pkgname-$pkgver.tar.xz{,.asc}
+ convert-mans
+ man-db.{timer,service})
+validpgpkeys=('AC0A4FF12611B6FCCF01C111393587D97D86500B') # Colin Watson <cjwatson@debian.org>
+sha512sums=('3cc160a5a8a0a4e918f6f6546582d1e5fe9851a13c5bd8dc94e3fcbf4ec28cb3cd1524b1ae30722931c84981fa8ca9ac64c9c4d9544c2d0bea80ac9f39cb5e66'
+ 'SKIP'
+ '0b159285da20008f0fc0afb21f1eaebd39e8df5b0594880aa0e8a913b656608b8d16bb8d279d9e62d7aae52f62cb9b2fc49e237c6711f4a5170972b38d345535'
+ '2ed529500fbe18ba00ac7a6fc4c9da59e396464afb256db33f462b1127e497916602370e65e485c8d788c839f5b1b1130028502f61e1cc9ec8571ad6dd993738'
+ '76f8d51866418b612a72deaf3b07134d416a6d014dd3883fa78e08683c6b08553f483a4384ac87da25ac9896faa4807842fc69c42950cefe3c1c0590883aa600')
+
+build() {
+ cd ${pkgname}-${pkgver}
+ ./configure --prefix=/usr \
+ --sbindir=/usr/bin \
+ --sysconfdir=/etc \
+ --libexecdir=/usr/lib \
+ --with-db=gdbm \
+ --disable-setuid \
+ --enable-cache-owner=root \
+ --enable-mandirs=GNU \
+ --with-sections="1 n l 8 3 0 2 5 4 9 6 7"
+ make
+}
+
+check() {
+ cd ${pkgname}-${pkgver}
+ make check
+}
+
+package() {
+ cd ${pkgname}-${pkgver}
+ make DESTDIR=${pkgdir} install
+
+ # part of groff pkg
+ rm -f ${pkgdir}/usr/bin/zsoelim
+
+ # script from LFS to convert manpages, see
+ # http://www.linuxfromscratch.org/lfs/view/6.4/chapter06/man-db.html
+ install -D -m755 ${srcdir}/convert-mans ${pkgdir}/usr/bin/convert-mans
+
+ # install man-db update timer
+ install -D -m644 ${srcdir}/man-db.timer ${pkgdir}/usr/lib/systemd/system/man-db.timer
+ install -D -m644 ${srcdir}/man-db.service ${pkgdir}/usr/lib/systemd/system/man-db.service
+ install -d -m755 ${pkgdir}/usr/lib/systemd/system/multi-user.target.wants
+ ln -s ../man-db.timer ${pkgdir}//usr/lib/systemd/system/multi-user.target.wants/man-db.timer
+}
diff --git a/libre-testing/man-db/convert-mans b/libre-testing/man-db/convert-mans
new file mode 100644
index 000000000..58a0224b0
--- /dev/null
+++ b/libre-testing/man-db/convert-mans
@@ -0,0 +1,11 @@
+#!/bin/sh -e
+FROM="$1"
+TO="$2"
+shift ; shift
+while [ $# -gt 0 ]
+do
+ FILE="$1"
+ shift
+ iconv -f "$FROM" -t "$TO" "$FILE" >.tmp.iconv
+ mv .tmp.iconv "$FILE"
+done
diff --git a/libre-testing/man-db/man-db.install b/libre-testing/man-db/man-db.install
new file mode 100644
index 000000000..8db2147a8
--- /dev/null
+++ b/libre-testing/man-db/man-db.install
@@ -0,0 +1,11 @@
+post_upgrade() {
+ # force database rebuild as recommended per upstream
+ if [ "`vercmp $2 2.7.0`" -lt 0 ]; then
+ echo "(re)building database..."
+ mandb -c --quiet
+ fi
+}
+
+post_remove() {
+ rm -rf /var/cache/man
+}
diff --git a/libre-testing/man-db/man-db.service b/libre-testing/man-db/man-db.service
new file mode 100644
index 000000000..d92ce56ca
--- /dev/null
+++ b/libre-testing/man-db/man-db.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Update man-db cache
+RequiresMountsFor=/var/cache/man
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/mkdir -p /var/cache/man
+ExecStart=/usr/bin/mandb
+CPUSchedulingPolicy=batch
+Nice=19
+IOSchedulingClass=best-effort
+IOSchedulingPriority=7
diff --git a/libre-testing/man-db/man-db.timer b/libre-testing/man-db/man-db.timer
new file mode 100644
index 000000000..ea224f394
--- /dev/null
+++ b/libre-testing/man-db/man-db.timer
@@ -0,0 +1,7 @@
+[Unit]
+Description=Daily man-db cache update
+
+[Timer]
+OnCalendar=daily
+AccuracySec=1d
+Persistent=true
diff --git a/libre-testing/mdadm/PKGBUILD b/libre-testing/mdadm/PKGBUILD
new file mode 100644
index 000000000..ae3148e89
--- /dev/null
+++ b/libre-testing/mdadm/PKGBUILD
@@ -0,0 +1,52 @@
+# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
+# Contributor: Judd Vinet <jvinet@zeroflux.org>
+pkgname=mdadm
+pkgver=4.0
+pkgrel=1
+pkgdesc="A tool for managing/monitoring Linux md device arrays, also known as Software RAID"
+arch=(x86_64 ppc64le)
+license=('GPL')
+url="http://neil.brown.name/blog/mdadm"
+groups=('base')
+conflicts=('mkinitcpio<0.7')
+depends=('glibc')
+backup=('etc/mdadm.conf')
+source=("https://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-4.0.tar."{xz,sign}
+ mdadm.conf
+ mdadm_install
+ mdadm_hook
+ mdadm_udev_install
+ disable-werror.patch)
+replaces=('raidtools')
+validpgpkeys=('6A86B80E1D22F21D0B26BA75397D82E0531A9C91') # Jes Sorensen
+md5sums=('2cb4feffea9167ba71b5f346a0c0a40d'
+ 'SKIP'
+ '5a37c112aa07dccdde62f9fa5b888607'
+ 'af2f73f0094ebee66f503ca4710c7142'
+ 'fbfb7d07efcbaf5dc61af424c5f6e352'
+ 'b6b0bfd6487c99264578630616dfe5eb'
+ '599745ed2bec4489e83991cff89c46ee')
+
+prepare() {
+ cd $srcdir/$pkgname-$pkgver
+ patch -Np0 -i ../disable-werror.patch
+}
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ make CXFLAGS="$CFLAGS" BINDIR=/usr/bin UDEVDIR=/usr/lib/udev
+ # build static mdassemble for Arch's initramfs
+ make MDASSEMBLE_AUTO=1 mdassemble
+
+}
+
+package() {
+ cd $srcdir/$pkgname-$pkgver
+ make INSTALL=/usr/bin/install BINDIR=/usr/bin DESTDIR=$pkgdir UDEVDIR=/usr/lib/udev install
+ make SYSTEMD_DIR=$pkgdir/usr/lib/systemd/system install-systemd
+ install -D -m755 mdassemble $pkgdir/usr/bin/mdassemble
+ install -D -m644 ../mdadm.conf $pkgdir/etc/mdadm.conf
+ install -D -m644 ../mdadm_install $pkgdir/usr/lib/initcpio/install/mdadm
+ install -D -m644 ../mdadm_hook $pkgdir/usr/lib/initcpio/hooks/mdadm
+ install -D -m644 ../mdadm_udev_install $pkgdir/usr/lib/initcpio/install/mdadm_udev
+}
diff --git a/libre-testing/mdadm/disable-werror.patch b/libre-testing/mdadm/disable-werror.patch
new file mode 100644
index 000000000..a80a41456
--- /dev/null
+++ b/libre-testing/mdadm/disable-werror.patch
@@ -0,0 +1,11 @@
+--- Makefile.old 2011-06-17 09:38:03.269238332 +0200
++++ Makefile 2011-06-17 09:38:14.122398837 +0200
+@@ -42,7 +42,7 @@
+
+ CC = $(CROSS_COMPILE)gcc
+ CXFLAGS ?= -ggdb
+-CWFLAGS = -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter
++CWFLAGS = -Wall -Wstrict-prototypes -Wextra -Wno-unused-parameter
+ ifdef WARN_UNUSED
+ CWFLAGS += -Wp,-D_FORTIFY_SOURCE=2 -O3
+ endif
diff --git a/libre-testing/mdadm/linux-3.0.patch b/libre-testing/mdadm/linux-3.0.patch
new file mode 100644
index 000000000..cd9d5473c
--- /dev/null
+++ b/libre-testing/mdadm/linux-3.0.patch
@@ -0,0 +1,45 @@
+From f161d047eed634b3380262767f955eb888502e88 Mon Sep 17 00:00:00 2001
+From: NeilBrown <neilb@suse.de>
+Date: Fri, 17 Jun 2011 22:49:24 +1000
+Subject: [PATCH 1/1] util: correctly parse shorter linux version numbers.
+
+The next version of Linux might be 3.0. If it is, get_linux_version
+will fail.
+So make it more robust.
+
+Reported-by: Namhyung Kim <namhyung@gmail.com>
+Reported-by: Milan Broz <mbroz@redhat.com>
+Signed-off-by: NeilBrown <neilb@suse.de>
+---
+ util.c | 10 +++++-----
+ 1 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/util.c b/util.c
+index 10bbe56..55d171a 100644
+--- a/util.c
++++ b/util.c
+@@ -146,16 +146,16 @@ int get_linux_version()
+ {
+ struct utsname name;
+ char *cp;
+- int a,b,c;
++ int a = 0, b = 0,c = 0;
+ if (uname(&name) <0)
+ return -1;
+
+ cp = name.release;
+ a = strtoul(cp, &cp, 10);
+- if (*cp != '.') return -1;
+- b = strtoul(cp+1, &cp, 10);
+- if (*cp != '.') return -1;
+- c = strtoul(cp+1, NULL, 10);
++ if (*cp == '.')
++ b = strtoul(cp+1, &cp, 10);
++ if (*cp == '.')
++ c = strtoul(cp+1, &cp, 10);
+
+ return (a*1000000)+(b*1000)+c;
+ }
+--
+1.7.2.3
+
diff --git a/libre-testing/mdadm/mdadm-fix-udev-rules.patch b/libre-testing/mdadm/mdadm-fix-udev-rules.patch
new file mode 100644
index 000000000..941cadf3a
--- /dev/null
+++ b/libre-testing/mdadm/mdadm-fix-udev-rules.patch
@@ -0,0 +1,137 @@
+diff --git a/Makefile b/Makefile
+index b6edb23..bedef96 100644
+--- a/Makefile
++++ b/Makefile
+@@ -253,8 +253,9 @@
+ $(INSTALL) -D -m 644 md.4 $(DESTDIR)$(MAN4DIR)/md.4
+ $(INSTALL) -D -m 644 mdadm.conf.5 $(DESTDIR)$(MAN5DIR)/mdadm.conf.5
+
+-install-udev: udev-md-raid.rules
+- $(INSTALL) -D -m 644 udev-md-raid.rules $(DESTDIR)/lib/udev/rules.d/64-md-raid.rules
++install-udev: udev-md-raid-arrays.rules udev-md-raid-assembly.rules
++ $(INSTALL) -D -m 644 udev-md-raid-arrays.rules $(DESTDIR)/usr/lib/udev/rules.d/63-md-raid-arrays.rules
++ $(INSTALL) -D -m 644 udev-md-raid-assembly.rules $(DESTDIR)/usr/lib/udev/rules.d/64-md-raid-assembly.rules
+
+ uninstall:
+ rm -f $(DESTDIR)$(MAN8DIR)/mdadm.8 $(DESTDIR)$(MAN8DIR)/mdmon.8 $(DESTDIR)$(MAN4DIR)/md.4 $(DESTDIR)$(MAN5DIR)/mdadm.conf.5 $(DESTDIR)$(BINDIR)/mdadm
+diff --git a/udev-md-raid-arrays.rules b/udev-md-raid-arrays.rules
+new file mode 100644
+index 0000000..883ee4d
+--- /dev/null
++++ b/udev-md-raid-arrays.rules
+@@ -0,0 +1,35 @@
++# do not edit this file, it will be overwritten on update
++
++SUBSYSTEM!="block", GOTO="md_end"
++
++# handle md arrays
++ACTION!="add|change", GOTO="md_end"
++KERNEL!="md*", GOTO="md_end"
++
++# partitions have no md/{array_state,metadata_version}, but should not
++# for that reason be ignored.
++ENV{DEVTYPE}=="partition", GOTO="md_ignore_state"
++
++# container devices have a metadata version of e.g. 'external:ddf' and
++# never leave state 'inactive'
++ATTR{md/metadata_version}=="external:[A-Za-z]*", ATTR{md/array_state}=="inactive", GOTO="md_ignore_state"
++TEST!="md/array_state", ENV{SYSTEMD_READY}="0", GOTO="md_end"
++ATTR{md/array_state}=="|clear|inactive", ENV{SYSTEMD_READY}="0", GOTO="md_end"
++LABEL="md_ignore_state"
++
++IMPORT{program}="/usr/bin/mdadm --detail --export $devnode"
++ENV{DEVTYPE}=="disk", ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}", OPTIONS+="string_escape=replace"
++ENV{DEVTYPE}=="disk", ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}"
++ENV{DEVTYPE}=="disk", ENV{MD_DEVNAME}=="?*", SYMLINK+="md/$env{MD_DEVNAME}"
++ENV{DEVTYPE}=="partition", ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}-part%n", OPTIONS+="string_escape=replace"
++ENV{DEVTYPE}=="partition", ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}-part%n"
++ENV{DEVTYPE}=="partition", ENV{MD_DEVNAME}=="*[^0-9]", SYMLINK+="md/$env{MD_DEVNAME}%n"
++ENV{DEVTYPE}=="partition", ENV{MD_DEVNAME}=="*[0-9]", SYMLINK+="md/$env{MD_DEVNAME}p%n"
++
++IMPORT{builtin}="blkid"
++OPTIONS+="link_priority=100"
++OPTIONS+="watch"
++ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
++ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
++
++LABEL="md_end"
+diff --git a/udev-md-raid-assembly.rules b/udev-md-raid-assembly.rules
+new file mode 100644
+index 0000000..b89775e
+--- /dev/null
++++ b/udev-md-raid-assembly.rules
+@@ -0,0 +1,19 @@
++# do not edit this file, it will be overwritten on update
++
++# assemble md arrays
++
++SUBSYSTEM!="block", GOTO="md_inc_end"
++
++# handle potential components of arrays (the ones supported by md)
++ENV{ID_FS_TYPE}=="ddf_raid_member|isw_raid_member|linux_raid_member", GOTO="md_inc"
++GOTO="md_inc_end"
++
++LABEL="md_inc"
++
++# remember you can limit what gets auto/incrementally assembled by
++# mdadm.conf(5)'s 'AUTO' and selectively whitelist using 'ARRAY'
++ACTION=="add", RUN+="/usr/bin/mdadm --incremental $devnode --offroot"
++ACTION=="remove", ENV{ID_PATH}=="?*", RUN+="/usr/bin/mdadm -If $name --path $env{ID_PATH}"
++ACTION=="remove", ENV{ID_PATH}!="?*", RUN+="/usr/bin/mdadm -If $name"
++
++LABEL="md_inc_end"
+diff --git a/udev-md-raid.rules b/udev-md-raid.rules
+deleted file mode 100644
+index cc7f5ef..0000000
+--- a/udev-md-raid.rules
++++ /dev/null
+@@ -1,49 +0,0 @@
+-# do not edit this file, it will be overwritten on update
+-
+-SUBSYSTEM!="block", GOTO="md_end"
+-
+-# handle potential components of arrays (the ones supported by md)
+-ENV{ID_FS_TYPE}=="ddf_raid_member|isw_raid_member|linux_raid_member", GOTO="md_inc"
+-GOTO="md_inc_skip"
+-
+-LABEL="md_inc"
+-
+-# remember you can limit what gets auto/incrementally assembled by
+-# mdadm.conf(5)'s 'AUTO' and selectively whitelist using 'ARRAY'
+-ACTION=="add", RUN+="/sbin/mdadm --incremental $tempnode --offroot"
+-ACTION=="remove", ENV{ID_PATH}=="?*", RUN+="/sbin/mdadm -If $name --path $env{ID_PATH}"
+-ACTION=="remove", ENV{ID_PATH}!="?*", RUN+="/sbin/mdadm -If $name"
+-
+-LABEL="md_inc_skip"
+-
+-# handle md arrays
+-ACTION!="add|change", GOTO="md_end"
+-KERNEL!="md*", GOTO="md_end"
+-
+-# partitions have no md/{array_state,metadata_version}, but should not
+-# for that reason be ignored.
+-ENV{DEVTYPE}=="partition", GOTO="md_ignore_state"
+-
+-# container devices have a metadata version of e.g. 'external:ddf' and
+-# never leave state 'inactive'
+-ATTR{md/metadata_version}=="external:[A-Za-z]*", ATTR{md/array_state}=="inactive", GOTO="md_ignore_state"
+-TEST!="md/array_state", ENV{SYSTEMD_READY}="0", GOTO="md_end"
+-ATTR{md/array_state}=="|clear|inactive", ENV{SYSTEMD_READY}="0", GOTO="md_end"
+-LABEL="md_ignore_state"
+-
+-IMPORT{program}="/sbin/mdadm --detail --export $tempnode"
+-ENV{DEVTYPE}=="disk", ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}", OPTIONS+="string_escape=replace"
+-ENV{DEVTYPE}=="disk", ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}"
+-ENV{DEVTYPE}=="disk", ENV{MD_DEVNAME}=="?*", SYMLINK+="md/$env{MD_DEVNAME}"
+-ENV{DEVTYPE}=="partition", ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}-part%n", OPTIONS+="string_escape=replace"
+-ENV{DEVTYPE}=="partition", ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}-part%n"
+-ENV{DEVTYPE}=="partition", ENV{MD_DEVNAME}=="*[^0-9]", SYMLINK+="md/$env{MD_DEVNAME}%n"
+-ENV{DEVTYPE}=="partition", ENV{MD_DEVNAME}=="*[0-9]", SYMLINK+="md/$env{MD_DEVNAME}p%n"
+-
+-IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
+-OPTIONS+="link_priority=100"
+-OPTIONS+="watch"
+-ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
+-ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
+-
+-LABEL="md_end"
diff --git a/libre-testing/mdadm/mdadm.conf b/libre-testing/mdadm/mdadm.conf
new file mode 100644
index 000000000..36eaa0cc0
--- /dev/null
+++ b/libre-testing/mdadm/mdadm.conf
@@ -0,0 +1,67 @@
+# mdadm configuration file
+#
+# mdadm will function properly without the use of a configuration file,
+# but this file is useful for keeping track of arrays and member disks.
+# In general, a mdadm.conf file is created, and updated, after arrays
+# are created. This is the opposite behavior of /etc/raidtab which is
+# created prior to array construction.
+#
+#
+# the config file takes two types of lines:
+#
+# DEVICE lines specify a list of devices of where to look for
+# potential member disks
+#
+# ARRAY lines specify information about how to identify arrays so
+# so that they can be activated
+#
+
+
+# You can have more than one device line and use wild cards. The first
+# example includes SCSI the first partition of SCSI disks /dev/sdb,
+# /dev/sdc, /dev/sdd, /dev/sdj, /dev/sdk, and /dev/sdl. The second
+# line looks for array slices on IDE disks.
+#
+#DEVICE /dev/sd[bcdjkl]1
+#DEVICE /dev/hda1 /dev/hdb1
+#
+# The designation "partitions" will scan all partitions found in
+# /proc/partitions
+DEVICE partitions
+
+
+# ARRAY lines specify an array to assemble and a method of identification.
+# Arrays can currently be identified by using a UUID, superblock minor number,
+# or a listing of devices.
+#
+# super-minor is usually the minor number of the metadevice
+# UUID is the Universally Unique Identifier for the array
+# Each can be obtained using
+#
+# mdadm -D <md>
+#
+# To capture the UUIDs for all your RAID arrays to this file, run these:
+# to get a list of running arrays:
+# # mdadm -D --scan >>/etc/mdadm.conf
+# to get a list from superblocks:
+# # mdadm -E --scan >>/etc/mdadm.conf
+#
+#ARRAY /dev/md0 UUID=3aaa0122:29827cfa:5331ad66:ca767371
+#ARRAY /dev/md1 super-minor=1
+#ARRAY /dev/md2 devices=/dev/hda1,/dev/hdb1
+#
+# ARRAY lines can also specify a "spare-group" for each array. mdadm --monitor
+# will then move a spare between arrays in a spare-group if one array has a
+# failed drive but no spare
+#ARRAY /dev/md4 uuid=b23f3c6d:aec43a9f:fd65db85:369432df spare-group=group1
+#ARRAY /dev/md5 uuid=19464854:03f71b1b:e0df2edd:246cc977 spare-group=group1
+#
+
+
+# When used in --follow (aka --monitor) mode, mdadm needs a
+# mail address and/or a program. To start mdadm's monitor mode, enable
+# mdadm.service in systemd.
+#
+# If the lines are not found, mdadm will exit quietly
+#MAILADDR root@mydomain.tld
+#PROGRAM /usr/sbin/handle-mdadm-events
diff --git a/libre-testing/mdadm/mdadm_hook b/libre-testing/mdadm/mdadm_hook
new file mode 100755
index 000000000..5371baaca
--- /dev/null
+++ b/libre-testing/mdadm/mdadm_hook
@@ -0,0 +1,49 @@
+#!/usr/bin/ash
+
+run_hook() {
+ local i= mdconfig=/etc/mdadm.conf
+
+ # for partitionable raid, we need to load md_mod first!
+ modprobe md_mod 2>/dev/null
+
+ if [ -n "$md" ]; then
+ echo 'DEVICE partitions' >"$mdconfig"
+ for i in $(cat /proc/cmdline); do
+ case $i in
+ # raid
+ md=[0-9]*,/*)
+ device=${i%%,*}
+ device=${device/=/}
+ array=${i#*,}
+ echo "ARRAY /dev/$device devices=$array"
+ ;;
+ # partitionable raid
+ md=d[0-9]*,/*)
+ device=${i%%,*}
+ device=${device/=/_}
+ array=${i#*,}
+ echo "ARRAY /dev/$device devices=$array"
+ ;;
+ # raid UUID
+ md=[0-9]*,[0-9,a-fA-F]*)
+ device=${i%%,*}
+ device=${device/=/}
+ array=${i#*,}
+ echo "ARRAY /dev/$device UUID=$array"
+ ;;
+ # partitionable raid UUID
+ md=d[0-9]*,[0-9,a-fA-F]*)
+ device=${i%%,*}
+ device=${device/=/_}
+ array=${i#*,}
+ echo "ARRAY /dev/$device UUID=$array"
+ ;;
+ esac
+ done >>"$mdconfig"
+ fi
+
+ # assemble everything
+ [ -s "$mdconfig" ] && /usr/bin/mdassemble
+}
+
+# vim: set ft=sh ts=4 sw=4 et:
diff --git a/libre-testing/mdadm/mdadm_install b/libre-testing/mdadm/mdadm_install
new file mode 100644
index 000000000..7390509fa
--- /dev/null
+++ b/libre-testing/mdadm/mdadm_install
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+build() {
+ add_checked_modules -f 'dm-' 'drivers/md/*'
+
+ # check if a custom mdadm.conf exists
+ if grep -q ^ARRAY /etc/mdadm.conf; then
+ echo "Custom /etc/mdadm.conf file will be used in initramfs for assembling arrays."
+ add_file "/etc/mdadm.conf"
+ fi
+ add_binary "/usr/bin/mdassemble"
+ add_file "/usr/lib/udev/rules.d/63-md-raid-arrays.rules"
+
+ add_runscript
+}
+
+help() {
+ cat <<HELPEOF
+This hook loads the necessary modules for any raid root device,
+and assembles the raid device when run.
+
+If arrays are defined in /etc/mdadm.conf, the file will be used instead
+of command line assembling.
+
+Command Line Setup:
+- for raid arrays with persistent superblocks:
+ md=<md device no.>,dev0,dev1,...,devn
+ md=<md device no.>,uuid
+- for partitionable raid arrays with persistent superblocks:
+ md=d<md device no.>,dev0,dev1,...,devn
+ md=d<md device no.>,uuid
+
+Parameters:
+- <md device no.> = the number of the md device:
+ 0 means md0, 1 means md1, ...
+- <dev0-devn>: e.g. /dev/hda1,/dev/hdc1,/dev/sda1,/dev/sdb1
+ or 0900878d:f95f6057:c39a36e9:55efa60a
+Examples:
+- md=d0,/dev/sda3,/dev/sda4 md=d1,/dev/hda1,/dev/hdb1
+ This will setup 2 md partitionable arrays.
+- md=0,/dev/sda3,/dev/sda4 md=1,/dev/hda1,/dev/hdb1
+ This will setup 2 md arrays with persistent superblocks.
+HELPEOF
+}
+
+# vim: set ft=sh ts=4 sw=4 et:
diff --git a/libre-testing/mdadm/mdadm_udev_install b/libre-testing/mdadm/mdadm_udev_install
new file mode 100644
index 000000000..c01cbaf24
--- /dev/null
+++ b/libre-testing/mdadm/mdadm_udev_install
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+build() {
+ add_checked_modules -f 'dm-' 'drivers/md/*'
+
+ # check if a custom mdadm.conf exists
+ if grep -qw ^ARRAY "$BASEDIR/etc/mdadm.conf"; then
+ echo "Custom /etc/mdadm.conf file will be used in initramfs for assembling arrays."
+ add_file "/etc/mdadm.conf"
+ fi
+
+ add_binary "/usr/bin/mdadm"
+ add_file "/usr/lib/udev/rules.d/63-md-raid-arrays.rules"
+ add_file "/usr/lib/udev/rules.d/64-md-raid-assembly.rules"
+}
+
+help() {
+ cat <<HELPEOF
+This hook loads the necessary modules for a RAID array and uses incremental
+assembly via udev at runtime to create the devices. This hook will NOT work
+without the udev hook included on the image.
+HELPEOF
+}
+
+# vim: set ft=sh ts=4 sw=4 et:
diff --git a/libre-testing/mdadm/repos/core-x86_64/PKGBUILD b/libre-testing/mdadm/repos/core-x86_64/PKGBUILD
new file mode 100644
index 000000000..0ab2d627a
--- /dev/null
+++ b/libre-testing/mdadm/repos/core-x86_64/PKGBUILD
@@ -0,0 +1,53 @@
+# $Id$
+# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
+# Contributor: Judd Vinet <jvinet@zeroflux.org>
+pkgname=mdadm
+pkgver=4.0
+pkgrel=1
+pkgdesc="A tool for managing/monitoring Linux md device arrays, also known as Software RAID"
+arch=(i686 x86_64)
+license=('GPL')
+url="http://neil.brown.name/blog/mdadm"
+groups=('base')
+conflicts=('mkinitcpio<0.7')
+depends=('glibc')
+backup=('etc/mdadm.conf')
+source=("ftp://ftp.kernel.org/pub/linux/utils/raid/mdadm/mdadm-${pkgver}.tar."{xz,sign}
+ mdadm.conf
+ mdadm_install
+ mdadm_hook
+ mdadm_udev_install
+ disable-werror.patch)
+replaces=('raidtools')
+validpgpkeys=('6A86B80E1D22F21D0B26BA75397D82E0531A9C91') # Jes Sorensen
+md5sums=('2cb4feffea9167ba71b5f346a0c0a40d'
+ 'SKIP'
+ '5a37c112aa07dccdde62f9fa5b888607'
+ 'af2f73f0094ebee66f503ca4710c7142'
+ 'fbfb7d07efcbaf5dc61af424c5f6e352'
+ 'b6b0bfd6487c99264578630616dfe5eb'
+ '599745ed2bec4489e83991cff89c46ee')
+
+prepare() {
+ cd $srcdir/$pkgname-$pkgver
+ patch -Np0 -i ../disable-werror.patch
+}
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ make CXFLAGS="$CFLAGS" BINDIR=/usr/bin UDEVDIR=/usr/lib/udev
+ # build static mdassemble for Arch's initramfs
+ make MDASSEMBLE_AUTO=1 mdassemble
+
+}
+
+package() {
+ cd $srcdir/$pkgname-$pkgver
+ make INSTALL=/usr/bin/install BINDIR=/usr/bin DESTDIR=$pkgdir UDEVDIR=/usr/lib/udev install
+ make SYSTEMD_DIR=$pkgdir/usr/lib/systemd/system install-systemd
+ install -D -m755 mdassemble $pkgdir/usr/bin/mdassemble
+ install -D -m644 ../mdadm.conf $pkgdir/etc/mdadm.conf
+ install -D -m644 ../mdadm_install $pkgdir/usr/lib/initcpio/install/mdadm
+ install -D -m644 ../mdadm_hook $pkgdir/usr/lib/initcpio/hooks/mdadm
+ install -D -m644 ../mdadm_udev_install $pkgdir/usr/lib/initcpio/install/mdadm_udev
+}
diff --git a/libre-testing/mdadm/repos/core-x86_64/disable-werror.patch b/libre-testing/mdadm/repos/core-x86_64/disable-werror.patch
new file mode 100644
index 000000000..a80a41456
--- /dev/null
+++ b/libre-testing/mdadm/repos/core-x86_64/disable-werror.patch
@@ -0,0 +1,11 @@
+--- Makefile.old 2011-06-17 09:38:03.269238332 +0200
++++ Makefile 2011-06-17 09:38:14.122398837 +0200
+@@ -42,7 +42,7 @@
+
+ CC = $(CROSS_COMPILE)gcc
+ CXFLAGS ?= -ggdb
+-CWFLAGS = -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter
++CWFLAGS = -Wall -Wstrict-prototypes -Wextra -Wno-unused-parameter
+ ifdef WARN_UNUSED
+ CWFLAGS += -Wp,-D_FORTIFY_SOURCE=2 -O3
+ endif
diff --git a/libre-testing/mdadm/repos/core-x86_64/linux-3.0.patch b/libre-testing/mdadm/repos/core-x86_64/linux-3.0.patch
new file mode 100644
index 000000000..cd9d5473c
--- /dev/null
+++ b/libre-testing/mdadm/repos/core-x86_64/linux-3.0.patch
@@ -0,0 +1,45 @@
+From f161d047eed634b3380262767f955eb888502e88 Mon Sep 17 00:00:00 2001
+From: NeilBrown <neilb@suse.de>
+Date: Fri, 17 Jun 2011 22:49:24 +1000
+Subject: [PATCH 1/1] util: correctly parse shorter linux version numbers.
+
+The next version of Linux might be 3.0. If it is, get_linux_version
+will fail.
+So make it more robust.
+
+Reported-by: Namhyung Kim <namhyung@gmail.com>
+Reported-by: Milan Broz <mbroz@redhat.com>
+Signed-off-by: NeilBrown <neilb@suse.de>
+---
+ util.c | 10 +++++-----
+ 1 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/util.c b/util.c
+index 10bbe56..55d171a 100644
+--- a/util.c
++++ b/util.c
+@@ -146,16 +146,16 @@ int get_linux_version()
+ {
+ struct utsname name;
+ char *cp;
+- int a,b,c;
++ int a = 0, b = 0,c = 0;
+ if (uname(&name) <0)
+ return -1;
+
+ cp = name.release;
+ a = strtoul(cp, &cp, 10);
+- if (*cp != '.') return -1;
+- b = strtoul(cp+1, &cp, 10);
+- if (*cp != '.') return -1;
+- c = strtoul(cp+1, NULL, 10);
++ if (*cp == '.')
++ b = strtoul(cp+1, &cp, 10);
++ if (*cp == '.')
++ c = strtoul(cp+1, &cp, 10);
+
+ return (a*1000000)+(b*1000)+c;
+ }
+--
+1.7.2.3
+
diff --git a/libre-testing/mdadm/repos/core-x86_64/mdadm-fix-udev-rules.patch b/libre-testing/mdadm/repos/core-x86_64/mdadm-fix-udev-rules.patch
new file mode 100644
index 000000000..941cadf3a
--- /dev/null
+++ b/libre-testing/mdadm/repos/core-x86_64/mdadm-fix-udev-rules.patch
@@ -0,0 +1,137 @@
+diff --git a/Makefile b/Makefile
+index b6edb23..bedef96 100644
+--- a/Makefile
++++ b/Makefile
+@@ -253,8 +253,9 @@
+ $(INSTALL) -D -m 644 md.4 $(DESTDIR)$(MAN4DIR)/md.4
+ $(INSTALL) -D -m 644 mdadm.conf.5 $(DESTDIR)$(MAN5DIR)/mdadm.conf.5
+
+-install-udev: udev-md-raid.rules
+- $(INSTALL) -D -m 644 udev-md-raid.rules $(DESTDIR)/lib/udev/rules.d/64-md-raid.rules
++install-udev: udev-md-raid-arrays.rules udev-md-raid-assembly.rules
++ $(INSTALL) -D -m 644 udev-md-raid-arrays.rules $(DESTDIR)/usr/lib/udev/rules.d/63-md-raid-arrays.rules
++ $(INSTALL) -D -m 644 udev-md-raid-assembly.rules $(DESTDIR)/usr/lib/udev/rules.d/64-md-raid-assembly.rules
+
+ uninstall:
+ rm -f $(DESTDIR)$(MAN8DIR)/mdadm.8 $(DESTDIR)$(MAN8DIR)/mdmon.8 $(DESTDIR)$(MAN4DIR)/md.4 $(DESTDIR)$(MAN5DIR)/mdadm.conf.5 $(DESTDIR)$(BINDIR)/mdadm
+diff --git a/udev-md-raid-arrays.rules b/udev-md-raid-arrays.rules
+new file mode 100644
+index 0000000..883ee4d
+--- /dev/null
++++ b/udev-md-raid-arrays.rules
+@@ -0,0 +1,35 @@
++# do not edit this file, it will be overwritten on update
++
++SUBSYSTEM!="block", GOTO="md_end"
++
++# handle md arrays
++ACTION!="add|change", GOTO="md_end"
++KERNEL!="md*", GOTO="md_end"
++
++# partitions have no md/{array_state,metadata_version}, but should not
++# for that reason be ignored.
++ENV{DEVTYPE}=="partition", GOTO="md_ignore_state"
++
++# container devices have a metadata version of e.g. 'external:ddf' and
++# never leave state 'inactive'
++ATTR{md/metadata_version}=="external:[A-Za-z]*", ATTR{md/array_state}=="inactive", GOTO="md_ignore_state"
++TEST!="md/array_state", ENV{SYSTEMD_READY}="0", GOTO="md_end"
++ATTR{md/array_state}=="|clear|inactive", ENV{SYSTEMD_READY}="0", GOTO="md_end"
++LABEL="md_ignore_state"
++
++IMPORT{program}="/usr/bin/mdadm --detail --export $devnode"
++ENV{DEVTYPE}=="disk", ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}", OPTIONS+="string_escape=replace"
++ENV{DEVTYPE}=="disk", ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}"
++ENV{DEVTYPE}=="disk", ENV{MD_DEVNAME}=="?*", SYMLINK+="md/$env{MD_DEVNAME}"
++ENV{DEVTYPE}=="partition", ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}-part%n", OPTIONS+="string_escape=replace"
++ENV{DEVTYPE}=="partition", ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}-part%n"
++ENV{DEVTYPE}=="partition", ENV{MD_DEVNAME}=="*[^0-9]", SYMLINK+="md/$env{MD_DEVNAME}%n"
++ENV{DEVTYPE}=="partition", ENV{MD_DEVNAME}=="*[0-9]", SYMLINK+="md/$env{MD_DEVNAME}p%n"
++
++IMPORT{builtin}="blkid"
++OPTIONS+="link_priority=100"
++OPTIONS+="watch"
++ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
++ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
++
++LABEL="md_end"
+diff --git a/udev-md-raid-assembly.rules b/udev-md-raid-assembly.rules
+new file mode 100644
+index 0000000..b89775e
+--- /dev/null
++++ b/udev-md-raid-assembly.rules
+@@ -0,0 +1,19 @@
++# do not edit this file, it will be overwritten on update
++
++# assemble md arrays
++
++SUBSYSTEM!="block", GOTO="md_inc_end"
++
++# handle potential components of arrays (the ones supported by md)
++ENV{ID_FS_TYPE}=="ddf_raid_member|isw_raid_member|linux_raid_member", GOTO="md_inc"
++GOTO="md_inc_end"
++
++LABEL="md_inc"
++
++# remember you can limit what gets auto/incrementally assembled by
++# mdadm.conf(5)'s 'AUTO' and selectively whitelist using 'ARRAY'
++ACTION=="add", RUN+="/usr/bin/mdadm --incremental $devnode --offroot"
++ACTION=="remove", ENV{ID_PATH}=="?*", RUN+="/usr/bin/mdadm -If $name --path $env{ID_PATH}"
++ACTION=="remove", ENV{ID_PATH}!="?*", RUN+="/usr/bin/mdadm -If $name"
++
++LABEL="md_inc_end"
+diff --git a/udev-md-raid.rules b/udev-md-raid.rules
+deleted file mode 100644
+index cc7f5ef..0000000
+--- a/udev-md-raid.rules
++++ /dev/null
+@@ -1,49 +0,0 @@
+-# do not edit this file, it will be overwritten on update
+-
+-SUBSYSTEM!="block", GOTO="md_end"
+-
+-# handle potential components of arrays (the ones supported by md)
+-ENV{ID_FS_TYPE}=="ddf_raid_member|isw_raid_member|linux_raid_member", GOTO="md_inc"
+-GOTO="md_inc_skip"
+-
+-LABEL="md_inc"
+-
+-# remember you can limit what gets auto/incrementally assembled by
+-# mdadm.conf(5)'s 'AUTO' and selectively whitelist using 'ARRAY'
+-ACTION=="add", RUN+="/sbin/mdadm --incremental $tempnode --offroot"
+-ACTION=="remove", ENV{ID_PATH}=="?*", RUN+="/sbin/mdadm -If $name --path $env{ID_PATH}"
+-ACTION=="remove", ENV{ID_PATH}!="?*", RUN+="/sbin/mdadm -If $name"
+-
+-LABEL="md_inc_skip"
+-
+-# handle md arrays
+-ACTION!="add|change", GOTO="md_end"
+-KERNEL!="md*", GOTO="md_end"
+-
+-# partitions have no md/{array_state,metadata_version}, but should not
+-# for that reason be ignored.
+-ENV{DEVTYPE}=="partition", GOTO="md_ignore_state"
+-
+-# container devices have a metadata version of e.g. 'external:ddf' and
+-# never leave state 'inactive'
+-ATTR{md/metadata_version}=="external:[A-Za-z]*", ATTR{md/array_state}=="inactive", GOTO="md_ignore_state"
+-TEST!="md/array_state", ENV{SYSTEMD_READY}="0", GOTO="md_end"
+-ATTR{md/array_state}=="|clear|inactive", ENV{SYSTEMD_READY}="0", GOTO="md_end"
+-LABEL="md_ignore_state"
+-
+-IMPORT{program}="/sbin/mdadm --detail --export $tempnode"
+-ENV{DEVTYPE}=="disk", ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}", OPTIONS+="string_escape=replace"
+-ENV{DEVTYPE}=="disk", ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}"
+-ENV{DEVTYPE}=="disk", ENV{MD_DEVNAME}=="?*", SYMLINK+="md/$env{MD_DEVNAME}"
+-ENV{DEVTYPE}=="partition", ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}-part%n", OPTIONS+="string_escape=replace"
+-ENV{DEVTYPE}=="partition", ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}-part%n"
+-ENV{DEVTYPE}=="partition", ENV{MD_DEVNAME}=="*[^0-9]", SYMLINK+="md/$env{MD_DEVNAME}%n"
+-ENV{DEVTYPE}=="partition", ENV{MD_DEVNAME}=="*[0-9]", SYMLINK+="md/$env{MD_DEVNAME}p%n"
+-
+-IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
+-OPTIONS+="link_priority=100"
+-OPTIONS+="watch"
+-ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
+-ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
+-
+-LABEL="md_end"
diff --git a/libre-testing/mdadm/repos/core-x86_64/mdadm.conf b/libre-testing/mdadm/repos/core-x86_64/mdadm.conf
new file mode 100644
index 000000000..36eaa0cc0
--- /dev/null
+++ b/libre-testing/mdadm/repos/core-x86_64/mdadm.conf
@@ -0,0 +1,67 @@
+# mdadm configuration file
+#
+# mdadm will function properly without the use of a configuration file,
+# but this file is useful for keeping track of arrays and member disks.
+# In general, a mdadm.conf file is created, and updated, after arrays
+# are created. This is the opposite behavior of /etc/raidtab which is
+# created prior to array construction.
+#
+#
+# the config file takes two types of lines:
+#
+# DEVICE lines specify a list of devices of where to look for
+# potential member disks
+#
+# ARRAY lines specify information about how to identify arrays so
+# so that they can be activated
+#
+
+
+# You can have more than one device line and use wild cards. The first
+# example includes SCSI the first partition of SCSI disks /dev/sdb,
+# /dev/sdc, /dev/sdd, /dev/sdj, /dev/sdk, and /dev/sdl. The second
+# line looks for array slices on IDE disks.
+#
+#DEVICE /dev/sd[bcdjkl]1
+#DEVICE /dev/hda1 /dev/hdb1
+#
+# The designation "partitions" will scan all partitions found in
+# /proc/partitions
+DEVICE partitions
+
+
+# ARRAY lines specify an array to assemble and a method of identification.
+# Arrays can currently be identified by using a UUID, superblock minor number,
+# or a listing of devices.
+#
+# super-minor is usually the minor number of the metadevice
+# UUID is the Universally Unique Identifier for the array
+# Each can be obtained using
+#
+# mdadm -D <md>
+#
+# To capture the UUIDs for all your RAID arrays to this file, run these:
+# to get a list of running arrays:
+# # mdadm -D --scan >>/etc/mdadm.conf
+# to get a list from superblocks:
+# # mdadm -E --scan >>/etc/mdadm.conf
+#
+#ARRAY /dev/md0 UUID=3aaa0122:29827cfa:5331ad66:ca767371
+#ARRAY /dev/md1 super-minor=1
+#ARRAY /dev/md2 devices=/dev/hda1,/dev/hdb1
+#
+# ARRAY lines can also specify a "spare-group" for each array. mdadm --monitor
+# will then move a spare between arrays in a spare-group if one array has a
+# failed drive but no spare
+#ARRAY /dev/md4 uuid=b23f3c6d:aec43a9f:fd65db85:369432df spare-group=group1
+#ARRAY /dev/md5 uuid=19464854:03f71b1b:e0df2edd:246cc977 spare-group=group1
+#
+
+
+# When used in --follow (aka --monitor) mode, mdadm needs a
+# mail address and/or a program. To start mdadm's monitor mode, enable
+# mdadm.service in systemd.
+#
+# If the lines are not found, mdadm will exit quietly
+#MAILADDR root@mydomain.tld
+#PROGRAM /usr/sbin/handle-mdadm-events
diff --git a/libre-testing/mdadm/repos/core-x86_64/mdadm_hook b/libre-testing/mdadm/repos/core-x86_64/mdadm_hook
new file mode 100755
index 000000000..5371baaca
--- /dev/null
+++ b/libre-testing/mdadm/repos/core-x86_64/mdadm_hook
@@ -0,0 +1,49 @@
+#!/usr/bin/ash
+
+run_hook() {
+ local i= mdconfig=/etc/mdadm.conf
+
+ # for partitionable raid, we need to load md_mod first!
+ modprobe md_mod 2>/dev/null
+
+ if [ -n "$md" ]; then
+ echo 'DEVICE partitions' >"$mdconfig"
+ for i in $(cat /proc/cmdline); do
+ case $i in
+ # raid
+ md=[0-9]*,/*)
+ device=${i%%,*}
+ device=${device/=/}
+ array=${i#*,}
+ echo "ARRAY /dev/$device devices=$array"
+ ;;
+ # partitionable raid
+ md=d[0-9]*,/*)
+ device=${i%%,*}
+ device=${device/=/_}
+ array=${i#*,}
+ echo "ARRAY /dev/$device devices=$array"
+ ;;
+ # raid UUID
+ md=[0-9]*,[0-9,a-fA-F]*)
+ device=${i%%,*}
+ device=${device/=/}
+ array=${i#*,}
+ echo "ARRAY /dev/$device UUID=$array"
+ ;;
+ # partitionable raid UUID
+ md=d[0-9]*,[0-9,a-fA-F]*)
+ device=${i%%,*}
+ device=${device/=/_}
+ array=${i#*,}
+ echo "ARRAY /dev/$device UUID=$array"
+ ;;
+ esac
+ done >>"$mdconfig"
+ fi
+
+ # assemble everything
+ [ -s "$mdconfig" ] && /usr/bin/mdassemble
+}
+
+# vim: set ft=sh ts=4 sw=4 et:
diff --git a/libre-testing/mdadm/repos/core-x86_64/mdadm_install b/libre-testing/mdadm/repos/core-x86_64/mdadm_install
new file mode 100644
index 000000000..7390509fa
--- /dev/null
+++ b/libre-testing/mdadm/repos/core-x86_64/mdadm_install
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+build() {
+ add_checked_modules -f 'dm-' 'drivers/md/*'
+
+ # check if a custom mdadm.conf exists
+ if grep -q ^ARRAY /etc/mdadm.conf; then
+ echo "Custom /etc/mdadm.conf file will be used in initramfs for assembling arrays."
+ add_file "/etc/mdadm.conf"
+ fi
+ add_binary "/usr/bin/mdassemble"
+ add_file "/usr/lib/udev/rules.d/63-md-raid-arrays.rules"
+
+ add_runscript
+}
+
+help() {
+ cat <<HELPEOF
+This hook loads the necessary modules for any raid root device,
+and assembles the raid device when run.
+
+If arrays are defined in /etc/mdadm.conf, the file will be used instead
+of command line assembling.
+
+Command Line Setup:
+- for raid arrays with persistent superblocks:
+ md=<md device no.>,dev0,dev1,...,devn
+ md=<md device no.>,uuid
+- for partitionable raid arrays with persistent superblocks:
+ md=d<md device no.>,dev0,dev1,...,devn
+ md=d<md device no.>,uuid
+
+Parameters:
+- <md device no.> = the number of the md device:
+ 0 means md0, 1 means md1, ...
+- <dev0-devn>: e.g. /dev/hda1,/dev/hdc1,/dev/sda1,/dev/sdb1
+ or 0900878d:f95f6057:c39a36e9:55efa60a
+Examples:
+- md=d0,/dev/sda3,/dev/sda4 md=d1,/dev/hda1,/dev/hdb1
+ This will setup 2 md partitionable arrays.
+- md=0,/dev/sda3,/dev/sda4 md=1,/dev/hda1,/dev/hdb1
+ This will setup 2 md arrays with persistent superblocks.
+HELPEOF
+}
+
+# vim: set ft=sh ts=4 sw=4 et:
diff --git a/libre-testing/mdadm/repos/core-x86_64/mdadm_udev_install b/libre-testing/mdadm/repos/core-x86_64/mdadm_udev_install
new file mode 100644
index 000000000..c01cbaf24
--- /dev/null
+++ b/libre-testing/mdadm/repos/core-x86_64/mdadm_udev_install
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+build() {
+ add_checked_modules -f 'dm-' 'drivers/md/*'
+
+ # check if a custom mdadm.conf exists
+ if grep -qw ^ARRAY "$BASEDIR/etc/mdadm.conf"; then
+ echo "Custom /etc/mdadm.conf file will be used in initramfs for assembling arrays."
+ add_file "/etc/mdadm.conf"
+ fi
+
+ add_binary "/usr/bin/mdadm"
+ add_file "/usr/lib/udev/rules.d/63-md-raid-arrays.rules"
+ add_file "/usr/lib/udev/rules.d/64-md-raid-assembly.rules"
+}
+
+help() {
+ cat <<HELPEOF
+This hook loads the necessary modules for a RAID array and uses incremental
+assembly via udev at runtime to create the devices. This hook will NOT work
+without the udev hook included on the image.
+HELPEOF
+}
+
+# vim: set ft=sh ts=4 sw=4 et:
diff --git a/libre-testing/nano/PKGBUILD b/libre-testing/nano/PKGBUILD
new file mode 100644
index 000000000..de2bc4740
--- /dev/null
+++ b/libre-testing/nano/PKGBUILD
@@ -0,0 +1,37 @@
+# Maintainer: Andreas Radke <andyrtr@archlinux.org>
+# Contributor: Judd <judd@archlinux.org>
+
+pkgname=nano
+pkgver=3.1
+pkgrel=1
+pkgdesc="Pico editor clone with enhancements"
+arch=('x86_64' 'ppc64le')
+license=('GPL')
+url="http://www.nano-editor.org"
+groups=('base')
+depends=('ncurses' 'file' 'sh')
+backup=('etc/nanorc')
+source=(https://www.nano-editor.org/dist/v3/${pkgname}-${pkgver}.tar.xz{,.asc})
+sha256sums=('14c02ca40a5bc61c580ce2f9cb7f9fc72d5ccc9da17ad044f78f6fb3fdb7719e'
+ 'SKIP')
+validpgpkeys=('8DA6FE7BFA7A418AB3CB2354BCB356DF91009FA7' # "Chris Allegretta <chrisa@asty.org>"
+ 'A7F6A64A67DA09EF92782DD79DF4862AF1175C5B' # "Benno Schulenberg <bensberg@justemail.net>"
+ 'BFD009061E535052AD0DF2150D28D4D2A0ACE884' # "Benno Schulenberg <bensberg@telfort.nl>"
+)
+
+build() {
+ cd ${pkgname}-${pkgver}
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --enable-color \
+ --enable-nanorc \
+ --enable-multibuffer \
+ --disable-wrapping-as-root
+ make
+}
+
+package() {
+ cd ${pkgname}-${pkgver}
+ make DESTDIR=${pkgdir} install
+ install -DTm644 ${srcdir}/${pkgname}-${pkgver}/doc/sample.nanorc ${pkgdir}/etc/nanorc
+}
diff --git a/libre-testing/pciutils/PKGBUILD b/libre-testing/pciutils/PKGBUILD
new file mode 100644
index 000000000..79b3e7713
--- /dev/null
+++ b/libre-testing/pciutils/PKGBUILD
@@ -0,0 +1,34 @@
+# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
+pkgname=pciutils
+pkgver=3.6.1
+pkgrel=1
+pkgdesc="PCI bus configuration space access library and tools"
+arch=(x86_64 ppc64le)
+license=('GPL2')
+groups=('base')
+url="http://mj.ucw.cz/sw/pciutils/"
+depends=('glibc' 'hwids' 'kmod')
+source=(#ftp://ftp.kernel.org/pub/software/utils/${pkgname}/${pkgname}-${pkgver}.tar.bz2
+ ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/${pkgname}-${pkgver}.tar.gz
+ ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/${pkgname}-${pkgver}.tar.gz.sign)
+validpgpkeys=(
+ '5558F9399CD7836850553C6EC28E7847ED70F82D' # Martin Mares <mj@ucw.cz>
+ )
+
+md5sums=('d72855146e2a778ecfe4b482faa122a4'
+ 'SKIP')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make OPT="${CFLAGS} -fPIC -DPIC" ZLIB=no SHARED=no PREFIX=/usr SHAREDIR=/usr/share/hwdata MANDIR=/usr/share/man SBINDIR=/usr/bin lib/libpci.a
+ cp lib/libpci.a "${srcdir}/"
+ make clean
+ make OPT="${CFLAGS}" ZLIB=no SHARED=yes PREFIX=/usr SBINDIR=/usr/bin SHAREDIR=/usr/share/hwdata MANDIR=/usr/share/man all
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make SHARED=yes PREFIX=/usr SBINDIR=/usr/bin SHAREDIR=/usr/share/hwdata MANDIR=/usr/share/man DESTDIR="${pkgdir}" install install-lib
+ # this is now supplied by the hwids package
+ rm -rf $pkgdir/usr/{sbin/update-pciids,share/{man/man8/update-pciids.8,hwdata}}
+}
diff --git a/libre-testing/perl/CVE-2016-2381_duplicate_env.diff b/libre-testing/perl/CVE-2016-2381_duplicate_env.diff
new file mode 100644
index 000000000..80adf62d2
--- /dev/null
+++ b/libre-testing/perl/CVE-2016-2381_duplicate_env.diff
@@ -0,0 +1,104 @@
+From 83e7ebed7afa79a2f50eca6b6330eae7c3a02d36 Mon Sep 17 00:00:00 2001
+From: Tony Cook <tony@develop-help.com>
+Date: Wed, 27 Jan 2016 11:52:15 +1100
+Subject: remove duplicate environment variables from environ
+
+If we see duplicate environment variables while iterating over
+environ[]:
+
+a) make sure we use the same value in %ENV that getenv() returns.
+
+Previously on a duplicate, %ENV would have the last entry for the name
+from environ[], but a typical getenv() would return the first entry.
+
+Rather than assuming all getenv() implementations return the first entry
+explicitly call getenv() to ensure they agree.
+
+b) remove duplicate entries from environ
+
+Previously if there was a duplicate definition for a name in environ[]
+setting that name in %ENV could result in an unsafe value being passed
+to a child process, so ensure environ[] has no duplicates.
+
+Patch-Name: fixes/CVE-2016-2381_duplicate_env.diff
+---
+ perl.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++--
+ 1 file changed, 49 insertions(+), 2 deletions(-)
+
+diff --git a/perl.c b/perl.c
+index 80a76c2..ed25429 100644
+--- a/perl.c
++++ b/perl.c
+@@ -4303,23 +4303,70 @@ S_init_postdump_symbols(pTHX_ int argc, char **argv, char **env)
+ }
+ if (env) {
+ char *s, *old_var;
++ STRLEN nlen;
+ SV *sv;
++ HV *dups = newHV();
++
+ for (; *env; env++) {
+ old_var = *env;
+
+ if (!(s = strchr(old_var,'=')) || s == old_var)
+ continue;
++ nlen = s - old_var;
+
+ #if defined(MSDOS) && !defined(DJGPP)
+ *s = '\0';
+ (void)strupr(old_var);
+ *s = '=';
+ #endif
+- sv = newSVpv(s+1, 0);
+- (void)hv_store(hv, old_var, s - old_var, sv, 0);
++ if (hv_exists(hv, old_var, nlen)) {
++ const char *name = savepvn(old_var, nlen);
++
++ /* make sure we use the same value as getenv(), otherwise code that
++ uses getenv() (like setlocale()) might see a different value to %ENV
++ */
++ sv = newSVpv(PerlEnv_getenv(name), 0);
++
++ /* keep a count of the dups of this name so we can de-dup environ later */
++ if (hv_exists(dups, name, nlen))
++ ++SvIVX(*hv_fetch(dups, name, nlen, 0));
++ else
++ (void)hv_store(dups, name, nlen, newSViv(1), 0);
++
++ Safefree(name);
++ }
++ else {
++ sv = newSVpv(s+1, 0);
++ }
++ (void)hv_store(hv, old_var, nlen, sv, 0);
+ if (env_is_not_environ)
+ mg_set(sv);
+ }
++ if (HvKEYS(dups)) {
++ /* environ has some duplicate definitions, remove them */
++ HE *entry;
++ hv_iterinit(dups);
++ while ((entry = hv_iternext_flags(dups, 0))) {
++ STRLEN nlen;
++ const char *name = HePV(entry, nlen);
++ IV count = SvIV(HeVAL(entry));
++ IV i;
++ SV **valp = hv_fetch(hv, name, nlen, 0);
++
++ assert(valp);
++
++ /* try to remove any duplicate names, depending on the
++ * implementation used in my_setenv() the iteration might
++ * not be necessary, but let's be safe.
++ */
++ for (i = 0; i < count; ++i)
++ my_setenv(name, 0);
++
++ /* and set it back to the value we set $ENV{name} to */
++ my_setenv(name, SvPV_nolen(*valp));
++ }
++ }
++ SvREFCNT_dec_NN(dups);
+ }
+ #endif /* USE_ENVIRON_ARRAY */
+ #endif /* !PERL_MICRO */
diff --git a/libre-testing/perl/PKGBUILD b/libre-testing/perl/PKGBUILD
new file mode 100644
index 000000000..834f422d9
--- /dev/null
+++ b/libre-testing/perl/PKGBUILD
@@ -0,0 +1,234 @@
+# Maintainer: Florian Pritz <bluewind@xinu.at>
+# Contributor: Angel Velasquez <angvp@archlinux.org>
+# Contributor: kevin <kevin.archlinux.org>
+# Contributor: judd <jvinet.zeroflux.org>
+# Contributor: francois <francois.archlinux.org>
+
+pkgname=perl
+pkgver=5.28.0
+_baseversion="${pkgver%.*}"
+pkgrel=1
+pkgdesc="A highly capable, feature-rich programming language"
+arch=(x86_64 ppc64le)
+license=('GPL' 'PerlArtistic')
+url="http://www.perl.org"
+groups=('base')
+depends=('gdbm' 'db' 'glibc')
+# NOTE: This array is automatically generated by `./patchprov`.
+# If you want to add entries, do so in the next array.
+provides=('perl-archive-tar=2.30'
+ 'perl-attribute-handlers=1.01'
+ 'perl-autodie=2.29'
+ 'perl-autoloader=5.74'
+ 'perl-autouse=1.11'
+ 'perl-b-debug=1.26'
+ 'perl-base=2.27'
+ 'perl-bignum=0.49'
+ 'perl-carp=1.50'
+ 'perl-compress-raw-bzip2=2.074'
+ 'perl-compress-raw-zlib=2.076'
+ 'perl-config-perl-v=0.29'
+ 'perl-constant=1.33'
+ 'perl-cpan-meta-requirements=2.140'
+ 'perl-cpan-meta-yaml=0.018'
+ 'perl-cpan-meta=2.150010'
+ 'perl-cpan=2.20'
+ 'perl-data-dumper=2.170'
+ 'perl-db_file=1.840'
+ 'perl-devel-ppport=3.40'
+ 'perl-devel-selfstubber=1.06'
+ 'perl-digest-md5=2.55'
+ 'perl-digest-sha=6.01'
+ 'perl-digest=1.17_01'
+ 'perl-dumpvalue=1.18'
+ 'perl-encode=2.97'
+ 'perl-encoding-warnings=0.13'
+ 'perl-env=1.04'
+ 'perl-experimental=0.019'
+ 'perl-exporter=5.73'
+ 'perl-extutils-cbuilder=0.280230'
+ 'perl-extutils-constant=0.25'
+ 'perl-extutils-install=2.14'
+ 'perl-extutils-makemaker=7.34'
+ 'perl-extutils-manifest=1.70'
+ 'perl-extutils-parsexs=3.39'
+ 'perl-file-fetch=0.56'
+ 'perl-file-path=2.15'
+ 'perl-file-temp=0.2304'
+ 'perl-filter-simple=0.95'
+ 'perl-filter-util-call=1.58'
+ 'perl-getopt-long=2.5'
+ 'perl-http-tiny=0.070'
+ 'perl-i18n-collate=1.02'
+ 'perl-i18n-langtags=0.43'
+ 'perl-if=0.0608'
+ 'perl-io-compress=2.074'
+ 'perl-io-socket-ip=0.39'
+ 'perl-io-zlib=1.10'
+ 'perl-io=1.39'
+ 'perl-ipc-cmd=1.00'
+ 'perl-ipc-sysv=2.07'
+ 'perl-json-pp=2.97001'
+ 'perl-lib=0.64'
+ 'perl-libnet=3.11'
+ 'perl-locale-codes=3.56'
+ 'perl-locale-maketext-simple=0.21_01'
+ 'perl-locale-maketext=1.29'
+ 'perl-math-bigint-fastcalc=0.5006'
+ 'perl-math-bigint=1.999811'
+ 'perl-math-bigrat=0.2613'
+ 'perl-math-complex=1.5901'
+ 'perl-memoize=1.03_01'
+ 'perl-mime-base64=3.15'
+ 'perl-module-corelist=5.20180622'
+ 'perl-module-load-conditional=0.68'
+ 'perl-module-load=0.32'
+ 'perl-module-loaded=0.08'
+ 'perl-module-metadata=1.000033'
+ 'perl-net-ping=2.62'
+ 'perl-params-check=0.38'
+ 'perl-parent=0.236'
+ 'perl-pathtools=3.74'
+ 'perl-perl-ostype=1.010'
+ 'perl-perlfaq=5.021011'
+ 'perl-perlio-via-quotedprint=0.08'
+ 'perl-pod-checker=1.73'
+ 'perl-pod-escapes=1.07'
+ 'perl-pod-parser=1.63'
+ 'perl-pod-perldoc=3.2801'
+ 'perl-pod-simple=3.35'
+ 'perl-pod-usage=1.69'
+ 'perl-podlators=5.006'
+ 'perl-safe=2.40'
+ 'perl-scalar-list-utils=1.50'
+ 'perl-search-dict=1.07'
+ 'perl-selfloader=1.25'
+ 'perl-socket=2.027'
+ 'perl-storable=3.08'
+ 'perl-sys-syslog=0.35'
+ 'perl-term-ansicolor=4.06'
+ 'perl-term-cap=1.17'
+ 'perl-term-complete=1.403'
+ 'perl-term-readline=1.17'
+ 'perl-test-harness=3.42'
+ 'perl-test-simple=1.302133'
+ 'perl-test=1.31'
+ 'perl-text-abbrev=1.02'
+ 'perl-text-balanced=2.03'
+ 'perl-text-parsewords=3.30'
+ 'perl-text-tabs=2013.0523'
+ 'perl-thread-queue=3.12'
+ 'perl-thread-semaphore=2.13'
+ 'perl-threads-shared=1.58'
+ 'perl-threads=2.22'
+ 'perl-tie-file=1.02'
+ 'perl-tie-refhash=1.39'
+ 'perl-time-hires=1.9759'
+ 'perl-time-local=1.25'
+ 'perl-time-piece=1.3204'
+ 'perl-unicode-collate=1.25'
+ 'perl-unicode-normalize=1.26'
+ 'perl-version=0.9923'
+ 'perl-xsloader=0.30')
+# Add your own provides here
+provides=(${provides[@]})
+source=(https://www.cpan.org/src/5.0/perl-${pkgver}.tar.xz
+ perlbin.sh
+ perlbin.csh
+ perlbin.fish
+ detect-old-perl-modules.sh
+ detect-old-perl-modules.hook)
+options=('makeflags' '!purge' 'emptydirs')
+sha512sums=('de701e37371b81cecf06098bb2c09017bde9cebaf9537d58838d0adf605ac2ecf739897b0a73576a7adb74d4cf65591ec4d2ed1f94b7191e695f88cb7e214a39'
+ '46724344828e7f86e016f9c8d588bf52b2e764e65e0acc1a38899a530c99bc6e4fd8b46fa0d4bbd685aa2074dd5bcbf9029ac3bb3f2d0ee9adfc4f6c0745f373'
+ 'fc1344a02c741d61af6f6b5967f29cc6f43c2059761522b150261924dd7e1989da5254c03ffa0627accd9af01bc152edd24e84a6b59579acb9ee1900b6ce9383'
+ '881e2efe05ba818cd7300f126800b56bb0685cb5c9c5fb7e67ef6aaf5abd17d2391a979d5d16d109c5111f4b35504ba83d19b0e6eda4431e8421fcbea19d2f1a'
+ 'bd48af7a6209f2ad51aa1747a7238ecb11607a53f61460d873202bf14b55c3b7dd6f66f4a9f2cac8a24240313789a9a44dbc81b73587de46a6b1866bdfca5e26'
+ '6b5b2ba606d443da22c6c1a754829abd36f3fdfef1089bcf06c8f9db0217f2c2f02ebc14958ffa7afe618c9a80bd1025e76704f67466c0c3db7d40ef2c0e56b3')
+# https://www.cpan.org/src/5.0/perl-$pkgver.tar.xz.sha256.txt
+
+prepare() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+
+ # test broken with gdbm 1.15. See: https://rt.perl.org/Public/Bug/Display.html?id=133295
+ sed -i 's|BEGIN {|BEGIN { plan(skip_all => "fatal test unsupported with gdbm 1.15");|' ext/GDBM_File/t/fatal.t
+
+}
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+
+ if [ "${CARCH}" = "x86_64" ]; then
+ # for x86_64
+ arch_opts="-Dcccdlflags='-fPIC'"
+ else
+ # for i686
+ arch_opts=""
+ fi
+
+ ./Configure -des -Dusethreads -Duseshrplib -Doptimize="${CFLAGS}" \
+ -Dprefix=/usr -Dvendorprefix=/usr \
+ -Dprivlib=/usr/share/perl5/core_perl \
+ -Darchlib=/usr/lib/perl5/$_baseversion/core_perl \
+ -Dsitelib=/usr/share/perl5/site_perl \
+ -Dsitearch=/usr/lib/perl5/$_baseversion/site_perl \
+ -Dvendorlib=/usr/share/perl5/vendor_perl \
+ -Dvendorarch=/usr/lib/perl5/$_baseversion/vendor_perl \
+ -Dscriptdir=/usr/bin/core_perl \
+ -Dsitescript=/usr/bin/site_perl \
+ -Dvendorscript=/usr/bin/vendor_perl \
+ -Dinc_version_list=none \
+ -Dman1ext=1perl -Dman3ext=3perl ${arch_opts} \
+ -Dlddlflags="-shared ${LDFLAGS}" -Dldflags="${LDFLAGS}"
+ make
+}
+
+check() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ TEST_JOBS=$(echo $MAKEFLAGS | sed 's/.*-j\([0-9][0-9]*\).*/\1/') make test_harness
+# make test
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make DESTDIR="$pkgdir" install
+
+ ### Perl Settings ###
+ # Change man page extensions for site and vendor module builds.
+ # Set no mail address since bug reports should go to the bug tracker
+ # and not someone's email.
+ sed -e '/^man1ext=/ s/1perl/1p/' -e '/^man3ext=/ s/3perl/3pm/' \
+ -e "/^cf_email=/ s/'.*'/''/" \
+ -e "/^perladmin=/ s/'.*'/''/" \
+ -i ${pkgdir}/usr/lib/perl5/$_baseversion/core_perl/Config_heavy.pl
+
+ ### CPAN Settings ###
+ # Set CPAN default config to use the site directories.
+ sed -e '/(makepl_arg =>/ s/""/"INSTALLDIRS=site"/' \
+ -e '/(mbuildpl_arg =>/ s/""/"installdirs=site"/' \
+ -i ${pkgdir}/usr/share/perl5/core_perl/CPAN/FirstTime.pm
+
+ # Profile script to set paths to perl scripts.
+ install -D -m644 ${srcdir}/perlbin.sh \
+ ${pkgdir}/etc/profile.d/perlbin.sh
+ # Profile script to set paths to perl scripts on csh. (FS#22441)
+ install -D -m644 ${srcdir}/perlbin.csh \
+ ${pkgdir}/etc/profile.d/perlbin.csh
+ # Profile script to set paths to perl scripts on fish. (FS#51191)
+ install -D -m 755 "$srcdir/perlbin.fish" \
+ "$pkgdir/usr/share/fish/vendor_conf.d/perlbin.fish"
+
+ # Add the dirs so new installs will already have them in PATH once they
+ # install their first perl programm
+ install -d -m755 "$pkgdir/usr/bin/vendor_perl"
+ install -d -m755 "$pkgdir/usr/bin/site_perl"
+
+ #(cd ${pkgdir}/usr/bin; mv perl${pkgver} perl)
+ rm "$pkgdir/usr/bin/perl$pkgver"
+
+ install -D -m755 -t "$pkgdir/usr/share/libalpm/scripts" "$srcdir/detect-old-perl-modules.sh"
+ install -D -m644 -t "$pkgdir/usr/share/libalpm/hooks" "$srcdir/detect-old-perl-modules.hook"
+
+ find $pkgdir -name perllocal.pod -delete
+ find $pkgdir -name .packlist -delete
+}
diff --git a/libre-testing/perl/detect-old-perl-modules.hook b/libre-testing/perl/detect-old-perl-modules.hook
new file mode 100644
index 000000000..5ff80d1b4
--- /dev/null
+++ b/libre-testing/perl/detect-old-perl-modules.hook
@@ -0,0 +1,10 @@
+[Trigger]
+Operation = Install
+Operation = Upgrade
+Type = File
+Target = usr/lib/perl5/*/
+
+[Action]
+Description = Warn about old perl modules
+When = PostTransaction
+Exec = /usr/share/libalpm/scripts/detect-old-perl-modules.sh
diff --git a/libre-testing/perl/detect-old-perl-modules.sh b/libre-testing/perl/detect-old-perl-modules.sh
new file mode 100644
index 000000000..cdc8df3a5
--- /dev/null
+++ b/libre-testing/perl/detect-old-perl-modules.sh
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+basedir=/usr/lib/perl5
+perlver=$(perl -e '$v = $^V->{version}; print $v->[0].".".($v->[1]);')
+
+dir_empty() {
+ local dir=$1
+ [[ $(find $dir -maxdepth 0 -empty -exec echo empty \;) = "empty" ]] && return 0 || return 1
+}
+
+print_unowned_files() {
+ local dir=$1
+ LC_ALL=C find "$dir" -type f -exec pacman -Qqo {} + |& sed -n 's/^error: No package owns \(.*\)$/\1/p'
+}
+
+for dir in "$basedir/"*; do
+ if [[ "${dir##*/}" != "$perlver" ]]; then
+ if [[ -d "$dir" ]] && ! dir_empty "$dir"; then
+ pkgcount=$(pacman -Qqo "$dir" | wc -l)
+ if ((pkgcount > 0)); then
+ printf "WARNING: '%s' contains data from at least %d packages which will NOT be used by the installed perl interpreter.\n" "$dir" "$pkgcount"
+ printf " -> Run the following command to get a list of affected packages: pacman -Qqo '%s'\n" "$dir"
+ fi
+
+ unowned_count=$(print_unowned_files "$dir" | wc -l)
+ if ((unowned_count > 0)); then
+ printf "WARNING: %d file(s) in %s are not tracked by pacman and need to be rebuilt.\n" "$unowned_count" "$dir"
+ printf " -> These were most likely installed directly by cpan or a similar tool.\n"
+ printf " Run the following command to get a list of these files:\n"
+ printf " LC_ALL=C find \"%s\" -type f -exec pacman -Qqo {} + |& sed -n 's/^error: No package owns \(.*\)$/\\\1/p'\n" "$dir"
+ fi
+ fi
+ fi
+done
+
+
diff --git a/libre-testing/perl/generate-rebuild-list.sh b/libre-testing/perl/generate-rebuild-list.sh
new file mode 100755
index 000000000..0ea6a93f2
--- /dev/null
+++ b/libre-testing/perl/generate-rebuild-list.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+echo "vim"
+
+pkgfile -rd "^/usr/lib/perl5/" | sed 's#^.*/##' | sort -u
+
+pkgfile -r "^/usr/lib/perl5/vendor_perl/auto/.*\.so$" | sed 's#^.*/##' | sort -u
+ssh soyuz.archlinux.org PATH=/usr/local/bin:\$PATH\; /home/bluewind/bin/sogrep-all libperl.so
+
+# this one is optional
+#pkgfile -r '^/usr/share/perl5/' | sed 's#^.*/##' | sort -u
diff --git a/libre-testing/perl/patchprov b/libre-testing/perl/patchprov
new file mode 100755
index 000000000..183feb3ca
--- /dev/null
+++ b/libre-testing/perl/patchprov
@@ -0,0 +1,260 @@
+#!/usr/bin/perl
+##
+## Name:
+## patchprov
+##
+## Description:
+## Patch the provides list in the perl package PKGBUILD. Scan the appropriate
+## directories under the perl source tree for directories containing dists
+## similar to CPAN dists. Search the files in the distributions for VERSION
+## strings, which are perl expressions. Filters these version strings through
+## the perl interpreter, then transform the dist. names and versions into
+## package names and versions. Finally, we cut out the "provides" array from the
+## PKGBUILD and replace it with the newer version.
+##
+## Usage:
+## patchprov [path to perl source tree] [path to PKGBUILD]
+##
+## Caveats:
+## The path code is not platform independent and will only work in POSIX.
+##
+## Changelog:
+## 06/10/14 JD Rewrite from scratch for perl 5.20.0 and ArchLinux.
+##
+## Authors:
+## Justin "juster" Davis <jrcd83@gmail.com>
+##
+
+use warnings;
+use strict;
+
+sub err
+{
+ print STDERR "patchprov: error: @_\n";
+ exit 1;
+}
+
+## Extract the dist. name from its containing directory.
+sub path_dist
+{
+ my($path) = @_;
+ $path =~ s{^.*/}{};
+ return $path;
+}
+
+## Create a path like $path/lib/Foo/Bar.pm for Foo::Bar.
+sub lib_modpath
+{
+ my($path, $modname) = @_;
+ $modname =~ s{::}{/}g;
+ return "$path/lib/$modname.pm";
+}
+
+## Create a path to a file in the containing directory, named after
+## the last segment of the module name, with suffix attached.
+sub dumb_modpath
+{
+ my($path, $modname, $suffix) = @_;
+ $modname =~ s{^.*::}{};
+ return "$path/$modname$suffix";
+}
+
+## Find a source file contained in the directory that we can scrape the
+## perl versions string from.
+my %distmods = (
+ 'PathTools' => 'Cwd',
+ 'Scalar-List-Utils' => 'List::Util',
+ 'IO-Compress' => 'IO::Compress::Gzip',
+);
+sub dist_srcpath
+{
+ my($path) = @_;
+ my $distname = path_dist($path);
+ my $modname;
+ if(exists $distmods{$distname}){
+ $modname = $distmods{$distname};
+ }else{
+ $modname = $distname;
+ $modname =~ s/-/::/g;
+ }
+ my @srcpaths = (
+ lib_modpath($path, $modname),
+ dumb_modpath($path, $modname, '.pm'),
+ dumb_modpath($path, $modname, '_pm.PL'),
+ dumb_modpath($path, '__'.$modname.'__', '.pm'),
+ "$path/VERSION", # for podlators
+ );
+ for my $src (@srcpaths){
+ return $src if(-f $src);
+ }
+ return undef;
+}
+
+## Scrape the version string for the module file or Makefile.PL.
+sub scrape_verln
+{
+ my($srcpath) = @_;
+ open my $fh, '<', $srcpath or die "open: $!";
+ while(my $ln = <$fh>){
+ if($ln =~ s/^.*VERSION *=>? *//){
+ close $fh;
+ return $ln;
+ }
+ }
+ close $fh;
+ err("failed to find VERSION in $srcpath");
+}
+
+## Scrape the version string from the module source file.
+sub scrape_modver
+{
+ my($srcpath) = @_;
+ return scrape_verln($srcpath);
+}
+
+## Scrape the version string from the Makefile.PL. (for libnet)
+sub scrape_mkplver
+{
+ my($srcpath) = @_;
+ my $verln = scrape_verln($srcpath);
+ $verln =~ s/,/;/;
+ return $verln;
+}
+
+## Scrape the version string from a file inside the dist dir.
+sub distpath_ver
+{
+ my($distpath) = @_;
+ my $srcpath = dist_srcpath($distpath);
+ my $mkplpath = "$distpath/Makefile.PL";
+ if(defined $srcpath){
+ return scrape_modver($srcpath);
+ }elsif(-f $mkplpath){
+ return scrape_mkplver($mkplpath);
+ }else{
+ err("failed to scrape version from $distpath");
+ }
+}
+
+## Search the base path for the dist dirs and extract their respective
+## version strings.
+sub find_distvers
+{
+ my($basepath) = @_;
+ opendir my $dh, $basepath or die "opendir: $!";
+ my @dirs = grep { -d $_ } map { "$basepath/$_" } grep { !/^[.]/ } readdir $dh;
+ closedir $dh;
+
+ my @distvers;
+ for my $dpath (@dirs){
+ push @distvers, [ path_dist($dpath), distpath_ver($dpath) ];
+ }
+ return @distvers;
+}
+
+## Maps an aref of dist name/perl version strings (perl expressions) to
+## a package name and version string suitable for a PKGBUILD.
+sub pkgspec
+{
+ my($dist, $ver) = @$_;
+ $dist =~ tr/A-Z/a-z/;
+ $ver = eval $ver;
+ return "perl-$dist=$ver";
+}
+
+## Searches the perl source dir provided for a list of packages which
+## correspond to the core distributions bundled within in.
+sub perlcorepkgs
+{
+ my($perlpath) = @_;
+ my @dirs = ("$perlpath/cpan", "$perlpath/dist");
+ my @provs;
+ for my $d (@dirs){
+ if(!-d $d){
+ err("$d is not a valid directory");
+ }
+ push @provs, map pkgspec, find_distvers($d);
+ }
+ return @provs;
+}
+
+## Formats the provided lines into a neatly formatted bash array. The first arg
+## is the name of the bash variable to assign it to.
+sub basharray
+{
+ my $vname = shift;
+
+ ## Sort entries and surround with quotes.
+ my @lns = sort map { qq{'$_'} } @_;
+ $lns[0] = "$vname=($lns[0]";
+
+ ## Indent lines for OCD geeks.
+ if(@lns > 1){
+ my $ind = length($vname) + 2;
+ splice @lns, 1, @lns-1,
+ map { (' ' x $ind) . $_ } @lns[1 .. $#lns];
+ }
+
+ $lns[$#lns] .= ')';
+ return map { "$_\n" } @lns;
+}
+
+## Patch the PKGBUILD at the given path with a new provides array, overwriting
+## the old one.
+sub patchpb
+{
+ my $pbpath = shift;
+ open my $fh, '<', $pbpath or die "open: $!";
+ my @lines = <$fh>;
+ close $fh;
+
+ my($i, $j);
+ for($i = 0; $i < @lines; $i++){
+ last if($lines[$i] =~ /^provides=/);
+ }
+ if($i == @lines){
+ err("failed to find provides array in PKGBUILD");
+ }
+ for($j = $i; $j < @lines; $j++){
+ last if($lines[$j] =~ /[)]/);
+ }
+ if($j == @lines){
+ err("failed to find end of provides array");
+ }
+
+ splice @lines, $i, $j-$i+1,
+ basharray('provides', grep { !/win32|next/ } @_);
+
+ ## Avoid corrupting the existing PKGBUILD in case of a crash, etc.
+ if(-f "$pbpath.$$"){
+ err("pbpath.$$ temporary file already exists, please remove it.");
+ }
+ open $fh, '>', "$pbpath.$$" or die "open: $!";
+ print $fh @lines;
+ close $fh or die "close: $!";
+ rename "$pbpath.$$", "$pbpath" or die "rename: $!";
+
+ return;
+}
+
+## Program entrypoint.
+sub main
+{
+ if(@_ < 2){
+ print STDERR "usage: $0 [perl source path] [PKGBUILD path]\n";
+ exit 2;
+ }
+ my($perlpath, $pbpath) = @_;
+ if(!-f $pbpath){
+ err("$pbpath is not a valid file.");
+ }elsif(!-d $perlpath){
+ err("$perlpath is not a valid directory.");
+ }else{
+ patchpb($pbpath, perlcorepkgs($perlpath));
+ }
+ exit 0;
+}
+
+main(@ARGV);
+
+# EOF
diff --git a/libre-testing/perl/perlbin.csh b/libre-testing/perl/perlbin.csh
new file mode 100644
index 000000000..fccecbdf5
--- /dev/null
+++ b/libre-testing/perl/perlbin.csh
@@ -0,0 +1,15 @@
+# Set path to perl scriptdirs if they exist
+# https://wiki.archlinux.org/index.php/Perl_Policy#Binaries_and_scripts
+# Added /usr/bin/*_perl dirs for scripts
+# Remove /usr/lib/perl5/*_perl/bin in next release
+
+[ -d /usr/bin/site_perl ] && setenv PATH ${PATH}:/usr/bin/site_perl
+[ -d /usr/lib/perl5/site_perl/bin ] && setenv PATH ${PATH}:/usr/lib/perl5/site_perl/bin
+
+[ -d /usr/bin/vendor_perl ] && setenv PATH ${PATH}:/usr/bin/vendor_perl
+[ -d /usr/lib/perl5/vendor_perl/bin ] && setenv PATH ${PATH}:/usr/lib/perl5/vendor_perl/bin
+
+[ -d /usr/bin/core_perl ] && setenv PATH ${PATH}:/usr/bin/core_perl
+
+# If you have modules in non-standard directories you can add them here.
+#export PERLLIB=dir1:dir2
diff --git a/libre-testing/perl/perlbin.fish b/libre-testing/perl/perlbin.fish
new file mode 100644
index 000000000..b9cff07a4
--- /dev/null
+++ b/libre-testing/perl/perlbin.fish
@@ -0,0 +1,10 @@
+# Set path to perl scriptdirs if they exist
+# https://wiki.archlinux.org/index.php/Perl_Policy#Binaries_and_scripts
+
+if status --is-login
+ for perldir in /usr/bin/site_perl /usr/bin/vendor_perl /usr/bin/core_perl
+ if test -d $perldir; and not contains $perldir $PATH
+ set PATH $PATH $perldir
+ end
+ end
+end
diff --git a/libre-testing/perl/perlbin.sh b/libre-testing/perl/perlbin.sh
new file mode 100755
index 000000000..7e38f2047
--- /dev/null
+++ b/libre-testing/perl/perlbin.sh
@@ -0,0 +1,18 @@
+# Set path to perl scriptdirs if they exist
+# https://wiki.archlinux.org/index.php/Perl_Policy#Binaries_and_scripts
+# Added /usr/bin/*_perl dirs for scripts
+# Remove /usr/lib/perl5/*_perl/bin in next release
+
+[ -d /usr/bin/site_perl ] && PATH=$PATH:/usr/bin/site_perl
+[ -d /usr/lib/perl5/site_perl/bin ] && PATH=$PATH:/usr/lib/perl5/site_perl/bin
+
+[ -d /usr/bin/vendor_perl ] && PATH=$PATH:/usr/bin/vendor_perl
+[ -d /usr/lib/perl5/vendor_perl/bin ] && PATH=$PATH:/usr/lib/perl5/vendor_perl/bin
+
+[ -d /usr/bin/core_perl ] && PATH=$PATH:/usr/bin/core_perl
+
+export PATH
+
+# If you have modules in non-standard directories you can add them here.
+#export PERLLIB=dir1:dir2
+
diff --git a/libre-testing/perl/upgpkg b/libre-testing/perl/upgpkg
new file mode 100644
index 000000000..6a3860717
--- /dev/null
+++ b/libre-testing/perl/upgpkg
@@ -0,0 +1,4 @@
+upgpkg_build() {
+ makepkg -o
+ ./patchprov src/perl-$pkgver PKGBUILD
+}
diff --git a/libre-testing/procps-ng/PKGBUILD b/libre-testing/procps-ng/PKGBUILD
new file mode 100644
index 000000000..2291f22ae
--- /dev/null
+++ b/libre-testing/procps-ng/PKGBUILD
@@ -0,0 +1,47 @@
+# Maintainer: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
+# Contributor: Gaetan Bisson <bisson@archlinux.org>
+# Contributor: Eric Bélanger <eric@archlinux.org>
+
+pkgname=procps-ng
+pkgver=3.3.15
+pkgrel=1
+pkgdesc='Utilities for monitoring your system and its processes'
+url='https://gitlab.com/procps-ng/procps'
+license=(GPL LGPL)
+arch=(x86_64 ppc64le)
+groups=(base)
+depends=(ncurses libsystemd)
+makedepends=(systemd)
+conflicts=(procps sysvinit-tools)
+provides=(procps sysvinit-tools)
+replaces=(procps sysvinit-tools)
+install=install
+source=(https://downloads.sourceforge.net/project/$pkgname/Production/${pkgname}-${pkgver}.tar.xz)
+sha256sums=('10bd744ffcb3de2d591d2f6acf1a54a7ba070fdcc432a855931a5057149f0465')
+
+prepare() {
+ cd $pkgname-$pkgver
+ sed 's:<ncursesw/:<:g' -i watch.c
+}
+
+build() {
+ cd $pkgname-$pkgver
+ ./configure \
+ --prefix=/usr \
+ --exec-prefix=/ \
+ --sysconfdir=/etc \
+ --libdir=/usr/lib \
+ --bindir=/usr/bin \
+ --sbindir=/usr/bin \
+ --enable-watch8bit \
+ --with-systemd \
+ --disable-modern-top \
+ --disable-kill
+
+ make
+}
+
+package() {
+ cd $pkgname-$pkgver
+ make DESTDIR="$pkgdir" install
+}
diff --git a/libre-testing/procps-ng/install b/libre-testing/procps-ng/install
new file mode 100644
index 000000000..2e6546ecc
--- /dev/null
+++ b/libre-testing/procps-ng/install
@@ -0,0 +1,14 @@
+post_upgrade() {
+ if [[ $(vercmp $2 3.3.8-3) = -1 ]]; then
+ cat <<EOF
+
+==> The file /etc/sysctl.conf has been removed from this
+==> package, as all its settings are now kernel defaults.
+
+==> If you had customized it, you need to rename it as
+==> /etc/sysctl.d/99-sysctl.conf since from version 207 on
+==> systemd only applies settings from /etc/sysctl.d/* .
+
+EOF
+ fi
+}
diff --git a/libre-testing/psmisc/PKGBUILD b/libre-testing/psmisc/PKGBUILD
new file mode 100644
index 000000000..b64facf11
--- /dev/null
+++ b/libre-testing/psmisc/PKGBUILD
@@ -0,0 +1,24 @@
+# Maintainer: Eric Bélanger <eric@archlinux.org>
+
+pkgname=psmisc
+pkgver=23.1
+pkgrel=1
+pkgdesc="Miscellaneous procfs tools"
+arch=('x86_64' 'ppc64le')
+url="http://psmisc.sourceforge.net/index.html"
+license=('GPL')
+groups=('base')
+depends=('ncurses')
+source=(http://downloads.sourceforge.net/psmisc/${pkgname}-${pkgver}.tar.xz)
+sha256sums=('2e84d474cf75dfbe3ecdacfb797bbfab71a35c7c2639d1b9f6d5f18b2149ba30')
+
+build() {
+ cd ${pkgname}-${pkgver}
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd ${pkgname}-${pkgver}
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/libre-testing/reiserfsprogs/PKGBUILD b/libre-testing/reiserfsprogs/PKGBUILD
new file mode 100644
index 000000000..eccc6de05
--- /dev/null
+++ b/libre-testing/reiserfsprogs/PKGBUILD
@@ -0,0 +1,31 @@
+# Maintainer: Andreas Radke <andyrtr@archlinux.org>
+# Contributor: judd <jvinet@zeroflux.org>
+
+pkgname=reiserfsprogs
+pkgver=3.6.27
+pkgrel=1
+pkgdesc="Reiserfs utilities"
+arch=('x86_64' 'ppc64le')
+url="http://www.kernel.org/"
+license=('GPL')
+groups=('base')
+depends=('util-linux')
+source=("https://www.kernel.org/pub/linux/kernel/people/jeffm/reiserfsprogs/v${pkgver}/${pkgname}-${pkgver}.tar.xz")
+md5sums=('90c139542725efc6da3a6b1709695395')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ CFLAGS+=' -fgnu89-inline'
+ ./configure --prefix=/usr --sbindir=/usr/bin
+ make
+}
+
+check() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make check
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/libre-testing/s-nail/PKGBUILD b/libre-testing/s-nail/PKGBUILD
new file mode 100644
index 000000000..a01dae398
--- /dev/null
+++ b/libre-testing/s-nail/PKGBUILD
@@ -0,0 +1,52 @@
+# Maintainer: Gaetan Bisson <bisson@archlinux.org>
+# Contributor: Stéphane Gaudreault <stephane@archlinux.org>
+# Contributor: Sergej Pupykin <pupykin.s@arch@gmail.com>
+# Contributor: Andreas Wagner <Andreas.Wagner@em.uni-frankfurt.de>
+
+pkgname=s-nail
+pkgver=14.9.11
+pkgrel=1
+pkgdesc='Mail processing system with a command syntax reminiscent of ed'
+url='http://www.sdaoden.eu/code.html#s-nail'
+license=('custom:BSD')
+arch=('x86_64' 'ppc64le')
+depends=('openssl' 'krb5' 'libidn2')
+optdepends=('smtp-forwarder: for sending mail')
+validpgpkeys=('EE19E1C1F2F7054F8D3954D8308964B51883A0DD')
+source=("https://www.sdaoden.eu/downloads/${pkgname}-${pkgver}.tar.xz"{,.asc})
+sha256sums=('258d818449da889c5fc4976215698a817c0a3818fb77dd565fa9fe6afed0023e'
+ 'SKIP')
+
+groups=('base')
+backup=('etc/mail.rc')
+replaces=('mailx' 'mailx-heirloom' 'heirloom-mailx')
+provides=('mailx' 'mailx-heirloom' 'heirloom-mailx')
+conflicts=('mailx' 'mailx-heirloom' 'heirloom-mailx')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ CFLAGS+=" $CPPFLAGS"
+ make \
+ VAL_PREFIX=/usr \
+ VAL_SYSCONFDIR=/etc \
+ VAL_LIBEXECDIR=/usr/lib \
+ VAL_MAIL=/var/spool/mail \
+ VAL_SID= VAL_MAILX=mail \
+ OPT_AUTOCC=0 \
+ config
+
+ make MAKEJOBS=--jobs build
+}
+
+check() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make test < /dev/null
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+ ln -sf mail "${pkgdir}"/usr/bin/mailx
+ ln -sf mail.1.gz "${pkgdir}"/usr/share/man/man1/mailx.1.gz
+ install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
+}
diff --git a/libre-testing/sed/PKGBUILD b/libre-testing/sed/PKGBUILD
new file mode 100644
index 000000000..991b119bf
--- /dev/null
+++ b/libre-testing/sed/PKGBUILD
@@ -0,0 +1,36 @@
+# Maintainer: Sébastien "Seblu" Luttringer <seblu@archlinux.org>
+# Contributor: Allan McRae <allan@archlinux.org>
+# Contributor: judd <jvinet@zeroflux.org>
+
+pkgname=sed
+pkgver=4.5
+pkgrel=1
+pkgdesc='GNU stream editor'
+arch=('x86_64' 'ppc64le')
+url='https://www.gnu.org/software/sed/'
+license=('GPL3')
+groups=('base' 'base-devel')
+depends=('glibc' 'acl' 'attr')
+makedepends=('gettext')
+source=("https://ftp.gnu.org/pub/gnu/sed/$pkgname-$pkgver.tar.xz"{,.sig})
+validpgpkeys=('155D3FC500C834486D1EEA677FD9FCCB000BEEEE') #Jim Meyering <jim@meyering.net>
+md5sums=('ade8f8c2c548bf41f74db2dcfc37e4e3'
+ 'SKIP')
+
+build() {
+ cd $pkgname-$pkgver
+ ./configure --prefix=/usr
+ make
+}
+
+check() {
+ cd $pkgname-$pkgver
+ make check
+}
+
+package() {
+ cd $pkgname-$pkgver
+ make DESTDIR="$pkgdir" install
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/libre-testing/shadow/LICENSE b/libre-testing/shadow/LICENSE
new file mode 100644
index 000000000..c5ab15a56
--- /dev/null
+++ b/libre-testing/shadow/LICENSE
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 1990 - 1994, Julianne Frances Haugh
+ * Copyright (c) 1996 - 2000, Marek Michałkiewicz
+ * Copyright (c) 2001 - 2006, Tomasz Kłoczko
+ * Copyright (c) 2007 - 2009, Nicolas François
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the copyright holders or contributors may not be used to
+ * endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
diff --git a/libre-testing/shadow/PKGBUILD b/libre-testing/shadow/PKGBUILD
new file mode 100644
index 000000000..6425c6062
--- /dev/null
+++ b/libre-testing/shadow/PKGBUILD
@@ -0,0 +1,149 @@
+# Maintainer: Dave Reisner <dreisner@archlinux.org>
+# Maintainer: Aaron Griffin <aaron@archlinux.org>
+
+pkgname=shadow
+pkgver=4.6
+pkgrel=1
+pkgdesc="Password and account management tool suite with support for shadow files and PAM"
+arch=('x86_64' 'ppc64le')
+url='https://github.com/shadow-maint/shadow'
+license=('BSD')
+groups=('base')
+depends=('bash' 'pam' 'acl')
+makedepends=('git' 'libxslt' 'docbook-xsl' 'gnome-doc-utils')
+backup=(etc/login.defs
+ etc/pam.d/{chage,passwd,shadow,useradd,usermod,userdel}
+ etc/pam.d/{chpasswd,newusers,groupadd,groupdel,groupmod}
+ etc/pam.d/{chgpasswd,groupmems}
+ etc/default/useradd)
+options=(strip debug)
+install='shadow.install'
+validpgpkeys=('D5C2F9BFCA128BBA22A77218872F702C4D6E25A8') # Christian Perrier
+source=("git+https://github.com/shadow-maint/shadow.git#tag=$pkgver"
+ LICENSE
+ chgpasswd
+ chpasswd
+ defaults.pam
+ login.defs
+ newusers
+ passwd
+ shadow.{timer,service}
+ useradd.defaults
+ xstrdup.patch
+ shadow-strncpy-usage.patch)
+sha1sums=('SKIP'
+ '33a6cf1e44a1410e5c9726c89e5de68b78f5f922'
+ '4ad0e059406a305c8640ed30d93c2a1f62c2f4ad'
+ '12427b1ca92a9b85ca8202239f0d9f50198b818f'
+ '0e56fed7fc93572c6bf0d8f3b099166558bb46f1'
+ '81a02eadb5f605fef5c75b6d8a03713a7041864b'
+ '12427b1ca92a9b85ca8202239f0d9f50198b818f'
+ '611be25d91c3f8f307c7fe2485d5f781e5dee75f'
+ 'a154a94b47a3d0c6c287253b98c0d10b861226d0'
+ 'b5540736f5acbc23b568973eb5645604762db3dd'
+ 'c173208c5cf34528602f9931468a67b7f68abad3'
+ '6010fffeed1fc6673ad9875492e1193b1a847b53'
+ '21e12966a6befb25ec123b403cd9b5c492fe5b16')
+
+pkgver() {
+ cd "$pkgname"
+
+ git describe
+}
+
+prepare() {
+ cd "$pkgname"
+
+ # need to offer these upstream
+ patch -Np1 <"$srcdir/xstrdup.patch"
+ patch -Np1 <"$srcdir/shadow-strncpy-usage.patch"
+
+ autoreconf -v -f --install
+
+ # supress etc/pam.d/*, we provide our own
+ sed -i '/^SUBDIRS/s/pam\.d//' etc/Makefile.in
+}
+
+build() {
+ cd "$pkgname"
+
+ ./configure \
+ LIBS="-lcrypt" \
+ --prefix=/usr \
+ --bindir=/usr/bin \
+ --sbindir=/usr/bin \
+ --libdir=/usr/lib \
+ --mandir=/usr/share/man \
+ --enable-man \
+ --sysconfdir=/etc \
+ --with-libpam \
+ --with-group-name-max-length=32 \
+ --without-selinux
+
+ make
+}
+
+package() {
+ cd "$pkgname"
+
+ make DESTDIR="$pkgdir" install
+
+ # license
+ install -Dm644 "$srcdir/LICENSE" "$pkgdir/usr/share/licenses/shadow/LICENSE"
+
+ # useradd defaults
+ install -Dm644 "$srcdir/useradd.defaults" "$pkgdir/etc/default/useradd"
+
+ # systemd timer
+ install -D -m644 "$srcdir/shadow.timer" "$pkgdir/usr/lib/systemd/system/shadow.timer"
+ install -D -m644 "$srcdir/shadow.service" $pkgdir/usr/lib/systemd/system/shadow.service
+ install -d -m755 "$pkgdir/usr/lib/systemd/system/timers.target.wants"
+ ln -s ../shadow.timer "$pkgdir/usr/lib/systemd/system/timers.target.wants/shadow.timer"
+
+ # login.defs
+ install -Dm644 "$srcdir/login.defs" "$pkgdir/etc/login.defs"
+
+ # PAM config - custom
+ install -dm755 "$pkgdir/etc/pam.d"
+ install -t "$pkgdir/etc/pam.d" -m644 "$srcdir"/{passwd,chgpasswd,chpasswd,newusers}
+
+ # PAM config - from tarball
+ install -Dm644 etc/pam.d/groupmems "$pkgdir/etc/pam.d/groupmems"
+
+ # we use the 'useradd' PAM file for other similar utilities
+ for file in chage groupadd groupdel groupmod shadow \
+ useradd usermod userdel; do
+ install -Dm644 "$srcdir/defaults.pam" "$pkgdir/etc/pam.d/$file"
+ done
+
+ # Remove evil/broken tools
+ rm "$pkgdir"/usr/sbin/logoutd
+
+ # Remove utilities provided by util-linux
+ rm \
+ "$pkgdir"/usr/bin/{login,su,chsh,chfn,sg,nologin} \
+ "$pkgdir"/usr/sbin/{vipw,vigr}
+
+ # but we keep newgrp, as sg is really an alias to it
+ mv "$pkgdir"/usr/bin/{newgrp,sg}
+
+ # ...and their many man pages
+ find "$pkgdir"/usr/share/man \
+ '(' -name 'chsh.1' -o \
+ -name 'chfn.1' -o \
+ -name 'su.1' -o \
+ -name 'logoutd.8' -o \
+ -name 'login.1' -o \
+ -name 'nologin.8' -o \
+ -name 'vipw.8' -o \
+ -name 'vigr.8' -o \
+ -name 'newgrp.1' ')' \
+ -delete
+ rmdir \
+ "$pkgdir"/usr/share/man/{fi,id,zh_TW}/man1 \
+ "$pkgdir"/usr/share/man/{fi,ko/man8}
+
+ # move everything else to /usr/bin, because this isn't handled by ./configure
+ mv "$pkgdir"/usr/sbin/* "$pkgdir"/usr/bin
+ rmdir "$pkgdir/usr/sbin"
+}
diff --git a/libre-testing/shadow/chgpasswd b/libre-testing/shadow/chgpasswd
new file mode 100644
index 000000000..8f49f5cc8
--- /dev/null
+++ b/libre-testing/shadow/chgpasswd
@@ -0,0 +1,4 @@
+#%PAM-1.0
+auth sufficient pam_rootok.so
+account required pam_permit.so
+password include system-auth
diff --git a/libre-testing/shadow/chpasswd b/libre-testing/shadow/chpasswd
new file mode 100644
index 000000000..5d447985a
--- /dev/null
+++ b/libre-testing/shadow/chpasswd
@@ -0,0 +1,6 @@
+#%PAM-1.0
+auth sufficient pam_rootok.so
+auth required pam_unix.so
+account required pam_unix.so
+session required pam_unix.so
+password required pam_unix.so sha512 shadow
diff --git a/libre-testing/shadow/defaults.pam b/libre-testing/shadow/defaults.pam
new file mode 100644
index 000000000..a7bf8a4a5
--- /dev/null
+++ b/libre-testing/shadow/defaults.pam
@@ -0,0 +1,6 @@
+#%PAM-1.0
+auth sufficient pam_rootok.so
+auth required pam_unix.so
+account required pam_unix.so
+session required pam_unix.so
+password required pam_permit.so
diff --git a/libre-testing/shadow/login.defs b/libre-testing/shadow/login.defs
new file mode 100644
index 000000000..a0afbc1e9
--- /dev/null
+++ b/libre-testing/shadow/login.defs
@@ -0,0 +1,208 @@
+#
+# /etc/login.defs - Configuration control definitions for the login package.
+#
+# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH.
+# If unspecified, some arbitrary (and possibly incorrect) value will
+# be assumed. All other items are optional - if not specified then
+# the described action or option will be inhibited.
+#
+# Comment lines (lines beginning with "#") and blank lines are ignored.
+#
+# Modified for Linux. --marekm
+
+#
+# Delay in seconds before being allowed another attempt after a login failure
+#
+FAIL_DELAY 3
+
+#
+# Enable display of unknown usernames when login failures are recorded.
+#
+LOG_UNKFAIL_ENAB no
+
+#
+# Enable logging of successful logins
+#
+LOG_OK_LOGINS no
+
+#
+# Enable "syslog" logging of su activity - in addition to sulog file logging.
+# SYSLOG_SG_ENAB does the same for newgrp and sg.
+#
+SYSLOG_SU_ENAB yes
+SYSLOG_SG_ENAB yes
+
+#
+# If defined, either full pathname of a file containing device names or
+# a ":" delimited list of device names. Root logins will be allowed only
+# upon these devices.
+#
+CONSOLE /etc/securetty
+#CONSOLE console:tty01:tty02:tty03:tty04
+
+#
+# If defined, all su activity is logged to this file.
+#
+#SULOG_FILE /var/log/sulog
+
+#
+# If defined, file which maps tty line to TERM environment parameter.
+# Each line of the file is in a format something like "vt100 tty01".
+#
+#TTYTYPE_FILE /etc/ttytype
+
+#
+# If defined, the command name to display when running "su -". For
+# example, if this is defined as "su" then a "ps" will display the
+# command is "-su". If not defined, then "ps" would display the
+# name of the shell actually being run, e.g. something like "-sh".
+#
+SU_NAME su
+
+#
+# *REQUIRED*
+# Directory where mailboxes reside, _or_ name of file, relative to the
+# home directory. If you _do_ define both, MAIL_DIR takes precedence.
+# QMAIL_DIR is for Qmail
+#
+#QMAIL_DIR Maildir
+MAIL_DIR /var/spool/mail
+
+#
+# If defined, file which inhibits all the usual chatter during the login
+# sequence. If a full pathname, then hushed mode will be enabled if the
+# user's name or shell are found in the file. If not a full pathname, then
+# hushed mode will be enabled if the file exists in the user's home directory.
+#
+HUSHLOGIN_FILE .hushlogin
+#HUSHLOGIN_FILE /etc/hushlogins
+
+#
+# *REQUIRED* The default PATH settings, for superuser and normal users.
+#
+# (they are minimal, add the rest in the shell startup files)
+ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/bin
+ENV_PATH PATH=/usr/local/sbin:/usr/local/bin:/usr/bin
+
+#
+# Terminal permissions
+#
+# TTYGROUP Login tty will be assigned this group ownership.
+# TTYPERM Login tty will be set to this permission.
+#
+# If you have a "write" program which is "setgid" to a special group
+# which owns the terminals, define TTYGROUP to the group number and
+# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign
+# TTYPERM to either 622 or 600.
+#
+TTYGROUP tty
+TTYPERM 0600
+
+#
+# Login configuration initializations:
+#
+# ERASECHAR Terminal ERASE character ('\010' = backspace).
+# KILLCHAR Terminal KILL character ('\025' = CTRL/U).
+# UMASK Default "umask" value.
+#
+# The ERASECHAR and KILLCHAR are used only on System V machines.
+# The ULIMIT is used only if the system supports it.
+# (now it works with setrlimit too; ulimit is in 512-byte units)
+#
+# Prefix these values with "0" to get octal, "0x" to get hexadecimal.
+#
+ERASECHAR 0177
+KILLCHAR 025
+UMASK 077
+
+#
+# Password aging controls:
+#
+# PASS_MAX_DAYS Maximum number of days a password may be used.
+# PASS_MIN_DAYS Minimum number of days allowed between password changes.
+# PASS_WARN_AGE Number of days warning given before a password expires.
+#
+PASS_MAX_DAYS 99999
+PASS_MIN_DAYS 0
+PASS_WARN_AGE 7
+
+#
+# Min/max values for automatic uid selection in useradd
+#
+UID_MIN 1000
+UID_MAX 60000
+# System accounts
+SYS_UID_MIN 500
+SYS_UID_MAX 999
+
+#
+# Min/max values for automatic gid selection in groupadd
+#
+GID_MIN 1000
+GID_MAX 60000
+# System accounts
+SYS_GID_MIN 500
+SYS_GID_MAX 999
+
+#
+# Max number of login retries if password is bad
+#
+LOGIN_RETRIES 5
+
+#
+# Max time in seconds for login
+#
+LOGIN_TIMEOUT 60
+
+#
+# Which fields may be changed by regular users using chfn - use
+# any combination of letters "frwh" (full name, room number, work
+# phone, home phone). If not defined, no changes are allowed.
+# For backward compatibility, "yes" = "rwh" and "no" = "frwh".
+#
+CHFN_RESTRICT rwh
+
+#
+# List of groups to add to the user's supplementary group set
+# when logging in on the console (as determined by the CONSOLE
+# setting). Default is none.
+#
+# Use with caution - it is possible for users to gain permanent
+# access to these groups, even when not logged in on the console.
+# How to do it is left as an exercise for the reader...
+#
+#CONSOLE_GROUPS floppy:audio:cdrom
+
+#
+# Should login be allowed if we can't cd to the home directory?
+# Default in no.
+#
+DEFAULT_HOME yes
+
+#
+# If defined, this command is run when removing a user.
+# It should remove any at/cron/print jobs etc. owned by
+# the user to be removed (passed as the first argument).
+#
+#USERDEL_CMD /usr/sbin/userdel_local
+
+#
+# Enable setting of the umask group bits to be the same as owner bits
+# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is
+# the same as gid, and username is the same as the primary group name.
+#
+# This also enables userdel to remove user groups if no members exist.
+#
+USERGROUPS_ENAB yes
+
+#
+# Controls display of the motd file. This is better handled by pam_motd.so
+# so the declaration here is empty is suppress display by readers of this
+# file.
+#
+MOTD_FILE
+
+#
+# Hash shadow passwords with SHA512.
+#
+ENCRYPT_METHOD SHA512
diff --git a/libre-testing/shadow/newusers b/libre-testing/shadow/newusers
new file mode 100644
index 000000000..5d447985a
--- /dev/null
+++ b/libre-testing/shadow/newusers
@@ -0,0 +1,6 @@
+#%PAM-1.0
+auth sufficient pam_rootok.so
+auth required pam_unix.so
+account required pam_unix.so
+session required pam_unix.so
+password required pam_unix.so sha512 shadow
diff --git a/libre-testing/shadow/passwd b/libre-testing/shadow/passwd
new file mode 100644
index 000000000..ab56da496
--- /dev/null
+++ b/libre-testing/shadow/passwd
@@ -0,0 +1,4 @@
+#%PAM-1.0
+#password required pam_cracklib.so difok=2 minlen=8 dcredit=2 ocredit=2 retry=3
+#password required pam_unix.so sha512 shadow use_authtok
+password required pam_unix.so sha512 shadow nullok
diff --git a/libre-testing/shadow/shadow-strncpy-usage.patch b/libre-testing/shadow/shadow-strncpy-usage.patch
new file mode 100644
index 000000000..5aba8fa01
--- /dev/null
+++ b/libre-testing/shadow/shadow-strncpy-usage.patch
@@ -0,0 +1,25 @@
+diff -u shadow-4.1.5/src/usermod.c.orig shadow-4.1.5/src/usermod.c
+--- shadow-4.1.5/src/usermod.c.orig 2012-02-13 08:19:43.792146449 -0500
++++ shadow-4.1.5/src/usermod.c 2012-02-13 08:21:19.375114500 -0500
+@@ -182,7 +182,7 @@
+ struct tm *tp;
+
+ if (date < 0) {
+- strncpy (buf, "never", maxsize);
++ strncpy (buf, "never", maxsize - 1);
+ } else {
+ time_t t = (time_t) date;
+ tp = gmtime (&t);
+diff -u shadow-4.1.5/src/login.c.orig shadow-4.1.5/src/login.c
+--- shadow-4.1.5/src/login.c.orig 2012-02-13 08:19:50.951994454 -0500
++++ shadow-4.1.5/src/login.c 2012-02-13 08:21:04.490430937 -0500
+@@ -752,7 +752,8 @@
+ _("%s login: "), hostn);
+ } else {
+ strncpy (loginprompt, _("login: "),
+- sizeof (loginprompt));
++ sizeof (loginprompt) - 1);
++ loginprompt[sizeof (loginprompt) - 1] = '\0';
+ }
+
+ retcode = pam_set_item (pamh, PAM_USER_PROMPT, loginprompt);
diff --git a/libre-testing/shadow/shadow.install b/libre-testing/shadow/shadow.install
new file mode 100644
index 000000000..14384c333
--- /dev/null
+++ b/libre-testing/shadow/shadow.install
@@ -0,0 +1,9 @@
+post_upgrade() {
+ grpck -r >/dev/null 2>&1
+ if [ $? -eq 2 ]; then
+ printf '%s\n' \
+ "==> Warning: /etc/group or /etc/gshadow are inconsistent." \
+ " Run 'grpck' to correct this."
+ fi
+ return 0
+}
diff --git a/libre-testing/shadow/shadow.service b/libre-testing/shadow/shadow.service
new file mode 100644
index 000000000..39025d90e
--- /dev/null
+++ b/libre-testing/shadow/shadow.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Verify integrity of password and group files
+After=systemd-sysusers.service
+
+[Service]
+Type=simple
+# Always run both checks, but fail the service if either fails
+ExecStart=/bin/sh -c '/usr/bin/pwck -r || r=1; /usr/bin/grpck -r && exit $r'
+Nice=19
+IOSchedulingClass=best-effort
+IOSchedulingPriority=7
diff --git a/libre-testing/shadow/shadow.timer b/libre-testing/shadow/shadow.timer
new file mode 100644
index 000000000..9cc6baaa9
--- /dev/null
+++ b/libre-testing/shadow/shadow.timer
@@ -0,0 +1,7 @@
+[Unit]
+Description=Daily verification of password and group files
+
+[Timer]
+OnCalendar=daily
+AccuracySec=12h
+Persistent=true
diff --git a/libre-testing/shadow/useradd.defaults b/libre-testing/shadow/useradd.defaults
new file mode 100644
index 000000000..e07fe271c
--- /dev/null
+++ b/libre-testing/shadow/useradd.defaults
@@ -0,0 +1,9 @@
+# useradd defaults file for ArchLinux
+# original changes by TomK
+GROUP=users
+HOME=/home
+INACTIVE=-1
+EXPIRE=
+SHELL=/bin/bash
+SKEL=/etc/skel
+CREATE_MAIL_SPOOL=no
diff --git a/libre-testing/shadow/xstrdup.patch b/libre-testing/shadow/xstrdup.patch
new file mode 100644
index 000000000..bce434264
--- /dev/null
+++ b/libre-testing/shadow/xstrdup.patch
@@ -0,0 +1,9 @@
+--- shadow-4.1.2.1/libmisc/xmalloc.c 2008-08-30 21:55:44.000000000 -0500
++++ shadow-4.1.2.1/libmisc/xmalloc.c.new 2008-08-30 21:55:36.000000000 -0500
+@@ -61,5 +61,6 @@
+
+ char *xstrdup (const char *str)
+ {
++ if(str == NULL) return NULL;
+ return strcpy (xmalloc (strlen (str) + 1), str);
+ }
diff --git a/libre-testing/sysfsutils/PKGBUILD b/libre-testing/sysfsutils/PKGBUILD
new file mode 100644
index 000000000..17cafd257
--- /dev/null
+++ b/libre-testing/sysfsutils/PKGBUILD
@@ -0,0 +1,30 @@
+# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
+
+pkgname=sysfsutils
+pkgver=2.1.0
+pkgrel=10
+pkgdesc="System Utilities Based on Sysfs"
+arch=('x86_64' 'ppc64le')
+license=('GPL' 'LGPL')
+url="http://linux-diag.sourceforge.net/Sysfsutils.html"
+groups=('base')
+depends=('glibc')
+source=(http://downloads.sourceforge.net/sourceforge/linux-diag/${pkgname}-${pkgver}.tar.gz)
+sha512sums=('485902d98b41a69343cb037883d0c0a1de8a1a4aed657cd4528fe10bc845ac51629657dff01deef042e57c9bd9243095e23fc931d06d74db31b03c5f0a18cf07')
+
+build() {
+ cd "$pkgname-$pkgver"
+ ./configure --prefix=/usr --mandir=/usr/share/man
+ make
+}
+
+check() {
+ cd "$pkgname-$pkgver"
+ make check
+}
+
+package() {
+ cd "$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install
+ rm "$pkgdir/usr/lib/libsysfs.a"
+}
diff --git a/libre-testing/systemd/0001-Use-Arch-Linux-device-access-groups.patch b/libre-testing/systemd/0001-Use-Arch-Linux-device-access-groups.patch
new file mode 100644
index 000000000..c511144de
--- /dev/null
+++ b/libre-testing/systemd/0001-Use-Arch-Linux-device-access-groups.patch
@@ -0,0 +1,75 @@
+From 34e4b4953cb99642e9144d97823edf32b06ffe93 Mon Sep 17 00:00:00 2001
+Message-Id: <34e4b4953cb99642e9144d97823edf32b06ffe93.1520376078.git.jan.steffens@gmail.com>
+From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
+Date: Tue, 6 Mar 2018 23:39:47 +0100
+Subject: [PATCH] Use Arch Linux' device access groups
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+ cdrom → optical
+ dialout → uucp
+ tape → storage
+---
+ rules/50-udev-default.rules.in | 14 +++++++-------
+ sysusers.d/basic.conf.in | 6 +++---
+ 2 files changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/rules/50-udev-default.rules.in b/rules/50-udev-default.rules.in
+index 191f56f42..f81c4d0fc 100644
+--- a/rules/50-udev-default.rules.in
++++ b/rules/50-udev-default.rules.in
+@@ -22,7 +22,7 @@ SUBSYSTEM=="tty", KERNEL=="sclp_line[0-9]*", GROUP="tty", MODE="0620"
+ SUBSYSTEM=="tty", KERNEL=="ttysclp[0-9]*", GROUP="tty", MODE="0620"
+ SUBSYSTEM=="tty", KERNEL=="3270/tty[0-9]*", GROUP="tty", MODE="0620"
+ SUBSYSTEM=="vc", KERNEL=="vcs*|vcsa*", GROUP="tty"
+-KERNEL=="tty[A-Z]*[0-9]|ttymxc[0-9]*|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*", GROUP="dialout"
++KERNEL=="tty[A-Z]*[0-9]|ttymxc[0-9]*|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*", GROUP="uucp"
+
+ SUBSYSTEM=="mem", KERNEL=="mem|kmem|port", GROUP="kmem", MODE="0640"
+
+@@ -57,13 +57,13 @@ KERNEL=="irlpt[0-9]*", GROUP="lp"
+ SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0701??:*", GROUP="lp"
+
+ SUBSYSTEM=="block", GROUP="disk"
+-SUBSYSTEM=="block", KERNEL=="sr[0-9]*", GROUP="cdrom"
+-SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", GROUP="cdrom"
+-KERNEL=="sch[0-9]*", GROUP="cdrom"
+-KERNEL=="pktcdvd[0-9]*", GROUP="cdrom"
+-KERNEL=="pktcdvd", GROUP="cdrom"
++SUBSYSTEM=="block", KERNEL=="sr[0-9]*", GROUP="optical"
++SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", GROUP="optical"
++KERNEL=="sch[0-9]*", GROUP="optical"
++KERNEL=="pktcdvd[0-9]*", GROUP="optical"
++KERNEL=="pktcdvd", GROUP="optical"
+
+-SUBSYSTEM=="scsi_generic|scsi_tape", SUBSYSTEMS=="scsi", ATTRS{type}=="1|8", GROUP="tape"
++SUBSYSTEM=="scsi_generic|scsi_tape", SUBSYSTEMS=="scsi", ATTRS{type}=="1|8", GROUP="storage"
+ SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="0", GROUP="disk"
+ KERNEL=="qft[0-9]*|nqft[0-9]*|zqft[0-9]*|nzqft[0-9]*|rawqft[0-9]*|nrawqft[0-9]*", GROUP="disk"
+ KERNEL=="loop-control", GROUP="disk", OPTIONS+="static_node=loop-control"
+diff --git a/sysusers.d/basic.conf.in b/sysusers.d/basic.conf.in
+index 8e358c02d..33e513a36 100644
+--- a/sysusers.d/basic.conf.in
++++ b/sysusers.d/basic.conf.in
+@@ -24,14 +24,14 @@ g utmp - - -
+
+ # Hardware access groups
+ g audio - - -
+-g cdrom - - -
+-g dialout - - -
+ g disk - - -
+ g input - - -
+ g kvm - - -
+ g lp - - -
++g optical - - -
+ g render - - -
+-g tape - - -
++g storage - - -
++g uucp - - -
+ g video - - -
+
+ # Default group for normal users
+--
+2.16.2
+
diff --git a/libre-testing/systemd/PKGBUILD b/libre-testing/systemd/PKGBUILD
new file mode 100644
index 000000000..d0b46eb12
--- /dev/null
+++ b/libre-testing/systemd/PKGBUILD
@@ -0,0 +1,274 @@
+# Maintainer: Christian Hesse <mail@eworm.de>
+# Maintainer: Dave Reisner <dreisner@archlinux.org>
+# Maintainer: Tom Gundersen <teg@jklm.no>
+
+pkgbase=systemd
+pkgname=('systemd' 'libsystemd' 'systemd-resolvconf' 'systemd-sysvcompat')
+# Can be from either systemd or systemd-stable
+_commit='c38499d476026d999558a7eee9c95ca2fa41e115'
+pkgver=239.2
+pkgrel=2
+arch=('x86_64' 'ppc64le')
+url='https://www.github.com/systemd/systemd'
+makedepends=('acl' 'cryptsetup' 'docbook-xsl' 'gperf' 'lz4' 'xz' 'pam' 'libelf'
+ 'intltool' 'iptables' 'kmod' 'libcap' 'libidn2' 'libgcrypt'
+ 'libmicrohttpd' 'libxslt' 'util-linux' 'linux-api-headers'
+ 'python-lxml' 'quota-tools' 'shadow' 'gnu-efi-libs' 'git'
+ 'meson' 'libseccomp' 'pcre2' 'audit' 'kexec-tools' 'libxkbcommon'
+ 'bash-completion')
+options=('strip')
+validpgpkeys=('63CDA1E5D3FC22B998D20DD6327F26951A015CC4' # Lennart Poettering <lennart@poettering.net>
+ '5C251B5FC54EB2F80F407AAAC54CA336CFEB557E') # Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
+source=(# fragment is latest tag for source verification, final merge in prepare()
+ "git+https://github.com/systemd/systemd-stable#tag=v${pkgver%.*}?signed"
+ "git+https://github.com/systemd/systemd#tag=v${pkgver%.*}?signed"
+ '0001-Use-Arch-Linux-device-access-groups.patch'
+ 'initcpio-hook-udev'
+ 'initcpio-install-systemd'
+ 'initcpio-install-udev'
+ 'arch.conf'
+ 'loader.conf'
+ 'splash-arch.bmp'
+ 'systemd-user.pam'
+ 'systemd-hook'
+ 'systemd-binfmt.hook'
+ 'systemd-catalog.hook'
+ 'systemd-daemon-reload.hook'
+ 'systemd-hwdb.hook'
+ 'systemd-sysctl.hook'
+ 'systemd-sysusers.hook'
+ 'systemd-tmpfiles.hook'
+ 'systemd-udev-reload.hook'
+ 'systemd-update.hook')
+sha512sums=('SKIP'
+ 'SKIP'
+ '9348683829190628e25b7b3300fd880c426d555bde330d5fc5150a9a54b3ad9d4d1f2e69ea1dc6d6f086693dacc53c5af30f1fa7ad9b479791fd77bcdafa430e'
+ 'f0d933e8c6064ed830dec54049b0a01e27be87203208f6ae982f10fb4eddc7258cb2919d594cbfb9a33e74c3510cfd682f3416ba8e804387ab87d1a217eb4b73'
+ '01de24951a05d38eca6b615a7645beb3677ca0e0f87638d133649f6dc14dcd2ea82594a60b793c31b14493a286d1d11a0d25617f54dbfa02be237652c8faa691'
+ 'a25b28af2e8c516c3a2eec4e64b8c7f70c21f974af4a955a4a9d45fd3e3ff0d2a98b4419fe425d47152d5acae77d64e69d8d014a7209524b75a81b0edb10bf3a'
+ '61032d29241b74a0f28446f8cf1be0e8ec46d0847a61dadb2a4f096e8686d5f57fe5c72bcf386003f6520bc4b5856c32d63bf3efe7eb0bc0deefc9f68159e648'
+ 'c416e2121df83067376bcaacb58c05b01990f4614ad9de657d74b6da3efa441af251d13bf21e3f0f71ddcb4c9ea658b81da3d915667dc5c309c87ec32a1cb5a5'
+ '5a1d78b5170da5abe3d18fdf9f2c3a4d78f15ba7d1ee9ec2708c4c9c2e28973469bc19386f70b3cf32ffafbe4fcc4303e5ebbd6d5187a1df3314ae0965b25e75'
+ 'b90c99d768dc2a4f020ba854edf45ccf1b86a09d2f66e475de21fe589ff7e32c33ef4aa0876d7f1864491488fd7edb2682fc0d68e83a6d4890a0778dc2d6fe19'
+ '6b82386fc20619eefa911cd9cdac8efbd0c7137bba4955e8ae75a0ea378d19dbfccc1f7bde6684f03e5f2badefa4abf20623153d88a170d14499167319586db7'
+ '5a6b6beef8c31c79018884d948de840f4d3dfb07d9a87081ebf65e2b8fe595bc8c96dbd7742920ccf948c233213ed0026abc913650cefd77ad90c6f8c89bddb8'
+ '4cff2ebd962e26e2f516d8b4ac45c839dbfa54dd0588b423c224a328b9f7c62306ca7b2f6cb55240c564caf9972d5bcd2e0efaf2de49d64729aeb3bc1560c9eb'
+ '872de70325e9798f0b5a77e991c85bd2ab6de24d9b9ba4e35002d2dd5df15f8b30739a0042a624776177ffc14a838cde7ee98622016ed41df3efda9a659730b2'
+ '471342b8d0e05533908cda5d6a906050a51e3181beda1239e91d717029ee40a9eaed714996a445417d87c4e31b7f8522a665de176077fe0536d538369594996d'
+ 'da783e3bfc6469b92dee4064a13e2b427520d3d96b57c95a4e07aaca3e844d95210a8b16122b022080f5452d65096f274dd1c1467725bbdb2e40ef304b78774a'
+ '08a590d08043a21f30f04252164b94df972b1ff1022a0469d6aef713e14484a3a037cce290a2a582851e6fac3e64add69d6cc8fc130bbeeaea08626ebf3e1763'
+ '577e33a1c50b4b41157a67f64162b035dd0c4a541e19cee55a100048bdb50cb2c82852741b1372989a0fe4c4782ba477522747fcc81d72aed99b3db512a86447'
+ 'e4a9d7607fe93daf1d45270971c8d8455c4bfc2c0bea8bcad05aeb89847edee23cd1a41073a72042622acf417018fe254f5bfc137604fe2c71292680bf67a1c2'
+ '209b01b044877cc986757fa4009a92ea98f480306c2530075d153203c3cd2b3afccab6aacc1453dee8857991e04270572f1700310705d7a0f4d5bed27fab8c67')
+
+_backports=(
+ # statx fixes
+ '75720bff62a84896e9a0654afc7cf9408cf89a38'
+ '9c869d08d82c73f62ab3527567858ce4b0cf1257'
+)
+
+_reverts=(
+)
+
+prepare() {
+ cd "$pkgbase-stable"
+
+ # add upstream repository for cherry-picking
+ git remote add -f upstream ../systemd
+ # merge the latest stable commit (fast-foward only to make sure
+ # the verified tag is in)
+ git merge --ff-only "${_commit}"
+
+ local _c
+ for _c in "${_backports[@]}"; do
+ git cherry-pick -n "${_c}"
+ done
+ for _c in "${_reverts[@]}"; do
+ git revert -n "${_c}"
+ done
+
+ # Replace cdrom/dialout/tape groups with optical/uucp/storage
+ patch -Np1 -i ../0001-Use-Arch-Linux-device-access-groups.patch
+}
+
+pkgver() {
+ cd "$pkgbase-stable"
+
+ local _version _count
+ _version="$(git describe --abbrev=0 --tags)"
+ _count="$(git rev-list --count ${_version}..)"
+ printf '%s.%s' "${_version#v}" "${_count}"
+}
+
+build() {
+ local _timeservers=({0..3}.arch.pool.ntp.org)
+ local _nameservers=(
+ # We use these public name services, ordered by their
+ # privacy policy (hopefully):
+ # * Cloudflare (https://1.1.1.1/)
+ # * Quad9 without filtering (https://www.quad9.net/)
+ # * Google (https://developers.google.com/speed/public-dns/)
+ 1.1.1.1
+ 9.9.9.10
+ 8.8.8.8
+ 2606:4700:4700::1111
+ 2620:fe::10
+ 2001:4860:4860::8888
+ )
+
+ local _meson_options=(
+ -Dgnu-efi=true
+ -Dima=false
+ -Dlibidn2=true
+ -Dlz4=true
+
+ -Ddbuspolicydir=/usr/share/dbus-1/system.d
+ # TODO(dreisner): consider changing this to unified
+ -Ddefault-hierarchy=hybrid
+ -Ddefault-kill-user-processes=false
+ -Dfallback-hostname='archlinux'
+ -Dntp-servers="${_timeservers[*]}"
+ -Ddns-servers="${_nameservers[*]}"
+ -Drpmmacrosdir=no
+ -Dsysvinit-path=
+ -Dsysvrcnd-path=
+ )
+
+ arch-meson "$pkgbase-stable" build "${_meson_options[@]}"
+
+ ninja -C build
+}
+
+check() {
+ meson test -C build
+}
+
+package_systemd() {
+ pkgdesc='system and service manager'
+ license=('GPL2' 'LGPL2.1')
+ groups=('base-devel')
+ depends=('acl' 'bash' 'cryptsetup' 'dbus' 'iptables' 'kbd' 'kmod' 'hwids' 'libcap'
+ 'libgcrypt' 'libsystemd' 'libidn2' 'lz4' 'pam' 'libelf' 'libseccomp'
+ 'util-linux' 'xz' 'pcre2' 'audit')
+ provides=('nss-myhostname' "systemd-tools=$pkgver" "udev=$pkgver")
+ replaces=('nss-myhostname' 'systemd-tools' 'udev')
+ conflicts=('nss-myhostname' 'systemd-tools' 'udev')
+ optdepends=('libmicrohttpd: remote journald capabilities'
+ 'quota-tools: kernel-level quota management'
+ 'systemd-sysvcompat: symlink package to provide sysvinit binaries'
+ 'polkit: allow administration as unprivileged user'
+ 'curl: machinectl pull-tar and pull-raw')
+ backup=(etc/pam.d/systemd-user
+ etc/systemd/coredump.conf
+ etc/systemd/journald.conf
+ etc/systemd/journal-remote.conf
+ etc/systemd/journal-upload.conf
+ etc/systemd/logind.conf
+ etc/systemd/system.conf
+ etc/systemd/timesyncd.conf
+ etc/systemd/resolved.conf
+ etc/systemd/user.conf
+ etc/udev/udev.conf)
+ install=systemd.install
+
+ DESTDIR="$pkgdir" meson install -C build
+
+ # don't write units to /etc by default. some of these will be re-enabled on
+ # post_install.
+ rm -rv "$pkgdir"/etc/systemd/system/*
+
+ # we'll create this on installation
+ rmdir "$pkgdir"/var/log/journal/remote
+
+ # runtime libraries shipped with libsystemd
+ install -d -m0755 libsystemd
+ mv "$pkgdir"/usr/lib/lib{nss,systemd,udev}*.so* libsystemd
+
+ # manpages shipped with systemd-sysvcompat
+ rm "$pkgdir"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8
+
+ # executable (symlinks) shipped with systemd-sysvcompat
+ rm "$pkgdir"/usr/bin/{halt,init,poweroff,reboot,runlevel,shutdown,telinit}
+
+ # files shipped with systemd-resolvconf
+ rm "$pkgdir"/usr/{bin/resolvconf,share/man/man1/resolvconf.1}
+
+ # avoid a potential conflict with [core]/filesystem
+ rm "$pkgdir"/usr/share/factory/etc/nsswitch.conf
+ sed -i '/^C \/etc\/nsswitch\.conf/d' "$pkgdir"/usr/lib/tmpfiles.d/etc.conf
+
+ # add back tmpfiles.d/legacy.conf, normally omitted without sysv-compat
+ install -m0644 $pkgbase-stable/tmpfiles.d/legacy.conf "$pkgdir"/usr/lib/tmpfiles.d
+
+ # ship default policy to leave services disabled
+ echo 'disable *' >"$pkgdir"/usr/lib/systemd/system-preset/99-default.preset
+
+ # add mkinitcpio hooks
+ install -D -m0644 initcpio-install-systemd "$pkgdir"/usr/lib/initcpio/install/systemd
+ install -D -m0644 initcpio-install-udev "$pkgdir"/usr/lib/initcpio/install/udev
+ install -D -m0644 initcpio-hook-udev "$pkgdir"/usr/lib/initcpio/hooks/udev
+
+ # ensure proper permissions for /var/log/journal
+ # The permissions are stored with named group by tar, so this works with
+ # users and groups populated by systemd-sysusers. This is only to prevent a
+ # warning from pacman as permissions are set by systemd-tmpfiles anyway.
+ install -d -o root -g systemd-journal -m 2755 "$pkgdir"/var/log/journal
+
+ # match directory owner/group and mode from [extra]/polkit
+ install -d -o root -g 102 -m 0750 "$pkgdir"/usr/share/polkit-1/rules.d
+
+ # add example bootctl configuration
+ install -D -m0644 arch.conf "$pkgdir"/usr/share/systemd/bootctl/arch.conf
+ install -D -m0644 loader.conf "$pkgdir"/usr/share/systemd/bootctl/loader.conf
+ install -D -m0644 splash-arch.bmp "$pkgdir"/usr/share/systemd/bootctl/splash-arch.bmp
+
+ # pacman hooks
+ install -D -m0755 systemd-hook "$pkgdir"/usr/share/libalpm/scripts/systemd-hook
+ install -D -m0644 -t "$pkgdir"/usr/share/libalpm/hooks *.hook
+
+ # overwrite the systemd-user PAM configuration with our own
+ install -D -m0644 systemd-user.pam "$pkgdir"/etc/pam.d/systemd-user
+}
+
+package_libsystemd() {
+ pkgdesc='systemd client libraries'
+ depends=('glibc' 'libcap' 'libgcrypt' 'lz4' 'xz')
+ license=('GPL2')
+ provides=('libsystemd.so' 'libudev.so')
+
+ install -d -m0755 "$pkgdir"/usr
+ mv libsystemd "$pkgdir"/usr/lib
+}
+
+package_systemd-resolvconf() {
+ pkgdesc='systemd resolvconf replacement'
+ license=('GPL2')
+ depends=('systemd')
+ provides=('openresolv' 'resolvconf')
+ conflicts=('openresolv')
+
+ install -d -m0755 "$pkgdir"/usr/bin
+ ln -s resolvectl "$pkgdir"/usr/bin/resolvconf
+
+ install -d -m0755 "$pkgdir"/usr/share/man/man1
+ ln -s resolvectl.1.gz "$pkgdir"/usr/share/man/man1/resolvconf.1.gz
+}
+
+package_systemd-sysvcompat() {
+ pkgdesc='sysvinit compat for systemd'
+ license=('GPL2')
+ groups=('base')
+ conflicts=('sysvinit')
+ depends=('systemd')
+
+ install -D -m0644 -t "$pkgdir"/usr/share/man/man8 \
+ build/man/{telinit,halt,reboot,poweroff,runlevel,shutdown}.8
+
+ install -d -m0755 "$pkgdir"/usr/bin
+ ln -s ../lib/systemd/systemd "$pkgdir"/usr/bin/init
+ for tool in runlevel reboot shutdown poweroff halt telinit; do
+ ln -s systemctl "$pkgdir"/usr/bin/$tool
+ done
+}
+
+# vim:ft=sh syn=sh et sw=2:
diff --git a/libre-testing/systemd/arch.conf b/libre-testing/systemd/arch.conf
new file mode 100644
index 000000000..250b7785e
--- /dev/null
+++ b/libre-testing/systemd/arch.conf
@@ -0,0 +1,7 @@
+## This is just an example config file.
+## Please edit the paths and kernel parameters according to your system.
+
+title Arch Linux
+linux /vmlinuz-linux
+initrd /initramfs-linux.img
+options root=PARTUUID=XXXX rootfstype=XXXX add_efi_memmap
diff --git a/libre-testing/systemd/initcpio-hook-udev b/libre-testing/systemd/initcpio-hook-udev
new file mode 100644
index 000000000..ea9a11f8c
--- /dev/null
+++ b/libre-testing/systemd/initcpio-hook-udev
@@ -0,0 +1,22 @@
+#!/usr/bin/ash
+
+run_earlyhook() {
+ kmod static-nodes --format=tmpfiles --output=/run/tmpfiles.d/kmod.conf
+ systemd-tmpfiles --prefix=/dev --create --boot
+ /usr/lib/systemd/systemd-udevd --daemon --resolve-names=never
+ udevd_running=1
+}
+
+run_hook() {
+ msg ":: Triggering uevents..."
+ udevadm trigger --action=add --type=subsystems
+ udevadm trigger --action=add --type=devices
+ udevadm settle
+}
+
+run_cleanuphook() {
+ udevadm control --exit
+ udevadm info --cleanup-db
+}
+
+# vim: set ft=sh ts=4 sw=4 et:
diff --git a/libre-testing/systemd/initcpio-install-systemd b/libre-testing/systemd/initcpio-install-systemd
new file mode 100644
index 000000000..8fb4441f7
--- /dev/null
+++ b/libre-testing/systemd/initcpio-install-systemd
@@ -0,0 +1,202 @@
+#!/bin/bash
+
+strip_quotes() {
+ local len=${#1} quotes=$'[\'"]' str=${!1}
+
+ if [[ ${str:0:1} = ${str: -1} && ${str:0:1} = $quotes ]]; then
+ printf -v "$1" %s "${str:1:-1}"
+ fi
+}
+
+add_udev_rule() {
+ # Add an udev rules file to the initcpio image. Dependencies on binaries
+ # will be discovered and added.
+ # $1: path to rules file (or name of rules file)
+
+ local rules= rule= key= value= binary=
+
+ rules=$(PATH=/usr/lib/udev/rules.d:/lib/udev/rules.d type -P "$1")
+ if [[ -z $rules ]]; then
+ # complain about not found rules
+ return 1
+ fi
+
+ add_file "$rules"
+
+ while IFS=, read -ra rule; do
+ # skip empty lines, comments
+ [[ -z $rule || $rule = @(+([[:space:]])|#*) ]] && continue
+
+ for pair in "${rule[@]}"; do
+ IFS=' =' read -r key value <<< "$pair"
+ case $key in
+ RUN@({program}|+)|IMPORT{program}|ENV{REMOVE_CMD})
+ strip_quotes 'value'
+ # just take the first word as the binary name
+ binary=${value%% *}
+ [[ ${binary:0:1} == '$' ]] && continue
+ if [[ ${binary:0:1} != '/' ]]; then
+ binary=$(PATH=/usr/lib/udev:/lib/udev type -P "$binary")
+ fi
+ add_binary "$binary"
+ ;;
+ esac
+ done
+ done <"$rules"
+}
+
+add_systemd_unit() {
+ # Add a systemd unit file to the initcpio image. Hard dependencies on binaries
+ # and other unit files will be discovered and added.
+ # $1: path to rules file (or name of rules file)
+
+ local unit= rule= entry= key= value= binary= dep=
+
+ unit=$(PATH=/usr/lib/systemd/system:/lib/systemd/system type -P "$1")
+ if [[ -z $unit ]]; then
+ # complain about not found unit file
+ return 1
+ fi
+
+ add_file "$unit"
+
+ while IFS='=' read -r key values; do
+ read -ra values <<< "$values"
+
+ case $key in
+ Requires|OnFailure)
+ # only add hard dependencies (not Wants)
+ map add_systemd_unit "${values[@]}"
+ ;;
+ Exec*)
+ # don't add binaries unless they are required
+ if [[ ${values[0]:0:1} != '-' ]]; then
+ add_binary "${values[0]}"
+ fi
+ ;;
+ esac
+
+ done <"$unit"
+
+ # preserve reverse soft dependency
+ for dep in {/usr,}/lib/systemd/system/*.wants/${unit##*/}; do
+ if [[ -L $dep ]]; then
+ add_symlink "$dep"
+ fi
+ done
+
+ # add hard dependencies
+ if [[ -d $unit.requires ]]; then
+ for dep in "$unit".requires/*; do
+ add_systemd_unit ${dep##*/}
+ done
+ fi
+}
+
+add_systemd_drop_in() {
+ local unit=$1 dropin_name=$2
+
+ mkdir -p "$BUILDROOT/etc/systemd/system/$unit.d"
+ cat >"$BUILDROOT/etc/systemd/system/$unit.d/$2.conf"
+}
+
+build() {
+ local rules unit
+
+ # from base
+ add_binary /bin/mount
+ add_binary /usr/bin/kmod /usr/bin/modprobe
+ add_binary /usr/lib/systemd/systemd /init
+ add_binary /usr/bin/sulogin
+
+ map add_binary \
+ /usr/bin/systemd-tmpfiles \
+ /usr/lib/systemd/systemd-hibernate-resume \
+ /usr/lib/systemd/systemd-shutdown \
+ /usr/lib/systemd/systemd-sulogin-shell \
+ /usr/lib/systemd/system-generators/systemd-fstab-generator \
+ /usr/lib/systemd/system-generators/systemd-gpt-auto-generator \
+ /usr/lib/systemd/system-generators/systemd-hibernate-resume-generator
+
+ # for journalctl in emergency shell
+ add_binary journalctl
+
+ # udev rules and systemd units
+ map add_udev_rule "$rules" \
+ 50-udev-default.rules \
+ 60-persistent-storage.rules \
+ 64-btrfs.rules \
+ 80-drivers.rules \
+ 99-systemd.rules
+
+ map add_systemd_unit \
+ initrd-cleanup.service \
+ initrd-fs.target \
+ initrd-parse-etc.service \
+ initrd-root-fs.target \
+ initrd-root-device.target \
+ initrd-switch-root.service \
+ initrd-switch-root.target \
+ initrd-udevadm-cleanup-db.service \
+ initrd.target \
+ kmod-static-nodes.service \
+ local-fs.target \
+ local-fs-pre.target \
+ paths.target \
+ reboot.target \
+ slices.target \
+ sockets.target \
+ swap.target \
+ systemd-fsck@.service \
+ systemd-hibernate-resume@.service \
+ systemd-journald.service \
+ systemd-journald-audit.socket \
+ systemd-journald-dev-log.socket \
+ systemd-modules-load.service \
+ systemd-tmpfiles-setup-dev.service \
+ systemd-udev-trigger.service \
+ systemd-udevd-control.socket \
+ systemd-udevd-kernel.socket \
+ systemd-udevd.service \
+ timers.target \
+ rescue.target \
+ emergency.target
+
+ add_symlink "/usr/lib/systemd/system/default.target" "initrd.target"
+ add_symlink "/usr/lib/systemd/system/ctrl-alt-del.target" "reboot.target"
+
+ add_binary "$(readlink -f /usr/lib/libnss_files.so)"
+ printf '%s\n' >"$BUILDROOT/etc/nsswitch.conf" \
+ 'passwd: files' \
+ 'group: files' \
+ 'shadow: files'
+
+ echo "root:x:0:0:root:/:/bin/sh" >"$BUILDROOT/etc/passwd"
+ echo "root:x:0:root" >"$BUILDROOT/etc/group"
+ echo "root::::::::" >"$BUILDROOT/etc/shadow"
+
+ add_systemd_drop_in systemd-udevd.service resolve-names <<EOF
+[Service]
+ExecStart=
+ExecStart=/usr/lib/systemd/systemd-udevd --resolve-names=never
+EOF
+
+ add_dir "/etc/modules-load.d"
+ (
+ . "$_f_config"
+ set -f
+ printf '%s\n' ${MODULES[@]} >"$BUILDROOT/etc/modules-load.d/MODULES.conf"
+ )
+}
+
+help() {
+ cat <<HELPEOF
+This will install a basic systemd setup in your initramfs, and is meant to
+replace the 'base', 'usr', 'udev' and 'resume' hooks. Other hooks with runtime
+components will need to be ported, and will not work as intended. You also may
+wish to still include the 'base' hook (before this hook) to ensure that a
+rescue shell exists on your initramfs.
+HELPEOF
+}
+
+# vim: set ft=sh ts=4 sw=4 et:
diff --git a/libre-testing/systemd/initcpio-install-udev b/libre-testing/systemd/initcpio-install-udev
new file mode 100644
index 000000000..31d982712
--- /dev/null
+++ b/libre-testing/systemd/initcpio-install-udev
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+build() {
+ local rules tool
+
+ add_binary /usr/lib/systemd/systemd-udevd
+ add_binary /usr/bin/udevadm
+ add_binary /usr/bin/systemd-tmpfiles
+
+ for rules in 50-udev-default.rules 60-persistent-storage.rules 64-btrfs.rules 80-drivers.rules; do
+ add_file "/usr/lib/udev/rules.d/$rules"
+ done
+ for tool in ata_id scsi_id; do
+ add_file "/usr/lib/udev/$tool"
+ done
+
+ add_runscript
+}
+
+help() {
+ cat <<HELPEOF
+This hook adds the udev daemon to the initramfs, allowing for dynamic loading
+of modules and reliable detection of the root device via tags (e.g. UUID or
+LABEL). Do not remove this hook unless you are using the systemd hook, or you
+know what you're doing.
+HELPEOF
+}
+
+# vim: set ft=sh ts=4 sw=4 et:
diff --git a/libre-testing/systemd/loader.conf b/libre-testing/systemd/loader.conf
new file mode 100644
index 000000000..1f7cd7ef4
--- /dev/null
+++ b/libre-testing/systemd/loader.conf
@@ -0,0 +1 @@
+default arch
diff --git a/libre-testing/systemd/splash-arch.bmp b/libre-testing/systemd/splash-arch.bmp
new file mode 100644
index 000000000..f083d4bbf
--- /dev/null
+++ b/libre-testing/systemd/splash-arch.bmp
Binary files differ
diff --git a/libre-testing/systemd/systemd-binfmt.hook b/libre-testing/systemd/systemd-binfmt.hook
new file mode 100644
index 000000000..9c31a4b16
--- /dev/null
+++ b/libre-testing/systemd/systemd-binfmt.hook
@@ -0,0 +1,10 @@
+[Trigger]
+Type = File
+Operation = Install
+Operation = Upgrade
+Target = usr/lib/binfmt.d/*.conf
+
+[Action]
+Description = Registering binary formats...
+When = PostTransaction
+Exec = /usr/share/libalpm/scripts/systemd-hook binfmt
diff --git a/libre-testing/systemd/systemd-catalog.hook b/libre-testing/systemd/systemd-catalog.hook
new file mode 100644
index 000000000..d28bddc4b
--- /dev/null
+++ b/libre-testing/systemd/systemd-catalog.hook
@@ -0,0 +1,11 @@
+[Trigger]
+Type = File
+Operation = Install
+Operation = Upgrade
+Operation = Remove
+Target = usr/lib/systemd/catalog/*
+
+[Action]
+Description = Updating journal message catalog...
+When = PostTransaction
+Exec = /usr/share/libalpm/scripts/systemd-hook catalog
diff --git a/libre-testing/systemd/systemd-daemon-reload.hook b/libre-testing/systemd/systemd-daemon-reload.hook
new file mode 100644
index 000000000..87923e862
--- /dev/null
+++ b/libre-testing/systemd/systemd-daemon-reload.hook
@@ -0,0 +1,11 @@
+[Trigger]
+Type = File
+Operation = Install
+Operation = Upgrade
+Operation = Remove
+Target = usr/lib/systemd/system/*
+
+[Action]
+Description = Reloading system manager configuration...
+When = PostTransaction
+Exec = /usr/share/libalpm/scripts/systemd-hook daemon-reload
diff --git a/libre-testing/systemd/systemd-hook b/libre-testing/systemd/systemd-hook
new file mode 100644
index 000000000..0a664f2c5
--- /dev/null
+++ b/libre-testing/systemd/systemd-hook
@@ -0,0 +1,32 @@
+#!/bin/sh -e
+
+systemd_live() {
+ if [ ! -d /run/systemd/system ]; then
+ echo >&2 " Skipped: Current root is not booted."
+ exit 0
+ fi
+}
+
+udevd_live() {
+ if [ ! -d /run/udev ]; then
+ echo >&2 " Skipped: Device manager is not running."
+ exit 0
+ fi
+}
+
+case $1 in
+ catalog) /usr/bin/journalctl --update-catalog ;;
+ hwdb) /usr/bin/systemd-hwdb --usr update ;;
+ update) touch -c /usr ;;
+ sysusers) /usr/bin/systemd-sysusers ;;
+ tmpfiles) /usr/bin/systemd-tmpfiles --create ;;
+
+ daemon-reload) systemd_live; /usr/bin/systemctl daemon-reload ;;
+ udev-reload) udevd_live; /usr/bin/udevadm control --reload ;;
+ binfmt) systemd_live; /usr/lib/systemd/systemd-binfmt ;;
+ sysctl) systemd_live; /usr/lib/systemd/systemd-sysctl ;;
+
+ *) echo >&2 " Invalid operation '$1'"; exit 1 ;;
+esac
+
+exit 0
diff --git a/libre-testing/systemd/systemd-hwdb.hook b/libre-testing/systemd/systemd-hwdb.hook
new file mode 100644
index 000000000..f0440b0a6
--- /dev/null
+++ b/libre-testing/systemd/systemd-hwdb.hook
@@ -0,0 +1,11 @@
+[Trigger]
+Type = File
+Operation = Install
+Operation = Upgrade
+Operation = Remove
+Target = usr/lib/udev/hwdb.d/*
+
+[Action]
+Description = Updating udev hardware database...
+When = PostTransaction
+Exec = /usr/share/libalpm/scripts/systemd-hook hwdb
diff --git a/libre-testing/systemd/systemd-sysctl.hook b/libre-testing/systemd/systemd-sysctl.hook
new file mode 100644
index 000000000..aec5ac1b0
--- /dev/null
+++ b/libre-testing/systemd/systemd-sysctl.hook
@@ -0,0 +1,10 @@
+[Trigger]
+Type = File
+Operation = Install
+Operation = Upgrade
+Target = usr/lib/sysctl.d/*.conf
+
+[Action]
+Description = Applying kernel sysctl settings...
+When = PostTransaction
+Exec = /usr/share/libalpm/scripts/systemd-hook sysctl
diff --git a/libre-testing/systemd/systemd-sysusers.hook b/libre-testing/systemd/systemd-sysusers.hook
new file mode 100644
index 000000000..9873dd402
--- /dev/null
+++ b/libre-testing/systemd/systemd-sysusers.hook
@@ -0,0 +1,10 @@
+[Trigger]
+Type = File
+Operation = Install
+Operation = Upgrade
+Target = usr/lib/sysusers.d/*.conf
+
+[Action]
+Description = Creating system user accounts...
+When = PostTransaction
+Exec = /usr/share/libalpm/scripts/systemd-hook sysusers
diff --git a/libre-testing/systemd/systemd-tmpfiles.hook b/libre-testing/systemd/systemd-tmpfiles.hook
new file mode 100644
index 000000000..df60d8275
--- /dev/null
+++ b/libre-testing/systemd/systemd-tmpfiles.hook
@@ -0,0 +1,10 @@
+[Trigger]
+Type = File
+Operation = Install
+Operation = Upgrade
+Target = usr/lib/tmpfiles.d/*.conf
+
+[Action]
+Description = Creating temporary files...
+When = PostTransaction
+Exec = /usr/share/libalpm/scripts/systemd-hook tmpfiles
diff --git a/libre-testing/systemd/systemd-udev-reload.hook b/libre-testing/systemd/systemd-udev-reload.hook
new file mode 100644
index 000000000..04238bd58
--- /dev/null
+++ b/libre-testing/systemd/systemd-udev-reload.hook
@@ -0,0 +1,11 @@
+[Trigger]
+Type = File
+Operation = Install
+Operation = Upgrade
+Operation = Remove
+Target = usr/lib/udev/rules.d/*
+
+[Action]
+Description = Reloading device manager configuration...
+When = PostTransaction
+Exec = /usr/share/libalpm/scripts/systemd-hook udev-reload
diff --git a/libre-testing/systemd/systemd-update.hook b/libre-testing/systemd/systemd-update.hook
new file mode 100644
index 000000000..7084a0c16
--- /dev/null
+++ b/libre-testing/systemd/systemd-update.hook
@@ -0,0 +1,11 @@
+[Trigger]
+Type = File
+Operation = Install
+Operation = Upgrade
+Operation = Remove
+Target = usr/
+
+[Action]
+Description = Arming ConditionNeedsUpdate...
+When = PostTransaction
+Exec = /usr/share/libalpm/scripts/systemd-hook update
diff --git a/libre-testing/systemd/systemd-user.pam b/libre-testing/systemd/systemd-user.pam
new file mode 100644
index 000000000..83f762696
--- /dev/null
+++ b/libre-testing/systemd/systemd-user.pam
@@ -0,0 +1,5 @@
+# Used by systemd --user instances.
+
+account include system-login
+session required pam_loginuid.so
+session include system-login
diff --git a/libre-testing/systemd/systemd.install b/libre-testing/systemd/systemd.install
new file mode 100644
index 000000000..fedc747ea
--- /dev/null
+++ b/libre-testing/systemd/systemd.install
@@ -0,0 +1,99 @@
+#!/bin/bash
+
+sd_booted() {
+ [[ -d run/systemd/system && ! -L run/systemd/system ]]
+}
+
+add_journal_acls() {
+ # ignore errors, since the filesystem might not support ACLs
+ setfacl -Rnm g:wheel:rx,d:g:wheel:rx,g:adm:rx,d:g:adm:rx var/log/journal/ 2>/dev/null
+ :
+}
+
+post_common() {
+ systemd-sysusers
+ journalctl --update-catalog
+}
+
+_216_2_changes() {
+ echo ':: Coredumps are handled by systemd by default. Collection behavior can be'
+ echo ' tuned in /etc/systemd/coredump.conf.'
+}
+
+_219_2_changes() {
+ if mkdir -m2755 var/log/journal/remote 2>/dev/null; then
+ chgrp systemd-journal-remote var/log/journal/remote
+ fi
+}
+
+_219_4_changes() {
+ if ! systemctl is-enabled -q remote-fs.target; then
+ systemctl enable -q remote-fs.target
+ fi
+}
+
+_230_1_changes() {
+ echo ':: systemd-bootchart is no longer included with systemd'
+}
+
+_232_8_changes() {
+ # paper over possible effects of CVE-2016-10156
+ local stamps=(/var/lib/systemd/timers/*.timer)
+
+ if [[ -f ${stamps[0]} ]]; then
+ chmod 0644 "${stamps[@]}"
+ fi
+}
+
+_233_75_3_changes() {
+ # upstream installs services to /etc, which we remove
+ # to keep bus activation we re-enable systemd-resolved
+ if systemctl is-enabled -q systemd-resolved.service; then
+ systemctl reenable systemd-resolved.service 2>/dev/null
+ fi
+}
+
+post_install() {
+ systemd-machine-id-setup
+
+ post_common "$@"
+
+ add_journal_acls
+
+ # enable some services by default, but don't track them
+ systemctl enable getty@tty1.service remote-fs.target
+
+ echo ":: Append 'init=/usr/lib/systemd/systemd' to your kernel command line in your"
+ echo " bootloader to replace sysvinit with systemd, or install systemd-sysvcompat"
+
+ # group 'systemd-journal-remote' is created by systemd-sysusers
+ mkdir -m2755 var/log/journal/remote
+ chgrp systemd-journal-remote var/log/journal/remote
+}
+
+post_upgrade() {
+ post_common "$@"
+
+ # don't reexec if the old version is 231-1 or 231-2.
+ # https://github.com/systemd/systemd/commit/bd64d82c1c
+ if [[ $1 != 231-[12] ]] && sd_booted; then
+ systemctl --system daemon-reexec
+ fi
+
+ local v upgrades=(
+ 216-2
+ 219-2
+ 219-4
+ 230-1
+ 232-8
+ 233.75-3
+ )
+
+ for v in "${upgrades[@]}"; do
+ if [[ $(vercmp "$v" "$2") -eq 1 ]]; then
+ "_${v//[.-]/_}_changes"
+ fi
+ done
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/libre-testing/tar/PKGBUILD b/libre-testing/tar/PKGBUILD
new file mode 100644
index 000000000..580cc67d4
--- /dev/null
+++ b/libre-testing/tar/PKGBUILD
@@ -0,0 +1,49 @@
+# Mainainer: Sébastien "Seblu" Luttringer <seblu@archlinux.org>
+# Contributor: Allan McRae <allan@archlinux.org>
+# Contributor: Andreas Radke <andyrtr@archlinux.org>
+
+pkgname=tar
+pkgver=1.30
+pkgrel=1
+pkgdesc='Utility used to store, backup, and transport files'
+arch=('x86_64' 'ppc64le')
+url='https://www.gnu.org/software/tar/'
+license=('GPL3')
+groups=('base')
+depends=('glibc' 'acl' 'attr')
+options=('!emptydirs')
+validpgpkeys=('325F650C4C2B6AD58807327A3602B07F55D0C732') # Sergey Poznyakoff
+source=("https://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz"{,.sig})
+md5sums=('2d01c6cd1387be98f57a0ec4e6e35826'
+ 'SKIP')
+
+prepare() {
+ cd $pkgname-$pkgver
+ # apply patch from the source array (should be a pacman feature)
+ local filename
+ for filename in "${source[@]}"; do
+ if [[ "$filename" =~ \.patch$ ]]; then
+ msg2 "Applying patch ${filename##*/}"
+ patch -p1 -N -i "$srcdir/${filename##*/}"
+ fi
+ done
+ :
+}
+
+build() {
+ cd $pkgname-$pkgver
+ ./configure --prefix=/usr --libexecdir=/usr/lib/tar
+ make
+}
+
+check() {
+ cd $pkgname-$pkgver
+ make check
+}
+
+package() {
+ cd $pkgname-$pkgver
+ make DESTDIR="$pkgdir" install
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/libre-testing/texinfo/PKGBUILD b/libre-testing/texinfo/PKGBUILD
new file mode 100644
index 000000000..32b5c26fb
--- /dev/null
+++ b/libre-testing/texinfo/PKGBUILD
@@ -0,0 +1,38 @@
+# Maintainer: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
+# Contributor: Allan McRae <allan@archlinux.org>
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+
+pkgname=texinfo
+pkgver=6.5
+pkgrel=1
+pkgdesc='GNU documentation system for on-line information and printed output'
+arch=('x86_64' 'ppc64le')
+url='http://www.gnu.org/software/texinfo/'
+license=(GPL3)
+groups=(base base-devel)
+depends=(ncurses gzip perl sh)
+source=(https://ftp.gnu.org/pub/gnu/$pkgname/$pkgname-$pkgver.tar.xz{,.sig}
+ texinfo-install.hook
+ texinfo-remove.hook)
+md5sums=('3715197e62e0e07f85860b3d7aab55ed'
+ 'SKIP'
+ '9a98fb162650ff3065f9a4ebec22db36'
+ '5590fb3ef9ec309c98f5a4d85eca49da')
+validpgpkeys=('EAF669B31E31E1DECBD11513DDBC579DAB37FBA9') # Gavin Smith
+
+build() {
+ cd $pkgname-$pkgver
+ ./configure --prefix=/usr
+ make
+}
+
+check() {
+ make -C $pkgname-$pkgver check
+}
+
+package() {
+ make -C $pkgname-$pkgver DESTDIR="$pkgdir" install
+
+ install -dm755 "$pkgdir"/usr/share/libalpm/hooks/
+ install -m644 texinfo-{install,remove}.hook "$pkgdir"/usr/share/libalpm/hooks/
+}
diff --git a/libre-testing/texinfo/texinfo-install.hook b/libre-testing/texinfo/texinfo-install.hook
new file mode 100644
index 000000000..80f789629
--- /dev/null
+++ b/libre-testing/texinfo/texinfo-install.hook
@@ -0,0 +1,11 @@
+[Trigger]
+Type = File
+Operation = Install
+Operation = Upgrade
+Target = usr/share/info/*
+
+[Action]
+Description = Updating the info directory file...
+When = PostTransaction
+Exec = /bin/sh -c 'while read -r f; do install-info "$f" /usr/share/info/dir 2> /dev/null; done'
+NeedsTargets
diff --git a/libre-testing/texinfo/texinfo-remove.hook b/libre-testing/texinfo/texinfo-remove.hook
new file mode 100644
index 000000000..e57e66637
--- /dev/null
+++ b/libre-testing/texinfo/texinfo-remove.hook
@@ -0,0 +1,10 @@
+[Trigger]
+Type = File
+Operation = Remove
+Target = usr/share/info/*
+
+[Action]
+Description = Removing old entries from the info directory file...
+When = PreTransaction
+Exec = /bin/sh -c 'while read -r f; do install-info --delete "$f" /usr/share/info/dir 2> /dev/null; done'
+NeedsTargets
diff --git a/libre-testing/usbutils/PKGBUILD b/libre-testing/usbutils/PKGBUILD
new file mode 100644
index 000000000..c1fbd11cf
--- /dev/null
+++ b/libre-testing/usbutils/PKGBUILD
@@ -0,0 +1,30 @@
+# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
+# Contributor: Tom Gundersen <teg@jklm.no>
+# Contributor: Judd Vinet <jvinet@zeroflux.org>
+# Contributor: Curtis Campbell <curtisjamescampbell@hotmail.com>
+pkgname=usbutils
+pkgver=010
+pkgrel=1
+pkgdesc="USB Device Utilities"
+arch=('x86_64' 'ppc64le')
+license=('GPL')
+groups=('base')
+depends=('libusb' 'hwids')
+optdepends=('python: for lsusb.py usage'
+ 'coreutils: for lsusb.py usage')
+url="http://linux-usb.sourceforge.net/"
+source=("http://www.kernel.org/pub/linux/utils/usb/usbutils/${pkgname}-${pkgver}.tar.xz")
+md5sums=('938e3707593974be99a0dd6d1de76671')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ ./configure --prefix=/usr --datadir=/usr/share/hwdata --disable-zlib
+ make
+}
+
+package() {
+ cd $srcdir/$pkgname-$pkgver
+ make DESTDIR=$pkgdir install
+ # this is now in the hwids package
+ rm -rf $pkgdir/usr/{share/hwdata,sbin}
+}
diff --git a/libre-testing/vi/PKGBUILD b/libre-testing/vi/PKGBUILD
new file mode 100644
index 000000000..dc7860a51
--- /dev/null
+++ b/libre-testing/vi/PKGBUILD
@@ -0,0 +1,51 @@
+# Maintainer: Evangelos Foutras <evangelos@foutrelis.com>
+# Contributor: Eric Bélanger <eric@archlinux.org>
+
+pkgname=vi
+pkgver=070224
+pkgrel=3
+epoch=1
+pkgdesc="The original ex/vi text editor"
+arch=('x86_64' 'ppc64le')
+url="http://ex-vi.sourceforge.net/"
+license=('custom:ex')
+groups=('base')
+depends=('ncurses')
+optdepends=('s-nail: used by the preserve command for notification')
+source=(https://sources.archlinux.org/other/$pkgname/ex-$pkgver.tar.xz{,.sig}
+ fix-tubesize-short-overflow.patch
+ navkeys.patch
+ preserve-dir.patch)
+sha256sums=('c3e52dd44edd1f6bf0b52207f717c56149dc50aac0d131fff3851d589727f52f'
+ 'SKIP'
+ '42167fabebe30a13d594346b1d254db82090ba41742a9f35b8895d37092053f0'
+ '0e9e2d381f1d8cb86daae68462b3849825b003c08007725c0db9939d3d5bf58d'
+ 'f0ef9ed2ccea98bf47b08dd3faa2abb911b4e6c0579f5294e9d0e8742282ff65')
+validpgpkeys=('86CFFCA918CF3AF47147588051E8B148A9999C34')
+
+prepare() {
+ cd ex-$pkgver
+
+ patch -Np1 -i ../fix-tubesize-short-overflow.patch
+ patch -Np1 -i ../navkeys.patch
+
+ # https://bugs.archlinux.org/task/20653
+ patch -Np1 -i ../preserve-dir.patch
+}
+
+build() {
+ cd ex-$pkgver
+
+ make PREFIX=/usr LIBEXECDIR=/usr/lib/ex PRESERVEDIR=/var/lib/ex \
+ TERMLIB=ncurses FEATURES="-DCHDIR -DFASTTAG -DUCVISUAL -DMB -DBIT8"
+}
+
+package() {
+ cd ex-$pkgver
+
+ make PREFIX=/usr LIBEXECDIR=/usr/lib/ex PRESERVEDIR=/var/lib/ex \
+ INSTALL=/usr/bin/install DESTDIR="$pkgdir" install
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/libre-testing/vi/fix-tubesize-short-overflow.patch b/libre-testing/vi/fix-tubesize-short-overflow.patch
new file mode 100644
index 000000000..46cc2af28
--- /dev/null
+++ b/libre-testing/vi/fix-tubesize-short-overflow.patch
@@ -0,0 +1,12 @@
+diff -upr ex-070224.orig/ex_vis.h ex-070224/ex_vis.h
+--- ex-070224.orig/ex_vis.h 2005-08-06 14:41:15.000000000 +0300
++++ ex-070224/ex_vis.h 2015-05-02 20:41:13.938665281 +0300
+@@ -104,7 +104,7 @@ var enum {
+ */
+ var short TUBELINES;
+ var short TUBECOLS;
+-var short TUBESIZE;
++var int TUBESIZE;
+
+ /*
+ * The screen in visual and crtopen is of varying size; the basic
diff --git a/libre-testing/vi/navkeys.patch b/libre-testing/vi/navkeys.patch
new file mode 100644
index 000000000..46924379c
--- /dev/null
+++ b/libre-testing/vi/navkeys.patch
@@ -0,0 +1,55 @@
+diff -ru ex-050325/ex_tty.c ex-050325-du/ex_tty.c
+--- ex-050325/ex_tty.c 2005-03-04 13:42:58.000000000 +0100
++++ ex-050325-du/ex_tty.c 2009-06-25 20:06:57.000000000 +0200
+@@ -132,7 +132,8 @@
+ &ED, &EI, &F0, &F1, &F2, &F3, &F4, &F5, &F6, &F7, &F8, &F9,
+ &HO, &IC, &IM, &IP, &KD, &KE, &KH, &KL, &KR, &KS, &KU, &LL, &ND, &xNL,
+ &xPC, &RC, &SC, &SE, &SF, &SO, &SR, &TA, &TE, &TI, &UP, &VB, &VS, &VE,
+- &AL_PARM, &DL_PARM, &UP_PARM, &DOWN_PARM, &LEFT_PARM, &RIGHT_PARM
++ &AL_PARM, &DL_PARM, &UP_PARM, &DOWN_PARM, &LEFT_PARM, &RIGHT_PARM,
++ &kI, &kD, &kh, &at7, &kP, &kN
+ };
+ bool *sflags[] = {
+ &AM, &BS, &DA, &DB, &EO, &HC,
+@@ -170,7 +171,12 @@
+ addmac1(KD, "j", "down", arrows, 1);
+ addmac1(KL, "h", "left", arrows, 1);
+ addmac1(KR, "l", "right", arrows, 1);
+- addmac1(KH, "H", "home", arrows, 1);
++ addmac1(kI, "i", "insert", arrows, 1);
++ addmac1(kD, "x", "delete", arrows, 1);
++ addmac1(kh, "^", "home", arrows, 1);
++ addmac1(at7, "$", "end", arrows, 1);
++ addmac1(kP, "", "pgup", arrows, 1);
++ addmac1(kN, "", "pgdn", arrows, 1);
+
+ /*
+ * Handle funny termcap capabilities
+@@ -341,7 +347,7 @@
+ *(*fp++) = flag;
+ namp += 2;
+ } while (*namp);
+- namp = "albcbtcdceclcmcrcsdcdldmdoedeik0k1k2k3k4k5k6k7k8k9hoicimipkdkekhklkrkskullndnlpcrcscsesfsosrtatetiupvbvsveALDLUPDOLERI";
++ namp = "albcbtcdceclcmcrcsdcdldmdoedeik0k1k2k3k4k5k6k7k8k9hoicimipkdkekhklkrkskullndnlpcrcscsesfsosrtatetiupvbvsveALDLUPDOLERIkIkDkh@7kPkN";
+ sp = sstrs;
+ do {
+ string = tgetstr(namp, &aoftspace);
+diff -ru ex-050325/ex_tty.h ex-050325-du/ex_tty.h
+--- ex-050325/ex_tty.h 2004-12-01 19:21:06.000000000 +0100
++++ ex-050325-du/ex_tty.h 2009-06-25 20:06:05.000000000 +0200
+@@ -183,6 +183,15 @@
+ var bool XX; /* Tektronix 4025 insert line */
+ /* X? is reserved for severely nauseous glitches */
+ /* If there are enough of these we may need bit masks! */
++/*
++ * Insert, Delete, Home, End, PgUp an PgDown keys
++ */
++var char *kI;
++var char *kD;
++var char *kh;
++var char *at7;
++var char *kP;
++var char *kN;
+
+ /*
+ * From the tty modes...
diff --git a/libre-testing/vi/preserve-dir.patch b/libre-testing/vi/preserve-dir.patch
new file mode 100644
index 000000000..ddfe8783a
--- /dev/null
+++ b/libre-testing/vi/preserve-dir.patch
@@ -0,0 +1,99 @@
+diff -Naur ex-050325.ori/ex.1 ex-050325/ex.1
+--- ex-050325.ori/ex.1 2005-02-17 07:39:36.000000000 -0500
++++ ex-050325/ex.1 2011-02-01 16:21:51.496666674 -0500
+@@ -1950,7 +1950,7 @@
+ .B /var/tmp/Rx\fInnnnnnnnnn\fP
+ named buffer temporary
+ .TP
+-.B /var/preserve
++.B /var/lib/ex
+ preservation directory
+ .SH DOCUMENTATION
+ The document
+diff -Naur ex-050325.ori/expreserve.c ex-050325/expreserve.c
+--- ex-050325.ori/expreserve.c 2005-03-04 07:44:46.000000000 -0500
++++ ex-050325/expreserve.c 2011-02-01 16:22:06.583333342 -0500
+@@ -272,7 +272,7 @@
+ #ifdef notdef
+ char pattern[] = "/usr/preserve/Exaa`XXXXX";
+ #else
+-char pattern[] = "/var/preserve/Exa`XXXXXXXXXX";
++char pattern[] = "/var/lib/ex/Exa`XXXXXXXXXX";
+ #endif
+
+ /*
+@@ -296,7 +296,7 @@
+ timestamp = ctime(&time);
+ timestamp[16] = 0; /* blast from seconds on */
+ putenv("MAILRC=/dev/null");
+- sprintf(cmd, "/bin/mail %s", pp->pw_name);
++ sprintf(cmd, "/usr/bin/mail %s", pp->pw_name);
+ setuid(getuid());
+ mf = popen(cmd, "w");
+ if (mf == NULL)
+diff -Naur ex-050325.ori/exrecover.c ex-050325/exrecover.c
+--- ex-050325.ori/exrecover.c 2005-03-04 07:44:46.000000000 -0500
++++ ex-050325/exrecover.c 2011-02-01 16:21:51.496666674 -0500
+@@ -167,7 +167,7 @@
+ #ifdef notdef
+ char mydir[] = "/usr/preserve";
+ #else
+-char mydir[] = "/var/preserve";
++char mydir[] = "/var/lib/ex";
+ #endif
+
+ /*
+diff -Naur ex-050325.ori/Makefile ex-050325/Makefile
+--- ex-050325.ori/Makefile 2005-03-24 18:50:09.000000000 -0500
++++ ex-050325/Makefile 2011-02-01 16:21:51.496666674 -0500
+@@ -83,7 +83,7 @@
+ BINDIR = $(PREFIX)/bin
+ LIBEXECDIR = $(PREFIX)/libexec
+ MANDIR = $(PREFIX)/share/man
+-PRESERVEDIR = /var/preserve
++PRESERVEDIR = /var/lib/ex
+
+ #
+ # DESTDIR is prepended to the installation paths. It is mostly useful
+diff -Naur ex-050325.ori/vi.1 ex-050325/vi.1
+--- ex-050325.ori/vi.1 2005-02-17 07:39:36.000000000 -0500
++++ ex-050325/vi.1 2011-02-01 16:21:51.496666674 -0500
+@@ -979,7 +979,7 @@
+ .B /var/tmp/Rx\fInnnnnnnnnn\fP
+ named buffer temporary
+ .TP
+-.B /var/preserve
++.B /var/lib/ex
+ preservation directory
+ .SH SEE ALSO
+ ex(1),
+--- ex-050325.original/ex.1 2012-01-27 20:43:00.602119283 +0100
++++ ex-050325/ex.1 2012-01-27 20:47:24.535436516 +0100
+@@ -1932,10 +1932,10 @@
+ Determines the terminal type.
+ .SH FILES
+ .TP
+-.B /usr/libexec/expreserve
++.B /usr/lib/ex/expreserve
+ preserve command
+ .TP
+-.B /usr/libexec/exrecover
++.B /usr/lib/ex/exrecover
+ recover command
+ .TP
+ .B /etc/termcap
+--- ex-050325.original/vi.1 2012-01-27 20:43:00.602119283 +0100
++++ ex-050325/vi.1 2012-01-27 20:46:33.815439611 +0100
+@@ -961,10 +961,10 @@
+ Determines the terminal type.
+ .SH FILES
+ .TP
+-.B /usr/libexec/expreserve
++.B /usr/lib/ex/expreserve
+ preserve command
+ .TP
+-.B /usr/libexec/exrecover
++.B /usr/lib/ex/exrecover
+ recover command
+ .TP
+ .B /etc/termcap
diff --git a/libre-testing/which/PKGBUILD b/libre-testing/which/PKGBUILD
new file mode 100644
index 000000000..e7e8662bd
--- /dev/null
+++ b/libre-testing/which/PKGBUILD
@@ -0,0 +1,30 @@
+# Maintainer: Sébastien Luttringer <seblu@archlinux.org>
+# Contributor: Allan McRae <allan@archlinux.org>
+# Contributor: Andreas Radke <andyrtr@archlinux.org>
+
+pkgname=which
+pkgver=2.21
+pkgrel=2
+pkgdesc='A utility to show the full path of commands'
+arch=('x86_64' 'ppc64le')
+url='https://savannah.gnu.org/projects/which/'
+license=('GPL3')
+groups=('base' 'base-devel')
+depends=('glibc' 'bash')
+# gpg key is using deprecated md5 algo, do not use
+# check if a new one is issued in the next release
+source=("https://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.gz")
+md5sums=('097ff1a324ae02e0a3b0369f07a7544a')
+
+build() {
+ cd $pkgname-$pkgver
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd $pkgname-$pkgver
+ make DESTDIR="$pkgdir" install
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/libre-testing/xfsprogs/PKGBUILD b/libre-testing/xfsprogs/PKGBUILD
new file mode 100644
index 000000000..4ebfc1674
--- /dev/null
+++ b/libre-testing/xfsprogs/PKGBUILD
@@ -0,0 +1,33 @@
+#
+pkgname=xfsprogs
+pkgver=4.18.0
+pkgrel=1
+pkgdesc="XFS filesystem utilities"
+arch=('x86_64' 'ppc64le')
+license=('LGPL')
+url="http://xfs.org"
+groups=('base')
+depends=('sh' 'libutil-linux' 'readline')
+makedepends=('git')
+options=('!makeflags')
+source=("git+https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git#tag=v${pkgver}")
+md5sums=('SKIP')
+
+build() {
+ cd "${srcdir}/${pkgname}-dev"
+ make configure
+ export OPTIMIZER="-mcpu=${CARCH/_/-} -O1"
+ export DEBUG=-DNDEBUG
+ ./configure --prefix=/usr --sbindir=/usr/bin --enable-readline
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-dev"
+ make DIST_ROOT="${pkgdir}" PKG_ROOT_SBIN_DIR="/usr/bin" install install-dev
+ chown -R root $pkgdir
+ chgrp -R root $pkgdir
+ # add hack as we cannot set rootlibdir
+ mv "${pkgdir}"/lib/libhandle.so* "${pkgdir}/usr/lib/"
+ rm -rf "${pkgdir}/lib"
+}