[devel] moved functions and find-package from rpm-build to rpm, added .provides.sh

Alexey M. Tourbin =?iso-8859-1?q?at_=CE=C1_altlinux=2Eorg?=
Вт Ноя 20 10:00:48 MSK 2007


Update of /people/at/packages/rpm.git

Changes statistics since `4.0.4-alt80-7-g42b63f6' follows:
 rpm-4_0.spec         |    6 ++++--
 scripts/.provides.sh |   15 +++++++++++++++
 scripts/Makefile.am  |   11 +++++++----
 3 files changed, 26 insertions(+), 6 deletions(-)

Changelog since `4.0.4-alt80-7-g42b63f6' follows:
commit 9c4f27de6191ff54992cdf0746015c94aaa90678
Author: Alexey Tourbin <at на altlinux>
Date:   Tue Nov 20 08:45:08 2007 +0300

    moved functions and find-package from rpm-build to rpm, added .provides.sh
    
    This will allow to relax rpm-build-* dependencies, hopefully without adding
    new essential dependencies to rpm (note that rpm already depends on sh and
    coreutils; now this also includes grep, and possibly should include sed,
    awk, and gzip).
    
    Consider mono-mcs package, which is mono C# compiler.  Recently I added
    dependency on rpm-build-mono to this package, to enable automatic support
    for mono dependencies whenever mono compiler is used.  Now the problem
    is that rpm-build-mono depends on rpm-build (via /usr/lib/rpm/functions),
    and rpm-build in turn requires a lot of packages, e.g. gcc and autotools,
    for the purpose of populating base build environment.
    
    To put it another way, the problem is that it is impossible to install
    mono compiler (with automatic support for mono dependencies) without also
    installing gcc and stuff, which is roughly 100M of unrelated packages.
    
    This seems like a minor problem to me, since every "devel" package (including
    compilers) can conventionally require base build environment.  However,
    Alexander Bokovoy argues that school kids desperately need mono-mcs compiler
    on their desktops without gcc and another stuff from the base build environment!
    
    The upshot is that possibly we want to relax rpm-build-* dependencies,
    so that those "support for dependencies" packages do not require
    full-fledged rpm-build.  The easiest way to accomplish this is to
    move /usr/lib/rpm/functions from rpm-build to rpm package.  I also
    choose to move /usr/lib/rpm/find-package as well, along with making
    /usr/lib/rpm/.provides.sh, so that rpm-build-* packages depend on
    something like /usr/lib/rpm(Fatal), not just rpm.

Full diff since `4.0.4-alt80-7-g42b63f6' follows:
diff --git a/rpm-4_0.spec b/rpm-4_0.spec
index 7256a43..9648e18 100644
--- a/rpm-4_0.spec
+++ b/rpm-4_0.spec
@@ -443,6 +443,10 @@ fi
 %_prefix/lib/rpmpopt
 %_prefix/lib/rpmrc
 
+%rpmattr %_rpmlibdir/functions
+%rpmattr %_rpmlibdir/find-package
+%rpmdatattr %_rpmlibdir/.provides.sh
+
 %_man1dir/rpminit.*
 %_man8dir/rpm.*
 %_man8dir/rpm2cpio.*
@@ -458,7 +462,6 @@ fi
 %rpmattr %_rpmlibdir/dump_ld_config
 %rpmattr %_rpmlibdir/filesize
 %rpmattr %_rpmlibdir/relative
-%rpmattr %_rpmlibdir/functions
 %rpmattr %_rpmlibdir/brp-*
 %rpmattr %_rpmlibdir/*_files
 %rpmattr %_rpmlibdir/check-files
@@ -466,7 +469,6 @@ fi
 %rpmattr %_rpmlibdir/ldd
 %rpmattr %_rpmlibdir/rpm2cpio.sh
 %rpmattr %_rpmlibdir/find-lang
-%rpmattr %_rpmlibdir/find-package
 %rpmattr %_rpmlibdir/find-provides
 %rpmattr %_rpmlibdir/find-requires
 %rpmattr %_rpmlibdir/fixup-*
diff --git a/scripts/.provides.sh b/scripts/.provides.sh
new file mode 100644
index 0000000..19ad073
--- /dev/null
+++ b/scripts/.provides.sh
@@ -0,0 +1,15 @@
+# shell functions provides list
+# functions:
+Info
+Fatal
+Verbose
+Debug
+ValidateBuildRoot
+SetupMethods
+RunMethods
+CanonPath
+ArgvFileAction
+# find-package:
+FindByPath
+FindByName
+FindPackage
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 5afee26..4358a61 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -3,15 +3,16 @@
 AUTOMAKE_OPTIONS = 1.4 foreign
 
 EXTRA_DIST = \
+	functions find-package .provides.sh \
 	brp-adjust_libraries brp-alt brp-bytecompile_python \
 	brp-cleanup brp-compress brp-fix-perms brp-fixup brp-strip brp-verify_elf \
 	compress_files check-files convertrpmrc.sh cross-build \
-	delayed_rebuilddb find-lang find-package find-prov.pl find-req.pl \
+	delayed_rebuilddb find-lang find-prov.pl find-req.pl \
 	cpanflute cpanflute2 Specfile.pm find-provides.perl find-requires.perl \
 	fixup-binconfig fixup-pkgconfig fixup-libtool fixup-libraries \
 	get_magic.pl getpo.sh http.req \
 	files.req files.req.files files.req.list \
-	functions magic.prov magic.req \
+	magic.prov magic.req \
 	ldd lib.req lib.req.files lib.prov lib.prov.files shlib.req.awk \
 	pam.req pam.req.files pam.prov pam.prov.files perl.prov perl.req \
 	pkgconfig.req pkgconfiglib.req pkgconfig.req.files \
@@ -28,16 +29,18 @@ installprefix = $(DESTDIR)
 all:
 
 configdir = ${prefix}/lib/rpm
+config_DATA = .provides.sh
 config_SCRIPTS = \
+	functions find-package \
 	brp-adjust_libraries brp-alt brp-bytecompile_python \
 	brp-cleanup brp-compress brp-fix-perms brp-fixup brp-strip brp-verify_elf \
 	compress_files check-files convertrpmrc.sh cross-build \
-	delayed_rebuilddb find-lang find-package find-prov.pl find-req.pl \
+	delayed_rebuilddb find-lang find-prov.pl find-req.pl \
 	cpanflute cpanflute2 Specfile.pm find-provides.perl find-requires.perl \
 	fixup-binconfig fixup-pkgconfig fixup-libtool fixup-libraries \
 	get_magic.pl getpo.sh http.req \
 	files.req files.req.files files.req.list \
-	functions magic.prov magic.req \
+	magic.prov magic.req \
 	ldd lib.req lib.req.files lib.prov lib.prov.files shlib.req.awk \
 	pam.req pam.req.files pam.prov pam.prov.files perl.prov perl.req \
 	pkgconfig.req pkgconfiglib.req pkgconfig.req.files \



Подробная информация о списке рассылки Devel