IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
Note that this works only for automatic dependencies, because file list
is not ready when specfile dependencies are added. This is okay.
Also note that this will optimize out directory-like dependencies
if the package owns the directory. This is yet okay, but this is
a bit more subtle point.
- 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
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.
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.
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.
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
$
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.
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.
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.
Add arm and armb CANONARCH: common CANONARCH for general purpose distribution. It's armv4 without Thumb now.
Update %optflags for ARM
Add %arm macros: list of all ARM processors
- 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