Re: cross-compiling rpm -- runtime issues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff Johnson wrote:
Eli Carter wrote:

All,

I have built rpm 4.1 for arm-linux, to run on arm-linux. But it doesn't work. :( What am I doing wrong?

Oh, you want more detail? ;)

So far, I have rpm 4.1 built to run on x86, but create packages for armv4l.
Using that, I built rpm 4.1 to run on armv4l and use packages for armv4l.



There's a structure alignment patch in rpmio/rpmpgp.c for arm that you want. Check
the rpm package at netwinder.org for the patch (you might have to diff rpmpgp.c yourself).

I'm not having any luck finding a delta for rpmpgp.c Comparing this: http://rpmfind.net//linux/RPM/netwinder/netwinder/SRPMS/base/nw9/rpm-4.2-0.69.src.html With 4.2-1 from rpm.org didn't show a rpmpgp.c delta. Is this something that was merged into the main-line 4.2?

I found a discussion regarding ARM alignment issues here: http://www.netwinder.org/~brianbr/alignment.html
Is this what you are refering to?


and
rpm -qa
(which shows no output, as expected).

But, problem #1:
rpm --install complains that the packages are "intended for a armv4l architecture"
And
# rpm --eval='%{_arch}'
i386
I was expecting it to give 'armv4l' or similar instead. Ok, so I use --ignorearch to get around that for now, and rpm will install the packages successfully. The files are installed as expected.



Watchout, you can be tricked by --eval. The goal of macro config is to set up a context for
parsing the spec file, so add %dump to a spec file and parse with rpmbuild -ba to verify values.

_arch is set to i386 in 'macros', changing it there changes the output of the eval....
Hmm, but it doesn't change the "intended for a armv4l architecture" message contrary to my assumptions on the matter. Hmm... Doesn't look like it's %_host_cpu or %_host_os.... what controls this?


Anyway, getting -qa, etc working is more important for now.

__db.001 contains dbenv locks, opened/created when the environment is created. An strace will show
anal retentive checks to avoid a file race creating __db.001, the checks insure that the process was actually
the creator of __db.001.

Ah. Thanks for the explanation.



If all the indices were created with lazy open, and Packages has changed size, then the package was
probably installed correctly. Add -vv to the install args watch the entries being created.

The install sure looks like it is installing correctly... all the files show up, the database in /var/lib/rpm gets updated (lots of files, presumably indexes), -vv looks ok to me[1] and shows /var/lib/rpm ...


Make sure that rpm -qa is opening the correct database, use --dbpath explicitly, or check with strace.

# rpm -vv -qa D: opening db environment /var/lib/rpm/Packages joinenv D: opening db index /var/lib/rpm/Packages rdonly mode=0x0 D: locked db index /var/lib/rpm/Packages D: closed db index /var/lib/rpm/Packages D: closed db environment /var/lib/rpm/Packages bash-2.05b# Same thing with "rpm -vv -qa --dbpath /var/lib/rpm"

Ok, doing a comparison with RH8.0,
$ rpm --version
RPM version 4.1.1
# rpm -vv -q gzip
D: unshared posix mutexes found(38), adding DB_PRIVATE, using fcntl lock
D: opening  db environment /var/lib/rpm/Packages create:cdb:mpool:private
D: opening  db index       /var/lib/rpm/Packages rdonly mode=0x0
D: locked   db index       /var/lib/rpm/Packages
D: opening  db index       /var/lib/rpm/Name rdonly mode=0x0
D: opening  db index       /var/lib/rpm/Pubkeys rdonly mode=0x0
D:  read h#     183 Header V3 DSA signature: NOKEY, key ID db42a60e
gzip-1.3.3-5
D: closed   db index       /var/lib/rpm/Pubkeys
D: closed   db index       /var/lib/rpm/Name
D: closed   db index       /var/lib/rpm/Packages
D: closed   db environment /var/lib/rpm/Packages

Whereas with my ARM rpm,
# rpm --version
RPM version 4.1
# rpm -vv -q gzip
D: opening  db environment /var/lib/rpm/Packages joinenv
D: opening  db index       /var/lib/rpm/Packages rdonly mode=0x0
D: locked   db index       /var/lib/rpm/Packages
D: opening  db index       /var/lib/rpm/Name rdonly mode=0x0
package gzip is not installed
D: closed   db index       /var/lib/rpm/Name
D: closed   db index       /var/lib/rpm/Packages
D: closed   db environment /var/lib/rpm/Packages

Is there anything in 4.1.1 that might affect me?

I think that when installing rpms that require rpms that I had just installed, rpm complained that those dependencies were missing... so I think rpm's internal queries are also broken. (I'll double check this symptom.)

Is there something I should look for to determine what's going on here?

Thanks again for your help thus-far,

Eli

[1]
bash-2.05b# rpm --install gzip-1.2.4a-2i2.armv4l.rpm --nodeps --ignorearch -vv
D: ============== gzip-1.2.4a-2i2.armv4l.rpm
D: Expected size: 68517 = lead(96)+sigs(180)+pad(4)+data(68237)
D: Actual size: 68517
D: gzip-1.2.4a-2i2.armv4l.rpm: MD5 digest: OK (0151f7fb6898dfb7d36c79edd2124867)
D: added binary package [0]
D: found 0 source and 1 binary packages
D: ========== recording tsort relations
D: ========== tsorting packages (order, #predecessors, #succesors, tree, depth)
D: 0 0 0 0 0 +gzip-1.2.4a-2i2
D: installing binary packages
D: opening db environment /var/lib/rpm/Packages joinenv
D: opening db index /var/lib/rpm/Packages create mode=0x42
D: locked db index /var/lib/rpm/Packages
error: failed to open /etc/mtab: No such file or directory
D: sanity checking 1 elments
D: opening db index /var/lib/rpm/Name create mode=0x42
D: computing 27 file fingerprints
Preparing packages for installation...
D: computing file dispositions
D: opening db index /var/lib/rpm/Basenames create mode=0x42
D: ========== +++ gzip-1.2.4a-2i2
D: Expected size: 68517 = lead(96)+sigs(180)+pad(4)+data(68237)
D: Actual size: 68517
D: install: gzip-1.2.4a-2i2 has 27 files, test = 0
gzip-1.2.4a-2i2
D: ========== Directories not explictly included in package:
D: 0 /bin/
D: 1 /usr/bin/
D: 2 /usr/doc/
D: 4 /usr/info/
D: 5 /usr/man/man1/
D: ==========
D: fini 120777 1 ( 0, 0) 16 /usr/bin/gunzip;3fcf795e
D: fini 100755 1 ( 0, 0) 3888 /usr/bin/gzexe;3fcf795e
D: fini 120777 1 ( 0, 0) 14 /usr/bin/gzip;3fcf795e
D: fini 100755 1 ( 0, 0) 2000 /usr/bin/zcmp;3fcf795e
D: fini 100755 1 ( 0, 0) 2000 /usr/bin/zdiff;3fcf795e
D: fini 100755 1 ( 0, 0) 1010 /usr/bin/zforce;3fcf795e
D: fini 100755 1 ( 0, 0) 1333 /usr/bin/zgrep;3fcf795e
......
D: fini 100755 3 ( 0, 0) 51692 /bin/zcat;3fcf795e
GZDIO: 15 reads, 122776 total bytes in 12.012 secs
D: +++ h# 1 Header SHA1 digest: OK (159a016831c056d6465740b6ed002d4fe62e
ae12)
D: adding "gzip" to Name index.
D: adding 27 entries to Basenames index.
D: opening db index /var/lib/rpm/Group create mode=0x42
D: adding "Applications/File" to Group index.
D: opening db index /var/lib/rpm/Requirename create mode=0x42
D: adding 11 entries to Requirename index.
D: opening db index /var/lib/rpm/Providename create mode=0x42
D: adding "gzip" to Providename index.
D: opening db index /var/lib/rpm/Dirnames create mode=0x42
D: adding 6 entries to Dirnames index.
D: opening db index /var/lib/rpm/Requireversion create mode=0x42
D: adding 11 entries to Requireversion index.
D: opening db index /var/lib/rpm/Provideversion create mode=0x42
D: adding "1.2.4a-2i2" to Provideversion index.
D: opening db index /var/lib/rpm/Installtid create mode=0x42
D: adding 1 entries to Installtid index.
D: opening db index /var/lib/rpm/Sigmd5 create mode=0x42
D: adding 1 entries to Sigmd5 index.
D: opening db index /var/lib/rpm/Sha1header create mode=0x42
D: adding "159a016831c056d6465740b6ed002d4fe62eae12" to Sha1header index.
D: opening db index /var/lib/rpm/Filemd5s create mode=0x42
D: adding 27 entries to Filemd5s index.
D: install: %post(gzip-1.2.4a-2i2) asynchronous scriptlet start
D: created directory(s) /usr/src/redhat/tmp mode 0755
D: install: %post(gzip-1.2.4a-2i2) execv(/bin/sh) pid 5461
+ /sbin/install-info /usr/info/gzip.info.gz /usr/info/dir
D: install: waitpid(5461) rc 5461 status 0
D: opening db index /var/lib/rpm/Triggername create mode=0x42
D: closed db index /var/lib/rpm/Filemd5s
D: closed db index /var/lib/rpm/Sha1header
D: closed db index /var/lib/rpm/Sigmd5
D: closed db index /var/lib/rpm/Installtid
D: closed db index /var/lib/rpm/Provideversion
D: closed db index /var/lib/rpm/Requireversion
D: closed db index /var/lib/rpm/Dirnames
D: closed db index /var/lib/rpm/Triggername
D: closed db index /var/lib/rpm/Providename
D: closed db index /var/lib/rpm/Requirename
D: closed db index /var/lib/rpm/Group
D: closed db index /var/lib/rpm/Basenames
D: closed db index /var/lib/rpm/Name
D: closed db index /var/lib/rpm/Packages
D: closed db environment /var/lib/rpm/Packages
bash-2.05b#


--------------------. "If it ain't broke now,
Eli Carter           \                  it will be soon." -- crypto-gram
eli.carter(a)inet.com `-------------------------------------------------




------------------------------------------------------------------------ Confidentiality Notice: This e-mail transmission may contain confidential and/or privileged information that is intended only for the individual or entity named in the e-mail address. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or reliance upon the contents of this e-mail message is strictly prohibited. If you have received this e-mail transmission in error, please reply to the sender, so that proper delivery can be arranged, and please delete the message from your computer. Thank you. Inet Technologies, Inc. ------------------------------------------------------------------------


[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux