Commit Graph

219 Commits

Author SHA1 Message Date
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
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
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
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
9feeb5445e 4.0.4-alt81
- symlinks.req: do only one single step of symlink resolution;
  find-package (FindByPath): check each path component for alternatives;
  this fixes the case of e.g. dependency on /usr/share/libtool/config.sub,
  where '/usr/share/libtool -> libtool-1.5/' is an alternative;
  we now stop at alternative directory and simply yield the dependency
  on /usr/share/libtool, instead of libtool_1.5 (see also #13374)
- moved /usr/lib/rpm/functions and /usr/lib/rpm/find-package from rpm-build
  to rpm, to relax e.g. rpm-build-mono dependencies
- relative.c: various fixes by Alex V. Myltsev and Dmitry V. Levin
2007-11-21 17:49:23 +03:00
Alexey Tourbin
2cf4bcc171 spec: ignore functions and find-package dependencies 2007-11-21 14:53:30 +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
745b1ae3e0 4.0.4-alt80
- Merged ARM support changes made by Kirill Shutemov.
- Minor scripts/* cleanup.
2007-11-10 20:47:04 +00:00
Alexey Tourbin
35ddf662d8 4.0.4-alt79
- shell.req: implemented strong self-requires elimination within
  a package; if ANY shell script defines function "foo", dependencies
  on "foo" are discarded in all shell scripts throughout the package;
  a warning is issued if e.g. /usr/bin/foo executable is available
- pkgconfiglib.req: new dependency generator for "Libs" field in *.pc
  files; maps e.g. "-lfoo" -> /usr/lib/libfoo.so -> libfoo-devel
2007-10-29 17:16:14 +03:00
Alexey Tourbin
e247bb88db enabled pkgconfiglib.req 2007-10-29 14:21:47 +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
318e056f29 4.0.4-alt78
- implemented modular subsystem for find-requires and find-provides;
  there's no separate doc yet, except for my protva2007-ru-short.pdf;
  see also git changelog, especially commit 9717c128
- improved /usr/lib/rpm/find-package algorithms
- shell.req: non-executable scripts are now processed as well as executable
  ones; also, more shebang variants are recognized, e.g. "#!/usr/bin/env bash"
- symlinks.req: new dependency generator for external symbolic links
- pkgconfig.req: pkg-config(1) errors no longer silently ignored
- rpm-build: decoupled rpm-build-tcl from the base build environment
2007-09-30 15:05:06 +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
3309458461 4.0.4-alt78
- implemented modular subsystem for find-requires and find-provides;
  there's no separate doc yet, except for my protva2007-ru-short.pdf;
  see also git changelog, especially commit 9717c128
- improved /usr/lib/rpm/find-package algorithms
- shell.req: non-executable scripts are now processed as well as executable
  ones; also, more shebang variants are recognized, e.g. "#!/usr/bin/env bash"
- symlinks.req: new dependency generator for external symbolic links
- pkgconfig.req: pkg-config(1) errors no longer silently ignored
- pkgconfiglib.req: new dependency analyzer for "Libs" field in *.pc files;
  maps e.g. "-lfoo" -> /usr/lib/libfoo.so -> libfoo-devel
2007-09-24 21:44:26 +04:00
Alexey Tourbin
bdbafde580 Merge branch 'altlinux-4.0' of git.alt:/people/ldv/packages/rpm into mod
Also immediately fixup last changelog entry date, to preserve the order.

Conflicts:

	rpm-4_0.spec
	scripts/find-package.in
2007-09-24 21:15:02 +04:00
Alexey Tourbin
385ae84711 spec: rpm-build: decoupled rpm-build-tcl
There's been some discussion on the list as to which rpm-build-*
packages rpm-build should depend on.

The upshot is this:

1) The language should be widely used, and its scripts should
be found in a number of packages not specific to the language
(e.g. packages which do not require %name-devel for build).

2) rpm-build-%name scripts, along with finding dependencies,
should have the effect of syntax check.  This is what makes
them beneficial for all packages, and this is the reason why
rpm-build should pick up such rpm-build-%name package.

Now I think that Tcl fails both points.  Current tcl.req analyzer
simply cannot process Tcl scripts reliably, only Tcl modules.
But Tcl modules are certainly specific to the Tcl language,
and building Tcl modules apparently should involve tcl-devel.
I have just added rpm-build-tcl dependency to tcl-devel.

If too many Tcl packages break because of this change,
which is not likely, I can re-add rpm-build-tcl dependency here.
However, this will also enroll tcl into the base build system.
2007-09-24 16:49:54 +04:00
Alexey Tourbin
b653a847dc spec: do not package Specfile.pm
This Specfile.pm file is not usable anyway -- its path should match
at least */RPM/Specfile.pm.  And now we have perl-RPM-Specfile package.
2007-09-24 16:06:12 +04:00
427194b25b 4.0.4-alt77.M40.1
- rpmdb/header.c (guess_category_value):
  Allowed overriding locale using $RPM_LANGUAGE_I18NSTRING for header FindI18NString.
- build.c (buildForTarget):
  Changed to pass --wildcards to tar on build from tarball (RH#206841).
- GROUPS: Added "System/Legacy libraries" (#12629).
- scripts/find-package.in (FindPackage):
  Speedup index processing order by checking binary index prior to complete index.
2007-08-28 16:59:22 +00: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
32909e6a8a 4.0.4-alt78
- implemented modular subsystem for find-requires and find-provides;
  there's no separate doc yet, except for my protva2007-ru-short.pdf;
  see also git changelog, especially commit 9717c128
- improved /usr/lib/rpm/find-package algorithms
2007-08-11 01:19:46 +04:00
Alexey Tourbin
9175b4190a find-requires, find-provides: removed the reset of unused code, specifically for mono and java
rpm-build-mono has been adapted.
Updated rpm-build dependencies:
	Conflicts: rpm-build-mono <= 1.0

rpm-build-java does NOT include java.req in current sisyphus release
1.0.0-alt1.  I have done some major development for rpm-build-java,
but there is still no consensus about it.
Not updated rpm-build dependencies: nothing to do.
2007-08-11 00:48:49 +04:00
Alexey Tourbin
c1c04912cc Merge 4.0.4-alt77 into mod 2007-08-02 18:56:55 +04:00
Alexey Tourbin
f139f95028 spec: updated dependency on rpm-build-tcl 2007-08-01 16:05:54 +04:00
1105a961ca 4.0.4-alt77
- rpmio/macro.c (doFoo):
  Fixed potential buffer overflow in %%homedir macro processing.
- lib/formats.c (i18nTag):
  Fixed potential null dereference on header without RPMTAG_NAME (RH#239557).
- lib/package.c (readPackageHeaders):
  Removed insecure legacy providePackageNVR() call.
- lib/query.c (showQueryPackage):
  Fixed potential null dereference in QUERY_FOR_DEFAULT mode.
2007-05-18 12:47:58 +00:00
6719c93a11 Merge branch 'master' into mod 2007-04-09 21:17:16 +00:00
36d31bbf3c 4.0.4-alt76
- rpmRunTransactions:
  Ignore unavailable mount points instead of bailing out.
2007-04-09 21:13:58 +00:00
Alexey Tourbin
2635799cae spec: updated dependencies on rpm-build-perl and rpm-build-python 2007-03-28 16:53:56 +04:00
a78e49bdb2 Merge branch 'master' into mod 2007-03-27 23:15:44 +00:00
9eb6e27e8a 4.0.4-alt75
- Changed /mnt/* mountpoints handling to behave the same way
  as other mountpoints.
- Fixed support of filesystems with f_bsize==0.
- files.req.list: Added /etc/hooks directory.
2007-03-27 22:43:15 +00:00
Alexey Tourbin
434d4daed5 Merge branch 'master' of git.alt:/people/ldv/packages/rpm into mod
Conflicts:

	autodeps/linux.prov.in
	autodeps/linux.req.in
2007-03-18 12:16:52 +03:00
af0adf575e 4.0.4-alt74
- find-provides, find-requires:
  + Added support for files of type "Mono/.Net assembly" to repair
    Mono support when new file(1) is installed (#11088, ildar@).
2007-03-17 20:09:40 +00: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
80c40744e1 factored static.req 2007-03-11 15:00:35 +03:00
Alexey Tourbin
d87d2c8431 spec: removed http.req, sql.req, and sql.prov from rpm-build %files list 2007-03-11 15:00:34 +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
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
c2248551ff 4.0.4-alt73
- Updated gendiff utility (Alexey Tourbin).
- Added hooks for Java autoreq facility (Damir Shayhutdinov).
- build/expression.c (doPrimary): Read closing parenthesis (Michael Schroeder).
- files.req.list: Added /etc/udev/rules.d firectory.
- Changed default nice change value from 10 to 8.
- Made nice change value configurable via %%nice_change macro.
2007-02-23 03:12:42 +03:00
501f22adb7 4.0.4-alt72
- rpmrc.in: Use -mtune=i686 instead of -mtune=generic for i[3456]86
  (same as generic in gcc4.1, better backwards compatibility).
2007-01-11 14:36:35 +00:00
24428aa9d8 4.0.4-alt71
- platform.in: Changed %%optflags_kernel to %%nil.
- rpmrc.in: Changed %%optflags_default to use -mtune=generic
  instead of -mtune=pentium4 for i[3456]86 (Alexey Tourbin).
2007-01-10 22:20:31 +00:00
190f999dee 4.0.4-alt70
- platform.in: Add %%_target_libdir macro.
2006-11-30 16:36:50 +00:00
aac8f6b97c 4.0.4-alt69
- GROUPS: New group: Graphical desktop/Rox (#10268).
- Makefile.am: Link rpm.static with -pthread.
- lib/query.c: Flush query format buffer before listing files (CVE-2006-5466).
- build/parsePrep.c:
  + Change %patch to be more verbose by default, introduce -s option
    to make %patch as silent as before this change (#10261).
  + Change %setup to enable -q option by default, introduce -v option
    to make %setup as verbose as before this change.
2006-11-19 00:25:22 +00:00
8bf537618a 4.0.4-alt68
- rpmio/rpmrpc.c (Glob): Override gl_stat to allow broken symlinks.
- Implemented mono reqprov hooks and enabled them by default,
  based on patch from Ildar Mulyukov (#9426).
2006-10-04 16:18:40 +00:00
8ced535fc7 4.0.4-alt67
- autodeps/linux.req.in:FindLibReqs():
  If object contains .gnu.hash section but does not
  contain .hash section, add rtld(GNU_HASH) requirement.
- GROUPS: Removed trailing whitespaces (#9963).
- Rename athlonxp platform to athlon_xp (#9991).
- scripts/brp-compress.in:
  Recognize "false|no|none|off" as well as "skip" (#9854).
- scripts/brp-strip.in:
  Recognize "skip" as well as "false|no|none|off" (#9854).
- rpmdb: Honor rpmdbInit() return code (#9406).
- rpmQueryVerify(): when rpmReadPackageManifest() is disabled,
  treat RPMRC_BADMAGIC return code from rpmReadPackageHeader()
  like other read errors (#9433).
- showMatches(): Backported --querybynumber looping fix (#9773).
2006-09-21 16:20:26 +00:00
f431605c03 4.0.4-alt66 2006-05-14 18:21:28 +04:00
5416277102 Removed cvsid tags. 2006-05-14 17:05:34 +04:00
8517bad154 4.0.4-alt65 2006-04-04 16:49:57 +00:00
001a83bacc 4.0.4-alt64 2006-03-20 14:53:07 +00:00
b796bc7aa9 4.0.4-alt63 2006-03-09 17:00:56 +00:00