Patching 2.0.13 for eVote
Hi Mailman Developers,
I'm trying to create a patch to 2.0.13 that makes eVote work.
I'm afraid that I'm not experienced at making patches so I'm reading documentation and trying to figure out what to do.
Clearly I should collect the 2.0.13 sources via CVS so I tried following the instructions at http://sourceforge.net/cvs/?group_id=103 but I can't make it work:
$ cvs -d:pserver:anonymous@CVS.mailman.sourceforge.net:/CVSroot/mailman login (Logging in to anonymous@CVS.mailman.sourceforge.net) CVS password:
cvs login: authorization failed: server CVS.mailman.sourceforge.net rejected access
Please tell me what I'm doing wrong.
Also, if there is any documentation about this process that I should be studying, please point me there.
Thank you for your help.
Marilyn Davis
2.0.13 is released. Just download the tarball. You can easily make diffs by doing the following:
tar -xzf mailman-2.0.13.tar gz mv mailman-2.0.13-dist tar -xzf mailman-2.0.13.tar gz # Yes, again
Then make your edits in the mailman-2.0.13 directory. When you've got everything working, then do a:
diff -u mailman-2.0.13-dist mailman-2.0.13 > mailman-evote.diff
This'll recurse through both directories create a patch file.
-Peter
On Sat, Dec 21, 2002 at 12:11:54PM -0800, Marilyn Davis wrote:
Hi Mailman Developers,
I'm trying to create a patch to 2.0.13 that makes eVote work.
I'm afraid that I'm not experienced at making patches so I'm reading documentation and trying to figure out what to do.
Clearly I should collect the 2.0.13 sources via CVS so I tried following the instructions at http://sourceforge.net/cvs/?group_id=103 but I can't make it work:
$ cvs -d:pserver:anonymous@CVS.mailman.sourceforge.net:/CVSroot/mailman login (Logging in to anonymous@CVS.mailman.sourceforge.net) CVS password:
cvs login: authorization failed: server CVS.mailman.sourceforge.net rejected access
Please tell me what I'm doing wrong.
Also, if there is any documentation about this process that I should be studying, please point me there.
Thank you for your help.
Marilyn Davis
Mailman-Developers mailing list Mailman-Developers@python.org http://mail.python.org/mailman/listinfo/mailman-developers
-- The 5 year plan: In five years we'll make up another plan. Or just re-use this one.
"MD" == Marilyn Davis <marilyn@deliberate.com> writes:
MD> I'm trying to create a patch to 2.0.13 that makes eVote work.
MD> I'm afraid that I'm not experienced at making patches so I'm
MD> reading documentation and trying to figure out what to do.
MD> Clearly I should collect the 2.0.13 sources via CVS so I tried
MD> following the instructions at
MD> http://sourceforge.net/cvs/?group_id=103 but I can't make it
MD> work:
>> $ cvs
>> -d:pserver:anonymous@CVS.mailman.sourceforge.net:/CVSroot/mailman
>> login (Logging in to anonymous@CVS.mailman.sourceforge.net) CVS
>> password:
I think there's some problems with case there. Try the following:
% cvs -d :pserver:anonymous@cvs.mailman.sf.net:/cvsroot/mailman login Logging in to :pserver:anonymous@cvs.mailman.sf.net:2401/cvsroot/mailman CVS password: % cvs -d :pserver:anonymous@cvs.mailman.sf.net:/cvsroot/mailman co mailman
Now, remember that that will get you the head of the cvs tree, but Mailman 2.0.x lives on a maintenance branch. So after you've checked the code out, cd into the mailman subdir and do:
% cvs -q up -P -d -rRelease_2_0_1-branch
You'll now have the head of the 2.0.x maint branch (yes the branch tag is slightly misnamed). If you want exactly 2.0.13 -- I can't remember how much has diverged, but probably not much -- then use -rRelease_2_0_13 instead.
To actually generate a patch, my recommendation is to use something like the following from the top level (i.e. mailman) directory:
% cvs diff -u > /tmp/evote-patch.txt
Cheers, -Barry
Thank you Peter and Barry. Patching seems to be under control now.
What a great facility! It encouraged me to be more invasive into mailman, and wax elegant in the code, since it keeps track of everything for me.
One thing though. When I worked on mailman, I worked on it in the $prefix directory, not in the directory where we "make install". But I did alter common.c and mail-wrapper.c in the src directory, back in the installation tree. So I moved all these changes into the cvs directory structure (by hand) and created my patch.
The patch will be part of the eVote distribution. In eVote's installation, Mailman's installation directory (mailman) gets copied recursively into a mailman-eVote directory and I patch it and "make install" in that directory.
Also, I created some new files in the mailman directory structure that didn't seem to go into the patch (some new templates and an bin/eVote_queries.py for eVote to pump for answers). So I copied these into the eVote directory tree and they get copied into mailman-eVote during eVote's installation process.
My process seems a little scattered and I can't think of anyway to improve it. If you have the patience to follow any of this and have a suggestion, I'd love it.
Thank you for any thoughts.
Marilyn
p.s. Congratulations on your release candidate release, Barry. I'm so impressed with this whole operation.
"MD" == Marilyn Davis <marilyn@deliberate.com> writes:
MD> One thing though. When I worked on mailman, I worked on it in
MD> the $prefix directory, not in the directory where we "make
MD> install". But I did alter common.c and mail-wrapper.c in the
MD> src directory, back in the installation tree. So I moved all
MD> these changes into the cvs directory structure (by hand) and
MD> created my patch.
MD> The patch will be part of the eVote distribution. In eVote's
MD> installation, Mailman's installation directory (mailman) gets
MD> copied recursively into a mailman-eVote directory and I patch
MD> it and "make install" in that directory.
You should try to make all your changes in the checkout directory (i.e. the ones with the CVS in them), because that will definitely make your life easier in the long run. It'll make it easier for you to keep in sync with future Mailman fixes. You'll just do a "cvs update" and then you might have to resolve any conflict that may result, but you shouldn't lose any of your work. I often maintain several checkouts as I vette other people's patches or work on fixes, etc.
MD> Also, I created some new files in the mailman directory
MD> structure that didn't seem to go into the patch (some new
MD> templates and an bin/eVote_queries.py for eVote to pump for
MD> answers). So I copied these into the eVote directory tree and
MD> they get copied into mailman-eVote during eVote's installation
MD> process.
Add -N to your diff command. "man diff" (which cvs diff mimic) on Linux says:
-N
--new-file
In directory comparison, if a file is found in only
one directory, treat it as present but empty in the
other directory.
MD> My process seems a little scattered and I can't think of
MD> anyway to improve it. If you have the patience to follow any
MD> of this and have a suggestion, I'd love it.
See above.
MD> Thank you for any thoughts.
MD> Marilyn
MD> p.s. Congratulations on your release candidate release,
MD> Barry. I'm so impressed with this whole operation.
Thank you! -Barry
Thank you again Barry. It's so valuable to get these answers.
Do I understand right?
You should try to make all your changes in the checkout directory (i.e. the ones with the CVS in them), because that will definitely make your life easier in the long run. It'll make it easier for you
To do this, during installation, I'd make . (current directory) be my $prefix for testing?
I'm taking a vacation soon but I expect to release my patch beta around Jan 10. It's not a deadline but a prediction.
Marilyn
I'm messing up somehow. I give this command:
[root@Xoko mailman]# cvs diff -N -u > /tmp/eVote-patch.txt
But my patch starts like:
? bin/eVote_queries.py ? templates/eVote.txt ? templates/eVotePetition.txt
and those files aren't in there.
What am I missing?
Marilyn
On Thu, Dec 26, 2002 at 10:30:46AM -0800, Marilyn Davis wrote:
I'm messing up somehow. I give this command:
[root@Xoko mailman]# cvs diff -N -u > /tmp/eVote-patch.txt
But my patch starts like:
? bin/eVote_queries.py ? templates/eVote.txt ? templates/eVotePetition.txt
and those files aren't in there.
"cvs diff" only looks in checked-out + cvs-added files. If you create brand new files (instead of changing existing ones) cvs diff will ignore them.... unless you "cvs add newfile" before diffing.
Therefore, you should:
- cvs add any new file
- cvs diff -N -u
info:/cvs for details.
Adde parvum parvo magnus acervus erit. Simone Piunno, FerraraLUG - http://members.ferrara.linux.it/pioppo
Thank you.
I see. I was afraid of that. I don't have write-access to cvs at sourceforge, so I can't do that.
I don't think I should add stuff at sourceforge because we want people to evaluate eVote before we put it into the repository.
So, I'll put the new files in eVote's distribution and the installation will copy them into the mailman tree. It doesn't really matter since the mailman/eVote patch isn't any good without eVote. It'll be invisible to the installer anyway.
Thank you again.
Marilyn
On Fri, 27 Dec 2002, Simone Piunno wrote:
On Thu, Dec 26, 2002 at 10:30:46AM -0800, Marilyn Davis wrote:
I'm messing up somehow. I give this command:
[root@Xoko mailman]# cvs diff -N -u > /tmp/eVote-patch.txt
But my patch starts like:
? bin/eVote_queries.py ? templates/eVote.txt ? templates/eVotePetition.txt
and those files aren't in there.
"cvs diff" only looks in checked-out + cvs-added files. If you create brand new files (instead of changing existing ones) cvs diff will ignore them.... unless you "cvs add newfile" before diffing.
Therefore, you should:
- cvs add any new file
- cvs diff -N -u
info:/cvs for details.
Adde parvum parvo magnus acervus erit. Simone Piunno, FerraraLUG - http://members.ferrara.linux.it/pioppo
"MD" == Marilyn Davis <marilyn@deliberate.com> writes:
MD> I see. I was afraid of that. I don't have write-access to
MD> cvs at sourceforge, so I can't do that.
Marilyn, another thing you might consider: create your own cvs repository and "cvs import" the Mailman code base into it. You'd use "cvs import" to track our changes and then you'd be able to add your own files and generate your own "cvs diff -N" patches.
http://www.cvshome.org/docs/manual/cvs_13.html#SEC104
HTH, -Barry
Thank you Barry. That's a good idea.
If I keep my own repository so that I can have new files in my patch,
would it make sense to add all eVote/Clerk's source files into the patch?
I would alter mailman's "make install" to call eVote's "make install".
I see one snag, the Clerk expects a "clerk" login so I'd have to give instructions for that.
Is this the most reasonable approach? Might such a big patch get put on the mailman site?
eVote/Clerk is only tested on Linux. I'm quite sure won't port easily to BSD. Will this be a problem here?
Marilyn
On Thu, 26 Dec 2002, Barry A. Warsaw wrote:
"MD" == Marilyn Davis <marilyn@deliberate.com> writes:
MD> I see. I was afraid of that. I don't have write-access to MD> cvs at sourceforge, so I can't do that.Marilyn, another thing you might consider: create your own cvs repository and "cvs import" the Mailman code base into it. You'd use "cvs import" to track our changes and then you'd be able to add your own files and generate your own "cvs diff -N" patches.
http://www.cvshome.org/docs/manual/cvs_13.html#SEC104
HTH, -Barry
participants (4)
-
barry@python.org -
Marilyn Davis -
Peter C. Norton -
Simone Piunno