pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/48375: etckeeper fails to run with /bin/sh
>Number: 48375
>Category: pkg
>Synopsis: etckeeper fails to run with /bin/sh
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Nov 09 15:45:00 +0000 2013
>Originator: Kimmo Suominen
>Release: NetBSD 6.1.1
>Organization:
Internet
>Environment:
System: NetBSD talisker.gw.com 6.1.1 NetBSD 6.1.1 (XEN3_DOMU) amd64
Architecture: x86_64
Machine: amd64
>Description:
Etckeeper fails to run, because /bin/sh considers unsetting
a non-existing variable fatal and as "set -e" is in effect
exits.
Using bash (from pkgsrc) would appear to work.
Alternatively avoid unsetting variables that are not set.
This might be a problematic strategy as additional etckeeper
scripts might also fail.
Looking at the scripts distributed with etckeeper, it looks
like all other uses are "safe," only unsetting previously set
variables.
./commit.d/30darcs-add
./init.d/60darcs-deleted-symlinks
./init.d/70vcs-add
./pre-commit.d/30store-metadata
>How-To-Repeat:
talisker:/etc# /bin/sh -x /usr/pkg/bin/etckeeper init
+ set -e
+ '[' -z '' ']'
+ 'ETCKEEPER_CONF_DIR=/etc/etckeeper'
+ 'conf=/etc/etckeeper/etckeeper.conf'
+ '[' -e '/etc/etckeeper/etckeeper.conf' ']'
+ '.' '/etc/etckeeper/etckeeper.conf'
+ VCS=bzr
+ 'GIT_COMMIT_OPTIONS='
+ 'HG_COMMIT_OPTIONS='
+ 'BZR_COMMIT_OPTIONS='
+ 'DARCS_COMMIT_OPTIONS=-a'
+ 'HIGHLEVEL_PACKAGE_MANAGER=pkg_add'
+ 'LOWLEVEL_PACKAGE_MANAGER=pkg_install'
+ 'PUSH_REMOTE='
+ unset 'GIT_WORK_TREE'
Exit 1
>Fix:
Using bash seems like a safe choice.
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/etckeeper/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- Makefile 26 Jun 2013 14:26:47 -0000 1.3
+++ Makefile 9 Nov 2013 14:21:07 -0000
@@ -14,9 +14,8 @@
WRKSRC= ${WRKDIR}/etckeeper
USE_LANGUAGES= # none
-USE_TOOLS+= sed perl:run
+USE_TOOLS+= bash:run sed perl:run
-NO_CONFIGURE= yes
NO_BUILD= yes
AUTO_MKDIRS= yes
@@ -40,6 +39,8 @@
${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 755
.endfor
+REPLACE_BASH+= etckeeper
+
SUBST_CLASSES+= config
SUBST_STAGE.config= pre-install
SUBST_FILES.config+= etckeeper
Home |
Main Index |
Thread Index |
Old Index