From patchwork Fri Feb 24 14:20:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thorsten Kukuk X-Patchwork-Id: 19373 Received: (qmail 33834 invoked by alias); 24 Feb 2017 14:21:03 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 33824 invoked by uid 89); 24 Feb 2017 14:21:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx2.suse.de Date: Fri, 24 Feb 2017 15:20:58 +0100 From: Thorsten Kukuk To: GNU C Library Subject: [PATCH] Disable rest of sunrpc, too [V3] Message-ID: <20170224142058.GA12862@suse.de> References: <20170223144251.GA7680@suse.de> <20170223163026.GA7547@suse.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20170223163026.GA7547@suse.de> User-Agent: Mutt/1.6.0 (2016-04-01) Ok, here is V3 of the patch. From a1e62f6a31c06cfc9d0c8430b48b0bb0c10b36a6 Mon Sep 17 00:00:00 2001 From: Thorsten Kukuk Date: Fri, 24 Feb 2017 15:18:39 +0100 Subject: [PATCH 1/1] If sunrpc code is disabled, no RPC header files, rpcgen nor librpcsvc.a should be installed, too. * sunrpc/Makefile: don't build and install header files, rpcgen and librpcsvc.a by default. Signed-off-by: Thorsten Kukuk --- NEWS | 5 +++++ sunrpc/Makefile | 15 +++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index d87e9ce..4eedffa 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,11 @@ Version 2.26 transliteration tables are all updated to Unicode 9.0.0, using generator scripts contributed by Mike FABIAN (Red Hat). +* rpcgen, librpcsvc and related headers will now only be built and + installed when glibc is configured with --enable-obsolete-rpc. + Alternative sources can be found at + https://github.com/thkukuk/rpcsvc-proto. + Security related changes: [Add security related changes here] diff --git a/sunrpc/Makefile b/sunrpc/Makefile index 0c1e612..305bee6 100644 --- a/sunrpc/Makefile +++ b/sunrpc/Makefile @@ -48,11 +48,10 @@ include ../Makeconfig rpcsvc = bootparam_prot.x nlm_prot.x rstat.x \ yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \ rusers.x spray.x nfs_prot.x rquota.x key_prot.x -headers-in-tirpc = $(addprefix rpc/,auth.h auth_unix.h clnt.h pmap_clnt.h \ - pmap_prot.h pmap_rmt.h rpc.h rpc_msg.h \ - svc.h svc_auth.h types.h xdr.h auth_des.h \ - des_crypt.h) -headers-not-in-tirpc = $(addprefix rpc/,key_prot.h rpc_des.h) \ +headers-sunrpc = $(addprefix rpc/,auth.h auth_unix.h clnt.h pmap_clnt.h \ + pmap_prot.h pmap_rmt.h rpc.h rpc_msg.h \ + svc.h svc_auth.h types.h xdr.h auth_des.h \ + des_crypt.h key_prot.h rpc_des.h) \ $(rpcsvc:%=rpcsvc/%) rpcsvc/bootparam.h headers = rpc/netdb.h install-others = $(inst_sysconfdir)/rpc @@ -61,7 +60,7 @@ generated += $(rpcsvc:%.x=rpcsvc/%.h) $(rpcsvc:%.x=x%.c) $(rpcsvc:%.x=x%.stmp) \ generated-dirs += rpcsvc ifeq ($(link-obsolete-rpc),yes) -headers += $(headers-in-tirpc) $(headers-not-in-tirpc) +headers += $(headers-sunrpc) endif ifeq ($(build-shared),yes) @@ -86,12 +85,14 @@ shared-only-routines = $(routines) endif endif +ifeq ($(link-obsolete-rpc),yes) install-bin := rpcgen rpcgen-objs = rpc_main.o rpc_hout.o rpc_cout.o rpc_parse.o \ rpc_scan.o rpc_util.o rpc_svcout.o rpc_clntout.o \ rpc_tblout.o rpc_sample.o extra-objs = $(rpcgen-objs) $(addprefix cross-,$(rpcgen-objs)) others += rpcgen +endif tests = tst-xdrmem tst-xdrmem2 test-rpcent xtests := tst-getmyaddr @@ -105,12 +106,14 @@ rpcgen-tests := $(objpfx)bug20790.out tests-special += $(rpcgen-tests) endif +ifeq ($(link-obsolete-rpc),yes) headers += $(rpcsvc:%.x=rpcsvc/%.h) extra-libs := librpcsvc extra-libs-others := librpcsvc # Make it in `others' pass, not `lib' pass. librpcsvc-routines = $(rpcsvc:%.x=x%) librpcsvc-inhibit-o = .os # Build no shared rpcsvc library. omit-deps = $(librpcsvc-routines) +endif ifeq (yes,$(build-shared)) rpc-compat-routines = $(addprefix compat-,$(need-export-routines)) -- 1.8.5.6