summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Helmert III <ajak@gentoo.org>2021-02-17 19:30:59 -0600
committerJohn Helmert III <ajak@gentoo.org>2021-02-21 10:39:19 -0600
commit77484e1a1c3c1b2d96fb7271aba8e3a433330c89 (patch)
tree7c3a6dc10187bf0a81754b4ded322b7691bf5bf9 /net-misc/apt-cacher-ng
parentx11-misc/rss-glx: Remove old (diff)
downloadgentoo-77484e1a1c3c1b2d96fb7271aba8e3a433330c89.tar.gz
gentoo-77484e1a1c3c1b2d96fb7271aba8e3a433330c89.tar.bz2
gentoo-77484e1a1c3c1b2d96fb7271aba8e3a433330c89.zip
net-misc/apt-cacher-ng: bump to 3.6_p1
Fix broken symlink by installing the symlink's target instead. Re-add systemd dependency/IUSE because an installed binary links to it when available. Drop debian patches because they don't exist for this version, and appear to be necessary anyway. Closes: https://bugs.gentoo.org/770046 Package-Manager: Portage-3.0.14, Repoman-3.0.2 Signed-off-by: John Helmert III <ajak@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/19513 Signed-off-by: John Helmert III <ajak@gentoo.org>
Diffstat (limited to 'net-misc/apt-cacher-ng')
-rw-r--r--net-misc/apt-cacher-ng/Manifest3
-rw-r--r--net-misc/apt-cacher-ng/apt-cacher-ng-3.6_p1.ebuild (renamed from net-misc/apt-cacher-ng/apt-cacher-ng-3.5_p3.ebuild)24
-rw-r--r--net-misc/apt-cacher-ng/files/apt-cacher-ng-3.6-optional-systemd.patch62
3 files changed, 75 insertions, 14 deletions
diff --git a/net-misc/apt-cacher-ng/Manifest b/net-misc/apt-cacher-ng/Manifest
index 8f5b3dcee4fb..db811e620005 100644
--- a/net-misc/apt-cacher-ng/Manifest
+++ b/net-misc/apt-cacher-ng/Manifest
@@ -1,2 +1 @@
-DIST apt-cacher-ng_3.5-3.debian.tar.xz 49708 BLAKE2B 85092374207a252dcb4ef7b95dc434f81f9b67791e20099dc058022a9a575130070c12827f3fd04640fcec3b44a444fb85d8cea6439d5eaeeb359f263fb05682 SHA512 f690ae69d38b8e9c73ef095e9779364c7c5ccd246b19e8f5ce2edde47861e44c0aedabc75bcf11f5b408e034e52190dc8ed1789b503284f8f68dc1f5e84e1712
-DIST apt-cacher-ng_3.5.orig.tar.xz 325260 BLAKE2B 1cf19bd575d4e3d320f73771b31e98977417713d57ceaaccb8b6c0eff7bd5e02c99a0c197ddbc09d14d8f6a70799525dedfe1fbacb00357f65f0c8c4d540bcab SHA512 0bbc78c128d353ec2504f4d898d0ffb339778e98ab9899d48c61c094b15cafd92e430f864c82b66049578f5dd3c9e74fc5c09883231faeddce453be64e6f8954
+DIST apt-cacher-ng_3.6.orig.tar.xz 331300 BLAKE2B 6c3e118e2b2d79492d6b33f1a40fd9e4aa963e90141706b84603e69551e37f99a813d59c564d442b38eea2ba3b115913d767c9a97da0b08b5efe8bfe2b657acf SHA512 6f58afe10d9e5adb036ca2de67cf017415623dc0552ed60a64967ac248a1cc44be87fd9ddf8905a16d347bd1367425a46316ae6cd4fdc2f1e94f668b59dae63e
diff --git a/net-misc/apt-cacher-ng/apt-cacher-ng-3.5_p3.ebuild b/net-misc/apt-cacher-ng/apt-cacher-ng-3.6_p1.ebuild
index 56294639238b..ce6af89f9fa7 100644
--- a/net-misc/apt-cacher-ng/apt-cacher-ng-3.5_p3.ebuild
+++ b/net-misc/apt-cacher-ng/apt-cacher-ng-3.6_p1.ebuild
@@ -8,13 +8,12 @@ inherit cmake
DESCRIPTION="Yet another caching HTTP proxy for Debian/Ubuntu software packages"
HOMEPAGE="https://www.unix-ag.uni-kl.de/~bloch/acng/
https://packages.qa.debian.org/a/apt-cacher-ng.html"
-SRC_URI="mirror://debian/pool/main/a/${PN}/${PN}_${PV/_*}.orig.tar.xz
- mirror://debian/pool/main/a/${PN}/${PN}_${PV/_p/-}.debian.tar.xz"
+SRC_URI="mirror://debian/pool/main/a/${PN}/${PN}_${PV/_*}.orig.tar.xz"
LICENSE="BSD-4 ZLIB public-domain"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE="doc fuse tcpd"
+IUSE="doc fuse systemd tcpd"
DEPEND="acct-user/apt-cacher-ng
acct-group/apt-cacher-ng
@@ -23,6 +22,7 @@ DEPEND="acct-user/apt-cacher-ng
dev-libs/openssl:0=
sys-libs/zlib
fuse? ( sys-fs/fuse:0 )
+ systemd? ( sys-apps/systemd )
tcpd? ( sys-apps/tcp-wrappers )"
BDEPEND="virtual/pkgconfig"
RDEPEND="${DEPEND}
@@ -31,7 +31,7 @@ RDEPEND="${DEPEND}
PATCHES=(
"${FILESDIR}/${PN}-3.3.1-flags.patch"
"${FILESDIR}/${PN}-3.5-perl-syntax.patch"
- "${WORKDIR}/debian/patches/debian-changes"
+ "${FILESDIR}/${PN}-3.6-optional-systemd.patch"
)
S="${WORKDIR}/${P/_*}"
@@ -47,6 +47,7 @@ src_prepare() {
-e "/install.*acng\.conf/s/)$/ RENAME ${PN}.conf)/" \
-e "/file/s/)$/ \"*hooks\" \"backends_debian\")/" -i conf/CMakeLists.txt || die
sed -ie "/INSTALL.*acngtool/s/LIBDIR/CMAKE_INSTALL_SBINDIR/" source/CMakeLists.txt || die
+
cmake_src_prepare
}
@@ -54,22 +55,21 @@ src_configure() {
local mycmakeargs=(
"-DHAVE_FUSE_25=$(usex fuse)"
"-DHAVE_LIBWRAP=$(usex tcpd)"
- # Unconditionally install systemd service file
- "-DSDINSTALL=1"
+ "-DSDINSTALL=$(usex systemd)"
)
- if tc-ld-is-gold; then
- mycmakeargs+=( "-DUSE_GOLD=yes" )
- else
- mycmakeargs+=( "-DUSE_GOLD=no" )
- fi
-
cmake_src_configure
sed -ie '/LogDir/s|/var/tmp|/var/log/'"${PN}"'|g' "${BUILD_DIR}"/conf/acng.conf || die
}
src_install() {
+ # README is a symlink to doc/README and README automatically gets
+ # installed, leading to a broken symlink installed. Fix this by removing
+ # the symlink then installing the actual README. https://bugs.gentoo.org/770046
+ rm README || die
+ dodoc doc/README
+
newinitd "${FILESDIR}/initd-r3" "${PN}"
newconfd "${FILESDIR}/confd-r2" "${PN}"
diff --git a/net-misc/apt-cacher-ng/files/apt-cacher-ng-3.6-optional-systemd.patch b/net-misc/apt-cacher-ng/files/apt-cacher-ng-3.6-optional-systemd.patch
new file mode 100644
index 000000000000..944802015e59
--- /dev/null
+++ b/net-misc/apt-cacher-ng/files/apt-cacher-ng-3.6-optional-systemd.patch
@@ -0,0 +1,62 @@
+commit f73ba7b31712c1c5543da5a6dab554cac48d2904
+Author: John Helmert III <jchelmert3@posteo.net>
+Date: Fri Feb 19 10:59:51 2021 -0600
+
+ Make systemd fully optional
+
+ Avoid linking to systemd without SDINSTALL set. Unconditionally install
+ systemd files with SDTYPE=notify because <systemd-209 is long gone.
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 3c99864..5bafc45 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -228,14 +228,16 @@ CHECK_CXX_SOURCE_COMPILES("${TESTSRC}" HAVE_PREAD)
+ FILE(READ ${TESTKITDIR}/HAVE_DAEMON.cc TESTSRC)
+ CHECK_CXX_SOURCE_COMPILES("${TESTSRC}" HAVE_DAEMON)
+
+-pkg_check_modules(lsd "libsystemd>=209")
+-# either part of the big library nowadays or in the helper library on older systems
+-if(NOT lsd_FOUND)
+-pkg_check_modules(lsd libsystemd-daemon)
++if(SDINSTALL)
++ pkg_check_modules(lsd "libsystemd>=209")
++ # either part of the big library nowadays or in the helper library on older systems
++ if(NOT lsd_FOUND)
++ pkg_check_modules(lsd libsystemd-daemon)
++ endif()
++ _append(CFLAGS_DAEMON ${lsd_CFLAGS})
++ _append(LDFLAGS_DAEMON ${lsd_LDFLAGS})
++ set(HAVE_SD_NOTIFY ${lsd_FOUND})
+ endif()
+-_append(CFLAGS_DAEMON ${lsd_CFLAGS})
+-_append(LDFLAGS_DAEMON ${lsd_LDFLAGS})
+-set(HAVE_SD_NOTIFY ${lsd_FOUND})
+
+ SET(CMAKE_REQUIRED_LIBRARIES dl)
+ FILE(READ ${TESTKITDIR}/HAVE_DLOPEN.cc TESTSRC)
+diff --git a/systemd/CMakeLists.txt b/systemd/CMakeLists.txt
+index 850f9b8..6ba333f 100644
+--- a/systemd/CMakeLists.txt
++++ b/systemd/CMakeLists.txt
+@@ -1,17 +1,10 @@
+ cmake_minimum_required(VERSION 3.1)
+
+ unset(SDTYPE)
+-if(HAVE_SD_NOTIFY)
+- set(SDTYPE notify)
+-else()
+- set(SDTYPE simple)
+-endif()
++set(SDTYPE notify)
+ CONFIGURE_FILE(apt-cacher-ng.service.in apt-cacher-ng.service)
+ CONFIGURE_FILE(apt-cacher-ng.conf.in apt-cacher-ng.conf)
+ unset(SDTYPE)
+
+-# this is experimental and is supposed to match LSB
+-if(SDINSTALL)
+- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/apt-cacher-ng.conf DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/tmpfiles.d/)
+- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/apt-cacher-ng.service DESTINATION /lib/systemd/system)
+-endif()
++install(FILES ${CMAKE_CURRENT_BINARY_DIR}/apt-cacher-ng.conf DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/tmpfiles.d/)
++install(FILES ${CMAKE_CURRENT_BINARY_DIR}/apt-cacher-ng.service DESTINATION /lib/systemd/system)