diff options
Diffstat (limited to 'libre/linux-libre-lts/PKGBUILD')
-rw-r--r-- | libre/linux-libre-lts/PKGBUILD | 197 |
1 files changed, 114 insertions, 83 deletions
diff --git a/libre/linux-libre-lts/PKGBUILD b/libre/linux-libre-lts/PKGBUILD index 407148498..cc1b500a2 100644 --- a/libre/linux-libre-lts/PKGBUILD +++ b/libre/linux-libre-lts/PKGBUILD @@ -14,20 +14,31 @@ _replacesoldkernels=() # '%' gets replaced with kernel suffix _replacesoldmodules=() # '%' gets replaced with kernel suffix pkgbase=linux-libre-lts -pkgver=5.10.39 +pkgver=6.6.14 pkgrel=1 pkgdesc='LTS Linux-libre' -rcnver=5.10.35 -rcnrel=armv7-x36 url='https://linux-libre.fsfla.org/' arch=(i686 x86_64 armv7h) license=(GPL2) makedepends=( - bc kmod libelf pahole cpio perl tar xz - xmlto python-sphinx python-sphinx_rtd_theme graphviz imagemagick + bc + cpio + gettext + libelf + pahole + perl + python + tar + xz + + # htmldocs + graphviz + imagemagick + python-sphinx + texlive-latexextra ) options=('!strip') -_srcname=linux-5.10 +_srcname=linux-6.6 source=( "https://linux-libre.fsfla.org/pub/linux-libre/releases/${_srcname##*-}-gnu/linux-libre-${_srcname##*-}-gnu.tar.xz"{,.sign} "https://linux-libre.fsfla.org/pub/linux-libre/releases/$pkgver-gnu/patch-${_srcname##*-}-gnu-$pkgver-gnu.xz"{,.sign} @@ -43,40 +54,59 @@ source=( # http://www.fsfla.org/pipermail/linux-libre/2015-November/003202.html 0002-fix-Atmel-maXTouch-touchscreen-support.patch # Arch Linux patches + # https://gitlab.archlinux.org/archlinux/packaging/packages/linux-lts 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch + 0002-skip-simpledrm-if-nvidia-drm.modeset=1-is.patch + 0003-Default-to-maximum-amount-of-ASLR-bits.patch ) source_i686=( # avoid using zstd compression in ultra mode (exhausts virtual memory) no-ultra-zstd.patch ) -source_armv7h=( - # RCN patch (CM3 firmware deblobbed and bloatware removed) - "https://repo.parabola.nu/other/rcn-libre/patches/$rcnver/rcn-libre-$rcnver-$rcnrel.patch"{,.sig} -) validpgpkeys=( - '474402C8C582DAFBE389C427BCB7CF877E7D47A7' # Alexandre Oliva - '6DB9C4B4F0D8C0DC432CF6E4227CA7C556B2BA78' # David P. + 474402C8C582DAFBE389C427BCB7CF877E7D47A7 # Alexandre Oliva + 6DB9C4B4F0D8C0DC432CF6E4227CA7C556B2BA78 # David P. ) -sha512sums=('ccc52db049a66ff146d9fc84fb00e783f2d04211156233a382f87589fec7631b8fbb3e76bfd94279607b883d25f9745e6c7d2bd62b13311dc6b425002bd42ec0' +sha256sums=('d71785bdb694fefaa4f183e5dd2ffc453c179db6f9427cc37e1ed046f0073ccf' 'SKIP' - '8a1c3dc82dc1c6e02041d8192cf9b5b61c922476e2e2ae92c15bb1307163e7dbd26f2a96a94f5eb23f453594f0247c6a72086a6b36afe709506019805d99cdad' + 'fce0be10daa22b9019538c9809726b787f5edf5b1a9a0d22844cce5233a31210' 'SKIP' - '13cb5bc42542e7b8bb104d5f68253f6609e463b6799800418af33eb0272cc269aaa36163c3e6f0aacbdaaa1d05e2827a4a7c4a08a029238439ed08b89c564bb3' + 'bfd4a7f61febe63c880534dcb7c31c5b932dde6acf991810b41a939a93535494' 'SKIP' - '7a3716bfe3b9f546da309c7492f3e08f8f506813afeb1c737a474c83313d5c313cf4582b65215c2cfce3b74d9d1021c96e8badafe8f6e5b01fe28d2b5c61ae78' + '6de8a8319271809ffdb072b68d53d155eef12438e6d04ff06a5a4db82c34fa8a' 'SKIP' - '267295aa0cea65684968420c68b32f1a66a22d018b9d2b2c1ef14267bcf4cb68aaf7099d073cbfefe6c25c8608bdcbbd45f7ac8893fdcecbf1e621abdfe9ecc1' + '13bd7a8d9ed6b6bc971e4cd162262c5a20448a83796af39ce394d827b0e5de74' 'SKIP' - 'd1d78de32b98d8aaebae4dba030bb859668174714b3f9ac7c80f9a05badc990370929d235da9344740fccaff3e83bbe2393535bb82c06d3e2113f24afe7bf756' - '97a5714bd97065b689043cfbd3c7c9e2bfadb6dc853875446a06240d07d47af76e3bba0a8acf0a5c1715ee32be1395566bb124af81d3b69fd95a2c17b1316d74' - '6012fa7b97c15ada82f0c205ea983bebac8b672ca498e22f524d219bdd8715784b24ce7d457803e8221a945c3daff95c4e467f70a420b9c2aa95d627f2d160a9' - '53103bf55b957b657039510527df0df01279dec59cda115a4d6454e4135025d4546167fa30bdc99107f232561c1e096d8328609ab5a876cf7017176f92ad3e0b' - '02af4dd2a007e41db0c63822c8ab3b80b5d25646af1906dc85d0ad9bb8bbf5236f8e381d7f91cf99ed4b0978c50aee37cb9567cdeef65b7ec3d91b882852b1af' - 'b8fe56e14006ab866970ddbd501c054ae37186ddc065bb869cf7d18db8c0d455118d5bda3255fb66a0dde38b544655cfe9040ffe46e41d19830b47959b2fb168' - 'aed7844c51ec705ef1ef5d9f1adf27939073c99d4fcc97051bed2fba1ec161fdde4c57cbe039209fb86c72918493bea55ed26189c1dda3dbea3a3a7019363818') -sha512sums_i686=('3a346ff5e0fdefafd28bc3dd0e4b6cd68e3f0014e59d1611d99f2edb8d074fd32649eeb0894a7e340e4f907b5cfc0e08e0753e0427a68dc113bb22835a892968') -sha512sums_armv7h=('dcf28ad46cfbf9eefcd036257ddfcdae989d05138a4c0d1384288da47e8d17d3562579f427e72fc3dfb077aa643c2428a314804c557d50d8f156e143fde06216' - 'SKIP') + 'e2ac4c8c597b5493685dec86894d16efe901ea3ca9d4672d7ce748553549bf1c' + '74b6aad76e0a087038731dc4bc775ec1cc768a55032d5a25e8477b8eb70f0955' + '2e2d59869253b2a1b3feb4b5dcdccb4a3385e9ae53fc94604492b8298bc2c0ad' + 'ca1708abbd2f8960c278722dc81a7c635973d92872386ad9e2fff10b86836e98' + '0376bd5efa31d4e2a9d52558777cebd9f0941df8e1adab916c868bf0c05f2fc3' + '351fd96be8cd5ebd0435c0a8a978673fc023e3b1026085e67f86d815b2285e25' + '21195509fded29d0256abfce947b5a8ce336d0d3e192f3f8ea90bde9dd95a889' + '2f23be91455e529d16aa2bbf5f2c7fe3d10812749828fc752240c21b2b845849' + '6400a06e6eb3a24b650bc3b1bba9626622f132697987f718e7ed6a5b8c0317bc') +sha256sums_i686=('a044d2ed2ac13f0435e94e567f6fd5d8380b694f74e344857ca64ef0c9424a07') +b2sums=('e3e753fed07258f34e2e44e1acd4be0c22a3c58a3ae4856b518a4f99358f5bf6e8f38e41f422d9a434b33b0d7ee972e93ac7d37c9734949d6db263afe4c4f47c' + 'SKIP' + '00b6f532d3dd8c6cda6c315b9b980411f33dc7e50c4dafe8247a1f023591da21d8b84b415fc4d9277e370ad94b635baa4c90c507e173326fc5ae0369143d4c0a' + 'SKIP' + '73fee2ae5cb1ffd3e6584e56da86a8b1ff6c713aae54d77c0dab113890fc673dc5f300eb9ed93fb367b045ece8fa80304ff277fe61665eccf7b7ce24f0c045eb' + 'SKIP' + 'd02a1153a4285b32c774dca4560fe37907ccf30b8e487a681b717ed95ae9bed5988875c0a118938e5885ae9d2857e53a6f216b732b6fa3368e3c5fe08c86382c' + 'SKIP' + '580911af9431c066bbc072fd22d5e2ef65f12d8358cec5ff5a4f1b7deebb86cef6b5c1ad631f42350af72c51d44d2093c71f761234fb224a8b9dbb3b64b8201d' + 'SKIP' + '79316cdbf03bb4d91e5ebff3229433ee422232a3eb59bca819b8f8a2cada3410aaa630859a63d7cadfb00777425eab90e1054f3f37d32914caf32c8ec668839e' + '3be29e751d1fe76caeb2474e31ee2df9b119dd6ba0002ca197bce2d66a5554465f839080fe470608a957324ded2a977c3f1635bf905db6cd352beb8ad939fe57' + '912493240dbcf506cf2cc02b8fd7e7b22de3e369a5bfd87ce5a7faf592e54f112f64422fc0f4fab1ff2c8cd530502b23d24b3a6d5e00f8f95d98f0eb25f8776a' + 'af69176b1117b94e56b043e97b0bd5873a2974a6a2fd52b102d0ffdca440ff68cfb241d6c4d4ef453cc8c220c236b739bad232e53fd500ce7672fa6e5ba87383' + 'c2214154c36900e311531bfe68184f31639f5c50fed23bc3803a7f18439b7ff258552a39f02fed0ea92f10744e17a6c55cef0ef1a98187f978fe480fb3dddc14' + '0c7ceba7cd90087db3296610a07886f337910bad265a32c052d3a703e6eb8e53f355ab9948d72d366408d968d8ee7435084dd89bef5ed0b69355fd884c2cd468' + '02a10396c92ab93124139fc3e37b1d4d8654227556d0d11486390da35dfc401ff5784ad86d0d2aa7eacac12bc451aa2ff138749748c7e24deadd040d5404734c' + '5dc21a7a6f0b840e6a671dcf09a865e42f0e2c000d5e45d3f3202c02946a8ab2207858d0b2ef1004648b8c2963efb428298b263c8494be806dfc9b6af66d5413' + 'ba6ebe349b3757411364a9ba2deaa30a8d71a247d518c159385977c2b4782771bda4edfc96bd954808617c9ba984d832471b63c11f5bd6003369bfe4051df31f') +b2sums_i686=('e7915714b504b92155c983a30df6d97966c14520dc9eb004671003dbdecf454b061138a6d237cabe86be32ae2ea4c598cdb821cb1dd52f6a9bfe5e280bffa321') _replacesarchkernel=("${_replacesarchkernel[@]/\%/${pkgbase#linux-libre}}") _replacesoldkernels=("${_replacesoldkernels[@]/\%/${pkgbase#linux-libre}}") @@ -104,36 +134,22 @@ prepare() { ../logo_linux_{clut224.ppm,vga16.ppm,mono.pbm} echo "Setting version..." - scripts/setlocalversion --save-scmversion echo "-$pkgrel" > localversion.10-pkgrel echo "${pkgbase#linux-libre}" > localversion.20-pkgname - if [ "$CARCH" = "armv7h" ]; then - local src_armv7h - for src_armv7h in "${source_armv7h[@]}"; do - src_armv7h="${src_armv7h%%::*}" - src_armv7h="${src_armv7h##*/}" - [[ $src_armv7h = *.patch ]] || continue - echo "Applying patch $src_armv7h..." - patch -Np1 < "../$src_armv7h" - done - fi - - if [ "$CARCH" = "i686" ]; then - local src_i686 - for src_i686 in "${source_i686[@]}"; do - src_i686="${src_i686%%::*}" - src_i686="${src_i686##*/}" - [[ $src_i686 = *.patch ]] || continue - echo "Applying patch $src_i686..." - patch -Np1 < "../$src_i686" - done - fi + local source=("${source[@]}") + case "$CARCH" in + "armv7h") + source+=("${source_armv7h[@]}") ;; + "i686") + source+=("${source_i686[@]}") ;; + esac local src for src in "${source[@]}"; do src="${src%%::*}" src="${src##*/}" + src="${src%.zst}" [[ $src = *.patch ]] || continue echo "Applying patch $src..." patch -Np1 < "../$src" @@ -142,6 +158,7 @@ prepare() { echo "Setting config..." cp ../config.$CARCH .config make olddefconfig + diff -u ../config.$CARCH .config || : make -s kernelrelease > version echo "Prepared $pkgbase version $(<version)" @@ -150,23 +167,38 @@ prepare() { build() { cd $_srcname make all - make htmldocs + + # temporarily disabled documentation due to sphinx_rtd_theme (FS32#163) + if [ "$CARCH" != "i686" ]; then + make htmldocs + fi } _package() { pkgdesc="The $pkgdesc kernel and modules" - depends=(coreutils kmod initramfs) - optdepends=('crda: to set the correct wireless channels of your country' - 'linux-libre-firmware: firmware images needed for some devices') - provides=(VIRTUALBOX-GUEST-MODULES WIREGUARD-MODULE) - replaces=(wireguard-lts) + depends=( + coreutils + initramfs + kmod + ) + optdepends=( + 'wireless-regdb: to set the correct wireless channels of your country' + 'linux-libre-firmware: firmware images needed for some devices' + ) + provides=( + KSMBD-MODULE + VIRTUALBOX-GUEST-MODULES + WIREGUARD-MODULE + ) + replaces=( + wireguard-lts + ) provides+=("${_replacesarchkernel[@]/%/=$pkgver}" "LINUX-ABI_VERSION=$pkgver") conflicts+=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}") replaces+=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}") cd $_srcname - local kernver="$(<version)" - local modulesdir="$pkgdir/usr/lib/modules/$kernver" + local modulesdir="$pkgdir/usr/lib/modules/$(<version)" echo "Installing boot image..." # systemd expects to find the kernel here to allow hibernation @@ -177,25 +209,27 @@ _package() { echo "$pkgbase" | install -Dm644 /dev/stdin "$modulesdir/pkgbase" echo "Installing modules..." - make INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 modules_install + ZSTD_CLEVEL=19 make INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 \ + DEPMOD=/doesnt/exist modules_install # Suppress depmod - # remove build and source links - rm "$modulesdir"/{source,build} + # remove build link + rm "$modulesdir"/build if [ "$CARCH" = "armv7h" ]; then echo "Installing device tree binaries..." make INSTALL_DTBS_PATH="$pkgdir/boot/dtbs/$pkgbase" dtbs_install - # armv7h presets only work with ALL_kver=$kernver - backup=("etc/mkinitcpio.d/$pkgbase.preset") + # armv7h presets only work with ALL_kver=$(<version) + backup+=("etc/mkinitcpio.d/$pkgbase.preset") echo "Installing mkinitcpio preset..." - sed "s|%PKGBASE%|$pkgbase|g;s|%KERNVER%|$kernver|g" ../linux-armv7h.preset \ + sed "s|%PKGBASE%|$pkgbase|g;s|%KERNVER%|$(<version)|g" ../linux-armv7h.preset \ | install -Dm644 /dev/stdin "$pkgdir/etc/mkinitcpio.d/$pkgbase.preset" fi } _package-headers() { pkgdesc="Headers and scripts for building modules for the $pkgdesc kernel" + depends=(pahole) provides=("${_replacesarchkernel[@]/%/-headers=$pkgver}") conflicts=("${_replacesarchkernel[@]/%/-headers}" "${_replacesoldkernels[@]/%/-headers}") replaces=("${_replacesarchkernel[@]/%/-headers}" "${_replacesoldkernels[@]/%/-headers}") @@ -209,46 +243,39 @@ _package-headers() { install -Dt "$builddir/kernel" -m644 kernel/Makefile install -Dt "$builddir/arch/$KARCH" -m644 arch/$KARCH/Makefile if [[ $CARCH = i686 ]]; then - install -Dt "$builddir/arch/$KARCH" -m644 arch/$KARCH/Makefile_32.cpu + install -Dt "$builddir/arch/x86" -m644 arch/x86/Makefile_32.cpu fi cp -t "$builddir" -a scripts - # add objtool for external module building and enabled VALIDATION_STACK option + # required when STACK_VALIDATION is enabled if [[ -e tools/objtool/objtool ]]; then install -Dt "$builddir/tools/objtool" tools/objtool/objtool fi - # add xfs and shmem for aufs building - mkdir -p "$builddir"/{fs/xfs,mm} + # required when DEBUG_INFO_BTF_MODULES is enabled + if [[ -e tools/bpf/resolve_btfids/resolve_btfids ]]; then + install -Dt "$builddir/tools/bpf/resolve_btfids" tools/bpf/resolve_btfids/resolve_btfids + fi echo "Installing headers..." cp -t "$builddir" -a include cp -t "$builddir/arch/$KARCH" -a arch/$KARCH/include install -Dt "$builddir/arch/$KARCH/kernel" -m644 arch/$KARCH/kernel/asm-offsets.s - # from linux-armv7 - if [ "$CARCH" = "armv7h" ]; then - for i in dove omap2; do - mkdir -p "$builddir/arch/$KARCH/mach-$i" - cp -t "$builddir/arch/$KARCH/mach-$i/" -a arch/$KARCH/mach-$i/include - done - for i in omap orion versatile; do - mkdir -p "$builddir/arch/$KARCH/plat-$i" - cp -t "$builddir/arch/$KARCH/plat-$i/" -a arch/$KARCH/plat-$i/include - done - fi - install -Dt "$builddir/drivers/md" -m644 drivers/md/*.h install -Dt "$builddir/net/mac80211" -m644 net/mac80211/*.h - # http://bugs.archlinux.org/task/13146 + # https://bugs.archlinux.org/task/13146 install -Dt "$builddir/drivers/media/i2c" -m644 drivers/media/i2c/msp3400-driver.h - # http://bugs.archlinux.org/task/20402 + # https://bugs.archlinux.org/task/20402 install -Dt "$builddir/drivers/media/usb/dvb-usb" -m644 drivers/media/usb/dvb-usb/*.h install -Dt "$builddir/drivers/media/dvb-frontends" -m644 drivers/media/dvb-frontends/*.h install -Dt "$builddir/drivers/media/tuners" -m644 drivers/media/tuners/*.h + # https://bugs.archlinux.org/task/71392 + install -Dt "$builddir/drivers/iio/common/hid-sensors" -m644 drivers/iio/common/hid-sensors/*.h + echo "Installing KConfig files..." find . -name 'Kconfig*' -exec install -Dm644 {} "$builddir/{}" \; @@ -272,7 +299,7 @@ _package-headers() { echo "Stripping build tools..." local file while read -rd '' file; do - case "$(file -bi "$file")" in + case "$(file -Sib "$file")" in application/x-sharedlib\;*) # Libraries (.so) strip -v $STRIP_SHARED "$file" ;; application/x-archive\;*) # Libraries (.a) @@ -314,7 +341,11 @@ _package-docs() { ln -sr "$builddir/Documentation" "$pkgdir/usr/share/doc/$pkgbase" } -pkgname=("$pkgbase" "$pkgbase-headers" "$pkgbase-docs") +pkgname=( + "$pkgbase" + "$pkgbase-headers" + "$pkgbase-docs" +) for _p in "${pkgname[@]}"; do eval "package_$_p() { $(declare -f "_package${_p#$pkgbase}") |