etckeeper-vl.spec 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. %global with_bzr 0
  2. %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
  3. Summary: Store /etc in a SCM system (git, mercurial or darcs)
  4. Summary(ja): /etc をバージョン管理システム(git,mercurialなど)で管理するツール
  5. Name: etckeeper
  6. Version: 0.64
  7. Release: 1%{?_dist_release}
  8. Group: Applications/System
  9. License: GPLv2+
  10. URL: http://kitenet.net/~joey/code/etckeeper/
  11. Source0: http://ftp.debian.org/debian/pool/main/e/etckeeper/%{name}_%{version}.tar.gz
  12. Source1: README.Vine
  13. Source2: README.Vine.en
  14. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  15. BuildArch: noarch
  16. Requires: git
  17. Requires: perl
  18. %description
  19. The etckeeper program is a tool to let /etc be stored in a git,
  20. mercurial, bzr or darcs repository. It hooks into yum to automatically
  21. commit changes made to /etc during package upgrades. It tracks file
  22. metadata that version control systems do not normally support, but that
  23. is important for /etc, such as the permissions of /etc/shadow. It's
  24. quite modular and configurable, while also being simple to use if you
  25. understand the basics of working with version control.
  26. The default backend is git, if want to use a another backend please
  27. install the appropriate tool (mercurial, darcs).
  28. %if %{with_bzr}
  29. To use bzr as backend, please also install the %{name}-bzr package.
  30. %endif
  31. To start using the package please read %{_docdir}/%{name}-%{version}/README
  32. %if %{with_bzr}
  33. %package bzr
  34. Summary: Support for bzr with etckeeper
  35. Summary(ja): Support for bzr with etckeeper
  36. Group: Applications/System
  37. Requires: %{name} = %{version}-%{release} bzr
  38. BuildRequires: bzr
  39. BuildRequires: python-devel
  40. %description bzr
  41. This package provides a bzr backend for etckeeper, if you want to use
  42. etckeeper with bzr backend, install this package.
  43. %endif
  44. %prep
  45. %setup -q -n %{name}
  46. %{__perl} -pi -e '
  47. s|LOWLEVEL_PACKAGE_MANAGER=dpkg|LOWLEVEL_PACKAGE_MANAGER=rpm|;
  48. ' etckeeper.conf
  49. cp -av %{SOURCE1} %{SOURCE2} .
  50. %build
  51. make %{?_smp_mflags}
  52. %install
  53. rm -rf %{buildroot}
  54. make install DESTDIR=%{buildroot} INSTALL="%{__install} -p"
  55. %{__install} -D -p debian/cron.daily %{buildroot}%{_sysconfdir}/cron.daily/%{name}
  56. %{__install} -d %{buildroot}%{_localstatedir}/cache/%{name}
  57. %if %{with_bzr}
  58. %{__sed} -i -e '1d' %{buildroot}%{python_sitelib}/bzrlib/plugins/%{name}/__init__.py
  59. %endif
  60. mv %{buildroot}%{_sysconfdir}/apt/apt.conf.d/05etckeeper \
  61. %{buildroot}%{_sysconfdir}/apt/apt.conf.d/05etckeeper.conf
  62. %clean
  63. rm -rf %{buildroot}
  64. %post
  65. if [ $1 == 1 ] ; then
  66. if [ ! -d /etc/.git ] ; then
  67. %{_bindir}/%{name} init
  68. ( cd /etc; git commit -m 'initial commit' )
  69. fi
  70. fi
  71. if [ $1 -gt 1 ] ; then
  72. %{_bindir}/%{name} update-ignore
  73. fi
  74. %files
  75. %defattr(-, root, root, -)
  76. %doc GPL TODO README README.Vine README.Vine.en
  77. %{_bindir}/%{name}
  78. %{_mandir}/man8/%{name}.8*
  79. %dir %{_sysconfdir}/%{name}
  80. %{_sysconfdir}/%{name}/*.d
  81. %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
  82. %{_sysconfdir}/cron.daily/%{name}
  83. %dir %{_sysconfdir}/bash_completion.d
  84. %config(noreplace) %{_sysconfdir}/bash_completion.d/%{name}
  85. %{_localstatedir}/cache/%{name}
  86. %config(noreplace) %{_sysconfdir}/apt/apt.conf.d/05etckeeper.conf
  87. %config(noreplace) %{_sysconfdir}/cruft/filters-unex/etckeeper
  88. %if %{with_bzr}
  89. %files bzr
  90. %defattr(-, root, root, -)
  91. %doc GPL
  92. %{python_sitelib}/bzrlib/plugins/%{name}
  93. %{python_sitelib}/bzr_%{name}-*.egg-info
  94. %endif
  95. %changelog
  96. * Sat Dec 29 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 0.64-1
  97. - update to 0.64
  98. * Mon May 28 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 0.62-1
  99. - initial build for Vine Linux
  100. - disable bzr support by default
  101. - run etckeeper initialize and first commit on first install.
  102. * Tue Mar 13 2012 Thomas Moschny <thomas.moschny@gmx.de> - 0.62-2
  103. - Add missing dependency on perl (bz 798563).
  104. * Tue Mar 13 2012 Thomas Moschny <thomas.moschny@gmx.de> - 0.62-1
  105. - Update to 0.62.
  106. * Tue Jan 17 2012 Thomas Moschny <thomas.moschny@gmx.de> - 0.61-1
  107. - Update to 0.61.
  108. * Fri Jan 13 2012 Thomas Moschny <thomas.moschny@gmx.de> - 0.60-1
  109. - Update to 0.60.
  110. * Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.58-2
  111. - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
  112. * Thu Dec 1 2011 Thomas Moschny <thomas.moschny@gmx.de> - 0.58-1
  113. - Update to 0.58.
  114. * Wed Nov 9 2011 Thomas Moschny <thomas.moschny@gmx.de> - 0.57-1
  115. - Update to 0.57.
  116. * Wed Aug 17 2011 Thomas Moschny <thomas.moschny@gmx.de> - 0.56-2
  117. - Rebuilt for trailing slash bug of rpm-4.9.1
  118. * Thu Jul 21 2011 Thomas Moschny <thomas.moschny@gmx.de> - 0.56-1
  119. - Update to 0.56.
  120. * Fri Jun 24 2011 Thomas Moschny <thomas.moschny@gmx.de> - 0.55-1
  121. - Update to 0.55.
  122. * Wed Jun 1 2011 Thomas Moschny <thomas.moschny@gmx.de> - 0.54-1
  123. - Update to 0.54.
  124. - Add patch for bz 709487.
  125. * Mon Mar 28 2011 Thomas Moschny <thomas.moschny@gmx.de> - 0.53-1
  126. - Update to 0.53.
  127. - Run update-ignore on package upgrade (bz 680632).
  128. * Wed Feb 9 2011 Thomas Moschny <thomas.moschny@gmx.de> - 0.52-1
  129. - Update to 0.52.
  130. - Include a README.fedora (bz 670934).
  131. * Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.51-2
  132. - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
  133. * Mon Jan 3 2011 Thomas Moschny <thomas.moschny@gmx.de> - 0.51-1
  134. - Update to 0.51.
  135. - etckeeper has been moved out of sbin.
  136. * Sat Dec 11 2010 Thomas Moschny <thomas.moschny@gmx.de> - 0.50-2
  137. - Don't package INSTALL.
  138. * Wed Oct 27 2010 Thomas Moschny <thomas.moschny@gmx.de> - 0.50-1
  139. - Update to 0.50.
  140. - Change %%define -> %%global.
  141. * Fri Sep 17 2010 Thomas Moschny <thomas.moschny@gmx.de> - 0.49-2
  142. - Adjust minimum required version of GIT.
  143. - egg-info files are not created automatically on RHEL5.
  144. * Wed Sep 15 2010 Thomas Moschny <thomas.moschny@gmx.de> - 0.49-1
  145. - Update to 0.49.
  146. - Remove obsolete patch.
  147. * Fri Sep 3 2010 Thomas Moschny <thomas.moschny@gmx.de> - 0.48-1
  148. - Update to 0.48.
  149. - Don't list /etc/etckeeper/*.d directories twice in %%files.
  150. - Add patch from upstream that fixes bz 588086.
  151. * Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.41-2
  152. - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
  153. * Sat Sep 12 2009 Bernie Innocenti <bernie@codewiz.org> - 0.41-1
  154. - Update to 0.41
  155. - Add missing directory ownerships
  156. * Sat Sep 12 2009 Bernie Innocenti <bernie@codewiz.org> - 0.40-3
  157. - Make the bzr subpackage builddepend on python-devel
  158. * Wed Sep 09 2009 Terje Rosten <terje.rosten@ntnu.no> - 0.40-2
  159. - Package is noarch
  160. - Rpmlint clean
  161. - Random cleanup
  162. - Ship cache dir in package
  163. - bzr subpackage
  164. - Add bzr to buildreq
  165. * Sat Sep 05 2009 Bernie Innocenti <bernie@codewiz.org> - 0.40-1
  166. - Update to 0.40
  167. * Sun Jun 14 2009 Bernie Innocenti <bernie@codewiz.org> - 0.37-1
  168. - Update to 0.37
  169. - Change license tag to GPLv2+
  170. * Fri Feb 27 2009 Jimmy Tang <jtang@tchpc.tcd.ie> - 0.33-4
  171. - fix up initial install to make directory in /var/cache/etckeeper
  172. - install the etckeeper daily cron job
  173. - define some config files that shouldn't be replaced, should the hooks
  174. in commit.d, init.d etc... saved and not blown away? if so they can
  175. defined as config files. etckeeper should record the changes anyway.
  176. * Wed Feb 25 2009 Jimmy Tang <jtang@tchpc.tcd.ie> - 0.32-1
  177. - yum etckeeper plugin is now apart of this package
  178. * Tue Feb 24 2009 Jimmy Tang <jtang@tchpc.tcd.ie> - 0.31-1
  179. - initial package