Update to 1.15. From the changelog: * Recommend cron-daemon, rather than cron, as etckeeper only needs cron.daily functionality. Closes: #762721 * Handle failure to commit in post-install, pre-install by showing a warning, rather than propigating the error to apt. This avoids breaking the apt run when eg, git is misconfigured and cannot commit. pre-install already did this when it was able to use debconf to display a message, but now debconf is not used, and it always behaves this way. Closes: #760011 * Ignore check-mk-agent-logwatch's FHS violating /etc/check_mk/logwatch.state. Closes: #753903 * Only allow [-a-z_] in etckeeper commands to avoid any possible directory traversal etc issues. * update-ignore, uninit: Fix parsing of ignore files containing '\' * Portability fixes. Thanks, Harald Dunkel. * Add support for pushing to multiple remote repositories. Thanks, Rouben. * Fix handling of git ignores like dir/* Thanks, Pim van den Berg * Fix too broad matching of .gitignored files. Closes: #732339 * Remove lvm/backup from default ignores, because lvm documentation recommends backing that up, for use by vgcfgrestore. * Fix exporting of some git variables. Closes: #728583 * Fix git update-ignore syntax. Closes: #721873 * Avoid listing .gitignored files in .etckeeper file. Closes: #607665 Thanks, Zdenek Crha * Fix hilarious typo hardcoding my name. Closes: #718425 * Guard git config calls. Closes: #717957 * Quote user and group names, in case one contains a space. * Added support for the pacman package manager. (Thanks, Tiago St端rmer Daitx) * Use user.name and user.email from the .gitconfig file belonging to the user who sued or sudoed to root, in preference to making up values for that user. * cron.daily: Fix typo in stale lockfile handling code. Closes: #717908 * Deal with unix^wlinux portability nonsense.diff -r1.6 -r1.7 pkgsrc/sysutils/etckeeper/Makefile
(schmonz)
@@ -1,24 +1,23 @@ | @@ -1,24 +1,23 @@ | |||
1 | # $NetBSD: Makefile,v 1.6 2016/07/09 06:38:59 wiz Exp $ | 1 | # $NetBSD: Makefile,v 1.7 2017/05/18 21:19:08 schmonz Exp $ | |
2 | # | 2 | # | |
3 | 3 | |||
4 | DISTNAME= etckeeper_1.3 | 4 | DISTNAME= etckeeper_1.15 | |
5 | PKGNAME= ${DISTNAME:S/_/-/} | 5 | PKGNAME= ${DISTNAME:S/_/-/} | |
6 | PKGREVISION= 4 | |||
7 | CATEGORIES= sysutils | 6 | CATEGORIES= sysutils | |
8 | MASTER_SITES= ${MASTER_SITE_DEBIAN:=pool/main/e/etckeeper/} | 7 | MASTER_SITES= ${MASTER_SITE_DEBIAN:=pool/main/e/etckeeper/} | |
9 | 8 | |||
10 | MAINTAINER= pkgsrc-users@NetBSD.org | 9 | MAINTAINER= pkgsrc-users@NetBSD.org | |
11 | HOMEPAGE= http://joeyh.name/code/etckeeper/ | 10 | HOMEPAGE= http://etckeeper.branchable.com/ | |
12 | COMMENT= Store /etc in git, mercurial, bzr or darcs | 11 | COMMENT= Store /etc in git, mercurial, bzr or darcs | |
13 | LICENSE= gnu-gpl-v2 | 12 | LICENSE= gnu-gpl-v2 | |
14 | 13 | |||
15 | WRKSRC= ${WRKDIR}/etckeeper | 14 | WRKSRC= ${WRKDIR}/etckeeper | |
16 | USE_LANGUAGES= # none | 15 | USE_LANGUAGES= # none | |
17 | USE_TOOLS+= sed perl:run | 16 | USE_TOOLS+= sed perl:run | |
18 | 17 | |||
19 | NO_CONFIGURE= yes | 18 | NO_CONFIGURE= yes | |
20 | NO_BUILD= yes | 19 | NO_BUILD= yes | |
21 | AUTO_MKDIRS= yes | 20 | AUTO_MKDIRS= yes | |
22 | 21 | |||
23 | BUILD_DEFS+= VARBASE | 22 | BUILD_DEFS+= VARBASE | |
24 | 23 | |||
@@ -54,26 +53,26 @@ SUBST_VARS.config+= VARBASE | @@ -54,26 +53,26 @@ SUBST_VARS.config+= VARBASE | |||
54 | SUBST_VARS.config+= PREFIX | 53 | SUBST_VARS.config+= PREFIX | |
55 | 54 | |||
56 | do-install: | 55 | do-install: | |
57 | ${INSTALL_SCRIPT} ${WRKSRC}/etckeeper ${DESTDIR}${PREFIX}/bin | 56 | ${INSTALL_SCRIPT} ${WRKSRC}/etckeeper ${DESTDIR}${PREFIX}/bin | |
58 | ${INSTALL_DATA} ${WRKSRC}/etckeeper.conf ${DESTDIR}${EGDIR} | 57 | ${INSTALL_DATA} ${WRKSRC}/etckeeper.conf ${DESTDIR}${EGDIR} | |
59 | for file in ${CF_FILES}; do \ | 58 | for file in ${CF_FILES}; do \ | |
60 | ${INSTALL_DATA} ${WRKSRC}/$${file} ${DESTDIR}${EGDIR}/$${file} ;\ | 59 | ${INSTALL_DATA} ${WRKSRC}/$${file} ${DESTDIR}${EGDIR}/$${file} ;\ | |
61 | done | 60 | done | |
62 | ${RM} -f ${DESTDIR}${EGDIR}/*.d/*.orig | 61 | ${RM} -f ${DESTDIR}${EGDIR}/*.d/*.orig | |
63 | ${INSTALL_SCRIPT} ${WRKSRC}/debian/cron.daily \ | 62 | ${INSTALL_SCRIPT} ${WRKSRC}/debian/cron.daily \ | |
64 | ${DESTDIR}${PREFIX}/libexec/etckeeper.daily | 63 | ${DESTDIR}${PREFIX}/libexec/etckeeper.daily | |
65 | ${INSTALL_MAN} ${WRKSRC}/etckeeper.8 \ | 64 | ${INSTALL_MAN} ${WRKSRC}/etckeeper.8 \ | |
66 | ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8 | 65 | ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8 | |
67 | ${INSTALL_DATA} ${WRKSRC}/README \ | 66 | ${INSTALL_DATA} ${WRKSRC}/README.md \ | |
68 | ${DESTDIR}${PREFIX}/share/doc/etckeeper/README | 67 | ${DESTDIR}${PREFIX}/share/doc/etckeeper/README.md | |
69 | ${INSTALL_DATA} ${WRKSRC}/bash_completion \ | 68 | ${INSTALL_DATA} ${WRKSRC}/bash_completion \ | |
70 | ${DESTDIR}${PREFIX}/share/bash-completion.d/etckeeper | 69 | ${DESTDIR}${PREFIX}/share/bash-completion.d/etckeeper | |
71 | 70 | |||
72 | .PHONY:gen-cf-files | 71 | .PHONY:gen-cf-files | |
73 | gen-cf-files: | 72 | gen-cf-files: | |
74 | grep '[$$]NetBSD' >cf-files.mk | 73 | grep '[$$]NetBSD' >cf-files.mk | |
75 | ${ECHO} '#' >>cf-files.mk | 74 | ${ECHO} '#' >>cf-files.mk | |
76 | ${SH} -c 'cd ${WRKSRC} && ${LS} -1 *.d/*' | \ | 75 | ${SH} -c 'cd ${WRKSRC} && ${LS} -1 *.d/*' | \ | |
77 | ${SED} -e'/\.orig$$/d' -e's@^@CF_FILES+= @' >>cf-files.mk | 76 | ${SED} -e'/\.orig$$/d' -e's@^@CF_FILES+= @' >>cf-files.mk | |
78 | 77 | |||
79 | .include "../../mk/bsd.pkg.mk" | 78 | .include "../../mk/bsd.pkg.mk" |
@@ -1,18 +1,18 @@ | @@ -1,18 +1,18 @@ | |||
1 | @comment $NetBSD: PLIST,v 1.1 2013/05/27 08:36:00 sbd Exp $ | 1 | @comment $NetBSD: PLIST,v 1.2 2017/05/18 21:19:08 schmonz Exp $ | |
2 | bin/etckeeper | 2 | bin/etckeeper | |
3 | libexec/etckeeper.daily | 3 | libexec/etckeeper.daily | |
4 | share/bash-completion.d/etckeeper | 4 | share/bash-completion.d/etckeeper | |
5 | share/doc/etckeeper/README | 5 | share/doc/etckeeper/README.md | |
6 | share/examples/etckeeper/commit.d/10vcs-test | 6 | share/examples/etckeeper/commit.d/10vcs-test | |
7 | share/examples/etckeeper/commit.d/30bzr-add | 7 | share/examples/etckeeper/commit.d/30bzr-add | |
8 | share/examples/etckeeper/commit.d/30darcs-add | 8 | share/examples/etckeeper/commit.d/30darcs-add | |
9 | share/examples/etckeeper/commit.d/30git-add | 9 | share/examples/etckeeper/commit.d/30git-add | |
10 | share/examples/etckeeper/commit.d/30hg-addremove | 10 | share/examples/etckeeper/commit.d/30hg-addremove | |
11 | share/examples/etckeeper/commit.d/50vcs-commit | 11 | share/examples/etckeeper/commit.d/50vcs-commit | |
12 | share/examples/etckeeper/commit.d/99push | 12 | share/examples/etckeeper/commit.d/99push | |
13 | share/examples/etckeeper/commit.d/README | 13 | share/examples/etckeeper/commit.d/README | |
14 | share/examples/etckeeper/etckeeper.conf | 14 | share/examples/etckeeper/etckeeper.conf | |
15 | share/examples/etckeeper/init.d/10restore-metadata | 15 | share/examples/etckeeper/init.d/10restore-metadata | |
16 | share/examples/etckeeper/init.d/20restore-etckeeper | 16 | share/examples/etckeeper/init.d/20restore-etckeeper | |
17 | share/examples/etckeeper/init.d/40vcs-init | 17 | share/examples/etckeeper/init.d/40vcs-init | |
18 | share/examples/etckeeper/init.d/50vcs-ignore | 18 | share/examples/etckeeper/init.d/50vcs-ignore |
@@ -1,17 +1,17 @@ | @@ -1,17 +1,17 @@ | |||
1 | $NetBSD: distinfo,v 1.2 2015/11/04 01:32:13 agc Exp $ | 1 | $NetBSD: distinfo,v 1.3 2017/05/18 21:19:08 schmonz Exp $ | |
2 | 2 | |||
3 | SHA1 (etckeeper_1.3.tar.gz) = 8716d5cfc9fc584bf0069932383ec1ca956f4788 | 3 | SHA1 (etckeeper_1.15.tar.gz) = d0a90b25d6a9e3a78fbfbde404c71c0b847f9369 | |
4 | RMD160 (etckeeper_1.3.tar.gz) = 43404007c3d5b727ee2040477245591ab17372ca | 4 | RMD160 (etckeeper_1.15.tar.gz) = d732c9a5cf2e1d643bf3aed4edace6665bada586 | |
5 | SHA512 (etckeeper_1.3.tar.gz) = 76bdf1e3daaa94d80e0583d9375339d92d8e9f4b592ba8da9043e9c21f1371e08e13e65cc76eb40d0e1abcbcfeb64f230ef9e1c828654055a19df5103d01cc22 | 5 | SHA512 (etckeeper_1.15.tar.gz) = f2e5f584870fbec3d800bf9a53617770f2fef50d0860bab016ec6614f232948661a611147bca83ad3d304220607a878c1708a988ca580482a5db5e685cf94bd9 | |
6 | Size (etckeeper_1.3.tar.gz) = 47387 bytes | 6 | Size (etckeeper_1.15.tar.gz) = 48882 bytes | |
7 | SHA1 (patch-bash__completion) = 95936127f98a76b4b7b66ddc170ba6c1e1e4c0d9 | 7 | SHA1 (patch-bash__completion) = 95936127f98a76b4b7b66ddc170ba6c1e1e4c0d9 | |
8 | SHA1 (patch-debian_cron.daily) = 5473807c2bcab9931e6324436f1d1ff3363ee3d2 | 8 | SHA1 (patch-debian_cron.daily) = b89d63ec32cfa3ab72043f56f4f9aef2ca60fc4f | |
9 | SHA1 (patch-etckeeper) = 07a6b61b6c79096065953d22087c32ea5d776f2c | 9 | SHA1 (patch-etckeeper) = 07a6b61b6c79096065953d22087c32ea5d776f2c | |
10 | SHA1 (patch-etckeeper.8) = bb6e59169edac6ae16cebd25c05aa3c2305b3990 | 10 | SHA1 (patch-etckeeper.8) = 0d8e5ac7e6aab35d507fe5b570934a207f4171ad | |
11 | SHA1 (patch-etckeeper.conf) = c246bf082a1b7137c3f50fa43e432ea9c1587464 | 11 | SHA1 (patch-etckeeper.conf) = 46c179e875962e2f89e1c57ced3fa2235d655177 | |
12 | SHA1 (patch-init.d_40vcs-init) = d267d4e7e2b82353614ed15455c2739e1c8f92d6 | 12 | SHA1 (patch-init.d_40vcs-init) = d267d4e7e2b82353614ed15455c2739e1c8f92d6 | |
13 | SHA1 (patch-list-installed.d_50list-installed) = b0c9a500fa80c97686f229b8f936de6f1c8de7e0 | 13 | SHA1 (patch-list-installed.d_50list-installed) = b0c9a500fa80c97686f229b8f936de6f1c8de7e0 | |
14 | SHA1 (patch-post-install.d_50vcs-commit) = c79cd3c5f195cbc4808074557818f5f7d9a4e457 | 14 | SHA1 (patch-post-install.d_50vcs-commit) = b19d570b604f7cd2d7cea05965a10f6508b402bf | |
15 | SHA1 (patch-pre-install.d_10packagelist) = c2383ef03e2f360c581acb2c4c3ca09bad8cac10 | 15 | SHA1 (patch-pre-install.d_10packagelist) = c2383ef03e2f360c581acb2c4c3ca09bad8cac10 | |
16 | SHA1 (patch-pre-install.d_50uncommitted-changes) = 908a2cf5a107346a57f3fde1f1076c2ec7f92b9f | 16 | SHA1 (patch-pre-install.d_50uncommitted-changes) = be883cd2fc9272c0df6d990fb1cf32b787d23a9d | |
17 | SHA1 (patch-update-ignore.d_01update-ignore) = 3e73493f268da3d40623fcd192d3da911357acee | 17 | SHA1 (patch-update-ignore.d_01update-ignore) = 3e73493f268da3d40623fcd192d3da911357acee |
@@ -1,20 +1,20 @@ | @@ -1,20 +1,20 @@ | |||
1 | $NetBSD: patch-debian_cron.daily,v 1.1 2013/05/27 08:36:00 sbd Exp $ | 1 | $NetBSD: patch-debian_cron.daily,v 1.2 2017/05/18 21:19:08 schmonz Exp $ | |
2 | 2 | |||
3 | Add SUBST_VARS tokens. | 3 | Add SUBST_VARS tokens. | |
4 | 4 | |||
5 | --- debian/cron.daily.orig 2011-12-05 15:41:29.000000000 +0000 | 5 | --- debian/cron.daily.orig 2014-07-02 19:17:18.000000000 +0000 | |
6 | +++ debian/cron.daily | 6 | +++ debian/cron.daily | |
7 | @@ -1,10 +1,10 @@ | 7 | @@ -1,10 +1,10 @@ | |
8 | #!/bin/sh | 8 | #!/bin/sh | |
9 | set -e | 9 | set -e | |
10 | -if [ -x /usr/bin/etckeeper ] && [ -e /etc/etckeeper/etckeeper.conf ]; then | 10 | -if [ -x /usr/bin/etckeeper ] && [ -e /etc/etckeeper/etckeeper.conf ]; then | |
11 | - . /etc/etckeeper/etckeeper.conf | 11 | - . /etc/etckeeper/etckeeper.conf | |
12 | +if [ -x @PREFIX@/bin/etckeeper ] && [ -e @PKG_SYSCONFDIR@/etckeeper.conf ]; then | 12 | +if [ -x @PREFIX@/bin/etckeeper ] && [ -e @PKG_SYSCONFDIR@/etckeeper.conf ]; then | |
13 | + . @PKG_SYSCONFDIR@/etckeeper.conf | 13 | + . @PKG_SYSCONFDIR@/etckeeper.conf | |
14 | if [ "$AVOID_DAILY_AUTOCOMMITS" != "1" ]; then | 14 | if [ "$AVOID_DAILY_AUTOCOMMITS" != "1" ]; then | |
15 | # avoid autocommit if an install run is in progress | 15 | # avoid autocommit if an install run is in progress | |
16 | - lockfile=/var/cache/etckeeper/packagelist.pre-install | 16 | - lockfile=/var/cache/etckeeper/packagelist.pre-install | |
17 | + lockfile=@VARBASE@/cache/etckeeper/packagelist.pre-install | 17 | + lockfile=@VARBASE@/cache/etckeeper/packagelist.pre-install | |
18 | if [ -e "$pe" ] && [ -n "$(find "$lockfile" -mtime +1)" ]; then | 18 | if [ -e "$lockfile" ] && [ -n "$(find "$lockfile" -mtime +1)" ]; then | |
19 | rm -f "$lockfile" # stale | 19 | rm -f "$lockfile" # stale | |
20 | fi | 20 | fi |
@@ -1,18 +1,18 @@ | @@ -1,18 +1,18 @@ | |||
1 | $NetBSD: patch-etckeeper.8,v 1.1 2013/05/27 08:36:00 sbd Exp $ | 1 | $NetBSD: patch-etckeeper.8,v 1.2 2017/05/18 21:19:08 schmonz Exp $ | |
2 | 2 | |||
3 | Add SUBST_VARS tokens. | 3 | Add SUBST_VARS tokens. | |
4 | 4 | |||
5 | --- etckeeper.8.orig 2012-06-02 22:14:44.000000000 +0000 | 5 | --- etckeeper.8.orig 2014-09-04 19:32:34.000000000 +0000 | |
6 | +++ etckeeper.8 | 6 | +++ etckeeper.8 | |
7 | @@ -5,21 +5,21 @@ etckeeper \- store /etc in git, mercuria | 7 | @@ -5,21 +5,21 @@ etckeeper \- store /etc in git, mercuria | |
8 | .SH SYNOPSIS | 8 | .SH SYNOPSIS | |
9 | .B etckeeper command [-d directory] | 9 | .B etckeeper command [-d directory] | |
10 | .SH DESCRIPTION | 10 | .SH DESCRIPTION | |
11 | -etckeeper manages /etc be stored in a git, mercurial, bazaar, or darcs | 11 | -etckeeper manages /etc be stored in a git, mercurial, bazaar, or darcs | |
12 | -repository. By default each of the commands operates on /etc, but a | 12 | -repository. By default each of the commands operates on /etc, but a | |
13 | -different directory can be specified to operate on a clone of the /etc | 13 | -different directory can be specified to operate on a clone of the /etc | |
14 | +etckeeper manages @PKG_SYSCONFBASEDIR@ be stored in a git, mercurial, bazaar, or darcs | 14 | +etckeeper manages @PKG_SYSCONFBASEDIR@ be stored in a git, mercurial, bazaar, or darcs | |
15 | +repository. By default each of the commands operates on @PKG_SYSCONFBASEDIR@, but a | 15 | +repository. By default each of the commands operates on @PKG_SYSCONFBASEDIR@, but a | |
16 | +different directory can be specified to operate on a clone of the @PKG_SYSCONFBASEDIR@ | 16 | +different directory can be specified to operate on a clone of the @PKG_SYSCONFBASEDIR@ | |
17 | repository located elsewhere. | 17 | repository located elsewhere. | |
18 | .SH COMMANDS | 18 | .SH COMMANDS | |
@@ -30,22 +30,23 @@ Add SUBST_VARS tokens. | @@ -30,22 +30,23 @@ Add SUBST_VARS tokens. | |||
30 | -Commits all changes in /etc to the repository. A commit message can be | 30 | -Commits all changes in /etc to the repository. A commit message can be | |
31 | +Commits all changes in @PKG_SYSCONFBASEDIR@ to the repository. A commit message can be | 31 | +Commits all changes in @PKG_SYSCONFBASEDIR@ to the repository. A commit message can be | |
32 | specified. You may also use the underlying VCS to commit manually. | 32 | specified. You may also use the underlying VCS to commit manually. | |
33 | (Note that etckeeper commit will notice if a user has used sudo or su to | 33 | (Note that etckeeper commit will notice if a user has used sudo or su to | |
34 | become root, and record the original username in the commit.) | 34 | become root, and record the original username in the commit.) | |
35 | @@ -60,13 +60,13 @@ uninit, then modify etckeeper.conf to us | 35 | @@ -60,13 +60,13 @@ uninit, then modify etckeeper.conf to us | |
36 | etckeeper init. (The -f switch can be used to force uninit without | 36 | etckeeper init. (The -f switch can be used to force uninit without | |
37 | prompting.) | 37 | prompting.) | |
38 | .SH FILES | 38 | .SH FILES | |
39 | -/etc/etckeeper/etckeeper.conf is the configuration file. | 39 | -/etc/etckeeper/etckeeper.conf is the configuration file. | |
40 | +@PKG_SYSCONFDIR@/etckeeper.conf is the configuration file. | 40 | +@PKG_SYSCONFDIR@/etckeeper.conf is the configuration file. | |
41 | 41 | |||
42 | -/etc/etckeeper also contains directories containing the programs that are | 42 | -/etc/etckeeper also contains directories containing the programs that are | |
43 | +PKG_SYSCONFDIR also contains directories containing the programs that are | 43 | +@PKG_SYSCONFDIR@ also contains directories containing the programs that are | |
44 | run for each of the above commands. | 44 | run for each of the above commands. | |
45 | .SH ENVIRONMENT VARIABLES | 45 | .SH ENVIRONMENT VARIABLES | |
46 | ETCKEEPER_CONF_DIR path to configuration directory instead of default /etc/etckeeper. | 46 | -ETCKEEPER_CONF_DIR path to configuration directory instead of default /etc/etckeeper. | |
47 | +ETCKEEPER_CONF_DIR path to configuration directory instead of default @PKG_SYSCONFDIR@. | |||
47 | .SH SEE ALSO | 48 | .SH SEE ALSO | |
48 | -/usr/share/doc/etckeeper/README.gz | 49 | -/usr/share/doc/etckeeper/README.md.gz | |
49 | +@PREFIX@/share/doc/etckeeper/README | 50 | +@PREFIX@/share/doc/etckeeper/README.md | |
50 | .SH AUTHOR | 51 | .SH AUTHOR | |
51 | Joey Hess <joey@kitenet.net> | 52 | Joey Hess <joey@kitenet.net> |
@@ -1,20 +1,20 @@ | @@ -1,20 +1,20 @@ | |||
1 | $NetBSD: patch-etckeeper.conf,v 1.1 2013/05/27 08:36:00 sbd Exp $ | 1 | $NetBSD: patch-etckeeper.conf,v 1.2 2017/05/18 21:19:08 schmonz Exp $ | |
2 | 2 | |||
3 | Make pkg_install the package manager. | 3 | Make pkg_install the package manager. | |
4 | 4 | |||
5 | --- etckeeper.conf.orig 2012-11-19 16:07:40.000000000 +0000 | 5 | --- etckeeper.conf.orig 2014-07-02 19:17:18.000000000 +0000 | |
6 | +++ etckeeper.conf | 6 | +++ etckeeper.conf | |
7 | @@ -31,11 +31,11 @@ DARCS_COMMIT_OPTIONS="-a" | 7 | @@ -31,11 +31,11 @@ DARCS_COMMIT_OPTIONS="-a" | |
8 | 8 | |||
9 | # The high-level package manager that's being used. | 9 | # The high-level package manager that's being used. | |
10 | # (apt, pacman-g2, yum, zypper etc) | 10 | # (apt, pacman-g2, yum, zypper etc) | |
11 | -HIGHLEVEL_PACKAGE_MANAGER=apt | 11 | -HIGHLEVEL_PACKAGE_MANAGER=apt | |
12 | +HIGHLEVEL_PACKAGE_MANAGER=pkg_add | 12 | +HIGHLEVEL_PACKAGE_MANAGER=pkg_add | |
13 | 13 | |||
14 | # The low-level package manager that's being used. | 14 | # The low-level package manager that's being used. | |
15 | # (dpkg, rpm, pacman-g2, etc) | 15 | # (dpkg, rpm, pacman, pacman-g2, etc) | |
16 | -LOWLEVEL_PACKAGE_MANAGER=dpkg | 16 | -LOWLEVEL_PACKAGE_MANAGER=dpkg | |
17 | +LOWLEVEL_PACKAGE_MANAGER=pkg_install | 17 | +LOWLEVEL_PACKAGE_MANAGER=pkg_install | |
18 | 18 | |||
19 | # To push each commit to a remote, put the name of the remote here. | 19 | # To push each commit to a remote, put the name of the remote here. | |
20 | # (eg, "origin" for git). | 20 | # (eg, "origin" for git). Space-separated lists of multiple remotes |
@@ -1,19 +1,19 @@ | @@ -1,19 +1,19 @@ | |||
1 | $NetBSD: patch-post-install.d_50vcs-commit,v 1.1 2013/05/27 08:36:00 sbd Exp $ | 1 | $NetBSD: patch-post-install.d_50vcs-commit,v 1.2 2017/05/18 21:19:08 schmonz Exp $ | |
2 | 2 | |||
3 | Add SUBST_VARS token. | 3 | Add SUBST_VARS token. | |
4 | 4 | |||
5 | --- post-install.d/50vcs-commit.orig 2011-02-22 20:19:36.000000000 +0000 | 5 | --- post-install.d/50vcs-commit.orig 2014-09-04 19:44:52.000000000 +0000 | |
6 | +++ post-install.d/50vcs-commit | 6 | +++ post-install.d/50vcs-commit | |
7 | @@ -1,10 +1,10 @@ | 7 | @@ -1,10 +1,10 @@ | |
8 | #!/bin/sh | 8 | #!/bin/sh | |
9 | set -e | 9 | set -e | |
10 | 10 | |||
11 | -pl="/var/cache/etckeeper/packagelist" | 11 | -pl="/var/cache/etckeeper/packagelist" | |
12 | +pl="@VARBASE@/cache/etckeeper/packagelist" | 12 | +pl="@VARBASE@/cache/etckeeper/packagelist" | |
13 | 13 | |||
14 | if etckeeper unclean; then | 14 | if etckeeper unclean; then | |
15 | - message="committing changes in /etc after $HIGHLEVEL_PACKAGE_MANAGER run" | 15 | - message="committing changes in /etc after $HIGHLEVEL_PACKAGE_MANAGER run" | |
16 | + message="committing changes in ${ETCKEEPER_DIR} after $HIGHLEVEL_PACKAGE_MANAGER run" | 16 | + message="committing changes in ${ETCKEEPER_DIR} after $HIGHLEVEL_PACKAGE_MANAGER run" | |
17 | 17 | |||
18 | set +e | |||
18 | if [ -e $pl.pre-install ]; then | 19 | if [ -e $pl.pre-install ]; then | |
19 | ( |
@@ -1,26 +1,22 @@ | @@ -1,26 +1,22 @@ | |||
1 | $NetBSD: patch-pre-install.d_50uncommitted-changes,v 1.1 2013/05/27 08:36:00 sbd Exp $ | 1 | $NetBSD: patch-pre-install.d_50uncommitted-changes,v 1.2 2017/05/18 21:19:08 schmonz Exp $ | |
2 | 2 | |||
3 | Change '/etc' to ${ETCKEEPER_DIR}. | 3 | Change '/etc' to ${ETCKEEPER_DIR}. | |
4 | 4 | |||
5 | --- pre-install.d/50uncommitted-changes.orig 2011-02-22 20:19:36.000000000 +0000 | 5 | --- pre-install.d/50uncommitted-changes.orig 2014-09-04 19:44:32.000000000 +0000 | |
6 | +++ pre-install.d/50uncommitted-changes | 6 | +++ pre-install.d/50uncommitted-changes | |
7 | @@ -13,16 +13,16 @@ fi | 7 | @@ -4,12 +4,12 @@ set -e | |
8 | if etckeeper unclean; then | 8 | if etckeeper unclean; then | |
9 | if [ "$AVOID_COMMIT_BEFORE_INSTALL" = 1 ]; then | 9 | if [ "$AVOID_COMMIT_BEFORE_INSTALL" = 1 ]; then | |
10 | echo "" >&2 | 10 | echo "" >&2 | |
11 | - echo "** etckeeper detected uncommitted changes in /etc prior to $HIGHLEVEL_PACKAGE_MANAGER run" >&2 | 11 | - echo "** etckeeper detected uncommitted changes in /etc prior to $HIGHLEVEL_PACKAGE_MANAGER run" >&2 | |
12 | + echo "** etckeeper detected uncommitted changes in ${ETCKEEPER_DIR} prior to $HIGHLEVEL_PACKAGE_MANAGER run" >&2 | 12 | + echo "** etckeeper detected uncommitted changes in ${ETCKEEPER_DIR} prior to $HIGHLEVEL_PACKAGE_MANAGER run" >&2 | |
13 | echo "** Aborting $HIGHLEVEL_PACKAGE_MANAGER run. Manually commit and restart." >&2 | 13 | echo "** Aborting $HIGHLEVEL_PACKAGE_MANAGER run. Manually commit and restart." >&2 | |
14 | echo "" >&2 | 14 | echo "" >&2 | |
15 | exit 1 | 15 | exit 1 | |
16 | fi | 16 | fi | |
17 | - if ! etckeeper commit "saving uncommitted changes in /etc prior to $HIGHLEVEL_PACKAGE_MANAGER run"; then | 17 | - if ! etckeeper commit "saving uncommitted changes in /etc prior to $HIGHLEVEL_PACKAGE_MANAGER run"; then | |
18 | - echo "warning: etckeeper failed to commit changes in /etc using $VCS" >&2 | |||
18 | + if ! etckeeper commit "saving uncommitted changes in ${ETCKEEPER_DIR} prior to $HIGHLEVEL_PACKAGE_MANAGER run"; then | 19 | + if ! etckeeper commit "saving uncommitted changes in ${ETCKEEPER_DIR} prior to $HIGHLEVEL_PACKAGE_MANAGER run"; then | |
19 | if [ -e /usr/share/debconf/confmodule ]; then | 20 | + echo "warning: etckeeper failed to commit changes in ${ETCKEEPER_DIR} using $VCS" >&2 | |
20 | $0 fail-debconf | |||
21 | else | |||
22 | - echo "error: etckeeper failed to commit changes in /etc using $VCS" | |||
23 | + echo "error: etckeeper failed to commit changes in ${ETCKEEPER_DIR} using $VCS" | |||
24 | exit 1 | |||
25 | fi | |||
26 | fi | 21 | fi | |
22 | fi |