2019-09-30 11:16:23 -04:00
|
|
|
%global rpcbind_user_group rpc
|
|
|
|
|
%global rpcbind_state_dir %{_rundir}/rpcbind
|
|
|
|
|
|
|
|
|
|
Name: rpcbind
|
2021-12-03 15:46:02 +08:00
|
|
|
Version: 1.2.6
|
2024-12-18 09:07:37 +00:00
|
|
|
Release: 8
|
2019-09-30 11:16:23 -04:00
|
|
|
Summary: Universal addresses to RPC program number mapper
|
|
|
|
|
License: BSD
|
|
|
|
|
|
|
|
|
|
URL: https://nfsv4.bullopensource.org
|
|
|
|
|
Source0: https://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
|
|
|
|
|
Source1: %{name}.sysconfig
|
|
|
|
|
|
|
|
|
|
Requires: glibc-common setup
|
|
|
|
|
Conflicts: man-pages < 2.43-12
|
|
|
|
|
BuildRequires: automake autoconf libtool systemd-devel
|
2019-11-06 19:51:26 +08:00
|
|
|
BuildRequires: libtirpc-devel quota-devel systemd
|
2019-09-30 11:16:23 -04:00
|
|
|
Requires(pre): coreutils shadow-utils
|
|
|
|
|
Requires(post): chkconfig systemd
|
|
|
|
|
Requires(preun): systemd
|
|
|
|
|
Requires(postun): systemd coreutils
|
|
|
|
|
|
|
|
|
|
Patch100: %{name}-0.2.3-systemd-envfile.patch
|
|
|
|
|
Patch101: %{name}-0.2.3-systemd-tmpfiles.patch
|
|
|
|
|
Patch102: %{name}-0.2.4-runstatdir.patch
|
|
|
|
|
Patch103: %{name}-0.2.4-systemd-service.patch
|
|
|
|
|
Patch104: %{name}-0.2.4-systemd-rundir.patch
|
2022-02-09 19:50:13 +08:00
|
|
|
Patch105: bugfix-rpcbind-GETADDR-return-client-ip.patch
|
2019-09-30 11:16:23 -04:00
|
|
|
Patch6001: CVE-2017-8779.patch
|
2022-02-28 16:45:32 +08:00
|
|
|
Patch6002: backport-fix-double-free-in-init_transport.patch
|
2022-03-30 10:23:33 +08:00
|
|
|
Patch6003: backport-debian-enable-rmt-calls-with-r.patch
|
2019-09-30 11:16:23 -04:00
|
|
|
Patch9000: bugfix-listen-tcp-port-111.patch
|
|
|
|
|
|
|
|
|
|
Provides: portmap = %{version}-%{release}
|
|
|
|
|
Obsoletes: portmap <= 4.0-65.3
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
The %{name} utility is a server that converts RPC program
|
|
|
|
|
numbers into universal addresses. It must be running on the
|
|
|
|
|
host to be able to make RPC calls on a server on that machine.
|
|
|
|
|
|
|
|
|
|
%package_help
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%autosetup -n %{name}-%{version} -p1
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
autoreconf -fisv
|
|
|
|
|
%configure --enable-warmstarts --with-statedir="%rpcbind_state_dir" \
|
|
|
|
|
--with-rpcuser="%rpcbind_user_group" --with-nss-modules="files altfiles" \
|
2021-12-03 15:46:02 +08:00
|
|
|
--sbindir=%{_bindir} --enable-debug --enable-rmtcalls
|
2019-09-30 11:16:23 -04:00
|
|
|
|
|
|
|
|
make all
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
install -m 0755 -d %{buildroot}{%{_sbindir},%{_bindir},/etc/sysconfig}
|
|
|
|
|
install -m 0755 -d %{buildroot}%{_unitdir}
|
|
|
|
|
install -m 0755 -d %{buildroot}%{_tmpfilesdir}
|
|
|
|
|
install -m 0755 -d %{buildroot}%{_mandir}/man8
|
|
|
|
|
install -m 0755 -d %{buildroot}%{rpcbind_state_dir}
|
|
|
|
|
%make_install
|
2021-12-03 15:46:02 +08:00
|
|
|
make DESTDIR=$RPM_BUILD_ROOT install
|
2019-09-30 11:16:23 -04:00
|
|
|
|
|
|
|
|
install -m 644 %{SOURCE1} %{buildroot}/etc/sysconfig/%{name}
|
|
|
|
|
|
|
|
|
|
cd %{buildroot}%{_sbindir}
|
|
|
|
|
ln -sf ../bin/%{name}
|
|
|
|
|
ln -sf ../bin/rpcinfo
|
|
|
|
|
|
|
|
|
|
%pre
|
|
|
|
|
getent group rpc >/dev/null || groupadd -f -g 32 -r rpc
|
|
|
|
|
if ! getent passwd rpc >/dev/null ; then
|
|
|
|
|
if ! getent passwd 32 >/dev/null ; then
|
|
|
|
|
useradd -l -c "Rpcbind Daemon" -d /var/lib/%{name} \
|
|
|
|
|
-g rpc -M -s /sbin/nologin -o -u 32 rpc > /dev/null 2>&1
|
|
|
|
|
else
|
|
|
|
|
useradd -l -c "Rpcbind Daemon" -d /var/lib/%{name} \
|
|
|
|
|
-g rpc -M -s /sbin/nologin rpc > /dev/null 2>&1
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
%post
|
2023-05-29 14:24:40 +00:00
|
|
|
%systemd_post %{name}.socket %{name}.service
|
2019-09-30 11:16:23 -04:00
|
|
|
|
|
|
|
|
%preun
|
|
|
|
|
%systemd_preun %{name}.service %{name}.socket
|
|
|
|
|
|
|
|
|
|
%postun
|
2023-05-29 14:24:40 +00:00
|
|
|
%systemd_postun_with_restart %{name}.socket %{name}.service
|
2019-09-30 11:16:23 -04:00
|
|
|
|
2024-12-18 09:07:37 +00:00
|
|
|
%triggerin -- %{name} > 0.2.2-2.0
|
|
|
|
|
if systemctl -q is-enabled %{name}.socket
|
|
|
|
|
then
|
|
|
|
|
/bin/systemctl reenable %{name}.socket >/dev/null 2>&1 || :
|
|
|
|
|
/bin/systemctl restart %{name}.socket >/dev/null 2>&1 || :
|
|
|
|
|
fi
|
|
|
|
|
|
2023-05-22 21:42:42 +08:00
|
|
|
if [ ! -d /var/lib/rpcbind ]
|
|
|
|
|
then
|
|
|
|
|
mkdir /var/lib/rpcbind
|
|
|
|
|
chown rpc:rpc /var/lib/rpcbind
|
|
|
|
|
if [ -x /usr/sbin/restorecon ]
|
|
|
|
|
then
|
|
|
|
|
/usr/sbin/restorecon /var/lib/rpcbind
|
|
|
|
|
fi
|
|
|
|
|
fi
|
2019-09-30 11:16:23 -04:00
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
%config(noreplace) /etc/sysconfig/%{name}
|
|
|
|
|
%doc AUTHORS
|
2019-11-06 19:51:26 +08:00
|
|
|
%license COPYING
|
2019-09-30 11:16:23 -04:00
|
|
|
%{_sbindir}/*
|
|
|
|
|
%{_bindir}/*
|
|
|
|
|
%{_unitdir}/%{name}.*
|
|
|
|
|
%{_tmpfilesdir}/%{name}.conf
|
|
|
|
|
%attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir}
|
|
|
|
|
|
|
|
|
|
%files help
|
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
%doc ChangeLog README
|
|
|
|
|
%{_mandir}/man8/*.8.gz
|
|
|
|
|
|
|
|
|
|
%changelog
|
2024-12-18 09:07:37 +00:00
|
|
|
* Wed Dec 18 2024 sunsuwan <sunsuwan3@huawei.com> - 1.2.6-8
|
|
|
|
|
- Type:bugfix
|
|
|
|
|
- Id:NA
|
|
|
|
|
- SUG:NA
|
|
|
|
|
- DESC:add back the mistakenly deleted triggerin
|
|
|
|
|
|
2023-05-29 14:24:40 +00:00
|
|
|
* Mon May 29 2023 liuhaipeng <liuhaipeng@xfusion.com> - 1.2.6-7
|
|
|
|
|
- Type:bugfix
|
|
|
|
|
- Id:NA
|
|
|
|
|
- SUG:NA
|
|
|
|
|
- DESC:fix the upgrade or upgrade exception alarm
|
|
|
|
|
|
2023-05-22 21:42:42 +08:00
|
|
|
* Mon May 22 2023 sunsuwan <sunsuwan3@huawei.com> - 1.2.6-6
|
|
|
|
|
- Type:bugfix
|
|
|
|
|
- Id:NA
|
|
|
|
|
- SUG:NA
|
|
|
|
|
- DESC:add a user directory when the rpc user directory does not exist
|
|
|
|
|
|
2023-03-21 15:09:00 +08:00
|
|
|
* Mon Mar 27 2023 wangqing <wangqing151@huawei.com> - 1.2.6-5
|
|
|
|
|
- Type:bugfix
|
|
|
|
|
- Id:NA
|
|
|
|
|
- SUG:NA
|
|
|
|
|
- DESC:add macro WITHOUT_SYSTEMD to relieve dependence on systemd
|
|
|
|
|
|
2022-03-30 10:23:33 +08:00
|
|
|
* Wed Mar 30 2022 kircher <majun65@huawei.com> - 1.2.6-4
|
|
|
|
|
- Type:bugfix
|
|
|
|
|
- Id:NA
|
|
|
|
|
- SUG:NA
|
|
|
|
|
- DESC:enable rmt-calls with -r
|
|
|
|
|
|
2022-02-28 16:45:32 +08:00
|
|
|
* Mon Feb 28 2022 quanhongfei <quanhongfei@h-partners.com> - 1.2.6-3
|
|
|
|
|
- Type:bugfix
|
|
|
|
|
- Id:NA
|
|
|
|
|
- SUG:NA
|
|
|
|
|
- DESC:fix double free in init_transport
|
|
|
|
|
|
2022-02-09 19:50:13 +08:00
|
|
|
* Wed Feb 09 2022 yanglu <yanglu72@huawei.com> - 1.2.6-2
|
|
|
|
|
- Type:bugfix
|
|
|
|
|
- Id:NA
|
|
|
|
|
- SUG:NA
|
|
|
|
|
- DESC:modify the getaddr method of ip
|
|
|
|
|
|
2021-12-03 15:46:02 +08:00
|
|
|
* Fri Dec 03 2021 quanhongfei <quanhongfei@huawei.com> - 1.2.6-1
|
|
|
|
|
- Type:requirements
|
|
|
|
|
- Id:NA
|
|
|
|
|
- SUG:NA
|
|
|
|
|
- DESC:update rpcbind to 1.2.6
|
|
|
|
|
|
2019-11-06 19:51:26 +08:00
|
|
|
* Thu Oct 10 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.2.5-2
|
|
|
|
|
- Type:bugfix
|
|
|
|
|
- Id:NA
|
|
|
|
|
- SUG:NA
|
|
|
|
|
- DESC:add copying file to rpcbind package
|
|
|
|
|
|
2019-09-30 11:16:23 -04:00
|
|
|
* Tue Sep 17 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.2.5-1
|
|
|
|
|
- Package init
|