aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2013-09-08 22:29:44 +0200
committerMatěj Cepl <mcepl@redhat.com>2013-09-08 22:29:44 +0200
commitaa233606dc5358292f26808439bd60836a9b5dfe (patch)
tree097a6fa9a952a8d77161f219c5c8b38da086099e
parentc50ce75f2e06b6b8abe49e34775d343b74f7e8cd (diff)
downloadpygn-0.9.8.tar.gz
New version from Debian0.9.8
-rw-r--r--HOWTO14
-rw-r--r--Makefile4
-rw-r--r--debian/README.debian12
-rw-r--r--debian/changelog227
-rw-r--r--debian/compat1
-rw-r--r--debian/control29
-rw-r--r--debian/copyright10
-rw-r--r--debian/dirs2
-rw-r--r--debian/docs2
-rw-r--r--debian/examples2
-rw-r--r--debian/notused/crontab.ex1
-rw-r--r--debian/notused/diversions.ex1
-rw-r--r--debian/notused/inetd.conf.ex2
-rw-r--r--debian/notused/info.ex15
-rw-r--r--debian/notused/init.d.ex51
-rw-r--r--debian/notused/manpage.1.ex41
-rw-r--r--debian/notused/menu.ex2
-rw-r--r--debian/notused/watch.ex5
-rw-r--r--debian/pygm2n.168
-rw-r--r--debian/pygn2m.179
-rwxr-xr-xdebian/rules81
-rw-r--r--debian/whitelist.575
-rw-r--r--wlp/C/Makefile7
-rw-r--r--wlp/C/commands.y1
-rw-r--r--wlp/C/wlp.c31
-rw-r--r--wlp/Makefile14
-rw-r--r--wlp/README2
-rw-r--r--wlp/module/Makefile.pre.in10
28 files changed, 744 insertions, 45 deletions
diff --git a/HOWTO b/HOWTO
index 12f1a6b..e39c123 100644
--- a/HOWTO
+++ b/HOWTO
@@ -5,17 +5,27 @@ It is a (very) small HOWTO to make pyg working properly.
pygm2n:
-Pre: a fully working MTA (ie postfix) where you can run procmail. A
-new server (local or remote) where you can create groups.
+Pre: a fully working MTA (ie postfix) where you can run procmail or any other MDA.
+A news server (local or remote) where you can create groups (admin
+privileges).
Create a user, ie mailgate, set its procmail as:
:0 bhc:
| pygm2n -n local.test
+or its maildrop (thanks to Joy):
+
+dotlock pygm2n.`echo $$`.lock {
+ `pygm2n -n local.test`
+}
+
you can use -a your@address and -s nntphost if local.test is moderated,
or nntphost isn't localhost
+[NOTE: if you've configuration for any other MDA, please file a wishlist
+bug against pyg]
+
Create local.test (if it doen't exist).
Now any mail you will write to mailgate user, will be sent to the
diff --git a/Makefile b/Makefile
index e37e417..b145688 100644
--- a/Makefile
+++ b/Makefile
@@ -13,5 +13,5 @@ install:
install *.so $(DESTDIR)/usr/lib/pyg
clean:
- -$(MAKE) -C $(WLPDIR) clean
- -rm *.pyc *.so
+ $(MAKE) -C $(WLPDIR) clean
+ rm -f *.pyc *.so
diff --git a/debian/README.debian b/debian/README.debian
new file mode 100644
index 0000000..c9d90ed
--- /dev/null
+++ b/debian/README.debian
@@ -0,0 +1,12 @@
+pyg for Debian
+--------------
+
+pyg is a package to manage gateway from usenet to email and vice versa.
+
+It is written in python and is (hopefully) rfc compliant.
+My intent is to write a fully standardized gateway.
+
+Any help, advice or patch is accepted :)
+If you try pyg, send me your opinion, please.
+
+Cosimo Alfarano <alfarano@students.cs.unibo.it>, Sun, 25 Jun 2000 17:52:35 +0200
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..880d5ee
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,227 @@
+pyg (0.9.8) unstable; urgency=low
+
+ * Added string.h to avoid implicit declarations in yacc definitions.
+ Closes: #689349
+ * Remove some compile-time warning from wlp/C/wlp.c
+ * not ignore errors in clean targets on all Makefile
+ * debian/compat bump to 5 (higher should be tested)
+ * use dh_python2
+
+ -- Cosimo Alfarano <kalfa@debian.org> Tue, 02 Oct 2012 14:04:01 +0100
+
+pyg (0.9.7) unstable; urgency=low
+
+ * Added maildrop as a possible deps (Closes: #385771)
+ * Typos fixed in HOWTO.
+ * Creating md5sum control file
+
+ -- Cosimo Alfarano <kalfa@debian.org> Fri, 18 Jul 2008 13:35:57 -0400
+
+pyg (0.9.6-4.2) unstable; urgency=high
+
+ * Non-maintainer upload.
+ * Add BLDSHARED to Makefile.pre.in for python2.5 compatibility.
+ Closes: #476160
+ * Add shlibs:Depends in debian/control.
+
+ -- Thomas Viehmann <tv@beamnet.de> Sun, 20 Apr 2008 16:49:23 +0200
+
+pyg (0.9.6-4.1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Update package to the last python policy (Closes: #380905).
+ * Bump DH_COMPAT to 4.
+ * Bump Standards-Version to 3.7.2.
+
+ -- Pierre Habouzit <madcoder@debian.org> Sat, 12 Aug 2006 14:01:38 +0200
+
+pyg (0.9.6-4) unstable; urgency=low
+
+ * added some more header to be stripepd in mail2news class
+ closes:Bug#165322
+
+ -- Cosimo Alfarano <kalfa@debian.org> Tue, 2 Mar 2004 21:40:59 +0100
+
+pyg (0.9.6-3.1) unstable; urgency=low
+
+ * apply the full (not modified) version of the Matt's patch, for
+ compatibility reasons
+
+ -- Cosimo Alfarano <kalfa@debian.org> Thu, 6 Nov 2003 23:46:31 +0100
+
+pyg (0.9.6-3) unstable; urgency=low
+
+ * applied a modified version of patch from Matt Kraai sent in BTS
+ closes:Bug#213936
+
+ -- Cosimo Alfarano <kalfa@debian.org> Wed, 5 Nov 2003 11:59:29 +0100
+
+pyg (0.9.6-2) unstable; urgency=low
+
+ * typos in debian/control fixed (closes: #125276)
+
+ -- Cosimo Alfarano <kalfa@debian.org> Sat, 6 Apr 2002 18:52:57 +0200
+
+pyg (0.9.6-1) unstable; urgency=low
+
+ * minor changes to mail2news.py sendemail() method
+ now does str(msg) on exception
+ * addedd support for void header ('Cc: \n\r') even if it is not fully rfc
+ conform.
+ * addedd support for multiline header of the form
+ "Received: \n\r<text>" (closes: #124396)
+ * fixed helo hostname sent, now it's the box name
+ (closes: #122851)
+ * sorry for the long fixing time, to everyone was waiting for them.
+
+ -- Cosimo Alfarano <kalfa@debian.org> Wed, 3 Apr 2002 22:39:47 +0200
+
+pyg (0.9.5-1) unstable; urgency=low
+
+ * compiled against python2.1 (wlp.c)
+ * debian/control updated for dependancies
+ python (>= 2.1), I want it to be usable on any 2.X
+ the same for python-dev (closes: #119202)
+
+ -- Cosimo Alfarano <kalfa@debian.org> Mon, 12 Nov 2001 22:17:28 +0100
+
+pyg (0.9.4-7) unstable; urgency=low
+
+ * fixed some typos
+ * fixed import of getopt module (thanks to zack@debian.org)
+ * inverted 'if' and 'else' in line 78 of mail2news.py
+ that's not a bug, but I do it for readability closes: #105922
+
+ -- Cosimo Alfarano <kalfa@debian.org> Fri, 20 Jul 2001 00:49:26 +0200
+
+pyg (0.9.4-6) unstable; urgency=low
+
+ * added -P port option to pygm2n
+
+ -- Cosimo Alfarano <kalfa@debian.org> Sun, 11 Feb 2001 22:09:03 +0100
+
+pyg (0.9.4-5) unstable; urgency=low
+
+ * added suport for NNTP auth (thanks to Marc Sherman for his patch) closes: #84809
+
+ -- Cosimo Alfarano <kalfa@debian.org> Sun, 11 Feb 2001 16:43:09 +0100
+
+pyg (0.9.4-4) unstable; urgency=low
+
+ * moved files from /usr/sbin to /usr/bin closes: #84806
+ * changed Maintainer: filed to kalfa@debian.org addr
+
+ -- Cosimo Alfarano <alfarano@students.cs.unibo.it> Sun, 04 Feb 2000 18:50:00 +0100
+
+pyg (0.9.4-3) unstable; urgency=low
+
+ * Sponsored upload.
+ * fixed getopt problem with -M
+
+ -- Davide Puricelli (evo) <evo@debian.org> Sun, 30 Sep 2000 21:50:00 +0200
+
+pyg (0.9.4-2) unstable; urgency=low
+
+ * added Approved: header (pygm2n)
+ * added selection of smtpserver for relay (pygn2m)
+ * added conversion from In-Reply-To: to References: (pygm2n)
+ * added Suggests: news-transport-system , mail-transport-agent
+ * removed NNTP-Posting-Host, X-Trace
+ * added TODO file
+ * mail to news is working fine.
+
+ -- Cosimo Alfarano <alfarano@students.cs.unibo.it> Sun, 30 Sep 2000 21:50:00 +0200
+
+pyg (0.9.4-1) unstable; urgency=low
+
+ * Sponsored upload.
+ * New upstream version.
+ * mail to news gateway is working. Anyway testing it is adviced before use.
+
+ -- Davide Puricelli (evo) <evo@debian.org> Mon, 18 Sep 2000 19:45:19 +0200
+
+pyg (0.9.3-1) unstable; urgency=low
+
+ * started to write mail to news gateway module
+
+ -- Cosimo Alfarano <alfarano@students.cs.unibo.it> Sat, 16 Sep 2000 17:30:00 +0200
+
+pyg (0.9.2-3) unstable; urgency=low
+
+ * Sponsored upload.
+ * Swapped binary-{indep,arch} in debian/rules, closes: #71446.
+ * Added flex and bison to Build-Depends.
+
+ -- Davide Puricelli (evo) <evo@debian.org> Thu, 14 Sep 2000 16:34:10 +0200
+
+pyg (0.9.2-2) unstable; urgency=low
+
+ * debian/rules rewritten to a more readble dh_make style.
+ * moved example files from debian/ to exaples/
+ * dh_stripped *.so
+ * dh_undocumented *.py
+ * Sponsored upload for Cosimo Alfarano <alfarano@students.cs.unibo.it>
+ * Initial Debian release.
+
+ -- Davide Puricelli (evo) <evo@debian.org> Sat, 2 Sep 2000 22:35:25 +0200
+
+pyg (0.9.2-1) unstable; urgency=low
+
+ * written the whitelist parser (wlp) in yacc+flex
+ * written C funtions as python built-in module for wlp
+ * fixed parsecommandline() return object
+ * added -T opt for test mode and -V for verbose output
+
+ -- Cosimo Alfarano <alfarano@students.cs.unibo.it> Sun, 23 Jul 2000 19:30:00 +0200
+
+pyg (0.9.1-5) unstable; urgency=low
+
+ * added file locking on log
+ * modified default location of whitelist and log file to homedir.
+ log file will moved to /var/log as soon as possible
+
+ -- Cosimo Alfarano <alfarano@students.cs.unibo.it> Sun, 03 Jul 2000 18:00:00 +0200
+
+pyg (0.9.1-4) unstable; urgency=low
+
+ * Added Message-Id: logging in whitelist
+
+ -- Cosimo Alfarano <alfarano@students.cs.unibo.it> Sun, 02 Jul 2000 18:30:00 +0200
+
+pyg (0.9.1-3) unstable; urgency=low
+
+ * removed Sender: header from nntp article. It is usually set to news@news.domain
+
+ -- Cosimo Alfarano <alfarano@students.cs.unibo.it> Thu, 29 Jun 2000 16:30:00 +0200
+
+pyg (0.9.1-2) unstable; urgency=low
+
+ * modified copyright note in sources
+ * moved parse_cmdline() from news2mail.py to pygs
+
+ -- Cosimo Alfarano <alfarano@students.cs.unibo.it> Thu, 29 Jun 2000 02:30:00 +0200
+
+pyg (0.9.1-1) unstable; urgency=low
+
+ * enriched whitelist log system
+
+ -- Cosimo Alfarano <alfarano@students.cs.unibo.it> Thu, 29 Jun 2000 01:30:00 +0200
+
+pyg (0.9-3) unstable; urgency=low
+
+ * corrected load path for modules in pygs. now points to /usr/lib/pyg
+
+ -- Cosimo Alfarano <alfarano@students.cs.unibo.it> Wed, 28 Jun 2000 00:45:00 +0200
+
+pyg (0.9-2) unstable; urgency=low
+
+ * added basic (and rudimental) whitelist functionality (whitelist.py)
+
+ -- Cosimo Alfarano <alfarano@students.cs.unibo.it> Wed, 28 Jun 2000 00:05:00 +0200
+
+pyg (0.9-1) unstable; urgency=low
+
+ * Initial release.
+
+ -- Cosimo Alfarano <alfarano@students.cs.unibo.it> Sun, 25 Jun 2000 17:52:35 +0200
+
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..7ed6ff8
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+5
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..d956b52
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,29 @@
+Source: pyg
+Section: news
+Priority: optional
+Maintainer: Cosimo Alfarano <kalfa@debian.org>
+Standards-Version: 3.9.3
+Build-Depends: debhelper (>= 3.0), python-dev (>= 2.6.6-3~), flex, bison
+
+Package: pyg
+Architecture: any
+Depends: ${misc:Depends}, ${python:Depends}, ${shlibs:Depends}
+Suggests: news-transport-system , mail-transport-agent, procmail | maildrop | sensible-mda
+Description: Python Mail <-> News Gateway
+ Python Gateway Script from news to mail and vice versa.
+ .
+ It is intended to be a full SMTP/NNTP rfc compliant gateway
+ with whitelist manager.
+ .
+ You will probably have to install a mail-transport-agent and/or
+ news-transport-system package to manage SMTP/NNTP traffic.
+ .
+ MTA is needed for mail2news service, since mail have to be
+ processed on a box where pyg is installed. You can use a remote
+ smtpserver for news2mail.
+ .
+ News system is useful but not needed, since you can send articles to a
+ remote SMTP server (ie: moderated NG) where is installed pyg, otherwise you
+ will need it.
+ .
+ It refers to rfc 822 (mail) and 850 (news).
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..5da5c8d
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,10 @@
+This package was debianized by Cosimo Alfarano <alfarano@students.cs.unibo.it> on Sun, 25 Jun 2000 17:52:35 +0200.
+
+Current maintainer and author is Cosimo Alfarano.
+You can find this package at URL HTTP://www.students.cs.unibo.it/~alfarano
+
+Copyright:
+Copyright (C) 2000-2001,2012 Cosimo Alfarano <kalfa@debian.org>
+
+A copy of the GNU General Public License, version 2, can be found in
+/usr/share/common-licenses/GPL-3
diff --git a/debian/dirs b/debian/dirs
new file mode 100644
index 0000000..7bdd9cc
--- /dev/null
+++ b/debian/dirs
@@ -0,0 +1,2 @@
+usr/bin
+usr/lib/pyg
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000..e882956
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1,2 @@
+HOWTO
+TODO
diff --git a/debian/examples b/debian/examples
new file mode 100644
index 0000000..7a0a00b
--- /dev/null
+++ b/debian/examples
@@ -0,0 +1,2 @@
+examples/*
+wlp_test
diff --git a/debian/notused/crontab.ex b/debian/notused/crontab.ex
new file mode 100644
index 0000000..99b6819
--- /dev/null
+++ b/debian/notused/crontab.ex
@@ -0,0 +1 @@
+0 4 * * * root pyg_maintenance
diff --git a/debian/notused/diversions.ex b/debian/notused/diversions.ex
new file mode 100644
index 0000000..aebbbe5
--- /dev/null
+++ b/debian/notused/diversions.ex
@@ -0,0 +1 @@
+<FILE> <Diverted to> <Packagename>
diff --git a/debian/notused/inetd.conf.ex b/debian/notused/inetd.conf.ex
new file mode 100644
index 0000000..1dcaa61
--- /dev/null
+++ b/debian/notused/inetd.conf.ex
@@ -0,0 +1,2 @@
+#:OTHER:
+pyg stream tcp nowait root /usr/sbin/tcpd /usr/sbin/pyg
diff --git a/debian/notused/info.ex b/debian/notused/info.ex
new file mode 100644
index 0000000..31365f9
--- /dev/null
+++ b/debian/notused/info.ex
@@ -0,0 +1,15 @@
+# This is a configuration files for installing a .info menu
+# The Description to be placed into the directory
+DESCR="Description"
+
+# The section this info file should be placed in (Regexp) followed by
+# the new section name to be created if the Regexp does not match
+# (Optional. If not given the .info will be appended to the directory)
+#SECTION_MATCH="Regexp"
+#SECTION_NAME="New Section Name"
+
+# The file referred to from the Info directory
+FILE=pyg.info
+
+# Optional. The files to be copied to /usr/share/info
+#FILES=*.info
diff --git a/debian/notused/init.d.ex b/debian/notused/init.d.ex
new file mode 100644
index 0000000..c2302bb
--- /dev/null
+++ b/debian/notused/init.d.ex
@@ -0,0 +1,51 @@
+#!/bin/sh
+#
+# This file was automatically customized by debmake on Sun, 25 Jun 2000 17:52:35 +0200
+#
+# Written by Miquel van Smoorenburg <miquels@cistron.nl>.
+# Modified for Debian GNU/Linux by Ian Murdock <imurdock@gnu.org>.
+# Modified for Debian by Christoph Lameter <clameter@debian.org>
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+DAEMON=/usr/sbin/pyg
+# The following value is extracted by debstd to figure out how to generate
+# the postinst script. Edit the field to change the way the script is
+# registered through update-rc.d (see the manpage for update-rc.d!)
+FLAGS="defaults 50"
+
+test -f $DAEMON || exit 0
+
+case "$1" in
+ start)
+ start-stop-daemon --start --verbose --exec $DAEMON
+ ;;
+ stop)
+ start-stop-daemon --stop --verbose --exec $DAEMON
+ ;;
+ #reload)
+ #
+ # If the daemon can reload its config files on the fly
+ # for example by sending it SIGHUP, do it here.
+ #
+ # If the daemon responds to changes in its config file
+ # directly anyway, make this a do-nothing entry.
+ #
+ # start-stop-daemon --stop --signal 1 --verbose --exec $DAEMON
+ # ;;
+ restart|force-reload)
+ #
+ # If the "reload" option is implemented, move the "force-reload"
+ # option to the "reload" entry above. If not, "force-reload" is
+ # just the same as "restart".
+ #
+ start-stop-daemon --stop --verbose --exec $DAEMON
+ sleep 1
+ start-stop-daemon --start --verbose --exec $DAEMON
+ ;;
+ *)
+ echo "Usage: /etc/init.d/pyg {start|stop|restart|force-reload}"
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/debian/notused/manpage.1.ex b/debian/notused/manpage.1.ex
new file mode 100644
index 0000000..4ce8b61
--- /dev/null
+++ b/debian/notused/manpage.1.ex
@@ -0,0 +1,41 @@
+.TH NAME SECTION
+.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection
+.\" other parms are allowed: see man(7), man(1)
+.SH NAME
+pyg \- programs to do something
+.SH SYNOPSIS
+.B pyg
+.I "[options] files ..."
+.br
+.B bar
+.I "[options] files ..."
+.SH "DESCRIPTION"
+This manual page documents briefly the
+.BR pyg ,
+and
+.B bar
+commands.
+This manual page was written for the Debian GNU/Linux distribution
+because the original program does not have a manual page.
+Instead, it has documentation in the GNU Info format; see below.
+.PP
+.B pyg
+is a program that...
+.SH OPTIONS
+The programs follow the usual GNU command line syntax, with long
+options starting with two dashes (`-').
+A summary of options are included below.
+For a complete description, see the Info files.
+.TP
+.B \-h, \-\-help
+Show summary of options.
+.TP
+.B \-v, \-\-version
+Show version of program.
+.SH "SEE ALSO"
+The programs are documented fully by
+.IR "The Rise and Fall of a Fooish Bar" ,
+available via the Info system.
+.SH AUTHOR
+This manual page was written by Kame Alfa III <kame@aragorn.lorien.org>,
+for the Debian GNU/Linux system (but may be used by others).
diff --git a/debian/notused/menu.ex b/debian/notused/menu.ex
new file mode 100644
index 0000000..b608ca8
--- /dev/null
+++ b/debian/notused/menu.ex
@@ -0,0 +1,2 @@
+?package(pyg):needs=X11|text|vc|wm section=Apps/see-menu-manual\
+ title="pygs" command="/usr/sbin/pygs"
diff --git a/debian/notused/watch.ex b/debian/notused/watch.ex
new file mode 100644
index 0000000..5aba8f5
--- /dev/null
+++ b/debian/notused/watch.ex
@@ -0,0 +1,5 @@
+# Example watch control file for uscan
+# Rename this file to "watch" and then you can run the "uscan" command
+# to check for upstream updates and more.
+# Site Directory Pattern Version Script
+sunsite.unc.edu /pub/Linux/Incomingu pyg-*.tar.gz debian uupdate
diff --git a/debian/pygm2n.1 b/debian/pygm2n.1
new file mode 100644
index 0000000..63f2e09
--- /dev/null
+++ b/debian/pygm2n.1
@@ -0,0 +1,68 @@
+.\" wing requests are required for all man pages.
+.TH pygm2n 1 "Sun Sep 12 18:10:00 CEST 2000" "" "Python Gateway mail to news"
+.SH NAME
+pygm2n - Python Gateway mail to news
+.SH SYNOPSIS
+.B pygm2n
+.BR -n
+.IR newsgroups
+[
+.BR -s
+.IR newsserver
+]
+[
+.BR -h
+]
+
+.SH DESCRIPTION
+.B IMPORTANT:
+this man page is to be continued. The Whole pyg gateway is in
+.B devel.\ state.
+try -h option for more detailed option.
+
+pygm2n reads from stdin an email, sending it to newsgroups, a comma separated list without spaces of newsgroup names (at least one), rfc799 compliant.
+
+If pygm2n reads from stdin a sigle line starting with /, it is
+considered an absolute path to a single-email mailbox,
+so pygm2n will open and read it.
+
+.B Note
+that now pyg can't read a real mailbox, with many emails. If you
+give it in input, pyg will post the whole mailbox as a single email.
+
+\" The following requests should be uncommented and
+.\" used where appropriate. This next request is
+.\" for sections 2 and 3 function return values only.
+.\" .Sh RETURN VALUES
+.\" This next request is for sections 1, 6, 7 & 8 only
+.\" .Sh ENVIRONMENT
+.\" .Sh FILES
+.SH EXAMPLES
+There is some documetation in /urs/share/doc/pyg
+
+I created mailgate user (moderator of local.moderated ng).
+Subscribe to a list with this user (or simply email one message to).
+Every email posted to this user will send to newsgroups,
+in its .procmailrc I've put something like:
+
+:0 bh
+* ^From *mailinglist-request@lists.debian.org
+| $HOME/pygm2n -n local.debian.mailinglist
+
+
+.\" This next request is for sections 1, 6, 7 & 8 only
+.\" (command return values (to shell) and
+.\" fprintf/stderr type diagnostics)
+.\" .Sh DIAGNOSTICS
+.\" The next request is for sections 2 and 3 error
+.\" and signal handling only.
+.\" .Sh ERRORS
+.\" .Sh SEE ALSO
+.\" .Sh STANDARDS
+.\" .Sh HISTORY
+.SH AUTHORS
+Cosimo Alfarano <alfarano@students.cs.unibo.it>
+
+.SH BUGS
+Boh. send any bug, advice or opinion to the author, please.
+
diff --git a/debian/pygn2m.1 b/debian/pygn2m.1
new file mode 100644
index 0000000..5b2750e
--- /dev/null
+++ b/debian/pygn2m.1
@@ -0,0 +1,79 @@
+.\" wing requests are required for all man pages.
+.TH pygn2m 1 "Sun Sep 12 22:40:00 CEST 2000" "" "Python Gateway news to mail"
+.SH NAME
+pygn2m - Python Gateway news to mail
+.SH SYNOPSIS
+.B pygs
+.BR -t
+.IR recipient@domain1
+.BR -s
+.IR sender@domain2
+[
+.BR -e
+.IR envelope@domain3
+]
+[
+.BR -h
+]
+
+.SH DESCRIPTION
+.B IMPORTANT:
+this man page is to be continued. The Whole pyg gateway is in
+.B devel.\ state.
+try -h option for more detailed option.
+
+pygn2m reads from stdin a nntp article, sending it to recipient@domain1
+a rfc822 compliant email setting Resent-Sender: sender@domain2
+and envelope envelope@domain3 if exists, else sender@domain2.
+
+If pygn2m reads from stdin a sigle line starting with /, it is
+considered an absolute path to an article (ie in a spool),
+so pygn2m will open and read it.
+
+\" The following requests should be uncommented and
+.\" used where appropriate. This next request is
+.\" for sections 2 and 3 function return values only.
+.\" .Sh RETURN VALUES
+.\" This next request is for sections 1, 6, 7 & 8 only
+.\" .Sh ENVIRONMENT
+.\" .Sh FILES
+.SH EXAMPLES
+There is some documetation in /urs/share/doc/pyg
+
+I created mailgate user (moderator of local.moderated ng).
+Every article posted in local.moderated is sent to mailgate,
+in its .procmailrc I've put:
+
+:0 bhc
+* ^To: *local-moderated
+| $HOME/pygs -t kalfa@localhost -e mailgate@students.cs.unibo.it -s 'cosimo@students.cs.unibo.it'
+
+
+where kalfa@localhost is the recipient (usually a mailing list)
+
+Here is an header extract from kalfa@localhost mbox:
+
+From mailgate@students.cs.unibo.it
+From: whosentnntparticle@domain4
+To: kalfa@localhost
+Resent-Sender: cosimo@students.cs.unibo.it
+
+note that sender and envelope are different. rfc822 says that Sender: have to be a human user (not a program or similia). envelope can mailgate user.
+
+
+.\" This next request is for sections 1, 6, 7 & 8 only
+.\" (command return values (to shell) and
+.\" fprintf/stderr type diagnostics)
+.\" .Sh DIAGNOSTICS
+.\" The next request is for sections 2 and 3 error
+.\" and signal handling only.
+.\" .Sh ERRORS
+.\" .Sh SEE ALSO
+.\" .Sh STANDARDS
+.\" .Sh HISTORY
+.SH AUTHOR
+Cosimo Alfarano <alfarano@students.cs.unibo.it>
+
+.SH BUGS
+Boh. send any bug to the author, please.
+
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..5d336e3
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,81 @@
+#!/usr/bin/make -f
+
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+export package=pyg
+export debdestdir=$(CURDIR)/debian/$(package)
+
+build: build-stamp
+
+build-arch: build
+build-indep: build
+
+build-stamp:
+ dh_testdir
+
+ $(MAKE) bin #CFLAGS="-O2 -g -Wall"
+ touch build-stamp
+
+clean:
+ dh_testdir
+
+ rm -f build-stamp
+ $(MAKE) clean
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+
+ $(MAKE) install DESTDIR=$(debdestdir)
+
+
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+
+ dh_installdirs
+ dh_installchangelogs
+ dh_installdocs
+ dh_installman $(CURDIR)/debian/pygn2m.1 $(CURDIR)/debian/pygm2n.1
+# dh_installinfo
+
+ # these are class modules, they don't need manpages,
+ # undocumented link means I'm planning to document them.
+ #dh_undocumented whitelist.py.3 news2mail.py.3 mail2news.py.3 pyginfo.py.3
+ dh_installexamples
+
+ dh_fixperms
+ # dh_fixperms doesn't fix perms in /usr/lib subdirs
+ chmod 0644 $(debdestdir)/usr/lib/$(package)/*.py
+ # make sure pyg executables have right permission
+ chmod 0755 $(debdestdir)/usr/bin/pygn2m
+ chmod 0755 $(debdestdir)/usr/bin/pygm2n
+
+ # dh_fixperms doesn't fix perms in /usr/share/doc subdirs
+ find $(debdestdir)/usr/share/doc/$(package) -type d -exec chmod 0755 {} \;
+
+ dh_python2
+
+ dh_strip
+ dh_compress
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+
+# no binary arch-indep is present
+binary-indep: build install
+ dh_testdir
+ dh_testroot
+
+binary: binary-indep binary-arch
+
+.PHONY: build build-arch build-indep binary binary-arch binary-indep clean install
diff --git a/debian/whitelist.5 b/debian/whitelist.5
new file mode 100644
index 0000000..d129243
--- /dev/null
+++ b/debian/whitelist.5
@@ -0,0 +1,75 @@
+.\" wing requests are required for all man pages.
+.Dd July 23, 2000
+.Os Debian GNU/Linux
+.Dt whitelist 5
+.Sh NAME
+.Nm pygs
+.Nd the PYthon Gateway Script
+.Sh SYNOPSIS
+pygs
+-t recipient@domain1
+-s sender@domain2
+[-e envelope@domain3]
+[-d]
+[-T]
+[-V]
+[-l logfile]
+[-w whitelist]
+[-h]
+.Sh DESCRIPTION
+NOTE: this man page is to be continued :)
+
+pygs read from stdin a nntp article, sending it to recipient@domain1 a rfc822 compliant email setting Resent-Sender: sender@domain2 and envelope envelope@domain3 if exists, else sender@domain2.
+.Sh OPTIONS
+.Tp 0.5i
+.B \-t
+
+\" The following requests should be uncommented and
+.\" used where appropriate. This next request is
+.\" for sections 2 and 3 function return values only.
+.\" .Sh RETURN VALUES
+.\" This next request is for sections 1, 6, 7 & 8 only
+.\" .Sh ENVIRONMENT
+.\" .Sh FILES
+.Sh EXAMPLES
+There is some documetation in /urs/share/doc/pyg
+
+I created mailgate user (moderator of local.moderated ng).
+Every article posted in local.moderated is sent to mailgate,
+in its .procmailrc I've put:
+
+.Bd
+.Li :0 bhc
+.Li \ * ^To: *local-moderated
+.Li | $HOME/pygs -t kalfa@localhost -e mailgate@students.cs.unibo.it -s 'cosimo@students.cs.unibo.it'
+.Ed
+
+where kalfa@localhost is the recipient (it usually is a mailing list)
+
+an header extract from kalfa@localhost mbox:
+
+From mailgate@students.cs.unibo.it
+From: whosentnntparticle@domain4
+To: kalfa@localhost
+Resent-Sender: cosimo@students.cs.unibo.it
+
+note that sender and envelope are different. rfc822 says that Sender: have to be a human user (not a program or similia). envelope can mailgate user.
+
+.
+
+.\" This next request is for sections 1, 6, 7 & 8 only
+.\" (command return values (to shell) and
+.\" fprintf/stderr type diagnostics)
+.\" .Sh DIAGNOSTICS
+.\" The next request is for sections 2 and 3 error
+.\" and signal handling only.
+.\" .Sh ERRORS
+.\" .Sh SEE ALSO
+.\" .Sh STANDARDS
+.\" .Sh HISTORY
+.Sh AUTHORS
+Cosimo Alfarano <alfarano@students.cs.unibo.it>
+.Sh BUGS
+Boh. send any bug to the author
+.An , please.
+
diff --git a/wlp/C/Makefile b/wlp/C/Makefile
index 6bc8fc3..961690d 100644
--- a/wlp/C/Makefile
+++ b/wlp/C/Makefile
@@ -9,6 +9,11 @@ AROPTS=-rs
FLEXOPTS=
YACCOPTS=-d
+CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
+CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
+CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS)
+LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
+
SRCDIR=.
BINDIR=.
@@ -40,4 +45,4 @@ structs:
$(CC) $(CCSHARED) $(CCOPTS) -c structs.c -o structs.o
clean:
- -rm $(OBJFILE) lex.yy.c commands.tab.h commands.tab.c wlp.a yytest
+ rm -f $(OBJFILE) lex.yy.c commands.tab.h commands.tab.c wlp.a yytest
diff --git a/wlp/C/commands.y b/wlp/C/commands.y
index 8b720d7..e6cfb18 100644
--- a/wlp/C/commands.y
+++ b/wlp/C/commands.y
@@ -3,6 +3,7 @@
/*#define YYSTYPE char**/
/*#define DEBUG*/
#include "macro.h"
+#include "string.h"
%}
%union {
diff --git a/wlp/C/wlp.c b/wlp/C/wlp.c
index 8c0779d..6a36617 100644
--- a/wlp/C/wlp.c
+++ b/wlp/C/wlp.c
@@ -6,7 +6,6 @@
* Thanks to md for this useful formula. Beer is beer.
*/
-//#include <python/Python.h>
#include <Python.h>
#include <stdio.h>
#include <unistd.h>
@@ -20,8 +19,6 @@ static FILE *fd = NULL;
struct wlp_list_t *list;
static PyObject *node2dict(struct wlp_node_t *node);
-static PyObject *node2dict2(struct wlp_node_t *node);
-
@@ -37,7 +34,7 @@ static PyObject *wlp_setfilebyname(PyObject *self, PyObject *args) {
if (!PyArg_ParseTuple(args, "s", &file))
return NULL;
- if(fd = fopen(file,"r")) {
+ if((fd = fopen(file,"r"))) {
return Py_None;
} else {
PyErr_SetFromErrno(PyExc_Exception);
@@ -144,32 +141,6 @@ static PyObject *node2dict(struct wlp_node_t *node) {
}
-
-/*
- * node2dict2(): transoform a wlp_node_t node in a python dictionary of the form
- * { 'owner': ownername, var: val}
- * it's currently unused (obsoleted)
- */
-
-static PyObject *node2dict2(struct wlp_node_t *node) {
- PyObject *dict = PyDict_New();
-
- if(!dict)
- dict = Py_None;
- else {
- PyDict_SetItem(dict,
- Py_BuildValue("s","owner"),
- Py_BuildValue("s",node->owner));
-
- PyDict_SetItem(dict,
- Py_BuildValue("s",node->left),
- Py_BuildValue("s",node->right));
- }
-
- return dict;
-
-}
-
static PyMethodDef wlp_methods[] = {
{"mkdict", wlp_mkdict, METH_VARARGS},
{"setfilebyname", wlp_setfilebyname, METH_VARARGS},
diff --git a/wlp/Makefile b/wlp/Makefile
index 4e180d1..7480b47 100644
--- a/wlp/Makefile
+++ b/wlp/Makefile
@@ -28,15 +28,15 @@ makemodule:
clean: cleanmodule cleansrc
- -rm $(BINDIR)/*.so
+ rm -f $(BINDIR)/*.so
cleansrc:
- -$(MAKE) -C $(CSRCDIR) clean
+ $(MAKE) -C $(CSRCDIR) clean
cleanmodule:
- -$(MAKE) -C $(MODULEDIR) clean
- -rm $(MODULEDIR)/Makefile.pre $(MODULEDIR)/Makefile
- -rm $(MODULEDIR)/config.c
- -rm $(MODULEDIR)/sedscript
- -rm $(MODULEDIR)/Setup
+ @if test -f $(MODULEDIR)/Makefile; then $(MAKE) -C $(MODULEDIR) clean ;fi
+ rm -f $(MODULEDIR)/Makefile.pre $(MODULEDIR)/Makefile
+ rm -f $(MODULEDIR)/config.c
+ rm -f $(MODULEDIR)/sedscript
+ rm -f $(MODULEDIR)/Setup
diff --git a/wlp/README b/wlp/README
index a2f97a0..9c4d9b7 100644
--- a/wlp/README
+++ b/wlp/README
@@ -9,4 +9,4 @@ make -C module # to really make .so python module
Please, remeber to report full output.
-Cosimo Alfarano <alfarano@cs.unibo.it>
+Cosimo Alfarano <kalfa@debian.org>
diff --git a/wlp/module/Makefile.pre.in b/wlp/module/Makefile.pre.in
index 05f108b..fce3177 100644
--- a/wlp/module/Makefile.pre.in
+++ b/wlp/module/Makefile.pre.in
@@ -94,8 +94,12 @@ TARGET= python
# Installed python binary (used only by boot target)
PYTHON= python
+CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
# Add more -I and -D options here
-CFLAGS= $(OPT) -I$(INCLUDEPY) -I$(EXECINCLUDEPY) $(DEFS)
+CFLAGS=$(OPT) -I$(INCLUDEPY) -I$(EXECINCLUDEPY) $(DEFS) $(shell dpkg-buildflags --get CFLAGS)
+CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS)
+LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
+
# These two variables can be set in Setup to merge extensions.
# See example[23].
@@ -126,12 +130,13 @@ RANLIB= @RANLIB@
MACHDEP= @MACHDEP@
SO= @SO@
LDSHARED= @LDSHARED@
+BLDSHARED= @BLDSHARED@
CCSHARED= @CCSHARED@
LINKFORSHARED= @LINKFORSHARED@
CXX= @CXX@
# Install prefix for architecture-independent files
-prefix= /usr/local
+prefix= /usr
# Install prefix for architecture-dependent files
exec_prefix= $(prefix)
@@ -264,6 +269,7 @@ sedscript: $(MAKEFILE)
-e '/^MACHDEP=/s/^MACHDEP=[ ]*\(.*\)/s%@MACHDEP[@]%\1%/p' \
-e '/^SO=/s/^SO=[ ]*\(.*\)/s%@SO[@]%\1%/p' \
-e '/^LDSHARED=/s/^LDSHARED=[ ]*\(.*\)/s%@LDSHARED[@]%\1%/p' \
+ -e '/^BLDSHARED=/s/^BLDSHARED=[ ]*\(.*\)/s%@BLDSHARED[@]%\1%/p' \
-e '/^CCSHARED=/s/^CCSHARED=[ ]*\(.*\)/s%@CCSHARED[@]%\1%/p' \
-e '/^SGI_ABI=/s/^SGI_ABI=[ ]*\(.*\)/s%@SGI_ABI[@]%\1%/p' \
-e '/^$L=/s/^$L=[ ]*\(.*\)/s%@$L[@]%\1%/p' \