RPM Community Forums

Mailing List Message of <rpm-devel>

Re: [CVS] RPM: rpm/ CHANGES Makefile.am configure.ac rpm/lib/ rpmfc.c rpm/...

From: Jeff Johnson <n3npq@mac.com>
Date: Fri 01 Apr 2011 - 14:33:17 CEST
Message-id: <837228E3-107B-452B-8E67-CBC20600C13C@mac.com>
I realize you're haveing a whiole bunch of fun
hacking in Newer! Better! Bestest! dependencies
for every possible type of dependency assertion.

However -- without regression tests and conventional usage cases
well described -- all the recent checkins for rubt and rubygems
and gstreamer and more are gonna bit rot, and are going to be
routinely disabled while building RPM.

BTW, Mozilla js-1.8.5 SpiderMonkey was released yesterday,
you might try to get RPM -> GPSEE -> JS wired up instead
of playing around with dependency extraction.

Its not like Cooker and Mandriva are actually *using*
the internal dependency extraction or PLD filtering. ANd
that isn't a matter of implementation, but rather something else.

73 de Jeff

On Apr 1, 2011, at 1:08 AM, Per Řyvind Karlsen wrote:

>  RPM Package Manager, CVS Repository
>  http://rpm5.org/cvs/
>  ____________________________________________________________________________
> 
>  Server: rpm5.org                         Name:   Per Řyvind Karlsen
>  Root:   /v/rpm/cvs                       Email:  pkarlsen@rpm5.org
>  Module: rpm                              Date:   01-Apr-2011 07:08:12
>  Branch: HEAD                             Handle: 2011040105081101
> 
>  Added files:
>    rpm/macros              gstreamer.in
>    rpm/scripts             gstreamer.sh
>  Modified files:
>    rpm                     CHANGES Makefile.am configure.ac
>    rpm/lib                 rpmfc.c
> 
>  Log:
>    add classifiers for gstreamer plugins & dep generator. (a bit dirty
>    for now.. :/)
> 
>  Summary:
>    Revision    Changes     Path
>    1.3591      +1  -0      rpm/CHANGES
>    2.265       +2  -2      rpm/Makefile.am
>    2.481       +1  -0      rpm/configure.ac
>    1.78        +10 -0      rpm/lib/rpmfc.c
>    1.1         +12 -0      rpm/macros/gstreamer.in
>    1.1         +71 -0      rpm/scripts/gstreamer.sh
>  ____________________________________________________________________________
> 
>  patch -p0 <<'@@ .'
>  Index: rpm/CHANGES
>  ============================================================================
>  $ cvs diff -u -r1.3590 -r1.3591 CHANGES
>  --- rpm/CHANGES	1 Apr 2011 02:11:13 -0000	1.3590
>  +++ rpm/CHANGES	1 Apr 2011 05:08:11 -0000	1.3591
>  @@ -1,4 +1,5 @@
>   5.4.0 -> 5.4.1:
>  +    - proyvind: rpmfc: add classifiers for gstreamer plugins & dep generator.
>       - proyvind: use pythoneggs.py for python deps generated by internal generator.
>       - proyvind: rpmfc: enable ruby file classifier & internal dep generator.
>       - devzero2000: misread the review, repost as the original patch
>  @@ .
>  patch -p0 <<'@@ .'
>  Index: rpm/Makefile.am
>  ============================================================================
>  $ cvs diff -u -r2.264 -r2.265 Makefile.am
>  --- rpm/Makefile.am	25 Jan 2011 14:41:47 -0000	2.264
>  +++ rpm/Makefile.am	1 Apr 2011 05:08:11 -0000	2.265
>  @@ -112,8 +112,8 @@
> 
>   pkgcfgdir =	$(pkglibdir)/macros.d
>   pkgcfg_DATA = \
>  -	macros/cmake macros/java macros/libtool macros/mandriva macros/mono \
>  -	macros/perl macros/pkgconfig macros/php macros/python macros/ruby \
>  +	macros/cmake macros/gstreamer macros/java macros/libtool macros/mandriva \
>  +	macros/mono macros/perl macros/pkgconfig macros/php macros/python macros/ruby \
>   	macros/selinux macros/tcl
> 
>   noinst_HEADERS = build.h debug.h system.h
>  @@ .
>  patch -p0 <<'@@ .'
>  Index: rpm/configure.ac
>  ============================================================================
>  $ cvs diff -u -r2.480 -r2.481 configure.ac
>  --- rpm/configure.ac	24 Mar 2011 22:42:54 -0000	2.480
>  +++ rpm/configure.ac	1 Apr 2011 05:08:11 -0000	2.481
>  @@ -508,6 +508,7 @@
>   AC_PATH_PROG(__GIT, git, %{_bindir}/git, $MYPATH)
>   AC_PATH_PROG(__GPG, gpg2, %{_bindir}/gpg2, $MYPATH)
>   AC_PATH_PROG(__GSR, gsr, %{_bindir}/gsr, $MYPATH)
>  +AC_PATH_PROG(__GST_INSPECT, gst-inspect-0.10, %{_bindir}/gst-inspect-0.10, $MYPATH)
>   AC_PATH_PROG(__GZIP, gzip, /bin/gzip, $MYPATH)
>   AC_PATH_PROG(__HG, hg, %{_bindir}/hg, $MYPATH)
>   AC_PATH_PROG(__ID, id, /usr/bin/id, $MYPATH)
>  @@ .
>  patch -p0 <<'@@ .'
>  Index: rpm/lib/rpmfc.c
>  ============================================================================
>  $ cvs diff -u -r1.77 -r1.78 rpmfc.c
>  --- rpm/lib/rpmfc.c	1 Apr 2011 03:21:03 -0000	1.77
>  +++ rpm/lib/rpmfc.c	1 Apr 2011 05:08:12 -0000	1.78
>  @@ -878,6 +878,12 @@
>   #endif
>   	    xx = rpmfcHelper(fc, 'R', "ruby");
>       } else
>  +    if ((fc->fcolor->vals[fc->ix] & (RPMFC_MODULE|RPMFC_LIBRARY)) &&
>  +	    strstr(fn, "/gstreamer")) {
>  +	xx = rpmfcHelper(fc, 'P', "gstreamer");
>  +	/* XXX: currently of no use, but for the sake of consistency... */
>  +	xx = rpmfcHelper(fc, 'R', "gstreamer");
>  +    }
> 
>   /*@-observertrans@*/
>       defaultdocdir = _free(defaultdocdir) ;
>  @@ -1041,6 +1047,10 @@
>   			(fn = rindex(fn, '.')) && !strcmp(fn, ".gemspec"))
>   			fc->fcolor->vals[fc->ix] |= RPMFC_MODULE;
>   		}
>  +		/* XXX: lacking better, more generic classifier... */
>  +		else if (!strncmp(fn, "/gstreamer", sizeof("/gstreamer")-1) &&
>  +			fc->fcolor->vals[fc->ix] & RPMFC_LIBRARY)
>  +		    fc->fcolor->vals[fc->ix] |= (RPMFC_MODULE|RPMFC_SCRIPT);
>   	    }
>   	}
> 
>  @@ .
>  patch -p0 <<'@@ .'
>  Index: rpm/macros/gstreamer.in
>  ============================================================================
>  $ cvs diff -u -r0 -r1.1 gstreamer.in
>  --- /dev/null	2011-04-01 07:08:03.000000000 +0200
>  +++ gstreamer.in	2011-04-01 07:08:12.373923426 +0200
>  @@ -0,0 +1,12 @@
>  +# Gstreamer specific macro definitions.
>  +# To make use of these macros insert the following line into your spec file:
>  +# %{load:%{_usrlibrpm}/macros.d/gstreamer}
>  +
>  +%__gst_inspect		@__GST_INSPECT
>  +
>  +# Path to scripts to autogenerate gstreamer package dependencies,
>  +#
>  +# Note: Used if _use_internal_dependency_generator is non-zero. The
>  +# helpers are also used by %{_rpmhome}/rpmdeps {--provides|--requires}.
>  +%__gstreamer_provides	%{_rpmhome}/gstreamer.sh --provides --gst-inspect %__gst_inspect
>  +#%__gstreamer_requires	%{_rpmhome}/gstreamer.sh --requires
>  @@ .
>  patch -p0 <<'@@ .'
>  Index: rpm/scripts/gstreamer.sh
>  ============================================================================
>  $ cvs diff -u -r0 -r1.1 gstreamer.sh
>  --- /dev/null	2011-04-01 07:08:03.000000000 +0200
>  +++ gstreamer.sh	2011-04-01 07:08:12.093909899 +0200
>  @@ -0,0 +1,71 @@
>  +#!/bin/sh
>  +#
>  +# Script to install in:
>  +# /usr/lib/rpm/redhat/find-provides.d
>  +#
>  +# Transform GStreamer auto install info into RPM provides
>  +#
>  +# Author: Bastien Nocera <hadess@hadess.net>
>  +# Based on other provides scripts from RPM
>  +#
>  +
>  +[ $# -ge 1 ] || {
>  +    cat > /dev/null
>  +    exit 0
>  +}
>  +
>  +filelist=`grep -e '.so$' | sed "s/['\"]/\\\&/g"`
>  +provides=0
>  +gst_inspect=$(which gst-inspect 2>/dev/null)
>  +
>  +# --- Alpha does not mark 64bit dependencies•
>  +case `uname -m` in
>  +  alpha*)	mark64="" ;;
>  +  *)		mark64="()(64bit)" ;;
>  +esac
>  +
>  +solist=$(echo $filelist | grep "libgst" | \
>  +	xargs file -L 2>/dev/null | grep "ELF.*shared object" | cut -d: -f1 )
>  +
>  +function getmark()
>  +{
>  +	lib64=`if file -L $1 2>/dev/null | \
>  +		grep "ELF 64-bit" >/dev/null; then echo -n "$mark64"; fi`
>  +}
>  +
>  +function libdir()
>  +{
>  +	buildlibdir=`dirname $1`
>  +	buildlibdir=`dirname $buildlibdir`
>  +}
>  +
>  +while [ "$#" -ne 0 ]; do
>  +    case $1 in
>  +	-P|--provides)
>  +	    provides=1
>  +	    ;;
>  +	--gst-inspect)
>  +	    shift
>  +	    gst_inspect=$1
>  +	    ;;
>  +    esac
>  +    shift
>  +done
>  +
>  +if [ -z "$gst_inspect" ]; then
>  +    exit 1
>  +fi
>  +
>  +if [ $provides -eq 1 ]; then
>  +    for so in $solist ; do
>  +	getmark $so
>  +	libdir $so
>  +	LD_LIBRARY_PATH=$buildlibdir $gst_inspect --print-plugin-auto-install-info --rpm $so 2> /dev/null | while read line ; do
>  +	    echo -n "$line";
>  +	    echo -n "$lib64"
>  +	    echo
>  +	done
>  +    done
>  +fi
>  +exit 0
>  +
>  @@ .
> ______________________________________________________________________
> RPM Package Manager                                    http://rpm5.org
> CVS Sources Repository                                rpm-cvs@rpm5.org
Received on Fri Apr 1 14:33:41 2011
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.