diff --git a/rust-afterburn.spec b/rust-afterburn.spec index 42835b6..e105ed0 100644 --- a/rust-afterburn.spec +++ b/rust-afterburn.spec @@ -2,11 +2,13 @@ %bcond_without check %global __cargo_skip_build 0 +%global dracutmodulesdir %(pkg-config --variable=dracutmodulesdir dracut || echo '/usr/lib/dracut/modules.d') + %global crate afterburn Name: rust-%{crate} Version: 4.1.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Simple cloud provider agent # Upstream license specification: Apache-2.0 @@ -60,6 +62,20 @@ Summary: %{summary} %systemd_postun afterburn-firstboot-checkin.service %systemd_postun afterburn-sshkeys@.service +%package dracut +Summary: Dracut modules for afterburn +BuildRequires: pkgconfig(dracut) +Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: dracut +Requires: dracut-network + +%description dracut +Dracut module that enables afterburn and corresponding services +to run in the initramfs on boot. + +%files dracut +%{dracutmodulesdir}/30afterburn + %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 # afterburn-sshkeys@.service is by default enabled for the 'core' user in @@ -78,8 +94,10 @@ sed -e 's,@DEFAULT_INSTANCE@,core,' < \ %install %cargo_install -%{__install} -Dpm0644 -t %{buildroot}%{_unitdir} \ +install -Dpm0644 -t %{buildroot}%{_unitdir} \ systemd/*.service +install -Dpm0644 -t %{buildroot}%{dracutmodulesdir} \ + dracut/* %if %{with check} %check @@ -87,6 +105,9 @@ sed -e 's,@DEFAULT_INSTANCE@,core,' < \ %endif %changelog +* Sat Jun 22 11:06:19 CEST 2019 Igor Gnatenko - 4.1.1-2 +- Add dracut modules + * Fri Jun 21 2019 Robert Fairley - 4.1.1-1 - Update to 4.1.1 - Regenerate specfile using rust2rpm 10 with DynamicBuildRequires