First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 15621
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Stefan Jones (RETIRED) <cretin@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Croesus <croesus@abcqs.com>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
rpm-4.0.4-fdSeek.diff patch the fdSeek function for glibc 2.3 patch Croesus 2003-02-18 22:50 0000 408 bytes Details | Diff
rpm-4.0.4-glibc2.3.diff rpm-4.0.4-glibc2.3.diff patch Stefan Jones (RETIRED) 2003-02-28 04:49 0000 495 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 15621 depends on: Show dependency tree
Show dependency graph
Bug 15621 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)







View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2003-02-13 05:09 0000
The source tar.gz file which contains the spec file inside, build successfully 
on RH 7.3 using rpm 4.0.4.

On gentoo 1.4-r2 it's work fine before creating the rpm file.
(prepare, build, install complete successfully)
But give "Fseek failed: Invalid argument" when start write the rpm file.

The output from gentoo:
Finding  Provides: (using /usr/lib/rpm/find-provides)...
Finding  Requires: (using /usr/lib/rpm/find-requires)...
Provides: libwrapper.so
PreReq: rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileNames) <= 
3.0.4-1
Requires(rpmlib): rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib
(CompressedFileNames) <= 3.0.4-1
Requires: ld-linux.so.2 libc.so.6 /bin/bash /bin/sh libc.so.6(GLIBC_2.0) 
libc.so.6(GLIBC_2.1) libc.so.6(GLIBC_2.3)
error: /var/tmp/rpm-tmp.26337: Fseek failed: Invalid argument

The output from RH 7.3
Finding  Provides: (using /usr/lib/rpm/find-provides)...
Finding  Requires: (using /usr/lib/rpm/find-requires)...
/var/tmp/alert_svr/home/qpalert/alert_svr/bin/realpath: /lib/i686/libc.so.6: 
version `GLIBC_2.3' not found (required 
by /var/tmp/alert_svr/home/qpalert/alert_svr/bin/realpath)
Provides: libwrapper.so
PreReq: rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileNames) <= 
3.0.4-1
Requires(rpmlib): rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib
(CompressedFileNames) <= 3.0.4-1
Requires: ld-linux.so.2 libc.so.6 /bin/bash /bin/sh libc.so.6(GLIBC_2.0) 
libc.so.6(GLIBC_2.1) libc.so.6(GLIBC_2.3)
Wrote: /usr/src/redhat/SRPMS/alert_svr-1.0-1.src.rpm
Wrote: /usr/src/redhat/RPMS/i386/alert_svr-1.0-1.i386.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.59940
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd alert_svr
+ rm -rf /var/tmp/alert_svr
+ exit 0

------- Comment #1 From Croesus 2003-02-18 22:50:32 0000 -------
Created an attachment (id=8467) [edit]
patch the fdSeek function for glibc 2.3

This is a simple patch which fixed the "Invalid argument" problem when using
glibc 2.3 
Note: if your glibc <= 2.2 DONOT use this patch.
(reason of the bug: glibc >=2.2 change the expected seeker interface of
customized stream / cookied stream, passing the (pos_t*) rather then (pos_t).
the rpm-4.0.4 take care the glibc 2.2 only.

------- Comment #2 From Jonathan Brown 2003-02-21 23:16:23 0000 -------
This should really be in portage. It would have saved me an hour.

------- Comment #3 From Stefan Jones (RETIRED) 2003-02-28 04:33:41 0000 -------
Err, that patch you sent is wrong, and not the real problem,
to see the real fix see line 25 in rpmio/rpmio.h in the rpm source.

The #if statemant is wrong, it should have also included glibc 2.3.2 in it's check.

If it did then USE_COOKIE_SEEK_POINTER would be defined, and alternative code would be used.

do you agree? I have not tested it yet though.


------- Comment #4 From Stefan Jones (RETIRED) 2003-02-28 04:49:11 0000 -------
Created an attachment (id=8811) [edit]
rpm-4.0.4-glibc2.3.diff

This is my version which I added to portage a while ago in rpm-4.0.4-r5.ebuild,
please test, if it works I will unmask it.

------- Comment #5 From Croesus 2003-02-28 05:56:08 0000 -------
your are right for that my patch did not suitable for glibc <2.2. or system use
library other than glibc.

however the reason of the problem I state is not wrong, that's why rpm need to
define USE_COOKIE_SEEK_POINTER. 
I did not modify the header file is because I am not sure that the _IO_off64_t
is correct or not for gentoo system.
__USE_FILE_OFFSET64 should be defined in order to use _IO_off64_t.
and the fact is start from glibc 2.2 it's pass pointer to cookied seeker
function, No matter  __USE_FILE_OFFSET64 is defined or not.

------- Comment #6 From Stefan Jones (RETIRED) 2003-03-06 13:35:36 0000 -------
My patch fixes this issue, but rpm is not 100% working here.

I will see if I can get 4.1.x working, closing bug and marking the new revision as stable.

Stefan

------- Comment #7 From Stefan Jones (RETIRED) 2003-03-06 13:36:00 0000 -------
see above

First Last Prev Next    No search results available      Search page      Enter new bug