diff --git a/rpcbind.spec b/rpcbind.spec index f05dcd833c279a36edb2aa3c4e39098f8f459ba7..0eecbe7af9b1417d06afa9d48e112de93132852a 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