-
Notifications
You must be signed in to change notification settings - Fork 1
/
etckeeper.spec
215 lines (169 loc) · 6.83 KB
/
etckeeper.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
%global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
%{?el4:%define _without_bzr 1}
Name: etckeeper
Version: 1.6
Release: 1%{?dist}
Summary: Store /etc in a SCM system (git, mercurial, bzr or darcs)
Group: Applications/System
License: GPLv2+
URL: http://kitenet.net/~joey/code/etckeeper/
Source: http://ftp.debian.org/debian/pool/main/e/etckeeper/%{name}_%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
Requires: git >= 1.5.4
%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.
The default backend is git, if want to use a another backend please
install the appropriate tool (mercurial, darcs or bzr).
To use bzr as backend, please also install the %{name}-bzr package.
To start using the package please read %{_docdir}/%{name}-%{version}/README
%package bzr
Summary: Support for bzr with etckeeper
Group: Applications/System
Requires: %{name} = %{version}-%{release} bzr
%{!?_without_bzr:BuildRequires: bzr}
BuildRequires: python-devel
%description bzr
This package provides a bzr backend for etckeeper, if you want to use
etckeeper with bzr backend, install this package.
%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|;
s|#AVOID_DAILY_AUTOCOMMITS=1|AVOID_DAILY_AUTOCOMMITS=1|;
' etckeeper.conf
%{__sed} -i -e '1d' yum-etckeeper.py
%build
make %{?_smp_mflags}
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot} INSTALL="%{__install} -p"
%{__install} -D -p debian/cron.daily %{buildroot}%{_sysconfdir}/cron.daily/%{name}
%{__install} -d %{buildroot}%{_localstatedir}/cache/%{name}
%{!?_without_bzr: %{__sed} -i -e '1d' %{buildroot}%{python_sitelib}/bzrlib/plugins/%{name}/__init__.py }
%clean
rm -rf %{buildroot}
# Users must study the README anyway.
#post
#{_sbindir}/%{name} init -d /etc/
%post
if [ $1 -gt 1 ] ; then
%{_bindir}/%{name} update-ignore
fi
%files
%defattr(-, root, root, -)
%doc GPL TODO README
%{_bindir}/%{name}
%{_mandir}/man8/%{name}.8*
%dir %{_sysconfdir}/%{name}
%{_sysconfdir}/%{name}/*.d
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
%{_sysconfdir}/cron.daily/%{name}
%dir %{_sysconfdir}/bash_completion.d
%config(noreplace) %{_sysconfdir}/bash_completion.d/%{name}
%dir %{_prefix}/lib/yum-plugins
%{_prefix}/lib/yum-plugins/%{name}.*
%dir %{_sysconfdir}/yum/pluginconf.d
%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/%{name}.conf
%{_localstatedir}/cache/%{name}
%if 0%{!?_without_bzr:1}
%files bzr
%defattr(-, root, root, -)
%doc GPL
%{python_sitelib}/bzrlib/plugins/%{name}
%if 0%{?fedora} || 0%{?rhel} > 5
%{python_sitelib}/bzr_%{name}-*.egg-info
%endif
%endif
%changelog
* Tue Jul 30 2013 David Hrbáč <[email protected]> - 1.6-1
- new upstream release
* Wed May 15 2013 David Hrbáč <[email protected]> - 1.3-1
- new upstream release
* Tue May 07 2013 David Hrbáč <[email protected]> - 1.1-1
- new upstream release
* Wed Apr 11 2012 David Hrbáč <[email protected]> - 0.62-1
- new upstream release
* Thu Jan 12 2012 David Hrbáč <[email protected]> - 0.60-1
- new upstream release
* Thu Jan 12 2012 David Hrbáč <[email protected]> - 0.59-1
- new upstream release
- removed missing README.fedora
* Wed Dec 07 2011 David Hrbáč <[email protected]> - 0.58-1
- new upstream release
* Wed Dec 07 2011 David Hrbáč <[email protected]> - 0.57-1
- new upstream release
* Mon Aug 29 2011 David Hrbáč <[email protected]> - 0.56-2
- Initial reruild
- Disable bzr on el4
* Wed Aug 17 2011 Thomas Moschny <[email protected]> - 0.56-2
- Rebuilt for trailing slash bug of rpm-4.9.1
* Thu Jul 21 2011 Thomas Moschny <[email protected]> - 0.56-1
- Update to 0.56.
* Fri Jun 24 2011 Thomas Moschny <[email protected]> - 0.55-1
- Update to 0.55.
* Wed Jun 1 2011 Thomas Moschny <[email protected]> - 0.54-1
- Update to 0.54.
- Add patch for bz 709487.
* Mon Mar 28 2011 Thomas Moschny <[email protected]> - 0.53-1
- Update to 0.53.
- Run update-ignore on package upgrade (bz 680632).
* Wed Feb 9 2011 Thomas Moschny <[email protected]> - 0.52-1
- Update to 0.52.
- Include a README.fedora (bz 670934).
* Tue Feb 08 2011 Fedora Release Engineering <[email protected]> - 0.51-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Mon Jan 3 2011 Thomas Moschny <[email protected]> - 0.51-1
- Update to 0.51.
- etckeeper has been moved out of sbin.
* Sat Dec 11 2010 Thomas Moschny <[email protected]> - 0.50-2
- Don't package INSTALL.
* Wed Oct 27 2010 Thomas Moschny <[email protected]> - 0.50-1
- Update to 0.50.
- Change %%define -> %%global.
* Fri Sep 17 2010 Thomas Moschny <[email protected]> - 0.49-2
- Adjust minimum required version of GIT.
- egg-info files are not created automatically on RHEL5.
* Wed Sep 15 2010 Thomas Moschny <[email protected]> - 0.49-1
- Update to 0.49.
- Remove obsolete patch.
* Fri Sep 3 2010 Thomas Moschny <[email protected]> - 0.48-1
- Update to 0.48.
- Don't list /etc/etckeeper/*.d directories twice in %%files.
- Add patch from upstream that fixes bz 588086.
* Wed Jul 21 2010 David Malcolm <[email protected]> - 0.41-2
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
* Sat Sep 12 2009 Bernie Innocenti <[email protected]> - 0.41-1
- Update to 0.41
- Add missing directory ownerships
* Sat Sep 12 2009 Bernie Innocenti <[email protected]> - 0.40-3
- Make the bzr subpackage builddepend on python-devel
* Wed Sep 09 2009 Terje Rosten <[email protected]> - 0.40-2
- Package is noarch
- Rpmlint clean
- Random cleanup
- Ship cache dir in package
- bzr subpackage
- Add bzr to buildreq
* Sat Sep 05 2009 Bernie Innocenti <[email protected]> - 0.40-1
- Update to 0.40
* Sun Jun 14 2009 Bernie Innocenti <[email protected]> - 0.37-1
- Update to 0.37
- Change license tag to GPLv2+
* Fri Feb 27 2009 Jimmy Tang <[email protected]> - 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 <[email protected]> - 0.32-1
- yum etckeeper plugin is now apart of this package
* Tue Feb 24 2009 Jimmy Tang <[email protected]> - 0.31-1
- initial package