Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 101288 Details for
Bug 154164
Updated net-irc/psybnc ebuild
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
psybnc.patch
psybnc.patch (text/plain), 10.04 KB, created by
Sven Wegener
on 2006-11-05 11:34:36 UTC
(
hide
)
Description:
psybnc.patch
Filename:
MIME Type:
Creator:
Sven Wegener
Created:
2006-11-05 11:34:36 UTC
Size:
10.04 KB
patch
obsolete
>Index: metadata.xml >=================================================================== >RCS file: /var/cvsroot/gentoo-x86/net-irc/psybnc/metadata.xml,v >retrieving revision 1.1 >diff --unified -r1.1 metadata.xml >--- metadata.xml 28 Aug 2006 14:09:41 -0000 1.1 >+++ metadata.xml 5 Nov 2006 19:30:46 -0000 >@@ -6,5 +6,5 @@ > <email>gurligebis@gentoo.org</email> > <name>Bjarke Istrup Pedersen</name> > </maintainer> >- <longdescription>PsyBNC is a multi-user and multi-server gateway to IRC networks</longdescription> >+ <longdescription>psyBNC is a multi-user and multi-server gateway to IRC networks</longdescription> > </pkgmetadata> >Index: psybnc-2.3.2.7-r1.ebuild >=================================================================== >RCS file: /var/cvsroot/gentoo-x86/net-irc/psybnc/psybnc-2.3.2.7-r1.ebuild,v >retrieving revision 1.1 >diff --unified -r1.1 psybnc-2.3.2.7-r1.ebuild >--- psybnc-2.3.2.7-r1.ebuild 18 Oct 2006 15:17:02 -0000 1.1 >+++ psybnc-2.3.2.7-r1.ebuild 5 Nov 2006 19:30:46 -0000 >@@ -1,83 +1,128 @@ > # Copyright 1999-2006 Gentoo Foundation > # Distributed under the terms of the GNU General Public License v2 >-# $Header: /var/cvsroot/gentoo-x86/net-irc/psybnc/psybnc-2.3.2.7-r1.ebuild,v 1.1 2006/10/18 15:17:02 gurligebis Exp $ >+# $Header: $ > >-inherit eutils versionator >-MY_PV=$(replace_version_separator 3 '-') >-S=${WORKDIR}/${PN} >-INSTALLDIR="/opt/psybnc" >+inherit eutils versionator toolchain-funcs > >-DESCRIPTION="PsyBNC is a multi-user and multi-server gateway to IRC networks" >+MY_PV="$(replace_version_separator 3 -)" >+PSYBNC_HOME="/var/lib/psybnc" >+ >+DESCRIPTION="psyBNC is 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" > > LICENSE="GPL-2" > SLOT="0" > KEYWORDS="~x86 ~amd64" >-IUSE="" >-DEPEND=">=dev-libs/openssl-0.9.7d" >+IUSE="ipv6 ssl" >+ >+DEPEND="ssl? ( >=dev-libs/openssl-0.9.7d )" >+RDEPEND="${DEPEND}" >+ >+S="${WORKDIR}"/${PN} > > pkg_setup() { > enewgroup psybnc >- enewuser psybnc -1 -1 ${INSTALLDIR} psybnc >+ enewuser psybnc -1 -1 "${PSYBNC_HOME}" psybnc > } > > src_unpack() { > unpack ${A} >- cd ${S} >- epatch ${FILESDIR}/${PF}-gentoo.diff >+ cd "${S}" >+ >+ # Useless files >+ rm -f */INFO >+ >+ # Prevent stripping the binary >+ sed -i -e "/@strip/ d" tools/autoconf.c >+ >+ # Pretend we already have a certificate, we generate it in pkg_config >+ mkdir key >+ touch key/psybnc.cert.pem >+ >+ if [[ -f ${ROOT}/usr/share/psybnc/salt.h ]] >+ then >+ einfo "Using existing salt.h for password encryption" >+ cp "${ROOT}"/usr/share/psybnc/salt.h salt.h >+ fi >+ > } > > src_compile() { >- emake || die "emake failed" >+ use ipv6 || rm -f tools/chkipv6.c >+ use ssl || rm -f tools/chkssl.c >+ >+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" || die "emake failed" > } > > src_install() { >- dodoc CHANGES COPYING FAQ README SCRIPTING TODO >- dodir ${INSTALLDIR}/help ${INSTALLDIR}/key ${INSTALLDIR}/lang ${INSTALLDIR}/log ${INSTALLDIR}/motd ${INSTALLDIR}/scripts >+ dobin psybnc > >- insinto ${INSTALLDIR}/help >- doins help/* >- insinto ${INSTALLDIR}/key >- doins key/* >- insinto ${INSTALLDIR}/lang >- doins lang/* >- insinto ${INSTALLDIR}/log >- doins log/* >- insinto ${INSTALLDIR}/motd >- doins motd/* >- insinto ${INSTALLDIR}/scripts >- doins scripts/* >- insinto ${INSTALLDIR} >- doins ${FILESDIR}/psybnc.conf config.h >- >- exeinto ${INSTALLDIR} >- doexe psybnc >- exeinto /etc/init.d >- newexe ${FILESDIR}/psybnc.initd psybnc >- insinto /etc/conf.d >- newins ${FILESDIR}/psybnc.confd psybnc >+ insinto /usr/share/psybnc >+ doins -r help lang salt.h >+ fperms 0600 /usr/share/psybnc/salt.h >+ >+ insinto /etc/psybnc >+ doins "${FILESDIR}"/psybnc.conf >+ >+ keepdir "${PSYBNC_HOME}"/{log,motd,scripts} >+ dosym /usr/share/psybnc/lang "${PSYBNC_HOME}"/lang >+ dosym /usr/share/psybnc/help "${PSYBNC_HOME}"/help >+ >+ fowners psybnc:psybnc "${PSYBNC_HOME}"/{,log,motd,scripts} /etc/psybnc/psybnc.conf >+ fperms 0750 "${PSYBNC_HOME}"/{,log,motd,scripts} >+ fperms 0640 /etc/psybnc/psybnc.conf >+ >+ if use ssl >+ then >+ keepdir /etc/psybnc/ssl >+ dosym /etc/psybnc/ssl "${PSYBNC_HOME}"/key >+ else >+ # Drop SSL listener from psybnc.conf >+ sed -i -e "/^# Default SSL listener$/,+4 d" "${D}"/etc/psybnc/psybnc.conf >+ fi > >- chown -R psybnc:psybnc ${D}/${INSTALLDIR} >+ newinitd "${FILESDIR}"/psybnc.initd psybnc >+ newconfd "${FILESDIR}"/psybnc.confd psybnc >+ >+ dodoc CHANGES COPYING FAQ README SCRIPTING TODO >+ docinto example-script >+ dodoc scripts/example/DEFAULT.SCRIPT > } > > pkg_config() { >- einfo "Generating certificate request..." >- openssl req -new -out ${INSTALLDIR}/key/psybnc.req.pem -keyout ${INSTALLDIR}/key/psybnc.key.pem -nodes >- einfo "Generating self-signed certificate..." >- openssl req -x509 -days 365 -in ${INSTALLDIR}/key/psybnc.req.pem -key ${INSTALLDIR}/key/psybnc.key.pem -out ${INSTALLDIR}/key/psybnc.cert.pem >- einfo "Generating fingerprint..." >- openssl x509 -subject -dates -fingerprint -noout -in ${INSTALLDIR}/key/psybnc.cert.pem >- einfo "Setting permissions on files..." >- chmod 0640 ${INSTALLDIR}/key/psybnc.key.pem >- chmod 0640 ${INSTALLDIR}/key/psybnc.req.pem >- chmod 0640 ${INSTALLDIR}/key/psybnc.cert.pem >+ if use ssl >+ then >+ if [[ -f ${ROOT}/etc/psybnc/ssl/psybnc.cert.pem || -f ${ROOT}/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 >+ fi >+ >+ einfo "Generating certificate request..." >+ openssl req -new -out "${ROOT}"/etc/psybnc/ssl/psybnc.req.pem -keyout "${ROOT}"/etc/psybnc/ssl/psybnc.key.pem -nodes >+ 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 >+ einfo "Setting permissions on files..." >+ chown root:psybnc "${ROOT}"/etc/psybnc/ssl/psybnc.{cert,key,req}.pem >+ chmod 0640 "${ROOT}"/etc/psybnc/ssl/psybnc.{cert,key,req}.pem >+ fi > } > > pkg_postinst() { >- einfo "" >- einfo "Please run \"emerge --config =psybnc-${PVR}\" to create SSL certificates for your system." >- einfo "You can connect to the bnc on port 23998, user=gentoo, pass=gentoo," >- einfo "please edit the psybnc configuration in ${INSTALLDIR}/psybnc.conf to change this." >- einfo "" >+ if use ssl >+ then >+ einfo >+ einfo "Please run \"emerge --config =${CATEGORY}/${PF}\" to create needed SSL certificates." >+ fi >+ >+ einfo >+ einfo "You can connect to psyBNC on port 23998 with user gentoo and password gentoo." >+ einfo "Please edit the psyBNC configuration at /etc/psybnc/psybnc.conf to change this." >+ einfo >+ einfo "To be able to reuse an existing psybnc.conf, you need to make sure that the" >+ einfo "old salt.h is available at /usr/share/psybnc/salt.h when compiling a new" >+ einfo "version of psyBNC. It is needed for password encryption and decryption." >+ einfo > } >Index: files/psybnc-2.3.2.7-r1-gentoo.diff >=================================================================== >RCS file: files/psybnc-2.3.2.7-r1-gentoo.diff >diff -N files/psybnc-2.3.2.7-r1-gentoo.diff >--- files/psybnc-2.3.2.7-r1-gentoo.diff 18 Oct 2006 15:17:02 -0000 1.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,11 +0,0 @@ >---- tools/autoconf.c 2004-05-07 01:33:25.956597616 +0200 >-+++ tools/autoconf.c 2004-05-07 01:33:43.075995072 +0200 >-@@ -462,7 +462,7 @@ >- fprintf(makefile," @echo \"* for the sake of correct Cert-Checking *\"\n"); >- fprintf(makefile," @echo \"*******************************************\"\n"); >- fprintf(makefile," @echo \"Generating certificate request .. \"\n"); >-- fprintf(makefile," @%s req -new -config src/ssl.cnf -out key/psybnc.req.pem \\\n",sslbin); >-+ fprintf(makefile," @%s req -batch -new -config src/ssl.cnf -out key/psybnc.req.pem \\\n",sslbin); >- fprintf(makefile," -keyout key/psybnc.key.pem -nodes\n"); >- fprintf(makefile," @echo \"Generating self-signed certificate .. \"\n"); >- fprintf(makefile," @%s req -x509 -days 365 -in key/psybnc.req.pem \\\n",sslbin); >Index: files/psybnc.confd >=================================================================== >RCS file: /var/cvsroot/gentoo-x86/net-irc/psybnc/files/psybnc.confd,v >retrieving revision 1.1 >diff --unified -r1.1 psybnc.confd >--- files/psybnc.confd 28 Aug 2006 14:09:41 -0000 1.1 >+++ files/psybnc.confd 5 Nov 2006 19:30:46 -0000 >@@ -1,3 +1,5 @@ >-# psybnc start-up options >-USER="psybnc" >-BNCPATH="/opt/psybnc" >+# /etc/conf.d/psybnc >+ >+PSYBNC_CONFIG="/etc/psybnc/psybnc.conf" >+PSYBNC_HOME="/var/lib/psybnc" >+PSYBNC_USER="psybnc" >Index: files/psybnc.initd >=================================================================== >RCS file: /var/cvsroot/gentoo-x86/net-irc/psybnc/files/psybnc.initd,v >retrieving revision 1.1 >diff --unified -r1.1 psybnc.initd >--- files/psybnc.initd 28 Aug 2006 14:09:41 -0000 1.1 >+++ files/psybnc.initd 5 Nov 2006 19:30:46 -0000 >@@ -1,32 +1,42 @@ > #!/sbin/runscript >+# Copyright 1999-2006 Gentoo Foundation >+# Distributed under the terms of the GNU General Public License v2 >+# $Header: $ > > depend() { > need net > } > > check_config() { >- if [ -z "${USER}" ] >+ if [[ ! -f ${PSYBNC_CONFIG} ]] > then >- eerror "Please set \$USER in /etc/conf.d/psybnc!" >- return 1 >+ eerror "Please set \$PSYBNC_CONFIG in /etc/conf.d/psybnc!" >+ return 1 > fi >- if [ -z "${BNCPATH}" ] >+ >+ if [[ ! -d ${PSYBNC_HOME} ]] > then >- eerror "Please set \$BNCPATH in /etc/conf.d/psybnc!" >- return 1 >+ eerror "Please set \$PSYBNC_HOME in /etc/conf.d/psybnc!" >+ return 1 >+ fi >+ >+ if [[ -z ${PSYBNC_USER} ]] >+ then >+ eerror "Please set \$PSYBNC_USER in /etc/conf.d/psybnc!" >+ return 1 > fi > } > > start() { >- ebegin "Starting psybnc" > check_config || return 1 >- export HOME="${BNCPATH}" >- start-stop-daemon -c ${USER} -S -q --chdir ${BNCPATH} -x ${BNCPATH}/psybnc 1>/dev/null 2>&1 >+ ebegin "Starting psyBNC" >+ start-stop-daemon --start --quiet --chuid "${PSYBNC_USER}" --chdir "${PSYBNC_HOME}" --exec /usr/bin/psybnc -- "${PSYBNC_CONFIG}" &>/dev/null > eend $? > } > > stop() { >- ebegin "Stopping psybnc" >- start-stop-daemon -K -q --exec ${BNCPATH}/psybnc -s 9 >+ check_config || return 1 >+ ebegin "Stopping psyBNC" >+ start-stop-daemon --stop --quiet --pidfile "${PSYBNC_HOME}"/psybnc.pid --signal 9 > eend $? > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 154164
: 101288