This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Install config files


From: Mike Frysinger <vapier@gentoo.org>

glibc comes with a bunch of config files that every distro hand installs
because glibc itself doesn't take care of it.  Update glibc to do the work.

---

I decided this would be useful and found a patch Mike made back in 2011:
https://sourceware.org/ml/libc-alpha/2011-09/msg00098.html

>From that thread, I concluded that installing nscd.conf and gai.conf was
considered reasonable, because most distributions install then as defaults
anyway and all (most?) packaging systems can replace them with a version
the distro wants or remove them anyway.

The consensus was not to install nssswitch.conf, so that was removed from
this patch.

2014-xx-xx  Mike Frysinger  <vapier@gentoo.org>

	* nscd/Makefile (install-others): Define.
	($(inst_sysconfdir)/nscd.conf): New rule.
	* posix/Makefile (install-others): Define.
	($(inst_sysconfdir)/gai.conf): New rule.


 nscd/Makefile  | 4 ++++
 posix/Makefile | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/nscd/Makefile b/nscd/Makefile
index 639d87b..540e6d8 100644
--- a/nscd/Makefile
+++ b/nscd/Makefile
@@ -26,6 +26,7 @@ ifneq ($(use-nscd),no)
 routines := nscd_getpw_r nscd_getgr_r nscd_gethst_r nscd_getai \
 	    nscd_initgroups nscd_getserv_r nscd_netgroup
 aux	:= nscd_helper
+install-others = $(inst_sysconfdir)/nscd.conf
 endif
 
 # To find xmalloc.c
@@ -105,3 +106,6 @@ $(objpfx)nscd: $(shared-thread-library) $(common-objpfx)nis/libnsl.so
 else
 $(objpfx)nscd: $(static-thread-library) $(common-objpfx)nis/libnsl.a
 endif
+
+$(inst_sysconfdir)/nscd.conf: nscd.conf $(+force)
+	$(do-install)
diff --git a/posix/Makefile b/posix/Makefile
index 6709900..b33cf39 100644
--- a/posix/Makefile
+++ b/posix/Makefile
@@ -97,6 +97,7 @@ tests		+= $(tests-static)
 others		:= getconf
 install-bin	:= getconf
 install-others-programs	:= $(inst_libexecdir)/getconf
+install-others = $(inst_sysconfdir)/gai.conf
 
 before-compile	:= testcases.h ptestcases.h
 
@@ -304,6 +305,9 @@ $(inst_libexecdir)/getconf: $(inst_bindir)/getconf \
 	  mv -f $@/$$spec.new $@/$$spec; \
 	done < $(objpfx)getconf.speclist
 
+$(inst_sysconfdir)/gai.conf: gai.conf $(+force)
+	$(do-install)
+
 $(objpfx)getconf.speclist: getconf-speclist.c posix-envs.def
 	$(compile.c) -E -o - \
 	    | sed -n -e '/@@@PRESENT_/s/@@@PRESENT_//p' > $@.new
-- 
1.8.5.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]