From fdeec420b54e252e611c353ce39fe61c924e3e7d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 31 Jul 2013 11:33:45 -0400 Subject: etckeeper (1.7) unstable; urgency=low * Fix hilarious typo hardcoding my name. Closes: #718425 # imported from the archive --- GPL | 339 ++++++++++++++++ INSTALL | 5 + Makefile | 52 +++ README | 272 +++++++++++++ TODO | 26 ++ apt.conf | 5 + bash_completion | 8 + commit.d/10vcs-test | 17 + commit.d/30bzr-add | 8 + commit.d/30darcs-add | 14 + commit.d/30git-add | 8 + commit.d/30hg-addremove | 8 + commit.d/50vcs-commit | 104 +++++ commit.d/99push | 8 + commit.d/README | 3 + cruft_filter | 13 + debian/changelog | 755 ++++++++++++++++++++++++++++++++++++ debian/compat | 1 + debian/control | 25 ++ debian/copyright | 7 + debian/cron.daily | 19 + debian/docs | 1 + debian/po/POTFILES.in | 1 + debian/po/cs.po | 67 ++++ debian/po/da.po | 57 +++ debian/po/de.po | 71 ++++ debian/po/es.po | 85 ++++ debian/po/eu.po | 69 ++++ debian/po/fi.po | 62 +++ debian/po/fr.po | 65 ++++ debian/po/gl.po | 63 +++ debian/po/it.po | 57 +++ debian/po/ja.po | 56 +++ debian/po/nl.po | 61 +++ debian/po/pl.po | 47 +++ debian/po/pt.po | 58 +++ debian/po/pt_BR.po | 59 +++ debian/po/ru.po | 60 +++ debian/po/sv.po | 59 +++ debian/po/templates.pot | 52 +++ debian/po/vi.po | 54 +++ debian/postinst | 98 +++++ debian/postrm | 31 ++ debian/preinst | 83 ++++ debian/prerm | 19 + debian/rules | 10 + debian/templates | 25 ++ etckeeper | 121 ++++++ etckeeper-bzr/__init__.py | 34 ++ etckeeper.8 | 72 ++++ etckeeper.conf | 42 ++ etckeeper.spec | 75 ++++ init.d/10restore-metadata | 14 + init.d/20restore-etckeeper | 22 ++ init.d/40vcs-init | 17 + init.d/50vcs-ignore | 4 + init.d/50vcs-perm | 12 + init.d/50vcs-pre-commit-hook | 49 +++ init.d/60darcs-deleted-symlinks | 48 +++ init.d/70vcs-add | 27 ++ init.d/README | 13 + list-installed.d/50list-installed | 12 + pacman-g2.hook | 17 + post-install.d/50vcs-commit | 23 ++ post-install.d/README | 2 + pre-commit.d/20warn-problem-files | 30 ++ pre-commit.d/30store-metadata | 144 +++++++ pre-commit.d/README | 2 + pre-install.d/10packagelist | 4 + pre-install.d/50uncommitted-changes | 29 ++ pre-install.d/README | 3 + unclean.d/50test | 12 + unclean.d/README | 2 + uninit.d/01prompt | 20 + uninit.d/50remove-metadata | 6 + uninit.d/50vcs-uninit | 54 +++ uninit.d/README | 2 + update-ignore.d/01update-ignore | 205 ++++++++++ update-ignore.d/README | 2 + vcs.d/50vcs-cmd | 11 + yum-etckeeper.conf | 2 + yum-etckeeper.py | 39 ++ zypper-etckeeper.py | 38 ++ 83 files changed, 4276 insertions(+) create mode 100644 GPL create mode 100644 INSTALL create mode 100644 Makefile create mode 100644 README create mode 100644 TODO create mode 100644 apt.conf create mode 100644 bash_completion create mode 100755 commit.d/10vcs-test create mode 100755 commit.d/30bzr-add create mode 100755 commit.d/30darcs-add create mode 100755 commit.d/30git-add create mode 100755 commit.d/30hg-addremove create mode 100755 commit.d/50vcs-commit create mode 100755 commit.d/99push create mode 100644 commit.d/README create mode 100644 cruft_filter create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/cron.daily create mode 100644 debian/docs create mode 100644 debian/po/POTFILES.in create mode 100644 debian/po/cs.po create mode 100644 debian/po/da.po create mode 100644 debian/po/de.po create mode 100644 debian/po/es.po create mode 100644 debian/po/eu.po create mode 100644 debian/po/fi.po create mode 100644 debian/po/fr.po create mode 100644 debian/po/gl.po create mode 100644 debian/po/it.po create mode 100644 debian/po/ja.po create mode 100644 debian/po/nl.po create mode 100644 debian/po/pl.po create mode 100644 debian/po/pt.po create mode 100644 debian/po/pt_BR.po create mode 100644 debian/po/ru.po create mode 100644 debian/po/sv.po create mode 100644 debian/po/templates.pot create mode 100644 debian/po/vi.po create mode 100644 debian/postinst create mode 100644 debian/postrm create mode 100644 debian/preinst create mode 100644 debian/prerm create mode 100755 debian/rules create mode 100644 debian/templates create mode 100755 etckeeper create mode 100755 etckeeper-bzr/__init__.py create mode 100644 etckeeper.8 create mode 100644 etckeeper.conf create mode 100644 etckeeper.spec create mode 100755 init.d/10restore-metadata create mode 100755 init.d/20restore-etckeeper create mode 100755 init.d/40vcs-init create mode 100755 init.d/50vcs-ignore create mode 100755 init.d/50vcs-perm create mode 100755 init.d/50vcs-pre-commit-hook create mode 100755 init.d/60darcs-deleted-symlinks create mode 100755 init.d/70vcs-add create mode 100644 init.d/README create mode 100755 list-installed.d/50list-installed create mode 100644 pacman-g2.hook create mode 100755 post-install.d/50vcs-commit create mode 100644 post-install.d/README create mode 100755 pre-commit.d/20warn-problem-files create mode 100755 pre-commit.d/30store-metadata create mode 100644 pre-commit.d/README create mode 100755 pre-install.d/10packagelist create mode 100755 pre-install.d/50uncommitted-changes create mode 100644 pre-install.d/README create mode 100755 unclean.d/50test create mode 100644 unclean.d/README create mode 100755 uninit.d/01prompt create mode 100755 uninit.d/50remove-metadata create mode 100755 uninit.d/50vcs-uninit create mode 100644 uninit.d/README create mode 100755 update-ignore.d/01update-ignore create mode 100644 update-ignore.d/README create mode 100755 vcs.d/50vcs-cmd create mode 100644 yum-etckeeper.conf create mode 100644 yum-etckeeper.py create mode 100755 zypper-etckeeper.py diff --git a/GPL b/GPL new file mode 100644 index 0000000..d511905 --- /dev/null +++ b/GPL @@ -0,0 +1,339 @@ + 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. diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..56c26e7 --- /dev/null +++ b/INSTALL @@ -0,0 +1,5 @@ +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. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..cb1ca18 --- /dev/null +++ b/Makefile @@ -0,0 +1,52 @@ +# 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 + +INSTALL=install +INSTALL_EXE=${INSTALL} -D +INSTALL_DATA=${INSTALL} -m 0644 -D + +build: etckeeper.spec + -./etckeeper-bzr/__init__.py build || echo "** bzr support not built" + +install: + mkdir -p $(DESTDIR)$(etcdir)/etckeeper/ $(DESTDIR)$(vardir)/cache/etckeeper/ + cp -dR *.d $(DESTDIR)$(etcdir)/etckeeper/ + $(INSTALL_DATA) $(CONFFILE) $(DESTDIR)$(etcdir)/etckeeper/etckeeper.conf + $(INSTALL_EXE) etckeeper $(DESTDIR)$(bindir)/etckeeper + $(INSTALL_DATA) etckeeper.8 $(DESTDIR)$(mandir)/man8/etckeeper.8 + $(INSTALL_DATA) bash_completion $(DESTDIR)$(etcdir)/bash_completion.d/etckeeper +ifeq ($(HIGHLEVEL_PACKAGE_MANAGER),apt) + $(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-g2) + $(INSTALL_DATA) pacman-g2.hook $(DESTDIR)$(etcdir)/pacman-g2/hooks/etckeeper +endif +ifeq ($(HIGHLEVEL_PACKAGE_MANAGER),yum) + $(INSTALL_DATA) yum-etckeeper.py $(DESTDIR)$(prefix)/lib/yum-plugins/etckeeper.py + $(INSTALL_DATA) yum-etckeeper.conf $(DESTDIR)$(etcdir)/yum/pluginconf.d/etckeeper.conf +endif +ifeq ($(HIGHLEVEL_PACKAGE_MANAGER),zypper) + $(INSTALL_DATA) zypper-etckeeper.py $(DESTDIR)$(prefix)/lib/zypp/plugins/commit/zypper-etckeeper.py +endif + -./etckeeper-bzr/__init__.py install --root=$(DESTDIR) ${PYTHON_INSTALL_OPTS} || echo "** bzr support not installed" + echo "** installation successful" + +clean: etckeeper.spec + rm -rf build + +etckeeper.spec: + sed -i~ "s/Version:.*/Version: $$(perl -e '$$_=<>;print m/\((.*?)\)/'> .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@kodama:/etc>git remote add dodo ssh://dodo/etc + root@kodama:/etc>git fetch dodo + root@kodama:/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 kodama. +So if kodama is compromised, that data could be used to attack dodo +too. On the other hand, if dodo's disk dies, I can restore it from this +handy hackup. + +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: + + chmod -x /etc/etckeeper/commit.d/50vcs-commit + +Here's how to make it automatically push commits to a clone of the +repository as a backup (see instructions above to set up the clone safely): + + cd /etc/etckeeper/commit.d + (echo '#!/bin/sh' ; echo 'git push backup') > 99git-push + chmod +x 99git-push + git add . + git commit -m "automatically push commits to backup repository" + +## 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: +* http://www.jukie.net/~bart/blog/20070312134706 +* http://bryan-murdock.blogspot.com/2007/07/put-etc-under-revision-control-with-git.html + +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. + + +## author + +Joey Hess diff --git a/TODO b/TODO new file mode 100644 index 0000000..4b3927f --- /dev/null +++ b/TODO @@ -0,0 +1,26 @@ +* keep 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 + +* split the repo + + One way to split it would be to put private (non-world-readable) files + in 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.. diff --git a/apt.conf b/apt.conf new file mode 100644 index 0000000..5e690a2 --- /dev/null +++ b/apt.conf @@ -0,0 +1,5 @@ +DPkg::Pre-Invoke { "if [ -x /usr/bin/etckeeper ]; then etckeeper pre-install; fi"; }; +DPkg::Post-Invoke { "if [ -x /usr/bin/etckeeper ]; then etckeeper post-install; fi"; }; + +RPM::Pre-Invoke { "if [ -x /usr/bin/etckeeper ]; then etckeeper pre-install; fi"; }; +RPM::Post-Invoke { "if [ -x /usr/bin/etckeeper ]; then etckeeper post-install; fi"; }; diff --git a/bash_completion b/bash_completion new file mode 100644 index 0000000..b1a3d31 --- /dev/null +++ b/bash_completion @@ -0,0 +1,8 @@ +_etckeeper() { + local cur; + COMPREPLY=(); + cur=${COMP_WORDS[COMP_CWORD]}; + COMPREPLY=( $( compgen -W '$(cd /etc/etckeeper/; for i in *.d/; do echo ${i%.d/}; done)' -- $cur ) ); +} + +complete -F _etckeeper etckeeper diff --git a/commit.d/10vcs-test b/commit.d/10vcs-test new file mode 100755 index 0000000..e33d734 --- /dev/null +++ b/commit.d/10vcs-test @@ -0,0 +1,17 @@ +#!/bin/sh +set -e + +not_enabled_warning() { + echo "etckeeper warning: etckeeper is not yet enabled for $(pwd)" >&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 diff --git a/commit.d/30bzr-add b/commit.d/30bzr-add new file mode 100755 index 0000000..3e7e95d --- /dev/null +++ b/commit.d/30bzr-add @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +if [ "$VCS" = bzr ] && [ -d .bzr ]; then + if ! bzr add -q .; then + echo "etckeeper warning: bzr add failed" >&2 + fi +fi diff --git a/commit.d/30darcs-add b/commit.d/30darcs-add new file mode 100755 index 0000000..98be4bf --- /dev/null +++ b/commit.d/30darcs-add @@ -0,0 +1,14 @@ +#!/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 diff --git a/commit.d/30git-add b/commit.d/30git-add new file mode 100755 index 0000000..b08b583 --- /dev/null +++ b/commit.d/30git-add @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +if [ "$VCS" = git ] && [ -d .git ]; then + if ! git add --all; then + echo "etckeeper warning: git add --all" >&2 + fi +fi diff --git a/commit.d/30hg-addremove b/commit.d/30hg-addremove new file mode 100755 index 0000000..1b999bb --- /dev/null +++ b/commit.d/30hg-addremove @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +if [ "$VCS" = hg ] && [ -d .hg ]; then + if ! hg addremove .; then + echo "etckeeper warning: hg addremove failed" >&2 + fi +fi diff --git a/commit.d/50vcs-commit b/commit.d/50vcs-commit new file mode 100755 index 0000000..3a4c819 --- /dev/null +++ b/commit.d/50vcs-commit @@ -0,0 +1,104 @@ +#!/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 + +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="$(perl -e 'print ((getpwnam(shift()))[7])' "$USER")" + 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 + fi + if [ -z "$GIT_AUTHOR_EMAIL" ]; then + GIT_AUTHOR_EMAIL="$(git config -f "$USER_HOME/.gitconfig" user.email)" || true + fi + fi + if [ -z "$GIT_COMMITTER_EMAIL" ]; then + GIT_COMMITER_EMAIL="$(git config --global user.email)" || true + fi + + if [ -z "$GIT_AUTHOR_NAME" ]; then + export GIT_AUTHOR_NAME="$USER" + fi + if [ -z "$GIT_AUTHOR_EMAIL" ]; then + export GIT_AUTHOR_EMAIL="$USER@$hostname" + fi + if [ -z "$GIT_COMMITTER_EMAIL" ]; then + export GIT_COMMITTER_EMAIL=`whoami`"@$hostname" + 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 + export LOGNAME="$USER" + fi + if [ -z "$HGUSER" ]; then + export HGUSER="$USER@$hostname" + 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 + export EMAIL="$USER <$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 diff --git a/commit.d/99push b/commit.d/99push new file mode 100755 index 0000000..9a5d81e --- /dev/null +++ b/commit.d/99push @@ -0,0 +1,8 @@ +#!/bin/sh +if [ -n "$PUSH_REMOTE" ]; then + if [ "$VCS" = git ] && [ -d .git ]; then + git push "$PUSH_REMOTE" master || true + else + echo "PUSH_REMOTE not yet supported for $VCS" >&2 + fi +fi diff --git a/commit.d/README b/commit.d/README new file mode 100644 index 0000000..25d0d45 --- /dev/null +++ b/commit.d/README @@ -0,0 +1,3 @@ +Files 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. diff --git a/cruft_filter b/cruft_filter new file mode 100644 index 0000000..edd5f33 --- /dev/null +++ b/cruft_filter @@ -0,0 +1,13 @@ +/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/** diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..7720597 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,755 @@ +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 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..7f8f011 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +7 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..252c8ac --- /dev/null +++ b/debian/control @@ -0,0 +1,25 @@ +Source: etckeeper +Section: admin +Priority: optional +Build-Depends: debhelper (>= 7), dpkg-dev (>= 1.9.0), bzr (>= 1.5~), python +Maintainer: Joey Hess +Standards-Version: 3.9.4 +XS-Python-Version: all +Vcs-Git: git://git.kitenet.net/etckeeper +Homepage: http://kitenet.net/~joey/code/etckeeper/ + +Package: etckeeper +Architecture: all +Section: admin +Depends: git (>= 1:1.7) | mercurial | bzr (>= 1.5~) | darcs, ${misc:Depends} +Recommends: cron +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. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..4adbefa --- /dev/null +++ b/debian/copyright @@ -0,0 +1,7 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ + +Files: * +Copyright: © 2007-2011 Joey Hess +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. diff --git a/debian/cron.daily b/debian/cron.daily new file mode 100644 index 0000000..5255691 --- /dev/null +++ b/debian/cron.daily @@ -0,0 +1,19 @@ +#!/bin/sh +set -e +if [ -x /usr/bin/etckeeper ] && [ -e /etc/etckeeper/etckeeper.conf ]; then + . /etc/etckeeper/etckeeper.conf + if [ "$AVOID_DAILY_AUTOCOMMITS" != "1" ]; then + # avoid autocommit if an install run is in progress + 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 +fi diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000..2a6769e --- /dev/null +++ b/debian/docs @@ -0,0 +1 @@ +README TODO diff --git a/debian/po/POTFILES.in b/debian/po/POTFILES.in new file mode 100644 index 0000000..cef83a3 --- /dev/null +++ b/debian/po/POTFILES.in @@ -0,0 +1 @@ +[type: gettext/rfc822deb] templates diff --git a/debian/po/cs.po b/debian/po/cs.po new file mode 100644 index 0000000..b7d7c54 --- /dev/null +++ b/debian/po/cs.po @@ -0,0 +1,67 @@ +# 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: 2009-05-06 14:41-0400\n" +"PO-Revision-Date: 2009-09-13 09:09+0200\n" +"Last-Translator: Miroslav Kure \n" +"Language-Team: Czech \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: error +#. Description +#: ../templates:2001 +msgid "Commit failed" +msgstr "Zápis selhal" + +#. Type: error +#. Description +#: ../templates:2001 +msgid "An attempt to commit /etc changes to ${VCS} failed." +msgstr "Pokus o zapsání změn v /etc do ${VCS} selhal." + +#. Type: error +#. Description +#: ../templates:2001 +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." + +#. Type: boolean +#. Description +#: ../templates:3001 +msgid "Remove etckeeper ${VCS} repository and associated files?" +msgstr "Odstranit ${VCS} repositář etckeeperu a přidružené soubory?" + +#. Type: boolean +#. Description +#: ../templates:3001 +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 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:" diff --git a/debian/po/da.po b/debian/po/da.po new file mode 100644 index 0000000..48bae8d --- /dev/null +++ b/debian/po/da.po @@ -0,0 +1,57 @@ +# 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: 2009-05-06 14:41-0400\n" +"PO-Revision-Date: 2010-09-22 17:30+01:00\n" +"Last-Translator: Joe Hansen \n" +"Language-Team: Danish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: error +#. Description +#: ../templates:2001 +msgid "Commit failed" +msgstr "Indsendelse (commit) mislykkedes" + +#. Type: error +#. Description +#: ../templates:2001 +msgid "An attempt to commit /etc changes to ${VCS} failed." +msgstr "Et fors??g p?? at indsende (commit) /etc-??ndringer til ${VCS} mislykkedes." + +#. Type: error +#. Description +#: ../templates:2001 +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." + +#. Type: boolean +#. Description +#: ../templates:3001 +msgid "Remove etckeeper ${VCS} repository and associated files?" +msgstr "Fjern etckeeper ${VCS}-arkiv og associerede filer?" + +#. Type: boolean +#. Description +#: ../templates:3001 +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." + diff --git a/debian/po/de.po b/debian/po/de.po new file mode 100644 index 0000000..069ff84 --- /dev/null +++ b/debian/po/de.po @@ -0,0 +1,71 @@ +# 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: 2009-05-06 14:41-0400\n" +"PO-Revision-Date: 2009-06-08 19:05+0200\n" +"Last-Translator: Helge Kreutzmann \n" +"Language-Team: de \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-15\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: error +#. Description +#: ../templates:2001 +msgid "Commit failed" +msgstr "bergabe (commit) fehlgeschlagen" + +#. Type: error +#. Description +#: ../templates:2001 +msgid "An attempt to commit /etc changes to ${VCS} failed." +msgstr "" +"Ein Versuch, die nderungen an /etc an ${VCS} zu bergeben, schlug fehl." + +#. Type: error +#. Description +#: ../templates:2001 +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." + +#. Type: boolean +#. Description +#: ../templates:3001 +msgid "Remove etckeeper ${VCS} repository and associated files?" +msgstr "Das ${VCS}-Depot von Etckeeper und die zugehrigen Dateien entfernen?" + +#. Type: boolean +#. Description +#: ../templates:3001 +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 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:" diff --git a/debian/po/es.po b/debian/po/es.po new file mode 100644 index 0000000..441cfbd --- /dev/null +++ b/debian/po/es.po @@ -0,0 +1,85 @@ +# 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: 2009-05-06 14:41-0400\n" +"PO-Revision-Date: 2009-07-11 16:07+0200\n" +"Last-Translator: Fernando González de Requena \n" +"Language-Team: Spanish \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: error +#. Description +#: ../templates:2001 +msgid "Commit failed" +msgstr "El envío de los cambios ha fallado" + +#. Type: error +#. Description +#: ../templates:2001 +msgid "An attempt to commit /etc changes to ${VCS} failed." +msgstr "Ha fallado un intento de enviar los cambios en «/etc» a ${VCS}." + +#. Type: error +#. Description +#: ../templates:2001 +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." + +#. Type: boolean +#. Description +#: ../templates:3001 +msgid "Remove etckeeper ${VCS} repository and associated files?" +msgstr "¿Desea eliminar el repositorio ${VCS} de etckeeper y los ficheros asociados?" + +#. Type: boolean +#. Description +#: ../templates:3001 +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»." + diff --git a/debian/po/eu.po b/debian/po/eu.po new file mode 100644 index 0000000..9f5ceba --- /dev/null +++ b/debian/po/eu.po @@ -0,0 +1,69 @@ +# 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: 2009-05-06 14:41-0400\n" +"PO-Revision-Date: 2007-12-17 12:47+0100\n" +"Last-Translator: Aitor Ibañez \n" +"Language-Team: Euskara \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: error +#. Description +#: ../templates:2001 +msgid "Commit failed" +msgstr "Onarpenak failatu du" + +#. Type: error +#. Description +#: ../templates:2001 +msgid "An attempt to commit /etc changes to ${VCS} failed." +msgstr "/etc-ko aldaketak ${VCS}-en onartzearen saiakerak huts egin du." + +#. Type: error +#. Description +#: ../templates:2001 +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." + +#. Type: boolean +#. Description +#: ../templates:3001 +msgid "Remove etckeeper ${VCS} repository and associated files?" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:3001 +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 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:" diff --git a/debian/po/fi.po b/debian/po/fi.po new file mode 100644 index 0000000..51204bc --- /dev/null +++ b/debian/po/fi.po @@ -0,0 +1,62 @@ +msgid "" +msgstr "" +"Project-Id-Version: etckeeper 0.3\n" +"Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" +"POT-Creation-Date: 2009-05-06 14:41-0400\n" +"PO-Revision-Date: 2007-12-12 19:54+0200\n" +"Last-Translator: Esko Arajärvi \n" +"Language-Team: Finnish \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: error +#. Description +#: ../templates:2001 +msgid "Commit failed" +msgstr "Tallettaminen epäonnistui" + +#. Type: error +#. Description +#: ../templates:2001 +msgid "An attempt to commit /etc changes to ${VCS} failed." +msgstr "Yritys tallettaa /etc:n muutokset ${VCS}-varastoon epäonnistui." + +#. Type: error +#. Description +#: ../templates:2001 +msgid "" +"You may manually resolve the issues with the uncommitted changes before " +"continuing." +msgstr "" +"Voit selvittää tallettamattomien muutosten ongelmat käsin ennen jatkamista." + +#. Type: boolean +#. Description +#: ../templates:3001 +msgid "Remove etckeeper ${VCS} repository and associated files?" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:3001 +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 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." diff --git a/debian/po/fr.po b/debian/po/fr.po new file mode 100644 index 0000000..d4125fa --- /dev/null +++ b/debian/po/fr.po @@ -0,0 +1,65 @@ +# 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: 2009-05-06 14:41-0400\n" +"PO-Revision-Date: 2009-05-17 11:42+0200\n" +"Last-Translator: Bruno Travouillon \n" +"Language-Team: French \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: error +#. Description +#: ../templates:2001 +msgid "Commit failed" +msgstr "Échec de la synchronisation" + +#. Type: error +#. Description +#: ../templates:2001 +msgid "An attempt to commit /etc changes to ${VCS} failed." +msgstr "" +"La tentative d'enregistrement (« commit ») des modifications de /etc vers " +"${VCS} a échoué." + +#. Type: error +#. Description +#: ../templates:2001 +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." + +#. Type: boolean +#. Description +#: ../templates:3001 +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:3001 +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." diff --git a/debian/po/gl.po b/debian/po/gl.po new file mode 100644 index 0000000..937ccca --- /dev/null +++ b/debian/po/gl.po @@ -0,0 +1,63 @@ +# 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: 2009-05-06 14:41-0400\n" +"PO-Revision-Date: 2007-12-11 20:52+0000\n" +"Last-Translator: Jacobo Tarrio \n" +"Language-Team: Galician \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: error +#. Description +#: ../templates:2001 +msgid "Commit failed" +msgstr "O gardado fallou" + +#. Type: error +#. Description +#: ../templates:2001 +msgid "An attempt to commit /etc changes to ${VCS} failed." +msgstr "Fallou unha tentativa de gardar en ${VCS} os cambios de /etc." + +#. Type: error +#. Description +#: ../templates:2001 +msgid "" +"You may manually resolve the issues with the uncommitted changes before " +"continuing." +msgstr "configurar apt para que instale paquetes adicionais do CD.<" + +#. Type: boolean +#. Description +#: ../templates:3001 +msgid "Remove etckeeper ${VCS} repository and associated files?" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:3001 +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 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:" diff --git a/debian/po/it.po b/debian/po/it.po new file mode 100644 index 0000000..b3b44aa --- /dev/null +++ b/debian/po/it.po @@ -0,0 +1,57 @@ +# 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: 2009-05-06 14:41-0400\n" +"PO-Revision-Date: 2009-08-08 15:32+0200\n" +"Last-Translator: Luca Monducci \n" +"Language-Team: Italian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: error +#. Description +#: ../templates:2001 +msgid "Commit failed" +msgstr "Commit fallito" + +#. Type: error +#. Description +#: ../templates:2001 +msgid "An attempt to commit /etc changes to ${VCS} failed." +msgstr "Il tentativo di commit delle modifiche in /etc a ${VCS} è fallito." + +#. Type: error +#. Description +#: ../templates:2001 +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." + +#. Type: boolean +#. Description +#: ../templates:3001 +msgid "Remove etckeeper ${VCS} repository and associated files?" +msgstr "Eliminare il repository ${VCS} di etckeeper e i file associati?" + +#. Type: boolean +#. Description +#: ../templates:3001 +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." diff --git a/debian/po/ja.po b/debian/po/ja.po new file mode 100644 index 0000000..6b6c2f1 --- /dev/null +++ b/debian/po/ja.po @@ -0,0 +1,56 @@ +# 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: 2009-05-06 14:41-0400\n" +"PO-Revision-Date: 2009-05-09 19:26+0900\n" +"Last-Translator: Hideki Yamane (Debian-JP) \n" +"Language-Team: Japanese \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: error +#. Description +#: ../templates:2001 +msgid "Commit failed" +msgstr "コミットに失敗しました" + +#. Type: error +#. Description +#: ../templates:2001 +msgid "An attempt to commit /etc changes to ${VCS} failed." +msgstr "/etc の変更を ${VCS} にコミットしようとしましたが失敗しました。" + +#. Type: error +#. Description +#: ../templates:2001 +msgid "" +"You may manually resolve the issues with the uncommitted changes before " +"continuing." +msgstr "" +"続ける前に、この問題とコミットされていない変更について、手動で解決する必要が" +"あるでしょう。" + +#. Type: boolean +#. Description +#: ../templates:3001 +msgid "Remove etckeeper ${VCS} repository and associated files?" +msgstr "etckeeper の$ {VCS} リポジトリおよび関連ファイルを削除しますか?" + +#. Type: boolean +#. Description +#: ../templates:3001 +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 " +"が記録してた全ての履歴は「破壊」されます。" + diff --git a/debian/po/nl.po b/debian/po/nl.po new file mode 100644 index 0000000..c0e78cc --- /dev/null +++ b/debian/po/nl.po @@ -0,0 +1,61 @@ +# 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: 2009-05-06 14:41-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: error +#. Description +#: ../templates:2001 +msgid "Commit failed" +msgstr "Vastleggen mislukt" + +#. Type: error +#. Description +#: ../templates:2001 +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." + +#. Type: error +#. Description +#: ../templates:2001 +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." + +#. Type: boolean +#. Description +#: ../templates:3001 +msgid "Remove etckeeper ${VCS} repository and associated files?" +msgstr "" +"De ${VCS}-opslagruimte van etckeeper en gerelateerde bestanden verwijderen?" + +#. Type: boolean +#. Description +#: ../templates:3001 +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." diff --git a/debian/po/pl.po b/debian/po/pl.po new file mode 100644 index 0000000..406f5eb --- /dev/null +++ b/debian/po/pl.po @@ -0,0 +1,47 @@ +# 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: 2009-05-06 14:41-0400\n" +"PO-Revision-Date: 2010-12-19 20:07+0100\n" +"Last-Translator: Artur R. Czechowski \n" +"Language-Team: Polish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: error +#. Description +#: ../templates:2001 +msgid "Commit failed" +msgstr "Błąd zapisu." + +#. Type: error +#. Description +#: ../templates:2001 +msgid "An attempt to commit /etc changes to ${VCS} failed." +msgstr "Nieudana próba zapisania zmian przy użyciu ${VCS}" + +#. Type: error +#. Description +#: ../templates:2001 +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." + +#. Type: boolean +#. Description +#: ../templates:3001 +msgid "Remove etckeeper ${VCS} repository and associated files?" +msgstr "Usunąć repozytorium etckeeper ${VCS} i powiązane pliki?" + +#. Type: boolean +#. Description +#: ../templates:3001 +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." + diff --git a/debian/po/pt.po b/debian/po/pt.po new file mode 100644 index 0000000..cac10cf --- /dev/null +++ b/debian/po/pt.po @@ -0,0 +1,58 @@ +# 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: 2009-05-06 14:41-0400\n" +"PO-Revision-Date: 2009-05-10 22:10+0100\n" +"Last-Translator: Américo Monteiro \n" +"Language-Team: Portuguese \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: error +#. Description +#: ../templates:2001 +msgid "Commit failed" +msgstr "Submissão falhou" + +#. Type: error +#. Description +#: ../templates:2001 +msgid "An attempt to commit /etc changes to ${VCS} failed." +msgstr "A tentativa de submeter as alterações de /etc ao ${VCS} falhou." + +#. Type: error +#. Description +#: ../templates:2001 +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. " + +#. Type: boolean +#. Description +#: ../templates:3001 +msgid "Remove etckeeper ${VCS} repository and associated files?" +msgstr "Remover o repositório ${VCS} do etckeeper e os ficheiros associados?" + +#. Type: boolean +#. Description +#: ../templates:3001 +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." + diff --git a/debian/po/pt_BR.po b/debian/po/pt_BR.po new file mode 100644 index 0000000..de9784e --- /dev/null +++ b/debian/po/pt_BR.po @@ -0,0 +1,59 @@ +# 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: 2009-05-06 14:41-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: error +#. Description +#: ../templates:2001 +msgid "Commit failed" +msgstr "Envio falhou" + +#. Type: error +#. Description +#: ../templates:2001 +msgid "An attempt to commit /etc changes to ${VCS} failed." +msgstr "Uma tentativa de enviar alterações feitas em /etc para ${VCS} falhou." + +#. Type: error +#. Description +#: ../templates:2001 +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." + +#. Type: boolean +#. Description +#: ../templates:3001 +msgid "Remove etckeeper ${VCS} repository and associated files?" +msgstr "Remover o repositório ${VCS} do etckeeper e os arquivos associados?" + +#. Type: boolean +#. Description +#: ../templates:3001 +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." diff --git a/debian/po/ru.po b/debian/po/ru.po new file mode 100644 index 0000000..b72b888 --- /dev/null +++ b/debian/po/ru.po @@ -0,0 +1,60 @@ +# 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: 2009-05-06 14:41-0400\n" +"PO-Revision-Date: 2009-05-15 21:25+0400\n" +"Last-Translator: Yuri Kozlov \n" +"Language-Team: Russian \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: error +#. Description +#: ../templates:2001 +msgid "Commit failed" +msgstr "Фиксация завершилась неудачно" + +#. Type: error +#. Description +#: ../templates:2001 +msgid "An attempt to commit /etc changes to ${VCS} failed." +msgstr "Попытка зафиксировать изменения /etc в ${VCS} завершилась неудачно." + +#. Type: error +#. Description +#: ../templates:2001 +msgid "" +"You may manually resolve the issues with the uncommitted changes before " +"continuing." +msgstr "" +"Перед тем как продолжить вы можете вручную исправить положение " +"с незафиксированными изменениями." + +#. Type: boolean +#. Description +#: ../templates:3001 +msgid "Remove etckeeper ${VCS} repository and associated files?" +msgstr "Удалить репозиторий etckeeper ${VCS} и связанные с ним файлы?" + +#. Type: boolean +#. Description +#: ../templates:3001 +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." + diff --git a/debian/po/sv.po b/debian/po/sv.po new file mode 100644 index 0000000..c40476d --- /dev/null +++ b/debian/po/sv.po @@ -0,0 +1,59 @@ +# 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: 2009-05-06 14:41-0400\n" +"PO-Revision-Date: 2009-05-12 20:08+0100\n" +"Last-Translator: Martin Bagge \n" +"Language-Team: Swedish \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: error +#. Description +#: ../templates:2001 +msgid "Commit failed" +msgstr "Verkställning misslyckades" + +#. Type: error +#. Description +#: ../templates:2001 +msgid "An attempt to commit /etc changes to ${VCS} failed." +msgstr "Ett försök att verkställa ändringar i /etc i ${VCS} misslyckades." + +#. Type: error +#. Description +#: ../templates:2001 +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." + +#. Type: boolean +#. Description +#: ../templates:3001 +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:3001 +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." diff --git a/debian/po/templates.pot b/debian/po/templates.pot new file mode 100644 index 0000000..93e0fdd --- /dev/null +++ b/debian/po/templates.pot @@ -0,0 +1,52 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" +"POT-Creation-Date: 2009-05-06 14:41-0400\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: error +#. Description +#: ../templates:2001 +msgid "Commit failed" +msgstr "" + +#. Type: error +#. Description +#: ../templates:2001 +msgid "An attempt to commit /etc changes to ${VCS} failed." +msgstr "" + +#. Type: error +#. Description +#: ../templates:2001 +msgid "" +"You may manually resolve the issues with the uncommitted changes before " +"continuing." +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:3001 +msgid "Remove etckeeper ${VCS} repository and associated files?" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:3001 +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 "" diff --git a/debian/po/vi.po b/debian/po/vi.po new file mode 100644 index 0000000..4a75241 --- /dev/null +++ b/debian/po/vi.po @@ -0,0 +1,54 @@ +# 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: 2009-05-06 14:41-0400\n" +"PO-Revision-Date: 2010-10-31 13:59+1030\n" +"Last-Translator: Clytie Siddall \n" +"Language-Team: Vietnamese \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" + +#: ../templates:2001 +#. Type: error +#. Description +msgid "Commit failed" +msgstr "Lỗi ghi chép" + +#: ../templates:2001 +#. Type: error +#. Description +#| 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 »." + +#: ../templates:2001 +#. Type: error +#. Description +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." + +#: ../templates:3001 +#. Type: boolean +#. Description +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 ?" + +#: ../templates:3001 +#. Type: boolean +#. Description +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 »." diff --git a/debian/postinst b/debian/postinst new file mode 100644 index 0000000..59e9f4a --- /dev/null +++ b/debian/postinst @@ -0,0 +1,98 @@ +#!/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 diff --git a/debian/postrm b/debian/postrm new file mode 100644 index 0000000..7fd06f6 --- /dev/null +++ b/debian/postrm @@ -0,0 +1,31 @@ +#!/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# diff --git a/debian/preinst b/debian/preinst new file mode 100644 index 0000000..4dda427 --- /dev/null +++ b/debian/preinst @@ -0,0 +1,83 @@ +#!/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 diff --git a/debian/prerm b/debian/prerm new file mode 100644 index 0000000..e13f086 --- /dev/null +++ b/debian/prerm @@ -0,0 +1,19 @@ +#!/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 diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..b6b9b90 --- /dev/null +++ b/debian/rules @@ -0,0 +1,10 @@ +#!/usr/bin/make -f + +export PYTHON_INSTALL_OPTS=--install-layout=deb + +%: + dh --with python2 $@ + +# Not intended for use by anyone except the author. +announcedir: + @echo ${HOME}/src/joeywiki/code/etckeeper/news diff --git a/debian/templates b/debian/templates new file mode 100644 index 0000000..2cec92c --- /dev/null +++ b/debian/templates @@ -0,0 +1,25 @@ +# 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/commit_failed +Type: error +_Description: Commit failed + An attempt to commit /etc changes to ${VCS} failed. + . + You may manually resolve the issues with the uncommitted changes + before continuing. + +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. diff --git a/etckeeper b/etckeeper new file mode 100755 index 0000000..cb180b6 --- /dev/null +++ b/etckeeper @@ -0,0 +1,121 @@ +#!/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 + +unset GIT_WORK_TREE +unset GIT_DIR + +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 "$1" ]; then + usage +elif [ "x$1" = "x-h" ] || [ "x$1" = "x--help" ]; then + man etckeeper || echo "Usage: etckeeper command [-d directory]" >&2 + 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 [ ! -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() { + 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 diff --git a/etckeeper-bzr/__init__.py b/etckeeper-bzr/__init__.py new file mode 100755 index 0000000..61322fe --- /dev/null +++ b/etckeeper-bzr/__init__.py @@ -0,0 +1,34 @@ +#!/usr/bin/python +# 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"}) diff --git a/etckeeper.8 b/etckeeper.8 new file mode 100644 index 0000000..6d3ffb2 --- /dev/null +++ b/etckeeper.8 @@ -0,0 +1,72 @@ +.\" -*- 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.gz +.SH AUTHOR +Joey Hess diff --git a/etckeeper.conf b/etckeeper.conf new file mode 100644 index 0000000..639c77b --- /dev/null +++ b/etckeeper.conf @@ -0,0 +1,42 @@ +# 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" + +# Uncomment to avoid etckeeper committing existing changes +# to /etc automatically once per day. +#AVOID_DAILY_AUTOCOMMITS=1 + +# Uncomment the following to avoid special file warning +# (the option is enabled automatically by cronjob 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-g2, yum, zypper etc) +HIGHLEVEL_PACKAGE_MANAGER=apt + +# The low-level package manager that's being used. +# (dpkg, rpm, pacman, 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). +PUSH_REMOTE="" diff --git a/etckeeper.spec b/etckeeper.spec new file mode 100644 index 0000000..d9fbfc1 --- /dev/null +++ b/etckeeper.spec @@ -0,0 +1,75 @@ +Name: etckeeper +Version: 1.7 +Release: 4%{?dist} +Summary: store /etc in git, mercurial, bzr or darcs + +Group: System Tools +License: GPLv2 +URL: http://kitenet.net/~joey/code/etckeeper/ +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 TODO README +%{_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 diff --git a/init.d/10restore-metadata b/init.d/10restore-metadata new file mode 100755 index 0000000..9c2bf65 --- /dev/null +++ b/init.d/10restore-metadata @@ -0,0 +1,14 @@ +#!/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 diff --git a/init.d/20restore-etckeeper b/init.d/20restore-etckeeper new file mode 100755 index 0000000..0485e63 --- /dev/null +++ b/init.d/20restore-etckeeper @@ -0,0 +1,22 @@ +#!/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 diff --git a/init.d/40vcs-init b/init.d/40vcs-init new file mode 100755 index 0000000..3c7a3bb --- /dev/null +++ b/init.d/40vcs-init @@ -0,0 +1,17 @@ +#!/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 diff --git a/init.d/50vcs-ignore b/init.d/50vcs-ignore new file mode 100755 index 0000000..33d79d3 --- /dev/null +++ b/init.d/50vcs-ignore @@ -0,0 +1,4 @@ +#!/bin/sh +set -e + +etckeeper update-ignore -a || true diff --git a/init.d/50vcs-perm b/init.d/50vcs-perm new file mode 100755 index 0000000..4dd080b --- /dev/null +++ b/init.d/50vcs-perm @@ -0,0 +1,12 @@ +#!/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 diff --git a/init.d/50vcs-pre-commit-hook b/init.d/50vcs-pre-commit-hook new file mode 100755 index 0000000..6045981 --- /dev/null +++ b/init.d/50vcs-pre-commit-hook @@ -0,0 +1,49 @@ +#!/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 diff --git a/init.d/70vcs-add b/init.d/70vcs-add new file mode 100755 index 0000000..9a9ec45 --- /dev/null +++ b/init.d/70vcs-add @@ -0,0 +1,27 @@ +#!/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 diff --git a/init.d/README b/init.d/README new file mode 100644 index 0000000..90aec67 --- /dev/null +++ b/init.d/README @@ -0,0 +1,13 @@ +Executable 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. diff --git a/list-installed.d/50list-installed b/list-installed.d/50list-installed new file mode 100755 index 0000000..f392027 --- /dev/null +++ b/list-installed.d/50list-installed @@ -0,0 +1,12 @@ +#!/bin/sh +# 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}\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 +fi diff --git a/pacman-g2.hook b/pacman-g2.hook new file mode 100644 index 0000000..ac2e099 --- /dev/null +++ b/pacman-g2.hook @@ -0,0 +1,17 @@ +#!/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 $* diff --git a/post-install.d/50vcs-commit b/post-install.d/50vcs-commit new file mode 100755 index 0000000..7710c4a --- /dev/null +++ b/post-install.d/50vcs-commit @@ -0,0 +1,23 @@ +#!/bin/sh +set -e + +pl="/var/cache/etckeeper/packagelist" + +if etckeeper unclean; then + message="committing changes in /etc after $HIGHLEVEL_PACKAGE_MANAGER run" + + if [ -e $pl.pre-install ]; 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 +fi + +if [ -e $pl.pre-install ]; then + rm -f $pl.pre-install +fi diff --git a/post-install.d/README b/post-install.d/README new file mode 100644 index 0000000..62f4f9c --- /dev/null +++ b/post-install.d/README @@ -0,0 +1,2 @@ +Files in this directory are run after packages are installed, upgraded, etc. +They should commit changes and new files in /etc to repository. diff --git a/pre-commit.d/20warn-problem-files b/pre-commit.d/20warn-problem-files new file mode 100755 index 0000000..f7c7580 --- /dev/null +++ b/pre-commit.d/20warn-problem-files @@ -0,0 +1,30 @@ +#!/bin/sh +set -e + +exclude_internal () { + egrep -v '(^|/)(.git|.hg|.bzr|_darcs)/' +} + +if [ "$VCS" = bzr ] || [ "$VCS" = darcs ]; then + special=$(find . -not -type d -not -type f -not -type l | exclude_internal) || true + hardlinks=$(find . -type f -not -links 1 | exclude_internal ) || true +elif [ "$VCS" = hg ]; then + special=$(find . -not -type d -not -type f -not -type l | exclude_internal) || true + hardlinks=$(find . -type f -not -links 1 -exec hg status {} \; | exclude_internal ) || true +elif [ "$VCS" = git ]; then + special=$(find . -not -type d -not -type f -not -type l -exec git ls-files --exclude-standard --cached --others {} \; | exclude_internal) || true + hardlinks=$(find . -type f -not -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 diff --git a/pre-commit.d/30store-metadata b/pre-commit.d/30store-metadata new file mode 100755 index 0000000..03ce475 --- /dev/null +++ b/pre-commit.d/30store-metadata @@ -0,0 +1,144 @@ +#!/bin/sh +set -e + +# Filters out UNKNOWN users and groups, prints a warning on stderr. +filter_unknown() { + CMD=$1 + while read line; do + # if the first n chars of $line equal "$CMD UNKNOWN "... + if [ "$(printf %.$((9+${#CMD}))s "$line")" = "$CMD UNKNOWN " ]; then + echo Bad "$2" for "$line" >&2 + else + echo "$line" + fi + done +} + +filter_ignore() { + if [ "$VCS" = darcs ]; then + ignorefile=.darcsignore + fi + + if [ "$VCS" = darcs ] && [ -e "$ignorefile" ]; then + patternsfile="$( mktemp -t etckeeper-$VCS.XXXXXXXXXX )" + grep -v '^[[:space:]]*\(#\|$\)' "$ignorefile" > "$patternsfile" || true + grep -Evf "$patternsfile" + rm -f "$patternsfile" + unset patternsfile + 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 | 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 diff --git a/pre-commit.d/README b/pre-commit.d/README new file mode 100644 index 0000000..051d094 --- /dev/null +++ b/pre-commit.d/README @@ -0,0 +1,2 @@ +This 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. diff --git a/pre-install.d/10packagelist b/pre-install.d/10packagelist new file mode 100755 index 0000000..e5fefa8 --- /dev/null +++ b/pre-install.d/10packagelist @@ -0,0 +1,4 @@ +#!/bin/sh +# This list will be later used when committing. +mkdir -p /var/cache/etckeeper/ +etckeeper list-installed > /var/cache/etckeeper/packagelist.pre-install diff --git a/pre-install.d/50uncommitted-changes b/pre-install.d/50uncommitted-changes new file mode 100755 index 0000000..d03d0e8 --- /dev/null +++ b/pre-install.d/50uncommitted-changes @@ -0,0 +1,29 @@ +#!/bin/sh +set -e + +if [ "$1" = "fail-debconf" ]; then + . /usr/share/debconf/confmodule + db_subst etckeeper/commit_failed VCS "$VCS" + db_input critical etckeeper/commit_failed || true + db_go || true + db_reset etckeeper/commit_failed || true + exit 0 +fi + +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 + if [ -e /usr/share/debconf/confmodule ]; then + $0 fail-debconf + else + echo "error: etckeeper failed to commit changes in /etc using $VCS" + exit 1 + fi + fi +fi diff --git a/pre-install.d/README b/pre-install.d/README new file mode 100644 index 0000000..a3b5a57 --- /dev/null +++ b/pre-install.d/README @@ -0,0 +1,3 @@ +Files 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? diff --git a/unclean.d/50test b/unclean.d/50test new file mode 100755 index 0000000..e52003f --- /dev/null +++ b/unclean.d/50test @@ -0,0 +1,12 @@ +#!/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 diff --git a/unclean.d/README b/unclean.d/README new file mode 100644 index 0000000..74bfbdd --- /dev/null +++ b/unclean.d/README @@ -0,0 +1,2 @@ +Files in this directory are used to test if the working copy has +uncommitted changes. diff --git a/uninit.d/01prompt b/uninit.d/01prompt new file mode 100755 index 0000000..8b43937 --- /dev/null +++ b/uninit.d/01prompt @@ -0,0 +1,20 @@ +#!/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 diff --git a/uninit.d/50remove-metadata b/uninit.d/50remove-metadata new file mode 100755 index 0000000..0be8d36 --- /dev/null +++ b/uninit.d/50remove-metadata @@ -0,0 +1,6 @@ +#!/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 diff --git a/uninit.d/50vcs-uninit b/uninit.d/50vcs-uninit new file mode 100755 index 0000000..b61abfd --- /dev/null +++ b/uninit.d/50vcs-uninit @@ -0,0 +1,54 @@ +#!/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 -p tempfile >/dev/null 2>&1; then + tempfile="tempfile" + elif which mktemp >/dev/null 2>&1 || type -p 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 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 diff --git a/uninit.d/README b/uninit.d/README new file mode 100644 index 0000000..d1a4eaa --- /dev/null +++ b/uninit.d/README @@ -0,0 +1,2 @@ +Executable files in this directory are run to uninitialise the working +directory, removing files added by `etckeeper init`. diff --git a/update-ignore.d/01update-ignore b/update-ignore.d/01update-ignore new file mode 100755 index 0000000..2659aa6 --- /dev/null +++ b/update-ignore.d/01update-ignore @@ -0,0 +1,205 @@ +#!/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" ]; 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/backup + 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" + 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 -p tempfile >/dev/null 2>&1; then + tempfile="tempfile" + elif which mktemp >/dev/null 2>&1 || type -p 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 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 diff --git a/update-ignore.d/README b/update-ignore.d/README new file mode 100644 index 0000000..a573135 --- /dev/null +++ b/update-ignore.d/README @@ -0,0 +1,2 @@ +Executable files in this directory are run to update the VCS ignore file, +or create it if it does not exist. diff --git a/vcs.d/50vcs-cmd b/vcs.d/50vcs-cmd new file mode 100755 index 0000000..f515abb --- /dev/null +++ b/vcs.d/50vcs-cmd @@ -0,0 +1,11 @@ +#!/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 diff --git a/yum-etckeeper.conf b/yum-etckeeper.conf new file mode 100644 index 0000000..8e4d76c --- /dev/null +++ b/yum-etckeeper.conf @@ -0,0 +1,2 @@ +[main] +enabled=1 diff --git a/yum-etckeeper.py b/yum-etckeeper.py new file mode 100644 index 0000000..b77a93b --- /dev/null +++ b/yum-etckeeper.py @@ -0,0 +1,39 @@ +#!/usr/bin/env python +# +# 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' % (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) diff --git a/zypper-etckeeper.py b/zypper-etckeeper.py new file mode 100755 index 0000000..b21f23d --- /dev/null +++ b/zypper-etckeeper.py @@ -0,0 +1,38 @@ +#!/usr/bin/env python + +import errno +import subprocess +import zypp_plugin + + +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() + + +plugin = EtckeeperPlugin() +plugin.main() -- cgit v1.2.3