Package init

This commit is contained in:
overweight 2019-09-30 10:58:31 -04:00
commit a37e9318d3
3 changed files with 105 additions and 0 deletions

View File

@ -0,0 +1,38 @@
From ce60a0505a473a9462af9af40425c9c3400e7385 Mon Sep 17 00:00:00 2001
From: mouxibo <mouxibo@huawei.com>
Date: Thu, 4 Apr 2019 05:30:15 +0000
Subject: [PATCH] libtirp: update libtirpc to enable tcp port listening
Change-Id: I1f0b4d12fb80158c50026f76d5c6a5cafb7038e7
---
src/rpc_soc.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/rpc_soc.c b/src/rpc_soc.c
index 5a6eeb7..bf27673 100644
--- a/src/rpc_soc.c
+++ b/src/rpc_soc.c
@@ -314,6 +314,8 @@ svc_com_create(fd, sendsize, recvsize, netid)
int madefd = FALSE;
int port;
+ struct sockaddr_in sin;
+
if ((nconf = __rpc_getconfip(netid)) == NULL) {
(void) syslog(LOG_ERR, "Could not get %s transport", netid);
return (NULL);
@@ -329,6 +331,11 @@ svc_com_create(fd, sendsize, recvsize, netid)
madefd = TRUE;
}
+ memset(&sin, 0, sizeof sin);
+ sin.sin_family = AF_INET;
+ bindresvport(fd, &sin);
+ listen(fd, SOMAXCONN);
+
svc = svc_tli_create(fd, nconf, NULL, sendsize, recvsize);
(void) freenetconfigent(nconf);
if (svc == NULL) {
--
1.8.3.1

BIN
libtirpc-1.1.4.tar.bz2 Normal file

Binary file not shown.

67
libtirpc.spec Normal file
View File

@ -0,0 +1,67 @@
Name: libtirpc
Version: 1.1.4
Release: 1
Summary: Transport-independent RPC library
License: SISSL and BSD
URL: http://git.linux-nfs.org/?p=steved/libtirpc.git;a=summary
Source0: http://downloads.sourceforge.net/libtirpc/%{name}-%{version}.tar.bz2
Patch01: 0001-update-libtirpc-to-enable-tcp-port-listening.patch
BuildRequires: automake autoconf libtool pkgconfig krb5-devel
%description
Libtirpc is a Transport-Independent RPC library for Linux
%package devel
Summary: Development files for the %{name}
Requires: %{name} = %{version}-%{release}
Requires: pkgconfig man-db
%description devel
The %{name}-devel package contains development files for %{name}.
%package_help
%prep
%autosetup -n %{name}-%{version} -p1
%build
sh autogen.sh
autoreconf -fisv
%configure
%make_build
%install
%make_install libdir=/%{_lib} pkgconfigdir=%{_libdir}/pkgconfig
%delete_la
mv %{buildroot}%{_mandir}/man3 %{buildroot}%{_mandir}/man3t
%ldconfig_scriptlets
%post devel
%postun devel
%files
%defattr(-,root,root)
%doc AUTHORS
%license COPYING
/%{_lib}/*.so.*
%config(noreplace)%{_sysconfdir}/netconfig
%config(noreplace)%{_sysconfdir}/bindresvport.blacklist
%files devel
%defattr(-,root,root)
%{!?_licensedir:%global license %%doc}
/%{_lib}/*.a
/%{_lib}/*.so
%{_libdir}/pkgconfig/*.pc
%{_includedir}/tirpc/*
%files help
%defattr(-,root,root)
%doc ChangeLog NEWS README
%{_mandir}/*/*
%changelog
* Thu Aug 29 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.1.4-1
- Package init