From 25adb007e7390fc02bd2d94800482cda2080d6a2 Mon Sep 17 00:00:00 2001 From: yuanhui Date: Fri, 8 Mar 2024 11:47:01 +0800 Subject: [PATCH] LifseaOS: remove policycoreutils post-require Signed-off-by: yuanhui --- rpcbind.spec | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/rpcbind.spec b/rpcbind.spec index f05dcd8..0eecbe7 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -1,29 +1,30 @@ # These are macros to be usable outside of the build section -%define anolis_release .0.1 +%define anolis_release .0.2 %global rpcbind_user_group rpc %global rpcbind_state_dir %{_rundir}/rpcbind Name: rpcbind Version: 1.2.5 -Release: 10%{anolis_release}%{?dist} +Release: 10%{anolis_release}%{?dist}%{?lifsea_dist} Summary: Universal Addresses to RPC Program Number Mapper Group: System Environment/Daemons License: BSD URL: http://git.linux-nfs.org/?p=steved/rpcbind.git;a=summary Source0: http://downloads.sourceforge.net/rpcbind/%{name}-%{version}.tar.bz2 -Source1: %{name}.sysconfig +Source1: %{name}.sysconfig Requires: glibc-common setup Conflicts: man-pages < 2.43-12 BuildRequires: automake, autoconf, libtool, systemd, systemd-devel BuildRequires: libtirpc-devel, quota-devel Requires(pre): coreutils shadow-utils -Requires(post): chkconfig systemd policycoreutils +Requires(post): chkconfig systemd +%{!?lifsea_dist:Requires(post): policycoreutils} Requires(preun): systemd Requires(postun): systemd coreutils -Provides: /usr/bin/rpcbind +Provides: /usr/bin/rpcbind Requires: glibc # @@ -69,6 +70,13 @@ Requires: %{name} = %{version}-%{release} %description doc Doc pages for %{name}. +# To avoid users installing the LifseaOS package in other os +%define common_pre_scripts() \ +if ! grep -q 'ID="lifsea"' /etc/os-release; then \ + echo "This package is only for LifseaOS!" \ + exit 1 \ +fi + %prep %setup -q @@ -124,6 +132,9 @@ ln -sf ../bin/rpcinfo %pre +%if %{defined lifsea_dist} +%{common_pre_scripts} +%endif # Softly static allocate the rpc uid and gid. getent group rpc >/dev/null || groupadd -f -g 32 -r rpc if ! getent passwd rpc >/dev/null ; then @@ -183,6 +194,9 @@ fi %doc AUTHORS ChangeLog README %changelog +* Thu Jan 18 2024 yuanhui - 1.2.5-10.0.2 +- LifseaOS: remove policycoreutils post-require + * Tue Jan 31 2023 Xiaoping Liu - 1.2.5-10.0.1 - Add doc sub package -- Gitee