Bug 152651 - rpm2html update to solve segfaults
Summary: rpm2html update to solve segfaults
Alias: None
Product: Fedora Legacy
Classification: Retired
Component: Package request (Show other bugs)
(Show other bugs)
Version: unspecified
Hardware: All Linux
Target Milestone: ---
Assignee: Fedora Legacy Bugs
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2003-03-01 12:19 UTC by Ville Skyttä
Modified: 2007-04-18 17:22 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description David Lawrence 2005-03-30 23:12:49 UTC
I'd appreciate some help with packaging rpm2html.  It builds fine, but segfaults
when run.  I'll attach a gdb backtrace in case it's useful to someone.  I've
tried building with normal Psyche GCC as well as gcc296 from compat-gcc,
avoiding binary stripping, building with and without gpg support, but to no
avail, a segfault happens when rpm2html tries to read directory contents.  The
dir contains RPMS signed with my GPG key.

Please note that the rpm2html-1.7 distributed by RH (in Psyche) segfaults for me
as well.


Hash: SHA1

22401a76944cee5eb50277dc661c5564  rpm2html-1.8.1-1.fedora.1.src.rpm
Version: GnuPG v1.2.1 (GNU/Linux)


------- Additional Comments From ville.skytta@iki.fi 2003-03-02 17:58:16 ----

Oops, it looks like I forgot the backtrace, but here goes:

#0  0x32363665 in ?? ()
#1  0x0805c506 in rpmOpen ()
#2  0x0805c8f6 in rpmOneDirScan ()
#3  0x0805cab4 in rpmDirScan ()
#4  0x0805d48e in rpmDirScanAll ()
#5  0x08057dd2 in main ()
#6  0x420158d4 in __libc_start_main () from /lib/i686/libc.so.6

------- Additional Comments From bugs.michael@gmx.net 2003-05-04 12:37:15 ----

IIRC, Daniel Veillard mentioned in some bug report at Red Hat bugzilla, that he
no longer maintains rpm2html and that it would need to be ported to the newer
RPM libraries. Segfaulting due to API incompatibilities maybe?

------- Additional Comments From ville.skytta@iki.fi 2003-05-04 21:41:13 ----

Yep, most likely :(

------- Additional Comments From bugs.michael@gmx.net 2003-05-05 00:31:40 ----

Since this is about Psyche, on Shrike it fails to compile actually (due to
rpmlib incompat.).

------- Additional Comments From ville.skytta@iki.fi 2003-11-26 12:52:49 ----

Effort dropped ages ago.

------- Additional Comments From fedora-bugs@nogin.org 2004-01-12 19:30:50 ----

I managed to get rpm2html working on Red Hat Linux 8.0 + Fedora Legacy. The
"trick" was removing the "./configure" call from the %build section of the spec
file, moving the configure options over to the "./autogen.sh" call in the %prep
section (note that autogen does call configure with the supplied options, and
this also makes the compilation process faster). After that rpm2html stopped

Working packages (both source and binary) are available at

------- Additional Comments From bugs.michael@gmx.net 2004-01-13 11:19:34 ----

Unless we define a different build environment for Fedora Legacy:

* Missing "Buildrequires: autoconf, automake"
* Missing "Buildrequires: zlib-devel, bzip2-devel, popt, libxml2-devel"

* Optional missing "Buildrequires: gnupg" (for real /usr/bin/gpg detection, else
it defaults to /usr/bin/gpg)

* Instead of running autogen.sh with arguments, run

aclocal ; automake ; autoconf

Why? Read on.

* After that, run "%configure --with-pgp". That macro takes care of setting
--sysconfdir and many other path definitions, e.g. --prefix and --mandir.

* rpmbuild says:
warning: File listed twice: /usr/share/rpm2html/msg.

Reason: %{_datadir}/rpm2html includes the entire tree below it and hence also
the %{_datadir}/rpm2html/msg.* which is listed in the %files section. You can
drop %{_datadir}/rpm2html/msg.*

* Installation of "msg.*" files into /usr/share/rpm2html is broken and includes
only a single file "/usr/share/rpm2html/msg." (also true for Red Hat's rh80

  for i in msg.*
    install -m 0644 $i ${RPM_BUILD_ROOT}%{_datadir}/rpm2html/msg.$ll

What is $ll here? It's undefined!

* Simply drop the entire installation section from %install and run "make
DESTDIR=${RPM_BUILD_ROOT} install" only. It does the right thing and makes your
life easier.

* Else rpm2html works for me. :)

------- Additional Comments From bugs.michael@gmx.net 2004-01-13 11:21:26 ----

A %changelog entry would be helpful, too, btw.

------- Additional Comments From warren@togami.com 2004-01-13 11:27:44 ----

All of Michael's recommendations sound good for Legacy.

------- Additional Comments From bugs.michael@gmx.net 2004-01-14 11:38:43 ----

Investigated the reason for the segfaults. It's RPM_OPT_FLAGS. When compiling
with just -O2 and no arch/cpu specific flags, it doesn't fail.


My shot at update rpms:


------- Additional Comments From ville.skytta@iki.fi 2004-01-18 11:25:04 ----

Created an attachment (id=515)
Fix version

Whee, this actually seems to work on FC1 too ;)  Although it does a lot of
weird things like placing arbitrary limits on %{release} and friends lengths
and "allowed characters" which should really be fixed upstream...

Anyway, I don't have a legacy box to test with so I won't do a further review. 
Here's a tiny patch for a bug that caught my attention though, apply it (if you
think it's worth it ;) and after that (and before running autoconf and friends)
do a "mv rpm2html.h rpm2html.h.in".  Fixes the reported version both in command
line and generated markup.  Will also submit "upstream", wherever that is...

------- Additional Comments From jkeating@j2solutions.net 2004-05-18 19:13:52 ----

Removing LEGACY keyword, non-bug for stock RPM.

------- Bug moved to this database by dkl@redhat.com 2005-03-30 18:12 -------

This bug previously known as bug 38 at https://bugzilla.fedora.us/
Originally filed under the Fedora Legacy product and Package request component.

Fix version

Unknown version unspecified in product Fedora Legacy. Setting version to "core1".
Unknown priority P5. Setting to default priority "normal".
Unknown platform PC. Setting to default platform "All".
Setting qa contact to the default for this product.
   This bug either had no qa contact or an invalid one.

Note You need to log in before you can comment on or make changes to this bug.