[prev in list] [next in list] [prev in thread] [next in thread]
List: rpmorg-list
Subject: Re: [rpm-list] problems compiling rpm on solaris
From: Jeff Johnson <n3npq.jbj () gmail ! com>
Date: 2006-12-29 16:28:02
Message-ID: 1CBB083D-43EA-46AE-97CE-8548AF67B44B () gmail ! com
[Download RAW message or body]
On Dec 29, 2006, at 11:13 AM, Edward Quick wrote:
>>
>> On 29 December 2006 at 14:37, "Edward Quick"
>> <edwardquick@hotmail.com> wrote:
>>
>> > I'm having problems compiling rpm 4.2 for Solaris 8. I'm getting
>> quite far
>> > (after renaming the elfutils directory - advised in
>> > http://www.redhat.com/archives/rpm-list/2003-June/
>> msg00182.html) ...
>>
>> Any reason you're choosing 4.2? I managed to get 4.4.6 to build
>> on Solaris 2.8 (sparc). It was a bit of an ordeal, as I'm
>> sure you're finding out for yourself. I've been delinquent in
>> publishing my recipe here. I built rpm 4.4.6 to put its files in
>> my own account as I don't have root privileges on that system.
>> One thing to be cautious of is that 4.4.6 is the first version
>> that doesn't read old rpm formats, right Jeff? The good news is
>> that the rpm2cpio that comes with 4.4.6 still will. Would my
>> recipe be of use to you?
>>
Yes, recent (like last 6 months or so) rpm has dropped converting
file lists from what was used by rpm-3.0.x. Sun has had like 6 years
to convert, enuf already.
I'll attach a rpm2cpio.sh that is even more portable than rpm2cpio.
>> Cheers....
>>
>> P.S.: What's the right way to publish patches that get rpm to
>> build on Solaris? Different lists have different
>> conventions. It might also be useful for me to publish
>> my spec file.
>>
>> --
>> Kevin
>>
> Kevin, A thousand thank-yous! I'm new to rpm, and struggled to find
> the source code to be honest. I just need a version where I can run
> rpm --import and rpm --check-sig so I can port a script I've
> written to Solaris. The package on sunfreeware didn't have these
> flags though.
> If you could let me have your recipe, that would be really useful!!
>
The Solaris port of rpm-4.4.8 is proceeding swimmingly, thanks to Tim
Moony and Frank Cusack.
Details are at https://lists.dulug.duke.edu/pipermail/rpm-devel.
Meanwhile, if all you need is signature verification of a package,
then use
the attached script which extracts the plaintext from a *.rpm and
uses gpg to verify.
The script is very similar to rpm2cpio.sh.
.(Caveat Emptor: script might need adjustments, dunno if ever used on
solaris)
hth
73 de Jeff
["rpm2cpio.sh" (rpm2cpio.sh)]
#!/bin/sh
pkg=$1
if [ "$pkg" = "" -o ! -e "$pkg" ]; then
echo "no package supplied" 1>&2
exit 1
fi
leadsize=96
o=`expr $leadsize + 8`
set `od -j $o -N 8 -t u1 $pkg`
il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`
dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`
# echo "sig il: $il dl: $dl"
sigsize=`expr 8 + 16 \* $il + $dl`
o=`expr $o + $sigsize + \( 8 - \( $sigsize \% 8 \) \) \% 8 + 8`
set `od -j $o -N 8 -t u1 $pkg`
il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`
dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`
# echo "hdr il: $il dl: $dl"
hdrsize=`expr 8 + 16 \* $il + $dl`
o=`expr $o + $hdrsize`
dd if=$pkg ibs=$o skip=1 2>/dev/null | gunzip
["tgpg" (tgpg)]
#!/bin/sh
for pkg in $*
do
if [ "$pkg" = "" -o ! -e "$pkg" ]; then
echo "no package supplied" 1>&2
exit 1
fi
plaintext=`mktemp /tmp/tgpg-$$.XXXXXX`
detached=`mktemp /tmp/tgpg-$$.XXXXXX`
# --- Extract detached signature
rpm -qp -vv --qf '%{siggpg:armor}' $pkg > $detached
# --- Figger the offset of header+payload in the package
leadsize=96
o=`expr $leadsize + 8`
set `od -j $o -N 8 -t u1 $pkg`
il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`
dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`
sigsize=`expr 8 + 16 \* $il + $dl`
o=`expr $o + $sigsize + \( 8 - \( $sigsize \% 8 \) \) \% 8`
# --- Extract header+payload
dd if=$pkg ibs=$o skip=1 2>/dev/null > $plaintext
# --- Verify DSA signature using gpg
gpg --batch -vv --debug 0xfc02 --verify $detached $plaintext
# --- Clean up
rm -f $detached $plaintext
done
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic