From 8cfed70b53ec5ad47efcecf591394ad1dbcb1b7a21a4c01b925ae3f160dc3982 Mon Sep 17 00:00:00 2001 From: OBS User mrdocs Date: Sun, 13 Jul 2014 03:28:40 +0000 Subject: [PATCH] Accepting request 239945 from home:Mitsutoshi:branches:utilities I found an issue to forget to require zypp-plugin-python. So I revised it. And I divided etckeeper package into 3. etckeeper - etckeepr main function. etckeeper-cron - cron function. etckeeper-pkgmanager-collabo - collabolation with package manager. My test was finished. Test report is https://docs.google.com/spreadsheets/d/1kmtjqvCnqNMmuFHRLh0-xh1iBdjhxnvKoYgRK9VvAoc/pubhtml# The package is https://build.opensuse.org/package/show/home:Mitsutoshi:branches:utilities/etckeeper Please see also: http://lists.opensuse.org/archive/opensuse-factory/2014-07/msg00037.html http://lists.opensuse.org/archive/opensuse-factory/2014-07/msg00052.html OBS-URL: https://build.opensuse.org/request/show/239945 OBS-URL: https://build.opensuse.org/package/show/utilities/etckeeper?expand=0&rev=7 --- etckeeper.changes | 18 ++++++++ etckeeper.spec | 103 ++++++++++++++++++++++++++++++++-------------- 2 files changed, 91 insertions(+), 30 deletions(-) diff --git a/etckeeper.changes b/etckeeper.changes index 6f752aa..48c3213 100644 --- a/etckeeper.changes +++ b/etckeeper.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Mon Jul 7 21:21:34 UTC 2014 - bkbin005@rinku.zaq.ne.jp + +- modified etckeeper.spec style + by "osc service run format_spec_file". +- removed lint code 'rm -rf "{buildroot}{_prefix}/lib"/python*'. + This line does not work. +- removed "Requires: git". + users can select VCS. +- divide etckeeper package into 3. + + etckeeper: + main function. + + etckeeper-cron: + cron function. + + etckeeper-pkgmanager-collabo: + collaboration with package manager. +- fix (bnc#884154): forgot to reqire zypp-plugin-python. + ------------------------------------------------------------------- Wed Jul 2 20:33:59 UTC 2014 - bkbin005@rinku.zaq.ne.jp diff --git a/etckeeper.spec b/etckeeper.spec index bb84f77..9ee9478 100644 --- a/etckeeper.spec +++ b/etckeeper.spec @@ -1,6 +1,10 @@ # vim: set sw=4 ts=4 et nu: - -# Copyright (c) 2014 Pascal Bleser +# +# spec file for package etckeeper +# +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 Mitsutoshi NAKANO +# Copyright (c) 2013 Pascal Bleser # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,42 +16,73 @@ # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ +# -Name: etckeeper -Version: 1.12 -Release: 0 -Summary: Store /etc under Version Control -Source: http://ftp.debian.org/debian/pool/main/e/etckeeper/etckeeper_%{version}.tar.gz -Source99: etckeeper.rpmlintrc + +Name: etckeeper +Version: 1.12 +Release: 0 +Summary: Store /etc under Version Control +License: GPL-2.0+ +Group: System/Management +Source: http://ftp.debian.org/debian/pool/main/e/etckeeper/etckeeper_%{version}.tar.gz +Source99: etckeeper.rpmlintrc # PATCH-FIX-UPSTREAM etckeeper-zypp.patch bnc#884154 bkbin005@rinku.zaq.ne.jp -- fix for ZYpp -Patch0: etckeeper-zypp.patch -URL: http://joeyh.name/code/etckeeper/ -Group: System/Management -License: GPL-2.0+ -BuildRoot: %{_tmppath}/build-%{name}-%{version} -BuildRequires: make -Requires: git +Patch0: etckeeper-zypp.patch +Url: http://joeyh.name/code/etckeeper/ +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildArch: noarch +BuildRequires: make +# delete 2014-07-05 bkbin005@rinku.zaq.ne.jp +# Users should be able to select VCS. +#Requires: git +%define LPM rpm + %if 0%{?suse_version} -BuildRequires: libzypp +Recommends: etckeeper-cron +Recommends: etckeeper-pkgmanager-collabo +BuildRequires: libzypp %define HPM zypper -%define LPM rpm %else -BuildRequires: yum +BuildRequires: yum %define HPM yum -%define LPM rpm %endif -Requires: cron -BuildArch: noarch %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 +is important for /etc, such as the permissions of /etc/shadow. It is quite modular and configurable, while also being simple to use if you understand the basics of working with version control. + +%package -n etckeeper-cron +Summary: The etckeeper cron function +Group: System/Management +Requires: cron +Requires: etckeeper + +%description -n etckeeper-cron +The etckeeper-cron furnishes etckeeper collaboration function +with cron. + + +%package -n etckeeper-pkgmanager-collabo +Summary: The etckeeper collaboration function with package-manager +Group: System/Management +Requires: etckeeper + +%if 0%{?suse_version} +Requires: zypp-plugin-python +%endif + +%description -n etckeeper-pkgmanager-collabo +The etckeeper-cron furnishes etckeeper collaboration function +with package-manager. + + %prep %setup -q -n "%{name}" %patch0 -p1 @@ -68,8 +103,10 @@ make \ PYTHON_INSTALL_OPTS="--prefix=%{_prefix} --root=%{buildroot}" \ install -# who cares about bzr... -rm -rf "%{buildroot}%{_prefix}/lib"/python* +# delete 2014-07-06 bkbin005@rinku.zaq.ne.jp - does not seems to work it. +# so, delete it. +## who cares about bzr... +#rm -rf "{buildroot}{_prefix}/lib"/python* install -D debian/cron.daily "%{buildroot}/etc/cron.daily/%{name}" @@ -78,24 +115,30 @@ install -D debian/cron.daily "%{buildroot}/etc/cron.daily/%{name}" %files %defattr(-,root,root) -%doc GPL TODO README.md +%doc GPL README.md TODO %{_bindir}/etckeeper -%config(noreplace) /etc/cron.daily/etckeeper %dir %{_sysconfdir}/etckeeper %config(noreplace) %{_sysconfdir}/etckeeper/etckeeper.conf %dir %{_sysconfdir}/etckeeper/*.d %config %{_sysconfdir}/etckeeper/*.d/* +%doc %{_mandir}/man8/etckeeper.8* +%config %{_sysconfdir}/bash_completion.d/etckeeper + +%files -n etckeeper-cron +%defattr(-,root,root) +%config(noreplace) %{_sysconfdir}/cron.daily/etckeeper + +%files -n etckeeper-pkgmanager-collabo +%defattr(-,root,root) + %if 0%{?suse_version} %dir %{_prefix}/lib/zypp %dir %{_prefix}/lib/zypp/plugins %dir %{_prefix}/lib/zypp/plugins/commit %{_prefix}/lib/zypp/plugins/commit/zypper-etckeeper.py -%endif -%if 0%{?fedora} || 0%{?rhel} +%else %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/etckeeper.conf %{_prefix}/lib/yum-plugins/etckeeper.* %endif -%doc %{_mandir}/man8/etckeeper.8* -%config %{_sysconfdir}/bash_completion.d/etckeeper %changelog