├── INSTALL ├── debian ├── compat ├── docs ├── po │ ├── POTFILES.in │ ├── de.po │ ├── templates.pot │ ├── ja.po │ ├── pl.po │ ├── vi.po │ ├── da.po │ ├── pt.po │ ├── sv.po │ ├── pt_BR.po │ ├── it.po │ ├── nl.po │ ├── fi.po │ ├── ru.po │ ├── gl.po │ ├── fr.po │ ├── eu.po │ ├── cs.po │ └── es.po ├── rules ├── copyright ├── prerm ├── cron.daily ├── templates ├── postrm ├── control ├── preinst ├── postinst └── changelog ├── README.md ├── doc ├── .gitignore ├── news.mdwn ├── news │ ├── new_web_site.mdwn │ └── version_1.17.mdwn ├── todo │ ├── automatic_git_gc.mdwn │ ├── done.mdwn │ ├── track_multiple_directories.mdwn │ ├── what_if_there_is_a_Git_repo_somewhere_underneath___47__etc__63__.mdwn │ ├── track_multiple_directories │ │ ├── comment_1_de6b27ba6b98790101d9ab1a37d752dc._comment │ │ ├── comment_3_5e52734a98bff9ccd4cd088cf6a4381d._comment │ │ ├── comment_5_bec408cef5932ace7d6d136600827a1f._comment │ │ ├── comment_4_50fad97b58a7f1875092c7acb3f3acd8._comment │ │ └── comment_2_042f7831f641c66396ef38c912692ae3._comment │ ├── multiple_highlevel_package_managers.mdwn │ ├── split_the_repo.mdwn │ ├── multiple_highlevel_package_managers │ │ └── comment_1_be96d2f726ce5c9adabdaf46cd17dcc6._comment │ ├── origin_branch.mdwn │ ├── push_remote_branch.mdwn │ └── Adding_support_for_.hgignore.mdwn ├── todo.mdwn ├── install.mdwn ├── index.mdwn └── README.mdwn ├── etckeeper-dnf ├── __init__.py └── etckeeper.py ├── yum-etckeeper.conf ├── .gitattributes ├── init.d ├── 50vcs-ignore ├── 50vcs-perm ├── 20restore-etckeeper ├── 10restore-metadata ├── 40vcs-init ├── README ├── 70vcs-add ├── 60darcs-deleted-symlinks └── 50vcs-pre-commit-hook ├── unclean.d ├── README └── 50test ├── update-ignore.d ├── README └── 01update-ignore ├── uninit.d ├── README ├── 50remove-metadata ├── 01prompt └── 50vcs-uninit ├── post-install.d ├── README └── 50vcs-commit ├── pre-commit.d ├── README ├── 20warn-problem-files └── 30store-metadata ├── commit.d ├── 30bzr-add ├── 30git-add ├── 30hg-addremove ├── README ├── 30darcs-add ├── 99push ├── 10vcs-test └── 50vcs-commit ├── pre-install.d ├── README ├── 10packagelist └── 50uncommitted-changes ├── cruft_filter ├── bash_completion ├── pacman-g2.hook ├── vcs.d └── 50vcs-cmd ├── apt.conf ├── list-installed.d └── 50list-installed ├── etckeeper-bzr └── __init__.py ├── yum-etckeeper.py ├── zypper-etckeeper.py ├── etckeeper.conf ├── etckeeper.spec ├── Makefile ├── etckeeper.8 ├── etckeeper └── GPL /INSTALL: -------------------------------------------------------------------------------- 1 | doc/install.mdwn -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 7 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | doc/README.mdwn -------------------------------------------------------------------------------- /debian/docs: -------------------------------------------------------------------------------- 1 | README.md 2 | -------------------------------------------------------------------------------- /doc/.gitignore: -------------------------------------------------------------------------------- 1 | /.ikiwiki 2 | -------------------------------------------------------------------------------- /etckeeper-dnf/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /yum-etckeeper.conf: -------------------------------------------------------------------------------- 1 | [main] 2 | enabled=1 3 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | debian/changelog merge=dpkg-mergechangelogs 2 | -------------------------------------------------------------------------------- /debian/po/POTFILES.in: -------------------------------------------------------------------------------- 1 | [type: gettext/rfc822deb] templates 2 | -------------------------------------------------------------------------------- /doc/news.mdwn: -------------------------------------------------------------------------------- 1 | [[!inline pages="news/* and !*/Discussion" show="3"]] 2 | 3 | -------------------------------------------------------------------------------- /debian/po/de.po: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrJoy/etckeeper/HEAD/debian/po/de.po -------------------------------------------------------------------------------- /doc/news/new_web_site.mdwn: -------------------------------------------------------------------------------- 1 | Finally set up a standalone website for etckeeper.. 2 | -------------------------------------------------------------------------------- /init.d/50vcs-ignore: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | etckeeper update-ignore -a || true 5 | -------------------------------------------------------------------------------- /unclean.d/README: -------------------------------------------------------------------------------- 1 | Files in this directory are used to test if the working copy has 2 | uncommitted changes. 3 | -------------------------------------------------------------------------------- /update-ignore.d/README: -------------------------------------------------------------------------------- 1 | Executable files in this directory are run to update the VCS ignore file, 2 | or create it if it does not exist. 3 | -------------------------------------------------------------------------------- /uninit.d/README: -------------------------------------------------------------------------------- 1 | Executable files in this directory are run to uninitialise the working 2 | directory, removing files added by `etckeeper init`. 3 | -------------------------------------------------------------------------------- /doc/todo/automatic_git_gc.mdwn: -------------------------------------------------------------------------------- 1 | Hi 2 | 3 | You should add so it runs "git gc" automatic. 4 | I know I can add it manually but better if its included 5 | -------------------------------------------------------------------------------- /doc/todo/done.mdwn: -------------------------------------------------------------------------------- 1 | recently fixed [[todo]] items. 2 | 3 | [[!inline pages="./* and link(./done) and !*/Discussion" sort=mtime show=10 4 | archive=yes]] 5 | -------------------------------------------------------------------------------- /post-install.d/README: -------------------------------------------------------------------------------- 1 | Files in this directory are run after packages are installed, upgraded, etc. 2 | They should commit changes and new files in /etc to repository. 3 | -------------------------------------------------------------------------------- /pre-commit.d/README: -------------------------------------------------------------------------------- 1 | This is run by a git pre-commit hook before committing changes to the 2 | repository. This can be used for storing metadata, and for sanity checks. 3 | -------------------------------------------------------------------------------- /commit.d/30bzr-add: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | if [ "$VCS" = bzr ] && [ -d .bzr ]; then 5 | if ! bzr add -q .; then 6 | echo "etckeeper warning: bzr add failed" >&2 7 | fi 8 | fi 9 | -------------------------------------------------------------------------------- /commit.d/30git-add: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | if [ "$VCS" = git ] && [ -d .git ]; then 5 | if ! git add --all; then 6 | echo "etckeeper warning: git add --all" >&2 7 | fi 8 | fi 9 | -------------------------------------------------------------------------------- /pre-install.d/README: -------------------------------------------------------------------------------- 1 | Files in this directory are run before packages are installed, upgraded, 2 | etc. This is mostly used for sanity checks, ie, does /etc have any 3 | uncommitted changes? 4 | -------------------------------------------------------------------------------- /commit.d/30hg-addremove: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | if [ "$VCS" = hg ] && [ -d .hg ]; then 5 | if ! hg addremove .; then 6 | echo "etckeeper warning: hg addremove failed" >&2 7 | fi 8 | fi 9 | -------------------------------------------------------------------------------- /uninit.d/50remove-metadata: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | # Files generated by etckeeper to store metadata the VCS cannot preserve. 5 | rm -f .etckeeper 6 | rm -f .metadata # only generated by old versions 7 | -------------------------------------------------------------------------------- /commit.d/README: -------------------------------------------------------------------------------- 1 | Files in this directory are run when there might be changes to commit. 2 | (Before and after packages are installed, upgraded, etc.) 3 | They should commit changes and new files in /etc to repository. 4 | -------------------------------------------------------------------------------- /cruft_filter: -------------------------------------------------------------------------------- 1 | /etc/.etckeeper 2 | /etc/.gitignore 3 | /etc/.git 4 | /etc/.git/** 5 | /etc/.hgignore 6 | /etc/.hg 7 | /etc/.hg/** 8 | /etc/.bzrignore 9 | /etc/.bzr 10 | /etc/.bzr/** 11 | /etc/.darcsignore 12 | /etc/_darcs 13 | /etc/_darcs/** 14 | -------------------------------------------------------------------------------- /bash_completion: -------------------------------------------------------------------------------- 1 | _etckeeper() { 2 | local cur; 3 | COMPREPLY=(); 4 | cur=${COMP_WORDS[COMP_CWORD]}; 5 | COMPREPLY=( $( compgen -W '$(cd /etc/etckeeper/; for i in *.d/; do echo ${i%.d/}; done)' -- $cur ) ); 6 | } 7 | 8 | complete -F _etckeeper etckeeper 9 | -------------------------------------------------------------------------------- /debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | 3 | export PYTHON_INSTALL_OPTS=--install-layout=deb 4 | 5 | %: 6 | dh --with python2 $@ 7 | 8 | # Not intended for use by anyone except the author. 9 | announcedir: 10 | @echo ${HOME}/src/etckeeper/doc/news 11 | -------------------------------------------------------------------------------- /init.d/50vcs-perm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | if [ "$VCS" = git ]; then 5 | chmod 700 .git 6 | elif [ "$VCS" = hg ]; then 7 | chmod 700 .hg 8 | elif [ "$VCS" = bzr ]; then 9 | chmod 700 .bzr 10 | elif [ "$VCS" = darcs ]; then 11 | chmod 700 _darcs 12 | fi 13 | -------------------------------------------------------------------------------- /pre-install.d/10packagelist: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # This list will be later used when committing. 3 | mkdir -p /var/cache/etckeeper/ 4 | etckeeper list-installed > /var/cache/etckeeper/packagelist.pre-install 5 | etckeeper list-installed fmt > /var/cache/etckeeper/packagelist.fmt 6 | -------------------------------------------------------------------------------- /doc/todo/track_multiple_directories.mdwn: -------------------------------------------------------------------------------- 1 | Some people would like etckeeper to be able to track multiple directories, 2 | not just /etc. 3 | 4 | There have been 2 patches proposed: 5 | 6 | * 7 | * 8 | -------------------------------------------------------------------------------- /pacman-g2.hook: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | pre_sysupgrade() { 4 | if [ -x /usr/bin/etckeeper ]; then 5 | etckeeper pre-install 6 | fi 7 | } 8 | 9 | post_sysupgrade() { 10 | if [ -x /usr/bin/etckeeper ]; then 11 | etckeeper post-install 12 | fi 13 | } 14 | 15 | op=$1 16 | shift 17 | $op $* 18 | -------------------------------------------------------------------------------- /vcs.d/50vcs-cmd: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | # check whether we can locate the vcs binary 5 | if [ -n "$VCS" ] && which "$VCS" > /dev/null; then 6 | # pass commands to the VCS application 7 | $VCS "$@" 8 | else 9 | echo "error: VCS ($VCS) not set or not in PATH" >&2 10 | exit 1 11 | fi 12 | -------------------------------------------------------------------------------- /doc/news/version_1.17.mdwn: -------------------------------------------------------------------------------- 1 | etckeeper 1.17 released with [[!toggle text="these changes"]] 2 | [[!toggleable text=""" 3 | * Fix name of DNF plugin. 4 | * Add --version 5 | Thanks Andreas Wansner. 6 | * New website, http://etckeeper.branchable.com/ 7 | * Add build-depends on dh-python."""]] 8 | -------------------------------------------------------------------------------- /doc/todo/what_if_there_is_a_Git_repo_somewhere_underneath___47__etc__63__.mdwn: -------------------------------------------------------------------------------- 1 | What will and what could be done if there is a Git repo somewhere underneath /etc? 2 | 3 | Perhaps, it could be stored verbatim, or as a submodule. 4 | 5 | Simply ignoring it would definitely loose information from the backup. 6 | -------------------------------------------------------------------------------- /doc/todo/track_multiple_directories/comment_1_de6b27ba6b98790101d9ab1a37d752dc._comment: -------------------------------------------------------------------------------- 1 | [[!comment format=mdwn 2 | username="joey" 3 | subject="""comment 1""" 4 | date="2014-12-22T20:54:14Z" 5 | content=""" 6 | Personally, this seems unnecessary complication and unnecessary widening 7 | of scope to me. 8 | """]] 9 | -------------------------------------------------------------------------------- /doc/todo.mdwn: -------------------------------------------------------------------------------- 1 | This is etckeeper's todo list, for both posting feature requests, and merge 2 | requests. Link items to [[todo/done]] when done. 3 | 4 | See also: [Debian BTS](http://bugs.debian.org/etckeeper). 5 | 6 | [[!inline pages="./todo/* and !./todo/done and !link(done) 7 | and !*/Discussion" actions=yes postform=yes show=0 archive=yes]] 8 | -------------------------------------------------------------------------------- /debian/copyright: -------------------------------------------------------------------------------- 1 | Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ 2 | 3 | Files: * 4 | Copyright: © 2007-2014 Joey Hess and contributors 5 | License: GPL-2+ 6 | The full text of the GPL is distributed as doc/GPL in etckeeper's source, 7 | and is distributed in /usr/share/common-licenses/GPL-2 on Debian systems. 8 | -------------------------------------------------------------------------------- /doc/todo/multiple_highlevel_package_managers.mdwn: -------------------------------------------------------------------------------- 1 | Apparently openSUSE supports both ZYpp and YUM highlevel package managers. 2 | The `HIGHLEVEL_PACKAGE_MANAGER` config doesn't allow expressing that. 3 | 4 | There's a pull request here, but it needs changes to eg, handle 5 | etckeeper.spec's tweaking of etckeeper.conf. 6 | 7 | -------------------------------------------------------------------------------- /commit.d/30darcs-add: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | if [ "$VCS" = darcs ] && [ -d _darcs ]; then 5 | rc=0 6 | res=$( darcs add -qr . 2>&1 ) || rc=$? 7 | if test $rc -ne 0; then 8 | if ! test $rc -eq 2 -a "${res%No files were added}" != "$res"; then 9 | printf "%s" "$res" 10 | echo "etckeeper warning: darcs add failed" >&2 11 | fi 12 | fi 13 | unset rc res 14 | fi 15 | -------------------------------------------------------------------------------- /apt.conf: -------------------------------------------------------------------------------- 1 | DPkg::Pre-Invoke { "if [ -x /usr/bin/etckeeper ]; then etckeeper pre-install; fi"; }; 2 | DPkg::Post-Invoke { "if [ -x /usr/bin/etckeeper ]; then etckeeper post-install; fi"; }; 3 | 4 | RPM::Pre-Invoke { "if [ -x /usr/bin/etckeeper ]; then etckeeper pre-install; fi"; }; 5 | RPM::Post-Invoke { "if [ -x /usr/bin/etckeeper ]; then etckeeper post-install; fi"; }; 6 | -------------------------------------------------------------------------------- /commit.d/99push: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | if [ -n "$PUSH_REMOTE" ]; then 3 | if [ "$VCS" = git ] && [ -d .git ]; then 4 | for REMOTE in $PUSH_REMOTE; do 5 | git push "$REMOTE" master || true 6 | done 7 | elif [ "$VCS" = hg ] && [ -d .hg ]; then 8 | for REMOTE in $PUSH_REMOTE; do 9 | hg push "$REMOTE" || true 10 | done 11 | else 12 | echo "PUSH_REMOTE not yet supported for $VCS" >&2 13 | fi 14 | fi 15 | -------------------------------------------------------------------------------- /doc/todo/track_multiple_directories/comment_3_5e52734a98bff9ccd4cd088cf6a4381d._comment: -------------------------------------------------------------------------------- 1 | [[!comment format=mdwn 2 | username="http://joeyh.name/" 3 | subject="comment 3" 4 | date="2014-12-23T18:30:15Z" 5 | content=""" 6 | It seems to me that it's easy to build a system where all configuration is in /etc. Or, it might make sense to use to manage the non-/etc repositories. 7 | """]] 8 | -------------------------------------------------------------------------------- /doc/todo/track_multiple_directories/comment_5_bec408cef5932ace7d6d136600827a1f._comment: -------------------------------------------------------------------------------- 1 | [[!comment format=mdwn 2 | username="https://www.google.com/accounts/o8/id?id=AItOawlCXirWXlbn1_Ma9G5w3KYILEmb75-I9Do" 3 | nickname="Salve J." 4 | subject="myrepos" 5 | date="2014-12-30T16:25:04Z" 6 | content=""" 7 | Not familiar with myrepos. Does it have any integration with packaging systems? (e.g. autocommit before apt-get install) 8 | """]] 9 | -------------------------------------------------------------------------------- /unclean.d/50test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | if [ "$VCS" = git ]; then 5 | [ -d .git ] && [ -n "`git status --porcelain`" ] 6 | elif [ "$VCS" = hg ]; then 7 | [ -d .hg ] && ! hg status 2>&1 | wc -l | grep -q "^0$" 8 | elif [ "$VCS" = bzr ]; then 9 | [ -d .bzr ] && ! bzr version-info --custom --template="{clean}\n" | grep -q "^1$" 10 | elif [ "$VCS" = darcs ]; then 11 | [ -d _darcs ] && darcs whatsnew -l >/dev/null 12 | fi 13 | -------------------------------------------------------------------------------- /uninit.d/01prompt: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | if [ "$1" != "-f" ]; then 5 | echo "** Warning: This will DESTROY all recorded history for $ETCKEEPER_DIR," 6 | echo "** including the $VCS repository." 7 | echo "" 8 | printf "Are you sure you want to do this? [yN] " 9 | read answer 10 | case "$answer" in 11 | [Yy]*) 12 | echo "Proceeding.." 13 | exit 0 14 | ;; 15 | *) 16 | echo "Aborting etckeeper uninit." 17 | exit 1 18 | ;; 19 | esac 20 | fi 21 | -------------------------------------------------------------------------------- /doc/todo/split_the_repo.mdwn: -------------------------------------------------------------------------------- 1 | split the repo 2 | 3 | One way to split it would be to put private (non-world-readable) files 4 | one one repo, and public in another. This would need either symlink 5 | farming or git "fake bare" repos, both of which are not pleasant, yet. 6 | 7 | Another way would be to allow splitting out subdirs into their own repos. 8 | This is already doable, would just need modifying the pre-install and 9 | post-instlal stuff (ie, it needs to commit in the subdirs too). Using mr 10 | would be a possibility.. 11 | -------------------------------------------------------------------------------- /commit.d/10vcs-test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | not_enabled_warning() { 5 | echo "etckeeper warning: etckeeper is not yet enabled for $(pwd)" >&2 6 | echo "etckeeper warning: run etckeeper init to enable it" >&2 7 | } 8 | 9 | if [ "$VCS" = git ] && [ ! -d .git ]; then 10 | not_enabled_warning 11 | elif [ "$VCS" = hg ] && [ ! -d .hg ]; then 12 | not_enabled_warning 13 | elif [ "$VCS" = bzr ] && [ ! -d .bzr ]; then 14 | not_enabled_warning 15 | elif [ "$VCS" = darcs ] && [ ! -d _darcs ]; then 16 | not_enabled_warning 17 | fi 18 | -------------------------------------------------------------------------------- /init.d/20restore-etckeeper: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | # Used by .etckeeper to run a command if the file it acts on 5 | # (the last parameter) exists. 6 | maybe () { 7 | command="$1" 8 | shift 1 9 | 10 | if eval [ -e "\"\$$#\"" ]; then 11 | "$command" "$@" 12 | fi 13 | } 14 | 15 | # Yes, this runs code from the repository. As documented, etckeeper-init 16 | # should only be run on repositories you trust. 17 | if [ -e .etckeeper ]; then 18 | . ./.etckeeper 19 | else 20 | touch .etckeeper 21 | chmod 600 .etckeeper 22 | fi 23 | -------------------------------------------------------------------------------- /doc/install.mdwn: -------------------------------------------------------------------------------- 1 | etckeeper is available in git at `git://git.joeyh.name/etckeeper`, or 2 | [in gitweb](http://git.joeyh.name/?p=etckeeper.git). 3 | 4 | It's packaged in Debian, Ubuntu, Fedora, etc. 5 | 6 | Or, you can install it by hand. Before running 'make install', you 7 | should edit etckeeper.conf and make sure it configured appropriately 8 | for your distribution. 9 | 10 | Distribution packagers may find it more convenient to set CONFFILE to point 11 | to a different etckeeper.conf that is preconfigured for your distribution. 12 | -------------------------------------------------------------------------------- /init.d/10restore-metadata: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | # Note that metastore doesn't check that the .metastore file only changes 5 | # perms of files in the current directory. It's ok to trust the .metastore 6 | # file won't do anything shady, because, as documented, etckeeper-init 7 | # should only be run on repositories you trust. 8 | if [ -e .metadata ]; then 9 | if which metastore >/dev/null; then 10 | metastore --apply --mtime 11 | else 12 | echo "etckeeper warning: legacy .metastore file is present but metastore is not installed" >&2 13 | fi 14 | fi 15 | -------------------------------------------------------------------------------- /doc/todo/multiple_highlevel_package_managers/comment_1_be96d2f726ce5c9adabdaf46cd17dcc6._comment: -------------------------------------------------------------------------------- 1 | [[!comment format=mdwn 2 | username="https://www.google.com/accounts/o8/id?id=AItOawkZ9t02dAh3YsUhVRJ9uBE4xUt_ZUrDs8s" 3 | nickname="さんご" 4 | subject="How should we send you new patches?" 5 | date="2014-12-24T00:37:10Z" 6 | content=""" 7 | I will rewrite the patch of supporting multi highlevel-package-manager. 8 | 9 | But, how should we send you new patches? 10 | 11 | a) pullrequest on GitHub. 12 | 13 | b) the others(????????) 14 | 15 | Please tell us. 16 | 17 | """]] 18 | -------------------------------------------------------------------------------- /init.d/40vcs-init: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | if [ "$VCS" = git ] && [ ! -e .git ]; then 5 | git init 6 | echo "$(hostname) /etc repository" > .git/description 7 | elif [ "$VCS" = hg ] && [ ! -e .hg ]; then 8 | hg init 9 | echo "[web]" > .hg/hgrc 10 | echo "description = $(hostname) /etc repository" >> .hg/hgrc 11 | elif [ "$VCS" = bzr ] && [ ! -e .bzr ]; then 12 | bzr init 13 | bzr nick "$(hostname) /etc repository" 14 | elif [ "$VCS" = darcs ] && [ ! -e _darcs ]; then 15 | darcs initialize 16 | echo "$(hostname) /etc repository" > _darcs/prefs/motd 17 | fi 18 | -------------------------------------------------------------------------------- /debian/prerm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | #DEBHELPER# 5 | 6 | if [ "$1" = remove ]; then 7 | # In case etckeeper is being purged, stash away a copy of 8 | # the files purging will need. 9 | mkdir -p /var/cache/etckeeper/stash 10 | if [ -e /etc/etckeeper/etckeeper.conf ]; then 11 | cp -a /etc/etckeeper/etckeeper.conf /var/cache/etckeeper/stash 12 | fi 13 | if [ -d /etc/etckeeper/uninit.d ]; then 14 | cp -a /etc/etckeeper/uninit.d /var/cache/etckeeper/stash 15 | fi 16 | if [ -x /usr/bin/etckeeper ]; then 17 | cp -a /usr/bin/etckeeper /var/cache/etckeeper/stash 18 | fi 19 | fi 20 | -------------------------------------------------------------------------------- /pre-install.d/50uncommitted-changes: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | if etckeeper unclean; then 5 | if [ "$AVOID_COMMIT_BEFORE_INSTALL" = 1 ]; then 6 | echo "" >&2 7 | echo "** etckeeper detected uncommitted changes in /etc prior to $HIGHLEVEL_PACKAGE_MANAGER run" >&2 8 | echo "** Aborting $HIGHLEVEL_PACKAGE_MANAGER run. Manually commit and restart." >&2 9 | echo "" >&2 10 | exit 1 11 | fi 12 | if ! etckeeper commit "saving uncommitted changes in /etc prior to $HIGHLEVEL_PACKAGE_MANAGER run"; then 13 | echo "warning: etckeeper failed to commit changes in /etc using $VCS" >&2 14 | fi 15 | fi 16 | -------------------------------------------------------------------------------- /debian/cron.daily: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | if [ -x /usr/bin/etckeeper ] && [ -e /etc/etckeeper/etckeeper.conf ]; then 4 | . /etc/etckeeper/etckeeper.conf 5 | if [ "$AVOID_DAILY_AUTOCOMMITS" != "1" ]; then 6 | # avoid autocommit if an install run is in progress 7 | lockfile=/var/cache/etckeeper/packagelist.pre-install 8 | if [ -e "$lockfile" ] && [ -n "$(find "$lockfile" -mtime +1)" ]; then 9 | rm -f "$lockfile" # stale 10 | fi 11 | if [ ! -e "$lockfile" ]; then 12 | AVOID_SPECIAL_FILE_WARNING=1 13 | export AVOID_SPECIAL_FILE_WARNING 14 | if etckeeper unclean; then 15 | etckeeper commit "daily autocommit" >/dev/null 16 | fi 17 | fi 18 | fi 19 | fi 20 | -------------------------------------------------------------------------------- /doc/todo/origin_branch.mdwn: -------------------------------------------------------------------------------- 1 | keep an origin branch with the files debian ships 2 | 3 | Not sure quite how to do this yet, it seems it would need to clone 4 | the repo, switch to origin, and commit, then push back to /etc, 5 | and either merge origin or commit a second time. 6 | And do this after apt runs only, of course. 7 | 8 | Alternatively, commit in /etc, then clone the repo, switch to origin, and 9 | cherry pick the commit into origin? 10 | 11 | Of coure, unless etckeeper is installed by debootstrap or thereabouts, 12 | you won't have a true pristine origin branch. 13 | 14 | etcgit manages this, maybe steal its method? 15 | git://git.debian.org/git/users/jo-guest/etcgit.git 16 | -------------------------------------------------------------------------------- /doc/todo/push_remote_branch.mdwn: -------------------------------------------------------------------------------- 1 | Several people have written patches to extend `PUSH_REMOTE` to be able to 2 | push a branch other than master. For example, 3 | 4 | 5 | It seems that these are not fully flexible either. Maybe someone wants to 6 | push 2 branches, or push different branches to different remotes. 7 | 8 | I think that adding `PUSH_REMOTE` was a mistake. It would be better to 9 | remove it, and add to the readme an example of writing your own 10 | `/etc/etckeeper/commit.d/99push` script that does exactly the kind of 11 | pushing you want. The only reason I've not done so is it would break 12 | compatability for anyone using this feature. --[[Joey]] 13 | -------------------------------------------------------------------------------- /debian/templates: -------------------------------------------------------------------------------- 1 | # These templates have been reviewed by the debian-l10n-english 2 | # team 3 | # 4 | # If modifications/additions/rewording are needed, please ask 5 | # debian-l10n-english@lists.debian.org for advice. 6 | # 7 | # Even minor modifications require translation updates and such 8 | # changes should be coordinated with translators and reviewers. 9 | 10 | Template: etckeeper/purge 11 | Type: boolean 12 | Default: true 13 | _Description: Remove etckeeper ${VCS} repository and associated files? 14 | Etckeeper is being purged from the system, and was used to 15 | store /etc in a ${VCS} repository. If you choose to remove the 16 | repository, this will DESTROY all history etckeeper has recorded 17 | for /etc. 18 | -------------------------------------------------------------------------------- /init.d/README: -------------------------------------------------------------------------------- 1 | Executable files in this directory are run to initialise the working directory 2 | for use by etckeeper. If the working directory is not already in version 3 | control, that includes setting up the version control, but not actually 4 | committing anything. If the working directory is in version control, 5 | it includes applying stored metadata to the checked out files in the 6 | working directory. 7 | 8 | Please be careful to *never* overwrite existing files/directories 9 | in the working directory (or use absolute care when doing so). If a file 10 | you need to write already exists, check if its contents are sane, and 11 | if not, emit a warning on stderr. 12 | 13 | If initialisation fails, exit nonzero and no later files will be run. 14 | -------------------------------------------------------------------------------- /init.d/70vcs-add: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | if [ "$VCS" = git ]; then 5 | if ! git add .; then 6 | echo "etckeeper warning: git add failed" >&2 7 | fi 8 | elif [ "$VCS" = hg ]; then 9 | if ! hg add .; then 10 | echo "etckeeper warning: hg add failed" >&2 11 | fi 12 | elif [ "$VCS" = bzr ]; then 13 | if ! bzr add .; then 14 | echo "etckeeper warning: bzr add failed" >&2 15 | fi 16 | elif [ "$VCS" = darcs ]; then 17 | # Don't warn if all the files were already added. 18 | rc=0 19 | res=$( darcs add -qr . 2>&1 ) || rc=$? 20 | if test $rc -ne 0; then 21 | if ! test $rc -eq 2 -a "${res%No files were added}" != "$res"; then 22 | printf "%s" "$res" 23 | echo "etckeeper warning: darcs add failed" >&2 24 | fi 25 | fi 26 | unset rc res 27 | fi 28 | -------------------------------------------------------------------------------- /post-install.d/50vcs-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | pl="/var/cache/etckeeper/packagelist" 5 | 6 | if etckeeper unclean; then 7 | message="committing changes in /etc after $HIGHLEVEL_PACKAGE_MANAGER run" 8 | 9 | set +e 10 | if [ -e $pl.pre-install ] && [ "$(cat $pl.fmt 2>/dev/null || true)" = "$(etckeeper list-installed fmt)" ]; then 11 | ( 12 | echo "$message" 13 | echo 14 | echo "Package changes:" 15 | etckeeper list-installed | diff -U0 $pl.pre-install - | tail -n+4 | egrep '^[-+]' || true 16 | ) | etckeeper commit --stdin 17 | else 18 | etckeeper commit "$(printf "$message")" 19 | fi 20 | status=$? 21 | set -e 22 | 23 | if [ "$status" != 0 ]; then 24 | echo "warning: etckeeper failed to commit changes in /etc using $VCS" >&2 25 | fi 26 | fi 27 | 28 | rm -f $pl.pre-install $pl.fmt 29 | -------------------------------------------------------------------------------- /list-installed.d/50list-installed: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | if [ "$1" = fmt ]; then 3 | # If the list format changes, change the fmt 4 | if [ "$LOWLEVEL_PACKAGE_MANAGER" = dpkg ]; then 5 | echo 2 6 | else 7 | echo "" 8 | fi 9 | else 10 | # Output to stdout a *sorted* list of all currently installed 11 | # (or removed but still with config-files) packages, in the 12 | # format "package version\n" (or something similar). 13 | if [ "$LOWLEVEL_PACKAGE_MANAGER" = dpkg ]; then 14 | dpkg-query -W -f '${Status}\t${Package} ${Version} ${Architecture}\n' | \ 15 | egrep '(ok installed|ok config-files)' | cut -f2,3 16 | elif [ "$LOWLEVEL_PACKAGE_MANAGER" = rpm ]; then 17 | rpm -qa --qf "%|epoch?{%{epoch}}:{0}|:%{name}-%{version}-%{release}.%{arch}\n" | sort 18 | elif [ "$LOWLEVEL_PACKAGE_MANAGER" = pacman ]; then 19 | pacman -Q 20 | fi 21 | fi 22 | -------------------------------------------------------------------------------- /debian/postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | if [ "$1" = purge ]; then 5 | if [ -e /etc/.etckeeper ]; then 6 | . /usr/share/debconf/confmodule 7 | 8 | # uninit on purge is tricky because etckeeper's configuration 9 | # and code has been removed at this point. This relies on a 10 | # stashed away copy. 11 | if [ -e /var/cache/etckeeper/stash/etckeeper.conf ] && 12 | [ -d /var/cache/etckeeper/stash/uninit.d ] && 13 | [ -x /var/cache/etckeeper/stash/etckeeper ]; then 14 | . /var/cache/etckeeper/stash/etckeeper.conf 15 | if [ -n "$VCS" ]; then 16 | db_subst etckeeper/purge VCS "$VCS" 17 | db_input critical etckeeper/purge || true 18 | db_go || true 19 | db_get etckeeper/purge 20 | if [ "$RET" = true ]; then 21 | ETCKEEPER_CONF_DIR=/var/cache/etckeeper/stash 22 | export ETCKEEPER_CONF_DIR 23 | /var/cache/etckeeper/stash/etckeeper uninit -f || true 24 | fi 25 | fi 26 | fi 27 | fi 28 | rm -rf /var/cache/etckeeper 29 | fi 30 | 31 | #DEBHELPER# 32 | -------------------------------------------------------------------------------- /doc/index.mdwn: -------------------------------------------------------------------------------- 1 | etckeeper is a collection of tools to let `/etc` be stored in a git, 2 | mercurial, bazaar or darcs repository. This lets you use git to review or 3 | revert changes that were made to `/etc`. Or even push the repository 4 | elsewhere for backups or cherry-picking configuration changes. 5 | 6 | It hooks into package managers like apt to automatically commit changes 7 | made to /etc during package upgrades. It tracks file metadata that git does 8 | not normally support, but that is important for /etc, such as the 9 | permissions of `/etc/shadow`. 10 | 11 | It's quite modular and configurable, while also being simple to use if you 12 | understand the basics of working with version control. 13 | 14 | 15 | 16 | 17 | 18 | [[!sidebar content=""" 19 | [[README]] 20 | [[install]] 21 | [[news]] 22 | [[todo]] 23 | [Flattr this](http://flattr.com/thing/39940/etckeeper) 24 | """]] 25 | -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | Source: etckeeper 2 | Section: admin 3 | Priority: optional 4 | Build-Depends: debhelper (>= 7), dpkg-dev (>= 1.9.0), bzr (>= 1.5~), python, dh-python 5 | Maintainer: Debian QA Group 6 | Standards-Version: 3.9.4 7 | XS-Python-Version: all 8 | Vcs-Git: git://git.joeyh.name/etckeeper 9 | Homepage: http://etckeeper.branchable.com/ 10 | 11 | Package: etckeeper 12 | Architecture: all 13 | Section: admin 14 | Depends: git (>= 1:1.7) | mercurial | bzr (>= 1.5~) | darcs, ${misc:Depends} 15 | Recommends: cron-daemon 16 | Suggests: sudo (>= 1.7.4p4) 17 | Conflicts: bzr (<< 1.5~) 18 | Description: store /etc in git, mercurial, bzr or darcs 19 | The etckeeper program is a tool to let /etc be stored in a git, mercurial, 20 | bzr or darcs repository. It hooks into APT to automatically commit changes 21 | made to /etc during package upgrades. It tracks file metadata that version 22 | control systems do not normally support, but that is important for /etc, such 23 | as the permissions of /etc/shadow. It's quite modular and configurable, while 24 | also being simple to use if you understand the basics of working with version 25 | control. 26 | -------------------------------------------------------------------------------- /doc/todo/track_multiple_directories/comment_4_50fad97b58a7f1875092c7acb3f3acd8._comment: -------------------------------------------------------------------------------- 1 | [[!comment format=mdwn 2 | username="https://www.google.com/accounts/o8/id?id=AItOawlCXirWXlbn1_Ma9G5w3KYILEmb75-I9Do" 3 | nickname="Salve J." 4 | subject="On putting everything in /etc" 5 | date="2014-12-30T15:38:19Z" 6 | content=""" 7 | Yes, it's *easy* to put everything in /etc. But sometimes it's also *wrong* to do so (eg. for templates, some application-specific config, app localization files, etc.). And sometimes it's not *possible* to do so (eg. for 3rd party applications where we need to keep track of changes). Sometimes I (the dev/admin) have full control of the workflow, other times I don't. There's a LOT of crazy stuff out there (not all in /etc), and having something like etckeeper help keep track of changes would make life a lot easier for people. 8 | 9 | But perhaps more importantly, there are people out there (myself included) who would love to use etckeeper in this way, but who would prefer this feature was committed to \"upstream\" (your git repo) instead of having to manage a fork of the project in order to get things done. 10 | 11 | I hope you understand. 12 | """]] 13 | -------------------------------------------------------------------------------- /etckeeper-dnf/etckeeper.py: -------------------------------------------------------------------------------- 1 | # etckeeper.py, support etckeeper for dnf 2 | # 3 | # Copyright (C) 2014 Peter Listiak 4 | # https://github.com/plistiak/dnf-etckeeper 5 | # 6 | # Later modifications by Petr Spacek: 7 | # Distutils code below was copied from etckeeper-bzr distributed with v1.15 8 | # 9 | 10 | from dnfpluginscore import logger 11 | 12 | import os 13 | import dnf 14 | 15 | 16 | class Etckeeper(dnf.Plugin): 17 | 18 | name = 'etckeeper' 19 | 20 | def _out(self, msg): 21 | logger.debug('Etckeeper plugin: %s', msg) 22 | 23 | def resolved(self): 24 | self._out('pre transaction commit') 25 | command = '%s %s' % ('etckeeper', " pre-install") 26 | ret = os.system(command) 27 | if ret != 0: 28 | raise dnf.exceptions.Error('etckeeper returned %d' % (ret >> 8)) 29 | 30 | def transaction(self): 31 | self._out('post transaction commit') 32 | command = '%s %s > /dev/null' % ('etckeeper', "post-install") 33 | os.system(command) 34 | 35 | if __name__ == "__main__": 36 | from distutils.core import setup 37 | setup(name="dnf-etckeeper", 38 | packages=["dnf-plugins"], 39 | package_dir={"dnf-plugins":"etckeeper-dnf"}) 40 | -------------------------------------------------------------------------------- /pre-commit.d/20warn-problem-files: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | exclude_internal () { 5 | egrep -v '(^|/)(.git|.hg|.bzr|_darcs)/' 6 | } 7 | 8 | if [ "$VCS" = bzr ] || [ "$VCS" = darcs ]; then 9 | special=$(find . ! -type d ! -type f ! -type l | exclude_internal) || true 10 | hardlinks=$(find . -type f ! -links 1 | exclude_internal ) || true 11 | elif [ "$VCS" = hg ]; then 12 | special=$(find . ! -type d ! -type f ! -type l | exclude_internal) || true 13 | hardlinks=$(find . -type f ! -links 1 -exec hg status {} \; | exclude_internal ) || true 14 | elif [ "$VCS" = git ]; then 15 | special=$(find . ! -type d ! -type f ! -type l -exec git ls-files --exclude-standard --cached --others {} \; | exclude_internal) || true 16 | hardlinks=$(find . -type f ! -links 1 -exec git ls-files --exclude-standard --cached --others {} \; | exclude_internal) || true 17 | else 18 | special="" 19 | fi 20 | 21 | if [ -n "$special" ] && [ -z "$AVOID_SPECIAL_FILE_WARNING" ]; then 22 | echo "etckeeper warning: special files could cause problems with $VCS:" >&2 23 | echo "$special" >&2 24 | fi 25 | if [ -n "$hardlinks" ] && [ -z "$AVOID_SPECIAL_FILE_WARNING" ]; then 26 | echo "etckeeper warning: hardlinked files could cause problems with $VCS:" >&2 27 | echo "$hardlinks" >&2 28 | fi 29 | 30 | true 31 | -------------------------------------------------------------------------------- /etckeeper-bzr/__init__.py: -------------------------------------------------------------------------------- 1 | # 2 | # Bazaar plugin that runs etckeeper pre-commit when necessary 3 | 4 | """Runs etckeeper pre-commit when necessary.""" 5 | 6 | from bzrlib.errors import BzrError 7 | import os 8 | 9 | def etckeeper_startcommit_hook(tree): 10 | abspath = getattr(tree, "abspath", None) 11 | if abspath is None or not os.path.exists(abspath(".etckeeper")): 12 | # Only run the commit hook when this is an etckeeper branch 13 | return 14 | import subprocess 15 | ret = subprocess.call(["etckeeper", "pre-commit", abspath(".")]) 16 | if ret != 0: 17 | raise BzrError("etckeeper pre-commit failed") 18 | 19 | try: 20 | from bzrlib.hooks import install_lazy_named_hook 21 | except ImportError: 22 | from bzrlib.mutabletree import MutableTree 23 | MutableTree.hooks.install_named_hook('start_commit', 24 | etckeeper_startcommit_hook, 'etckeeper') 25 | else: 26 | install_lazy_named_hook( 27 | "bzrlib.mutabletree", "MutableTree.hooks", 28 | 'start_commit', etckeeper_startcommit_hook, 'etckeeper') 29 | 30 | if __name__ == "__main__": 31 | from distutils.core import setup 32 | setup(name="bzr-etckeeper", 33 | packages=["bzrlib.plugins.etckeeper"], 34 | package_dir={"bzrlib.plugins.etckeeper":"etckeeper-bzr"}) 35 | -------------------------------------------------------------------------------- /uninit.d/50vcs-uninit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | if [ "$VCS" = git ]; then 5 | rm -rf .git 6 | file=.gitignore 7 | elif [ "$VCS" = hg ]; then 8 | rm -rf .hg 9 | file=.hgignore 10 | elif [ "$VCS" = bzr ]; then 11 | rm -rf .bzr 12 | file=.bzrignore 13 | elif [ "$VCS" = darcs ]; then 14 | rm -rf _darcs 15 | file=.darcsignore 16 | fi 17 | 18 | managed_by_etckeeper="managed by etckeeper" 19 | 20 | if ! grep -q "$managed_by_etckeeper" "$file"; then 21 | exit 0 22 | else 23 | realfile="$file" 24 | if which tempfile >/dev/null 2>&1 || type tempfile >/dev/null 2>&1; then 25 | tempfile="tempfile" 26 | elif which mktemp >/dev/null 2>&1 || type mktemp >/dev/null 2>&1; then 27 | tempfile="mktemp" 28 | else 29 | echo "etckeeper warning: can't find tempfile or mktemp" >&2 30 | exit 1 31 | fi 32 | file=$($tempfile) 33 | otherentries= 34 | skipping= 35 | while read -r line; do 36 | if echo "$line" | grep -q "$managed_by_etckeeper"; then 37 | if [ ! "$skipping" ]; then 38 | skipping=1 39 | else 40 | skipping= 41 | fi 42 | elif [ ! "$skipping" ]; then 43 | echo "$line" >> "$file" 44 | otherentries=1 45 | fi 46 | done <"$realfile" 47 | 48 | if [ "$otherentries" ]; then 49 | mv -f "$file" "$realfile" 50 | else 51 | rm -f "$file" 52 | rm -f "$realfile" 53 | fi 54 | fi 55 | -------------------------------------------------------------------------------- /yum-etckeeper.py: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | # author: jtang@tchpc.tcd.ie 4 | # 5 | # this plugin is based on the hello world example 6 | # from http://yum.baseurl.org/wiki/WritingYumPlugins 7 | # 8 | # to install, copy this file to /usr/lib/yum-plugins/etckeeper.py 9 | # and then create /etc/yum/pluginconf.d/etckeeper.conf with the contents 10 | # below. 11 | # 12 | # /etc/yum/pluginconf.d/etckeeper.conf: 13 | # [main] 14 | # enabled=1 15 | # 16 | 17 | import os 18 | from glob import fnmatch 19 | 20 | import yum 21 | from yum.plugins import PluginYumExit, TYPE_CORE 22 | 23 | requires_api_version = '2.1' 24 | plugin_type = (TYPE_CORE,) 25 | 26 | def pretrans_hook(conduit): 27 | conduit.info(2, 'etckeeper: pre transaction commit') 28 | servicecmd = conduit.confString('main', 'servicecmd', '/usr/bin/etckeeper') 29 | command = '%s %s' % (servicecmd, " pre-install") 30 | ret = os.system(command) 31 | if ret != 0: 32 | raise PluginYumExit('etckeeper returned %d' % (ret >> 8)) 33 | 34 | def posttrans_hook(conduit): 35 | conduit.info(2, 'etckeeper: post transaction commit') 36 | if os.path.exists('/usr/bin/etckeeper'): 37 | servicecmd = conduit.confString('main', 'servicecmd', '/usr/bin/etckeeper') 38 | command = '%s %s > /dev/null' % (servicecmd, "post-install") 39 | os.system(command) 40 | -------------------------------------------------------------------------------- /zypper-etckeeper.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import errno 4 | import subprocess 5 | import zypp_plugin 6 | import os 7 | 8 | def _call_etckeeper(install_arg): 9 | # zypper interprets the plugin's stdout as described in 10 | # http://doc.opensuse.org/projects/libzypp/HEAD/zypp-plugins.html so it's 11 | # important that we don't write anything to it. We therefore redirect 12 | # etckeeper's stdout to the plugin's stderr. Since zypper writes the 13 | # stderr of plugins to its log file, etckeeper's stdout will go there as 14 | # well. 15 | 16 | subprocess.call(['etckeeper', install_arg], stdout=2) 17 | 18 | 19 | class EtckeeperPlugin(zypp_plugin.Plugin): 20 | def PLUGINBEGIN(self, headers, body): 21 | _call_etckeeper('pre-install') 22 | self.ack() 23 | 24 | def PLUGINEND(self, headers, body): 25 | try: 26 | _call_etckeeper('post-install') 27 | except OSError as e: 28 | # if etckeeper was just removed, executing it will fail with 29 | # ENOENT 30 | if e.errno != errno.ENOENT: 31 | # reraise so that we don't hide other errors than etckeeper 32 | # not existing 33 | raise 34 | self.ack() 35 | 36 | 37 | os.environ["LANG"] = "C" 38 | plugin = EtckeeperPlugin() 39 | plugin.main() 40 | -------------------------------------------------------------------------------- /etckeeper.conf: -------------------------------------------------------------------------------- 1 | # The VCS to use. 2 | #VCS="hg" 3 | VCS="git" 4 | #VCS="bzr" 5 | #VCS="darcs" 6 | 7 | # Options passed to git commit when run by etckeeper. 8 | GIT_COMMIT_OPTIONS="" 9 | 10 | # Options passed to hg commit when run by etckeeper. 11 | HG_COMMIT_OPTIONS="" 12 | 13 | # Options passed to bzr commit when run by etckeeper. 14 | BZR_COMMIT_OPTIONS="" 15 | 16 | # Options passed to darcs record when run by etckeeper. 17 | DARCS_COMMIT_OPTIONS="-a" 18 | 19 | # Uncomment to avoid etckeeper committing existing changes 20 | # to /etc automatically once per day. 21 | #AVOID_DAILY_AUTOCOMMITS=1 22 | 23 | # Uncomment the following to avoid special file warning 24 | # (the option is enabled automatically by cronjob regardless). 25 | #AVOID_SPECIAL_FILE_WARNING=1 26 | 27 | # Uncomment to avoid etckeeper committing existing changes to 28 | # /etc before installation. It will cancel the installation, 29 | # so you can commit the changes by hand. 30 | #AVOID_COMMIT_BEFORE_INSTALL=1 31 | 32 | # The high-level package manager that's being used. 33 | # (apt, pacman-g2, yum, dnf, zypper etc) 34 | HIGHLEVEL_PACKAGE_MANAGER= 35 | 36 | # The low-level package manager that's being used. 37 | # (dpkg, rpm, pacman, pacman-g2, etc) 38 | LOWLEVEL_PACKAGE_MANAGER= 39 | 40 | # To push each commit to a remote, put the name of the remote here. 41 | # (eg, "origin" for git). Space-separated lists of multiple remotes 42 | # also work (eg, "origin gitlab github" for git). 43 | PUSH_REMOTE="" 44 | -------------------------------------------------------------------------------- /init.d/60darcs-deleted-symlinks: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | filter_ignore() { 5 | if [ "$VCS" = darcs ]; then 6 | ignorefile=.darcsignore 7 | fi 8 | 9 | if [ "$VCS" = darcs ] && [ -e "$ignorefile" ]; then 10 | # Spaces embedded into patterns would break it. 11 | # But really, why would anyone want to use ' ' instead of '\s' ? 12 | #patterns=$( grep -v '^[[:space:]]*\(#\|$\)' "$ignorefile" | xargs -n 1 printf " -e %s" ) 13 | #grep -Ev $patterns 14 | #unset patterns 15 | # Alternative using a temp file 16 | patternsfile="$( mktemp -t etckeeper-$VCS.XXXXXXXXXX )" 17 | grep -v '^[[:space:]]*\(#\|$\)' "$ignorefile" > "$patternsfile" || true 18 | grep -Evf "$patternsfile" 19 | rm -f "$patternsfile" 20 | unset patternsfile 21 | else 22 | cat - 23 | fi 24 | } 25 | 26 | 27 | if [ "$VCS" = darcs ];then 28 | NOVCS='. -path ./.git -prune -o -path ./.bzr -prune -o -path ./.hg -prune -o -path ./_darcs -prune -o' 29 | 30 | # We assume that if .etckeeper is empty this is the first run 31 | if [ -s .etckeeper ]; then 32 | linksindex="$( mktemp -t etckeeper-$VCS.XXXXXXXXXX )" 33 | grep '^ln -s' .etckeeper | while IFS="'" read n n n link n; do 34 | printf "%s\n" "$link" >> "$linksindex" 35 | done 36 | 37 | # Warn about symbolic links that shouldn't exist 38 | if links=$( find $NOVCS -type l -print | filter_ignore | grep -vFf "$linksindex" ); then 39 | printf "%s\n%s\n" \ 40 | "The following symbolic links should not exist:" \ 41 | "$links" >&2 42 | fi 43 | 44 | rm -f "$linksindex" 45 | unset links linksindex 46 | fi 47 | 48 | fi 49 | -------------------------------------------------------------------------------- /debian/po/templates.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: PACKAGE VERSION\n" 10 | "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" 11 | "POT-Creation-Date: 2009-05-06 14:41-0400\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=CHARSET\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | 19 | #. Type: error 20 | #. Description 21 | #: ../templates:2001 22 | msgid "Commit failed" 23 | msgstr "" 24 | 25 | #. Type: error 26 | #. Description 27 | #: ../templates:2001 28 | msgid "An attempt to commit /etc changes to ${VCS} failed." 29 | msgstr "" 30 | 31 | #. Type: error 32 | #. Description 33 | #: ../templates:2001 34 | msgid "" 35 | "You may manually resolve the issues with the uncommitted changes before " 36 | "continuing." 37 | msgstr "" 38 | 39 | #. Type: boolean 40 | #. Description 41 | #: ../templates:3001 42 | msgid "Remove etckeeper ${VCS} repository and associated files?" 43 | msgstr "" 44 | 45 | #. Type: boolean 46 | #. Description 47 | #: ../templates:3001 48 | msgid "" 49 | "Etckeeper is being purged from the system, and was used to store /etc in a " 50 | "${VCS} repository. If you choose to remove the repository, this will DESTROY " 51 | "all history etckeeper has recorded for /etc." 52 | msgstr "" 53 | -------------------------------------------------------------------------------- /init.d/50vcs-pre-commit-hook: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | case "$VCS" in 5 | git) 6 | if [ -x .git/hooks/pre-commit ]; then 7 | if ! grep -q "etckeeper pre-commit" .git/hooks/pre-commit; then 8 | echo "etckeeper warning: .git/hooks/pre-commit needs to be manually modified to run: etckeeper pre-commit -d `pwd`" >&2 9 | fi 10 | else 11 | cat >.git/hooks/pre-commit <&2 24 | fi 25 | else 26 | touch .hg/hgrc 27 | cat >>.hg/hgrc <&2 39 | fi 40 | else 41 | cat >_darcs/prefs/defaults < 2 | # This file is distributed under the same license as etckeeper package. 3 | # Hideki Yamane (Debian-JP) , 2008-2009. 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: etckeeper 0.35\n" 8 | "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" 9 | "POT-Creation-Date: 2009-05-06 14:41-0400\n" 10 | "PO-Revision-Date: 2009-05-09 19:26+0900\n" 11 | "Last-Translator: Hideki Yamane (Debian-JP) \n" 12 | "Language-Team: Japanese \n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=UTF-8\n" 15 | "Content-Transfer-Encoding: 8bit\n" 16 | 17 | #. Type: error 18 | #. Description 19 | #: ../templates:2001 20 | msgid "Commit failed" 21 | msgstr "コミットに失敗しました" 22 | 23 | #. Type: error 24 | #. Description 25 | #: ../templates:2001 26 | msgid "An attempt to commit /etc changes to ${VCS} failed." 27 | msgstr "/etc の変更を ${VCS} にコミットしようとしましたが失敗しました。" 28 | 29 | #. Type: error 30 | #. Description 31 | #: ../templates:2001 32 | msgid "" 33 | "You may manually resolve the issues with the uncommitted changes before " 34 | "continuing." 35 | msgstr "" 36 | "続ける前に、この問題とコミットされていない変更について、手動で解決する必要が" 37 | "あるでしょう。" 38 | 39 | #. Type: boolean 40 | #. Description 41 | #: ../templates:3001 42 | msgid "Remove etckeeper ${VCS} repository and associated files?" 43 | msgstr "etckeeper の$ {VCS} リポジトリおよび関連ファイルを削除しますか?" 44 | 45 | #. Type: boolean 46 | #. Description 47 | #: ../templates:3001 48 | msgid "" 49 | "Etckeeper is being purged from the system, and was used to store /etc in a " 50 | "${VCS} repository. If you choose to remove the repository, this will DESTROY " 51 | "all history etckeeper has recorded for /etc." 52 | msgstr "" 53 | "Etckeeper はシステムから完全に削除されようとしており、/etc の保存には ${VCS} " 54 | "リポジトリを利用していました。リポジトリを削除すると、/etc について etckeeper " 55 | "が記録してた全ての履歴は「破壊」されます。" 56 | 57 | -------------------------------------------------------------------------------- /debian/po/pl.po: -------------------------------------------------------------------------------- 1 | # Polish translation 2 | # Copyright (C) 2010 3 | # This file is distributed under the same license as the etckeeper package. 4 | # Artur R. Czechowski , 2010 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: etckeeper 0.50\n" 9 | "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" 10 | "POT-Creation-Date: 2009-05-06 14:41-0400\n" 11 | "PO-Revision-Date: 2010-12-19 20:07+0100\n" 12 | "Last-Translator: Artur R. Czechowski \n" 13 | "Language-Team: Polish \n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=utf-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | 18 | #. Type: error 19 | #. Description 20 | #: ../templates:2001 21 | msgid "Commit failed" 22 | msgstr "Błąd zapisu." 23 | 24 | #. Type: error 25 | #. Description 26 | #: ../templates:2001 27 | msgid "An attempt to commit /etc changes to ${VCS} failed." 28 | msgstr "Nieudana próba zapisania zmian przy użyciu ${VCS}" 29 | 30 | #. Type: error 31 | #. Description 32 | #: ../templates:2001 33 | msgid "You may manually resolve the issues with the uncommitted changes before continuing." 34 | msgstr "Przed kontynuacją możesz ręcznie rozwiązać problemy z niezapisanymi zmianami." 35 | 36 | #. Type: boolean 37 | #. Description 38 | #: ../templates:3001 39 | msgid "Remove etckeeper ${VCS} repository and associated files?" 40 | msgstr "Usunąć repozytorium etckeeper ${VCS} i powiązane pliki?" 41 | 42 | #. Type: boolean 43 | #. Description 44 | #: ../templates:3001 45 | msgid "Etckeeper is being purged from the system, and was used to store /etc in a ${VCS} repository. If you choose to remove the repository, this will DESTROY all history etckeeper has recorded for /etc." 46 | msgstr "Etckeeper jest usuwany z systemu, ale był używany do przechowywania zawartości katalogu /etc w repozytorium ${VCS}. Jeśli wybierzesz usunięcie repozytorium, historia zmian zapisana dla katalogu /etc zostanie BEZPOWROTNIE USUNIĘTA." 47 | 48 | -------------------------------------------------------------------------------- /doc/todo/track_multiple_directories/comment_2_042f7831f641c66396ef38c912692ae3._comment: -------------------------------------------------------------------------------- 1 | [[!comment format=mdwn 2 | username="https://www.google.com/accounts/o8/id?id=AItOawlCXirWXlbn1_Ma9G5w3KYILEmb75-I9Do" 3 | nickname="Salve J." 4 | subject="track multiple directories = good" 5 | date="2014-12-23T05:26:22Z" 6 | content=""" 7 | Allright, here's my use case. 8 | 9 | I have some applications i develop, where others now and then update its configurations. These applications may be installed using the packaging system in use on that machine (we make RPM and DEB packages), and that the accompaning \"configuration files\" might include templates, customer configuration files, documentation, and lots of other things that are deemed safe by $bosses to be \"safe for editing\". Some of these files are in /etc, most are not. The important thing is that they are regular text files.I' 10 | 11 | I also have some other regular services that have all their important/useful files outside /etc (e.g. our BIND installation, which has their zone files deep in some directory in /usr/local/etc somewhere). I'd like to track changes in those files too, with the useful features etckeeper do so well. 12 | 13 | For me, the important thing is to make sure that when someone does something stupid (as people sometimes do, myself included), that we have an easy undo facility to rely on. I think etckeeper would fit this role nicely, because etckeeper helps checking for uncommitted files in lots of useful situations, and does the committing if some of us happen to forget to do it. This means we get to have an \"undo button\" that actually WORKS (since stuff is actually committed!). I like that. 14 | 15 | Now, how would this actually be managed by etckeeper? No idea, but I'm happy to help and have a conversation around this. Maybe the best way is to allow for several etckeeper \"instances\" to run independently. Maybe it's a simple feature for defining a list of directories to check... 16 | 17 | Hope this gives you an idea of what I tried to do with my pull request at https://github.com/joeyh/etckeeper/pull/2 18 | 19 | -- Salve 20 | 21 | """]] 22 | -------------------------------------------------------------------------------- /debian/po/vi.po: -------------------------------------------------------------------------------- 1 | # Vietnamese translation for ETC Keeper. 2 | # Copyright © 2010 Free Software Foundation, Inc. 3 | # Clytie Siddall , 2007-2010. 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: etckeeper 0.50\n" 8 | "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" 9 | "POT-Creation-Date: 2009-05-06 14:41-0400\n" 10 | "PO-Revision-Date: 2010-10-31 13:59+1030\n" 11 | "Last-Translator: Clytie Siddall \n" 12 | "Language-Team: Vietnamese \n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=UTF-8\n" 15 | "Content-Transfer-Encoding: 8bit\n" 16 | "Plural-Forms: nplurals=1; plural=0;\n" 17 | "X-Generator: LocFactoryEditor 1.8\n" 18 | 19 | #: ../templates:2001 20 | #. Type: error 21 | #. Description 22 | msgid "Commit failed" 23 | msgstr "Lỗi ghi chép" 24 | 25 | #: ../templates:2001 26 | #. Type: error 27 | #. Description 28 | #| msgid "An attempt to commit /etc changes to git failed." 29 | msgid "An attempt to commit /etc changes to ${VCS} failed." 30 | msgstr "Gặp lỗi khi thử ghi chép vào ${VCS} các thay đổi trong « /etc »." 31 | 32 | #: ../templates:2001 33 | #. Type: error 34 | #. Description 35 | msgid "" 36 | "You may manually resolve the issues with the uncommitted changes before " 37 | "continuing." 38 | msgstr "" 39 | "Bạn cũng có thể tự giải quyết vấn đề về các thay đổi chưa ghi chép, trước khi tiếp tục." 40 | 41 | #: ../templates:3001 42 | #. Type: boolean 43 | #. Description 44 | msgid "Remove etckeeper ${VCS} repository and associated files?" 45 | msgstr "Gỡ bỏ kho lưu ${VCS} etckeeper và các tập tin tương ứng ?" 46 | 47 | #: ../templates:3001 48 | #. Type: boolean 49 | #. Description 50 | msgid "" 51 | "Etckeeper is being purged from the system, and was used to store /etc in a " 52 | "${VCS} repository. If you choose to remove the repository, this will DESTROY " 53 | "all history etckeeper has recorded for /etc." 54 | msgstr "Gói etckeeper đang bị tẩy khỏi hệ thống: nó từng được sử dụng để lưu trữ « /etc » vào một kho ${VCS}. Sự chọn gỡ bỏ kho lưu này thì HỦY toàn bộ lịch sử được etckeeper giữ đối với « /etc »." 55 | -------------------------------------------------------------------------------- /debian/po/da.po: -------------------------------------------------------------------------------- 1 | # Danish translation etckeeper. 2 | # Copyright (C) 2010 etckeeper & nedenst??ende overs??ttere. 3 | # This file is distributed under the same license as the etckeeper package. 4 | # Joe Hansen , 2010. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: etckeeper\n" 9 | "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" 10 | "POT-Creation-Date: 2009-05-06 14:41-0400\n" 11 | "PO-Revision-Date: 2010-09-22 17:30+01:00\n" 12 | "Last-Translator: Joe Hansen \n" 13 | "Language-Team: Danish \n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | 18 | #. Type: error 19 | #. Description 20 | #: ../templates:2001 21 | msgid "Commit failed" 22 | msgstr "Indsendelse (commit) mislykkedes" 23 | 24 | #. Type: error 25 | #. Description 26 | #: ../templates:2001 27 | msgid "An attempt to commit /etc changes to ${VCS} failed." 28 | msgstr "Et fors??g p?? at indsende (commit) /etc-??ndringer til ${VCS} mislykkedes." 29 | 30 | #. Type: error 31 | #. Description 32 | #: ../templates:2001 33 | msgid "" 34 | "You may manually resolve the issues with the uncommitted changes before " 35 | "continuing." 36 | msgstr "" 37 | "Du skal manuelt l??se problemstillingerne med de ikke indsendte (uncommitted) " 38 | "??ndringer, f??r du forts??tter." 39 | 40 | #. Type: boolean 41 | #. Description 42 | #: ../templates:3001 43 | msgid "Remove etckeeper ${VCS} repository and associated files?" 44 | msgstr "Fjern etckeeper ${VCS}-arkiv og associerede filer?" 45 | 46 | #. Type: boolean 47 | #. Description 48 | #: ../templates:3001 49 | msgid "" 50 | "Etckeeper is being purged from the system, and was used to store /etc in a " 51 | "${VCS} repository. If you choose to remove the repository, this will DESTROY " 52 | "all history etckeeper has recorded for /etc." 53 | msgstr "" 54 | "Etckeeper afinstalleres fra systemet, og blev brugt til at gemme /etc i et " 55 | "${VCS}-arkiv. Hvis du v??lger at fjerne arkivet, vil dette ??DEL??GGE al historik " 56 | "som etckeeper har optaget for /etc." 57 | 58 | -------------------------------------------------------------------------------- /debian/po/pt.po: -------------------------------------------------------------------------------- 1 | # translation of etckeeper debconf to Portuguese 2 | # Copyright (C) 2007 the etckeeper's copyright holder 3 | # This file is distributed under the same license as the etckeeper package. 4 | # 5 | # Américo Monteiro , 2007, 2009. 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: etckeeper 0.35\n" 9 | "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" 10 | "POT-Creation-Date: 2009-05-06 14:41-0400\n" 11 | "PO-Revision-Date: 2009-05-10 22:10+0100\n" 12 | "Last-Translator: Américo Monteiro \n" 13 | "Language-Team: Portuguese \n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "X-Generator: KBabel 1.11.4\n" 18 | 19 | #. Type: error 20 | #. Description 21 | #: ../templates:2001 22 | msgid "Commit failed" 23 | msgstr "Submissão falhou" 24 | 25 | #. Type: error 26 | #. Description 27 | #: ../templates:2001 28 | msgid "An attempt to commit /etc changes to ${VCS} failed." 29 | msgstr "A tentativa de submeter as alterações de /etc ao ${VCS} falhou." 30 | 31 | #. Type: error 32 | #. Description 33 | #: ../templates:2001 34 | msgid "" 35 | "You may manually resolve the issues with the uncommitted changes before " 36 | "continuing." 37 | msgstr "" 38 | "Você pode resolver manualmente as situações com as alterações não submetidas " 39 | "antes de continuar. " 40 | 41 | #. Type: boolean 42 | #. Description 43 | #: ../templates:3001 44 | msgid "Remove etckeeper ${VCS} repository and associated files?" 45 | msgstr "Remover o repositório ${VCS} do etckeeper e os ficheiros associados?" 46 | 47 | #. Type: boolean 48 | #. Description 49 | #: ../templates:3001 50 | msgid "" 51 | "Etckeeper is being purged from the system, and was used to store /etc in a " 52 | "${VCS} repository. If you choose to remove the repository, this will DESTROY " 53 | "all history etckeeper has recorded for /etc." 54 | msgstr "" 55 | "O etckeeper está a ser purgado do sistema, e foi usado para guardar o /etc num " 56 | "repositório ${VCS}. Se escolher remover o repositório, isto irá DESTRUIR todo " 57 | "o histórico que o etckeeper guardou de /etc." 58 | 59 | -------------------------------------------------------------------------------- /debian/po/sv.po: -------------------------------------------------------------------------------- 1 | # translation of etckeeper_0.20_sv.po to Swedish 2 | # etckeeper. 3 | # Copyright (C) 2008 4 | # This file is distributed under the same license as the etckeeper package. 5 | # 6 | # Martin Ågren , 2008. 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: etckeeper_0.20_sv\n" 10 | "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" 11 | "POT-Creation-Date: 2009-05-06 14:41-0400\n" 12 | "PO-Revision-Date: 2009-05-12 20:08+0100\n" 13 | "Last-Translator: Martin Bagge \n" 14 | "Language-Team: Swedish \n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "X-Generator: KBabel 1.11.4\n" 19 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 20 | 21 | #. Type: error 22 | #. Description 23 | #: ../templates:2001 24 | msgid "Commit failed" 25 | msgstr "Verkställning misslyckades" 26 | 27 | #. Type: error 28 | #. Description 29 | #: ../templates:2001 30 | msgid "An attempt to commit /etc changes to ${VCS} failed." 31 | msgstr "Ett försök att verkställa ändringar i /etc i ${VCS} misslyckades." 32 | 33 | #. Type: error 34 | #. Description 35 | #: ../templates:2001 36 | msgid "" 37 | "You may manually resolve the issues with the uncommitted changes before " 38 | "continuing." 39 | msgstr "" 40 | "Du kan lösa problemen med de overkställda ändringarna manuellt innan du " 41 | "fortsätter." 42 | 43 | #. Type: boolean 44 | #. Description 45 | #: ../templates:3001 46 | msgid "Remove etckeeper ${VCS} repository and associated files?" 47 | msgstr "Ska ${VCS}-förrådet för etckeeper och alla tillhörande filer tas bort?" 48 | 49 | #. Type: boolean 50 | #. Description 51 | #: ../templates:3001 52 | msgid "" 53 | "Etckeeper is being purged from the system, and was used to store /etc in a " 54 | "${VCS} repository. If you choose to remove the repository, this will DESTROY " 55 | "all history etckeeper has recorded for /etc." 56 | msgstr "" 57 | "Etckeeper håller på att tas bort från systemet, användningsområdet för " 58 | "etckeeper är att spara /etc i ett ${VCS}-förråd. Om du väljer att ta bort " 59 | "förrådet kommer all historik för /etc att raderas." 60 | -------------------------------------------------------------------------------- /debian/po/pt_BR.po: -------------------------------------------------------------------------------- 1 | # Debconf translations for etckeeper. 2 | # Copyright (C) 2012 THE etckeeper'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the etckeeper package. 4 | # Adriano Rafael Gomes , 2012. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: etckeeper 0.63\n" 9 | "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" 10 | "POT-Creation-Date: 2009-05-06 14:41-0400\n" 11 | "PO-Revision-Date: 2012-08-21 11:15-0300\n" 12 | "Last-Translator: Adriano Rafael Gomes \n" 13 | "Language-Team: Brazilian Portuguese \n" 15 | "Language: pt_BR\n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | 20 | #. Type: error 21 | #. Description 22 | #: ../templates:2001 23 | msgid "Commit failed" 24 | msgstr "Envio falhou" 25 | 26 | #. Type: error 27 | #. Description 28 | #: ../templates:2001 29 | msgid "An attempt to commit /etc changes to ${VCS} failed." 30 | msgstr "Uma tentativa de enviar alterações feitas em /etc para ${VCS} falhou." 31 | 32 | #. Type: error 33 | #. Description 34 | #: ../templates:2001 35 | msgid "" 36 | "You may manually resolve the issues with the uncommitted changes before " 37 | "continuing." 38 | msgstr "" 39 | "Você pode resolver manualmente os problemas com as alterações não enviadas " 40 | "antes de continuar." 41 | 42 | #. Type: boolean 43 | #. Description 44 | #: ../templates:3001 45 | msgid "Remove etckeeper ${VCS} repository and associated files?" 46 | msgstr "Remover o repositório ${VCS} do etckeeper e os arquivos associados?" 47 | 48 | #. Type: boolean 49 | #. Description 50 | #: ../templates:3001 51 | msgid "" 52 | "Etckeeper is being purged from the system, and was used to store /etc in a " 53 | "${VCS} repository. If you choose to remove the repository, this will DESTROY " 54 | "all history etckeeper has recorded for /etc." 55 | msgstr "" 56 | "O etckeeper está sendo expurgado do sistema, e foi usado para armazenar o " 57 | "diretório /etc em um repositório ${VCS}. Se você escolher remover o " 58 | "repositório, isso DESTRUIRÁ todo o histórico que o etckeeper gravou para o " 59 | "diretório /etc." 60 | -------------------------------------------------------------------------------- /debian/po/it.po: -------------------------------------------------------------------------------- 1 | # Italian (it) translation of debconf templates for etckeeper 2 | # Copyright (C) 2007 Software in the Public Interest 3 | # This file is distributed under the same license as the etckeeper package. 4 | # Luca Monducci , 2007-2009. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: etckeeper 0.36 debconf templates\n" 9 | "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" 10 | "POT-Creation-Date: 2009-05-06 14:41-0400\n" 11 | "PO-Revision-Date: 2009-08-08 15:32+0200\n" 12 | "Last-Translator: Luca Monducci \n" 13 | "Language-Team: Italian \n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | 18 | #. Type: error 19 | #. Description 20 | #: ../templates:2001 21 | msgid "Commit failed" 22 | msgstr "Commit fallito" 23 | 24 | #. Type: error 25 | #. Description 26 | #: ../templates:2001 27 | msgid "An attempt to commit /etc changes to ${VCS} failed." 28 | msgstr "Il tentativo di commit delle modifiche in /etc a ${VCS} è fallito." 29 | 30 | #. Type: error 31 | #. Description 32 | #: ../templates:2001 33 | msgid "" 34 | "You may manually resolve the issues with the uncommitted changes before " 35 | "continuing." 36 | msgstr "" 37 | "Potrebbe essere necessario risolvere manualmente i problemi con le modifiche " 38 | "delle quali non è stato fatto il commit prima di continuare." 39 | 40 | #. Type: boolean 41 | #. Description 42 | #: ../templates:3001 43 | msgid "Remove etckeeper ${VCS} repository and associated files?" 44 | msgstr "Eliminare il repository ${VCS} di etckeeper e i file associati?" 45 | 46 | #. Type: boolean 47 | #. Description 48 | #: ../templates:3001 49 | msgid "" 50 | "Etckeeper is being purged from the system, and was used to store /etc in a " 51 | "${VCS} repository. If you choose to remove the repository, this will DESTROY " 52 | "all history etckeeper has recorded for /etc." 53 | msgstr "" 54 | "Etckeeper sta per essere completamente rimosso dal sistema, è stato usato " 55 | "per memorizzare il contenuto di /etc in un repository ${VCS}. Nel caso si " 56 | "scelga di eliminare il repository, si DISTRUGGE tutta la storia di /etc " 57 | "registrata da etckeeper." 58 | -------------------------------------------------------------------------------- /debian/po/nl.po: -------------------------------------------------------------------------------- 1 | # Dutch translation of etckeeper debconf templates. 2 | # Copyright (C) 2008-2012 THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the etckeeper package. 4 | # Bart Cornelis , 2008. 5 | # Jeroen Schot , 2012. 6 | # 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: etckeeper 0.59\n" 10 | "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" 11 | "POT-Creation-Date: 2009-05-06 14:41-0400\n" 12 | "PO-Revision-Date: 2012-01-02 15:54+0100\n" 13 | "Last-Translator: Jeroen Schot \n" 14 | "Language-Team: Debian l10n Dutch \n" 15 | "Language: nl\n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | 20 | #. Type: error 21 | #. Description 22 | #: ../templates:2001 23 | msgid "Commit failed" 24 | msgstr "Vastleggen mislukt" 25 | 26 | #. Type: error 27 | #. Description 28 | #: ../templates:2001 29 | msgid "An attempt to commit /etc changes to ${VCS} failed." 30 | msgstr "" 31 | "De poging om de aanpassingen in /etc vast te leggen in ${VCS} is mislukt." 32 | 33 | #. Type: error 34 | #. Description 35 | #: ../templates:2001 36 | msgid "" 37 | "You may manually resolve the issues with the uncommitted changes before " 38 | "continuing." 39 | msgstr "" 40 | "U kunt de problemen met de niet-vastgelegde aanpassingen handmatig oplossen " 41 | "alvorens verder te gaan." 42 | 43 | #. Type: boolean 44 | #. Description 45 | #: ../templates:3001 46 | msgid "Remove etckeeper ${VCS} repository and associated files?" 47 | msgstr "" 48 | "De ${VCS}-opslagruimte van etckeeper en gerelateerde bestanden verwijderen?" 49 | 50 | #. Type: boolean 51 | #. Description 52 | #: ../templates:3001 53 | msgid "" 54 | "Etckeeper is being purged from the system, and was used to store /etc in a " 55 | "${VCS} repository. If you choose to remove the repository, this will DESTROY " 56 | "all history etckeeper has recorded for /etc." 57 | msgstr "" 58 | "Etckeeper wordt gewist van het systeem (purge), en werd gebruikt om /etc in " 59 | "een ${VCS}-opslagruimte te bewaren. Als u ervoor kiest om de opslagruimte te " 60 | "verwijderen zal alle geschiedenis van /etc die etckeeper heeft bijgehouden " 61 | "worden VERNIETIGD." 62 | -------------------------------------------------------------------------------- /debian/po/fi.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: etckeeper 0.3\n" 4 | "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" 5 | "POT-Creation-Date: 2009-05-06 14:41-0400\n" 6 | "PO-Revision-Date: 2007-12-12 19:54+0200\n" 7 | "Last-Translator: Esko Arajärvi \n" 8 | "Language-Team: Finnish \n" 9 | "MIME-Version: 1.0\n" 10 | "Content-Type: text/plain; charset=UTF-8\n" 11 | "Content-Transfer-Encoding: 8bit\n" 12 | "X-Poedit-Language: Finnish\n" 13 | "X-Poedit-Country: Finland\n" 14 | 15 | #. Type: error 16 | #. Description 17 | #: ../templates:2001 18 | msgid "Commit failed" 19 | msgstr "Tallettaminen epäonnistui" 20 | 21 | #. Type: error 22 | #. Description 23 | #: ../templates:2001 24 | msgid "An attempt to commit /etc changes to ${VCS} failed." 25 | msgstr "Yritys tallettaa /etc:n muutokset ${VCS}-varastoon epäonnistui." 26 | 27 | #. Type: error 28 | #. Description 29 | #: ../templates:2001 30 | msgid "" 31 | "You may manually resolve the issues with the uncommitted changes before " 32 | "continuing." 33 | msgstr "" 34 | "Voit selvittää tallettamattomien muutosten ongelmat käsin ennen jatkamista." 35 | 36 | #. Type: boolean 37 | #. Description 38 | #: ../templates:3001 39 | msgid "Remove etckeeper ${VCS} repository and associated files?" 40 | msgstr "" 41 | 42 | #. Type: boolean 43 | #. Description 44 | #: ../templates:3001 45 | msgid "" 46 | "Etckeeper is being purged from the system, and was used to store /etc in a " 47 | "${VCS} repository. If you choose to remove the repository, this will DESTROY " 48 | "all history etckeeper has recorded for /etc." 49 | msgstr "" 50 | 51 | #~ msgid "Commit changed files in /etc to ${VCS}?" 52 | #~ msgstr "Talletetaanko hakemiston /etc muutetut tiedostot ${VCS}in?" 53 | 54 | #~ msgid "" 55 | #~ "The /etc directory contains uncommitted files or other changes. It's best " 56 | #~ "for all files in /etc to be committed to ${VCS} before running APT. Added " 57 | #~ "and changed files listed below can be committed automatically:" 58 | #~ msgstr "" 59 | #~ "Hakemisto /etc sisältää tallettamattomia tiedostoja tai muita muutoksia. " 60 | #~ "On parasta tallettaa kaikki /etc:n tiedostot ${VCS}-varastoon ennen APTin " 61 | #~ "ajamista. Alla luetellut lisätyt tai muutetut tiedostot voidaan tallettaa " 62 | #~ "automaattisesti." 63 | -------------------------------------------------------------------------------- /debian/po/ru.po: -------------------------------------------------------------------------------- 1 | # translation of ru.po to Russian 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # 5 | # Yuri Kozlov , 2007. 6 | # Yuri Kozlov , 2009. 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: etckeeper 0.35\n" 10 | "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" 11 | "POT-Creation-Date: 2009-05-06 14:41-0400\n" 12 | "PO-Revision-Date: 2009-05-15 21:25+0400\n" 13 | "Last-Translator: Yuri Kozlov \n" 14 | "Language-Team: Russian \n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "X-Generator: KBabel 1.11.4\n" 19 | "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" 20 | 21 | #. Type: error 22 | #. Description 23 | #: ../templates:2001 24 | msgid "Commit failed" 25 | msgstr "Фиксация завершилась неудачно" 26 | 27 | #. Type: error 28 | #. Description 29 | #: ../templates:2001 30 | msgid "An attempt to commit /etc changes to ${VCS} failed." 31 | msgstr "Попытка зафиксировать изменения /etc в ${VCS} завершилась неудачно." 32 | 33 | #. Type: error 34 | #. Description 35 | #: ../templates:2001 36 | msgid "" 37 | "You may manually resolve the issues with the uncommitted changes before " 38 | "continuing." 39 | msgstr "" 40 | "Перед тем как продолжить вы можете вручную исправить положение " 41 | "с незафиксированными изменениями." 42 | 43 | #. Type: boolean 44 | #. Description 45 | #: ../templates:3001 46 | msgid "Remove etckeeper ${VCS} repository and associated files?" 47 | msgstr "Удалить репозиторий etckeeper ${VCS} и связанные с ним файлы?" 48 | 49 | #. Type: boolean 50 | #. Description 51 | #: ../templates:3001 52 | msgid "" 53 | "Etckeeper is being purged from the system, and was used to store /etc in a " 54 | "${VCS} repository. If you choose to remove the repository, this will DESTROY " 55 | "all history etckeeper has recorded for /etc." 56 | msgstr "" 57 | "Etckeeper вычищается из системы, но использовался для хранения каталога " 58 | "/etc в репозитории ${VCS}. Если вы выберете удаление репозитория, то " 59 | "это УНИЧТОЖИТ всю историю, которую etckeeper вёл для /etc." 60 | 61 | -------------------------------------------------------------------------------- /debian/po/gl.po: -------------------------------------------------------------------------------- 1 | # Galician translation of etckeeper's debconf templates 2 | # This file is distributed under the same license as the etckeeper package. 3 | # Jacobo Tarrio , 2007. 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: etckeeper\n" 8 | "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" 9 | "POT-Creation-Date: 2009-05-06 14:41-0400\n" 10 | "PO-Revision-Date: 2007-12-11 20:52+0000\n" 11 | "Last-Translator: Jacobo Tarrio \n" 12 | "Language-Team: Galician \n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=UTF-8\n" 15 | "Content-Transfer-Encoding: 8bit\n" 16 | 17 | #. Type: error 18 | #. Description 19 | #: ../templates:2001 20 | msgid "Commit failed" 21 | msgstr "O gardado fallou" 22 | 23 | #. Type: error 24 | #. Description 25 | #: ../templates:2001 26 | msgid "An attempt to commit /etc changes to ${VCS} failed." 27 | msgstr "Fallou unha tentativa de gardar en ${VCS} os cambios de /etc." 28 | 29 | #. Type: error 30 | #. Description 31 | #: ../templates:2001 32 | msgid "" 33 | "You may manually resolve the issues with the uncommitted changes before " 34 | "continuing." 35 | msgstr "configurar apt para que instale paquetes adicionais do CD.<" 36 | 37 | #. Type: boolean 38 | #. Description 39 | #: ../templates:3001 40 | msgid "Remove etckeeper ${VCS} repository and associated files?" 41 | msgstr "" 42 | 43 | #. Type: boolean 44 | #. Description 45 | #: ../templates:3001 46 | msgid "" 47 | "Etckeeper is being purged from the system, and was used to store /etc in a " 48 | "${VCS} repository. If you choose to remove the repository, this will DESTROY " 49 | "all history etckeeper has recorded for /etc." 50 | msgstr "" 51 | 52 | #~ msgid "Commit changed files in /etc to ${VCS}?" 53 | #~ msgstr "¿Gardar en ${VCS} os ficheiros modificados de /etc?" 54 | 55 | #~ msgid "" 56 | #~ "The /etc directory contains uncommitted files or other changes. It's best " 57 | #~ "for all files in /etc to be committed to ${VCS} before running APT. Added " 58 | #~ "and changed files listed below can be committed automatically:" 59 | #~ msgstr "" 60 | #~ "O directorio /etc contén ficheiros ou outros cambios sen gardar. É mellor " 61 | #~ "que se garden en ${VCS} tódolos ficheiros de /etc antes de executar APT. " 62 | #~ "Os ficheiros engadidos e modificados da lista de embaixo pódense gardar " 63 | #~ "automaticamente:" 64 | -------------------------------------------------------------------------------- /debian/po/fr.po: -------------------------------------------------------------------------------- 1 | # Translation of etckeeper debconf template to French 2 | # Copyright (C) 2009 Debian French l10n team 3 | # This file is distributed under the same license as the etckeeper package. 4 | # 5 | # Translators: 6 | # Jean-Baka Domelevo Entfellner , 2007. 7 | # Bruno Travouillon , 2009. 8 | msgid "" 9 | msgstr "" 10 | "Project-Id-Version: etckeeper\n" 11 | "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" 12 | "POT-Creation-Date: 2009-05-06 14:41-0400\n" 13 | "PO-Revision-Date: 2009-05-17 11:42+0200\n" 14 | "Last-Translator: Bruno Travouillon \n" 15 | "Language-Team: French \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | "X-Poedit-Language: French\n" 20 | "X-Poedit-Country: FRANCE\n" 21 | "X-Generator: KBabel 1.11.4\n" 22 | 23 | #. Type: error 24 | #. Description 25 | #: ../templates:2001 26 | msgid "Commit failed" 27 | msgstr "Échec de la synchronisation" 28 | 29 | #. Type: error 30 | #. Description 31 | #: ../templates:2001 32 | msgid "An attempt to commit /etc changes to ${VCS} failed." 33 | msgstr "" 34 | "La tentative d'enregistrement (« commit ») des modifications de /etc vers " 35 | "${VCS} a échoué." 36 | 37 | #. Type: error 38 | #. Description 39 | #: ../templates:2001 40 | msgid "" 41 | "You may manually resolve the issues with the uncommitted changes before " 42 | "continuing." 43 | msgstr "" 44 | "Avant de poursuivre, vous devriez résoudre vous-même les problèmes liés aux " 45 | "changements non sauvegardés." 46 | 47 | #. Type: boolean 48 | #. Description 49 | #: ../templates:3001 50 | msgid "Remove etckeeper ${VCS} repository and associated files?" 51 | msgstr "" 52 | "Faut-il supprimer le référentiel ${VCS} d'etckeeper et les fichiers " 53 | "associés ?" 54 | 55 | #. Type: boolean 56 | #. Description 57 | #: ../templates:3001 58 | msgid "" 59 | "Etckeeper is being purged from the system, and was used to store /etc in a " 60 | "${VCS} repository. If you choose to remove the repository, this will DESTROY " 61 | "all history etckeeper has recorded for /etc." 62 | msgstr "" 63 | "Etckeeper est purgé du système, et était utilisé pour stocker /etc dans un " 64 | "référentiel ${VCS}. Si vous choisissez de supprimer ce référentiel, cela va " 65 | "DÉTRUIRE tout l'historique qu'etckeeper a enregistré pour /etc." 66 | -------------------------------------------------------------------------------- /etckeeper.spec: -------------------------------------------------------------------------------- 1 | Name: etckeeper 2 | Version: 1.17 3 | Release: 4%{?dist} 4 | Summary: store /etc in git, mercurial, bzr or darcs 5 | 6 | Group: System Tools 7 | License: GPLv2 8 | URL: http://etckeeper.branchable.com/ 9 | Source0: http://ftp.debian.org/debian/pool/main/e/etckeeper/%{name}_%{version}.tar.gz 10 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 11 | 12 | Requires: git >= 1.6.1-1 13 | Obsoletes: etckeeper = snapshot, yum-etckeeper 14 | 15 | %description 16 | The etckeeper program is a tool to let /etc be stored in a git, 17 | mercurial, bzr or darcs repository. It hooks into yum to automatically 18 | commit changes made to /etc during package upgrades. It tracks file 19 | metadata that version control systems do not normally support, but that 20 | is important for /etc, such as the permissions of /etc/shadow. It's 21 | quite modular and configurable, while also being simple to use if you 22 | understand the basics of working with version control. 23 | 24 | %prep 25 | %setup -q -n %{name} 26 | %{__perl} -pi -e ' 27 | s|HIGHLEVEL_PACKAGE_MANAGER=apt|HIGHLEVEL_PACKAGE_MANAGER=yum|; 28 | s|LOWLEVEL_PACKAGE_MANAGER=dpkg|LOWLEVEL_PACKAGE_MANAGER=rpm|; 29 | ' %{_builddir}/%{name}/etckeeper.conf 30 | 31 | 32 | %build 33 | make %{?_smp_mflags} 34 | 35 | 36 | %install 37 | rm -rf $RPM_BUILD_ROOT 38 | make install DESTDIR=$RPM_BUILD_ROOT 39 | install -D debian/cron.daily $RPM_BUILD_ROOT/etc/cron.daily/etckeeper 40 | 41 | 42 | %clean 43 | rm -rf $RPM_BUILD_ROOT 44 | 45 | %post 46 | %{_bindir}/etckeeper init -d /etc/ 47 | mkdir -p %{_var}/cache/etckeeper 48 | 49 | %files 50 | %defattr(-,root,root,-) 51 | %doc GPL INSTALL README.md 52 | %{_bindir}/* 53 | %{_mandir}/* 54 | # this isn't very clever and its a manual process update. 55 | # but it works 56 | %config(noreplace) /etc/yum/pluginconf.d/etckeeper.conf 57 | %config(noreplace) /etc/etckeeper/etckeeper.conf 58 | /etc/etckeeper/*.d/* 59 | /etc/cron.daily/etckeeper 60 | /etc/bash_completion.d/etckeeper 61 | %{_prefix}/lib/* 62 | 63 | %changelog 64 | * Fri Feb 27 2009 Jimmy Tang - 0.33-4 65 | - fix up initial install to make directory in /var/cache/etckeeper 66 | - install the etckeeper daily cron job 67 | - define some config files that shouldn't be replaced, should the hooks 68 | in commit.d, init.d etc... saved and not blown away? if so they can 69 | defined as config files. etckeeper should record the changes anyway. 70 | 71 | * Wed Feb 25 2009 Jimmy Tang - 0.32-1 72 | - yum etckeeper plugin is now apart of this package 73 | 74 | * Tue Feb 24 2009 Jimmy Tang - 0.31-1 75 | - initial package 76 | -------------------------------------------------------------------------------- /debian/po/eu.po: -------------------------------------------------------------------------------- 1 | # translation of etckeeper-eu.po to Euskara 2 | # Aitor Ibañez ,2007. 3 | # Aitor Ibañez , 2007. 4 | # Piarres Beobide , 2007. 5 | # translation of etckeeper-eu to Euskara 6 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 7 | # This file is distributed under the same license as the PACKAGE package. 8 | msgid "" 9 | msgstr "" 10 | "Project-Id-Version: etckeeper-eu\n" 11 | "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" 12 | "POT-Creation-Date: 2009-05-06 14:41-0400\n" 13 | "PO-Revision-Date: 2007-12-17 12:47+0100\n" 14 | "Last-Translator: Aitor Ibañez \n" 15 | "Language-Team: Euskara \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | "X-Generator: KBabel 1.11.4\n" 20 | 21 | #. Type: error 22 | #. Description 23 | #: ../templates:2001 24 | msgid "Commit failed" 25 | msgstr "Onarpenak failatu du" 26 | 27 | #. Type: error 28 | #. Description 29 | #: ../templates:2001 30 | msgid "An attempt to commit /etc changes to ${VCS} failed." 31 | msgstr "/etc-ko aldaketak ${VCS}-en onartzearen saiakerak huts egin du." 32 | 33 | #. Type: error 34 | #. Description 35 | #: ../templates:2001 36 | msgid "" 37 | "You may manually resolve the issues with the uncommitted changes before " 38 | "continuing." 39 | msgstr "" 40 | "Aurrera jarraitu baino lehen, eskuz erresolbitu beharko ditu onartu gabeko " 41 | "aldaketak." 42 | 43 | #. Type: boolean 44 | #. Description 45 | #: ../templates:3001 46 | msgid "Remove etckeeper ${VCS} repository and associated files?" 47 | msgstr "" 48 | 49 | #. Type: boolean 50 | #. Description 51 | #: ../templates:3001 52 | msgid "" 53 | "Etckeeper is being purged from the system, and was used to store /etc in a " 54 | "${VCS} repository. If you choose to remove the repository, this will DESTROY " 55 | "all history etckeeper has recorded for /etc." 56 | msgstr "" 57 | 58 | #~ msgid "Commit changed files in /etc to ${VCS}?" 59 | #~ msgstr "Aldaturiko fitxategiak ${VCS}-en onartu?" 60 | 61 | #~ msgid "" 62 | #~ "The /etc directory contains uncommitted files or other changes. It's best " 63 | #~ "for all files in /etc to be committed to ${VCS} before running APT. Added " 64 | #~ "and changed files listed below can be committed automatically:" 65 | #~ msgstr "" 66 | #~ "/etc direktorioak onartu gabeko fitxategiak edo beste aldaketa batzuk " 67 | #~ "ditu. /etc-n dauden fitxategi guztientzat hobe da ${VCS}-en onarpena " 68 | #~ "egitea APT exekutatu baino lehen.Azpian dauden erantsi eta aldatutako " 69 | #~ "fitxategiak automatikoki onartu daitezke:" 70 | -------------------------------------------------------------------------------- /debian/po/cs.po: -------------------------------------------------------------------------------- 1 | # Czech translation of etckeeper debconf messages. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the etckeeper package. 4 | # Miroslav Kure , 2007,2009 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: etckeeper\n" 9 | "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" 10 | "POT-Creation-Date: 2009-05-06 14:41-0400\n" 11 | "PO-Revision-Date: 2009-09-13 09:09+0200\n" 12 | "Last-Translator: Miroslav Kure \n" 13 | "Language-Team: Czech \n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | 18 | #. Type: error 19 | #. Description 20 | #: ../templates:2001 21 | msgid "Commit failed" 22 | msgstr "Zápis selhal" 23 | 24 | #. Type: error 25 | #. Description 26 | #: ../templates:2001 27 | msgid "An attempt to commit /etc changes to ${VCS} failed." 28 | msgstr "Pokus o zapsání změn v /etc do ${VCS} selhal." 29 | 30 | #. Type: error 31 | #. Description 32 | #: ../templates:2001 33 | msgid "" 34 | "You may manually resolve the issues with the uncommitted changes before " 35 | "continuing." 36 | msgstr "" 37 | "Před pokračováním byste měli ručně vyřešit problémy s nezapsanými změnami." 38 | 39 | #. Type: boolean 40 | #. Description 41 | #: ../templates:3001 42 | msgid "Remove etckeeper ${VCS} repository and associated files?" 43 | msgstr "Odstranit ${VCS} repositář etckeeperu a přidružené soubory?" 44 | 45 | #. Type: boolean 46 | #. Description 47 | #: ../templates:3001 48 | msgid "" 49 | "Etckeeper is being purged from the system, and was used to store /etc in a " 50 | "${VCS} repository. If you choose to remove the repository, this will DESTROY " 51 | "all history etckeeper has recorded for /etc." 52 | msgstr "" 53 | "Etckeeper se na tomto systému používal pro uchování /etc v ${VCS} " 54 | "repositáři, avšak nyní je ze systému odstraňován. Pokud povolíte odstranění " 55 | "repositáře, ZNIČÍTE tím veškerou historii, kterou etckeeper uchovával." 56 | 57 | #~ msgid "Commit changed files in /etc to ${VCS}?" 58 | #~ msgstr "Zapsat změněné soubory v /etc do ${VCS}?" 59 | 60 | #~ msgid "" 61 | #~ "The /etc directory contains uncommitted files or other changes. It's best " 62 | #~ "for all files in /etc to be committed to ${VCS} before running APT. Added " 63 | #~ "and changed files listed below can be committed automatically:" 64 | #~ msgstr "" 65 | #~ "Adresář /etc obsahuje nezapsané soubory nebo jiné změny. Před spuštěním " 66 | #~ "APT je lepší mít všechny soubory v /etc uloženy do ${VCS}. Přidané a " 67 | #~ "změněné soubory vypsané níže budou uloženy automaticky:" 68 | -------------------------------------------------------------------------------- /debian/preinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | #DEBHELPER# 5 | 6 | # Prepare to move a conffile without triggering a dpkg question 7 | prep_mv_conffile() { 8 | PKGNAME="$1" 9 | CONFFILE="$2" 10 | 11 | if [ -e "$CONFFILE" ]; then 12 | md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`" 13 | old_md5sum="`dpkg-query -W -f='${Conffiles}' $PKGNAME | sed -n -e \"\\\\' $CONFFILE'{s/ obsolete$//;s/.* //p}\"`" 14 | if [ "$md5sum" = "$old_md5sum" ]; then 15 | rm -f "$CONFFILE" 16 | fi 17 | fi 18 | } 19 | 20 | # Remove a no-longer used conffile 21 | rm_conffile() { 22 | PKGNAME="$1" 23 | CONFFILE="$2" 24 | 25 | if [ -e "$CONFFILE" ]; then 26 | md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`" 27 | old_md5sum="`dpkg-query -W -f='${Conffiles}' $PKGNAME | sed -n -e \"\\\\' $CONFFILE'{s/ obsolete$//;s/.* //p}\"`" 28 | if [ "$md5sum" != "$old_md5sum" ]; then 29 | echo "Obsolete conffile $CONFFILE has been modified by you." 30 | echo "Saving as $CONFFILE.dpkg-bak ..." 31 | mv -f "$CONFFILE" "$CONFFILE".dpkg-bak 32 | else 33 | echo "Removing obsolete conffile $CONFFILE ..." 34 | rm -f "$CONFFILE" 35 | fi 36 | fi 37 | } 38 | 39 | case "$1" in 40 | install|upgrade) 41 | if dpkg --compare-versions "$2" le "0.7"; then 42 | for c in README 50uncommitted-changes; do 43 | prep_mv_conffile etckeeper "/etc/etckeeper/pre-apt.d/$c" 44 | done 45 | for c in README 10git-test 30git-add 40git-rm 50git-commit; do 46 | prep_mv_conffile etckeeper "/etc/etckeeper/post-apt.d/$c" 47 | done 48 | for c in 40git-init 50git-ignore 50git-perm \ 49 | 50git-pre-commit-hook 70git-add; do 50 | prep_mv_conffile etckeeper "/etc/etckeeper/init.d/$c" 51 | done 52 | fi 53 | if dpkg --compare-versions "$2" le "0.10"; then 54 | for c in 10vcs-test 30git-add 30hg-addremove 40git-rm; do 55 | prep_mv_conffile etckeeper "/etc/etckeeper/post-install.d/$c" 56 | 57 | done 58 | fi 59 | if dpkg --compare-versions "$2" le "0.13"; then 60 | for c in 20store-empty-directory 40rm-old-metadata; do 61 | rm_conffile etckeeper "/etc/etckeeper/pre-commit.d/$c" 62 | done 63 | for c in 10restore-etckeeper 20restore-metadata; do 64 | prep_mv_conffile etckeeper "/etc/etckeeper/init.d/$c" 65 | done 66 | fi 67 | if dpkg --compare-versions "$2" le "0.15"; then 68 | for c in 40bzr-rm 45bzr-precommit; do 69 | rm_conffile etckeeper "/etc/etckeeper/commit.d/$c" 70 | done 71 | fi 72 | if dpkg --compare-versions "$2" le "0.50"; then 73 | for c in 20warn-hardlinks 20warn-special-file; do 74 | rm_conffile etckeeper "/etc/etckeeper/pre-commit.d/$c" 75 | done 76 | fi 77 | if dpkg --compare-versions "$2" le "0.61"; then 78 | rm_conffile etckeeper "/etc/etckeeper/commit.d/40git-rm" 79 | fi 80 | 81 | # delete files the prerm stashes away to handle purging 82 | rm -rf /var/cache/etckeeper/stash 83 | esac 84 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # You should configure etckeeper.conf for your distribution before 2 | # installing etckeeper. 3 | CONFFILE=etckeeper.conf 4 | include $(CONFFILE) 5 | 6 | DESTDIR?= 7 | prefix=/usr 8 | bindir=${prefix}/bin 9 | etcdir=/etc 10 | mandir=${prefix}/share/man 11 | vardir=/var 12 | CP=cp -R 13 | INSTALL=install 14 | INSTALL_EXE=${INSTALL} 15 | INSTALL_DATA=${INSTALL} -m 0644 16 | PYTHON=python 17 | 18 | build: etckeeper.spec etckeeper.version 19 | -$(PYTHON) ./etckeeper-bzr/__init__.py build || echo "** bzr support not built" 20 | -$(PYTHON) ./etckeeper-dnf/etckeeper.py build || echo "** DNF support not built" 21 | 22 | install: etckeeper.version 23 | mkdir -p $(DESTDIR)$(etcdir)/etckeeper/ $(DESTDIR)$(vardir)/cache/etckeeper/ 24 | $(CP) *.d $(DESTDIR)$(etcdir)/etckeeper/ 25 | $(INSTALL_DATA) $(CONFFILE) $(DESTDIR)$(etcdir)/etckeeper/etckeeper.conf 26 | mkdir -p $(DESTDIR)$(bindir) 27 | $(INSTALL_EXE) etckeeper $(DESTDIR)$(bindir)/etckeeper 28 | mkdir -p $(DESTDIR)$(mandir)/man8 29 | $(INSTALL_DATA) etckeeper.8 $(DESTDIR)$(mandir)/man8/etckeeper.8 30 | mkdir -p $(DESTDIR)$(etcdir)/bash_completion.d 31 | $(INSTALL_DATA) bash_completion $(DESTDIR)$(etcdir)/bash_completion.d/etckeeper 32 | ifeq ($(HIGHLEVEL_PACKAGE_MANAGER),apt) 33 | mkdir -p $(DESTDIR)$(etcdir)/apt/apt.conf.d 34 | $(INSTALL_DATA) apt.conf $(DESTDIR)$(etcdir)/apt/apt.conf.d/05etckeeper 35 | mkdir -p $(DESTDIR)$(etcdir)/cruft/filters-unex 36 | $(INSTALL_DATA) cruft_filter $(DESTDIR)$(etcdir)/cruft/filters-unex/etckeeper 37 | endif 38 | ifeq ($(LOWLEVEL_PACKAGE_MANAGER),pacman-g2) 39 | mkdir -p $(DESTDIR)$(etcdir)/pacman-g2/hooks 40 | $(INSTALL_DATA) pacman-g2.hook $(DESTDIR)$(etcdir)/pacman-g2/hooks/etckeeper 41 | endif 42 | ifeq ($(HIGHLEVEL_PACKAGE_MANAGER),yum) 43 | mkdir -p $(DESTDIR)$(prefix)/lib/yum-plugins 44 | $(INSTALL_DATA) yum-etckeeper.py $(DESTDIR)$(prefix)/lib/yum-plugins/etckeeper.py 45 | mkdir -p $(DESTDIR)$(etcdir)/yum/pluginconf.d 46 | $(INSTALL_DATA) yum-etckeeper.conf $(DESTDIR)$(etcdir)/yum/pluginconf.d/etckeeper.conf 47 | endif 48 | ifeq ($(HIGHLEVEL_PACKAGE_MANAGER),dnf) 49 | -$(PYTHON) ./etckeeper-dnf/etckeeper.py install --root=$(DESTDIR) ${PYTHON_INSTALL_OPTS} || echo "** DNF support not installed" 50 | endif 51 | ifeq ($(HIGHLEVEL_PACKAGE_MANAGER),zypper) 52 | mkdir -p $(DESTDIR)$(prefix)/lib/zypp/plugins/commit 53 | $(INSTALL) zypper-etckeeper.py $(DESTDIR)$(prefix)/lib/zypp/plugins/commit/zypper-etckeeper.py 54 | endif 55 | -$(PYTHON) ./etckeeper-bzr/__init__.py install --root=$(DESTDIR) ${PYTHON_INSTALL_OPTS} || echo "** bzr support not installed" 56 | echo "** installation successful" 57 | 58 | clean: etckeeper.spec etckeeper.version 59 | rm -rf build 60 | 61 | etckeeper.spec: 62 | sed -i~ "s/Version:.*/Version: $$(perl -e '$$_=<>;print m/\((.*?)\)/';print m/\((.*?)\)/' 73 | -------------------------------------------------------------------------------- /etckeeper: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | if [ -z "$ETCKEEPER_CONF_DIR" ]; then 5 | ETCKEEPER_CONF_DIR=/etc/etckeeper 6 | fi 7 | 8 | conf="$ETCKEEPER_CONF_DIR/etckeeper.conf" 9 | 10 | usage() { 11 | echo "usage: etckeeper command [-d directory]" >&2 12 | exit 1 13 | } 14 | 15 | if [ -e $conf ]; then 16 | . $conf 17 | fi 18 | 19 | if [ -n "$GIT_WORK_TREE" ]; then 20 | unset GIT_WORK_TREE 21 | fi 22 | if [ -n "$GIT_DIR" ]; then 23 | unset GIT_DIR 24 | fi 25 | 26 | program_directory="${0%/*}" 27 | if [ -n "$program_directory" ]; then 28 | PATH="$PATH:$program_directory" 29 | export PATH 30 | fi 31 | 32 | if [ ! -z "$GIT_COMMIT_OPTIONS" ]; then 33 | export GIT_COMMIT_OPTIONS 34 | fi 35 | if [ ! -z "$HG_COMMIT_OPTIONS" ]; then 36 | export HG_COMMIT_OPTIONS 37 | fi 38 | if [ ! -z "$BZR_COMMIT_OPTIONS" ]; then 39 | export BZR_COMMIT_OPTIONS 40 | fi 41 | if [ ! -z "$DARCS_COMMIT_OPTIONS" ]; then 42 | export DARCS_COMMIT_OPTIONS 43 | fi 44 | 45 | if [ ! -z "$HIGHLEVEL_PACKAGE_MANAGER" ]; then 46 | export HIGHLEVEL_PACKAGE_MANAGER 47 | fi 48 | if [ ! -z "$LOWLEVEL_PACKAGE_MANAGER" ]; then 49 | export LOWLEVEL_PACKAGE_MANAGER 50 | fi 51 | if [ ! -z "$AVOID_COMMIT_BEFORE_INSTALL" ]; then 52 | export AVOID_COMMIT_BEFORE_INSTALL 53 | fi 54 | if [ ! -z "$AVOID_SPECIAL_FILE_WARNING" ]; then 55 | export AVOID_SPECIAL_FILE_WARNING 56 | fi 57 | 58 | if [ ! -z "$PUSH_REMOTE" ]; then 59 | export PUSH_REMOTE 60 | fi 61 | 62 | if [ -z "$1" ]; then 63 | usage 64 | elif [ "x$1" = "x-h" ] || [ "x$1" = "x--help" ]; then 65 | man etckeeper || echo "Usage: etckeeper command [-d directory]" >&2 66 | exit 0 67 | elif [ "x$1" = "x-v" ] || [ "x$1" = "x--version" ]; then 68 | # This is automatically updated by the Makefile. 69 | echo "Version: 1.17" 70 | exit 0 71 | fi 72 | command="$1" 73 | shift 1 74 | 75 | # compatability code 76 | if [ "$command" = "post-apt" ]; then 77 | command=post-install 78 | elif [ "$command" = "pre-apt" ]; then 79 | command=pre-install 80 | fi 81 | 82 | if echo "$command" | egrep -q '[^-a-z_]'; then 83 | echo "etckeeper: invalid command $command" >&2 84 | exit 1 85 | fi 86 | 87 | if [ ! -d "$ETCKEEPER_CONF_DIR/$command.d" ]; then 88 | echo "etckeeper: $ETCKEEPER_CONF_DIR/$command.d does not exist" >&2 89 | exit 1 90 | fi 91 | 92 | if [ "x$1" = "x-d" ]; then 93 | if [ -n "$2" ]; then 94 | ETCKEEPER_DIR="$2" 95 | shift 2 96 | else 97 | usage 98 | fi 99 | fi 100 | 101 | if [ -z "$ETCKEEPER_DIR" ]; then 102 | ETCKEEPER_DIR=/etc 103 | fi 104 | cd "$ETCKEEPER_DIR" 105 | export ETCKEEPER_DIR 106 | 107 | if [ -d ".git" ]; then 108 | VCS=git 109 | elif [ -d ".hg" ]; then 110 | VCS=hg 111 | elif [ -d "_darcs" ]; then 112 | VCS=darcs 113 | elif [ -d ".bzr" ]; then 114 | VCS=bzr 115 | fi 116 | 117 | if [ -z "$VCS" ]; then 118 | echo "Please configure a VCS in $conf" >&2 119 | exit 1 120 | fi 121 | export VCS 122 | 123 | lsscripts() { 124 | perl -e ' 125 | $dir=shift; 126 | print join "\n", grep { ! -d $_ && -x $_ } 127 | grep /^\Q$dir\/\E[-a-zA-Z0-9]+$/, 128 | glob "$dir/*"; 129 | ' "$1" 130 | } 131 | 132 | for script in $(lsscripts "$ETCKEEPER_CONF_DIR/$command.d"); do 133 | "$script" "$@" 134 | done 135 | -------------------------------------------------------------------------------- /debian/po/es.po: -------------------------------------------------------------------------------- 1 | # etckeeper po-debconf translation to Spanish. 2 | # Copyright (C) 2009 Software in the Public Interest. 3 | # This file is distributed under the same license as the etckeeper package. 4 | # 5 | # Changes: 6 | # - Initial translation 7 | # Fernando González de Requena , 2009. 8 | # 9 | # 10 | # Traductores, si no conoce el formato PO, merece la pena leer la 11 | # documentación de gettext, especialmente las secciones dedicadas a este 12 | # formato, por ejemplo ejecutando: 13 | # info -n '(gettext)PO Files' 14 | # info -n '(gettext)Header Entry' 15 | # 16 | # Equipo de traducción al español, por favor lean antes de traducir 17 | # los siguientes documentos: 18 | # 19 | # - El proyecto de traducción de Debian al español 20 | # http://www.debian.org/intl/spanish/ 21 | # especialmente las notas y normas de traducción en 22 | # http://www.debian.org/intl/spanish/notas 23 | # 24 | # - La guía de traducción de po's de debconf: 25 | # /usr/share/doc/po-debconf/README-trans 26 | # o http://www.debian.org/intl/l10n/po-debconf/README-trans 27 | # 28 | # Si tiene dudas o consultas sobre esta traducción consulte con el último 29 | # traductor (campo Last-Translator) y ponga en copia a la lista de 30 | # traducción de Debian al español () 31 | # 32 | msgid "" 33 | msgstr "" 34 | "Project-Id-Version: etckeeper 0.38\n" 35 | "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" 36 | "POT-Creation-Date: 2009-05-06 14:41-0400\n" 37 | "PO-Revision-Date: 2009-07-11 16:07+0200\n" 38 | "Last-Translator: Fernando González de Requena \n" 39 | "Language-Team: Spanish \n" 40 | "MIME-Version: 1.0\n" 41 | "Content-Type: text/plain; charset=UTF-8\n" 42 | "Content-Transfer-Encoding: 8bit\n" 43 | "X-Generator: KBabel 1.11.4\n" 44 | 45 | #. Type: error 46 | #. Description 47 | #: ../templates:2001 48 | msgid "Commit failed" 49 | msgstr "El envío de los cambios ha fallado" 50 | 51 | #. Type: error 52 | #. Description 53 | #: ../templates:2001 54 | msgid "An attempt to commit /etc changes to ${VCS} failed." 55 | msgstr "Ha fallado un intento de enviar los cambios en «/etc» a ${VCS}." 56 | 57 | #. Type: error 58 | #. Description 59 | #: ../templates:2001 60 | msgid "" 61 | "You may manually resolve the issues with the uncommitted changes before " 62 | "continuing." 63 | msgstr "" 64 | "Puede resolver manualmente los problemas con los cambios que no se han enviado " 65 | "antes de continuar." 66 | 67 | #. Type: boolean 68 | #. Description 69 | #: ../templates:3001 70 | msgid "Remove etckeeper ${VCS} repository and associated files?" 71 | msgstr "¿Desea eliminar el repositorio ${VCS} de etckeeper y los ficheros asociados?" 72 | 73 | #. Type: boolean 74 | #. Description 75 | #: ../templates:3001 76 | msgid "" 77 | "Etckeeper is being purged from the system, and was used to store /etc in a " 78 | "${VCS} repository. If you choose to remove the repository, this will DESTROY " 79 | "all history etckeeper has recorded for /etc." 80 | msgstr "" 81 | "Se está eliminando completamente etckeeper de su sistema. Etckeeper se ha " 82 | "utilizado para almacenar el directorio «/etc» en un repositorio ${VCS}. Si elige " 83 | "eliminar el repositorio, se DESTRUIRÁ todo el historial que etckeeper ha " 84 | "guardado para «/etc»." 85 | 86 | -------------------------------------------------------------------------------- /commit.d/50vcs-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | cleanup () { 5 | if [ -n "$logfile" ]; then 6 | rm -f "$logfile" 7 | fi 8 | } 9 | if [ -n "$1" ]; then 10 | trap cleanup EXIT 11 | logfile="$(mktemp -t etckeeper-$VCS.XXXXXXXXXX)" 12 | if [ "x$1" = "x--stdin" ]; then 13 | cat > "$logfile" 14 | else 15 | if [ "x$1" = "x-m" ]; then 16 | shift 1 17 | fi 18 | echo "$1" > "$logfile" 19 | fi 20 | else 21 | logfile="" 22 | fi 23 | 24 | hostname=`hostname` 25 | hostname="${hostname%%.*}" 26 | dnsdomainname=`dnsdomainname 2>/dev/null || true` 27 | if [ -n "$dnsdomainname" ]; then 28 | hostname="$hostname.$dnsdomainname" 29 | fi 30 | 31 | USER= 32 | if [ -n "$SUDO_USER" ]; then 33 | USER="$SUDO_USER" 34 | else 35 | # try to check tty ownership, in case user su'd to root 36 | TTY="$(tty 2>/dev/null || true)" 37 | if [ -n "$TTY" ] && [ -c "$TTY" ]; then 38 | USER="$(find "$TTY" -printf "%u")" 39 | fi 40 | fi 41 | 42 | if [ "$VCS" = git ] && [ -d .git ]; then 43 | if [ -n "$USER" ]; then 44 | # Use user.name and user.email from the gitconfig belonging 45 | # to the user who became root. 46 | USER_HOME="$(perl -e 'print ((getpwnam(shift()))[7])' "$USER")" 47 | if [ -n "$USER_HOME" ] && [ -e "$USER_HOME/.gitconfig" ]; then 48 | if [ -z "$GIT_AUTHOR_NAME" ]; then 49 | GIT_AUTHOR_NAME="$(git config -f "$USER_HOME/.gitconfig" user.name)" || true 50 | export GIT_AUTHOR_NAME 51 | fi 52 | if [ -z "$GIT_AUTHOR_EMAIL" ]; then 53 | GIT_AUTHOR_EMAIL="$(git config -f "$USER_HOME/.gitconfig" user.email)" || true 54 | export GIT_AUTHOR_EMAIL 55 | fi 56 | fi 57 | if [ -z "$GIT_COMMITTER_EMAIL" ]; then 58 | GIT_COMMITER_EMAIL="$(git config --global user.email)" || true 59 | export GIT_COMMITER_EMAIL 60 | fi 61 | 62 | if [ -z "$GIT_AUTHOR_NAME" ]; then 63 | GIT_AUTHOR_NAME="$USER" 64 | export GIT_AUTHOR_NAME 65 | fi 66 | if [ -z "$GIT_AUTHOR_EMAIL" ]; then 67 | GIT_AUTHOR_EMAIL="$USER@$hostname" 68 | export GIT_AUTHOR_EMAIL 69 | fi 70 | if [ -z "$GIT_COMMITTER_EMAIL" ]; then 71 | GIT_COMMITTER_EMAIL=`whoami`"@$hostname" 72 | export GIT_COMMITTER_EMAIL 73 | fi 74 | fi 75 | if [ -n "$logfile" ]; then 76 | git commit $GIT_COMMIT_OPTIONS -F "$logfile" 77 | else 78 | git commit $GIT_COMMIT_OPTIONS 79 | fi 80 | elif [ "$VCS" = hg ] && [ -d .hg ]; then 81 | if [ -n "$USER" ]; then 82 | LOGNAME="$USER" 83 | export LOGNAME 84 | fi 85 | if [ -z "$HGUSER" ]; then 86 | HGUSER="$USER@$hostname" 87 | export HGUSER 88 | fi 89 | if [ -n "$logfile" ]; then 90 | hg commit $HG_COMMIT_OPTIONS -l "$logfile" 91 | else 92 | hg commit $HG_COMMIT_OPTIONS 93 | fi 94 | elif [ "$VCS" = bzr ] && [ -d .bzr ]; then 95 | if [ -z "$EMAIL" ] && [ -n "$USER" ]; then 96 | EMAIL="$USER <$USER@$hostname>" 97 | export EMAIL 98 | fi 99 | if [ -n "$logfile" ]; then 100 | bzr commit $BZR_COMMIT_OPTIONS -F "$logfile" 101 | else 102 | bzr commit $BZR_COMMIT_OPTIONS 103 | fi 104 | elif [ "$VCS" = darcs ] && [ -d _darcs ]; then 105 | if [ -z "$USER" ]; then 106 | USER=root 107 | fi 108 | if [ -n "$logfile" ]; then 109 | darcs record --author="$USER" $DARCS_COMMIT_OPTIONS --logfile="$logfile" 110 | else 111 | darcs record --author="$USER" $DARCS_COMMIT_OPTIONS 112 | fi 113 | fi 114 | -------------------------------------------------------------------------------- /debian/postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | # source confmodule to ensure templates are loaded 5 | . /usr/share/debconf/confmodule 6 | 7 | #DEBHELPER# 8 | 9 | # Move a conffile without triggering a dpkg question 10 | mv_conffile() { 11 | OLDCONFFILE="$1" 12 | NEWCONFFILE="$2" 13 | 14 | if [ -e "$OLDCONFFILE" ]; then 15 | echo "Preserving user changes to $NEWCONFFILE ..." 16 | mv -f "$NEWCONFFILE" "$NEWCONFFILE".dpkg-new 17 | mv -f "$OLDCONFFILE" "$NEWCONFFILE" 18 | fi 19 | } 20 | 21 | case "$1" in 22 | configure) 23 | if dpkg --compare-versions "$2" le "0.7"; then 24 | if [ -d /etc/etckeeper/pre-apt.d ]; then 25 | mv_conffile "/etc/etckeeper/pre-apt.d/README" \ 26 | "/etc/etckeeper/pre-install.d/README" 27 | mv_conffile "/etc/etckeeper/pre-apt.d/50uncommitted-changes" \ 28 | "/etc/etckeeper/pre-install.d/50uncommitted-changes" 29 | rmdir --ignore-fail-on-non-empty /etc/etckeeper/pre-apt.d 30 | fi 31 | if [ -d /etc/etckeeper/post-apt.d ]; then 32 | mv_conffile "/etc/etckeeper/post-apt.d/README" \ 33 | "/etc/etckeeper/post-install.d/README" 34 | mv_conffile "/etc/etckeeper/post-apt.d/10git-test" \ 35 | "/etc/etckeeper/post-install.d/10vcs-test" 36 | mv_conffile "/etc/etckeeper/post-apt.d/30git-add" \ 37 | "/etc/etckeeper/post-install.d/30git-add" 38 | mv_conffile "/etc/etckeeper/post-apt.d/40git-rm" \ 39 | "/etc/etckeeper/post-install.d/40git-rm" 40 | mv_conffile "/etc/etckeeper/post-apt.d/50git-commit" \ 41 | "/etc/etckeeper/post-install.d/50vcs-commit" 42 | rmdir --ignore-fail-on-non-empty /etc/etckeeper/post-apt.d 43 | fi 44 | mv_conffile "/etc/etckeeper/init.d/40git-init" \ 45 | "/etc/etckeeper/init.d/40vcs-init" 46 | mv_conffile "/etc/etckeeper/init.d/50git-ignore" \ 47 | "/etc/etckeeper/init.d/50vcs-ignore" 48 | mv_conffile "/etc/etckeeper/init.d/50git-perm" \ 49 | "/etc/etckeeper/init.d/50vcs-perm" 50 | mv_conffile "/etc/etckeeper/init.d/50git-pre-commit-hook" \ 51 | "/etc/etckeeper/init.d/50vcs-pre-commit-hook" 52 | mv_conffile "/etc/etckeeper/init.d/70git-add" \ 53 | "/etc/etckeeper/init.d/70git-add" 54 | fi 55 | if dpkg --compare-versions "$2" le "0.10"; then 56 | for c in 10vcs-test 30git-add 30hg-addremove 40git-rm; do 57 | mv_conffile "/etc/etckeeper/post-install.d/$c" \ 58 | "/etc/etckeeper/commit.d/$c" 59 | 60 | done 61 | fi 62 | if dpkg --compare-versions "$2" le "0.13"; then 63 | mv_conffile "/etc/etckeeper/init.d/10restore-etckeeper" \ 64 | "/etc/etckeeper/init.d/20restore-etckeeper" 65 | mv_conffile "/etc/etckeeper/init.d/20restore-metadata" \ 66 | "/etc/etckeeper/init.d/10restore-metadata" 67 | fi 68 | if dpkg --compare-versions "$2" le "0.28"; then 69 | for c in commit.d/30darcs-add init.d/60darcs-deleted-symlinks; do 70 | if [ -e /etc/etckeeper/$c ]; then 71 | chmod +x /etc/etckeeper/$c 72 | fi 73 | done 74 | fi 75 | if dpkg --compare-versions "$2" le "0.61"; then 76 | # may be left over from a botched conffile removal 77 | rm -f /etc/etckeeper/commit.d/40git-rm.dpkg-dist 78 | fi 79 | 80 | if [ "$2" = "" ] && [ -e "/etc/etckeeper/etckeeper.conf" ]; then 81 | # Fresh install. 82 | . /etc/etckeeper/etckeeper.conf || true 83 | if [ -n "$VCS" ] && [ -x "`which $VCS 2>/dev/null`" ]; then 84 | if etckeeper init; then 85 | if ! etckeeper commit "Initial commit"; then 86 | echo "etckeeper commit failed; run it by hand" >&2 87 | fi 88 | else 89 | echo "etckeeper init failed; run it by hand" >&2 90 | fi 91 | else 92 | echo "etckeeper init not ran as $VCS is not installed" >&2 93 | fi 94 | fi 95 | 96 | # prints error and exits nonzero if the ignore file cannot be updated 97 | etckeeper update-ignore || true 98 | esac 99 | -------------------------------------------------------------------------------- /pre-commit.d/30store-metadata: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | # Filters out UNKNOWN users and groups, prints a warning on stderr. 5 | filter_unknown() { 6 | CMD=$1 7 | while read line; do 8 | # if the first n chars of $line equal "$CMD UNKNOWN "... 9 | if [ "$(printf %.$((9+${#CMD}))s "$line")" = "$CMD UNKNOWN " ]; then 10 | echo Bad "$2" for "$line" >&2 11 | else 12 | echo "$line" 13 | fi 14 | done 15 | } 16 | 17 | filter_ignore() { 18 | case "$VCS" in 19 | darcs) ignorefile=.darcsignore ;; 20 | git) ignorefile=.gitignore ;; 21 | esac 22 | 23 | if [ -n "$ignorefile" ] && [ -e "$ignorefile" ]; then 24 | listfile="$( mktemp -t etckeeper-$VCS.XXXXXXXXXX )" 25 | case "$VCS" in 26 | darcs) 27 | grep -v '^[[:space:]]*\(#\|$\)' "$ignorefile" > "$listfile" || true 28 | grep -Evf "$listfile" 29 | ;; 30 | git) 31 | (git ls-files -oi --exclude-standard; git ls-files -oi --exclude-standard --directory) | sort | uniq > "$listfile" || true 32 | sed 's/^\.\///' | grep -xFvf "$listfile" 33 | ;; 34 | esac 35 | rm -f "$listfile" 36 | unset listfile 37 | else 38 | cat - 39 | fi 40 | } 41 | 42 | shellquote() { 43 | # Single quotes text, escaping existing single quotes. 44 | sed -e "s/'/'\"'\"'/g" -e "s/^/'/" -e "s/$/'/" 45 | } 46 | 47 | generate_metadata() { 48 | # This function generates the script commands to fix any file 49 | # ownerships that aren't owner=root, group=root, as well as to 50 | # store the permissions of files. 51 | # The script is produced on stdout. Errors go to stderr. 52 | # 53 | # The script can use a 'maybe' function, which only runs a command 54 | # if the file in its last argument exists. 55 | 56 | # We want files in the directory containing VCS data 57 | # but we want find to ignore the VCS files themselves. 58 | # 59 | # (Note that when using this, the find expression must end with 60 | # -print or -exec, else the excluded directories will actually be 61 | # printed!) 62 | NOVCS='. -path ./.git -prune -o -path ./.bzr -prune -o -path ./.hg -prune -o -path ./_darcs -prune -o' 63 | 64 | # Keep the sort order the same at all times. 65 | LC_COLLATE=C 66 | export LC_COLLATE 67 | 68 | if [ "$VCS" = git ] || [ "$VCS" = hg ]; then 69 | # These version control systems do not track directories, 70 | # so empty directories must be stored specially. 71 | find $NOVCS -type d -empty -print | 72 | sort | shellquote | sed -e "s/^/mkdir -p /" 73 | fi 74 | 75 | if [ "$VCS" = darcs ]; then 76 | # This version control system does not track symlinks, 77 | # so they must be stored specially. 78 | find $NOVCS -type l -print | sort | filter_ignore | while read link; do 79 | dest=$( readlink "$link" ) 80 | printf "ln -sf '%s' '%s'\n" "$(echo "$dest" | shellquote)" "$(echo "$link" | shellquote)" 81 | done 82 | fi 83 | 84 | # Store things that don't have the default user or group. 85 | # Store all file modes, in case the user has an unusual umask. 86 | find $NOVCS \( -type f -or -type d \) -print | filter_ignore | sort | perl -ne ' 87 | BEGIN { $q=chr(39) } 88 | sub uidname { 89 | my $want=shift; 90 | if (exists $uidcache{$want}) { 91 | return $uidcache{$want}; 92 | } 93 | my $name=scalar getpwuid($want); 94 | return $uidcache{$want}=defined $name ? $name : $want; 95 | } 96 | sub gidname { 97 | my $want=shift; 98 | if (exists $gidcache{$want}) { 99 | return $gidcache{$want}; 100 | } 101 | my $name=scalar getgrgid($want); 102 | return $gidcache{$want}=defined $name ? $name : $want; 103 | } 104 | chomp; 105 | my @stat=stat($_); 106 | my $mode = $stat[2]; 107 | my $uid = $stat[4]; 108 | my $gid = $stat[5]; 109 | s/$q/$q"$q"$q/g; # escape single quotes 110 | s/^/$q/; 111 | s/$/$q/; 112 | if ($uid != $>) { 113 | printf "maybe chown $q%s$q %s\n", uidname($uid), $_; 114 | } 115 | if ($gid != $)) { 116 | printf "maybe chgrp $q%s$q %s\n", gidname($gid), $_; 117 | } 118 | printf "maybe chmod %04o %s\n", $mode & 07777, $_; 119 | ' 120 | 121 | # We don't handle xattrs. 122 | # Maybe check for getfattr/setfattr and use them if they're available? 123 | } 124 | 125 | if [ "$VCS" = git ] || [ "$VCS" = hg ] || [ "$VCS" = bzr ] || [ "$VCS" = darcs ]; then 126 | if [ -f .metadata ]; then 127 | # remove obsolete .metadata file 128 | # git allows fully deleting it at this point, other VCS 129 | # may not (the repo is locked for hg). 130 | if [ "$VCS" = git ]; then 131 | $VCS rm .metadata 132 | else 133 | rm -f .metadata 134 | fi 135 | fi 136 | 137 | echo "# Generated by etckeeper. Do not edit." > .etckeeper 138 | echo >> .etckeeper 139 | 140 | # Make sure the file is not readable by others, since it can leak 141 | # information about contents of non-readable directories in /etc. 142 | chmod 700 .etckeeper 143 | 144 | generate_metadata >> .etckeeper 145 | 146 | # stage the file as part of the current commit 147 | if [ "$VCS" = git ]; then 148 | # this will do nothing if the metadata file is unchanged. 149 | git add .etckeeper 150 | fi 151 | # hg, bzr and darcs add not done, they will automatically 152 | # include the file in the current commit 153 | fi 154 | -------------------------------------------------------------------------------- /update-ignore.d/01update-ignore: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | if [ "$VCS" = git ]; then 5 | dir=.git 6 | file=.gitignore 7 | elif [ "$VCS" = hg ]; then 8 | dir=.hg 9 | file=.hgignore 10 | elif [ "$VCS" = bzr ]; then 11 | dir=.bzr 12 | file=.bzrignore 13 | elif [ "$VCS" = darcs ]; then 14 | dir=_darcs 15 | file=.darcsignore 16 | else 17 | echo "etckeeper: unsupported VCS $VCS" >&2 18 | exit 1 19 | fi 20 | 21 | if [ ! -d "$dir" ]; then 22 | exit 0 23 | fi 24 | 25 | managed_by_etckeeper="managed by etckeeper" 26 | 27 | nl() { 28 | echo >>"$file" 29 | } 30 | 31 | comment() { 32 | comment="$1" 33 | echo "# $comment" >>"$file" 34 | } 35 | 36 | ignore() { 37 | glob="$1" 38 | 39 | case "$VCS" in 40 | git) 41 | # escape "#" in ignores, as otherwise it may 42 | # be considered a comment 43 | echo "$glob" | sed 's/#/\\#/g' >>"$file" 44 | ;; 45 | bzr) 46 | echo "$glob" >>"$file" 47 | ;; 48 | hg) 49 | # rather than converting the glob to a regexp, just 50 | # configure hg to use globs 51 | if [ -z "$hg_syntax_printed" ]; then 52 | comment "use glob syntax" 53 | echo "syntax: glob" >>"$file" 54 | nl 55 | hg_syntax_printed=1 56 | fi 57 | echo "$glob" | sed 's/#/\\#/g' >>"$file" 58 | ;; 59 | darcs) 60 | # darcs doesn't understand globs, so we need to 61 | # translate them into regexs. Not a complete converter, 62 | # but suitable for given globs. 63 | if [ "${glob%\*}" != "$glob" ]; then 64 | glob="${glob%\*}" 65 | else 66 | glob="$glob"'($|/)' 67 | fi 68 | if [ "${glob#\*}" != "$glob" ]; then 69 | glob="${glob#\*}" 70 | else 71 | glob='(^|/)'"$glob" 72 | fi 73 | glob="$( printf %s $glob | sed -e 's/\./\\./g;s/\*/[^\/]*/g;s/\?/[^\/]/g' )" 74 | echo "$glob" >>"$file" 75 | esac 76 | } 77 | 78 | writefile () { 79 | comment "begin section $managed_by_etckeeper (do not edit this section by hand)" 80 | nl 81 | 82 | if [ "$VCS" = darcs ]; then 83 | darcs setpref boringfile .darcsignore 84 | fi 85 | 86 | if [ "$LOWLEVEL_PACKAGE_MANAGER" = dpkg ]; then 87 | comment "new and old versions of conffiles, stored by dpkg" 88 | ignore "*.dpkg-*" 89 | comment "new and old versions of conffiles, stored by ucf" 90 | ignore "*.ucf-*" 91 | nl 92 | elif [ "$LOWLEVEL_PACKAGE_MANAGER" = "rpm" ]; then 93 | comment "new and old versions of conffiles, stored by apt/rpm" 94 | ignore "*.rpm*" 95 | nl 96 | elif [ "$LOWLEVEL_PACKAGE_MANAGER" = "pacman-g2" -o "$LOWLEVEL_PACKAGE_MANAGER" = "pacman" ]; then 97 | comment "new and old versions of conffiles, stored by pacman" 98 | ignore "*.pacnew" 99 | ignore "*.pacorig" 100 | ignore "*.pacsave" 101 | nl 102 | fi 103 | 104 | comment "old versions of files" 105 | ignore "*.old" 106 | # Not currently ignored as admins tend to rely on these files. 107 | #ignore "passwd-" 108 | #ignore "group-" 109 | #ignore "shadow-" 110 | #ignore "gshadow-" 111 | nl 112 | 113 | comment "mount(8) records system state here, no need to store these" 114 | ignore blkid.tab 115 | ignore blkid.tab.old 116 | nl 117 | 118 | comment "some other files in /etc that typically do not need to be tracked" 119 | ignore nologin 120 | ignore ld.so.cache 121 | ignore prelink.cache 122 | ignore mtab 123 | ignore mtab.fuselock 124 | ignore .pwd.lock 125 | ignore "*.LOCK" 126 | ignore network/run 127 | ignore adjtime 128 | ignore lvm/cache 129 | ignore lvm/archive 130 | ignore "X11/xdm/authdir/authfiles/*" 131 | ignore ntp.conf.dhcp 132 | ignore .initctl 133 | ignore "webmin/fsdump/*.status" 134 | ignore "webmin/webmin/oscache" 135 | ignore "apparmor.d/cache/*" 136 | ignore "service/*/supervise/*" 137 | ignore "service/*/log/supervise/*" 138 | ignore "sv/*/supervise/*" 139 | ignore "sv/*/log/supervise/*" 140 | ignore "*.elc" 141 | ignore "*.pyc" 142 | ignore "*.pyo" 143 | ignore "init.d/.depend.*" 144 | ignore "openvpn/openvpn-status.log" 145 | ignore "cups/subscriptions.conf" 146 | ignore "cups/subscriptions.conf.O" 147 | ignore "fake-hwclock.data" 148 | ignore "check_mk/logwatch.state" 149 | nl 150 | 151 | comment "editor temp files" 152 | ignore "*~" 153 | ignore ".*.sw?" 154 | ignore ".sw?" 155 | ignore "#*#" 156 | ignore DEADJOE 157 | 158 | nl 159 | comment "end section $managed_by_etckeeper" 160 | } 161 | 162 | if [ -e "$file" ]; then 163 | if ! grep -q "$managed_by_etckeeper" "$file"; then 164 | if [ "$1" != "-a" ]; then 165 | echo "etckeeper: "$file" does not contain \"$managed_by_etckeeper\" comment; not updating" 166 | exit 1 167 | else 168 | echo "etckeeper: "$file" exists but does not contain \"$managed_by_etckeeper\" comment; updating" 169 | writefile 170 | exit 0 171 | fi 172 | fi 173 | realfile="$file" 174 | if which tempfile >/dev/null 2>&1 || type tempfile >/dev/null 2>&1; then 175 | tempfile="tempfile" 176 | elif which mktemp >/dev/null 2>&1 || type mktemp >/dev/null 2>&1; then 177 | tempfile="mktemp" 178 | else 179 | echo "etckeeper warning: can't find tempfile or mktemp" >&2 180 | fi 181 | file=$($tempfile update-ignore) 182 | ( 183 | skipping= 184 | while read -r line; do 185 | if echo "$line" | grep -q "$managed_by_etckeeper"; then 186 | if [ ! "$skipping" ]; then 187 | skipping=1 188 | else 189 | skipping= 190 | writefile 191 | fi 192 | elif [ ! "$skipping" ]; then 193 | echo "$line" >> "$file" 194 | fi 195 | done 196 | if [ "$skipping" ]; then 197 | # reached end of file w/o ending block 198 | writefile 199 | fi 200 | ) <"$realfile" 201 | 202 | mv -f "$file" "$realfile" 203 | else 204 | writefile 205 | fi 206 | -------------------------------------------------------------------------------- /doc/todo/Adding_support_for_.hgignore.mdwn: -------------------------------------------------------------------------------- 1 | Hi, I wrote emails and a bugreport for this issue but never got an answer... 2 | 3 | Currently eetckeeper does ignore the .hgignore file. My workflow is like this: 4 | I have a hgignore to ignore everything and adding files explicitly. There are also exceptions from that where I want to track for new files: 5 | 6 | Ignoring everyhing would be: 7 | 8 | syntax: glob 9 | ** 10 | 11 | With exceptions: 12 | 13 | syntax: regexp 14 | 15 | # Ignore anything in root folder but include .hgignore and special folders: 16 | #^(?!.hgignore|data|DATA|NFS|usr(/local(/lib(/site_perl|$)|$)|$)|etc(/init.d(/*.sh$|$)|$)) 17 | # OR 18 | ^(?!boot(/config|$)|etc(/runlevels|$)) 19 | 20 | The long time problem is that etckeeper tries to scan the whole repo root which is / here because I also track some items in /usr/local or /root. Those find on / take far too long and never come back. 21 | 22 | Therefore I dropped pre-commit.d/20warn-problem-files completely since I know which files I added explicitly. I also dropped the search for empty directories because I only add specific files. 23 | As for 30store-metadata I added hg status -nacu for getting all relevant files: 24 | 25 | [[!format bash """ 26 | --- /root/src/etckeeper/pre-commit.d/30store-metadata 2015-02-19 13:13:46.171485949 +0100 27 | +++ pre-commit.d/30store-metadata 2015-02-19 13:28:01.593456235 +0100 28 | @@ -59,7 +59,10 @@ generate_metadata() { 29 | # (Note that when using this, the find expression must end with 30 | # -print or -exec, else the excluded directories will actually be 31 | # printed!) 32 | - NOVCS='. -path ./.git -prune -o -path ./.bzr -prune -o -path ./.hg -prune -o -path ./_darcs -prune -o' 33 | + if [ "$VCS" = hg ]; then 34 | + HG_FILES="$(hg status -nacu)" 35 | + fi 36 | + NOVCS="${HG_FILES:-.} -path ./.git -prune -o -path ./.bzr -prune -o -path ./.hg -prune -o -path ./_darcs -prune -o" 37 | 38 | # Keep the sort order the same at all times. 39 | LC_COLLATE=C 40 | @@ -68,8 +71,9 @@ generate_metadata() { 41 | if [ "$VCS" = git ] || [ "$VCS" = hg ]; then 42 | # These version control systems do not track directories, 43 | # so empty directories must be stored specially. 44 | - find $NOVCS -type d -empty -print | 45 | - sort | shellquote | sed -e "s/^/mkdir -p /" 46 | +# find ${HG_FILES:- } $NOVCS -type d -empty -print | 47 | +# sort | shellquote | sed -e "s/^/mkdir -p /" 48 | + true 49 | fi 50 | 51 | if [ "$VCS" = darcs ]; then 52 | @@ -110,12 +114,12 @@ generate_metadata() { 53 | s/^/$q/; 54 | s/$/$q/; 55 | if ($uid != $>) { 56 | - printf "maybe chown $q%s$q %s\n", uidname($uid), $_; 57 | + printf "maybe chown -c $q%s$q %s\n", uidname($uid), $_; 58 | } 59 | if ($gid != $)) { 60 | - printf "maybe chgrp $q%s$q %s\n", gidname($gid), $_; 61 | + printf "maybe chgrp -c $q%s$q %s\n", gidname($gid), $_; 62 | } 63 | - printf "maybe chmod %04o %s\n", $mode & 07777, $_; 64 | + printf "maybe chmod -c %04o %s\n", $mode & 07777, $_; 65 | ' 66 | """]] 67 | 68 | Thanks for the new website beside the very basic debian bugtracker. Please provide a bug tracker or ticket system. Please provide also simple tar-balls with the release-versions beside git-tags, that can be used by other package managers and distributions. 69 | 70 | Since some distros are already considered please integrate the Gentoo package manager so we can drop our patches: 71 | 72 | 73 | 74 | # There is something missing if only recording uid/gid/mode for tracked files... 75 | All dirnames of every file must also get the right permissions. 76 | 77 | I only did the hg source part. Using bash arrays could be better, I tried to stay sh compatible. This is a quick hack, not completely tested... 78 | 79 | [[!format bash """ 80 | # diff -uNr /root/src/etckeeper/pre-commit.d/30store-metadata /etc/etckeeper/pre-commit.d/30store-metadata 81 | --- /root/src/etckeeper/pre-commit.d/30store-metadata 2015-02-20 15:36:24.912374338 +0100 82 | +++ /etc/etckeeper/pre-commit.d/30store-metadata 2015-02-20 15:34:10.770378997 +0100 83 | @@ -44,6 +44,21 @@ 84 | sed -e "s/'/'\"'\"'/g" -e "s/^/'/" -e "s/$/'/" 85 | } 86 | 87 | +getdirname() { 88 | + # Permissions of all parent dirnames must also be recorded 89 | + local p 90 | + # Print the file itself 91 | + printf '%s' "$p" 92 | + p=${1%/*} 93 | + # Print the files dirnames 94 | + while [[ $p = */* ]]; do 95 | + printf ' %s' "$p" 96 | + p=${p%/*} 97 | + done 98 | + # Print the parent dirname 99 | + printf ' %s' "$p" 100 | +} 101 | + 102 | generate_metadata() { 103 | # This function generates the script commands to fix any file 104 | # ownerships that aren't owner=root, group=root, as well as to 105 | @@ -57,9 +72,17 @@ 106 | # but we want find to ignore the VCS files themselves. 107 | # 108 | # (Note that when using this, the find expression must end with 109 | - # -print or -exec, else the excluded directories will actually be 110 | - # printed!) 111 | - NOVCS='. -path ./.git -prune -o -path ./.bzr -prune -o -path ./.hg -prune -o -path ./_darcs -prune -o' 112 | + # -print or -exec, else the excluded directories will actually be 113 | + # printed!) 114 | + if [ "$VCS" = hg ]; then 115 | + HG_FILES="$(hg status -nacu)" 116 | + HG_FILES_DIRS="" 117 | + for file in $HG_FILES; do 118 | + HG_FILES_DIRS+=" $(getdirname $file)" 119 | + done 120 | + 121 | + fi 122 | + NOVCS="${ALL_FILES:-.} -path ./.git -prune -o -path ./.bzr -prune -o -path ./.hg -prune -o -path ./_darcs -prune -o" 123 | 124 | # Keep the sort order the same at all times. 125 | LC_COLLATE=C 126 | @@ -68,8 +91,9 @@ 127 | if [ "$VCS" = git ] || [ "$VCS" = hg ]; then 128 | # These version control systems do not track directories, 129 | # so empty directories must be stored specially. 130 | - find $NOVCS -type d -empty -print | 131 | - sort | shellquote | sed -e "s/^/mkdir -p /" 132 | +# find ${ALL_FILES:- } $NOVCS -type d -empty -print | 133 | +# sort | shellquote | sed -e "s/^/mkdir -p /" 134 | + true 135 | fi 136 | 137 | if [ "$VCS" = darcs ]; then 138 | @@ -83,7 +107,8 @@ 139 | 140 | # Store things that don't have the default user or group. 141 | # Store all file modes, in case the user has an unusual umask. 142 | - find $NOVCS \( -type f -or -type d \) -print | filter_ignore | sort | perl -ne ' 143 | + #find $NOVCS \( -type f -or -type d \) -print | filter_ignore | sort | perl -ne ' 144 | + echo $HG_FILES_DIRS | tr " " "\n" | sort -u | perl -ne ' 145 | BEGIN { $q=chr(39) } 146 | sub uidname { 147 | my $want=shift; 148 | @@ -110,12 +135,12 @@ 149 | s/^/$q/; 150 | s/$/$q/; 151 | if ($uid != $>) { 152 | - printf "maybe chown $q%s$q %s\n", uidname($uid), $_; 153 | + printf "maybe chown -c $q%s$q %s\n", uidname($uid), $_; 154 | } 155 | if ($gid != $)) { 156 | - printf "maybe chgrp $q%s$q %s\n", gidname($gid), $_; 157 | + printf "maybe chgrp -c $q%s$q %s\n", gidname($gid), $_; 158 | } 159 | - printf "maybe chmod %04o %s\n", $mode & 07777, $_; 160 | + printf "maybe chmod -c %04o %s\n", $mode & 07777, $_; 161 | ' 162 | 163 | # We don't handle xattrs. 164 | """]] 165 | 166 | I added an init hook for any update, so after cloning to a new location and updating, all permissions are going to be fixed: 167 | [hooks] 168 | 169 | [[!format python """ 170 | # pre-commit hook for etckeeper, to store metadata and do sanity checks 171 | pre-commit = etckeeper pre-commit -d "$(hg root)" 172 | post-update = etckeeper init "$(hg root)" 173 | """]] 174 | 175 | Best regards, 176 | Massimo 177 | -------------------------------------------------------------------------------- /doc/README.mdwn: -------------------------------------------------------------------------------- 1 | # etckeeper 2 | 3 | This is a fork of `etckeeper` meant to work with OS X. It's being developed/tested on OS X Yosemite. 4 | 5 | 6 | ## Installation (OS X) 7 | 8 | 1. Edit `etckeeper.conf` to your liking. On OS X, none of the package managers are likely relevant, so leave them blank. The key thing is to select your source control system. 9 | * Note that your VCS must be installed such that it's in `root`'s path and is usable by `root`. 10 | 1. `make install` -- you won't need a `make` unless you're using Bazaar or somehow using DNF. 11 | 12 | 13 | ## About 14 | 15 | `etckeeper` is a collection of tools to let `/etc` be stored in a git, mercurial, bazaar or darcs repository. This lets you use git to review or revert changes that were made to `/etc`. Or even push the repository elsewhere for backups or cherry-picking configuration changes. 16 | 17 | It hooks into package managers like apt to automatically commit changes made to /etc during package upgrades. It tracks file metadata that git does not normally support, but that is important for /etc, such as the permissions of `/etc/shadow`. 18 | 19 | It's quite modular and configurable, while also being simple to use if you understand the basics of working with version control. 20 | 21 | 22 | ## Security Warnings 23 | 24 | First, a big warning: By checking /etc into version control, you are creating a copy of files like /etc/shadow that must remain secret. Anytime you have a copy of a secret file, it becomes more likely that the file contents won't remain secret. etckeeper is careful about file permissions, and will make sure that repositories it sets up don't allow anyone but root to read their contents. However, you *also* must take care when cloning or copying these repositories, not to allow anyone else to see the data. 25 | 26 | Since git mushes all the files into packs under the .git directory, the whole .git directory content needs to be kept secret. (Ditto for mercurial and .hg as well as bazaar and .bzr) 27 | 28 | Also, since version control systems don't keep track of the mode of files like the shadow file, it will check out world readable, before etckeeper fixes the permissions. The tutorial has some examples of safe ways to avoid these problems when cloning an /etc repository. 29 | 30 | Also note that `etckeeper init` runs code stored in the repository. So don't use it on repositories from untrusted sources. 31 | 32 | 33 | ## What `etckeeper` Does 34 | 35 | `etckeeper` has special support to handle changes to `/etc` caused by installing and upgrading packages. Before apt installs packages, `etckeeper pre-install` will check that /etc contains no uncommitted changes. After apt installs packages, `etckeeper post-install` will add any new interesting files to the repository, and commit the changes. 36 | 37 | You can also run `etckeeper commit` by hand to commit changes. 38 | 39 | There is also a cron job, that will use etckeeper to automatically commit any changes to /etc each day. 40 | 41 | 42 | ## VCS limitations 43 | 44 | Version Control Systems are designed as a way to manage source code, not as a way to manage arbitrary directories like `/etc`. This means there are a few limitations that etckeeper has to work around. These include file metadata storage, empty directories, and special files. 45 | 46 | Most VCS, including git, mercurial and bazaar have only limited tracking of file metadata, being able to track the executable bit, but not other permissions or owner info. (darcs doesn't even track executable bits.) So file metadata is stored separately. Among other chores, `etckeeper init` sets up a `pre-commit` hook that stores metadata about file owners and permissions into a `/etc/.etckeeper` file. This metadata is stored in version control along with everything else, and can be applied if the repo should need to be checked back out. 47 | 48 | git and mercurial cannot track empty directories, but they can be significant sometimes in /etc. So the `pre-commit` hook also stores information that can be used to recreate the empty directories in the `/etc/.etckeeper` file. 49 | 50 | Most VCS don't support several special files that you _probably_ won't have in `/etc`, such as unix sockets, named pipes, hardlinked files (but symlinks are fine), and device files. The `pre-commit` hook will warn if your `/etc` contains such special files. 51 | 52 | Darcs doesn't support symlinks, so they are also stored in `/etc/.etckeeper`. 53 | 54 | 55 | ## Tutorial 56 | 57 | A quick walkthrough of using `etckeeper`. 58 | 59 | Note that the default VCS is git, and this tutorial assumes you're using it. Using other VCSes should be broadly similar. 60 | 61 | First, get `etckeeper` installed (see above). 62 | 63 | The `etckeeper init` command initialises an /etc/.git/ repository. 64 | 65 | sudo etckeeper init 66 | 67 | The `etckeeper init` command is careful to never overwrite existing files or directories in /etc. It will create a `.gitignore` if one doesn't already exist (or update content inside a "managed by etckeeper" comment block), sets up pre-commit hooks if they don't already exist, and so on. It does *not* commit any files, but does `git add` all interesting files for an initial commit later. 68 | 69 | Now you might want to run `git status` to check that it includes all the right files, and none of the wrong files. And you can edit the `.gitignore` and so forth. Once you're ready, it's time to commit: 70 | 71 | cd /etc 72 | sudo git status 73 | sudo git commit -m "initial checkin" 74 | sudo git gc # pack git repo to save a lot of space 75 | 76 | After this first commit, you can use regular git commands to handle further changes: 77 | 78 | passwd someuser 79 | sudo git status 80 | sudo git commit -a -m "changed a password" 81 | 82 | Rinse, lather, repeat. You might find that some files are changed by daemons and shouldn't be tracked by git. These can be removed from git: 83 | 84 | sudo git rm --cached printcap # modified by CUPS 85 | sudo "echo printcap >> .gitignore" 86 | sudo git commit -a -m "don't track printcap" 87 | 88 | `etckeeper` hooks into apt (and similar systems) so changes to interesting files in `/etc` caused by installing or upgrading packages will automatically be committed. Here "interesting" means files that are not ignored by `.gitignore`. 89 | 90 | You can use any git commands you like, but do keep in mind that, if you check out a different branch or an old version, git is operating directly on your system's /etc. If you do decide to check out a branch or tag, make sure you run "etckeeper init" again, to get any metadata changes: 91 | 92 | sudo git checkout april_first_joke_etc 93 | sudo etckeeper init 94 | 95 | Often it's better to clone /etc to elsewhere and do potentially dangerous stuff in a staging directory. You can clone the repository using git clone, but be careful that the directory it's cloned into starts out mode 700, to prevent anyone else from seeing files like `shadow`, before `etckeeper init` fixes their permissions: 96 | 97 | mkdir /my/workdir 98 | cd /my/workdir 99 | chmod 700 . 100 | git clone /etc 101 | cd etc 102 | etckeeper init -d . 103 | chmod 755 .. 104 | 105 | Another common reason to clone the repository is to make a backup to a server. When using `git push` to create a new remote clone, make sure the new remote clone is mode 700! (And, obviously, only push over a secure transport like ssh, and only to a server you trust.) 106 | 107 | ssh server 'mkdir /etc-clone; cd /etc-clone; chmod 700 .; git init --bare' 108 | git remote add backup ssh://server/etc-clone 109 | git push backup --all 110 | 111 | If you have several machine's using `etckeeper`, you can start with a `etckeeper` repository on one machine, then add another machine's `etckeeper` repository as a git remote. Then you can diff against it, examine its history, merge with it, and so on. It would probably not, however, be wise to `git checkout` the other machine's branch! (And if you do, make sure to run "etckeeper init" to update file permissions.) 112 | 113 | root@darkstar:/etc>git remote add dodo ssh://dodo/etc 114 | root@darkstar:/etc>git fetch dodo 115 | root@darkstar:/etc>git diff dodo/master group |head 116 | diff --git a/group b/group 117 | index 0242b84..b5e4384 100644 118 | --- a/group 119 | +++ b/group 120 | @@ -5,21 +5,21 @@ sys:x:3: 121 | adm:x:4:joey 122 | tty:x:5: 123 | disk:x:6: 124 | -lp:x:7:cupsys 125 | +lp:x:7: 126 | 127 | Incidentially, this also means I have a backup of `dodo`'s `/etc` on `darkstar`. So if `darkstar` is compromised, that data could be used to attack `dodo` too. On the other hand, if `dodo`'s disk dies, I can restore it from this handy hackup. 128 | 129 | Of course, it's also possible to pull changes from a server onto client machines, to deploy changes to `/etc`. Once `/etc` is under version control, the sky's the limit.. 130 | 131 | 132 | ## Configuration 133 | 134 | The main configuration file is `/etc/etckeeper/etckeeper.conf` 135 | 136 | `etckeeper` runs the executable files in `/etc/etckeeper/$command.d/`. (It ignores the same ones that `run-parts(1)` would ignore.) You can modify these files, or add your own custom files. Each individual file is short, simple, and does only one action. 137 | 138 | For example, here's how to configure it to run `git gc` after each `apt` run, which will save a lot of disk space: 139 | 140 | cd /etc/etckeeper/post-install.d 141 | (echo '#!/bin/sh' ; echo 'exec git gc') > 99git-gc 142 | chmod +x 99git-gc 143 | git add . 144 | git commit -m "run git gc after each apt run" 145 | 146 | Here's how to disable the automatic commits after each `apt` run, while still letting it `git add` new files: 147 | 148 | rm /etc/etckeeper/commit.d/50vcs-commit 149 | 150 | ## `sudo` Integration 151 | 152 | `etckeeper` will notice if it's being run by way of sudo, and makes a commit with the author set to the user who sudoed to root. This is useful when a system has multiple admins; as long as they use sudo while doing their administration, and run `etckeeper commit` to commit their changes, `git blame` can show who was responsible for each change. 153 | 154 | ## Changing VCS 155 | 156 | By default, `etckeeper` uses `git`. This choice has been carefully made; `git` is the VCS best supported by `etckeeper` and the VCS users are most likely to know. 157 | 158 | [ It's possible that your distribution has chosen to modify etckeeper so its default VCS is not git -- if they have please complain to them, as they're making things unnecessarily difficult for you, and causing unnecessary divergence of etckeeper installations. You should only be using etckeeper with a VCS other than git if you're in love with the other VCS. ] 159 | 160 | If you would like to use some other VCS, and `etckeeper init` has already been run to set up a git repository, you have a decision to make: Is the history recorded in that repository something you need to preserve, or can you afford to just blow it away and check the current /etc into the new VCS? 161 | 162 | In the latter case, you just need to follow three steps: 163 | 164 | etckeeper uninit # deletes /etc/.git! 165 | vim /etc/etckeeper/etckeeper.conf 166 | etckeeper init 167 | 168 | In the former case, you will need to convert the git repository to the other VCS using whatever tools are available to do that. Then you can run `etckeeper uninit`, move files your new VCS will use into place, edit `etckeeper.conf` to change the VCS setting, and finally `etckeeper init`. This procedure is clearly only for the brave. 169 | 170 | 171 | ## Inspiration 172 | 173 | Two blog posts provided inspiration for techniques used by etckeeper: 174 | 175 | * 176 | 177 | * 178 | 179 | `isisetup` had some of the same aims as etckeeper, however, unlike it, `etckeeper` does not aim to be a `git` porcelain with its own set of commands for manipulating the `/etc` repository. Instead, `etckeeper` provides a simple setup procedure and hooks for setting up an `/etc` repository, and then gets out of your way; you manage the repository using regular VCS commands. 180 | 181 | 182 | ## License 183 | 184 | `etckeeper` is licensed under version 2 or greater of the GNU GPL. 185 | 186 | 187 | ## Website 188 | 189 | 190 | 191 | 192 | 193 | ## Author 194 | 195 | Joey Hess 196 | -------------------------------------------------------------------------------- /GPL: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | 294 | Copyright (C) 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | , 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | -------------------------------------------------------------------------------- /debian/changelog: -------------------------------------------------------------------------------- 1 | etckeeper (1.17) unstable; urgency=medium 2 | 3 | * Fix name of DNF plugin. 4 | * Add --version 5 | Thanks Andreas Wansner. 6 | * New website, http://etckeeper.branchable.com/ 7 | * Add build-depends on dh-python. 8 | 9 | -- Joey Hess Mon, 22 Dec 2014 16:42:26 -0400 10 | 11 | etckeeper (1.16) unstable; urgency=medium 12 | 13 | * Added support for Fedora's DNF highlevel package manager. 14 | Thanks, Peter Listiak and Petr Spacek. 15 | * Add architecture info to dpkg list-installed. Closes: #768145 16 | * Orphaned the Debian package. 17 | 18 | -- Joey Hess Fri, 07 Nov 2014 21:30:50 -0400 19 | 20 | etckeeper (1.15) unstable; urgency=medium 21 | 22 | * Recommend cron-daemon, rather than cron, as etckeeper only needs 23 | cron.daily functionality. Closes: #762721 24 | 25 | -- Joey Hess Thu, 16 Oct 2014 12:21:48 -0400 26 | 27 | etckeeper (1.14) unstable; urgency=medium 28 | 29 | * Handle failure to commit in post-install, pre-install by showing a 30 | warning, rather than propigating the error to apt. 31 | This avoids breaking the apt run when eg, git is misconfigured and 32 | cannot commit. 33 | pre-install already did this when it was able to use debconf to display a 34 | message, but now debconf is not used, and it always behaves this way. 35 | Closes: #760011 36 | 37 | -- Joey Hess Thu, 04 Sep 2014 15:47:32 -0400 38 | 39 | etckeeper (1.13) unstable; urgency=medium 40 | 41 | * Ignore check-mk-agent-logwatch's FHS violating 42 | /etc/check_mk/logwatch.state. Closes: #753903 43 | * Only allow [-a-z_] in etckeeper commands to avoid any possible directory 44 | traversal etc issues. 45 | * update-ignore, uninit: Fix parsing of ignore files containing '\' 46 | 47 | -- Joey Hess Sat, 09 Aug 2014 13:05:55 -0400 48 | 49 | etckeeper (1.12) unstable; urgency=medium 50 | 51 | * Portability fixes. Thanks, Harald Dunkel. 52 | * Add support for pushing to multiple remote repositories. 53 | Thanks, Rouben. 54 | * Fix handling of git ignores like dir/* 55 | Thanks, Pim van den Berg 56 | 57 | -- Joey Hess Fri, 13 Jun 2014 12:03:06 -0400 58 | 59 | etckeeper (1.11) unstable; urgency=low 60 | 61 | * Fix too broad matching of .gitignored files. 62 | Closes: #732339 63 | 64 | -- Joey Hess Tue, 17 Dec 2013 22:24:29 -0400 65 | 66 | etckeeper (1.10) unstable; urgency=low 67 | 68 | * Remove lvm/backup from default ignores, because lvm 69 | documentation recommends backing that up, for use by 70 | vgcfgrestore. 71 | * Fix exporting of some git variables. Closes: #728583 72 | 73 | -- Joey Hess Sun, 03 Nov 2013 12:14:02 -0400 74 | 75 | etckeeper (1.9) unstable; urgency=low 76 | 77 | * Fix git update-ignore syntax. Closes: #721873 78 | 79 | -- Joey Hess Wed, 04 Sep 2013 21:43:42 -0400 80 | 81 | etckeeper (1.8) unstable; urgency=low 82 | 83 | * Avoid listing .gitignored files in .etckeeper file. Closes: #607665 84 | Thanks, Zdenek Crha 85 | 86 | -- Joey Hess Wed, 04 Sep 2013 09:31:37 -0400 87 | 88 | etckeeper (1.7) unstable; urgency=low 89 | 90 | * Fix hilarious typo hardcoding my name. Closes: #718425 91 | 92 | -- Joey Hess Wed, 31 Jul 2013 11:33:45 -0400 93 | 94 | etckeeper (1.6) unstable; urgency=low 95 | 96 | * Guard git config calls. Closes: #717957 97 | 98 | -- Joey Hess Sat, 27 Jul 2013 12:24:30 -0400 99 | 100 | etckeeper (1.5) unstable; urgency=low 101 | 102 | * Quote user and group names, in case one contains a space. 103 | * Added support for the pacman package manager. 104 | (Thanks, Tiago Stürmer Daitx) 105 | * Use user.name and user.email from the .gitconfig file belonging to the 106 | user who sued or sudoed to root, in preference to making up values for 107 | that user. 108 | * cron.daily: Fix typo in stale lockfile handling code. 109 | Closes: #717908 110 | 111 | -- Joey Hess Fri, 26 Jul 2013 11:03:48 -0400 112 | 113 | etckeeper (1.4) unstable; urgency=low 114 | 115 | * Deal with unix^wlinux portability nonsense. 116 | 117 | -- Joey Hess Mon, 17 Jun 2013 12:00:59 -0400 118 | 119 | etckeeper (1.3) unstable; urgency=low 120 | 121 | * Fix type -p bashism that crept in via recent patches. Closes: #707319 122 | 123 | -- Joey Hess Wed, 08 May 2013 22:36:30 -0400 124 | 125 | etckeeper (1.2) unstable; urgency=low 126 | 127 | * Call type -p in a more compatable way. 128 | * When a file is owned by a uid or a gid with no corresponding user or 129 | group, put a numeric chown into .etckeeper. Previously, a broken 130 | chown was outputted. 131 | 132 | -- Joey Hess Wed, 08 May 2013 11:51:51 -0400 133 | 134 | etckeeper (1.1) unstable; urgency=low 135 | 136 | * Fix warning when PUSH_REMOTE is not set. Closes: #706917 137 | 138 | -- Joey Hess Mon, 06 May 2013 09:49:24 -0400 139 | 140 | etckeeper (1.0) unstable; urgency=low 141 | 142 | [ Joey Hess ] 143 | * Unset GIT_DIR and GIT_WORK_TREE. Closes: #689101 144 | * PUSH_REMOTE can be set to automatically push to a remote on commit. 145 | Thanks, L. Alberto Giménez 146 | * Ignore fake-hwclock.data. Closes: #701491 147 | 148 | [ Jelmer Vernooij ] 149 | * Auto-detect the VCS setting if there already is a repository in 150 | /etc. 151 | 152 | -- Joey Hess Sat, 04 May 2013 23:45:25 -0400 153 | 154 | etckeeper (0.64) unstable; urgency=low 155 | 156 | * Added support for openSUSE's zypper package manager. 157 | Thanks, Catalin Iacob 158 | * Add Brazilian Portuguese debconf translation. 159 | Closes: #685771 Thanks, Adriano Rafael Gomes 160 | 161 | -- Joey Hess Sat, 25 Aug 2012 11:53:08 -0400 162 | 163 | etckeeper (0.63) unstable; urgency=low 164 | 165 | * bzr: Improve detection of unclean repos, to work when there are shelved 166 | changes. 167 | * uninit: Now preserves parts of the gitignore and similar files that 168 | are outside the managed by etckeeper block. Closes: #673996 169 | Thanks, David De La Harpe Golden (Squared Financial) 170 | 171 | -- Joey Hess Sat, 02 Jun 2012 18:22:37 -0400 172 | 173 | etckeeper (0.62) unstable; urgency=low 174 | 175 | * Autocommit git staged files. Closes: #662614 176 | 177 | -- Joey Hess Mon, 05 Mar 2012 10:41:46 -0400 178 | 179 | etckeeper (0.61) unstable; urgency=low 180 | 181 | * Fix up botched git-rm conffile removal from 0.58. 182 | The file could be in any of three states; absent, present, or .dpkg-dist. 183 | Finish fully removing it. Closes: #655836 184 | 185 | -- Joey Hess Sat, 14 Jan 2012 12:42:50 -0400 186 | 187 | etckeeper (0.60) unstable; urgency=low 188 | 189 | * Updated Dutch translation of debconf templates. Closes: #654244 190 | * Support -h and --help. Closes: #654188 191 | * Fix typo in bugfix for #651168. 192 | * Improve yum hook to avoid running if etckeeper was just removed. 193 | Thanks, Mykola Marzhan 194 | 195 | -- Joey Hess Fri, 06 Jan 2012 19:23:42 -0400 196 | 197 | etckeeper (0.59) unstable; urgency=low 198 | 199 | * Add /etc/cups/subscriptions.conf to default ignores, as the content of 200 | this file does not normally contain configuration and it changes 201 | frequently. Closes: #651168 202 | * Shell quoting fix. Thanks, Daniel Hahler 203 | 204 | -- Joey Hess Thu, 22 Dec 2011 11:48:50 -0400 205 | 206 | etckeeper (0.58) unstable; urgency=low 207 | 208 | * Changed to store all permissions of files and directories, even those 209 | with standard permissions of 644 and 755. This is unfortunately necessary 210 | in order to support etckeeper init on a checkout that was made with a 211 | nonstandard umask, in which case the files that were expected to be 212 | 644 and 755, won't be. Closes: #649701 213 | Thanks to Дмитрий Матросов for reporting the bug and developing 214 | a fixup script (attached to the bug) which could be used if you've 215 | already encountered this problem. 216 | * Bugfix for filenames containing single quotes. 217 | * Use git add -A, which automatically removes deleted files, 218 | and avoids a separate call to git add -u. 219 | Thanks to Miklos Vajna, whose patch in 2008 was deferred 220 | because -A was then too new, and languished in a branch until found today. 221 | * Optimised metadata storage. 222 | * cron.daily: Don't stop committing when a stale packagelist.pre-install 223 | file exists. 224 | Thanks to gulikoza for noticing this bug. 225 | 226 | -- Joey Hess Fri, 25 Nov 2011 20:03:36 -0400 227 | 228 | etckeeper (0.57) unstable; urgency=low 229 | 230 | * Use find -path instead of less portable find -wholename. 231 | 232 | -- Joey Hess Fri, 04 Nov 2011 17:03:46 -0400 233 | 234 | etckeeper (0.56) unstable; urgency=low 235 | 236 | * Converted to use dh_python2. Closes: #616800 237 | * Handle files with % in their names. 238 | 239 | -- Joey Hess Tue, 12 Jul 2011 14:38:09 -0400 240 | 241 | etckeeper (0.55) unstable; urgency=low 242 | 243 | * Fix error propigation to yum, which makes AVOID_COMMIT_BEFORE_INSTALL work. 244 | Closes: https://bugzilla.redhat.com/show_bug.cgi?id=709487 245 | Thanks, Thomas Moschny 246 | * Avoid being noisy in post-install after automatic yum updates. 247 | (Tuomo Soini) 248 | * Ignore FHS violating prelink.cache and openvpn-status.log. 249 | * Ignore *.LOCK files, as used by selinux policies. 250 | * Add AVOID_SPECIAL_FILE_WARNING to config file, and set it in cron 251 | job to avoid daily noise. (gulikoza) 252 | 253 | -- Joey Hess Sun, 19 Jun 2011 15:21:20 -0400 254 | 255 | etckeeper (0.54) unstable; urgency=low 256 | 257 | * Ignore inssev's FHS violating /etc/init.d/.depend.* files. 258 | Closes: #619407 See #619409 259 | * Use hg pre-commit hook, rather than its precommit hook, 260 | as the latter is run after the files staged for commit are 261 | determined and so .etckeeper cannot be staged as part of the current 262 | commit. Closes: #621827 263 | 264 | -- Joey Hess Mon, 30 May 2011 18:11:40 -0400 265 | 266 | etckeeper (0.53) unstable; urgency=low 267 | 268 | [ Joey Hess ] 269 | * Install bzr hook lazily, clean up some compatibility code. (Jelmer Vernooij) 270 | 271 | [ Josh Triplett ] 272 | * Only set environment variables for commit authorship (EMAIL, 273 | GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL, GIT_COMMITTER_EMAIL) if they don't 274 | already exist. 275 | 276 | [ Joey Hess ] 277 | * Add .pyc and .pyo files to ignore. 278 | * Add lvm/backup and lvm/cache to ignore. Closes: #462355 279 | * Avoid warning about special or hard linked files that are ignored 280 | by hg. Thanks Sjoerd Mullender for patch. 281 | Closes: https://bugzilla.redhat.com/show_bug.cgi?id=688991 282 | 283 | -- Joey Hess Fri, 18 Mar 2011 15:37:54 -0400 284 | 285 | etckeeper (0.52) unstable; urgency=low 286 | 287 | * Rewrote 50git-rm to avoid using git ls-files, and thus avoid encoding 288 | problems with filenames. 289 | 290 | -- Joey Hess Sun, 06 Feb 2011 00:00:55 -0400 291 | 292 | etckeeper (0.51) unstable; urgency=low 293 | 294 | * Updated Vietnamese translation of debconf templates. Closes: #601921 295 | * Improve rpm version change detection. 296 | * Move etckeeper out of sbin, to avoid needing to work around broken 297 | root PATH settings in eg, crontab. Closes: #602438 298 | * Added Polish translation of debconf templates. Closes: #607563 299 | 300 | -- Joey Hess Sat, 25 Dec 2010 14:39:57 -0400 301 | 302 | etckeeper (0.50) unstable; urgency=low 303 | 304 | * Add Danish translation of debconf templates. Closes: #597768 305 | * Ignore /etc/.initctl. Closes: #598121 306 | * Do not warn about special files or hardlinks if they are ignored by 307 | git. Fixes #549354 for git, but not for other VCSs. 308 | * Set GIT_COMMITTER_EMAIL to root@$hostname to avoid git prompting 309 | the user to configure it in .gitconfig. Closes: #599749 310 | * Deal with strange systems that include the domain name in the hostname, 311 | by stripping it. Closes: #600026 312 | 313 | -- Joey Hess Wed, 20 Oct 2010 14:06:21 -0400 314 | 315 | etckeeper (0.49) unstable; urgency=low 316 | 317 | * Ensure that PATH contains the directory containing etckeeper, so 318 | that hook scripts that re-exec etckeeper are guaranteed to find it. 319 | * Ignore -m switch to etckeeper commit, in case someone tries to use 320 | it with that option common to several VCS. Closes: #592050 321 | * Remove HOME setting in etckeeper. sudo now defaults to setting HOME 322 | itself as of version 1.7.4p4, so it is not necessary for etckeeper 323 | to work around its behavior anymore. (sudo also allows disabling that 324 | for those who enjoy using guns around feet.) Closes: #583899 325 | * Fix file quoting problem in processing .etckeeper file in init. 326 | 327 | -- Joey Hess Mon, 13 Sep 2010 13:10:43 -0400 328 | 329 | etckeeper (0.48) unstable; urgency=low 330 | 331 | * Fix backwards test for HGUSER. (Mike Rich) 332 | Closes: #589242 333 | * 'etckeeper vcs' can be used to run arbitrary VCS subcommands 334 | in the etckeeper environment. (Thanks, Stefan Tomanek) 335 | 336 | -- Joey Hess Fri, 16 Jul 2010 15:14:05 -0400 337 | 338 | etckeeper (0.47) unstable; urgency=low 339 | 340 | * Set HOME=~root so that VCS like bzr do not drop root-owned files in 341 | user home directory when sudo etckeeper is run. Closes: #583581 342 | * hg: Set HGUSER (if not already set) to avoid warning message when 343 | committing. Closes: #533298 344 | * Both git and bzr default to showing the author of a commit, 345 | and not the committer. So, set the author to the user running sudo 346 | for both. The committer will then be root. 347 | 348 | -- Joey Hess Sun, 30 May 2010 16:50:09 -0400 349 | 350 | etckeeper (0.46) unstable; urgency=low 351 | 352 | * Support etckeeper commit --stdin 353 | * Fix bug where after a large upgrade, etckeeper's automatic commit message 354 | was so long it exceeded command line length limits. Closes: #581678 355 | 356 | -- Joey Hess Sun, 16 May 2010 19:10:57 -0400 357 | 358 | etckeeper (0.45) unstable; urgency=low 359 | 360 | * Revert darcs to using --logfile again, necessary for multiline commit 361 | messages. Closes: #577915 362 | * Fix logic error in darcs user code. Closes: #577918 363 | 364 | -- Joey Hess Thu, 15 Apr 2010 11:50:22 -0400 365 | 366 | etckeeper (0.44) unstable; urgency=low 367 | 368 | * Add example to README of how to automatically push changes to a backup 369 | repository. 370 | * Add fuse lock file to ignore list. 371 | * Changed darcs to specify --author instead of noting the committing 372 | user inside the commit log. 373 | * Add -a to DARCS_COMMIT_OPTIONS so commits are noninteractive by default, 374 | but users who want darcs prompting can disable it. 375 | * Use darcs record -m to specify commit message, instead of using a logfile. 376 | * Closes: #519228 377 | * Update depends for git-core to git transition. Closes: #577732 378 | * Avoid using hostname -f, since on Solaris that sets the hostname to -f. 379 | Yay, Unix portability! (Instead, use dnsdomainname if available, and 380 | otherwise, fall back to the unqualified hostname.) 381 | * Other portability fixes for non-GNU tools and OS X. Thanks, Neil Mayhew. 382 | 383 | -- Joey Hess Wed, 14 Apr 2010 15:43:14 -0400 384 | 385 | etckeeper (0.43) unstable; urgency=low 386 | 387 | * Fix cleanup of /var/cache/etckeeper/packagelist.pre-install after 388 | an upgrade where no conffiles are changed. 389 | * Prevent cron job autocommit from happening if pre-install file 390 | is present, to avoid committing state in the middle of an apt run. 391 | Closes: #567538 392 | * Add /etc/webmin/webmin/oscache to ignore list. Closes: #567255 393 | * Check owner of tty to determine who has su'd to root when committing, 394 | based on a patch by Jakov Sosic. 395 | * Add apparmor.d/cache/ to default ignores. 396 | * Record real committer username in the darcs log, so that the man page 397 | can say that for every VCS the username is recorded. 398 | 399 | -- Joey Hess Thu, 18 Feb 2010 14:01:45 -0500 400 | 401 | etckeeper (0.42) unstable; urgency=low 402 | 403 | * Deal with removal of the cache directory. Closes: #559418 404 | * Add ucf backups to ignore list. (See #462355) 405 | * Add webmin fsdump status files to ignore list. Closes: #567000 406 | * Add *.old to ignore list (See #462355) 407 | * Add *.elc to ignore list (See #491401) 408 | * Add ntp.conf.dhcp and X11/xdm/authdir/authfiles/* to ignore list. 409 | Closes: #491401 410 | * Fix handling of "#*#" ignores for git and hg. 411 | * Add runit and daemontools supervise files to ignore list. 412 | Closes: #529253 413 | 414 | -- Joey Hess Tue, 26 Jan 2010 16:20:38 -0500 415 | 416 | etckeeper (0.41) unstable; urgency=low 417 | 418 | * Change etckeeper uninit to not remove .gitignore (etc) file 419 | if it lacks the "managed by etckeeper" comment. Closes: #545137 420 | * Fix hgrc setup code to not warn if the hgrc already contains 421 | a call to etckeeper. (Thanks, Jakov Sosic) 422 | * Updated Czech debconf translation from Miroslav Kure. Closes: #546411 423 | 424 | -- Joey Hess Sat, 26 Sep 2009 15:58:15 -0400 425 | 426 | etckeeper (0.40) unstable; urgency=low 427 | 428 | * Add Spanish debconf translation. Closes: #539589 429 | * Updated Italian debconf translation. Closes: #540516 430 | * Avoid infinite loop when displaying message about failure 431 | to commit changes in /etc. Closes: #540596 432 | 433 | -- Joey Hess Sat, 08 Aug 2009 21:21:27 -0400 434 | 435 | etckeeper (0.39) unstable; urgency=low 436 | 437 | * Document ETCKEEPER_CONF_DIR in man page. 438 | * Typo. Closes: #536799 439 | * bzr: Set author to root when committing via sudo. Committer 440 | will be the sudo user, as it is in git. 441 | 442 | -- Joey Hess Fri, 31 Jul 2009 13:47:09 -0400 443 | 444 | etckeeper (0.38) unstable; urgency=low 445 | 446 | * Use hostname if hostname -f fails. Closes: #533295 447 | * Automatically commit on initial install, so users can 448 | begin relying on etckeeper right away. Closes: #533290 449 | 450 | -- Joey Hess Wed, 08 Jul 2009 14:40:58 -0400 451 | 452 | etckeeper (0.37) unstable; urgency=low 453 | 454 | * Make postinst check for the configured VCS before trying to run 455 | etckeeper init. Closes: #530497 456 | * Update French debconf translation. Closes: #530795 457 | * Fix typo in cruft file. Closes: #530819 458 | * Update Portuguese debconf translation. Closes: #528109 459 | * Update German debconf translation. Closes: #532346 460 | 461 | -- Joey Hess Mon, 08 Jun 2009 13:24:13 -0400 462 | 463 | etckeeper (0.36) unstable; urgency=low 464 | 465 | * Add cruft ignore file. Closes: #522513 466 | * Update Japanese debconf translation. Closes: #527921 467 | * Update Swedish debconf translation. Closes: #528575 468 | * Update Russian debconf translation. Closes: #528798 469 | 470 | -- Joey Hess Sat, 16 May 2009 18:22:49 -0400 471 | 472 | etckeeper (0.35) unstable; urgency=low 473 | 474 | * Make etckeeper uninit -f disable the prompt. 475 | * Uninit on purge, guarded by a debconf prompt. Closes: #527218 476 | 477 | -- Joey Hess Wed, 06 May 2009 14:52:30 -0400 478 | 479 | etckeeper (0.34) unstable; urgency=low 480 | 481 | * Add support for mktemp if tempfile is not available. 482 | * Fix uninit prompt to accept 'y' as well as 'yes'. Closes: #517911 483 | * README: Typo. Closes: #517914 484 | 485 | -- Joey Hess Mon, 02 Mar 2009 17:01:09 -0500 486 | 487 | etckeeper (0.33) unstable; urgency=low 488 | 489 | * Add support for yum. Thanks, Jimmy Tang. 490 | 491 | -- Joey Hess Wed, 25 Feb 2009 14:38:12 -0500 492 | 493 | etckeeper (0.32) unstable; urgency=low 494 | 495 | * Add uninit subcommand, which cleans up all etckeeper and VCS droppings 496 | in /etc. This is useful if you want to switch to a different VCS and 497 | don't have any history to preserve. (Preserving history and converting 498 | is of course possible, but significantly harder.) 499 | * Run etckeeper init on initial install. Closes: #505772 500 | (The idea being that if someone doesn't want to use git, they can 501 | immediatly uninit to easily reverse this.) 502 | * Document how to change the VCS used by etckeeper, without preserving 503 | any history. Preserving history left as an exersise for the reader. 504 | Closes: #515237 505 | * Implement list-installed for rpm. 506 | * Added a spec file contributed by Jimmy Tang. 507 | 508 | -- Joey Hess Tue, 24 Feb 2009 23:01:55 -0500 509 | 510 | etckeeper (0.31) unstable; urgency=low 511 | 512 | * Avoid relying on USER being set, won't be for cron job. 513 | Closes: #515602 514 | * Add .sw? to ignores. vim uses that if editing an 515 | unspecified file name. Closes: #515628 516 | 517 | -- Joey Hess Mon, 16 Feb 2009 15:40:42 -0500 518 | 519 | etckeeper (0.30) unstable; urgency=low 520 | 521 | * Add vim .*.sw? files to default ignores. 522 | * Also add emacs #*# autosave files to default ignores. 523 | * And DEADJOE files, for good measure. 524 | * etckeeper update-ignore will automatically update the VCS ignore 525 | file, only touching the part inside a "# managed by etckeeper" 526 | comment block. (You may want to add such a comment block to your existing 527 | .gitignore, or delete the file and regenerate it.) 528 | * Run etckeeper update-ignore on upgrade. 529 | * Fix handling of -d in recursive calls to etckeeper 530 | 531 | -- Joey Hess Sat, 14 Feb 2009 01:21:22 -0500 532 | 533 | etckeeper (0.29) unstable; urgency=low 534 | 535 | * Add a daily cron job to autocommit changes to /etc. Closes: #515100 536 | The cron job is enabled by default but can be disabled 537 | via etckeeper.conf. 538 | (Thanks to Thierry Carrez) 539 | * Fix executable bits on two darcs support scripts. 540 | 541 | -- Joey Hess Fri, 13 Feb 2009 13:43:02 -0500 542 | 543 | etckeeper (0.28) unstable; urgency=low 544 | 545 | * Support darcs. Thanks to Gian Piero Carrubba. Closes: #510032 546 | 547 | -- Joey Hess Thu, 12 Feb 2009 17:13:23 -0500 548 | 549 | etckeeper (0.27) unstable; urgency=low 550 | 551 | * Use SUDO_USER as the committer if set. Closes: #498739 552 | (Thierry Carrez) 553 | * bzr: Avoid use of etckeeper pre-commit on Trees not on the 554 | filesystem. (Jelmer Vernooij) 555 | 556 | -- Joey Hess Sun, 01 Feb 2009 17:20:11 -0500 557 | 558 | etckeeper (0.26) unstable; urgency=low 559 | 560 | * Add Japanese debconf translation. Closes: #512869 561 | * Prevent git from removing a directory when the last file in it 562 | has been removed, but the directory is left existing and empty, 563 | by touching a flag file before calling git rm. Closes: 513006 564 | 565 | -- Joey Hess Sun, 25 Jan 2009 13:55:56 -0500 566 | 567 | etckeeper (0.25) unstable; urgency=low 568 | 569 | * Fix filter_unknown calls. Closes: 509888 570 | 571 | -- Joey Hess Wed, 31 Dec 2008 13:01:31 -0500 572 | 573 | etckeeper (0.24) unstable; urgency=low 574 | 575 | * Make .etckeeper test that files actually exist 576 | before acting on them. Closes: #509888 577 | 578 | -- Joey Hess Mon, 29 Dec 2008 15:37:25 -0500 579 | 580 | etckeeper (0.23) unstable; urgency=low 581 | 582 | * Fix hook scripts to use new etckeeper path. Closes: #509742 583 | 584 | -- Joey Hess Thu, 25 Dec 2008 16:25:25 -0500 585 | 586 | etckeeper (0.22) unstable; urgency=low 587 | 588 | * Move etckeeper to sbin, and man page to section 8, since only an admin 589 | can really use etckeeper. Closes: #509152 590 | * Mention README file from man page. 591 | * Build using python-central. For some reason bzr does not pick up on 592 | plugins built using python-support. 593 | 594 | -- Joey Hess Tue, 23 Dec 2008 18:51:14 -0500 595 | 596 | etckeeper (0.21) unstable; urgency=low 597 | 598 | * Swedish debconf translation from Martin Ågren. Closes: #492063 599 | * Make etckeeper init -d set up commit hooks that call etckeeper -d. 600 | (Note that if you've relied on it setting up such commit hooks for a repo 601 | outside of /etc already, it created broken ones that need to be fixed to use 602 | -d.) 603 | Thanks, Wolfgang Karall. 604 | 605 | -- Joey Hess Thu, 11 Sep 2008 16:41:16 -0400 606 | 607 | etckeeper (0.20) unstable; urgency=low 608 | 609 | [ Jelmer Vernooij ] 610 | * Use new Bazaar API. 611 | * Pass --quiet to bzr add to avoid new files from being printed twice. 612 | * Don't consider warnings from bzr plugins when checking if tree was 613 | modified. 614 | 615 | -- Joey Hess Mon, 07 Jul 2008 12:04:30 -0400 616 | 617 | etckeeper (0.19) unstable; urgency=low 618 | 619 | * Patch from Miklos Vajna to fix one more git- command that crept in. 620 | 621 | -- Joey Hess Sat, 05 Jul 2008 08:34:22 -0400 622 | 623 | etckeeper (0.18) unstable; urgency=low 624 | 625 | * Allow AVOID_COMMIT_BEFORE_INSTALL to be set to zero to disable. 626 | * Don't allow LC_COLLATE to reorder the .etckeeper file. Closes: #489057 627 | 628 | -- Joey Hess Thu, 03 Jul 2008 00:47:40 -0400 629 | 630 | etckeeper (0.17) unstable; urgency=low 631 | 632 | * Fix backwards test for AVOID_COMMIT_BEFORE_INSTALL. Closes: #486922 633 | 634 | -- Joey Hess Wed, 18 Jun 2008 20:36:52 -0400 635 | 636 | etckeeper (0.16) unstable; urgency=low 637 | 638 | [ Joey Hess] 639 | * Add a AVOID_COMMIT_BEFORE_INSTALL option in the config file to make it 640 | easy to configure etckeeper to abort an installation if there are 641 | uncommitted changes in /etc. Closes: #478754 642 | 643 | -- Joey Hess Mon, 16 Jun 2008 19:21:16 -0400 644 | 645 | etckeeper (0.15) unstable; urgency=low 646 | 647 | [ Daniel Hahler ] 648 | * bzr: Set nickname for tree in init.d/40vcs-init. 649 | * Add script to add new files during "commit" for bzr (commit.d/30bzr-add). 650 | Closes: #477321 651 | * Fix handling of files with spaces, by setting IFS to "newline" in 652 | commit.d/40git-rm. 653 | 654 | [ Jelmer Vernooij ] 655 | * Support for the new bzr pre-commit hook. This requires bzr version 1.4. 656 | Closes: #473069 657 | * Remove pointless commit.d/40bzr-rm script. 658 | 659 | [ Joey Hess ] 660 | * debhelper v7; rules file minimisation 661 | 662 | -- Joey Hess Sat, 03 May 2008 15:08:12 -0400 663 | 664 | etckeeper (0.14.2) unstable; urgency=low 665 | 666 | * Handle nonzero exit status when building package list diff. 667 | 668 | -- Joey Hess Thu, 17 Apr 2008 13:00:29 -0400 669 | 670 | etckeeper (0.14.1) unstable; urgency=low 671 | 672 | * Fix typo in bzr-precommit script. Closes: #473069 673 | This is an interim fix -- full bzr precommit support has been implemented, 674 | but the bzr that supports it is not yet released. 675 | * Fix handling of files with spaces, by setting IFS to NL. 676 | 677 | -- Joey Hess Wed, 16 Apr 2008 19:16:52 -0400 678 | 679 | etckeeper (0.14) unstable; urgency=low 680 | 681 | * When deleting the .metadata, only $VCS rm it if using git. hg write 682 | locks the repo when the pre-commit hook is running, so it would lock. 683 | 684 | -- Joey Hess Sat, 29 Mar 2008 13:43:20 -0400 685 | 686 | etckeeper (0.13) unstable; urgency=low 687 | 688 | * Drop the debconf prompt before committing in pre-install. 689 | Closes: #470577, #462161, #471157, #462161 690 | * Stop using metastore, instead add shell commands to .etckeeper 691 | to handle permissions. Patch by Scott Bronson. The main advantages 692 | of this approach are: 693 | - .etckeeper uses less disk space than .metadata. 694 | - Git diff includes changes to the commands in the file, which is more 695 | transparent than a change to the binary .metadata file, and does not 696 | produce conflicts during merging. 697 | - Revision control directories such as .hg are filtered out. 698 | Closes: #471371 699 | Note that repositories still including .metadata files will be 700 | automatically transitioned, and the file removed. Also, etckeeper init 701 | on a historical version of a repository that still contains .metadata 702 | will use it, if metastore is installed. 703 | * Keep track of what packages change state during an installation, 704 | and include that in the commit message at the end. Closes: #459384 705 | 706 | -- Joey Hess Tue, 25 Mar 2008 20:53:23 -0400 707 | 708 | etckeeper (0.12) unstable; urgency=low 709 | 710 | * Use git ls-files instead of git status. Depend on new enough git for this. 711 | * Add support for bzr, thanks to Mark A. Hershberger. Closes: #470515 712 | (Note that bzr does not support etckeeper's pre-commit hook.) 713 | 714 | -- Joey Hess Tue, 11 Mar 2008 15:06:29 -0400 715 | 716 | etckeeper (0.11) unstable; urgency=low 717 | 718 | * Add lvm cache dir to default ignores. (#462355) 719 | * Updated German translation. Closes: #463153 720 | * Some initial rpm support. Patch from Евгений Терешков. 721 | * Add apt hooks for rpm based systems. 722 | * Add nologin to default ignores. 723 | 724 | -- Joey Hess Mon, 11 Feb 2008 00:43:19 -0500 725 | 726 | etckeeper (0.10) unstable; urgency=low 727 | 728 | * Convert the directory parameter of etckeeper into "-d directory". 729 | * Pass other patameters on from etckeeper to the .d scripts. 730 | * Stop using run-parts for various reasons. 731 | * Split out a commit.d that contains committing code that's used by 732 | both the pre-install.d and post-install.d scripts. 733 | * Split out an unclean.d that tests if the WC contains uncommitted 734 | changes. 735 | * Don't commit in post-install.d if there are no uncommitted changes. 736 | * German debconf translation. Closes: #460940, #458751 737 | * Use git status instead of git-status (missed this one before). 738 | 739 | -- Joey Hess Tue, 15 Jan 2008 14:35:29 -0500 740 | 741 | etckeeper (0.9) unstable; urgency=low 742 | 743 | * Separate debconf use from the main flow of the script so the commit 744 | stage can use editors etc. Closes: #459547 745 | * Remove the hint about setting -e to get interactive commits, since 746 | I don't want to encourage users to do that. (For one thing, it's unlikely 747 | to work if a graphical package manager is used..) 748 | 749 | -- Joey Hess Mon, 07 Jan 2008 13:46:22 -0500 750 | 751 | etckeeper (0.8) unstable; urgency=low 752 | 753 | * Typo fixes from Miklos Vajna 754 | * Add backwards compatability code to handle post-apt action. Closes: #459441 755 | 756 | -- Joey Hess Sun, 06 Jan 2008 12:54:51 -0500 757 | 758 | etckeeper (0.7) unstable; urgency=low 759 | 760 | [ Joey Hess ] 761 | * Added configuration options for highlevel and lowlevel package managers 762 | in etckeeper.conf. 763 | * Only install apt hooks if apt is used. 764 | * Only add backup conffile exclusion to gitignore if dpkg is used. 765 | * Rename pre/post-apt.d to pre/post-install.d to allow the same directories 766 | to be used for other package managers. 767 | * Use the name of the highlevel package manager in commit messages. 768 | * Add gnarly conffile renaming code. 769 | * Support mercurial as an alternative to git. Original patch by Mathieu 770 | Clabaut, significantly changed. 771 | 772 | [ Miklos Vajna ] 773 | * Add support for frugalware's pacman-g2 package manager. 774 | * Stop using git-foo commands. 775 | 776 | [ Christian Perrier ] 777 | * Debconf templates and debian/control reviewed by the debian-l10n-english 778 | team as part of the Smith review project. Closes: #454774 779 | * [Debconf translation updates] 780 | * Galician. Closes: #455790 781 | * Finnish. Closes: #455967 782 | * Italian. Closes: #456509 783 | * Portuguese. Closes: #456543 784 | * French. Closes: #456920 785 | * Vietnamese. Closes: #457307 786 | * Czech. Closes: #457678 787 | * Dutch. Closes: #457806 788 | * Basque. Closes: #457830 789 | * Russian. Closes: #457871 790 | 791 | [ Joey Hess ] 792 | * Commit removed files in the pre-install hook to git, as was already done 793 | for hg. Avoided changing the debconf template so bubulle doesn't murder 794 | me; the current wording is just vague enough to still work with the 795 | current behavior. 796 | 797 | -- Joey Hess Fri, 04 Jan 2008 18:46:49 -0500 798 | 799 | etckeeper (0.6) unstable; urgency=low 800 | 801 | * Depend on a fairly recent git-core. Closes: #453063 802 | 803 | -- Joey Hess Sun, 02 Dec 2007 15:46:12 -0500 804 | 805 | etckeeper (0.5) unstable; urgency=low 806 | 807 | * Typo. Closes: #452926 808 | 809 | -- Joey Hess Mon, 26 Nov 2007 03:16:14 -0500 810 | 811 | etckeeper (0.4) unstable; urgency=low 812 | 813 | * Portuguese translation from Américo Monteiro. Closes: #451798 814 | * Pass --quiet to git-rm calls. 815 | 816 | -- Joey Hess Tue, 20 Nov 2007 01:04:32 -0500 817 | 818 | etckeeper (0.3) unstable; urgency=low 819 | 820 | * Patch from Remi Vanicat adding an etckeeper.conf file and 821 | a GIT_COMMIT_OPTIONS configuration setting. Closes: #451167 822 | * Add network/run and adjtime to default gitignore. Closes: #451347 823 | * Patch from Rémi Vanicat adding bash completion. Closes: #451302 824 | * Remove redundant dependency on debconf. Closes: #451378 825 | 826 | -- Joey Hess Thu, 15 Nov 2007 12:21:02 -0500 827 | 828 | etckeeper (0.2) unstable; urgency=low 829 | 830 | * Add .pwd.lock to default ignores, this file is created by programs 831 | that call getspent(). 832 | * Add tests for /etc/.git not yet existing and avoid doing bad things. 833 | Closes: #451185 834 | * If /etc/.git doesn't exist, display a suggestion to run etckeeper-init. 835 | 836 | -- Joey Hess Tue, 13 Nov 2007 19:09:11 -0500 837 | 838 | etckeeper (0.1) unstable; urgency=low 839 | 840 | * First release. 841 | 842 | -- Joey Hess Sun, 11 Nov 2007 01:11:21 -0500 843 | --------------------------------------------------------------------------------