From patchwork Sun Feb 8 10:13:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allan McRae X-Patchwork-Id: 4968 Received: (qmail 31560 invoked by alias); 8 Feb 2015 10:13:44 -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 31519 invoked by uid 89); 8 Feb 2015 10:13:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: nymeria.archlinux.org From: Allan McRae To: libc-alpha@sourceware.org Subject: [PATCH 1/2] Install config files Date: Sun, 8 Feb 2015 20:13:22 +1000 Message-Id: <1423390403-29943-1-git-send-email-allan@archlinux.org> From: Mike Frysinger 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 * 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