From f11eddcc744cb255c47b4a841ead31a5b757aef6 Mon Sep 17 00:00:00 2001 From: Jeffrey Bastian Date: Tue, 20 Apr 2021 12:22:10 -0500 Subject: [PATCH] add /etc/sysconfig/rshim for setting $OPTIONS Also update rshim.service to source this file and get the $OPTIONS environment variable. Resolves: rhbz#1960060 --- rshim-sysconfig.patch | 24 ++++++++++++++++++++++++ rshim.spec | 15 ++++++++++++++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 rshim-sysconfig.patch diff --git a/rshim-sysconfig.patch b/rshim-sysconfig.patch new file mode 100644 index 0000000..87a5156 --- /dev/null +++ b/rshim-sysconfig.patch @@ -0,0 +1,24 @@ +From 37b1523b39d7fb0d58d57b8f58c943055b1e83e2 Mon Sep 17 00:00:00 2001 +From: Jeffrey Bastian +Date: Tue, 6 Apr 2021 14:24:16 -0500 +Subject: [PATCH] add rshim sysconfig file for setting + +--- + rshim.service | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/rshim.service b/rshim.service +index 84f0e2f49eba..7539133f869c 100644 +--- a/rshim.service ++++ b/rshim.service +@@ -9,6 +9,7 @@ After=network.target + [Service] + Restart=always + Type=forking ++EnvironmentFile=-/etc/sysconfig/rshim + ExecStart=-/usr/sbin/rshim $OPTIONS + KillMode=control-group + +-- +2.26.3 + diff --git a/rshim.spec b/rshim.spec index 0f4a9d3..615add0 100644 --- a/rshim.spec +++ b/rshim.spec @@ -4,13 +4,14 @@ Name: rshim Version: 2.0.4 -Release: 5%{?dist} +Release: 6%{?dist} Summary: User-space driver for Mellanox BlueField SoC License: GPLv2 URL: https://github.com/mellanox/rshim-user-space Source0: https://github.com/Mellanox/rshim-user-space/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz +Patch0: rshim-sysconfig.patch BuildRequires: gcc, autoconf, automake, make BuildRequires: pkgconfig(libpci), pkgconfig(libusb-1.0), pkgconfig(fuse) @@ -27,6 +28,7 @@ via the virtual console or network interface. %prep %setup -q -n %{name}-%{version} +%patch0 -p1 -b .sysconfig %build ./bootstrap.sh @@ -36,6 +38,12 @@ via the virtual console or network interface. %install %make_install +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig +cat > $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/rshim < - 2.0.4-6 +- add sysconfig/rshim file and update rshim.service to source it +- Resolves: rhbz#1960060 + * Fri Apr 16 2021 Mohan Boddu - 2.0.4-5 - Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937