From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id EC8BF1382C5 for ; Wed, 10 Mar 2021 01:24:29 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3530CE0864; Wed, 10 Mar 2021 01:24:29 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0CEFBE0863 for ; Wed, 10 Mar 2021 01:24:29 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 82C76340D17 for ; Wed, 10 Mar 2021 01:24:27 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7B6415AA for ; Wed, 10 Mar 2021 01:24:24 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1615336946.b09cb12d8eaf6c08054b42f67730a84a4b23aa66.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-irc/psybnc/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-irc/psybnc/psybnc-2.3.2.9-r3.ebuild X-VCS-Directories: net-irc/psybnc/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: b09cb12d8eaf6c08054b42f67730a84a4b23aa66 X-VCS-Branch: master Date: Wed, 10 Mar 2021 01:24:24 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: a4c4d679-502f-44be-a6d8-47b08f8868ad X-Archives-Hash: 5e6a87d78719da284d43db068619daf6 commit: b09cb12d8eaf6c08054b42f67730a84a4b23aa66 Author: Sam James gentoo org> AuthorDate: Wed Mar 10 00:42:26 2021 +0000 Commit: Sam James gentoo org> CommitDate: Wed Mar 10 00:42:26 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b09cb12d net-irc/psybnc: modernise, fix invalid EROOT in src_* Signed-off-by: Sam James gentoo.org> net-irc/psybnc/psybnc-2.3.2.9-r3.ebuild | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/net-irc/psybnc/psybnc-2.3.2.9-r3.ebuild b/net-irc/psybnc/psybnc-2.3.2.9-r3.ebuild index b6593d48d19..5a3deaeb55f 100644 --- a/net-irc/psybnc/psybnc-2.3.2.9-r3.ebuild +++ b/net-irc/psybnc/psybnc-2.3.2.9-r3.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -11,16 +11,18 @@ PSYBNC_HOME="/var/lib/psybnc" DESCRIPTION="A multi-user and multi-server gateway to IRC networks" HOMEPAGE="http://www.psybnc.at/index.html" SRC_URI="http://www.psybnc.at/download/beta/psyBNC-${MY_PV}.tar.gz" +S="${WORKDIR}/${PN}" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~ppc ~sparc ~x86" IUSE="ipv6 ssl oidentd scripting multinetwork" -DEPEND="ssl? ( >=dev-libs/openssl-0.9.7d ) - oidentd? ( >=net-misc/oidentd-2.0 )" +DEPEND=" + ssl? ( >=dev-libs/openssl-0.9.7d:= ) + oidentd? ( >=net-misc/oidentd-2.0 ) +" RDEPEND="${DEPEND}" -S="${WORKDIR}"/"${PN}" pkg_setup() { enewgroup psybnc @@ -37,14 +39,15 @@ src_unpack() { # Pretend we already have a certificate, we generate it in pkg_config touch key/psybnc.cert.pem || die - if [[ -f ${ROOT}/usr/share/psybnc/salt.h ]]; then + if [[ -f "${EPREFIX}"/usr/share/psybnc/salt.h ]]; then einfo "Using existing salt.h for password encryption" - cp "${ROOT}"/usr/share/psybnc/salt.h salt.h || die + cp "${EPREFIX}"/usr/share/psybnc/salt.h salt.h || die fi } src_prepare() { default + eapply "${FILESDIR}/compile.diff" eapply "${FILESDIR}/ldflags-fix.patch" @@ -65,6 +68,7 @@ src_compile() { if use ipv6; then rm -f tools/chkipv6.c || die fi + if use ssl; then rm -f tools/chkssl.c || die fi @@ -118,7 +122,7 @@ src_install() { pkg_config() { if use ssl; then - if [[ -f ${ROOT}/etc/psybnc/ssl/psybnc.cert.pem || -f ${ROOT}/etc/psybnc/ssl/psybnc.key.pem ]]; then + if [[ -f "${EROOT}"/etc/psybnc/ssl/psybnc.cert.pem || -f "${EROOT}"/etc/psybnc/ssl/psybnc.key.pem ]]; then ewarn "Existing /etc/psybnc/psybnc.cert.pem or /etc/psybnc/psybnc.key.pem found!" ewarn "Remove /etc/psybnc/psybnc.*.pem and run emerge --config =${CATEGORY}/${PF} again." return @@ -127,10 +131,12 @@ pkg_config() { einfo "Generating certificate request..." openssl req -new -out "${ROOT}"/etc/psybnc/ssl/psybnc.req.pem \ -keyout "${ROOT}"/etc/psybnc/ssl/psybnc.key.pem -nodes || die + einfo "Generating self-signed certificate..." openssl req -x509 -days 365 -in "${ROOT}"/etc/psybnc/ssl/psybnc.req.pem \ -key "${ROOT}"/etc/psybnc/ssl/psybnc.key.pem \ -out "${ROOT}"/etc/psybnc/ssl/psybnc.cert.pem || die + einfo "Setting permissions on files..." chown root:psybnc "${ROOT}"/etc/psybnc/ssl/psybnc.{cert,key,req}.pem || die chmod 0640 "${ROOT}"/etc/psybnc/ssl/psybnc.{cert,key,req}.pem || die @@ -140,20 +146,22 @@ pkg_config() { pkg_postinst() { if use ssl; then elog - elog "Please run \"emerge --config =${CATEGORY}/${PF}\" to create needed SSL certificates." + elog "Please run \"emerge --config =${CATEGORY}/${PF}\" to create the needed SSL certificates." fi + if use oidentd; then elog elog "You have enabled oidentd-support. You will need to set" - elog "up your /etc/oident.conf file before running psybnc. An example" - elog "for psyBNC can be found under /etc/oidentd.conf.psybnc" + elog "up your ${EROOT}/etc/oident.conf file before running psybnc. An example" + elog "for psyBNC can be found under ${EROOT}/etc/oidentd.conf.psybnc" fi + elog elog "You can connect to psyBNC on port 23998 with user gentoo and password gentoo." - elog "Please edit the psyBNC configuration at /etc/psybnc/psybnc.conf to change this." + elog "Please edit the psyBNC configuration at ${EROOT}/etc/psybnc/psybnc.conf to change this." elog elog "To be able to reuse an existing psybnc.conf, you need to make sure that the" - elog "old salt.h is available at /usr/share/psybnc/salt.h when compiling a new" + elog "old salt.h is available at ${EROOT}/usr/share/psybnc/salt.h when compiling a new" elog "version of psyBNC. It is needed for password encryption and decryption." elog }