pax_global_header00006660000000000000000000000064127430071230014511gustar00rootroot0000000000000052 comment=5f9a306648c4ce1a756e53dee283bf0ca6cabd8e etckeeper-1.18.5/000077500000000000000000000000001274300712300135545ustar00rootroot00000000000000etckeeper-1.18.5/.gitattributes000066400000000000000000000000541274300712300164460ustar00rootroot00000000000000debian/changelog merge=dpkg-mergechangelogs etckeeper-1.18.5/GPL000066400000000000000000000431031274300712300141220ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. etckeeper-1.18.5/INSTALL000077700000000000000000000000001274300712300177022doc/install.mdwnustar00rootroot00000000000000etckeeper-1.18.5/Makefile000066400000000000000000000065571274300712300152310ustar00rootroot00000000000000# You should configure etckeeper.conf for your distribution before # installing etckeeper. CONFFILE=etckeeper.conf include $(CONFFILE) DESTDIR?= prefix=/usr bindir=${prefix}/bin etcdir=/etc mandir=${prefix}/share/man vardir=/var systemddir=/lib/systemd/system completiondir=${prefix}/share/bash-completion/completions CP=cp -R INSTALL=install INSTALL_EXE=${INSTALL} INSTALL_DATA=${INSTALL} -m 0644 PYTHON=python build: etckeeper.spec etckeeper.version -$(PYTHON) ./etckeeper-bzr/__init__.py build || echo "** bzr support not built" -$(PYTHON) ./etckeeper-dnf/etckeeper.py build || echo "** DNF support not built" install: etckeeper.version mkdir -p $(DESTDIR)$(etcdir)/etckeeper/ $(DESTDIR)$(vardir)/cache/etckeeper/ $(CP) *.d $(DESTDIR)$(etcdir)/etckeeper/ $(INSTALL_EXE) daily $(DESTDIR)$(etcdir)/etckeeper/daily $(INSTALL_DATA) $(CONFFILE) $(DESTDIR)$(etcdir)/etckeeper/etckeeper.conf mkdir -p $(DESTDIR)$(bindir) $(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)$(systemddir) $(INSTALL_DATA) systemd/etckeeper.service $(DESTDIR)$(systemddir)/etckeeper.service $(INSTALL_DATA) systemd/etckeeper.timer $(DESTDIR)$(systemddir)/etckeeper.timer ifeq ($(HIGHLEVEL_PACKAGE_MANAGER),apt) mkdir -p $(DESTDIR)$(etcdir)/apt/apt.conf.d $(INSTALL_DATA) apt.conf $(DESTDIR)$(etcdir)/apt/apt.conf.d/05etckeeper mkdir -p $(DESTDIR)$(etcdir)/cruft/filters-unex $(INSTALL_DATA) cruft_filter $(DESTDIR)$(etcdir)/cruft/filters-unex/etckeeper endif ifeq ($(LOWLEVEL_PACKAGE_MANAGER),pacman) mkdir -p $(DESTDIR)$(prefix)/share/libalpm/hooks $(INSTALL_DATA) ./pacman-pre-install.hook $(DESTDIR)$(prefix)/share/libalpm/hooks/05-etckeeper-pre-install.hook $(INSTALL_DATA) ./pacman-post-install.hook $(DESTDIR)$(prefix)/share/libalpm/hooks/zz-etckeeper-post-install.hook endif ifeq ($(LOWLEVEL_PACKAGE_MANAGER),pacman-g2) mkdir -p $(DESTDIR)$(etcdir)/pacman-g2/hooks $(INSTALL_DATA) pacman-g2.hook $(DESTDIR)$(etcdir)/pacman-g2/hooks/etckeeper endif ifeq ($(HIGHLEVEL_PACKAGE_MANAGER),yum) mkdir -p $(DESTDIR)$(prefix)/lib/yum-plugins $(INSTALL_DATA) yum-etckeeper.py $(DESTDIR)$(prefix)/lib/yum-plugins/etckeeper.py mkdir -p $(DESTDIR)$(etcdir)/yum/pluginconf.d $(INSTALL_DATA) yum-etckeeper.conf $(DESTDIR)$(etcdir)/yum/pluginconf.d/etckeeper.conf endif ifeq ($(HIGHLEVEL_PACKAGE_MANAGER),dnf) -$(PYTHON) ./etckeeper-dnf/etckeeper.py install --root=$(DESTDIR) ${PYTHON_INSTALL_OPTS} || echo "** DNF support not installed" endif ifeq ($(HIGHLEVEL_PACKAGE_MANAGER),zypper) mkdir -p $(DESTDIR)$(prefix)/lib/zypp/plugins/commit $(INSTALL) zypper-etckeeper.py $(DESTDIR)$(prefix)/lib/zypp/plugins/commit/zypper-etckeeper.py endif -$(PYTHON) ./etckeeper-bzr/__init__.py install --root=$(DESTDIR) ${PYTHON_INSTALL_OPTS} || echo "** bzr support not installed" echo "** installation successful" clean: etckeeper.spec etckeeper.version rm -rf build etckeeper.spec: sed -i~ "s/Version:.*/Version: $$(perl -e '$$_=<>;m/\((.*?)(-.*)?\)/;print $$1;';m/\((.*?)(-.*)?\)/;print $$1;' &2 echo "etckeeper warning: run etckeeper init to enable it" >&2 } if [ "$VCS" = git ] && [ ! -d .git ]; then not_enabled_warning elif [ "$VCS" = hg ] && [ ! -d .hg ]; then not_enabled_warning elif [ "$VCS" = bzr ] && [ ! -d .bzr ]; then not_enabled_warning elif [ "$VCS" = darcs ] && [ ! -d _darcs ]; then not_enabled_warning fi etckeeper-1.18.5/commit.d/20store-metadata000077700000000000000000000000001274300712300257712../pre-commit.d/30store-metadataustar00rootroot00000000000000etckeeper-1.18.5/commit.d/30bzr-add000077500000000000000000000002121274300712300166750ustar00rootroot00000000000000#!/bin/sh set -e if [ "$VCS" = bzr ] && [ -d .bzr ]; then if ! bzr add -q .; then echo "etckeeper warning: bzr add failed" >&2 fi fi etckeeper-1.18.5/commit.d/30darcs-add000077500000000000000000000004561274300712300172060ustar00rootroot00000000000000#!/bin/sh set -e if [ "$VCS" = darcs ] && [ -d _darcs ]; then rc=0 res=$( darcs add -qr . 2>&1 ) || rc=$? if test $rc -ne 0; then if ! test $rc -eq 2 -a "${res%No files were added}" != "$res"; then printf "%s" "$res" echo "etckeeper warning: darcs add failed" >&2 fi fi unset rc res fi etckeeper-1.18.5/commit.d/30git-add000077500000000000000000000002121274300712300166630ustar00rootroot00000000000000#!/bin/sh set -e if [ "$VCS" = git ] && [ -d .git ]; then if ! git add --all; then echo "etckeeper warning: git add --all" >&2 fi fi etckeeper-1.18.5/commit.d/30hg-addremove000077500000000000000000000002171274300712300177210ustar00rootroot00000000000000#!/bin/sh set -e if [ "$VCS" = hg ] && [ -d .hg ]; then if ! hg addremove .; then echo "etckeeper warning: hg addremove failed" >&2 fi fi etckeeper-1.18.5/commit.d/50vcs-commit000077500000000000000000000063571274300712300174550ustar00rootroot00000000000000#!/bin/sh set -e cleanup () { if [ -n "$logfile" ]; then rm -f "$logfile" fi } if [ -n "$1" ]; then trap cleanup EXIT logfile="$(mktemp -t etckeeper-$VCS.XXXXXXXXXX)" if [ "x$1" = "x--stdin" ]; then cat > "$logfile" else if [ "x$1" = "x-m" ]; then shift 1 fi echo "$1" > "$logfile" fi else logfile="" fi hostname=`hostname` hostname="${hostname%%.*}" dnsdomainname=`dnsdomainname 2>/dev/null || true` if [ -n "$dnsdomainname" ]; then hostname="$hostname.$dnsdomainname" fi ORIG_USER=$USER USER= if [ -n "$SUDO_USER" ]; then USER="$SUDO_USER" else # try to check tty ownership, in case user su'd to root TTY="$(tty 2>/dev/null || true)" if [ -n "$TTY" ] && [ -c "$TTY" ]; then USER="$(find "$TTY" -printf "%u")" fi fi if [ "$VCS" = git ] && [ -d .git ]; then if [ -n "$USER" ]; then # Use user.name and user.email from the gitconfig belonging # to the user who became root. USER_HOME="$(getent passwd "$USER" | cut -d: -f6)" if [ -n "$USER_HOME" ] && [ -e "$USER_HOME/.gitconfig" ]; then if [ -z "$GIT_AUTHOR_NAME" ]; then GIT_AUTHOR_NAME="$(git config -f "$USER_HOME/.gitconfig" user.name)" || true export GIT_AUTHOR_NAME fi if [ -z "$GIT_AUTHOR_EMAIL" ]; then GIT_AUTHOR_EMAIL="$(git config -f "$USER_HOME/.gitconfig" user.email)" || true export GIT_AUTHOR_EMAIL fi fi if [ -z "$GIT_AUTHOR_NAME" ] || [ -z "$GIT_AUTHOR_EMAIL" ]; then if [ -n "$USER_HOME" ] && [ -e "$USER_HOME/.config/git/config" ]; then if [ -z "$GIT_AUTHOR_NAME" ]; then GIT_AUTHOR_NAME="$(git config -f "$USER_HOME/.config/git/config" user.name)" || true export GIT_AUTHOR_NAME fi if [ -z "$GIT_AUTHOR_EMAIL" ]; then GIT_AUTHOR_EMAIL="$(git config -f "$USER_HOME/.config/git/config" user.email)" || true export GIT_AUTHOR_EMAIL fi fi fi if [ -z "$GIT_COMMITTER_EMAIL" ]; then GIT_COMMITTER_EMAIL="$(git config --global user.email)" || true export GIT_COMMITTER_EMAIL fi if [ -z "$GIT_AUTHOR_NAME" ]; then GIT_AUTHOR_NAME="$USER" export GIT_AUTHOR_NAME fi if [ -z "$GIT_AUTHOR_EMAIL" ]; then GIT_AUTHOR_EMAIL="$USER@$hostname" export GIT_AUTHOR_EMAIL fi if [ -z "$GIT_COMMITTER_EMAIL" ]; then GIT_COMMITTER_EMAIL=`whoami`"@$hostname" export GIT_COMMITTER_EMAIL fi fi if [ -n "$logfile" ]; then git commit $GIT_COMMIT_OPTIONS -F "$logfile" else git commit $GIT_COMMIT_OPTIONS fi elif [ "$VCS" = hg ] && [ -d .hg ]; then if [ -n "$USER" ]; then LOGNAME="$USER" export LOGNAME fi if [ -z "$HGUSER" ]; then HGUSER="$USER@$hostname" export HGUSER fi if [ -n "$logfile" ]; then hg commit $HG_COMMIT_OPTIONS -l "$logfile" else hg commit $HG_COMMIT_OPTIONS fi elif [ "$VCS" = bzr ] && [ -d .bzr ]; then if [ -z "$EMAIL" ] && [ -n "$USER" ]; then EMAIL="$USER <$USER@$hostname>" export EMAIL else bzr whoami >/dev/null 2>&1 || export EMAIL="$ORIG_USER <$ORIG_USER@$hostname>" fi if [ -n "$logfile" ]; then bzr commit $BZR_COMMIT_OPTIONS -F "$logfile" else bzr commit $BZR_COMMIT_OPTIONS fi elif [ "$VCS" = darcs ] && [ -d _darcs ]; then if [ -z "$USER" ]; then USER=root fi if [ -n "$logfile" ]; then darcs record --author="$USER" $DARCS_COMMIT_OPTIONS --logfile="$logfile" else darcs record --author="$USER" $DARCS_COMMIT_OPTIONS fi fi etckeeper-1.18.5/commit.d/99push000077500000000000000000000005201274300712300163520ustar00rootroot00000000000000#!/bin/sh if [ -n "$PUSH_REMOTE" ]; then if [ "$VCS" = git ] && [ -d .git ]; then for REMOTE in $PUSH_REMOTE; do git push "$REMOTE" master || true done elif [ "$VCS" = hg ] && [ -d .hg ]; then for REMOTE in $PUSH_REMOTE; do hg push "$REMOTE" || true done else echo "PUSH_REMOTE not yet supported for $VCS" >&2 fi fi etckeeper-1.18.5/commit.d/README000066400000000000000000000003011274300712300161400ustar00rootroot00000000000000Files in this directory are run when there might be changes to commit. (Before and after packages are installed, upgraded, etc.) They should commit changes and new files in /etc to repository. etckeeper-1.18.5/cruft_filter000066400000000000000000000002571274300712300161730ustar00rootroot00000000000000/etc/.etckeeper /etc/.gitignore /etc/.git /etc/.git/** /etc/.hgignore /etc/.hg /etc/.hg/** /etc/.bzrignore /etc/.bzr /etc/.bzr/** /etc/.darcsignore /etc/_darcs /etc/_darcs/** etckeeper-1.18.5/daily000077500000000000000000000010471274300712300146060ustar00rootroot00000000000000#!/bin/sh # Script that can be run daily to autocommit /etc changes. set -e if [ -x /usr/bin/etckeeper ] && [ -e /etc/etckeeper/etckeeper.conf ]; then # avoid autocommit if an install run is in progress lockfile=/var/cache/etckeeper/packagelist.pre-install if [ -e "$lockfile" ] && [ -n "$(find "$lockfile" -mtime +1)" ]; then rm -f "$lockfile" # stale fi if [ ! -e "$lockfile" ]; then AVOID_SPECIAL_FILE_WARNING=1 export AVOID_SPECIAL_FILE_WARNING if etckeeper unclean; then etckeeper commit "daily autocommit" >/dev/null fi fi fi etckeeper-1.18.5/debian/000077500000000000000000000000001274300712300147765ustar00rootroot00000000000000etckeeper-1.18.5/debian/changelog000066400000000000000000001017441274300712300166570ustar00rootroot00000000000000etckeeper (1.18.5) unstable; urgency=medium * 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. -- Joey Hess Sun, 17 Jul 2016 18:53:54 -0400 etckeeper (1.18.4) unstable; urgency=medium * 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. -- Joey Hess Mon, 20 Jun 2016 01:05:30 -0400 etckeeper (1.18.3) unstable; urgency=medium * 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. -- Joey Hess Mon, 15 Feb 2016 13:11:20 -0400 etckeeper (1.18.2) unstable; urgency=medium * Use getent utility instead of perl. (Elan Ruusamäe) * Initial FreeBSD support with pkgng plugin. (William Johansson) * Fix README.md symlink in package (Sebastian Schmidt, Antoine Beaupré, closes: #791566) * Fix typo of GIT_COMMITTER_EMAIL. -- Joey Hess Tue, 04 Aug 2015 10:13:08 -0400 etckeeper (1.18.1) unstable; urgency=medium * Add myself as maintainer (Closes: #768516) * Keeping the package native as I do not intend to diverge from upstream. * Update git URL in control file. -- Antoine Beaupré Sat, 21 Mar 2015 18:30:07 -0400 etckeeper (1.18) unstable; urgency=medium * Send yum pre-commit output to /dev/null Thanks, Andrew Colin Kissa * Set LANG=C internally when doing some operations that have been reported to fail in other locales. -- Joey Hess Sat, 14 Mar 2015 13:24:07 -0400 etckeeper (1.17) unstable; urgency=medium * Fix name of DNF plugin. * Add --version Thanks Andreas Wansner. * New website, http://etckeeper.branchable.com/ * Add build-depends on dh-python. -- Joey Hess Mon, 22 Dec 2014 16:42:26 -0400 etckeeper (1.16) unstable; urgency=medium * Added support for Fedora's DNF highlevel package manager. Thanks, Peter Listiak and Petr Spacek. * Add architecture info to dpkg list-installed. Closes: #768145 * Orphaned the Debian package. -- Joey Hess Fri, 07 Nov 2014 21:30:50 -0400 etckeeper (1.15) unstable; urgency=medium * Recommend cron-daemon, rather than cron, as etckeeper only needs cron.daily functionality. Closes: #762721 -- Joey Hess Thu, 16 Oct 2014 12:21:48 -0400 etckeeper (1.14) unstable; urgency=medium * Handle failure to commit in post-install, pre-install by showing a warning, rather than propigating the error to apt. This avoids breaking the apt run when eg, git is misconfigured and cannot commit. pre-install already did this when it was able to use debconf to display a message, but now debconf is not used, and it always behaves this way. Closes: #760011 -- Joey Hess Thu, 04 Sep 2014 15:47:32 -0400 etckeeper (1.13) unstable; urgency=medium * Ignore check-mk-agent-logwatch's FHS violating /etc/check_mk/logwatch.state. Closes: #753903 * Only allow [-a-z_] in etckeeper commands to avoid any possible directory traversal etc issues. * update-ignore, uninit: Fix parsing of ignore files containing '\' -- Joey Hess Sat, 09 Aug 2014 13:05:55 -0400 etckeeper (1.12) unstable; urgency=medium * Portability fixes. Thanks, Harald Dunkel. * Add support for pushing to multiple remote repositories. Thanks, Rouben. * Fix handling of git ignores like dir/* Thanks, Pim van den Berg -- Joey Hess Fri, 13 Jun 2014 12:03:06 -0400 etckeeper (1.11) unstable; urgency=low * Fix too broad matching of .gitignored files. Closes: #732339 -- Joey Hess Tue, 17 Dec 2013 22:24:29 -0400 etckeeper (1.10) unstable; urgency=low * Remove lvm/backup from default ignores, because lvm documentation recommends backing that up, for use by vgcfgrestore. * Fix exporting of some git variables. Closes: #728583 -- Joey Hess Sun, 03 Nov 2013 12:14:02 -0400 etckeeper (1.9) unstable; urgency=low * Fix git update-ignore syntax. Closes: #721873 -- Joey Hess Wed, 04 Sep 2013 21:43:42 -0400 etckeeper (1.8) unstable; urgency=low * Avoid listing .gitignored files in .etckeeper file. Closes: #607665 Thanks, Zdenek Crha -- Joey Hess Wed, 04 Sep 2013 09:31:37 -0400 etckeeper (1.7) unstable; urgency=low * Fix hilarious typo hardcoding my name. Closes: #718425 -- Joey Hess Wed, 31 Jul 2013 11:33:45 -0400 etckeeper (1.6) unstable; urgency=low * Guard git config calls. Closes: #717957 -- Joey Hess Sat, 27 Jul 2013 12:24:30 -0400 etckeeper (1.5) unstable; urgency=low * Quote user and group names, in case one contains a space. * Added support for the pacman package manager. (Thanks, Tiago Stürmer Daitx) * Use user.name and user.email from the .gitconfig file belonging to the user who sued or sudoed to root, in preference to making up values for that user. * cron.daily: Fix typo in stale lockfile handling code. Closes: #717908 -- Joey Hess Fri, 26 Jul 2013 11:03:48 -0400 etckeeper (1.4) unstable; urgency=low * Deal with unix^wlinux portability nonsense. -- Joey Hess Mon, 17 Jun 2013 12:00:59 -0400 etckeeper (1.3) unstable; urgency=low * Fix type -p bashism that crept in via recent patches. Closes: #707319 -- Joey Hess Wed, 08 May 2013 22:36:30 -0400 etckeeper (1.2) unstable; urgency=low * Call type -p in a more compatable way. * When a file is owned by a uid or a gid with no corresponding user or group, put a numeric chown into .etckeeper. Previously, a broken chown was outputted. -- Joey Hess Wed, 08 May 2013 11:51:51 -0400 etckeeper (1.1) unstable; urgency=low * Fix warning when PUSH_REMOTE is not set. Closes: #706917 -- Joey Hess Mon, 06 May 2013 09:49:24 -0400 etckeeper (1.0) unstable; urgency=low [ Joey Hess ] * Unset GIT_DIR and GIT_WORK_TREE. Closes: #689101 * PUSH_REMOTE can be set to automatically push to a remote on commit. Thanks, L. Alberto Giménez * Ignore fake-hwclock.data. Closes: #701491 [ Jelmer Vernooij ] * Auto-detect the VCS setting if there already is a repository in /etc. -- Joey Hess Sat, 04 May 2013 23:45:25 -0400 etckeeper (0.64) unstable; urgency=low * Added support for openSUSE's zypper package manager. Thanks, Catalin Iacob * Add Brazilian Portuguese debconf translation. Closes: #685771 Thanks, Adriano Rafael Gomes -- Joey Hess Sat, 25 Aug 2012 11:53:08 -0400 etckeeper (0.63) unstable; urgency=low * bzr: Improve detection of unclean repos, to work when there are shelved changes. * uninit: Now preserves parts of the gitignore and similar files that are outside the managed by etckeeper block. Closes: #673996 Thanks, David De La Harpe Golden (Squared Financial) -- Joey Hess Sat, 02 Jun 2012 18:22:37 -0400 etckeeper (0.62) unstable; urgency=low * Autocommit git staged files. Closes: #662614 -- Joey Hess Mon, 05 Mar 2012 10:41:46 -0400 etckeeper (0.61) unstable; urgency=low * Fix up botched git-rm conffile removal from 0.58. The file could be in any of three states; absent, present, or .dpkg-dist. Finish fully removing it. Closes: #655836 -- Joey Hess Sat, 14 Jan 2012 12:42:50 -0400 etckeeper (0.60) unstable; urgency=low * Updated Dutch translation of debconf templates. Closes: #654244 * Support -h and --help. Closes: #654188 * Fix typo in bugfix for #651168. * Improve yum hook to avoid running if etckeeper was just removed. Thanks, Mykola Marzhan -- Joey Hess Fri, 06 Jan 2012 19:23:42 -0400 etckeeper (0.59) unstable; urgency=low * Add /etc/cups/subscriptions.conf to default ignores, as the content of this file does not normally contain configuration and it changes frequently. Closes: #651168 * Shell quoting fix. Thanks, Daniel Hahler -- Joey Hess Thu, 22 Dec 2011 11:48:50 -0400 etckeeper (0.58) unstable; urgency=low * Changed to store all permissions of files and directories, even those with standard permissions of 644 and 755. This is unfortunately necessary in order to support etckeeper init on a checkout that was made with a nonstandard umask, in which case the files that were expected to be 644 and 755, won't be. Closes: #649701 Thanks to Дмитрий Матросов for reporting the bug and developing a fixup script (attached to the bug) which could be used if you've already encountered this problem. * Bugfix for filenames containing single quotes. * Use git add -A, which automatically removes deleted files, and avoids a separate call to git add -u. Thanks to Miklos Vajna, whose patch in 2008 was deferred because -A was then too new, and languished in a branch until found today. * Optimised metadata storage. * cron.daily: Don't stop committing when a stale packagelist.pre-install file exists. Thanks to gulikoza for noticing this bug. -- Joey Hess Fri, 25 Nov 2011 20:03:36 -0400 etckeeper (0.57) unstable; urgency=low * Use find -path instead of less portable find -wholename. -- Joey Hess Fri, 04 Nov 2011 17:03:46 -0400 etckeeper (0.56) unstable; urgency=low * Converted to use dh_python2. Closes: #616800 * Handle files with % in their names. -- Joey Hess Tue, 12 Jul 2011 14:38:09 -0400 etckeeper (0.55) unstable; urgency=low * Fix error propigation to yum, which makes AVOID_COMMIT_BEFORE_INSTALL work. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=709487 Thanks, Thomas Moschny * Avoid being noisy in post-install after automatic yum updates. (Tuomo Soini) * Ignore FHS violating prelink.cache and openvpn-status.log. * Ignore *.LOCK files, as used by selinux policies. * Add AVOID_SPECIAL_FILE_WARNING to config file, and set it in cron job to avoid daily noise. (gulikoza) -- Joey Hess Sun, 19 Jun 2011 15:21:20 -0400 etckeeper (0.54) unstable; urgency=low * Ignore inssev's FHS violating /etc/init.d/.depend.* files. Closes: #619407 See #619409 * Use hg pre-commit hook, rather than its precommit hook, as the latter is run after the files staged for commit are determined and so .etckeeper cannot be staged as part of the current commit. Closes: #621827 -- Joey Hess Mon, 30 May 2011 18:11:40 -0400 etckeeper (0.53) unstable; urgency=low [ Joey Hess ] * Install bzr hook lazily, clean up some compatibility code. (Jelmer Vernooij) [ Josh Triplett ] * Only set environment variables for commit authorship (EMAIL, GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL, GIT_COMMITTER_EMAIL) if they don't already exist. [ Joey Hess ] * Add .pyc and .pyo files to ignore. * Add lvm/backup and lvm/cache to ignore. Closes: #462355 * Avoid warning about special or hard linked files that are ignored by hg. Thanks Sjoerd Mullender for patch. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=688991 -- Joey Hess Fri, 18 Mar 2011 15:37:54 -0400 etckeeper (0.52) unstable; urgency=low * Rewrote 50git-rm to avoid using git ls-files, and thus avoid encoding problems with filenames. -- Joey Hess Sun, 06 Feb 2011 00:00:55 -0400 etckeeper (0.51) unstable; urgency=low * Updated Vietnamese translation of debconf templates. Closes: #601921 * Improve rpm version change detection. * Move etckeeper out of sbin, to avoid needing to work around broken root PATH settings in eg, crontab. Closes: #602438 * Added Polish translation of debconf templates. Closes: #607563 -- Joey Hess Sat, 25 Dec 2010 14:39:57 -0400 etckeeper (0.50) unstable; urgency=low * Add Danish translation of debconf templates. Closes: #597768 * Ignore /etc/.initctl. Closes: #598121 * Do not warn about special files or hardlinks if they are ignored by git. Fixes #549354 for git, but not for other VCSs. * Set GIT_COMMITTER_EMAIL to root@$hostname to avoid git prompting the user to configure it in .gitconfig. Closes: #599749 * Deal with strange systems that include the domain name in the hostname, by stripping it. Closes: #600026 -- Joey Hess Wed, 20 Oct 2010 14:06:21 -0400 etckeeper (0.49) unstable; urgency=low * Ensure that PATH contains the directory containing etckeeper, so that hook scripts that re-exec etckeeper are guaranteed to find it. * Ignore -m switch to etckeeper commit, in case someone tries to use it with that option common to several VCS. Closes: #592050 * Remove HOME setting in etckeeper. sudo now defaults to setting HOME itself as of version 1.7.4p4, so it is not necessary for etckeeper to work around its behavior anymore. (sudo also allows disabling that for those who enjoy using guns around feet.) Closes: #583899 * Fix file quoting problem in processing .etckeeper file in init. -- Joey Hess Mon, 13 Sep 2010 13:10:43 -0400 etckeeper (0.48) unstable; urgency=low * Fix backwards test for HGUSER. (Mike Rich) Closes: #589242 * 'etckeeper vcs' can be used to run arbitrary VCS subcommands in the etckeeper environment. (Thanks, Stefan Tomanek) -- Joey Hess Fri, 16 Jul 2010 15:14:05 -0400 etckeeper (0.47) unstable; urgency=low * Set HOME=~root so that VCS like bzr do not drop root-owned files in user home directory when sudo etckeeper is run. Closes: #583581 * hg: Set HGUSER (if not already set) to avoid warning message when committing. Closes: #533298 * Both git and bzr default to showing the author of a commit, and not the committer. So, set the author to the user running sudo for both. The committer will then be root. -- Joey Hess Sun, 30 May 2010 16:50:09 -0400 etckeeper (0.46) unstable; urgency=low * Support etckeeper commit --stdin * Fix bug where after a large upgrade, etckeeper's automatic commit message was so long it exceeded command line length limits. Closes: #581678 -- Joey Hess Sun, 16 May 2010 19:10:57 -0400 etckeeper (0.45) unstable; urgency=low * Revert darcs to using --logfile again, necessary for multiline commit messages. Closes: #577915 * Fix logic error in darcs user code. Closes: #577918 -- Joey Hess Thu, 15 Apr 2010 11:50:22 -0400 etckeeper (0.44) unstable; urgency=low * Add example to README of how to automatically push changes to a backup repository. * Add fuse lock file to ignore list. * Changed darcs to specify --author instead of noting the committing user inside the commit log. * Add -a to DARCS_COMMIT_OPTIONS so commits are noninteractive by default, but users who want darcs prompting can disable it. * Use darcs record -m to specify commit message, instead of using a logfile. * Closes: #519228 * Update depends for git-core to git transition. Closes: #577732 * Avoid using hostname -f, since on Solaris that sets the hostname to -f. Yay, Unix portability! (Instead, use dnsdomainname if available, and otherwise, fall back to the unqualified hostname.) * Other portability fixes for non-GNU tools and OS X. Thanks, Neil Mayhew. -- Joey Hess Wed, 14 Apr 2010 15:43:14 -0400 etckeeper (0.43) unstable; urgency=low * Fix cleanup of /var/cache/etckeeper/packagelist.pre-install after an upgrade where no conffiles are changed. * Prevent cron job autocommit from happening if pre-install file is present, to avoid committing state in the middle of an apt run. Closes: #567538 * Add /etc/webmin/webmin/oscache to ignore list. Closes: #567255 * Check owner of tty to determine who has su'd to root when committing, based on a patch by Jakov Sosic. * Add apparmor.d/cache/ to default ignores. * Record real committer username in the darcs log, so that the man page can say that for every VCS the username is recorded. -- Joey Hess Thu, 18 Feb 2010 14:01:45 -0500 etckeeper (0.42) unstable; urgency=low * Deal with removal of the cache directory. Closes: #559418 * Add ucf backups to ignore list. (See #462355) * Add webmin fsdump status files to ignore list. Closes: #567000 * Add *.old to ignore list (See #462355) * Add *.elc to ignore list (See #491401) * Add ntp.conf.dhcp and X11/xdm/authdir/authfiles/* to ignore list. Closes: #491401 * Fix handling of "#*#" ignores for git and hg. * Add runit and daemontools supervise files to ignore list. Closes: #529253 -- Joey Hess Tue, 26 Jan 2010 16:20:38 -0500 etckeeper (0.41) unstable; urgency=low * Change etckeeper uninit to not remove .gitignore (etc) file if it lacks the "managed by etckeeper" comment. Closes: #545137 * Fix hgrc setup code to not warn if the hgrc already contains a call to etckeeper. (Thanks, Jakov Sosic) * Updated Czech debconf translation from Miroslav Kure. Closes: #546411 -- Joey Hess Sat, 26 Sep 2009 15:58:15 -0400 etckeeper (0.40) unstable; urgency=low * Add Spanish debconf translation. Closes: #539589 * Updated Italian debconf translation. Closes: #540516 * Avoid infinite loop when displaying message about failure to commit changes in /etc. Closes: #540596 -- Joey Hess Sat, 08 Aug 2009 21:21:27 -0400 etckeeper (0.39) unstable; urgency=low * Document ETCKEEPER_CONF_DIR in man page. * Typo. Closes: #536799 * bzr: Set author to root when committing via sudo. Committer will be the sudo user, as it is in git. -- Joey Hess Fri, 31 Jul 2009 13:47:09 -0400 etckeeper (0.38) unstable; urgency=low * Use hostname if hostname -f fails. Closes: #533295 * Automatically commit on initial install, so users can begin relying on etckeeper right away. Closes: #533290 -- Joey Hess Wed, 08 Jul 2009 14:40:58 -0400 etckeeper (0.37) unstable; urgency=low * Make postinst check for the configured VCS before trying to run etckeeper init. Closes: #530497 * Update French debconf translation. Closes: #530795 * Fix typo in cruft file. Closes: #530819 * Update Portuguese debconf translation. Closes: #528109 * Update German debconf translation. Closes: #532346 -- Joey Hess Mon, 08 Jun 2009 13:24:13 -0400 etckeeper (0.36) unstable; urgency=low * Add cruft ignore file. Closes: #522513 * Update Japanese debconf translation. Closes: #527921 * Update Swedish debconf translation. Closes: #528575 * Update Russian debconf translation. Closes: #528798 -- Joey Hess Sat, 16 May 2009 18:22:49 -0400 etckeeper (0.35) unstable; urgency=low * Make etckeeper uninit -f disable the prompt. * Uninit on purge, guarded by a debconf prompt. Closes: #527218 -- Joey Hess Wed, 06 May 2009 14:52:30 -0400 etckeeper (0.34) unstable; urgency=low * Add support for mktemp if tempfile is not available. * Fix uninit prompt to accept 'y' as well as 'yes'. Closes: #517911 * README: Typo. Closes: #517914 -- Joey Hess Mon, 02 Mar 2009 17:01:09 -0500 etckeeper (0.33) unstable; urgency=low * Add support for yum. Thanks, Jimmy Tang. -- Joey Hess Wed, 25 Feb 2009 14:38:12 -0500 etckeeper (0.32) unstable; urgency=low * Add uninit subcommand, which cleans up all etckeeper and VCS droppings in /etc. This is useful if you want to switch to a different VCS and don't have any history to preserve. (Preserving history and converting is of course possible, but significantly harder.) * Run etckeeper init on initial install. Closes: #505772 (The idea being that if someone doesn't want to use git, they can immediatly uninit to easily reverse this.) * Document how to change the VCS used by etckeeper, without preserving any history. Preserving history left as an exersise for the reader. Closes: #515237 * Implement list-installed for rpm. * Added a spec file contributed by Jimmy Tang. -- Joey Hess Tue, 24 Feb 2009 23:01:55 -0500 etckeeper (0.31) unstable; urgency=low * Avoid relying on USER being set, won't be for cron job. Closes: #515602 * Add .sw? to ignores. vim uses that if editing an unspecified file name. Closes: #515628 -- Joey Hess Mon, 16 Feb 2009 15:40:42 -0500 etckeeper (0.30) unstable; urgency=low * Add vim .*.sw? files to default ignores. * Also add emacs #*# autosave files to default ignores. * And DEADJOE files, for good measure. * etckeeper update-ignore will automatically update the VCS ignore file, only touching the part inside a "# managed by etckeeper" comment block. (You may want to add such a comment block to your existing .gitignore, or delete the file and regenerate it.) * Run etckeeper update-ignore on upgrade. * Fix handling of -d in recursive calls to etckeeper -- Joey Hess Sat, 14 Feb 2009 01:21:22 -0500 etckeeper (0.29) unstable; urgency=low * Add a daily cron job to autocommit changes to /etc. Closes: #515100 The cron job is enabled by default but can be disabled via etckeeper.conf. (Thanks to Thierry Carrez) * Fix executable bits on two darcs support scripts. -- Joey Hess Fri, 13 Feb 2009 13:43:02 -0500 etckeeper (0.28) unstable; urgency=low * Support darcs. Thanks to Gian Piero Carrubba. Closes: #510032 -- Joey Hess Thu, 12 Feb 2009 17:13:23 -0500 etckeeper (0.27) unstable; urgency=low * Use SUDO_USER as the committer if set. Closes: #498739 (Thierry Carrez) * bzr: Avoid use of etckeeper pre-commit on Trees not on the filesystem. (Jelmer Vernooij) -- Joey Hess Sun, 01 Feb 2009 17:20:11 -0500 etckeeper (0.26) unstable; urgency=low * Add Japanese debconf translation. Closes: #512869 * Prevent git from removing a directory when the last file in it has been removed, but the directory is left existing and empty, by touching a flag file before calling git rm. Closes: 513006 -- Joey Hess Sun, 25 Jan 2009 13:55:56 -0500 etckeeper (0.25) unstable; urgency=low * Fix filter_unknown calls. Closes: 509888 -- Joey Hess Wed, 31 Dec 2008 13:01:31 -0500 etckeeper (0.24) unstable; urgency=low * Make .etckeeper test that files actually exist before acting on them. Closes: #509888 -- Joey Hess Mon, 29 Dec 2008 15:37:25 -0500 etckeeper (0.23) unstable; urgency=low * Fix hook scripts to use new etckeeper path. Closes: #509742 -- Joey Hess Thu, 25 Dec 2008 16:25:25 -0500 etckeeper (0.22) unstable; urgency=low * Move etckeeper to sbin, and man page to section 8, since only an admin can really use etckeeper. Closes: #509152 * Mention README file from man page. * Build using python-central. For some reason bzr does not pick up on plugins built using python-support. -- Joey Hess Tue, 23 Dec 2008 18:51:14 -0500 etckeeper (0.21) unstable; urgency=low * Swedish debconf translation from Martin Ågren. Closes: #492063 * Make etckeeper init -d set up commit hooks that call etckeeper -d. (Note that if you've relied on it setting up such commit hooks for a repo outside of /etc already, it created broken ones that need to be fixed to use -d.) Thanks, Wolfgang Karall. -- Joey Hess Thu, 11 Sep 2008 16:41:16 -0400 etckeeper (0.20) unstable; urgency=low [ Jelmer Vernooij ] * Use new Bazaar API. * Pass --quiet to bzr add to avoid new files from being printed twice. * Don't consider warnings from bzr plugins when checking if tree was modified. -- Joey Hess Mon, 07 Jul 2008 12:04:30 -0400 etckeeper (0.19) unstable; urgency=low * Patch from Miklos Vajna to fix one more git- command that crept in. -- Joey Hess Sat, 05 Jul 2008 08:34:22 -0400 etckeeper (0.18) unstable; urgency=low * Allow AVOID_COMMIT_BEFORE_INSTALL to be set to zero to disable. * Don't allow LC_COLLATE to reorder the .etckeeper file. Closes: #489057 -- Joey Hess Thu, 03 Jul 2008 00:47:40 -0400 etckeeper (0.17) unstable; urgency=low * Fix backwards test for AVOID_COMMIT_BEFORE_INSTALL. Closes: #486922 -- Joey Hess Wed, 18 Jun 2008 20:36:52 -0400 etckeeper (0.16) unstable; urgency=low [ Joey Hess] * Add a AVOID_COMMIT_BEFORE_INSTALL option in the config file to make it easy to configure etckeeper to abort an installation if there are uncommitted changes in /etc. Closes: #478754 -- Joey Hess Mon, 16 Jun 2008 19:21:16 -0400 etckeeper (0.15) unstable; urgency=low [ Daniel Hahler ] * bzr: Set nickname for tree in init.d/40vcs-init. * Add script to add new files during "commit" for bzr (commit.d/30bzr-add). Closes: #477321 * Fix handling of files with spaces, by setting IFS to "newline" in commit.d/40git-rm. [ Jelmer Vernooij ] * Support for the new bzr pre-commit hook. This requires bzr version 1.4. Closes: #473069 * Remove pointless commit.d/40bzr-rm script. [ Joey Hess ] * debhelper v7; rules file minimisation -- Joey Hess Sat, 03 May 2008 15:08:12 -0400 etckeeper (0.14.2) unstable; urgency=low * Handle nonzero exit status when building package list diff. -- Joey Hess Thu, 17 Apr 2008 13:00:29 -0400 etckeeper (0.14.1) unstable; urgency=low * Fix typo in bzr-precommit script. Closes: #473069 This is an interim fix -- full bzr precommit support has been implemented, but the bzr that supports it is not yet released. * Fix handling of files with spaces, by setting IFS to NL. -- Joey Hess Wed, 16 Apr 2008 19:16:52 -0400 etckeeper (0.14) unstable; urgency=low * When deleting the .metadata, only $VCS rm it if using git. hg write locks the repo when the pre-commit hook is running, so it would lock. -- Joey Hess Sat, 29 Mar 2008 13:43:20 -0400 etckeeper (0.13) unstable; urgency=low * Drop the debconf prompt before committing in pre-install. Closes: #470577, #462161, #471157, #462161 * Stop using metastore, instead add shell commands to .etckeeper to handle permissions. Patch by Scott Bronson. The main advantages of this approach are: - .etckeeper uses less disk space than .metadata. - Git diff includes changes to the commands in the file, which is more transparent than a change to the binary .metadata file, and does not produce conflicts during merging. - Revision control directories such as .hg are filtered out. Closes: #471371 Note that repositories still including .metadata files will be automatically transitioned, and the file removed. Also, etckeeper init on a historical version of a repository that still contains .metadata will use it, if metastore is installed. * Keep track of what packages change state during an installation, and include that in the commit message at the end. Closes: #459384 -- Joey Hess Tue, 25 Mar 2008 20:53:23 -0400 etckeeper (0.12) unstable; urgency=low * Use git ls-files instead of git status. Depend on new enough git for this. * Add support for bzr, thanks to Mark A. Hershberger. Closes: #470515 (Note that bzr does not support etckeeper's pre-commit hook.) -- Joey Hess Tue, 11 Mar 2008 15:06:29 -0400 etckeeper (0.11) unstable; urgency=low * Add lvm cache dir to default ignores. (#462355) * Updated German translation. Closes: #463153 * Some initial rpm support. Patch from Евгений Терешков. * Add apt hooks for rpm based systems. * Add nologin to default ignores. -- Joey Hess Mon, 11 Feb 2008 00:43:19 -0500 etckeeper (0.10) unstable; urgency=low * Convert the directory parameter of etckeeper into "-d directory". * Pass other patameters on from etckeeper to the .d scripts. * Stop using run-parts for various reasons. * Split out a commit.d that contains committing code that's used by both the pre-install.d and post-install.d scripts. * Split out an unclean.d that tests if the WC contains uncommitted changes. * Don't commit in post-install.d if there are no uncommitted changes. * German debconf translation. Closes: #460940, #458751 * Use git status instead of git-status (missed this one before). -- Joey Hess Tue, 15 Jan 2008 14:35:29 -0500 etckeeper (0.9) unstable; urgency=low * Separate debconf use from the main flow of the script so the commit stage can use editors etc. Closes: #459547 * Remove the hint about setting -e to get interactive commits, since I don't want to encourage users to do that. (For one thing, it's unlikely to work if a graphical package manager is used..) -- Joey Hess Mon, 07 Jan 2008 13:46:22 -0500 etckeeper (0.8) unstable; urgency=low * Typo fixes from Miklos Vajna * Add backwards compatability code to handle post-apt action. Closes: #459441 -- Joey Hess Sun, 06 Jan 2008 12:54:51 -0500 etckeeper (0.7) unstable; urgency=low [ Joey Hess ] * Added configuration options for highlevel and lowlevel package managers in etckeeper.conf. * Only install apt hooks if apt is used. * Only add backup conffile exclusion to gitignore if dpkg is used. * Rename pre/post-apt.d to pre/post-install.d to allow the same directories to be used for other package managers. * Use the name of the highlevel package manager in commit messages. * Add gnarly conffile renaming code. * Support mercurial as an alternative to git. Original patch by Mathieu Clabaut, significantly changed. [ Miklos Vajna ] * Add support for frugalware's pacman-g2 package manager. * Stop using git-foo commands. [ Christian Perrier ] * Debconf templates and debian/control reviewed by the debian-l10n-english team as part of the Smith review project. Closes: #454774 * [Debconf translation updates] * Galician. Closes: #455790 * Finnish. Closes: #455967 * Italian. Closes: #456509 * Portuguese. Closes: #456543 * French. Closes: #456920 * Vietnamese. Closes: #457307 * Czech. Closes: #457678 * Dutch. Closes: #457806 * Basque. Closes: #457830 * Russian. Closes: #457871 [ Joey Hess ] * Commit removed files in the pre-install hook to git, as was already done for hg. Avoided changing the debconf template so bubulle doesn't murder me; the current wording is just vague enough to still work with the current behavior. -- Joey Hess Fri, 04 Jan 2008 18:46:49 -0500 etckeeper (0.6) unstable; urgency=low * Depend on a fairly recent git-core. Closes: #453063 -- Joey Hess Sun, 02 Dec 2007 15:46:12 -0500 etckeeper (0.5) unstable; urgency=low * Typo. Closes: #452926 -- Joey Hess Mon, 26 Nov 2007 03:16:14 -0500 etckeeper (0.4) unstable; urgency=low * Portuguese translation from Américo Monteiro. Closes: #451798 * Pass --quiet to git-rm calls. -- Joey Hess Tue, 20 Nov 2007 01:04:32 -0500 etckeeper (0.3) unstable; urgency=low * Patch from Remi Vanicat adding an etckeeper.conf file and a GIT_COMMIT_OPTIONS configuration setting. Closes: #451167 * Add network/run and adjtime to default gitignore. Closes: #451347 * Patch from Rémi Vanicat adding bash completion. Closes: #451302 * Remove redundant dependency on debconf. Closes: #451378 -- Joey Hess Thu, 15 Nov 2007 12:21:02 -0500 etckeeper (0.2) unstable; urgency=low * Add .pwd.lock to default ignores, this file is created by programs that call getspent(). * Add tests for /etc/.git not yet existing and avoid doing bad things. Closes: #451185 * If /etc/.git doesn't exist, display a suggestion to run etckeeper-init. -- Joey Hess Tue, 13 Nov 2007 19:09:11 -0500 etckeeper (0.1) unstable; urgency=low * First release. -- Joey Hess Sun, 11 Nov 2007 01:11:21 -0500 etckeeper-1.18.5/debian/compat000066400000000000000000000000021274300712300161740ustar00rootroot000000000000007 etckeeper-1.18.5/debian/control000066400000000000000000000020431274300712300164000ustar00rootroot00000000000000Source: etckeeper Section: admin Priority: optional Build-Depends: debhelper (>= 7), dpkg-dev (>= 1.9.0), bzr (>= 1.5~), python, dh-python Maintainer: Antoine Beaupré Standards-Version: 3.9.8 XS-Python-Version: all Vcs-Git: git://etckeeper.branchable.com/ Homepage: http://etckeeper.branchable.com/ Package: etckeeper Architecture: all Section: admin Depends: git (>= 1:1.7) | mercurial | bzr (>= 1.5~) | darcs, ${misc:Depends} Recommends: cron-daemon Suggests: sudo (>= 1.7.4p4) Conflicts: bzr (<< 1.5~) Description: store /etc in git, mercurial, bzr or darcs The etckeeper program is a tool to let /etc be stored in a git, mercurial, bzr or darcs repository. It hooks into APT to automatically commit changes made to /etc during package upgrades. It tracks file metadata that version control systems do not normally support, but that is important for /etc, such as the permissions of /etc/shadow. It's quite modular and configurable, while also being simple to use if you understand the basics of working with version control. etckeeper-1.18.5/debian/copyright000066400000000000000000000033711274300712300167350ustar00rootroot00000000000000Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Files: * Copyright: © 2007-2014 Joey Hess and contributors License: GPL-2+ The full text of the GPL is distributed as doc/GPL in etckeeper's source, and is distributed in /usr/share/common-licenses/GPL-2 on Debian systems. Files: pkgng/* Copyright: 2015 William Johansson 2012 Marin Atanasov Nikolov License: BSD-2-clause * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer * in this position and unchanged. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. etckeeper-1.18.5/debian/cron.daily000066400000000000000000000003151274300712300167620ustar00rootroot00000000000000#!/bin/sh set -e if [ -e /etc/etckeeper/daily ] && [ -e /etc/etckeeper/etckeeper.conf ]; then . /etc/etckeeper/etckeeper.conf if [ "$AVOID_DAILY_AUTOCOMMITS" != "1" ]; then /etc/etckeeper/daily fi fi etckeeper-1.18.5/debian/docs000066400000000000000000000000131274300712300156430ustar00rootroot00000000000000doc/*.mdwn etckeeper-1.18.5/debian/maintscript000066400000000000000000000001011274300712300172460ustar00rootroot00000000000000rm_conffile /etc/bash_completion.d/etckeeper 1.18.3-1~ etckeeper etckeeper-1.18.5/debian/po/000077500000000000000000000000001274300712300154145ustar00rootroot00000000000000etckeeper-1.18.5/debian/po/POTFILES.in000066400000000000000000000000441274300712300171670ustar00rootroot00000000000000[type: gettext/rfc822deb] templates etckeeper-1.18.5/debian/po/cs.po000066400000000000000000000044711274300712300163670ustar00rootroot00000000000000# Czech translation of etckeeper debconf messages. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the etckeeper package. # Miroslav Kure , 2007,2009 # msgid "" msgstr "" "Project-Id-Version: etckeeper\n" "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" "POT-Creation-Date: 2016-07-17 19:01-0400\n" "PO-Revision-Date: 2009-09-13 09:09+0200\n" "Last-Translator: Miroslav Kure \n" "Language-Team: Czech \n" "Language: cs\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Type: boolean #. Description #: ../templates:2001 msgid "Remove etckeeper ${VCS} repository and associated files?" msgstr "Odstranit ${VCS} repositář etckeeperu a přidružené soubory?" #. Type: boolean #. Description #: ../templates:2001 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." msgstr "" "Etckeeper se na tomto systému používal pro uchování /etc v ${VCS} " "repositáři, avšak nyní je ze systému odstraňován. Pokud povolíte odstranění " "repositáře, ZNIČÍTE tím veškerou historii, kterou etckeeper uchovával." #~ msgid "Commit failed" #~ msgstr "Zápis selhal" #~ msgid "An attempt to commit /etc changes to ${VCS} failed." #~ msgstr "Pokus o zapsání změn v /etc do ${VCS} selhal." #~ msgid "" #~ "You may manually resolve the issues with the uncommitted changes before " #~ "continuing." #~ msgstr "" #~ "Před pokračováním byste měli ručně vyřešit problémy s nezapsanými změnami." #~ msgid "Commit changed files in /etc to ${VCS}?" #~ msgstr "Zapsat změněné soubory v /etc do ${VCS}?" #~ msgid "" #~ "The /etc directory contains uncommitted files or other changes. It's best " #~ "for all files in /etc to be committed to ${VCS} before running APT. Added " #~ "and changed files listed below can be committed automatically:" #~ msgstr "" #~ "Adresář /etc obsahuje nezapsané soubory nebo jiné změny. Před spuštěním " #~ "APT je lepší mít všechny soubory v /etc uloženy do ${VCS}. Přidané a " #~ "změněné soubory vypsané níže budou uloženy automaticky:" etckeeper-1.18.5/debian/po/da.po000066400000000000000000000033701274300712300163430ustar00rootroot00000000000000# Danish translation etckeeper. # Copyright (C) 2010 etckeeper & nedenst??ende overs??ttere. # This file is distributed under the same license as the etckeeper package. # Joe Hansen , 2010. # msgid "" msgstr "" "Project-Id-Version: etckeeper\n" "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" "POT-Creation-Date: 2016-07-17 19:01-0400\n" "PO-Revision-Date: 2010-09-22 17:30+01:00\n" "Last-Translator: Joe Hansen \n" "Language-Team: Danish \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Type: boolean #. Description #: ../templates:2001 msgid "Remove etckeeper ${VCS} repository and associated files?" msgstr "Fjern etckeeper ${VCS}-arkiv og associerede filer?" #. Type: boolean #. Description #: ../templates:2001 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." msgstr "" "Etckeeper afinstalleres fra systemet, og blev brugt til at gemme /etc i et " "${VCS}-arkiv. Hvis du v??lger at fjerne arkivet, vil dette ??DEL??GGE al " "historik som etckeeper har optaget for /etc." #~ msgid "Commit failed" #~ msgstr "Indsendelse (commit) mislykkedes" #~ msgid "An attempt to commit /etc changes to ${VCS} failed." #~ msgstr "" #~ "Et fors??g p?? at indsende (commit) /etc-??ndringer til ${VCS} " #~ "mislykkedes." #~ msgid "" #~ "You may manually resolve the issues with the uncommitted changes before " #~ "continuing." #~ msgstr "" #~ "Du skal manuelt l??se problemstillingerne med de ikke indsendte " #~ "(uncommitted) ??ndringer, f??r du forts??tter." etckeeper-1.18.5/debian/po/de.po000066400000000000000000000047541274300712300163560ustar00rootroot00000000000000# Translation of etckeeper debconf templates to German # Copyright (C) Helge Kreutzmann , 2008, 2009. # This file is distributed under the same license as the etckeeper package. # msgid "" msgstr "" "Project-Id-Version: etckeeper 0.10\n" "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" "POT-Creation-Date: 2016-07-17 19:01-0400\n" "PO-Revision-Date: 2009-06-08 19:05+0200\n" "Last-Translator: Helge Kreutzmann \n" "Language-Team: de \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-15\n" "Content-Transfer-Encoding: 8bit\n" #. Type: boolean #. Description #: ../templates:2001 msgid "Remove etckeeper ${VCS} repository and associated files?" msgstr "Das ${VCS}-Depot von Etckeeper und die zugehrigen Dateien entfernen?" #. Type: boolean #. Description #: ../templates:2001 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." msgstr "" "Etckeeper wurde zum Speichern von /etc in einem ${VCS}-Depot verwandt und " "wird jetzt vollstndig vom System gelscht. Falls Sie entscheiden, das Depot " "zu entfernen, wird dies den Verlauf, den Etckeeper fr /etc aufgezeichnet " "hat, ZERSTREN." #~ msgid "Commit failed" #~ msgstr "bergabe (commit) fehlgeschlagen" #~ msgid "An attempt to commit /etc changes to ${VCS} failed." #~ msgstr "" #~ "Ein Versuch, die nderungen an /etc an ${VCS} zu bergeben, schlug fehl." #~ msgid "" #~ "You may manually resolve the issues with the uncommitted changes before " #~ "continuing." #~ msgstr "" #~ "Sie knnen das Problem mit den nicht-bergebenen nderungen manuell " #~ "beheben, bevor Sie fortfahren." #~ msgid "Commit changed files in /etc to ${VCS}?" #~ msgstr "Genderte Dateien in /etc an ${VCS} bergeben?" #~ msgid "" #~ "The /etc directory contains uncommitted files or other changes. It's best " #~ "for all files in /etc to be committed to ${VCS} before running APT. Added " #~ "and changed files listed below can be committed automatically:" #~ msgstr "" #~ "Das Verzeichnis /etc enthlt Dateien, die noch nicht an Git bergeben " #~ "wurden (uncommitted sind) oder andere nderungen. Am besten werden alle " #~ "Dateien in /etc an ${VCS} bergeben, bevor APT ausgefhrt wird. Die im " #~ "folgenden aufgefhrten hinzugefgten und genderten Dateien knnen " #~ "automatisch bergeben werden:" etckeeper-1.18.5/debian/po/es.po000066400000000000000000000055401274300712300163670ustar00rootroot00000000000000# etckeeper po-debconf translation to Spanish. # Copyright (C) 2009 Software in the Public Interest. # This file is distributed under the same license as the etckeeper package. # # Changes: # - Initial translation # Fernando González de Requena , 2009. # # # Traductores, si no conoce el formato PO, merece la pena leer la # documentación de gettext, especialmente las secciones dedicadas a este # formato, por ejemplo ejecutando: # info -n '(gettext)PO Files' # info -n '(gettext)Header Entry' # # Equipo de traducción al español, por favor lean antes de traducir # los siguientes documentos: # # - El proyecto de traducción de Debian al español # http://www.debian.org/intl/spanish/ # especialmente las notas y normas de traducción en # http://www.debian.org/intl/spanish/notas # # - La guía de traducción de po's de debconf: # /usr/share/doc/po-debconf/README-trans # o http://www.debian.org/intl/l10n/po-debconf/README-trans # # Si tiene dudas o consultas sobre esta traducción consulte con el último # traductor (campo Last-Translator) y ponga en copia a la lista de # traducción de Debian al español () # msgid "" msgstr "" "Project-Id-Version: etckeeper 0.38\n" "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" "POT-Creation-Date: 2016-07-17 19:01-0400\n" "PO-Revision-Date: 2009-07-11 16:07+0200\n" "Last-Translator: Fernando González de Requena \n" "Language-Team: Spanish \n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.11.4\n" #. Type: boolean #. Description #: ../templates:2001 msgid "Remove etckeeper ${VCS} repository and associated files?" msgstr "" "¿Desea eliminar el repositorio ${VCS} de etckeeper y los ficheros asociados?" #. Type: boolean #. Description #: ../templates:2001 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." msgstr "" "Se está eliminando completamente etckeeper de su sistema. Etckeeper se ha " "utilizado para almacenar el directorio «/etc» en un repositorio ${VCS}. Si " "elige eliminar el repositorio, se DESTRUIRÁ todo el historial que etckeeper " "ha guardado para «/etc»." #~ msgid "Commit failed" #~ msgstr "El envío de los cambios ha fallado" #~ msgid "An attempt to commit /etc changes to ${VCS} failed." #~ msgstr "Ha fallado un intento de enviar los cambios en «/etc» a ${VCS}." #~ msgid "" #~ "You may manually resolve the issues with the uncommitted changes before " #~ "continuing." #~ msgstr "" #~ "Puede resolver manualmente los problemas con los cambios que no se han " #~ "enviado antes de continuar." etckeeper-1.18.5/debian/po/eu.po000066400000000000000000000043111274300712300163640ustar00rootroot00000000000000# translation of etckeeper-eu.po to Euskara # Aitor Ibañez ,2007. # Aitor Ibañez , 2007. # Piarres Beobide , 2007. # translation of etckeeper-eu to Euskara # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. msgid "" msgstr "" "Project-Id-Version: etckeeper-eu\n" "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" "POT-Creation-Date: 2016-07-17 19:01-0400\n" "PO-Revision-Date: 2007-12-17 12:47+0100\n" "Last-Translator: Aitor Ibañez \n" "Language-Team: Euskara \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.11.4\n" #. Type: boolean #. Description #: ../templates:2001 msgid "Remove etckeeper ${VCS} repository and associated files?" msgstr "" #. Type: boolean #. Description #: ../templates:2001 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." msgstr "" #~ msgid "Commit failed" #~ msgstr "Onarpenak failatu du" #~ msgid "An attempt to commit /etc changes to ${VCS} failed." #~ msgstr "/etc-ko aldaketak ${VCS}-en onartzearen saiakerak huts egin du." #~ msgid "" #~ "You may manually resolve the issues with the uncommitted changes before " #~ "continuing." #~ msgstr "" #~ "Aurrera jarraitu baino lehen, eskuz erresolbitu beharko ditu onartu " #~ "gabeko aldaketak." #~ msgid "Commit changed files in /etc to ${VCS}?" #~ msgstr "Aldaturiko fitxategiak ${VCS}-en onartu?" #~ msgid "" #~ "The /etc directory contains uncommitted files or other changes. It's best " #~ "for all files in /etc to be committed to ${VCS} before running APT. Added " #~ "and changed files listed below can be committed automatically:" #~ msgstr "" #~ "/etc direktorioak onartu gabeko fitxategiak edo beste aldaketa batzuk " #~ "ditu. /etc-n dauden fitxategi guztientzat hobe da ${VCS}-en onarpena " #~ "egitea APT exekutatu baino lehen.Azpian dauden erantsi eta aldatutako " #~ "fitxategiak automatikoki onartu daitezke:" etckeeper-1.18.5/debian/po/fi.po000066400000000000000000000036531274300712300163610ustar00rootroot00000000000000msgid "" msgstr "" "Project-Id-Version: etckeeper 0.3\n" "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" "POT-Creation-Date: 2016-07-17 19:01-0400\n" "PO-Revision-Date: 2007-12-12 19:54+0200\n" "Last-Translator: Esko Arajärvi \n" "Language-Team: Finnish \n" "Language: fi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-Language: Finnish\n" "X-Poedit-Country: Finland\n" #. Type: boolean #. Description #: ../templates:2001 msgid "Remove etckeeper ${VCS} repository and associated files?" msgstr "" #. Type: boolean #. Description #: ../templates:2001 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." msgstr "" #~ msgid "Commit failed" #~ msgstr "Tallettaminen epäonnistui" #~ msgid "An attempt to commit /etc changes to ${VCS} failed." #~ msgstr "Yritys tallettaa /etc:n muutokset ${VCS}-varastoon epäonnistui." #~ msgid "" #~ "You may manually resolve the issues with the uncommitted changes before " #~ "continuing." #~ msgstr "" #~ "Voit selvittää tallettamattomien muutosten ongelmat käsin ennen " #~ "jatkamista." #~ msgid "Commit changed files in /etc to ${VCS}?" #~ msgstr "Talletetaanko hakemiston /etc muutetut tiedostot ${VCS}in?" #~ msgid "" #~ "The /etc directory contains uncommitted files or other changes. It's best " #~ "for all files in /etc to be committed to ${VCS} before running APT. Added " #~ "and changed files listed below can be committed automatically:" #~ msgstr "" #~ "Hakemisto /etc sisältää tallettamattomia tiedostoja tai muita muutoksia. " #~ "On parasta tallettaa kaikki /etc:n tiedostot ${VCS}-varastoon ennen APTin " #~ "ajamista. Alla luetellut lisätyt tai muutetut tiedostot voidaan tallettaa " #~ "automaattisesti." etckeeper-1.18.5/debian/po/fr.po000066400000000000000000000040571274300712300163710ustar00rootroot00000000000000# Translation of etckeeper debconf template to French # Copyright (C) 2009 Debian French l10n team # This file is distributed under the same license as the etckeeper package. # # Translators: # Jean-Baka Domelevo Entfellner , 2007. # Bruno Travouillon , 2009. msgid "" msgstr "" "Project-Id-Version: etckeeper\n" "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" "POT-Creation-Date: 2016-07-17 19:01-0400\n" "PO-Revision-Date: 2009-05-17 11:42+0200\n" "Last-Translator: Bruno Travouillon \n" "Language-Team: French \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-Language: French\n" "X-Poedit-Country: FRANCE\n" "X-Generator: KBabel 1.11.4\n" #. Type: boolean #. Description #: ../templates:2001 msgid "Remove etckeeper ${VCS} repository and associated files?" msgstr "" "Faut-il supprimer le référentiel ${VCS} d'etckeeper et les fichiers " "associés ?" #. Type: boolean #. Description #: ../templates:2001 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." msgstr "" "Etckeeper est purgé du système, et était utilisé pour stocker /etc dans un " "référentiel ${VCS}. Si vous choisissez de supprimer ce référentiel, cela va " "DÉTRUIRE tout l'historique qu'etckeeper a enregistré pour /etc." #~ msgid "Commit failed" #~ msgstr "Échec de la synchronisation" #~ msgid "An attempt to commit /etc changes to ${VCS} failed." #~ msgstr "" #~ "La tentative d'enregistrement (« commit ») des modifications de /etc vers " #~ "${VCS} a échoué." #~ msgid "" #~ "You may manually resolve the issues with the uncommitted changes before " #~ "continuing." #~ msgstr "" #~ "Avant de poursuivre, vous devriez résoudre vous-même les problèmes liés " #~ "aux changements non sauvegardés." etckeeper-1.18.5/debian/po/gl.po000066400000000000000000000037371274300712300163700ustar00rootroot00000000000000# Galician translation of etckeeper's debconf templates # This file is distributed under the same license as the etckeeper package. # Jacobo Tarrio , 2007. # msgid "" msgstr "" "Project-Id-Version: etckeeper\n" "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" "POT-Creation-Date: 2016-07-17 19:01-0400\n" "PO-Revision-Date: 2007-12-11 20:52+0000\n" "Last-Translator: Jacobo Tarrio \n" "Language-Team: Galician \n" "Language: gl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Type: boolean #. Description #: ../templates:2001 msgid "Remove etckeeper ${VCS} repository and associated files?" msgstr "" #. Type: boolean #. Description #: ../templates:2001 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." msgstr "" #~ msgid "Commit failed" #~ msgstr "O gardado fallou" #~ msgid "An attempt to commit /etc changes to ${VCS} failed." #~ msgstr "Fallou unha tentativa de gardar en ${VCS} os cambios de /etc." #~ msgid "" #~ "You may manually resolve the issues with the uncommitted changes before " #~ "continuing." #~ msgstr "configurar apt para que instale paquetes adicionais do CD.<" #~ msgid "Commit changed files in /etc to ${VCS}?" #~ msgstr "¿Gardar en ${VCS} os ficheiros modificados de /etc?" #~ msgid "" #~ "The /etc directory contains uncommitted files or other changes. It's best " #~ "for all files in /etc to be committed to ${VCS} before running APT. Added " #~ "and changed files listed below can be committed automatically:" #~ msgstr "" #~ "O directorio /etc contén ficheiros ou outros cambios sen gardar. É mellor " #~ "que se garden en ${VCS} tódolos ficheiros de /etc antes de executar APT. " #~ "Os ficheiros engadidos e modificados da lista de embaixo pódense gardar " #~ "automaticamente:" etckeeper-1.18.5/debian/po/it.po000066400000000000000000000035531274300712300163760ustar00rootroot00000000000000# Italian (it) translation of debconf templates for etckeeper # Copyright (C) 2007 Software in the Public Interest # This file is distributed under the same license as the etckeeper package. # Luca Monducci , 2007-2009. # msgid "" msgstr "" "Project-Id-Version: etckeeper 0.36 debconf templates\n" "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" "POT-Creation-Date: 2016-07-17 19:01-0400\n" "PO-Revision-Date: 2009-08-08 15:32+0200\n" "Last-Translator: Luca Monducci \n" "Language-Team: Italian \n" "Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Type: boolean #. Description #: ../templates:2001 msgid "Remove etckeeper ${VCS} repository and associated files?" msgstr "Eliminare il repository ${VCS} di etckeeper e i file associati?" #. Type: boolean #. Description #: ../templates:2001 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." msgstr "" "Etckeeper sta per essere completamente rimosso dal sistema, è stato usato " "per memorizzare il contenuto di /etc in un repository ${VCS}. Nel caso si " "scelga di eliminare il repository, si DISTRUGGE tutta la storia di /etc " "registrata da etckeeper." #~ msgid "Commit failed" #~ msgstr "Commit fallito" #~ msgid "An attempt to commit /etc changes to ${VCS} failed." #~ msgstr "Il tentativo di commit delle modifiche in /etc a ${VCS} è fallito." #~ msgid "" #~ "You may manually resolve the issues with the uncommitted changes before " #~ "continuing." #~ msgstr "" #~ "Potrebbe essere necessario risolvere manualmente i problemi con le " #~ "modifiche delle quali non è stato fatto il commit prima di continuare." etckeeper-1.18.5/debian/po/ja.po000066400000000000000000000036111274300712300163470ustar00rootroot00000000000000# Copyright (C) 2008-2009 Joey Hess # This file is distributed under the same license as etckeeper package. # Hideki Yamane (Debian-JP) , 2008-2009. # msgid "" msgstr "" "Project-Id-Version: etckeeper 0.35\n" "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" "POT-Creation-Date: 2016-07-17 19:01-0400\n" "PO-Revision-Date: 2009-05-09 19:26+0900\n" "Last-Translator: Hideki Yamane (Debian-JP) \n" "Language-Team: Japanese \n" "Language: ja\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Type: boolean #. Description #: ../templates:2001 msgid "Remove etckeeper ${VCS} repository and associated files?" msgstr "etckeeper の$ {VCS} リポジトリおよび関連ファイルを削除しますか?" #. Type: boolean #. Description #: ../templates:2001 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." msgstr "" "Etckeeper はシステムから完全に削除されようとしており、/etc の保存には ${VCS} " "リポジトリを利用していました。リポジトリを削除すると、/etc について " "etckeeper が記録してた全ての履歴は「破壊」されます。" #~ msgid "Commit failed" #~ msgstr "コミットに失敗しました" #~ msgid "An attempt to commit /etc changes to ${VCS} failed." #~ msgstr "/etc の変更を ${VCS} にコミットしようとしましたが失敗しました。" #~ msgid "" #~ "You may manually resolve the issues with the uncommitted changes before " #~ "continuing." #~ msgstr "" #~ "続ける前に、この問題とコミットされていない変更について、手動で解決する必要" #~ "があるでしょう。" etckeeper-1.18.5/debian/po/nl.po000066400000000000000000000036021274300712300163660ustar00rootroot00000000000000# Dutch translation of etckeeper debconf templates. # Copyright (C) 2008-2012 THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the etckeeper package. # Bart Cornelis , 2008. # Jeroen Schot , 2012. # msgid "" msgstr "" "Project-Id-Version: etckeeper 0.59\n" "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" "POT-Creation-Date: 2016-07-17 19:01-0400\n" "PO-Revision-Date: 2012-01-02 15:54+0100\n" "Last-Translator: Jeroen Schot \n" "Language-Team: Debian l10n Dutch \n" "Language: nl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Type: boolean #. Description #: ../templates:2001 msgid "Remove etckeeper ${VCS} repository and associated files?" msgstr "" "De ${VCS}-opslagruimte van etckeeper en gerelateerde bestanden verwijderen?" #. Type: boolean #. Description #: ../templates:2001 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." msgstr "" "Etckeeper wordt gewist van het systeem (purge), en werd gebruikt om /etc in " "een ${VCS}-opslagruimte te bewaren. Als u ervoor kiest om de opslagruimte te " "verwijderen zal alle geschiedenis van /etc die etckeeper heeft bijgehouden " "worden VERNIETIGD." #~ msgid "Commit failed" #~ msgstr "Vastleggen mislukt" #~ msgid "An attempt to commit /etc changes to ${VCS} failed." #~ msgstr "" #~ "De poging om de aanpassingen in /etc vast te leggen in ${VCS} is mislukt." #~ msgid "" #~ "You may manually resolve the issues with the uncommitted changes before " #~ "continuing." #~ msgstr "" #~ "U kunt de problemen met de niet-vastgelegde aanpassingen handmatig " #~ "oplossen alvorens verder te gaan." etckeeper-1.18.5/debian/po/pl.po000066400000000000000000000032701274300712300163710ustar00rootroot00000000000000# Polish translation # Copyright (C) 2010 # This file is distributed under the same license as the etckeeper package. # Artur R. Czechowski , 2010 # msgid "" msgstr "" "Project-Id-Version: etckeeper 0.50\n" "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" "POT-Creation-Date: 2016-07-17 19:01-0400\n" "PO-Revision-Date: 2010-12-19 20:07+0100\n" "Last-Translator: Artur R. Czechowski \n" "Language-Team: Polish \n" "Language: pl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" #. Type: boolean #. Description #: ../templates:2001 msgid "Remove etckeeper ${VCS} repository and associated files?" msgstr "Usunąć repozytorium etckeeper ${VCS} i powiązane pliki?" #. Type: boolean #. Description #: ../templates:2001 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." 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." #~ msgid "Commit failed" #~ msgstr "Błąd zapisu." #~ msgid "An attempt to commit /etc changes to ${VCS} failed." #~ msgstr "Nieudana próba zapisania zmian przy użyciu ${VCS}" #~ msgid "" #~ "You may manually resolve the issues with the uncommitted changes before " #~ "continuing." #~ msgstr "" #~ "Przed kontynuacją możesz ręcznie rozwiązać problemy z niezapisanymi " #~ "zmianami." etckeeper-1.18.5/debian/po/pt.po000066400000000000000000000034471274300712300164070ustar00rootroot00000000000000# translation of etckeeper debconf to Portuguese # Copyright (C) 2007 the etckeeper's copyright holder # This file is distributed under the same license as the etckeeper package. # # Américo Monteiro , 2007, 2009. msgid "" msgstr "" "Project-Id-Version: etckeeper 0.35\n" "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" "POT-Creation-Date: 2016-07-17 19:01-0400\n" "PO-Revision-Date: 2009-05-10 22:10+0100\n" "Last-Translator: Américo Monteiro \n" "Language-Team: Portuguese \n" "Language: pt\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.11.4\n" #. Type: boolean #. Description #: ../templates:2001 msgid "Remove etckeeper ${VCS} repository and associated files?" msgstr "Remover o repositório ${VCS} do etckeeper e os ficheiros associados?" #. Type: boolean #. Description #: ../templates:2001 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." msgstr "" "O etckeeper está a ser purgado do sistema, e foi usado para guardar o /etc " "num repositório ${VCS}. Se escolher remover o repositório, isto irá DESTRUIR " "todo o histórico que o etckeeper guardou de /etc." #~ msgid "Commit failed" #~ msgstr "Submissão falhou" #~ msgid "An attempt to commit /etc changes to ${VCS} failed." #~ msgstr "A tentativa de submeter as alterações de /etc ao ${VCS} falhou." #~ msgid "" #~ "You may manually resolve the issues with the uncommitted changes before " #~ "continuing." #~ msgstr "" #~ "Você pode resolver manualmente as situações com as alterações não " #~ "submetidas antes de continuar. " etckeeper-1.18.5/debian/po/pt_BR.po000066400000000000000000000035031274300712300167630ustar00rootroot00000000000000# Debconf translations for etckeeper. # Copyright (C) 2012 THE etckeeper'S COPYRIGHT HOLDER # This file is distributed under the same license as the etckeeper package. # Adriano Rafael Gomes , 2012. # msgid "" msgstr "" "Project-Id-Version: etckeeper 0.63\n" "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" "POT-Creation-Date: 2016-07-17 19:01-0400\n" "PO-Revision-Date: 2012-08-21 11:15-0300\n" "Last-Translator: Adriano Rafael Gomes \n" "Language-Team: Brazilian Portuguese \n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Type: boolean #. Description #: ../templates:2001 msgid "Remove etckeeper ${VCS} repository and associated files?" msgstr "Remover o repositório ${VCS} do etckeeper e os arquivos associados?" #. Type: boolean #. Description #: ../templates:2001 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." msgstr "" "O etckeeper está sendo expurgado do sistema, e foi usado para armazenar o " "diretório /etc em um repositório ${VCS}. Se você escolher remover o " "repositório, isso DESTRUIRÁ todo o histórico que o etckeeper gravou para o " "diretório /etc." #~ msgid "Commit failed" #~ msgstr "Envio falhou" #~ msgid "An attempt to commit /etc changes to ${VCS} failed." #~ msgstr "" #~ "Uma tentativa de enviar alterações feitas em /etc para ${VCS} falhou." #~ msgid "" #~ "You may manually resolve the issues with the uncommitted changes before " #~ "continuing." #~ msgstr "" #~ "Você pode resolver manualmente os problemas com as alterações não " #~ "enviadas antes de continuar." etckeeper-1.18.5/debian/po/ru.po000066400000000000000000000043651274300712300164120ustar00rootroot00000000000000# translation of ru.po to Russian # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Yuri Kozlov , 2007. # Yuri Kozlov , 2009. msgid "" msgstr "" "Project-Id-Version: etckeeper 0.35\n" "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" "POT-Creation-Date: 2016-07-17 19:01-0400\n" "PO-Revision-Date: 2009-05-15 21:25+0400\n" "Last-Translator: Yuri Kozlov \n" "Language-Team: Russian \n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.11.4\n" "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" #. Type: boolean #. Description #: ../templates:2001 msgid "Remove etckeeper ${VCS} repository and associated files?" msgstr "Удалить репозиторий etckeeper ${VCS} и связанные с ним файлы?" #. Type: boolean #. Description #: ../templates:2001 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." msgstr "" "Etckeeper вычищается из системы, но использовался для хранения каталога /etc " "в репозитории ${VCS}. Если вы выберете удаление репозитория, то это " "УНИЧТОЖИТ всю историю, которую etckeeper вёл для /etc." #~ msgid "Commit failed" #~ msgstr "Фиксация завершилась неудачно" #~ msgid "An attempt to commit /etc changes to ${VCS} failed." #~ msgstr "Попытка зафиксировать изменения /etc в ${VCS} завершилась неудачно." #~ msgid "" #~ "You may manually resolve the issues with the uncommitted changes before " #~ "continuing." #~ msgstr "" #~ "Перед тем как продолжить вы можете вручную исправить положение с " #~ "незафиксированными изменениями." etckeeper-1.18.5/debian/po/sv.po000066400000000000000000000035051274300712300164070ustar00rootroot00000000000000# translation of etckeeper_0.20_sv.po to Swedish # etckeeper. # Copyright (C) 2008 # This file is distributed under the same license as the etckeeper package. # # Martin Ågren , 2008. msgid "" msgstr "" "Project-Id-Version: etckeeper_0.20_sv\n" "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" "POT-Creation-Date: 2016-07-17 19:01-0400\n" "PO-Revision-Date: 2009-05-12 20:08+0100\n" "Last-Translator: Martin Bagge \n" "Language-Team: Swedish \n" "Language: sv\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.11.4\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. Type: boolean #. Description #: ../templates:2001 msgid "Remove etckeeper ${VCS} repository and associated files?" msgstr "Ska ${VCS}-förrådet för etckeeper och alla tillhörande filer tas bort?" #. Type: boolean #. Description #: ../templates:2001 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." msgstr "" "Etckeeper håller på att tas bort från systemet, användningsområdet för " "etckeeper är att spara /etc i ett ${VCS}-förråd. Om du väljer att ta bort " "förrådet kommer all historik för /etc att raderas." #~ msgid "Commit failed" #~ msgstr "Verkställning misslyckades" #~ msgid "An attempt to commit /etc changes to ${VCS} failed." #~ msgstr "Ett försök att verkställa ändringar i /etc i ${VCS} misslyckades." #~ msgid "" #~ "You may manually resolve the issues with the uncommitted changes before " #~ "continuing." #~ msgstr "" #~ "Du kan lösa problemen med de overkställda ändringarna manuellt innan du " #~ "fortsätter." etckeeper-1.18.5/debian/po/templates.pot000066400000000000000000000017661274300712300201500ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the etckeeper package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: etckeeper\n" "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" "POT-Creation-Date: 2016-07-17 19:01-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #. Type: boolean #. Description #: ../templates:2001 msgid "Remove etckeeper ${VCS} repository and associated files?" msgstr "" #. Type: boolean #. Description #: ../templates:2001 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." msgstr "" etckeeper-1.18.5/debian/po/vi.po000066400000000000000000000036111274300712300163730ustar00rootroot00000000000000# Vietnamese translation for ETC Keeper. # Copyright © 2010 Free Software Foundation, Inc. # Clytie Siddall , 2007-2010. # msgid "" msgstr "" "Project-Id-Version: etckeeper 0.50\n" "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" "POT-Creation-Date: 2016-07-17 19:01-0400\n" "PO-Revision-Date: 2010-10-31 13:59+1030\n" "Last-Translator: Clytie Siddall \n" "Language-Team: Vietnamese \n" "Language: vi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" "X-Generator: LocFactoryEditor 1.8\n" #. Type: boolean #. Description #: ../templates:2001 msgid "Remove etckeeper ${VCS} repository and associated files?" msgstr "Gỡ bỏ kho lưu ${VCS} etckeeper và các tập tin tương ứng ?" #. Type: boolean #. Description #: ../templates:2001 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." 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 »." #~ msgid "Commit failed" #~ msgstr "Lỗi ghi chép" #~| msgid "An attempt to commit /etc changes to git failed." #~ msgid "An attempt to commit /etc changes to ${VCS} failed." #~ msgstr "Gặp lỗi khi thử ghi chép vào ${VCS} các thay đổi trong « /etc »." #~ msgid "" #~ "You may manually resolve the issues with the uncommitted changes before " #~ "continuing." #~ msgstr "" #~ "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." etckeeper-1.18.5/debian/postinst000066400000000000000000000063511274300712300166110ustar00rootroot00000000000000#!/bin/sh set -e # source confmodule to ensure templates are loaded . /usr/share/debconf/confmodule #DEBHELPER# # Move a conffile without triggering a dpkg question mv_conffile() { OLDCONFFILE="$1" NEWCONFFILE="$2" if [ -e "$OLDCONFFILE" ]; then echo "Preserving user changes to $NEWCONFFILE ..." mv -f "$NEWCONFFILE" "$NEWCONFFILE".dpkg-new mv -f "$OLDCONFFILE" "$NEWCONFFILE" fi } case "$1" in configure) if dpkg --compare-versions "$2" le "0.7"; then if [ -d /etc/etckeeper/pre-apt.d ]; then mv_conffile "/etc/etckeeper/pre-apt.d/README" \ "/etc/etckeeper/pre-install.d/README" mv_conffile "/etc/etckeeper/pre-apt.d/50uncommitted-changes" \ "/etc/etckeeper/pre-install.d/50uncommitted-changes" rmdir --ignore-fail-on-non-empty /etc/etckeeper/pre-apt.d fi if [ -d /etc/etckeeper/post-apt.d ]; then mv_conffile "/etc/etckeeper/post-apt.d/README" \ "/etc/etckeeper/post-install.d/README" mv_conffile "/etc/etckeeper/post-apt.d/10git-test" \ "/etc/etckeeper/post-install.d/10vcs-test" mv_conffile "/etc/etckeeper/post-apt.d/30git-add" \ "/etc/etckeeper/post-install.d/30git-add" mv_conffile "/etc/etckeeper/post-apt.d/40git-rm" \ "/etc/etckeeper/post-install.d/40git-rm" mv_conffile "/etc/etckeeper/post-apt.d/50git-commit" \ "/etc/etckeeper/post-install.d/50vcs-commit" rmdir --ignore-fail-on-non-empty /etc/etckeeper/post-apt.d fi mv_conffile "/etc/etckeeper/init.d/40git-init" \ "/etc/etckeeper/init.d/40vcs-init" mv_conffile "/etc/etckeeper/init.d/50git-ignore" \ "/etc/etckeeper/init.d/50vcs-ignore" mv_conffile "/etc/etckeeper/init.d/50git-perm" \ "/etc/etckeeper/init.d/50vcs-perm" mv_conffile "/etc/etckeeper/init.d/50git-pre-commit-hook" \ "/etc/etckeeper/init.d/50vcs-pre-commit-hook" mv_conffile "/etc/etckeeper/init.d/70git-add" \ "/etc/etckeeper/init.d/70git-add" fi if dpkg --compare-versions "$2" le "0.10"; then for c in 10vcs-test 30git-add 30hg-addremove 40git-rm; do mv_conffile "/etc/etckeeper/post-install.d/$c" \ "/etc/etckeeper/commit.d/$c" done fi if dpkg --compare-versions "$2" le "0.13"; then mv_conffile "/etc/etckeeper/init.d/10restore-etckeeper" \ "/etc/etckeeper/init.d/20restore-etckeeper" mv_conffile "/etc/etckeeper/init.d/20restore-metadata" \ "/etc/etckeeper/init.d/10restore-metadata" fi if dpkg --compare-versions "$2" le "0.28"; then for c in commit.d/30darcs-add init.d/60darcs-deleted-symlinks; do if [ -e /etc/etckeeper/$c ]; then chmod +x /etc/etckeeper/$c fi done fi if dpkg --compare-versions "$2" le "0.61"; then # may be left over from a botched conffile removal rm -f /etc/etckeeper/commit.d/40git-rm.dpkg-dist fi if [ "$2" = "" ] && [ -e "/etc/etckeeper/etckeeper.conf" ]; then # Fresh install. . /etc/etckeeper/etckeeper.conf || true if [ -n "$VCS" ] && [ -x "`which $VCS 2>/dev/null`" ]; then if etckeeper init; then if ! etckeeper commit "Initial commit"; then echo "etckeeper commit failed; run it by hand" >&2 fi else echo "etckeeper init failed; run it by hand" >&2 fi else echo "etckeeper init not ran as $VCS is not installed" >&2 fi fi # prints error and exits nonzero if the ignore file cannot be updated etckeeper update-ignore || true esac etckeeper-1.18.5/debian/postrm000066400000000000000000000015451274300712300162520ustar00rootroot00000000000000#!/bin/sh set -e if [ "$1" = purge ]; then if [ -e /etc/.etckeeper ]; then . /usr/share/debconf/confmodule # uninit on purge is tricky because etckeeper's configuration # and code has been removed at this point. This relies on a # stashed away copy. if [ -e /var/cache/etckeeper/stash/etckeeper.conf ] && [ -d /var/cache/etckeeper/stash/uninit.d ] && [ -x /var/cache/etckeeper/stash/etckeeper ]; then . /var/cache/etckeeper/stash/etckeeper.conf if [ -n "$VCS" ]; then db_subst etckeeper/purge VCS "$VCS" db_input critical etckeeper/purge || true db_go || true db_get etckeeper/purge if [ "$RET" = true ]; then ETCKEEPER_CONF_DIR=/var/cache/etckeeper/stash export ETCKEEPER_CONF_DIR /var/cache/etckeeper/stash/etckeeper uninit -f || true fi fi fi fi rm -rf /var/cache/etckeeper fi #DEBHELPER# etckeeper-1.18.5/debian/preinst000066400000000000000000000047061274300712300164140ustar00rootroot00000000000000#!/bin/sh set -e #DEBHELPER# # Prepare to move a conffile without triggering a dpkg question prep_mv_conffile() { PKGNAME="$1" CONFFILE="$2" if [ -e "$CONFFILE" ]; then md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`" old_md5sum="`dpkg-query -W -f='${Conffiles}' $PKGNAME | sed -n -e \"\\\\' $CONFFILE'{s/ obsolete$//;s/.* //p}\"`" if [ "$md5sum" = "$old_md5sum" ]; then rm -f "$CONFFILE" fi fi } # Remove a no-longer used conffile rm_conffile() { PKGNAME="$1" CONFFILE="$2" if [ -e "$CONFFILE" ]; then md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`" old_md5sum="`dpkg-query -W -f='${Conffiles}' $PKGNAME | sed -n -e \"\\\\' $CONFFILE'{s/ obsolete$//;s/.* //p}\"`" if [ "$md5sum" != "$old_md5sum" ]; then echo "Obsolete conffile $CONFFILE has been modified by you." echo "Saving as $CONFFILE.dpkg-bak ..." mv -f "$CONFFILE" "$CONFFILE".dpkg-bak else echo "Removing obsolete conffile $CONFFILE ..." rm -f "$CONFFILE" fi fi } case "$1" in install|upgrade) if dpkg --compare-versions "$2" le "0.7"; then for c in README 50uncommitted-changes; do prep_mv_conffile etckeeper "/etc/etckeeper/pre-apt.d/$c" done for c in README 10git-test 30git-add 40git-rm 50git-commit; do prep_mv_conffile etckeeper "/etc/etckeeper/post-apt.d/$c" done for c in 40git-init 50git-ignore 50git-perm \ 50git-pre-commit-hook 70git-add; do prep_mv_conffile etckeeper "/etc/etckeeper/init.d/$c" done fi if dpkg --compare-versions "$2" le "0.10"; then for c in 10vcs-test 30git-add 30hg-addremove 40git-rm; do prep_mv_conffile etckeeper "/etc/etckeeper/post-install.d/$c" done fi if dpkg --compare-versions "$2" le "0.13"; then for c in 20store-empty-directory 40rm-old-metadata; do rm_conffile etckeeper "/etc/etckeeper/pre-commit.d/$c" done for c in 10restore-etckeeper 20restore-metadata; do prep_mv_conffile etckeeper "/etc/etckeeper/init.d/$c" done fi if dpkg --compare-versions "$2" le "0.15"; then for c in 40bzr-rm 45bzr-precommit; do rm_conffile etckeeper "/etc/etckeeper/commit.d/$c" done fi if dpkg --compare-versions "$2" le "0.50"; then for c in 20warn-hardlinks 20warn-special-file; do rm_conffile etckeeper "/etc/etckeeper/pre-commit.d/$c" done fi if dpkg --compare-versions "$2" le "0.61"; then rm_conffile etckeeper "/etc/etckeeper/commit.d/40git-rm" fi # delete files the prerm stashes away to handle purging rm -rf /var/cache/etckeeper/stash esac etckeeper-1.18.5/debian/prerm000066400000000000000000000007671274300712300160600ustar00rootroot00000000000000#!/bin/sh set -e #DEBHELPER# if [ "$1" = remove ]; then # In case etckeeper is being purged, stash away a copy of # the files purging will need. mkdir -p /var/cache/etckeeper/stash if [ -e /etc/etckeeper/etckeeper.conf ]; then cp -a /etc/etckeeper/etckeeper.conf /var/cache/etckeeper/stash fi if [ -d /etc/etckeeper/uninit.d ]; then cp -a /etc/etckeeper/uninit.d /var/cache/etckeeper/stash fi if [ -x /usr/bin/etckeeper ]; then cp -a /usr/bin/etckeeper /var/cache/etckeeper/stash fi fi etckeeper-1.18.5/debian/rules000077500000000000000000000002251274300712300160550ustar00rootroot00000000000000#!/usr/bin/make -f export PYTHON_INSTALL_OPTS=--install-layout=deb %: dh --with python2 $@ override_dh_installdocs: dh_installdocs -X.gitignore etckeeper-1.18.5/debian/templates000066400000000000000000000012031274300712300167130ustar00rootroot00000000000000# These templates have been reviewed by the debian-l10n-english # team # # If modifications/additions/rewording are needed, please ask # debian-l10n-english@lists.debian.org for advice. # # Even minor modifications require translation updates and such # changes should be coordinated with translators and reviewers. Template: etckeeper/purge Type: boolean Default: true _Description: Remove etckeeper ${VCS} repository and associated files? 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. etckeeper-1.18.5/doc/000077500000000000000000000000001274300712300143215ustar00rootroot00000000000000etckeeper-1.18.5/doc/.gitignore000066400000000000000000000000121274300712300163020ustar00rootroot00000000000000/.ikiwiki etckeeper-1.18.5/doc/README.mdwn000066400000000000000000000255551274300712300161610ustar00rootroot00000000000000etckeeper 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. 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`. It's quite modular and configurable, while also being simple to use if you understand the basics of working with version control. ## security warnings 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. 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) 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. Also note that `etckeeper init` runs code stored in the repository. So don't use it on repositories from untrusted sources. ## what etckeeper does 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. You can also run `etckeeper commit` by hand to commit changes. There is also a cron job, that will use etckeeper to automatically commit any changes to /etc each day. ## VCS limitations 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. 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. 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. 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. Darcs doesn't support symlinks, so they are also stored in `/etc/.etckeeper`. ## tutorial A quick walkthrough of using etckeeper. Note that the default VCS is git, and this tutorial assumes you're using it. Using other VCSes should be broadly similar. First, get etckeeper installed. Something like: apt-get install etckeeper The `etckeeper init` command initialises an /etc/.git/ repository. If you installed etckeeper from a package, this was probably automatically performed during the package installation. If not, your first step is to run it by hand: etckeeper init 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. 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: cd /etc git status git commit -m "initial checkin" git gc # pack git repo to save a lot of space After this first commit, you can use regular git commands to handle further changes: passwd someuser git status git commit -a -m "changed a password" 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: git rm --cached printcap # modified by CUPS echo printcap >> .gitignore git commit -a -m "don't track printcap" 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`. 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: git checkout april_first_joke_etc etckeeper init 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: mkdir /my/workdir cd /my/workdir chmod 700 . git clone /etc cd etc etckeeper init -d . chmod 755 .. 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.) ssh server 'mkdir /etc-clone; cd /etc-clone; chmod 700 .; git init --bare' git remote add backup ssh://server/etc-clone git push backup --all 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.) root@darkstar:/etc>git remote add dodo ssh://dodo/etc root@darkstar:/etc>git fetch dodo root@darkstar:/etc>git diff dodo/master group |head diff --git a/group b/group index 0242b84..b5e4384 100644 --- a/group +++ b/group @@ -5,21 +5,21 @@ sys:x:3: adm:x:4:joey tty:x:5: disk:x:6: -lp:x:7:cupsys +lp:x:7: 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 backup. 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.. ## configuration The main configuration file is `/etc/etckeeper/etckeeper.conf` 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. For example, here's how to configure it to run `git gc` after each apt run, which will save a lot of disk space: cd /etc/etckeeper/post-install.d (echo '#!/bin/sh' ; echo 'exec git gc') > 99git-gc chmod +x 99git-gc git add . git commit -m "run git gc after each apt run" Here's how to disable the automatic commits after each apt run, while still letting it git add new files: rm /etc/etckeeper/commit.d/50vcs-commit ## sudo integration 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. ## changing VCS 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. [ 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. ] 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? In the latter case, you just need to follow three steps: etckeeper uninit # deletes /etc/.git! vim /etc/etckeeper/etckeeper.conf etckeeper init 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. ## inspiration Two blog posts provided inspiration for techniques used by etckeeper: * * 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. ## license etckeeper is licensed under version 2 or greater of the GNU GPL. ## website ## author Joey Hess etckeeper-1.18.5/doc/index.mdwn000066400000000000000000000016641274300712300163260ustar00rootroot00000000000000etckeeper 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. 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`. It's quite modular and configurable, while also being simple to use if you understand the basics of working with version control. [[!sidebar content=""" [[README]] [[install]] [[news]] [[todo]] [Flattr this](http://flattr.com/thing/39940/etckeeper) """]] etckeeper-1.18.5/doc/install.mdwn000066400000000000000000000007431274300712300166620ustar00rootroot00000000000000etckeeper is available in git at `git://git.joeyh.name/etckeeper`, or [in gitweb](http://git.joeyh.name/?p=etckeeper.git). It's packaged in Debian, Ubuntu, Fedora, etc. Or, you can install it by hand. Before running 'make install', you should edit etckeeper.conf and make sure it configured appropriately for your distribution. Distribution packagers may find it more convenient to set CONFFILE to point to a different etckeeper.conf that is preconfigured for your distribution. etckeeper-1.18.5/doc/news.mdwn000066400000000000000000000000671274300712300161670ustar00rootroot00000000000000[[!inline pages="news/* and !*/Discussion" show="3"]] etckeeper-1.18.5/doc/news/000077500000000000000000000000001274300712300152755ustar00rootroot00000000000000etckeeper-1.18.5/doc/news/new_web_site.mdwn000066400000000000000000000000641274300712300206360ustar00rootroot00000000000000Finally set up a standalone website for etckeeper.. etckeeper-1.18.5/doc/news/version_1.17.mdwn000066400000000000000000000003761274300712300203250ustar00rootroot00000000000000etckeeper 1.17 released with [[!toggle text="these changes"]] [[!toggleable text=""" * Fix name of DNF plugin. * Add --version Thanks Andreas Wansner. * New website, http://etckeeper.branchable.com/ * Add build-depends on dh-python."""]]etckeeper-1.18.5/doc/news/version_1.18.2.mdwn000066400000000000000000000006041274300712300204600ustar00rootroot00000000000000etckeeper 1.18.2 released with [[!toggle text="these changes"]] [[!toggleable text=""" * Use getent utility instead of perl. (Elan Ruusamäe) * Initial FreeBSD support with pkgng plugin. (William Johansson) * Fix README.md symlink in package (Sebastian Schmidt, Antoine Beaupré, closes: #[791566](http://bugs.debian.org/791566)) * Fix typo of GIT\_COMMITTER\_EMAIL."""]]etckeeper-1.18.5/doc/news/version_1.18.3.mdwn000066400000000000000000000012141274300712300204570ustar00rootroot00000000000000etckeeper 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."""]]etckeeper-1.18.5/doc/news/version_1.18.4.mdwn000066400000000000000000000011001274300712300204520ustar00rootroot00000000000000etckeeper 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."""]]etckeeper-1.18.5/doc/news/version_1.18.mdwn000066400000000000000000000004231274300712300203170ustar00rootroot00000000000000etckeeper 1.18 released with [[!toggle text="these changes"]] [[!toggleable text=""" * Send yum pre-commit output to /dev/null Thanks, Andrew Colin Kissa * Set LANG=C internally when doing some operations that have been reported to fail in other locales."""]]etckeeper-1.18.5/doc/todo.mdwn000066400000000000000000000004651274300712300161620ustar00rootroot00000000000000This is etckeeper's todo list, for both posting feature requests, and merge requests. Link items to [[todo/done]] when done. See also: [Debian BTS](http://bugs.debian.org/etckeeper). [[!inline pages="./todo/* and !./todo/done and !link(done) and !*/Discussion" actions=yes postform=yes show=0 archive=yes]] etckeeper-1.18.5/doc/todo/000077500000000000000000000000001274300712300152665ustar00rootroot00000000000000etckeeper-1.18.5/doc/todo/Adding_support_for_.hgignore.mdwn000066400000000000000000000154471274300712300237600ustar00rootroot00000000000000Hi, I wrote emails and a bugreport for this issue but never got an answer... Currently eetckeeper does ignore the .hgignore file. My workflow is like this: 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: Ignoring everyhing would be: syntax: glob ** With exceptions: syntax: regexp # Ignore anything in root folder but include .hgignore and special folders: #^(?!.hgignore|data|DATA|NFS|usr(/local(/lib(/site_perl|$)|$)|$)|etc(/init.d(/*.sh$|$)|$)) # OR ^(?!boot(/config|$)|etc(/runlevels|$)) 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. 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. As for 30store-metadata I added hg status -nacu for getting all relevant files: [[!format bash """ --- /root/src/etckeeper/pre-commit.d/30store-metadata 2015-02-19 13:13:46.171485949 +0100 +++ pre-commit.d/30store-metadata 2015-02-19 13:28:01.593456235 +0100 @@ -59,7 +59,10 @@ generate_metadata() { # (Note that when using this, the find expression must end with # -print or -exec, else the excluded directories will actually be # printed!) - NOVCS='. -path ./.git -prune -o -path ./.bzr -prune -o -path ./.hg -prune -o -path ./_darcs -prune -o' + if [ "$VCS" = hg ]; then + HG_FILES="$(hg status -nacu)" + fi + NOVCS="${HG_FILES:-.} -path ./.git -prune -o -path ./.bzr -prune -o -path ./.hg -prune -o -path ./_darcs -prune -o" # Keep the sort order the same at all times. LC_COLLATE=C @@ -68,8 +71,9 @@ generate_metadata() { if [ "$VCS" = git ] || [ "$VCS" = hg ]; then # These version control systems do not track directories, # so empty directories must be stored specially. - find $NOVCS -type d -empty -print | - sort | shellquote | sed -e "s/^/mkdir -p /" +# find ${HG_FILES:- } $NOVCS -type d -empty -print | +# sort | shellquote | sed -e "s/^/mkdir -p /" + true fi if [ "$VCS" = darcs ]; then @@ -110,12 +114,12 @@ generate_metadata() { s/^/$q/; s/$/$q/; if ($uid != $>) { - printf "maybe chown $q%s$q %s\n", uidname($uid), $_; + printf "maybe chown -c $q%s$q %s\n", uidname($uid), $_; } if ($gid != $)) { - printf "maybe chgrp $q%s$q %s\n", gidname($gid), $_; + printf "maybe chgrp -c $q%s$q %s\n", gidname($gid), $_; } - printf "maybe chmod %04o %s\n", $mode & 07777, $_; + printf "maybe chmod -c %04o %s\n", $mode & 07777, $_; ' """]] 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. Since some distros are already considered please integrate the Gentoo package manager so we can drop our patches: # There is something missing if only recording uid/gid/mode for tracked files... All dirnames of every file must also get the right permissions. 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... [[!format bash """ # diff -uNr /root/src/etckeeper/pre-commit.d/30store-metadata /etc/etckeeper/pre-commit.d/30store-metadata --- /root/src/etckeeper/pre-commit.d/30store-metadata 2015-02-20 15:36:24.912374338 +0100 +++ /etc/etckeeper/pre-commit.d/30store-metadata 2015-02-20 15:34:10.770378997 +0100 @@ -44,6 +44,21 @@ sed -e "s/'/'\"'\"'/g" -e "s/^/'/" -e "s/$/'/" } +getdirname() { + # Permissions of all parent dirnames must also be recorded + local p + # Print the file itself + printf '%s' "$p" + p=${1%/*} + # Print the files dirnames + while [[ $p = */* ]]; do + printf ' %s' "$p" + p=${p%/*} + done + # Print the parent dirname + printf ' %s' "$p" +} + generate_metadata() { # This function generates the script commands to fix any file # ownerships that aren't owner=root, group=root, as well as to @@ -57,9 +72,17 @@ # but we want find to ignore the VCS files themselves. # # (Note that when using this, the find expression must end with - # -print or -exec, else the excluded directories will actually be - # printed!) - NOVCS='. -path ./.git -prune -o -path ./.bzr -prune -o -path ./.hg -prune -o -path ./_darcs -prune -o' + # -print or -exec, else the excluded directories will actually be + # printed!) + if [ "$VCS" = hg ]; then + HG_FILES="$(hg status -nacu)" + HG_FILES_DIRS="" + for file in $HG_FILES; do + HG_FILES_DIRS+=" $(getdirname $file)" + done + + fi + NOVCS="${ALL_FILES:-.} -path ./.git -prune -o -path ./.bzr -prune -o -path ./.hg -prune -o -path ./_darcs -prune -o" # Keep the sort order the same at all times. LC_COLLATE=C @@ -68,8 +91,9 @@ if [ "$VCS" = git ] || [ "$VCS" = hg ]; then # These version control systems do not track directories, # so empty directories must be stored specially. - find $NOVCS -type d -empty -print | - sort | shellquote | sed -e "s/^/mkdir -p /" +# find ${ALL_FILES:- } $NOVCS -type d -empty -print | +# sort | shellquote | sed -e "s/^/mkdir -p /" + true fi if [ "$VCS" = darcs ]; then @@ -83,7 +107,8 @@ # Store things that don't have the default user or group. # Store all file modes, in case the user has an unusual umask. - find $NOVCS \( -type f -or -type d \) -print | filter_ignore | sort | perl -ne ' + #find $NOVCS \( -type f -or -type d \) -print | filter_ignore | sort | perl -ne ' + echo $HG_FILES_DIRS | tr " " "\n" | sort -u | perl -ne ' BEGIN { $q=chr(39) } sub uidname { my $want=shift; @@ -110,12 +135,12 @@ s/^/$q/; s/$/$q/; if ($uid != $>) { - printf "maybe chown $q%s$q %s\n", uidname($uid), $_; + printf "maybe chown -c $q%s$q %s\n", uidname($uid), $_; } if ($gid != $)) { - printf "maybe chgrp $q%s$q %s\n", gidname($gid), $_; + printf "maybe chgrp -c $q%s$q %s\n", gidname($gid), $_; } - printf "maybe chmod %04o %s\n", $mode & 07777, $_; + printf "maybe chmod -c %04o %s\n", $mode & 07777, $_; ' # We don't handle xattrs. """]] I added an init hook for any update, so after cloning to a new location and updating, all permissions are going to be fixed: [hooks] [[!format python """ # pre-commit hook for etckeeper, to store metadata and do sanity checks pre-commit = etckeeper pre-commit -d "$(hg root)" post-update = etckeeper init "$(hg root)" """]] Best regards, Massimo etckeeper-1.18.5/doc/todo/Correct_misspelling_of___34__committer__34__.mdwn000066400000000000000000000005151274300712300266420ustar00rootroot00000000000000In commit.d/50vcs-commit the word "committer" is misspelled twice (as "commiter"). Here it is in the code: https://github.com/joeyh/etckeeper/blob/master/commit.d/50vcs-commit#L58-L59 This is causing git to incorrectly attribute commits to root instead of the name and email specified in ~/.gitconfig. > [[fixed|done]] --[[Joey]] etckeeper-1.18.5/doc/todo/Do_not_recreate_ignored_empty_directory.mdwn000066400000000000000000000006061274300712300262640ustar00rootroot00000000000000Hi * I made some change to have a more powerful ignore_filter https://github.com/jeremiejig/etckeeper/commit/faed9ba87a71a2d09cf078c0154bd3a6bd36786a The filtering process concern only **git**. * And I filter the empty directories to avoid creating ignored empty directories https://github.com/jeremiejig/etckeeper/commit/4f257707ed85097a93289b4a33f18ea21dcf3a6e Tell me what you think. Give_preference_to_etckeeper.conf_over_existing_repository_for_defining___36__VCS.mdwn000066400000000000000000000022071274300712300363010ustar00rootroot00000000000000etckeeper-1.18.5/doc/todoI'm using etckeeper with hg and I will use git to manage some files under /etc apart from etckeeper for some reason. However, after I initialize new git repository as /etc/.git, etckeeper starts to use git as $VCS contrary to definition in etckeeper.conf. So I think that definition in etckeeper.conf should be given priority over existing repository. The patch is below (from https://github.com/hiraku/etckeeper/commit/02f6d37e50cacddc9605dcbc5c8844b3f4658d6e ): ```diff diff --git a/etckeeper b/etckeeper index 93f2b00..6c63ffb 100755 --- a/etckeeper +++ b/etckeeper @@ -109,14 +109,16 @@ fi cd "$ETCKEEPER_DIR" export ETCKEEPER_DIR -if [ -d ".git" ]; then - VCS=git -elif [ -d ".hg" ]; then - VCS=hg -elif [ -d "_darcs" ]; then - VCS=darcs -elif [ -d ".bzr" ]; then - VCS=bzr +if [ -z "$VCS" ]; then + if [ -d ".git" ]; then + VCS=git + elif [ -d ".hg" ]; then + VCS=hg + elif [ -d "_darcs" ]; then + VCS=darcs + elif [ -d ".bzr" ]; then + VCS=bzr + fi fi if [ -z "$VCS" ]; then ``` I would appreciate your consideration. Thank you. etckeeper-1.18.5/doc/todo/Patch:_Make_Pacman_5_call_etckeeper_hooks_as_late_as_possible.mdwn000066400000000000000000000010341274300712300322440ustar00rootroot00000000000000Pacman 5 calls its hooks in alphabetical order. The hooks I added in my previous patch (see [[__91__Patch__93___Support_Pacman_5.x_hooks]]) have no numerical prefix -- which is needed in order to ensure that Pacman calls the hooks as late as possible (i. e. after all other hooks). My patch remedies that minor issue by adding the proper numerical prefix to the filenames of the Pacman 5 hooks. It may be found here: > [[done]] thanks --[[Joey]] etckeeper-1.18.5/doc/todo/Yet_another_patch_for_the_Pacman_5_hooks.mdwn000066400000000000000000000025451274300712300262370ustar00rootroot00000000000000It turns out that my last patch ([[Patch:_Make_Pacman_5_call_etckeeper_hooks_as_late_as_possible]]) was not perfect after all. Calling both the pre-transaction and the post-transaction hook as late as possible seemed to make sense at the time, but now that I think about it, I would say that only the post-transaction hook should be called after all other hooks; the **pre-transaction** hook should be called as **early** as possible. That way, the pre-transaction hook can make sure that... - ...everything in `/etc` gets committed before any other hook gets the chance to introduce more changes (therefore making any changes made by other hooks part of the post-transaction commit) *and*... - ...it can abort the transaction and thus all hooks that come after the pre-transaction hook if `/etc` is not clean and the user wants to prevent the package manager from running in that case. This prevents any later hooks from making changes that should not be made in the first place (since the entire transaction is being aborted due to a dirty `/etc`). My patch which makes Pacman call the pre-transaction hook as early as possible can be found here: Hopefully, this will be the last patch related to the Pacman hooks for some time... Sorry for the noise. > [[done]] --[[Joey]] etckeeper-1.18.5/doc/todo/__91__Patch__93___Support_Pacman_5.x_hooks.mdwn000066400000000000000000000011051274300712300260370ustar00rootroot00000000000000The 5.0.0 release of Arch Linux' *Pacman* package manager [finally supports hooks](https://projects.archlinux.org/pacman.git/tree/NEWS?id=fea9abc8db3b8161ab32774a0ddd7c405cfbe44f), making it possible to properly integrate etckeeper with it. I have added the necessary hook files to etckeeper and also modified the `Makefile` to install them if the user chooses `pacman` as the `LOWLEVEL_PACKAGE_MANAGER`. You can find my patch [here](https://github.com/joeyh/etckeeper/compare/master...Tblue:master.patch). Please consider applying it. :-) > merged, thanks. [[done]] --[[Joey]] etckeeper-1.18.5/doc/todo/add_support_pacmatic_http:__47____47__kmkeen.com__47__pacmatic__47__.mdwn000066400000000000000000000003361274300712300330030ustar00rootroot00000000000000Please add support pacmatic http://kmkeen.com/pacmatic/ https://github.com/nicolaichuk/etckeeper/commit/52846aebb91770e3bbc466881998714c88cbcaa6 Patch attached: 'add_support_pacmatic.patch' > [[merged|done]] --[[Joey]] etckeeper-1.18.5/doc/todo/automatic_git_gc.mdwn000066400000000000000000000001521274300712300214550ustar00rootroot00000000000000Hi You should add so it runs "git gc" automatic. I know I can add it manually but better if its included etckeeper-1.18.5/doc/todo/automatic_git_gc/000077500000000000000000000000001274300712300205705ustar00rootroot00000000000000etckeeper-1.18.5/doc/todo/automatic_git_gc/comment_1_a0d10512edff8765066bac4bbc8a0561._comment000066400000000000000000000003461274300712300306760ustar00rootroot00000000000000[[!comment format=mdwn username="florian.kaiser@0f461a60da03d93431a5fdc965f53e6265e3f91e" nickname="florian.kaiser" subject="comment 1" date="2016-03-08T13:32:03Z" content=""" Git does git gc automatically when needed. """]] etckeeper-1.18.5/doc/todo/done.mdwn000066400000000000000000000001721274300712300171020ustar00rootroot00000000000000recently fixed [[todo]] items. [[!inline pages="./* and link(./done) and !*/Discussion" sort=mtime show=10 archive=yes]] etckeeper-1.18.5/doc/todo/etckeeper_with_git_breaks_update-manager_.mdwn000066400000000000000000000027461274300712300264730ustar00rootroot00000000000000[Ubuntu LaunchPad bug #1335391](https://bugs.launchpad.net/ubuntu/+source/etckeeper/+bug/1335391) (Quoting the LaunchPad bug below, but I have experienced this issue in an identical manner.) I have configured etckeeper to use git. It works fine if I use apt-get or synaptic packet manager. But when the update-manger install new packet versions it ends with an "installation failed" message. When I check the status of the git repository in the etc directory, some changes are not commited, e.g.: On branch master Changes to be committed: (use "git reset HEAD ..." to unstage) modified: apt/apt.conf.d/01autoremove-kernels modified: init.d/resolvconf ProblemType: Bug DistroRelease: Ubuntu 14.04 Package: etckeeper 1.9ubuntu2 ProcVersionSignature: Ubuntu 3.13.0-29.53-generic 3.13.11.2 Uname: Linux 3.13.0-29-generic x86_64 NonfreeKernelModules: wl tbs6982fe tbs6680fe tbs6923fe tbs6985se tbs6928se tbs6982se tbs6991fe tbs6618fe tbs6922fe tbs6928fe tbs6991se ApportVersion: 2.14.1-0ubuntu3.2 Architecture: amd64 CurrentDesktop: Unity Date: Sat Jun 28 09:42:13 2014 InstallationDate: Installed on 2014-03-30 (89 days ago) InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Daily amd64 (20140329) PackageArchitecture: all SourcePackage: etckeeper UpgradeStatus: No upgrade log present (probably fresh install) mtime.conffile..etc.etckeeper.etckeeper.conf: 2014-03-30T16:33:03.109833 > [[done]] --[[Joey]] etckeeper-1.18.5/doc/todo/etckeeper_with_git_breaks_update-manager_/000077500000000000000000000000001274300712300255735ustar00rootroot00000000000000comment_1_2ae8af745340c6f4d5ee87c74c96e870._comment000066400000000000000000000016111274300712300356060ustar00rootroot00000000000000etckeeper-1.18.5/doc/todo/etckeeper_with_git_breaks_update-manager_[[!comment format=mdwn username="https://launchpad.net/~codex24" nickname="codex24" subject="Workaround" date="2016-02-14T23:12:10Z" content=""" With etckeeper installed in Ubuntu using git as its VCS, using the Ubuntu Software Center fails with errors installArchives() failed: fatal: $HOME not set Correct this by adding the following file, /etc/etckeeper/pre-install.d/20setenv: #!/bin/sh # /etc/etckeeper/pre-install.d/20setenv: set HOME dir due to # unpassed environment in priviledge escallation of Ubuntu Software Center. # see https://bugs.launchpad.net/ubuntu/+source/etckeeper/+bug/1335391 if \[[ -z \"$HOME\" ]]; then export HOME=$(getent passwd root | cut -d: -f6) fi Also, ensure that the root account's git environment is properly initialized: root@janus:/etc# git config -l user.name=Root Janus user.email=codex24@gmail.com """]] comment_2_0324393d5a4f4e6a6174c27f1a53e886._comment000066400000000000000000000004441274300712300353500ustar00rootroot00000000000000etckeeper-1.18.5/doc/todo/etckeeper_with_git_breaks_update-manager_[[!comment format=mdwn username="joey" subject="""comment 2""" date="2016-02-15T17:09:15Z" content=""" user.email and user.name are set by etckeeper to sane fallback defaults. ubuntu has a seriously ancient version of etckeeper, which predates that. I've added a default for HOME. """]] etckeeper-1.18.5/doc/todo/freebsd_pkgng_plugin.mdwn000066400000000000000000000005611274300712300223350ustar00rootroot00000000000000Get the same integration with FreeBSD pkg as with other package managers. Basic working plugin available at: > I've merged this. Of course it would be good to get the main Makefile > able to install it. Please open new todos if you have updates and thanks! > [[done]] > --[[Joey]] etckeeper-1.18.5/doc/todo/how_to_restore_from_etckeeper.mdwn000066400000000000000000000006531274300712300242750ustar00rootroot00000000000000Could we get in the README some info about how to restore from etckeeper assuming it's even possible. So say I hose my system. I reinstall everything. But now I'd like to migrate my old config but keep tracking changes going forward. What I've tried: 1) Renaming /etc breaks sudo 2) clone over /etc breaks passwd 3) clone to staging area and then move things over selectively Is #3 the proper way to restore an /etc Thanks etckeeper-1.18.5/doc/todo/how_to_restore_from_etckeeper/000077500000000000000000000000001274300712300234025ustar00rootroot00000000000000comment_1_e97948136569a070265c1cd757e3c889._comment000066400000000000000000000006141274300712300330470ustar00rootroot00000000000000etckeeper-1.18.5/doc/todo/how_to_restore_from_etckeeper[[!comment format=mdwn username="joey" subject="""comment 1""" date="2015-03-28T16:10:49Z" content=""" I would definitely go with #3. Unless I knew that the new system was identical to the old before any customizations to /etc -- in that case, cloning to /etc would work. Note that `etckeeper init` will fix up the file permissions of a clone of the repo, since etckeeper stores them. """]] etckeeper-1.18.5/doc/todo/metadata_changes_don__39__t_cause_a_new_commit.mdwn000066400000000000000000000010631274300712300273220ustar00rootroot00000000000000If the only changes in /etc are metadata changes that the VCS doesn't natively track, then etckeeper refuses to make a new commit for them. At least with git. This is because the metadata in `/etc/.etckeeper` is only updated from `etckeeper pre-commit`, which is only called by the VCS pre-commit hook; and since the VCS doesn't track the metadata changes, it doesn't think that a new commit needs to be made, and doesn't call the hook! I think the best solution might be to call `etckeeper pre-commit` from in `etckeeper commit`. > [[fixed|done]] --[[Joey]] etckeeper-1.18.5/doc/todo/multiple_highlevel_package_managers.mdwn000066400000000000000000000004541274300712300253720ustar00rootroot00000000000000Apparently openSUSE supports both ZYpp and YUM highlevel package managers. The `HIGHLEVEL_PACKAGE_MANAGER` config doesn't allow expressing that. There's a pull request here, but it needs changes to eg, handle etckeeper.spec's tweaking of etckeeper.conf. etckeeper-1.18.5/doc/todo/multiple_highlevel_package_managers/000077500000000000000000000000001274300712300245005ustar00rootroot00000000000000comment_1_be96d2f726ce5c9adabdaf46cd17dcc6._comment000066400000000000000000000006411274300712300352140ustar00rootroot00000000000000etckeeper-1.18.5/doc/todo/multiple_highlevel_package_managers[[!comment format=mdwn username="https://www.google.com/accounts/o8/id?id=AItOawkZ9t02dAh3YsUhVRJ9uBE4xUt_ZUrDs8s" nickname="さんご" subject="How should we send you new patches?" date="2014-12-24T00:37:10Z" content=""" I will rewrite the patch of supporting multi highlevel-package-manager. But, how should we send you new patches? a) pullrequest on GitHub. b) the others(????????) Please tell us. """]] etckeeper-1.18.5/doc/todo/origin_branch.mdwn000066400000000000000000000011331274300712300207570ustar00rootroot00000000000000keep an origin branch with the files debian ships Not sure quite how to do this yet, it seems it would need to clone the repo, switch to origin, and commit, then push back to /etc, and either merge origin or commit a second time. And do this after apt runs only, of course. Alternatively, commit in /etc, then clone the repo, switch to origin, and cherry pick the commit into origin? Of coure, unless etckeeper is installed by debootstrap or thereabouts, you won't have a true pristine origin branch. etcgit manages this, maybe steal its method? git://git.debian.org/git/users/jo-guest/etcgit.git etckeeper-1.18.5/doc/todo/push_remote_branch.mdwn000066400000000000000000000011751274300712300220300ustar00rootroot00000000000000Several people have written patches to extend `PUSH_REMOTE` to be able to push a branch other than master. For example, It seems that these are not fully flexible either. Maybe someone wants to push 2 branches, or push different branches to different remotes. I think that adding `PUSH_REMOTE` was a mistake. It would be better to remove it, and add to the readme an example of writing your own `/etc/etckeeper/commit.d/99push` script that does exactly the kind of pushing you want. The only reason I've not done so is it would break compatability for anyone using this feature. --[[Joey]] etckeeper-1.18.5/doc/todo/remove_remaining_perl_usage.mdwn000066400000000000000000000004501274300712300237100ustar00rootroot00000000000000In order to run etckeeper on e.g. embedded systems which does not have perl, I've removed the last parts using perl. I have run this on my custom system and it works as expected for me. Link to github commit: etckeeper-1.18.5/doc/todo/remove_remaining_perl_usage/000077500000000000000000000000001274300712300230225ustar00rootroot00000000000000comment_1_c901ff31a0cddf4912123c6443876327._comment000066400000000000000000000010501274300712300325550ustar00rootroot00000000000000etckeeper-1.18.5/doc/todo/remove_remaining_perl_usage[[!comment format=mdwn username="joey" subject="""comment 1""" date="2015-06-10T19:50:30Z" content=""" Reviewing this patch, I noticed a bug in the first hunk. lsscripts currently limits the files it finds to those matching a regexp. IIRC, this is needed, amoung other things, to avoid .dpkg-old files being run. Looking at the second hunk, I suspect that calling `id` twice per file is going to be significantly slower than the perl implementation. There also seems to be missing escaping of single quotes in filenames in the second hunk. """]] etckeeper-1.18.5/doc/todo/split_the_repo.mdwn000066400000000000000000000007251274300712300212010ustar00rootroot00000000000000split the repo One way to split it would be to put private (non-world-readable) files one one repo, and public in another. This would need either symlink farming or git "fake bare" repos, both of which are not pleasant, yet. Another way would be to allow splitting out subdirs into their own repos. This is already doable, would just need modifying the pre-install and post-instlal stuff (ie, it needs to commit in the subdirs too). Using mr would be a possibility.. etckeeper-1.18.5/doc/todo/track_multiple_directories.mdwn000066400000000000000000000003361274300712300235720ustar00rootroot00000000000000Some people would like etckeeper to be able to track multiple directories, not just /etc. There have been 2 patches proposed: * * etckeeper-1.18.5/doc/todo/track_multiple_directories/000077500000000000000000000000001274300712300227015ustar00rootroot00000000000000comment_10_89b0ea104e18ec73f743b6d3e9aee1a9._comment000066400000000000000000000003741274300712300331170ustar00rootroot00000000000000etckeeper-1.18.5/doc/todo/track_multiple_directories[[!comment format=mdwn username="voltagex@69f6e3462800a695a8565ddc064de13207caf99f" nickname="voltagex" subject="This is needed for FreeBSD" date="2016-03-20T04:43:30Z" content=""" FreeBSD splits configuration across /etc and /usr/local/etc """]] comment_1_de6b27ba6b98790101d9ab1a37d752dc._comment000066400000000000000000000003121274300712300327370ustar00rootroot00000000000000etckeeper-1.18.5/doc/todo/track_multiple_directories[[!comment format=mdwn username="joey" subject="""comment 1""" date="2014-12-22T20:54:14Z" content=""" Personally, this seems unnecessary complication and unnecessary widening of scope to me. """]] comment_2_042f7831f641c66396ef38c912692ae3._comment000066400000000000000000000036731274300712300324200ustar00rootroot00000000000000etckeeper-1.18.5/doc/todo/track_multiple_directories[[!comment format=mdwn username="https://www.google.com/accounts/o8/id?id=AItOawlCXirWXlbn1_Ma9G5w3KYILEmb75-I9Do" nickname="Salve J." subject="track multiple directories = good" date="2014-12-23T05:26:22Z" content=""" Allright, here's my use case. 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' 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. 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. 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... Hope this gives you an idea of what I tried to do with my pull request at https://github.com/joeyh/etckeeper/pull/2 -- Salve """]] comment_3_5e52734a98bff9ccd4cd088cf6a4381d._comment000066400000000000000000000004651274300712300330560ustar00rootroot00000000000000etckeeper-1.18.5/doc/todo/track_multiple_directories[[!comment format=mdwn username="http://joeyh.name/" subject="comment 3" date="2014-12-23T18:30:15Z" content=""" 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. """]] comment_4_50fad97b58a7f1875092c7acb3f3acd8._comment000066400000000000000000000020461274300712300330440ustar00rootroot00000000000000etckeeper-1.18.5/doc/todo/track_multiple_directories[[!comment format=mdwn username="https://www.google.com/accounts/o8/id?id=AItOawlCXirWXlbn1_Ma9G5w3KYILEmb75-I9Do" nickname="Salve J." subject="On putting everything in /etc" date="2014-12-30T15:38:19Z" content=""" 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. 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. I hope you understand. """]] comment_5_bec408cef5932ace7d6d136600827a1f._comment000066400000000000000000000005051274300712300327500ustar00rootroot00000000000000etckeeper-1.18.5/doc/todo/track_multiple_directories[[!comment format=mdwn username="https://www.google.com/accounts/o8/id?id=AItOawlCXirWXlbn1_Ma9G5w3KYILEmb75-I9Do" nickname="Salve J." subject="myrepos" date="2014-12-30T16:25:04Z" content=""" Not familiar with myrepos. Does it have any integration with packaging systems? (e.g. autocommit before apt-get install) """]] comment_6_bedb701e0175b2d3833041f2f496d3aa._comment000066400000000000000000000012451274300712300326540ustar00rootroot00000000000000etckeeper-1.18.5/doc/todo/track_multiple_directories[[!comment format=mdwn username="https://www.google.com/accounts/o8/id?id=AItOawnZJhzx-nwZRTgh9kjy2Q8zKYsgTLNM2zc" nickname="Evan" subject="intrusion detection?" date="2015-04-10T20:32:40Z" content=""" It seems to me that this would be particularly useful for narrowly scoped intrusion detection. For example, if I have an installed instance of a popular web app (Wordpress, Django, what have you) that is compromised (SQL injection, brute force, etcetera), every part of that app may become suspect even after the initial vulnerability is patched...in which case, a versioned log of what files were changed within the app directory(s) would be *extremely* useful. """]] comment_7_10615b0102e73f1b33f5a8d7207f8edb._comment000066400000000000000000000006451274300712300326020ustar00rootroot00000000000000etckeeper-1.18.5/doc/todo/track_multiple_directories[[!comment format=mdwn username="apaz" subject="Very much needed" date="2015-04-29T08:44:04Z" content=""" This is very much needed! Example of some folders in debian/ubuntu that people want to keep track of: /var/spool/cron/crontabs - user crontabs, yes you can use /etc/cron.d but not everyone does. /lib/ufw/ - If you use ufw, the rules will be saved here /usr/local/bin - for your own shellscripts and stuff """]] comment_8_98d099e5947fb750e5ae9f79b70e318e._comment000066400000000000000000000003711274300712300326650ustar00rootroot00000000000000etckeeper-1.18.5/doc/todo/track_multiple_directories[[!comment format=mdwn username="godblessfq@70ee431d0873d190e6376c984749de668791e42c" nickname="godblessfq" subject="Very good idea" date="2015-08-14T20:40:28Z" content=""" It would be very nice to keep all my configuration in one repo. """]] comment_9_63c1293cf56b1229d3b7e454306b74e0._comment000066400000000000000000000013311274300712300324500ustar00rootroot00000000000000etckeeper-1.18.5/doc/todo/track_multiple_directories[[!comment format=mdwn username="abozhenko@10aed7e09adef30729c54d5f74e1d94bc22dc6e2" nickname="abozhenko" subject="Track multiple dirs for all commands" date="2015-11-22T04:03:37Z" content=""" Hello. Please take a look: https://github.com/joeyh/etckeeper/pull/30 I tried to add support for multiple dirs for all commands, and leave it compatible with default old config and cli. This feature may be useful when you want to have more control on your system. There are other locations which do contain config/code that may be changed, and affects system, e.g.: python code at /usr/lib/python2.7/dist-packages/ pacemaker scripts at /usr/lib/ocf/resource.d/fuel libvirt vms xmls at /var/lib/nova/instances/*/*.xml ... """]] etckeeper-1.18.5/doc/todo/use_getent__40__1__41___from_glibc_to_retrieve_user_home___35__27.mdwn000066400000000000000000000010041274300712300324100ustar00rootroot00000000000000use getent(1) from glibc to retrieve user home #27 https://github.com/joeyh/etckeeper/pull/27 url for git am: https://patch-diff.githubusercontent.com/raw/joeyh/etckeeper/pull/27.patch > I had to guess at the motivation for this patch, which is never the best > position for a patch to leave its receiver in. > > I guess that getent is a little faster than running perl to do the same > thing. And, getent seems to always be available, at least on debian. > > So, applied, with some doubt. [[done]] --[[Joey]] etckeeper-1.18.5/doc/todo/what_if_there_is_a_Git_repo_somewhere_underneath___47__etc__63__.mdwn000066400000000000000000000003251274300712300326520ustar00rootroot00000000000000What will and what could be done if there is a Git repo somewhere underneath /etc? Perhaps, it could be stored verbatim, or as a submodule. Simply ignoring it would definitely loose information from the backup. etckeeper-1.18.5/etckeeper000077500000000000000000000050441274300712300154540ustar00rootroot00000000000000#!/bin/sh set -e if [ -z "$ETCKEEPER_CONF_DIR" ]; then ETCKEEPER_CONF_DIR=/etc/etckeeper fi conf="$ETCKEEPER_CONF_DIR/etckeeper.conf" usage() { echo "usage: etckeeper command [-d directory]" >&2 exit 1 } if [ -e $conf ]; then . $conf fi if [ -n "$GIT_WORK_TREE" ]; then unset GIT_WORK_TREE fi if [ -n "$GIT_DIR" ]; then unset GIT_DIR fi program_directory="${0%/*}" if [ -n "$program_directory" ]; then PATH="$PATH:$program_directory" export PATH fi if [ ! -z "$GIT_COMMIT_OPTIONS" ]; then export GIT_COMMIT_OPTIONS fi if [ ! -z "$HG_COMMIT_OPTIONS" ]; then export HG_COMMIT_OPTIONS fi if [ ! -z "$BZR_COMMIT_OPTIONS" ]; then export BZR_COMMIT_OPTIONS fi if [ ! -z "$DARCS_COMMIT_OPTIONS" ]; then export DARCS_COMMIT_OPTIONS fi if [ ! -z "$HIGHLEVEL_PACKAGE_MANAGER" ]; then export HIGHLEVEL_PACKAGE_MANAGER fi if [ ! -z "$LOWLEVEL_PACKAGE_MANAGER" ]; then export LOWLEVEL_PACKAGE_MANAGER fi if [ ! -z "$AVOID_COMMIT_BEFORE_INSTALL" ]; then export AVOID_COMMIT_BEFORE_INSTALL fi if [ ! -z "$AVOID_SPECIAL_FILE_WARNING" ]; then export AVOID_SPECIAL_FILE_WARNING fi if [ ! -z "$PUSH_REMOTE" ]; then export PUSH_REMOTE fi if [ -z "$HOME" ]; then HOME=~root export HOME fi if [ -z "$1" ]; then usage elif [ "x$1" = "x-h" ] || [ "x$1" = "x--help" ]; then man etckeeper || echo "Usage: etckeeper command [-d directory]" >&2 exit 0 elif [ "x$1" = "x-v" ] || [ "x$1" = "x--version" ]; then # This is automatically updated by the Makefile. echo "Version: 1.18.5" exit 0 fi command="$1" shift 1 # compatability code if [ "$command" = "post-apt" ]; then command=post-install elif [ "$command" = "pre-apt" ]; then command=pre-install fi if echo "$command" | LANG=C egrep -q '[^-a-z_]'; then echo "etckeeper: invalid command $command" >&2 exit 1 fi if [ ! -d "$ETCKEEPER_CONF_DIR/$command.d" ]; then echo "etckeeper: $ETCKEEPER_CONF_DIR/$command.d does not exist" >&2 exit 1 fi if [ "x$1" = "x-d" ]; then if [ -n "$2" ]; then ETCKEEPER_DIR="$2" shift 2 else usage fi fi if [ -z "$ETCKEEPER_DIR" ]; then ETCKEEPER_DIR=/etc fi cd "$ETCKEEPER_DIR" export ETCKEEPER_DIR if [ -d ".git" ]; then VCS=git elif [ -d ".hg" ]; then VCS=hg elif [ -d "_darcs" ]; then VCS=darcs elif [ -d ".bzr" ]; then VCS=bzr fi if [ -z "$VCS" ]; then echo "Please configure a VCS in $conf" >&2 exit 1 fi export VCS lsscripts() { LANG=C perl -e ' $dir=shift; print join "\n", grep { ! -d $_ && -x $_ } grep /^\Q$dir\/\E[-a-zA-Z0-9]+$/, glob "$dir/*"; ' "$1" } for script in $(lsscripts "$ETCKEEPER_CONF_DIR/$command.d"); do "$script" "$@" done etckeeper-1.18.5/etckeeper-bzr/000077500000000000000000000000001274300712300163165ustar00rootroot00000000000000etckeeper-1.18.5/etckeeper-bzr/__init__.py000066400000000000000000000022031274300712300204240ustar00rootroot00000000000000# # Bazaar plugin that runs etckeeper pre-commit when necessary """Runs etckeeper pre-commit when necessary.""" from bzrlib.errors import BzrError import os def etckeeper_startcommit_hook(tree): abspath = getattr(tree, "abspath", None) if abspath is None or not os.path.exists(abspath(".etckeeper")): # Only run the commit hook when this is an etckeeper branch return import subprocess ret = subprocess.call(["etckeeper", "pre-commit", abspath(".")]) if ret != 0: raise BzrError("etckeeper pre-commit failed") try: from bzrlib.hooks import install_lazy_named_hook except ImportError: from bzrlib.mutabletree import MutableTree MutableTree.hooks.install_named_hook('start_commit', etckeeper_startcommit_hook, 'etckeeper') else: install_lazy_named_hook( "bzrlib.mutabletree", "MutableTree.hooks", 'start_commit', etckeeper_startcommit_hook, 'etckeeper') if __name__ == "__main__": from distutils.core import setup setup(name="bzr-etckeeper", packages=["bzrlib.plugins.etckeeper"], package_dir={"bzrlib.plugins.etckeeper":"etckeeper-bzr"}) etckeeper-1.18.5/etckeeper-dnf/000077500000000000000000000000001274300712300162705ustar00rootroot00000000000000etckeeper-1.18.5/etckeeper-dnf/__init__.py000066400000000000000000000000001274300712300203670ustar00rootroot00000000000000etckeeper-1.18.5/etckeeper-dnf/etckeeper.py000066400000000000000000000020251274300712300206100ustar00rootroot00000000000000# etckeeper.py, support etckeeper for dnf # # Copyright (C) 2014 Peter Listiak # https://github.com/plistiak/dnf-etckeeper # # Later modifications by Petr Spacek: # Distutils code below was copied from etckeeper-bzr distributed with v1.15 # from dnfpluginscore import logger import os import dnf class Etckeeper(dnf.Plugin): name = 'etckeeper' def _out(self, msg): logger.debug('Etckeeper plugin: %s', msg) def resolved(self): self._out('pre transaction commit') command = '%s %s' % ('etckeeper', " pre-install") ret = os.system(command) if ret != 0: raise dnf.exceptions.Error('etckeeper returned %d' % (ret >> 8)) def transaction(self): self._out('post transaction commit') command = '%s %s > /dev/null' % ('etckeeper', "post-install") os.system(command) if __name__ == "__main__": from distutils.core import setup setup(name="dnf-etckeeper", packages=["dnf-plugins"], package_dir={"dnf-plugins":"etckeeper-dnf"}) etckeeper-1.18.5/etckeeper.8000066400000000000000000000055431274300712300156230ustar00rootroot00000000000000.\" -*- nroff -*- .TH ETCKEEPER 8 "" "" "" .SH NAME etckeeper \- store /etc in git, mercurial, bazaar, or darcs .SH SYNOPSIS .B etckeeper command [-d directory] .SH DESCRIPTION etckeeper manages /etc be stored in a git, mercurial, bazaar, or darcs repository. By default each of the commands operates on /etc, but a different directory can be specified to operate on a clone of the /etc repository located elsewhere. .SH COMMANDS .TP .B init This initialises and sets up a git, mercurial, bazaar, or darcs repository (depending on the VCS setting in /etc/etckeeper/etckeeper.conf). Typically this is run in /etc once when starting to use etckeeper on a machine. It can also be used to initialise a clone of the /etc repository located elsewhere. .TP .B commit [message] Commits all changes in /etc to the repository. A commit message can be specified. You may also use the underlying VCS to commit manually. (Note that etckeeper commit will notice if a user has used sudo or su to become root, and record the original username in the commit.) .TP .B pre-commit This is called as a pre-commit hook. It stores metadata and does sanity checks. .TP .B pre-install This is called by apt's DPkg::Pre-Install-Pkgs hook, or by equivalent hooks of other package managers. It allows committing any uncommitted changes before packages are installed, upgraded, etc. .TP .B post-install This is called by apt's DPkg::Post-Invoke hook, or by equivalent hooks of other package managers. It commits changes made by packages into the repository. (You can also call this by hand after running dpkg by hand.) .TP .B unclean This returns true if the directory contains uncommitted changes. .TP .B update-ignore [-a] This updates the VCS ignore file. Content outside a "managed by etckeeper" block is not touched. This is generally run when upgrading to a new version of etckeeper. (The -a switch will add a "managed by etckeeper" block if one is not present.) .TP .B vcs subcommand [options ...] You can use this to run any subcommand of the VCS that etckeeper is configured to run. It will be run in /etc. For example, "etckeeper vcs diff" will run "git diff", etc. .TP .B uninit [-f] This command DESTROYS DATA! It is the inverse of the init command, removing VCS information and etckeeper's own bookkeeping information from the directory. Use with caution. A typical use case would be to run etckeeper uninit, then modify etckeeper.conf to use a different VCS, and then run etckeeper init. (The -f switch can be used to force uninit without prompting.) .SH FILES /etc/etckeeper/etckeeper.conf is the configuration file. /etc/etckeeper also contains directories containing the programs that are run for each of the above commands. .SH ENVIRONMENT VARIABLES ETCKEEPER_CONF_DIR path to configuration directory instead of default /etc/etckeeper. .SH SEE ALSO /usr/share/doc/etckeeper/README.md.gz .SH AUTHOR Joey Hess etckeeper-1.18.5/etckeeper.conf000066400000000000000000000027421274300712300163770ustar00rootroot00000000000000# The VCS to use. #VCS="hg" VCS="git" #VCS="bzr" #VCS="darcs" # Options passed to git commit when run by etckeeper. GIT_COMMIT_OPTIONS="" # Options passed to hg commit when run by etckeeper. HG_COMMIT_OPTIONS="" # Options passed to bzr commit when run by etckeeper. BZR_COMMIT_OPTIONS="" # Options passed to darcs record when run by etckeeper. DARCS_COMMIT_OPTIONS="-a" # Etckeeper includes both a cron job and a systemd timer, which each # can commit exiting changes to /etc automatically once per day. # To enable the systemd timer, run: systemctl enable etckeeper.timer # The cron job is enabled by default; to disable it, uncomment this next line. #AVOID_DAILY_AUTOCOMMITS=1 # Uncomment the following to avoid special file warning # (the option is enabled automatically for daily autocommits regardless). #AVOID_SPECIAL_FILE_WARNING=1 # Uncomment to avoid etckeeper committing existing changes to # /etc before installation. It will cancel the installation, # so you can commit the changes by hand. #AVOID_COMMIT_BEFORE_INSTALL=1 # The high-level package manager that's being used. # (apt, pacman, pacman-g2, yum, dnf, zypper etc) HIGHLEVEL_PACKAGE_MANAGER=apt # The low-level package manager that's being used. # (dpkg, rpm, pacman, pacmatic, pacman-g2, etc) LOWLEVEL_PACKAGE_MANAGER=dpkg # To push each commit to a remote, put the name of the remote here. # (eg, "origin" for git). Space-separated lists of multiple remotes # also work (eg, "origin gitlab github" for git). PUSH_REMOTE="" etckeeper-1.18.5/etckeeper.spec000066400000000000000000000044211274300712300164000ustar00rootroot00000000000000Name: etckeeper Version: 1.18.5 Release: 4%{?dist} Summary: store /etc in git, mercurial, bzr or darcs Group: System Tools License: GPLv2 URL: http://etckeeper.branchable.com/ Source0: http://ftp.debian.org/debian/pool/main/e/etckeeper/%{name}_%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: git >= 1.6.1-1 Obsoletes: etckeeper = snapshot, yum-etckeeper %description The etckeeper program is a tool to let /etc be stored in a git, mercurial, bzr or darcs repository. It hooks into yum to automatically commit changes made to /etc during package upgrades. It tracks file metadata that version control systems do not normally support, but that is important for /etc, such as the permissions of /etc/shadow. It's quite modular and configurable, while also being simple to use if you understand the basics of working with version control. %prep %setup -q -n %{name} %{__perl} -pi -e ' s|HIGHLEVEL_PACKAGE_MANAGER=apt|HIGHLEVEL_PACKAGE_MANAGER=yum|; s|LOWLEVEL_PACKAGE_MANAGER=dpkg|LOWLEVEL_PACKAGE_MANAGER=rpm|; ' %{_builddir}/%{name}/etckeeper.conf %build make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT install -D debian/cron.daily $RPM_BUILD_ROOT/etc/cron.daily/etckeeper %clean rm -rf $RPM_BUILD_ROOT %post %{_bindir}/etckeeper init -d /etc/ mkdir -p %{_var}/cache/etckeeper %files %defattr(-,root,root,-) %doc GPL INSTALL README.md %{_bindir}/* %{_mandir}/* # this isn't very clever and its a manual process update. # but it works %config(noreplace) /etc/yum/pluginconf.d/etckeeper.conf %config(noreplace) /etc/etckeeper/etckeeper.conf /etc/etckeeper/*.d/* /etc/cron.daily/etckeeper /etc/bash_completion.d/etckeeper %{_prefix}/lib/* %changelog * Fri Feb 27 2009 Jimmy Tang - 0.33-4 - fix up initial install to make directory in /var/cache/etckeeper - install the etckeeper daily cron job - define some config files that shouldn't be replaced, should the hooks in commit.d, init.d etc... saved and not blown away? if so they can defined as config files. etckeeper should record the changes anyway. * Wed Feb 25 2009 Jimmy Tang - 0.32-1 - yum etckeeper plugin is now apart of this package * Tue Feb 24 2009 Jimmy Tang - 0.31-1 - initial package etckeeper-1.18.5/init.d/000077500000000000000000000000001274300712300147415ustar00rootroot00000000000000etckeeper-1.18.5/init.d/10restore-metadata000077500000000000000000000007471274300712300203010ustar00rootroot00000000000000#!/bin/sh set -e # Note that metastore doesn't check that the .metastore file only changes # perms of files in the current directory. It's ok to trust the .metastore # file won't do anything shady, because, as documented, etckeeper-init # should only be run on repositories you trust. if [ -e .metadata ]; then if which metastore >/dev/null; then metastore --apply --mtime else echo "etckeeper warning: legacy .metastore file is present but metastore is not installed" >&2 fi fi etckeeper-1.18.5/init.d/20restore-etckeeper000077500000000000000000000006371274300712300204670ustar00rootroot00000000000000#!/bin/sh set -e # Used by .etckeeper to run a command if the file it acts on # (the last parameter) exists. maybe () { command="$1" shift 1 if eval [ -e "\"\$$#\"" ]; then "$command" "$@" fi } # Yes, this runs code from the repository. As documented, etckeeper-init # should only be run on repositories you trust. if [ -e .etckeeper ]; then . ./.etckeeper else touch .etckeeper chmod 600 .etckeeper fi etckeeper-1.18.5/init.d/40vcs-init000077500000000000000000000007501274300712300165710ustar00rootroot00000000000000#!/bin/sh set -e if [ "$VCS" = git ] && [ ! -e .git ]; then git init echo "$(hostname) /etc repository" > .git/description elif [ "$VCS" = hg ] && [ ! -e .hg ]; then hg init echo "[web]" > .hg/hgrc echo "description = $(hostname) /etc repository" >> .hg/hgrc elif [ "$VCS" = bzr ] && [ ! -e .bzr ]; then bzr init bzr nick "$(hostname) /etc repository" elif [ "$VCS" = darcs ] && [ ! -e _darcs ]; then darcs initialize echo "$(hostname) /etc repository" > _darcs/prefs/motd fi etckeeper-1.18.5/init.d/50vcs-ignore000077500000000000000000000000651274300712300171110ustar00rootroot00000000000000#!/bin/sh set -e etckeeper update-ignore -a || true etckeeper-1.18.5/init.d/50vcs-perm000077500000000000000000000003051274300712300165660ustar00rootroot00000000000000#!/bin/sh set -e if [ "$VCS" = git ]; then chmod 700 .git elif [ "$VCS" = hg ]; then chmod 700 .hg elif [ "$VCS" = bzr ]; then chmod 700 .bzr elif [ "$VCS" = darcs ]; then chmod 700 _darcs fi etckeeper-1.18.5/init.d/50vcs-pre-commit-hook000077500000000000000000000027251274300712300206450ustar00rootroot00000000000000#!/bin/sh set -e case "$VCS" in git) if [ -x .git/hooks/pre-commit ]; then if ! grep -q "etckeeper pre-commit" .git/hooks/pre-commit; then echo "etckeeper warning: .git/hooks/pre-commit needs to be manually modified to run: etckeeper pre-commit -d `pwd`" >&2 fi else cat >.git/hooks/pre-commit <&2 fi else touch .hg/hgrc cat >>.hg/hgrc <&2 fi else cat >_darcs/prefs/defaults < "$patternsfile" || true grep -Evf "$patternsfile" rm -f "$patternsfile" unset patternsfile else cat - fi } if [ "$VCS" = darcs ];then NOVCS='. -path ./.git -prune -o -path ./.bzr -prune -o -path ./.hg -prune -o -path ./_darcs -prune -o' # We assume that if .etckeeper is empty this is the first run if [ -s .etckeeper ]; then linksindex="$( mktemp -t etckeeper-$VCS.XXXXXXXXXX )" grep '^ln -s' .etckeeper | while IFS="'" read n n n link n; do printf "%s\n" "$link" >> "$linksindex" done # Warn about symbolic links that shouldn't exist if links=$( find $NOVCS -type l -print | filter_ignore | grep -vFf "$linksindex" ); then printf "%s\n%s\n" \ "The following symbolic links should not exist:" \ "$links" >&2 fi rm -f "$linksindex" unset links linksindex fi fi etckeeper-1.18.5/init.d/70vcs-add000077500000000000000000000011741274300712300163620ustar00rootroot00000000000000#!/bin/sh set -e if [ "$VCS" = git ]; then if ! git add .; then echo "etckeeper warning: git add failed" >&2 fi elif [ "$VCS" = hg ]; then if ! hg add .; then echo "etckeeper warning: hg add failed" >&2 fi elif [ "$VCS" = bzr ]; then if ! bzr add .; then echo "etckeeper warning: bzr add failed" >&2 fi elif [ "$VCS" = darcs ]; then # Don't warn if all the files were already added. rc=0 res=$( darcs add -qr . 2>&1 ) || rc=$? if test $rc -ne 0; then if ! test $rc -eq 2 -a "${res%No files were added}" != "$res"; then printf "%s" "$res" echo "etckeeper warning: darcs add failed" >&2 fi fi unset rc res fi etckeeper-1.18.5/init.d/README000066400000000000000000000012711274300712300156220ustar00rootroot00000000000000Executable files in this directory are run to initialise the working directory for use by etckeeper. If the working directory is not already in version control, that includes setting up the version control, but not actually committing anything. If the working directory is in version control, it includes applying stored metadata to the checked out files in the working directory. Please be careful to *never* overwrite existing files/directories in the working directory (or use absolute care when doing so). If a file you need to write already exists, check if its contents are sane, and if not, emit a warning on stderr. If initialisation fails, exit nonzero and no later files will be run. etckeeper-1.18.5/list-installed.d/000077500000000000000000000000001274300712300167265ustar00rootroot00000000000000etckeeper-1.18.5/list-installed.d/50list-installed000077500000000000000000000015461274300712300217570ustar00rootroot00000000000000#!/bin/sh if [ "$1" = fmt ]; then # If the list format changes, change the fmt if [ "$LOWLEVEL_PACKAGE_MANAGER" = dpkg ]; then echo 2 else echo "" fi else # Output to stdout a *sorted* list of all currently installed # (or removed but still with config-files) packages, in the # format "package version\n" (or something similar). if [ "$LOWLEVEL_PACKAGE_MANAGER" = dpkg ]; then dpkg-query -W -f '${Status}\t${Package} ${Version} ${Architecture}\n' | \ egrep '(ok installed|ok config-files)' | cut -f2,3 elif [ "$LOWLEVEL_PACKAGE_MANAGER" = rpm ]; then rpm -qa --qf "%|epoch?{%{epoch}}:{0}|:%{name}-%{version}-%{release}.%{arch}\n" | sort elif [ "$LOWLEVEL_PACKAGE_MANAGER" = pacman ]; then pacman -Q elif [ "$LOWLEVEL_PACKAGE_MANAGER" = pacmatic ]; then pacmatic -Q elif [ "$LOWLEVEL_PACKAGE_MANAGER" = pkgng ]; then pkg info -E "*" fi fi etckeeper-1.18.5/pacman-g2.hook000066400000000000000000000003141274300712300162010ustar00rootroot00000000000000#!/bin/sh pre_sysupgrade() { if [ -x /usr/bin/etckeeper ]; then etckeeper pre-install fi } post_sysupgrade() { if [ -x /usr/bin/etckeeper ]; then etckeeper post-install fi } op=$1 shift $op $* etckeeper-1.18.5/pacman-post-install.hook000066400000000000000000000004431274300712300203250ustar00rootroot00000000000000# etckeeper post-install hook for Pacman 5 and newer [Trigger] Operation = Install Operation = Upgrade Operation = Remove Type = File Target = etc/* [Action] Description = etckeeper: post-transaction commit When = PostTransaction Exec = /usr/bin/etckeeper post-install Depends = etckeeper etckeeper-1.18.5/pacman-pre-install.hook000066400000000000000000000004531274300712300201270ustar00rootroot00000000000000# etckeeper pre-install hook for Pacman 5 and newer [Trigger] Operation = Install Operation = Upgrade Operation = Remove Type = File Target = etc/* [Action] Description = etckeeper: pre-transaction commit When = PreTransaction Exec = /usr/bin/etckeeper pre-install Depends = etckeeper AbortOnFail etckeeper-1.18.5/pkgng/000077500000000000000000000000001274300712300146625ustar00rootroot00000000000000etckeeper-1.18.5/pkgng/Makefile000066400000000000000000000004361274300712300163250ustar00rootroot00000000000000.include PREFIX?= /usr/local LIBDIR= ${PREFIX}/lib/pkg/ SHLIB_DIR?= ${LIBDIR}/ SHLIB_NAME?= ${PLUGIN_NAME}.so PLUGIN_NAME= etckeeper SRCS= etckeeper.c PKGFLAGS!= pkgconf --cflags pkg CFLAGS+= ${PKGFLAGS} beforeinstall: ${INSTALL} -d ${LIBDIR} .include etckeeper-1.18.5/pkgng/README000066400000000000000000000002651274300712300155450ustar00rootroot00000000000000To use on FreeBSD, install etckeeper manually and install the plugin with: $ cd pkgng $ make $ make install and add this line to /usr/local/etc/pkg.conf: PLUGINS [ etckeeper ] etckeeper-1.18.5/pkgng/etckeeper.c000066400000000000000000000077621274300712300170110ustar00rootroot00000000000000/* * Copyright (c) 2015 William Johansson * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer * in this position and unchanged. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Based upon the pkg plugin zfssnap: * Copyright (c) 2012 Marin Atanasov Nikolov */ #include #include #include #include #include #include #define PLUGIN_NAME "etckeeper" /* TODO: make configuration param? */ #define ETCKEEPER_PATH "/usr/local/bin/etckeeper" extern char **environ; struct pkg_plugin *self; static int pre_install_hook(void *data, struct pkgdb *db); static int post_install_hook(void *data, struct pkgdb *db); int pkg_plugin_init(struct pkg_plugin *p) { self = p; pkg_plugin_set(p, PKG_PLUGIN_NAME, PLUGIN_NAME); pkg_plugin_set(p, PKG_PLUGIN_DESC, "etckeeper plugin"); pkg_plugin_set(p, PKG_PLUGIN_VERSION, "1.0.0"); /* NOTE: upgrade/deinstall is regarded as install */ if (pkg_plugin_hook_register(p, PKG_PLUGIN_HOOK_PRE_INSTALL, &pre_install_hook) != EPKG_OK) { pkg_plugin_error(self, "failed to hook into the library"); return (EPKG_FATAL); } if (pkg_plugin_hook_register(p, PKG_PLUGIN_HOOK_POST_INSTALL, &post_install_hook) != EPKG_OK) { pkg_plugin_error(self, "failed to hook into the library"); return (EPKG_FATAL); } if (pkg_plugin_hook_register(p, PKG_PLUGIN_HOOK_PRE_DEINSTALL, &pre_install_hook) != EPKG_OK) { pkg_plugin_error(self, "failed to hook into the library"); return (EPKG_FATAL); } if (pkg_plugin_hook_register(p, PKG_PLUGIN_HOOK_POST_DEINSTALL, &post_install_hook) != EPKG_OK) { pkg_plugin_error(self, "failed to hook into the library"); return (EPKG_FATAL); } if (pkg_plugin_hook_register(p, PKG_PLUGIN_HOOK_PRE_UPGRADE, &pre_install_hook) != EPKG_OK) { pkg_plugin_error(self, "failed to hook into the library"); return (EPKG_FATAL); } if (pkg_plugin_hook_register(p, PKG_PLUGIN_HOOK_POST_UPGRADE, &post_install_hook) != EPKG_OK) { pkg_plugin_error(self, "failed to hook into the library"); return (EPKG_FATAL); } return (EPKG_OK); } static int call_etckeeper(char *arg) { int error, pstat; pid_t pid; char *argv[] = { "etckeeper", arg, NULL, }; if ((error = posix_spawn(&pid, ETCKEEPER_PATH, NULL, NULL, __DECONST(char **, argv), environ)) != 0) { errno = error; pkg_plugin_errno(self, "Failed to spawn process", arg); return (EPKG_FATAL); } while (waitpid(pid, &pstat, 0) == -1) { if (errno != EINTR) return (EPKG_FATAL); } if ((error = WEXITSTATUS(pstat)) != 0) { pkg_plugin_error(self, "etckeeper failed with exit code %d", error); return (EPKG_FATAL); } return (EPKG_OK); } static int pre_install_hook(void *data, struct pkgdb *db) { return call_etckeeper("pre-install"); } static int post_install_hook(void *data, struct pkgdb *db) { return call_etckeeper("post-install"); } etckeeper-1.18.5/post-install.d/000077500000000000000000000000001274300712300164275ustar00rootroot00000000000000etckeeper-1.18.5/post-install.d/50vcs-commit000077500000000000000000000012471274300712300206070ustar00rootroot00000000000000#!/bin/sh set -e pl="/var/cache/etckeeper/packagelist" if etckeeper unclean; then message="committing changes in /etc after $HIGHLEVEL_PACKAGE_MANAGER run" set +e if [ -e $pl.pre-install ] && [ "$(cat $pl.fmt 2>/dev/null || true)" = "$(etckeeper list-installed fmt)" ]; then ( echo "$message" echo echo "Package changes:" etckeeper list-installed | diff -U0 $pl.pre-install - | tail -n+4 | egrep '^[-+]' || true ) | etckeeper commit --stdin else etckeeper commit "$(printf "$message")" fi status=$? set -e if [ "$status" != 0 ]; then echo "warning: etckeeper failed to commit changes in /etc using $VCS" >&2 fi fi rm -f $pl.pre-install $pl.fmt etckeeper-1.18.5/post-install.d/README000066400000000000000000000002151274300712300173050ustar00rootroot00000000000000Files in this directory are run after packages are installed, upgraded, etc. They should commit changes and new files in /etc to repository. etckeeper-1.18.5/pre-commit.d/000077500000000000000000000000001274300712300160525ustar00rootroot00000000000000etckeeper-1.18.5/pre-commit.d/20warn-problem-files000077500000000000000000000021551274300712300216520ustar00rootroot00000000000000#!/bin/sh set -e exclude_internal () { egrep -v '(^|/)(.git|.hg|.bzr|_darcs)/' } if [ "$VCS" = bzr ] || [ "$VCS" = darcs ]; then special=$(find . ! -type d ! -type f ! -type l | exclude_internal) || true hardlinks=$(find . -type f ! -links 1 | exclude_internal ) || true elif [ "$VCS" = hg ]; then special=$(find . ! -type d ! -type f ! -type l | exclude_internal) || true hardlinks=$(find . -type f ! -links 1 -exec hg status {} \; | exclude_internal ) || true elif [ "$VCS" = git ]; then special=$(find . ! -type d ! -type f ! -type l -exec git ls-files --exclude-standard --cached --others {} + | exclude_internal) || true hardlinks=$(find . -type f ! -links 1 -exec git ls-files --exclude-standard --cached --others {} + | exclude_internal) || true else special="" fi if [ -n "$special" ] && [ -z "$AVOID_SPECIAL_FILE_WARNING" ]; then echo "etckeeper warning: special files could cause problems with $VCS:" >&2 echo "$special" >&2 fi if [ -n "$hardlinks" ] && [ -z "$AVOID_SPECIAL_FILE_WARNING" ]; then echo "etckeeper warning: hardlinked files could cause problems with $VCS:" >&2 echo "$hardlinks" >&2 fi true etckeeper-1.18.5/pre-commit.d/30store-metadata000077500000000000000000000100171274300712300210540ustar00rootroot00000000000000#!/bin/sh set -e filter_ignore() { case "$VCS" in darcs) ignorefile=.darcsignore ;; git) ignorefile=.gitignore ;; esac if [ -n "$ignorefile" ] && [ -e "$ignorefile" ]; then listfile="$( mktemp -t etckeeper-$VCS.XXXXXXXXXX )" case "$VCS" in darcs) grep -v '^[[:space:]]*\(#\|$\)' "$ignorefile" > "$listfile" || true grep -Evf "$listfile" ;; git) (git ls-files -oi --exclude-standard; git ls-files -oi --exclude-standard --directory) | sort | uniq > "$listfile" || true sed 's/^\.\///' | grep -xFvf "$listfile" ;; esac rm -f "$listfile" unset listfile else cat - fi } shellquote() { # Single quotes text, escaping existing single quotes. sed -e "s/'/'\"'\"'/g" -e "s/^/'/" -e "s/$/'/" } generate_metadata() { # This function generates the script commands to fix any file # ownerships that aren't owner=root, group=root, as well as to # store the permissions of files. # The script is produced on stdout. Errors go to stderr. # # The script can use a 'maybe' function, which only runs a command # if the file in its last argument exists. # We want files in the directory containing VCS data # but we want find to ignore the VCS files themselves. # # (Note that when using this, the find expression must end with # -print or -exec, else the excluded directories will actually be # printed!) NOVCS='. -path ./.git -prune -o -path ./.bzr -prune -o -path ./.hg -prune -o -path ./_darcs -prune -o' # Keep the sort order the same at all times. LC_COLLATE=C export LC_COLLATE if [ "$VCS" = git ] || [ "$VCS" = hg ]; then # These version control systems do not track directories, # so empty directories must be stored specially. find $NOVCS -type d -empty -print | sort | shellquote | sed -e "s/^/mkdir -p /" fi if [ "$VCS" = darcs ]; then # This version control system does not track symlinks, # so they must be stored specially. find $NOVCS -type l -print | sort | filter_ignore | while read link; do dest=$( readlink "$link" ) printf "ln -sf '%s' '%s'\n" "$(echo "$dest" | shellquote)" "$(echo "$link" | shellquote)" done fi # Store things that don't have the default user or group. # Store all file modes, in case the user has an unusual umask. find $NOVCS \( -type f -or -type d \) -print | filter_ignore | sort | perl -ne ' BEGIN { $q=chr(39) } sub uidname { my $want=shift; if (exists $uidcache{$want}) { return $uidcache{$want}; } my $name=scalar getpwuid($want); return $uidcache{$want}=defined $name ? $name : $want; } sub gidname { my $want=shift; if (exists $gidcache{$want}) { return $gidcache{$want}; } my $name=scalar getgrgid($want); return $gidcache{$want}=defined $name ? $name : $want; } chomp; my @stat=stat($_); my $mode = $stat[2]; my $uid = $stat[4]; my $gid = $stat[5]; s/$q/$q"$q"$q/g; # escape single quotes s/^/$q/; s/$/$q/; if ($uid != $>) { printf "maybe chown $q%s$q %s\n", uidname($uid), $_; } if ($gid != $)) { printf "maybe chgrp $q%s$q %s\n", gidname($gid), $_; } printf "maybe chmod %04o %s\n", $mode & 07777, $_; ' # We don't handle xattrs. # Maybe check for getfattr/setfattr and use them if they're available? } if [ "$VCS" = git ] || [ "$VCS" = hg ] || [ "$VCS" = bzr ] || [ "$VCS" = darcs ]; then if [ -f .metadata ]; then # remove obsolete .metadata file # git allows fully deleting it at this point, other VCS # may not (the repo is locked for hg). if [ "$VCS" = git ]; then $VCS rm .metadata else rm -f .metadata fi fi echo "# Generated by etckeeper. Do not edit." > .etckeeper echo >> .etckeeper # Make sure the file is not readable by others, since it can leak # information about contents of non-readable directories in /etc. chmod 700 .etckeeper generate_metadata >> .etckeeper # stage the file as part of the current commit if [ "$VCS" = git ]; then # this will do nothing if the metadata file is unchanged. git add .etckeeper fi # hg, bzr and darcs add not done, they will automatically # include the file in the current commit fi etckeeper-1.18.5/pre-commit.d/README000066400000000000000000000002201274300712300167240ustar00rootroot00000000000000This is run by a git pre-commit hook before committing changes to the repository. This can be used for storing metadata, and for sanity checks. etckeeper-1.18.5/pre-install.d/000077500000000000000000000000001274300712300162305ustar00rootroot00000000000000etckeeper-1.18.5/pre-install.d/10packagelist000077500000000000000000000003451274300712300206100ustar00rootroot00000000000000#!/bin/sh # This list will be later used when committing. mkdir -p /var/cache/etckeeper/ etckeeper list-installed > /var/cache/etckeeper/packagelist.pre-install etckeeper list-installed fmt > /var/cache/etckeeper/packagelist.fmt etckeeper-1.18.5/pre-install.d/50uncommitted-changes000077500000000000000000000010021274300712300222520ustar00rootroot00000000000000#!/bin/sh set -e if etckeeper unclean; then if [ "$AVOID_COMMIT_BEFORE_INSTALL" = 1 ]; then echo "" >&2 echo "** etckeeper detected uncommitted changes in /etc prior to $HIGHLEVEL_PACKAGE_MANAGER run" >&2 echo "** Aborting $HIGHLEVEL_PACKAGE_MANAGER run. Manually commit and restart." >&2 echo "" >&2 exit 1 fi if ! etckeeper commit "saving uncommitted changes in /etc prior to $HIGHLEVEL_PACKAGE_MANAGER run"; then echo "warning: etckeeper failed to commit changes in /etc using $VCS" >&2 fi fi etckeeper-1.18.5/pre-install.d/README000066400000000000000000000002411274300712300171050ustar00rootroot00000000000000Files in this directory are run before packages are installed, upgraded, etc. This is mostly used for sanity checks, ie, does /etc have any uncommitted changes? etckeeper-1.18.5/systemd/000077500000000000000000000000001274300712300152445ustar00rootroot00000000000000etckeeper-1.18.5/systemd/etckeeper.service000066400000000000000000000004271274300712300206000ustar00rootroot00000000000000[Unit] Description=Autocommit of changes in /etc directory Documentation=man:etckeeper(8) DefaultDependencies=no Conflicts=shutdown.target After=local-fs.target time-sync.target Before=shutdown.target [Service] Type=oneshot ExecStart=/etc/etckeeper/daily IOSchedulingClass=idle etckeeper-1.18.5/systemd/etckeeper.timer000066400000000000000000000002621274300712300202550ustar00rootroot00000000000000[Unit] Description=Daily autocommit of changes in /etc directory Documentation=man:etckeeper(8) [Timer] OnBootSec=15min OnUnitActiveSec=1d [Install] WantedBy=multi-user.target etckeeper-1.18.5/unclean.d/000077500000000000000000000000001274300712300154235ustar00rootroot00000000000000etckeeper-1.18.5/unclean.d/50test000077500000000000000000000005601274300712300164760ustar00rootroot00000000000000#!/bin/sh set -e if [ "$VCS" = git ]; then [ -d .git ] && [ -n "`git status --porcelain`" ] elif [ "$VCS" = hg ]; then [ -d .hg ] && ! hg status 2>&1 | wc -l | grep -q "^0$" elif [ "$VCS" = bzr ]; then [ -d .bzr ] && ! bzr version-info --custom --template="{clean}\n" | grep -q "^1$" elif [ "$VCS" = darcs ]; then [ -d _darcs ] && darcs whatsnew -l >/dev/null fi etckeeper-1.18.5/unclean.d/README000066400000000000000000000001261274300712300163020ustar00rootroot00000000000000Files in this directory are used to test if the working copy has uncommitted changes. etckeeper-1.18.5/uninit.d/000077500000000000000000000000001274300712300153045ustar00rootroot00000000000000etckeeper-1.18.5/uninit.d/01prompt000077500000000000000000000005621274300712300167170ustar00rootroot00000000000000#!/bin/sh set -e if [ "$1" != "-f" ]; then echo "** Warning: This will DESTROY all recorded history for $ETCKEEPER_DIR," echo "** including the $VCS repository." echo "" printf "Are you sure you want to do this? [yN] " read answer case "$answer" in [Yy]*) echo "Proceeding.." exit 0 ;; *) echo "Aborting etckeeper uninit." exit 1 ;; esac fi etckeeper-1.18.5/uninit.d/50remove-metadata000077500000000000000000000002361274300712300204530ustar00rootroot00000000000000#!/bin/sh set -e # Files generated by etckeeper to store metadata the VCS cannot preserve. rm -f .etckeeper rm -f .metadata # only generated by old versions etckeeper-1.18.5/uninit.d/50vcs-uninit000077500000000000000000000020431274300712300174750ustar00rootroot00000000000000#!/bin/sh set -e if [ "$VCS" = git ]; then rm -rf .git file=.gitignore elif [ "$VCS" = hg ]; then rm -rf .hg file=.hgignore elif [ "$VCS" = bzr ]; then rm -rf .bzr file=.bzrignore elif [ "$VCS" = darcs ]; then rm -rf _darcs file=.darcsignore fi managed_by_etckeeper="managed by etckeeper" if ! grep -q "$managed_by_etckeeper" "$file"; then exit 0 else realfile="$file" if which tempfile >/dev/null 2>&1 || type tempfile >/dev/null 2>&1; then tempfile="tempfile" elif which mktemp >/dev/null 2>&1 || type mktemp >/dev/null 2>&1; then tempfile="mktemp" else echo "etckeeper warning: can't find tempfile or mktemp" >&2 exit 1 fi file=$($tempfile) otherentries= skipping= while read -r line; do if echo "$line" | grep -q "$managed_by_etckeeper"; then if [ ! "$skipping" ]; then skipping=1 else skipping= fi elif [ ! "$skipping" ]; then echo "$line" >> "$file" otherentries=1 fi done <"$realfile" if [ "$otherentries" ]; then mv -f "$file" "$realfile" else rm -f "$file" rm -f "$realfile" fi fi etckeeper-1.18.5/uninit.d/README000066400000000000000000000001741274300712300161660ustar00rootroot00000000000000Executable files in this directory are run to uninitialise the working directory, removing files added by `etckeeper init`. etckeeper-1.18.5/update-ignore.d/000077500000000000000000000000001274300712300165415ustar00rootroot00000000000000etckeeper-1.18.5/update-ignore.d/01update-ignore000077500000000000000000000107621274300712300214010ustar00rootroot00000000000000#!/bin/sh set -e if [ "$VCS" = git ]; then dir=.git file=.gitignore elif [ "$VCS" = hg ]; then dir=.hg file=.hgignore elif [ "$VCS" = bzr ]; then dir=.bzr file=.bzrignore elif [ "$VCS" = darcs ]; then dir=_darcs file=.darcsignore else echo "etckeeper: unsupported VCS $VCS" >&2 exit 1 fi if [ ! -d "$dir" ]; then exit 0 fi managed_by_etckeeper="managed by etckeeper" nl() { echo >>"$file" } comment() { comment="$1" echo "# $comment" >>"$file" } ignore() { glob="$1" case "$VCS" in git) # escape "#" in ignores, as otherwise it may # be considered a comment echo "$glob" | sed 's/#/\\#/g' >>"$file" ;; bzr) echo "$glob" >>"$file" ;; hg) # rather than converting the glob to a regexp, just # configure hg to use globs if [ -z "$hg_syntax_printed" ]; then comment "use glob syntax" echo "syntax: glob" >>"$file" nl hg_syntax_printed=1 fi echo "$glob" | sed 's/#/\\#/g' >>"$file" ;; darcs) # darcs doesn't understand globs, so we need to # translate them into regexs. Not a complete converter, # but suitable for given globs. if [ "${glob%\*}" != "$glob" ]; then glob="${glob%\*}" else glob="$glob"'($|/)' fi if [ "${glob#\*}" != "$glob" ]; then glob="${glob#\*}" else glob='(^|/)'"$glob" fi glob="$( printf %s $glob | sed -e 's/\./\\./g;s/\*/[^\/]*/g;s/\?/[^\/]/g' )" echo "$glob" >>"$file" esac } writefile () { comment "begin section $managed_by_etckeeper (do not edit this section by hand)" nl if [ "$VCS" = darcs ]; then darcs setpref boringfile .darcsignore fi if [ "$LOWLEVEL_PACKAGE_MANAGER" = dpkg ]; then comment "new and old versions of conffiles, stored by dpkg" ignore "*.dpkg-*" comment "new and old versions of conffiles, stored by ucf" ignore "*.ucf-*" nl elif [ "$LOWLEVEL_PACKAGE_MANAGER" = "rpm" ]; then comment "new and old versions of conffiles, stored by apt/rpm" ignore "*.rpm*" nl elif [ "$LOWLEVEL_PACKAGE_MANAGER" = "pacman-g2" -o "$LOWLEVEL_PACKAGE_MANAGER" = "pacman" -o "$LOWLEVEL_PACKAGE_MANAGER" = "pacmatic" ]; then comment "new and old versions of conffiles, stored by pacman" ignore "*.pacnew" ignore "*.pacorig" ignore "*.pacsave" nl fi comment "old versions of files" ignore "*.old" # Not currently ignored as admins tend to rely on these files. #ignore "passwd-" #ignore "group-" #ignore "shadow-" #ignore "gshadow-" nl comment "mount(8) records system state here, no need to store these" ignore blkid.tab ignore blkid.tab.old nl comment "some other files in /etc that typically do not need to be tracked" ignore nologin ignore ld.so.cache ignore prelink.cache ignore mtab ignore mtab.fuselock ignore .pwd.lock ignore "*.LOCK" ignore network/run ignore adjtime ignore lvm/cache ignore lvm/archive ignore "X11/xdm/authdir/authfiles/*" ignore ntp.conf.dhcp ignore .initctl ignore "webmin/fsdump/*.status" ignore "webmin/webmin/oscache" ignore "apparmor.d/cache/*" ignore "service/*/supervise/*" ignore "service/*/log/supervise/*" ignore "sv/*/supervise/*" ignore "sv/*/log/supervise/*" ignore "*.elc" ignore "*.pyc" ignore "*.pyo" ignore "init.d/.depend.*" ignore "openvpn/openvpn-status.log" ignore "cups/subscriptions.conf" ignore "cups/subscriptions.conf.O" ignore "fake-hwclock.data" ignore "check_mk/logwatch.state" nl comment "editor temp files" ignore "*~" ignore ".*.sw?" ignore ".sw?" ignore "#*#" ignore DEADJOE nl comment "end section $managed_by_etckeeper" } if [ -e "$file" ]; then if ! grep -q "$managed_by_etckeeper" "$file"; then if [ "$1" != "-a" ]; then echo "etckeeper: "$file" does not contain \"$managed_by_etckeeper\" comment; not updating" exit 1 else echo "etckeeper: "$file" exists but does not contain \"$managed_by_etckeeper\" comment; updating" writefile exit 0 fi fi realfile="$file" if which tempfile >/dev/null 2>&1 || type tempfile >/dev/null 2>&1; then tempfile="tempfile" elif which mktemp >/dev/null 2>&1 || type mktemp >/dev/null 2>&1; then tempfile="mktemp" else echo "etckeeper warning: can't find tempfile or mktemp" >&2 fi file=$($tempfile) ( skipping= while read -r line; do if echo "$line" | grep -q "$managed_by_etckeeper"; then if [ ! "$skipping" ]; then skipping=1 else skipping= writefile fi elif [ ! "$skipping" ]; then echo "$line" >> "$file" fi done if [ "$skipping" ]; then # reached end of file w/o ending block writefile fi ) <"$realfile" mv -f "$file" "$realfile" else writefile fi etckeeper-1.18.5/update-ignore.d/README000066400000000000000000000001551274300712300174220ustar00rootroot00000000000000Executable files in this directory are run to update the VCS ignore file, or create it if it does not exist. etckeeper-1.18.5/vcs.d/000077500000000000000000000000001274300712300145715ustar00rootroot00000000000000etckeeper-1.18.5/vcs.d/50vcs-cmd000077500000000000000000000003701274300712300162200ustar00rootroot00000000000000#!/bin/sh set -e # check whether we can locate the vcs binary if [ -n "$VCS" ] && which "$VCS" > /dev/null; then # pass commands to the VCS application $VCS "$@" else echo "error: VCS ($VCS) not set or not in PATH" >&2 exit 1 fi etckeeper-1.18.5/yum-etckeeper.conf000066400000000000000000000000211274300712300171730ustar00rootroot00000000000000[main] enabled=1 etckeeper-1.18.5/yum-etckeeper.py000066400000000000000000000022141274300712300167040ustar00rootroot00000000000000# # # author: jtang@tchpc.tcd.ie # # this plugin is based on the hello world example # from http://yum.baseurl.org/wiki/WritingYumPlugins # # to install, copy this file to /usr/lib/yum-plugins/etckeeper.py # and then create /etc/yum/pluginconf.d/etckeeper.conf with the contents # below. # # /etc/yum/pluginconf.d/etckeeper.conf: # [main] # enabled=1 # import os from glob import fnmatch import yum from yum.plugins import PluginYumExit, TYPE_CORE requires_api_version = '2.1' plugin_type = (TYPE_CORE,) def pretrans_hook(conduit): conduit.info(2, 'etckeeper: pre transaction commit') servicecmd = conduit.confString('main', 'servicecmd', '/usr/bin/etckeeper') command = '%s %s > /dev/null' % (servicecmd, " pre-install") ret = os.system(command) if ret != 0: raise PluginYumExit('etckeeper returned %d' % (ret >> 8)) def posttrans_hook(conduit): conduit.info(2, 'etckeeper: post transaction commit') if os.path.exists('/usr/bin/etckeeper'): servicecmd = conduit.confString('main', 'servicecmd', '/usr/bin/etckeeper') command = '%s %s > /dev/null' % (servicecmd, "post-install") os.system(command) etckeeper-1.18.5/zypper-etckeeper.py000077500000000000000000000022251274300712300174300ustar00rootroot00000000000000#!/usr/bin/env python import errno import subprocess import zypp_plugin import os def _call_etckeeper(install_arg): # zypper interprets the plugin's stdout as described in # http://doc.opensuse.org/projects/libzypp/HEAD/zypp-plugins.html so it's # important that we don't write anything to it. We therefore redirect # etckeeper's stdout to the plugin's stderr. Since zypper writes the # stderr of plugins to its log file, etckeeper's stdout will go there as # well. subprocess.call(['etckeeper', install_arg], stdout=2) class EtckeeperPlugin(zypp_plugin.Plugin): def PLUGINBEGIN(self, headers, body): _call_etckeeper('pre-install') self.ack() def PLUGINEND(self, headers, body): try: _call_etckeeper('post-install') except OSError as e: # if etckeeper was just removed, executing it will fail with # ENOENT if e.errno != errno.ENOENT: # reraise so that we don't hide other errors than etckeeper # not existing raise self.ack() os.environ["LANG"] = "C" plugin = EtckeeperPlugin() plugin.main()