Home Home > GIT Browse > packaging
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Wilck <mwilck@suse.com>2019-01-30 15:45:40 +0100
committerMartin Wilck <mwilck@suse.com>2019-01-30 16:01:53 +0100
commit9e5e2a55a4e654c32543525f16e3016100c4e32e (patch)
tree03a7e7369a767e1399698251e6fbcbc112c283bc
parent17a2073838c7bb31db8c97ed0203357429afaaec (diff)
rpm/kernel-binary.spec.in: fix initrd permissions (bsc#1123697)
dracut has been using permissions 0600 for the initrd for a long time. On SLE15 or higher, that leads to a permission mismatch reported by "rpm -V". Set the permissions correctly for our ghost file.
-rw-r--r--rpm/kernel-binary.spec.in4
1 files changed, 4 insertions, 0 deletions
diff --git a/rpm/kernel-binary.spec.in b/rpm/kernel-binary.spec.in
index f4a2d0b312..a9b39f91f2 100644
--- a/rpm/kernel-binary.spec.in
+++ b/rpm/kernel-binary.spec.in
@@ -657,6 +657,10 @@ dd if=/dev/zero of=%buildroot/boot/initrd-%kernelrelease-%build_flavor \
bs=1024 seek=2047 count=1
# Also reserve some space for the kdump initrd
cp %buildroot/boot/initrd-%kernelrelease-%build_flavor{,-kdump}
+%if 0%{?suse_version} >= 1500
+# Use same permissions as dracut
+chmod 0600 %buildroot/boot/initrd-%kernelrelease-%build_flavor{,-kdump}
+%endif
if [ %CONFIG_MODULES = y ]; then
mkdir -p %rpm_install_dir/%cpu_arch_flavor