You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
(5) |
Apr
(5) |
May
(23) |
Jun
|
Jul
(11) |
Aug
(3) |
Sep
(1) |
Oct
(8) |
Nov
(24) |
Dec
(3) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(17) |
Feb
(5) |
Mar
(18) |
Apr
(10) |
May
(4) |
Jun
(5) |
Jul
(67) |
Aug
(7) |
Sep
(4) |
Oct
(2) |
Nov
(4) |
Dec
(9) |
2004 |
Jan
(16) |
Feb
(4) |
Mar
(7) |
Apr
(5) |
May
(4) |
Jun
(5) |
Jul
(3) |
Aug
(3) |
Sep
(3) |
Oct
(8) |
Nov
|
Dec
|
2005 |
Jan
(5) |
Feb
(6) |
Mar
(4) |
Apr
(1) |
May
(2) |
Jun
(2) |
Jul
(1) |
Aug
|
Sep
(5) |
Oct
(1) |
Nov
|
Dec
(7) |
2006 |
Jan
(10) |
Feb
(4) |
Mar
(10) |
Apr
(8) |
May
(8) |
Jun
(14) |
Jul
(7) |
Aug
(4) |
Sep
(4) |
Oct
(24) |
Nov
(29) |
Dec
(10) |
2007 |
Jan
(5) |
Feb
(12) |
Mar
(11) |
Apr
(10) |
May
(3) |
Jun
(3) |
Jul
(15) |
Aug
(28) |
Sep
(8) |
Oct
(5) |
Nov
(8) |
Dec
(13) |
2008 |
Jan
(7) |
Feb
(11) |
Mar
(29) |
Apr
(28) |
May
(17) |
Jun
(9) |
Jul
(18) |
Aug
(7) |
Sep
(8) |
Oct
(9) |
Nov
(11) |
Dec
(53) |
2009 |
Jan
(112) |
Feb
(19) |
Mar
(46) |
Apr
(32) |
May
(90) |
Jun
(91) |
Jul
(33) |
Aug
(11) |
Sep
(16) |
Oct
(23) |
Nov
(15) |
Dec
(3) |
2010 |
Jan
(1) |
Feb
|
Mar
(37) |
Apr
(47) |
May
(66) |
Jun
(69) |
Jul
(29) |
Aug
(45) |
Sep
(23) |
Oct
(3) |
Nov
(1) |
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2012 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(2) |
Jun
(1) |
Jul
(3) |
Aug
(6) |
Sep
(1) |
Oct
(7) |
Nov
(1) |
Dec
(1) |
2014 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(1) |
2015 |
Jan
(2) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
(3) |
2016 |
Jan
(4) |
Feb
(5) |
Mar
(2) |
Apr
|
May
|
Jun
(2) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
(1) |
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
(1) |
Mar
(25) |
Apr
(3) |
May
(1) |
Jun
(2) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
(5) |
Dec
(1) |
2019 |
Jan
|
Feb
|
Mar
(1) |
Apr
(1) |
May
(1) |
Jun
(4) |
Jul
(3) |
Aug
|
Sep
(3) |
Oct
(6) |
Nov
(1) |
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2022 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(1) |
2023 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2024 |
Jan
(2) |
Feb
(2) |
Mar
(5) |
Apr
(2) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2025 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Barry W. <bw...@us...> - 2002-05-23 20:21:08
|
Update of /cvsroot/cvs-syncmail/syncmail In directory usw-pr-cvs1:/tmp/cvs-serv21110 Modified Files: syncmail Log Message: Bump version to 1.2. blast_mail(): Substitution typo. Index: syncmail =================================================================== RCS file: /cvsroot/cvs-syncmail/syncmail/syncmail,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- syncmail 23 May 2002 19:55:04 -0000 1.15 +++ syncmail 23 May 2002 20:21:04 -0000 1.16 @@ -71,7 +71,7 @@ email-addrs At least one email address. """ -__version__ = '1.1' +__version__ = '1.2' import os import sys @@ -246,7 +246,7 @@ print calculate_diff(file, contextlines) finally: sys.stdout = sys.__stdout__ - resp = conn.sendmail(author, people, s.getvalue()) + resp = conn.sendmail(address, people, s.getvalue()) conn.close() os._exit(0) |
From: Sebastian U. <ud...@ha...> - 2002-05-23 20:04:57
|
On Thu, 23 May 2002, ba...@zo... (Barry A. Warsaw) wrote: > Date: Thu, 23 May 2002 15:56:51 -0400 > To: ud...@ha... > From: ba...@zo... (Barry A. Warsaw) > CC: cvs...@li... > Subject: Re: [Cvs-syncmail] CVSROOT syncmail,1.10,1.11 > > > >>>>> "SU" == Sebastian Ude <ud...@ha...> writes: > > SU> That was fast :). > > SU> But didn't you forget to add > > SU> 'name' : name > > Indeed, you just haven't gotten the next checkin msg yet! :) I can guess why :). > Boy, debugging this thing in-situ /really/ sucks. Yep. - Sebastian |
From: <ba...@zo...> - 2002-05-23 19:57:01
|
>>>>> "SU" == Sebastian Ude <ud...@ha...> writes: SU> That was fast :). SU> But didn't you forget to add SU> 'name' : name Indeed, you just haven't gotten the next checkin msg yet! :) Boy, debugging this thing in-situ /really/ sucks. -Barry |
From: Sebastian U. <ud...@ha...> - 2002-05-23 19:55:57
|
On Thu, 23 May 2002, bw...@us... wrote: > Date: Thu, 23 May 2002 12:45:28 -0700 > To: cvs...@li... > From: bw...@us... > Subject: [Cvs-syncmail] CVSROOT syncmail,1.10,1.11 > > Update of /cvsroot/cvs-syncmail/CVSROOT > In directory usw-pr-cvs1:/tmp/cvs-serv11428 > > Modified Files: > syncmail > Log Message: > Sebastian Ude's patch to include the realname of the developer That was fast :). But didn't you forget to add 'name' : name here: > +''' % {'address' : address, > + 'people' : string.join(people, COMMASPACE), > + 'subject' : subject, > + 'version' : __version__, > } - Sebastian |
From: <bw...@us...> - 2002-05-23 19:45:30
|
Update of /cvsroot/cvs-syncmail/CVSROOT In directory usw-pr-cvs1:/tmp/cvs-serv11428 Modified Files: syncmail Log Message: Sebastian Ude's patch to include the realname of the developer Index: syncmail =================================================================== RCS file: /cvsroot/cvs-syncmail/CVSROOT/syncmail,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- syncmail 23 May 2002 17:52:23 -0000 1.10 +++ syncmail 23 May 2002 19:45:26 -0000 1.11 @@ -222,20 +222,21 @@ conn = smtplib.SMTP() conn.connect(MAILHOST, MAILPORT) user = pwd.getpwuid(os.getuid())[0] + name = pwd.getpwuid(os.getuid())[4] domain = fromhost or getfqdn() - author = '%s@%s' % (user, domain) + address = '%s@%s' % (user, domain) s = StringIO() sys.stdout = s try: print '''\ -From: %(author)s +From: %(name)s <%(address)s> To: %(people)s Subject: %(subject)s X-Mailer: Python syncmail %(version)s <http://sf.net/projects/cvs-syncmail> -''' % {'author' : author, - 'people' : string.join(people, COMMASPACE), - 'subject': subject, - 'version': __version__, +''' % {'address' : address, + 'people' : string.join(people, COMMASPACE), + 'subject' : subject, + 'version' : __version__, } s.write(sys.stdin.read()) # append the diffs if available |
From: Sebastian U. <ud...@ha...> - 2002-05-23 19:21:16
|
On Thu, 23 May 2002, bw...@us... wrote: > Date: Thu, 23 May 2002 10:52:45 -0700 > To: cvs...@li... > From: bw...@us... > Subject: [Cvs-syncmail] syncmail syncmail,1.12,1.13 > > Update of /cvsroot/cvs-syncmail/syncmail > In directory usw-pr-cvs1:/tmp/cvs-serv8475 > > Modified Files: > syncmail > Log Message: > Add an X-Mailer: header. Fine. What about the author / real name patch that I sent to the list some time ago ? - Sebastian |
From: <bw...@us...> - 2002-05-23 17:52:46
|
Update of /cvsroot/cvs-syncmail/syncmail In directory usw-pr-cvs1:/tmp/cvs-serv8475 Modified Files: syncmail Log Message: Add an X-Mailer: header. Index: syncmail =================================================================== RCS file: /cvsroot/cvs-syncmail/syncmail/syncmail,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- syncmail 2 May 2002 19:25:36 -0000 1.12 +++ syncmail 23 May 2002 17:52:42 -0000 1.13 @@ -71,6 +71,8 @@ email-addrs At least one email address. """ +__version__ = '1.1' + import os import sys import re @@ -229,9 +231,11 @@ From: %(author)s To: %(people)s Subject: %(subject)s +X-Mailer: Python syncmail %(version)s <http://sf.net/projects/cvs-syncmail> ''' % {'author' : author, 'people' : string.join(people, COMMASPACE), 'subject': subject, + 'version': __version__, } s.write(sys.stdin.read()) # append the diffs if available |
From: <bw...@us...> - 2002-05-23 17:52:28
|
Update of /cvsroot/cvs-syncmail/CVSROOT In directory usw-pr-cvs1:/tmp/cvs-serv8384 Modified Files: syncmail Log Message: Add an X-Mailer: header Index: syncmail =================================================================== RCS file: /cvsroot/cvs-syncmail/CVSROOT/syncmail,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- syncmail 2 May 2002 19:24:11 -0000 1.9 +++ syncmail 23 May 2002 17:52:23 -0000 1.10 @@ -71,6 +71,8 @@ email-addrs At least one email address. """ +__version__ = '1.1' + import os import sys import re @@ -229,9 +231,11 @@ From: %(author)s To: %(people)s Subject: %(subject)s +X-Mailer: Python syncmail %(version)s <http://sf.net/projects/cvs-syncmail> ''' % {'author' : author, 'people' : string.join(people, COMMASPACE), 'subject': subject, + 'version': __version__, } s.write(sys.stdin.read()) # append the diffs if available |
From: Sebastian U. <ud...@ha...> - 2002-05-08 16:34:58
|
I attached a patch against syncmail 1.0 that adds the realname of a developer to the mail header. Regards, Sebastian |
From: Bernhard R. <ber...@in...> - 2002-05-06 20:45:30
|
It looks like there is forked syncmail version maintained at: http://ibiblio.org/ser/cvs/index.cgi/CVSROOT/log_diff.py Seems to be forked before the syncmail project was created. I thought I'd just let you know... Maybe the other version has potential to inspire you. :) |
From: Stephan D. <S.D...@gm...> - 2002-05-06 07:24:37
|
Hello, first of all: Great script ! But ... ;) syncmail works really fine if giving an email address in the loginfo file. But if giving it an sourceforge mailinglist, it says : Mailing jai...@li..., S.D...@gm... .... Generating notification message... Generating notification message... done. but it doesnt send something to the list. The mail to my Email-addy works fine. My list is configured so that everyone can post. Thanks for help, Stephan |
From: <bw...@us...> - 2002-05-03 22:39:32
|
Update of /cvsroot/cvs-syncmail/syncmail In directory usw-pr-cvs1:/tmp/cvs-serv18068 Added Files: README Log Message: A simple README file. --- NEW FILE: README --- README for syncmail, a notification program for CVS checkins. syncmail is a script that is used to provide email notification of changes to a CVS repository. For more information, including installation instructions, read the syncmail(1) manpage, or type "syncmail --help". This project is maintained at SourceForge: http://sourceforge.net/projects/cvs-syncmail/ And there is a mailing list for discussing syncmail: cvs...@li... Our thanks to Zooko for helping improve the security of the script. -Barry Warsaw & Fred Drake (maintainers) |
From: <fd...@us...> - 2002-05-03 21:07:59
|
Update of /cvsroot/cvs-syncmail/CVSROOT In directory usw-pr-cvs1:/tmp/cvs-serv12224 Modified Files: loginfo Log Message: Test commit to see if removing the -f works now on SF. Index: loginfo =================================================================== RCS file: /cvsroot/cvs-syncmail/CVSROOT/loginfo,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 |
From: <fd...@us...> - 2002-05-03 21:07:03
|
Update of /cvsroot/cvs-syncmail/CVSROOT In directory usw-pr-cvs1:/tmp/cvs-serv11943 Modified Files: loginfo Log Message: Remove the -f option, in the hope that the SF MTA is working now. Index: loginfo =================================================================== RCS file: /cvsroot/cvs-syncmail/CVSROOT/loginfo,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- loginfo 3 May 2002 18:06:17 -0000 1.5 +++ loginfo 3 May 2002 21:06:59 -0000 1.6 @@ -26,4 +26,4 @@ # or #DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog -DEFAULT $CVSROOT/CVSROOT/syncmail -f users.sourceforge.net -q -u %{sVv} cvs...@li... +DEFAULT $CVSROOT/CVSROOT/syncmail -q -u %{sVv} cvs...@li... |
From: <fd...@us...> - 2002-05-03 20:37:10
|
Update of /cvsroot/cvs-syncmail/syncmail/doc In directory usw-pr-cvs1:/tmp/cvs-serv3688 Added Files: syncmail.1 syncmail.sgml Log Message: Man page for syncmail. --- NEW FILE: syncmail.1 --- .\" This manpage has been automatically generated by docbook2man .\" from a DocBook document. This tool can be found at: .\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng <st...@gg...>. .TH "SYNCMAIL" "1" "03 May 2002" "" "" .SH NAME syncmail \- Send email notifications of CVS activity .SH SYNOPSIS \fBsyncmail\fR [ \fB--cvsroot \fIpath\fB\fR] [ \fB [ [ --context] [ -C] ] \fIlines\fB\fR] [ \fB-c\fR] [ \fB-u\fR] [ \fB--quiet | -q\fR] [ \fB--fromhost \fIhostname\fB\fR] [ \fB-f \fIhostname\fB\fR] [ \fB--help | -h\fR] \fB%{sSv}\fR \fBemail\fR\fI ...\fR .SH "DESCRIPTION" .PP \fBsyncmail\fR sends out notifications of CVS commits via email, including the patch that was applied for changed files, the content of new files, or notes about files that were removed. .PP In any large project, keeping track of changes is difficult. CVS does a reasonable job of allowing source changes to be controlled and managed, but does not provide tools to make it easier to work with a changing code base. The hardest part of working on a dynamic project with many changing modules is knowing when changes occur, and what those changes are. .PP Software developers often are heavy email users, spending huge amounts of time working with their email software. Open source developers are among the most serious email addicts out there, sorting through hundreds of emails a day, since this is often the only way to stay in touch with users and fellow developers. .PP \fBClearly, we need more email.\fR .PP syncmail works by integrating with CVS in the repository using the configuration files in the repository's CVSROOT module. When CVS executes commands from the \fIloginfo\fR file, syncmail is invoked if its been configured, and it sends email to one or more email addresses specified on the command line. .SH "SETTING UP SYNCMAIL" .PP Setting up syncmail is not difficult, but there are usually several steps: .TP 1. Set up a mailing list. Strictly speaking, this is optional, but with most good mailing list managers, it's easier to maintain a mailing list than it is to continually update a list of individual email addresses on the syncmail command line. How this is done depends on many things, but not syncmail, so will not be further covered here. .TP 2. Install syncmail. This is usually done by adding it to your CVS repository, but it may be located in a directory on the default \fBPATH\fR, or just about anywhere else. .TP 3. Configure CVS to invoke syncmail. This is a matter of adding and/or changing some of the configuration files in the CVSROOT module in the repository. .SS "INSTALL SYNCMAIL" .PP syncmail consists of a single Python script; it does not need any supplemental data files. There are two approaches to installing the script: check it into the repository, or place it in a shared location on the CVS server. .PP To install syncmail by checking it into the repository itself, check out a working copy of the CVSROOT module. Add the name syncmail to the file \fIcheckoutlist\fR in that directory as well, and commit that change. This will cause a copy of syncmail to be checked out into the repository itself. Copy te syncmail script into the directory, make sure that it is executable by everyone (you should use \fBchmod a+x syncmail\fR for this), and use the \fBcvs add\fR and \fBcvs commit\fR commands to add it to the repository. Once the commit is complete, a checked-out copy of the syncmail script should be located in the repository in the \fICVSROOT\fR directory in the repository. This is the usual way of integrating syncmail into a CVS repository. .PP To install syncmail outside of the repository, find a location for the script. This can be in a "bin" directory such as \fI/usr/local/bin/\fR, or can be in some other location. The only requirement is that all users of the repository be able to execute the script (you should use \fBchmod a+x syncmail\fR for this). This approach requires direct access to the CVS server machine, and is most useful if several repositories are going to share a single copy of syncmail (maybe to ensure the same version is used for each; it's not large enough for disk space to be an issue). .SS "CONFIGURE CVS TO USE SYNCMAIL" .PP Getting the CVS server to invoke syncmail requires editing one more file in the CVSROOT module of the repository. Even if you're using a single installation of syncmail, this configuration needs to be performed for each repository. .PP The \fIloginfo\fR file in the CVSROOT module needs to be modified to invoke syncmail when appropriate. Just when is appropriate depends entirely on your project. If your \fIloginfo\fR file still contains the comments that \fBcvs init\fR copies in, this is a good time to read them if you haven't. If the file does not already contain any configuration lines, you can simply add to the end of the file. .PP Here are two example lines to get you started: .nf CVSROOT $CVSROOT/CVSROOT/syncmail %{sVv} yo...@ex... DEFAULT $CVSROOT/CVSROOT/syncmail %{sVv} myp...@ex... .fi .PP This will cause email to be sent to two different places, with which depending on what files in the repository are affected. For administrative files in the CVSROOT module, email will be sent to <yo...@ex...>; you should probably list all your project administrators here. For all other files, email will be sent to the addresses you specify. .PP If you have several sub-products for which you want different checkin lists, you can change the "DEFAULT" label to match the subtree that you want to go to each list, with a separate line for each distinct prefix. For example, if your repository includes the modules "one" and "two", you could use the following: .nf CVSROOT $CVSROOT/CVSROOT/syncmail %{sVv} yo...@ex... one/ $CVSROOT/CVSROOT/syncmail %{sVv} myp...@ex... two/ $CVSROOT/CVSROOT/syncmail %{sVv} myp...@ex... .fi .PP Note that %{sSv} is magic that CVS understands and replaces with information about the files that are affected; be sure to enter that exactly as shown, just before the email addresses. Command line options for syncmail should be placed between the name of the syncmail command and the %{sSv}. .PP You can still have a "DEFAULT" line that gets used for any additional subprojects. .PP If you do \fBnot\fR have a stock \fIloginfo\fR file, then you can probably figure out what you need to do to combine the information above with your existing changes. If the command lines in the file become too long for comfort, some helper scripts can be added to the CVSROOT module (remember to add their names to the \fIcheckoutlist\fR as well!). .PP To finish the repository configuration, commit the changes you've made. Once the CVS server has reported that it is "Rebuilding administrative file database", your repository is configured to use syncmail. .SH "OPTIONS" .PP When an option includes an argument, you may specify the argument either separate ("-d output") or mashed ("-doutput"). syncmail supports both. For long options which include an argument, the argument may be separated from the option ("--fromhost example.com") or mashed, but with an equals sign between the option and the argument ("--fromhost=example.com"). .TP \fB--cvsroot \fIpath\fB\fR Use \fIpath\fR as the value for the \fBCVSROOT\fR environment variable. This is usually not needed. .TP \fB--context \fIlines\fB\fR .TP \fB-C \fIlines\fB\fR Generate context diffs with \fIlines\fR lines of context displayed on either side of the changed portion. .TP \fB-c\fR Generate context diffs with two lines of context shown on either side of the changed portion. This is the default. .TP \fB-u\fR Generate unified diffs instead of context diffs. Unified diffs are typically shorted than context diffs, but many users find it easier to read context diffs. .TP \fB--quiet\fR .TP \fB-q\fR Do not display progress information to the user. By default, syncmail will display the email addresses it is sending mail to and note when it starts generating the notification email and when it is done sending the email. .TP \fB--fromhost \fIhostname\fB\fR .TP \fB-f \fIhostname\fB\fR Specify the host name that email should appear to come from. By default, syncmail uses the fully qualified name for the host it's running on, and lets the local MTA take care of host name translation. .TP \fB--help\fR .TP \fB-h\fR For some reason, syncmail specifically ignores "--" anywhere it appears on the command line. .SH "BUGS" .PP There are probably some bugs. If you find them, please report them to the maintainers using the bug tracker <URL:http://sourceforge.net/projects/cvs-syncmail/>. .SH "ALTERNATIVES" .PP Other people have written tools that serve similar purposes, but not all of these are meant to support CVS repositories accessed from remote locations (anything other than direct filesystem access). .PP Please inform the syncmail maintainers if you can provide current references to these efforts. .SH "SEE ALSO" .PP The syncmail page <URL:http://sourceforge.net/projects/cvs-syncmail/> on SourceForge <URL:http://sourceforge.net/>. .PP The CVS home page <URL:http://www.cvshome.org/>. .SH "AUTHOR" .PP syncmail was originally written by Barry Warsaw to send mail based on checkins to the Python project. Barry continues to maintain syncmail with help from Fred L. Drake, Jr. and others. .PP This manual page was written by Fred L. Drake, Jr. <fd...@ac...>. --- NEW FILE: syncmail.sgml --- <!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [ <!-- Process this file with docbook-to-man to generate an nroff manual page: `docbook-to-man manpage.sgml > manpage.1'. You may view the manual page with: `docbook-to-man manpage.sgml | nroff -man | less'. A typical entry in a Makefile or Makefile.am is: manpage.1: manpage.sgml docbook-to-man $< > $@ --> <!-- Fill in your name for FIRSTNAME and SURNAME. --> <!ENTITY dhfirstname "<firstname>Fred</firstname>"> <!ENTITY dhsurname "<surname>Drake</surname>"> <!-- Please adjust the date whenever revising the manpage. --> <!ENTITY dhdate "<date>May 3, 2002</date>"> <!-- SECTION should be 1-8, maybe w/ subsection other parameters are allowed: see man(7), man(1). --> <!ENTITY dhsection "<manvolnum>1</manvolnum>"> <!ENTITY dhemail "<email>fd...@ac...</email>"> <!ENTITY dhusername "Fred L. Drake, Jr."> <!ENTITY dhucpackage "<refentrytitle>SYNCMAIL</refentrytitle>"> <!ENTITY dhpackage "syncmail"> <!ENTITY debian "<productname>Debian GNU/Linux</productname>"> <!ENTITY gnu "<acronym>GNU</acronym>"> <!ENTITY sourceforge "<ulink url='http://sourceforge.net/'>SourceForge</ulink>"> ]> <refentry> <refentryinfo> <address> &dhemail; </address> <author> &dhfirstname; &dhsurname; </author> <copyright> <year>2002</year> <holder>&dhusername;</holder> </copyright> &dhdate; </refentryinfo> <refmeta> &dhucpackage; &dhsection; </refmeta> <refnamediv> <refname>&dhpackage;</refname> <refpurpose>Send email notifications of CVS activity</refpurpose> </refnamediv> <refsynopsisdiv> <cmdsynopsis> <command>&dhpackage;</command> <arg>--cvsroot <replaceable>path</replaceable></arg> <arg><group><arg>--context</arg><arg>-C</arg></group> <replaceable>lines</replaceable></arg> <arg>-c</arg> <arg>-u</arg> <arg><option>--quiet</option> | <option>-q</option></arg> <arg>--fromhost <replaceable>hostname</replaceable></arg> <arg>-f <replaceable>hostname</replaceable></arg> <arg><option>--help</option> | <option>-h</option></arg> <arg choice="req">%{sSv}</arg> <arg choice="req" rep="repeat">email</arg> </cmdsynopsis> </refsynopsisdiv> <refsect1> <title>DESCRIPTION</title> <para> <command>&dhpackage;</command> sends out notifications of CVS commits via email, including the patch that was applied for changed files, the content of new files, or notes about files that were removed. </para> <para> In any large project, keeping track of changes is difficult. CVS does a reasonable job of allowing source changes to be controlled and managed, but does not provide tools to make it easier to work with a changing code base. The hardest part of working on a dynamic project with many changing modules is knowing when changes occur, and what those changes are. </para> <para> Software developers often are heavy email users, spending huge amounts of time working with their email software. Open source developers are among the most serious email addicts out there, sorting through hundreds of emails a day, since this is often the only way to stay in touch with users and fellow developers. </para> <para> <emphasis>Clearly, we need more email.</emphasis> </para> <para> &dhpackage; works by integrating with CVS in the repository using the configuration files in the repository's CVSROOT module. When CVS executes commands from the <filename>loginfo</filename> file, &dhpackage; is invoked if its been configured, and it sends email to one or more email addresses specified on the command line. </para> </refsect1> <refsect1> <title>SETTING UP SYNCMAIL</title> <para> Setting up &dhpackage; is not difficult, but there are usually several steps: </para> <orderedlist numeration="arabic"> <listitem> <para> Set up a mailing list. Strictly speaking, this is optional, but with most good mailing list managers, it's easier to maintain a mailing list than it is to continually update a list of individual email addresses on the &dhpackage; command line. How this is done depends on many things, but not &dhpackage;, so will not be further covered here. </para> </listitem> <listitem> <para> Install &dhpackage;. This is usually done by adding it to your CVS repository, but it may be located in a directory on the default <envar>PATH</envar>, or just about anywhere else. </para> </listitem> <listitem> <para> Configure CVS to invoke &dhpackage;. This is a matter of adding and/or changing some of the configuration files in the CVSROOT module in the repository. </para> </listitem> </orderedlist> <refsect2> <title>Install &dhpackage;</title> <para> &dhpackage; consists of a single Python script; it does not need any supplemental data files. There are two approaches to installing the script: <simplelist type="inline"> <member>check it into the repository</member> <member>or place it in a shared location on the CVS server</member> </simplelist>. </para> <para> To install &dhpackage; by checking it into the repository itself, check out a working copy of the CVSROOT module. Add the name <literal>syncmail</literal> to the file <filename>checkoutlist</filename> in that directory as well, and commit that change. This will cause a copy of &dhpackage; to be checked out into the repository itself. Copy te &dhpackage; script into the directory, make sure that it is executable by everyone (you should use <command>chmod a+x syncmail</command> for this), and use the <command>cvs add</command> and <command>cvs commit</command> commands to add it to the repository. Once the commit is complete, a checked-out copy of the &dhpackage; script should be located in the repository in the <filename class="directory">CVSROOT</filename> directory in the repository. This is the usual way of integrating &dhpackage; into a CVS repository. </para> <para> To install &dhpackage; outside of the repository, find a location for the script. This can be in a "bin" directory such as <filename class="directory">/usr/local/bin/</filename>, or can be in some other location. The only requirement is that all users of the repository be able to execute the script (you should use <command>chmod a+x syncmail</command> for this). This approach requires direct access to the CVS server machine, and is most useful if several repositories are going to share a single copy of &dhpackage; (maybe to ensure the same version is used for each; it's not large enough for disk space to be an issue). </para> </refsect2> <refsect2> <title>Configure CVS to use &dhpackage;</title> <para> Getting the CVS server to invoke &dhpackage; requires editing one more file in the CVSROOT module of the repository. Even if you're using a single installation of &dhpackage;, this configuration needs to be performed for each repository. </para> <para> The <filename>loginfo</filename> file in the CVSROOT module needs to be modified to invoke &dhpackage; when appropriate. Just when is appropriate depends entirely on your project. If your <filename>loginfo</filename> file still contains the comments that <command>cvs init</command> copies in, this is a good time to read them if you haven't. If the file does not already contain any configuration lines, you can simply add to the end of the file. </para> <para> Here are two example lines to get you started: <literallayout> CVSROOT $CVSROOT/CVSROOT/syncmail %{sVv} yo...@ex... DEFAULT $CVSROOT/CVSROOT/syncmail %{sVv} myp...@ex... </literallayout> </para> <para> This will cause email to be sent to two different places, with which depending on what files in the repository are affected. For administrative files in the CVSROOT module, email will be sent to <email>yo...@ex...</email>; you should probably list all your project administrators here. For all other files, email will be sent to the addresses you specify. </para> <para> If you have several sub-products for which you want different checkin lists, you can change the "DEFAULT" label to match the subtree that you want to go to each list, with a separate line for each distinct prefix. For example, if your repository includes the modules "one" and "two", you could use the following: <literallayout> CVSROOT $CVSROOT/CVSROOT/syncmail %{sVv} yo...@ex... one/ $CVSROOT/CVSROOT/syncmail %{sVv} myp...@ex... two/ $CVSROOT/CVSROOT/syncmail %{sVv} myp...@ex... </literallayout> </para> <para> Note that <literal>%{sSv}</literal> is magic that CVS understands and replaces with information about the files that are affected; be sure to enter that exactly as shown, just before the email addresses. Command line options for &dhpackage; should be placed between the name of the &dhpackage; command and the <literal>%{sSv}</literal>. </para> <para> You can still have a "DEFAULT" line that gets used for any additional subprojects. </para> <para> If you do <emphasis>not</emphasis> have a stock <filename>loginfo</filename> file, then you can probably figure out what you need to do to combine the information above with your existing changes. If the command lines in the file become too long for comfort, some helper scripts can be added to the CVSROOT module (remember to add their names to the <filename>checkoutlist</filename> as well!). </para> <para> To finish the repository configuration, commit the changes you've made. Once the CVS server has reported that it is "Rebuilding administrative file database", your repository is configured to use &dhpackage;. </para> </refsect2> </refsect1> <refsect1> <title>OPTIONS</title> <para> When an option includes an argument, you may specify the argument either separate ("-d output") or mashed ("-doutput"). &dhpackage; supports both. For long options which include an argument, the argument may be separated from the option ("--fromhost example.com") or mashed, but with an equals sign between the option and the argument ("--fromhost=example.com"). </para> <variablelist> <varlistentry> <term><option>--cvsroot <replaceable>path</replaceable></option></term> <listitem> <para> Use <replaceable>path</replaceable> as the value for the <envar>CVSROOT</envar> environment variable. This is usually not needed. </para> </listitem> </varlistentry> <varlistentry> <term><option>--context <replaceable>lines</replaceable></option></term> <term><option>-C <replaceable>lines</replaceable></option></term> <listitem> <para> Generate context diffs with <replaceable>lines</replaceable> lines of context displayed on either side of the changed portion. </para> </listitem> </varlistentry> <varlistentry> <term><option>-c</option></term> <listitem> <para> Generate context diffs with two lines of context shown on either side of the changed portion. This is the default. </para> </listitem> </varlistentry> <varlistentry> <term><option>-u</option></term> <listitem> <para> Generate unified diffs instead of context diffs. Unified diffs are typically shorted than context diffs, but many users find it easier to read context diffs. </para> </listitem> </varlistentry> <varlistentry> <term><option>--quiet</option></term> <term><option>-q</option></term> <listitem> <para> Do not display progress information to the user. By default, &dhpackage; will display the email addresses it is sending mail to and note when it starts generating the notification email and when it is done sending the email. </para> </listitem> </varlistentry> <varlistentry> <term><option>--fromhost <replaceable>hostname</replaceable></option></term> <term><option>-f <replaceable>hostname</replaceable></option></term> <listitem> <para> Specify the host name that email should appear to come from. By default, &dhpackage; uses the fully qualified name for the host it's running on, and lets the local MTA take care of host name translation. </para> </listitem> </varlistentry> <varlistentry> <term><option>--help</option></term> <term><option>-h</option></term> <listitem> <para> For some reason, &dhpackage; specifically ignores "--" anywhere it appears on the command line. </para> </listitem> </varlistentry> </variablelist> </refsect1> <refsect1> <title>BUGS</title> <para> There are probably some bugs. If you find them, please report them to the maintainers using the <ulink url="http://sourceforge.net/projects/cvs-syncmail/">bug tracker</ulink>. </para> </refsect1> <refsect1> <title>ALTERNATIVES</title> <para> Other people have written tools that serve similar purposes, but not all of these are meant to support CVS repositories accessed from remote locations (anything other than direct filesystem access). </para> <para> Please inform the &dhpackage; maintainers if you can provide current references to these efforts. </para> </refsect1> <refsect1> <title>SEE ALSO</title> <para> The <ulink url="http://sourceforge.net/projects/cvs-syncmail/" >&dhpackage; page</ulink> on &sourceforge;. </para> <para> The <ulink url="http://www.cvshome.org/">CVS home page</ulink>. </para> </refsect1> <refsect1> <title>AUTHOR</title> <para> &dhpackage; was originally written by Barry Warsaw to send mail based on checkins to the Python project. Barry continues to maintain &dhpackage; with help from &dhusername; and others. </para> <para> This manual page was written by &dhusername; &dhemail;. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:2 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:nil sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: --> |
From: <fd...@us...> - 2002-05-03 19:10:44
|
Update of /cvsroot/cvs-syncmail/syncmail/doc In directory usw-pr-cvs1:/tmp/cvs-serv9182 Added Files: .cvsignore Log Message: Ignore docbook2man turds. --- NEW FILE: .cvsignore --- manpage.links manpage.refs |
From: Fred L. D. Jr. <fd...@ac...> - 2002-05-03 18:35:42
|
fd...@us... writes: > Update of /cvsroot/cvs-syncmail/CVSROOT > In directory usw-pr-cvs1:/tmp/cvs-serv21482 > > Modified Files: > loginfo > Log Message: > Test commit to see if using -f gets mail through SF. Only needed until the > MTA configuration at SF is fixed. Yes, sad but true. Barry's reported this to someone who should be able to get it fixed. Well, at least using -f/--fromhost makes this work! > _______________________________________________________________ > > Have big pipes? SourceForge.net is looking for download mirrors. We supply > the hardware. You get the recognition. Email Us: ban...@so... > _______________________________________________ Ugh! I hate ads at the bottom of otherwise acceptable emails! -Fred -- Fred L. Drake, Jr. <fdrake at acm.org> PythonLabs at Zope Corporation |
From: <fd...@us...> - 2002-05-03 18:06:24
|
Update of /cvsroot/cvs-syncmail/CVSROOT In directory usw-pr-cvs1:/tmp/cvs-serv21482 Modified Files: loginfo Log Message: Test commit to see if using -f gets mail through SF. Only needed until the MTA configuration at SF is fixed. Index: loginfo =================================================================== RCS file: /cvsroot/cvs-syncmail/CVSROOT/loginfo,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 |
From: Zooko <zo...@zo...> - 2002-04-11 12:39:00
|
Here's a new version of my patch which generates subject lines from the contents of the log entry instead of from the file name and version number. This is diffed against current CVS head. I use this patch for several of my sourceforge projects [1]. Most of the syncmail messages go to mne...@li... [2]. [1] http://sourceforge.net/users/zooko [2] http://sourceforge.net/mailarchive/forum.php?forum_id=7725 Index: syncmail =================================================================== RCS file: /cvsroot/cvs-syncmail/syncmail/syncmail,v retrieving revision 1.11 diff -u -d -r1.11 syncmail --- syncmail 10 Apr 2002 21:36:35 -0000 1.11 +++ syncmail 11 Apr 2002 12:35:40 -0000 @@ -75,6 +75,9 @@ from cStringIO import StringIO +# How many characters of the subject line will be used up by a tag pre-pended by the mailing list software? (If this value is off by a few it doesn't hurt much.) +TAGLEN=len("[mnet-cvs] ") + # Which SMTP server to do we connect to? Empty string means localhost. MAILHOST = '' MAILPORT = 25 @@ -228,6 +231,31 @@ conn.close() os._exit(0) + +def abbreviate_logentry_for_subject(logentry): + WIDTHLIMIT = 80 - TAGLEN + SUBJECTSIZE = len('Subject: ') + LMstr='Log Message:' + i = string.find(logentry, LMstr) + if i == -1: + # Whoops. Whatever. The caller will fallback to old-style when it sees `None' + return None + subject = logentry[i+len(LMstr):] + while (len(subject) > 0) and (subject[0] not in string.letters+string.digits): + subject = subject[1:] # I have the feeling that there's a nicer way to do this... + # Now break at the first line break + i = string.find(subject, '\n') + if i == -1: + i = len(subject) + j = string.find(subject, '\r') + if j == -1: + j = len(subject) + subject = subject[:min(i,j)] + + if len(subject) < (WIDTHLIMIT - SUBJECTSIZE): + return subject + else: + return subject[:(WIDTHLIMIT - SUBJECTSIZE - 3)] + "..." # scan args for options @@ -256,13 +284,18 @@ elif opt in ('-q', '--quiet'): verbose = 0 + # The log entry is on stdin. --Zooko 2002-04-10 + logentry = sys.stdin.read() + subject = abbreviate_logentry_for_subject(logentry) + # What follows is the specification containing the files that were # modified. The argument actually must be split, with the first component # containing the directory the checkin is being made in, relative to # $CVSROOT, followed by the list of files that are changing. if not args: usage(1, 'No CVS module specified') - subject = args[0] + if subject is None: + subject = args[0] specs = string.split(args[0]) del args[0] |
From: Zooko <zo...@zo...> - 2002-04-10 23:58:03
|
I committed a patch to prevent any dangerous values from being execed in the popen call to `cvs'. http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/cvs-syncmail/syncmail/syncmail Curiously, the commit hasn't been mailed to cvs-syncmail-talk by syncmail yet... :-) Regards, Zooko --- zooko.com Security and Distributed Systems Engineering --- |
From: <bw...@lo...> - 2002-04-03 19:56:27
|
Update of /cvsroot/cvs-syncmail/CVSROOT In directory usw-pr-cvs1:/tmp/cvs-serv12536 Modified Files: syncmail Log Message: getdomain(): Use byaddr[0] instead of aliases[0] ;) Index: syncmail =================================================================== RCS file: /cvsroot/cvs-syncmail/CVSROOT/syncmail,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- syncmail 3 Apr 2002 19:25:00 -0000 1.5 +++ syncmail 3 Apr 2002 19:56:24 -0000 1.6 @@ -164,7 +164,7 @@ hostname = socket.gethostname() byaddr = socket.gethostbyaddr(socket.gethostbyname(hostname)) aliases = byaddr[1] - aliases.insert(0, aliases[0]) + aliases.insert(0, byaddr[0]) aliases.insert(0, hostname) for fqdn in aliases: if '.' in fqdn: |
From: <bw...@lo...> - 2002-04-03 19:26:06
|
Update of /cvsroot/cvs-syncmail/syncmail In directory usw-pr-cvs1:/tmp/cvs-serv1072 Modified Files: syncmail Log Message: More Python 2.x eradication Index: syncmail =================================================================== RCS file: /cvsroot/cvs-syncmail/syncmail/syncmail,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- syncmail 3 Apr 2002 19:15:54 -0000 1.5 +++ syncmail 3 Apr 2002 19:25:58 -0000 1.6 @@ -71,9 +71,9 @@ import getopt import smtplib import pwd +import socket from cStringIO import StringIO -from socket import gethostname # Which SMTP server to do we connect to? Empty string means localhost. MAILHOST = '' @@ -156,6 +156,26 @@ +def getdomain(): + try: + fqdn = socket.getfqdn() + except AttributeError: + # Python 1.5.2 :( + hostname = socket.gethostname() + byaddr = socket.gethostbyaddr(socket.gethostbyname(hostname)) + aliases = byaddr[1] + aliases.insert(0, aliases[0]) + aliases.insert(0, hostname) + for fqdn in aliases: + if '.' in fqdn: + break + else: + fqdn = 'localhost.localdomain' + parts = string.split(fqdn, DOT) + return string.join(parts[1:], DOT) + + + def blast_mail(subject, people, filestodiff, contextlines): # cannot wait for child process or that will cause parent to retain cvs # lock for too long. Urg! @@ -167,7 +187,7 @@ conn = smtplib.SMTP() conn.connect(MAILHOST, MAILPORT) user = pwd.getpwuid(os.getuid())[0] - domain = string.join(string.split(gethostname(), DOT)[1:], DOT) + domain = getdomain() author = '%s@%s' % (user, domain) s = StringIO() sys.stdout = s |
From: Barry W. <bw...@us...> - 2002-04-03 18:56:44
|
Update of /cvsroot/cvs-syncmail/CVSROOT In directory usw-pr-cvs1:/tmp/cvs-serv23986 Modified Files: loginfo syncmail Log Message: Switch to using unified diffs. Also, use the new -q/--quiet flag. Install the sync'd syncmail script. This merges in features used in the pydotorg project, namely, it uses string methods (Python 2.0 at least, required), and uses a direct smtplib connection instead of mucking about with /bin/mail. Index: loginfo =================================================================== RCS file: /cvsroot/cvs-syncmail/CVSROOT/loginfo,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** loginfo 25 Mar 2002 21:57:12 -0000 1.2 --- loginfo 3 Apr 2002 18:56:38 -0000 1.3 *************** *** 1,2 **** --- 1,3 ---- + # -*- ksh -*- # The "loginfo" file controls where "cvs commit" log information # is sent. The first entry on a line is a regular expression which must match *************** *** 26,28 **** #DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog ! DEFAULT $CVSROOT/CVSROOT/syncmail %{sVv} cvs...@li... --- 27,29 ---- #DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog ! DEFAULT $CVSROOT/CVSROOT/syncmail -q -u %{sVv} cvs...@li... Index: syncmail =================================================================== RCS file: /cvsroot/cvs-syncmail/CVSROOT/syncmail,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** syncmail 25 Mar 2002 21:59:19 -0000 1.1 --- syncmail 3 Apr 2002 18:56:38 -0000 1.2 *************** *** 1,4 **** #! /usr/bin/python - # -*- Python -*- """Complicated notification for CVS checkins. --- 1,3 ---- *************** *** 36,41 **** variable must exist in the environment. ! --help ! -h Print this text. --- 35,39 ---- variable must exist in the environment. ! --help / -h Print this text. *************** *** 48,52 **** -u ! Produce a unified diff (smaller, but harder to read). <%%S> --- 46,53 ---- -u ! Produce a unified diff (smaller). ! ! --quiet/-q ! Don't print as much status to stdout. <%%S> *************** *** 59,73 **** email-addrs At least one email address. - """ import os import sys - import string import time import getopt ! # Notification command ! MAILCMD = '/bin/mail -s "CVS: %(SUBJECT)s" %(PEOPLE)s 2>&1 > /dev/null' # Diff trimming stuff --- 60,78 ---- email-addrs At least one email address. """ import os import sys import time import getopt + import smtplib + import pwd ! from cStringIO import StringIO ! from socket import gethostname ! ! # Which SMTP server to do we connect to? Empty string means localhost. ! MAILHOST = '' ! MAILPORT = 25 # Diff trimming stuff *************** *** 76,79 **** --- 81,89 ---- DIFF_TRUNCATE_IF_LARGER = 1000 + EMPTYSTRING = '' + SPACE = ' ' + DOT = '.' + COMMASPACE = ', ' + PROGRAM = sys.argv[0] *************** *** 93,97 **** def calculate_diff(filespec, contextlines): try: ! file, oldrev, newrev = string.split(filespec, ',') except ValueError: # No diff to report --- 103,107 ---- def calculate_diff(filespec, contextlines): try: ! file, oldrev, newrev = filespec.split(',') except ValueError: # No diff to report *************** *** 109,113 **** # lines to figure it out: for line in lines[:5]: ! for c in string.rstrip(line): if c < ' ' or c > chr(127): lines = BINARY_EXPLANATION_LINES[:] --- 119,123 ---- # lines to figure it out: for line in lines[:5]: ! for c in line.rstrip(): if c < ' ' or c > chr(127): lines = BINARY_EXPLANATION_LINES[:] *************** *** 139,147 **** lines.insert(DIFF_HEAD_LINES, '[...%d lines suppressed...]\n' % removedlines) ! return string.join(lines, '') ! def blast_mail(mailcmd, filestodiff, contextlines): # cannot wait for child process or that will cause parent to retain cvs # lock for too long. Urg! --- 149,157 ---- lines.insert(DIFF_HEAD_LINES, '[...%d lines suppressed...]\n' % removedlines) ! return EMPTYSTRING.join(lines) ! def blast_mail(subject, people, filestodiff, contextlines): # cannot wait for child process or that will cause parent to retain cvs # lock for too long. Urg! *************** *** 150,162 **** # give up the lock you cvs thang! time.sleep(2) ! fp = os.popen(mailcmd, 'w') ! fp.write(sys.stdin.read()) ! fp.write('\n') # append the diffs if available for file in filestodiff: ! fp.write(calculate_diff(file, contextlines)) ! fp.write('\n') ! fp.close() ! # doesn't matter what code we return, it isn't waited on os._exit(0) --- 160,185 ---- # give up the lock you cvs thang! time.sleep(2) ! # Create the smtp connection to the localhost ! conn = smtplib.SMTP() ! conn.connect(MAILHOST, MAILPORT) ! user = pwd.getpwuid(os.getuid())[0] ! domain = DOT.join(gethostname().split(DOT)[1:]) ! author = '%s@%s' % (user, domain) ! s = StringIO() ! print >> s, '''\ ! From: %(author)s ! To: %(people)s ! Subject: %(subject)s ! ''' % {'author' : author, ! 'people' : COMMASPACE.join(people), ! 'subject': subject, ! } ! s.write(sys.stdin.read()) # append the diffs if available + print >> s for file in filestodiff: ! print >> s, calculate_diff(file, contextlines) ! resp = conn.sendmail(author, people, s.getvalue()) ! conn.close() os._exit(0) *************** *** 165,176 **** # scan args for options def main(): - contextlines = 2 try: ! opts, args = getopt.getopt(sys.argv[1:], 'hC:cu', ! ['context=', 'cvsroot=', 'help']) except getopt.error, msg: usage(1, msg) # parse the options for opt, arg in opts: if opt in ('-h', '--help'): --- 188,200 ---- # scan args for options def main(): try: ! opts, args = getopt.getopt(sys.argv[1:], 'hC:cuq', ! ['context=', 'cvsroot=', 'help', 'quiet']) except getopt.error, msg: usage(1, msg) # parse the options + contextlines = 2 + verbose = 1 for opt, arg in opts: if opt in ('-h', '--help'): *************** *** 185,188 **** --- 209,214 ---- elif opt == '-u': contextlines = 0 + elif opt in ('-q', '--quiet'): + verbose = 0 # What follows is the specification containing the files that were *************** *** 192,197 **** if not args: usage(1, 'No CVS module specified') ! SUBJECT = args[0] ! specs = string.split(args[0]) del args[0] --- 218,223 ---- if not args: usage(1, 'No CVS module specified') ! subject = args[0] ! specs = args[0].split() del args[0] *************** *** 201,208 **** # Now do the mail command ! PEOPLE = string.join(args) ! mailcmd = MAILCMD % vars() - print 'Mailing %s...' % PEOPLE if specs == ['-', 'Imported', 'sources']: return --- 227,235 ---- # Now do the mail command ! people = args ! ! if verbose: ! print 'Mailing %s...' % COMMASPACE.join(people) if specs == ['-', 'Imported', 'sources']: return *************** *** 213,224 **** for s in specs[2:]: prev = L[-1] ! if string.count(prev, ",") < 2: L[-1] = "%s %s" % (prev, s) else: L.append(s) specs = L ! print 'Generating notification message...' ! blast_mail(mailcmd, specs[1:], contextlines) ! print 'Generating notification message... done.' --- 240,254 ---- for s in specs[2:]: prev = L[-1] ! if prev.count(',') < 2: L[-1] = "%s %s" % (prev, s) else: L.append(s) specs = L ! ! if verbose: ! print 'Generating notification message...' ! blast_mail(subject, people, specs[1:], contextlines) ! if verbose: ! print 'Generating notification message... done.' |
From: Zooko <zo...@zo...> - 2002-03-27 12:13:15
|
[Cc: ro...@sf..., ro...@cv..., because I can't find an e-mail address @sf.net to which I should report this.] Folks: I experimented a bit and confirmed that with current HEAD version of syncmail it is indeed possible to invoke arbitrary shell commands like this: $ mkdir test\"\;eval $ touch test\"\;eval\ /whoami\;\"echo\ $ cvs add test\"\;eval\ /whoami\;\"echo\ $ cvs commit -m " Don't look -- it's too awful." I was able to run "whoami" on cvs.pyutil.sourceforge.net as user `zooko', despite the fact that the `zooko' account on that machine is a restricted shell which is disallowed from all actions other than invoking cvs. Here is a patch appended, named "Patch 3", which fixes this hole. You should also consider the prophylactic clean-up patch, "Patch 1": [1] http://sourceforge.net/mailarchive/forum.php?thread_id=561598&forum_id=8207 If you apply Patch 2: [2] http://sourceforge.net/mailarchive/forum.php?thread_id=561512&forum_id=8207 then it supercedes the appended Patch 3 (but you should still apply Patch 1). Please let me know if I should use patch manager for this. Feel free to give me cvs write access (account name: zooko) if you want me to commit these myself. Regards, Zooko --- zooko.com Security and Distributed Systems Engineering --- [3] Patch 3: Index: syncmail =================================================================== RCS file: /cvsroot/pyutil/CVSROOT/syncmail,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- syncmail 27 Mar 2002 11:28:01 -0000 1.3 +++ syncmail 27 Mar 2002 11:59:44 -0000 1.4 @@ -68,7 +68,7 @@ import getopt # Notification command -MAILCMD = '/bin/mail -s "CVS: %(SUBJECT)s" %(PEOPLE)s 2>&1 > /dev/null' +MAILCMD = "/bin/mail -s 'CVS: %(SUBJECT)s' %(PEOPLE)s 2>&1 > /dev/null" # Diff trimming stuff DIFF_HEAD_LINES = 20 @@ -191,7 +191,7 @@ # $CVSROOT, followed by the list of files that are changing. if not args: usage(1, 'No CVS module specified') - SUBJECT = args[0] + SUBJECT = string.replace(args[0], "'", '"') specs = string.split(args[0]) del args[0] |
From: Zooko <zo...@zo...> - 2002-03-21 16:54:32
|
My subject lines look this: [Mnet-cvs] CVS: add ``safe_zlib_decompress_spool_to_file()" The "CVS: " is redundant with the more informative "[Mnet-cvs] ", so this patch removes it: Index: syncmail =================================================================== RCS file: /cvsroot/mnet/CVSROOT/syncmail,v retrieving revision 1.18 diff -u -d -r1.18 syncmail --- syncmail 17 Mar 2002 15:33:27 -0000 1.18 +++ syncmail 21 Mar 2002 16:53:57 -0000 @@ -70,7 +70,7 @@ import time # Notification command -MAILCMD = "/bin/mail -s 'CVS: %(SUBJECT)s' %(PEOPLE)s 2>&1 > /dev/null" +MAILCMD = "/bin/mail -s '%(SUBJECT)s' %(PEOPLE)s 2>&1 > /dev/null" # Diff trimming stuff DIFF_HEAD_LINES = 20 |