Building Mandriva 2009.1 RPMS

View: New views
3 Messages — Rating Filter:   Alert me  

Building Mandriva 2009.1 RPMS

by Chris-394 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Last night I attempted to build the 0.95.3 RPMS for Mandriva 2009.1 and
ran into a problem. I kept getting this error:

1 out of 1 hunk FAILED -- saving rejects to file
clamav-milter/clamav-milter.c.rej
error: Bad exit status from /home/chris/rpm/tmp/rpm-tmp.zGMW7n (%prep)

The output of the above mentioned file is:

@@ -287,7 +287,7 @@ int main(int argc, char **argv) {
 
     if((opt = optget(opts, "PidFile"))->enabled) {
        FILE *fd;
-       mode_t old_umask = umask(0006);
+       mode_t old_umask = umask(0022);
 
        if((fd = fopen(opt->strarg, "w")) == NULL) {
            logg("!Can't save PID in file %s\n", opt->strarg);

A suggestion from Bill Randle set me straight and it's possible that
others trying to build 0.95.3 for Mandriva have run into the same
problem so I'll post a link to pastbin below where I've posted the
updated clamav-0.95rc1-umask.patch which worked for me, please mind the
path in the patch it's from my system so you'll be asked where to apply
the patch. What we discovered is that in the clam-milter.c file for 95.2
there was this statement:

- mode_t old_umask = umask(0006);
and it was changed with the above patch to this
+ mode_t old_umask = umask(0022);

in 0.95.3 the lines in the clam-milter.c file are different:

if((opt = optget(opts, "PidFile"))->enabled) {
FILE *fd;
mode_t old_umask = umask(0002);

thus I created a new patch with the following two lines:

- mode_t old_umask = umask(0002);
+ mode_t old_umask = umask(0022);

The link below is to the updated clamav-0.95rc1-umask.patch that I made
last night. Note - I do not run the milter so I don't know whether or
not it was built properly however the RPMs were built with no errors.

http://pastebin.com/m46e62e61

The unofficial packages for 2009.1 are available at Bill's site

http://www.neocat.org/ftp/pub/RPMS/2009.1/i586/

Chris

--
KeyID 0xE372A7DA98E6705C





_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml

signature.asc (204 bytes) Download Attachment

Re: Building Mandriva 2009.1 RPMS

by McDonald, Dan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, 2009-10-29 at 22:11 -0500, Chris wrote:
> Last night I attempted to build the 0.95.3 RPMS for Mandriva 2009.1 and
> ran into a problem. I kept getting this error:
>
> 1 out of 1 hunk FAILED -- saving rejects to file
> clamav-milter/clamav-milter.c.rej
> error: Bad exit status from /home/chris/rpm/tmp/rpm-tmp.zGMW7n (%prep)

Mandriva applies a number of patches to the clamav source.  Usually, I
delete all of the code patches when I start with their RPM, then
re-generate the ones that still apply - the config file changes that
point to the mandriva directory structure.  

I haven't done it yet, as the new version doesn't fix much that is of
urgent significance to me (I'm not seeing the memory crashes).  I expect
it to be pushed to the update mirrors in the next day or two.

If you really want it now, just grab it from cooker and recompile it
with:
rpmbuild --rebuild ftp://ftp.free.fr/mirrors/ftp.mandriva.com/MandrivaLinux/devel/cooker/SRPMS/contrib/release/clamav-0.95.3-1mdv2010.0.src.rpm



--
Daniel J McDonald, CCIE # 2495, CISSP # 78281, CNX
www.austinenergy.com


_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml

signature.asc (204 bytes) Download Attachment

Re: Building Mandriva 2009.1 RPMS

by Chris-394 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, 2009-10-30 at 08:39 -0500, McDonald, Dan wrote:

> On Thu, 2009-10-29 at 22:11 -0500, Chris wrote:
> > Last night I attempted to build the 0.95.3 RPMS for Mandriva 2009.1 and
> > ran into a problem. I kept getting this error:
> >
> > 1 out of 1 hunk FAILED -- saving rejects to file
> > clamav-milter/clamav-milter.c.rej
> > error: Bad exit status from /home/chris/rpm/tmp/rpm-tmp.zGMW7n (%prep)
>
> Mandriva applies a number of patches to the clamav source.  Usually, I
> delete all of the code patches when I start with their RPM, then
> re-generate the ones that still apply - the config file changes that
> point to the mandriva directory structure.  
>
> I haven't done it yet, as the new version doesn't fix much that is of
> urgent significance to me (I'm not seeing the memory crashes).  I expect
> it to be pushed to the update mirrors in the next day or two.
>
> If you really want it now, just grab it from cooker and recompile it
> with:
> rpmbuild --rebuild ftp://ftp.free.fr/mirrors/ftp.mandriva.com/MandrivaLinux/devel/cooker/SRPMS/contrib/release/clamav-0.95.3-1mdv2010.0.src.rpm
>
Thanks Dan, I got them built after making the change to the patch and
seems to be running with no problems.

Chris

--
KeyID 0xE372A7DA98E6705C



_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml

signature.asc (204 bytes) Download Attachment