]> git.ipfire.org Git - thirdparty/dracut.git/blobdiff - dracut.spec
dracut: Implement ACPI table overriding
[thirdparty/dracut.git] / dracut.spec
index 922474a09da2b56eecb563ae09e7160a5fb2f5d4..b1cf9fef1c9c21a0e84763e0337e216bf2e5fc4a 100644 (file)
@@ -21,8 +21,8 @@ Group: System/Base
 %endif
 
 # The entire source code is GPLv2+
-# except install/* which is LGPLv2.1+
-License: GPLv2+ and LGPLv2.1+
+# except install/* which is LGPLv2+
+License: GPLv2+ and LGPLv2+
 
 URL: https://dracut.wiki.kernel.org/
 
@@ -76,6 +76,10 @@ Provides: mkinitrd = 2.6.1
 Obsoletes: dracut-kernel < 005
 Provides:  dracut-kernel = %{version}-%{release}
 
+Obsoletes: dracut <= 029
+Obsoletes: dracut-norescue
+Provides:  dracut-norescue
+
 Requires: bash >= 4
 Requires: coreutils
 Requires: cpio
@@ -91,6 +95,7 @@ Requires: kpartx
 %if 0%{?fedora} || 0%{?rhel} > 6
 Requires: util-linux >= 2.21
 Requires: systemd >= 199
+Requires: procps-ng
 Conflicts: grubby < 8.23
 %else
 Requires: udev > 166
@@ -116,6 +121,7 @@ Summary: dracut modules to build a dracut initramfs with network support
 Requires: %{name} = %{version}-%{release}
 Requires: iputils
 Requires: iproute
+Requires: dhclient
 Obsoletes: dracut-generic < 008
 Provides:  dracut-generic = %{version}-%{release}
 
@@ -158,20 +164,23 @@ Requires: libcap
 This package requires everything which is needed to build an
 initramfs with dracut, which drops capabilities.
 
-%package nohostonly
+%package config-generic
 Summary: dracut configuration to turn off hostonly image generation
 Requires: %{name} = %{version}-%{release}
+Obsoletes: dracut-nohostonly
+Provides:  dracut-nohostonly
 
-%description nohostonly
+%description config-generic
 This package provides the configuration to turn off the host specific initramfs
-generation with dracut.
+generation with dracut and generates a generic image by default.
 
-%package norescue
-Summary: dracut configuration to turn off rescue image generation
+%package config-rescue
+Summary: dracut configuration to turn on rescue image generation
 Requires: %{name} = %{version}-%{release}
+Obsoletes: dracut <= 029
 
-%description norescue
-This package provides the configuration to turn off the rescue initramfs
+%description config-rescue
+This package provides the configuration to turn on the rescue initramfs
 generation with dracut.
 
 %package tools
@@ -202,7 +211,7 @@ make %{?_smp_mflags}
 
 %install
 %if 0%{?fedora} || 0%{?rhel}
-rm -rf $RPM_BUILD_ROOT
+rm -rf -- $RPM_BUILD_ROOT
 %endif
 make %{?_smp_mflags} install \
      DESTDIR=$RPM_BUILD_ROOT \
@@ -211,26 +220,26 @@ make %{?_smp_mflags} install \
 echo "DRACUT_VERSION=%{version}-%{release}" > $RPM_BUILD_ROOT/%{dracutlibdir}/dracut-version.sh
 
 %if 0%{?fedora} == 0 && 0%{?rhel} == 0 && 0%{?suse_version} == 0
-rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/01fips
-rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/02fips-aesni
+rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/01fips
+rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/02fips-aesni
 %endif
 
 %if %{defined _unitdir}
 # for systemd, better use systemd-bootchart
-rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/00bootchart
+rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/00bootchart
 %endif
 
 # we do not support dash in the initramfs
-rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/00dash
+rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/00dash
 
 # remove gentoo specific modules
-rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/50gensplash
+rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/50gensplash
 
 %if %{defined _unitdir}
 # with systemd IMA and selinux modules do not make sense
-rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/96securityfs
-rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/97masterkey
-rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/98integrity
+rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/96securityfs
+rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/97masterkey
+rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/98integrity
 %endif
 
 mkdir -p $RPM_BUILD_ROOT/boot/dracut
@@ -249,8 +258,8 @@ install -m 0644 dracut.conf.d/suse.conf.example   $RPM_BUILD_ROOT%{dracutlibdir}
 %endif
 
 %if 0%{?fedora} <= 12 && 0%{?rhel} < 6 && 0%{?suse_version} <= 9999
-rm $RPM_BUILD_ROOT%{_bindir}/mkinitrd
-rm $RPM_BUILD_ROOT%{_bindir}/lsinitrd
+rm -f -- $RPM_BUILD_ROOT%{_bindir}/mkinitrd
+rm -f -- $RPM_BUILD_ROOT%{_bindir}/lsinitrd
 %endif
 
 %if 0%{?fedora} || 0%{?rhel} > 6
@@ -258,19 +267,20 @@ rm $RPM_BUILD_ROOT%{_bindir}/lsinitrd
 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/kernel/postinst.d
 install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kernel/postinst.d/51-dracut-rescue-postinst.sh
 
-echo 'hostonly="no"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/02-nohostonly.conf
-echo 'dracut_rescue_image="no"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/02-norescue.conf
+echo 'hostonly="no"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/02-generic-image.conf
+echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/02-rescue.conf
 %endif
 
-mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
-install -m 0644 dracut.logrotate $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/dracut_log
+%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version}
+> $RPM_BUILD_ROOT/etc/system-fips
+%endif
 
 # create compat symlink
 mkdir -p $RPM_BUILD_ROOT/sbin
 ln -s /usr/bin/dracut $RPM_BUILD_ROOT/sbin/dracut
 
 %clean
-rm -rf $RPM_BUILD_ROOT
+rm -rf -- $RPM_BUILD_ROOT
 
 %files
 %defattr(-,root,root,0755)
@@ -313,6 +323,8 @@ rm -rf $RPM_BUILD_ROOT
 %else
 %{dracutlibdir}/modules.d/00bootchart
 %endif
+%{dracutlibdir}/modules.d/00bash
+%{dracutlibdir}/modules.d/03modsign
 %{dracutlibdir}/modules.d/03rescue
 %{dracutlibdir}/modules.d/04watchdog
 %{dracutlibdir}/modules.d/05busybox
@@ -322,6 +334,7 @@ rm -rf $RPM_BUILD_ROOT
 %{dracutlibdir}/modules.d/50drm
 %{dracutlibdir}/modules.d/50plymouth
 %{dracutlibdir}/modules.d/80cms
+%{dracutlibdir}/modules.d/90bcache
 %{dracutlibdir}/modules.d/90btrfs
 %{dracutlibdir}/modules.d/90crypt
 %{dracutlibdir}/modules.d/90dm
@@ -360,7 +373,6 @@ rm -rf $RPM_BUILD_ROOT
 %{dracutlibdir}/modules.d/99fs-lib
 %{dracutlibdir}/modules.d/99img-lib
 %{dracutlibdir}/modules.d/99shutdown
-%config(noreplace) %{_sysconfdir}/logrotate.d/dracut_log
 %attr(0644,root,root) %ghost %config(missingok,noreplace) %{_localstatedir}/log/dracut.log
 %dir %{_sharedstatedir}/initramfs
 %if %{defined _unitdir}
@@ -384,8 +396,6 @@ rm -rf $RPM_BUILD_ROOT
 %endif
 %if 0%{?fedora} || 0%{?rhel} > 6
 %{_prefix}/lib/kernel/install.d/50-dracut.install
-%{_prefix}/lib/kernel/install.d/51-dracut-rescue.install
-%{_sysconfdir}/kernel/postinst.d/51-dracut-rescue-postinst.sh
 %endif
 
 %files network
@@ -407,6 +417,7 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(-,root,root,0755)
 %{dracutlibdir}/modules.d/01fips
 %{dracutlibdir}/dracut.conf.d/40-fips.conf
+%config(missingok) /etc/system-fips
 %endif
 
 %files fips-aesni
@@ -426,12 +437,16 @@ rm -rf $RPM_BUILD_ROOT
 %dir /var/lib/dracut
 %dir /var/lib/dracut/overlay
 
-%files nohostonly
+%files config-generic
 %defattr(-,root,root,0755)
-%{dracutlibdir}/dracut.conf.d/02-nohostonly.conf
+%{dracutlibdir}/dracut.conf.d/02-generic-image.conf
 
-%files norescue
+%files config-rescue
 %defattr(-,root,root,0755)
-%{dracutlibdir}/dracut.conf.d/02-norescue.conf
+%{dracutlibdir}/dracut.conf.d/02-rescue.conf
+%if 0%{?fedora} || 0%{?rhel} > 6
+%{_prefix}/lib/kernel/install.d/51-dracut-rescue.install
+%{_sysconfdir}/kernel/postinst.d/51-dracut-rescue-postinst.sh
+%endif
 
 %changelog