Skip to content
Browse files

Merge pull request #6 from gittex/master

Please pull my debian packaging changes
  • Loading branch information...
2 parents 7e212c9 + cf77176 commit a7be269c4852d231cb33a8717ebb992cbef62407 @apparentlymart apparentlymart committed Feb 19, 2012
View
2 .gitignore
@@ -7,3 +7,5 @@ blib
.*
!.gitignore
!.shipit
+build-stamp
+install-stamp
View
14 MANIFEST
@@ -1,20 +1,6 @@
bench/go.perl
bin/djabberd-ganglia
CHANGES
-debian/changelog
-debian/compat
-debian/control
-debian/djabberd-authen-htdigest.install
-debian/djabberd-authen-mysql.install
-debian/djabberd-authen-pam.install
-debian/djabberd-livejournal.install
-debian/djabberd-misc.install
-debian/djabberd-muc.install
-debian/djabberd-webadmin.install
-debian/djabberd.install
-debian/libdjabberd-bot-eliza-perl.install
-debian/libdjabberd-plugin-vcard-perl.install
-debian/rules
demo/demo.conf
demo/lib/DJabberd/Bot/Demo.pm
demo/lib/DJabberd/Plugin/Demo.pm
View
3 MANIFEST.SKIP
@@ -27,3 +27,6 @@
## you don't really need website? do you?
website/
+
+# Avoid debian packaging
+debian/
View
7 debian/.gitignore
@@ -0,0 +1,7 @@
+tmp/
+djabberd/
+libdjabberd-perl/
+*.debhelper
+*.debhelper.log
+*.substvars
+files
View
6 debian/changelog
@@ -1,3 +1,9 @@
+djabberd (0.85-1) unstable; urgency=low
+
+ * Split djabberd into djabberd and libdjabberd-perl
+
+ -- Dominik Schulz (tex) <lkml@ds.gauner.org> Sun, 19 Feb 2012 17:45:33 +0100
+
djabberd (0.83) unstable; urgency=low
* Initial Debian Packaging
View
100 debian/control
@@ -6,15 +6,15 @@ Build-Depends: debhelper (>= 5)
Build-Depends-Indep: perl (>= 5.6.10-12), liblog-log4perl-perl, libnet-dns-perl, libnet-ssleay-perl, libxml-sax-perl, libxml-libxml-perl, libdanga-socket-perl
Standards-Version: 3.8.0
Homepage: http://danga.com/djabberd
+Vcs-Git: git://github.com/djabberd/DJabberd.git
+Vcs-Browser: https://github.com/djabberd/DJabberd
Package: djabberd
Section: perl
Priority: optional
Architecture: all
-Depends: ${perl:Depends}, liblog-log4perl-perl, libnet-dns-perl, libnet-ssleay-perl, libxml-sax-perl, libxml-libxml-perl, libdanga-socket-perl
-Provides: libdjabberd-perl
-Conflicts: libdjabberd-perl
-Suggests: djabberd-doc, openssl
+Depends: ${perl:Depends}, libdjabberd-perl
+Suggests: djabberd-doc
Description: Distributed Jabber server
djabberd is a high-performance, scalable, extensible Jabber/XMPP
server framework. While it comes with an example server, it's
@@ -25,84 +25,22 @@ Description: Distributed Jabber server
.
Homepage: http://danga.com/djabberd/
-Package: libdjabberd-authen-htdigest-perl
-Section: perl
-Priority: optional
-Architecture: all
-Depends: djabberd
-Suggests: apache2-utils | apache-common (<< 1.3.28.0.1-1)
-Description: HTDigest Authentication module for DJabberd
- This module provides htdigest-based authentication for DJabberd.
-
-Package: libdjabberd-authen-mysql-perl
-Section: perl
-Priority: optional
-Architecture: all
-Depends: djabberd, libdbi-perl, libdbd-mysql-perl
-Description: MySQL Authentication module for DJabberd
- This module allows DJabberd to authenticate through MySQL.
-
-Package: libdjabberd-authen-pam-perl
-Section: perl
-Priority: optional
-Architecture: all
-Depends: djabberd, libauthen-pam-perl
-Description: PAM Authentication module for DJabberd
- This module allows DJabberd to authenticate through PAM.
-
-Package: libdjabberd-bot-eliza-perl
-Section: perl
-Priority: optional
-Architecture: all
-Depends: djabberd, libchatbot-eliza-perl
-Description: Eliza Chatbot module for DJabberd
- This module allows DJabberd to use Chatbot::Eliza to confuse
- users.
-
-Package: djabberd-livejournal
-Section: perl
-Priority: optional
-Architecture: all
-Depends: djabberd, libgearman-client-async-perl, libgearman-client-perl, libwww-perl
-Description: LiveJournal module for DJabberd
- This module allows DJabberd to talk to LiveJournal.
-
-Package: djabberd-misc
-Section: perl
-Priority: optional
-Architecture: all
-Depends: djabberd
-Description: DJabberd miscellany
- Provides DJabberd::RosterStorage::Dummy
-
-Package: djabberd-muc
-Section: perl
-Priority: optional
-Architecture: all
-Depends: djabberd
-Description: DJabberd MUC
- Provides MUC modules for DJabberd
-
-Package: djabberd-rosterstorage-sqlite
+Package: libdjabberd-perl
Section: perl
Priority: optional
Architecture: all
-Depends: djabberd, libdbi-perl, libdbd-sqlite3-perl
-Description: DJabberd RosterStorage using SQLite
- Provides DJabberd RosterStorage using SQLite
-
-Package: libdjabberd-plugin-vcard-perl
-Section: perl
-Priority: optional
-Architecture: all
-Depends: djabberd
-Description: DJabberd VCard plugins
- Provides VCard plugins for DJabberd
+Depends: ${perl:Depends}, liblog-log4perl-perl, libnet-dns-perl, libnet-ssleay-perl, libxml-sax-perl, libxml-libxml-perl, libdanga-socket-perl
+Suggests: openssl
+Description: Core Modules for DJabberd
+ djabberd is a high-performance, scalable, extensible Jabber/XMPP
+ server framework. While it comes with an example server, it's
+ really a set of classes for you to build your own Jabber server
+ without understanding Jabber. Instead of working with XML and
+ protocol-specific details, you subclass parts and work with sane
+ objects and data structures and let DJabberd do all the ugly work.
+ .
+ Homepage: http://danga.com/djabberd/
+ .
+ This package contains the core libraries needed to build your
+ own jabber server.
-Package: djabberd-webadmin
-Section: perl
-Priority: optional
-Architecture: all
-Depends: djabberd, libperlbal-perl
-Description: DJabberd WebAdmin
- Provides DJabberd::WebAdmin
View
1 debian/djabberd-authen-htdigest.install
@@ -1 +0,0 @@
-DJabberd-Authen-HTDigest/lib/* usr/share/perl5
View
1 debian/djabberd-authen-mysql.install
@@ -1 +0,0 @@
-DJabberd-Authen-MySQL/lib/* usr/share/perl5
View
1 debian/djabberd-authen-pam.install
@@ -1 +0,0 @@
-DJabberd-Authen-PAM/lib/* usr/share/perl5
View
1 debian/djabberd-livejournal.install
@@ -1 +0,0 @@
-DJabberd-LiveJournal/lib/* usr/share/perl5
View
1 debian/djabberd-misc.install
@@ -1 +0,0 @@
-DJabberd-Misc/lib/* usr/share/perl5
View
1 debian/djabberd-muc.install
@@ -1 +0,0 @@
-DJabberd-MUC/lib/* usr/share/perl5
View
1 debian/djabberd-rosterstorage-sqlite.install
@@ -1 +0,0 @@
-DJabberd-RosterStorage-SQLite/lib/* usr/share/perl5
View
1 debian/djabberd-webadmin.install
@@ -1 +0,0 @@
-DJabberd-WebAdmin/lib/* usr/share/perl5
View
1 debian/djabberd.dirs
@@ -0,0 +1 @@
+/etc/djabberd
View
85 debian/djabberd.init.d
@@ -0,0 +1,85 @@
+#!/bin/sh
+
+### BEGIN INIT INFO
+# Provides: djabberd
+# Required-Start: $local_fs $remote_fs
+# Required-Stop: $local_fs $remote_fs
+# Should-Start: $all
+# Should-Stop: $all
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Start/stop djabberd
+# Description: Start/stop djabberd
+### END INIT INFO
+
+# Original Version from http://graveyard.martinjansen.com/2006/08/06/djabberd.html
+# Modified by Dominik Schulz <dominik.schulz@gauner.org>
+
+set -e
+
+test $DEBIAN_SCRIPT_DEBUG && set -v -x
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DESC="DJabberd"
+NAME="djabberd"
+CONFIG_DIR=/etc/djabberd
+HOME_DIR=/var/lib/djabberd
+DAEMON=/usr/bin/djabberd
+PIDFILE=/var/run/djabberd/djabberd.pid
+SCRIPTNAME=/etc/init.d/djabberd
+OPTS="--conf=$CONFIG_DIR/djabberd.conf"
+
+test -x $DAEMON || exit 0
+test -d $CONFIG_DIR || exit 0
+
+d_start() {
+ start-stop-daemon --start --quiet --pidfile $PIDFILE -m \
+ -d $HOME_DIR \
+ --chuid djabberd \
+ --background \
+ --exec $DAEMON -- $OPTS
+}
+
+d_stop() {
+ start-stop-daemon --stop --quiet --pidfile $PIDFILE \
+ -d $HOME_DIR \
+ --name $NAME -- $OPTS
+}
+
+d_reload() {
+ start-stop-daemon --stop --quiet --pidfile $PIDFILE \
+ --name $NAME --signal 1
+}
+
+case "$1" in
+ start)
+ echo -n "Starting $DESC: $NAME"
+ d_start
+ echo "."
+ ;;
+ stop)
+ echo -n "Stopping $DESC: $NAME"
+ d_stop
+ echo "."
+ ;;
+ reload)
+ echo -n "Reloading $DESC: $NAME"
+ d_reload
+ echo "."
+ ;;
+ restart|force-reload)
+ echo -n "Restarting $DESC: $NAME"
+ d_stop
+ sleep 1
+ d_start
+ echo "."
+ ;;
+ *)
+ echo "Usage: $SCRIPTNAME {start|stop|reload|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
+
+# vim: set ai sts=2 sw=2 tw=0:
View
4 debian/djabberd.install
@@ -1 +1,3 @@
-debian/tmp/usr /
+debian/tmp/usr/bin /usr/
+/etc/djabberd.conf /etc/djabberd/
+/etc/log.conf /etc/djabberd/
View
8 debian/djabberd.logrotate
@@ -0,0 +1,8 @@
+/var/log/djabberd/djabberd.log {
+ daily
+ missingok
+ copytruncate
+ rotate 90
+ compress
+ notifempty
+}
View
61 debian/djabberd.postinst
@@ -0,0 +1,61 @@
+#!/bin/sh -e
+
+# DJabberd Common postinst
+# Dominik Schulz <dominik.schulz@gauner.org>
+
+makedir() {
+ if [ ! -d $1 ]; then
+ mkdir $1
+ fi
+ chown $2 $1 && chmod $3 $1
+}
+
+umask 022
+
+# postinst processing
+
+case "$1" in
+ configure)
+ OLDVERSION="$2"
+ # see below
+ ;;
+ abort-upgrade)
+ exit 0
+ ;;
+ abort-remove|abort-deconfigure)
+ exit 0
+ ;;
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# make sure that the user exists. the simplest portable way to check that
+# is to chown something.
+makedir /tmp/djabberd root:root 700
+chgrp djabberd /tmp/djabberd 2>/dev/null ||
+ addgroup --system djabberd
+chown djabberd /tmp/djabberd 2>/dev/null ||
+ adduser --system --home /var/lib/djabberd --no-create-home --ingroup djabberd --disabled-password djabberd
+# create missing directories and/or make sure the permissions fit
+makedir /var/lib/djabberd djabberd:djabberd 755
+makedir /var/log/djabberd djabberd:djabberd 755
+makedir /var/run/djabberd djabberd:djabberd 755
+makedir /etc/djabberd djabberd:djabberd 750
+
+# generate a snakeoil keypair so that SSL works OOTB
+SERVERKEY="/etc/djabberd/snakeoil-server-key.pem"
+SERVERCRT="/etc/djabberd/snakeoil-server-crt.pem"
+OPENSSL="/usr/bin/openssl"
+if [ ! -f $SERVERKEY -a ! -f $SERVERCRT -a -x $OPENSSL ]; then
+ $OPENSSL req -x509 -batch -newkey rsa:1024 -keyout $SERVERKEY -out $SERVERCRT -days 3650 -nodes
+fi
+
+# remove the temporary directory
+rm -r /tmp/djabberd
+
+# functionality generated by debhelper (e.g. invoking start/stop scripts) will be added here
+#DEBHELPER#
+
+exit 0
View
27 debian/djabberd.postrm
@@ -0,0 +1,27 @@
+#!/bin/sh -e
+
+# DJabberd Common postrm
+# Dominik Schulz <dominik.schulz@gauner.org>
+
+case "$1" in
+ remove)
+ ;;
+ upgrade)
+ ;;
+ purge)
+ rm -rf /etc/djabberd
+ rm -rf /var/lib/djabberd
+ rm -rf /var/log/djabberd
+ rm -rf /var/run/djabberd
+ userdel djabberd >/dev/null 2>&1 || true
+ groupdel djabberd >/dev/null 2>&1 || true
+ ;;
+ failed-upgrade|abort-install|abort-upgrade|disappear)
+ ;;
+ *)
+ echo "postrm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
View
1 debian/libdjabberd-bot-eliza-perl.install
@@ -1 +0,0 @@
-DJabberd-Bot-Eliza/lib/* usr/share/perl5
View
1 debian/libdjabberd-perl.install
@@ -0,0 +1 @@
+debian/tmp/usr/share /usr/
View
1 debian/libdjabberd-plugin-vcard-perl.install
@@ -1 +0,0 @@
-DJabberd-VCard/lib/* usr/share/perl5
View
14 debian/rules
@@ -19,11 +19,9 @@ build-stamp:
dh_testdir
# Add commands to compile the package here
- (cd DJabberd ; $(PERL) Makefile.PL verbose INSTALLDIRS=vendor )
- (cd DJabberd ; $(MAKE) )
-
-# 'make test' does not currently work
-# $(MAKE) test
+ $(PERL) Makefile.PL verbose INSTALLDIRS=vendor
+ $(MAKE)
+ $(MAKE) test
touch build-stamp
@@ -32,7 +30,7 @@ clean:
dh_testroot
# Add commands to clean up after the build process here
- -(cd DJabberd ; $(MAKE) distclean )
+ -( $(MAKE) distclean )
dh_clean build-stamp install-stamp
@@ -46,7 +44,7 @@ install-stamp:
dh_installdirs -A
# Add commands to install the package into $(TMP) here
- (cd DJabberd ; $(MAKE) pure_install DESTDIR=$(TMP) PREFIX=/usr )
+ $(MAKE) pure_install DESTDIR=$(TMP) PREFIX=/usr
find $(TMP) -name .packlist -exec rm '{}' \;
find $(TMP) -depth -type d -empty -exec rmdir '{}' \;
@@ -68,7 +66,7 @@ binary-indep: build install
dh_installexamples
dh_installinit
# dh_installdocs doc/hacking/todo.txt
- dh_installchangelogs DJabberd/CHANGES
+ dh_installchangelogs CHANGES
dh_perl
dh_link
dh_strip
View
76 etc/djabberd.conf
@@ -0,0 +1,76 @@
+OldSSL enable
+
+# health checks from this IP (directive can be repeated) won't log and
+# won't allocate a connection id
+DeclareMonitor 127.0.0.1
+AdminPort 5200
+
+# defaults:
+ClientPort 5222
+ServerPort 5269
+
+SSLCertificateFile /etc/djabberd/snakeoil-server-crt.pem
+SSLCertificateKeyFile /etc/djabberd/snakeoil-server-key.pem
+
+PidFile /var/run/djabberd/djabberd.pid
+
+<VHost jabber.localhost.localdomain>
+ S2S enable
+ RequireSSL yes
+
+ <Plugin DJabberd::SASL::AuthenSASL>
+ Optional no
+ Mechanisms PLAIN LOGIN
+ </Plugin>
+
+ <Plugin DJabberd::RosterStorage::SQLite>
+ Database /var/lib/djabberd/roster.sqlite
+ </Plugin>
+
+ <Plugin DJabberd::Authen::HTDigest>
+ Realm djabberd
+ HtDigest /var/lib/djabberd/djabberd.htdigest
+ </Plugin>
+
+ <Plugin DJabberd::Plugin::VCard::SQLite>
+ Storage /var/lib/djabberd/vcards.sqlite
+ </Plugin>
+
+# This needs the package libdjabberd-authen-userlimit-perl
+# <Plugin DJabberd::Authen::UserLimit>
+# UserLimit 150
+# </Plugin>
+
+# This needs the package libdjabberd-entitytime-perl
+# <Plugin DJabberd::Plugin::EntityTime />
+
+# This needs the package libdjabberd-plugin-balancer-perl
+# <Plugin DJabberd::Plugin::Balancer />
+
+# This needs the package libdjabberd-plugin-jabberiqversion-perl
+# <Plugin DJabberd::Plugin::JabberIqVersion>
+# OS Debian GNU/Linux
+# Name A poorly maintained Jabber Server
+# Version Beta
+# </Plugin>
+
+# This needs the package libdjabberd-plugin-ping-perl
+# <Plugin DJabberd::Plugin::Ping />
+
+ <Plugin DJabberd::PresenceChecker::Local />
+ <Plugin DJabberd::Delivery::Local />
+ <Plugin DJabberd::Delivery::S2S />
+
+# This needs the package libdjabberd-delivery-offlinestorage-perl
+# IMPORTANT: This plugin MUST be loaded last!
+# <Plugin DJabberd::Delivery::OfflineStorage::SQLite>
+# Database /var/lib/djabberd/offline.sqlite
+# Types Message
+# </Plugin>
+</VHost>
+
+
+
+
+
+
View
9 etc/log.conf
@@ -0,0 +1,9 @@
+log4perl.logger.DJabberd = ERROR, LOGFILE
+log4perl.logger.DJabberd.Hook = WARN
+
+log4perl.appender.LOGFILE=Log::Log4perl::Appender::File
+log4perl.appender.LOGFILE.filename=/var/log/djabberd/djabberd.log
+log4perl.appender.LOGFILE.mode=append
+
+log4perl.appender.LOGFILE.layout=Log::Log4perl::Layout::PatternLayout
+log4perl.appender.LOGFILE.layout.ConversionPattern=%-5p %-40c %m %n
View
1 t/.gitignore
@@ -0,0 +1 @@
+log/

0 comments on commit a7be269

Please sign in to comment.
Something went wrong with that request. Please try again.