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!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
Both "Requires(post): foo" and "Requires: foo" should be kept.
The first dependency is only for %post-script: after the package
is installed, rpm allows to remove "foo" (though apt-get does not).
This is only a quick fix, perhaps the code should be rewritten.
For instance, if with have both "Requires(pre): foo" and
"Requires(post): foo", those can be folded into single
"Requires(pre,post): foo".
Based on rpm5.org code. However, I do not introduce special variables
to distinguish between toplevel package and subpackages -- we can tell
the difference simply by checking if current "pkg" and "spec->packages"
point to the same record (which is toplevel package in the linked list).
This idiom is already used in e.g. parsePreamble().
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/.*
$