Received: by mail.netbsd.org (Postfix, from userid 605) id 2C47284DE0; Wed, 12 Dec 2018 02:08:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 25C4B84DDC for ; Wed, 12 Dec 2018 02:08:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id XuYVdCz2D20u for ; Wed, 12 Dec 2018 02:08:11 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id 1C43A84DD5 for ; Wed, 12 Dec 2018 02:08:11 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 117A1FB16; Wed, 12 Dec 2018 02:08:11 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1544580491265480" MIME-Version: 1.0 Date: Wed, 12 Dec 2018 02:08:11 +0000 From: "Amitai Schleier" Subject: CVS commit: pkgsrc/pkgtools/rc.d-boot To: pkgsrc-changes@NetBSD.org Reply-To: schmonz@netbsd.org X-Mailer: log_accum Message-Id: <20181212020811.117A1FB16@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: pkgsrc-changes.NetBSD.org Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1544580491265480 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: schmonz Date: Wed Dec 12 02:08:10 UTC 2018 Modified Files: pkgsrc/pkgtools/rc.d-boot: INSTALL Makefile PLIST Added Files: pkgsrc/pkgtools/rc.d-boot: DEINSTALL pkgsrc/pkgtools/rc.d-boot/files: pkgsrc-rc.d-boot.service Log Message: Support Linux with systemd. Set LICENSE (2-clause-bsd). Bump version. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 pkgsrc/pkgtools/rc.d-boot/DEINSTALL cvs rdiff -u -r1.2 -r1.3 pkgsrc/pkgtools/rc.d-boot/INSTALL \ pkgsrc/pkgtools/rc.d-boot/Makefile cvs rdiff -u -r1.1 -r1.2 pkgsrc/pkgtools/rc.d-boot/PLIST cvs rdiff -u -r0 -r1.1 \ pkgsrc/pkgtools/rc.d-boot/files/pkgsrc-rc.d-boot.service Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_1544580491265480 Content-Disposition: inline Content-Length: 4996 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/pkgtools/rc.d-boot/INSTALL diff -u pkgsrc/pkgtools/rc.d-boot/INSTALL:1.2 pkgsrc/pkgtools/rc.d-boot/INSTALL:1.3 --- pkgsrc/pkgtools/rc.d-boot/INSTALL:1.2 Wed Dec 5 19:49:26 2018 +++ pkgsrc/pkgtools/rc.d-boot/INSTALL Wed Dec 12 02:08:10 2018 @@ -1,15 +1,18 @@ -# $NetBSD: INSTALL,v 1.2 2018/12/05 19:49:26 schmonz Exp $ +# $NetBSD: INSTALL,v 1.3 2018/12/12 02:08:10 schmonz Exp $ -OPSYS=@OPSYS@ +RCDBOOT_STYLE=@RCDBOOT_STYLE@ -case ${STAGE} in +case "${STAGE}" in POST-INSTALL) - case "${OPSYS}" in - Darwin) + case "${RCDBOOT_STYLE}" in + darwin-launchd) launchctl load -w /Library/LaunchDaemons/org.pkgsrc.rc.d-boot.plist ;; - NetBSD) + linux-systemd) + systemctl enable --now /etc/systemd/system/pkgsrc-rc.d-boot.service + ;; + netbsd-native) ;; esac Index: pkgsrc/pkgtools/rc.d-boot/Makefile diff -u pkgsrc/pkgtools/rc.d-boot/Makefile:1.2 pkgsrc/pkgtools/rc.d-boot/Makefile:1.3 --- pkgsrc/pkgtools/rc.d-boot/Makefile:1.2 Wed Dec 5 19:49:26 2018 +++ pkgsrc/pkgtools/rc.d-boot/Makefile Wed Dec 12 02:08:10 2018 @@ -1,13 +1,14 @@ -# $NetBSD: Makefile,v 1.2 2018/12/05 19:49:26 schmonz Exp $ +# $NetBSD: Makefile,v 1.3 2018/12/12 02:08:10 schmonz Exp $ # -PKGNAME= rc.d-boot-20181205 +PKGNAME= rc.d-boot-20181211 CATEGORIES= pkgtools MAINTAINER= schmonz@NetBSD.org COMMENT= Run package rc.d scripts at boot on any supported OS +LICENSE= 2-clause-bsd -ONLY_FOR_PLATFORM= Darwin-*-* NetBSD-*-* +ONLY_FOR_PLATFORM= # empty by default .include "../../mk/bsd.prefs.mk" @@ -24,14 +25,26 @@ NO_BUILD= yes SUBST_CLASSES= paths SUBST_STAGE.paths= pre-configure -SUBST_FILES.paths= rc.d-boot org.pkgsrc.rc.d-boot.plist +SUBST_FILES.paths= rc.d-boot +SUBST_FILES.paths+= org.pkgsrc.rc.d-boot.plist \ + pkgsrc-rc.d-boot.service SUBST_VARS.paths= PREFIX RCD_SCRIPTS_DIR RCORDER -FILES_SUBST+= OPSYS=${OPSYS:Q} +FILES_SUBST+= RCDBOOT_STYLE=${RCDBOOT_STYLE:Q} -.if ${OPSYS} == "Darwin" +.if ${OPSYS} == "Darwin" && exists (/Library/LaunchDaemons) +ONLY_FOR_PLATFORM+= Darwin-*-* +RCDBOOT_STYLE= darwin-launchd CONF_FILES+= ${PREFIX}/share/examples/${PKGBASE}/org.pkgsrc.rc.d-boot.plist \ /Library/LaunchDaemons/org.pkgsrc.rc.d-boot.plist +.elif ${OPSYS} == "Linux" && exists(/etc/systemd/system) +ONLY_FOR_PLATFORM+= Linux-*-* +RCDBOOT_STYLE= linux-systemd +CONF_FILES+= ${PREFIX}/share/examples/${PKGBASE}/pkgsrc-rc.d-boot.service \ + /etc/systemd/system/pkgsrc-rc.d-boot.service +.elif ${OPSYS} == "NetBSD" && exists(/etc/rc.d) +ONLY_FOR_PLATFORM+= NetBSD-*-* +RCDBOOT_STYLE= netbsd-native .endif INSTALLATION_DIRS= sbin share/examples/${PKGBASE} @@ -40,7 +53,10 @@ do-extract: ${CP} -R ${FILESDIR} ${WRKSRC} do-install: - ${INSTALL_DATA} ${WRKSRC}/org.pkgsrc.rc.d-boot.plist ${DESTDIR}${PREFIX}/share/examples/${PKGBASE}/ +. for i in org.pkgsrc.rc.d-boot.plist \ + pkgsrc-rc.d-boot.service + ${INSTALL_DATA} ${WRKSRC}/${i} ${DESTDIR}${PREFIX}/share/examples/${PKGBASE}/ +. endfor ${INSTALL_SCRIPT} ${WRKSRC}/rc.d-boot ${DESTDIR}${PREFIX}/sbin/ .include "../../mk/bsd.pkg.mk" Index: pkgsrc/pkgtools/rc.d-boot/PLIST diff -u pkgsrc/pkgtools/rc.d-boot/PLIST:1.1 pkgsrc/pkgtools/rc.d-boot/PLIST:1.2 --- pkgsrc/pkgtools/rc.d-boot/PLIST:1.1 Wed Dec 5 19:23:04 2018 +++ pkgsrc/pkgtools/rc.d-boot/PLIST Wed Dec 12 02:08:10 2018 @@ -1,3 +1,4 @@ -@comment $NetBSD: PLIST,v 1.1 2018/12/05 19:23:04 schmonz Exp $ +@comment $NetBSD: PLIST,v 1.2 2018/12/12 02:08:10 schmonz Exp $ sbin/rc.d-boot share/examples/rc.d-boot/org.pkgsrc.rc.d-boot.plist +share/examples/rc.d-boot/pkgsrc-rc.d-boot.service Added files: Index: pkgsrc/pkgtools/rc.d-boot/DEINSTALL diff -u /dev/null pkgsrc/pkgtools/rc.d-boot/DEINSTALL:1.1 --- /dev/null Wed Dec 12 02:08:10 2018 +++ pkgsrc/pkgtools/rc.d-boot/DEINSTALL Wed Dec 12 02:08:10 2018 @@ -0,0 +1,29 @@ +# $NetBSD: DEINSTALL,v 1.1 2018/12/12 02:08:10 schmonz Exp $ + +RCDBOOT_STYLE=@RCDBOOT_STYLE@ + +case "${STAGE}" in + +DEINSTALL) + case "${RCDBOOT_STYLE}" in + darwin-launchd) + ;; + linux-systemd) + systemctl disable pkgsrc-rc.d-boot.service + ;; + netbsd-native) + ;; + esac + + ${CAT} <