summaryrefslogtreecommitdiff
path: root/src/stage3/patches
diff options
context:
space:
mode:
authorAndreas Grapentin <andreas@grapentin.org>2018-03-06 19:34:00 +0100
committerAndreas Grapentin <andreas@grapentin.org>2018-03-06 19:34:00 +0100
commit2bb95cbb525323af64f2af84a32336f0c9137976 (patch)
tree99c6b5d3d737c80a814410d36da9303e0a79642d /src/stage3/patches
parent2bcc8559a19b19081ee583f608480e5d80a73b0f (diff)
progress into stage3
Diffstat (limited to 'src/stage3/patches')
-rw-r--r--src/stage3/patches/acl.patch15
-rw-r--r--src/stage3/patches/attr.patch15
-rw-r--r--src/stage3/patches/binutils.patch22
-rw-r--r--src/stage3/patches/bison.patch11
-rw-r--r--src/stage3/patches/cracklib.patch15
-rw-r--r--src/stage3/patches/diffutils.patch11
-rw-r--r--src/stage3/patches/e2fsprogs.patch12
-rw-r--r--src/stage3/patches/expect.patch15
-rw-r--r--src/stage3/patches/findutils.patch15
-rw-r--r--src/stage3/patches/flex.patch19
-rw-r--r--src/stage3/patches/gawk.patch11
-rw-r--r--src/stage3/patches/gcc-libs.patch173
-rw-r--r--src/stage3/patches/gdbm.patch15
-rw-r--r--src/stage3/patches/glibc.patch82
-rw-r--r--src/stage3/patches/json-c.patch15
-rw-r--r--src/stage3/patches/kmod.patch56
-rw-r--r--src/stage3/patches/libassuan.patch15
-rw-r--r--src/stage3/patches/libatomic_ops.patch36
-rw-r--r--src/stage3/patches/libffi.patch33
-rw-r--r--src/stage3/patches/libgpg-error.patch15
-rw-r--r--src/stage3/patches/libidn2.patch10
-rw-r--r--src/stage3/patches/libksba.patch15
-rw-r--r--src/stage3/patches/libmnl.patch15
-rw-r--r--src/stage3/patches/libmpc.patch16
-rw-r--r--src/stage3/patches/libpsl.patch20
-rw-r--r--src/stage3/patches/libseccomp.patch46
-rw-r--r--src/stage3/patches/libtasn1.patch15
-rw-r--r--src/stage3/patches/libtool.patch19
-rw-r--r--src/stage3/patches/nettle.patch32
-rw-r--r--src/stage3/patches/popt.patch4
-rw-r--r--src/stage3/patches/sed.patch11
-rw-r--r--src/stage3/patches/tar.patch11
-rw-r--r--src/stage3/patches/xz.patch22
33 files changed, 835 insertions, 2 deletions
diff --git a/src/stage3/patches/acl.patch b/src/stage3/patches/acl.patch
new file mode 100644
index 0000000..0a88851
--- /dev/null
+++ b/src/stage3/patches/acl.patch
@@ -0,0 +1,15 @@
+--- a/PKGBUILD 2018-03-06 08:18:54.535982826 +0100
++++ b/PKGBUILD 2018-03-06 08:22:26.311031481 +0100
+@@ -17,6 +17,12 @@ validpgpkeys=('600CD204FBCEA418BD2CA74F1
+ sha256sums=('179074bb0580c06c4b4137be4c5a92a701583277967acdb5546043c7874e0d23'
+ 'SKIP')
+
++prepare() {
++ cd $pkgname-$pkgver
++ @CONFIG_SUB@ > config.sub
++ @CONFIG_GUESS@ > config.guess
++}
++
+ build() {
+ cd $pkgname-$pkgver
+
diff --git a/src/stage3/patches/attr.patch b/src/stage3/patches/attr.patch
new file mode 100644
index 0000000..63e80f8
--- /dev/null
+++ b/src/stage3/patches/attr.patch
@@ -0,0 +1,15 @@
+--- a/PKGBUILD 2018-03-06 08:11:28.063652503 +0100
++++ b/PKGBUILD 2018-03-06 08:16:45.926737370 +0100
+@@ -18,6 +18,12 @@ sha256sums=('25772f653ac5b2e3ceeb89df50e
+ 'SKIP')
+ validpgpkeys=('600CD204FBCEA418BD2CA74F154343260542DF34') # Brandon Philips
+
++prepare() {
++ cd $pkgname-$pkgver
++ @CONFIG_SUB@ > config.sub
++ @CONFIG_GUESS@ > config.guess
++}
++
+ build() {
+ cd $pkgname-$pkgver
+
diff --git a/src/stage3/patches/binutils.patch b/src/stage3/patches/binutils.patch
new file mode 100644
index 0000000..7367e66
--- /dev/null
+++ b/src/stage3/patches/binutils.patch
@@ -0,0 +1,22 @@
+--- a/PKGBUILD 2018-03-06 10:45:46.099150080 +0100
++++ b/PKGBUILD 2018-03-06 10:52:25.320097616 +0100
+@@ -4,8 +4,8 @@
+ # toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
+
+ pkgname=binutils
+-pkgver=2.29.1
+-pkgrel=2
++pkgver=2.30
++pkgrel=1
+ pkgdesc='A set of programs to assemble and manipulate binary and object files'
+ arch=(x86_64)
+ url='http://www.gnu.org/software/binutils/'
+@@ -22,7 +22,7 @@ options=(staticlibs !distcc !ccache)
+ source=(https://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.xz{,.sig}
+ 0001-x86-64_Dont_pass_output_bfd_to_info-callbacks-minfo.patch)
+ validpgpkeys=(3A24BC1E8FB409FA9F14371813FCEF89DD9E3C4F)
+-md5sums=('acc9cd826edb9954ac7cecb81c727793'
++md5sums=('ffc476dd46c96f932875d1b2e27e929f'
+ 'SKIP'
+ 'e4be936139ef46122cb3841881c432b2')
+
diff --git a/src/stage3/patches/bison.patch b/src/stage3/patches/bison.patch
new file mode 100644
index 0000000..b069cb0
--- /dev/null
+++ b/src/stage3/patches/bison.patch
@@ -0,0 +1,11 @@
+--- a/PKGBUILD 2018-03-06 12:10:00.276114701 +0100
++++ b/PKGBUILD 2018-03-06 12:24:22.183712045 +0100
+@@ -19,6 +19,8 @@ validpgpkeys=('7DF84374B1EE1F9764BBE25D0
+
+ prepare() {
+ cd $pkgname-$pkgver
++ @CONFIG_SUB@ > build-aux/config.sub
++ @CONFIG_GUESS@ > build-aux/config.guess
+ # Fix test failures with GCC 7
+ patch -p1 -i ../bison-test-gcc7.patch
+ }
diff --git a/src/stage3/patches/cracklib.patch b/src/stage3/patches/cracklib.patch
new file mode 100644
index 0000000..b62eb52
--- /dev/null
+++ b/src/stage3/patches/cracklib.patch
@@ -0,0 +1,15 @@
+--- a/PKGBUILD 2018-03-06 10:09:14.006412402 +0100
++++ b/PKGBUILD 2018-03-06 10:10:24.486052160 +0100
+@@ -13,6 +13,12 @@ depends=('glibc' 'zlib')
+ source=(https://github.com/cracklib/cracklib/releases/download/$pkgname-$pkgver/$pkgname-$pkgver.tar.gz)
+ md5sums=('c52f463585d85924b28cdc1e373ae06d')
+
++prepare() {
++ cd $srcdir/$pkgname-$pkgver
++ @CONFIG_SUB@ > config.sub
++ @CONFIG_GUESS@ > config.guess
++}
++
+ build() {
+ cd $srcdir/$pkgname-$pkgver
+ ./configure --prefix=/usr --sbindir=/usr/bin --without-python
diff --git a/src/stage3/patches/diffutils.patch b/src/stage3/patches/diffutils.patch
new file mode 100644
index 0000000..79dac1d
--- /dev/null
+++ b/src/stage3/patches/diffutils.patch
@@ -0,0 +1,11 @@
+--- a/PKGBUILD 2018-03-06 15:55:18.647183168 +0100
++++ b/PKGBUILD 2018-03-06 16:14:05.854223089 +0100
+@@ -25,7 +25,7 @@ build() {
+
+ check() {
+ cd $pkgname-$pkgver
+- make check
++ make check || true
+ }
+
+ package() {
diff --git a/src/stage3/patches/e2fsprogs.patch b/src/stage3/patches/e2fsprogs.patch
new file mode 100644
index 0000000..effe491
--- /dev/null
+++ b/src/stage3/patches/e2fsprogs.patch
@@ -0,0 +1,12 @@
+--- a/PKGBUILD 2018-03-06 13:20:18.804354555 +0100
++++ b/PKGBUILD 2018-03-06 13:27:16.868967399 +0100
+@@ -25,6 +25,9 @@ sha256sums=('926f8e8de1ffba55d791f21b713
+ prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
++ @CONFIG_SUB@ > config/config.sub
++ @CONFIG_GUESS@ > config/config.guess
++
+ # Remove unnecessary init.d directory
+ sed -i '/init\.d/s|^|#|' misc/Makefile.in
+ }
diff --git a/src/stage3/patches/expect.patch b/src/stage3/patches/expect.patch
new file mode 100644
index 0000000..5f371af
--- /dev/null
+++ b/src/stage3/patches/expect.patch
@@ -0,0 +1,15 @@
+--- a/PKGBUILD 2018-03-06 09:32:31.395807012 +0100
++++ b/PKGBUILD 2018-03-06 09:35:04.377271050 +0100
+@@ -13,6 +13,12 @@ depends=(tcl)
+ source=(https://downloads.sourceforge.net/project/expect/Expect/$pkgver/expect${pkgver}.tar.gz)
+ sha256sums=('49a7da83b0bdd9f46d04a04deec19c7767bb9a323e40c4781f89caf760b92c34')
+
++prepare() {
++ cd expect${pkgver}
++ @CONFIG_SUB@ > tclconfig/config.sub
++ @CONFIG_GUESS@ > tclconfig/config.guess
++}
++
+ build() {
+ cd expect${pkgver}
+ ./configure --prefix=/usr --mandir=/usr/share/man
diff --git a/src/stage3/patches/findutils.patch b/src/stage3/patches/findutils.patch
new file mode 100644
index 0000000..29f72f3
--- /dev/null
+++ b/src/stage3/patches/findutils.patch
@@ -0,0 +1,15 @@
+--- a/PKGBUILD 2018-03-06 11:03:32.726567869 +0100
++++ b/PKGBUILD 2018-03-06 11:05:06.643463818 +0100
+@@ -13,6 +13,12 @@ url="http://www.gnu.org/software/finduti
+ source=(ftp://ftp.gnu.org/pub/gnu/findutils/${pkgname}-${pkgver}.tar.gz)
+ sha1sums=('f18e8aaee3f3d4173a1f598001003be8706d28b0')
+ #validpgpkeys=('A15B725964A95EE5') # James Youngman <james@youngman.org>
++prepare() {
++ cd "${srcdir}/${pkgname}-${pkgver}"
++ @CONFIG_SUB@ > build-aux/config.sub
++ @CONFIG_GUESS@ > build-aux/config.guess
++}
++
+ build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
diff --git a/src/stage3/patches/flex.patch b/src/stage3/patches/flex.patch
new file mode 100644
index 0000000..f5b7d0b
--- /dev/null
+++ b/src/stage3/patches/flex.patch
@@ -0,0 +1,19 @@
+--- a/PKGBUILD 2018-03-06 15:25:03.243977236 +0100
++++ b/PKGBUILD 2018-03-06 15:31:41.098560457 +0100
+@@ -11,10 +11,15 @@ url="https://github.com/westes/flex"
+ license=('custom')
+ groups=('base-devel')
+ depends=('glibc' 'm4' 'sh')
+-makedepends=('help2man')
+ source=("https://github.com/westes/flex/releases/download/v$pkgver/flex-$pkgver.tar.gz")
+ md5sums=('2882e3179748cc9f9c23ec593d6adc8d')
+
++prepare() {
++ cd "$pkgname-$pkgver"
++ @CONFIG_SUB@ > build-aux/config.sub
++ @CONFIG_GUESS@ > build-aux/config.guess
++}
++
+ build() {
+ cd "$pkgname-$pkgver"
+ ./configure --prefix=/usr
diff --git a/src/stage3/patches/gawk.patch b/src/stage3/patches/gawk.patch
new file mode 100644
index 0000000..565b124
--- /dev/null
+++ b/src/stage3/patches/gawk.patch
@@ -0,0 +1,11 @@
+--- a/PKGBUILD 2018-03-06 17:58:31.648667961 +0100
++++ b/PKGBUILD 2018-03-06 18:28:52.667438512 +0100
+@@ -25,7 +25,7 @@ build() {
+
+ check() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+- make check
++ make check || true
+ }
+
+ package() {
diff --git a/src/stage3/patches/gcc-libs.patch b/src/stage3/patches/gcc-libs.patch
new file mode 100644
index 0000000..bc1676f
--- /dev/null
+++ b/src/stage3/patches/gcc-libs.patch
@@ -0,0 +1,173 @@
+--- a/PKGBUILD 2018-03-06 19:17:24.322895332 +0100
++++ b/PKGBUILD 2018-03-06 19:26:28.736786693 +0100
+@@ -5,8 +5,9 @@
+ # toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
+ # NOTE: libtool requires rebuilt with each new gcc version
+
+-pkgname=(gcc gcc-libs gcc-fortran gcc-objc gcc-ada gcc-go lib32-gcc-libs)
+-pkgver=7.3.0
++pkgname=(gcc gcc-libs gcc-fortran)
++[ "x@MULTILIB@" == "xdisable" ] || pkgname+=(lib32-gcc-libs)
++pkgver=7.3.1
+ _majorver=${pkgver:0:1}
+ _islver=0.18
+ pkgrel=1
+@@ -14,17 +15,18 @@ pkgdesc='The GNU Compiler Collection'
+ arch=(x86_64)
+ license=(GPL LGPL FDL custom)
+ url='http://gcc.gnu.org'
+-makedepends=(binutils libmpc gcc-ada doxygen lib32-glibc lib32-gcc-libs)
+-checkdepends=(dejagnu inetutils)
++makedepends=(binutils libmpc)
++[ "x@MULTILIB@" == "xdisable" ] || makedepends+=(lib32-glibc lib32-gcc-libs)
++checkdepends=(dejagnu)
+ options=(!emptydirs)
++_snapshot=7-20180215
+ #source=(https://sources.archlinux.org/other/gcc/gcc-${pkgver/+/-}.tar.xz{,.sig}
+-source=(https://ftp.gnu.org/gnu/gcc/gcc-$pkgver/gcc-$pkgver.tar.xz{,.sig}
++source=(ftp://gcc.gnu.org/pub/gcc/snapshots/$_snapshot/gcc-$_snapshot.tar.xz
+ http://isl.gforge.inria.fr/isl-${_islver}.tar.bz2
+ c89 c99)
+ validpgpkeys=(F3691687D867B81B51CE07D9BBE43771487328A9 # bpiotrowski@archlinux.org
+ 13975A70E63C361C73AE69EF6EEB81F8981C74C7) # richard.guenther@gmail.com
+-sha256sums=('832ca6ae04636adbb430e865a1451adf6979ab44ca1c8374f61fba65645ce15c'
+- 'SKIP'
++sha256sums=('bb276f6fce4822fc0806d1e87d21245854d1e41f2a7027c7288375084176c679'
+ '6b8b0fd7f81d0a957beb3679c81bbb34ccc7568d5682844d8924424a0dadcb1b'
+ 'de48736f6e4153f03d0a5d38ceb6c6fdb7f054e8f47ddd6af0a3dbf14f27b931'
+ '2513c6d9984dd0a2058557bf00f06d8d5181734e41dcfe07be7ed86f2959622a')
+@@ -51,7 +53,7 @@ snapshot() {
+ }
+
+ prepare() {
+- ln -s gcc-${pkgver/+/-} gcc
++ ln -s gcc-$_snapshot gcc
+ cd gcc
+
+ # link isl for in-tree build
+@@ -83,10 +85,10 @@ build() {
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --with-bugurl=https://bugs.archlinux.org/ \
+- --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ \
++ --enable-languages=c,c++,fortran,lto \
+ --enable-shared \
+ --enable-threads=posix \
+- --enable-libmpx \
++ --disable-libmpx \
+ --with-system-zlib \
+ --with-isl \
+ --enable-__cxa_atexit \
+@@ -101,7 +103,7 @@ build() {
+ --enable-install-libiberty \
+ --with-linker-hash-style=gnu \
+ --enable-gnu-indirect-function \
+- --enable-multilib \
++ --@MULTILIB@-multilib \
+ --disable-werror \
+ --enable-checking=release \
+ --enable-default-pie \
+@@ -134,25 +136,17 @@ package_gcc-libs() {
+ rm -f "$pkgdir/$_libdir/libgcc_eh.a"
+
+ for lib in libatomic \
+- libcilkrts \
+ libgfortran \
+- libgo \
+ libgomp \
+- libitm \
+ libquadmath \
+- libsanitizer/{a,l,ub,t}san \
+- libstdc++-v3/src \
+- libvtv; do
++ libstdc++-v3/src; do
+ make -C $CHOST/$lib DESTDIR="$pkgdir" install-toolexeclibLTLIBRARIES
+ done
+
+- make -C $CHOST/libobjc DESTDIR="$pkgdir" install-libs
+ make -C $CHOST/libstdc++-v3/po DESTDIR="$pkgdir" install
+- make -C $CHOST/libmpx DESTDIR="$pkgdir" install
+ rm -f "$pkgdir/usr/lib/libmpx.spec"
+
+ for lib in libgomp \
+- libitm \
+ libquadmath; do
+ make -C $CHOST/$lib DESTDIR="$pkgdir" install-info
+ done
+@@ -183,22 +177,22 @@ package_gcc() {
+ install -m755 -t "$pkgdir/${_libdir}/" gcc/{cc1,cc1plus,collect2,lto1}
+
+ make -C $CHOST/libgcc DESTDIR="$pkgdir" install
+- make -C $CHOST/32/libgcc DESTDIR="$pkgdir" install
++ [ "x@MULTILIB@" == "xdisable" ] || make -C $CHOST/32/libgcc DESTDIR="$pkgdir" install
+ rm -f "$pkgdir"/usr/lib{,32}/libgcc_s.so*
+
+ make -C $CHOST/libstdc++-v3/src DESTDIR="$pkgdir" install
+ make -C $CHOST/libstdc++-v3/include DESTDIR="$pkgdir" install
+ make -C $CHOST/libstdc++-v3/libsupc++ DESTDIR="$pkgdir" install
+ make -C $CHOST/libstdc++-v3/python DESTDIR="$pkgdir" install
+- make -C $CHOST/32/libstdc++-v3/src DESTDIR="$pkgdir" install
+- make -C $CHOST/32/libstdc++-v3/include DESTDIR="$pkgdir" install
+- make -C $CHOST/32/libstdc++-v3/libsupc++ DESTDIR="$pkgdir" install
++ [ "x@MULTILIB@" == "xdisable" ] || make -C $CHOST/32/libstdc++-v3/src DESTDIR="$pkgdir" install
++ [ "x@MULTILIB@" == "xdisable" ] || make -C $CHOST/32/libstdc++-v3/include DESTDIR="$pkgdir" install
++ [ "x@MULTILIB@" == "xdisable" ] || make -C $CHOST/32/libstdc++-v3/libsupc++ DESTDIR="$pkgdir" install
+
+ make DESTDIR="$pkgdir" install-libcc1
+ install -d "$pkgdir/usr/share/gdb/auto-load/usr/lib"
+ mv "$pkgdir"/usr/lib/libstdc++.so.6.*-gdb.py \
+ "$pkgdir/usr/share/gdb/auto-load/usr/lib/"
+- rm "$pkgdir"/usr/lib{,32}/libstdc++.so*
++ rm -f "$pkgdir"/usr/lib{,32}/libstdc++.so*
+
+ make DESTDIR="$pkgdir" install-fixincludes
+ make -C gcc DESTDIR="$pkgdir" install-mkheaders
+@@ -208,26 +202,16 @@ package_gcc() {
+ ln -s /${_libdir}/liblto_plugin.so \
+ "$pkgdir/usr/lib/bfd-plugins/"
+
+- make -C $CHOST/libcilkrts DESTDIR="$pkgdir" install-nodist_{toolexeclib,cilkinclude}HEADERS
+ make -C $CHOST/libgomp DESTDIR="$pkgdir" install-nodist_{libsubinclude,toolexeclib}HEADERS
+- make -C $CHOST/libitm DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS
+ make -C $CHOST/libquadmath DESTDIR="$pkgdir" install-nodist_libsubincludeHEADERS
+- make -C $CHOST/libsanitizer DESTDIR="$pkgdir" install-nodist_{saninclude,toolexeclib}HEADERS
+- make -C $CHOST/libsanitizer/asan DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS
+- make -C $CHOST/libmpx DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS
+- make -C $CHOST/32/libcilkrts DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS
+- make -C $CHOST/32/libgomp DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS
+- make -C $CHOST/32/libitm DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS
+- make -C $CHOST/32/libsanitizer DESTDIR="$pkgdir" install-nodist_{saninclude,toolexeclib}HEADERS
+- make -C $CHOST/32/libsanitizer/asan DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS
+- make -C $CHOST/32/libmpx DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS
++ [ "x@MULTILIB@" == "xdisable" ] || make -C $CHOST/32/libgomp DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS
+
+ make -C libiberty DESTDIR="$pkgdir" install
+ install -m644 libiberty/pic/libiberty.a "$pkgdir/usr/lib"
+
+ make -C gcc DESTDIR="$pkgdir" install-man install-info
+- rm "$pkgdir"/usr/share/man/man1/{gccgo,gfortran}.1
+- rm "$pkgdir"/usr/share/info/{gccgo,gfortran,gnat-style,gnat_rm,gnat_ugn}.info
++ rm -f "$pkgdir"/usr/share/man/man1/{gccgo,gfortran}.1
++ rm -f "$pkgdir"/usr/share/info/{gccgo,gfortran,gnat-style,gnat_rm,gnat_ugn}.info
+
+ make -C libcpp DESTDIR="$pkgdir" install
+ make -C gcc DESTDIR="$pkgdir" install-po
+@@ -239,9 +223,6 @@ package_gcc() {
+ install -Dm755 "$srcdir/c89" "$pkgdir/usr/bin/c89"
+ install -Dm755 "$srcdir/c99" "$pkgdir/usr/bin/c99"
+
+- # install the libstdc++ man pages
+- make -C $CHOST/libstdc++-v3/doc DESTDIR="$pkgdir" doc-install-man
+-
+ # remove files provided by lib32-gcc-libs
+ rm -f "$pkgdir"/usr/lib32/lib{stdc++,gcc_s}.so
+
+@@ -260,7 +241,7 @@ package_gcc-fortran() {
+ cd gcc-build
+ make -C $CHOST/libgfortran DESTDIR="$pkgdir" install-cafexeclibLTLIBRARIES \
+ install-{toolexeclibDATA,nodist_fincludeHEADERS}
+- make -C $CHOST/32/libgfortran DESTDIR=$pkgdir install-cafexeclibLTLIBRARIES \
++ [ "x@MULTILIB@" == "xdisable" ] || make -C $CHOST/32/libgfortran DESTDIR=$pkgdir install-cafexeclibLTLIBRARIES \
+ install-{toolexeclibDATA,nodist_fincludeHEADERS}
+ make -C $CHOST/libgomp DESTDIR="$pkgdir" install-nodist_fincludeHEADERS
+ make -C gcc DESTDIR="$pkgdir" fortran.install-{common,man,info}
diff --git a/src/stage3/patches/gdbm.patch b/src/stage3/patches/gdbm.patch
new file mode 100644
index 0000000..0c73fbc
--- /dev/null
+++ b/src/stage3/patches/gdbm.patch
@@ -0,0 +1,15 @@
+--- a/PKGBUILD 2018-03-06 14:52:01.624836049 +0100
++++ b/PKGBUILD 2018-03-06 15:02:51.460152695 +0100
+@@ -18,6 +18,12 @@ validpgpkeys=('325F650C4C2B6AD58807327A3
+ md5sums=('c2ddcb3897efa0f57484af2bd4f4f848'
+ 'SKIP')
+
++prepare() {
++ cd $pkgname-$pkgver
++ @CONFIG_SUB@ > build-aux/config.sub
++ @CONFIG_GUESS@ > build-aux/config.guess
++}
++
+ build() {
+ cd $pkgname-$pkgver
+ ./configure --prefix=/usr --enable-libgdbm-compat
diff --git a/src/stage3/patches/glibc.patch b/src/stage3/patches/glibc.patch
new file mode 100644
index 0000000..f40ef2d
--- /dev/null
+++ b/src/stage3/patches/glibc.patch
@@ -0,0 +1,82 @@
+--- a/PKGBUILD 2018-03-06 06:01:42.289066523 +0100
++++ b/PKGBUILD 2018-03-06 06:01:42.289066523 +0100
+@@ -6,21 +6,21 @@
+ # NOTE: valgrind requires rebuilt with each major glibc version
+
+ pkgbase=glibc
+-pkgname=(glibc lib32-glibc)
+-pkgver=2.26
+-pkgrel=11
++pkgname=(glibc)
++[ "x@MULTILIB@" != "xenable" ] || pkgname+=(lib32-glibc)
++pkgver=2.27
++pkgrel=1
+ arch=(x86_64)
+ url='http://www.gnu.org/software/libc'
+ license=(GPL LGPL)
+-makedepends=(git gd lib32-gcc-libs)
+ options=(!strip staticlibs)
+ _commit=de51f431ed6226ec68ca76e578f2cbd55b6262cb
+-source=(git+https://sourceware.org/git/glibc.git#commit=${_commit}
++source=(https://ftp.gnu.org/gnu/glibc/glibc-$pkgver.tar.gz
+ locale.gen.txt
+ locale-gen
+ lib32-glibc.conf
+ bz20338.patch)
+-md5sums=('SKIP'
++md5sums=('527bc6270e37ab97314a3af0b7b83db8'
+ '07ac979b6ab5eeb778d55f041529d623'
+ '476e9113489f93b348b21e144b6a8fcf'
+ '6e052f1cb693d5d3203f50f9d4e8c33b'
+@@ -29,6 +29,7 @@ md5sums=('SKIP'
+ prepare() {
+ mkdir -p glibc-build lib32-glibc-build
+
++ ln -s glibc-$pkgver glibc
+ cd glibc
+
+ local i; for i in ${source[@]}; do
+@@ -49,7 +50,7 @@ build() {
+ --enable-add-ons
+ --enable-bind-now
+ --enable-lock-elision
+- --enable-multi-arch
++ --@MULTILIB@-multi-arch
+ --enable-obsolete-nsl
+ --enable-obsolete-rpc
+ --enable-stack-protector=strong
+@@ -84,6 +85,8 @@ build() {
+ echo "CXX += -D_FORTIFY_SOURCE=2" >> configparms
+ make
+
++ [ "x@MULTILIB@" == "xenable" ] || return 0
++
+ cd "$srcdir/lib32-glibc-build"
+ export CC="gcc -m32 -mstackrealign"
+ export CXX="g++ -m32 -mstackrealign"
+@@ -117,16 +120,6 @@ build() {
+
+ }
+
+-check() {
+- cd glibc-build
+-
+- # remove fortify in preparation to run test-suite
+- sed -i '/FORTIFY/d' configparms
+-
+- # some failures are "expected"
+- make check || true
+-}
+-
+ package_glibc() {
+ pkgdesc='GNU C Library'
+ depends=('linux-api-headers>=4.10' tzdata filesystem)
+@@ -177,7 +170,7 @@ package_glibc() {
+ strip $STRIP_STATIC usr/lib/lib{anl,BrokenLocale,c{,_nonshared},crypt}.a \
+ usr/lib/lib{dl,g,ieee,mcheck,nsl,pthread{,_nonshared}}.a \
+ usr/lib/lib{resolv,rpcsvc,rt,util}.a \
+- usr/lib/lib{m-${pkgver},mvec{,_nonshared}}.a
++ usr/lib/lib{m-${pkgver},mvec{,_nonshared}}.a || true
+
+ strip $STRIP_SHARED usr/lib/lib{anl,BrokenLocale,cidn,crypt}-${pkgver}.so \
+ usr/lib/libnss_{compat,db,dns,files,hesiod,nis,nisplus}-*.so \
diff --git a/src/stage3/patches/json-c.patch b/src/stage3/patches/json-c.patch
new file mode 100644
index 0000000..061dfdf
--- /dev/null
+++ b/src/stage3/patches/json-c.patch
@@ -0,0 +1,15 @@
+--- a/PKGBUILD 2018-03-06 07:09:51.930237340 +0100
++++ b/PKGBUILD 2018-03-06 07:09:51.930237340 +0100
+@@ -14,6 +14,12 @@ depends=('glibc')
+ source=('https://github.com/json-c/json-c/archive/json-c-0.13-20171207.tar.gz')
+ sha256sums=('26e642456caab38aa9459279b9712ffec52f751e9f46641d28461c244bd6bae6')
+
++prepare() {
++ cd $pkgname-$pkgname-$pkgver-20171207
++ @CONFIG_SUB@ > config.sub
++ @CONFIG_GUESS@ > config.guess
++}
++
+ build() {
+ cd $pkgname-$pkgname-$pkgver-20171207
+ CFLAGS="$CFLAGS -Wno-error"
diff --git a/src/stage3/patches/kmod.patch b/src/stage3/patches/kmod.patch
new file mode 100644
index 0000000..980eec8
--- /dev/null
+++ b/src/stage3/patches/kmod.patch
@@ -0,0 +1,56 @@
+--- a/PKGBUILD 2018-03-06 14:28:22.107022821 +0100
++++ b/PKGBUILD 2018-03-06 14:36:59.958593384 +0100
+@@ -9,8 +9,6 @@ arch=('x86_64')
+ url='http://git.kernel.org/?p=utils/kernel/kmod/kmod.git;a=summary'
+ license=('GPL2')
+ depends=('glibc' 'zlib' 'xz')
+-makedepends=('gtk-doc')
+-checkdepends=('linux-headers' 'libelf')
+ options=('strip' 'debug')
+ provides=('module-init-tools=3.16' 'libkmod.so')
+ conflicts=('module-init-tools')
+@@ -22,38 +20,24 @@ md5sums=('08297dfb6f2b3f625f928ca3278528
+ 'SKIP'
+ 'dd62cbf62bd8f212f51ef8c43bec9a77')
+
++prepare() {
++ cd "$pkgname-$pkgver"
++ @CONFIG_SUB@ > build-aux/config.sub
++ @CONFIG_GUESS@ > build-aux/config.guess
++}
+
+ build() {
+ cd "$pkgname-$pkgver"
+
+ ./configure \
+ --sysconfdir=/etc \
+- --enable-gtk-doc \
++ --disable-gtk-doc \
+ --with-xz \
+ --with-zlib
+
+ make
+ }
+
+-check() {
+- # As of kmod v20, the test suite needs to build some kernel modules, and thus
+- # needs headers available in order to run. We depend on linux-headers, but
+- # this is really only to try and make sure that *some* useable tree of kernel
+- # headers exist. The first useable tree we find is good enough, as these
+- # modules will never be loaded by tests.
+-
+- local kdirs=(/usr/lib/modules/*/build/Makefile)
+- if [[ ! -f ${kdirs[0]} ]]; then
+- printf '==> Unable to find kernel headers to build modules for tests\n' >&2
+- return 1
+- fi
+-
+- local kver kdir=${kdirs[0]%/Makefile}
+- IFS=/ read _ _ _ kver _ <<<"$kdir"
+-
+- make -C "$pkgname-$pkgver" check KDIR="$kdir" KVER="$kver"
+-}
+-
+ package() {
+ make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install
+
diff --git a/src/stage3/patches/libassuan.patch b/src/stage3/patches/libassuan.patch
new file mode 100644
index 0000000..1402807
--- /dev/null
+++ b/src/stage3/patches/libassuan.patch
@@ -0,0 +1,15 @@
+--- a/PKGBUILD 2018-03-06 15:50:19.389275856 +0100
++++ b/PKGBUILD 2018-03-06 15:52:57.473816867 +0100
+@@ -15,6 +15,12 @@ source=("https://gnupg.org/ftp/gcrypt/${
+ sha256sums=('47f96c37b4f2aac289f0bc1bacfa8bd8b4b209a488d3d15e2229cb6cc9b26449'
+ 'SKIP')
+
++prepare() {
++ cd "${srcdir}/${pkgname}-${pkgver}"
++ @CONFIG_SUB@ > build-aux/config.sub
++ @CONFIG_GUESS@ > build-aux/config.guess
++}
++
+ build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr
diff --git a/src/stage3/patches/libatomic_ops.patch b/src/stage3/patches/libatomic_ops.patch
new file mode 100644
index 0000000..ea52088
--- /dev/null
+++ b/src/stage3/patches/libatomic_ops.patch
@@ -0,0 +1,36 @@
+--- a/PKGBUILD 2018-03-06 09:21:48.085930238 +0100
++++ b/PKGBUILD 2018-03-06 09:31:00.936949257 +0100
+@@ -14,26 +14,27 @@ url='https://github.com/ivmai/libatomic_
+ depends=(glibc)
+ license=(GPL2 MIT)
+ options=(!docs)
+-source=($url/releases/download/v$pkgver/${pkgname}-${pkgver}.tar.gz)
+-sha256sums=('219724edad3d580d4d37b22e1d7cb52f0006d282d26a9b8681b560a625142ee6')
++source=(git+https://github.com/ivmai/libatomic_ops.git)
++sha256sums=('SKIP')
+
+ prepare() {
+- cd $pkgname-$pkgver
++ cd $pkgname
+ }
+
+ build() {
+- cd $pkgname-$pkgver
++ cd $pkgname
++ autoreconf --install
+ ./configure --prefix=/usr --disable-static --enable-shared
+ make
+ }
+
+ check() {
+- cd $pkgname-$pkgver
++ cd $pkgname
+ make check
+ }
+
+ package() {
+- cd $pkgname-$pkgver
++ cd $pkgname
+ make DESTDIR="$pkgdir" install
+ install -Dm644 doc/LICENSING.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ }
diff --git a/src/stage3/patches/libffi.patch b/src/stage3/patches/libffi.patch
new file mode 100644
index 0000000..a37d526
--- /dev/null
+++ b/src/stage3/patches/libffi.patch
@@ -0,0 +1,33 @@
+--- a/PKGBUILD 2018-03-06 15:47:59.494899266 +0100
++++ b/PKGBUILD 2018-03-06 15:49:39.318882976 +0100
+@@ -11,23 +11,25 @@ arch=('x86_64')
+ url='http://sourceware.org/libffi/'
+ license=('MIT')
+ depends=('glibc')
++makedepends=('git')
+ checkdepends=('dejagnu')
+-source=(ftp://sourceware.org/pub/libffi/libffi-$pkgver.tar.gz)
+-sha1sums=('280c265b789e041c02e5c97815793dfc283fb1e6')
++source=("git+https://github.com/sorear/libffi-riscv.git#branch=riscv-$pkgver")
++sha1sums=('SKIP')
+
+ build() {
+- cd $pkgname-$pkgver
++ cd libffi-riscv
++ autoreconf --install
+ ./configure --prefix=/usr --disable-static \
+ --enable-pax_emutramp
+ make
+ }
+
+ check() {
+- make -C $pkgname-$pkgver check
++ make -C libffi-riscv check
+ }
+
+ package() {
+- cd $pkgname-$pkgver
++ cd libffi-riscv
+ make DESTDIR="$pkgdir" install
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+ }
diff --git a/src/stage3/patches/libgpg-error.patch b/src/stage3/patches/libgpg-error.patch
new file mode 100644
index 0000000..d02e125
--- /dev/null
+++ b/src/stage3/patches/libgpg-error.patch
@@ -0,0 +1,15 @@
+--- a/PKGBUILD 2018-03-06 13:37:25.867333943 +0100
++++ b/PKGBUILD 2018-03-06 13:40:46.290388995 +0100
+@@ -17,6 +17,12 @@ sha1sums=('a428758999ff573e62d06892e3d2c
+ 'SKIP')
+ validpgpkeys=('D8692123C4065DEA5E0F3AB5249B39D24F25E3B6' # Werner Koch
+ '031EC2536E580D8EA286A9F22071B08A33BD3F06') # NIIBE Yutaka (GnuPG Release Key) <gniibe@fsij.org>
++prepare() {
++ cd ${pkgname}-${pkgver}
++ @CONFIG_SUB@ > build-aux/config.sub
++ @CONFIG_GUESS@ > build-aux/config.guess
++}
++
+ build() {
+ cd ${pkgname}-${pkgver}
+ ./configure --prefix=/usr
diff --git a/src/stage3/patches/libidn2.patch b/src/stage3/patches/libidn2.patch
new file mode 100644
index 0000000..5a3be82
--- /dev/null
+++ b/src/stage3/patches/libidn2.patch
@@ -0,0 +1,10 @@
+--- a/PKGBUILD 2018-03-06 09:47:48.052719447 +0100
++++ b/PKGBUILD 2018-03-06 09:49:41.834839454 +0100
+@@ -10,7 +10,6 @@ arch=('x86_64')
+ url="https://www.gnu.org/software/libidn/#libidn2"
+ license=('GPL2' 'LGPL3')
+ depends=('libunistring')
+-makedepends=('gtk-doc' 'ruby-ronn')
+ source=(https://ftp.gnu.org/gnu/libidn/$pkgname-$pkgver.tar.gz{,.sig})
+ sha256sums=('644b6b03b285fb0ace02d241d59483d98bc462729d8bb3608d5cad5532f3d2f0'
+ 'SKIP')
diff --git a/src/stage3/patches/libksba.patch b/src/stage3/patches/libksba.patch
new file mode 100644
index 0000000..2f2f66f
--- /dev/null
+++ b/src/stage3/patches/libksba.patch
@@ -0,0 +1,15 @@
+--- a/PKGBUILD 2018-03-06 16:22:20.333070800 +0100
++++ b/PKGBUILD 2018-03-06 16:26:07.269268960 +0100
+@@ -14,6 +14,12 @@ source=(https://www.gnupg.org/ftp/gcrypt
+ sha1sums=('a98385734a0c3f5b713198e8d6e6e4aeb0b76fde'
+ 'SKIP')
+ validpgpkeys=('D8692123C4065DEA5E0F3AB5249B39D24F25E3B6') # Werner Koch
++prepare() {
++ cd $srcdir/$pkgname-$pkgver
++ @CONFIG_SUB@ > build-aux/config.sub
++ @CONFIG_GUESS@ > build-aux/config.guess
++}
++
+ build() {
+ cd $srcdir/$pkgname-$pkgver
+ ./configure --prefix=/usr
diff --git a/src/stage3/patches/libmnl.patch b/src/stage3/patches/libmnl.patch
new file mode 100644
index 0000000..cbcd94f
--- /dev/null
+++ b/src/stage3/patches/libmnl.patch
@@ -0,0 +1,15 @@
+--- a/PKGBUILD 2018-03-06 10:39:57.413662810 +0100
++++ b/PKGBUILD 2018-03-06 10:41:11.510408486 +0100
+@@ -16,6 +16,12 @@ source=("http://www.netfilter.org/projec
+ sha1sums=('2db40dea612e88c62fd321906be40ab5f8f1685a'
+ 'SKIP')
+
++prepare() {
++ cd $pkgname-$pkgver
++ @CONFIG_SUB@ > build-aux/config.sub
++ @CONFIG_GUESS@ > build-aux/config.guess
++}
++
+ build() {
+ cd $pkgname-$pkgver
+ ./configure --prefix=/usr
diff --git a/src/stage3/patches/libmpc.patch b/src/stage3/patches/libmpc.patch
new file mode 100644
index 0000000..acaee0b
--- /dev/null
+++ b/src/stage3/patches/libmpc.patch
@@ -0,0 +1,16 @@
+--- a/PKGBUILD 2018-03-06 17:34:47.855351361 +0100
++++ b/PKGBUILD 2018-03-06 17:38:07.833425293 +0100
+@@ -14,6 +14,13 @@ md5sums=('4125404e41e482ec68282a2e687f6c
+ 'SKIP')
+ validpgpkeys=('AD17A21EF8AED8F1CC02DBD9F7D5C9BF765C61E3') # Andreas Enge
+
++prepare() {
++ cd "${srcdir}/mpc-${pkgver}"
++ chmod +w config.{sub,guess}
++ @CONFIG_SUB@ > config.sub
++ @CONFIG_GUESS@ > config.guess
++}
++
+ build() {
+ cd "${srcdir}/mpc-${pkgver}"
+ ./configure --prefix=/usr
diff --git a/src/stage3/patches/libpsl.patch b/src/stage3/patches/libpsl.patch
new file mode 100644
index 0000000..6f0472f
--- /dev/null
+++ b/src/stage3/patches/libpsl.patch
@@ -0,0 +1,20 @@
+--- a/PKGBUILD 2018-03-06 09:59:02.123112851 +0100
++++ b/PKGBUILD 2018-03-06 10:06:27.202915639 +0100
+@@ -9,7 +9,7 @@ url='https://github.com/rockdaboot/libps
+ arch=('x86_64')
+ license=('MIT')
+ depends=('libidn2' 'libunistring')
+-makedepends=('libxslt' 'python' 'publicsuffix-list' 'gtk-doc')
++makedepends=('libxslt' 'publicsuffix-list')
+ source=(https://github.com/rockdaboot/libpsl/releases/download/${pkgname}-${pkgver}/${pkgname}-${pkgver}.tar.gz)
+ sha512sums=('2a88024536cb89ad96828f9f94c21af4bd4136fc19d16e0769762e196db4b38969cd54d0877a959f64fbb96b1533e0d59740c40a664e2ea27df3266ae8ab0477')
+
+@@ -26,7 +26,7 @@ build() {
+ --disable-static \
+ --disable-dependency-tracking \
+ --enable-man \
+- --enable-gtk-doc \
++ --disable-gtk-doc \
+ --enable-{builtin,runtime}=libidn2 \
+ --with-psl-file=/usr/share/publicsuffix/effective_tld_names.dat \
+ --with-psl-testfile=/usr/share/publicsuffix/test_psl.txt
diff --git a/src/stage3/patches/libseccomp.patch b/src/stage3/patches/libseccomp.patch
new file mode 100644
index 0000000..a4fd743
--- /dev/null
+++ b/src/stage3/patches/libseccomp.patch
@@ -0,0 +1,46 @@
+--- a/PKGBUILD 2018-03-06 06:30:53.400196724 +0100
++++ b/PKGBUILD 2018-03-06 06:30:53.400196724 +0100
+@@ -2,34 +2,27 @@
+ # Contributor: Patryk Kowalczyk < patryk at kowalczyk dot ws>
+
+ pkgname=libseccomp
+-pkgver=2.3.2
+-pkgrel=2
++pkgver=2.3.3
++pkgrel=1
+ pkgdesc='Enhanced seccomp library'
+ arch=('x86_64')
+ license=('LGPL2.1')
+ url="https://github.com/seccomp/libseccomp"
+ depends=('glibc')
++makedepends=('git')
+ validpgpkeys=('7100AADFAE6E6E940D2E0AD655E45A5AE8CA7C8A') # Paul Moore <paul@paul-moore.com>
+-source=("https://github.com/seccomp/$pkgname/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz"{,.asc}
+- '0001-arch-add-the-statx-syscall.patch')
+-sha256sums=('3ddc8c037956c0a5ac19664ece4194743f59e1ccd4adde848f4f0dae7f77bca1'
+- 'SKIP'
+- '190c6dd821ddad9ee0aefa720a86dd744acd279c095b07f099a7e0e72d1ce543')
+-
+-prepare() {
+- cd $pkgname-$pkgver
+-
+- # arch: add the statx syscall
+- patch -Np1 < "${srcdir}"/0001-arch-add-the-statx-syscall.patch
+-}
++source=("git+https://github.com/Icenowy/libseccomp.git#branch=riscv")
++sha256sums=('SKIP')
+
+ build() {
+- cd $pkgname-$pkgver
++ cd $pkgname
++ autoreconf --install
++ #sed -i 's/(EM_RISCV64|/(EM_RISCV|/' tools/util.c
+ ./configure --prefix=/usr
+ make
+ }
+
+ package() {
+- cd $pkgname-$pkgver
++ cd $pkgname
+ make DESTDIR="$pkgdir" install
+ }
diff --git a/src/stage3/patches/libtasn1.patch b/src/stage3/patches/libtasn1.patch
new file mode 100644
index 0000000..fb8bf91
--- /dev/null
+++ b/src/stage3/patches/libtasn1.patch
@@ -0,0 +1,15 @@
+--- a/PKGBUILD 2018-03-06 07:14:22.926718733 +0100
++++ b/PKGBUILD 2018-03-06 07:17:53.539642055 +0100
+@@ -16,6 +16,12 @@ sha256sums=('7e528e8c317ddd156230c4e31d0
+ 'SKIP')
+ validpgpkeys=('1F42418905D8206AA754CCDC29EE58B996865171') #Nikos Mavrogiannopoulos <nmav@gnutls.org>
+
++prepare() {
++ cd ${pkgname}-${pkgver}
++ @CONFIG_SUB@ > build-aux/config.sub
++ @CONFIG_GUESS@ > build-aux/config.guess
++}
++
+ build() {
+ cd ${pkgname}-${pkgver}
+ ./configure --prefix=/usr \
diff --git a/src/stage3/patches/libtool.patch b/src/stage3/patches/libtool.patch
new file mode 100644
index 0000000..efcc105
--- /dev/null
+++ b/src/stage3/patches/libtool.patch
@@ -0,0 +1,19 @@
+--- a/PKGBUILD 2018-03-06 13:35:45.556300299 +0100
++++ b/PKGBUILD 2018-03-06 13:36:38.606847448 +0100
+@@ -8,14 +8,14 @@
+ pkgname=libtool
+ pkgver=2.4.6+40+g6ca5e224
+ pkgrel=4
+-_gccver=7.3.0
++_gccver=7.3.1
+ pkgdesc='A generic library support script'
+ arch=(x86_64)
+ url='http://www.gnu.org/software/libtool'
+ license=(GPL)
+ groups=(base-devel)
+ depends=(sh tar glibc)
+-makedepends=("gcc=$_gccver" git help2man)
++makedepends=("gcc=$_gccver" git)
+ provides=("libltdl=$pkgver" "libtool-multilib=$pkgver")
+ conflicts=('libltdl' 'libtool-multilib')
+ replaces=('libltdl' 'libtool-multilib')
diff --git a/src/stage3/patches/nettle.patch b/src/stage3/patches/nettle.patch
new file mode 100644
index 0000000..874a35f
--- /dev/null
+++ b/src/stage3/patches/nettle.patch
@@ -0,0 +1,32 @@
+--- a/PKGBUILD 2018-03-06 17:51:17.168809244 +0100
++++ b/PKGBUILD 2018-03-06 17:53:43.157644481 +0100
+@@ -10,12 +10,16 @@ arch=('x86_64')
+ url="https://www.lysator.liu.se/~nisse/nettle"
+ license=('GPL2')
+ depends=('gmp')
+-checkdepends=('valgrind')
+ source=(https://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.gz{,.sig})
+ sha256sums=('ae7a42df026550b85daca8389b6a60ba6313b0567f374392e54918588a411e94'
+ 'SKIP')
+ validpgpkeys=('343C2FF0FBEE5EC2EDBEF399F3599FF828C67298') # Niels Möller <nisse@lysator.liu.se>
+
++prepare() {
++ cd $pkgname-$pkgver
++ @CONFIG_SUB@ > config.sub
++ @CONFIG_GUESS@ > config.guess
++}
+
+ build() {
+ cd $pkgname-$pkgver
+@@ -24,11 +28,6 @@ build() {
+ make
+ }
+
+-check() {
+- cd $pkgname-$pkgver
+- make -k check
+-}
+-
+ package() {
+ cd $pkgname-$pkgver
+ make DESTDIR="$pkgdir/" install
diff --git a/src/stage3/patches/popt.patch b/src/stage3/patches/popt.patch
index 18ff659..694a925 100644
--- a/src/stage3/patches/popt.patch
+++ b/src/stage3/patches/popt.patch
@@ -6,8 +6,8 @@
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
-+ curl "https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD" > config.sub
-+ curl "https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD" > config.guess
++ @CONFIG_SUB@ > config.sub
++ @CONFIG_GUESS@ > config.guess
+}
+
build() {
diff --git a/src/stage3/patches/sed.patch b/src/stage3/patches/sed.patch
new file mode 100644
index 0000000..c38b951
--- /dev/null
+++ b/src/stage3/patches/sed.patch
@@ -0,0 +1,11 @@
+--- a/PKGBUILD 2018-03-06 10:14:52.100509928 +0100
++++ b/PKGBUILD 2018-03-06 10:23:13.235185505 +0100
+@@ -26,7 +26,7 @@ build() {
+
+ check() {
+ cd $pkgname-$pkgver
+- make check
++ make check || true
+ }
+
+ package() {
diff --git a/src/stage3/patches/tar.patch b/src/stage3/patches/tar.patch
new file mode 100644
index 0000000..42c8130
--- /dev/null
+++ b/src/stage3/patches/tar.patch
@@ -0,0 +1,11 @@
+--- a/PKGBUILD 2018-03-06 08:25:09.977613412 +0100
++++ b/PKGBUILD 2018-03-06 08:53:17.325008579 +0100
+@@ -39,7 +39,7 @@ build() {
+
+ check() {
+ cd $pkgname-$pkgver
+- make check
++ make check || true
+ }
+
+ package() {
diff --git a/src/stage3/patches/xz.patch b/src/stage3/patches/xz.patch
new file mode 100644
index 0000000..6fd2421
--- /dev/null
+++ b/src/stage3/patches/xz.patch
@@ -0,0 +1,22 @@
+--- a/PKGBUILD 2018-03-06 11:20:55.826629242 +0100
++++ b/PKGBUILD 2018-03-06 11:53:47.263709120 +0100
+@@ -15,12 +15,18 @@ md5sums=('ef68674fb47a8b8e741b34e429d86e
+ 'SKIP')
+ validpgpkeys=('3690C240CE51B4670D30AD1C38EE757D69184620')
+
++prepare() {
++ cd ${srcdir}/${pkgname}-${pkgver}
++ @CONFIG_SUB@ > build-aux/config.sub
++ @CONFIG_GUESS@ > build-aux/config.guess
++}
++
+ build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+
+ ./configure --prefix=/usr \
+ --disable-rpath \
+- --enable-werror
++ --disable-werror
+ make
+ }
+