From e4aa3bb0420e4b1495a8271ca34f07aedd67fd7c Mon Sep 17 00:00:00 2001 From: Sohan Kunkerkar Date: Thu, 8 Apr 2021 14:35:50 -0400 Subject: [PATCH] Fix dracut library path --- rust-coreos-installer.rpmlintrc | 2 ++ rust-coreos-installer.spec | 12 ++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 rust-coreos-installer.rpmlintrc diff --git a/rust-coreos-installer.rpmlintrc b/rust-coreos-installer.rpmlintrc new file mode 100644 index 0000000..de41af1 --- /dev/null +++ b/rust-coreos-installer.rpmlintrc @@ -0,0 +1,2 @@ +# Suppress hardcoded library path warning +addFilter("hardcoded-library-path in %{_prefix}/lib/dracut") diff --git a/rust-coreos-installer.spec b/rust-coreos-installer.spec index 35dfece..d0014b4 100644 --- a/rust-coreos-installer.spec +++ b/rust-coreos-installer.spec @@ -1,4 +1,5 @@ # Generated by rust2rpm 16 +%define dracutlibdir %{_prefix}/lib/dracut %bcond_without check %global __cargo_skip_build 0 # The library is for internal code reuse and is not a public API @@ -8,7 +9,7 @@ Name: rust-%{crate} Version: 0.9.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Installer for Fedora CoreOS and RHEL CoreOS # Upstream license specification: Apache-2.0 @@ -83,7 +84,7 @@ sed -i 's/"-Ccodegen-units=1",//' .cargo/config %install %cargo_install -f rdcore # Install binaries, dracut modules, units, targets, generators for running via systemd -install -D -m 0755 -t %{buildroot}%{_libdir}/dracut/modules.d/50rdcore dracut/50rdcore/module-setup.sh +install -D -m 0755 -t %{buildroot}%{dracutlibdir}/modules.d/50rdcore dracut/50rdcore/module-setup.sh install -D -m 0755 -t %{buildroot}%{_libexecdir} scripts/coreos-installer-service install -D -m 0755 -t %{buildroot}%{_libexecdir} scripts/coreos-installer-disable-device-auto-activation install -D -m 0644 -t %{buildroot}%{_unitdir} systemd/coreos-installer-disable-device-auto-activation.service @@ -94,7 +95,7 @@ install -D -m 0644 -t %{buildroot}%{_unitdir} systemd/coreos-installer-pre.targe install -D -m 0644 -t %{buildroot}%{_unitdir} systemd/coreos-installer.target install -D -m 0644 -t %{buildroot}%{_unitdir} systemd/coreos-installer-post.target install -D -m 0755 -t %{buildroot}%{_systemdgeneratordir} systemd/coreos-installer-generator -mv %{buildroot}%{_bindir}/rdcore %{buildroot}%{_libdir}/dracut/modules.d/50rdcore/ +mv %{buildroot}%{_bindir}/rdcore %{buildroot}%{dracutlibdir}/modules.d/50rdcore/ %package -n %{crate}-bootinfra Summary: %{crate} boot-time infrastructure for use on Fedora/RHEL CoreOS @@ -116,7 +117,7 @@ This subpackage contains boot-time infrastructure for Fedora CoreOS and RHEL CoreOS. It is not needed on other platforms. %files -n %{crate}-bootinfra -%{_libdir}/dracut/modules.d/* +%{dracutlibdir}/modules.d/* %{_libexecdir}/* %{_unitdir}/* %{_systemdgeneratordir}/* @@ -127,6 +128,9 @@ RHEL CoreOS. It is not needed on other platforms. %endif %changelog +* Thu Apr 08 2021 Sohan Kunkerkar - 0.9.0-2 +- Fix dracut library path + * Thu Apr 08 2021 Sohan Kunkerkar - 0.9.0-1 - New release - Fix hardcoded library path