Message ID | 1423390403-29943-1-git-send-email-allan@archlinux.org |
---|---|
State | New |
Headers | show |
On 02/08/2015 05:13 AM, Allan McRae wrote: > 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. > --- > nscd/Makefile | 4 ++++ > posix/Makefile | 4 ++++ > 2 files changed, 8 insertions(+) > > Previous discussion at [1]. My (biased) summary was that most people > agreed this was good, although there was a concern raised about > over-writing system configuration files. I can adjust this patch to > install the files only if they are not already present on the system > if that is the more acceptable approach. This makes 100% sense to me. My opinion is that `make install DESTDIR=/tmp/foo/` should give you everything you need in `/tmp/foo` in all the right places for you to build a rootfs from this. If your distribution deviates from the default installation options for glibc, then you will break your system if you use `make install` (no DESTDIR) and you must be aware of this if you are a glibc developer. LGTM. > [1] https://sourceware.org/ml/libc-alpha/2014-02/msg00253.html > > > 2011-09-19 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. > > > diff --git a/nscd/Makefile b/nscd/Makefile > index ede941d..184c921 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 > @@ -104,3 +105,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 15e8818..beba7e2 100644 > --- a/posix/Makefile > +++ b/posix/Makefile > @@ -98,6 +98,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 $(objpfx)posix-conf-vars-def.h > > @@ -316,6 +317,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 >
diff --git a/nscd/Makefile b/nscd/Makefile index ede941d..184c921 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 @@ -104,3 +105,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 15e8818..beba7e2 100644 --- a/posix/Makefile +++ b/posix/Makefile @@ -98,6 +98,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 $(objpfx)posix-conf-vars-def.h @@ -316,6 +317,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
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. --- nscd/Makefile | 4 ++++ posix/Makefile | 4 ++++ 2 files changed, 8 insertions(+) Previous discussion at [1]. My (biased) summary was that most people agreed this was good, although there was a concern raised about over-writing system configuration files. I can adjust this patch to install the files only if they are not already present on the system if that is the more acceptable approach. [1] https://sourceware.org/ml/libc-alpha/2014-02/msg00253.html 2011-09-19 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.