Commit Graph

565 Commits

Author SHA1 Message Date
Alexey Tourbin
3c75eaca60 4.0.4-alt96.11
- implemented post-transaction filetriggers, loosely based on filetriggers.patch
  from Mandriva Linux (see %_rpmlibdir/posttrans-filetriggers for details)
- implemented %_rpmlibdir/0ldconfig.filetrigger, so that packages with
  shared libraries need not to invoke ldconfig(1) in they %%post-scriptlets
- rpmlib.req: automatically generate rpmlib(PosttransFiletriggers) dependency
  for packages which provide %_rpmlibdir/*.filetrigger programs
2008-11-13 01:01:07 +03:00
Alexey Tourbin
3a9f159460 rpmlib.req: generate rpmlib(PosttransFiletriggers) dependency for /usr/lib/rpm/*.filetrigger 2008-11-13 00:57:57 +03:00
Alexey Tourbin
4acd4051a0 4.0.4-alt95.M41.6+
- implemented post-transaction filetriggers, loosely based on filetriggers.patch
  from Mandriva Linux (see %_rpmlibdir/posttrans-filetriggers for details)
- implemented %_rpmlibdir/0ldconfig.filetrigger, so that packages with
  shared libraries need not to invoke ldconfig(1) in they %%post-scriptlets
2008-11-13 00:55:42 +03:00
Alexey Tourbin
f7593429ff posttrans-filetriggers: minor changes 2008-11-12 05:10:51 +03:00
Alexey Tourbin
b97cda599e 0ldconfig.filetrigger: simplified system library check 2008-11-12 05:10:51 +03:00
Alexey Tourbin
a70594a4a3 0ldconfig.filetrigger: execute "/sbin/update_chrooted lib" for /lib and /lib64 2008-11-12 05:10:51 +03:00
Alexey Tourbin
639f3382c9 0ldconfig.filetrigger: new script 2008-11-12 05:10:51 +03:00
Alexey Tourbin
ed6095e54a posttrans-filetriggers: better description 2008-11-12 05:10:11 +03:00
Alexey Tourbin
4ada155008 implemented posttrans filetriggers, vaguely based on Mandriva patch 2008-11-12 05:10:11 +03:00
5426c19c5b fixup-libraries: Enhance recognition of ELF executables
According to /usr/lib/ldscripts/elf_*,
- every ELF executable linked by GNU ld using one of default linker
scripts contains .interp section;
- every ELF shared library linked by GNU ld using one of default linker
scripts does not contain .interp section.
2008-10-19 23:56:49 +00:00
213c77b2d2 scripts/brp-cleanup.in: Remove .gitignore files as well 2008-10-17 14:46:22 +00:00
Alexey Tourbin
e4ee0c28f8 4.0.4-alt96.7
- build/reqprov.c: when folding duplicate dependencies, Requires(pre)
  or Requires(post) should not opimitze out bare Requires
- build/files.c: execute find-requires before find-scriptlet-requires
- 0common-files.req.list: added /etc/rc.d/init.d (service)
2008-10-06 10:00:15 +04:00
Alexey Tourbin
bcb791335c 0common-files.req.list: added /etc/rc.d/init.d (service) 2008-10-06 09:55:35 +04:00
Alexey Tourbin
5afc5290c7 shebang.req: fixed typo in description, spotted by Slava Semushin 2008-10-02 16:04:18 +00:00
Alexey Tourbin
3b148e0821 shebang.req: fixed typo in description, spotted by Slava Semushin 2008-09-16 15:20:36 +04:00
Alexey Tourbin
fc4b584b3d 4.0.4-alt96.4
- shebang.req: check for trailing <CR> in interpreter path or name;
  also, validate argc, since neither execve(2) nor env(1) split arguments
2008-09-14 13:20:11 +04:00
Alexey Tourbin
d0c2f92f05 shebang.req: validate argc and <CR>
1) In Linux, execve(2) does not split shebang arguments, which implies
that effectively only one argument can be passed to the interpreter.
However, some interpreters, esp. perl, can do a magic here, which is
to split its arguments.

2) Neither /usr/bin/env can split arguments, and no magic is possible
at all.

3) Interpreter path (or name) must not end with <CR>, otherwise execve
(resp. /usr/bin/env) is deemed to fail.  However, some interpreters,
esp. perl, can strip trailing <CR> in its command line options.
2008-09-14 13:17:22 +04:00
faa42cb00e find-lang: Update usage (Slava Semushin; closes: ALT#15492) 2008-08-29 13:54:04 +00:00
Alexey Tourbin
b46be108bd find-package: updated check for file path components being alternatives 2008-08-19 23:58:39 +04:00
77a7f3cc55 Merge branch 'altlinux-4.0'
Conflicts:

	rpm-4_0.spec
2008-07-08 17:57:45 +00:00
af29ee4d70 fixup-libtool, fixup-pkgconfig: Quote substitution text (ALT#11437) 2008-07-07 22:07:40 +00:00
Alexey Tourbin
362a93334a lib.req: use CanonPath() to deal with RPATH like $ORIGIN/../lib 2008-07-07 02:23:34 +04:00
Alexey Tourbin
571a12cbdd files.req: added description and copyright 2008-06-22 11:52:53 +04:00
Alexey Tourbin
92b666e6b3 0common-files.req.list: added package names (for ownership check) 2008-06-22 10:48:19 +04:00
Alexey Tourbin
dae2eb7249 files.req: reserve second field in *-files.req.list for owner package name 2008-06-17 08:05:10 +04:00
Alexey Tourbin
c4f579077e files.req: modular /usr/lib/rpm/*-files.req.list with longest match 2008-06-16 13:05:37 +04:00
Alexey Tourbin
06bf496189 find-package (FindByName): set RPM_FINDPACKAGE_HOST_PKG_NAMES=1 for host-system lookup
This should affect dependencies only when no contents_index_bin is available.
After "APT-freindly" logic was introduced, host-system lookup always yields
file paths, but we want package names (except for alternatives etc.).

(old behaviour)
$ sh -c '. /usr/lib/rpm/find-package; FindPackage script perl'
/usr/bin/perl
$

(new behaviour)
$ sh -c '. ./scripts/find-package.in; FindPackage script perl'
perl-base
$
2008-06-14 22:34:43 +04:00
Alexey Tourbin
7d605fbd96 pkgconfiglib.req: use RPM_FINDPACKAGE_HOST_PKG_NAMES=1; removed glibc-devel optimization 2008-06-14 22:34:02 +04:00
Alexey Tourbin
737b8a005b find-package: introduced RPM_FINDPACKAGE_HOST_PKG_NAMES 2008-06-14 22:15:05 +04:00
Alexey Tourbin
d7dbd5f2ff find-{provides,requires,scriptlet-requires}: report method failures 2008-06-04 03:26:23 +04:00
Alexey Tourbin
4a557675fc Merge branch 'altlinux-4.0' 2008-05-30 22:25:55 +04:00
Alexey Tourbin
dbfaf59314 scripts/rpm2cpio.sh: deal with decompressors 2008-05-24 20:24:39 +04:00
Alexey Tourbin
d1aea84b93 scripts: use 'chmod -c' 2008-05-05 02:36:14 +04:00
Mikhail Gusarov
dda9979823 Removing .cvsignore files during brp-cleanup as well. 2008-04-10 00:48:26 +07:00
Alexey Tourbin
47bd8eff65 shebang.req: don't read the whole script
$ (echo '#!/usr/bin/perl'; cat /dev/zero) |sed -n '1s|^#![[:space:]]*/|/|p;q'
/usr/bin/perl
$
2008-04-01 15:33:19 +04:00
Alexey Tourbin
eb301af2f4 lib.req: do not optimize dependencies on standard ELF interpreter 2008-03-17 21:07:06 +03:00
f1ed4d2bdd scripts: Replace paths to basic programs with their names
Absolute pathnames in shell scripts are redundant, $PATH is enough.
2008-02-29 12:30:29 +00:00
10a67f5ef4 Revert "find-package (FindByPath): optimize out /bin/sh /bin/cat etc."
This reverts commit 54e8a1cff1.
2008-02-27 15:08:12 +00:00
86452d3194 Revert "find-package (FindByName): optimize out sh cat etc."
This reverts commit a93f78c60a.
2008-02-27 15:06:08 +00:00
63003fbeb9 Fix typos 2008-02-25 20:07:05 +00:00
816b34cd86 verify-elf.in: PIE executables on ARM always has TEXTREL, do not check them 2008-02-24 23:10:38 +00:00
Alexey Tourbin
3b998b2e3c Merge branch 'master' of git.alt:/people/ldv/packages/rpm 2008-02-23 08:23:37 +03:00
c20d7af1d2 pam.req.in: Add substack support 2008-02-22 22:38:08 +00:00
Alexey Tourbin
810f4045ed find-package: removed findpackage_xbroot stuff 2008-02-19 06:29:30 +03:00
Alexey Tourbin
e0598b6fe3 functions (ValidateBuildRoot): require canonical RPM_BUILD_ROOT
Some scripts like lib.req rely on the fact that RPM_BUILD_ROOT
should not end with trailing slashes or something.  Other
scripts like find-package explicitly assume that RPM_BUILD_ROOT
can be relocated within filesystem; they use something like
"real_buildroot" variables.  The code gets complicated,
fragile, and error-prone.

Therefore, guys, hereby I FORBID non-canonical RPM_BUILD_ROOT path.
Note that RPM_BUILD_ROOT actually does not have to exist.
This is another problem...
2008-02-19 06:28:14 +03:00
Alexey Tourbin
17b1c6b296 lib.req: return early if there is no dynamic section, to stop ldd failures with klibc executables
(before this commit)
$ ./scripts/lib.req.in /lib/mkinitrd/udev/lib/udev/usb_id
/lib/klibc-LqkyBjjvuUwwxYg5B9IteGNsWsI.so
ldd: ERROR: /lib/mkinitrd/udev/lib/udev/usb_id: trace failed
$

(after this commit)
$ ./scripts/lib.req.in /lib/mkinitrd/udev/lib/udev/usb_id
/lib/klibc-LqkyBjjvuUwwxYg5B9IteGNsWsI.so
$
2008-02-19 00:43:21 +03:00
Alexey Tourbin
e1bb17d070 lib.req.files: check "uses shared libs" as well as "dynamically linked", for klibc binaries 2008-02-19 00:22:23 +03:00
Alexey Tourbin
903c1810f3 lib.req: enabled ELF interp dependencies except for standard glibc's /lib*/ld-linux*.so.2 2008-02-18 22:31:29 +03:00
Alexey Tourbin
bf4a93fd36 s/\.packaged-files:/.files:/g 2008-02-18 18:26:21 +03:00
Alexey Tourbin
cb01bdf610 find-package (FindByName): buildroot topdir goes sbin-ish, for scriptlets 2008-02-02 01:21:10 +03:00
Alexey Tourbin
b523e1fd5c find-package (FindByPath): paths already required are safe enough, too 2008-02-02 00:57:33 +03:00
Alexey Tourbin
d2f98fca79 find-package (FindByPath): do raw dependencies for explicitly provided paths 2008-02-02 00:49:40 +03:00
Alexey Tourbin
c9bdf97976 find-package (FindByPath): added comment about file-level dependencies and APT semi-unmets 2008-02-01 23:59:28 +03:00
Alexey Tourbin
b3c6a8452e implemented /usr/lib/rpm/find-scriptlet-requires 2008-01-25 22:01:51 +03:00
Alexey Tourbin
c21526400d find-package: updated copyright years 2008-01-24 22:28:01 +03:00
Alexey Tourbin
a93f78c60a find-package (FindByName): optimize out sh cat etc. 2008-01-24 17:45:45 +03:00
Alexey Tourbin
54e8a1cff1 find-package (FindByPath): optimize out /bin/sh /bin/cat etc. 2008-01-24 15:50:52 +03:00
Alexey Tourbin
fb695a0022 find-package (FindByPath): emit raw dependencies for */bin/* */sbin/* */etc/* 2008-01-24 03:59:33 +03:00
Alexey Tourbin
5179962b46 find-package (FindByPathUnderBuildroot): refactored, added host-aided canonicalization case 2008-01-24 02:54:48 +03:00
Alexey Tourbin
c8ccb0da6c find-package: enhanced path lookups under buildroot, added special case for dir dependencies
$ less alterator-install-common-desktop-0.11-alt1.i586.rpm |grep help
-rwxr-xr-x    1 root    root              972 Oct 30 18:38 /usr/share/alterator/help/ru_RU/basesystem.html
-rwxr-xr-x    1 root    root              340 Oct 30 18:38 /usr/share/alterator/help/ru_RU/kbd.html
-rwxr-xr-x    1 root    root             2233 Oct 30 18:38 /usr/share/alterator/help/ru_RU/license.html
-rwxr-xr-x    1 root    root             1280 Oct 30 18:38 /usr/share/alterator/help/ru_RU/lilo.html
-rwxr-xr-x    1 root    root             3032 Oct 30 18:38 /usr/share/alterator/help/ru_RU/network.html
-rwxr-xr-x    1 root    root             4840 Oct 30 18:38 /usr/share/alterator/help/ru_RU/packages.html
-rwxr-xr-x    1 root    root             1928 Oct 30 18:38 /usr/share/alterator/help/ru_RU/root.html
-rwxr-xr-x    1 root    root             1387 Oct 30 18:38 /usr/share/alterator/help/ru_RU/time.html
-rwxr-xr-x    1 root    root             1223 Oct 30 18:38 /usr/share/alterator/help/ru_RU/user.html
-rwxr-xr-x    1 root    root            11024 Oct 30 18:38 /usr/share/alterator/help/ru_RU/vm.html
-rwxr-xr-x    1 root    root             1789 Oct 30 18:38 /usr/share/alterator/help/ru_RU/x11.html
lrwxrwxrwx    1 root    root               31 Oct 30 18:38 /usr/share/alterator/help/ru_UA -> /usr/share/alterator/help/ru_RU
$

%files ...
%_datadir/alterator/help/ru_RU/*
%_datadir/alterator/help/ru_UA

The package referes ru_RU directory but does not own the directory.
Old behaviour: unmet dependency.

>  alterator-icons-lite-0.4.0-alt1      Requires(rpmlib)        rpmlib(PayloadFilesHavePrefix) <= 4.0-1
> +alterator-install-common-desktop-0.11-alt1   Requires        /usr/share/alterator/help/ru_RU
>  alterator-install-common-desktop-0.11-alt1   Requires        alterator-autoinstall

New behaviour: though the package does not explicitly own the directory,
it has some files packaged under the directory.  Because of this, ru_UA
symlink will not be broken after install.  We chose to be forgiving:

symlinks.req: WARNING: /usr/src/tmp/alterator-install2-desktop-buildroot/usr/share/alterator/help/ru_UA: directory /usr/share/alterator/help/ru_RU not owned by the package
2008-01-23 02:42:02 +03:00
Alexey Tourbin
4c187ca387 functions: added new function PackagedFiles() 2008-01-23 01:22:45 +03:00
Alexey Tourbin
58e433c8be check-files: ignore -wholename "$RPM_BUILD_ROOT/.*" paths 2008-01-22 21:11:41 +03:00
Alexey Tourbin
11c666284f functions (Fatal): added "ERROR:" prefix 2008-01-22 19:51:11 +03:00
Alexey Tourbin
0585689562 lib.req: added a copyright holder 2008-01-16 02:42:11 +03:00
Alexey Tourbin
ea2fa9a0b1 lib.req: fixed file-level dependencies output
$ gcc test.c /usr/lib/perl5/vendor_perl/i386-linux/auto/Glib/Glib.so
$ objdump -p a.out |grep Glib
  NEEDED      /usr/lib/perl5/vendor_perl/i386-linux/auto/Glib/Glib.so
$ ldd a.out |grep Glib
        /usr/lib/perl5/vendor_perl/i386-linux/auto/Glib/Glib.so (0xb7ec0000)
$

(before previous commit)
$ /usr/lib/rpm/lib.req a.out
rtld(GNU_HASH)
libc.so.6(GLIBC_2.0)
lib.req: WARNING: /home/at/a.out: library /usr/lib/perl5/vendor_perl/i386-linux/auto/Glib/Glib.so not found
$

(before this commit)
$ ./scripts/lib.req.in a.out
rtld(GNU_HASH)
libc.so.6(GLIBC_2.0)
/usr/lib/perl5/vendor_perl/i386-linux/auto/Glib//usr/lib/perl5/vendor_perl/i386-linux/auto/Glib/Glib.so
$

(after this commit)
$ ./scripts/lib.req.in a.out
rtld(GNU_HASH)
libc.so.6(GLIBC_2.0)
/usr/lib/perl5/vendor_perl/i386-linux/auto/Glib/Glib.so
$
2008-01-16 02:42:01 +03:00
Alexey Tourbin
af1ce1840d lib.req: fixed awk script for ldd output
This now handles the case of relocated ld-linux.so.2:
	/lib/ld-linux.so.2 => /tmp/buildroot/lib/ld-linux.so.2

$ cd /tmp/buildroot
$ ii() {install -v -pD $1 .$1; }
$ ii /lib/ld-linux.so.2
$ ii /usr/lib/libmemusage.so
$

(old)
$ RPM_BUILD_ROOT=$PWD /usr/lib/rpm/lib.req ./usr/lib/libmemusage.so
libc.so.6(GLIBC_2.1.3)
libc.so.6(GLIBC_2.1)
libc.so.6(GLIBC_2.0)
lib.req: WARNING: /usr/lib/libmemusage.so: library ld-linux.so.2 not found
libdl.so.2(GLIBC_2.0)
$

(new)
$ RPM_BUILD_ROOT=$PWD ~/git.alt/rpm/scripts/lib.req.in ./usr/lib/libmemusage.so
libc.so.6(GLIBC_2.1.3)
libc.so.6(GLIBC_2.1)
libc.so.6(GLIBC_2.0)
ld-linux.so.2(GLIBC_2.3)
libdl.so.2(GLIBC_2.0)
$
2008-01-16 02:27:21 +03:00
Alexey Tourbin
b2aec52d0e symlinks.req.files: do all symbolic links (will emit file-level dependencies for targets under RPM_BUILD_ROOT) 2007-12-03 14:22:54 +03:00
Alexey Tourbin
b2b7954938 pkgconfiglib.req: use FindPackage to emit file-level dependencies on RPM_BUILD_ROOT libraries 2007-12-03 14:13:50 +03:00
Alexey Tourbin
cf62e1c09f pkgconfiglib.req: use plain "readlink -ve" for gcc_libdirs 2007-12-03 14:00:05 +03:00
Alexey Tourbin
6bc8c52298 shell.req: manage "has execuatable candidate" verbosity for files under RPM_BUILD_ROOT 2007-12-03 12:32:11 +03:00
Alexey Tourbin
49e00608a0 find-package (FindByName): emit file-level dependencies for files under RPM_BUILD_ROOT 2007-12-03 12:06:58 +03:00
Alexey Tourbin
34974c9e88 pkgconfiglib.req: use Warning() 2007-12-03 11:40:22 +03:00
Alexey Tourbin
b630a6cd57 find-package (FindByPath): use Warning() for paths that cannot be canonicalized under RPM_BUILD_ROOT 2007-12-03 11:40:21 +03:00
Alexey Tourbin
9ad1babe6a functions: new function: Warning() 2007-12-03 11:39:48 +03:00
Alexey Tourbin
3cb16e8f3f shell.req: set empty PATH= for 'type -t' check, to avoid filesystem lookups 2007-11-30 13:45:03 +03:00
Alexey Tourbin
3abcad0533 lib.req: do file-level dependencies for private libraries
Private libraries are the ones which have non-standard prefix.
We choose to produce file-level dependency (without braces) on
such private libraries in two cases: 1) either the library was
found under RPM_BUILD_ROOT; or 2) no versioned symbols are used
from the library (no versioned references).
2007-11-25 18:34:41 +03:00
Alexey Tourbin
6e73a89c9b find-package (FindByPath): emit file-level dependencies for paths that are under RPM_BUILD_ROOT 2007-11-23 12:54:37 +03:00
Alexey Tourbin
22854f6e29 find-package (FindPackage): extra check for valid pathname, excludes "/" 2007-11-23 11:51:32 +03:00
Alexey Tourbin
e56761c95f functions (CanonPath): fixed `CanonPath "/"'
was:
$ sh -c '. /usr/lib/rpm/functions; CanonPath /'
readlink: : No such file or directory
$

now:
$ sh -c '. scripts/functions; CanonPath /'
/
$
2007-11-23 11:47:47 +03:00
Alexey Tourbin
822eb84f3d Revert "find-package (FindByPath): new function LinkIsAlternative()"
Things suck.

$ rpm -q --whatprovides /usr/bin/python
python-base-2.4.4-alt13
$ rpm -q --whatprovides /usr/bin/../bin/python
warning: no package provides /usr/bin/python
$

This reverts commit 56a9571e4a.
2007-11-21 17:12:03 +03:00
Alexey Tourbin
56a9571e4a find-package (FindByPath): new function LinkIsAlternative()
This will also check if the link is not owned by any package,
but the path is provided by some package.

$ rpm -qf /usr/bin/python
warning: file /usr/bin/python is not owned by any package
$ rpm -q --whatprovides /usr/bin/python
python-base-2.4.4-alt13
$

This looks very much like an alternative, ESPECIALLY if an intermediate
path component, which is a link to directory (python is not the case).

This new condition is disabled, only a warning is issued.
We'll see if it should be enabled.
2007-11-21 15:32:20 +03:00
Alexey Tourbin
c9d79d6f16 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.
2007-11-21 14:14:55 +03:00
Alexey Tourbin
6c5142c792 shell.req: removed "function" from "alias|keyword|builtin" check
It seems that our /bin/bash interpreter does not have any "built-in"
functions by default.

$ bash -c 'foo() { :; }; set' |grep ' ()'
foo ()
$ bash -c 'set' |grep ' ()'
$

Thus funcions can be user-defined only.  Generally, what was wrong
with this "function" check is that it was executed in shell.req context.
That is, since e.g. "Info" and "Fatal" are functions within shell.req,
all other dependencies on "Info" and "Fatal" were simply ignored.
This was wrong and this has now been fixed.

Another possibility to ignore current shell.req context while checking
for built-in things is to spawn "clean" shell instance:

-	case "$(type -t -- "$2")" in
+	case "$($sh -c 'type -t "$1"' "$0" "$2")" in

But this can be rather expensive at this early "cleanup" stage.
2007-11-21 14:14:54 +03:00
Alexey Tourbin
d2eedf0fd3 functions: use $(dirname "$0") for /usr/lib/rpm 2007-11-18 08:02:31 +03:00
Alexey Tourbin
377a8491df find-package (FindByPath): use CanonPath again
Note that alternative path may also require non-blind canonicalization (in
very pathological cases), for which I also use CanonPath.

(old behaviour, wrong)
$ sudo ln -s share /usr/bare
$ sh -efu -c '. scripts/find-package.in; FindPackage script /usr/bare/libtool/config.guess'
/usr/bare/libtool
sh: script: alternative /usr/bare/libtool prevents /usr/bare/libtool/config.guess dependency resolution
$

(new behaviour, good)
$ sh -efu -c '. scripts/find-package.in; FindPackage script /usr/bare/libtool/config.guess'
/usr/share/libtool
sh: script: alternative /usr/share/libtool prevents /usr/bare/libtool/config.guess dependency resolution
$
2007-11-18 06:56:52 +03:00
Alexey Tourbin
78a8d8e533 funcionts (CanonPath): use two-pass canonicalization
This removes the ambiguity with directories.  Note that before this change,
e.g. [ -L /etc/init.d ] and [ -L /etc/init.d/ ] would yield different
result, which required ad hock -d test to keep things consistent.
With first-pass "blind" (cleanup-only) canonicalization, ad hock
test for directories is no longer required, and things are yet more
consistent.

The things are now consistent with documented behaviour -- "canonicalize
each path component except for the last".  This actually changed previous
behaviour:
was:	/etc/init.d -> /etc/rc.d/init.d
now:	/etc/init.d -> /etc/init.d

Generally, if we have some path for which we should yield a dependency,
CanonPath is probably the best we can do before running e.g. contents_index
search.
2007-11-18 02:49:44 +03:00
Alexey Tourbin
5b353de0eb find-package (FindByPath): rewrite without CanonPath, use two-pass canonicalization 2007-11-17 17:03:04 +03:00
Alexey Tourbin
2bf12baa21 find-package (FindByPath): implemented smart check for alternatives, cf. bug #13374
Some examples.

1)
$ sh -efu -c '. scripts/find-package.in; FindPackage script /usr/share/libtool'
/usr/share/libtool
$ sh -efu -c '. scripts/find-package.in; FindPackage script /usr/share/libtool/'
/usr/share/libtool
$

This shows that alterntaives check is no longer restricted to deficient
	readlink "$rep" |grep '^/etc/alternatives/'
logic.  Old behaviour was:

$ sh -efu -c '. /usr/lib/rpm/find-package; FindPackage script /usr/share/libtool'
/usr/share/libtool
$ sh -efu -c '. /usr/lib/rpm/find-package; FindPackage script /usr/share/libtool/'
sh: script: checking contents_index_all for /usr/share/libtool-1.5
sh: script: /usr/share/libtool-1.5 -> libtool_1.5 (via contents_index_all)
libtool_1.5
$

2)
$ sh -efu -c '. scripts/find-package.in; FindPackage script /usr/share/libtool/../autoconf'
/usr/share/autoconf
/usr/share/libtool
$

This shows that any number of alternatives can be resolved within a single path.

3)
$ sh -efu -c '. scripts/find-package.in; FindPackage script /usr/share/libtool/config.guess'
/usr/share/libtool
sh: script: alternative /usr/share/libtool prevents /usr/share/libtool/config.guess resolution
$

This shows that we cannot resolve paths under alternatives directory.

4)
$ sh -efu -c '. scripts/find-package.in; FindPackage script /usr/share/libtool/../../bin/perl'
/usr/share/libtool
perl-base
$

This shows that we actually CAN resolve paths which are not under alternatives directory.
2007-11-17 15:04:06 +03:00
Alexey Tourbin
347a9eb418 symlinks.req: do only one single step of symlink resolution 2007-11-17 10:52:57 +03:00
b29c6e2b2d scripts/pam.*.files: Optimize filename check 2007-11-10 20:47:03 +00:00
5209355a19 scripts/*.req.files: Fix "not executable" wording 2007-11-10 20:47:02 +00:00
66ee80b813 scripts/*.files: Use single quotes for constant strings 2007-11-10 20:47:01 +00:00
5b9096b561 scripts/*.in: s|/usr/lib/rpm/|@RPMCONFIGDIR@/|g 2007-11-10 20:46:59 +00:00
5e023d62c1 scripts/functions: Minor code cleanup
Fatal, Verbose, Debug: Use Info().
ValidateBuildRoot: Use single quotes for constant string.
SetupMethods: Do not initialize loop variable. Use "tr -s".
RunMethods: Do not initialize loop variable. Use "echo ''" trick. Cleanup "$@" use.
ArgvFileAction: Do not initialize auto variable.
2007-11-10 20:46:29 +00:00
e6d18b0591 Merge branch 'altlinux-4.0' 2007-11-10 13:27:49 +00:00
Kirill A. Shutemov
06eb5ce9e7 Do not check STACK entry in ARM ELF files 2007-11-10 13:26:44 +00:00
Alexey Tourbin
488d03d395 pkgconfiglib.req: downgraded a few Verbose messages to Debug 2007-10-29 14:55:54 +03:00
Alexey Tourbin
e247bb88db enabled pkgconfiglib.req 2007-10-29 14:21:47 +03:00
Alexey Tourbin
68bf0157e9 shell.req (ShellReq): still check if executable candidates are available, even in the first pass
$ cat test.sh
rsync() { command rsync -vP "$@" ; }
$ scripts/shell.req.in test.sh
shell.req.in: /home/at/git.alt/rpm/test.sh: rsync() is possibly used before its definition
shell.req.in: /home/at/git.alt/rpm/test.sh: rsync() has execuatable candidate: rsync -> rsync (skip)
$
2007-10-29 13:36:36 +03:00
Alexey Tourbin
3f1e70716d pkgconfiglib.req: use "pkg-config --disable-recursion" to get libs and libdirs 2007-10-29 12:29:04 +03:00
Alexey Tourbin
2ae82b0a11 pkgconfiglib.req: also check *.a static libraries 2007-10-16 14:47:34 +04:00
Alexey Tourbin
02e9558ab6 pkgconfiglib.req: checking -rpath is wrong; back to --libs-only-l and --libs-only-L
Contrary to my quick ld(1) interpretation, -rpath option does not really
adjust search path directories.

$ gcc ldtest.c -Wl,-rpath,/usr/lib/gcj-4.1 -ljvm
/usr/bin/ld: cannot find -ljvm
$ gcc ldtest.c -L/usr/lib/gcj-4.1 -ljvm
$

Also note that checking for empty pkg-config output is not realiable:

$ echo "^$(pkg-config --libs-only-l /usr/share/pkgconfig/gtk-doc.pc)\$"
^ $
$
2007-10-16 14:39:28 +04:00
Alexey Tourbin
ae2da665dd pkgconfiglib.req: set up libs= and libdirs= from $pcLibs; consider -Wl,rpath,... 2007-10-16 13:17:39 +04:00
Alexey Tourbin
195dc1f785 pkgconfiglib.req: use 'gcc -print-search-dirs' to set up gcc_libdirs 2007-10-13 22:35:24 +04:00
Alexey Tourbin
a05a5f4f6b pkgconfiglib.req: restored 2007-10-13 21:08:29 +04:00
Alexey Tourbin
d601c3e625 shell.req (ShellReqEND): still check if executable candidates are available
$ cat test1.sh test2.sh
mail
mail() { :; }
$ scripts/shell.req.in test1.sh test2.sh
shell.req.in: /home/at/git.alt/rpm/test1.sh: mail() is possibly defined in /home/at/git.alt/rpm/test2.sh
shell.req.in: /home/at/git.alt/rpm/test1.sh: mail() has execuatable candidate: mail -> /bin/mail (skip)
$
2007-10-09 17:00:25 +04:00
Alexey Tourbin
3064082899 find-package (FindByName): better check for maybe_function 2007-10-09 12:30:05 +04:00
Alexey Tourbin
638b19576a shell.req: aded comment to ShellReqEND 2007-10-09 00:51:29 +04:00
Alexey Tourbin
f7e409e475 shell.req: AddReq/AddProv: factored common code 2007-10-09 00:22:42 +04:00
Alexey Tourbin
6ead9f4389 shell.req: updated /.provides.sh code 2007-10-08 02:42:27 +04:00
Alexey Tourbin
a39795104e shell.req: reworked without temporary files 2007-10-08 02:10:53 +04:00
Alexey Tourbin
d77304d084 shell.req: fixed bug: read does need final newline 2007-10-08 01:22:37 +04:00
Alexey Tourbin
45ac74978f shell.req: renamed "reqs" varible to "out" 2007-10-08 01:08:33 +04:00
Alexey Tourbin
28b996a376 shell.req: consider removing "function" from alias|builtin check 2007-10-08 01:04:26 +04:00
Alexey Tourbin
28850f17b5 shell.req: fold dups after CleanupRpmRequires 2007-10-08 00:54:23 +04:00
Alexey Tourbin
536241cbbe shell.req (CleanupRpmRequires): allow e.g. executable(\ls) and executable("ls") 2007-10-08 00:40:15 +04:00
Alexey Tourbin
66df05529b shell.req: moved alias|builtin check into CleanupRpmRequires 2007-10-08 00:39:03 +04:00
Alexey Tourbin
a90f03397c shell.req: cleanup and validate "$sh --rpm-requires" output 2007-10-07 23:07:11 +04:00
Alexey Tourbin
4a8997aa6f pkgconfig.req: paranoid pkg-config output validation 2007-10-07 17:04:01 +04:00
Alexey Tourbin
566bc6ace5 shell.req: added early first pass for self-requires elimination 2007-10-03 14:33:21 +04:00
Alexey Tourbin
83fa94a314 shell.req: initial attempt to implement self-requires elimination 2007-10-03 14:04:25 +04:00
Alexey Tourbin
3fa83b4f4f pkgconfig.req: factored common code 2007-10-03 00:20:43 +04:00
Alexey Tourbin
7ee459ab6b pkgconfiglib.req: removed
'pkg-config --libs' seems to deploy dependencies recursively,
which is what I did not expect.

$ grep Requires pango.pc
Requires: glib-2.0,gobject-2.0,gmodule-no-export-2.0
$ grep Lib pango.pc
Libs: -lpango-1.0 -lm
$ pkg-config --libs-only-l pango.pc
-lpango-1.0 -lm -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0
$

I need some time to devise a better implementation.
2007-09-30 14:59:22 +04:00
Alexey Tourbin
517efb4b7d pkgconfiglib.req: allow absolute symbolic links under RPM_BUILD_ROOT 2007-09-29 16:46:28 +04:00
Alexey Tourbin
9b744d4512 pkgconfig.req.files: don't warn on symbolic links 2007-09-29 14:31:09 +04:00
Alexey Tourbin
fddaf81544 functions (SetupMethods): "[!" in shell pattern is better than "[^" 2007-09-24 03:14:24 +04:00
Alexey Tourbin
5844214067 shell.req: find re-exec interpreter only if the script is executable 2007-09-24 02:59:25 +04:00
Alexey Tourbin
8ee696768c shebang.req.files: added "executable not executable" warning 2007-09-24 02:57:42 +04:00
Alexey Tourbin
7d68978688 find-package (FindByPath): ignore /dev/* /proc/* /sys/* dependencies 2007-09-23 01:23:34 +04:00
Alexey Tourbin
d9b38d645f find-package (FindByPath): render $RPM_BUILD_DIR* dependencies invalid 2007-09-21 15:58:05 +04:00
Alexey Tourbin
8dd5a961e8 find-package (FindByPath): consider (not-so-) broken symbolic links inside RPM_BUILD_ROOT 2007-09-19 14:16:01 +04:00
Alexey Tourbin
d74f8d9a69 find-package (findByName): replaced /usr/bin/which with custom shell code
This is to address a few problems:

1) When checking RPM_BUILD_ROOT, st_mode test performed by /usr/bin/which
is not quite reliable.  Files can be packaged with different %attr mode.

2) When checking RPM_BUILD_ROOT, there could be symbolic links there
which are (not-so-) broken.

3) When checking host system, files like /sbin/init (which is 0700)
are effectively bypassed by /usr/bin/which.

4) There's an ongoing practice of placing shell function libraries
under /usr/bin, e.g. /usr/bin/git-sh-setup.  These files are sourced
from within shell scripts and need not be executable at all.

This leads me to the point that permission check, which is performed by
/usr/bin/which, is not needed at all.  Note that things are getting more like
contents_index_bin search.  And for RPM_BUILD_ROOT, we do not even require
strong stat-wise file existence.

I like this new term: "strong stat-wise file existence".
It's awesome.
2007-09-19 12:57:08 +04:00
Alexey Tourbin
3925c4c392 find-package (FindByName): manage "not found" verbosity 2007-09-19 11:08:53 +04:00
Alexey Tourbin
a1e07a6d21 find-package (FindByName): added sbin-ish paths under /etc 2007-09-19 10:33:12 +04:00
Alexey Tourbin
d03deaf0fa find-package: implemented different PATHs for user and root code (the */sbin scripts)
also appended /usr/games to both user and root PATHs
2007-09-19 00:17:53 +04:00
Alexey Tourbin
b0190e3888 lib.prov: fixed DEF_RPM_FINDPROV_LIB_PATH 2007-09-16 17:31:49 +04:00
Alexey Tourbin
7ece64adc3 find-package (FindPackage): unquoted $valid case paterns 2007-09-12 20:07:43 +04:00
Alexey Tourbin
e5f015d831 find-package (FindPackage): fixed shell syntax (D'oh!) 2007-09-12 19:34:01 +04:00
Alexey Tourbin
4eb4ccf490 find-package: fixed Verbose message for contents_index_bin 2007-09-12 19:28:46 +04:00
Alexey Tourbin
2b1c36538f find-package: implemented protection against shell metacharacters and evil paths
There are two possibilities for protection:
1) we should protect at least from very evil shell metacharacters,
like [$*], and also from [:cntrl:] (e.g. newline).
2) we can provide an exhaustive list of characters that are valid
for non-evil pathnames and commands, and issue mandatory warning
if the command or path appears to be evil.

I chose the latter approach.
Valid character range is 'A-Za-z0-9/@=.,:_+-'.

Note that (almost) all files from our base build system
are valid paths:

$ valid='A-Za-z0-9/@=.,:_+-'
$ hsh-run -- rpm -qal |grep "[^$valid]"
/usr/bin/[
/usr/share/man/man1/[.1.bz2
(contains no files)
(contains no files)
$

Later we'll see if the range of valid characters needs to be extended.
2007-09-10 13:32:26 +04:00
Alexey Tourbin
9196764224 pkgconfiglib.req: better error message 2007-08-29 02:19:10 +04:00
Alexey Tourbin
cc20bfa4b1 pkgconfiglib.req: use CanonPath for libdir before rpmquery 2007-08-29 01:59:16 +04:00
Alexey Tourbin
0e085c0a83 pkgconfiglib.req: new pkgconfig.req mode (makes dependencies on Libs)
This will grab libraries from ^Libs: clause and map each library
to rpm dependency, which is typically lib*-devel package.

$ grep ^Libs: /usr/lib/pkgconfig/directfb.pc
Libs: -ldirectfb -lpthread -ldl -lz
$

It works like this:

$ ln -s pkgconfig.req.in scripts/pkgconfiglib.req.in
$ scripts/pkgconfiglib.req.in -v /usr/lib/pkgconfig/directfb.pc
pkgconfiglib.req.in: /usr/lib/pkgconfig/directfb.pc: libdirectfb.so -> libdirectfb-devel
libdirectfb-devel
pkgconfiglib.req.in: /usr/lib/pkgconfig/directfb.pc: libz.so -> zlib-devel
zlib-devel
pkgconfiglib.req.in: /usr/lib/pkgconfig/directfb.pc: libfusion.so -> libdirectfb-devel
libdirectfb-devel
pkgconfiglib.req.in: /usr/lib/pkgconfig/directfb.pc: libdirect.so -> libdirectfb-devel
libdirectfb-devel
pkgconfiglib.req.in: /usr/lib/pkgconfig/directfb.pc: libpthread.so -> glibc-devel (skip)
pkgconfiglib.req.in: /usr/lib/pkgconfig/directfb.pc: libdl.so -> glibc-devel (skip)
$

Some minor problems:

$ scripts/pkgconfiglib.req.in /usr/lib/pkgconfig/*.pc >/dev/null
pkgconfiglib.req.in: /usr/lib/pkgconfig/avahi-qt3.pc: cannot find libavahi-qt3.so library path (skip)
pkgconfiglib.req.in: /usr/lib/pkgconfig/libgdiplus.pc: cannot find libexif.so library path (skip)
pkgconfiglib.req.in: /usr/lib/pkgconfig/valgrind.pc: cannot find libcoregrind.so library path (skip)
pkgconfiglib.req.in: /usr/lib/pkgconfig/valgrind.pc: cannot find libvex.so library path (skip)
pkgconfiglib.req.in: /usr/lib/pkgconfig/valgrind.pc: cannot find libgcc.so library path (skip)
$
2007-08-28 20:40:22 +04:00
Alexey Tourbin
63ac11f82e pkgconfig.req: better diagnostics
(old)
$ /usr/lib/rpm/pkgconfig.req /usr/lib/pkgconfig/gtkextra-2.0.pc
Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
Package 'gtk+-2.0', required by 'GtkExtra', not found
$

(new)
$ scripts/pkgconfig.req.in /usr/lib/pkgconfig/gtkextra-2.0.pc
Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
Package 'gtk+-2.0', required by 'GtkExtra', not found
pkgconfig.req.in: failed to process /usr/lib/pkgconfig/gtkextra-2.0.pc
$
2007-08-28 18:52:13 +04:00
Alexey Tourbin
015636ebda pkgconfig.req.files: check for *" text"* type
$ ls /usr/lib/pkgconfig/*.pc >.1
$ ls /usr/lib/pkgconfig/*.pc |file -NF$'\t' -f - |./scripts/pkgconfig.req.files >.2
pkgconfig.req.files: /usr/lib/pkgconfig/libpng.pc:  symbolic link to `libpng12.pc'
$ diff -U1 .1 .2
--- .1  2007-08-28 18:26:10 +0400
+++ .2  2007-08-28 18:26:13 +0400
@@ -115,3 +115,2 @@
 /usr/lib/pkgconfig/libpcre.pc
-/usr/lib/pkgconfig/libpng.pc
 /usr/lib/pkgconfig/libpng12.pc
$

Remember that symlinks are relevant only for find-requires.
There is no such thing as symbolic links in find-provides.
2007-08-28 18:29:27 +04:00
Alexey Tourbin
c5dd9e98c3 merged pkgconfig.{req,prov} scripts into pkgconfig.req, added install-data-local target 2007-08-28 18:11:26 +04:00
Alexey Tourbin
7b199c08da shell.req: use "file -bL" 2007-08-28 02:12:58 +04:00
Alexey Tourbin
806a7e6491 shell.req: reworked
Now "sh --rpm-requires" failures are always verbose:

$ ln -s /usr/lib/rpm @RPMCONFIGDIR@
$ scripts/shell.req.in /usr/lib/rpm/tcl.req
/usr/lib/rpm/tcl.req: line 32: syntax error near unexpected token `}'
/usr/lib/rpm/tcl.req: line 32: `}'
shell.req.in: /usr/lib/rpm/tcl.req is ${RPM_TCLSH:-/usr/bin/tclsh} script!
shell.req.in: /usr/lib/rpm/tcl.req: invalid pathname ${RPM_TCLSH:-/usr/bin/tclsh}
$ echo $?
0
$

$ scripts/shell.req.in /usr/bin/perldoc
/usr/bin/perldoc: line 6: syntax error near unexpected token `Pod::Perldoc-'
/usr/bin/perldoc: line 6: `exit( Pod::Perldoc->run() );'
shell.req.in: /usr/bin/perldoc: /bin/sh --rpm-requires failed
$ echo $?
1
$
2007-08-28 01:22:46 +04:00
Alexey Tourbin
650b0fc0c1 find-package (FindByPath): use CanonPath before contens_index search
I see that this can add SOME problems if e.g. /usr is relocated
to /storage/usr in the build environment.  This is because CanonPath
follows symlinks for dirname.

But I argue that it is safe for hasher, and it fixes some problems
with contents_index search which is used only in the hasher (by default).

I also argue that, even if /usr is relocated, this is not going to be a BIG
problem, because it is not going to produce unmet dependencies (well, most
of the time).  This is because 'rpm -qf' will work as expected in that screwed
build environment.
2007-08-27 21:27:05 +04:00
Alexey Tourbin
5a5bd82133 scripts/functions: CanonPath: new function (canonicalize each path component except for the last)
This is actually a DWIM-style hack.  It does what we want but I cannot
think of a better name.  The idea is that sometimes we want to clean
up path name, possibly following symbolic links, except for the last
component, which we want to keep as is.

$ sh -c '. scripts/functions; CanonPath /etc/init.d/functions'
/etc/rc.d/init.d/functions
$ sh -c '. scripts/functions; CanonPath /usr/bin/../bin/perl'
/usr/bin/perl
$

So actually it does a few different things: 1) prepend $PWD if needed;
2) cleanup dirname; 3) canonicalize dirname with respect to symbolic links.

Now the question is how to process symbolic links which
targets are directories, e.g. /etc/init.d ?  My answer is that
both "/etc/init.d" and "/etc/init.d/", as well as "/etc/init.d/."
should yield the same result, which is "/etc/rc.d/init.d".
2007-08-27 21:00:00 +04:00
fd480b9df1 scripts/find-package.in (FindPackage): Check binary index prior to complete index 2007-08-25 15:38:42 +00:00
Alexey Tourbin
71c3d7908d find-package (FindByName): in ambigous case, first check if [ path = pkg ] 2007-08-10 16:10:58 +04:00
Alexey Tourbin
bd368155cd find-package (FindByPath): discard rpmquery stderr 2007-08-08 02:54:04 +04:00
Alexey Tourbin
968016ffdc find-package: added description atop 2007-08-08 00:49:48 +04:00
Alexey Tourbin
7c7eccde32 find-package (FindByName): added more comments, for casual readers 2007-08-08 00:28:55 +04:00
Alexey Tourbin
706ff5d5ec find-package: more comments for RPM_FINDPACKAGE_PATH processing 2007-08-07 22:59:50 +04:00
Alexey Tourbin
91b7ebe4c6 find-package: added comments to RPM_FINDPACKAGE_PATH awk script 2007-08-07 22:41:19 +04:00
Alexey Tourbin
c9dbb383f6 find-package: manage verbosity with 'local Verbose' variable
When something goes not as good as we would like, we should
be able to increase verbosity locally for this particular case.

Old behaviour:

$ sh -efu -c '. /usr/lib/rpm/find-package; RPM_PKG_CONTENTS_INDEX_ALL=/etc/passwd FindPackage myscript /bin/cat'
sh: myscript: checking contents_index_all for /bin/cat
coreutils
$

In this example I pretend that /bin/cat lookup failed against
contents_index_all.  The problem here is that, once we know about
a "strange thing" happening, we also want to know the end of the story.
Where does coreutils come from?  That is the question.

New behaviour:

$ sh -efu -c '. /usr/lib/rpm/find-package; RPM_PKG_CONTENTS_INDEX_ALL=/etc/passwd FindPackage myscript /bin/cat'
sh: myscript: checking contents_index_all for /bin/cat
sh: myscript: /bin/cat -> coreutils (via rpmdb)
coreutils
$

When "strange things" happen, I increase verbosity locally,
until the "strange thing" is resolved.  I use 'local Verbose=Info'
approach to increase verbosity.  Since shell has dynamic variables
(with visibility bound to function-call stack), this is just what
we need.

Strange things are:
- in FindByPath:
  + contents_index_all search
- in FindByName:
  + ambiguous contents_index_bin search
    (the same command under e.g. /sbin and /usr/bin)
  + ambiguous /usr/bin/which search (ditto)
2007-08-07 22:17:58 +04:00
Alexey Tourbin
a2090d8dd9 find-package (FindPackage): enhanced path vs. command validation
Also increased verbosity for invalid pathnames and/or commands.
2007-08-07 20:43:02 +04:00
Alexey Tourbin
3f764319ec find-package (FindByPath): enhanced contents_index search
In FindByPath, we should always check contents_index_bin first.
It is not quite expensive, and we make no assumptions which path
entries it may contain (our contents_index_bin, in addition
to standard *bin/ paths, also has /etc entries).

However, if contents_index_bin lookup fails, we may or may
not want to proceed with very expensive contents_index_all
search.  We assume that, if contents_index_bin lookup actually
has take place for some standard *bin/ path, then there is simply
no need to proceed with contents_index_all.

Now we also assume that contents_index_all file can be possibly
gzipped (I use "gzip -cdfq" for "zcat or cat", found in zgrep).

Also increased verbosity (Verbose to Info) for contents_index_all
messages, since it is expensive and it is a means of "last resort"
to finding something strange before giving up, which is quite worth
to note about.

Also increased verbosity for "raw, not found" dependencies,
since they are likely to become unmet.
2007-08-07 19:58:35 +04:00
Alexey Tourbin
60ca916d3b shell.req.in: quote grep arguments with "--"
There's a bug in "sh --rpm-requires" mode:

$ sh --rpm-requires /dev/stdin <<<'exec -a PERL /usr/bin/perl'
executable(-a)
$

Then "-a" is passed to grep as its first argument (search pattern).
2007-08-03 19:04:29 +04:00
a78e49bdb2 Merge branch 'master' into mod 2007-03-27 23:15:44 +00:00
94bc3f23e1 scripts/files.req.list: Add /etc/hooks 2007-03-27 22:36:28 +00:00
Alexey Tourbin
5909f93e30 find-package (FindByName): optimized awk script
It looks like that, unlike in perl, pattern matching in awk is very slow.
Perhaps they just don't have regexp engine hackers like Larry Wall or
Ilya Zakharevich (or, most recently, Yves Orton aka demerphq).

That's okay, since I can rewrite the script without pattern matching at all.
That is, I don't have to split each index line into dir+basename, because
I can prepare all valid absolute pathnames in advance.

Old speed:

$ time /usr/lib/rpm/shell.req -v /dev/stdin <<<`rpm -ql rpm-utils |sed -n 's|/usr/bin/||p'`
shell.req: add_changelog -> /usr/bin/add_changelog -> rpm-utils (via content index)
shell.req: buildreq -> /usr/bin/buildreq -> rpm-utils (via content index)
shell.req: cleanup_spec -> /usr/bin/cleanup_spec -> rpm-utils (via content index)
shell.req: compare_packages -> /usr/bin/compare_packages -> rpm-utils (via content index)
shell.req: filereq -> /usr/bin/filereq -> rpm-utils (via content index)
shell.req: packageof -> /usr/bin/packageof -> rpm-utils (via content index)
shell.req: packagereq -> /usr/bin/packagereq -> rpm-utils (via content index)
shell.req: rebuild_package -> /usr/bin/rebuild_package -> rpm-utils (via content index)
shell.req: rebuild_packages -> /usr/bin/rebuild_packages -> rpm-utils (via content index)
shell.req: rpmdups -> /usr/bin/rpmdups -> rpm-utils (via content index)
shell.req: rpmevrcmp -> /usr/bin/rpmevrcmp -> rpm-utils (via content index)
shell.req: rpmrdups -> /usr/bin/rpmrdups -> rpm-utils (via content index)
shell.req: rpmvercmp -> /usr/bin/rpmvercmp -> rpm-utils (via content index)
shell.req: stamp_spec -> /usr/bin/stamp_spec -> rpm-utils (via content index)
rpm-utils
/usr/lib/rpm/shell.req -v /dev/stdin <<<   5.37s user 0.11s system 96% cpu 5.683 total
$

New speed:

$ time /usr/lib/rpm/shell.req -v /dev/stdin <<<`rpm -ql rpm-utils |sed -n 's|/usr/bin/||p'`
shell.req: add_changelog -> /usr/bin/add_changelog -> rpm-utils (via content index)
shell.req: buildreq -> /usr/bin/buildreq -> rpm-utils (via content index)
shell.req: cleanup_spec -> /usr/bin/cleanup_spec -> rpm-utils (via content index)
shell.req: compare_packages -> /usr/bin/compare_packages -> rpm-utils (via content index)
shell.req: filereq -> /usr/bin/filereq -> rpm-utils (via content index)
shell.req: packageof -> /usr/bin/packageof -> rpm-utils (via content index)
shell.req: packagereq -> /usr/bin/packagereq -> rpm-utils (via content index)
shell.req: rebuild_package -> /usr/bin/rebuild_package -> rpm-utils (via content index)
shell.req: rebuild_packages -> /usr/bin/rebuild_packages -> rpm-utils (via content index)
shell.req: rpmdups -> /usr/bin/rpmdups -> rpm-utils (via content index)
shell.req: rpmevrcmp -> /usr/bin/rpmevrcmp -> rpm-utils (via content index)
shell.req: rpmrdups -> /usr/bin/rpmrdups -> rpm-utils (via content index)
shell.req: rpmvercmp -> /usr/bin/rpmvercmp -> rpm-utils (via content index)
shell.req: stamp_spec -> /usr/bin/stamp_spec -> rpm-utils (via content index)
rpm-utils
/usr/lib/rpm/shell.req -v /dev/stdin <<<   0.34s user 0.10s system 88% cpu 0.499 total
$

More than ten times faster, wow!
I didn't know regexp engine could be that slow, really.
2007-03-12 15:06:11 +03:00
Alexey Tourbin
b1b2fab77c find-package (FindPackage): require either absolute path or no slashes 2007-03-12 15:06:10 +03:00
Alexey Tourbin
9693c85f52 implemented symlinks.req
Consider R-devel package, which has its own private bin/ directory,
where it keeps certain scripts.

$ rpm -ql R-devel |grep libtool
/usr/lib/R/bin/libtool
$ rpm -ql R-devel |grep texi2dvi
/usr/lib/R/bin/texi2dvi
$

I replace some scripts, such as libtool, with wrappers:

$ tail -1 /usr/lib/R/bin/libtool
exec /usr/bin/libtool "$@"
$

R-devel now has a libtool dependency, generated by shell.req:

$ rpm -qR R-devel |grep libtool
libtool-common
$ rpm -qf /usr/bin/libtool
libtool-common-0.2-alt1
$

However, I want the very same dependency SIMPLY BY PLACING SYMBOLIC LINK
to /usr/bin/libtool.  My new script symlinks.req implements this idea.

It works as follows:

1) We check all absolute symbolic links, e.g. -> /usr/bin/libtool.
If symbolic link is absolute, we fetch its value and feed to FindPackage.
Note that FindPackage will first check whether e.g. /usr/bin/libtool is
available under RPM_BUILD_ROOT.

2) We also check all broken symbolic links, e.g. -> ../../../bin/libtool.
The fact that symbolic link is broken means that it cannot be resolved into
buildroot and otherwise must be resolved in the host system after the package
is installed, which is the dependency on where it would point to after install.

This means we must canonicalize the link value, strip RPM_BUILD_ROOT,
and then call FindPackage.  Here is what happens:

$ cd `mktemp -d`
$ RPM_BUILD_ROOT=$PWD
$ mkdir -p ./usr/lib/R/bin/
$ ln -s `relative /usr/bin/libtool /usr/lib/R/bin/libtool` $RPM_BUILD_ROOT/usr/lib/R/bin/libtool
$ l $RPM_BUILD_ROOT/usr/lib/R/bin/libtool
lrwxrwxrwx 1 at at 20 Mar  9 22:14 /tmp/.private/at/tmp.AHnBX26473/usr/lib/R/bin/libtool -> ../../../bin/libtool
$ [ -e $RPM_BUILD_ROOT/usr/lib/R/bin/libtool ] || echo broken
broken
$ readlink -vm $RPM_BUILD_ROOT/usr/lib/R/bin/libtool
/tmp/.private/at/tmp.AHnBX26473/usr/bin/libtool
$ to=`!!`; echo ${to#$RPM_BUILD_ROOT}
/usr/bin/libtool
$

And then FindPackage is called with "/usr/bin/libtool".

Now note that if FindPackage is not able to associate e.g. /usr/bin/libtool
with any particular rpm package, it will just place raw dependency on
/usr/bin/libtool.  So, this new type of dependencies is a bit dangerous:
basically for each really broken symbolic link there will be an unmet
dependency.  On the other hand, this can be viewed as a means of protection
from packages with really broken symbolic links.

If you are frightened with this brand new and dangerous type of dependencies,
please also note that this new type of dependencies is not much more dangerous
than absolute paths to executables in plain shell scripts.

$ /usr/lib/rpm/shell.req -v /dev/stdin <<</i/am/unmet
error: file /i/am/unmet: No such file or directory
shell.req: /dev/stdin: /i/am/unmet -> /i/am/unmet (raw, not found)
/i/am/unmet
$
2007-03-12 15:06:09 +03:00
Alexey Tourbin
ae6059ee04 lib.req.files: added "executable not executable" warning 2007-03-12 15:06:08 +03:00
Alexey Tourbin
371f6d1527 adapted pam.req and pam.prov 2007-03-12 15:06:07 +03:00
Alexey Tourbin
47fe2b2b3f find-package (FindByName): if the index search detects real conflict, try /usr/bin/which first
E.g. if the content index search detected something like

	/usr/bin/arpsend -> arpsend
	/usr/sbin/arpsend -> vzctl

then we should consult the host system first.  There's a good chance
that the right package, either arpsend or vzctl, IS installed, and
other candidate packages are NOT installed.  However, if /usr/bin/which
cannot find any candidate, we should reconsult the index again.
2007-03-12 15:06:05 +03:00
Alexey Tourbin
83e2b0cfe7 find-package: introduced RPM_FINDPACKAGE_PATH, which makes PATH search fully configurable
$ RPM_FINDPACKAGE_PATH=/usr/bin /usr/lib/rpm/shell.req -v /dev/stdin <<<arpsend
shell.req: /dev/stdin: arpsend indexed by: /usr/bin/arpsend -> arpsend, /usr/sbin/arpsend -> vzctl
shell.req: /dev/stdin: arpsend -> /usr/bin/arpsend -> arpsend (via content index)
arpsend
$ RPM_FINDPACKAGE_PATH=/usr/sbin /usr/lib/rpm/shell.req -v /dev/stdin <<<arpsend
shell.req: /dev/stdin: arpsend indexed by: /usr/sbin/arpsend -> vzctl, /usr/bin/arpsend -> arpsend
shell.req: /dev/stdin: arpsend -> /usr/sbin/arpsend -> vzctl (via content index)
vzctl
$

Also added %add_findpackage_path() and %set_findpackage_path() to platform.in.
2007-03-12 15:06:04 +03:00
Alexey Tourbin
f060b30e6c find-package (FindByName): enhanced content index part
Old behaviour:

$ /usr/lib/rpm/shell.req -v /dev/stdin <<<arpsend
shell.req: arpsend -> /usr/sbin/arpsend -> vzctl (via content index)
vzctl
$

New behaviour:

$ /usr/lib/rpm/shell.req -v /dev/stdin <<<arpsend
shell.req: /dev/stdin: arpsend indexed by: /usr/bin/arpsend -> arpsend, /usr/sbin/arpsend -> vzctl
shell.req: /dev/stdin: arpsend -> /usr/bin/arpsend -> arpsend (via content index)
arpsend
$ /usr/lib/rpm/shell.req -v /dev/stdin <<<ifup
shell.req: /dev/stdin: ifup indexed by: /sbin/ifup -> etcnet, /sbin/ifup -> net-scripts
shell.req: /dev/stdin: ifup -> /sbin/ifup -> /sbin/ifup (raw, ambiguous, via content index)
/sbin/ifup
$
2007-03-12 15:06:03 +03:00
Alexey Tourbin
b208a5725d find-package (FindByPath): enhanced content index part
There's a problem with content index:

$ /usr/lib/rpm/shell.req -v /dev/stdin <<</sbin/ifup
shell.req: /dev/stdin: /sbin/ifup -> etcnet (via content index)
etcnet
$ grep /sbin/ifup ~tmp/build/cache/contents/contents_index_bin
/sbin/ifup      etcnet
/sbin/ifup      net-scripts
$

After this change:

$ /usr/lib/rpm/shell.req -v /dev/stdin <<</sbin/ifup
shell.req: /dev/stdin: /sbin/ifup indexed by: etcnet net-scripts
shell.req: /dev/stdin: /sbin/ifup -> /sbin/ifup (raw, ambiguous, via content index)
/sbin/ifup
$

Also improved diagnostics and updated copyright statement.
2007-03-12 15:06:02 +03:00
Alexey Tourbin
5852768964 find-package (FindByName): enhanced /usr/bin/which part
There's been a few problems.

1) ~/bin should not be checked.

$ /usr/lib/rpm/shell.req -v /dev/stdin <<<vim
warning: no package provides /home/at/bin/vim
shell.req: /dev/stdin: vim not found (skip)
$

Fortunately /usr/bin/which has --skip-tilde option.

2) Check for /etc/alternatives was missing.

$ PATH=/bin:/usr/bin /usr/lib/rpm/shell.req -v /dev/stdin <<<vim
shell.req: /dev/stdin: vim -> /usr/bin/vim -> vim-X11
vim-console
vim-enhanced (via rpmdb)
vim-X11
vim-console
vim-enhanced
$

This is why FindByName should ultimately call FindByPath.
After this change, it works just fine:

$ scripts/shell.req.in -v /dev/stdin <<<vim
shell.req.in: /dev/stdin: vim -> /usr/bin/vim -> ... (via which)
shell.req.in: /dev/stdin: /usr/bin/vim -> /usr/bin/vim (alternative)
/usr/bin/vim
$

Also enabled /usr/bin/which --all option and added diagnostics
for really ambiguous cases.
2007-03-12 15:06:00 +03:00
Alexey Tourbin
8d2821443d find-package: factored FindByPath() and FindByName()
Actually if you think about it a few hours or so... you may come to
know that FindByName() should ultimately call FindByPath().  But this
will be the next commit.
2007-03-12 15:05:59 +03:00
Alexey Tourbin
f9a7e6dea2 find-package: if some path is provided by two or more rpmdb packages, output raw dependence
Here is the problem:

$ /usr/lib/rpm/shell.req -v /dev/stdin <<</usr/bin/openssl-config
shell.req: /dev/stdin: /usr/bin/openssl-config -> libssl-devel<STDERR-NEWLINE>
openssl (via rpmdb)
libssl-devel
openssl
$

Here is the solution:

$ /usr/lib/rpm/shell.req -v /dev/stdin <<</usr/bin/openssl-config
shell.req: /dev/stdin: /usr/bin/openssl-config provided by: libssl-devel openssl
shell.req: /dev/stdin: /usr/bin/openssl-config -> /usr/bin/openssl-config (raw)
/usr/bin/openssl-config
$

Note that this new behaviour now matches content index search:

$ grep openssl-config ~tmp/build/cache/contents/contents_index_bin
/usr/bin/openssl-config /usr/bin/openssl-config
$
2007-03-12 15:05:58 +03:00
Alexey Tourbin
b8c1488e12 shell.req: better error diagnostics 2007-03-12 15:05:57 +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
4a05dd411d scripts/ldd.in: adapted for empty RPM_BUILD_ROOT 2007-03-11 15:00:32 +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
e69e87503e scripts/shell.req.in: fixed sed filter
See my previous commit.  It goes like this:

$ /usr/lib/rpm/shell.req -v /usr/bin/buildreq
shell.req: /usr/bin/buildreq: cat -> /bin/cat -> coreutils (via rpmdb)
shell.req: /usr/bin/buildreq: cmp -> /usr/bin/cmp -> diffutils (via rpmdb)
shell.req: /usr/bin/buildreq: function(Info) not found (skip)
shell.req: /usr/bin/buildreq: function(show_help) not found (skip)
shell.req: /usr/bin/buildreq: function(show_usage) not found (skip)
shell.req: /usr/bin/buildreq: rm -> /bin/rm -> coreutils (via rpmdb)
shell.req: /usr/bin/buildreq: sed -> /bin/sed -> sed (via rpmdb)
coreutils
diffutils
sed
$

I argue that this behaviour, i.e. function(Info) processing, is erroneous.
There are two reasons: 1) it is impossible to resolve function(Info) neither
via FindPackage nor via .provides.sh (the latter has just plain function names);
2) the fact that Info has been detected as function means that Info() function
is defined in the very same file, i.e. /usr/bin/buildreq.  This means that
function(Info) is self-provided dependency and thus should not be processed
at all.
2007-03-11 15:00:27 +03:00
Alexey Tourbin
ed12439edd scripts/find-package.in: added verbosity
Now it works like this:

$ /usr/lib/rpm/shell.req -v /usr/bin/buildreq
shell.req: /usr/bin/buildreq: cat -> /bin/cat -> coreutils (via rpmdb)
shell.req: /usr/bin/buildreq: cmp -> /usr/bin/cmp -> diffutils (via rpmdb)
shell.req: /usr/bin/buildreq: function(Info) not found (skip)
shell.req: /usr/bin/buildreq: function(show_help) not found (skip)
shell.req: /usr/bin/buildreq: function(show_usage) not found (skip)
shell.req: /usr/bin/buildreq: rm -> /bin/rm -> coreutils (via rpmdb)
shell.req: /usr/bin/buildreq: sed -> /bin/sed -> sed (via rpmdb)
coreutils
diffutils
sed
$

It looks like there's a problem with function(Info) here.
Verbosity is a good thing.
2007-03-11 15:00:25 +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
2bce0efdba scripts/find-package.in: adapted for empty RPM_BUILD_ROOT and `sh -u'
Note: this is non-essential change, so I won't update copyright notice.
2007-03-11 15:00:22 +03:00
Alexey Tourbin
ac29fd993a scripts/functions: implemented ArgvFileAction()
This function provides "standard calling conventions" for req/prov methods.
The idea is that the shell script which implements a req/prov method need
not know how exactly it was called and how it should process its arguments.
Instead, it should impelment a function which takes exactly one argument,
which is filename, say MyReq, and finally just call

	ArgvFileAction MyReq "$@"

Standard input to argv conversion is then done automatically and transparently.

This will also enable scripts to process real argv arguments, if any,
instead of standard input (but fall back to standard input otherwise).
I also added --help and -v|--verbose options.  Surprisingly enough,
the latter increases RPM_SCRIPTS_DEBUG level.

Also added non-intrusive canonicalization of pathnames, hence the name
ArgvFileAction.  This is not going to affect rpm-build, but hopefully
this can help when the script is invoked manually.
2007-03-11 15:00:21 +03:00
Alexey Tourbin
844f420037 scripts/functions: implemented SetupMethods() and RunMethods()
I want some rpm scripts to be modular, so that e.g. adding new automatic
dependencies does not require ad hoc modifications.

The plan is as follows: I am going to manage methods.  Methods
are scripts which e.g. implement particular dependency detection.
The set of methods is defined by its suffix, so that /usr/lib/rpm/*.req
are all "req" methods (the "req" method set).

Hereby I provide two functions which abstract the usage of method sets.

1)
methods=$(SetupMethods SETID WANTED_METHODS)

Returns (prints) the list of active methods identified by SETID.
The SETID argument, according to the above, should be filename suffix.

Performs a check if all WANTED_METHODS are available.  WANTED_METHODS is
a space and/or comma separated list of method basenames, e.g. "perl" for
/usr/lib/rpm/perl.req.  The list of WANTED_METHODS is also interpreted
according to AutoReqProv tag rules, i.e. "yes" to enable all methods,
"no" to disable all methods, "noperl" to exclude "perl" etc.

When no methods are active, the output string is guaranteed to be empty.

2)
RunMethods SETID "$methods" [CMD...]

Executes method set scripts identified by SETID; the list of methods
"$methods" must be obtained from SetupMethods.  CMD can warp method script
execution.
2007-03-11 14:59:44 +03:00
Alexey Tourbin
c7a5905b8e scripts/functions: always validate non-empty RPM_BUILD_ROOT
I am going to make certain req/prov scripts work even with empty
RPM_BUILD_ROOT (so that I can analyze the dependencies within the
host system).  This probably means that I will remove ValidateBuildRoot
clause from the script.  However, since non-empty RPM_BUILD_ROOT still
must be valid, I place the check here.
2007-03-06 17:31:31 +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
6a53902827 scripts/files.req.list: Add /etc/udev/rules.d 2007-02-11 21:26:45 +00:00
dcc423b54b scripts/brp-compress.in:
Recognize false|no|none|off as well skip.
scripts/brp-strip.in:
	skip as well as false|no|none|off.

Fixes #9854.
2006-09-16 22:20:03 +00:00
5416277102 Removed cvsid tags. 2006-05-14 17:05:34 +04:00
03ad765c9c VERIFY_ELF_STACK: check for statically linked ELF executables too 2006-04-04 21:14:07 +00:00
f2cdd50995 Implemented VERIFY_ELF_STACK 2006-04-04 16:42:49 +00:00
d4a4544c9a extended VERIFY_ELF_UNRESOLVED=normal to executables. 2006-03-09 16:59:07 +00:00
104b1a8c13 VERIFY_ELF_UNRESOLVED=normal 2006-03-07 16:16:17 +00:00
435ebc43ba change VERIFY_ELF_UNRESOLVED from relaxed to normal 2006-03-07 16:14:23 +00:00
6ea4d923f5 quote $RPM_TARGET_ARCH 2006-02-24 01:46:22 +00:00
b95c6582c3 Cleaned up VERIFY_ELF_RPATH handling even more 2006-02-24 01:11:48 +00:00
bf3687275e Fixed recent changes to VERIFY_ELF_RPATH handling 2006-02-24 01:09:32 +00:00
d3f7193ec5 Added VERIFY_ELF_ARCH support, enhanced VERIFY_ELF_RPATH support. 2006-02-24 00:52:09 +00:00
91fd14681d set VERIFY_ELF_ARCH 2006-02-24 00:19:28 +00:00
7770fa3c41 VERIFY_ELF_RPATH: prohibit rpaths starting/anding with : or containing :: 2006-02-21 15:40:09 +00:00
64e6debda9 fixed typo in VERIFY_ELF_UNRESOLVED support 2006-02-21 15:27:02 +00:00
2ec0e4ddf3 Made %_libdir handling in more generic way. 2006-02-08 15:49:38 +00:00
9567773266 Override default PKG_CONFIG_PATH to find .pc files in RPM_BUILD_ROOT. 2006-02-02 02:48:32 +00:00
9506eb04e8 Implemented pkgconfig reqprov support and enabled it by default. 2006-02-02 01:51:38 +00:00
bf7c7be560 Run fixup-pkgconfig for /usr/share/pkgconfig too. 2006-01-24 00:13:07 +00:00
9d1118aaf6 make fhs check really work; redirect output of unresolved check to stderr; prefix all messages with WARNING or ERROR depending on check mode 2006-01-16 15:39:50 +00:00
f4a8163e44 Fixed RPM_VERIFY_ELF_LDD_RPATH handling [2]. 2006-01-14 23:57:02 +00:00
49ad8c323f Fixed RPM_VERIFY_ELF_LDD_RPATH handling. 2006-01-14 23:33:42 +00:00
15712950dc Fixed RPM_VERIFY_ELF_LDD_RPATH initialization. 2006-01-14 23:33:29 +00:00
6816c5cc25 Run brp-adjust_libraries prior to brp-verify_elf. 2006-01-14 23:03:21 +00:00
881c2a913a Set VERIFY_ELF_FHS and VERIFY_ELF_UNRESOLVED to relaxed for now. 2006-01-14 22:49:01 +00:00
9f9af73c5c Cleanup ELF interpreter detection code. 2006-01-14 21:55:53 +00:00
d9ebc54d2a Provide sane default ELF interpreter. 2006-01-14 21:13:58 +00:00
89f0b28991 Fixed default ELF interpreter. 2006-01-14 20:55:39 +00:00
7e5f0d44b2 Handle $VERIFY_ELF_FHS and $VERIFY_ELF_UNRESOLVED 2006-01-14 20:44:54 +00:00
824fa6f480 define $VERIFY_ELF_FHS, $VERIFY_ELF_UNRESOLVED and $RPM_VERIFY_ELF_LDD_RPATH 2006-01-14 20:42:43 +00:00
c83a07e03d really add ldd 2006-01-14 18:10:11 +00:00
d5ec637e27 simplified 2006-01-14 17:35:47 +00:00
9fa553db17 Add ldd.in 2006-01-14 17:02:09 +00:00
681892feef Change format of pam_module.so/pam_module.so* reqs from pam_module.so$PAM_SO_SUFFIX to PAM(pam_module.so$PAM_SO_SUFFIX). 2006-01-11 16:38:25 +00:00
b2de2b54d4 Add shlib.req.awk 2006-01-11 00:39:39 +00:00
dc26a76eb1 removed StripNote() code 2005-09-29 15:12:05 +00:00
ce28f0855f honor RPM_COMPRESS_SKIPLIST 2005-09-04 17:56:43 +00:00
1eedbeba03 redirect test run of bash --rpm-requires to /dev/null 2005-07-01 10:46:58 +00:00
4eae428069 use /bin/bash for Bourne-Again shell scripts, and /bin/sh for all the rest 2005-06-29 18:21:40 +00:00
9835799623 Added x86_64 support. 2005-06-16 16:18:15 +00:00
5220229243 initial mulitilib support 2005-02-10 13:58:24 +00:00
b3dbebfa15 fixed "find -maxdepth" warning 2004-11-11 10:07:16 +00:00
551ae7df0a make --custom-* options work both as script and script-file 2004-11-01 11:40:25 +00:00
01d14e1c6e make --custom-* options work both as script and script-file 2004-11-01 09:47:06 +00:00
6ad3bdcae2 changed --with-man mode, #5164 2004-10-31 12:00:06 +00:00
0fd5809baf check that $RPM_PYTHON is executable 2004-10-31 11:40:12 +00:00
3637db5d23 updatecd copyright years 2004-10-31 11:37:30 +00:00
e0523ed36f fixed typo: s/RPM_COMPRESS_TOPDIR/RPM_FIXUP_TOPDIR 2004-10-31 11:34:50 +00:00
d813d9c4ed fixed --version 2004-07-11 17:15:40 +00:00
57647ec8d9 added @ regexps tweaks 2004-06-29 15:56:32 +00:00
674eec5213 Added new options:
--custom-dir-script=FILE  look for directories using specified sed script;
  --custom-file-script=FILE look for files using specified sed script;
  --custom-link-script=FILE look for symlinks using specified sed script;
  --version                 print program version and exit.
2004-06-29 15:27:48 +00:00
5f79f4a028 more regexps tweaks 2004-06-29 14:31:08 +00:00
b0a478061a more regexps fixes 2004-06-29 07:32:33 +00:00
ee58994965 fixed locale regexps (#4228) 2004-06-09 12:54:33 +00:00
b326041c2e handle symlinks in --with-gnome mode 2004-05-17 15:23:20 +00:00
8acd0aaf1f use new bytecompiler, from Andrey Orlov 2004-05-17 14:55:23 +00:00
c12fa4f038 recognize PIE objects 2004-04-28 17:20:51 +00:00
de79eac6b5 fixed support for symlinks in /usr/share/locale/ 2004-02-28 20:38:57 +00:00
40f254ec8a implemented support for symlinks in /usr/share/locale/ 2004-02-24 22:30:18 +00:00
5049bf4285 updated copyright information 2004-01-25 18:09:26 +00:00