| -rw-r--r-- | Jenkinsfile | 52 | ||||
| -rw-r--r-- | kernel-surface.spec | 17 |
2 files changed, 24 insertions, 45 deletions
diff --git a/Jenkinsfile b/Jenkinsfile index 1ab3e47..63e7c34 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -118,31 +118,22 @@ spec: rpmdev-setuptree - # The published file names are whatever the spec + # The published file name is whatever the spec # resolves to under the tag's versions, so the two - # 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 \\ + # 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 \\ --define "upstream_ver ${UPSTREAM_VER}" \\ --define "patchset_ver ${PATCHSET_VER}" \\ --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}.rpm\\n' \\ - kernel-surface.spec) + kernel-surface.spec | head -n1) + dest="s3://${RPM_BUCKET}/fedora/${fedora_version}/aarch64/${rpm_file}" - # 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" + skip_build=false + if aws s3 ls --endpoint-url "${B2_ENDPOINT}" "${dest}"; then + echo "${rpm_file} already published, skipping build" + skip_build=true fi if [ "${skip_build}" = false ]; then @@ -155,34 +146,29 @@ spec: --define '_smp_mflags -j4' \\ kernel-surface.spec - # 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}" + built="${HOME}/rpmbuild/RPMS/aarch64/${rpm_file}" + test -f "${built}" - aws s3 cp --endpoint-url "${B2_ENDPOINT}" \\ - "${built}" "${prefix}/${rpm_name}" - done + aws s3 cp --endpoint-url "${B2_ENDPOINT}" \\ + "${built}" "${dest}" 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' \\ - "${prefix}/" "${repo}/" + "${repo_url}/" "${repo}/" createrepo_c --update "${repo}" aws s3 sync --endpoint-url "${B2_ENDPOINT}" \\ --exclude 'repomd.xml*' \\ - "${repo}/repodata/" "${prefix}/repodata/" + "${repo}/repodata/" "${repo_url}/repodata/" aws s3 cp --endpoint-url "${B2_ENDPOINT}" \\ "${repo}/repodata/repomd.xml" \\ - "${prefix}/repodata/repomd.xml" + "${repo_url}/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 7c4fab2..e238be7 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 3 +%global patchset_ver 2 %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/%{kverrel}/x1p42100-microsoft-sp12in.dtb + %{buildroot}/usr/lib/surface-dtb/x1p42100-microsoft-sp12in.dtb %post /usr/sbin/depmod -a %{kverrel} || : @@ -239,23 +239,16 @@ fi %files %license COPYING /usr/lib/modules/%{kverrel}/ -/usr/lib/surface-dtb/%{kverrel}/ +/usr/lib/surface-dtb/x1p42100-microsoft-sp12in.dtb %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 |