Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 153292 - app-arch/rpm does not package magic files
Summary: app-arch/rpm does not package magic files
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
: 156655 167943 (view as bug list)
Depends on: 190132
Blocks:
  Show dependency tree
 
Reported: 2006-10-29 06:45 UTC by Marti Raudsepp
Modified: 2010-04-01 20:56 UTC (History)
8 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marti Raudsepp 2006-10-29 06:45:17 UTC
The app-arch/rpm-4.4.6-r2 does not appear to package the magic* files in /usr/lib/rpm, required by rpmbuild when building packages.

The missing files are:
/usr/lib/rpm/magic
/usr/lib/rpm/magic.mgc
/usr/lib/rpm/magic.mime
/usr/lib/rpm/magic.mime.mgc

Apparently, due to a libmagic (sys-apps/file) bug, some attributes of an internal structure, struct magic_set, are left uninitialized, producing a segfault. [There is a workaround for the file/libmagic segfault at https://lists.ubuntu.com/archives/ubuntu-devel/2006-April/017052.html, but it's not a legitimate fix for the bug - it only avoids the segfault and prints a nonsensical error]

The obligatory emerge --info:
Portage 2.1.1-r1 (default-linux/amd64/2006.1, gcc-4.1.1, glibc-2.4-r3, 2.6.17-gentoo-r8-pig1 x86_64)
=================================================================
System uname: 2.6.17-gentoo-r8-pig1 x86_64 Intel(R) Pentium(R) 4 CPU 3.00GHz
Gentoo Base System version 1.12.5
Last Sync: Wed, 18 Oct 2006 15:20:01 +0000
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  0.4.2-r1
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r4
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -mtune=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=nocona -mtune=nocona -O2 -pipe"
DISTDIR="/store/distfiles"
FEATURES="autoconfig confcache distlocks metadata-transfer parallel-fetch sandbox sfperms strict userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://192.168.0.7/gentoo/              ftp://ftp.ipv6.linux.ee/pub/gentoo/distfiles/                 ftp://ftp.linux.ee/pub/gentoo/distfiles/"
LANG="en_US"
LC_ALL="en_US.UTF-8"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="amd64 acl async berkdb bitmap-fonts cli cracklib crypt cups dlloader dri elibc_glibc fortran gdbm gpm input_devices_evdev input_devices_keyboard input_devices_mouse ipv6 isdnlog kernel_linux libg++ logrotate ncurses nptl nptlonly pam pcre png ppds pppd python quotas readline reflection sasl session spl ssl truetype-fonts type1-fonts udev unicode userland_GNU video_cards_apm video_cards_ark video_cards_ati video_cards_chips video_cards_cirrus video_cards_cyrix video_cards_dummy video_cards_fbdev video_cards_glint video_cards_i128 video_cards_i810 video_cards_mga video_cards_neomagic video_cards_nv video_cards_rendition video_cards_s3 video_cards_s3virge video_cards_savage video_cards_siliconmotion video_cards_sis video_cards_sisusb video_cards_tdfx video_cards_tga video_cards_trident video_cards_tseng video_cards_v4l video_cards_vesa video_cards_vga video_cards_via video_cards_vmware video_cards_voodoo xml xorg zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Sandro Bonazzola (RETIRED) gentoo-dev 2006-10-30 11:17:43 UTC
CCing the herd of sys-apps/file. If it's a sys-apps/file bug they should be aware of it :-)
Comment 2 Marti Raudsepp 2006-10-30 13:12:08 UTC
(In reply to comment #1)
Actually, the sys-apps/file bug should be separate one. But as there is no real fix currently available anywhere, I did not bother to report it separately.

The libmagic bug is only visible due to a bug in the app-arch/rpm ebuild.
Comment 3 SpanKY gentoo-dev 2006-10-30 18:05:40 UTC
we'll handle the rpm issue here

we purposefully punt the file stuff from rpm ... it should be provided by the file package, not by rpm
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2006-11-29 13:56:19 UTC
*** Bug 156655 has been marked as a duplicate of this bug. ***
Comment 5 Sandro Bonazzola (RETIRED) gentoo-dev 2007-01-16 22:14:36 UTC
Please unmask =app-arch/rpm-4.4.7-r2 and test it on your system.
Comment 6 Jeff Hansen 2007-01-25 23:01:15 UTC
app-arch/rpm-4.4.7-r2's rpmbuild segfaults from a double free in the code, before it even does anything.  I can give you more details, but I have -O3 in my CFLAGS on an i686.  This is still a bug in 4.4.6-r?.

app-arch/rpm-4.4.7-r2 USE="berkdb java nls perl python -doc -lua -minimal -sqlite -threads"
app-arch/rpm-4.4.6-r3 USE="nls perl python -doc -sqlite -berkdb -java -lua -minimal -threads"
Comment 7 SpanKY gentoo-dev 2007-01-26 07:43:51 UTC
unrelated to this issue; file a new bug
Comment 8 Jeff Hansen 2007-01-26 18:39:27 UTC
Could we please fix app-arch/rpm-4.4.6-r3 so that it generates the magic.mgc file, even manually?  I don't care if it's added to the ebuild or patched against the Makefile.in, but *something* needs to be done for version 4.4.6, since 4.4.7 is unstable.

I can generate either a patch against the Makefile.in/Makefile.am or create a new ebuild if you want, whichever seems a better solution to you, but something needs to be done for 4.4.6.
Comment 9 Sandro Bonazzola (RETIRED) gentoo-dev 2007-01-29 19:19:41 UTC
(In reply to comment #8)
> Could we please fix app-arch/rpm-4.4.6-r3 so that it generates the magic.mgc
> file, even manually?  I don't care if it's added to the ebuild or patched
> against the Makefile.in, but *something* needs to be done for version 4.4.6,
> since 4.4.7 is unstable.

I'm testing a new ebuild which symlink magic* files from installed file package into rpm var/lib dir and solve other issues. I hope that will fix this bug.

> I can generate either a patch against the Makefile.in/Makefile.am or create a
> new ebuild if you want, whichever seems a better solution to you, but something
> needs to be done for 4.4.6.

Feel free to submit a patch,an ebuild, whatever, rpm is quite difficult to maintain and I don't refuse any qualifyed help. I'm in contact with upstream and I'm trying to have rpm working. If you can fix bugs, you're welcome.
Comment 10 Sandro Bonazzola (RETIRED) gentoo-dev 2007-02-12 19:51:35 UTC
Please test new ebuilds:
rpm-4.4.6-r4, rpm-4.4.7-r2 and if non of them works, unmask rpm-4.4.7-r3 and test  that also.
Thanks for your patience, I've been very busy this month.
Comment 11 Jakub Moc (RETIRED) gentoo-dev 2007-02-22 01:23:10 UTC
*** Bug 167943 has been marked as a duplicate of this bug. ***
Comment 12 Paul Winkler 2007-02-22 03:27:58 UTC
I tried those:

* app-arch/rpm-4.4.7-r2 is still missing the magic.* files, and segfaults before it even gets that far.

* app-arch/rpm-4.4.6-r4 works so far!
Comment 13 SpanKY gentoo-dev 2007-12-09 07:20:46 UTC
rpm-5.0_alpha4 now in the tree
Comment 14 Magno Alexandre Torres 2008-05-28 23:57:32 UTC
I compiled with:
 FEATURES=keepwork emerge -av rpm

After the emerge, I copied the pm.magic file to /usr/lib/rpm/magic

cp /var/tmp/portage/app-arch/rpm-4.4.6-r3/work/rpm-4.4.6/rpm.magic 
/usr/lib/rpm/magic

Now, I can compile my packages
Comment 15 OvsInc 2010-03-02 09:44:55 UTC
Olivier DOLE is right
http://bugs.gentoo.org/show_bug.cgi?id=207722#c3

The solution in the ebuild for "app-arch/rpm-4.4.6-r6" would be to replace in
src_install() function:
dosym /usr/share/misc/file/${magic_file} /usr/lib/rpm/${magic_file}
by
dosym /usr/share/misc/${magic_file} /usr/lib/rpm/${magic_file}

Please Correct the ebuild file.