diff options
-rw-r--r-- | debian/NEWS.Debian | 6 | ||||
-rw-r--r-- | debian/README.Debian | 18 | ||||
-rw-r--r-- | debian/README.source | 18 | ||||
-rw-r--r-- | debian/changelog | 76 | ||||
-rw-r--r-- | debian/compat | 1 | ||||
-rw-r--r-- | debian/control | 28 | ||||
-rw-r--r-- | debian/copyright | 45 | ||||
-rw-r--r-- | debian/dirs | 2 | ||||
-rw-r--r-- | debian/docs | 2 | ||||
-rw-r--r-- | debian/mwc.1 | 55 | ||||
-rwxr-xr-x | debian/mwc.cr | 7 | ||||
-rw-r--r-- | debian/mwc.examples | 2 | ||||
-rw-r--r-- | debian/mwc.install | 3 | ||||
-rw-r--r-- | debian/mwc.links | 3 | ||||
-rw-r--r-- | debian/mwc.manpages | 2 | ||||
l--------- | debian/mwcfeedserver.1 | 1 | ||||
-rw-r--r-- | debian/patches/0001-config.patch | 83 | ||||
-rw-r--r-- | debian/patches/series | 1 | ||||
-rwxr-xr-x | debian/rules | 9 | ||||
-rw-r--r-- | debian/source/format | 1 | ||||
-rw-r--r-- | debian/watch | 4 |
21 files changed, 367 insertions, 0 deletions
diff --git a/debian/NEWS.Debian b/debian/NEWS.Debian new file mode 100644 index 0000000..f2337b3 --- /dev/null +++ b/debian/NEWS.Debian @@ -0,0 +1,6 @@ +mwc (2.0.4-2) unstable; urgency=high + + Since release 2.0.0 the syntax of the config file has + changed. Please read the sample for rewrite. + + -- Jörg Frings-Fürst <debian@jff-webhosting.net> Sat, 14 Oct 2017 22:27:29 +0200 diff --git a/debian/README.Debian b/debian/README.Debian new file mode 100644 index 0000000..18c2d15 --- /dev/null +++ b/debian/README.Debian @@ -0,0 +1,18 @@ +mwc for Debian +-------------- + +1.) For a example based setup copy the example to /etc/mwc: + + cp -f /usr/share/doc/mwc/examples/mwc-config_template.py /etc/mwc/mwc-config.py + + +2.) For running every hour you can copy + + cp -f /usr/share/doc/mwc/examples/mwc /etc/cron.hourly/mwc + +3.) You find the documentation in the file README.md or on + + https://github.com/Debianguru/MailWebsiteChanges#mailwebsitechanges + + + -- Jörg Frings-Fürst <debian@jff-webhosting.net> Thu, 18 Sep 2014 22:49:00 +0200 diff --git a/debian/README.source b/debian/README.source new file mode 100644 index 0000000..e4f2b3d --- /dev/null +++ b/debian/README.source @@ -0,0 +1,18 @@ +Hello, + +now I use the branching model from Vincent Driessen[1]. + +I use the gitflow-avh[2]. with the Documentation[3]. +The Debian package can be found here[4]. + +Please upload unattended uploads use a branch feature/<your title>. + + +Many thanks. + + -- Jörg Frings-Fürst <debian@jff-webhosting.net> Fri, 02 Jun 2017 19:00:40 +0200 + +[1] http://nvie.com/posts/a-successful-git-branching-model/ +[2] https://github.com/petervanderdoes/gitflow-avh +[3] https://github.com/petervanderdoes/gitflow-avh/wiki +[4] https://tracker.debian.org/pkg/git-flow diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..14f9941 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,76 @@ +mwc (2.0.4-3) unstable; urgency=medium + + * Declare compliance with Debian Policy 4.2.1 (No changes needed). + * Migrate to debhelper 11: + - Change debian/compat to 11. + - Bump minimum debhelper version in debian/control to >= 11. + * debian/control: + - Switch Vcs-* to new loacation. + * debian/copyright: + - Use secure URI. + + -- Jörg Frings-Fürst <debian@jff.email> Mon, 01 Oct 2018 23:45:29 +0200 + +mwc (2.0.4-2) unstable; urgency=high + + * debian/mwc.install: + - Install mwctools.py to /usr/share/mwc (Closes: #877924). + * New debian/NEWS.Debian about the new config file syntax. + * New debian/patches/0001-config.patch: + - Add loading config from every path (Closes: #877927). + * Change to my new email-address: + - debian/control, + - debian/copyright. + * Remove trailing white spaces: + - debian/changelog + - debian/control + * Declare compliance with Debian Policy 4.1.2.0 (No changes needed). + + -- Jörg Frings-Fürst <debian@jff.email> Sun, 03 Dec 2017 21:20:52 +0100 + +mwc (2.0.4-1) unstable; urgency=medium + + * New upstream release: + - Remove now unusable patches and therefore the printf function + (Closes: #860494). + - Add more Parameter needed at some websites (Closes: #862004). + * Rewrite debian/watch for archives without "v" in front of the version. + * Declare compliance with Debian Policy 4.1.1. (No changes needed). + * Bump compatlevel to 10 (no changes required): + - Change debian/compat to 10. + - At debian/control change requested version of debhelper to >= 10. + * At debian/control change Vcs-Browser to secure URI. + * debian/copyright: + - Refresh copyright year at * and debian/*. + * New README.source to explain the branching model used. + + -- Jörg Frings-Fürst <debian@jff-webhosting.net> Sun, 01 Oct 2017 20:21:11 +0200 + +mwc (1.7.2-3) unstable; urgency=medium + + * Work for the python3.5 transition (Closes: #799232): + - debian/control: + + Simplify Python 3 related build-depends and depends to reflect actual + requirements. + - debian/rules: + + Remove redundant call to dh_python3. + - Thanks to Scott Kitterman <debian@kitterman.com>. + * debian/copyright: + - Add 2015 to debian/* + + -- Jörg Frings-Fürst <debian@jff-webhosting.net> Sun, 27 Sep 2015 13:12:22 +0200 + +mwc (1.7.2-2) unstable; urgency=medium + + * debian/control: + - Replace Depends python-cssselect with python3-cssselect + (Closes: #764787). + - Bump Standards-Version to 3.9.6 (no changes required). + + -- Jörg Frings-Fürst <debian@jff-webhosting.net> Mon, 10 Nov 2014 09:37:29 +0100 + +mwc (1.7.2-1) unstable; urgency=low + + * Initial release (Closes: #746556) + + -- Jörg Frings-Fürst <debian@jff-webhosting.net> Thu, 18 Sep 2014 10:49:00 +0200 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..b4de394 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +11 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..4ea2f78 --- /dev/null +++ b/debian/control @@ -0,0 +1,28 @@ +Source: mwc +Section: utils +Priority: optional +Maintainer: Jörg Frings-Fürst <debian@jff.email> +Build-Depends: + debhelper (>= 11), + dh-python, + python3-all +Standards-Version: 4.2.1 +Homepage: https://github.com/Debianguru/MailWebsiteChanges +Vcs-Git: git://jff.email/opt/git/mwc.git +Vcs-Browser: https://jff.email/cgit/mwc.git + +Package: mwc +Architecture: all +Depends: + ${misc:Depends}, + ${python3:Depends}, + python3-lxml, + python3-cssselect +Description: Powerful website-tracking tool + MailWebsiteChanges is a Python script to keep track of website + changes; sends email notifications on updates and/or also + provides an RSS feed. + . + To specify which parts of a website should be monitored, XPath + selectors, CSS selectors, and regular expressions can be used + (just choose the tools you like!). diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..ef90ff9 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,45 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: mwc +Source: https://github.com/Debianguru/MailWebsiteChanges + +Files: * +Copyright: 2013-2017 Michael Till Beck <Debianguru@gmx.de> +License: GPL-2+ + +Files: debian/* +Copyright: 2014-2017 Jörg Frings-Fürst <debian@jff.email> +License: GPL-3+ + +License: GPL-2+ + This package 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 of the License, or + (at your option) any later version. + . + This package 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 <http://www.gnu.org/licenses/> + . + On Debian systems, the complete text of the GNU General + Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". + +License: GPL-3+ + This package 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 3 of the License, or + (at your option) any later version. + . + This package 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 <http://www.gnu.org/licenses/> + . + On Debian systems, the complete text of the GNU General + Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". diff --git a/debian/dirs b/debian/dirs new file mode 100644 index 0000000..870600a --- /dev/null +++ b/debian/dirs @@ -0,0 +1,2 @@ +etc/mwc +var/cache/mwc diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000..648393d --- /dev/null +++ b/debian/docs @@ -0,0 +1,2 @@ +README.md + diff --git a/debian/mwc.1 b/debian/mwc.1 new file mode 100644 index 0000000..0da3c0d --- /dev/null +++ b/debian/mwc.1 @@ -0,0 +1,55 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" (C) Copyright 2014 Jörg Frings-Fürst <debian@jff-webhosting.net>, +.\" +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH MWC 1 "September 18, 2014" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp <n> insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +mwc, mwcfeedserver \- program for monitoring changes of Websites +.SH SYNOPSIS +.B mwc +.RI [ --config[=config]\ \ --dry-run[=shortname] ] +.br +.B mwcfeedserver +.RI [ --config[=config]\ \ --port[=port] ] +.SH DESCRIPTION +This manual page documents briefly the +.B mwc and +.br +.B mwcfeedserver +commands. +.PP +.\" TeX users may be more comfortable with the \fB<whatever>\fP and +.\" \fI<whatever>\fP escape sequences to invode bold face and italics, +.\" respectively. +\fBmwc\fP is a program that monitor websites and send mails after detect changes. +.SH OPTIONS +These programs follow the usual GNU command line syntax, with long +options starting with two dashes (`-'). +A summary of options is included below. +.TP +.B \-\-config=CONFIG +Path and filename of the config \- file. +.TP +.B \-\-dry\-run=SHORTNAME +Test the entry SHORTNAME from config without sending a mail. +.TP +.B \-\-port=PORT +Port (Standard = 8000) where Feedserver is listen +.SH AUTHOR +The Sleuth Kit was written by Michael Till Beck <Debianguru@gmx.de>. +.PP +This manual page was written by Jörg Frings\-Fürst <debian@jff\-webhosting.net> for the Debian project (but may be used by others). diff --git a/debian/mwc.cr b/debian/mwc.cr new file mode 100755 index 0000000..e0c7f8f --- /dev/null +++ b/debian/mwc.cr @@ -0,0 +1,7 @@ +#! /bin/bash + +test -x /usr/bin/mwc || exit 0 +test -e /etc/mwc/mwc-config.py || exit 0 + +/usr/bin/mwc -config=/etc/mwc/mwc-config >/dev/null 2>&1 + diff --git a/debian/mwc.examples b/debian/mwc.examples new file mode 100644 index 0000000..9c2cf1d --- /dev/null +++ b/debian/mwc.examples @@ -0,0 +1,2 @@ +config_template.py +debian/mwc.cr diff --git a/debian/mwc.install b/debian/mwc.install new file mode 100644 index 0000000..65e0d12 --- /dev/null +++ b/debian/mwc.install @@ -0,0 +1,3 @@ +mwc.py /usr/share/mwc +mwctools.py /usr/share/mwc +mwcfeedserver.py /usr/share/mwc diff --git a/debian/mwc.links b/debian/mwc.links new file mode 100644 index 0000000..82885c9 --- /dev/null +++ b/debian/mwc.links @@ -0,0 +1,3 @@ +/usr/share/mwc/mwc.py /usr/bin/mwc +/usr/share/mwc/mwcfeedserver.py /usr/sbin/mwcfeedserver + diff --git a/debian/mwc.manpages b/debian/mwc.manpages new file mode 100644 index 0000000..c3ed826 --- /dev/null +++ b/debian/mwc.manpages @@ -0,0 +1,2 @@ +debian/mwc.1 +debian/mwcfeedserver.1 diff --git a/debian/mwcfeedserver.1 b/debian/mwcfeedserver.1 new file mode 120000 index 0000000..1cd4511 --- /dev/null +++ b/debian/mwcfeedserver.1 @@ -0,0 +1 @@ +mwc.1
\ No newline at end of file diff --git a/debian/patches/0001-config.patch b/debian/patches/0001-config.patch new file mode 100644 index 0000000..df47bb4 --- /dev/null +++ b/debian/patches/0001-config.patch @@ -0,0 +1,83 @@ +Description: add loading config from every path + Add loading config from every path + Separation data / program +Author: Jörg Frings-Fürst <jff@jff-webhosting.net> +Last-Update: 2017-10-14 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +Index: trunk/mwc.py +=================================================================== +--- trunk.orig/mwc.py ++++ trunk/mwc.py +@@ -198,7 +198,7 @@ def pollWebsites(): + + + if __name__ == "__main__": +- configMod = 'config' ++ configMod = '/etc/mwc/mwc-config' + dryrun = None + + try: +@@ -215,7 +215,23 @@ if __name__ == "__main__": + elif opt in ('-d', '--dry-run'): + dryrun = arg + +- config = importlib.import_module(configMod) ++ # ++ # add code to load config from nonsystem path ++ # and change to datadir ++ # ++ try: ++ path = os.path.dirname(configMod) ++ fullname = os.path.basename(configMod) ++ sys.path.append(path) ++ config = importlib.import_module(fullname) ++ except: ++ print('Error: loading config') ++ sys.exit(2) ++ try: ++ os.chdir(config.datadir) ++ except: ++ print('Error: datadir not found') ++ sys.exit(3) + + if dryrun: + for thesite in config.sites: +Index: trunk/mwcfeedserver.py +=================================================================== +--- trunk.orig/mwcfeedserver.py ++++ trunk/mwcfeedserver.py +@@ -14,7 +14,7 @@ import getopt + + bind = 'localhost' + port = 8000 +-configMod = 'config' ++configMod = '/etc/mwc/mwc-config' + + + try: +@@ -34,7 +34,23 @@ for opt, arg in opts: + elif opt in ('-p', '--port'): + port = int(arg) + +-config = importlib.import_module(configMod) ++ # ++ # add code to load config from nonsystem path ++ # and change to datadir ++ # ++ try: ++ path = os.path.dirname(configMod) ++ fullname = os.path.basename(configMod) ++ sys.path.append(path) ++ config = importlib.import_module(fullname) ++ except: ++ print('Error: loading config') ++ sys.exit(2) ++ try: ++ os.chdir(config.datadir) ++ except: ++ print('Error: datadir not found') ++ sys.exit(3) + + + handler = http.server.SimpleHTTPRequestHandler diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..2361bcf --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +0001-config.patch diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..8c9d9d4 --- /dev/null +++ b/debian/rules @@ -0,0 +1,9 @@ +#!/usr/bin/make -f + +%: + dh $@ --with python3 + +override_dh_installdeb: + mv debian/mwc/usr/share/doc/mwc/examples/config_template.py debian/mwc/usr/share/doc/mwc/examples/mwc-config_template.py + mv debian/mwc/usr/share/doc/mwc/examples/mwc.cr debian/mwc/usr/share/doc/mwc/examples/mwc + dh_installdeb 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/watch b/debian/watch new file mode 100644 index 0000000..f145632 --- /dev/null +++ b/debian/watch @@ -0,0 +1,4 @@ +version=3 + +opts=filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/$1\.tar\.gz/ \ +https://github.com/Debianguru/MailWebsiteChanges/tags .*/v?(\d\S*)\.tar\.gz |