diff options
author | Joey Hess <joey@kitenet.net> | 2010-11-16 14:15:01 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-11-16 14:15:01 -0400 |
commit | d65203b1bf9c1889a47090113a98833f849ae94e (patch) | |
tree | a896e739454a09b867858fa278a55973b8fb24d1 | |
parent | 619e220a665f62a355bc895fd978b81018d96570 (diff) |
Move etckeeper out of sbin, to avoid needing to work around broken root PATH settings in eg, crontab. Closes: #602438
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | apt.conf | 8 | ||||
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | debian/cron.daily | 2 | ||||
-rw-r--r-- | debian/prerm | 4 | ||||
-rw-r--r-- | etckeeper.spec | 4 | ||||
-rw-r--r-- | pacman-g2.hook | 4 | ||||
-rw-r--r-- | yum-etckeeper.py | 4 |
8 files changed, 17 insertions, 15 deletions
@@ -5,7 +5,7 @@ include $(CONFFILE) DESTDIR?= prefix=/usr -sbindir=${prefix}/sbin +bindir=${prefix}/bin etcdir=/etc mandir=${prefix}/share/man vardir=/var @@ -21,7 +21,7 @@ install: mkdir -p $(DESTDIR)$(etcdir)/etckeeper/ $(DESTDIR)$(vardir)/cache/etckeeper/ cp -dR *.d $(DESTDIR)$(etcdir)/etckeeper/ $(INSTALL_DATA) $(CONFFILE) $(DESTDIR)$(etcdir)/etckeeper/etckeeper.conf - $(INSTALL_EXE) etckeeper $(DESTDIR)$(sbindir)/etckeeper + $(INSTALL_EXE) etckeeper $(DESTDIR)$(bindir)/etckeeper $(INSTALL_DATA) etckeeper.8 $(DESTDIR)$(mandir)/man8/etckeeper.8 $(INSTALL_DATA) bash_completion $(DESTDIR)$(etcdir)/bash_completion.d/etckeeper ifeq ($(HIGHLEVEL_PACKAGE_MANAGER),apt) @@ -1,5 +1,5 @@ -DPkg::Pre-Invoke { "if [ -x /usr/sbin/etckeeper ]; then etckeeper pre-install; fi"; }; -DPkg::Post-Invoke { "if [ -x /usr/sbin/etckeeper ]; then etckeeper post-install; fi"; }; +DPkg::Pre-Invoke { "if [ -x /usr/bin/etckeeper ]; then etckeeper pre-install; fi"; }; +DPkg::Post-Invoke { "if [ -x /usr/bin/etckeeper ]; then etckeeper post-install; fi"; }; -RPM::Pre-Invoke { "if [ -x /usr/sbin/etckeeper ]; then etckeeper pre-install; fi"; }; -RPM::Post-Invoke { "if [ -x /usr/sbin/etckeeper ]; then etckeeper post-install; fi"; }; +RPM::Pre-Invoke { "if [ -x /usr/bin/etckeeper ]; then etckeeper pre-install; fi"; }; +RPM::Post-Invoke { "if [ -x /usr/bin/etckeeper ]; then etckeeper post-install; fi"; }; diff --git a/debian/changelog b/debian/changelog index d27988e..432ad79 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ etckeeper (0.51) UNRELEASED; urgency=low * Updated Vietnamese translation of debconf templates. Closes: #601921 * Improve rpm version change detection. + * Move etckeeper out of sbin, to avoid needing to work around broken + root PATH settings in eg, crontab. Closes: #602438 -- Joey Hess <joeyh@debian.org> Sat, 30 Oct 2010 23:53:51 -0400 diff --git a/debian/cron.daily b/debian/cron.daily index e83b570..91e2ed4 100644 --- a/debian/cron.daily +++ b/debian/cron.daily @@ -1,6 +1,6 @@ #!/bin/sh set -e -if [ -x /usr/sbin/etckeeper ] && [ -e /etc/etckeeper/etckeeper.conf ]; then +if [ -x /usr/bin/etckeeper ] && [ -e /etc/etckeeper/etckeeper.conf ]; then . /etc/etckeeper/etckeeper.conf if [ "$AVOID_DAILY_AUTOCOMMITS" != "1" ]; then # avoid autocommit if an install run is in progress diff --git a/debian/prerm b/debian/prerm index 806053a..e13f086 100644 --- a/debian/prerm +++ b/debian/prerm @@ -13,7 +13,7 @@ if [ "$1" = remove ]; then if [ -d /etc/etckeeper/uninit.d ]; then cp -a /etc/etckeeper/uninit.d /var/cache/etckeeper/stash fi - if [ -x /usr/sbin/etckeeper ]; then - cp -a /usr/sbin/etckeeper /var/cache/etckeeper/stash + if [ -x /usr/bin/etckeeper ]; then + cp -a /usr/bin/etckeeper /var/cache/etckeeper/stash fi fi diff --git a/etckeeper.spec b/etckeeper.spec index 81b6842..35b7153 100644 --- a/etckeeper.spec +++ b/etckeeper.spec @@ -43,13 +43,13 @@ install -D debian/cron.daily $RPM_BUILD_ROOT/etc/cron.daily/etckeeper rm -rf $RPM_BUILD_ROOT %post -%{_sbindir}/etckeeper init -d /etc/ +%{_bindir}/etckeeper init -d /etc/ mkdir -p %{_var}/cache/etckeeper %files %defattr(-,root,root,-) %doc GPL INSTALL TODO README -%{_sbindir}/* +%{_bindir}/* %{_mandir}/* # this isn't very clever and its a manual process update. # but it works diff --git a/pacman-g2.hook b/pacman-g2.hook index bd93d73..ac2e099 100644 --- a/pacman-g2.hook +++ b/pacman-g2.hook @@ -1,13 +1,13 @@ #!/bin/sh pre_sysupgrade() { - if [ -x /usr/sbin/etckeeper ]; then + if [ -x /usr/bin/etckeeper ]; then etckeeper pre-install fi } post_sysupgrade() { - if [ -x /usr/sbin/etckeeper ]; then + if [ -x /usr/bin/etckeeper ]; then etckeeper post-install fi } diff --git a/yum-etckeeper.py b/yum-etckeeper.py index 7a0394b..bdf9773 100644 --- a/yum-etckeeper.py +++ b/yum-etckeeper.py @@ -25,12 +25,12 @@ plugin_type = (TYPE_CORE,) def pretrans_hook(conduit): conduit.info(2, 'etckeeper: pre transaction commit') - servicecmd = conduit.confString('main', 'servicecmd', '/usr/sbin/etckeeper') + servicecmd = conduit.confString('main', 'servicecmd', '/usr/bin/etckeeper') command = '%s %s' % (servicecmd, " pre-install") os.system(command) def posttrans_hook(conduit): conduit.info(2, 'etckeeper: post transaction commit') - servicecmd = conduit.confString('main', 'servicecmd', '/usr/sbin/etckeeper') + servicecmd = conduit.confString('main', 'servicecmd', '/usr/bin/etckeeper') command = '%s %s' % (servicecmd, "post-install") os.system(command) |