How to do QA

Todd Freedom_Lover at pobox.com
Mon Feb 9 06:17:09 UTC 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Charles R. Anderson wrote:
> On Sun, Feb 08, 2004 at 09:52:57PM -0800, David Rees wrote:
>> I've been using alien to convert the packages to tarballs, unpacking the 
>> last release and the update release into separate directories and then 
>> check the ldd output.  This could be scripted, but would require QA 
>> people to install alien.
>
> alien isn't necessary.  Use rpm2cpio, which comes with rpm:
>
> rpm2cpio file.rpm | cpio -idv -

Or, since there are always many ways to do something, part of the
fedora-rpmdevtools package (that could use updating for 7x) is the
fedora-unrpm script.  It's quite handy.  Since it's pretty short, I'll
include it here for anyone that wants it.

#!/bin/sh

#
# fedora-unrpm
# Extract RPMs into PWD, "tar zxvf"-style
#
# Author:  Ville Skyttä <ville.skytta at iki.fi>
# License: GPL
# $Id: fedora-unrpm,v 1.2 2003/08/15 20:25:45 scop Exp $

usage()
{
    echo "Usage: `basename $0` RPMFILE..."
}

extract()
{
    name=$(rpm -qp --qf "%{NAME}-%{VERSION}-%{RELEASE}" "$1")
    if [ $? -ne 0 -o -z "$name" ]; then
        echo "Warning: can't extract $name"
        return 1
    fi

    # Is it an absolute filename?
    absname="$1"
    if ! echo "$1" | grep -q "^/" -; then
        absname="$PWD/$1"
    fi

    (mkdir -p "$name" && \
    cd "$name" && \
    rpm2cpio "$absname" \
    | cpio --quiet -ivdum 2>&1 \
    | sed "s|^\(\./\)\?|$name/|" && \
    cd ..)
}

if [ -z "$*" ]; then
    usage
    exit 1
fi

for file in $*; do
    extract "$file"
done

- -- 
Todd        OpenPGP -> KeyID: 0xD654075A | URL: www.pobox.com/~tmz/pgp
======================================================================
Cogito cogito ergo cogito sum --
I think that I think, therefore I think that I am.
        -- Ambrose Bierce, "The Devil's Dictionary"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: When crypto is outlawed bayl bhgynjf jvyy unir cevinpl.

iD8DBQFAJyXkuv+09NZUB1oRAmNrAKDhm8pqzOneolqBp5PN9q+QtLpVGgCghhCO
vpLZj1v+suQ4yoEql7v1KSI=
=gdAg
-----END PGP SIGNATURE-----





More information about the fedora-legacy-list mailing list