| |
@@ -0,0 +1,152 @@
|
| |
+ %undefine __cmake_in_source_build
|
| |
+ %global _vpath_builddir build
|
| |
+
|
| |
+ %global _missing_build_ids_terminate_build 0
|
| |
+
|
| |
+ Name: apt-cacher-ng
|
| |
+ Version: 3.5
|
| |
+ Release: 2%{?dist}
|
| |
+ Summary: Caching proxy for package files from Debian
|
| |
+
|
| |
+ License: BSD and zlib
|
| |
+ URL: http://www.unix-ag.uni-kl.de/~bloch/acng/
|
| |
+ Source0: http://ftp.debian.org/debian/pool/main/a/apt-cacher-ng/%{name}_%{version}.orig.tar.xz
|
| |
+ Source1: http://ftp.debian.org/debian/pool/main/a/apt-cacher-ng/%{name}_%{version}-3.debian.tar.xz
|
| |
+ Source2: apt-cacher-ng.service
|
| |
+
|
| |
+ Provides: bundled(sha1-hollerbach)
|
| |
+ Provides: bundled(md5-deutsch-c++)
|
| |
+
|
| |
+ BuildRequires: gcc-c++
|
| |
+ BuildRequires: zlib-devel
|
| |
+ BuildRequires: bzip2-devel
|
| |
+ BuildRequires: xz-devel
|
| |
+ BuildRequires: fuse-devel
|
| |
+ BuildRequires: cmake
|
| |
+ BuildRequires: openssl-devel
|
| |
+ BuildRequires: boost-devel
|
| |
+ BuildRequires: systemd
|
| |
+ BuildRequires: systemd-devel
|
| |
+ BuildRequires: libevent-devel
|
| |
+
|
| |
+ Requires(post): systemd
|
| |
+ Requires(preun): systemd
|
| |
+ Requires(postun): systemd
|
| |
+
|
| |
+ Requires: crontabs
|
| |
+ Requires: logrotate
|
| |
+
|
| |
+ %description
|
| |
+ A caching proxy. Specialized for package files from Linux distributors,
|
| |
+ primarily for Debian (and Debian based) distributions.
|
| |
+
|
| |
+ %prep
|
| |
+ %setup -q
|
| |
+ tar xfvJ %{SOURCE1}
|
| |
+
|
| |
+ # Replace all instances of /usr/lib/apt-cacher-ng/ with /usr/libexec/apt-cacher-ng/
|
| |
+ find debian -type f -exec sed -i "s#/usr/lib/apt-cacher-ng#/usr/libexec/apt-cacher-ng#g" '{}' \;
|
| |
+
|
| |
+ %build
|
| |
+ %cmake -DLIBDIR=%{_libexecdir}/apt-cacher-ng
|
| |
+ %cmake_build
|
| |
+
|
| |
+ %install
|
| |
+ %cmake_install
|
| |
+
|
| |
+ ## add useful content from Debian packaging
|
| |
+ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily
|
| |
+ install -D -pm 0750 debian/apt-cacher-ng.cron.daily $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/apt-cacher-ng
|
| |
+
|
| |
+ install -D -pm 0644 debian/apt-cacher-ng.default $RPM_BUILD_ROOT%{_sysconfdir}/default/apt-cacher-ng
|
| |
+
|
| |
+ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
|
| |
+ install -D -pm 0644 debian/apt-cacher-ng.logrotate $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/apt-cacher-ng
|
| |
+
|
| |
+ ## systemd.service instead of init.d script
|
| |
+ mkdir -p $RPM_BUILD_ROOT/%{_unitdir}
|
| |
+ install -pm 644 %{SOURCE2} $RPM_BUILD_ROOT/%{_unitdir}/
|
| |
+
|
| |
+ mkdir -p $RPM_BUILD_ROOT%{_rundir}/apt-cacher-ng
|
| |
+ mkdir -p $RPM_BUILD_ROOT%{_var}/cache/apt-cacher-ng
|
| |
+ mkdir -p $RPM_BUILD_ROOT%{_var}/lib/apt-cacher-ng
|
| |
+ mkdir -p $RPM_BUILD_ROOT%{_var}/log/apt-cacher-ng
|
| |
+
|
| |
+ ## cleanup
|
| |
+ rm -rf $RPM_BUILD_ROOT%{_datadir}/doc $RPM_BUILD_ROOT%{_sysconfdir}/avahi/services/apt-cacher-ng.service
|
| |
+
|
| |
+ %pre
|
| |
+ getent group apt-cacher-ng > /dev/null || groupadd -r apt-cacher-ng
|
| |
+ getent passwd apt-cacher-ng > /dev/null || useradd -r -d %{_sharedstatedir}/apt-cacher-ng -g apt-cacher-ng -s /sbin/nologin -c "Apt-cacher proxy" apt-cacher-ng
|
| |
+
|
| |
+ %post
|
| |
+ %systemd_post apt-cacher-ng.service
|
| |
+
|
| |
+ %preun
|
| |
+ %systemd_preun apt-cacher-ng.service
|
| |
+
|
| |
+ %postun
|
| |
+ %systemd_postun_with_restart apt-cacher-ng.service
|
| |
+
|
| |
+ %files
|
| |
+ %doc TODO doc/README
|
| |
+ %attr(700,apt-cacher-ng,apt-cacher-ng) %dir %{_rundir}/apt-cacher-ng/
|
| |
+ %attr(700,apt-cacher-ng,apt-cacher-ng) %dir %{_var}/lib/apt-cacher-ng/
|
| |
+ %attr(700,apt-cacher-ng,apt-cacher-ng) %dir %{_var}/log/apt-cacher-ng/
|
| |
+ %attr(700,apt-cacher-ng,apt-cacher-ng) %dir %{_var}/cache/apt-cacher-ng/
|
| |
+
|
| |
+ %config(noreplace) %{_sysconfdir}/apt-cacher-ng/
|
| |
+ %config(noreplace) %{_sysconfdir}/cron.daily/apt-cacher-ng
|
| |
+ %config(noreplace) %{_sysconfdir}/default/apt-cacher-ng
|
| |
+ %config(noreplace) %{_sysconfdir}/logrotate.d/apt-cacher-ng
|
| |
+ %{_unitdir}/apt-cacher-ng.service
|
| |
+ %{_libexecdir}/apt-cacher-ng/
|
| |
+ %{_libdir}/libsupacng.so
|
| |
+ %{_sbindir}/apt-cacher-ng
|
| |
+ %{_mandir}/man8/*
|
| |
+
|
| |
+ %changelog
|
| |
+ * Wed Jan 14 2021 Frédéric Pierret <frederic.pierret@qubes-os.org> - 3.5-2
|
| |
+ - Refactor installation stage to use %cmake_install
|
| |
+ - Temporarly workaround libsupacng missing buildid
|
| |
+
|
| |
+ * Wed Jan 13 2021 Frédéric Pierret <frederic.pierret@qubes-os.org> - 3.5-1
|
| |
+ - update to 3.5-3
|
| |
+
|
| |
+ * Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-6
|
| |
+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
| |
+
|
| |
+ * Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-5
|
| |
+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
| |
+
|
| |
+ * Sun Jul 29 2018 Kenjiro Nakayama <knakayam@redhat.com> - 3.1-4
|
| |
+ - Fix 1609197 - apt-cacher-ng service is running in wrong permissions
|
| |
+
|
| |
+ * Mon Dec 04 2017 Kenjiro Nakayama <knakayam@redhat.com> - 3.1-1
|
| |
+ - update to 3.1
|
| |
+
|
| |
+ * Thu Jul 06 2017 Kenjiro Nakayama <knakayam@redhat.com> - 3-1
|
| |
+ - update to 3
|
| |
+
|
| |
+ * Sat Jan 30 2016 Kenjiro Nakayama <knakayam@redhat.com> - 0.8.9-1
|
| |
+ - update to 0.8.9
|
| |
+
|
| |
+ * Tue Dec 29 2015 Kenjiro Nakayama <knakayam@redhat.com> - 0.8.8-1
|
| |
+ - update to 0.8.8
|
| |
+
|
| |
+ * Thu May 07 2015 Kenjiro Nakayama <knakayam@redhat.com> - 0.8.3-1
|
| |
+ - update to 0.8.3
|
| |
+
|
| |
+ * Tue Jan 27 2015 Kenjiro Nakayama <knakayam@redhat.com> - 0.8.0-1
|
| |
+ - update to 0.8.0
|
| |
+
|
| |
+ * Wed Jun 25 2014 Kenjiro Nakayama <knakayam@redhat.com> - 0.7.26-2
|
| |
+ - update to 0.7.26 fixed XSS vulnerability (rhbz 1111808)
|
| |
+
|
| |
+ * Fri Mar 14 2014 Kenjiro Nakayama <knakayam@redhat.com> - 0.7.25-3
|
| |
+ - update to 0.7.25
|
| |
+ - fix spec file.
|
| |
+
|
| |
+ * Fri May 17 2013 Warren Togami <wtogami@gmail.com> - 0.7.11-3
|
| |
+ - systemd service script
|
| |
+ - license
|
| |
@churchyard: hi, as I asked on the list what is the procedure to make resurrect this package, should I follow this: https://fedoraproject.org/wiki/Orphaned_package_that_need_new_maintainers?rd=PackageMaintainers/OrphanedPackages#Claiming_Ownership_of_a_Retired_Package ?
In this PR, there is the updated material to make it working properly with latest upstream version.