commit:     a6a693598258bfd203fda3274c388263ac8bb24c
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Sep  9 15:55:01 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Sep  9 15:55:01 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a6a69359

net-im/bitlbee: security cleanup

Bug: https://bugs.gentoo.org/631072
Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-im/bitlbee/Manifest                            |   1 -
 net-im/bitlbee/bitlbee-3.5.1.ebuild                | 160 -----------------
 .../bitlbee/files/bitlbee-3.5-verbose-build.patch  | 200 ---------------------
 net-im/bitlbee/files/bitlbee.confd-r1              |   8 -
 net-im/bitlbee/files/bitlbee.initd-r1              |  30 ----
 5 files changed, 399 deletions(-)

diff --git a/net-im/bitlbee/Manifest b/net-im/bitlbee/Manifest
index 89d1716f8e6..062d56d7000 100644
--- a/net-im/bitlbee/Manifest
+++ b/net-im/bitlbee/Manifest
@@ -1,2 +1 @@
-DIST bitlbee-3.5.1.tar.gz 680351 BLAKE2B 
952a12975d4f95020a5b577603aea791fca754006dc96af3c500d3885b6f2c50cabe51ab698625acb717524a729ef03d18a29aa25bd4815bae2f18fa6298aeea
 SHA512 
4eb3b0d3a92910c8dd789cd23338cc6296bf40212c5244fcb27a88ede10e86424ea59c78e719841863701a7fdd8c61819f2775f7b58833e287d9110e49d036f3
 DIST bitlbee-3.6.tar.gz 534961 BLAKE2B 
007681a384fcb2c0736b901dfdc213ba0829ca006ad3204aca1bc4520a3874760867df6165a9218a9deeabb13bc06f118c9e2f804a97e671a348734f6cb7e963
 SHA512 
ccbf0f23e228de2de147241f36f59744b2256cba958e2fabfba0cfa60935e55bbb7d7e20fffa54da9a345e55ffa9ca82cb62e9b99dc738ba35c6e268c6561a8d

diff --git a/net-im/bitlbee/bitlbee-3.5.1.ebuild 
b/net-im/bitlbee/bitlbee-3.5.1.ebuild
deleted file mode 100644
index 5bae1f674e2..00000000000
--- a/net-im/bitlbee/bitlbee-3.5.1.ebuild
+++ /dev/null
@@ -1,160 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit systemd toolchain-funcs
-
-if [[ ${PV} == "9999" ]]; then
-       EGIT_REPO_URI="https://github.com/bitlbee/bitlbee.git";
-       inherit git-r3
-else
-       SRC_URI="https://get.bitlbee.org/src/${P}.tar.gz";
-       KEYWORDS="amd64 ppc ~ppc64 x86"
-fi
-
-DESCRIPTION="irc to IM gateway that support multiple IM protocols"
-HOMEPAGE="https://www.bitlbee.org/";
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE_PROTOCOLS="msn oscar purple twitter +xmpp"
-IUSE="debug +gnutls ipv6 libevent libressl nss otr +plugins selinux test xinetd
-       ${IUSE_PROTOCOLS}"
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="
-       || ( purple xmpp msn oscar )
-       xmpp? ( !nss )
-       test? ( plugins )
-"
-
-COMMON_DEPEND="
-       acct-group/bitlbee
-       acct-user/bitlbee
-       >=dev-libs/glib-2.16
-       purple? ( net-im/pidgin )
-       libevent? ( dev-libs/libevent:= )
-       otr? ( >=net-libs/libotr-4 )
-       gnutls? ( net-libs/gnutls:= )
-       !gnutls? (
-               nss? ( dev-libs/nss )
-               !nss? (
-                       libressl? ( dev-libs/libressl:= )
-                       !libressl? ( dev-libs/openssl:0= )
-               )
-       )
-"
-DEPEND="${COMMON_DEPEND}
-       virtual/pkgconfig
-       selinux? ( sec-policy/selinux-bitlbee )
-       test? ( dev-libs/check )"
-
-RDEPEND="${COMMON_DEPEND}
-       virtual/logger
-       xinetd? ( sys-apps/xinetd )"
-
-PATCHES=(
-       "${FILESDIR}"/${PN}-3.5-systemd-user.patch
-       "${FILESDIR}"/${PN}-3.5-verbose-build.patch
-       "${FILESDIR}"/${PN}-3.5-libcheck.patch
-       "${FILESDIR}"/${PN}-3.5-libevent.patch
-)
-
-src_configure() {
-       local myconf
-
-       # setup plugins, protocol, ipv6 and debug
-       myconf+=( --jabber=$(usex xmpp 1 0) )
-       for flag in debug ipv6 plugins ${IUSE_PROTOCOLS/+xmpp/} ; do
-               myconf+=( --${flag}=$(usex ${flag} 1 0) )
-       done
-
-       # set otr
-       if use otr && use plugins ; then
-               myconf+=( --otr=plugin )
-       else
-               if use otr ; then
-                       ewarn "OTR support has been disabled automatically 
because it"
-                       ewarn "requires the plugins USE flag."
-               fi
-               myconf+=( --otr=0 )
-       fi
-
-       # setup ssl use flags
-       if use gnutls ; then
-               myconf+=( --ssl=gnutls )
-               einfo "Using gnutls for SSL support"
-       else
-               ewarn "Only gnutls is officially supported by upstream."
-               if use nss ; then
-                       myconf+=( --ssl=nss )
-                       einfo "Using nss for SSL support"
-               else
-                       myconf+=( --ssl=openssl )
-                       einfo "Using openssl for SSL support"
-               fi
-       fi
-
-       # set event handler
-       if use libevent ; then
-               myconf+=( --events=libevent )
-       else
-               myconf+=( --events=glib )
-       fi
-
-       # not autotools-based
-       ./configure \
-               --prefix=/usr \
-               --datadir=/usr/share/bitlbee \
-               --etcdir=/etc/bitlbee \
-               --plugindir=/usr/$(get_libdir)/bitlbee \
-               --pcdir=/usr/$(get_libdir)/pkgconfig \
-               --systemdsystemunitdir=$(systemd_get_systemunitdir) \
-               --doc=1 \
-               --strip=0 \
-               --verbose=1 \
-               "${myconf[@]}" || die
-
-       sed -i \
-               -e "/^EFLAGS/s:=:&${LDFLAGS} :" \
-               Makefile.settings || die
-}
-
-src_compile() {
-       emake CC="$(tc-getCC)" LD="$(tc-getLD)"
-}
-
-src_install() {
-       emake DESTDIR="${D}" install install-etc install-doc install-dev 
install-systemd
-
-       keepdir /var/lib/bitlbee
-       fperms 700 /var/lib/bitlbee
-       fowners bitlbee:bitlbee /var/lib/bitlbee
-
-       dodoc doc/{AUTHORS,CHANGES,CREDITS,FAQ,README}
-
-       if use xinetd ; then
-               insinto /etc/xinetd.d
-               newins doc/bitlbee.xinetd bitlbee
-       fi
-
-       newinitd "${FILESDIR}"/bitlbee.initd-r1 bitlbee
-       newconfd "${FILESDIR}"/bitlbee.confd-r1 bitlbee
-
-       exeinto /usr/share/bitlbee
-       doexe utils/{convert_purple.py,bitlbee-ctl.pl}
-}
-
-pkg_postinst() {
-       if [[ -z ${REPLACING_VERSIONS} ]]; then
-               einfo
-               elog "The bitlbee init script will now attempt to stop all 
processes owned by the"
-               elog "bitlbee user, including per-client forks."
-               elog
-               elog "Tell the init script not to touch anything besides the 
main bitlbee process"
-               elog "by changing the BITLBEE_STOP_ALL variable in"
-               elog "  /etc/conf.d/bitlbee"
-               einfo
-       fi
-}

diff --git a/net-im/bitlbee/files/bitlbee-3.5-verbose-build.patch 
b/net-im/bitlbee/files/bitlbee-3.5-verbose-build.patch
deleted file mode 100644
index 7501963cb5d..00000000000
--- a/net-im/bitlbee/files/bitlbee-3.5-verbose-build.patch
+++ /dev/null
@@ -1,200 +0,0 @@
-Add a --verbose configure flag to enable verbose build output.
-
---- bitlbee-3.5/configure
-+++ bitlbee-3.5/configure
-@@ -38,6 +38,7 @@
- twitter=1
- purple=0
- 
-+verbose=0
- doc=1
- debug=0
- strip=0
-@@ -125,6 +126,8 @@
- --pidfile=...                                         $pidfile
- --config=...                                          $config
- 
-+--verbose=0/1 Disable/enable verbose build    $verbose
-+
- --msn=0/1     Disable/enable MSN part                 $msn
- --jabber=0/1  Disable/enable Jabber part              $jabber
- --oscar=0/1   Disable/enable Oscar part (ICQ, AIM)    $oscar
-@@ -282,6 +285,12 @@
-       debug=1
- fi
- 
-+if [ "$verbose" = "0" ]; then
-+      echo 'VERBOSE=@' >> Makefile.settings
-+else
-+      echo 'VERBOSE=' >> Makefile.settings
-+fi
-+
- if [ "$debug" = "1" ]; then
-       echo 'DEBUG=1' >> Makefile.settings
-       CFLAGS="$CFLAGS -g3 -DDEBUG -O0"
---- bitlbee-3.5/lib/Makefile
-+++ bitlbee-3.5/lib/Makefile
-@@ -35,12 +35,12 @@
- 
- lib.o: $(objects) $(subdirs)
-       @echo '*' Linking lib.o
--      @$(LD) $(LFLAGS) $(objects) -o lib.o
-+      $(VERBOSE) $(LD) $(LFLAGS) $(objects) -o lib.o
- 
- $(objects): ../Makefile.settings Makefile
- 
- $(objects): %.o: $(_SRCDIR_)%.c
-       @echo '*' Compiling $<
--      @$(CC) -c $(CFLAGS) $(CFLAGS_BITLBEE) $< -o $@
-+      $(VERBOSE) $(CC) -c $(CFLAGS) $(CFLAGS_BITLBEE) $< -o $@
- 
- -include .depend/*.d
---- bitlbee-3.5/Makefile
-+++ bitlbee-3.5/Makefile
-@@ -162,28 +162,28 @@
-       tar czf $$x.tar.gz --exclude=debian --exclude=.git* --exclude=.depend 
$$x
- 
- $(subdirs):
--      @$(MAKE) -C $@ $(MAKECMDGOALS)
-+      $(MAKE) -C $@ $(MAKECMDGOALS)
- 
- $(OTR_PI): %.so: $(_SRCDIR_)%.c
-       @echo '*' Building plugin $@
--      @$(CC) $(CFLAGS) -fPIC -shared $(LDFLAGS) $< -o $@ $(OTRFLAGS)
-+      $(VERBOSE) $(CC) $(CFLAGS) -fPIC -shared $(LDFLAGS) $< -o $@ $(OTRFLAGS)
- 
- $(SKYPE_PI): $(_SRCDIR_)protocols/skype/skype.c
-       @echo '*' Building plugin skype
--      @$(CC) $(CFLAGS) $(LDFLAGS) $(SKYPEFLAGS) $< -o $@
-+      $(VERBOSE) $(CC) $(CFLAGS) $(LDFLAGS) $(SKYPEFLAGS) $< -o $@
- 
- $(objects): %.o: $(_SRCDIR_)%.c
-       @echo '*' Compiling $<
--      @$(CC) -c $(CFLAGS) $(CFLAGS_BITLBEE) $< -o $@
-+      $(VERBOSE) $(CC) -c $(CFLAGS) $(CFLAGS_BITLBEE) $< -o $@
- 
- $(objects): Makefile Makefile.settings config.h
- 
- $(OUTFILE): $(objects) $(subdirs)
-       @echo '*' Linking $(OUTFILE)
--      @$(CC) $(objects) $(subdirobjs) -o $(OUTFILE) $(LDFLAGS_BITLBEE) 
$(LDFLAGS) $(EFLAGS)
-+      $(VERBOSE) $(CC) $(objects) $(subdirobjs) -o $(OUTFILE) 
$(LDFLAGS_BITLBEE) $(LDFLAGS) $(EFLAGS)
- ifneq ($(firstword $(STRIP)), \#)
-       @echo '*' Stripping $(OUTFILE)
--      @-$(STRIP) $(OUTFILE)
-+      $(VERBOSE) -$(STRIP) $(OUTFILE)
- endif
- 
- ctags: 
---- bitlbee-3.5/protocols/jabber/Makefile
-+++ bitlbee-3.5/protocols/jabber/Makefile
-@@ -37,10 +37,10 @@
- 
- $(objects): %.o: $(_SRCDIR_)%.c
-       @echo '*' Compiling $<
--      @$(CC) -c $(CFLAGS) $(CFLAGS_BITLBEE) $< -o $@
-+      $(VERBOSE) $(CC) -c $(CFLAGS) $(CFLAGS_BITLBEE) $< -o $@
- 
- jabber_mod.o: $(objects)
-       @echo '*' Linking jabber_mod.o
--      @$(LD) $(LFLAGS) $(objects) -o jabber_mod.o
-+      $(VERBOSE) $(LD) $(LFLAGS) $(objects) -o jabber_mod.o
- 
- -include .depend/*.d
---- bitlbee-3.5/protocols/Makefile
-+++ bitlbee-3.5/protocols/Makefile
-@@ -42,18 +42,18 @@
-       rm -rf .depend
- 
- $(subdirs):
--      @$(MAKE) -C $@ $(MAKECMDGOALS)
-+      $(MAKE) -C $@ $(MAKECMDGOALS)
- 
- ### MAIN PROGRAM
- 
- protocols.o: $(objects) $(subdirs)
-       @echo '*' Linking protocols.o
--      @$(LD) $(LFLAGS) $(objects) $(subdirobjs) -o protocols.o
-+      $(VERBOSE) $(LD) $(LFLAGS) $(objects) $(subdirobjs) -o protocols.o
- 
- $(objects): ../Makefile.settings Makefile
- 
- $(objects): %.o: $(_SRCDIR_)%.c
-       @echo '*' Compiling $<
--      @$(CC) -c $(CFLAGS) $(CFLAGS_BITLBEE) $< -o $@
-+      $(VERBOSE) $(CC) -c $(CFLAGS) $(CFLAGS_BITLBEE) $< -o $@
- 
- -include .depend/*.d
---- bitlbee-3.5/protocols/msn/Makefile
-+++ bitlbee-3.5/protocols/msn/Makefile
-@@ -37,10 +37,10 @@
- 
- $(objects): %.o: $(_SRCDIR_)%.c
-       @echo '*' Compiling $<
--      @$(CC) -c $(CFLAGS) $(CFLAGS_BITLBEE) $< -o $@
-+      $(VERBOSE) $(CC) -c $(CFLAGS) $(CFLAGS_BITLBEE) $< -o $@
- 
- msn_mod.o: $(objects)
-       @echo '*' Linking msn_mod.o
--      @$(LD) $(LFLAGS) $(objects) -o msn_mod.o
-+      $(VERBOSE) $(LD) $(LFLAGS) $(objects) -o msn_mod.o
- 
- -include .depend/*.d
---- bitlbee-3.5/protocols/oscar/Makefile
-+++ bitlbee-3.5/protocols/oscar/Makefile
-@@ -38,10 +38,10 @@
- 
- $(objects): %.o: $(_SRCDIR_)%.c
-       @echo '*' Compiling $<
--      @$(CC) -c $(CFLAGS) $(CFLAGS_BITLBEE) $< -o $@
-+      $(VERBOSE) $(CC) -c $(CFLAGS) $(CFLAGS_BITLBEE) $< -o $@
- 
- oscar_mod.o: $(objects)
-       @echo '*' Linking oscar_mod.o
--      @$(LD) $(LFLAGS) $(objects) -o oscar_mod.o
-+      $(VERBOSE) $(LD) $(LFLAGS) $(objects) -o oscar_mod.o
- 
- -include .depend/*.d
---- bitlbee-3.5/protocols/purple/Makefile
-+++ bitlbee-3.5/protocols/purple/Makefile
-@@ -38,10 +38,10 @@
- 
- $(objects): %.o: $(_SRCDIR_)%.c
-       @echo '*' Compiling $<
--      @$(CC) -c $(CFLAGS) $(CFLAGS_BITLBEE) $< -o $@
-+      $(VERBOSE) $(CC) -c $(CFLAGS) $(CFLAGS_BITLBEE) $< -o $@
- 
- purple_mod.o: $(objects)
-       @echo '*' Linking purple_mod.o
--      @$(LD) $(LFLAGS) $(objects) -o purple_mod.o
-+      $(VERBOSE) $(LD) $(LFLAGS) $(objects) -o purple_mod.o
- 
- -include .depend/*.d
---- bitlbee-3.5/protocols/twitter/Makefile
-+++ bitlbee-3.5/protocols/twitter/Makefile
-@@ -37,10 +37,10 @@
- 
- $(objects): %.o: $(_SRCDIR_)%.c
-       @echo '*' Compiling $<
--      @$(CC) -c $(CFLAGS) $(CFLAGS_BITLBEE) $< -o $@
-+      $(VERBOSE) $(CC) -c $(CFLAGS) $(CFLAGS_BITLBEE) $< -o $@
- 
- twitter_mod.o: $(objects)
-       @echo '*' Linking twitter_mod.o
--      @$(LD) $(LFLAGS) $(objects) -o twitter_mod.o
-+      $(VERBOSE) $(LD) $(LFLAGS) $(objects) -o twitter_mod.o
-       
- -include .depend/*.d
---- bitlbee-3.5/tests/Makefile
-+++ bitlbee-3.5/tests/Makefile
-@@ -20,8 +20,8 @@
- 
- check: $(test_objs) $(addprefix ../, $(main_objs)) ../protocols/protocols.o 
../lib/lib.o
-       @echo '*' Linking $@
--      @$(CC) $(CFLAGS) -o $@ $^ $(LFLAGS) $(EFLAGS)
-+      $(VERBOSE) $(CC) $(CFLAGS) -o $@ $^ $(LFLAGS) $(EFLAGS)
- 
- %.o: $(_SRCDIR_)%.c
-       @echo '*' Compiling $<
--      @$(CC) -c $(CFLAGS) $< -o $@
-+      $(VERBOSE) $(CC) -c $(CFLAGS) $< -o $@

diff --git a/net-im/bitlbee/files/bitlbee.confd-r1 
b/net-im/bitlbee/files/bitlbee.confd-r1
deleted file mode 100644
index d581222f9fb..00000000000
--- a/net-im/bitlbee/files/bitlbee.confd-r1
+++ /dev/null
@@ -1,8 +0,0 @@
-# Bitlbee options (see /usr/sbin/bitlbee -h)
-BITLBEE_OPTS="-F"
-
-# By default, the bitlbee init script will attempt to stop
-# all bitlbee-owned processes, including per-client forks.
-# Setting this to "no" tells the init script to only
-# stop the main bitlbee process.
-BITLBEE_STOP_ALL="yes"

diff --git a/net-im/bitlbee/files/bitlbee.initd-r1 
b/net-im/bitlbee/files/bitlbee.initd-r1
deleted file mode 100644
index 413bd45735e..00000000000
--- a/net-im/bitlbee/files/bitlbee.initd-r1
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License, v2 or
-# later
-
-DAEMON=/usr/sbin/bitlbee
-PIDFILE=/var/run/bitlbee/bitlbee.pid
-
-depend() {
-       need logger net
-}
-
-start () {
-       ebegin "Starting bitlbee"
-       checkpath -d -m 0755 -o bitlbee:bitlbee $(dirname ${PIDFILE})
-       start-stop-daemon --start --quiet \
-               -u bitlbee:bitlbee --exec ${DAEMON} --pidfile ${PIDFILE} \
-               -- -P ${PIDFILE} ${BITLBEE_OPTS}
-       eend $?
-}
-
-stop() {
-       ebegin "Stopping bitlbee"
-       local pidfile=
-       yesno ${BITLBEE_STOP_ALL:-YES} ||
-               pidfile="--pidfile ${PIDFILE}"
-       start-stop-daemon --stop --quiet ${pidfile} -u bitlbee:bitlbee
-       eend $?
-}
-

Reply via email to