Re: Re: Make Redhat (again..)

From: Christian Holm Christensen <>
Date: Wed, 25 May 2005 03:33:22 +0200

Hi Germano,

On Wed, 2005-05-25 at 02:05 +0200, Germano Percossi wrote:
> Christian Holm Christensen wrote:
> > Hi Germano,
> >
> > On Tue, 2005-05-24 at 18:51 +0200, Germano Percossi wrote:
> >
> >>I wonder if I see errors everywhere or if I'm the only one using
> >>RPM.. :'(
> >
> >
> > This particular error is centric to your (kind) of system. Which
> > distribution are you using? What version?
> >
> I apologize if this mail can look like a criticism to your work, I meant only
> that with that extension could not work on all RPM platform, and in my
> case it's so.

No offence taken.

> Anyway I use Mandrake 10.1

It is as I expected. Your distribution (Mandrake) differs from RedHat, in that it uses bzip2 rather than gzip to compress files. That's fine. However, I wish that the RPM maintainers would include a macro or similar which one could use in the spec files to detect this kind of thing.

> > Note, on the system I tested the scripts on (SLC3 mainly), this was not
> > a problem.
> >
> > When I look in `/usr/lib/rpm/i386-linux/macros', I see that the macro
> > `%__os_install_post' expands to (amount other things),

Wow, I'm really bad at spelling ... should be `among' not `amount' :-(

> > `/usr/lib/rpm/brp_compress', which is a shell script. Looking in that
> > shell script, I see that it uses GZip. On your system it may be
> > different.
> >
> > I looked at the same shell script on lxplus (SLC3), and they also use
> > GZip.
> >
> Maybe this lines from my brp_compress help
> # Compress man pages
> COMPRESS="bzip2 -9 -n"

He, as I thought :-)

> > I'm not sure what the solution is. Could you try to take out the line
> > that transforms the names, and see what happens? Thanks.
> >
> A fast solution was suddenly achieved replacing in the 'sed' script
> gz with bz2
> > One solution would could be to look at what is actually in the
> > directory: BZip2ped or GZipped files. However, it's a hack, and I'm
> > not that fond of it.
> The errors is produced because rpm sees some files in the
> build directory (the bzipped ones) that are not the one expected
> looking at the .install lists: so, the answer to your question
> is bzipped are created and gzipped are passed to the %file
> macro.

I know.

> I do not understand if the hack you refer to is that Mandrake
> uses bzip ;) .

No. I meant that in the spec file, one could do something like

   nzgipped=`ls %_builddir/usr/share/man/man1/*.1.gz | wc -l`    if test $ngzipped -lt 1 ; then

      # transform names according to the RedHat scheme.    else

      # transform names according to the Mandrake scheme.    fi

It's ugly, but it may work.

Another solution would be to test if one is on a Mandrake system. Does the file `/etc/mandrake_release' (or similar) exist on Mandrake?

> Before I go bed I'd like to refer you another misfeature and tell
> me if could be my fault.
> Rpm is a very precise tool, and it does not allow you to package if it knows
> that some files you wait for are not in the build dir; but also the
> contrary is
> true. The error I told before is of the first kind but now I have a second
> kind.

RPM isn't that strict. Consider DPKG, and you'll see a strict package builder :-)

However, DPKG does allow you to do `ugly' stuff, but takes care to warn you about those things, and only fail if it's really bad. That said, running Lintian on the ROOT Debian packages produces very few warnings these days :-)

> 11 files that are in the build root but there are no packages that claims
> for them :'(
> the first 8 are
> /usr/include/root/TFoam.h
> /usr/include/root/TFoamCell.h
> /usr/include/root/TFoamIntegrand.h
> /usr/include/root/TFoamMaxwt.h
> /usr/include/root/TFoamVect.h
> /usr/lib/root/
> /usr/lib/root/
> /usr/lib/root/

That's because the proper entries in `configure', `build/package/common/', etc. wasn't added when the plugin `foam' was added. Please refer to `build/package/debian/README.Debian' for how to add additional plugin packages. If you do what's listed there, please mail a patch to me and Fons.

> They are present in the build, are listed in root-plugin-foam.install but
> there are
> no packages that includes them in the file list.
> Is a root-plugin-foam sub-package the one that has to request them?
> It's not a problem, I can write a few lines in the spec file to include
> it, maybe with
> %description
> A package that I don't what it is for..
> I would be very excited to say that I have added this subpackage but I think
> that it deserves a better writer: I'll do to save time but I think that ROOT
> collaboration must avoid that people like me can do this "horror" on their
> good work ;)

Did you follow the specifications in the above mentioned README file?

> others 2 are
> /usr/share/man/man1/olbd.1.bz2
> /usr/share/man/man1/xrootd.1.bz2
> You may wonder: "what's up now?!!!"
> Maybe nothing but I avoided to build the xrootd package and only on this
> case is possible to see that (maybe..) something goes wrong with 'make
> install'
> or something similar.
> This to files are builded regardless xrootd is requested but they are
> inserted in a list of
> files that is requested by xrootd subpackage: rpm in this case is sensible
> while the normal
> building would not.

I added these man pages as Debian _requires_ that all binaries in `/usr/bin', `/usr/sbin' and so on have man pages. However, I did not protect against them not being used in case XRootd wasn't build. Some code in `Makefile' is needed.

> the last is
> /usr/share/root/macros/html.C
> what's that? Every suggestion is welcome

That's a script to generate the HTML documentation. It should go into the `root-bin' package. The appropriate line added to `build/package/common/root-bin.install' should do the trick

> Sorry for your patience (and all people reading this..)

Nothing to be sorry about :-)

> and tnx again (now I go bed, really!)



 ___  |  Christian Holm Christensen 
  |_| |  -------------------------------------------------------------
    | |  Address: Sankt Hansgade 23, 1. th.  Phone:  (+45) 35 35 96 91
     _|           DK-2200 Copenhagen N       Cell:   (+45) 24 61 85 91
    _|            Denmark                    Office: (+45) 353  25 404
 ____|   Email:               Web:
 | |
Received on Wed May 25 2005 - 03:33:37 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:08 MET