Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ClamAV: users

Building Mandriva 2009.1 RPMS

 

 

ClamAV users RSS feed   Index | Next | Previous | View Threaded


cpollock at embarqmail

Oct 29, 2009, 8:11 PM

Post #1 of 3 (180 views)
Permalink
Building Mandriva 2009.1 RPMS

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
Attachments: signature.asc (0.19 KB)


Dan.McDonald at austinenergy

Oct 30, 2009, 6:39 AM

Post #2 of 3 (168 views)
Permalink
Re: Building Mandriva 2009.1 RPMS [In reply to]

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
Attachments: signature.asc (0.19 KB)


cpollock at embarqmail

Oct 30, 2009, 7:42 AM

Post #3 of 3 (168 views)
Permalink
Re: Building Mandriva 2009.1 RPMS [In reply to]

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
Attachments: signature.asc (0.19 KB)

ClamAV users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.