dracut/dracut.spec
Thomas Renninger 28c70844a2 Accepting request 236026 from home:msmeissn:branches:Base:System
- dracut-fips-module-loading-fixes.patch: bnc#875855
  - adjust FIPS module list
  - on architecture specific modules, failing loading is not
    critical
- ship 98selinux, for people that want to use SELinux.

OBS-URL: https://build.opensuse.org/request/show/236026
OBS-URL: https://build.opensuse.org/package/show/Base:System/dracut?expand=0&rev=153
2014-06-02 11:47:31 +00:00

388 lines
14 KiB
RPMSpec

#
# spec file for package dracut
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define dracutlibdir %{_libexecdir}/dracut
Name: dracut
Version: 037
Release: 0
Summary: Initramfs generator using udev
License: GPL-2.0+ and LGPL-2.1+
Group: System/Base
Url: https://dracut.wiki.kernel.org/
Source0: http://www.kernel.org/pub/linux/utils/boot/dracut/dracut-%{version}.tar.xz
# openSUSE / SLE module to convert initrd command line parameters to dracut one
# (not to be upstreamed)
Source1: module-setup-initrd.sh
Source2: parse-suse-initrd.sh
Source3: mkinitrd_setup_dummy
Source4: purge-kernels
Source5: purge-kernels.service
Source6: dracut-installkernel
Source7: write-ifcfg-suse.sh
Patch1: dracut_v37_to_HEAD.patch
Patch11: 0013-Correct-paths-for-openSUSE.patch
Patch12: 0014-Check-for-plymouth-lib-directories.patch
Patch13: dracut_do_not_update_booloader_if_no_kernel_is_found.patch
Patch14: suse_grub_manpage.patch
Patch15: replace_dhclient_with_wickedd_dhcp_supplicants.patch
Patch18: 0015-add-new-s390x-specific-rule-files.patch
Patch19: change_write_ifcfg_to_suse.patch
Patch20: dracut-fix-whitespace-add-drivers_call.patch
Patch21: wait_for_network_race_condition_fix.patch
Patch22: dracut-warpclock_module.patch
Patch23: s390-dcssblk.patch
Patch24: dracut-install-persistent-rule.patch
Patch25: dracut-really-always-add-autofs4.patch
Patch26: mdraid-setup.patch
Patch27: 0015-95udev-rules-Add-59-scsi-sg_utils.rules.patch
Patch28: 0016-90multipath-add-67-kpartx-compat.rules.patch
Patch29: 0017-90multipath-install-dracut-specific-service-file.patch
Patch32: 0020-95udev-rules-Include-correct-sg3_utils-rules.patch
Patch33: 0021-90multipath-install-correct-multipath-rules.patch
Patch34: add_dracuts_network_params_for_iscsi.patch
Patch35: 0022-90multipath-Fixup-service-file-for-booting.patch
Patch36: 0023-mkinitrd-suse.sh-Use-hostonly-and-hostonly-cmdline-c.patch
Patch37: 0024-95iscsi-Set-correct-iscsi_started-value-for-iSCSI-fi.patch
Patch38: 0025-dracut_continue_adding_modules_also_on_error.patch
Patch39: 0026-force_to_add_and_load_kernel_modules_other_than_via_boot_param.patch
Patch40: 0027-95fcoe-Store-current-configuration-in-dracut-cmdline.patch
Patch41: 0028-95fcoe-update-fcoe-interface-check.patch
Patch42: 0029-95fcoe-start-lldpad-separately.patch
Patch43: 0030-dracut-mkinitd_cleanup_force_host_only_var.patch
Patch44: 0031-95fcoe-skip-VLAN-devices-in-fcoe-up.patch
Patch46: 0033-dracut_hostonly_hostonly_cmdline_default.patch
Patch47: 0034-suse.conf.example_extend.patch
Patch48: 0035-always_add_network.patch
Patch49: 0036-add_extra_debug_binaries.patch
Patch50: 0037-fix_s390_network_modules_install.patch
Patch51: 0038-remove_waiting_for_swap_dev.patch
Patch52: 0039-s390_no_resume_module.patch
Patch54: 0041-only_enable_network_if_explicitly_requested.patch
Patch55: 0042-ibft_autoconfig_param.patch
Patch56: 0043-fcoe_strip_quotes.patch
Patch57: 0044-Add_update_bootloader_msg.patch
Patch58: 0045-add-chown_binary.patch
Patch59: dracut-fips-module-loading-fixes.patch
BuildRequires: asciidoc
BuildRequires: bash
BuildRequires: docbook-xsl-stylesheets
BuildRequires: libxslt
BuildRequires: pkgconfig(systemd) >= 199
Requires: bash
Requires: coreutils
Requires: cpio
Requires: file
Requires: filesystem
Requires: findutils
Requires: grep
Requires: hardlink
Requires: modutils
Requires: pigz
Requires: sed
Requires: systemd >= 200
# systemd-sysvinit provides: poweroff, reboot, halt
Requires: pixz
Requires: systemd-sysvinit
Requires: udev > 166
Requires: util-linux >= 2.21
Recommends: binutils
Recommends: logrotate
Obsoletes: mkinitrd < 2.8.2
Provides: mkinitrd = 2.8.2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{?systemd_requires}
%description
Dracut contains tools to create a bootable initramfs for 2.6 Linux kernels.
Unlike existing implementations, dracut does hard-code as little as possible
into the initramfs. Dracut contains various modules which are driven by the
event-based udev. Having root on MD, DM, LVM2, LUKS is supported as well as
NFS, iSCSI, NBD, FCoE with the dracut-network package.
%package fips
Summary: Dracut modules to build a dracut initramfs with an integrity check
Group: System/Base
Requires: %{name} = %{version}-%{release}
Requires: hmaccalc
%description fips
This package requires everything which is needed to build an
initramfs with dracut, which does an integrity check of the kernel
and its cryptography during startup.
%prep
%setup -q
%patch1 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch18 -p1
%patch19 -p1
%patch20 -p1
%patch21 -p1
%patch22 -p1
%patch23 -p1
%patch24 -p1
%patch25 -p1
%patch26 -p1
%patch27 -p1
%patch28 -p1
%patch29 -p1
%patch32 -p1
%patch33 -p1
%patch34 -p1
%patch35 -p1
%patch36 -p1
%patch37 -p1
%patch38 -p1
%patch39 -p1
%patch40 -p1
%patch41 -p1
%patch42 -p1
%patch43 -p1
%patch44 -p1
%patch46 -p1
%patch47 -p1
%patch48 -p1
%patch49 -p1
%patch50 -p1
%patch51 -p1
%patch52 -p1
%patch54 -p1
%patch55 -p1
%patch56 -p1
%patch57 -p1
%patch58 -p1
%patch59 -p1
%build
%configure\
--systemdsystemunitdir=%{_unitdir}\
--bashcompletiondir=%{_sysconfdir}/bash_completion.d\
--libdir=%{_prefix}/lib
make all -e CFLAGS="%{optflags}" %{?_smp_mflags}
%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
echo -e "#!/bin/bash\nDRACUT_VERSION=%{version}-%{release}" > %{buildroot}/%{dracutlibdir}/dracut-version.sh
# we do not support dash in the initramfs
rm -fr %{buildroot}/%{dracutlibdir}/modules.d/00dash
rm -fr %{buildroot}/%{dracutlibdir}/modules.d/05busybox
rm -fr %{buildroot}/%{dracutlibdir}/modules.d/00bootchart
# add suse cmline conversion
mkdir -p %{buildroot}%{dracutlibdir}/modules.d/99suse
install -m 0755 %{SOURCE1} %{buildroot}%{dracutlibdir}/modules.d/99suse/module-setup.sh
install -m 0755 %{SOURCE2} %{buildroot}%{dracutlibdir}/modules.d/99suse/parse-suse-initrd.sh
# remove gentoo specific modules
rm -fr %{buildroot}%{dracutlibdir}/modules.d/50gensplash
# IMA modules are not supported currently.
rm -fr %{buildroot}/%{dracutlibdir}/modules.d/96securityfs
rm -fr %{buildroot}/%{dracutlibdir}/modules.d/97masterkey
rm -fr %{buildroot}/%{dracutlibdir}/modules.d/98integrity
mkdir -p %{buildroot}/boot/dracut
mkdir -p %{buildroot}%{_localstatedir}/lib/dracut/overlay
mkdir -p %{buildroot}%{_localstatedir}/log
touch %{buildroot}%{_localstatedir}/log/dracut.log
install -m 0644 dracut.conf.d/suse.conf.example %{buildroot}%{_sysconfdir}/dracut.conf.d/01-dist.conf
install -m 0644 dracut.conf.d/fips.conf.example %{buildroot}%{_sysconfdir}/dracut.conf.d/40-fips.conf
%ifarch %ix86 x86_64
echo 'early_microcode="yes"' > %{buildroot}%{_sysconfdir}/dracut.conf.d/02-early-microcode.conf
%endif
rm %{buildroot}%{_bindir}/mkinitrd
# moved to /sbin
mkdir -p %{buildroot}/sbin
install -m 0755 mkinitrd-suse.sh %{buildroot}/sbin/mkinitrd
mv %{buildroot}%{_mandir}/man8/mkinitrd-suse.8 %{buildroot}%{_mandir}/man8/mkinitrd.8
install -m 0755 %{SOURCE3} %{buildroot}/sbin/mkinitrd_setup
mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d
install -m 0644 dracut.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/dracut
install -D -m 0755 %{SOURCE4} %{buildroot}/sbin/purge-kernels
install -m 644 %{SOURCE5} %{buildroot}/%{_unitdir}/purge-kernels.service
install -D -m 0755 %{SOURCE6} %{buildroot}/sbin/installkernel
%if 0%{?suse_version}
install -D -m 0755 %{SOURCE7} %{buildroot}/%{dracutlibdir}/modules.d/45ifcfg/write-ifcfg-suse.sh
rm -f %{buildroot}/%{dracutlibdir}/modules.d/45ifcfg/write-ifcfg.sh
ln -s %{dracutlibdir}/modules.d/45ifcfg/write-ifcfg-suse.sh %{buildroot}/%{dracutlibdir}/modules.d/45ifcfg/write-ifcfg.sh
%else
mv %{buildroot}/%{dracutlibdir}/modules.d/45ifcfg/write-ifcfg.sh %{buildroot}/%{dracutlibdir}/modules.d/45ifcfg/write-ifcfg-redhat.sh
ln -s %{dracutlibdir}/modules.d/45ifcfg/write-ifcfg-redhat.sh %{buildroot}/%{dracutlibdir}/modules.d/45ifcfg/write-ifcfg.sh
%endif
%pre
%service_add_pre purge-kernels.service
%post
%service_add_post purge-kernels.service
%preun
%service_del_preun purge-kernels.service
%postun
%service_del_postun purge-kernels.service
%files fips
%defattr(-,root,root,0755)
%doc COPYING
%config %{_sysconfdir}/dracut.conf.d/40-fips.conf
%{dracutlibdir}/modules.d/01fips
%{dracutlibdir}/modules.d/02fips-aesni
%files
%defattr(-,root,root,0755)
%doc README HACKING TODO COPYING AUTHORS NEWS dracut.html dracut.png dracut.svg
%{_bindir}/dracut
%{_bindir}/dracut-catimages
%{_bindir}/lsinitrd
/sbin/purge-kernels
/sbin/installkernel
/sbin/mkinitrd
/sbin/mkinitrd_setup
%config %{_sysconfdir}/bash_completion.d/lsinitrd
%dir %{dracutlibdir}
%dir %{dracutlibdir}/modules.d
%{dracutlibdir}/skipcpio
%{dracutlibdir}/dracut-functions.sh
%{dracutlibdir}/dracut-functions
%{dracutlibdir}/dracut-version.sh
%{dracutlibdir}/dracut-logger.sh
%{dracutlibdir}/dracut-initramfs-restore
%{dracutlibdir}/dracut-install
%config(noreplace) %{_sysconfdir}/dracut.conf
%if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel}
%config %{_sysconfdir}/dracut.conf.d/01-dist.conf
%endif
%ifarch %ix86 x86_64
%config %{_sysconfdir}/dracut.conf.d/02-early-microcode.conf
%endif
%dir %{_sysconfdir}/dracut.conf.d
%{_mandir}/man8/dracut.8*
%{_mandir}/man8/mkinitrd.8*
%{_mandir}/man1/lsinitrd.1*
%{_mandir}/man7/dracut.kernel.7*
%{_mandir}/man7/dracut.cmdline.7*
%{_mandir}/man7/dracut.bootup.7*
%{_mandir}/man7/dracut.modules.7*
%{_mandir}/man8/dracut-cmdline.service.8*
%{_mandir}/man8/dracut-initqueue.service.8*
%{_mandir}/man8/dracut-pre-pivot.service.8*
%{_mandir}/man8/dracut-pre-trigger.service.8*
%{_mandir}/man8/dracut-pre-udev.service.8*
%{_mandir}/man8/dracut-mount.service.8.*
%{_mandir}/man8/dracut-pre-mount.service.8.*
%{_mandir}/man8/dracut-shutdown.service.8.*
%{_mandir}/man5/dracut.conf.5*
%{_mandir}/man8/dracut-catimages.8*
%dir %{_libexecdir}/kernel
%dir %{_libexecdir}/kernel/install.d
%{_libexecdir}/kernel/install.d/50-dracut.install
%{_libexecdir}/kernel/install.d/51-dracut-rescue.install
%dir %{dracutlibdir}/modules.d/00systemd-bootchart
%dir %{dracutlibdir}/modules.d/03rescue
%{dracutlibdir}/modules.d/00bash
%{dracutlibdir}/modules.d/00systemd-bootchart/module-setup.sh
%{dracutlibdir}/modules.d/00warpclock
%{dracutlibdir}/modules.d/02caps
%{dracutlibdir}/modules.d/03modsign
%{dracutlibdir}/modules.d/03rescue/module-setup.sh
%{dracutlibdir}/modules.d/04watchdog
%{dracutlibdir}/modules.d/10i18n
%{dracutlibdir}/modules.d/30convertfs
%{dracutlibdir}/modules.d/40network
%{dracutlibdir}/modules.d/45url-lib
%{dracutlibdir}/modules.d/45ifcfg
%{dracutlibdir}/modules.d/50drm
%{dracutlibdir}/modules.d/50plymouth
%{dracutlibdir}/modules.d/80cms
%{dracutlibdir}/modules.d/90livenet
%{dracutlibdir}/modules.d/90qemu-net
%{dracutlibdir}/modules.d/90btrfs
%{dracutlibdir}/modules.d/90crypt
%{dracutlibdir}/modules.d/90dm
%{dracutlibdir}/modules.d/90dmraid
%{dracutlibdir}/modules.d/90dmsquash-live
%{dracutlibdir}/modules.d/90kernel-modules
%{dracutlibdir}/modules.d/90lvm
%{dracutlibdir}/modules.d/90mdraid
%{dracutlibdir}/modules.d/90multipath
%{dracutlibdir}/modules.d/90qemu
%{dracutlibdir}/modules.d/91crypt-gpg
%{dracutlibdir}/modules.d/91crypt-loop
%{dracutlibdir}/modules.d/95znet
%{dracutlibdir}/modules.d/95fcoe-uefi
%{dracutlibdir}/modules.d/95nbd
%{dracutlibdir}/modules.d/95nfs
%{dracutlibdir}/modules.d/95ssh-client
%{dracutlibdir}/modules.d/95fcoe
%{dracutlibdir}/modules.d/95iscsi
%{dracutlibdir}/modules.d/95cifs
%{dracutlibdir}/modules.d/95debug
%{dracutlibdir}/modules.d/95resume
%{dracutlibdir}/modules.d/95rootfs-block
%{dracutlibdir}/modules.d/95dcssblk
%{dracutlibdir}/modules.d/95dasd
%{dracutlibdir}/modules.d/95dasd_mod
%{dracutlibdir}/modules.d/95dasd_rules
%{dracutlibdir}/modules.d/95fstab-sys
%{dracutlibdir}/modules.d/95zfcp
%{dracutlibdir}/modules.d/95zfcp_rules
%{dracutlibdir}/modules.d/95terminfo
%{dracutlibdir}/modules.d/95udev-rules
%{dracutlibdir}/modules.d/95virtfs
%{dracutlibdir}/modules.d/97biosdevname
%{dracutlibdir}/modules.d/98ecryptfs
%{dracutlibdir}/modules.d/98pollcdrom
%{dracutlibdir}/modules.d/98selinux
%{dracutlibdir}/modules.d/98syslog
%{dracutlibdir}/modules.d/98systemd
%{dracutlibdir}/modules.d/98usrmount
%{dracutlibdir}/modules.d/99base
%{dracutlibdir}/modules.d/99fs-lib
%{dracutlibdir}/modules.d/99img-lib
%{dracutlibdir}/modules.d/99shutdown
%{dracutlibdir}/modules.d/99suse
%{dracutlibdir}/modules.d/99uefi-lib
%config(noreplace) %{_sysconfdir}/logrotate.d/dracut
%attr(0644,root,root) %ghost %config(missingok,noreplace) %{_localstatedir}/log/dracut.log
%if %{defined _unitdir}
%dir %{_unitdir}/initrd.target.wants
%{_unitdir}/*.service
%{_unitdir}/*/*.service
%endif
%config %{_sysconfdir}/bash_completion.d/dracut
%dir /boot/dracut
%dir %{_localstatedir}/lib/dracut
%dir %{_localstatedir}/lib/dracut/overlay
%changelog