0

Initial commit

This commit is contained in:
eleksir
2023-11-19 18:01:40 +03:00
commit 80ec8a7529
586 changed files with 29486 additions and 0 deletions

49
bitlbee/README Normal file
View File

@@ -0,0 +1,49 @@
BitlBee is an IRC instant messaging gateway licensed under the terms of
the GPL. It communicates with the end user via the IRC protocol whilst
interacting with popular chat networks such as AIM, ICQ, MSN, Yahoo,
and Jabber. The user's buddies appear as normal IRC users in a channel,
and conversations use the private message facility of IRC.
After your installation you will need to configure bitlbee. There are
two ways starting bitlbee: Either as a forked daemon (preferred), or
the old way of starting it through inetd (mostly deprecated these days).
Bitlbee now includes a standard rc.bitlbee. To have this start on bootup,
add the following code to /etc/rc.d/rc.local for example
if [ -x /etc/rc.d/rc.bitlbee ]; then
/etc/rc.d/rc.bitlbee start
fi
If you choose to use inetd , you need to modify your /etc/inetd.conf
so bitlbee will be started when /etc/rc.d/rc.inetd is called on bootup.
Add the line below to your /etc/inetd.conf file:
6667 stream tcp nowait nobody /usr/sbin/tcpd /usr/sbin/bitlbee
Restart inetd (/etc/rc.d/rc.inetd restart). All that is left to do now
is connect your irc client to the localhost.
OTR (Off the record) is not compiled by default. If you want bitlbee
to compile with OTR capabilities, you'll need to install libotr from
Slackware and run the script as follows:
OTR=yes ./bitlbee.SlackBuild
From version 3.2 bitlbee offers some form of skype support, even though
this will not ever be part of bitlbee proper. Please see the documentation
in protocols/skype in the source package for information. You can run the
script as following:
SKYPE=yes ./bitlbee.SlackBuild
NOTE: The default "bot"/bitlbee daemon is called 'root'. This is not
the root user on your system. You can easily change it. Register and
identify yourself first, and then:
rename root BitlBot (or whatever you want)
NOTE: Since bitlbee now runs as a daemon instead of from inetd, bitlbee
runs under its own user (UID/GID: 250). If you have older databases
of bitlbee, you may want to change the permissions on the files in
/var/lib/bitlbee.

181
bitlbee/bitlbee.SlackBuild Executable file
View File

@@ -0,0 +1,181 @@
#!/bin/sh
# Slackware build script for "bitlbee".
# Copyright 2007-2016 Michiel van Wessem, Leicester, United Kingdom
# Copyright 2016-2017 Marcel Saegebarth <marc@mos6581.de>
# Copyright 2023 Sergei Fedosoff <eleksir@gmail.com>
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=bitlbee
VERSION=${VERSION:-3.6.20230804}
REVISION=acf26c3b667551fd3185acda189b28e166a6568b
BUILD=${BUILD:-1}
TAG=${TAG:-_EXs}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/EXs}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
BITLBEE_USER=${BITLBEE_USER:-250}
BITLBEE_GROUP=${BITLBEE_GROUP:-250}
# Bail if user or group isn't valid on your system
if ! grep ^bitlbee: /etc/passwd 2>&1 > /dev/null; then
cat << EOF
You must have a bitlbee user to run this script
# groupadd -g $BITLBEE_USER bitlbee
# useradd -u $BITLBEE_USER -d /var/lib/bitlbee -s /bin/false -g bitlbee bitlbee
EOF
exit
elif ! grep ^bitlbee: /etc/group 2>&1 > /dev/null; then
cat << EOF
You must have a bitlbee group to run this script
# groupadd -g $BITLBEE_GROUP bitlbee
EOF
exit
fi
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
set -e
OTR=${OTR:-no}
if [ "$OTR" = "yes" ]; then
USEOTR=1
else
USEOTR=0
fi
SKYPE=${SKYPE:-no}
if [ "$SKYPE" = "yes" ]; then
USESKYPE=1
else
USESKYPE=0
fi
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $TMP/$PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$REVISION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \+ -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
CFLAGS="$SLKCFLAGS -flto -rdynamic" \
CXXFLAGS="$SLKCFLAGS -flto -rdynamic" \
LDFLAGS="-flto -rdynamic -Wl,--export-dynamic -Wl,-E -Wl,--no-as-needed -Wl,-O2 -Wl,-s" \
CPU="$ARCH" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--pcdir=/usr/lib${LIBDIRSUFFIX}/pkgconfig \
--plugindir=/usr/lib${LIBDIRSUFFIX}/$PRGNAM \
--config=/var/lib/$PRGNAM \
--etcdir=/etc/$PRGNAM \
--datadir=/usr/doc/$PRGNAM-$VERSION \
--mandir=/usr/man \
--twitter=1 \
--ipv6=1 \
--plugins=1 \
--debug=0 \
--purple=0 \
--strip=1 \
--ssl=${CRYPT:-openssl} \
--otr=${USEOTR} \
--skype=${USESKYPE} \
--build=$ARCH-slackware-linux
make -j$(nproc) all
make install install-dev install-etc install-doc install-plugins DESTDIR=$PKG
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
find $PKG/usr/man -type f -exec gzip -9 {} \+
for i in $( find $PKG/usr/man -type l );
do ln -s $( readlink $i ).gz $i.gz;
rm $i;
done
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION $PKG/var/lib/$PRGNAM
cp -a \
COPYING doc/AUTHORS doc/CHANGES doc/CREDITS doc/FAQ doc/INSTALL \
doc/README doc/HACKING doc/bitlbee.xinetd doc/comic_3.0.png \
doc/example_plugin.c doc/user-guide/help.txt $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec \
sed -i 's#/usr/local/#/usr/#' {} \;
find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec \
sed -i 's#/etc/init.d/inetd#/etc/rc.d/rc.inetd#' {} \;
install -Dpm 0640 $CWD/$PRGNAM.conf $PKG/etc/$PRGNAM/$PRGNAM.conf.new
mv $PKG/etc/$PRGNAM/motd.txt $PKG/etc/$PRGNAM/motd.txt.new
chown -R $BITLBEE_USER:$BITLBEE_GROUP $PKG/var/lib/$PRGNAM
mkdir -p $PKG/etc/rc.d/
install -Dpm 0644 $CWD/rc.$PRGNAM $PKG/etc/rc.d/rc.$PRGNAM.new
mkdir $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}

180
bitlbee/bitlbee.conf Normal file
View File

@@ -0,0 +1,180 @@
## BitlBee default configuration file
##
## Comments are marked like this. The rest of the file is INI-style. The
## comments should tell you enough about what all settings mean.
##
[settings]
## RunMode:
##
## Inetd -- Run from inetd (default)
## Daemon -- Run as a stand-alone daemon, serving all users from one process.
## This saves memory if there are more users, the downside is that when one
## user hits a crash-bug, all other users will also lose their connection.
## ForkDaemon -- Run as a stand-alone daemon, but keep all clients in separate
## child processes. This should be pretty safe and reliable to use instead
## of inetd mode.
##
RunMode = ForkDaemon
## User:
##
## If BitlBee is started by root as a daemon, it can drop root privileges,
## and change to the specified user.
##
User = bitlbee
## DaemonPort/DaemonInterface:
##
## For daemon mode, you can specify on what interface and port the daemon
## should be listening for connections.
##
DaemonInterface = 127.0.0.1
DaemonPort = 6667
## ClientInterface:
##
## If for any reason, you want BitlBee to use a specific address/interface
## for outgoing traffic (IM connections, HTTP(S), etc.), set it here.
##
# ClientInterface = 0.0.0.0
## AuthMode
##
## Open -- Accept connections from anyone, use NickServ for user authentication.
## (default)
## Closed -- Require authorization (using the PASS command during login) before
## allowing the user to connect at all.
## Registered -- Only allow registered users to use this server; this disables
## the register- and the account command until the user identifies itself.
##
AuthMode = Closed
## AuthBackend
##
## By default, the authentication data for a user is stored in the storage
## backend. If you want to authenticate against another authentication system
## (e.g. ldap), you can specify that here.
##
## Beware that this disables password changes and causes passwords for the
## accounts people create to be stored in plain text instead of encrypted with
## their bitlbee password.
##
## Currently available backends:
##
## - storage (internal storage)
## - pam (Linux PAM authentication)
## - ldap (LDAP server configured in the openldap settings)
#
AuthBackend = storage
#
## AuthPassword
##
## Password the user should enter when logging into a closed BitlBee server.
## You can also have a BitlBee-style MD5 hash here. Format: "md5:", followed
## by a hash as generated by "bitlbee -x hash <password>".
##
AuthPassword = ItllBeBitlBee ## Heh.. Our slogan. ;-)
## or
# AuthPassword = md5:gzkK0Ox/1xh+1XTsQjXxBJ571Vgl
## OperPassword
##
## Password that unlocks access to special operator commands.
##
OperPassword = ChangeMe!
## or
# OperPassword = md5:I0mnZbn1t4R731zzRdDN2/pK7lRX
## AllowAccountAdd
##
## Whether to allow registered and identified users to add new accounts using
## 'account add'
##
AllowAccountAdd 1
## HostName
##
## Normally, BitlBee gets a hostname using getsockname(). If you have a nicer
## alias for your BitlBee daemon, you can set it here and BitlBee will identify
## itself with that name instead.
##
HostName = localhost
## MotdFile
##
## Specify an alternative MOTD (Message Of The Day) file. Default value depends
## on the --etcdir argument to configure.
##
MotdFile = /etc/bitlbee/motd.txt
## ConfigDir
##
## Specify an alternative directory to store all the per-user configuration
## files. (.nicks/.accounts)
##
ConfigDir = /var/lib/bitlbee
## Ping settings
##
## BitlBee can send PING requests to the client to check whether it's still
## alive. This is not very useful on local servers, but it does make sense
## when most clients connect to the server over a real network interface.
## (Public servers) Pinging the client will make sure lost clients are
## detected and cleaned up sooner.
##
## PING requests are sent every PingInterval seconds. If no PONG reply has
## been received for PingTimeOut seconds, BitlBee aborts the connection.
##
## To disable the pinging, set at least one of these to 0.
##
PingInterval = 180
PingTimeOut = 300
## Using proxy servers for outgoing connections
##
## If you're running BitlBee on a host which is behind a restrictive firewall
## and a proxy server, you can tell BitlBee to use that proxy server here.
## The setting has to be a URL, formatted like one of these examples:
##
## (Obviously, the username and password are optional)
##
# Proxy = http://john:doe@proxy.localnet.com:8080
# Proxy = socks4://socksproxy.localnet.com
# Proxy = socks5://socksproxy.localnet.com
## Protocols offered by bitlbee
##
## As recompiling may be quite unpractical for some people, this option
## allows to remove the support of protocol, even if compiled in. If
## nothing is given, there are no restrictions.
##
Protocols = jabber yahoo
## Trusted CAs
##
## Path to a file containing a list of trusted certificate authorities used in
## the verification of server certificates.
##
## Uncomment this and make sure the file actually exists and contains all
## certificate authorities you're willing to accept (default value should
## work on at least Debian/Ubuntu systems with the "ca-certificates" package
## installed). As long as the line is commented out, SSL certificate
## verification is completely disabled.
##
## The location of this file may be different on other distros/OSes. For
## example, try /etc/ssl/ca-bundle.pem on OpenSUSE.
##
# CAfile = /etc/ssl/certs/ca-certificates.crt
[defaults]
## Here you can override the defaults for some per-user settings. Users are
## still able to override your defaults, so this is not a way to restrict
## your users...
## To enable private mode by default, for example:
## private = 1

10
bitlbee/bitlbee.info Normal file
View File

@@ -0,0 +1,10 @@
PRGNAM="bitlbee"
VERSION="3.6.20230804"
HOMEPAGE="https://www.bitlbee.org"
DOWNLOAD="https://github.com/bitlbee/bitlbee/archive/acf26c3b667551fd3185acda189b28e166a6568b/bitlbee-3.6.20230804.tar.gz"
MD5SUM="e1e844bcfbc1e5061961eef885bf2a0f"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="Sergei Fedosoff"
EMAIL="eleksir@gmail.com"

26
bitlbee/doinst.sh Normal file
View File

@@ -0,0 +1,26 @@
config() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
if [ ! -r $OLD ]; then
mv $NEW $OLD
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy
rm $NEW
fi
}
preserve_perms() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
if [ -e $OLD ]; then
cp -a $OLD ${NEW}.incoming
cat $NEW > ${NEW}.incoming
mv ${NEW}.incoming $NEW
fi
config $NEW
}
preserve_perms etc/rc.d/rc.bitlbee.new
config etc/bitlbee/bitlbee.conf.new
config etc/bitlbee/motd.txt.new
groupadd -g 250 bitlbee
useradd -u 250 -d /var/lib/bitlbee -s /bin/false -g 250 bitlbee

94
bitlbee/rc.bitlbee Normal file
View File

@@ -0,0 +1,94 @@
#!/bin/sh
# Slackware build script for "bitlbee".
# Copyright 2007-2016 Michiel van Wessem, Leicester, United Kingdom
# Copyright 2016 Marcel Saegebarth <marc@mos6581.de>
# Copyright 2016 Avinash H. Duduskar <avinash.duduskar@gmail.com>
# Copyright 2023 Sergei Fedosoff <eleksir@gmail.com>
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# /etc/rc.d/rc.bitlbee - Start/stop/restart the bitlbee daemon.
# To make bitlbee start automatically at boot, make this
# file executable: chmod 0755 /etc/rc.d/rc.bitlbee and add it
# to slackware's startup scripts (ie: rc.local)
#
source /etc/defaults/bitlbee
BITLBEE_CONFIG="/etc/bitlbee/bitlbee.conf"
PIDFILE="/run/bitlbee.pid"
SOCKFILE="/run/bitlbee.sock"
bitlbee_start() {
# make sure bitlbee isn't running yet
if [ ! -f $PIDFILE ]; then
/usr/sbin/bitlbee -P $PIDFILE $BITLBEE_OPTS
else
echo "bitlbee is already active and running under PID: $(cat $PIDFILE)"
echo "if you think this is wrong, remove the offending PID file"
echo "and restart bitlbee"
exit 1
fi
}
bitlbee_stop() {
echo -n "Stopping bitlbee..."
if [ -r $PIDFILE ]; then
kill $(cat $PIDFILE)
for i in 1 2 3; do
if [ -f $PIDFILE ]; then
sleep 1
fi
done
if [ -r $PIDFILE ]; then
kill -9 $(cat $PIDFILE) 2>/dev/null
rm $PIDFILE
fi
echo "done"
else
echo "Unable to find $PIDFILE and stop bitlbee"
fi
}
# Let's see how we are being called.
case "$1" in
start)
bitlbee_start
;;
stop)
bitlbee_stop
;;
restart)
bitlbee_stop
sleep 3
bitlbee_start
;;
*)
echo "Usage: $(basename $0) {start|stop|restart}"
exit 1
;;
esac

19
bitlbee/slack-desc Normal file
View File

@@ -0,0 +1,19 @@
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.
# Line up the first '|' above the ':' following the base package name, and
# the '|' on the right side marks the last column you can put a character in.
# You must make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
bitlbee: bitlbee (an IRC instant messaging gateway)
bitlbee:
bitlbee: BitlBee is an IRC instant messaging gateway licensed under
bitlbee: the terms of the GPLicense. It communicates with the end
bitlbee: user via the IRC protocol whilst interacting with popular
bitlbee: chat networks such as AIM, ICQ, MSN, Yahoo and Jabber.
bitlbee: The users buddies appear as normal IRC users in a channel
bitlbee: and conversations use the private message facility of IRC
bitlbee: compiled with: msn, yahoo, jabber and oscar protocols
bitlbee: Homepage: http://www.bitlbee.org
bitlbee: