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!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
SC2162 ("read without -r will mangle backslashes") and SC2086: ("Double
quote to prevent globbing and word splitting"). These actually seem to
be harmless in our case.
While strip is verbose when it fails to process files,
it's not quite obvious that it exits with a non-zero status,
hence an explicit diagnostics message might be useful.
Strip LTO sections and symbols from objects and archives (static
libraries). %brp_strip_none macro is respected.
Reviewed-by: Dmitry V. Levin <ldv@altlinux.org>
There was two forgotten file instances. Fix error such as:
/root/tmp/rpm-tmp.80ZNEF: line 1: /usr/sbin/post_service: No such file or directory
error: %post(traefik-2.4.14-alt1.x86_64) scriptlet failed, exit status 127
error: traefik-2.4.14-alt1.x86_64: install failed
Fixes: 5ef5c8ff4 ("Use file4 instead of file")
`strip' is called by `install -s` that could occur in unpatched
Makefiles, breaking debuginfo generation.
Try to catch `install` invocations via:
- %__install macro used in `make INSTALL=`.
- Prefix PATH with `/usr/libexec/rpm-build` with install and strip
wrappers.
Suggested-by: Dmitry V. Levin <ldv@altlinux.org>
Reviewed-by: Dmitry V. Levin <ldv@altlinux.org>
debugedit sometimes output top level directory, since we do not filter
regular files in process-debuginfo since 309af2d59 ("debuginfo: Create
empty src/debug directories for paths with `..'") we need to filter
them out before passing into %files for debuginfo package.
Co-authored-by: Dmitry V. Levin <ldv@altlinux.org>
Fixes: 309af2d59 ("debuginfo: Create empty src/debug directories for paths with `..'")
Create empty directories under `/usr/src/debug` tree for source paths
containing `..` (for example `../../src` in elfutils). This should fix
debuginfo sources for autotools builds in subdir.
Fixes: https://bugzilla.altlinux.org/39175
Consider another directory level when searching for vmlinux, for kernel
builds in sub-directory using `make O=output_dir'. Also, improve warning
message making it more understandable.
Reason: ae1ecef8 ("process-debuginfo: Do not call eu-elfcompress if it doesn't exist")
Fixes: 8682814b ("debuginfo: Try to uncompress if debugedit failed to extract sources list")
Do not add (uncompressed) module (or vmlinux) into debuginfo package if
it does not actually exists.
Due to other bugs there could be compressed kernel module, (which
implies adding uncompressed module into debuginfo), but, uncompressed
version (which brp-debuginfo should create) does not exist, making
build errors such as:
error: No such file or directory: /usr/src/tmp/kernel-image-std-def-buildroot/usr/lib/debug/lib/modules/5.8.0-std-def-alt1/kernel/fs/nfs/flexfilelayout/nfs_layout_flexfiles.ko
Reported-by: Anton V. Boyarshinov <boyarsh@altlinux.org>
Fixes: 7aa048df ("Generate debuginfo for kernel packages")
`%dir /' would cause errors (ALT#38842):
error: No such file or directory: /usr/src/tmp/broken-debug-buildroot/usr/lib/debug/lib/modules
error: No such file or directory: /usr/src/tmp/broken-debug-buildroot/usr/lib/debug/lib/modules/vmlinux
Reported-by: Vitaly Lipatov <lav@altlinux.org>
BZ: https://bugzilla.altlinux.org/show_bug.cgi?id=38842
If debugedit failed to extract sources list, uncompress and try again.
Then compress back.
ps. Interesting relevant reading:
https://blogs.oracle.com/solaris/elf_section_compression-v2
Spelling suggestions by Dmitry V. Levin <ldv@altlinux.org>.
Terminate build if stripped ELF files are found. Usage:
%define _stripped_files_terminate_build 1
Formatting suggestions by Dmitry V. Levin <ldv@altlinux.org>.
Actually, `.debug_line` section is checked (implicitly by debugedit)
which should go together with all `.debug_*` sections. This
simplification will make check faster.
Note: Only non-stripped binaries are checked.
Spelling fixes, usage of `Warning' function, and redirect to stderr is
suggested by Dmitry V. Levin <ldv@altlinux.org>.
E2K arch have old elfutils-0.159 which doesn't have eu-elfcompress.
Error:
/usr/lib/rpm/process-debuginfo: line 68: eu-elfcompress: command not found
Reported-by: Andrey Savchenko <bircoph@altlinux.org>
`vmlinux' on ppc appears to have `Dynamic Section', this triggers its
processing with `/usr/lib/rpm/ldd' which returns error:
ldd: ERROR: /usr/src/tmp/kernel-image-std-test-buildroot/usr/lib/debug/lib/modules/5.4.49-std-test-alt4/vmlinux: failed to find the program interpreter
find-requires: ERROR: /usr/lib/rpm/debuginfo.req failed
error: /bin/sh failed
error: Failed to find Requires
Reported-by: Anton V. Boyarshinov <boyarsh@altlinux.org>
Do not try to process ELF relocatable objects that are not kernel
modules, this fixes the following regression:
/usr/lib/rpm/debugedit: ./usr/lib64/gcc/x86_64-alt-linux/9/crtfastmath.o: DWARF version 0 unhandled
objdump: ./usr/lib64/gcc/x86_64-alt-linux/9/crtfastmath.o: bad value
verify-elf: ERROR: ./usr/lib64/gcc/x86_64-alt-linux/9/crtfastmath.o: objdump failed
Fixes: 7aa048df38 ("Generate debuginfo for kernel packages")
Allow `crash` (gdb-7.6 based) to work out of the box.
Otherwise it will fail with the error:
Dwarf Error: wrong version in compilation unit header (is 0, should be 2, 3, or 4)
Alas, it will not be able to load debuginfo for the ko modules, but, advanced
user can `eu-elfcompress -t none` them manually.
We can't keep modules uncompressed due to `cpio archive too big - 4136M'
RPM build error.
Avoid `DWARF version 0 unhandled' for compressed ELFs in
find-debuginfo-files.
Based on 6e9fd97f6 ("debugedit: Add -n, --no-recompute-build-id.")
by Mark Wielaard <mark@klomp.org>.
- Support uncompressed (std-def) and compressed (un-def) modules. Also,
support xz(1) compression if we'd switch to it.
- If module is uncompressed it stays in the kernel-image rpm, if it's
compressed then uncompressed module goes into /usr/lib/debug tree and
will be in debuginfo rpm. Compressed modules will be re-compressed after
stripping.
- vmlinuz binary triggers extraction of vmlinux from the kernel-source
tree, and it's then placed into /usr/lib/debug tree, then processed and
stripped as usual.
- Logic of processing of vmlinux binary for domU packages is not changed.
Some flavours do not even pack it. Thus, do not remove your
`%brp_strip_none'.
- Output of file(1) for vmlinuz is only parsed for filename, because, on
different architectures it detects completely different things.
- Debug files are compressed with `eu-elfcompress'.
- You still need to enable `CONFIG_DEBUG_INFO=y' in for `.config'.
No other changes to spec should be needed.
Thanks to Nikita Ermakov for starting this work.
glibc starting with commit glibc-2.30~85
(elf: Refuse to dlopen PIE objects [BZ #24323])
no longer supports preloading of PIE objects.
Workaround this by swapping the target object and the preloading
PIE object when possible.
Reported-by: ALT beekeeper
Reported-by: Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
The patterns used were OK for the output of "file -NF$'\t'": it would
put a space after the separator (the default separator being ":").
But not for the output of "file -b": we need to pad the result with a
space to use the same patterns.
Putting a space at the beggining is convenient, because it allows to
match independently for "* sh" or "* bash", otherwise "*sh" would
consume "bash", too.
Other uses of "file -b" in scripts/ don't suffer from this problem.
ProvidedSymbols() used to be defined both in lib.prov.in and lib.req.in,
fix this code duplication by moving ProvidedSymbols() to separate
provided_symbols executable script.
Likewise, SuggestBPP() used to be defined both in lib.prov.in and
lib.req.in, fix this code duplication by moving SuggestBPP() to separate
suggest_bpp executable script.