Bug 236242 - specfile bug causes *_id commands to be dynamically linked
Summary: specfile bug causes *_id commands to be dynamically linked
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: udev   
(Show other bugs)
Version: 5.0
Hardware: All Linux
high
high
Target Milestone: ---
: ---
Assignee: Harald Hoyer
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: 185852 216240 233307
TreeView+ depends on / blocked
 
Reported: 2007-04-12 16:51 UTC by Bryn M. Reeves
Modified: 2018-10-19 23:21 UTC (History)
3 users (show)

Fixed In Version: RHBA-2007-0404
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-11-07 18:08:18 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch to touch *_id before make install (763 bytes, patch)
2007-04-12 16:51 UTC, Bryn M. Reeves
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2007:0404 normal SHIPPED_LIVE udev bug fix update 2007-10-30 23:01:42 UTC

Description Bryn M. Reeves 2007-04-12 16:51:06 UTC
Description of problem:
Around udev-075-2 the *_id.static commands were dropped and the normal *_id
commands were made static:

* Fri Nov 11 2005 Harald Hoyer <harald@redhat.com> - 075-2
- moved /etc/udev/scripts to /lib/udev
- moved /etc/udev/devices to /lib/udev/devices
- added new event replay for kernel >= 2.6.15
- added usb devices
- renamed cpu device to cpuid (bug #161538)
- changed vendor string "Onstream" to "On[sS]tream" (bug #173043)
- compiled all *_id programs statically

This is implemented by:

- building with USE_STATIC=true
- mv'ing the binaries to *.static
- building without USE_STATIC=true
- overwriting dynamic binaries with the saved *.static versions
- running a make install into the buildroot

There is a problem here in that the make install triggers a re-link of four of
the binaries (well, 5 if ia64 :) because they have timestamps older than their
dependencies:

+ mv extras/scsi_id/scsi_id.static extras/scsi_id/scsi_id
+ mv extras/ata_id/ata_id.static extras/ata_id/ata_id
+ mv extras/edd_id/edd_id.static extras/edd_id/edd_id
+ mv extras/usb_id/usb_id.static extras/usb_id/usb_id
+ mv extras/volume_id/vol_id.static extras/volume_id/vol_id
+ touch extras/volume_id/vol_id
+ make DESTDIR=/var/tmp/udev-095-14.5el5-root 'CC=gcc -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4
-m32 -march=i386 -mtune=generic -fasynchron
ous-unwind-tables -fpie -pie' LDFLAGS=-pie install libdir=/lib
usrlibdir=/usr/lib 'EXTRAS=         extras/scsi_id          extras/ata_id  
extras/usb_id   extras/edd_id   extras/path_id  extras/vol
ume_id        extras/run_directory    extras/floppy   '
make[1]: Entering directory `/home/breeves/rpmbuild/BUILD/udev-095/extras/scsi_id'
  LD       scsi_id
make[1]: Leaving directory `/home/breeves/rpmbuild/BUILD/udev-095/extras/scsi_id'
make[1]: Entering directory `/home/breeves/rpmbuild/BUILD/udev-095/extras/ata_id'
  LD       ata_id
make[1]: Leaving directory `/home/breeves/rpmbuild/BUILD/udev-095/extras/ata_id'
make[1]: Entering directory `/home/breeves/rpmbuild/BUILD/udev-095/extras/usb_id'
  LD       usb_id
make[1]: Leaving directory `/home/breeves/rpmbuild/BUILD/udev-095/extras/usb_id'
make[1]: Entering directory `/home/breeves/rpmbuild/BUILD/udev-095/extras/edd_id'
  LD       edd_id

This results in the dynamic versions being included in the RPM and makes it
impossible to use them in for e.g. the initramfs.

The .spec file already deals witht this for vol_id by touching the binary prior
to the make install; attached patch does this for the remaining commands.

Version-Release number of selected component (if applicable):
095-14.5

How reproducible:
100%

Steps to Reproduce:
1. $ ldd /lib/udev/*_id

  
Actual results:
$ ldd /lib/udev/*_id
/lib/udev/ata_id:
        linux-gate.so.1 =>  (0x00e82000)
        libc.so.6 => /lib/libc.so.6 (0x00726000)
        /lib/ld-linux.so.2 (0x006c8000)
/lib/udev/edd_id:
        linux-gate.so.1 =>  (0x00ef6000)
        libc.so.6 => /lib/libc.so.6 (0x0075c000)
        /lib/ld-linux.so.2 (0x00978000)
/lib/udev/path_id:
        not a dynamic executable
/lib/udev/scsi_id:
        linux-gate.so.1 =>  (0x005c1000)
        libc.so.6 => /lib/libc.so.6 (0x00668000)
        /lib/ld-linux.so.2 (0x007e2000)
/lib/udev/usb_id:
        linux-gate.so.1 =>  (0x00f5e000)
        libc.so.6 => /lib/libc.so.6 (0x00b6c000)
        /lib/ld-linux.so.2 (0x00277000)
/lib/udev/vol_id:
        not a dynamic executable


Expected results:
$ ldd /lib/udev/*_id
/lib/udev/ata_id:
        not a dynamic executable
/lib/udev/edd_id:
        not a dynamic executable
/lib/udev/path_id:
        not a dynamic executable
/lib/udev/scsi_id:
        not a dynamic executable
/lib/udev/usb_id:
        not a dynamic executable
/lib/udev/vol_id:
        not a dynamic executable

Comment 1 Bryn M. Reeves 2007-04-12 16:51:07 UTC
Created attachment 152483 [details]
patch to touch *_id before make install

Comment 2 Harald Hoyer 2007-04-13 08:30:30 UTC
yep, right, needs to be fixed!

Comment 4 RHEL Product and Program Management 2007-04-25 20:13:10 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 5 Phil Knirsch 2007-05-02 13:01:50 UTC
Simple fix, broader fix will be done with #233307, so Devel-ACK as well here.

Read ya, Phil

Comment 8 Harald Hoyer 2007-06-13 12:14:42 UTC
You may try:
http://people.redhat.com/harald/downloads/udev/udev-095-14.9.el5/

Comment 13 errata-xmlrpc 2007-11-07 18:08:18 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2007-0404.html



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