Commit Graph

1090 Commits

Author SHA1 Message Date
Alexey Tourbin
4516457883 build/files.c (generateDepends,processBinaryFiles): do %pre/%post/... scriptlet dependencies 2008-01-25 21:27:01 +03:00
Alexey Tourbin
2e8a4a1722 build/files.c: new function hasSomeInstScript(), for diagnostics 2008-01-25 20:49:02 +03:00
Alexey Tourbin
1ceb28dc6e build/files.c: new function saveInstScript(), to find dependencies in %pre/%post/... scriptlets
This is based on the first part of my eariler patch:
https://bugzilla.altlinux.org/show_bug.cgi?id=7409
2008-01-25 20:48:28 +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
f298ea3e6b find-requires, find-provides: save packaged files list under $RPM_BUILD_ROOT/.packaged-files:$RPM_SUBPACKAGE_NAME 2008-01-22 22:06:54 +03:00
Alexey Tourbin
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
4159b61462 4.0.4-alt84
- lib.req:
  + Fixed awk script for ldd output (at@).
  + Fixed file-level dependencies output (at@).
- relative: Fixed potential NULL dereference introduced by -alt81 (#14067).
2008-01-18 20:10:11 +00:00
f48ba77fa2 Merge branch 'altlinux-4.0' 2008-01-17 18:13:52 +00:00
d534994b4e relative: Fix potential NULL dereference (ALT#14067) 2008-01-17 18:12:23 +00: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
5a68a4046a 4.0.4-alt83
- platform.in:
  + Added %%warning macro.
  + Added %%autoreconf macro to replace %%__autoreconf;
  + Added deprecation warning to %%__autoreconf macro.
2008-01-15 19:20:22 +00:00
b023526895 Merge branch 'altlinux-4.0' 2008-01-15 19:15:52 +00:00
Alexey Tourbin
376b5c359c 4.0.4-alt82
- reqprov.c (addReqProv): implemented optimization of "self-requires"
  dependencies on packaged files
- find-package, shell.req, pkgconfiglib.req, symlinks.req: do not
  completely ignore dependencies on files which are under RPM_BUILD_ROOT;
  that is, emit "file-level" dependencies which will be optimized out by
  addReqProv() within a single subpackage, but will protect from unpackaged
  files between subpackages; works best with apt-utils >= 0.5.15lorg2-alt17
- lib.req: try to emit file-level dependencies instead of "soname-level"
  dependencies on private libraries (see git log for details); this can
  largely reduce the need for %%add_findprov_lib_path
2008-01-14 23:58:51 +03:00
Alexey Tourbin
d78d0be4fd spec: workaround config.rpath problem 2008-01-14 23:56:12 +03:00
aa45567317 platform.in (%__autoreconf): Add deprecation warning 2008-01-07 22:44:30 +00:00
4b478a1305 platform.in: Add %warning() macro
Signed-off-by: Alex V. Myltsev <avm@altlinux.ru>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
2008-01-07 22:41:47 +00:00
a3d0fe14b1 platform.in: Add %autoreconf macro (ALT#13925). 2008-01-07 22:38:10 +00:00
b21c2f85da relative.c: Reindent 2007-12-13 23:17:31 +00:00
d013b49984 relative.c: Use heap for memory allocation
Stack allocation is unsafe:
$ ulimit -s 64; relative /b `perl -e 'print "/a" x 32768'`
2007-12-13 23:17:31 +00:00
986ef530f3 relative.c: Introduce xstrdup(), reindent 2007-12-13 23:17:30 +00:00
c97667fad5 relative.c: Fix normalize()
Testcase:
$ relative //a/. /
a/
2007-12-13 23:17:30 +00:00
afed4d2da9 relative.c: Reindent 2007-12-13 23:17:30 +00:00
2949819ce6 relative.c: s/__progname/program_invocation_short_name/ 2007-12-13 23:17:30 +00:00
4c5f7e154d relative.c: Reindent 2007-12-13 23:17:30 +00:00
Alex V. Myltsev
9a21fe32e7 relative.c: fix an off-by-one (kind of) error.
Test:
 $ relative /a/b/ /ax/
should print "../a/b/".
2007-12-13 23:17:30 +00:00
Alexey Tourbin
abc6cb4242 4.0.4-alt82
- reqprov.c (addReqProv): implemented optimization of "self-requires"
  dependencies on packaged files
- find-package, shell.req, pkgconfiglib.req, symlinks.req: do not
  completely ignore dependencies on files which are under RPM_BUILD_ROOT;
  that is, emit "file-level" dependencies which will be optimized out by
  addReqProv() within a single subpackage, but will protect from unpackaged
  files between subpackages; works best with apt-utils >= 0.5.15lorg2-alt17
- lib.req: try to emit file-level dependencies instead of "soname-level"
  dependencies on private libraries (see git log for details); this can
  largely reduce the need for %%add_findprov_lib_path which is "public
  provides for private libraries"
2007-12-03 15:04:24 +03:00
Alexey Tourbin
c80e1ac8cb spec: explicitly require recent alternatives with alternatives.prov 2007-12-03 14:44:13 +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
8119ee01ac reqprov.c (addReqProv): eliminate dependencies on the package name
perl-base will no longer require 'perl-base >= 1:5.7.3'.
2007-11-23 10:59:39 +03:00