Re: bbconf segmentation fault

2002-03-15 Thread Jason 'vanRijn' Kasper

On Thu, 2002-03-14 at 18:00, Alexander Volovics wrote:
 On Thu, Mar 14, 2002 at 09:36:02PM +0100, Yvon Thoraval wrote:
 
  when rebuilding bbconfxxx.src.rpm, i get the followin error :
  
  RPM build errors:
  File not found: /var/tmp/bbconf-1.4/usr/man/man1/bbconf.1
  
  and launching gives :
  
  [root@yvon BB]# bbconf
  Segmentation fault (core dumped)
  
  i understand i'm missing something but what or where could i find info on bbconf ?
 
 You probably have to edit the bbconf.spec file and include something
 like the lines: 
cd $RPM_BUILD_ROOT/%{prefix}/man
[ -f man1/bbconf.1.gz ] || gzip man1/bbconf.1
 after the line:
# Build the file-list automagically :)
 

Um.  This doesn't make sense.  It seems that the build process is
failing because it's looking for man1/bbconf.1, not
man1/bbconf.1.gz.  Why would it fix things to gzip the man page?  And
I'm honestly very confused as to why this would fail anyway, since the
%files list is generated dynamically based on what files are actually
there.  

Anyone able to explain this annoying little feature of RPM-building? 
Anybody else seeing this?

 It was missing from the last bbconf.spec file I saw (bbconf-1.4).
 
 Alexander
 
-- 
%--%
Jason 'vanRijn' Kasper
bash$ :(){ :|:};:
Numbers 6:24-26



Re: bbconf segmentation fault

2002-03-15 Thread Alexander Volovics

On Fri, Mar 15, 2002 at 08:11:53AM -0500, Jason 'vanRijn' Kasper wrote:

 On Thu, 2002-03-14 at 18:00, Alexander Volovics wrote:

  On Thu, Mar 14, 2002 at 09:36:02PM +0100, Yvon Thoraval wrote:
 
   when rebuilding bbconfxxx.src.rpm, i get the followin error :
   
   RPM build errors:
   File not found: /var/tmp/bbconf-1.4/usr/man/man1/bbconf.1
 
  You probably have to edit the bbconf.spec file and include something
  like the lines: 
 cd $RPM_BUILD_ROOT/%{prefix}/man
 [ -f man1/bbconf.1.gz ] || gzip man1/bbconf.1
  after the line:
 # Build the file-list automagically :)
 
 
 Um.  This doesn't make sense.  It seems that the build process is
 failing because it's looking for man1/bbconf.1, not
 man1/bbconf.1.gz.  Why would it fix things to gzip the man page?  And
 I'm honestly very confused as to why this would fail anyway, since the
 %files list is generated dynamically based on what files are actually
 there.  

I can't explain it. I am not an rpm guru.

All I can say is that under RedHat (7.2) the rpm macros seem to want
to find a man1/bbconf.1.gz in the BUILD_ROOT and not man1/bbconf.1.
(all the man's included in the installed distro are gzipped).

When rebuilding the bbconf src.rpm I got the same message as 
Yvon Thoraval: File not found: /var/tmp/bbconf-1.4/usr/man/man1/bbconf.1

When I gzipped the man page first everything worked perfectly.

Alexander



Re: bbconf segmentation fault

2002-03-15 Thread Jim Knoble

Circa 2002-Mar-15 14:29:08 +0100 dixit Alexander Volovics:

: On Fri, Mar 15, 2002 at 08:11:53AM -0500, Jason 'vanRijn' Kasper wrote:
: 
:  On Thu, 2002-03-14 at 18:00, Alexander Volovics wrote:
: 
:   On Thu, Mar 14, 2002 at 09:36:02PM +0100, Yvon Thoraval wrote:
:  
:when rebuilding bbconfxxx.src.rpm, i get the followin error :
:
:RPM build errors:
:File not found: /var/tmp/bbconf-1.4/usr/man/man1/bbconf.1
:  
:   You probably have to edit the bbconf.spec file and include something
:   like the lines: 
:  cd $RPM_BUILD_ROOT/%{prefix}/man
:  [ -f man1/bbconf.1.gz ] || gzip man1/bbconf.1
:   after the line:
:  # Build the file-list automagically :)
:  
:  
:  Um.  This doesn't make sense.  It seems that the build process is
:  failing because it's looking for man1/bbconf.1, not
:  man1/bbconf.1.gz.  Why would it fix things to gzip the man page?  And
:  I'm honestly very confused as to why this would fail anyway, since the
:  %files list is generated dynamically based on what files are actually
:  there.  
: 
: I can't explain it. I am not an rpm guru.

I can.  Versions of RPM later than v3.0.3 automagically compress man
pages and info pages as part of the packaging process.  The secret has
two parts:

  (1) the macro %__os_install_post, which calls a number of
  post-processing scripts after the %install section and before the
  actual packaging.  One of those scripts is
  
  (2) a script called (under Red Hat Linux) /usr/lib/brp-compress.
  This baby looks through all the normal locations for man pages
  and info pages, compresses them, and rewrites any symlinks that
  refer to them to refer to the compressed filename rather than the
  uncompressed one.  Under Red Hat, the compression is done with
  gzip.  Under other Linux distributions (e.g., Mandrake), the
  compression is done using bzip2.

: All I can say is that under RedHat (7.2) the rpm macros seem to want
: to find a man1/bbconf.1.gz in the BUILD_ROOT and not man1/bbconf.1.
: (all the man's included in the installed distro are gzipped).
: 
: When rebuilding the bbconf src.rpm I got the same message as 
: Yvon Thoraval: File not found: /var/tmp/bbconf-1.4/usr/man/man1/bbconf.1
: 
: When I gzipped the man page first everything worked perfectly.

The problem you're encountering is that the %files listing is being
generated automatically, but *before* the brp-compress script is
called.  Hence, the automatically-generated listing contains the
uncompressed man page filenames, but by the time RPM gets around to
actually making the package, the brp-compress script has compressed
them right out from under you.

The best thing to do when generating automatic file lists is to call
brp-compress *before* generating the list, if the script exists, thus:

  %install
  
  # Insert 'make install' here, or whatever else is required to
  # install the software.
  
  # Then, compress any man and info pages ...
  if [ -f /usr/lib/brp-compress ]; then
/usr/lib/brp-compress
  fi
  
  # ... and, finally, generate the file listing here.

That way your file listing contains everything that RPM expects.

-- 
jim knoble | [EMAIL PROTECTED]   | http://www.pobox.com/~jmknoble/
(GnuPG fingerprint: 31C4:8AAC:F24E:A70C:4000::BBF4:289F:EAA8:1381:1491)



msg05818/pgp0.pgp
Description: PGP signature