7a174a4
%global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
Bernie Innocenti b3b985e
Bernie Innocenti b3b985e
Name:      etckeeper
d05fff5
Version:   0.54
cedeb90
Release:   1%{?dist}
Bernie Innocenti b3b985e
Summary:   Store /etc in a SCM system (git, mercurial, bzr or darcs)
Bernie Innocenti b3b985e
Group:     Applications/System
Bernie Innocenti b3b985e
License:   GPLv2+
Bernie Innocenti b3b985e
URL:       http://kitenet.net/~joey/code/etckeeper/
Bernie Innocenti b3b985e
Source0:   http://ftp.debian.org/debian/pool/main/e/etckeeper/%{name}_%{version}.tar.gz
cedeb90
Source1:   README.fedora
d05fff5
# Upstream commit 394add71: Fix error propagation to yum, which makes
d05fff5
# AVOID_COMMIT_BEFORE_INSTALL work (bz 709487)
d05fff5
Patch0:    etckeeper-0.54-yum.patch
Bernie Innocenti b3b985e
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Bernie Innocenti b3b985e
BuildArch: noarch
a4fb2ae
Requires:  git >= 1.5.4
Bernie Innocenti b3b985e
Bernie Innocenti b3b985e
%description
Bernie Innocenti b3b985e
The etckeeper program is a tool to let /etc be stored in a git,
Bernie Innocenti b3b985e
mercurial, bzr or darcs repository. It hooks into yum to automatically
Bernie Innocenti b3b985e
commit changes made to /etc during package upgrades. It tracks file
Bernie Innocenti b3b985e
metadata that version control systems do not normally support, but that
Bernie Innocenti b3b985e
is important for /etc, such as the permissions of /etc/shadow. It's
Bernie Innocenti b3b985e
quite modular and configurable, while also being simple to use if you
Bernie Innocenti b3b985e
understand the basics of working with version control.
Bernie Innocenti b3b985e
Bernie Innocenti b3b985e
The default backend is git, if want to use a another backend please
Bernie Innocenti b3b985e
install the appropriate tool (mercurial, darcs or bzr).
Bernie Innocenti b3b985e
To use bzr as backend, please also install the %{name}-bzr package.
Bernie Innocenti b3b985e
Bernie Innocenti b3b985e
To start using the package please read %{_docdir}/%{name}-%{version}/README
Bernie Innocenti b3b985e
Bernie Innocenti b3b985e
%package bzr
Bernie Innocenti b3b985e
Summary:  Support for bzr with etckeeper
Bernie Innocenti b3b985e
Group:    Applications/System
Bernie Innocenti b3b985e
Requires: %{name} = %{version}-%{release} bzr
Bernie Innocenti b3b985e
BuildRequires: bzr
Bernie Innocenti b3b985e
BuildRequires: python-devel
Bernie Innocenti b3b985e
Bernie Innocenti b3b985e
%description bzr
Bernie Innocenti b3b985e
This package provides a bzr backend for etckeeper, if you want to use
Bernie Innocenti b3b985e
etckeeper with bzr backend, install this package.
Bernie Innocenti b3b985e
Bernie Innocenti b3b985e
%prep
Bernie Innocenti b3b985e
%setup -q -n %{name}
d05fff5
%patch0 -p1
Bernie Innocenti b3b985e
%{__perl} -pi -e '
Bernie Innocenti b3b985e
    s|HIGHLEVEL_PACKAGE_MANAGER=apt|HIGHLEVEL_PACKAGE_MANAGER=yum|;
Bernie Innocenti b3b985e
    s|LOWLEVEL_PACKAGE_MANAGER=dpkg|LOWLEVEL_PACKAGE_MANAGER=rpm|;
Bernie Innocenti b3b985e
    ' etckeeper.conf
cedeb90
%{__sed} -i -e '1d' yum-etckeeper.py
cedeb90
cp -av %{SOURCE1} .
Bernie Innocenti b3b985e
Bernie Innocenti b3b985e
%build
Bernie Innocenti b3b985e
make %{?_smp_mflags}
Bernie Innocenti b3b985e
Bernie Innocenti b3b985e
%install
Bernie Innocenti b3b985e
rm -rf %{buildroot}
Bernie Innocenti b3b985e
make install DESTDIR=%{buildroot} INSTALL="%{__install} -p"
Bernie Innocenti b3b985e
%{__install} -D -p debian/cron.daily %{buildroot}%{_sysconfdir}/cron.daily/%{name}
Bernie Innocenti b3b985e
%{__install} -d  %{buildroot}%{_localstatedir}/cache/%{name}
Bernie Innocenti b3b985e
%{__sed} -i -e '1d' %{buildroot}%{python_sitelib}/bzrlib/plugins/%{name}/__init__.py
Bernie Innocenti b3b985e
Bernie Innocenti b3b985e
%clean
Bernie Innocenti b3b985e
rm -rf %{buildroot}
Bernie Innocenti b3b985e
Bernie Innocenti b3b985e
# Users must study the README anyway.
Bernie Innocenti b3b985e
#post
Bernie Innocenti b3b985e
#{_sbindir}/%{name} init -d /etc/
Bernie Innocenti b3b985e
c027a44
%post
c027a44
if [ $1 -gt 1 ] ; then
c027a44
   %{_bindir}/%{name} update-ignore
c027a44
fi
c027a44
Bernie Innocenti b3b985e
%files
Bernie Innocenti b3b985e
%defattr(-, root, root, -)
cedeb90
%doc GPL TODO README README.fedora
965a3da
%{_bindir}/%{name}
Bernie Innocenti b3b985e
%{_mandir}/man8/%{name}.8*
Bernie Innocenti b3b985e
%dir %{_sysconfdir}/%{name}
24ac181
%{_sysconfdir}/%{name}/*.d
Bernie Innocenti b3b985e
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
Bernie Innocenti b3b985e
%{_sysconfdir}/cron.daily/%{name}
Bernie Innocenti b3b985e
%dir %{_sysconfdir}/bash_completion.d
Bernie Innocenti b3b985e
%config(noreplace) %{_sysconfdir}/bash_completion.d/%{name}
Bernie Innocenti b3b985e
%dir %{_prefix}/lib/yum-plugins
Bernie Innocenti b3b985e
%{_prefix}/lib/yum-plugins/%{name}.*
Bernie Innocenti b3b985e
%dir %{_sysconfdir}/yum/pluginconf.d
Bernie Innocenti b3b985e
%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/%{name}.conf
Bernie Innocenti b3b985e
%{_localstatedir}/cache/%{name}
Bernie Innocenti b3b985e
Bernie Innocenti b3b985e
%files bzr
Bernie Innocenti b3b985e
%defattr(-, root, root, -)
Bernie Innocenti b3b985e
%doc GPL
Bernie Innocenti b3b985e
%{python_sitelib}/bzrlib/plugins/%{name}
a4fb2ae
%if 0%{?fedora} || 0%{?rhel} > 5
Bernie Innocenti b3b985e
%{python_sitelib}/bzr_%{name}-*.egg-info
a4fb2ae
%endif
Bernie Innocenti b3b985e
Bernie Innocenti b3b985e
%changelog
d05fff5
* Wed Jun  1 2011 Thomas Moschny <thomas.moschny@gmx.de> - 0.54-1
d05fff5
- Update to 0.54.
d05fff5
- Add patch for bz 709487.
d05fff5
c027a44
* Mon Mar 28 2011 Thomas Moschny <thomas.moschny@gmx.de> - 0.53-1
c027a44
- Update to 0.53.
c027a44
- Run update-ignore on package upgrade (bz 680632).
c027a44
cedeb90
* Wed Feb  9 2011 Thomas Moschny <thomas.moschny@gmx.de> - 0.52-1
cedeb90
- Update to 0.52.
cedeb90
- Include a README.fedora (bz 670934).
cedeb90
f10450d
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.51-2
f10450d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
f10450d
965a3da
* Mon Jan  3 2011 Thomas Moschny <thomas.moschny@gmx.de> - 0.51-1
965a3da
- Update to 0.51.
965a3da
- etckeeper has been moved out of sbin.
965a3da
084c5ae
* Sat Dec 11 2010 Thomas Moschny <thomas.moschny@gmx.de> - 0.50-2
084c5ae
- Don't package INSTALL.
084c5ae
7a174a4
* Wed Oct 27 2010 Thomas Moschny <thomas.moschny@gmx.de> - 0.50-1
7a174a4
- Update to 0.50.
7a174a4
- Change %%define -> %%global.
7a174a4
a4fb2ae
* Fri Sep 17 2010 Thomas Moschny <thomas.moschny@gmx.de> - 0.49-2
a4fb2ae
- Adjust minimum required version of GIT.
a4fb2ae
- egg-info files are not created automatically on RHEL5.
a4fb2ae
eb1d695
* Wed Sep 15 2010 Thomas Moschny <thomas.moschny@gmx.de> - 0.49-1
eb1d695
- Update to 0.49.
eb1d695
- Remove obsolete patch.
eb1d695
24ac181
* Fri Sep  3 2010 Thomas Moschny <thomas.moschny@gmx.de> - 0.48-1
24ac181
- Update to 0.48.
24ac181
- Don't list /etc/etckeeper/*.d directories twice in %%files.
24ac181
- Add patch from upstream that fixes bz 588086.
24ac181
dff39b3
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.41-2
dff39b3
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
dff39b3
Bernie Innocenti b3b985e
* Sat Sep 12 2009 Bernie Innocenti <bernie@codewiz.org> - 0.41-1
a4fb2ae
- Update to 0.41
Bernie Innocenti b3b985e
- Add missing directory ownerships
Bernie Innocenti b3b985e
Bernie Innocenti b3b985e
* Sat Sep 12 2009 Bernie Innocenti <bernie@codewiz.org> - 0.40-3
Bernie Innocenti b3b985e
- Make the bzr subpackage builddepend on python-devel
Bernie Innocenti b3b985e
Bernie Innocenti b3b985e
* Wed Sep 09 2009 Terje Rosten <terje.rosten@ntnu.no> - 0.40-2
Bernie Innocenti b3b985e
- Package is noarch
Bernie Innocenti b3b985e
- Rpmlint clean
Bernie Innocenti b3b985e
- Random cleanup
Bernie Innocenti b3b985e
- Ship cache dir in package
Bernie Innocenti b3b985e
- bzr subpackage
Bernie Innocenti b3b985e
- Add bzr to buildreq
Bernie Innocenti b3b985e
Bernie Innocenti b3b985e
* Sat Sep 05 2009 Bernie Innocenti <bernie@codewiz.org> - 0.40-1
Bernie Innocenti b3b985e
- Update to 0.40
Bernie Innocenti b3b985e
Bernie Innocenti b3b985e
* Sun Jun 14 2009 Bernie Innocenti <bernie@codewiz.org> - 0.37-1
Bernie Innocenti b3b985e
- Update to 0.37
Bernie Innocenti b3b985e
- Change license tag to GPLv2+
Bernie Innocenti b3b985e
Bernie Innocenti b3b985e
* Fri Feb 27 2009 Jimmy Tang <jtang@tchpc.tcd.ie> - 0.33-4
Bernie Innocenti b3b985e
- fix up initial install to make directory in /var/cache/etckeeper
Bernie Innocenti b3b985e
- install the etckeeper daily cron job
Bernie Innocenti b3b985e
- define some config files that shouldn't be replaced, should the hooks
Bernie Innocenti b3b985e
in commit.d, init.d etc... saved and not blown away? if so they can
Bernie Innocenti b3b985e
defined as config files. etckeeper should record the changes anyway.
Bernie Innocenti b3b985e
Bernie Innocenti b3b985e
* Wed Feb 25 2009 Jimmy Tang <jtang@tchpc.tcd.ie> - 0.32-1
Bernie Innocenti b3b985e
- yum etckeeper plugin is now apart of this package
Bernie Innocenti b3b985e
Bernie Innocenti b3b985e
* Tue Feb 24 2009 Jimmy Tang <jtang@tchpc.tcd.ie> - 0.31-1
Bernie Innocenti b3b985e
- initial package