diff options
author | 2015-06-24 18:08:23 +0000 | |
---|---|---|
committer | 2015-06-24 18:08:23 +0000 | |
commit | 4b4a27ffc16294868c61aa458753e38d81c0bc75 (patch) | |
tree | ab11a8d91fafb668323822b182252b1590cc1f23 /net-irc | |
parent | Set REQUIRED_USE on phonon when kde is set, bug #553118. (diff) | |
download | gentoo-2-4b4a27ffc16294868c61aa458753e38d81c0bc75.tar.gz gentoo-2-4b4a27ffc16294868c61aa458753e38d81c0bc75.tar.bz2 gentoo-2-4b4a27ffc16294868c61aa458753e38d81c0bc75.zip |
Cleanup vulnerable versions, wrt bugs #547884, #544230.
(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 0xFDF4F788)
Diffstat (limited to 'net-irc')
-rw-r--r-- | net-irc/quassel/ChangeLog | 6 | ||||
-rw-r--r-- | net-irc/quassel/files/DOS-sec.patch | 318 | ||||
-rw-r--r-- | net-irc/quassel/quassel-0.10.0-r1.ebuild | 173 | ||||
-rw-r--r-- | net-irc/quassel/quassel-0.11.1.ebuild | 199 |
4 files changed, 5 insertions, 691 deletions
diff --git a/net-irc/quassel/ChangeLog b/net-irc/quassel/ChangeLog index ded4d8a67742..817fb03d2720 100644 --- a/net-irc/quassel/ChangeLog +++ b/net-irc/quassel/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for net-irc/quassel # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-irc/quassel/ChangeLog,v 1.209 2015/06/24 18:02:59 johu Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-irc/quassel/ChangeLog,v 1.210 2015/06/24 18:08:23 johu Exp $ + + 24 Jun 2015; Johannes Huber <johu@gentoo.org> -files/DOS-sec.patch, + -quassel-0.10.0-r1.ebuild, -quassel-0.11.1.ebuild: + Cleanup vulnerable versions, wrt bugs #547884, #544230. 24 Jun 2015; Johannes Huber <johu@gentoo.org> quassel-0.12.2.ebuild, quassel-9999.ebuild: diff --git a/net-irc/quassel/files/DOS-sec.patch b/net-irc/quassel/files/DOS-sec.patch deleted file mode 100644 index bc3714f5aadb..000000000000 --- a/net-irc/quassel/files/DOS-sec.patch +++ /dev/null @@ -1,318 +0,0 @@ -diff --git a/src/core/corebasichandler.cpp b/src/core/corebasichandler.cpp -index dfa8a99..fbfc76c 100644 ---- a/src/core/corebasichandler.cpp -+++ b/src/core/corebasichandler.cpp -@@ -33,6 +33,9 @@ CoreBasicHandler::CoreBasicHandler(CoreNetwork *parent) - connect(this, SIGNAL(putCmd(QString, const QList<QByteArray> &, const QByteArray &)), - network(), SLOT(putCmd(QString, const QList<QByteArray> &, const QByteArray &))); - -+ connect(this, SIGNAL(putCmd(QString, const QList<QList<QByteArray>> &, const QByteArray &)), -+ network(), SLOT(putCmd(QString, const QList<QList<QByteArray>> &, const QByteArray &))); -+ - connect(this, SIGNAL(putRawLine(const QByteArray &)), - network(), SLOT(putRawLine(const QByteArray &))); - } -diff --git a/src/core/corebasichandler.h b/src/core/corebasichandler.h -index 20d057f..a4b5a7f 100644 ---- a/src/core/corebasichandler.h -+++ b/src/core/corebasichandler.h -@@ -55,6 +55,7 @@ class CoreBasicHandler : public BasicHandler - signals: - void displayMsg(Message::Type, BufferInfo::Type, const QString &target, const QString &text, const QString &sender = "", Message::Flags flags = Message::None); - void putCmd(const QString &cmd, const QList<QByteArray> ¶ms, const QByteArray &prefix = QByteArray()); -+ void putCmd(const QString &cmd, const QList<QList<QByteArray>> ¶ms, const QByteArray &prefix = QByteArray()); - void putRawLine(const QByteArray &msg); - - protected: -diff --git a/src/core/corenetwork.cpp b/src/core/corenetwork.cpp -index 7e9ce26..932af6f 100644 ---- a/src/core/corenetwork.cpp -+++ b/src/core/corenetwork.cpp -@@ -284,6 +284,16 @@ void CoreNetwork::putCmd(const QString &cmd, const QList<QByteArray> ¶ms, co - } - - -+void CoreNetwork::putCmd(const QString &cmd, const QList<QList<QByteArray>> ¶ms, const QByteArray &prefix) -+{ -+ QListIterator<QList<QByteArray>> i(params); -+ while (i.hasNext()) { -+ QList<QByteArray> msg = i.next(); -+ putCmd(cmd, msg, prefix); -+ } -+} -+ -+ - void CoreNetwork::setChannelJoined(const QString &channel) - { - _autoWhoQueue.prepend(channel.toLower()); // prepend so this new chan is the first to be checked -@@ -980,3 +990,79 @@ void CoreNetwork::requestSetNetworkInfo(const NetworkInfo &info) - } - } - } -+ -+ -+QList<QList<QByteArray>> CoreNetwork::splitMessage(const QString &cmd, const QString &message, std::function<QList<QByteArray>(QString &)> cmdGenerator) -+{ -+ QString wrkMsg(message); -+ QList<QList<QByteArray>> msgsToSend; -+ -+ // do while (wrkMsg.size() > 0) -+ do { -+ // First, check to see if the whole message can be sent at once. The -+ // cmdGenerator function is passed in by the caller and is used to encode -+ // and encrypt (if applicable) the message, since different callers might -+ // want to use different encoding or encode different values. -+ int splitPos = wrkMsg.size(); -+ QList<QByteArray> initialSplitMsgEnc = cmdGenerator(wrkMsg); -+ int initialOverrun = userInputHandler()->lastParamOverrun(cmd, initialSplitMsgEnc); -+ -+ if (initialOverrun) { -+ // If the message was too long to be sent, first try splitting it along -+ // word boundaries with QTextBoundaryFinder. -+ QString splitMsg(wrkMsg); -+ QTextBoundaryFinder qtbf(QTextBoundaryFinder::Word, splitMsg); -+ qtbf.setPosition(initialSplitMsgEnc[1].size() - initialOverrun); -+ QList<QByteArray> splitMsgEnc; -+ int overrun = initialOverrun; -+ -+ while (overrun) { -+ splitPos = qtbf.toPreviousBoundary(); -+ -+ // splitPos==-1 means the QTBF couldn't find a split point at all and -+ // splitPos==0 means the QTBF could only find a boundary at the beginning of -+ // the string. Neither one of these works for us. -+ if (splitPos > 0) { -+ // If a split point could be found, split the message there, calculate the -+ // overrun, and continue with the loop. -+ splitMsg = splitMsg.left(splitPos); -+ splitMsgEnc = cmdGenerator(splitMsg); -+ overrun = userInputHandler()->lastParamOverrun(cmd, splitMsgEnc); -+ } -+ else { -+ // If a split point could not be found (the beginning of the message -+ // is reached without finding a split point short enough to send) and we -+ // are still in Word mode, switch to Grapheme mode. We also need to restore -+ // the full wrkMsg to splitMsg, since splitMsg may have been cut down during -+ // the previous attempt to find a split point. -+ if (qtbf.type() == QTextBoundaryFinder::Word) { -+ splitMsg = wrkMsg; -+ splitPos = splitMsg.size(); -+ QTextBoundaryFinder graphemeQtbf(QTextBoundaryFinder::Grapheme, splitMsg); -+ graphemeQtbf.setPosition(initialSplitMsgEnc[1].size() - initialOverrun); -+ qtbf = graphemeQtbf; -+ } -+ else { -+ // If the QTBF fails to find a split point in Grapheme mode, we give up. -+ // This should never happen, but it should be handled anyway. -+ qWarning() << "Unexpected failure to split message!"; -+ return msgsToSend; -+ } -+ } -+ } -+ -+ // Once a message of sendable length has been found, remove it from the wrkMsg and -+ // add it to the list of messages to be sent. -+ wrkMsg.remove(0, splitPos); -+ msgsToSend.append(splitMsgEnc); -+ } -+ else{ -+ // If the entire remaining message is short enough to be sent all at once, remove -+ // it from the wrkMsg and add it to the list of messages to be sent. -+ wrkMsg.remove(0, splitPos); -+ msgsToSend.append(initialSplitMsgEnc); -+ } -+ } while (wrkMsg.size() > 0); -+ -+ return msgsToSend; -+} -diff --git a/src/core/corenetwork.h b/src/core/corenetwork.h -index 87121ba..05565a4 100644 ---- a/src/core/corenetwork.h -+++ b/src/core/corenetwork.h -@@ -40,6 +40,8 @@ - - #include "coresession.h" - -+#include <functional> -+ - class CoreIdentity; - class CoreUserInputHandler; - class CoreIgnoreListManager; -@@ -93,6 +95,8 @@ class CoreNetwork : public Network - inline quint16 localPort() const { return socket.localPort(); } - inline quint16 peerPort() const { return socket.peerPort(); } - -+ QList<QList<QByteArray>> splitMessage(const QString &cmd, const QString &message, std::function<QList<QByteArray>(QString &)> cmdGenerator); -+ - public slots: - virtual void setMyNick(const QString &mynick); - -@@ -112,6 +116,7 @@ public slots: - void userInput(BufferInfo bufferInfo, QString msg); - void putRawLine(QByteArray input); - void putCmd(const QString &cmd, const QList<QByteArray> ¶ms, const QByteArray &prefix = QByteArray()); -+ void putCmd(const QString &cmd, const QList<QList<QByteArray>> ¶ms, const QByteArray &prefix = QByteArray()); - - void setChannelJoined(const QString &channel); - void setChannelParted(const QString &channel); -diff --git a/src/core/coreuserinputhandler.cpp b/src/core/coreuserinputhandler.cpp -index 33d1f67..72ac996 100644 ---- a/src/core/coreuserinputhandler.cpp -+++ b/src/core/coreuserinputhandler.cpp -@@ -473,12 +473,16 @@ void CoreUserInputHandler::handleMsg(const BufferInfo &bufferInfo, const QString - return; - - QString target = msg.section(' ', 0, 0); -- QByteArray encMsg = userEncode(target, msg.section(' ', 1)); -+ QString msgSection = msg.section(' ', 1); -+ -+ std::function<QByteArray(const QString &, const QString &)> encodeFunc = [this] (const QString &target, const QString &message) -> QByteArray { -+ return userEncode(target, message); -+ }; - - #ifdef HAVE_QCA2 -- putPrivmsg(serverEncode(target), encMsg, network()->cipher(target)); -+ putPrivmsg(target, msgSection, encodeFunc, network()->cipher(target)); - #else -- putPrivmsg(serverEncode(target), encMsg); -+ putPrivmsg(target, msgSection, encodeFunc); - #endif - } - -@@ -594,11 +598,14 @@ void CoreUserInputHandler::handleSay(const BufferInfo &bufferInfo, const QString - if (bufferInfo.bufferName().isEmpty() || !bufferInfo.acceptsRegularMessages()) - return; // server buffer - -- QByteArray encMsg = channelEncode(bufferInfo.bufferName(), msg); -+ std::function<QByteArray(const QString &, const QString &)> encodeFunc = [this] (const QString &target, const QString &message) -> QByteArray { -+ return channelEncode(target, message); -+ }; -+ - #ifdef HAVE_QCA2 -- putPrivmsg(serverEncode(bufferInfo.bufferName()), encMsg, network()->cipher(bufferInfo.bufferName())); -+ putPrivmsg(bufferInfo.bufferName(), msg, encodeFunc, network()->cipher(bufferInfo.bufferName())); - #else -- putPrivmsg(serverEncode(bufferInfo.bufferName()), encMsg); -+ putPrivmsg(bufferInfo.bufferName(), msg, encodeFunc); - #endif - emit displayMsg(Message::Plain, bufferInfo.type(), bufferInfo.bufferName(), msg, network()->myNick(), Message::Self); - } -@@ -763,56 +770,23 @@ void CoreUserInputHandler::defaultHandler(QString cmd, const BufferInfo &bufferI - } - - --void CoreUserInputHandler::putPrivmsg(const QByteArray &target, const QByteArray &message, Cipher *cipher) -+void CoreUserInputHandler::putPrivmsg(const QString &target, const QString &message, std::function<QByteArray(const QString &, const QString &)> encodeFunc, Cipher *cipher) - { -- // Encrypted messages need special care. There's no clear relation between cleartext and encrypted message length, -- // so we can't just compute the maxSplitPos. Instead, we need to loop through the splitpoints until the crypted -- // version is short enough... -- // TODO: check out how the various possible encryption methods behave length-wise and make -- // this clean by predicting the length of the crypted msg. -- // For example, blowfish-ebc seems to create 8-char chunks. -+ QString cmd("PRIVMSG"); -+ QByteArray targetEnc = serverEncode(target); - -- static const char *cmd = "PRIVMSG"; -- static const char *splitter = " .,-!?"; -+ std::function<QList<QByteArray>(QString &)> cmdGenerator = [&] (QString &splitMsg) -> QList<QByteArray> { -+ QByteArray splitMsgEnc = encodeFunc(target, splitMsg); - -- int maxSplitPos = message.count(); -- int splitPos = maxSplitPos; -- forever { -- QByteArray crypted = message.left(splitPos); -- bool isEncrypted = false; - #ifdef HAVE_QCA2 -- if (cipher && !cipher->key().isEmpty() && !message.isEmpty()) { -- isEncrypted = cipher->encrypt(crypted); -+ if (cipher && !cipher->key().isEmpty() && !splitMsg.isEmpty()) { -+ cipher->encrypt(splitMsgEnc); - } - #endif -- int overrun = lastParamOverrun(cmd, QList<QByteArray>() << target << crypted); -- if (overrun) { -- // In case this is not an encrypted msg, we can just cut off at the end -- if (!isEncrypted) -- maxSplitPos = message.count() - overrun; -- -- splitPos = -1; -- for (const char *splitChar = splitter; *splitChar != 0; splitChar++) { -- splitPos = qMax(splitPos, message.lastIndexOf(*splitChar, maxSplitPos) + 1); // keep split char on old line -- } -- if (splitPos <= 0 || splitPos > maxSplitPos) -- splitPos = maxSplitPos; -- -- maxSplitPos = splitPos - 1; -- if (maxSplitPos <= 0) { // this should never happen, but who knows... -- qWarning() << tr("[Error] Could not encrypt your message: %1").arg(message.data()); -- return; -- } -- continue; // we never come back here for !encrypted! -- } -- -- // now we have found a valid splitpos (or didn't need to split to begin with) -- putCmd(cmd, QList<QByteArray>() << target << crypted); -- if (splitPos < message.count()) -- putPrivmsg(target, message.mid(splitPos), cipher); -+ return QList<QByteArray>() << targetEnc << splitMsgEnc; -+ }; - -- return; -- } -+ putCmd(cmd, network()->splitMessage(cmd, message, cmdGenerator)); - } - - -diff --git a/src/core/coreuserinputhandler.h b/src/core/coreuserinputhandler.h -index 69a429e..6e69ce6 100644 ---- a/src/core/coreuserinputhandler.h -+++ b/src/core/coreuserinputhandler.h -@@ -88,7 +88,7 @@ public slots: - private: - void doMode(const BufferInfo& bufferInfo, const QChar &addOrRemove, const QChar &mode, const QString &nickList); - void banOrUnban(const BufferInfo &bufferInfo, const QString &text, bool ban); -- void putPrivmsg(const QByteArray &target, const QByteArray &message, Cipher *cipher = 0); -+ void putPrivmsg(const QString &target, const QString &message, std::function<QByteArray(const QString &, const QString &)> encodeFunc, Cipher *cipher = 0); - - #ifdef HAVE_QCA2 - QByteArray encrypt(const QString &target, const QByteArray &message, bool *didEncrypt = 0) const; -diff --git a/src/core/ctcpparser.cpp b/src/core/ctcpparser.cpp -index fba3d13..37b0af3 100644 ---- a/src/core/ctcpparser.cpp -+++ b/src/core/ctcpparser.cpp -@@ -312,29 +312,13 @@ QByteArray CtcpParser::pack(const QByteArray &ctcpTag, const QByteArray &message - - void CtcpParser::query(CoreNetwork *net, const QString &bufname, const QString &ctcpTag, const QString &message) - { -- QList<QByteArray> params; -- params << net->serverEncode(bufname) << lowLevelQuote(pack(net->serverEncode(ctcpTag), net->userEncode(bufname, message))); -- -- static const char *splitter = " .,-!?"; -- int maxSplitPos = message.count(); -- int splitPos = maxSplitPos; -+ QString cmd("PRIVMSG"); - -- int overrun = net->userInputHandler()->lastParamOverrun("PRIVMSG", params); -- if (overrun) { -- maxSplitPos = message.count() - overrun -2; -- splitPos = -1; -- for (const char *splitChar = splitter; *splitChar != 0; splitChar++) { -- splitPos = qMax(splitPos, message.lastIndexOf(*splitChar, maxSplitPos) + 1); // keep split char on old line -- } -- if (splitPos <= 0 || splitPos > maxSplitPos) -- splitPos = maxSplitPos; -- -- params = params.mid(0, 1) << lowLevelQuote(pack(net->serverEncode(ctcpTag), net->userEncode(bufname, message.left(splitPos)))); -- } -- net->putCmd("PRIVMSG", params); -+ std::function<QList<QByteArray>(QString &)> cmdGenerator = [&] (QString &splitMsg) -> QList<QByteArray> { -+ return QList<QByteArray>() << net->serverEncode(bufname) << lowLevelQuote(pack(net->serverEncode(ctcpTag), net->userEncode(bufname, splitMsg))); -+ }; - -- if (splitPos < message.count()) -- query(net, bufname, ctcpTag, message.mid(splitPos)); -+ net->putCmd(cmd, net->splitMessage(cmd, message, cmdGenerator)); - } - - diff --git a/net-irc/quassel/quassel-0.10.0-r1.ebuild b/net-irc/quassel/quassel-0.10.0-r1.ebuild deleted file mode 100644 index 5b614c02fca0..000000000000 --- a/net-irc/quassel/quassel-0.10.0-r1.ebuild +++ /dev/null @@ -1,173 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-irc/quassel/quassel-0.10.0-r1.ebuild,v 1.10 2015/06/04 19:05:10 kensington Exp $ - -EAPI=5 - -inherit cmake-utils eutils pax-utils systemd user versionator - -EGIT_REPO_URI="git://git.quassel-irc.org/quassel" -[[ "${PV}" == "9999" ]] && inherit git-r3 - -DESCRIPTION="Qt/KDE IRC client supporting a remote daemon for 24/7 connectivity" -HOMEPAGE="http://quassel-irc.org/" -[[ "${PV}" == "9999" ]] || SRC_URI="http://quassel-irc.org/pub/${P/_/-}.tar.bz2" - -LICENSE="GPL-3" -KEYWORDS="amd64 ~arm ppc x86 ~amd64-linux ~sparc-solaris" -SLOT="0" -IUSE="ayatana crypt dbus debug kde monolithic phonon postgres +server +ssl syslog webkit X" - -SERVER_RDEPEND=" - dev-qt/qtscript:4 - crypt? ( app-crypt/qca:2[openssl,qt4(+)] ) - !postgres? ( dev-qt/qtsql:4[sqlite] dev-db/sqlite:3[threadsafe(+),-secure-delete] ) - postgres? ( dev-qt/qtsql:4[postgres] ) - syslog? ( virtual/logger ) -" - -GUI_RDEPEND=" - dev-qt/qtgui:4 - ayatana? ( dev-libs/libindicate-qt ) - dbus? ( - dev-qt/qtdbus:4 - dev-libs/libdbusmenu-qt - ) - kde? ( - kde-base/kdelibs:4 - kde-apps/oxygen-icons - ayatana? ( kde-misc/plasma-widget-message-indicator ) - ) - phonon? ( || ( media-libs/phonon[qt4] dev-qt/qtphonon:4 ) ) - webkit? ( dev-qt/qtwebkit:4 ) -" - -RDEPEND=" - dev-qt/qtcore:4[ssl?] - sys-libs/zlib - monolithic? ( - ${SERVER_RDEPEND} - ${GUI_RDEPEND} - ) - !monolithic? ( - server? ( ${SERVER_RDEPEND} ) - X? ( ${GUI_RDEPEND} ) - ) - " -DEPEND="${RDEPEND} - kde? ( dev-util/automoc )" - -DOCS="AUTHORS ChangeLog README" - -S="${WORKDIR}/${P/_/-}" - -REQUIRED_USE=" - || ( X server monolithic ) - crypt? ( || ( server monolithic ) ) - postgres? ( || ( server monolithic ) ) - syslog? ( || ( server monolithic ) ) - kde? ( || ( X monolithic ) ) - phonon? ( || ( X monolithic ) ) - dbus? ( || ( X monolithic ) ) - ayatana? ( || ( X monolithic ) ) - webkit? ( || ( X monolithic ) ) -" - -pkg_setup() { - if use server; then - QUASSEL_DIR=/var/lib/${PN} - QUASSEL_USER=${PN} - # create quassel:quassel user - enewgroup "${QUASSEL_USER}" - enewuser "${QUASSEL_USER}" -1 -1 "${QUASSEL_DIR}" "${QUASSEL_USER}" - fi -} - -src_configure() { - local mycmakeargs=( - $(cmake-utils_use_with ayatana LIBINDICATE) - $(cmake-utils_use_want X QTCLIENT) - $(cmake-utils_use_want server CORE) - $(cmake-utils_use_want monolithic MONO) - $(cmake-utils_use_with webkit) - $(cmake-utils_use_with phonon) - $(cmake-utils_use_with kde) - $(cmake-utils_use_with dbus) - $(cmake-utils_use_with ssl OPENSSL) - $(cmake-utils_use_with syslog) - $(cmake-utils_use_with !kde OXYGEN) - $(cmake-utils_use_with crypt) - "-DEMBED_DATA=OFF" - ) - - cmake-utils_src_configure -} - -src_install() { - cmake-utils_src_install - - if use server ; then - # needs PAX marking wrt bug#346255 - pax-mark m "${ED}/usr/bin/quasselcore" - - # prepare folders in /var/ - keepdir "${QUASSEL_DIR}" - fowners "${QUASSEL_USER}":"${QUASSEL_USER}" "${QUASSEL_DIR}" - - # init scripts & systemd unit - newinitd "${FILESDIR}"/quasselcore.init quasselcore - newconfd "${FILESDIR}"/quasselcore.conf quasselcore - systemd_dounit "${FILESDIR}"/quasselcore.service - - # logrotate - insinto /etc/logrotate.d - newins "${FILESDIR}/quassel.logrotate" quassel - fi -} - -pkg_postinst() { - if use monolithic && use ssl ; then - 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 - - if use server; then - einfo "If you want to generate SSL certificate remember to run:" - einfo " emerge --config =${CATEGORY}/${PF}" - fi - - if use server || use monolithic ; then - einfo "Quassel can use net-misc/oidentd package if installed on your system." - einfo "Consider installing it if you want to run quassel within identd daemon." - fi - - # temporary info mesage - if use server && [[ $(get_version_component_range 2 ${REPLACING_VERSIONS}) -lt 7 ]]; then - echo - ewarn "Please note that all configuration moved from" - ewarn "/home/\${QUASSEL_USER}/.config/quassel-irc.org/" - ewarn "to: ${QUASSEL_DIR}." - echo - ewarn "For migration, stop the core, move quasselcore files (pretty much" - ewarn "everything apart from quasselclient.conf and settings.qss) into" - ewarn "new location and then start server again." - fi -} - -pkg_config() { - if use server && use ssl; then - # generate the pem file only when it does not already exist - if [ ! -f "${QUASSEL_DIR}/quasselCert.pem" ]; then - einfo "Generating QUASSEL SSL certificate to: \"${QUASSEL_DIR}/quasselCert.pem\"" - openssl req -x509 -nodes -days 365 -newkey rsa:2048 \ - -keyout "${QUASSEL_DIR}/quasselCert.pem" \ - -out "${QUASSEL_DIR}/quasselCert.pem" - # permissions for the key - chown ${QUASSEL_USER}:${QUASSEL_USER} "${QUASSEL_DIR}/quasselCert.pem" - chmod 400 "${QUASSEL_DIR}/quasselCert.pem" - else - einfo "Certificate \"${QUASSEL_DIR}/quasselCert.pem\" already exists." - einfo "Remove it if you want to create new one." - fi - fi -} diff --git a/net-irc/quassel/quassel-0.11.1.ebuild b/net-irc/quassel/quassel-0.11.1.ebuild deleted file mode 100644 index 801df5aa168c..000000000000 --- a/net-irc/quassel/quassel-0.11.1.ebuild +++ /dev/null @@ -1,199 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-irc/quassel/quassel-0.11.1.ebuild,v 1.2 2015/06/04 19:05:10 kensington Exp $ - -EAPI=5 - -inherit cmake-utils eutils pax-utils systemd user versionator - -EGIT_REPO_URI="git://git.quassel-irc.org/quassel" -[[ "${PV}" == "9999" ]] && inherit git-r3 - -DESCRIPTION="Qt/KDE IRC client supporting a remote daemon for 24/7 connectivity" -HOMEPAGE="http://quassel-irc.org/" -[[ "${PV}" == "9999" ]] || SRC_URI="http://quassel-irc.org/pub/${P/_/-}.tar.bz2" - -LICENSE="GPL-3" -KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-linux ~sparc-solaris" -SLOT="0" -IUSE="ayatana crypt dbus debug kde monolithic phonon postgres qt5 +server +ssl syslog webkit X" - -SERVER_RDEPEND=" - qt5? ( - dev-qt/qtscript:5 - postgres? ( dev-qt/qtsql:5[postgres] ) - !postgres? ( dev-qt/qtsql:5[sqlite] dev-db/sqlite:3[threadsafe(+),-secure-delete] ) - ) - !qt5? ( - dev-qt/qtscript:4 - crypt? ( app-crypt/qca:2[openssl,qt4(+)] ) - postgres? ( dev-qt/qtsql:4[postgres] ) - !postgres? ( dev-qt/qtsql:4[sqlite] dev-db/sqlite:3[threadsafe(+),-secure-delete] ) - ) - syslog? ( virtual/logger ) -" - -GUI_RDEPEND=" - qt5? ( - dev-qt/qtgui:5 - dev-qt/qtwidgets:5 - dbus? ( - dev-libs/libdbusmenu-qt[qt5] - dev-qt/qtdbus:5 - ) - phonon? ( media-libs/phonon[qt5] ) - webkit? ( dev-qt/qtwebkit:5 ) - ) - !qt5? ( - dev-qt/qtgui:4 - ayatana? ( dev-libs/libindicate-qt ) - dbus? ( - dev-libs/libdbusmenu-qt[qt4(+)] - dev-qt/qtdbus:4 - kde? ( - kde-base/kdelibs:4 - kde-apps/oxygen-icons - ayatana? ( kde-misc/plasma-widget-message-indicator ) - ) - ) - phonon? ( || ( media-libs/phonon[qt4] dev-qt/qtphonon:4 ) ) - webkit? ( dev-qt/qtwebkit:4 ) - ) -" - -RDEPEND=" - sys-libs/zlib - qt5? ( - dev-qt/qtcore:5 - dev-qt/qtnetwork:5[ssl?] - ) - !qt5? ( dev-qt/qtcore:4[ssl?] ) - monolithic? ( - ${SERVER_RDEPEND} - ${GUI_RDEPEND} - ) - !monolithic? ( - server? ( ${SERVER_RDEPEND} ) - X? ( ${GUI_RDEPEND} ) - ) -" -DEPEND="${RDEPEND} - qt5? ( dev-qt/linguist-tools:5 ) -" - -DOCS=( AUTHORS ChangeLog README ) - -S="${WORKDIR}/${P/_/-}" - -REQUIRED_USE=" - || ( X server monolithic ) - ayatana? ( || ( X monolithic ) ) - crypt? ( || ( server monolithic ) ) - dbus? ( || ( X monolithic ) ) - kde? ( phonon || ( X monolithic ) ) - phonon? ( || ( X monolithic ) ) - postgres? ( || ( server monolithic ) ) - qt5? ( !ayatana !crypt !kde ) - syslog? ( || ( server monolithic ) ) - webkit? ( || ( X monolithic ) ) -" - -pkg_setup() { - if use server; then - QUASSEL_DIR=/var/lib/${PN} - QUASSEL_USER=${PN} - # create quassel:quassel user - enewgroup "${QUASSEL_USER}" - enewuser "${QUASSEL_USER}" -1 -1 "${QUASSEL_DIR}" "${QUASSEL_USER}" - fi -} - -src_configure() { - local mycmakeargs=( - $(cmake-utils_use_find_package ayatana IndicateQt) - $(cmake-utils_use_find_package crypt QCA2) - $(cmake-utils_use_find_package dbus dbusmenu-qt) - $(cmake-utils_use_find_package dbus dbusmenu-qt5) - $(cmake-utils_use_with kde) - $(cmake-utils_use_with !kde OXYGEN) - $(cmake-utils_use_want monolithic MONO) - $(cmake-utils_use_find_package phonon) - $(cmake-utils_use_find_package phonon Phonon4Qt5) - $(cmake-utils_use_use qt5) - $(cmake-utils_use_want server CORE) - $(cmake-utils_use_with webkit) - $(cmake-utils_use_want X QTCLIENT) - "-DEMBED_DATA=OFF" - ) - - cmake-utils_src_configure -} - -src_install() { - cmake-utils_src_install - - if use server ; then - # needs PAX marking wrt bug#346255 - pax-mark m "${ED}/usr/bin/quasselcore" - - # prepare folders in /var/ - keepdir "${QUASSEL_DIR}" - fowners "${QUASSEL_USER}":"${QUASSEL_USER}" "${QUASSEL_DIR}" - - # init scripts & systemd unit - newinitd "${FILESDIR}"/quasselcore.init quasselcore - newconfd "${FILESDIR}"/quasselcore.conf quasselcore - systemd_dounit "${FILESDIR}"/quasselcore.service - - # logrotate - insinto /etc/logrotate.d - newins "${FILESDIR}/quassel.logrotate" quassel - fi -} - -pkg_postinst() { - if use monolithic && use ssl ; then - 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 - - if use server; then - einfo "If you want to generate SSL certificate remember to run:" - einfo " emerge --config =${CATEGORY}/${PF}" - fi - - if use server || use monolithic ; then - einfo "Quassel can use net-misc/oidentd package if installed on your system." - einfo "Consider installing it if you want to run quassel within identd daemon." - fi - - # temporary info mesage - if use server && [[ $(get_version_component_range 2 ${REPLACING_VERSIONS}) -lt 7 ]]; then - echo - ewarn "Please note that all configuration moved from" - ewarn "/home/\${QUASSEL_USER}/.config/quassel-irc.org/" - ewarn "to: ${QUASSEL_DIR}." - echo - ewarn "For migration, stop the core, move quasselcore files (pretty much" - ewarn "everything apart from quasselclient.conf and settings.qss) into" - ewarn "new location and then start server again." - fi -} - -pkg_config() { - if use server && use ssl; then - # generate the pem file only when it does not already exist - if [ ! -f "${QUASSEL_DIR}/quasselCert.pem" ]; then - einfo "Generating QUASSEL SSL certificate to: \"${QUASSEL_DIR}/quasselCert.pem\"" - openssl req -x509 -nodes -days 365 -newkey rsa:2048 \ - -keyout "${QUASSEL_DIR}/quasselCert.pem" \ - -out "${QUASSEL_DIR}/quasselCert.pem" - # permissions for the key - chown ${QUASSEL_USER}:${QUASSEL_USER} "${QUASSEL_DIR}/quasselCert.pem" - chmod 400 "${QUASSEL_DIR}/quasselCert.pem" - else - einfo "Certificate \"${QUASSEL_DIR}/quasselCert.pem\" already exists." - einfo "Remove it if you want to create new one." - fi - fi -} |