Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 430952 - prefix support for sys-apps/etckeeper
Summary: prefix support for sys-apps/etckeeper
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Prefix
Depends on:
Reported: 2012-08-11 15:14 UTC by Benda Xu
Modified: 2017-11-15 17:51 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---

etckeeper.patch (etckeeper.patch,1.47 KB, patch)
2012-08-11 15:14 UTC, Benda Xu
Details | Diff
diff of ebuild + extra files (0001-Adjust-etckeeper-for-prefix.patch,6.38 KB, patch)
2013-01-31 22:49 UTC, Ben Longbons
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benda Xu gentoo-dev 2012-08-11 15:14:52 UTC
Created attachment 321026 [details, diff]

Hi, in the attachment is a proposed patch to let etckeeper support Prefix. Please review.
Comment 1 Julian Ospald 2012-08-11 16:06:15 UTC
+  11 Aug 2012; Julian Ospald <> +files/99etckeeper,
+  etckeeper-0.63.ebuild:
+  make deps more logical, add prefix support wrt #430952 by heroxbd
Comment 2 Ben Longbons 2013-01-13 08:28:07 UTC
It's not done yet ...

* (Major) pre-install.d/10packagelist tries to write to /var
* (Major) set ETCKEEPER_DIR=${EPREFIX}/etc in etckeeper.conf, or edit the script
* (Minor) should ewarn on first install about re-login to pick up the env change.
* (Optional) Make messages prettier
* (Expected) set KEYWORDS

With these changes, everything seems to work fine.
Comment 3 Julian Ospald 2013-01-13 11:32:57 UTC
attach an ebuild diff
Comment 4 Julian Ospald 2013-01-31 05:21:48 UTC
reopen when you can provide a patch

I am unable to test prefix in any way.
Comment 5 Ben Longbons 2013-01-31 22:49:25 UTC
Created attachment 337516 [details, diff]
diff of ebuild + extra files

Attached is a combined diff that edits the ebuild and adds 2 new patches.

This also obsoletes files/99etckeeper, since the same effect is now achieved by patching the script.

This does not change the keywords; I'm not sure exactly who is supposed to do what (but I'm pretty sure it's not me).

As usual, I have also put this in the 'o11c' overlay, available in layman or at
Comment 6 Julian Ospald 2013-11-16 22:19:01 UTC
mrueg, can you test?
Comment 7 Manuel Rüger (RETIRED) gentoo-dev 2013-11-18 02:01:06 UTC
(In reply to Julian Ospald (hasufell) from comment #6)
> mrueg, can you test?

Only build-test possible. No prefix'd system running.
Comment 8 Julian Ospald 2014-07-04 19:49:43 UTC
I'm not going to run after people testing this, assigning to prefix@.
Comment 9 Stuart Shelton 2014-08-08 18:12:49 UTC
$ ebuild ~/../usr/portage/sys-apps/etckeeper/etckeeper-1.12.ebuild install


>>> Install etckeeper-1.12 into /Volumes/Scratch/tmp/portage/sys-apps/etckeeper-1.12/image/ category sys-apps
make -j7 DESTDIR=/Volumes/Scratch/tmp/portage/sys-apps/etckeeper-1.12/image/opt/gentoo/ install 
mkdir -p /Volumes/Scratch/tmp/portage/sys-apps/etckeeper-1.12/image/opt/gentoo//etc/etckeeper/ /Volumes/Scratch/tmp/portage/sys-apps/etckeeper-1.12/image/opt/gentoo//var/cache/etckeeper/
cp -R *.d /Volumes/Scratch/tmp/portage/sys-apps/etckeeper-1.12/image/opt/gentoo//etc/etckeeper/
install  -m 0644 etckeeper.conf /Volumes/Scratch/tmp/portage/sys-apps/etckeeper-1.12/image/opt/gentoo//etc/etckeeper/etckeeper.conf
mkdir -p /Volumes/Scratch/tmp/portage/sys-apps/etckeeper-1.12/image/opt/gentoo//usr/bin
install  etckeeper /Volumes/Scratch/tmp/portage/sys-apps/etckeeper-1.12/image/opt/gentoo//usr/bin/etckeeper
mkdir -p /Volumes/Scratch/tmp/portage/sys-apps/etckeeper-1.12/image/opt/gentoo//usr/share/man/man8
install  -m 0644 etckeeper.8 /Volumes/Scratch/tmp/portage/sys-apps/etckeeper-1.12/image/opt/gentoo//usr/share/man/man8/etckeeper.8
mkdir -p /Volumes/Scratch/tmp/portage/sys-apps/etckeeper-1.12/image/opt/gentoo//etc/bash_completion.d
echo "** installation successful"
** installation successful
 * Adjusting to prefix /opt/gentoo
 *   99etckeeper ...                                                                                                                                                                                                                                                   [ ok ]
>>> Completed installing etckeeper-1.12 into /Volumes/Scratch/tmp/portage/sys-apps/etckeeper-1.12/image/

ecompressdir: bzip2 -9 /usr/share/doc
ecompressdir: bzip2 -9 /usr/share/man
 * invalid shebang in opt/gentoo/etc/etckeeper/commit.d/10vcs-test: /bin/sh
 * invalid shebang in opt/gentoo/etc/etckeeper/commit.d/30bzr-add: /bin/sh
 * invalid shebang in opt/gentoo/etc/etckeeper/commit.d/30darcs-add: /bin/sh
 * invalid shebang in opt/gentoo/etc/etckeeper/commit.d/30git-add: /bin/sh
 * invalid shebang in opt/gentoo/etc/etckeeper/commit.d/30hg-addremove: /bin/sh
 * invalid shebang in opt/gentoo/etc/etckeeper/commit.d/50vcs-commit: /bin/sh
 * invalid shebang in opt/gentoo/etc/etckeeper/commit.d/99push: /bin/sh
 * invalid shebang in opt/gentoo/etc/etckeeper/init.d/10restore-metadata: /bin/sh
 * invalid shebang in opt/gentoo/etc/etckeeper/init.d/20restore-etckeeper: /bin/sh
 * invalid shebang in opt/gentoo/etc/etckeeper/init.d/40vcs-init: /bin/sh
 * invalid shebang in opt/gentoo/etc/etckeeper/init.d/50vcs-ignore: /bin/sh
 * invalid shebang in opt/gentoo/etc/etckeeper/init.d/50vcs-perm: /bin/sh
 * invalid shebang in opt/gentoo/etc/etckeeper/init.d/50vcs-pre-commit-hook: /bin/sh
 * invalid shebang in opt/gentoo/etc/etckeeper/init.d/60darcs-deleted-symlinks: /bin/sh
 * invalid shebang in opt/gentoo/etc/etckeeper/init.d/70vcs-add: /bin/sh
 * invalid shebang in opt/gentoo/etc/etckeeper/list-installed.d/50list-installed: /bin/sh
 * invalid shebang in opt/gentoo/etc/etckeeper/post-install.d/50vcs-commit: /bin/sh
 * invalid shebang in opt/gentoo/etc/etckeeper/pre-commit.d/20warn-problem-files: /bin/sh
 * invalid shebang in opt/gentoo/etc/etckeeper/pre-commit.d/30store-metadata: /bin/sh
 * invalid shebang in opt/gentoo/etc/etckeeper/pre-install.d/10packagelist: /bin/sh
 * invalid shebang in opt/gentoo/etc/etckeeper/pre-install.d/50uncommitted-changes: /bin/sh
 * invalid shebang in opt/gentoo/etc/etckeeper/unclean.d/50test: /bin/sh
 * invalid shebang in opt/gentoo/etc/etckeeper/uninit.d/01prompt: /bin/sh
 * invalid shebang in opt/gentoo/etc/etckeeper/uninit.d/50remove-metadata: /bin/sh
 * invalid shebang in opt/gentoo/etc/etckeeper/uninit.d/50vcs-uninit: /bin/sh
 * invalid shebang in opt/gentoo/etc/etckeeper/update-ignore.d/01update-ignore: /bin/sh
 * invalid shebang in opt/gentoo/etc/etckeeper/vcs.d/50vcs-cmd: /bin/sh
 * prefixing shebang of opt/gentoo/usr/bin/etckeeper
 * QA Notice: This ebuild installs into paths that should be created at runtime.
 *  To fix, simply do not install into these directories.  Instead, your package
 *  should create dirs on the fly at runtime as needed via init scripts/etc...
 *   var/cache
 *   var/cache/etckeeper

$ emerge --info =sys-apps/etckeeper-1.12
Portage (python 2.7.6-final-0, prefix/darwin/macos/10.9/x64, gcc-4.2.1, unavailable, 13.3.0 x86_64)
                        System Settings
System uname: Darwin-13.3.0-x86_64-i386-64bit
Timestamp of tree: Thu, 07 Aug 2014 23:37:43 +0000
app-shells/bash:      4.2_p45-r1
dev-lang/python:      2.7.6-r1
dev-util/pkgconfig:   0.28-r2
sys-devel/autoconf:   2.69
sys-devel/automake:   1.14
sys-devel/gcc-config: 1.8-r00.1
sys-devel/libtool:    2.4.2-r1
sys-devel/make:       4.0-r1
Repositories: gentoo_prefix timebomb_overlay
ACCEPT_KEYWORDS="amd64 amd64-linux x64-macos ~x64-macos"
CFLAGS="-arch x86_64 -march=core-avx-i -mmacosx-version-min=10.9 -fcolor-diagnostics -ftrapv -O3 -pipe"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-arch x86_64 -march=core-avx-i -mmacosx-version-min=10.9 -fcolor-diagnostics -ftrapv -O3 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg candy clean-logs collision-protect compress-build-logs compressdebug config-protect-if-modified distlocks downgrade-backup ebuild-locks fixlafiles force-prefix merge-sync news nostrip parallel-fetch parallel-install preserve-libs protect-owned sfperms split-elog split-log splitdebug strict stricter unknown-features-warn unmerge-backup unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
USE="aqua berkdb bzip2 clang coreaudio cracklib crypt cvs cxx expat gdbm git gmp iconv icu idn ipv6 libedit lzma lzo mercurial mmx mmxext modules mpfr ncurses nls objc objc++ openmp pcre perl prefix python python2 readline sqlite sse sse2 ssl subversion threads unicode vim-syntax x64-macos xml zlib" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="Darwin" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse" KERNEL="Darwin" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Comment 10 Fabian Groffen gentoo-dev 2017-11-15 17:51:47 UTC
This needs to be revisited, sorry.