Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37338228
en ru br
ALT Linux repos
S:1.18.8-alt2
5.0: 0.21-alt1
4.1: 0.10-alt2

Group :: System/Configuration/Other
RPM: etckeeper

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

%define _unpackaged_files_terminate_build 1

Name: etckeeper
Version: 1.18.8
Release: alt2

Summary: Etckeeper help to keep your /etc directory in VCS repository
License: GPL-2.0-or-later
Group: System/Configuration/Other
Url: https://etckeeper.branchable.com/
Source: %name-%version.tar
Patch: %name-%version-%release.patch
BuildArch: noarch
AutoReq: yes,noshell
Requires: coreutils diffutils findutils grep sh
Requires: git-core >= 1.6.0
Requires: perl-base
Obsoletes: %name-origin < %version-%release

Packager: Evgenii Terechkov <evg at altlinux.org>

%description
etckeeper is a collection of tools to let /etc be stored in a VCS
repository. It hooks into apt/yum/packman/etc to automatically commit
changes made to /etc during package upgrades. It's quite modular and
configurable, while also being simple to use if you understand the
basics of working with VCS.

%prep
%setup
%patch -p1

%build
%install
make install DESTDIR=%buildroot
install -D debian/cron.daily %buildroot%_sysconfdir/cron.daily/%name

# We dont want bzr now:

rm -rf %buildroot%_libdir/python*
# There is no cruft package for ALT:
rm -rf %buildroot%_sysconfdir/cruft

mv -v %buildroot%_sysconfdir/apt/apt.conf.d/05%name %buildroot%_sysconfdir/apt/apt.conf.d/%name.conf

%check
find %buildroot -type f | xargs file | grep 'shell script' | cut -d: -f1 | xargs -n1 -t bash -n

%post
if [ -e %_sysconfdir/.git/hooks/pre-commit ] && grep -E '^(/us[rb]/s?bin/)?%name' %_sysconfdir/.git/hooks/pre-commit >/dev/null 2>&1; then
echo "Replacing path to etckeeper in %_sysconfdir/.git/hooks/pre-commit"
sed -i 's!^/usr/sbin/etckeeper!etckeeper!;s!^/usr/bin/etckeeper!etckeeper!;s!^/usb/sbin/etckeeper!etckeeper!' %_sysconfdir/.git/hooks/pre-commit
fi

%files
%_bindir/%name
%_sysconfdir/%name
%config(noreplace) %_sysconfdir/%name/%name.conf
%_sysconfdir/apt/apt.conf.d/%name.conf
%_man8dir/%{name}.*
/usr/share/bash-completion/completions/%name
%_cachedir/%name
%_sysconfdir/cron.daily/%name
%_unitdir/%{name}.*
%doc README.md GPL

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin