diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2021-10-29 10:23:46 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2021-10-29 10:23:46 +0200 |
commit | 0fea22281b1a30454afbb8728543f6383ca6a0ca (patch) | |
tree | aa0fdfe24b4433105b1a46998a5b90828291e7d1 | |
parent | e17223351da2abcc89fafb809bbd85484a1195ed (diff) | |
download | packages-0fea22281b1a30454afbb8728543f6383ca6a0ca.tar.xz |
added pacman-static to build-support
-rw-r--r-- | build-support/pacman-static/.SRCINFO | 109 | ||||
-rw-r--r-- | build-support/pacman-static/PKGBUILD | 317 | ||||
-rwxr-xr-x | build-support/pacman-static/build-packages.sh | 28 | ||||
-rw-r--r-- | build-support/pacman-static/ca-dir.patch | 31 | ||||
-rw-r--r-- | build-support/pacman-static/nvchecker-deps.toml | 51 | ||||
-rw-r--r-- | build-support/pacman-static/nvchecker-new.txt | 14 | ||||
-rw-r--r-- | build-support/pacman-static/nvchecker-old.txt | 14 |
7 files changed, 564 insertions, 0 deletions
diff --git a/build-support/pacman-static/.SRCINFO b/build-support/pacman-static/.SRCINFO new file mode 100644 index 00000000..d610abb3 --- /dev/null +++ b/build-support/pacman-static/.SRCINFO @@ -0,0 +1,109 @@ +pkgbase = pacman-static + pkgdesc = Statically-compiled pacman (to fix or install systems without libc) + pkgver = 6.0.0 + pkgrel = 1 + url = https://www.archlinux.org/pacman/ + arch = i686 + arch = x86_64 + arch = arm + arch = armv6h + arch = armv7h + arch = aarch64 + license = GPL + makedepends = meson + makedepends = musl + makedepends = kernel-headers-musl + depends = pacman + options = !emptydirs + source = https://sources.archlinux.org/other/pacman/pacman-6.0.0.tar.xz + source = https://sources.archlinux.org/other/pacman/pacman-6.0.0.tar.xz.sig + source = https://github.com/nghttp2/nghttp2/releases/download/v1.43.0/nghttp2-1.43.0.tar.xz + source = https://c-ares.haxx.se/download/c-ares-1.17.1.tar.gz + source = https://c-ares.haxx.se/download/c-ares-1.17.1.tar.gz.asc + source = https://curl.haxx.se/download/curl-7.77.0.tar.gz + source = https://curl.haxx.se/download/curl-7.77.0.tar.gz.asc + source = https://www.openssl.org/source/openssl-1.1.1k.tar.gz + source = https://www.openssl.org/source/openssl-1.1.1k.tar.gz.asc + source = ca-dir.patch + source = https://zlib.net/zlib-1.2.11.tar.gz + source = https://zlib.net/zlib-1.2.11.tar.gz.asc + source = https://tukaani.org/xz/xz-5.2.5.tar.gz + source = https://tukaani.org/xz/xz-5.2.5.tar.gz.sig + source = https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz + source = https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz.sig + source = https://github.com/facebook/zstd/releases/download/v1.5.0/zstd-1.5.0.tar.zst + source = https://github.com/facebook/zstd/releases/download/v1.5.0/zstd-1.5.0.tar.zst.sig + source = https://gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-1.42.tar.bz2 + source = https://gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-1.42.tar.bz2.sig + source = https://gnupg.org/ftp/gcrypt/libassuan/libassuan-2.5.5.tar.bz2 + source = https://gnupg.org/ftp/gcrypt/libassuan/libassuan-2.5.5.tar.bz2.sig + source = https://www.gnupg.org/ftp/gcrypt/gpgme/gpgme-1.15.1.tar.bz2 + source = https://www.gnupg.org/ftp/gcrypt/gpgme/gpgme-1.15.1.tar.bz2.sig + source = https://github.com/libarchive/libarchive/releases/download/3.5.1/libarchive-3.5.1.tar.xz + source = https://github.com/libarchive/libarchive/releases/download/3.5.1/libarchive-3.5.1.tar.xz.asc + validpgpkeys = 6645B0A8C7005E78DB1D7864F99FFE0FEAE999BD + validpgpkeys = B8151B117037781095514CA7BBDFFC92306B1121 + validpgpkeys = 27EDEAF22F3ABCEB50DB9A125CC908FDB71E12C2 + validpgpkeys = 8657ABB260F056B1E5190839D9C4D26D0E604491 + validpgpkeys = 7953AC1FBC3DC8B3B292393ED5E9E43F7DF9EE8C + validpgpkeys = 5ED46A6721D365587791E2AA783FCD8E58BCAFBA + validpgpkeys = 3690C240CE51B4670D30AD1C38EE757D69184620 + validpgpkeys = EC3CFE88F6CA0788774F5C1D1AA44BE649DE760A + validpgpkeys = 4EF4AC63455FC9F4545D9B7DEF8FE99528B52FFD + validpgpkeys = 6DAA6E64A76D2840571B4902528897B826403ADA + validpgpkeys = 031EC2536E580D8EA286A9F22071B08A33BD3F06 + validpgpkeys = A5A45B12AD92D964B89EEE2DEC560C81CEC2276E + sha512sums = 78fc5b70a2fc356746f8a4580ce7fd01b25b3463db1b9b008f02a97e22c236fdb1d09985769caf6ac675d9b1091ba0f71afa38ec5759cf7911f1b1a33586f563 + sha512sums = SKIP + sha512sums = eac69ba356870a1cba420a06771082897be8dd40a68f4e04223f41f3d22626e4f5b3766d3dbcc496dd212be01f64c3ac280a2ebddd31dd88f7350c20f56e5d39 + sha512sums = b11887bcc9274d368088e1a8b6aca62414f20675cf0bc58e948f54fa04c327c39dd23cefe7509eec6397db14b550a3f6b77f5c18b3d735b3eef48ce2da1dcd00 + sha512sums = SKIP + sha512sums = cacd85eb9b2ad90f59595b497035f4660b6c5cff2d653da939c9ceac6dd8dd4bc7bdcb2dfd251862af0c29b9299312bf7271ed0249734fca979c9588799635d6 + sha512sums = SKIP + sha512sums = 73cd042d4056585e5a9dd7ab68e7c7310a3a4c783eafa07ab0b560e7462b924e4376436a6d38a155c687f6942a881cfc0c1b9394afcde1d8c46bf396e7d51121 + sha512sums = SKIP + sha512sums = 3857c298663728a465b5f95a3ef44547efbfb420d755e9dde7f20aa3905171b400e1c126d8db5c2b916c733bbd0724d8753cad16c9baf7b12dcd225a3ee04a97 + sha512sums = 73fd3fff4adeccd4894084c15ddac89890cd10ef105dd5e1835e1e9bbb6a49ff229713bd197d203edfa17c2727700fce65a2a235f07568212d820dca88b528ae + sha512sums = SKIP + sha512sums = 7443674247deda2935220fbc4dfc7665e5bb5a260be8ad858c8bd7d7b9f0f868f04ea45e62eb17c0a5e6a2de7c7500ad2d201e2d668c48ca29bd9eea5a73a3ce + sha512sums = SKIP + sha512sums = 083f5e675d73f3233c7930ebe20425a533feedeaaa9d8cc86831312a6581cefbe6ed0d08d2fa89be81082f2a5abdabca8b3c080bf97218a1bd59dc118a30b9f3 + sha512sums = SKIP + sha512sums = 071b4596afbb290fdfab0021b1ddda3e24f508680c643259ced683ec4685fca186f6c9c111097594d2d2911976df1a2f92a321ae71a0d5b9734c9f8e2c1bff76 + sha512sums = SKIP + sha512sums = f6d95712a874edefc39a7746062c8037a62801a550560c5b2eab08b5b86987c1de5be60eba5fcb56d35a37db109aa32d07b7eff2bb99800c1c47d2227421a8f4 + sha512sums = SKIP + sha512sums = 70117f77aa43bbbe0ed28da5ef23834c026780a74076a92ec775e30f851badb423e9a2cb9e8d142c94e4f6f8a794988c1b788fd4bd2271e562071adf0ab16403 + sha512sums = SKIP + sha512sums = 1d75a848cce6389f7cb8896b57a28dfe1dc5a447bfb4f128b0994a43e04134343400a3be063e971f03dfd595474cfd558519741d5d56afb3e84853ad4f2a45c2 + sha512sums = SKIP + sha512sums = 04ad3e98e840fee19eb4c2652f29eccef1cffc071fd5c6a6feb358fea6048699281c7baacbb9ca8f823b1bfaaef6d4c87d9cf6a8b0c28aab53b75b2d259b2045 + sha512sums = SKIP + b2sums = 79443cbee5df7b367267c70da04d570455a42d9cfa2e623333fd30e640d3cd9f01da382134efcd1c84202331499fd134b23dde8788a89f6949f0eb40e0e7a38b + b2sums = SKIP + b2sums = 0e6c674486c484558a55822501a13ac93c4e890cf62749bc8519690f468912701329b7b9e83b0b68c3f35b72442b1ed47a90050cccd3fc05d79622e1e26634dc + b2sums = 31dac21ecae231e2a201dc1ba954c1a0663a06f93eb8e7e033ca3c6d385f53e07af0b04854739f1ee8a7f0693f67f620143e152ef092b49342c62279a0480905 + b2sums = SKIP + b2sums = b75e0de2f4134444d62c4495e11045181bb10624c0b48efcfdd45d18749936293b9f1b1f3b59b7c80e997d144a6be266b3cd945a147281a193aa040b6995e6be + b2sums = SKIP + b2sums = e9bd90f17bc819c4960d07bbee04346e8a7adb87a764a09d033ef76f1d638c67b180c4f2beb84ec25fbff54ccc9c14c13b9b16a27cac231a5dd22b02635d5cec + b2sums = SKIP + b2sums = e2ff99e8236487f43171c771d0ee89137b73f3d0b2756bcb0d6525c810ffa9f5a3763c3744327fb47cef21eabfc50fff96632f4bbe2cd244206a99daffa0c25a + b2sums = 6bfc4bca5dcadba8a0d4121a2b3ed0bfe440c261003521862c8e6381f1a6f0a72d3fc037351d30afd7ef321e8e8d2ec817c046ac749f2ca0c97fbdc2f7e840b7 + b2sums = SKIP + b2sums = aded57324e129572c41646b3cc3b0b59a459452d9338d9245663b63dac2a463fb1f1b2b1d2d4ad3c09cb71fb8439df52cd94f24db99e782fc899b94a288a3043 + b2sums = SKIP + b2sums = 22ab3acd84f4db8c3d6f59340c252faedfd4447cea00dafbd652e65b6cf8a20adf6835c22e58563004cfafdb15348c924996230b4b23cae42da5e25eeac4bdad + b2sums = SKIP + b2sums = cfea18b2347bf893d9bd461e57113d0a141040a1f7a42db6221ed9662f84023f45b058df3382cc06d82596f8eb98e0806f3abe1e79155fafd46da2a8b746bfbe + b2sums = SKIP + b2sums = eb3381ec7106cfe5dca333391f473e97b03df83f247d3067e9f933ed7206f826e59d2b74b8c28d41e785ffe1c2980b680470064eb2fa2ff1ee3d8fa8be5b81a8 + b2sums = SKIP + b2sums = 24952e97c757b97c387ab4c2c4bf7b040f2874e9326c129805c7f5326fa14d80e083b0842e336a635531a2c8d4a66d428c816bae6b175f1c4518add1ffa3554d + b2sums = SKIP + b2sums = d3a6ccaa35360ed3fc79364dfcc3f2fdcb70e5e41ac72ef011373a39d5def9be9ce1be45843ab65a87630d3fc570d29db5f40b9a273aa8e281464c9d1d3477de + b2sums = SKIP + b2sums = 0be26a858bffc48bc3dea64e7ea16a703fd7dae1c37dd93e1acde291b6799e323461b3b0bb31c12f63e3429aa4be72d88636606d786978f8d56b94dd2dc144c7 + b2sums = SKIP + +pkgname = pacman-static diff --git a/build-support/pacman-static/PKGBUILD b/build-support/pacman-static/PKGBUILD new file mode 100644 index 00000000..3ee63774 --- /dev/null +++ b/build-support/pacman-static/PKGBUILD @@ -0,0 +1,317 @@ +# Maintainer: Eli Schwartz <eschwartz@archlinux.org> + +# All my PKGBUILDs are managed at https://github.com/eli-schwartz/pkgbuilds + +pkgname=pacman-static +pkgver=6.0.0 +_cares_ver=1.17.1 +_nghttp2_ver=1.43.0 +_curlver=7.77.0 +_sslver=1.1.1k +_zlibver=1.2.11 +_xzver=5.2.5 +_bzipver=1.0.8 +_zstdver=1.5.0 +_libarchive_ver=3.5.1 +_gpgerrorver=1.42 +_libassuanver=2.5.5 +_gpgmever=1.15.1 +pkgrel=1 +pkgdesc="Statically-compiled pacman (to fix or install systems without libc)" +arch=('i486' 'i686' 'pentium4' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64') +url="https://www.archlinux.org/pacman/" +license=('GPL') +depends=('pacman') +makedepends=('meson' 'musl' 'kernel-headers-musl') +options=('!emptydirs') + +# pacman +source=("https://sources.archlinux.org/other/pacman/pacman-${pkgver}.tar.xz"{,.sig}) +validpgpkeys=('6645B0A8C7005E78DB1D7864F99FFE0FEAE999BD' # Allan McRae <allan@archlinux.org> + 'B8151B117037781095514CA7BBDFFC92306B1121') # Andrew Gregory (pacman) <andrew@archlinux.org> +# nghttp2 +source+=("https://github.com/nghttp2/nghttp2/releases/download/v$_nghttp2_ver/nghttp2-$_nghttp2_ver.tar.xz") +# c-ares +source+=("https://c-ares.haxx.se/download/c-ares-${_cares_ver}.tar.gz"{,.asc}) +validpgpkeys+=('27EDEAF22F3ABCEB50DB9A125CC908FDB71E12C2') # Daniel Stenberg <daniel@haxx.se> +# curl +source+=("https://curl.haxx.se/download/curl-${_curlver}.tar.gz"{,.asc}) +# openssl +source+=("https://www.openssl.org/source/openssl-${_sslver}.tar.gz"{,.asc} + "ca-dir.patch") +validpgpkeys+=('8657ABB260F056B1E5190839D9C4D26D0E604491' # Matt Caswell <matt@openssl.org> + '7953AC1FBC3DC8B3B292393ED5E9E43F7DF9EE8C') # Richard Levitte <levitte@openssl.org> +# zlib +source+=("https://zlib.net/zlib-${_zlibver}.tar.gz"{,.asc}) +validpgpkeys+=('5ED46A6721D365587791E2AA783FCD8E58BCAFBA') # Mark Adler <madler@alumni.caltech.edu> +# xz +source+=("https://tukaani.org/xz/xz-${_xzver}.tar.gz"{,.sig}) +validpgpkeys+=('3690C240CE51B4670D30AD1C38EE757D69184620') # Lasse Collin <lasse.collin@tukaani.org> +# bzip2 +source+=("https://sourceware.org/pub/bzip2/bzip2-${_bzipver}.tar.gz"{,.sig}) +validpgpkeys+=('EC3CFE88F6CA0788774F5C1D1AA44BE649DE760A') # Mark Wielaard <mark@klomp.org> +# zstd +source+=("https://github.com/facebook/zstd/releases/download/v${_zstdver}/zstd-${_zstdver}.tar.zst"{,.sig}) +validpgpkeys+=('4EF4AC63455FC9F4545D9B7DEF8FE99528B52FFD') # Zstandard Release Signing Key <signing@zstd.net> +# libgpg-error +source+=("https://gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-${_gpgerrorver}.tar.bz2"{,.sig}) +validpgpkeys+=('6DAA6E64A76D2840571B4902528897B826403ADA' # "Werner Koch (dist signing 2020)" + '031EC2536E580D8EA286A9F22071B08A33BD3F06') # NIIBE Yutaka (GnuPG Release Key) <gniibe@fsij.org> +# libassuan +source+=("https://gnupg.org/ftp/gcrypt/libassuan/libassuan-${_libassuanver}.tar.bz2"{,.sig}) +# gpgme +source+=("https://www.gnupg.org/ftp/gcrypt/gpgme/gpgme-${_gpgmever}.tar.bz2"{,.sig}) +# libarchive +source+=("https://github.com/libarchive/libarchive/releases/download/${_libarchive_ver}/libarchive-${_libarchive_ver}.tar.xz"{,.asc}) +validpgpkeys+=('A5A45B12AD92D964B89EEE2DEC560C81CEC2276E') # Martin Matuska <mm@FreeBSD.org> + +sha512sums=('78fc5b70a2fc356746f8a4580ce7fd01b25b3463db1b9b008f02a97e22c236fdb1d09985769caf6ac675d9b1091ba0f71afa38ec5759cf7911f1b1a33586f563' + 'SKIP' + 'eac69ba356870a1cba420a06771082897be8dd40a68f4e04223f41f3d22626e4f5b3766d3dbcc496dd212be01f64c3ac280a2ebddd31dd88f7350c20f56e5d39' + 'b11887bcc9274d368088e1a8b6aca62414f20675cf0bc58e948f54fa04c327c39dd23cefe7509eec6397db14b550a3f6b77f5c18b3d735b3eef48ce2da1dcd00' + 'SKIP' + 'cacd85eb9b2ad90f59595b497035f4660b6c5cff2d653da939c9ceac6dd8dd4bc7bdcb2dfd251862af0c29b9299312bf7271ed0249734fca979c9588799635d6' + 'SKIP' + '73cd042d4056585e5a9dd7ab68e7c7310a3a4c783eafa07ab0b560e7462b924e4376436a6d38a155c687f6942a881cfc0c1b9394afcde1d8c46bf396e7d51121' + 'SKIP' + '3857c298663728a465b5f95a3ef44547efbfb420d755e9dde7f20aa3905171b400e1c126d8db5c2b916c733bbd0724d8753cad16c9baf7b12dcd225a3ee04a97' + '73fd3fff4adeccd4894084c15ddac89890cd10ef105dd5e1835e1e9bbb6a49ff229713bd197d203edfa17c2727700fce65a2a235f07568212d820dca88b528ae' + 'SKIP' + '7443674247deda2935220fbc4dfc7665e5bb5a260be8ad858c8bd7d7b9f0f868f04ea45e62eb17c0a5e6a2de7c7500ad2d201e2d668c48ca29bd9eea5a73a3ce' + 'SKIP' + '083f5e675d73f3233c7930ebe20425a533feedeaaa9d8cc86831312a6581cefbe6ed0d08d2fa89be81082f2a5abdabca8b3c080bf97218a1bd59dc118a30b9f3' + 'SKIP' + '071b4596afbb290fdfab0021b1ddda3e24f508680c643259ced683ec4685fca186f6c9c111097594d2d2911976df1a2f92a321ae71a0d5b9734c9f8e2c1bff76' + 'SKIP' + 'f6d95712a874edefc39a7746062c8037a62801a550560c5b2eab08b5b86987c1de5be60eba5fcb56d35a37db109aa32d07b7eff2bb99800c1c47d2227421a8f4' + 'SKIP' + '70117f77aa43bbbe0ed28da5ef23834c026780a74076a92ec775e30f851badb423e9a2cb9e8d142c94e4f6f8a794988c1b788fd4bd2271e562071adf0ab16403' + 'SKIP' + '1d75a848cce6389f7cb8896b57a28dfe1dc5a447bfb4f128b0994a43e04134343400a3be063e971f03dfd595474cfd558519741d5d56afb3e84853ad4f2a45c2' + 'SKIP' + '04ad3e98e840fee19eb4c2652f29eccef1cffc071fd5c6a6feb358fea6048699281c7baacbb9ca8f823b1bfaaef6d4c87d9cf6a8b0c28aab53b75b2d259b2045' + 'SKIP') +b2sums=('79443cbee5df7b367267c70da04d570455a42d9cfa2e623333fd30e640d3cd9f01da382134efcd1c84202331499fd134b23dde8788a89f6949f0eb40e0e7a38b' + 'SKIP' + '0e6c674486c484558a55822501a13ac93c4e890cf62749bc8519690f468912701329b7b9e83b0b68c3f35b72442b1ed47a90050cccd3fc05d79622e1e26634dc' + '31dac21ecae231e2a201dc1ba954c1a0663a06f93eb8e7e033ca3c6d385f53e07af0b04854739f1ee8a7f0693f67f620143e152ef092b49342c62279a0480905' + 'SKIP' + 'b75e0de2f4134444d62c4495e11045181bb10624c0b48efcfdd45d18749936293b9f1b1f3b59b7c80e997d144a6be266b3cd945a147281a193aa040b6995e6be' + 'SKIP' + 'e9bd90f17bc819c4960d07bbee04346e8a7adb87a764a09d033ef76f1d638c67b180c4f2beb84ec25fbff54ccc9c14c13b9b16a27cac231a5dd22b02635d5cec' + 'SKIP' + 'e2ff99e8236487f43171c771d0ee89137b73f3d0b2756bcb0d6525c810ffa9f5a3763c3744327fb47cef21eabfc50fff96632f4bbe2cd244206a99daffa0c25a' + '6bfc4bca5dcadba8a0d4121a2b3ed0bfe440c261003521862c8e6381f1a6f0a72d3fc037351d30afd7ef321e8e8d2ec817c046ac749f2ca0c97fbdc2f7e840b7' + 'SKIP' + 'aded57324e129572c41646b3cc3b0b59a459452d9338d9245663b63dac2a463fb1f1b2b1d2d4ad3c09cb71fb8439df52cd94f24db99e782fc899b94a288a3043' + 'SKIP' + '22ab3acd84f4db8c3d6f59340c252faedfd4447cea00dafbd652e65b6cf8a20adf6835c22e58563004cfafdb15348c924996230b4b23cae42da5e25eeac4bdad' + 'SKIP' + 'cfea18b2347bf893d9bd461e57113d0a141040a1f7a42db6221ed9662f84023f45b058df3382cc06d82596f8eb98e0806f3abe1e79155fafd46da2a8b746bfbe' + 'SKIP' + 'eb3381ec7106cfe5dca333391f473e97b03df83f247d3067e9f933ed7206f826e59d2b74b8c28d41e785ffe1c2980b680470064eb2fa2ff1ee3d8fa8be5b81a8' + 'SKIP' + '24952e97c757b97c387ab4c2c4bf7b040f2874e9326c129805c7f5326fa14d80e083b0842e336a635531a2c8d4a66d428c816bae6b175f1c4518add1ffa3554d' + 'SKIP' + 'd3a6ccaa35360ed3fc79364dfcc3f2fdcb70e5e41ac72ef011373a39d5def9be9ce1be45843ab65a87630d3fc570d29db5f40b9a273aa8e281464c9d1d3477de' + 'SKIP' + '0be26a858bffc48bc3dea64e7ea16a703fd7dae1c37dd93e1acde291b6799e323461b3b0bb31c12f63e3429aa4be72d88636606d786978f8d56b94dd2dc144c7' + 'SKIP') + +export LDFLAGS="$LDFLAGS -static" +export CC=musl-gcc +export CXX=musl-gcc + +# https://www.openwall.com/lists/musl/2014/11/05/3 +# fstack-protector and musl do not get along but only on i686 +if [[ $CARCH = i686 || $CARCH = pentium4 || $CARCH = i486 ]]; then + # silly build systems have configure checks or buildtime programs that don't CFLAGS but do do CC + export CC="musl-gcc -fno-stack-protector" + export CXX="musl-gcc -fno-stack-protector" + export CFLAGS="${CFLAGS/-fstack-protector-strong/}" + export CXXFLAGS="${CXXFLAGS/-fstack-protector-strong/}" +fi + +# keep using xz-compressed packages, because one use of the package is to +# recover on systems with broken zstd support in libarchive +[[ $PKGEXT = .pkg.tar.zst ]] && PKGEXT=.pkg.tar.xz + +build() { + export PKG_CONFIG_PATH="${srcdir}"/temp/usr/lib/pkgconfig + export PATH="${srcdir}/temp/usr/bin:${PATH}" + + # openssl + cd "${srcdir}"/openssl-${_sslver} + case ${CARCH} in + x86_64) + openssltarget='linux-x86_64' + optflags='enable-ec_nistp_64_gcc_128' + ;; + pentium4) + openssltarget='linux-elf' + optflags='' + ;; + i686) + openssltarget='linux-elf' + optflags='no-sse2' + ;; + i486) + openssltarget='linux-elf' + optflags='386' + ;; + arm|armv6h|armv7h) + openssltarget='linux-armv4' + optflags='' + ;; + aarch64) + openssltarget='linux-aarch64' + optflags='no-afalgeng' + ;; + esac + # mark stack as non-executable: http://bugs.archlinux.org/task/12434 + ./Configure --prefix="${srcdir}"/temp/usr \ + --openssldir=/etc/ssl \ + --libdir=lib \ + -static \ + no-ssl3-method \ + ${optflags} \ + "${openssltarget}" \ + "-Wa,--noexecstack ${CPPFLAGS} ${CFLAGS} ${LDFLAGS}" + make build_libs + make install_dev + + # xz + cd "${srcdir}"/xz-${_xzver} + ./configure --prefix="${srcdir}"/temp/usr \ + --disable-shared + cd src/liblzma + make + make install + + # bzip2 + cd "${srcdir}"/bzip2-${_bzipver} + sed -i "s|-O2|${CFLAGS}|g;s|CC=gcc|CC=${CC}|g" Makefile + make libbz2.a + install -Dvm644 bzlib.h "${srcdir}"/temp/usr/include/ + install -Dvm644 libbz2.a "${srcdir}"/temp/usr/lib/ + + cd "${srcdir}"/zstd-${_zstdver}/lib + make libzstd.a + make PREFIX="${srcdir}"/temp/usr install-pc install-static install-includes + + # zlib + cd "${srcdir}/"zlib-${_zlibver} + ./configure --prefix="${srcdir}"/temp/usr \ + --static + make libz.a + make install + + # libarchive + cd "${srcdir}"/libarchive-${_libarchive_ver} + CPPFLAGS="-I${srcdir}/temp/usr/include" CFLAGS="-L${srcdir}/temp/usr/lib" \ + ./configure --prefix="${srcdir}"/temp/usr \ + --without-xml2 \ + --without-nettle \ + --disable-{bsdtar,bsdcat,bsdcpio} \ + --without-expat \ + --disable-shared + make + make install-{includeHEADERS,libLTLIBRARIES,pkgconfigDATA,includeHEADERS} + + # nghttp2 + cd "${srcdir}"/nghttp2-${_nghttp2_ver} + ./configure --prefix="${srcdir}"/temp/usr \ + --disable-shared \ + --disable-examples \ + --disable-python-bindings + make -C lib + make -C lib install + + # c-ares + # needed for curl, which does not use it in the repos + # but seems to be needed for static builds + cd "${srcdir}"/c-ares-${_cares_ver} + ./configure --prefix="${srcdir}"/temp/usr \ + --disable-shared + make -C src/lib + make install-pkgconfigDATA + make -C src/lib install + make -C include install + + # curl + cd "${srcdir}"/curl-${_curlver} + # c-ares is not detected via pkg-config :( + ./configure --prefix="${srcdir}"/temp/usr \ + --disable-shared \ + --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt \ + --disable-{dict,gopher,imap,imaps,ldap,ldaps,manual,pop3,pop3s,rtsp,scp,sftp,smb,smbs,smtp,smtps,telnet,tftp} \ + --without-{brotli,libidn2,librtmp,libssh2} \ + --disable-libcurl-option \ + --with-openssl \ + --enable-ares="${srcdir}"/temp/usr + make -C lib + make install-pkgconfigDATA + make -C lib install + make -C include install + + # libgpg-error + cd "${srcdir}"/libgpg-error-${_gpgerrorver} + ./configure --prefix="${srcdir}"/temp/usr \ + --disable-shared + make -C src + make -C src install-{{,dist_}binSCRIPTS,libLTLIBRARIES,nodist_includeHEADERS,pkgconfigDATA} + + # libassuan + cd "${srcdir}"/libassuan-${_libassuanver} + ./configure --prefix="${srcdir}"/temp/usr \ + --disable-shared + make -C src + make -C src install-{binSCRIPTS,libLTLIBRARIES,nodist_includeHEADERS,pkgconfigDATA} + + # gpgme + cd "${srcdir}"/gpgme-${_gpgmever} + ./configure --prefix="${srcdir}"/temp/usr \ + --disable-fd-passing \ + --disable-shared \ + --disable-languages + make -C src + make -C src install-{binSCRIPTS,libLTLIBRARIES,nodist_includeHEADERS,pkgconfigDATA} + + # ew libtool + rm "${srcdir}"/temp/usr/lib/lib*.la + + # Finally, it's a pacman! + mkdir -p "${srcdir}"/pacman-${pkgver}/builddir + cd "${srcdir}"/pacman-${pkgver}/builddir + meson setup \ + --prefix=/usr \ + --includedir=lib/pacman/include \ + --libdir=lib/pacman/lib \ + --buildtype=plain \ + -Dbuildstatic=true \ + -Ddefault_library=static \ + -Ddoc=disabled \ + -Dldconfig=/usr/bin/ldconfig \ + -Dscriptlet-shell=/usr/bin/bash \ + .. + ninja +} + +package() { + cd "${srcdir}"/pacman-${pkgver}/builddir + DESTDIR="${pkgdir}" ninja install + + rm -rf "${pkgdir}"/usr/share "${pkgdir}"/etc + for exe in "${pkgdir}"/usr/bin/*; do + if [[ -f ${exe} && $(head -c4 "${exe}") = $'\x7fELF' ]]; then + mv "${exe}" "${exe}"-static + else + rm "${exe}" + fi + done + + cp -a "${srcdir}"/temp/usr/{bin,include,lib} "${pkgdir}"/usr/lib/pacman/ + sed -i "s@${srcdir}/temp/usr@/usr/lib/pacman@g" \ + "${pkgdir}"/usr/lib/pacman/lib/pkgconfig/*.pc \ + "${pkgdir}"/usr/lib/pacman/bin/* +} diff --git a/build-support/pacman-static/build-packages.sh b/build-support/pacman-static/build-packages.sh new file mode 100755 index 00000000..b1eb05a2 --- /dev/null +++ b/build-support/pacman-static/build-packages.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +# requires devtools, devtools32 (for extra-i686-build) +# if debug variants of extra-* exist, use them (I have a custom script for this) + +rm -rf artifacts/ + +for buildarch in x86_64 i686; do + extradir=artifacts/${buildarch}-extracted + + if command -v debug-${buildarch}-build; then + debug-${buildarch}-build + else + extra-${buildarch}-build + fi + + CARCH=${buildarch} makepkg --packagelist | while read -r pkgfile; do + if bsdtar -tf "${pkgfile}" usr/bin/pacman-static > /dev/null 2>&1; then + mkdir -p ${extradir} + bsdtar --strip-components 2 -C ${extradir} -xf "${pkgfile}" usr/bin/pacman-static + break + fi + done + + xz -ke ${extradir}/pacman-static + gpg --detach-sign ${extradir}/pacman-static + gpg --detach-sign ${extradir}/pacman-static.xz +done diff --git a/build-support/pacman-static/ca-dir.patch b/build-support/pacman-static/ca-dir.patch new file mode 100644 index 00000000..1daba849 --- /dev/null +++ b/build-support/pacman-static/ca-dir.patch @@ -0,0 +1,31 @@ +--- apps/CA.pl.in 2016-09-26 11:46:04.000000000 +0200 ++++ apps/CA.pl.in 2016-11-01 16:02:16.709616823 +0100 +@@ -33,7 +33,7 @@ + my $PKCS12 = "$openssl pkcs12"; + + # default openssl.cnf file has setup as per the following +-my $CATOP = "./demoCA"; ++my $CATOP = "/etc/ssl"; + my $CAKEY = "cakey.pem"; + my $CAREQ = "careq.pem"; + my $CACERT = "cacert.pem"; +--- apps/openssl.cnf 2016-09-26 11:46:04.000000000 +0200 ++++ apps/openssl.cnf 2016-11-01 16:02:48.378503427 +0100 +@@ -39,7 +39,7 @@ + #################################################################### + [ CA_default ] + +-dir = ./demoCA # Where everything is kept ++dir = /etc/ssl # Where everything is kept + certs = $dir/certs # Where the issued certs are kept + crl_dir = $dir/crl # Where the issued crl are kept + database = $dir/index.txt # database index file. +@@ -323,7 +323,7 @@ + [ tsa_config1 ] + + # These are used by the TSA reply generation only. +-dir = ./demoCA # TSA root directory ++dir = /etc/ssl # TSA root directory + serial = $dir/tsaserial # The current serial number (mandatory) + crypto_device = builtin # OpenSSL engine to use for signing + signer_cert = $dir/tsacert.pem # The TSA signing certificate diff --git a/build-support/pacman-static/nvchecker-deps.toml b/build-support/pacman-static/nvchecker-deps.toml new file mode 100644 index 00000000..88f3d02c --- /dev/null +++ b/build-support/pacman-static/nvchecker-deps.toml @@ -0,0 +1,51 @@ +[__config__] +oldver = "nvchecker-old.txt" +newver = "nvchecker-new.txt" + +[c-ares] +source = "archpkg" +archpkg = "c-ares" + +[nghttp2] +source = "archpkg" +archpkg = "libnghttp2" + +[curl] +source = "archpkg" +archpkg = "curl" + +[ssl] +source = "archpkg" +archpkg = "openssl" + +[zlib] +source = "archpkg" +archpkg = "zlib" + +[xz] +source = "archpkg" +archpkg = "xz" + +[bzip] +source = "archpkg" +archpkg = "bzip2" + +[zstd] +source = "archpkg" +archpkg = "zstd" + +[libarchive] +source = "archpkg" +archpkg = "libarchive" + +[gpgerror] +source = "archpkg" +archpkg = "libgpg-error" + +[libassuan] +source = "archpkg" +archpkg = "libassuan" + +[gpgme] +source = "archpkg" +archpkg = "gpgme" diff --git a/build-support/pacman-static/nvchecker-new.txt b/build-support/pacman-static/nvchecker-new.txt new file mode 100644 index 00000000..6758eaeb --- /dev/null +++ b/build-support/pacman-static/nvchecker-new.txt @@ -0,0 +1,14 @@ +{ + "bzip": "1.0.8-4", + "c-ares": "1.17.1-1", + "curl": "7.77.0-1", + "gpgerror": "1.42-1", + "gpgme": "1.15.1-1", + "libarchive": "3.5.1-1", + "libassuan": "2.5.5-1", + "nghttp2": "1.43.0-1", + "ssl": "1.1.1.k-1", + "xz": "5.2.5-1", + "zlib": "1.2.11-4", + "zstd": "1.5.0-1" +} diff --git a/build-support/pacman-static/nvchecker-old.txt b/build-support/pacman-static/nvchecker-old.txt new file mode 100644 index 00000000..72cf2c0f --- /dev/null +++ b/build-support/pacman-static/nvchecker-old.txt @@ -0,0 +1,14 @@ +{ + "bzip": "1.0.8-4", + "c-ares": "1.17.1-1", + "curl": "7.77.0-1", + "gpgerror": "1.42-1", + "gpgme": "1.15.1-1", + "libarchive": "3.5.1-1", + "libassuan": "2.5.5-1", + "nghttp2": "1.43.0-1", + "ssl": "1.1.1.k-1", + "xz": "5.2.5-1", + "zlib": "1.2.11-4", + "zstd": "1.4.9-1" +} |