Add dracut modules

Co-authored-by: Yu Qi Zhang <jerzhang@redhat.com>
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
This commit is contained in:
Igor Gnatenko 2019-06-22 11:07:06 +02:00
parent f361e562cc
commit bfaeae37f4
No known key found for this signature in database
GPG Key ID: 695714BD1BBC5F4C

View File

@ -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 <ignatenkobrain@fedoraproject.org> - 4.1.1-2
- Add dracut modules
* Fri Jun 21 2019 Robert Fairley <rfairley@redhat.com> - 4.1.1-1
- Update to 4.1.1
- Regenerate specfile using rust2rpm 10 with DynamicBuildRequires