diff options
author | Tomas Chvatal <scarabeus@gentoo.org> | 2010-07-01 10:34:03 +0000 |
---|---|---|
committer | Tomas Chvatal <scarabeus@gentoo.org> | 2010-07-01 10:34:03 +0000 |
commit | 2dfab86ba0747f65b099b6941a83b34acfe4e2cb (patch) | |
tree | d9d548a0712739bd30d0b8c7b179cba8a7703cdc /net-irc | |
parent | stable x86, security bug 326413 (diff) | |
download | historical-2dfab86ba0747f65b099b6941a83b34acfe4e2cb.tar.gz historical-2dfab86ba0747f65b099b6941a83b34acfe4e2cb.tar.bz2 historical-2dfab86ba0747f65b099b6941a83b34acfe4e2cb.zip |
Redo the live ebuild quite bit. Do not die in pkg_setup. Move confighome to system location.
Package-Manager: portage-2.2_rc67/cvs/Linux x86_64
Diffstat (limited to 'net-irc')
-rw-r--r-- | net-irc/quassel/ChangeLog | 7 | ||||
-rw-r--r-- | net-irc/quassel/Manifest | 16 | ||||
-rw-r--r-- | net-irc/quassel/files/quasselcore.conf | 13 | ||||
-rw-r--r-- | net-irc/quassel/files/quasselcore.init | 60 | ||||
-rw-r--r-- | net-irc/quassel/quassel-9999.ebuild | 69 |
5 files changed, 144 insertions, 21 deletions
diff --git a/net-irc/quassel/ChangeLog b/net-irc/quassel/ChangeLog index 19bb885cbcac..d3be24adc119 100644 --- a/net-irc/quassel/ChangeLog +++ b/net-irc/quassel/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for net-irc/quassel # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-irc/quassel/ChangeLog,v 1.88 2010/06/17 20:48:46 patrick Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-irc/quassel/ChangeLog,v 1.89 2010/07/01 10:34:03 scarabeus Exp $ + + 01 Jul 2010; Tomáš Chvátal <scarabeus@gentoo.org> quassel-9999.ebuild, + +files/quasselcore.conf, +files/quasselcore.init: + Redo the live ebuild quite bit. Do not die in pkg_setup. Move confighome + to system location. 17 Jun 2010; Patrick Lauer <patrick@gentoo.org> quassel-0.5.1.ebuild, quassel-0.5.2.ebuild: diff --git a/net-irc/quassel/Manifest b/net-irc/quassel/Manifest index 008bc68e93c5..00aaedab0d0a 100644 --- a/net-irc/quassel/Manifest +++ b/net-irc/quassel/Manifest @@ -1,13 +1,25 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + AUX 0.5.2-fix_x11_detection.patch 854 RMD160 88585681941f9ed915edb4ec2f6a07d645ceb22e SHA1 80b6e5a9c75fb69d91f8ec86770369b20f412311 SHA256 1daa5834b1836756f74829e9d0861d9cfda7998a3a477c980fbdf5b2769c2500 AUX quassel.logrotate 105 RMD160 42bde4a3d8a899971037b1e2d0ddfb5b136f065e SHA1 c4ddd2cebd364c213ed4443e5bf8bd2ae3b17ad9 SHA256 00c32e857d7a4346d09ac057768565692da9cacf41ed37cc7e357b395e033a45 AUX quasselcore-2.conf 756 RMD160 5f7ec7d1e46da202fdc18e2bd25827d307ec15fc SHA1 688039bd9616177eab803b7a4b12945e009cc806 SHA256 48079bebba2e723d582751b63b5d696ba506b364d20268c38f565f2c85257baa AUX quasselcore-2.init 1693 RMD160 729dad48f3cb5afd35bb76c731349109becee392 SHA1 f1a83d63398b3df5e7700921db22d76595a3a96c SHA256 5632cfbb1921561924af1d50196e0e9d1bb80caa90f5d98e551af7c30174458a +AUX quasselcore.conf 496 RMD160 328fa5c018107a34e67a681da79f87c42c16bca5 SHA1 2a4cf7f8b1798fadbd6b42273d3b9a32470bb8a9 SHA256 120a7664ce3819164beeae973c2c950b462844b80fe38240b3de48514797cbf2 +AUX quasselcore.init 1755 RMD160 755e6640cfd10d938ff9320ff576ab5a783725e5 SHA1 28530ff76eda66a6e0dcce509f0aa70517b1468a SHA256 0db3db469a90840ef2136210d8623b95d8ab02942efba2789030b31cd82a0bc8 DIST quassel-0.5.1.tar.bz2 3339773 RMD160 411f70ed4b4162f8523bf5498cd22aca43171b5c SHA1 448c2712176d5c0328b439b60ee27e06645339ba SHA256 c2aa0694b775b33380cb5bb452512433fa9f0bf4820778e8ec98f621e5458f62 DIST quassel-0.5.2.tar.bz2 3307109 RMD160 bac05710c6126150c1546713325f319bef2640c8 SHA1 68abd45cd506303090b54e4aa21eb0273d3e4217 SHA256 9c98dcefa4b1655ae92b0204ef30594c9043701fb66350c5e69beafa86b88c8a DIST quassel-0.6.1.tar.bz2 2531035 RMD160 39e08319488062e02545055c91554ee1ea025912 SHA1 92017692712ed54d678211bb8d4dc4a992601d2d SHA256 e01b5a91359ca37b3db2849b3b1db32f768c865f698d0a4f3ef679f722edb5ec EBUILD quassel-0.5.1.ebuild 3218 RMD160 39c25156b7ed5c938be60b9b189d7c52a18af088 SHA1 5b9b23f3c6a99ce9494ba4c6d0ceef131c0d7d2a SHA256 d7e361d29f8ab6caf2303600e1832caab14165eda7201557ec3cc0a2e3055cdf EBUILD quassel-0.5.2.ebuild 3282 RMD160 2c191d65f757c83445da768cd83966c912682bc6 SHA1 00129b070abdd35dfafc8e12bcd286897b29697f SHA256 e7c9433470ad9a1a0e2b2d74f2e90dc15008fc86a484cf066ceb38f185832fba EBUILD quassel-0.6.1.ebuild 2901 RMD160 bffc3302e8829a4e4d3ffbe3d449f95b06cbd6d7 SHA1 7c5f1c1bb8c0bf5d1d9b2da962f1319e3ff44ec7 SHA256 ce206222ccec46dfdd8602d87a1cdfc71db626d2546863f9b2de95590013ebcd -EBUILD quassel-9999.ebuild 2878 RMD160 dd24917ebe6b49784e090d14839ec666f9cc50d7 SHA1 f9310a057f83bc4669a56b86a75a7ca56b4dfef4 SHA256 d30df6faff41a4ff3660fd5d6e11071083cf8c95cd3266b4ffeff36019d3f860 -MISC ChangeLog 15647 RMD160 6f5fbc319b628c81ed13d09f888c5c39633a810b SHA1 97d911bcbef6b625709a9c669bcaed7159813ef7 SHA256 ec230b6f96320e93cf1de61c3e20c5d59fffb43c33f730583a695c1003f3bf3e +EBUILD quassel-9999.ebuild 3703 RMD160 30ee3f74bbf14543d1ee14e2131fba60bc15b49d SHA1 654c578a64f77278e1ff4dd93dc21909072b533a SHA256 fea2bc78463d4f9d99d6376f6d01bbade1a3632182d16c9a7ad695c8ef692235 +MISC ChangeLog 15875 RMD160 c5a2ece95dff164d2c1309ba0f445f0c59893fae SHA1 67d77bb289d1d46abfa9c42d3ad16ba49e381d26 SHA256 7aaa639010acef1d0428c9074dfa16c43d583c3fb0f8514df6851708603d6480 MISC metadata.xml 1903 RMD160 cc0c6f3ca1ade233d4640dfd913e83ee13cdbdc2 SHA1 ae3def4a7ce3f9bfc42e79d3ea851c65e0c00c21 SHA256 6188126527fca9af504832fb9a492111c35b78fa9ed422ae0fcf2bcb6478cd95 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.15 (GNU/Linux) + +iEYEARECAAYFAkwsbwUACgkQHB6c3gNBRYfUDwCgyN2Q8Fz6CcQWfqcZSZahy4Og +aFQAn2xZeYLQY67q2IvUSSoPixn+07I+ +=R4uM +-----END PGP SIGNATURE----- diff --git a/net-irc/quassel/files/quasselcore.conf b/net-irc/quassel/files/quasselcore.conf new file mode 100644 index 000000000000..e677b4026b5e --- /dev/null +++ b/net-irc/quassel/files/quasselcore.conf @@ -0,0 +1,13 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-irc/quassel/files/quasselcore.conf,v 1.4 2010/07/01 10:34:03 scarabeus Exp $ + +# Loglevel Debug|Info|Warning|Error. Default is: Info +# The logfile is located at /var/log/quassel.log. +LOGLEVEL="Info" + +# The address(es) quasselcore will listen on. Default is 0.0.0.0 +LISTEN="0.0.0.0" + +# The port quasselcore will listen at. Default is: 4242 +PORT="4242" diff --git a/net-irc/quassel/files/quasselcore.init b/net-irc/quassel/files/quasselcore.init new file mode 100644 index 000000000000..8dacba7c7356 --- /dev/null +++ b/net-irc/quassel/files/quasselcore.init @@ -0,0 +1,60 @@ +#!/sbin/runscript +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-irc/quassel/files/quasselcore.init,v 1.5 2010/07/01 10:34:03 scarabeus Exp $ + +depend() { + need net + use postgres +} + +LOGFILE="/var/log/quassel.log" +CORE="$(which quasselcore)" +PID="/var/run/quassel.pid" +CONFIGDIR="/var/lib/quassel/" +QUASSEL_USER="quassel" + +checkconfig() { + # check config folder + if [ ! -d "${CONFIGDIR}" ]; then + mkdir ${CONFIGDIR} || return 1 + fi + # permissions always changed just to avoid runtime issues + chown -r ${QUASSEL_USER}:${QUASSEL_USER} ${CONFIGDIR} || return 1 + + # check log file + if [ ! -e "${LOGFILE}" ]; then + touch ${LOGFILE} || return 1 + fi + # permissions always changed just to avoid runtime issues + chown ${QUASSEL_USER}:${QUASSEL_USER} ${LOGFILE} || return 1 +} + +start() { + checkconfig || return 1 + + ebegin "Starting Quassel Core" + + if [ -n "${RC_UNAME}" ]; then + # running on baselayout-2/openrc + start-stop-daemon --start --user ${QUASSEL_USER} --background --make-pidfile \ + --pidfile ${PID} \ + --exec ${CORE} -- --logfile=${LOGFILE} --loglevel=${LOGLEVEL:-"Info"} \ + --listen=${LISTEN:-"0.0.0.0"} --port=${PORT:-"4242"} \ + --configdir=${CONFIGDIR:-"/var/lib/quassel/"} + else + # running on baselayout-1 + start-stop-daemon --start --chuid ${QUASSEL_USER} --background --make-pidfile \ + --pidfile ${PID} --env HOME="/var/lib/quassel/" \ + --exec ${CORE} -- --logfile=${LOGFILE} --loglevel=${LOGLEVEL:-"Info"} \ + --listen=${LISTEN:-"0.0.0.0"} --port=${PORT:-"4242"} \ + --configdir=${CONFIGDIR:-"/var/lib/quassel/"} + fi + eend $? +} + +stop() { + ebegin "Stopping Quassel Core" + start-stop-daemon --stop --pidfile ${PID} --exec ${CORE} + eend $? +} diff --git a/net-irc/quassel/quassel-9999.ebuild b/net-irc/quassel/quassel-9999.ebuild index a94e94fd105d..5052711f5b1c 100644 --- a/net-irc/quassel/quassel-9999.ebuild +++ b/net-irc/quassel/quassel-9999.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-irc/quassel/quassel-9999.ebuild,v 1.35 2010/06/07 16:33:42 billie Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-irc/quassel/quassel-9999.ebuild,v 1.36 2010/07/01 10:34:03 scarabeus Exp $ EAPI="2" @@ -46,6 +46,14 @@ RDEPEND=" X? ( ${GUI_RDEPEND} ) ) ssl? ( x11-libs/qt-core:4[ssl] ) + !monolithic? ( + !server? ( + !X? ( + ${SERVER_RDEPEND} + ${GUI_RDEPEND} + ) + ) + ) " DEPEND="${RDEPEND}" @@ -53,14 +61,16 @@ DOCS="AUTHORS ChangeLog README" pkg_setup() { if ! use monolithic && ! use server && ! use X ; then - eerror "You have to build at least one of the monolithic client (USE=monolithic)," - eerror "the quasselclient (USE=X) or the quasselcore (USE=server)." - die "monolithic, server and X flag unset." + ewarn "You have to build at least one of the monolithic client (USE=monolithic)," + ewarn "the quasselclient (USE=X) or the quasselcore (USE=server)." + echo + ewarn "Enabling monolithic by default." + FORCED_MONO="yes" fi } src_configure() { - local mycmakeargs=" + local mycmakeargs=( $(cmake-utils_use_with ayatana LIBINDICATE) $(cmake-utils_use_want X QTCLIENT) $(cmake-utils_use_want server CORE) @@ -71,8 +81,10 @@ src_configure() { $(cmake-utils_use_with dbus) $(cmake-utils_use_with ssl OPENSSL) $(cmake-utils_use_with !kde OXYGEN) - -DEMBED_DATA=OFF - " + "-DEMBED_DATA=OFF" + ) + + [[ ${FORCED_MONO} == "yes" ]] && mycmakeargs+=( '-DWANT_MONO=ON' ) cmake-utils_src_configure } @@ -81,26 +93,47 @@ src_install() { cmake-utils_src_install if use server ; then - newinitd "${FILESDIR}"/quasselcore-2.init quasselcore || die "newinitd failed" - newconfd "${FILESDIR}"/quasselcore-2.conf quasselcore || die "newconfd failed" + # prepare folders in /var/ + dodir /var/lib/${PN}/ + keepdir /var/lib/${PN}/ + fowners ${PN}:${PN} /var/lib/${PN}/ + + # init scripts + newinitd "${FILESDIR}"/quasselcore.init quasselcore || die "newinitd failed" + newconfd "${FILESDIR}"/quasselcore.conf quasselcore || die "newconfd failed" + # logrotate insinto /etc/logrotate.d - newins "${FILESDIR}/quassel.logrotate" quassel + newins "${FILESDIR}/quassel.logrotate" quassel || die "newins failed" fi } +pkg_preinst() { + # create quassel user + enewuser ${PN} -1 -1 /var/lib/${PN} "${PN}" +} + pkg_postinst() { - if use server ; then - ewarn - ewarn "In order to use the quassel init script you must set the" - ewarn "QUASSEL_USER variable in ${ROOT%/}/etc/conf.d/quasselcore to your username." - ewarn "Note: This is the user who runs the quasselcore and is independent" - ewarn "from the users you set up in the quasselclient." + if use server && use ssl; then + # inform about genreating ssl certificate + elog "If you want to use ssl connection to your core, please generate ssl key, with folowing command:" + elog "# openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /var/lib/${PN}/quasselCert.pem -ou" + echo + elog "Also remember that with the above command the key is valid only for 1 year." fi - if ( use server || use monolithic ) && use ssl ; then - elog + if ( use monolithic || [[ ${FORCED_MONO} == "yes" ]] ) && use ssl ; then + echo elog "Information on how to enable SSL support for client/core connections" elog "is available at http://bugs.quassel-irc.org/wiki/quassel-irc." fi + + # temporary info mesage + if use server; then + ewarn "Please note that all configuration moved from" + ewarn "/home/\${QUASSEL_USER}/.config/quassel-irc.org/" + ewarn "to: /var/lib/${PN}/." + echo + ewarn "For migration. Stop the core, move the files to new location and then start server again." + fi } |