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 checkHardLinks function is now removed. It was unclear
whether it was supposed to verify %lang attributes (returning non-zero
on error) or indicate if all hardlinks are packaged within the package.
It turns out that only a single package in our repo has
PartialHardlinkSets dependency:
$ cd /ALT/Sisyphus/files/x86_64/RPMS/
$ rpm -qp --qf '[%{NAME}\t%{REQUIRENAME}\n]' *.rpm |fgrep 'PartialHardlinkSets'
$ cd /ALT/Sisyphus/files/noarch/RPMS/
$ rpm -qp --qf '[%{NAME}\t%{REQUIRENAME}\n]' *.rpm |fgrep 'PartialHardlinkSets'
freeciv-common rpmlib(PartialHardlinkSets)
$
This probably means that freeciv-common has hardlinks with different
%lang attributes (which probably was supposed to be an error). So
the whole issue should be reconsidered. A leave XXX marks in the
code and suggest new PartialHardlinkSets implementation (however,
the dependency is not being added yet).
When addFile() is called with file path obtained from specfile,
various checks must be performed, so that only valid paths can
enter the package. However, when a path is passed down to fts,
it is no longer possible to obtain ill-formed paths. So a lot
of lstat calls for intermediate path components can be saved.
Since the list of files is sorted, it is possible to avoid quadratic
behaviour by implementing merge-like intersection.
However note that directory names are not sorted (this is why it is
needed to build full file name for strcmp).
Tested with gnome-icon-themes-oxygen-refit2-2.3-alt1.src.rpm,
3 subpackages each 13-16K files. Old behaviour: 18 seconds,
new behaviour: less than 1 second.
Some code (e.g. apt/genpkglist) explicitly relies on the fact that
header file list is represented with baseNames+dirNames+dirIndexes
arrays. Thus, generating legacy headers might have issues, and should
be disabled.
- 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
$ rpm -bl util-linux.spec
...
warning: file /bin/taskset is packaged into both util-linux and schedutils
warning: file /usr/bin/chrt is packaged into both util-linux and schedutils
warning: file /usr/bin/ionice is packaged into both util-linux and schedutils
warning: file /usr/bin/taskset is packaged into both util-linux and schedutils
warning: file /usr/share/man/man1/chrt.1.gz is packaged into both util-linux and schedutils
warning: file /usr/share/man/man1/ionice.1.gz is packaged into both util-linux and schedutils
warning: file /usr/share/man/man1/taskset.1.gz is packaged into both util-linux and schedutils
$
This fixes invalid cpio entries for `/dir/.*' constructs.
Consider this:
%install
install -pD /dev/null %buildroot/root/.bashrc
%files
/root/.*
Old behaviour:
$ rpm -qlvp /home/at/RPM/RPMS/athlon/test-1.0-alt1.athlon.rpm
drwxr-xr-x 2 root root 0 Mar 30 01:47 /root/.
drwxr-xr-x 2 root root 0 Mar 30 01:47 /root/..
drwxr-xr-x 2 root root 0 Mar 30 01:47 /root/../root
-rwxr-xr-x 1 root root 0 Mar 29 16:51 /root/../root/.bashrc
-rwxr-xr-x 1 root root 0 Mar 29 16:51 /root/./.bashrc
-rwxr-xr-x 1 root root 0 Mar 29 16:51 /root/.bashrc
$
New behaviour:
$ LD_LIBRARY_PATH=... rpm -bi test.spec
...
Processing files: test-1.0-alt1
error: File path must be canonical: /root/.
error: File path must be canonical: /root/..
RPM build errors:
File path must be canonical: /root/.
File path must be canonical: /root/..
$
The problem here is that glob(3) `dir/.*' globs both '.' and '..'.
It is not clear whether or not glob(3) should glob '.' and '..'.
$ bash -c 'echo /var/empty/.*'
/var/empty/. /var/empty/..
$ ksh -c 'echo /var/empty/.*'
/var/empty/.*
$
When I write e.g. 'Requires(pre): /usr/bin/perl' in specfile,
I get the following flags:
$ perl -le 'printf "%16b\n", 576'
1001000000
$
which is RPMSENSE_PREREQ|RPMSENSE_SCRIPT_PRE.
Before this change, I do not specify what flags were generated
for scriptlet dependencies. After this change, autogenerated
flags for %pre-script are:
$ perl -le 'printf "%16b\n", 16960'
100001001000000
$
which is RPMSENSE_PREREQ|RPMSENSE_SCRIPT_PRE|RPMSENSE_FIND_REQUIRES.
I belive it looks sane now.
PS:
alias rpmdump='perl -MData::Dumper -MRPM::Header -e "print Dumper(RPM::Header->new(@ARGV))"'