summaryrefslogtreecommitdiff
path: root/net-irc/znc
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-08-07 20:12:29 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-08-07 20:12:29 +0100
commit1f45d596fc838ad34ca4c17b7db7882f5048cec2 (patch)
treee5e2e397951ee044e0751efacb8b59ea81f9b605 /net-irc/znc
parent32c7b79bcc8a67e6bc6516adbc729e83f957a368 (diff)
gentoo auto-resync : 07:08:2022 - 20:12:29
Diffstat (limited to 'net-irc/znc')
-rw-r--r--net-irc/znc/Manifest5
-rw-r--r--net-irc/znc/files/znc-1.8.2-fix-odr-violation.patch56
-rw-r--r--net-irc/znc/znc-1.8.2-r2.ebuild (renamed from net-irc/znc/znc-1.8.2.ebuild)100
-rw-r--r--net-irc/znc/znc-9999.ebuild4
4 files changed, 118 insertions, 47 deletions
diff --git a/net-irc/znc/Manifest b/net-irc/znc/Manifest
index c709ade80831..7b4e4b34651b 100644
--- a/net-irc/znc/Manifest
+++ b/net-irc/znc/Manifest
@@ -1,6 +1,7 @@
AUX README.gentoo-r1 565 BLAKE2B fdc48ee4956ca8fcd828cdf93b05032afbf603a8262aaa5b50a321fa25d04cccabc86975c887824422e126c500a347f6cffab9188bda15d88272f7215db64f92 SHA512 a270bec9637269d7660ed921e803cf464c5c7934894531f697d5e2d37ee4c176c389e1dbc3b9676ef29ca378c12fc7139d9a20d3654cc95f58fa85145f4f90c6
AUX znc-1.7.1-inttest-dir.patch 2205 BLAKE2B f322f6884170c71ba537897d38c5ca2787937afdd2ac1fe0b0b4ab55ad7d453029bf4a8c748c5787fc4ed3b46e2b33c925cb962ec868f7a5c07356697a3039e2 SHA512 b74d136985546114604252be74e55e8f5e0740b678bdd224ea63cc3587d17d861c81c69b4bdea0aabc23e64097dda0097e97fbd80110c2c2a919b33d912d2dea
AUX znc-1.8.2-add-libera.patch 2205 BLAKE2B 756ddf827d4f39ac52c031ccdc13e07eddbcc079e37248ca3fa82bab5f9b90a1cf6faffd8d9a0c81a2c6a3ef912bfb314f3e03f657fd15bdadb61b0c7887fa1a SHA512 06c1a9f6a2729ed557f89ec247d89a87bca70b8a36103dbb1e230e7816df5155950f08f39b1011a0925354c073d4c3570f7918e730d01ad2c6ed3cdbf4b6df6c
+AUX znc-1.8.2-fix-odr-violation.patch 1661 BLAKE2B 5ab47fe8bc3e7072f7c8107bb92a0d61702f3900101aef8fcde818640d1fe1683a236cfd287d4139f8ef1db597979b73ed5bb65d159af23d3b51b2ae5a772c58 SHA512 ab219b2faf6ad4d4e3aeb3da5f1362625fb9c16ce71366031f718d879120d57280e57ad5857e3f683af3f3678061e6bb77e00f2fdf925d177a4b7b8bd53ece93
AUX znc-1.8.2-fix-python-3.10.patch 997 BLAKE2B b2be81e71483ea64912db8511dd9cb8ff92b2a7ea3b5d23f57fccd349c0e86d147d9245c5cbd54f99640e198b312847d6a14a256627f0f69d114f214f11dc6a8 SHA512 d39548a34ccf23a814f8b9b7b50fc87f470932e717db079bd3aea4f47e093cf10daa36f003dd1de33e0e493e43de8d5e2e354d5cc881326b249003870408c3aa
AUX znc-1.8.2-fix-systemd-datadir.patch 692 BLAKE2B d6585fc5c2087b51c8c2277eb1c8f70585cad3621fcaa0f746a918a1f5e9f5455a8ca8dcbc6e73c0200e723d2fd6e3f4080d3a1d185fc9cc2dd3b14dcd80908a SHA512 d54f36cd4da9bb2d67852e2d7f302538fd2807d95b3480b4416fbf1d7a4d010a03a06e8f20c3f8907ea8d33d1be4872a4433c3db30530327fcfb39f43ada0b23
AUX znc.confd-r1 720 BLAKE2B 4857a8bcd36ed1008a558ac7b067d6fad53b5d39c0df9130ca28d4ac3db3924a3a1200682c19c7e6f7869f22338b492f73bf6ccbc2b723d117c9eebc10a89838 SHA512 3ab102f64ea0572350c8595fd3739874da591c43a3dbc3a740c72c53bd7418fded721d478d1fb92de0c0d18131313ba6679e842a135dfe239ea3f42821d8e468
@@ -8,6 +9,6 @@ AUX znc.initd-r2 952 BLAKE2B 81346bf0a1581543683eb5c125b29474c0bc01b8aee11c036a1
DIST gtest-1.8.1.tar.gz 992298 BLAKE2B 40ef3417fe424205c0617f07207347ce671ac87605f8ac9b8a333b0b06e3fbef9f556041ee324c18f957f3258ab9fe06704f31cdd038355fb7890180eb77ced1 SHA512 e6283c667558e1fd6e49fa96e52af0e415a3c8037afe1d28b7ff1ec4c2ef8f49beb70a9327b7fc77eb4052a58c4ccad8b5260ec90e4bceeac7a46ff59c4369d7
DIST znc-1.8.2.tar.gz 2101215 BLAKE2B 7f0e5840fe57cc6b6549115b0fcf02e6afd3be0bf52e79da0a39bcc1463d983cbeb504bad30f3d2f7582f0295c7210d3c1eec40ec87bcc3546ba2d21a67cca9e SHA512 e821647b50698c3a82fad039e69943e030bf644d8f8e82afa87c6c11da44761bceecddd510a7a956a1b487b1cca6ee46e8ac8818ea03127f0f1ff8f5d1a1a7f9
EBUILD znc-1.8.2-r1.ebuild 5541 BLAKE2B f4ce98f7dcec7dd746639aadad12f2f6b0168f8b3b83772033520d38aee967fdb12d6c054ff2dbcc3790394f2c382781bb8397e923b3d49ad08c93867cf0c541 SHA512 86b192c2db84ce36cdb055c15fd0c73c21464dcb0f762c39e50b6f5244da4cff7e7337cc7959ff720acdbac01d821d642cd8d38699ec09086ee0502be44d070b
-EBUILD znc-1.8.2.ebuild 4767 BLAKE2B f7f5b485f231417c56935b094d23ac662b901bdf3c368715c035b258ddd61026008dcaa1015a72d7f885ac73dd1e5c955b15272eae28606667c2057f0d62545a SHA512 26223568c22bfb62ba138e7661635c0ced3067bded70cafaff473e10001344200a608aefef326cdea3b5e31fbce44fa7e1f9b6b57e752b3559f8d64f13cda0d0
-EBUILD znc-9999.ebuild 5393 BLAKE2B c897d9db73fba7228ccd7a582482b1201daa4a10c65282cebf181acca8552cca74621fab0d165c61652d7ce69bdf8b846485b9302ceb6d4b248ff7fa61d714a8 SHA512 97d6fafa71a1479197b74a2aa4ba46ae1d38d5ef17c70d530f1f01fd83edfd28ee96e17d435790660dbf940a0f86f3e68189c8dd082b65a824bceba2b0492f62
+EBUILD znc-1.8.2-r2.ebuild 5589 BLAKE2B 76dd64daf670a5efa0d8d860b0df4f881517aad03bf854923f86d1c9896db3cc1df0abc8956198f6f3667902d1c9d8add6173dd4c0510055687e798bb21b515a SHA512 2b6ff84515562d6988e1a6d9381b9a976e6aed71321ee70c723f4403d7e8cd4efd8265ced548b9fedb1d34ace8d8b6d4e4e3defb1cf2d885f7241ce51e423ee3
+EBUILD znc-9999.ebuild 5393 BLAKE2B c166cb41f4737aa82f4ce340a2bb11a7dfabec785b253a462d572c58312092e538cf900273c78a5244dccb072c6ce796e285bfd17492c004c7f7b0af19dea1d1 SHA512 3745ca6c1413992dadf5c8dc9675697bc61c598e5fab5b8b679141246d30eef072e83c5ffb615a93e429129fa3d1d57aed4b41ec07639ec5f4cbeaad0bd2b2ea
MISC metadata.xml 508 BLAKE2B 55a9f6a41856dfab6261b5cc23afa06756835fd740253084e06cfa53afcf6036974aeb5455373f43432515a5a88f476471ef9fa8bb38b30b8335af469eabf0c2 SHA512 5974ad23cb5256888b7b9c2c34a6fdbe46efb3e48bc075a3ebf09612bdb70ac27b56fd0bab13e1ada8234e2a3dce725aa8fc2bcf8e5248227f27e6e8a371c438
diff --git a/net-irc/znc/files/znc-1.8.2-fix-odr-violation.patch b/net-irc/znc/files/znc-1.8.2-fix-odr-violation.patch
new file mode 100644
index 000000000000..967d6e35c2ea
--- /dev/null
+++ b/net-irc/znc/files/znc-1.8.2-fix-odr-violation.patch
@@ -0,0 +1,56 @@
+From 3e45b2f35f194100ec3293c7f3e36f95f48b0cb8 Mon Sep 17 00:00:00 2001
+From: Uli Schlachter <psychon@znc.in>
+Date: Fri, 5 Aug 2022 16:12:40 +0200
+Subject: [PATCH] Fix an ODR violation
+
+Building with CFLAGS="-flto -Werror=odr -Werror=lto-type-mismatch
+-Werror=strict-aliasing" CXXFLAGS="-flto -Werror=odr
+-Werror=lto-type-mismatch -Werror=strict-aliasing" LDFLAGS=-flto fails
+due to a violation of the one definition rule. There are two different
+definitions of TOption that are both linked into the znc binary.
+
+Fix this by putting them into anonymous namespaces.
+
+Fixes: https://github.com/znc/znc/issues/1834
+Signed-off-by: Uli Schlachter <psychon@znc.in>
+---
+ src/IRCNetwork.cpp | 2 ++
+ src/User.cpp | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/src/IRCNetwork.cpp b/src/IRCNetwork.cpp
+index 46a2481a49..99f9242907 100644
+--- a/src/IRCNetwork.cpp
++++ b/src/IRCNetwork.cpp
+@@ -363,11 +363,13 @@ CString CIRCNetwork::GetNetworkPath() const {
+ return sNetworkPath;
+ }
+
++namespace {
+ template <class T>
+ struct TOption {
+ const char* name;
+ void (CIRCNetwork::*pSetter)(T);
+ };
++}
+
+ bool CIRCNetwork::ParseConfig(CConfig* pConfig, CString& sError,
+ bool bUpgrade) {
+diff --git a/src/User.cpp b/src/User.cpp
+index 2ab5fac66f..16624adbbe 100644
+--- a/src/User.cpp
++++ b/src/User.cpp
+@@ -135,11 +135,13 @@ CUser::~CUser() {
+ CZNC::Get().AddBytesWritten(m_uBytesWritten);
+ }
+
++namespace {
+ template <class T>
+ struct TOption {
+ const char* name;
+ void (CUser::*pSetter)(T);
+ };
++}
+
+ bool CUser::ParseConfig(CConfig* pConfig, CString& sError) {
+ TOption<const CString&> StringOptions[] = {
diff --git a/net-irc/znc/znc-1.8.2.ebuild b/net-irc/znc/znc-1.8.2-r2.ebuild
index 8993eb8037d9..fab250986d5e 100644
--- a/net-irc/znc/znc-1.8.2.ebuild
+++ b/net-irc/znc/znc-1.8.2-r2.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-PYTHON_COMPAT=( python3_{7,8,9} )
+PYTHON_COMPAT=( python3_{8..11} )
inherit cmake python-single-r1 readme.gentoo-r1 systemd
@@ -13,8 +13,7 @@ DESCRIPTION="An advanced IRC Bouncer"
if [[ ${PV} == *9999* ]]; then
inherit git-r3
- EGIT_REPO_URI=${EGIT_REPO_URI:-"https://github.com/znc/znc.git"}
- SRC_URI=""
+ EGIT_REPO_URI="https://github.com/znc/znc.git"
else
MY_PV=${PV/_/-}
MY_P=${PN}-${MY_PV}
@@ -22,7 +21,7 @@ else
https://znc.in/releases/archive/${MY_P}.tar.gz
test? ( ${GTEST_URL} )
"
- KEYWORDS="amd64 arm arm64 x86"
+ KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86"
S=${WORKDIR}/${MY_P}
fi
@@ -36,21 +35,7 @@ RESTRICT="!test? ( test )"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} icu )"
-DEPEND="
- icu? ( dev-libs/icu:= )
- nls? ( dev-libs/boost:=[nls] )
- perl? ( >=dev-lang/perl-5.10:= )
- python? ( ${PYTHON_DEPS} )
- sasl? ( >=dev-libs/cyrus-sasl-2 )
- ssl? ( dev-libs/openssl:0= )
- tcl? ( dev-lang/tcl:0= )
- zlib? ( sys-libs/zlib:0= )
-"
-RDEPEND="
- ${DEPEND}
- acct-user/znc
- acct-group/znc
-"
+# perl is a build-time dependency of modpython
BDEPEND="
virtual/pkgconfig
nls? ( sys-devel/gettext )
@@ -67,8 +52,30 @@ BDEPEND="
dev-qt/qtnetwork:5
)
"
+DEPEND="
+ icu? ( dev-libs/icu:= )
+ nls? ( dev-libs/boost:=[nls] )
+ perl? ( >=dev-lang/perl-5.10:= )
+ python? ( ${PYTHON_DEPS} )
+ sasl? ( >=dev-libs/cyrus-sasl-2 )
+ ssl? ( dev-libs/openssl:0= )
+ tcl? ( dev-lang/tcl:0= )
+ zlib? ( sys-libs/zlib:0= )
+"
+RDEPEND="
+ ${DEPEND}
+ acct-user/znc
+ acct-group/znc
+"
-PATCHES=( "${FILESDIR}"/${PN}-1.7.1-inttest-dir.patch )
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.7.1-inttest-dir.patch
+ # All these are backports
+ "${FILESDIR}"/${P}-fix-systemd-datadir.patch
+ "${FILESDIR}"/${P}-add-libera.patch
+ "${FILESDIR}"/${P}-fix-python-3.10.patch
+ "${FILESDIR}"/${P}-fix-odr-violation.patch
+)
pkg_setup() {
if use python; then
@@ -86,6 +93,8 @@ src_prepare() {
sed -i -e "s|DZNC_BIN_DIR:path=|DZNC_BIN_DIR:path=${T}/inttest|" \
test/CMakeLists.txt || die
+ sed -i "s|--datadir=|&${EPREFIX}|" znc.service.in || die
+
cmake_src_prepare
}
@@ -98,6 +107,7 @@ src_configure() {
-DWANT_I18N="$(usex nls)"
-DWANT_PERL="$(usex perl)"
-DWANT_PYTHON="$(usex python)"
+ -DWANT_PYTHON_VERSION="${EPYTHON#python}"
-DWANT_CYRUS="$(usex sasl)"
-DWANT_OPENSSL="$(usex ssl)"
-DWANT_TCL="$(usex tcl)"
@@ -137,43 +147,47 @@ src_install() {
newinitd "${FILESDIR}"/znc.initd-r2 znc
newconfd "${FILESDIR}"/znc.confd-r1 znc
+ local DOC_CONTENTS
+ # "local" has its own return value which is not what we want to catch
DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r1") || die
- DISABLE_AUTOFORMATTING=1
+ local DISABLE_AUTOFORMATTING=1
readme.gentoo_create_doc
}
pkg_postinst() {
+ if [[ -d "${EROOT}/var/lib/znc/.znc/" ]]; then
+ eerror "${EROOT}/var/lib/znc/.znc/ exists, please move your data to ${EROOT}/var/lib/znc/"
+ eerror ""
+ eerror "The systemd unit has changed and now expects data to be located"
+ eerror "at the root of ${EROOT}/var/lib/znc instead of its '.znc' subfolder."
+ eerror "The recommended procedure to move the data is the following:"
+ eerror "1. stop the service: systemctl stop znc.service"
+ eerror "2. move the data: cp -a '${EROOT}/var/lib/znc/.znc/.' '${EROOT}/var/lib/znc/'"
+ eerror "3. fix the config file: sed -i 's|${EROOT}/var/lib/znc/.znc|${EROOT}/var/lib/znc|g' '${EROOT}/var/lib/znc/configs/znc.conf'"
+ eerror "4. restart znc: systemctl start znc.service"
+ eerror "5. once everything works, remove the old data directory: rm -r '${EROOT}/var/lib/znc/.znc/'"
+ eerror "See https://bugs.gentoo.org/743856 for details."
+ fi
+
if [[ -z "${REPLACING_VERSIONS}" ]]; then
# This is a new installation
readme.gentoo_print_elog
fi
-
- if [[ -d "${EROOT}"/etc/znc ]]; then
- ewarn "${EROOT}/etc/znc exists on your system."
- ewarn "Due to the nature of the contents of that folder,"
- ewarn "we have changed the default configuration to use"
- ewarn " ${EROOT}/var/lib/znc"
- ewarn "please move ${EROOT}/etc/znc to ${EROOT}/var/lib/znc"
- ewarn "or adjust your service configuration."
- fi
}
pkg_config() {
- if [[ -e "${EROOT}/var/lib/znc" ]]; then
- ewarn "${EROOT}/var/lib/znc already exists, aborting to avoid damaging"
- ewarn "any existing configuration. If you are sure you want"
- ewarn "to generate a new configuration, remove the folder"
- ewarn "and try again."
+ if [[ -d "${EROOT}/var/lib/znc/configs" ]]; then
+ ewarn "${EROOT}/var/lib/znc/configs/ already exists,"
+ ewarn "aborting to avoid damaging any existing configuration."
+ ewarn "If you are sure you want to generate a new configuration,"
+ ewarn "remove the folder and try again."
else
einfo "Press enter to interactively create a new configuration file for znc."
einfo "To abort, press Control-C"
read
- mkdir -p "${EROOT}/var/lib/znc" || die
- chown -R ${PN}:${PN} "${EROOT}/var/lib/znc" ||
- die "Setting permissions failed"
- start-stop-daemon --start --user ${PN}:${PN} --env ZNC_NO_LAUNCH_AFTER_MAKECONF=1 \
- "${EROOT}"/usr/bin/znc -- --makeconf --datadir "${EROOT}/var/lib/znc" ||
- die "Config failed"
+ su ${PN} -p -s /bin/sh -c 'ZNC_NO_LAUNCH_AFTER_MAKECONF=1 \
+ "${EROOT}"/usr/bin/znc --makeconf \
+ --datadir "${EROOT}/var/lib/znc"' || die "Config failed"
einfo
einfo "You can now start the znc service using the init system of your choice."
einfo "Don't forget to enable it if you want to use znc at boot."
diff --git a/net-irc/znc/znc-9999.ebuild b/net-irc/znc/znc-9999.ebuild
index 018091f6423e..fc85afa7b5a1 100644
--- a/net-irc/znc/znc-9999.ebuild
+++ b/net-irc/znc/znc-9999.ebuild
@@ -1,9 +1,9 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_COMPAT=( python3_{8..11} )
inherit cmake python-single-r1 readme.gentoo-r1 systemd