Hi,
Is anyone familiar with the "mhonarc" patch found at:
http://www.openinfo.co.uk/mm/patches/mhonarc/
It seems when applied to 2.1.8, it cannot seem to patch "Mailboxes.py" and "Version.py".
During the patching process, here is the error produced:
Hunk #2 FAILED at 106. 1 out of 2 hunks FAILED -- saving rejects to file Mailman/Mailbox.py.rej
Hunk #1 FAILED at 39. 1 out of 1 hunk FAILED -- saving rejects to file Mailman/Version.py.rej
*** all other patching seems to work fine, and I've followed all instructions on the website to the best of my knowledge including changing the value of "DATA_FILE_VERSION" in the patch.
Any help in making this patch work would be super, as I've got clients on my case about being able to use mhonarc once again. This patch was chosen specifically because we're also using the "htdig" patch by the same author.
Best Regards, Peter Knowles TPN Solutions
Email: pknowles@tpnsolutions.com Phone: 604-229-0715 Skype: tpnsupport Website: http://www.tpnsolutions.com
During the patching process, here is the error produced:
It would help if you actually provided the content of the .rej files.
Also, Are you really patching 2.1.8 or did you mean 2.1.18?
Hunk #2 FAILED at 106. 1 out of 2 hunks FAILED -- saving rejects to file Mailman/Mailbox.py.rej
The 2.1.7-0.1.patch file I'm looking at which is the patch also for 2.1.8 is trying to replace
mailbox.PortableUnixMailbox.__init__(self, fp, _archfactory(self))
with
mailbox.UnixMailbox.__init__(self, fp, _archfactory(self))
and add a bunch of stuff following the definition of scrub. It looks OK to me. Without seeing Mailman/Mailbox.py.rej and maybe Mailman/Mailbox.py and/or Mailman/Mailbox.py.orig, I can't tell you what the problem is.
Hunk #1 FAILED at 39. 1 out of 1 hunk FAILED -- saving rejects to file Mailman/Version.py.rej
This is almost certainly because your existing Mailman/Version.py file has Mailman/Version.py has DATA_FILE_VERSION = some number different from what the patch expects.
All you need to do is manually edit Mailman/Version.py and set DATA_FILE_VERSION = a number bigger than what it currently is, perhaps by appending '.1' to the existing number if it's an integer or incrementing the number if it's a decimal.
*** all other patching seems to work fine, and I've followed all instructions on the website to the best of my knowledge including changing the value of "DATA_FILE_VERSION" in the patch.
Did you change the
-DATA_FILE_VERSION =
line to match what's currently in the file and the
+DATA_FILE_VERSION =
line to a larger number?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mark,
First off, to clarify, yes we're using version 2.1.18-1.
Next, the "Version.py" issue has been resolved. I had forgotten to apply the "modinc" prerequisite patch.
The only error that remains when applying the "mhonarc" patch is:
Hulk #2 FAILED at 106. 1 out of 2 hulks FAILED -- saving rejects to file Mailman/Mailbox.py.rej
*** Attached is a copy of "Mailbox.py.rej" ***
Thanks in advance!
Best Regards, Peter Knowles TPN Solutions
Email: pknowles@tpnsolutions.com Phone: 604-229-0715 Skype: tpnsupport Website: http://www.tpnsolutions.com
On Thu, Jul 17, 2014 at 7:53 PM, Mark Sapiro <mark@msapiro.net> wrote:
During the patching process, here is the error produced:
It would help if you actually provided the content of the .rej files.
Also, Are you really patching 2.1.8 or did you mean 2.1.18?
Hunk #2 FAILED at 106. 1 out of 2 hunks FAILED -- saving rejects to file Mailman/Mailbox.py.rej
The 2.1.7-0.1.patch file I'm looking at which is the patch also for 2.1.8 is trying to replace
mailbox.PortableUnixMailbox.__init__(self, fp, _archfactory(self))with
mailbox.UnixMailbox.__init__(self, fp, _archfactory(self))and add a bunch of stuff following the definition of scrub. It looks OK to me. Without seeing Mailman/Mailbox.py.rej and maybe Mailman/Mailbox.py and/or Mailman/Mailbox.py.orig, I can't tell you what the problem is.
Hunk #1 FAILED at 39. 1 out of 1 hunk FAILED -- saving rejects to file Mailman/Version.py.rej
This is almost certainly because your existing Mailman/Version.py file has Mailman/Version.py has DATA_FILE_VERSION = some number different from what the patch expects.
All you need to do is manually edit Mailman/Version.py and set DATA_FILE_VERSION = a number bigger than what it currently is, perhaps by appending '.1' to the existing number if it's an integer or incrementing the number if it's a decimal.
*** all other patching seems to work fine, and I've followed all instructions on the website to the best of my knowledge including changing the value of "DATA_FILE_VERSION" in the patch.
Did you change the
-DATA_FILE_VERSION =
line to match what's currently in the file and the
+DATA_FILE_VERSION =
line to a larger number?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mailman-Users mailing list Mailman-Users@python.org https://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: https://mail.python.org/mailman/options/mailman-users/pknowles%40tpnsolution...
On 07/18/2014 12:10 AM, Peter Knowles wrote:
The only error that remains when applying the "mhonarc" patch is:
Hulk #2 FAILED at 106. 1 out of 2 hulks FAILED -- saving rejects to file Mailman/Mailbox.py.rej
The problem with the patch is that the file it is based on ended at the point where the last hunk was applied, and a new method was subsequently added to Mailbox.py which wasn't taken into account in the patch.
The attached Mailbox.py.patch should work with possible line number shifts. It is intended to be applied to your previously patched Mailbox.py with the first hunk of the patch already applied.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mark,
So if I understand correctly, based on your patch, I apply things in the following order:
- modinc.patch
- mhonarc.patch
- Mailbox.py.patch
*** the latter patch addressing what the "mhonarc" patch didn't due to Mailman changes that were made post-patch release. ***
Best Regards, Peter Knowles TPN Solutions
Email: pknowles@tpnsolutions.com Phone: 604-229-0715 Skype: tpnsupport Website: http://www.tpnsolutions.com
On Fri, Jul 18, 2014 at 10:26 AM, Mark Sapiro <mark@msapiro.net> wrote:
On 07/18/2014 12:10 AM, Peter Knowles wrote:
The only error that remains when applying the "mhonarc" patch is:
Hulk #2 FAILED at 106. 1 out of 2 hulks FAILED -- saving rejects to file Mailman/Mailbox.py.rej
The problem with the patch is that the file it is based on ended at the point where the last hunk was applied, and a new method was subsequently added to Mailbox.py which wasn't taken into account in the patch.
The attached Mailbox.py.patch should work with possible line number shifts. It is intended to be applied to your previously patched Mailbox.py with the first hunk of the patch already applied.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On 07/18/2014 10:40 AM, Peter Knowles wrote:
So if I understand correctly, based on your patch, I apply things in the following order:
- modinc.patch
- mhonarc.patch
- Mailbox.py.patch
*** the latter patch addressing what the "mhonarc" patch didn't due to Mailman changes that were made post-patch release. ***
That is correct.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mark,
I hate to be a pest.
I saved your patch in "/usr/src"
I enter the folder "/usr/src/mailman-2.1.18-1"
I run "patch -p1 < ../Mailbox.py.patch"
The following message is presented:
(Stripping trailing CRs from patch.) can't find file to patch at input line 3 Perhaps you used the wrong -p or --strip option? The text leading up to this was:
|--- Mailbox.py 2013-12-13 16:25:41.417368781 -0800 |--- Mailbox.py.new 2014-07-18 10:11:48.645854753 -0700
File to patch:
Best Regards, Peter Knowles TPN Solutions
Email: pknowles@tpnsolutions.com Phone: 604-229-0715 Skype: tpnsupport Website: http://www.tpnsolutions.com
On Fri, Jul 18, 2014 at 10:50 AM, Mark Sapiro <mark@msapiro.net> wrote:
On 07/18/2014 10:40 AM, Peter Knowles wrote:
So if I understand correctly, based on your patch, I apply things in the following order:
- modinc.patch
- mhonarc.patch
- Mailbox.py.patch
*** the latter patch addressing what the "mhonarc" patch didn't due to Mailman changes that were made post-patch release. ***
That is correct.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On 07/18/2014 10:59 AM, Peter Knowles wrote:
Mark,
I hate to be a pest.
I saved your patch in "/usr/src"
I enter the folder "/usr/src/mailman-2.1.18-1"
I run "patch -p1 < ../Mailbox.py.patch"
The following message is presented:
(Stripping trailing CRs from patch.) can't find file to patch at input line 3 Perhaps you used the wrong -p or --strip option?
It's partly my fault as I didn't have the same paths as the other patches, but at steps 2 and 3 you need
cd /usr/src/mailman-2.1.18-1/Mailman patch -p0 < ../../Mailbox.py.patch
Or you could just do
patch Mailman/Mailbox.py < ../Mailbox.py.patch in the /usr/src/mailman-2.1.18-1 directory.
See 'man patch'
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mark,
One last question, as I'm a bit of novice when it comes to the "patch" command.
When I run the other patches, it'd report something like "Hunk #1 succeed at 12 (offset -1 lines).", compared to when I ran your patch (as directed above) it only spits out "patching file Mailman/Mailbox.py" with no indication whether it was successful or not.
My question regarding this is, is this simply due to the way your patch was written, or does the "Hunk #X succeeded" message get generated by the "patch" program?
Best Regards, Peter Knowles TPN Solutions
Email: pknowles@tpnsolutions.com Phone: 604-229-0715 Skype: tpnsupport Website: http://www.tpnsolutions.com
On Fri, Jul 18, 2014 at 11:12 AM, Mark Sapiro <mark@msapiro.net> wrote:
On 07/18/2014 10:59 AM, Peter Knowles wrote:
Mark,
I hate to be a pest.
I saved your patch in "/usr/src"
I enter the folder "/usr/src/mailman-2.1.18-1"
I run "patch -p1 < ../Mailbox.py.patch"
The following message is presented:
(Stripping trailing CRs from patch.) can't find file to patch at input line 3 Perhaps you used the wrong -p or --strip option?
It's partly my fault as I didn't have the same paths as the other patches, but at steps 2 and 3 you need
cd /usr/src/mailman-2.1.18-1/Mailman patch -p0 < ../../Mailbox.py.patch
Or you could just do
patch Mailman/Mailbox.py < ../Mailbox.py.patch in the /usr/src/mailman-2.1.18-1 directory.
See 'man patch'
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On 07/18/2014 11:20 AM, Peter Knowles wrote:
When I run the other patches, it'd report something like "Hunk #1 succeed at 12 (offset -1 lines).", compared to when I ran your patch (as directed above) it only spits out "patching file Mailman/Mailbox.py" with no indication whether it was successful or not.
My question regarding this is, is this simply due to the way your patch was written, or does the "Hunk #X succeeded" message get generated by the "patch" program?
patch issues messages such as the one you quote when there is some discrepancy between the file being patched and the patch itself, but the discrepancy (in the above case a shift of 1 line) is minor enough that patch can figure out what do do. Also, in those cases, patch will create an xxx.orig file with the original, unpatched content so you can examine the diff between the original and the patched file if you wish to see that patch really did what you wanted.
If there is no discrepancy, patch just applies the patch and doesn't issue any further messages.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
Mark Sapiro -
Peter Knowles