debian/0000755000000000000000000000000012050717415007170 5ustar debian/patches/0000755000000000000000000000000012027635314010620 5ustar debian/patches/1002_default_config_path.patch0000644000000000000000000000065512027635303016274 0ustar Description: Fix path to default config Author: Jonas Smedegaard Last-Update: 2012-10-23 --- a/src/main.coffee +++ b/src/main.coffee @@ -10,7 +10,7 @@ # Config config = require('jsconfig') version = require('./version') -defaultConfigFile = path.join(__dirname,"..","config.js") +defaultConfigFile = path.join(__dirname,"config.js") if fs.existsSync(defaultConfigFile) config.defaults defaultConfigFile debian/patches/1005_fix_sysv_args.patch0000644000000000000000000000170412027635314015176 0ustar Description: Adjust sysV init script paths and username Author: Jonas Smedegaard Last-Update: 2012-10-23 --- a/_etc_init.d_buddycloud-server +++ b/_etc_init.d_buddycloud-server @@ -20,16 +20,16 @@ # PATH should only include /usr/* if it runs after the mountnfs.sh script PATH=/sbin:/usr/sbin:/bin:/usr/bin DESC="buddycloud server" -NAME=buddycloud +NAME=buddycloud-server RUN_AS_USER=buddycloud -RUNDIR=/opt/buddycloud-server -DAEMON=`which node` -DAEMON_ARGS="lib/main.js --config config.js" -PIDDIR=/var/run/buddycloud-server +RUNDIR="/usr/share/$NAME" +DAEMON=/usr/bin/nodejs +DAEMON_ARGS="$RUNDIR/main.js --config config.js" +PIDDIR="/var/run/$NAME" PIDFILE="$PIDDIR/$NAME.pid" -SCRIPTNAME=/etc/init.d/$NAME -LOGDIR=/var/log/buddycloud-server -LOGFILE="$LOGDIR/buddycloud-server.log" +SCRIPTNAME="/etc/init.d/$NAME" +LOGDIR="/var/log/$NAME" +LOGFILE="$LOGDIR/$NAME.log" # Exit if the package is not installed [ -x "$DAEMON" ] || exit 0 debian/patches/series0000644000000000000000000000007012027633145012032 0ustar 1002_default_config_path.patch 1005_fix_sysv_args.patch debian/postrm0000644000000000000000000000055612027636104010444 0ustar #!/bin/sh set -e pkg=buddycloud-server if [ -f /usr/share/debconf/confmodule ]; then . /usr/share/debconf/confmodule fi if [ -f /usr/share/dbconfig-common/dpkg/postrm.pgsql ]; then . /usr/share/dbconfig-common/dpkg/postrm.pgsql dbc_go "$pkg" "$@" || true fi #DEBHELPER# if [ "$1" = "purge" ]; then rm -rf "/var/log/$pkg/" rmdir "/var/run/$pkg" || true fi debian/prerm0000644000000000000000000000023011705016354010233 0ustar #!/bin/sh set -e pkg=buddycloud-server . /usr/share/debconf/confmodule . /usr/share/dbconfig-common/dpkg/prerm.pgsql dbc_go "$pkg" "$@" #DEBHELPER# debian/TODO0000644000000000000000000000054612027624223007663 0ustar * Find cause of memory leak when failing to connect to XMPP server. * Fix SysV script silent at start, and failing to stop. * convince upstream to support lightweight DB backend (e.g. sqlite), and split DB handling into separate binary packages * Debconf'ify all configfile options and integrate dbconfig-common choices, using Config::Model. debian/control0000644000000000000000000000177112050717037010601 0ustar Source: buddycloud-server Section: web Priority: optional Maintainer: Debian Javascript Maintainers Uploaders: Jonas Smedegaard Build-Depends: cdbs, devscripts, debhelper, dh-buildinfo, coffeescript, nodejs (>= 0.6.19~dfsg1-3~), node-jsconfig, node-async Standards-Version: 3.9.3 Homepage: https://github.com/buddycloud/buddycloud-server Vcs-Git: git://git.debian.org/git/collab-maint/buddycloud-server Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/buddycloud-server.git Package: buddycloud-server Architecture: all Pre-Depends: ${cdbs:Pre-Depends} Depends: ${misc:Depends}, ${cdbs:Depends} Recommends: ${cdbs:Recommends} Suggests: ${cdbs:Suggests} Description: buddycloud channels service for XMPP Node is an event-based server-side JavaScript engine. . buddycloud-server is an XMPP component implemented in Node, providing Buddycloud channels, an open federated social networking protocol from http://open.buddycloud.com/ . debian/config0000644000000000000000000000032711705015423010356 0ustar #!/bin/sh set -e pkg=buddycloud-server . /usr/share/debconf/confmodule if [ -f /usr/share/dbconfig-common/dpkg/config.pgsql ]; then . /usr/share/dbconfig-common/dpkg/config.pgsql dbc_go "$pkg" "$@" fi exit 0 debian/source/0000755000000000000000000000000011675766645010515 5ustar debian/source/format0000644000000000000000000000001411675766645011723 0ustar 3.0 (quilt) debian/changelog0000644000000000000000000002171412050717415011047 0ustar buddycloud-server (0.3.5-2) unstable; urgency=low * Update watch and rules files to use archive subdir at github.com. * Build-depend on devscripts, to always check copyright during build. * Bump dephelper compatibility level to 8. -- Jonas Smedegaard Wed, 14 Nov 2012 14:39:01 +0100 buddycloud-server (0.3.5-1) unstable; urgency=low * New upstream release. * Drop patch 1001: Unneeded (we no longer use a long username) and possible wrong (it is an interpreted script). * Adjust patch 1005 to invoke nodejs (not wrapper), to follow upstream change. Stop installing wrapper or manpage. Stop build-depending on help2man. * Unfuzz patches, and bump DEP3 Last-Update hints. * Fix avoid postrm script failing if dbconfig-common missing. Closes: bug#665339. Thanks to Andreas Beckmann. -- Jonas Smedegaard Sun, 23 Sep 2012 18:45:55 +0200 buddycloud-server (0.3.1-2) unstable; urgency=low * Call binary /usr/bin/nodejs (not node), and tighten (build-)dependency on nodejs. Closes: bug#686896. Thanks to Aaron M. Ucko. * Pre-depend (not depend) on dbconfig-common: it needs to already be installed at the time of our postinst (i.e. configuration is broken if installed together and APT decides to process dbconfig-common last). * Run as user buddycloud (not buddycloud-server): Postgres does not support dash in username. * Mention possible upstream brokenness as TODOs. * Directly use github.com (not unreliable githubredir.debian.net). -- Jonas Smedegaard Sun, 23 Sep 2012 17:29:30 +0200 buddycloud-server (0.3.1-1) unstable; urgency=low * New upstream release. * Update copyright file: Shorten comments, and quote license strings. * Use anonscm.debian.org URL in Vcs-Browser field. * Fix failure to purge package when dbconfig-common not installed. * Add patch 1001 to consistently use --exec in sysV init to support long UID. * Add patch 1002 to fix path to default config. Thanks to Philip Hands for insisting. * Install unpatched config as default (not symlink from below /etc). * Update package relations: + Build-depend unversioned on coffeescript: Satisfied in unstable and unavailable in other Debian suites. + Stop depending on node-glob: Needed only for build tool muffin, according to upstream git commit message. + Recommend prosody or ejabberd or jabberd2. -- Jonas Smedegaard Wed, 16 May 2012 00:03:34 +0200 buddycloud-server (0.2.1-1) unstable; urgency=low * New upstream release. * Bump copyright file format to 1.0. * Bump standards-version to 3.9.3. * Suppress lintian warning about deliberately skipped SysV runlevels. -- Jonas Smedegaard Thu, 01 Mar 2012 20:05:56 +0100 buddycloud-server (0.2.0-1) unstable; urgency=low * New upstream release. -- Jonas Smedegaard Sat, 18 Feb 2012 13:31:51 +0100 buddycloud-server (0.1.11-1) unstable; urgency=low * New upstream release. * Drop patches 1001-1004: Adopted upstream. * Fix remove debian/config.js in clean target. * Update package relations: + Relax to depend unversioned on node-node-xmpp: Only satisfied version exist in Debian. + Depend on node-glob. * Adapt version hardcoding, and add comment to drop when installing with muffin. -- Jonas Smedegaard Wed, 01 Feb 2012 01:33:33 +0100 buddycloud-server (0.1.10-2) unstable; urgency=low * Fix depend on adduser. Closes: bug#657485. Thanks to Andreas Beckmann. -- Jonas Smedegaard Thu, 26 Jan 2012 16:49:37 +0100 buddycloud-server (0.1.10-1) unstable; urgency=low * New upstream release. * Fix patch 1004 to prepare logdir (not only piddir) as needed. -- Jonas Smedegaard Wed, 18 Jan 2012 12:24:22 +0100 buddycloud-server (0.1.9-2) unstable; urgency=low * Fix create correct user. -- Jonas Smedegaard Mon, 16 Jan 2012 23:53:45 +0100 buddycloud-server (0.1.9-1) unstable; urgency=low * New upstream release. * Unfuzz patches. * Adapt to new upstream build structure. * Hardcode upstream version (fixing attempts to resolve at runtime from package.json file not shipped with Debian). * Adapt example config file during build (Keep example file pristine). Disable patch 1003, but preserve in source for upstream consumption. * Fix consistently use package name in logpath and pidpath, and as username (the latter assumed by dbconfig-common). * Use socket connection to Postgres by default. * Update TODO. * Extend copyright years for Debian dir. -- Jonas Smedegaard Mon, 16 Jan 2012 23:39:16 +0100 buddycloud-server (0.1.7-2) unstable; urgency=low * Fix apply package dependencies. * Add patch 1003 to save logs in own dir, easing access rights handling. * Add patch 1004 to setup access rights and needed dirs when starting daemon. * Add patch 1005 to fix sysV init script paths. * Install initscript. * Improve logfile handling. Recommend logrotate. * Handle database. Depend on dbconfig-common. Recommend postgres and postgres-client. * Tighten build-dependency of cdbs. -- Jonas Smedegaard Mon, 16 Jan 2012 15:08:15 +0100 buddycloud-server (0.1.7-1) unstable; urgency=low * New snapshot of upstream VCS. [ Jonas Smedegaard ] * Rename source and binary package to buddycloud-server (from channel-server). * Install files from src (not root dir). * Bump debhelper compatilibity level to 7. * Drop dpkg local-options hints from packaging source: now defaults. * Declare all package relations in rules file. * Depend/recommend/suggest node-* packages (not libnode-*). * Adapt package relations for new release: + Build-depend on coffeescript. + Tighten to depend versioned on node-node-xmpp. + Depend on (not recommend) node-node-stringprep and node-pg. + Depend on node-node-expat, node-ltx, node-jsconfig, node-async, node-common-logger and node-ain2. + Depend on node-underscore.logger (not node-common-logger). + Stop depending on node-step or node-cradle. + Stop recommending couchdb. + Stop suggesting node-vows. * Update watch file to use more flexible regex. * Install (locally written, simple wrapper) daemon binary, and (locally generated) corresponding man page. * Add patch 1001 to speedup system shutdown by avoiding explicit sysV stop. * Add patch 1002 to improve default config path handling. Adjust install routines to match. -- Jonas Smedegaard Sun, 15 Jan 2012 21:12:09 +0100 channel-server (0.0.1+20110418-2) unstable; urgency=low * Team upload. * Update runtime dependency of libnode-step to node-step, prepare for future uploads of other libnode-* → node-* modules -- David Paleino Fri, 28 Oct 2011 23:23:03 +0200 channel-server (0.0.1+20110418-1) unstable; urgency=low * New snapshot of upstream VCS. [ Jonas Smedegaard ] * Bump copyright file format to draft 174 of DEP-5. * Bump policy compliance to standards-version 3.9.2. -- Jonas Smedegaard Fri, 22 Apr 2011 12:09:45 +0200 channel-server (0.0.1+20110324-1) unstable; urgency=low * New snapshot of upstream Git. -- Jonas Smedegaard Sat, 26 Mar 2011 20:52:21 +0100 channel-server (0.0.1+20110217-1) unstable; urgency=low * New snapshot of upstream Git. * Fix tie proper email addresses to artist and real name of upstream author, as per request. * Package now team-maintained: + Set Debian Javascript Maintainers as maintainer. + Set myself as uploader. * Update upstream URLs. * Add (network-requiring) test as example file and suggest libnode-vows for use with it. -- Jonas Smedegaard Fri, 18 Feb 2011 03:12:27 +0100 channel-server (0.0.1+2git.84338b-1) unstable; urgency=low * New snapshot of upstream Git. * Recommend libnode-pg for newly added Postgres backend support. * Rewrite package descriptions to use upstream description. -- Jonas Smedegaard Tue, 01 Feb 2011 19:25:18 +0100 channel-server (0.0.1+1git.bde683-1) unstable; urgency=low * New upstream Git snapshot. * Fix recommend libnode-node-stringprep (not bogus libnode-stringprep). -- Jonas Smedegaard Mon, 31 Jan 2011 04:56:29 +0100 channel-server (0.0.1-3) unstable; urgency=low * Update dependencies to names matching micro-policy Node naming scheme: libnode-PKG. * Drop marketing-like paragraph from long description. * Fix package relations: + Depend on libnode-cradle and libnode-node-uuid. + Recommend libnode-stringprep. * Install config below /etc. -- Jonas Smedegaard Sat, 29 Jan 2011 04:38:45 +0100 channel-server (0.0.1-2) unstable; urgency=low * Fix build-depend on step.js (not unrelated step). -- Jonas Smedegaard Fri, 28 Jan 2011 03:35:52 +0100 channel-server (0.0.1-1) unstable; urgency=low * Initial release. Closes: Bug#611315. -- Jonas Smedegaard Fri, 28 Jan 2011 03:10:30 +0100 debian/buddycloud-server.lintian-overrides0000644000000000000000000000023011723743666016222 0ustar # Deliberately skipped: faster leaving to internal sysV cleanup buddycloud-server: init.d-script-possible-missing-stop etc/init.d/buddycloud-server 0 6 debian/links0000644000000000000000000000017211754537731010246 0ustar /usr/share/dbconfig-common/data/buddycloud-server/install/postgres /usr/share/doc/buddycloud-server/examples/postgres.sql debian/postinst0000644000000000000000000000060212027620427010774 0ustar #!/bin/sh set -e pkg=buddycloud-server . /usr/share/debconf/confmodule . /usr/share/dbconfig-common/dpkg/postinst.pgsql dbc_pgsql_createdb_encoding="UTF8" dbc_go "$pkg" "$@" if [ "$1" = "configure" ]; then adduser --system --quiet --group --disabled-password \ --gecos "Buddycloud XMPP channel service" \ --no-create-home --home "/var/run/$pkg" \ buddycloud fi #DEBHELPER# debian/compat0000644000000000000000000000000212050717110010356 0ustar 8 debian/watch0000644000000000000000000000013712050717256010225 0ustar version=3 https://github.com/buddycloud/buddycloud-server/tags .*/archive/v?(\d[\d\.]+).tar.gz debian/copyright_hints0000644000000000000000000000302112027635544012332 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: FIXME Upstream-Contact: FIXME Source: FIXME Disclaimer: Autogenerated by CDBS Files: Cakefile README.md _etc_init.d_buddycloud-server bin/buddycloud-server config.js.example debian/TODO debian/buddycloud-server.lintian-overrides debian/buddycloud-server.logrotate debian/compat debian/config debian/control debian/control.in debian/gbp.conf debian/install debian/links debian/patches/1002_default_config_path.patch debian/patches/1005_fix_sysv_args.patch debian/patches/series debian/postinst debian/postrm debian/prerm debian/source/format debian/watch package.js package.json postgres.sql src/errors.coffee src/local/model_postgres.coffee src/local/operations.coffee src/logger.coffee src/main.coffee src/normalize.coffee src/router.coffee src/rsm_walk.coffee src/sync.coffee src/tombstone.coffee src/util.coffee src/xmpp/backend_pubsub.coffee src/xmpp/connection.coffee src/xmpp/forms.coffee src/xmpp/ns.coffee src/xmpp/pubsub_client.coffee src/xmpp/pubsub_notifications.coffee src/xmpp/pubsub_server.coffee src/xmpp/rsm.coffee Copyright: *No copyright* License: UNKNOWN FIXME Files: LICENSE Copyright: You must retain, in the Source form of any Derivative Works [yyyy license to reproduce, prepare Derivative Works of owner owner. For the purposes of this definition, "submitted" License: Apache-2.0 FIXME Files: debian/rules Copyright: 2011-2012, Jonas Smedegaard License: GPL-2+ FIXME debian/copyright0000644000000000000000000000262211754532665011141 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: buddycloud-server Upstream-Contact: Astro http://github.com/buddycloud/buddycloud-server/issues/ Source: https://github.com/buddycloud/buddycloud-server/downloads git://github.com/buddycloud/buddycloud-server Files: * Copyright: 2010, Stephan Maka License: Apache-2 buddycloud-server is distributed under the Apache License 2.0. See the `LICENSE` file. Comment: On Debian systems the 'Apache License' version 2.0 is located in '/usr/share/common-licenses/Apache-2.0'. Files: debian/* Copyright: 2011, Jonas Smedegaard License: GPL-2+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. Comment: On Debian systems the 'GNU General Public License' version 2 is located in '/usr/share/common-licenses/GPL-2'. . You should have received a copy of the 'GNU General Public License' along with this program. If not, see . debian/install0000644000000000000000000000012512027634155010562 0ustar lib/* config.js /usr/share/buddycloud-server debian/config.js /etc/buddycloud-server debian/gbp.conf0000644000000000000000000000014611675766645010635 0ustar # Configuration file for git-buildpackage and friends [DEFAULT] pristine-tar = True sign-tags = True debian/rules0000755000000000000000000000742312050716773010264 0ustar #!/usr/bin/make -f # -*- mode: makefile; coding: utf-8 -*- # Copyright © 2011-2012 Jonas Smedegaard # Description: Main Debian packaging script for buddycloud-server # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . include /usr/share/cdbs/1/rules/upstream-tarball.mk include /usr/share/cdbs/1/rules/utils.mk include /usr/share/cdbs/1/rules/debhelper.mk pkg = $(DEB_SOURCE_PACKAGE) daemon = $(pkg) CDBS_BUILD_DEPENDS += , coffeescript # Needed both at build time and (always) at runtime # * node modules needed at build time to create manpage deps = nodejs (>= 0.6.19~dfsg1-3~), node-jsconfig, node-async CDBS_BUILD_DEPENDS += , $(deps) CDBS_DEPENDS_$(pkg) = $(deps) # Needed (always/often) at runtime node-deps-runtime = node-xmpp node-stringprep node-expat ltx node-uuid node-deps-runtime += pg underscore.logger ain2 CDBS_DEPENDS_$(pkg) += $(patsubst %,$(comma) node-%,$(node-deps-runtime)) CDBS_DEPENDS_$(pkg) += , lsb-base, adduser CDBS_RECOMMENDS_$(pkg) = prosody | ejabberd | jabberd2 DEB_UPSTREAM_URL = https://github.com/buddycloud/$(daemon)/archive DEB_UPSTREAM_TARBALL_BASENAME = v$(DEB_UPSTREAM_TARBALL_VERSION) DEB_UPSTREAM_TARBALL_MD5 = 58638415c97a08f09099d4637f9848bf DEB_INSTALL_DOCS_ALL += README.md DEB_INSTALL_EXAMPLES_$(pkg) += config.js.example # Custom config file handling: # * source patched to load config from code dir (not oddly one dir out) # * Add dummy config to support help2man usage from staging area build/$(pkg):: coffee -o lib -c src touch lib/config.js cp -a config.js.example config.js perl -p \ -e 's,^( file: "/var/log/).*(\.log")$$,$$1$(pkg)/$(daemon)$$2,;' \ -e 's|^( host: '"'"')localhost('"'"',)$$|$$1/var/run/postgresql$$2|;' \ -e 's|^( password: '"'"')tellnoone('"'"',)$$|$$1$$2|;' \ config.js.example > debian/config.js @if ! fgrep -xq ' file: "/var/log/$(pkg)/$(daemon).log"' debian/config.js; then \ echo "Failed to adjust logfile setting in debian/config.js."; \ exit 1; \ fi @if ! fgrep -xq ' host: '"'"'/var/run/postgresql'"'"',' debian/config.js; then \ echo "Failed to adjust host setting in debian/config.js."; \ exit 1; \ fi @if ! fgrep -xq ' password: '"''"',' debian/config.js; then \ echo "Failed to adjust password setting in debian/config.js."; \ exit 1; \ fi clean:: rm -rf lib rm -f config.js debian/config.js # Install initscript with debhelper to add pre- and postinst routines # * Skip runlevels 0 and 6: faster leaving to internal sysV cleanup CDBS_RECOMMENDS_$(pkg) += , logrotate DEB_UPDATE_RCD_PARAMS = start 20 2 3 4 5 . stop 20 1 . install/$(pkg):: cp -f _etc_init.d_buddycloud-server 'debian/$(pkg).init' clean:: rm -f 'debian/$(pkg).init' CDBS_PREDEPENDS_$(pkg) += , dbconfig-common CDBS_RECOMMENDS_$(pkg) += , postgresql-client, postgresql install/$(pkg):: install -D -m 0644 postgres.sql \ '$(cdbs_curdestdir)/usr/share/dbconfig-common/data/buddycloud-server/install/postgres' # TODO: drop when using muffin to install verfile=$(cdbs_curdestdir)/usr/share/$(pkg)/main.js binary-post-install/$(pkg):: perl -i -pe 's/^(\s*version = )require.*/$$1'"'$(DEB_UPSTREAM_VERSION)'"'/' '$(verfile)' @if ! fgrep -xq ' version = '"'$(DEB_UPSTREAM_VERSION)'" '$(verfile)'; then \ echo "Failed to hardcode version."; \ exit 1; \ fi debian/control.in0000644000000000000000000000161111771145626011207 0ustar Source: buddycloud-server Section: web Priority: optional Maintainer: Debian Javascript Maintainers Uploaders: Jonas Smedegaard Build-Depends: @cdbs@ Standards-Version: 3.9.3 Homepage: https://github.com/buddycloud/buddycloud-server Vcs-Git: git://git.debian.org/git/collab-maint/buddycloud-server Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/buddycloud-server.git Package: buddycloud-server Architecture: all Pre-Depends: ${cdbs:Pre-Depends} Depends: ${misc:Depends}, ${cdbs:Depends} Recommends: ${cdbs:Recommends} Suggests: ${cdbs:Suggests} Description: buddycloud channels service for XMPP Node is an event-based server-side JavaScript engine. . buddycloud-server is an XMPP component implemented in Node, providing Buddycloud channels, an open federated social networking protocol from http://open.buddycloud.com/ . debian/buddycloud-server.logrotate0000644000000000000000000000016611705107513014555 0ustar /var/log/buddycloud-server/buddycloud-server.log { weekly missingok rotate 7 compress notifempty copytruncate }