Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/core/linux-lts/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'core/linux-lts/PKGBUILD')
-rw-r--r--core/linux-lts/PKGBUILD116
1 files changed, 101 insertions, 15 deletions
diff --git a/core/linux-lts/PKGBUILD b/core/linux-lts/PKGBUILD
index a7fd4ab7..5e2126e6 100644
--- a/core/linux-lts/PKGBUILD
+++ b/core/linux-lts/PKGBUILD
@@ -1,17 +1,30 @@
-# upstream git revision: 67104f2fbd0f8a5c6280576291009e9c1294559e
+# Don't bother with sha256sums, use blake2 only
+unset sha256sums
+
+source_pentium4=('config.pentium4')
+source_i686=('config.i686')
+source_i486=('config.i486')
+b2sums_pentium4=('c2fa0bef869355e68553944d0a33e6089d752fef862262633e24c9349147496c9c1a20e0d1790341e716ab86ae6e9f6863841baf773e8511c0d7351c73897642')
+b2sums_i686=('c2fa0bef869355e68553944d0a33e6089d752fef862262633e24c9349147496c9c1a20e0d1790341e716ab86ae6e9f6863841baf773e8511c0d7351c73897642')
+b2sums_i486=('c2fa0bef869355e68553944d0a33e6089d752fef862262633e24c9349147496c9c1a20e0d1790341e716ab86ae6e9f6863841baf773e8511c0d7351c73897642')
-# fail if upstream's .config changes
-for ((i=0; i<${#sha256sums[@]}; i++)); do
- if [ "${sha256sums[${i}]}" = 'd153decf7c2e4168bd24b8cb0ee8135593bbbb934643b5fd2e832cbd7dcbb46a' ]; then
- sha256sums[${i}]='d40b29717194998c563ef076b49b116b4cd837c14af4b1117518f19a9a08d063'
- fi
-done
+# copy architecture specific config file, not default 'config'
eval "$(
- declare -f package_linux-lts-headers | \
+ declare -f prepare | \
sed '
- \,/tools/objtool" ,d
- \,arch/x86/Makefile,a install -Dt "$builddir/arch/x86" -m644 arch/x86/Makefile_32.cpu
+ s,\.\./config,../config.$CARCH,
+ '
+)"
+
+# patch architecture when copying the kernel Makefile
+eval "$(
+ declare -f package_${pkgbase}-headers | \
+ sed '
+ \,arch/x86/Makefile, {
+ a \
+ install -t "${builddir}/arch/x86" -m644 arch/x86/Makefile_32.cpu
+ }
$ i depends+=(gcc-libs=$(_get_gcc_version_from_config))
'
)"
@@ -35,10 +48,81 @@ _get_gcc_version_from_config() {
fi
}
+# use our tarballer instead of cloning from git
+for ((i=0; i<${#source[@]}; i++)); do
+ infos=$(
+ printf '%s\n' "${source[${i}]}" | \
+ sed '
+ s@^\(\([^:]\+\)::\)\?\(git\|hg\)+\([^#?]\+\)\(?signed\)\?#\(\(tag\|commit\)=[^?]\+\)$@\3 \2 \4 \5 \6@
+ t
+ s@^\(\([^:]\+\)::\)\?\(git\|hg\)+\([^#?]\+\)#\(\(tag\|commit\)=[^?]\+\)\(?signed\)\?$@\3 \2 \4 \7 \5@
+ t
+ d
+ '
+ )
+ if [ -n "${infos}" ]; then
+ source[${i}]=$(
+ type="${infos%% *}"
+ infos="${infos#* }"
+ if [ -n "${infos%% *}" ]; then
+ prefix="${infos%% *}"
+ else
+ prefix=''
+ fi
+ infos="${infos#* }"
+ repo="${infos%% *}"
+ repo64=$(
+ printf '%s' "${repo}" | \
+ base64 -w0 | \
+ sed 's/=/%3D/g'
+ )
+ infos="${infos#* }"
+ if [ "${infos%% *}" = '?signed' ]; then
+ key_check=$(
+ printf '&valid_keys='
+ printf '%s,' "${validpgpkeys[@]}" | \
+ sed 's/,$//'
+ )
+ else
+ key_check=''
+ fi
+ infos="${infos#* }"
+ if [ -z "${prefix}" ]; then
+ prefix="${repo%.git}"
+ prefix="${prefix##*/}"
+ fi
+ prefix_64=$(
+ printf '%s/' "${prefix}" | \
+ base64 -w0 | \
+ sed 's/=/%3D/g'
+ )
+
+ printf '%s-%s.tar.gz::https://archive-server.archlinux32.org/?t=%s&p=%s&r=%s%s&%s\n' \
+ "${prefix}" \
+ "${pkgver}" \
+ "${type}" \
+ "${prefix_64}" \
+ "${repo64}" \
+ "${key_check}" \
+ "${infos}"
+ )
+ fi
+done
+
+# upstream prepare() does already do the *.patch patching
+
# avoid using zstd compression in ultra mode (exhausts virtual memory)
source+=('no-ultra-zstd.patch')
-sha256sums+=('a044d2ed2ac13f0435e94e567f6fd5d8380b694f74e344857ca64ef0c9424a07')
-# upstream prepare() does already do the *.patch patching
+b2sums+=('e7915714b504b92155c983a30df6d97966c14520dc9eb004671003dbdecf454b061138a6d237cabe86be32ae2ea4c598cdb821cb1dd52f6a9bfe5e280bffa321')
+
+# objtool doesn't exist because we don't have STACK_VALIDATION
+# and resolve_btfids doesn't exist because we disable BTF due to pahole running out of memory
+eval "$(
+ declare -f package_${pkgbase}-headers | \
+ sed '/objtool/d' | \
+ sed '/resolve_btfids/d' | \
+ sed 's@tools/bpf/bpftool/vmlinux.h@@'
+)"
# temporarily disabled documentation due to sphinx_rtd_theme (FS32#163)
pkgname=(
@@ -47,11 +131,13 @@ pkgname=(
grep -v '^\$pkgbase-docs'
)
)
+
+# Also avoid building/running bpftool and doc-related
eval "$(
declare -f build | \
- sed '
- s/\bhtmldocs\b//
- '
+ sed '/htmldocs/d' | \
+ sed '/wait/d' | \
+ sed '/bpftool/d'
)"
makedepends=(${makedepends[@]//python-sphinx_rtd_theme/})
makedepends=(${makedepends[@]//python-sphinx<6.0.0/})