Skip to content

Commit 3c01c0a

Browse files
dracut: Drop disable-xattr dracut patch, introduce config to optionally enable it (#10070)
Signed-off-by: Chris Co <chrco@microsoft.com> Co-authored-by: Chris Co <chrco@microsoft.com>
1 parent db9a27c commit 3c01c0a

4 files changed

Lines changed: 21 additions & 33 deletions

File tree

SPECS/dracut/0002-disable-xattr.patch

Lines changed: 0 additions & 31 deletions
This file was deleted.

SPECS/dracut/50-noxattr.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# disable xattr
2+
DRACUT_NO_XATTR=1

SPECS/dracut/dracut.signatures.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"00-virtio.conf": "173e93feea30f328d4cda7d07f756446fe45830ad9a5ee99b007bed0579b9a64",
66
"00-vrf.conf": "e2885a4b090d8ca3771e60ce6dcd8b849e28ce5002a5c7b71ff796a92deb2810",
77
"00-xen.conf": "8b7a89b7716cb40a9c0d681caed6994d81ff4dfad4fe50cea15cd47b885dc5a6",
8+
"50-noxattr.conf": "61d95f05890ac6ee3355d0a386dd5645d82b7a4202d90305d997fd18c6d139dd",
89
"dracut-102.tar.gz": "601b175cbf4d2ee902bb7bda3af8826ae2ca060c1af880f6da5a833413f4ec70",
910
"lgpl-2.1.txt": "dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551",
1011
"megaraid.conf": "914824cdbe0c525b71efa05a75e453335b0068beb8bc28bef2a5866d74bf7dd4",

SPECS/dracut/dracut.spec

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Summary: dracut to create initramfs
55
Name: dracut
66
Version: 102
7-
Release: 3%{?dist}
7+
Release: 4%{?dist}
88
# The entire source code is GPLv2+
99
# except install/* which is LGPLv2+
1010
License: GPLv2+ AND LGPLv2+
@@ -23,13 +23,13 @@ Source7: 00-hyperv.conf
2323
Source8: 00-virtio.conf
2424
Source9: 00-vrf.conf
2525
Source10: 00-xen.conf
26+
Source11: 50-noxattr.conf
2627

2728
# allow-liveos-overlay-no-user-confirmation-prompt.patch has been introduced by
2829
# the Mariner team to allow skipping the user confirmation prompt during boot
2930
# when the overlay of the liveos is backed by ram. This allows the machine to
3031
# boot without being blocked on user input in such a scenario.
3132
Patch: allow-liveos-overlay-no-user-confirmation-prompt.patch
32-
Patch: 0002-disable-xattr.patch
3333
Patch: 0006-dracut.sh-validate-instmods-calls.patch
3434
Patch: 0011-Remove-reference-to-kernel-module-zlib-in-fips-module.patch
3535
Patch: 0012-fix-dracut-functions-avoid-awk-in-get_maj_min.patch
@@ -96,6 +96,13 @@ Requires: %{name} = %{version}-%{release}
9696
%description megaraid
9797
This package contains dracut configuration needed to build an initramfs with MegaRAID driver support.
9898

99+
%package noxattr
100+
Summary: dracut configuration needed to disable preserving of xattr file metadata
101+
Requires: %{name} = %{version}-%{release}
102+
103+
%description noxattr
104+
This package contains dracut configuration needed to disable preserving of xattr file metadata.
105+
99106
%package tools
100107
Summary: dracut tools to build the local initramfs
101108
Requires: %{name} = %{version}-%{release}
@@ -174,6 +181,7 @@ install -m 0644 %{SOURCE7} %{buildroot}%{_sysconfdir}/dracut.conf.d/00-hyperv.co
174181
install -m 0644 %{SOURCE8} %{buildroot}%{_sysconfdir}/dracut.conf.d/00-virtio.conf
175182
install -m 0644 %{SOURCE9} %{buildroot}%{_sysconfdir}/dracut.conf.d/00-vrf.conf
176183
install -m 0644 %{SOURCE10} %{buildroot}%{_sysconfdir}/dracut.conf.d/00-xen.conf
184+
install -m 0644 %{SOURCE11} %{buildroot}%{_sysconfdir}/dracut.conf.d/50-noxattr.conf
177185

178186
mkdir -p %{buildroot}%{dracutlibdir}/modules.d/20overlayfs/
179187
install -p -m 0755 %{SOURCE4} %{buildroot}%{dracutlibdir}/modules.d/20overlayfs/
@@ -251,6 +259,10 @@ ln -srv %{buildroot}%{_bindir}/%{name} %{buildroot}%{_sbindir}/%{name}
251259
%defattr(-,root,root,0755)
252260
%{_sysconfdir}/dracut.conf.d/50-megaraid.conf
253261

262+
%files noxattr
263+
%defattr(-,root,root,0755)
264+
%{_sysconfdir}/dracut.conf.d/50-noxattr.conf
265+
254266
%files tools
255267
%defattr(-,root,root,0755)
256268

@@ -276,6 +288,10 @@ ln -srv %{buildroot}%{_bindir}/%{name} %{buildroot}%{_sbindir}/%{name}
276288
%dir %{_sharedstatedir}/%{name}/overlay
277289

278290
%changelog
291+
* Mon Aug 19 2024 Cameron Baird <cameronbaird@microsoft.com> - 102-4
292+
- Drop 0002-disable-xattr.patch
293+
- Introduce dracut-noxattr subpackage to expose this behavior as an option
294+
279295
* Thu Aug 08 2024 Cameron Baird <cameronbaird@microsoft.com> - 102-3
280296
- Drop 0007-feat-dracut.sh-support-multiple-config-dirs.patch
281297

0 commit comments

Comments
 (0)