From patchwork Sun Feb 8 10:13:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allan McRae X-Patchwork-Id: 437687 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 9E0DC14011D for ; Sun, 8 Feb 2015 21:15:44 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=Agwl5f3PzqgXcO8LZIOOjcC7JuHx2P6 E/NJQQIQLvxDItii8GXYkTCLzTcrsiyZOW3EpUfgHJnBsSPV/f0I5V8TWLLCwbyZ Jensh0HBFth5RgtXheY8pyW7S7w6y/vUn8CCSy8G4gZ7Uu3sW9ObBscHuD83L3x1 Nm6MMicmNg7Y= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:in-reply-to :references; s=default; bh=M1votwZ7vyI+Y/o1/CVMBHKXWss=; b=xTu5V mNEl3s7Asng3iyBXVX5Tnz6J+BfQr6LQ4ntY9NXo0ImYIOKKjpOyx4nq4funG8wn oH5IrJ/w/RYVgtcHf1PAeqQvLGxkbrcBKPkUOFy0gqk532yoySnNo/d3IJE/dXER FNz0QAIpduXrB1jxBqzOsk00zfVq0LfvWBFgYI= Received: (qmail 31932 invoked by alias); 8 Feb 2015 10:13:58 -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 31844 invoked by uid 89); 8 Feb 2015 10:13:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.3 required=5.0 tests=AWL, BAYES_00, SPF_PASS, T_RP_MATCHES_RCVD, URIBL_BLACK autolearn=no version=3.3.2 X-HELO: nymeria.archlinux.org From: Allan McRae To: libc-alpha@sourceware.org Subject: [PATCH 2/2] Install nscd systemd files Date: Sun, 8 Feb 2015 20:13:23 +1000 Message-Id: <1423390403-29943-2-git-send-email-allan@archlinux.org> In-Reply-To: <1423390403-29943-1-git-send-email-allan@archlinux.org> References: <1423390403-29943-1-git-send-email-allan@archlinux.org> Install nscd systemd services file and tmpfile when glibc is configured with --with-systemdsystemunitdir= --- Makeconfig | 2 ++ config.make.in | 1 + configure.ac | 7 +++++++ nscd/Makefile | 12 ++++++++++++ 5 files changed, 36 insertions(+) Note that this does not suffer the same "controversy" as the previous patch as any modifications to theses files should be done in /etc. 2015-02-08 Allan McRae * configure.ac: Add --with-systemdsystemunitdir configure option * configure: Regenerated * config.make.in: (systemd-system-unit-dir) New variable * Makeconfig: (inst_systemdsystemunitdir) New variable * nscd/Makefile: (install-others): Add systemd files if requested ($(inst_systemdsystemunitdir)/nscd.service): New rule ($(inst_libdir)/tmpfiles.d/nscd.conf): New rule diff --git a/Makeconfig b/Makeconfig index 751e9ff..d9faa49 100644 --- a/Makeconfig +++ b/Makeconfig @@ -306,6 +306,8 @@ ifndef sysincludedir sysincludedir = /usr/include endif +# Directory to install systemd service files +inst_systemdsystemunitdir = $(install_root)$(systemd-system-unit-dir) # Commands to install files. ifndef INSTALL_DATA diff --git a/config.make.in b/config.make.in index ad4dd30..c73af0b 100644 --- a/config.make.in +++ b/config.make.in @@ -94,6 +94,7 @@ use-nscd = @use_nscd@ build-hardcoded-path-in-tests= @hardcoded_path_in_tests@ build-pt-chown = @build_pt_chown@ enable-lock-elision = @enable_lock_elision@ +systemd-system-unit-dir = @systemdsystemunitdir@ # Build tools. CC = @CC@ diff --git a/configure.ac b/configure.ac index d89aaf0..464ffcd 100644 --- a/configure.ac +++ b/configure.ac @@ -127,6 +127,13 @@ AC_ARG_WITH([headers], [sysheaders='']) AC_SUBST(sysheaders) +AC_ARG_WITH([systemdsystemunitdir], + AS_HELP_STRING([--with-systemdsystemunitdir=DIR], + [directory for systemd service files]), + [systemdsystemunitdir=$withval], + [systemdsystemunitdir='']) +AC_SUBST(systemdsystemunitdir) + AC_SUBST(use_default_link) AC_ARG_WITH([default-link], AC_HELP_STRING([--with-default-link], diff --git a/nscd/Makefile b/nscd/Makefile index 184c921..1d65c00 100644 --- a/nscd/Makefile +++ b/nscd/Makefile @@ -27,6 +27,10 @@ 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 +ifneq ($(systemd-system-unit-dir),) +install-others += $(inst_systemdsystemunitdir)/nscd.service +install-others += $(inst_libdir)/tmpfiles.d/nscd.conf +endif endif # To find xmalloc.c @@ -108,3 +112,11 @@ endif $(inst_sysconfdir)/nscd.conf: nscd.conf $(+force) $(do-install) + +ifneq ($(systemd-system-unit-dir),) +$(inst_systemdsystemunitdir)/nscd.service: nscd.service $(+force) + $(do-install) + +$(inst_libdir)/tmpfiles.d/nscd.conf: nscd.tmpfiles $(+force) + $(do-install) +endif