summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--debian/TODO3
-rw-r--r--debian/changelog484
-rw-r--r--debian/control29
-rw-r--r--debian/copyright44
-rw-r--r--debian/gbp.conf2
-rw-r--r--debian/irker.docs2
-rw-r--r--debian/irker.examples1
-rw-r--r--debian/irker.init84
-rw-r--r--debian/irker.install3
-rw-r--r--debian/irker.links2
-rw-r--r--debian/irker.lintian-overrides3
-rw-r--r--debian/irker.postinst30
-rw-r--r--debian/irker.postrm26
-rw-r--r--debian/irkerhook-debian.154
-rwxr-xr-xdebian/local/irkerhook-debian27
-rwxr-xr-xdebian/local/irkerhook-git17
-rw-r--r--debian/manpages1
-rw-r--r--debian/patches/0001-dfsg.patch22
-rw-r--r--debian/patches/0005-author-name.patch21
-rw-r--r--debian/patches/0007-Fix-syntax-error-in-irkerhook.py.patch22
-rw-r--r--debian/patches/0007-irkerhook-git.patch28
-rw-r--r--debian/patches/0009-env-service.patch29
-rw-r--r--debian/patches/0015-Update-irkerhook-documentation-to-python-3.patch23
-rw-r--r--debian/patches/0016-Update-shebangs.patch33
-rw-r--r--debian/patches/series7
-rwxr-xr-xdebian/rules19
-rw-r--r--debian/source/format1
-rw-r--r--debian/tests/control3
-rw-r--r--debian/tests/test-simple118
-rw-r--r--debian/upstream/metadata5
-rw-r--r--debian/watch3
31 files changed, 1146 insertions, 0 deletions
diff --git a/debian/TODO b/debian/TODO
new file mode 100644
index 0000000..794d96f
--- /dev/null
+++ b/debian/TODO
@@ -0,0 +1,3 @@
+* extend initscript that:
+ - has an option to join channels (via empty messages) on start
+ - takes nick and nickpassword from /etc/default/irker
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..3982702
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,484 @@
+irker (2.23+dfsg-1) unstable; urgency=low
+
+ [ Debian Janitor ]
+ * Bump debhelper from old 12 to 13.
+ * Set upstream metadata fields: Bug-Database, Bug-Submit.
+
+ [ Neil Muller ]
+ * New upstream.
+ - Includes fixes for python 3.11 deprecations.
+ * Drop mercurial patches that were previously backported to 2.19.
+ * Update years in debian/copyright.
+ * Drop lsb-base dependency, as that is no longer needed.
+ * Update standards version to 4.6.2, no changes needed.
+ * Add simple irkerhook function tests to autopkgtests.
+ * Add patch to fix syntax error in shipped irkerhook.
+ * Add missing needs-root to debian/tests/control .
+
+ -- Neil Muller <drnlmuller+debian@gmail.com> Tue, 14 Feb 2023 16:37:08 +0200
+
+irker (2.19+dfsg-1) unstable; urgency=low
+
+ [ Neil Muller ]
+ * New upstream release.
+ * Tweak autopkgtest setup steps to be a bit more robust.
+ * Update watch file to current gitlab layout.
+ * Fix watchfile to correctly mangle the version to the correct dfsg format.
+ * Bump Standards-Version to 4.5.1.
+ * Add 'Pre-Depends: ${misc:Pre-Depends}' as the generated debhelper scripts
+ need that.
+ * Rebase patches against new upstream and drop merged patches.
+ * Import fixes from upstream so irkerhook works with mercurial and python 3
+ (Closes: 981922).
+
+ [ Ondřej Nový ]
+ * d/control: Update Maintainer field with new Debian Python Team
+ contact address.
+ * d/control: Update Vcs-* fields with new Debian Python Team Salsa
+ layout.
+
+ [ Debian Janitor ]
+ * Bump debhelper from old 11 to 12.
+ * Set upstream metadata fields: Bug-Database, Bug-Submit, Repository,
+ Repository-Browse.
+
+ -- Neil Muller <drnlmuller+debian@gmail.com> Tue, 16 Feb 2021 07:22:43 +0200
+
+irker (2.18+dfsg-4) unstable; urgency=low
+
+ [ Ondřej Nový ]
+ * Use debhelper-compat instead of debian/compat.
+
+ [ Neil Muller ]
+ * Rename 0011-Import-upstream-tweaks-to-irkerd.service.patch to
+ 0014-Import-upstream-tweaks-to-irkerd.service.patch to avoid duplicate
+ patch numbers.
+ * Switch to using python3 (Closes: 936746):
+ - Add 0015-Update-irkerhook-documentation-to-python-3.patch to use python3
+ in the manpage example.
+ - Add 0016-Update-shebangs.patch to use python3 shebangs in the commands.
+ * Add a simple autopkgtest for irkerd daemon.
+ * Drop custom compression setting to make lintian happy.
+ * Add a lintian override because lintian misses our init.d file.
+ * Update years in copyright file.
+ * Bump Standards-Version to 4.4.0 (no further changes needed).
+
+ [ Jonathan Carter ]
+ * Team upload
+ * Prepare upload to unstable
+ * Fix email address in debian/copyright: s/debain/debian/g
+
+ -- Jonathan Carter <jcc@debian.org> Wed, 18 Sep 2019 17:40:43 +0200
+
+irker (2.18+dfsg-3) unstable; urgency=low
+
+ * Migrate from SVN to git.
+ * Add patch to fix irkerd under python 3 from upstream issue tracker.
+ * Add patch to fix FTBFS due to Makefile copy and paste
+ error (Closes: 864612).
+ * Add patch so irkerhook.py runs under python 3 from upstream issue tracker.
+ * Add irkerd.service updates from upstream repository.
+ - Update Description.
+ - Add Documentation links to the service file.
+ * Fix some newer lintian warnings.
+ - Don't use chown -R on installation.
+ - Fix some spelling errors.
+ * Add "Rules-Requires-Root:" field to debian/control.
+ - Also bump Standards-Version to 4.1.5 (no further changes needed).
+ * Update years in copyright file.
+ * Change debhelper compatibility level to 11.
+ - Bump minimum debhelper version required.
+ - Remove obsolete dh-systemd dependency.
+ - Update debian/rules accordingly.
+
+ -- Neil Muller <drnlmuller+debian@gmail.com> Wed, 11 Jul 2018 14:43:05 +0200
+
+irker (2.18+dfsg-2) unstable; urgency=low
+
+ * Acknowledge Antoine Beaupré's NMU.
+ * Add missing dependency on lsb-base (lintian warning).
+ * Add IOError exception fix from upstream issue tracker.
+
+ -- Neil Muller <drnlmuller+debian@gmail.com> Tue, 01 Nov 2016 13:11:44 +0200
+
+irker (2.18+dfsg-1.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * new patches to the .service file:
+ * run daemon as the irker used (Closes: #832758)
+ * properly import environment from /etc/defaults (Closes: #832322)
+
+ -- Antoine Beaupré <anarcat@debian.org> Mon, 12 Sep 2016 11:59:26 -0400
+
+irker (2.18+dfsg-1) unstable; urgency=low
+
+ * Update to latest upstream release.
+ - Adds support for specifying a template for irc
+ messages (Closes: #824512).
+ * Extend 0007-irkerhook-git.patch to describe the limitations of
+ irkerhook-git in more detail.
+ * Make irkerhook-git complain if no project or template has been
+ configured.
+ * Drop obsolete dh_builddeb compression override.
+ * Bump Standards-Version to 3.9.8 (no changes needed).
+
+ -- Neil Muller <drnlmuller+debian@gmail.com> Fri, 17 Jun 2016 12:53:36 +0200
+
+irker (2.17+dfsg-1) unstable; urgency=low
+
+ * Update to latest upstream release.
+ - Adds a delay to reconnect attempts (Closes: #749650).
+ - License changed to BSD-2-clause license.
+ * Add manpage for the irkerhook-debian helper.
+ * Add 0007-irkerhook-git.patch to describer irkerhook-git in the
+ irkerhook manpage.
+ * Drop 0002-abbrev-commit.patch, 0003-abbrev-gitweb.patch and
+ 0004-webview.patch, as these fixes have been incorporated
+ upstream.
+ * Change VCS-Browser field to use https instead of http.
+ * Bump Standards-Version to 3.9.7 (no changes needed).
+
+ -- Neil Muller <drnlmuller+debian@gmail.com> Tue, 15 Mar 2016 14:55:22 +0200
+
+irker (2.13+dfsg-1) unstable; urgency=low
+
+ * Adopt irker under the Python Applications Packaging Team umbrella
+ (Closes: #756090).
+ * Update to upstream version 2.13 (Closes: #793031).
+ * Update years in copyright file.
+ * Add a watch file.
+ * Various lintian cleanups.
+ - Add missing stop levels to irker.init.
+ - Fix adduser call in postinst.
+ - Use BSD-3-clause as the copyright short name.
+ * Don't remove the irker user on package removal, since it may still own
+ files.
+ * Add an Alias entry to the systemd unit so it recognises the SysV init
+ script.
+ * Add dh_python to Build-Depends.
+ * Bump Standards-Version to 3.9.6 (no changes needed).
+
+ -- Neil Muller <drnlmuller+debian@gmail.com> Tue, 19 Jan 2016 22:46:39 +0200
+
+irker (2.12+dfsg-1) unstable; urgency=medium
+
+ * QA upload.
+ * Update to upstream version 2.12 (Closes: #775027)
+
+ -- Jonathan Wiltshire <jmw@debian.org> Sat, 17 Jan 2015 14:25:09 +0000
+
+irker (2.11+dfsg-2) unstable; urgency=low
+
+ * I don't care anymore, not worth it.. orphaning.
+
+ -- Daniel Baumann <mail@daniel-baumann.ch> Fri, 25 Jul 2014 20:46:42 +0200
+
+irker (2.11+dfsg-1) unstable; urgency=low
+
+ * Merging upstream version 2.11+dfsg:
+ - irk works with ircs URLs (Closes: #749818).
+
+ -- Daniel Baumann <mail@daniel-baumann.ch> Tue, 24 Jun 2014 16:30:06 +0200
+
+irker (2.9+dfsg-1) unstable; urgency=low
+
+ * Merging upstream version 2.9+dfsg.
+ * Refreshing webview.patch.
+
+ -- Daniel Baumann <mail@daniel-baumann.ch> Tue, 10 Jun 2014 19:56:49 +0200
+
+irker (2.8+dfsg-1) unstable; urgency=low
+
+ * Merging upstream version 2.8+dfsg.
+ * Dripping irk-manpage.patch, included upstream.
+ * Adding patch to use author_name instead of author in Git
+ notifications.
+
+ -- Daniel Baumann <mail@daniel-baumann.ch> Sat, 31 May 2014 11:54:17 +0200
+
+irker (2.7+dfsg-2) unstable; urgency=low
+
+ * Adding manpage for irk from Antoine Beaupre <anarcat@debian.org>
+ (Closes: 746535).
+
+ -- Daniel Baumann <mail@daniel-baumann.ch> Sat, 03 May 2014 12:28:08 +0200
+
+irker (2.7+dfsg-1) unstable; urgency=low
+
+ * Dropping debconf handling (Closes: #743472).
+ * Merging upstream version 2.7+dfsg.
+
+ -- Daniel Baumann <mail@daniel-baumann.ch> Sat, 05 Apr 2014 11:21:21 +0200
+
+irker (2.6+dfsg-2) unstable; urgency=low
+
+ * Building with dh --parallel.
+
+ -- Daniel Baumann <mail@daniel-baumann.ch> Mon, 31 Mar 2014 21:00:17 +0200
+
+irker (2.6+dfsg-1) experimental; urgency=low
+
+ * Merging upstream version 2.6+dfgs.
+ * Updating year in copyright file.
+ * Dropping daemon user debconf support, there's no practical need to run
+ irker under a different unprivileged user anyway.
+
+ -- Daniel Baumann <mail@daniel-baumann.ch> Wed, 05 Feb 2014 20:41:13 +0100
+
+irker (2.5+dfsg-5) experimental; urgency=low
+
+ * Adding support for multiple channels in irkerhook-debian.
+
+ -- Daniel Baumann <mail@daniel-baumann.ch> Sun, 19 Jan 2014 08:38:40 +0100
+
+irker (2.5+dfsg-4) experimental; urgency=low
+
+ * Running git hook with set -e.
+ * Adding generic irkerhook for random debian purposes (such as lxc).
+
+ -- Daniel Baumann <mail@daniel-baumann.ch> Fri, 17 Jan 2014 16:17:28 +0100
+
+irker (2.5+dfsg-3) experimental; urgency=low
+
+ * Disabling url check in irkerhook.
+
+ -- Daniel Baumann <mail@daniel-baumann.ch> Thu, 16 Jan 2014 14:43:37 +0100
+
+irker (2.5+dfsg-2) experimental; urgency=low
+
+ * Updating local git hook for newer irker and git versions.
+
+ -- Daniel Baumann <mail@daniel-baumann.ch> Mon, 13 Jan 2014 13:31:56 +0100
+
+irker (2.5+dfsg-1) experimental; urgency=low
+
+ * Merging upstream version 2.5+dfsg.
+
+ -- Daniel Baumann <mail@daniel-baumann.ch> Fri, 27 Dec 2013 15:51:30 +0100
+
+irker (2.4+dfsg-1) experimental; urgency=low
+
+ * Merging upstream version 2.4+dfsg.
+
+ -- Daniel Baumann <mail@daniel-baumann.ch> Thu, 05 Dec 2013 19:22:40 +0100
+
+irker (2.3+dfsg-1) experimental; urgency=low
+
+ * Merging upstream version 2.3+dfsg.
+
+ -- Daniel Baumann <mail@daniel-baumann.ch> Sun, 01 Dec 2013 09:20:51 +0100
+
+irker (2.2+dfsg-1) experimental; urgency=low
+
+ * Merging upstream version 2.2+dfsg.
+
+ -- Daniel Baumann <mail@daniel-baumann.ch> Sun, 01 Dec 2013 09:19:21 +0100
+
+irker (2.1+dfsg-1) experimental; urgency=low
+
+ * Merging upstream version 2.1+dfsg.
+ * Adding patch to avoid rcopying removed logo file.
+ * Renumbering patches.
+
+ -- Daniel Baumann <mail@daniel-baumann.ch> Wed, 27 Nov 2013 07:04:08 +0100
+
+irker (2.0+dfsg-1) experimental; urgency=low
+
+ * Rewrapping init script.
+ * Updating to standards version 3.9.5.
+ * Merging upstream version 2.0+dfsg.
+ * Dropping python-irc from depends, not required anymore.
+
+ -- Daniel Baumann <mail@daniel-baumann.ch> Sat, 16 Nov 2013 14:29:36 +0100
+
+irker (1.20+dfsg-5) experimental; urgency=low
+
+ * Adding explicit depends to adduser (Closes: #722466).
+
+ -- Daniel Baumann <mail@daniel-baumann.ch> Wed, 11 Sep 2013 15:45:58 +0200
+
+irker (1.20+dfsg-4) experimental; urgency=low
+
+ * Updating vcs fields.
+ * Adding initscript.
+ * Updating todo file.
+
+ -- Daniel Baumann <mail@daniel-baumann.ch> Mon, 09 Sep 2013 11:30:26 +0200
+
+irker (1.20+dfsg-3) experimental; urgency=low
+
+ * Adding vcs fields.
+ * Wrapping control fields.
+ * Adding manpage symlinks.
+
+ -- Daniel Baumann <mail@daniel-baumann.ch> Wed, 17 Jul 2013 13:17:05 +0200
+
+irker (1.20+dfsg-2) experimental; urgency=low
+
+ [ Michael Stapelberg ]
+ * Using dh-systemd for proper systemd-related maintscripts (Closes: #715252).
+
+ -- Daniel Baumann <mail@daniel-baumann.ch> Fri, 12 Jul 2013 15:30:26 +0200
+
+irker (1.20+dfsg-1) experimental; urgency=low
+
+ * Merging upstream version 1.20+dfsg.
+ * Rediffing abbrev-commit.patch.
+ * Rediffing abbrev-gitweb.patch.
+
+ -- Daniel Baumann <mail@daniel-baumann.ch> Tue, 28 May 2013 15:07:01 +0200
+
+irker (1.19+dfsg-1) experimental; urgency=low
+
+ * Merging upstream version 1.19+dfsg.
+ * Sorting targets in rules.
+
+ -- Daniel Baumann <mail@daniel-baumann.ch> Thu, 16 May 2013 10:46:00 +0200
+
+irker (1.18+dfsg-1) experimental; urgency=low
+
+ * Merging upstream version 1.18+dfsg.
+
+ -- Daniel Baumann <mail@daniel-baumann.ch> Thu, 18 Apr 2013 06:16:13 +0200
+
+irker (1.17+dfsg-3) unstable; urgency=low
+
+ * Removing all references to my old email address.
+
+ -- Daniel Baumann <mail@daniel-baumann.ch> Sun, 10 Mar 2013 20:52:36 +0100
+
+irker (1.17+dfsg-2) unstable; urgency=low
+
+ * Make irkerhook-git more usable by checking for irker.project value in
+ repository config.
+ * Renumbering patches with four leading digits.
+ * Trimming diff headers in patches.
+
+ -- Daniel Baumann <mail@daniel-baumann.ch> Sun, 10 Mar 2013 20:51:10 +0100
+
+irker (1.17+dfsg-1) unstable; urgency=low
+
+ * Merging upstream version 1.17+dfsg.
+
+ -- Daniel Baumann <mail@daniel-baumann.ch> Thu, 07 Feb 2013 12:26:45 +0100
+
+irker (1.16+dfsg-1) unstable; urgency=low
+
+ * Merging upstream version 1.16+dfsg.
+ * Updating year in copyright file.
+
+ -- Daniel Baumann <mail@daniel-baumann.ch> Sat, 26 Jan 2013 20:54:31 +0100
+
+irker (1.15+dfsg-2) unstable; urgency=low
+
+ * Updating year in copyright file.
+ * Adding dpkg-source local-options.
+ * Dropping dpkg-source compression levels.
+
+ -- Daniel Baumann <mail@daniel-baumann.ch> Thu, 24 Jan 2013 16:10:06 +0100
+
+irker (1.15+dfsg-1) unstable; urgency=low
+
+ * Merging upstream version 1.15+dfsg.
+
+ -- Daniel Baumann <mail@daniel-baumann.ch> Mon, 10 Dec 2012 11:54:36 +0100
+
+irker (1.14+dfsg-1) unstable; urgency=low
+
+ * Merging upstream version 1.14+dfsg.
+
+ -- Daniel Baumann <mail@daniel-baumann.ch> Wed, 28 Nov 2012 14:08:48 +0100
+
+irker (1.13+dfsg-2) unstable; urgency=low
+
+ * Dropping alternate depends on python-irclib.
+
+ -- Daniel Baumann <mail@daniel-baumann.ch> Sun, 11 Nov 2012 19:54:16 +0100
+
+irker (1.13+dfsg-1) experimental; urgency=low
+
+ * Merging upstream version 1.13+dfsg.
+
+ -- Daniel Baumann <mail@daniel-baumann.ch> Thu, 08 Nov 2012 11:51:26 +0100
+
+irker (1.12+dfsg-1) experimental; urgency=low
+
+ * Merging upstream version 1.12+dfsg.
+ * Bumping versioned build-depends on python-irclib.
+
+ -- Daniel Baumann <mail@daniel-baumann.ch> Fri, 12 Oct 2012 07:00:04 +0200
+
+irker (1.11+dfsg-1) experimental; urgency=low
+
+ * Merging upstream version 1.11+dfsg.
+
+ -- Daniel Baumann <mail@daniel-baumann.ch> Thu, 11 Oct 2012 07:22:58 +0200
+
+irker (1.10+dfsg-1) experimental; urgency=low
+
+ * Merging upstream version 1.10+dfsg.
+ * Removing python-eventlet recommends, upstream dropped support for
+ it.
+ * Updating python irc depends.
+
+ -- Daniel Baumann <mail@daniel-baumann.ch> Wed, 10 Oct 2012 09:51:02 +0200
+
+irker (1.9+dfsg-1) experimental; urgency=low
+
+ * Merging upstream version 1.9+dfsg.
+ * Adding systemd and pkg-config to build-depends to automatically
+ guess systemd unit directory.
+ * Adding todo file.
+
+ -- Daniel Baumann <mail@daniel-baumann.ch> Tue, 09 Oct 2012 07:44:39 +0200
+
+irker (1.8+dfsg-1) experimental; urgency=low
+
+ * Merging upstream version 1.8+dfsg.
+ * Removing tinyifier-config.patch, included upstream.
+ * Removing irk-netcat.patch, not applicable anymore.
+
+ -- Daniel Baumann <mail@daniel-baumann.ch> Sun, 07 Oct 2012 09:58:51 +0200
+
+irker (1.7+dfsg-3) experimental; urgency=low
+
+ * Adding patch for irk test tool to let netcat terminate in order to
+ send the request.
+
+ -- Daniel Baumann <mail@daniel-baumann.ch> Sat, 06 Oct 2012 15:21:02 +0200
+
+irker (1.7+dfsg-2) experimental; urgency=low
+
+ * Adding patch to show commit IDs shortened by default to 7 characters
+ (in line with default git --abbrev-commit) rather than the unusual
+ 12.
+ * Adding patch to show commit IDs shortened by default to 7 characters
+ (in line with default git --abbrev-commit) rather than the unusual
+ 12 also in gitweb.
+ * Adding patch from upstream to get tinyfier from the config.
+
+ -- Daniel Baumann <mail@daniel-baumann.ch> Sat, 06 Oct 2012 14:08:38 +0200
+
+irker (1.7+dfsg-1) experimental; urgency=low
+
+ * Merging upstream version 1.7+dfsg.
+ * Adding irkerhook-git to be symlinked in git repositories.
+ * Adding debhelper install file to install irk.
+ * Adding debhelper examples file to install filter examples.
+
+ -- Daniel Baumann <mail@daniel-baumann.ch> Fri, 05 Oct 2012 20:39:46 +0200
+
+irker (1.6+dfsg-1) experimental; urgency=low
+
+ * Merging upstream version 1.6+dfsg.
+ * Removing vanished bugs file from debhelper docs.
+ * Making comment about removing irker-logo.png in source more precise.
+
+ -- Daniel Baumann <mail@daniel-baumann.ch> Thu, 04 Oct 2012 20:59:35 +0200
+
+irker (1.5+dfsg-1) experimental; urgency=low
+
+ * Initial release (Closes: #689011).
+ * Rebuild upstream tarball without sourceless irker logo.
+
+ -- Daniel Baumann <mail@daniel-baumann.ch> Wed, 03 Oct 2012 12:35:32 +0200
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..decd575
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,29 @@
+Source: irker
+Section: utils
+Priority: optional
+Maintainer: Debian Python Team <team+python@tracker.debian.org>
+Uploaders: Neil Muller <drnlmuller+debian@gmail.com>
+Build-Depends:
+ debhelper-compat (= 13),
+ pkg-config,
+ python3,
+ systemd,
+ xmlto,
+ dh-python
+Standards-Version: 4.6.2
+Rules-Requires-Root: binary-targets
+Homepage: http://www.catb.org/esr/irker/
+Vcs-Browser: https://salsa.debian.org/python-team/packages/irker
+Vcs-Git: https://salsa.debian.org/python-team/packages/irker.git
+
+Package: irker
+Architecture: all
+Depends:
+ ${misc:Depends},
+ ${python3:Depends},
+ adduser,
+Pre-Depends: ${misc:Pre-Depends}
+Description: submission tools for IRC notifications
+ irkerd is a specialized IRC client that runs as a daemon, allowing other
+ programs to ship IRC notifications by sending JSON objects to a listening
+ socket.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..63ddf92
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,44 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: irker
+Upstream-Contact: Eric S. Raymond <esr@thyrsus.com>
+Files-Excluded: irker-logo.png
+Source: http://www.catb.org/esr/irker/
+ The irker-log.png file is removed because it has no known origin and
+ no source is available for it.
+
+Files: *
+Copyright: 2012-2023 Eric S. Raymond <esr@thyrsus.com>
+License: BSD-2-clause
+
+Files: debian/*
+Copyright: 2012-2014 Daniel Baumann <mail@daniel-baumann.ch>
+ 2016-2023 Neil Muller <drnlmuller+debian@gmail.com>
+License: BSD-2-clause
+Comment:
+ Daniel Baumann relicensed his contribution from BSD-3-clause
+ to BSD-2-clause on 15th January, 2016 to match upstream's
+ license change.
+
+License: BSD-2-clause
+ 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.
+ .
+ Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ .
+ 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 REGENTS 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.
diff --git a/debian/gbp.conf b/debian/gbp.conf
new file mode 100644
index 0000000..3879982
--- /dev/null
+++ b/debian/gbp.conf
@@ -0,0 +1,2 @@
+[DEFAULT]
+debian-branch=debian/master
diff --git a/debian/irker.docs b/debian/irker.docs
new file mode 100644
index 0000000..3b2cfe7
--- /dev/null
+++ b/debian/irker.docs
@@ -0,0 +1,2 @@
+README
+*.txt
diff --git a/debian/irker.examples b/debian/irker.examples
new file mode 100644
index 0000000..369085b
--- /dev/null
+++ b/debian/irker.examples
@@ -0,0 +1 @@
+filter*.py
diff --git a/debian/irker.init b/debian/irker.init
new file mode 100644
index 0000000..27ff9cc
--- /dev/null
+++ b/debian/irker.init
@@ -0,0 +1,84 @@
+#!/bin/sh
+
+### BEGIN INIT INFO
+# Provides: irker
+# Required-Start: $local_fs $remote_fs $syslog $network
+# Required-Stop: $local_fs $remote_fs $syslog $network
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: submission tools for IRC notifications
+# Description: irkerd is a specialized IRC client that runs as a
+# daemon, allowing other programs to ship IRC
+# notifications by sending JSON objects to a listening
+# socket.
+### END INIT INFO
+
+PATH="/sbin:/bin:/usr/sbin:/usr/bin"
+DAEMON="/usr/bin/irkerd"
+
+test -x "${DAEMON}" || exit 0
+
+NAME="irkerd"
+DESC="IRC notifications"
+PIDFILE="/var/run/irker.pid"
+DEFAULTS="/etc/default/irker"
+
+for _FILE in "${DEFAULTS}" "${DEFAULTS}".d/*
+do
+ if [ -e "${_FILE}" ]
+ then
+ . "${_FILE}"
+ fi
+done
+
+set -e
+
+. /lib/lsb/init-functions
+
+do_start()
+{
+ start-stop-daemon --start --background --quiet --oknodo --exec ${DAEMON} --chuid irker -- -l /var/log/irker/irker.log ${IRKER_OPTIONS}
+}
+
+do_stop ()
+{
+ start-stop-daemon --stop --quiet --oknodo --name ${NAME}
+}
+
+do_reload ()
+{
+ start-stop-daemon --stop --quiet --oknodo --name ${NAME} --signal 1
+}
+
+case "${1}" in
+ start)
+ log_daemon_msg "Starting ${DESC}" "${NAME}"
+ do_start
+ log_end_msg ${?}
+ ;;
+
+ stop)
+ log_daemon_msg "Stopping ${DESC}" "${NAME}"
+ do_stop
+ log_end_msg ${?}
+ ;;
+
+ restart|force-reload)
+ log_daemon_msg "Restarting ${DESC}" "${NAME}"
+ do_stop
+ sleep 1
+ do_start
+ log_end_msg ${?}
+ ;;
+
+ status)
+ status_of_proc ${DAEMON} ${NAME}
+ ;;
+
+ *)
+ echo "Usage: ${0} {start|stop|restart|force-reload|status}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/debian/irker.install b/debian/irker.install
new file mode 100644
index 0000000..d3649a4
--- /dev/null
+++ b/debian/irker.install
@@ -0,0 +1,3 @@
+irk /usr/bin
+
+debian/local/* /usr/bin
diff --git a/debian/irker.links b/debian/irker.links
new file mode 100644
index 0000000..bf03253
--- /dev/null
+++ b/debian/irker.links
@@ -0,0 +1,2 @@
+/usr/share/man/man8/irkerd.8.gz /usr/share/man/man8/irk.8.gz
+/usr/share/man/man1/irkerhook.1.gz /usr/share/man/man1/irkerhook-git.1.gz
diff --git a/debian/irker.lintian-overrides b/debian/irker.lintian-overrides
new file mode 100644
index 0000000..f79ebce
--- /dev/null
+++ b/debian/irker.lintian-overrides
@@ -0,0 +1,3 @@
+# We use the upstream name for the systemd unit, which is different from the init script
+# we provide, which uses the old name, which means lintian doesn't detect the init.d script
+irker binary: package-supports-alternative-init-but-no-init.d-script
diff --git a/debian/irker.postinst b/debian/irker.postinst
new file mode 100644
index 0000000..ce4f7a5
--- /dev/null
+++ b/debian/irker.postinst
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+set -e
+
+case "${1}" in
+ configure)
+ if ! getent passwd irker > /dev/null 2>&1
+ then
+ adduser --system --no-create-home --home /nonexistent --quiet --gecos 'irker daemon' --group irker
+ else
+ echo "irker user already exists, doing nothing."
+ fi
+
+ mkdir -p /var/log/irker
+ chown irker:irker /var/log/irker
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`${1}'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/irker.postrm b/debian/irker.postrm
new file mode 100644
index 0000000..4dcfac0
--- /dev/null
+++ b/debian/irker.postrm
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+set -e
+
+case "${1}" in
+ remove)
+ rmdir /var/log/irker > /dev/null 2>&1 || true
+ ;;
+
+ purge)
+ rm -f /etc/default/irker
+ ;;
+
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+
+ ;;
+
+ *)
+ echo "postrm called with unknown argument \`${1}'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/irkerhook-debian.1 b/debian/irkerhook-debian.1
new file mode 100644
index 0000000..80b902a
--- /dev/null
+++ b/debian/irkerhook-debian.1
@@ -0,0 +1,54 @@
+'\" t
+.\" Title: irkerhook-debian
+.\" Language: English
+.\"
+.TH "IRKERHOOK\-DEBIAN" "1" "14/03/2016"
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+irkerhook-debian \- A simple wrapper for generating irker notifications
+.SH "SYNOPSIS"
+.sp
+\fBirkerhook\-debian\fR \fImessage\fR
+.SH "DESCRIPTION"
+.sp
+Irkerhook\-debian is a simple wrapper around irk for providing notifications
+from service startup or monitoring scripts\&.
+.PP
+A symlink to the irkerhook\-debian script should be added to the service\&.
+.PP
+The behaviour of the script can be configured for each service via a /etc/default/<symlink name> file\&.
+.PP
+The script recognises 2 configuration options:
+.PP
+\fBIRC_CHANNELS\fR
+.RS 4
+A list of channels to post the notification to.
+.PP
+.RE
+\fBIRK_ENABLED\fR
+.RS 4
+Set IRK_ENABLED to "true" to enable notifications. For other values,
+notifications will be disabled.
+.RE
+.SH "SEE ALSO"
+.sp
+\&\fIirk\fR\|(1), \fIirkerhook\fR\|(1)
+.SH "AUTHORS"
+.sp
+.nf
+This manual page was written by Neil Muller <drnlmuller+debian@gmail\&.com>\&.
+.SH "LICENSE"
+.sp
+.nf
+This package is licensed under the BSD 2 clause license.
+You can find the full text of the license in
+/usr/share/doc/irker/copyright\&.
diff --git a/debian/local/irkerhook-debian b/debian/local/irkerhook-debian
new file mode 100755
index 0000000..1f05304
--- /dev/null
+++ b/debian/local/irkerhook-debian
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+set -e
+
+_MESSAGE="${@}"
+
+_PROGRAM="$(basename ${0})"
+
+for _FILE in "/etc/default/${_PROGRAM}" "/etc/default/${_PROGRAM}.d"/*
+do
+ if [ -e "${_FILE}" ]
+ then
+ . "${_FILE}" || true
+ fi
+done
+
+if [ "${IRK_ENABLED}" != "true" ]
+then
+ exit 0
+fi
+
+echo "sending IRC notification"
+
+for IRC_CHANNEL in ${IRC_CHANNELS}
+do
+ irk ${IRC_CHANNEL} "${_MESSAGE}"
+done
diff --git a/debian/local/irkerhook-git b/debian/local/irkerhook-git
new file mode 100755
index 0000000..1f746e8
--- /dev/null
+++ b/debian/local/irkerhook-git
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+set -e
+
+if [ -z "$(git config --get irker.project)" -a -z "$(git config --get irker.template)" ]
+then
+ echo "CONFIGURATION ERROR: Neither irker.project nor irker.template defined"
+ echo "NOT sending IRC notification"
+ exit 0
+fi
+
+echo "sending IRC notification"
+
+while read old new refname
+do
+ irkerhook --refname=${refname} $(git rev-list --reverse ${old}..${new})
+done
diff --git a/debian/manpages b/debian/manpages
new file mode 100644
index 0000000..eb19f7c
--- /dev/null
+++ b/debian/manpages
@@ -0,0 +1 @@
+debian/irkerhook-debian.1
diff --git a/debian/patches/0001-dfsg.patch b/debian/patches/0001-dfsg.patch
new file mode 100644
index 0000000..4b6ae0e
--- /dev/null
+++ b/debian/patches/0001-dfsg.patch
@@ -0,0 +1,22 @@
+From: Daniel Baumann <mail@daniel-baumann.ch>
+Date: Sun, 13 May 2018 15:07:57 +0200
+Subject: Removing logo (no origin known and no source available)
+
+---
+ Makefile | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index ccb366c..92289d4 100644
+--- a/Makefile
++++ b/Makefile
+@@ -87,8 +87,7 @@ SOURCES = \
+
+ EXTRA_DIST = \
+ org.catb.irkerd.plist \
+- irkerd.service \
+- irker-logo.png
++ irkerd.service
+
+ version:
+ @echo $(VERS)
diff --git a/debian/patches/0005-author-name.patch b/debian/patches/0005-author-name.patch
new file mode 100644
index 0000000..94534a2
--- /dev/null
+++ b/debian/patches/0005-author-name.patch
@@ -0,0 +1,21 @@
+From: Daniel Baumann <mail@daniel-baumann.ch>
+Date: Sun, 13 May 2018 15:07:57 +0200
+Subject: Use author_name instead of author in Git notifications.
+
+---
+ irkerhook.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/irkerhook.py b/irkerhook.py
+index cf787ed..1d3226c 100755
+--- a/irkerhook.py
++++ b/irkerhook.py
+@@ -341,7 +341,7 @@ class GitExtractor(GenericExtractor):
+ # Might be be nice to ship the full email address, if not
+ # for spammers' address harvesters - getting this wrong
+ # would make the freenode #commits channel into harvester heaven.
+- commit.author = commit.mail.split("@")[0]
++ commit.author = commit.author_name
+ commit.author_date, commit.commit_date = \
+ do("git log -1 '--pretty=format:%ai|%ci' " + shellquote(commit.commit)).split("|")
+ return commit
diff --git a/debian/patches/0007-Fix-syntax-error-in-irkerhook.py.patch b/debian/patches/0007-Fix-syntax-error-in-irkerhook.py.patch
new file mode 100644
index 0000000..2bf9c27
--- /dev/null
+++ b/debian/patches/0007-Fix-syntax-error-in-irkerhook.py.patch
@@ -0,0 +1,22 @@
+From: Neil Muller <drnlmuller+debian@gmail.com>
+Date: Sun, 5 Feb 2023 11:31:39 +0200
+Subject: Fix syntax error in irkerhook.py
+
+Bug-Upstream: https://gitlab.com/esr/irker/-/merge_requests/32
+---
+ irkerhook.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/irkerhook.py b/irkerhook.py
+index 1d3226c..208b756 100755
+--- a/irkerhook.py
++++ b/irkerhook.py
+@@ -49,7 +49,7 @@ version = "2.21"
+ # pylint: disable=multiple-imports,wrong-import-position
+ import os, sys, socket, subprocess, locale, datetime, re
+
+-try
++try:
+ from shlex import quote as shellquote
+ except ImportError:
+ from pipes import quote as shellquote
diff --git a/debian/patches/0007-irkerhook-git.patch b/debian/patches/0007-irkerhook-git.patch
new file mode 100644
index 0000000..b92bd3c
--- /dev/null
+++ b/debian/patches/0007-irkerhook-git.patch
@@ -0,0 +1,28 @@
+From: Neil Muller <drnlmuller+debian@gmail.com>
+Date: Sun, 13 May 2018 15:07:57 +0200
+Subject: Add description for the irkerhook-git helper script.
+
+The debian packages add a irkerhook-git helper script, which simplifies
+the most common use case for irkerhook with git. This patch mentions the
+helper script in the irkerhook manpage.
+Last-Update: 2016-03-15
+---
+ irkerhook.xml | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/irkerhook.xml b/irkerhook.xml
+index 54b7425..9bddd08 100644
+--- a/irkerhook.xml
++++ b/irkerhook.xml
+@@ -220,6 +220,11 @@ while read old new refname; do
+ done
+ </programlisting>
+
++<para>For convenience, this is implemented by the irkerhook-git
++helper script. This script will complain about some common configuration
++isssues. For simplicity, irkerhook-git does not support all the
++options of irkerhook.py, and is thus not suitable for all applications.</para>
++
+ <para>Preferences may be set in the repo <filename>config</filename>
+ file in an [irker] section. Here is an example of what that can look
+ like:</para>
diff --git a/debian/patches/0009-env-service.patch b/debian/patches/0009-env-service.patch
new file mode 100644
index 0000000..08abe7f
--- /dev/null
+++ b/debian/patches/0009-env-service.patch
@@ -0,0 +1,29 @@
+From: Python Applications Packaging Team
+ <python-apps-team@lists.alioth.debian.org>
+Date: Sun, 13 May 2018 15:07:57 +0200
+Subject: env-service
+
+ Properly import environment from /etc/defaults (Closes: #832322)
+
+ This fixes a regression in the systemd unit, which doesn't support
+ the equivalent /etc/default/irker configuration supported by the
+ sysvinit startup scripts.
+---
+ irkerd.service | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/irkerd.service b/irkerd.service
+index 4e75ae2..70b67d5 100644
+--- a/irkerd.service
++++ b/irkerd.service
+@@ -8,8 +8,8 @@ Documentation=man:irkerd(8) man:irkerhook(1) man:irk(1)
+
+ [Service]
+ User=irker
+-ExecStart=/usr/bin/irkerd
+-User=irker
++EnvironmentFile=-/etc/default/irker
++ExecStart=/usr/bin/irkerd $IRKER_OPTIONS
+
+ [Install]
+ WantedBy=multi-user.target
diff --git a/debian/patches/0015-Update-irkerhook-documentation-to-python-3.patch b/debian/patches/0015-Update-irkerhook-documentation-to-python-3.patch
new file mode 100644
index 0000000..ef217c6
--- /dev/null
+++ b/debian/patches/0015-Update-irkerhook-documentation-to-python-3.patch
@@ -0,0 +1,23 @@
+From: Neil Muller <drnlmuller+debian@gmail.com>
+Date: Thu, 5 Sep 2019 18:08:11 +0200
+Subject: Update irkerhook documentation to python 3
+
+Change the example program to use python3 in the irkerhook
+documentation.
+---
+ irkerhook.xml | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/irkerhook.xml b/irkerhook.xml
+index 9bddd08..77b5d9f 100644
+--- a/irkerhook.xml
++++ b/irkerhook.xml
+@@ -374,7 +374,7 @@ metadata = json.loads(sys.argv[1])
+
+ metadata['author'] = "The Great and Powerful Oz"
+
+-print json.dumps(metadata)
++print(json.dumps(metadata))
+ # end
+ </programlisting>
+
diff --git a/debian/patches/0016-Update-shebangs.patch b/debian/patches/0016-Update-shebangs.patch
new file mode 100644
index 0000000..52be91e
--- /dev/null
+++ b/debian/patches/0016-Update-shebangs.patch
@@ -0,0 +1,33 @@
+From: Neil Muller <drnlmuller+debian@gmail.com>
+Date: Thu, 5 Sep 2019 18:08:51 +0200
+Subject: Update shebangs
+
+Change the shebangs to use python3 so we get the correct result
+when we build the package.
+---
+ filter-example.py | 2 +-
+ filter-test.py | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/filter-example.py b/filter-example.py
+index 922f941..094d0b7 100755
+--- a/filter-example.py
++++ b/filter-example.py
+@@ -9,5 +9,5 @@ metadata = json.loads(sys.argv[1])
+
+ metadata['author'] = "The Great and Powerful Oz"
+
+-print json.dumps(metadata)
++print(json.dumps(metadata))
+ # end
+diff --git a/filter-test.py b/filter-test.py
+index 9c42b71..82c0660 100755
+--- a/filter-test.py
++++ b/filter-test.py
+@@ -31,5 +31,5 @@ else:
+
+ time.sleep(1.5) # Avoid a race condition
+
+-print json.dumps(metadata)
++print(json.dumps(metadata))
+ # end
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..f271c35
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,7 @@
+0001-dfsg.patch
+0005-author-name.patch
+0007-irkerhook-git.patch
+0009-env-service.patch
+0015-Update-irkerhook-documentation-to-python-3.patch
+0016-Update-shebangs.patch
+0007-Fix-syntax-error-in-irkerhook.py.patch
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..4533d35
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,19 @@
+#!/usr/bin/make -f
+
+dfsg:
+ # no origin known and no source available
+ rm -f irker-logo.png
+
+%:
+ dh ${@} --with python3
+
+override_dh_auto_build:
+ DESTDIR="$(CURDIR)/debian/irker" dh_auto_build
+
+override_dh_auto_install:
+ DESTDIR="$(CURDIR)/debian/irker" dh_auto_install
+
+ cp irkerhook.py debian/irker/usr/bin/irkerhook
+
+override_dh_installchangelogs:
+ dh_installchangelogs NEWS
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..a498692
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+Tests: test-simple
+Depends: irker, python3-irc, git
+Restrictions: isolation-container, needs-root
diff --git a/debian/tests/test-simple b/debian/tests/test-simple
new file mode 100644
index 0000000..1eeb8dd
--- /dev/null
+++ b/debian/tests/test-simple
@@ -0,0 +1,118 @@
+#!/bin/sh
+
+# Simple test that we can connect to a test server, and send a message with irk
+# We use irclib to provide the test server and watch a test client to ensure that
+# the correct message is broadcast to the correct channels
+
+set -e
+
+WORKDIR=$(mktemp -d)
+trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
+cd $WORKDIR
+
+# setup test client
+cat << EOF > testclient.py
+# Simple test case for irker
+# Based on irccat.py in the irclib package by Joel Rosdahl <joel@rosdahl.net>
+
+import sys
+
+import irc.client
+
+logfile = None
+
+def on_connect(connection, event):
+ connection.join("#testchan")
+
+def on_pubmsg(connection, event):
+ logfile.write(event.arguments[0])
+ logfile.write("\n")
+ logfile.write(event.source)
+ logfile.write("\n")
+ logfile.flush()
+
+def on_disconnect(connection, event):
+ raise SystemExit()
+
+def main():
+ global logfile
+ client = irc.client.IRC()
+ try:
+ c = client.server().connect("localhost", 6667, "testclient")
+ except irc.client.ServerConnectionError:
+ print(sys.exc_info()[1])
+ raise SystemExit(1)
+
+ logfile = open(sys.argv[1], 'w')
+
+ c.add_global_handler("welcome", on_connect)
+ c.add_global_handler("pubmsg", on_pubmsg)
+
+ client.process_forever()
+
+if __name__ == '__main__':
+ main()
+EOF
+
+# This is needed to make irkerd start on some lxc containers, otherwise
+# the irker user can't execute anything, but it will fail in other
+# cases, so we make it non-fatal
+chmod 755 / || echo "chmod failed - assuming everything is fine"
+
+# Ensure irkerd is running
+systemctl restart irkerd
+
+python3 -m irc.server 2>server.log &
+sleep 3
+python3 ./testclient.py client.log &
+# Give time for everything to start up and connect
+sleep 3
+
+# Send a message that the client should see
+irk 'irc://localhost:6667/testchan' 'Test message 1'
+sleep 1
+# This should not show up in the client log
+irk 'irc://localhost:6667/differentchan' 'Test message 2'
+sleep 1
+# this should also be seen
+irk 'irc://localhost:6667/testchan' 'Test message 3'
+sleep 1
+
+# Inspect client log
+# check that we saw irker connect
+grep -q 'irker[0-9]' client.log
+
+grep -q 'Test message 1' client.log
+grep -q 'Test message 3' client.log
+
+if grep -q 'Test message 2' client.log; then
+ echo "Found unexpected 'Test message 2' in client.log"
+ exit 1
+fi
+
+# Manually run irkerhook.py, to ensure that works
+# We create a git repo for this, since irkerhook needs a repo to function
+mkdir test_repo
+cd test_repo
+# Redirect git warnings so they're not fatal
+git init 2> git.log
+git config user.email 'test@localhost'
+git config user.name 'Test Author'
+git config irker.channels 'irc://localhost:6667/testchan'
+touch start
+git add start
+git commit -m "Test commit" ./start
+# Check that irkerhook outputs sane info
+irkerhook -n | grep -q '"privmsg": "test_repo: Test Author test_repo:.* : Test commit "'
+# Check that irkerhook sends to the right place
+irkerhook
+# We need a moment for the irc server to process everything
+sleep 1
+cd ..
+grep -q 'test_repo: Test Author test_repo:.* : Test commit' client.log
+
+# kill background tasks
+pkill -f testclient.py
+pkill -f irc.server
+
+echo "Simple irker daemon tests succeeded"
diff --git a/debian/upstream/metadata b/debian/upstream/metadata
new file mode 100644
index 0000000..a1ccf04
--- /dev/null
+++ b/debian/upstream/metadata
@@ -0,0 +1,5 @@
+---
+Bug-Database: https://gitlab.com/esr/irker/-/issues
+Bug-Submit: https://gitlab.com/esr/irker/-/issues/new
+Repository: https://gitlab.com/esr/irker.git
+Repository-Browse: https://gitlab.com/esr/irker
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..79fdbc3
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,3 @@
+version=4
+opts=repacksuffix=+dfsg,dversionmangle=s/\+dfsg\d*$// \
+ https://gitlab.com/esr/irker/tags?sort=updated_desc .*/archive/(\d\S+)/.*\.tar\.gz.*