Question about cyrus-imapd fastmail patch format

Bron Gondwana brong at fastmail.fm
Fri Jan 8 04:20:34 EST 2010


On Thu, Dec 31, 2009 at 10:10:48PM -0300, Carlos Horowicz wrote:
> Dear List,

Sorry about not replying to this before!
 
> I have a question about adding the auditlog patch into Simon's 2.3.16
> RPM for Centos which I tried but didn't work, so I'm looking for help.
> 
> I unpacked Simon's rpm with
> rpm -Uvh cyrus-imapd-2.3.16-1.src.rpm
> 
> then copied these two files
> 
> 0011-add-auditlog-syslog-statements.patch
> and
> 0010-calculate-a-global-sessionid-for-every-connection.patch
> 
> into /usr/src/redhat/SOURCES and after that modified
> /usr/src/redhat/SPECS/cyrus-imapd.spec:
> 
> --- cyrus-imapd.spec.ori        2010-01-01 03:34:26.000000000 +0300
> +++ cyrus-imapd.spec    2010-01-01 03:37:43.000000000 +0300
> @@ -163,6 +163,8 @@
>  # fastmail.fm patches
>  #Patch30: http://cyrus.brong.fastmail.fm/patches/imapd/0012-Clean-Shutdown.patch
>  Patch30: cyrus-imapd-2.3.15-0012-Clean-Shutdown.patch
> +Patch31: 0010-calculate-a-global-sessionid-for-every-connection.patch
> +Patch32: 0011-add-auditlog-syslog-statements.patch
>  # Patches >= 100 are / will be fixed in CVS
>  BuildRoot: %{_tmppath}/%{name}-%{version}-root
>  BuildRequires: cyrus-sasl-devel >= 2.1.17-1, perl, tcp_wrappers
> @@ -287,6 +289,8 @@
>  %patch18 -p1 -b .user_deny_verbosity
>  # fastmail.fm patches
>  %patch30 -p1 -b .clean-shutdown
> +%patch31 -p1 -b .0010-calculate-a-global-sessionid-for-every-connection
> +%patch32 -p1 -b .0011-add-auditlog-syslog-statements
> 
>  # preserve timestamp of the files for different builds
>  find . -type f -mtime -1 -exec touch -r %{SOURCE0} {} \;
> 
> 
> Then
> cd /usr/src/redhat/SPECS
> rpmbuild -ba cyrus-imapd.spec
> 
> and it failed with these error lines:
> 
> Patch #31 (0010-calculate-a-global-sessionid-for-every-connection.patch):
> + patch -p1 -b --suffix
> .0010-calculate-a-global-sessionid-for-every-connection --fuzz=2 -s
> + echo 'Patch #32 (0011-add-auditlog-syslog-statements.patch):'
> Patch #32 (0011-add-auditlog-syslog-statements.patch):
> + patch -p1 -b --suffix .0011-add-auditlog-syslog-statements --fuzz=2 -s
> 2 out of 2 hunks FAILED -- saving rejects to file imap/imapd.c.rej
> 2 out of 2 hunks FAILED -- saving rejects to file imap/pop3d.c.rej
> error: Bad exit status from /var/tmp/rpm-tmp.79051 (%prep)

Auditlog is a bit of a mess at the moment, because it has hooks into so
many places!  I need to release a copy of the fastmail patches based on
2.3.16 so they're up-to-date again.

Otherwise, you can try to patch it all up yourself :)

-p 1 should be correct usually.

Regards,

Bron.


More information about the Cyrus-devel mailing list