Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 1474007 Details for
Bug 1613065
Dynamic update kernel-headers-checksum as Provides: for kernel-headers RPM subpackage
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Proposed changeset to be included downstream (RHEL) v3
0001-kernel-headers-checksum-first-commit.patch (text/plain), 2.40 KB, created by
Rafael Aquini
on 2018-08-07 14:15:10 UTC
(
hide
)
Description:
Proposed changeset to be included downstream (RHEL) v3
Filename:
MIME Type:
Creator:
Rafael Aquini
Created:
2018-08-07 14:15:10 UTC
Size:
2.40 KB
patch
obsolete
>From e5ce2fc4f1736bef97d76544e32d116993a2bc10 Mon Sep 17 00:00:00 2001 >From: Aristeu Rozanski <arozansk@redhat.com> >Date: Fri, 3 Aug 2018 09:43:40 -0400 >Subject: [PATCH v3] kernel-headers checksum: first commit > >These files on redhat-rpm-config will add > Provides: kernel-headers-checksum = <sha> >which is a checksum of all kernel-headers contents except for >/usr/include/linux/version.h which changes each release. > >The idea is to avoid container image builders to rebuild the entire >image because kernel-headers changed version. Because kernel-headers is >a subpackage of the kernel package and its contents come from the kernel >source tree, every new kernel built will also include a new >kernel-headers package while hardly any of kernel-headers content will >change. These files allow to scripts to quickly determine if there're >content changes between two RPMs excluding version.h which does get >updated for every release. > >Signed-off-by: Aristeu Rozanski <arozansk@redhat.com> >--- > fileattrs/kheaders.attr | 2 ++ > kernel-headers-checksum.sh | 20 ++++++++++++++++++++ > 2 files changed, 22 insertions(+) > create mode 100644 fileattrs/kheaders.attr > create mode 100755 kernel-headers-checksum.sh > >diff --git a/fileattrs/kheaders.attr b/fileattrs/kheaders.attr >new file mode 100644 >index 0000000..a85ae8e >--- /dev/null >+++ b/fileattrs/kheaders.attr >@@ -0,0 +1,2 @@ >+%__kheaders_provides %{_rpmconfigdir}/kernel-headers-checksum.sh %{buildroot} >+%__kheaders_path ^/usr/include/linux/version.h$ >diff --git a/kernel-headers-checksum.sh b/kernel-headers-checksum.sh >new file mode 100755 >index 0000000..fa9e7c9 >--- /dev/null >+++ b/kernel-headers-checksum.sh >@@ -0,0 +1,20 @@ >+#!/bin/sh +x >+# >+# kernel-headers-checksum.sh - Generate a checksum of the important kernel-headers files >+# to help container scripts to determine when an image needs >+# to be rebuilt due kernel-headers release change. >+# >+# $1: buildroot >+ >+checksum=$(awk '/KERNEL_HEADERS_CHECKSUM/ {print $3}' \ >+ $1/usr/include/linux/version.h | sed -s 's|\"||g'); >+ >+# if version.h doesn't export a precalculated checksum, we calculate it here >+# we don't care about version.h, so exclude it from the checksum >+if [ -z "$checksum" ]; then >+ checksum=$(export LC_ALL=C; find $1/usr/include -type f -name "*.h" \ >+ ! -path $1/usr/include/linux/version.h | \ >+ sort | xargs cat | sha1sum - | cut -f 1 -d ' '); >+fi >+ >+echo "kernel-headers-checksum = $checksum"; >-- >2.17.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1613065
:
1473980
| 1474007