Disable rest of sunrpc, too [V2]
Commit Message
Hi,
if the sunrpc code is disabled, we still build and install header
files, rpcgen or librpcsvc.a by default. That's bad because it
prevents from installing a full replacement of glibc SunRPC code
in the same place, an alternate directory has to be used, which
means a lot of code has to be adjusted.
Comments?
Thorsten
Comments
On Thu, Feb 23, 2017 at 9:42 AM, Thorsten Kukuk <kukuk@suse.de> wrote:
>
> if the sunrpc code is disabled, we still build and install header
> files, rpcgen or librpcsvc.a by default. That's bad because it
> prevents from installing a full replacement of glibc SunRPC code
> in the same place, an alternate directory has to be used, which
> means a lot of code has to be adjusted.
I endorse this in principle.
Could you please post a diff of the contents of the installation tree
before and after this patch? That is, build glibc [without
--enable-obsolete-rpc] before the patch, install it in a scratch
directory, run `find $DESTDIR | LC_ALL=C sort > /tmp/before-tree.txt`,
apply the patch, rebuild, reinstall, `find $DESTDIR | LC_ALL=C sort >
/tmp/after-tree.txt`, and post diff -u of before-tree.txt /
after-tree.txt. That will make it easier for people not already
familiar with what the sunrpc code installs to understand what the
patch does.
Your NEWS entry appears to be backward, and it doesn't mention the headers.
> +* rpcgen and librpcsvc.a will now only be build if
> + obsolete-rpc configuration is disabled. Alternative
> + sources can be found at https://github.com/thkukuk/rpcsvc-proto.
I think you meant "rpcgen, librpcsvc, and certain Sun RPC-related
headers will now only be built and installed when glibc is configured
with --enable-obsolete-rpc."
I also anticipate RMS yelling at us for linking to Github - would it
be possible for you to mirror your code onto savannah.gnu.org or
sourceware.org?
zw
On Thu, Feb 23, Zack Weinberg wrote:
> Could you please post a diff of the contents of the installation tree
> before and after this patch?
-/usr/bin/rpcgen
-/usr/include/rpcsvc
-/usr/include/rpcsvc/bootparam_prot.h
-/usr/include/rpcsvc/key_prot.h
-/usr/include/rpcsvc/klm_prot.h
-/usr/include/rpcsvc/mount.h
-/usr/include/rpcsvc/nfs_prot.h
-/usr/include/rpcsvc/nlm_prot.h
-/usr/include/rpcsvc/rex.h
-/usr/include/rpcsvc/rquota.h
-/usr/include/rpcsvc/rstat.h
-/usr/include/rpcsvc/rusers.h
-/usr/include/rpcsvc/sm_inter.h
-/usr/include/rpcsvc/spray.h
-/usr/include/rpcsvc/yppasswd.h
-/usr/lib64/librpcsvc.a
There are two files left:
/etc/rpc
=> Don't know what to do with that, there is no other replacement
/usr/include/rpc/netdb.h:
=> /usr/include/netdb.h includes this file ...
Thorsten
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 <kukuk@thkukuk.de>
---
NEWS | 4 ++++
sunrpc/Makefile | 15 +++++++++------
2 files changed, 13 insertions(+), 6 deletions(-)
@@ -9,6 +9,10 @@ Version 2.26
[Add important changes here]
+* rpcgen and librpcsvc.a will now only be build if
+ obsolete-rpc configuration is disabled. Alternative
+ sources can be found at https://github.com/thkukuk/rpcsvc-proto.
+
Security related changes:
[Add security related changes here]
@@ -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