Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 15621 - rpm 4.0.4-r4 fail to write the rpm file.
Summary: rpm 4.0.4-r4 fail to write the rpm file.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Stefan Jones (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-13 05:09 UTC by Croesus
Modified: 2003-03-06 13:36 UTC (History)
0 users

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


Attachments
patch the fdSeek function for glibc 2.3 (rpm-4.0.4-fdSeek.diff,408 bytes, patch)
2003-02-18 22:50 UTC, Croesus
Details | Diff
rpm-4.0.4-glibc2.3.diff (rpm-4.0.4-glibc2.3.diff,495 bytes, patch)
2003-02-28 04:49 UTC, Stefan Jones (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Croesus 2003-02-13 05:09:55 UTC
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 Croesus 2003-02-18 22:50:32 UTC
Created attachment 8467 [details, diff]
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 Jonathan Brown 2003-02-21 23:16:23 UTC
This should really be in portage. It would have saved me an hour.
Comment 3 Stefan Jones (RETIRED) gentoo-dev 2003-02-28 04:33:41 UTC
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 Stefan Jones (RETIRED) gentoo-dev 2003-02-28 04:49:11 UTC
Created attachment 8811 [details, diff]
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 Croesus 2003-02-28 05:56:08 UTC
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 Stefan Jones (RETIRED) gentoo-dev 2003-03-06 13:35:36 UTC
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 Stefan Jones (RETIRED) gentoo-dev 2003-03-06 13:36:00 UTC
see above