aboutsummaryrefslogtreecommitdiffci
diff refs
from: back
to: back
| flip
diff options
context:
space:
mode:
authorGravatar Saya Andy <saya.andy@posteo.com> 2026-09-07 12:27:29 +0700
committerGravatar Saya Andy <saya.andy@posteo.com> 2026-09-07 12:27:29 +0700
commit9e3536989a362eb8b8b3a5834f97c1956d900caf (patch)
treecf66a6811c064d800d2efa1bdfa29fdf3dd8366e
parent1ad1190123a845762cb5142fae80efa76b6f8783 (diff)
downloadkernel-surface-9e3536989a362eb8b8b3a5834f97c1956d900caf.tar.gz
kernel-surface-9e3536989a362eb8b8b3a5834f97c1956d900caf.zip
fix: key surface-dtb copy of the device tree by kernel versionfedora-45-kernel-7.2.3-patchset-3
-rw-r--r--Jenkinsfile52
-rw-r--r--kernel-surface.spec17
2 files changed, 45 insertions, 24 deletions
diff --git a/Jenkinsfile b/Jenkinsfile
index 63e7c34..1ab3e47 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -118,22 +118,31 @@ spec:
rpmdev-setuptree
- # The published file name is whatever the spec
+ # The published file names are whatever the spec
# resolves to under the tag's versions, so the two
- # cannot drift. A kernel build is expensive; if this
- # exact NEVRA is already in the bucket, skip
- # straight to the metadata.
- rpm_file=$(rpmspec -q \\
+ # cannot drift. Note the plural: kernel-surface-dtb
+ # is a separate package because the main one is
+ # installonly and cannot own a path that carries no
+ # kernel version. Publishing only the first would
+ # leave the kernel unresolvable.
+ prefix="s3://${RPM_BUCKET}/fedora/${fedora_version}/aarch64"
+ rpm_files=$(rpmspec -q \\
--define "upstream_ver ${UPSTREAM_VER}" \\
--define "patchset_ver ${PATCHSET_VER}" \\
--queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}.rpm\\n' \\
- kernel-surface.spec | head -n1)
- dest="s3://${RPM_BUCKET}/fedora/${fedora_version}/aarch64/${rpm_file}"
+ kernel-surface.spec)
- skip_build=false
- if aws s3 ls --endpoint-url "${B2_ENDPOINT}" "${dest}"; then
- echo "${rpm_file} already published, skipping build"
- skip_build=true
+ # A kernel build is expensive; skip it only when
+ # every one of those is already in the bucket.
+ skip_build=true
+ for rpm_name in ${rpm_files}; do
+ if ! aws s3 ls --endpoint-url "${B2_ENDPOINT}" \\
+ "${prefix}/${rpm_name}"; then
+ skip_build=false
+ fi
+ done
+ if [ "${skip_build}" = true ]; then
+ echo "${TAG_NAME} is already published in full, skipping build"
fi
if [ "${skip_build}" = false ]; then
@@ -146,29 +155,34 @@ spec:
--define '_smp_mflags -j4' \\
kernel-surface.spec
- built="${HOME}/rpmbuild/RPMS/aarch64/${rpm_file}"
- test -f "${built}"
+ # kernel-surface-dtb is noarch, so it lands
+ # in RPMS/noarch rather than RPMS/aarch64; ask
+ # where each one actually is.
+ for rpm_name in ${rpm_files}; do
+ built=$(find "${HOME}/rpmbuild/RPMS" -type f \\
+ -name "${rpm_name}" -print -quit)
+ test -n "${built}"
- aws s3 cp --endpoint-url "${B2_ENDPOINT}" \\
- "${built}" "${dest}"
+ aws s3 cp --endpoint-url "${B2_ENDPOINT}" \\
+ "${built}" "${prefix}/${rpm_name}"
+ done
fi
- repo_url="s3://${RPM_BUCKET}/fedora/${fedora_version}/aarch64"
repo="${WORKSPACE}/repo"
mkdir -p "${repo}"
aws s3 sync --endpoint-url "${B2_ENDPOINT}" \\
--exclude '*' --include '*.rpm' \\
- "${repo_url}/" "${repo}/"
+ "${prefix}/" "${repo}/"
createrepo_c --update "${repo}"
aws s3 sync --endpoint-url "${B2_ENDPOINT}" \\
--exclude 'repomd.xml*' \\
- "${repo}/repodata/" "${repo_url}/repodata/"
+ "${repo}/repodata/" "${prefix}/repodata/"
aws s3 cp --endpoint-url "${B2_ENDPOINT}" \\
"${repo}/repodata/repomd.xml" \\
- "${repo_url}/repodata/repomd.xml"
+ "${prefix}/repodata/repomd.xml"
# Served next to the repository so that consumers
# can `dnf config-manager --add-repo` the URL.
diff --git a/kernel-surface.spec b/kernel-surface.spec
index e238be7..7c4fab2 100644
--- a/kernel-surface.spec
+++ b/kernel-surface.spec
@@ -17,7 +17,7 @@
# Bumped whenever the patch tarball changes without the upstream version moving.
%if %{undefined patchset_ver}
-%global patchset_ver 2
+%global patchset_ver 3
%endif
# rpm gives - to the version-release separator, so it cannot appear in Version
@@ -217,7 +217,7 @@ install -Dm644 System.map \
install -Dm644 .config \
%{buildroot}/usr/lib/modules/%{kverrel}/config
install -Dm644 arch/arm64/boot/dts/qcom/x1p42100-microsoft-sp12in.dtb \
- %{buildroot}/usr/lib/surface-dtb/x1p42100-microsoft-sp12in.dtb
+ %{buildroot}/usr/lib/surface-dtb/%{kverrel}/x1p42100-microsoft-sp12in.dtb
%post
/usr/sbin/depmod -a %{kverrel} || :
@@ -239,16 +239,23 @@ fi
%files
%license COPYING
/usr/lib/modules/%{kverrel}/
-/usr/lib/surface-dtb/x1p42100-microsoft-sp12in.dtb
+/usr/lib/surface-dtb/%{kverrel}/
%ghost %attr(0644,root,root) /boot/config-%{kverrel}
%ghost %attr(0644,root,root) /boot/initramfs-%{kverrel}.img
%ghost %attr(0600,root,root) /boot/System.map-%{kverrel}
%ghost %attr(0644,root,root) /boot/vmlinuz-%{kverrel}
%changelog
+* Mon Sep 07 2026 Saya Andy 7.2.3-3
+- Key the /usr/lib/surface-dtb copy of the device tree by kernel version. This
+ package is installonly, so an unqualified path there conflicts between two
+ installed releases as soon as the device tree they build differs.
+
* Sun Sep 06 2026 Saya Andy 7.2.3-2
-- Local camera patch: report the right bayer order when mirrored (fixes the black-green monochrome output issue)
-- Local surface patch: point iris at the OEM video firmware (fixes error -22 for video encoding/decoding)
+- Local camera patch: report the right bayer order when mirrored (fixes the
+ black-green monochrome output issue)
+- Local surface patch: point iris at the OEM video firmware (fixes error -22
+ for video encoding/decoding)
* Sun Sep 06 2026 Saya Andy 7.2.3-1
- Initial package: vanilla 7.2.3 with the overlay's Surface Pro 12" patch set