From fbf371c8a8e3a0ad19f2642e38ff6ee0f6b408b6 Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Wed, 23 Jun 2021 16:01:04 -0400 Subject: [PATCH] Make sure policycoreutils is installed before using it (bz 1972133) Make sure /var/lib/rpcbind exists (bz 1972133) Signed-off-by: Steve Dickson Resolves: bz1972133 --- rpcbind.spec | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/rpcbind.spec b/rpcbind.spec index 185264b..379035f 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -18,7 +18,7 @@ BuildRequires: make BuildRequires: automake, autoconf, libtool, systemd, systemd-devel BuildRequires: libtirpc-devel, quota-devel Requires(pre): coreutils shadow-utils -Requires(post): systemd +Requires(post): systemd policycoreutils Requires(preun): systemd Requires(postun): systemd coreutils @@ -102,6 +102,13 @@ then /bin/systemctl reenable rpcbind.socket >/dev/null 2>&1 || : /bin/systemctl restart rpcbind.socket >/dev/null 2>&1 || : fi +if [ ! -d /var/lib/rpcbind ] +then + mkdir /var/lib/rpcbind + chown rpc:rpc /var/lib/rpcbind + [ -x /usr/sbin/restorecon ] && \ + /usr/sbin/restorecon /var/lib/rpcbind +fi %files %license COPYING @@ -120,6 +127,8 @@ fi %changelog * Wed Jun 23 2021 Steve Dickson - 1.2.6-1 - Use sysconfig variable in service file (bz 1972094) +- Make sure policycoreutils is installed before using it (bz 1972133) +- Make sure /var/lib/rpcbind exists (bz 1972133) * Tue Jun 22 2021 Steve Dickson - 1.2.6-0 - Rebased to latest upstream release: rpcbind-1-2-6 (bz 1959128)