aboutsummaryrefslogtreecommitdiffci
path: root/make-sources.sh
diff refs
from: back
to: back
| flip
diff options
context:
space:
mode:
Diffstat (limited to 'make-sources.sh')
-rwxr-xr-xmake-sources.sh28
1 files changed, 21 insertions, 7 deletions
diff --git a/make-sources.sh b/make-sources.sh
index b4abb4b..5c11ee2 100755
--- a/make-sources.sh
+++ b/make-sources.sh
@@ -3,8 +3,9 @@
# Assemble the rpmbuild sources for kernel-surface.spec:
#
# * kernel-surface-patches-<upstream_ver>-<patchset_ver>.tar.gz, built from the
-# overlay submodule's sys-kernel/vanilla-kernel/files directories listed in
-# patch-order.txt
+# directories listed in patch-order.txt: bare names come from the overlay
+# submodule's sys-kernel/vanilla-kernel/files, "local:" ones from this
+# repository's patches/
# * the upstream kernel tarball
# * the base kernel config and the fragments from config/
#
@@ -32,6 +33,7 @@ spec="${script_dir}/kernel-surface.spec"
order_file="${script_dir}/patch-order.txt"
overlay_dir=${OVERLAY_DIR:-${script_dir}/overlay}
patch_root="${overlay_dir}/sys-kernel/vanilla-kernel/files"
+local_patch_root="${script_dir}/patches"
output_dir=""
skip_download=false
@@ -95,7 +97,19 @@ while read -r dir; do
dir=${dir//[[:space:]]/}
[[ -n ${dir} ]] || continue
- src="${patch_root}/${dir}"
+ # "local:foo" is patches/foo in this repository, "foo" is the overlay's
+ # files/foo. The staging name keeps the prefix so the tarball, and the
+ # spec's "Applying ..." log, say where each patch came from.
+ if [[ ${dir} == local:* ]]; then
+ name=${dir#local:}
+ src="${local_patch_root}/${name}"
+ label="local-${name}"
+ else
+ name=${dir}
+ src="${patch_root}/${name}"
+ label=${name}
+ fi
+
if [[ ! -d ${src} ]]; then
echo "ERROR: ${src} does not exist (listed in patch-order.txt)" >&2
exit 1
@@ -107,11 +121,11 @@ while read -r dir; do
exit 1
fi
- dest=$(printf '%s/patches/%02d-%s' "${staging}" "${index}" "${dir}")
+ dest=$(printf '%s/patches/%02d-%s' "${staging}" "${index}" "${label}")
mkdir -p "${dest}"
cp "${src}"/*.patch "${dest}/"
- printf ' %02d %-12s %2d patches\n' "${index}" "${dir}" "${count}"
+ printf ' %02d %-18s %2d patches\n' "${index}" "${label}" "${count}"
index=$((index + 1))
total=$((total + count))
done < "${order_file}"
@@ -125,10 +139,10 @@ echo "${tarball} (${index} directories, ${total} patches)"
#--------------------------------------
# Base config and fragments
#--------------------------------------
-for cfg in base-aarch64 surface live-image no-debug-info; do
+for cfg in base-aarch64 surface live-image no-debug-info foreign-socs; do
cp "${script_dir}/config/${cfg}.config" "${output_dir}/${cfg}.config"
done
-echo "${output_dir}/{base-aarch64,surface,live-image,no-debug-info}.config"
+echo "${output_dir}/{base-aarch64,surface,live-image,no-debug-info,foreign-socs}.config"
if [[ ${skip_download} == true ]]; then
exit 0