Hello community, here is the log from the commit of package etckeeper for openSUSE:Factory checked in at 2020-02-13 10:11:30 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/etckeeper (Old) and /work/SRC/openSUSE:Factory/.etckeeper.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "etckeeper" Thu Feb 13 10:11:30 2020 rev:8 rq:773647 version:1.18.14 Changes: -------- --- /work/SRC/openSUSE:Factory/etckeeper/etckeeper.changes 2018-10-08 17:48:21.162259970 +0200 +++ /work/SRC/openSUSE:Factory/.etckeeper.new.26092/etckeeper.changes 2020-02-13 10:11:30.500339723 +0100 @@ -1,0 +2,36 @@ +Wed Feb 12 09:28:21 UTC 2020 - Paolo Stivanin <[email protected]> + +- Fix spec file + +------------------------------------------------------------------- +Tue Feb 4 07:37:47 UTC 2020 - Paolo Stivanin <[email protected]> + +- Update to 1.18.14: + * pacman 5.2 deprecated File hooks, use Path. + Thanks, Christian Hesse + * Fix vcs subcommand setup for zsh completion. + Thanks, James Rowe. + * Added zsh completion. + Thanks, James Rowe + * commit: Recent changes added code that does not work on all POSIX shells. + Fixed by Thorsten Glaser. + * Fix bug in hostname determination in the previous release. + Thanks, Christian Hesse + * Support platforms without a hostname command, fall back to + reading /etc/hostname. + Thanks, Chris Morgan + * commit: Support -mmessage, without a space, since eg git commit + can be used that way. + Thanks, martin f. krafft + * commit: When multiple parameters are given, use them all as the commit + message, instead of the old behavior of only using the first parameter and + throwing the rest away. + Thanks, martin f. krafft + * Avoid post-install failing when ps is from busybox or another + version not supporting procps-specific options. + * Use ps --no-headers rather than problimatic -h option. + * When run during a package installation, include in the commit + message the command line that caused etckeeper to run. + Thanks, Laszlo Gombos + +------------------------------------------------------------------- Old: ---- etckeeper-1.18.8.tar.gz New: ---- etckeeper-1.18.14.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ etckeeper.spec ++++++ --- /var/tmp/diff_new_pack.PXtFsX/_old 2020-02-13 10:11:31.036340033 +0100 +++ /var/tmp/diff_new_pack.PXtFsX/_new 2020-02-13 10:11:31.036340033 +0100 @@ -2,7 +2,7 @@ # # spec file for package etckeeper # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # Copyright (c) 2014 Mitsutoshi NAKANO <[email protected]> # Copyright (c) 2013 Pascal Bleser <[email protected]> # @@ -34,7 +34,7 @@ %define make_args systemddir=%{_unitdir} PYTHON=%{python_versioned} %{python_args} Name: etckeeper -Version: 1.18.8 +Version: 1.18.14 Release: 0 Summary: Store /etc under Version Control License: GPL-2.0-or-later @@ -43,7 +43,7 @@ # PATCH-FIX-UPSTREAM etckeeper-avoid-packagelist.patch gh#joeyh/etckeeper#17 [email protected] -- add AVOID_PACKAGELIST Patch0: etckeeper-avoid-packagelist.patch Patch1: etckeeper-set-package-manager.patch -Url: http://etckeeper.branchable.com/ +URL: http://etckeeper.branchable.com/ %if ! %{with bzr} BuildArch: noarch %endif @@ -130,6 +130,14 @@ %description bash-completion Bash command line completion support for %{name}. +%package zsh-completion +Summary: The zsh completion for etckeeper +Group: System/Shells +Requires: etckeeper = %{version}-%{release} + +%description zsh-completion +zsh command line completion support for %{name}. + %prep %setup -q %patch0 -p1 @@ -188,6 +196,11 @@ %files bash-completion %{_datadir}/bash-completion/completions/etckeeper +%files zsh-completion +%{_datadir}/zsh +%{_datadir}/zsh/vendor-completions +%{_datadir}/zsh/vendor-completions/_etckeeper + %files zypp-plugin %{_prefix}/lib/zypp/plugins/commit/zypper-etckeeper.py ++++++ etckeeper-1.18.8.tar.gz -> etckeeper-1.18.14.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etckeeper-1.18.8/Makefile new/etckeeper-1.18.14/Makefile --- old/etckeeper-1.18.8/Makefile 2018-06-05 22:04:03.000000000 +0200 +++ new/etckeeper-1.18.14/Makefile 2020-01-22 14:59:54.000000000 +0100 @@ -10,7 +10,8 @@ mandir=${prefix}/share/man vardir=/var systemddir=/lib/systemd/system -completiondir=${prefix}/share/bash-completion/completions +bashcompletiondir=${prefix}/share/bash-completion/completions +zshcompletiondir=${prefix}/share/zsh/vendor-completions CP=cp -R INSTALL=install INSTALL_EXE=${INSTALL} @@ -32,8 +33,10 @@ $(INSTALL_EXE) etckeeper $(DESTDIR)$(bindir)/etckeeper mkdir -p $(DESTDIR)$(mandir)/man8 $(INSTALL_DATA) etckeeper.8 $(DESTDIR)$(mandir)/man8/etckeeper.8 - mkdir -p $(DESTDIR)$(completiondir) - $(INSTALL_DATA) bash_completion $(DESTDIR)$(completiondir)/etckeeper + mkdir -p $(DESTDIR)$(bashcompletiondir) + $(INSTALL_DATA) bash_completion $(DESTDIR)$(bashcompletiondir)/etckeeper + mkdir -p $(DESTDIR)$(zshcompletiondir) + $(INSTALL_DATA) zsh_completion $(DESTDIR)$(zshcompletiondir)/_etckeeper mkdir -p $(DESTDIR)$(systemddir) $(INSTALL_DATA) systemd/etckeeper.service $(DESTDIR)$(systemddir)/etckeeper.service $(INSTALL_DATA) systemd/etckeeper.timer $(DESTDIR)$(systemddir)/etckeeper.timer diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etckeeper-1.18.8/commit.d/50vcs-commit new/etckeeper-1.18.14/commit.d/50vcs-commit --- old/etckeeper-1.18.8/commit.d/50vcs-commit 2018-06-05 22:04:03.000000000 +0200 +++ new/etckeeper-1.18.14/commit.d/50vcs-commit 2020-01-22 14:59:54.000000000 +0100 @@ -12,16 +12,15 @@ if [ "x$1" = "x--stdin" ]; then cat > "$logfile" else - if [ "x$1" = "x-m" ]; then - shift 1 - fi - echo "$1" > "$logfile" + sed '1s/^-m \{0,1\}//' >"$logfile" <<-EOF + $* + EOF fi else logfile="" fi -hostname=`hostname` +hostname=`hostname 2>/dev/null || cat /etc/hostname` hostname="${hostname%%.*}" dnsdomainname=`dnsdomainname 2>/dev/null || true` if [ -n "$dnsdomainname" ]; then diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etckeeper-1.18.8/debian/changelog new/etckeeper-1.18.14/debian/changelog --- old/etckeeper-1.18.8/debian/changelog 2018-06-05 22:04:03.000000000 +0200 +++ new/etckeeper-1.18.14/debian/changelog 2020-01-22 14:59:54.000000000 +0100 @@ -1,3 +1,59 @@ +etckeeper (1.18.14) unstable; urgency=medium + + * pacman 5.2 deprecated File hooks, use Path. + Thanks, Christian Hesse + * Fix vcs subcommand setup for zsh completion. + Thanks, James Rowe. + + -- Joey Hess <[email protected]> Wed, 22 Jan 2020 09:59:04 -0400 + +etckeeper (1.18.13) unstable; urgency=medium + + * Added zsh completion. + Thanks, James Rowe + * commit: Recent changes added code that does not work on all POSIX shells. + Fixed by Thorsten Glaser. + + -- Joey Hess <[email protected]> Fri, 20 Dec 2019 16:19:09 -0400 + +etckeeper (1.18.12) unstable; urgency=medium + + * Fix bug in hostname determination in the previous release. + Thanks, Christian Hesse + + -- Joey Hess <[email protected]> Fri, 29 Nov 2019 11:42:34 -0400 + +etckeeper (1.18.11) unstable; urgency=medium + + * Support platforms without a hostname command, fall back to + reading /etc/hostname. + Thanks, Chris Morgan + * commit: Support -mmessage, without a space, since eg git commit + can be used that way. + Thanks, martin f. krafft + * commit: When multiple parameters are given, use them all as the commit + message, instead of the old behavior of only using the first parameter and + throwing the rest away. + Thanks, martin f. krafft + + -- Joey Hess <[email protected]> Thu, 28 Nov 2019 18:14:46 -0400 + +etckeeper (1.18.10) unstable; urgency=medium + + * Avoid post-install failing when ps is from busybox or another + version not supporting procps-specific options. + * Use ps --no-headers rather than problimatic -h option. + + -- Joey Hess <[email protected]> Sun, 23 Dec 2018 13:05:44 -0400 + +etckeeper (1.18.9) unstable; urgency=medium + + * When run during a package installation, include in the commit + message the command line that caused etckeeper to run. + Thanks, Laszlo Gombos + + -- Joey Hess <[email protected]> Wed, 12 Dec 2018 01:01:05 -0400 + etckeeper (1.18.8) unstable; urgency=medium * Work around git commit's lack of robustness, by providing diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etckeeper-1.18.8/doc/forum/1.18.9_broken_with_busybox_ps/comment_1_ee6109c7209febb6fbec0e99c3901672._comment new/etckeeper-1.18.14/doc/forum/1.18.9_broken_with_busybox_ps/comment_1_ee6109c7209febb6fbec0e99c3901672._comment --- old/etckeeper-1.18.8/doc/forum/1.18.9_broken_with_busybox_ps/comment_1_ee6109c7209febb6fbec0e99c3901672._comment 1970-01-01 01:00:00.000000000 +0100 +++ new/etckeeper-1.18.14/doc/forum/1.18.9_broken_with_busybox_ps/comment_1_ee6109c7209febb6fbec0e99c3901672._comment 2020-01-22 14:59:54.000000000 +0100 @@ -0,0 +1,14 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 1""" + date="2018-12-23T16:52:32Z" + content=""" +Another problem with busybox ps and that patch is that while `ps 1` +normally shows only pid 1, `busybox ps 1` lists all pids. + +So it doesn't seem that code path can support busybox ps at all, +and probably the safest thing to do is to use --no-headers to make procps's +ps always do the right thing no matter how configured, and if that fails, +/dev/null the error and fall back to not including the command line in +the commit message. +"""]] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etckeeper-1.18.8/doc/forum/1.18.9_broken_with_busybox_ps/comment_2_b89bc67dd20946798691372635ba91b0._comment new/etckeeper-1.18.14/doc/forum/1.18.9_broken_with_busybox_ps/comment_2_b89bc67dd20946798691372635ba91b0._comment --- old/etckeeper-1.18.8/doc/forum/1.18.9_broken_with_busybox_ps/comment_2_b89bc67dd20946798691372635ba91b0._comment 1970-01-01 01:00:00.000000000 +0100 +++ new/etckeeper-1.18.14/doc/forum/1.18.9_broken_with_busybox_ps/comment_2_b89bc67dd20946798691372635ba91b0._comment 2020-01-22 14:59:54.000000000 +0100 @@ -0,0 +1,9 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 2""" + date="2018-12-23T17:05:17Z" + content=""" +Fixed. + +(Ps, please use the todo page not the forum for reporting problems.) +"""]] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etckeeper-1.18.8/doc/forum/1.18.9_broken_with_busybox_ps.mdwn new/etckeeper-1.18.14/doc/forum/1.18.9_broken_with_busybox_ps.mdwn --- old/etckeeper-1.18.8/doc/forum/1.18.9_broken_with_busybox_ps.mdwn 1970-01-01 01:00:00.000000000 +0100 +++ new/etckeeper-1.18.14/doc/forum/1.18.9_broken_with_busybox_ps.mdwn 2020-01-22 14:59:54.000000000 +0100 @@ -0,0 +1,29 @@ +Hi, + +The following commit: + + ec8d1ad Add the package manager or any other parent process command to the commit log + +breaks etckeeper on systems with Busybox ps: + + + ps: unrecognized option: h + BusyBox v1.29.3 (2018-11-21 11:45:56 UTC) multi-call binary. + + Usage: ps [-o COL1,COL2=HEADER] + + Show list of processes + + -o COL1,COL2=HEADER Select columns for display + + +From the Debian manpage on the `h` option: + + h No header. (or, one header per screen in the BSD personality). The h option is problematic. Standard BSD ps uses this + option to print a header on each page of output, but older Linux ps uses this option to totally disable the header. This + version of ps follows the Linux usage of not printing the header unless the BSD personality has been selected, in which case + it prints a header on each page of output. Regardless of the current personality, you can use the long options --headers + and --no-headers to enable printing headers each page or disable headers entirely, respectively. + + +So the use of `h` could affect the portability of `etckeeper` and the problem is not limited to Busybox `ps`. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etckeeper-1.18.8/doc/forum/Can_etckeeper_hook_into_the_snapd_install_machinery_like_it_does_for_apt_/comment_1_431b3e7e1887d897335f35b1bfaf0351._comment new/etckeeper-1.18.14/doc/forum/Can_etckeeper_hook_into_the_snapd_install_machinery_like_it_does_for_apt_/comment_1_431b3e7e1887d897335f35b1bfaf0351._comment --- old/etckeeper-1.18.8/doc/forum/Can_etckeeper_hook_into_the_snapd_install_machinery_like_it_does_for_apt_/comment_1_431b3e7e1887d897335f35b1bfaf0351._comment 1970-01-01 01:00:00.000000000 +0100 +++ new/etckeeper-1.18.14/doc/forum/Can_etckeeper_hook_into_the_snapd_install_machinery_like_it_does_for_apt_/comment_1_431b3e7e1887d897335f35b1bfaf0351._comment 2020-01-22 14:59:54.000000000 +0100 @@ -0,0 +1,10 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 1""" + date="2019-08-08T15:25:59Z" + content=""" +Whether that is possible depends on what hooks, if any, +snapd supports. + +etckeeper's todo list is here: [[todo]] +"""]] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etckeeper-1.18.8/doc/forum/Can_etckeeper_hook_into_the_snapd_install_machinery_like_it_does_for_apt_.mdwn new/etckeeper-1.18.14/doc/forum/Can_etckeeper_hook_into_the_snapd_install_machinery_like_it_does_for_apt_.mdwn --- old/etckeeper-1.18.8/doc/forum/Can_etckeeper_hook_into_the_snapd_install_machinery_like_it_does_for_apt_.mdwn 1970-01-01 01:00:00.000000000 +0100 +++ new/etckeeper-1.18.14/doc/forum/Can_etckeeper_hook_into_the_snapd_install_machinery_like_it_does_for_apt_.mdwn 2020-01-22 14:59:54.000000000 +0100 @@ -0,0 +1,9 @@ +I like that etckeeper can block my attempt at apt-get installing anything when there are pending changes in /etc + + +Can this also be done with stuff installed from the Snap Store (https://snapcraft.io/store)? + + +I've been looking for the git repository for this project to look for an issue tracker, but couldn't find anything 'official'. + +Cheers diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etckeeper-1.18.8/doc/forum/Joey_you_just_blew_my_mind..mdwn new/etckeeper-1.18.14/doc/forum/Joey_you_just_blew_my_mind..mdwn --- old/etckeeper-1.18.8/doc/forum/Joey_you_just_blew_my_mind..mdwn 1970-01-01 01:00:00.000000000 +0100 +++ new/etckeeper-1.18.14/doc/forum/Joey_you_just_blew_my_mind..mdwn 2020-01-22 14:59:54.000000000 +0100 @@ -0,0 +1,10 @@ +While trying to add etckeeper to some other system today, I ran: + + $ etckeeper help + etckeeper: /etc/etckeeper/help.d does not exist + +And now I'm wondering why I don't just make *all* of my big scripts call `run-parts` on the subcommands. + +# Why was I not informed sooner? + +Anyway thanks, Joey, I learned a cool new trick today! diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etckeeper-1.18.8/doc/forum/Make_pre-commit.d__47__30store-metadata:generate__95__metadata__40____41___filter_Git_sub_modules.mdwn new/etckeeper-1.18.14/doc/forum/Make_pre-commit.d__47__30store-metadata:generate__95__metadata__40____41___filter_Git_sub_modules.mdwn --- old/etckeeper-1.18.8/doc/forum/Make_pre-commit.d__47__30store-metadata:generate__95__metadata__40____41___filter_Git_sub_modules.mdwn 1970-01-01 01:00:00.000000000 +0100 +++ new/etckeeper-1.18.14/doc/forum/Make_pre-commit.d__47__30store-metadata:generate__95__metadata__40____41___filter_Git_sub_modules.mdwn 2020-01-22 14:59:54.000000000 +0100 @@ -0,0 +1,8 @@ +It would be great if the function generate_metadata() in pre-commit.d/30store-metadata would not only filter ignore patterns from .gitignore, but if it would also filter any files inside Git sub modules. + +Information about Git sub modules is being stored in a .gitmodules files, similar to this (example): +``` +[submodule "path/to/dir"] + path = path/to/dir + url = https://... +``` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etckeeper-1.18.8/doc/forum/Prevent_hook_running_during_rebase.mdwn new/etckeeper-1.18.14/doc/forum/Prevent_hook_running_during_rebase.mdwn --- old/etckeeper-1.18.8/doc/forum/Prevent_hook_running_during_rebase.mdwn 1970-01-01 01:00:00.000000000 +0100 +++ new/etckeeper-1.18.14/doc/forum/Prevent_hook_running_during_rebase.mdwn 2020-01-22 14:59:54.000000000 +0100 @@ -0,0 +1,24 @@ +Normally, when I wish to fix or clean up history I’ll do The Right Thing(clone +`/etc` repo, edit, and force `pull` the changes). *However*, occasionally I’ll +perform a quick in-place `rebase` when the depth is *very* shallow or will be +non-destructive. + +If — like me — you do this then you’ve probably been bitten by `.etckeeper` +breakage when simply re-ordering commits. If so, then the following addition to +your `.git/hooks/pre-commit` will prevent the hook running while in a `rebase` +session. + +``` +if git branch | grep -q '^\* (no branch'; then + echo "Skipping pre-commit hook in rebase" >&2 + exit 0 +fi +``` + +**Note**: The unbalanced parenthesis in the match is on purpose, depending on +your `git` version you could have a simple `(no branch)` or the far more helpful +`(no branch, rebasing <branch>)` branch name. + +I’d be interested to know if other users have a better way to handle this. + +-- James diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etckeeper-1.18.8/doc/forum/Why_backup_files_like_passwd-_are_not_being_ignored__63__/comment_1_a14869bdf298370a0b307c352759ee80._comment new/etckeeper-1.18.14/doc/forum/Why_backup_files_like_passwd-_are_not_being_ignored__63__/comment_1_a14869bdf298370a0b307c352759ee80._comment --- old/etckeeper-1.18.8/doc/forum/Why_backup_files_like_passwd-_are_not_being_ignored__63__/comment_1_a14869bdf298370a0b307c352759ee80._comment 1970-01-01 01:00:00.000000000 +0100 +++ new/etckeeper-1.18.14/doc/forum/Why_backup_files_like_passwd-_are_not_being_ignored__63__/comment_1_a14869bdf298370a0b307c352759ee80._comment 2020-01-22 14:59:54.000000000 +0100 @@ -0,0 +1,12 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 1""" + date="2019-12-25T19:44:29Z" + content=""" +An admin might expect to be able to `mv passwd- passwd` to undo the most +recent change, and if so that might as well be supported after restoring +/etc from backup. + +There is essentially no overhead in adding these files since they have the +same content as an older commit of the passwd file. +"""]] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etckeeper-1.18.8/doc/forum/Why_backup_files_like_passwd-_are_not_being_ignored__63__.mdwn new/etckeeper-1.18.14/doc/forum/Why_backup_files_like_passwd-_are_not_being_ignored__63__.mdwn --- old/etckeeper-1.18.8/doc/forum/Why_backup_files_like_passwd-_are_not_being_ignored__63__.mdwn 1970-01-01 01:00:00.000000000 +0100 +++ new/etckeeper-1.18.14/doc/forum/Why_backup_files_like_passwd-_are_not_being_ignored__63__.mdwn 2020-01-22 14:59:54.000000000 +0100 @@ -0,0 +1,13 @@ +From https://git.joeyh.name/index.cgi/etckeeper.git/tree/update-ignore.d/01update-ignore#n110: + +> \# Not currently ignored as admins tend to rely on these files. + +> \#ignore "passwd-" + +> \#ignore "group-" + +> \#ignore "shadow-" + +> \#ignore "gshadow-" + +But I can't understand the reason, considering that ignoring these backup files justs leaves them there so admins can still use them. In the other hand, having the original files (e.g. `passwd`) under version control will provide admins the expected history of changes. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etckeeper-1.18.8/doc/forum/etckeeper_wants_root_git_identity.mdwn new/etckeeper-1.18.14/doc/forum/etckeeper_wants_root_git_identity.mdwn --- old/etckeeper-1.18.8/doc/forum/etckeeper_wants_root_git_identity.mdwn 1970-01-01 01:00:00.000000000 +0100 +++ new/etckeeper-1.18.14/doc/forum/etckeeper_wants_root_git_identity.mdwn 2020-01-22 14:59:54.000000000 +0100 @@ -0,0 +1,15 @@ +I've installed etckeeper & git on a new machine running arch. I've got sudo and git setup for my regular user. When I `sudo etckeeper commit "Initial commit"` git gives me the usual message about empty ident name for root@host. Documentation suggests that sudo will grab the ident of sudo user but that doesn't seem to be working. I'm running etckeeper 1.18.12-1. What am I missing? + +--- + +[[!comment format=mdwn +username="https://peterjmello.wordpress.com/" +nickname="RogueScholar" +date="2020-01-10T19:22:30-0800" +content=""" +One possible solution to your issue would be to edit `/etc/etckeeper/etckeeper.conf` and change the VCS variable value to include the location of your gitconfig file. Assuming yours is in the default location of `~/.gitconfig` that would mean changing it from `VCS="git"` to `VCS="git -f /home/<yourusername>/.gitconfig"` (be sure to use the canonical path to the file rather than relying on the `~` alias for your home directory because in this instance ~ points to `/root`). + +-Peter +""" +]] +>[[!fortune ]] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etckeeper-1.18.8/doc/forum.mdwn new/etckeeper-1.18.14/doc/forum.mdwn --- old/etckeeper-1.18.8/doc/forum.mdwn 2018-06-05 22:04:03.000000000 +0200 +++ new/etckeeper-1.18.14/doc/forum.mdwn 2020-01-22 14:59:54.000000000 +0100 @@ -13,3 +13,55 @@ In my use case it is no problem if the hardlink gets lost and two individual files are in the repo. + + + + + + + + + +----------------------------- + +Thomas Güttler Nov 2018 + + + + use etckeeper to track changes in /etc. + +Up to now the output of git log looks like this: + +commit c2364fd9a8465b07a1c31fafeb9ff4e4323770fe +Author: Etckeeper running on foo-host <root@foo-host> +Date: Fri Aug 10 00:00:08 2018 +0200 + + daily + +commit d7b685f5f1a01b3f80b86202d6c461dac13b40ac +Author: Etckeeper running on foo-host <root@foo-host> +Date: Wed Aug 8 00:00:07 2018 +0200 + + daily + +commit dd44e35ecdb27edad37763e88334fc659fd22ff1 +Author: Etckeeper running on foo-host <root@foo-host> +Date: Tue Aug 7 00:00:04 2018 +0200 + + daily + +commit f6b090e82c6d518be21c8b91f3f7999fbe1330db +Author: Etckeeper running on foo-host <root@foo-host> +Date: Tue Jul 24 00:00:08 2018 +0200 + + daily + +.... + +I would like to see which files have changed. + +Is there a way to get the list of changed files into the commit message of etckeeper? + +In most cases only one to three files change. + +If more than three files change, then it is enough to show the number of changed files. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etckeeper-1.18.8/doc/news/version_1.18.10.mdwn new/etckeeper-1.18.14/doc/news/version_1.18.10.mdwn --- old/etckeeper-1.18.8/doc/news/version_1.18.10.mdwn 1970-01-01 01:00:00.000000000 +0100 +++ new/etckeeper-1.18.14/doc/news/version_1.18.10.mdwn 2020-01-22 14:59:54.000000000 +0100 @@ -0,0 +1,5 @@ +etckeeper 1.18.10 released with [[!toggle text="these changes"]] +[[!toggleable text=""" + * Avoid post-install failing when ps is from busybox or another + version not supporting procps-specific options. + * Use ps --no-headers rather than problimatic -h option."""]] \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etckeeper-1.18.8/doc/news/version_1.18.11.mdwn new/etckeeper-1.18.14/doc/news/version_1.18.11.mdwn --- old/etckeeper-1.18.8/doc/news/version_1.18.11.mdwn 1970-01-01 01:00:00.000000000 +0100 +++ new/etckeeper-1.18.14/doc/news/version_1.18.11.mdwn 2020-01-22 14:59:54.000000000 +0100 @@ -0,0 +1,12 @@ +etckeeper 1.18.11 released with [[!toggle text="these changes"]] +[[!toggleable text=""" + * Support platforms without a hostname command, fall back to + reading /etc/hostname. + Thanks, Chris Morgan + * commit: Support -mmessage, without a space, since eg git commit + can be used that way. + Thanks, martin f. krafft + * commit: When multiple parameters are given, use them all as the commit + message, instead of the old behavior of only using the first parameter and + throwing the rest away. + Thanks, martin f. krafft"""]] \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etckeeper-1.18.8/doc/news/version_1.18.12.mdwn new/etckeeper-1.18.14/doc/news/version_1.18.12.mdwn --- old/etckeeper-1.18.8/doc/news/version_1.18.12.mdwn 1970-01-01 01:00:00.000000000 +0100 +++ new/etckeeper-1.18.14/doc/news/version_1.18.12.mdwn 2020-01-22 14:59:54.000000000 +0100 @@ -0,0 +1,4 @@ +etckeeper 1.18.12 released with [[!toggle text="these changes"]] +[[!toggleable text=""" + * Fix bug in hostname determination in the previous release. + Thanks, Christian Hesse"""]] \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etckeeper-1.18.8/doc/news/version_1.18.13.mdwn new/etckeeper-1.18.14/doc/news/version_1.18.13.mdwn --- old/etckeeper-1.18.8/doc/news/version_1.18.13.mdwn 1970-01-01 01:00:00.000000000 +0100 +++ new/etckeeper-1.18.14/doc/news/version_1.18.13.mdwn 2020-01-22 14:59:54.000000000 +0100 @@ -0,0 +1,6 @@ +etckeeper 1.18.13 released with [[!toggle text="these changes"]] +[[!toggleable text=""" + * Added zsh completion. + Thanks, James Rowe + * commit: Recent changes added code that does not work on all POSIX shells. + Fixed by Thorsten Glaser."""]] \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etckeeper-1.18.8/doc/news/version_1.18.3.mdwn new/etckeeper-1.18.14/doc/news/version_1.18.3.mdwn --- old/etckeeper-1.18.8/doc/news/version_1.18.3.mdwn 2018-06-05 22:04:03.000000000 +0200 +++ new/etckeeper-1.18.14/doc/news/version_1.18.3.mdwn 1970-01-01 01:00:00.000000000 +0100 @@ -1,14 +0,0 @@ -etckeeper 1.18.3 released with [[!toggle text="these changes"]] -[[!toggleable text=""" - * Added support for pacmatic, contributed by nicolaichuk. - * bzr: make sure EMAIL is defined - Thanks, Serge E. Hallyn - * Fix Makefile version patterns to ignore non-native version number - (Antoine Beaupré) - * Support ~/.config/git/config when determining the author name and email. - Thanks, Richard Savio - * Added support for Arch's pacman package manager version 5. - Thanks, Tilman Blumenbach. - * Set HOME if it's not set, as is the case when using ubuntu's - update-manager. - * Move bash completion out of etc and into usr."""]] \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etckeeper-1.18.8/doc/news/version_1.18.4.mdwn new/etckeeper-1.18.14/doc/news/version_1.18.4.mdwn --- old/etckeeper-1.18.8/doc/news/version_1.18.4.mdwn 2018-06-05 22:04:03.000000000 +0200 +++ new/etckeeper-1.18.14/doc/news/version_1.18.4.mdwn 1970-01-01 01:00:00.000000000 +0100 @@ -1,12 +0,0 @@ -etckeeper 1.18.4 released with [[!toggle text="these changes"]] -[[!toggleable text=""" - * Optimised find for special and hard linked files. - Thanks, Rike-Benjamin Schuppner. - * Adjust when Pacman 5 calls etckeeper hooks. - Thanks, Tilman Blumenbach and Christian Hesse. - * Only run Pacman hooks when files in /etc have changed. - Thanks, Christian Hesse. - * Added systemd timer that can run etckeeper 10 minutes after boot, and also - daily. It's not enabled by default, partly because of overlap with the - cron job. - Thanks, Christian Hesse."""]] \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etckeeper-1.18.8/doc/news/version_1.18.5.mdwn new/etckeeper-1.18.14/doc/news/version_1.18.5.mdwn --- old/etckeeper-1.18.8/doc/news/version_1.18.5.mdwn 2018-06-05 22:04:03.000000000 +0200 +++ new/etckeeper-1.18.14/doc/news/version_1.18.5.mdwn 1970-01-01 01:00:00.000000000 +0100 @@ -1,8 +0,0 @@ -etckeeper 1.18.5 released with [[!toggle text="these changes"]] -[[!toggleable text=""" - * Make etckeeper commit store metadata changes. The pre-commit - hook has always (and continues) to do that, but pre-commit is only - run when there are changes to tommit. This makes metadata-only - changes get committed. - * Move systemd files to /lib/systemd; /usr/lib/systemd is not used - on Debian."""]] \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etckeeper-1.18.8/doc/news/version_1.18.6.mdwn new/etckeeper-1.18.14/doc/news/version_1.18.6.mdwn --- old/etckeeper-1.18.8/doc/news/version_1.18.6.mdwn 2018-06-05 22:04:03.000000000 +0200 +++ new/etckeeper-1.18.14/doc/news/version_1.18.6.mdwn 1970-01-01 01:00:00.000000000 +0100 @@ -1,8 +0,0 @@ -etckeeper 1.18.6 released with [[!toggle text="these changes"]] -[[!toggleable text=""" - * Only show errors (no progress indicators) when pushing Git/Mercurial repos - to avoid unncessary cron mails. - Thanks, Nils Steinger. - * Fix regex in 20-warn-problem-files. - * Added support for apk (alpine linux) - Thanks, Henrik Riomar."""]] \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etckeeper-1.18.8/doc/news/version_1.18.7.mdwn new/etckeeper-1.18.14/doc/news/version_1.18.7.mdwn --- old/etckeeper-1.18.8/doc/news/version_1.18.7.mdwn 2018-06-05 22:04:03.000000000 +0200 +++ new/etckeeper-1.18.14/doc/news/version_1.18.7.mdwn 1970-01-01 01:00:00.000000000 +0100 @@ -1,8 +0,0 @@ -etckeeper 1.18.7 released with [[!toggle text="these changes"]] -[[!toggleable text=""" - * Added some unit tests. - Thanks, Henrik Riomar. - * etckeeper will work on systems that do not have perl installed. - (perl is still used when available as it's faster) - Thanks, William Johansson and radhus. - * Prevent LC\_ALL overriding the LC\_COLLATE used to sort metadata."""]] \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etckeeper-1.18.8/doc/news/version_1.18.9.mdwn new/etckeeper-1.18.14/doc/news/version_1.18.9.mdwn --- old/etckeeper-1.18.8/doc/news/version_1.18.9.mdwn 1970-01-01 01:00:00.000000000 +0100 +++ new/etckeeper-1.18.14/doc/news/version_1.18.9.mdwn 2020-01-22 14:59:54.000000000 +0100 @@ -0,0 +1,5 @@ +etckeeper 1.18.9 released with [[!toggle text="these changes"]] +[[!toggleable text=""" + * When run during a package installation, include in the commit + message the command line that caused etckeeper to run. + Thanks, Laszlo Gombos"""]] \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etckeeper-1.18.8/doc/todo/DNF:_fix_logging__44___so_it_will_work_from_Ansible/comment_1_add80827135b358d3b55565e2168af00._comment new/etckeeper-1.18.14/doc/todo/DNF:_fix_logging__44___so_it_will_work_from_Ansible/comment_1_add80827135b358d3b55565e2168af00._comment --- old/etckeeper-1.18.8/doc/todo/DNF:_fix_logging__44___so_it_will_work_from_Ansible/comment_1_add80827135b358d3b55565e2168af00._comment 1970-01-01 01:00:00.000000000 +0100 +++ new/etckeeper-1.18.14/doc/todo/DNF:_fix_logging__44___so_it_will_work_from_Ansible/comment_1_add80827135b358d3b55565e2168af00._comment 2020-01-22 14:59:54.000000000 +0100 @@ -0,0 +1,14 @@ +[[!comment format=mdwn + username="sourcejedi" + avatar="http://cdn.libravatar.org/avatar/599d943d715a521e4c23ab2a46ac70dc" + subject="Oops. Revised version" + date="2019-04-19T14:38:57Z" + content=""" +Please find a revised commit in the dnf branch of https://github.com/sourcejedi/etckeeper.git + +commit id: afbdce2d24b46bc91840044b953aca8b68f20fd3 + +(The previous commit was not as safe as I thought. + +If the etckeeper output includes an un-decodable byte, we would convert it to a unicode string which contains U+FFFD. This codepoint is *not* available in all character encodings, so it can cause UnicodeEncodeError. It's not fatal in current versions of dnf, because they set logging.RaiseExceptions = false. However it could lose an entire line of output.) +"""]] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etckeeper-1.18.8/doc/todo/DNF:_fix_logging__44___so_it_will_work_from_Ansible/comment_2_81c341d479a56a2fa79c9c519a130ef3._comment new/etckeeper-1.18.14/doc/todo/DNF:_fix_logging__44___so_it_will_work_from_Ansible/comment_2_81c341d479a56a2fa79c9c519a130ef3._comment --- old/etckeeper-1.18.8/doc/todo/DNF:_fix_logging__44___so_it_will_work_from_Ansible/comment_2_81c341d479a56a2fa79c9c519a130ef3._comment 1970-01-01 01:00:00.000000000 +0100 +++ new/etckeeper-1.18.14/doc/todo/DNF:_fix_logging__44___so_it_will_work_from_Ansible/comment_2_81c341d479a56a2fa79c9c519a130ef3._comment 2020-01-22 14:59:54.000000000 +0100 @@ -0,0 +1,9 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 2""" + date="2019-04-23T23:09:47Z" + content=""" +Given the difficulty in feeding etckeeper output through this, would it +perhaps be better to do something else with its output in this case, either +/dev/nulling it or writing it to the syslog or something like that? +"""]] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etckeeper-1.18.8/doc/todo/DNF:_fix_logging__44___so_it_will_work_from_Ansible/comment_2_ff2b6e899a2f363b623aa1eff6c0adcc._comment new/etckeeper-1.18.14/doc/todo/DNF:_fix_logging__44___so_it_will_work_from_Ansible/comment_2_ff2b6e899a2f363b623aa1eff6c0adcc._comment --- old/etckeeper-1.18.8/doc/todo/DNF:_fix_logging__44___so_it_will_work_from_Ansible/comment_2_ff2b6e899a2f363b623aa1eff6c0adcc._comment 1970-01-01 01:00:00.000000000 +0100 +++ new/etckeeper-1.18.14/doc/todo/DNF:_fix_logging__44___so_it_will_work_from_Ansible/comment_2_ff2b6e899a2f363b623aa1eff6c0adcc._comment 2020-01-22 14:59:54.000000000 +0100 @@ -0,0 +1,17 @@ +[[!comment format=mdwn + username="sourcejedi" + avatar="http://cdn.libravatar.org/avatar/599d943d715a521e4c23ab2a46ac70dc" + subject="Have a bonus commit: 3d431ea67922 "Do not use dnfpluginscore.logger"" + date="2019-04-23T19:17:50Z" + content=""" +dnfpluginscore is not core support for dnf plugins, it is just a +collection of \"core plugins\" for dnf. There is equally +dnfpluginsextras and dnfpluginsextras.logger. + +A comment in dnf.logger comment says the logger name 'dnf.plugin' is \"api\". +So we can safely rely on that name. + +Technically you can install etckeeper without the dnfpluginscore package +(at least I managed to run into this for python2, on a Fedora 29 system +which uses python3 for dnf by default). +"""]] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etckeeper-1.18.8/doc/todo/DNF:_fix_logging__44___so_it_will_work_from_Ansible/comment_3_1dcb2bdbc7ae9fc8746e75d9ce8305ff._comment new/etckeeper-1.18.14/doc/todo/DNF:_fix_logging__44___so_it_will_work_from_Ansible/comment_3_1dcb2bdbc7ae9fc8746e75d9ce8305ff._comment --- old/etckeeper-1.18.8/doc/todo/DNF:_fix_logging__44___so_it_will_work_from_Ansible/comment_3_1dcb2bdbc7ae9fc8746e75d9ce8305ff._comment 1970-01-01 01:00:00.000000000 +0100 +++ new/etckeeper-1.18.14/doc/todo/DNF:_fix_logging__44___so_it_will_work_from_Ansible/comment_3_1dcb2bdbc7ae9fc8746e75d9ce8305ff._comment 2020-01-22 14:59:54.000000000 +0100 @@ -0,0 +1,13 @@ +[[!comment format=mdwn + username="webknjaz@282aadd575f8161e52a787ad51e8ba046b8289a9" + nickname="webknjaz" + avatar="http://cdn.libravatar.org/avatar/6268a71f6afd8dc3875df5624f8bf85c" + subject="Reference to the corresponding bug analysis in Ansible " + date="2019-06-06T20:16:40Z" + content=""" +Hi, + +I've been tracking down this issue on the Ansible side and just wanted to share [this comment on GitHub](https://github.com/ansible/ansible/issues/54949#issuecomment-499541669). + +Any estimations on when this gets applied upstream? +"""]] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etckeeper-1.18.8/doc/todo/DNF:_fix_logging__44___so_it_will_work_from_Ansible/comment_5_b117c5f77ebb26d26634248f68ee3e1a._comment new/etckeeper-1.18.14/doc/todo/DNF:_fix_logging__44___so_it_will_work_from_Ansible/comment_5_b117c5f77ebb26d26634248f68ee3e1a._comment --- old/etckeeper-1.18.8/doc/todo/DNF:_fix_logging__44___so_it_will_work_from_Ansible/comment_5_b117c5f77ebb26d26634248f68ee3e1a._comment 1970-01-01 01:00:00.000000000 +0100 +++ new/etckeeper-1.18.14/doc/todo/DNF:_fix_logging__44___so_it_will_work_from_Ansible/comment_5_b117c5f77ebb26d26634248f68ee3e1a._comment 2020-01-22 14:59:54.000000000 +0100 @@ -0,0 +1,17 @@ +[[!comment format=mdwn + username="alan.christopher.jenkins@a53b5c6056bc7d7b09e181c23cc2ec8362fa7abe" + nickname="alan.christopher.jenkins" + avatar="http://cdn.libravatar.org/avatar/599d943d715a521e4c23ab2a46ac70dc" + subject="How about "etckeeper > /dev/null" ?" + date="2019-10-28T17:08:20Z" + content=""" +See same github repo, branch \"dnf2\", commit 7cda9678b1e60c0495a2a522721b319843d5fae0 + +Sorry for the delay. I can't find a record of an email notification. + +In response to Joey's comment, I've tried sending all the etckeeper output to /dev/null. I find the resulting code more friendly to read, because it avoids my very long code comment :). + +I interpreted \"in this case\" as just meaning \"in etckeeper-dnf\". I think you could technically check whether you are dnf v.s. a different libdnf client like Ansible, but I didn't want to :). + +syslog.syslog() did not seem very helpful. In python2 it appears to encode unicode using ascii, regardless of the locale. I think we might be able to drop support for python2-dnf. But still, the system log seems a bit unexpected, compared to stderr, /var/log/dnf.plugin.log, /var/log/dnf.log, or whatever custom logger the host program set up. +"""]] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etckeeper-1.18.8/doc/todo/DNF:_fix_logging__44___so_it_will_work_from_Ansible/comment_6_0e06add692d4dc5cd61ba037159669be._comment new/etckeeper-1.18.14/doc/todo/DNF:_fix_logging__44___so_it_will_work_from_Ansible/comment_6_0e06add692d4dc5cd61ba037159669be._comment --- old/etckeeper-1.18.8/doc/todo/DNF:_fix_logging__44___so_it_will_work_from_Ansible/comment_6_0e06add692d4dc5cd61ba037159669be._comment 1970-01-01 01:00:00.000000000 +0100 +++ new/etckeeper-1.18.14/doc/todo/DNF:_fix_logging__44___so_it_will_work_from_Ansible/comment_6_0e06add692d4dc5cd61ba037159669be._comment 2020-01-22 14:59:54.000000000 +0100 @@ -0,0 +1,16 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 6""" + date="2020-01-21T19:23:41Z" + content=""" +dnf2 sinks etckeeper's stdout and stderr to /dev/null + +`etckeeper pre-install`, when `AVOID_COMMIT_BEFORE_INSTALL` is set, +outputs an error to stderr, and exits nonzero. The expectation is +that the package installation is canceled. (I don't know if that happens +with etckeeper-dnf; it kind of looks like it warns and continues?) + +If etckeeper pre-install exiting nonzero does prevent the upgrade from +happening, and the message about it goes to /dev/null, that seems like a +surprising situation for the user to be confronted with. +"""]] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etckeeper-1.18.8/doc/todo/DNF:_fix_logging__44___so_it_will_work_from_Ansible.mdwn new/etckeeper-1.18.14/doc/todo/DNF:_fix_logging__44___so_it_will_work_from_Ansible.mdwn --- old/etckeeper-1.18.8/doc/todo/DNF:_fix_logging__44___so_it_will_work_from_Ansible.mdwn 1970-01-01 01:00:00.000000000 +0100 +++ new/etckeeper-1.18.14/doc/todo/DNF:_fix_logging__44___so_it_will_work_from_Ansible.mdwn 2020-01-22 14:59:54.000000000 +0100 @@ -0,0 +1,18 @@ +The following changes since commit c88551e939ed9349e7cc9be3e384749633b79655: + + I am in awe of /etc/etckeeper/*.d/ (2019-03-18 14:36:14 +0000) + +are available in the Git repository at: + + https://github.com/sourcejedi/etckeeper.git + +for you to fetch changes up to 040f5b2cb808ad9791d2c6f2f916fd887d2e16fa: + + DNF: fix logging, now it will work from Ansible (2019-04-13 18:21:47 +0100) + +---------------------------------------------------------------- +Alan Jenkins (1): + DNF: fix logging, now it will work from Ansible + + etckeeper-dnf/etckeeper.py | 48 ++++++++++++++++++++++++++++++++++++++++++------ + 1 file changed, 42 insertions(+), 6 deletions(-) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etckeeper-1.18.8/doc/todo/Give_preference_to_etckeeper.conf_over_existing_repository_for_defining___36__VCS/comment_1_3cafcd2709f32dfe583dc42933f542cb._comment new/etckeeper-1.18.14/doc/todo/Give_preference_to_etckeeper.conf_over_existing_repository_for_defining___36__VCS/comment_1_3cafcd2709f32dfe583dc42933f542cb._comment --- old/etckeeper-1.18.8/doc/todo/Give_preference_to_etckeeper.conf_over_existing_repository_for_defining___36__VCS/comment_1_3cafcd2709f32dfe583dc42933f542cb._comment 1970-01-01 01:00:00.000000000 +0100 +++ new/etckeeper-1.18.14/doc/todo/Give_preference_to_etckeeper.conf_over_existing_repository_for_defining___36__VCS/comment_1_3cafcd2709f32dfe583dc42933f542cb._comment 2020-01-22 14:59:54.000000000 +0100 @@ -0,0 +1,21 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 1""" + date="2020-01-21T19:00:14Z" + content=""" +I'm not thrilled by this idea. It's not uncommon for etckeeper.conf to be +packaged by a distribution. Upgrading the package may replace the +local etckeeper.conf (takes only answering "Y" on debian). If that changes +out the VCS setting, then etckeeper suddently stops using the repository it +was using. + +The README documents how to change the VCS that etckeeper uses. So I think +it would be better to document that VCS setting in etckeeper.conf only +applies to `etckeeper init`. Or alternatively, to add a parameter like +`etckeeper init --vcs=git`. + +It's true that neither of those options would cater to a system that has +two different version control repositories checked out in /etc at the same +time, but that sounds like a sufficiently strange/bad idea that I see no +reason to cater to it. +"""]] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etckeeper-1.18.8/doc/todo/Porting_to_LEDE___40__OpenWRT__41___opkg/comment_3_3d3af5448206218df3f29a2ff4d8b92e._comment new/etckeeper-1.18.14/doc/todo/Porting_to_LEDE___40__OpenWRT__41___opkg/comment_3_3d3af5448206218df3f29a2ff4d8b92e._comment --- old/etckeeper-1.18.8/doc/todo/Porting_to_LEDE___40__OpenWRT__41___opkg/comment_3_3d3af5448206218df3f29a2ff4d8b92e._comment 1970-01-01 01:00:00.000000000 +0100 +++ new/etckeeper-1.18.14/doc/todo/Porting_to_LEDE___40__OpenWRT__41___opkg/comment_3_3d3af5448206218df3f29a2ff4d8b92e._comment 2020-01-22 14:59:54.000000000 +0100 @@ -0,0 +1,11 @@ +[[!comment format=mdwn + username="https://peterjmello.wordpress.com/" + nickname="RogueScholar" + avatar="http://cdn.libravatar.org/avatar/2d57e52a1ae78a222266afb46fe3c1c4" + subject="Also relevant to Entware" + date="2019-01-04T10:26:46Z" + content=""" +I was just thinking that it would be nice to have etckeeper operating on my home networking gear similar to how I use it on my PCs. Since they all run either OpenWRT or Tomato/Merlin, a package that interfaced with the opkg management system would be ideal. Specifically it's the fact that the directory it would need to monitor would be /opt/etc and not /etc that I'm not quite sure how to go about implementing. + +Has there been any movement on this process? I'd be happy to put my shoulder to the wheel on it if someone with more familiarity with the codebase could describe the tasks involved. Failing that I'd be happy to test anyone else's attempts. Huge fan of the project, thanks so much for all the work that's been put in on it to date. +"""]] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etckeeper-1.18.8/doc/todo/vcs-commit_hook_is_not_POSIX-friendly.mdwn new/etckeeper-1.18.14/doc/todo/vcs-commit_hook_is_not_POSIX-friendly.mdwn --- old/etckeeper-1.18.8/doc/todo/vcs-commit_hook_is_not_POSIX-friendly.mdwn 1970-01-01 01:00:00.000000000 +0100 +++ new/etckeeper-1.18.14/doc/todo/vcs-commit_hook_is_not_POSIX-friendly.mdwn 2020-01-22 14:59:54.000000000 +0100 @@ -0,0 +1,33 @@ +[Bug #946055](https://bugs.debian.org/946055) mentions that if `/bin/sh` is not bash, it will fail (specifically with mksh): + +> /etc/etckeeper/commit.d/50vcs-commit[22]: ${@#-m}: bad substitution +> +> This is because doing trim operations on an array are not implemented +> in mksh, and unspecified in POSIX: +> +> […] If parameter is '#', '*', or '@', the result of the expansion is unspecified. […] +> +> cf. <https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_02> + +The bug suggests a patch that uses `sed` instead of that pattern substitution: + + --- a/commit.d/50vcs-commit + +++ b/commit.d/50vcs-commit + @@ -12,10 +12,9 @@ if [ -n "$1" ]; then + if [ "x$1" = "x--stdin" ]; then + cat > "$logfile" + else + - if [ "x$1" = "x-m" ]; then + - shift 1 + - fi + - echo "${@#-m}" > "$logfile" + + sed '1s/^-m \{0,1\}//' >"$logfile" <<-EOF + + $* + + EOF + fi + else + logfile="" + +Thanks! -- [[anarcat]] + +> [[done]] --[[Joey]] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etckeeper-1.18.8/etckeeper new/etckeeper-1.18.14/etckeeper --- old/etckeeper-1.18.8/etckeeper 2018-06-05 22:04:03.000000000 +0200 +++ new/etckeeper-1.18.14/etckeeper 2020-01-22 14:59:54.000000000 +0100 @@ -71,7 +71,7 @@ exit 0 elif [ "x$1" = "x-v" ] || [ "x$1" = "x--version" ]; then # This is automatically updated by the Makefile. - echo "Version: 1.18.8" + echo "Version: 1.18.14" exit 0 fi command="$1" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etckeeper-1.18.8/etckeeper.spec new/etckeeper-1.18.14/etckeeper.spec --- old/etckeeper-1.18.8/etckeeper.spec 2018-06-05 22:04:03.000000000 +0200 +++ new/etckeeper-1.18.14/etckeeper.spec 2020-01-22 14:59:54.000000000 +0100 @@ -1,5 +1,5 @@ Name: etckeeper -Vaersion: 1.18.7 +Version: 1.18.14 Release: 4%{?dist} Summary: store /etc in git, mercurial, bzr or darcs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etckeeper-1.18.8/init.d/40vcs-init new/etckeeper-1.18.14/init.d/40vcs-init --- old/etckeeper-1.18.8/init.d/40vcs-init 2018-06-05 22:04:03.000000000 +0200 +++ new/etckeeper-1.18.14/init.d/40vcs-init 2020-01-22 14:59:54.000000000 +0100 @@ -1,17 +1,18 @@ #!/bin/sh set -e +description="$(hostname 2>/dev/null || cat /etc/hostname) /etc repository" if [ "$VCS" = git ] && [ ! -e .git ]; then git init - echo "$(hostname) /etc repository" > .git/description + echo "$description" > .git/description elif [ "$VCS" = hg ] && [ ! -e .hg ]; then hg init echo "[web]" > .hg/hgrc - echo "description = $(hostname) /etc repository" >> .hg/hgrc + echo "description = $description" >> .hg/hgrc elif [ "$VCS" = bzr ] && [ ! -e .bzr ]; then bzr init - bzr nick "$(hostname) /etc repository" + bzr nick "$description" elif [ "$VCS" = darcs ] && [ ! -e _darcs ]; then darcs initialize - echo "$(hostname) /etc repository" > _darcs/prefs/motd + echo "$description" > _darcs/prefs/motd fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etckeeper-1.18.8/pacman-post-install.hook new/etckeeper-1.18.14/pacman-post-install.hook --- old/etckeeper-1.18.8/pacman-post-install.hook 2018-06-05 22:04:03.000000000 +0200 +++ new/etckeeper-1.18.14/pacman-post-install.hook 2020-01-22 14:59:54.000000000 +0100 @@ -4,7 +4,7 @@ Operation = Install Operation = Upgrade Operation = Remove -Type = File +Type = Path Target = etc/* [Action] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etckeeper-1.18.8/pacman-pre-install.hook new/etckeeper-1.18.14/pacman-pre-install.hook --- old/etckeeper-1.18.8/pacman-pre-install.hook 2018-06-05 22:04:03.000000000 +0200 +++ new/etckeeper-1.18.14/pacman-pre-install.hook 2020-01-22 14:59:54.000000000 +0100 @@ -4,7 +4,7 @@ Operation = Install Operation = Upgrade Operation = Remove -Type = File +Type = Path Target = etc/* [Action] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etckeeper-1.18.8/post-install.d/50vcs-commit new/etckeeper-1.18.14/post-install.d/50vcs-commit --- old/etckeeper-1.18.8/post-install.d/50vcs-commit 2018-06-05 22:04:03.000000000 +0200 +++ new/etckeeper-1.18.14/post-install.d/50vcs-commit 2020-01-22 14:59:54.000000000 +0100 @@ -3,8 +3,23 @@ pl="/var/cache/etckeeper/packagelist" +# Parent process is etckeeper +# (Only procps ps is currently supported, others will fail, +# so this may end up empty.) +ETCKEEPER_PID=$( ps --no-headers -o ppid "${PPID}" 2>/dev/null | sed 's/^ *//' ) + +# Find the parent of etckeeper and get the command line of the process +if ! [ -z "${ETCKEEPER_PID}" ]; then + ETCKEEPER_PPID=$( ps --no-headers -o ppid "${ETCKEEPER_PID}" | sed 's/^ *//' ) + ETCKEEPER_PARENT_COMMAND_LINE=$( ps --no-headers -o args "${ETCKEEPER_PPID}" ) +fi + if etckeeper unclean; then - message="committing changes in /etc after $HIGHLEVEL_PACKAGE_MANAGER run" + if [ -z "${ETCKEEPER_PARENT_COMMAND_LINE}" ]; then + message="committing changes in /etc after $HIGHLEVEL_PACKAGE_MANAGER run" + else + message="committing changes in /etc made by \"$ETCKEEPER_PARENT_COMMAND_LINE\"" + fi set +e if [ -e $pl.pre-install ] && [ "$(cat $pl.fmt 2>/dev/null || true)" = "$(etckeeper list-installed fmt)" ]; then @@ -24,5 +39,5 @@ echo "warning: etckeeper failed to commit changes in /etc using $VCS" >&2 fi fi - + rm -f $pl.pre-install $pl.fmt diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etckeeper-1.18.8/zsh_completion new/etckeeper-1.18.14/zsh_completion --- old/etckeeper-1.18.8/zsh_completion 1970-01-01 01:00:00.000000000 +0100 +++ new/etckeeper-1.18.14/zsh_completion 2020-01-22 14:59:54.000000000 +0100 @@ -0,0 +1,27 @@ +#compdef etckeeper + +local _VCS=$(sed -n "s,^VCS=\([\"']\?\)\(.*\)\1$,\2,p" \ + ${ETCKEEPER_CONF_DIR:-/etc/etckeeper}/etckeeper.conf 2>/dev/null) + +_arguments '--help[show this help message and exit]' \ + '--version[show version information]' \ + ":etckeeper command:(/etc/etckeeper/*.d(/:t:r))" \ + '*::subcmd:->subcmd' && return 0 + +case "$words[1]" in +(commit) + _arguments ':message text: ' + ;; +(update-ignore) + _arguments '-a[add a "managed by etckeeper" block]' + ;; +(uninit) + _arguments '-f[force uninit without prompting]' + ;; +(vcs) + [[ $_VCS == git ]] && service=git + _$_VCS + ;; +(*) + ;; +esac
