Commit Graph

107 Commits

Author SHA1 Message Date
9b75decc2e autodeps/linux.*: fix regression introduced along with the recent cleanup 2011-05-24 23:20:04 +00:00
d0efa0675e scripts: cleanup exit/signal handlers 2011-05-14 18:17:53 +00:00
Alexey Tourbin
6f60362519 find-requires: absolute smbolic links should not be passed to file(1)
Again, this is to improve 'buildreq -bi' support.  See, file(1) is
so full of shit that, to determine whether a link is broken, it has
to read the link and stat its destination (instead of bare stat
on the link).  This hardly makes any sense, but enables buildreq
to calculate self-dependency when the package is installed.
2011-02-09 07:09:01 +03:00
Alexey Tourbin
82f7aeb283 implemented %__find_{requires,provides}_filter and %filter_from_{requires,provides}
The first two macros provide general mechanism for find-requires
and find-provides filtering.  Any valid command or shell syntax can
be used - the command will be executed using "eval" within find-*
script.  The implementation in %___build_pre is not particular
beautiful (as it uses here-docs), but there seems to be no easy
way to quote for eval yet.

The second two commands are built on top of the first: they use
sed as a filtering tool.  The implementation is compatible with Fedora:
http://fedoraproject.org/wiki/Packaging:AutoProvidesAndRequiresFiltering
2011-01-23 02:30:08 +03:00
Alexey Tourbin
16fc089388 find-requires, find-scriptlet-requires: enabled FINDPACKAGE-COMMANDS output 2010-04-08 11:24:58 +04:00
Alexey Tourbin
1ccf0dd03c 4.0.4-alt95.M41.28
- rpmio, rpmbuild: Added support for .xz/.lzma compressed sources and patches.
- Removed old scripts in /usr/lib/rpm.
2009-09-29 16:20:33 +04:00
Alexey Tourbin
6795a36bb1 great removal 2009-09-29 15:29:52 +04:00
Alexey Tourbin
d7dbd5f2ff find-{provides,requires,scriptlet-requires}: report method failures 2008-06-04 03:26:23 +04:00
Alexey Tourbin
f178514e7c find-{requires,provides}: fixed %buildroot/.files:* lists for PackagedFiles() 2008-03-30 03:26:30 +04:00
Alexey Tourbin
bf4a93fd36 s/\.packaged-files:/.files:/g 2008-02-18 18:26:21 +03:00
Alexey Tourbin
f298ea3e6b find-requires, find-provides: save packaged files list under $RPM_BUILD_ROOT/.packaged-files:$RPM_SUBPACKAGE_NAME 2008-01-22 22:06:54 +03:00
Alexey Tourbin
66ed9feb2a find-requires, find-provides: sort each dependency list, and use merge sort at the end 2007-08-11 00:56:43 +04:00
Alexey Tourbin
9175b4190a find-requires, find-provides: removed the reset of unused code, specifically for mono and java
rpm-build-mono has been adapted.
Updated rpm-build dependencies:
	Conflicts: rpm-build-mono <= 1.0

rpm-build-java does NOT include java.req in current sisyphus release
1.0.0-alt1.  I have done some major development for rpm-build-java,
but there is still no consensus about it.
Not updated rpm-build dependencies: nothing to do.
2007-08-11 00:48:49 +04:00
Alexey Tourbin
3ed0194c90 find-requires, find-provides: removed ulimit and LD_PRELOAD code 2007-08-03 12:07:58 +04:00
Alexey Tourbin
e4ac5eca65 find-requires, find-provides: removed perl, python, and tcl stuff 2007-08-01 16:05:26 +04:00
Alexey Tourbin
434d4daed5 Merge branch 'master' of git.alt:/people/ldv/packages/rpm into mod
Conflicts:

	autodeps/linux.prov.in
	autodeps/linux.req.in
2007-03-18 12:16:52 +03:00
c226f12904 autodeps/linux.{prov,req}.in: Handle files of type "Mono/.Net assembly" (#11088, ildar@) 2007-03-17 19:59:55 +00:00
Alexey Tourbin
371f6d1527 adapted pam.req and pam.prov 2007-03-12 15:06:07 +03:00
Alexey Tourbin
53b2853dff find-provides: deal with absolute and broken symbolic links 2007-03-12 15:06:06 +03:00
Alexey Tourbin
c33a51b79c factored files.req 2007-03-12 15:05:18 +03:00
Alexey Tourbin
80c40744e1 factored static.req 2007-03-11 15:00:35 +03:00
Alexey Tourbin
f0ec810739 factored lib.req and lib.prov
Moved old code from find-requires and find-provides to lib.req and lib.prov.
For some reason, also a few python-related lines was removed.

Adapted lib.req and lib.prov to work without RPM_BUILD_ROOT.

In lib.prov, simplified RPM_FINDPROV_LIB_PATH handling (replaced
`lookup_path "$dir" "$PATH"' with `[ -z "${PATH##* $dir *}" ]').

Added lib.req.files and lib.prov.files.
2007-03-11 15:00:33 +03:00
Alexey Tourbin
6097bf7ee7 autodeps/linux.req.in: removed libperl stuff
Perl extensions are now automatically linked with libperl (starting with
rpm-build-perl >= 0.6.0-alt1, and natively starting with perl-devel >= 1:5.8.8-alt5).
2007-03-11 15:00:30 +03:00
Alexey Tourbin
767681ad03 adapted pkgconfig.req and pkgconfig.prov
Also enhanced the scripts by using pkg-config --print-errors, because
pkg-config is silent by default.  Also added checks for pkg-config exit
status and valid output.

Also changed the order: libdir/pkgconfig:datadir/pkgconfig instead of
datadir/pkgconfig:libdir/pkgconfig, according to pkg-config(1).
2007-03-11 15:00:29 +03:00
Alexey Tourbin
2fc12ef2fa factored shebang.req
This is the dependency generator for #! lines.
shebang.req.files makes sure that only executable scripts are processed.

Here is why I chose the "shebang" name.

From Jargon File (4.3.1, 29 Jun 2001) [jargon]:

  shebang /sh*-bang/ n. The character sequence "#!" that frequently
     begins executable shell scripts under Unix. Probably derived from "shell
     bang" under the influence of American slang "the whole shebang"
     (everything, the works).

$ cd /usr/lib/perl5/pod
$ grep -i sharpbang *
perltoc.pod:C<shar>, C<sharpbang>, C<shmattype>, C<shortsize>, C<shrpenv>, C<shsharp>,
$ grep -i shebang *
perl58delta.pod:The command-line options -s and -F are now recognized on the shebang
perlbs2000.pod:BS2000 POSIX doesn't support the shebang notation
perlfaq3.pod:batch file and codify it in C<ALTERNATE_SHEBANG> (see the
perlfaq7.pod:line in your perl script (the "shebang" line) does not contain the
perlfaq7.pod:where you expect it so you need to adjust your shebang line.
perlfaq8.pod:but my shebang line is not the path to perl, so the shell runs the
perlglossary.pod:=item shebang
perljp.pod: "shebang"ѹǡJperlѤscriptΤۤȤɤѹʤѲǽȻפޤ
perlplan9.pod:such as "#!/usr/local/bin/perl". This is known as a shebang
perlplan9.pod:shebang path from config information located in Plan 9
perlport.pod:sub-systems do not support the C<#!> shebang trick for script invocation.
perlport.pod:OS/390 will support the C<#!> shebang trick in release 2.8 and beyond.
perlrun.pod:C<ALTERNATE_SHEBANG> (see the F<dosish.h> file in the source
perltoc.pod:serialization, server, service, setgid, setuid, shared memory, shebang,
perlwin32.pod:Perl scripts on UNIX use the "#!" (a.k.a "shebang") line to
$
2007-03-11 15:00:24 +03:00
Alexey Tourbin
6dd0803866 adapted shell.req and shell.prov
1) added scripts/shell.req.files and scripts/shell.prov.files.
scripts/shell.req.files has new patterns for '/usr/bin/env bash'
and '/bin/ash'.

2) adapted scripts/shell.req.in and scripts/shell.prov.in
by using ArgvFileAction.  Also made them work with empty RPM_BUILD_ROOT.

Note: now shell.req produces dependencies from .provides.sh even
if the latter is inside RPM_BUILD_ROOT.  The reason is that .provides.sh
and the script can reside in two different subpackages (and otherwise,
rpm will optimize out the dependency).

3) removed corresponding old code from autodeps/linux.req.in
and autodeps/linux.prov.in.
2007-03-11 15:00:23 +03:00
Alexey Tourbin
9717c12847 autodeps/linux.{req,prov}.in: implemented method dispatcher
find-requires is now a dispatcher for /usr/lib/rpm/*.req scripts (methods).
find-provides is now a dispatcher for /usr/lib/rpm/*.prov scripts (methods).

The algorithm is basically as follows:

1) Filter input file list through TOPDIR and SKIPLIST patterns.

2) Run the resulting file list through file(1), which output is (per line)

<input-file-name><tab><optional-single-space><file-magic-type>

3) For each req/prov methods, there must be corresponding *.files
filter (e.g. /usr/lib/rpm/perl.req.files for /usr/lib/rpm/perl.req).
We feed file(1) output to this filter; the filter must print the list
of <input-files-name>s (per line) which will be processed with the
corresponding req/prov method.

4) Each req/prov method is invoked with corresponding file list on its
standard input.  The method must output valid rpm dependencies (per line)
or exit with non-zero code.

Notes:

Unlike find-requires, find-provides runs file(1) with -L option.

RPM_FINDREQ_DEFAULT_METHOD and RPM_FINDPROV_DEFAULT go away.
All available methods are run by default.

The old code has been kept.  I am going to remove it gradually
as I factor particular req/prov scripts.
2007-03-11 15:00:20 +03:00
Alexey Tourbin
1490bfdfd8 enhanced RPM_SCRIPTS_DEBUG support, implemented debug levels
Just setting -x is very noisy.  Here is a better plan.  I implement 3
debug levels: verbose (1), debug (2, implies verbose) and -x (3, implies
debug).  I move RPM_SCRIPTS_DEBUG test from scripts to scripts/functions,
as well as provide Verbose() and Debug() shell functions for use in scripts.

Furthermore, _scripts_debug macro is now automatically set when rpmbuild
is invoked with --verbose option.  Use -vv for debug and -vvv for -x.
2007-03-06 17:23:41 +03:00
7227d450ca Merge branch 'master' of git.alt:/people/damir/packages/rpm 2007-02-11 22:08:09 +00:00
Damir Shayhutdinov
280e69d9a5 Added hooks for Java autoreq facility.
Signed-off-by: Damir Shayhutdinov <damir@altlinux.ru>
2007-02-10 19:16:04 +03:00
f283a6dc1a Implement mono reqprov hooks and enable them by default (#9426). 2006-10-04 16:18:31 +00:00
5839b94303 autodeps/linux.req.in:FindLibReqs(): Do not add requirement on program interpreter, out glibc is not ready yet. 2006-09-17 03:03:59 +04:00
64246a06ac autodeps/linux.req.in:FindLibReqs():
+ Add requirement on program interpreter.
	+ If object contains .gnu.hash section but does not
	  contain .hash section, add rtld(GNU_HASH) requirement.
2006-08-22 19:47:25 +00:00
5416277102 Removed cvsid tags. 2006-05-14 17:05:34 +04:00
783e7d2896 apply "new style provides" rules for sonameless libraries too. 2006-02-23 00:43:25 +00:00
0a8d9809da FindLibReqs: strip arch-dep path components only when checking for default locations. 2006-02-08 16:55:55 +00:00
f4465e35f2 s/continue;/continue/ 2006-02-08 16:52:07 +00:00
9506eb04e8 Implemented pkgconfig reqprov support and enabled it by default. 2006-02-02 01:51:38 +00:00
6ab04af722 FindLibReqs: handle deps on ld-linux* properly. 2006-01-16 16:08:29 +00:00
872909594c FindLibReqs: Do not fail when referenced library is not available. 2006-01-15 00:24:33 +00:00
cf0c46f67f enhanced 'file type not available' error reporting 2006-01-14 21:51:24 +00:00
7da7faff6a consider all ELF shared objects (fix search pattern) 2006-01-14 20:28:25 +00:00
016b4f7cfd do not consider non-ELF shared objects 2006-01-14 20:27:47 +00:00
a3c6fc472b Fix DEF_RPM_FINDPROV_LIB_PATH definition. 2006-01-14 17:59:04 +00:00
df135db065 Use @RPMCONFIGDIR@/ldd helper. 2006-01-14 17:04:07 +00:00
84d3ea4eaf Recognize only ELF executables and shared objects. 2006-01-14 15:57:43 +00:00
f8482f1bf7 Update call to dump_ld_config. 2006-01-12 12:13:11 +00:00
c42363088a Update call to dump_ld_config. 2006-01-12 11:20:30 +00:00
1c31db4b02 FindLibReqs: if library was not found, mention object name where it was referenced from. 2006-01-11 18:52:39 +00:00
01ba53454a FindLibReqs: fixed typo: s/fname/pathname/g 2006-01-11 18:44:33 +00:00