Commit Graph

565 Commits

Author SHA1 Message Date
Alexey Tourbin
3223ba1c5d brp-strip: select ELF files and .a archives with single file(1) invocation
Tested with gnome-icon-themes-oxygen-refit2-2.3-alt1.src.rpm.
Old result: 25 seconds, new result: 3 seconds.
2010-03-27 00:00:28 +03:00
f7132135d3 lib.req: Recognize STB_GNU_UNIQUE symbols and add rtld(GNU_UNIQUE) requirement for objects that contain such symbols 2010-01-12 23:39:02 +00:00
Alexey Tourbin
44557d20ee brp-bytecompile_python: updated copyright statement 2009-12-21 03:43:28 +03:00
Alexey Tourbin
7cb73452f0 brp-bytecompile_python: hadlink indentical .pyc and .pyo files 2009-12-21 03:42:38 +03:00
d908f56dc4 brp-verify_elf: Set default lint mode to "relaxed", add "default" mode 2009-12-20 17:03:20 +00:00
77c93a9c97 verify-elf: Omit duplicate lines from eu-findtextrel's output 2009-12-20 15:25:02 +00:00
82fcd333bb brp-verify_elf: Fix typo introduced by commit 7d83e49285 2009-12-20 15:10:49 +00:00
Alexey Tourbin
e845c7f14b verify-elf: fixed typos in VERIFY_ELF_RPATH test
Since "RPATH containts :" test never worked, I downgrade it
to a warning.
2009-12-20 01:45:23 +03:00
Alexey Tourbin
b3b979a6f2 brp-alt: execute brp-strip before brp-verify_elf
There are two reasons:
1) It is better to verify final ELF objects just as they are packaged.
2) Older eu-elflint barks at unstripped binaries like this:
section [ 8] '.comment' has wrong flags: expected none, is MERGE|STRINGS
This seems to be fixed in elfutils 0.143-alt1, but otherwise that could
be a major problem.
2009-12-19 03:25:53 +03:00
Alexey Tourbin
cb4fcda459 brp-verify_elf, verify-elf: updated copyright statement 2009-12-19 03:25:52 +03:00
Alexey Tourbin
51f460bb75 verify-elf: simplifed prefix/rc expressions 2009-12-19 03:25:51 +03:00
Alexey Tourbin
e8e60796bb verify-elf: use eu-findtextrel to provide better TEXTREL diagnostics 2009-12-19 03:25:51 +03:00
Alexey Tourbin
7d83e49285 verify-elf: implemented new "lint" method using "eu-elflint --gnu-ld" 2009-12-19 03:25:23 +03:00
Alexey Tourbin
e6683d0de4 brp-verify_elf, verify-elf: simplify VERIFY_ELF_* parameter passing 2009-12-18 22:55:46 +03:00
Alexey Tourbin
f82116d5f9 brp-verify_elf: select ELF files with signle file(1) invocation
Also, move RPM_VERIFY_ELF_SKIPLIST logic from verify-elf to
brp-verify_elf, since RPM_VERIFY_ELF_TOPDIR is already there.
Normally, verify-elf should be a standalone program (available
for users).  It's just not quite ready yet.
2009-12-18 22:52:34 +03:00
Alexey Tourbin
4c4d73c44e 4.0.4-alt98.21
- rpmio, rpmbuild: Added support for .xz/.lzma compressed sources and patches.
- Removed old scripts in /usr/lib/rpm.
2009-09-29 16:38:57 +04:00
Alexey Tourbin
f68c71a2d5 4.0.4-alt97.M50.18
- rpmio, rpmbuild: Added support for .xz/.lzma compressed sources and patches.
- Removed old scripts in /usr/lib/rpm.
2009-09-29 16:30:39 +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
1ef7949b93 scripts/Makefile.am: tweak to facilitate merging 2009-09-29 15:31:32 +04:00
Alexey Tourbin
6795a36bb1 great removal 2009-09-29 15:29:52 +04:00
Alexey Tourbin
295cc50be1 4.0.4-alt98.19
- rpmio: Updated lzma compression routines for xz-5.0 API.
- Packaged /usr/bin/rpm2cpio.static.
2009-09-24 12:49:32 +04:00
Alexey Tourbin
79be480d0e 4.0.4-alt97.M50.16
- rpmio: Updated lzma compression routines for xz-5.0 API.
- Packaged /usr/bin/rpm2cpio.static.
2009-09-24 12:48:17 +04:00
Alexey Tourbin
776a15f6b8 4.0.4-alt95.M41.25
- rpmio: Updated lzma compression routines for xz-5.0 API.
- Packaged /usr/bin/rpm2cpio.static.
2009-09-24 12:46:31 +04:00
Alexey Tourbin
9abb0ba661 rpm2cpio.sh: output raw/compressed cpio stream 2009-09-24 12:35:42 +04:00
Alexey Tourbin
642df51ba8 4.0.4-alt98.16
- find-package: Removed contents_index_all search, enabled file-level dependencies.
2009-07-01 23:11:36 +04:00
Alexey Tourbin
1d6c258d06 4.0.4-alt97.M50.14
- find-package: Removed contents_index_all search, enabled file-level dependencies.
2009-07-01 23:09:48 +04:00
Alexey Tourbin
70ab659464 find-package: changed "not found" diagnostics to "not installed" 2009-07-01 23:04:32 +04:00
Alexey Tourbin
a55bb554aa find-package: removed contents_index_all and APT-friendly stuff 2009-07-01 23:04:24 +04:00
3b7f90e0ee brp-cleanup.in: Replace "subst -p" with "sed -i", change PAM spacing 2009-06-26 21:29:58 +00:00
d89c43384b brp-cleanup.in: Replace PAM include syntax with PAM substack 2009-06-26 20:12:52 +00:00
8a14e46491 pam.req.in: Handle lines with conditional controls 2009-06-26 00:17:19 +00:00
53ca55db87 pam.req.in: Handle lines with leading whitespaces 2009-06-26 00:11:56 +00:00
8adbd523fb pam.req.in: Cleanup: "sed -ne" -> "sed -n" 2009-06-26 00:10:17 +00:00
eef44cccfc pam.req.in: Add optional modules support 2009-06-26 00:09:07 +00:00
Alexey Tourbin
d4327f8968 4.0.4-alt98.14
- shell.req.files: Adjusted /bin/ash script detection.
2009-06-21 00:22:58 +04:00
Alexey Tourbin
d33024c1fe 4.0.4-alt97.M50.13
- shell.req.files: Adjusted /bin/ash script detection.
2009-06-21 00:21:56 +04:00
Alexey Tourbin
b4bb9944c6 shell.req.files: adjusted /bin/ash pattern
file(1) sucks here, but we should handle one more common case.

$ file - <<<'#!/bin/ash'
/dev/stdin: a /bin/ash script text executable
$ file - <<<'#!/bin/ash -efu'
/dev/stdin: a /bin/ash -efu script text executable
$ file - <<<'#!/bin/ash  -efu'
/dev/stdin: a /bin/ash  -efu script text executable
$ file - <<<'#! /bin/ash  -efu'
/dev/stdin: a /bin/ash  -efu script text executable
$ file - <<<'#!  /bin/ash  -efu'
/dev/stdin: script text executable for  /bin/ash  -efu
$
2009-06-21 00:20:31 +04:00
db3de70e0a Implement info files verification 2009-05-20 23:25:58 +00:00
213e004614 scripts/brp-compress.in: Avoid non-standard info directories (ALT#19993) 2009-05-20 21:51:11 +00:00
Alexey Tourbin
d7abcfb9dc 4.0.4-alt98.5
- rpmdb: Removed db1 support.
- db3.c (db3close): Backported fix for double close (RH#138589).
2009-04-23 17:51:22 +04:00
Alexey Tourbin
4ea6d71109 4.0.4-alt97.M50.6
- rpmdb: Removed db1 support.
- db3.c (db3close): Backported fix for double close (RH#138589).
2009-04-23 17:49:25 +04:00
Alexey Tourbin
fcf51a9c59 4.0.4-alt95.M41.17
- rpmdb: Removed db1 support.
- db3.c (db3close): Backported fix for double close (RH#138589).
2009-04-23 17:31:39 +04:00
Alexey Tourbin
af4053bfa0 rpmdb: removed db1 support 2009-04-23 13:49:52 +04:00
93430b8c85 4.0.4-alt98.4
- rpm.8: Fixed typo (closes: #19356).
- platform.in: Added macros: %_logrotatedir, %_runtimedir (closes: #13639).
- Dropped deprecated RPMTAG_RHNPLATFORM support.
- Dropped unused RPMTAG_PLATFORM support.
- rpmVersionCompare(): Added handling of omitted tags.
- rpmevrcmp: Changed to use rpmVersionCompare() instead of rpmEVRcmp().
- 0common-files.req.list: Added /etc/X11/wms-methods.d (Igor Vlasenko).
2009-04-18 20:34:48 +00:00
Igor Vlasenko
9d17c0b879 0common-files.req.list: Add /etc/X11/wms-methods.d (xinitrc) 2009-04-09 21:11:19 +00:00
840e9d57e2 0common-files.req.list: Remove /etc/tex-fonts.d
Prepare /etc/tex-fonts.d migration from tetex-core to tex-common.
2009-02-19 23:02:13 +00:00
f8fb514ad6 Revert "rpmlib.req: generate rpmlib(PosttransFiletriggers) dependency for /usr/lib/rpm/*.filetrigger"
Disable automatic rpmlib(PosttransFiletriggers) requirements for M41.

This reverts commit 3a9f159460.
2008-11-25 15:37:14 +00:00
d975fc66c1 Introduce /usr/lib/rpm/macros.d/ (ALT#17948) 2008-11-21 00:25:45 +00:00
8b91f45651 0common-files.req.list: Add /etc/sysconfig/limits.d (service) 2008-11-13 01:48:58 +03:00
1a9569d6ec Revert "verify-elf.in: PIE executables on ARM always has TEXTREL, do not check them"
PIE support without TEXTRELs on ARM was implemented in glibc-2.8.90-alt3,
for details see http://lists.altlinux.org/pipermail/devel/2008-November/162638.html

This reverts commit 816b34cd86.
2008-11-13 01:48:58 +03:00
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