Commit Graph

2137 Commits

Author SHA1 Message Date
39db987aa6 4.0.4-alt106
- Added support for SOURCE_DATE_EPOCH environment variable
  (by Vladimir D. Seleznev; closes: #34200).
- Dropped bzdio support.
2017-11-20 01:42:20 +00:00
96a5445b98 Drop bzdio support
There is no use in supporting bzip2 compressed payloads in rpmbuild nowadays.
2017-11-20 01:42:20 +00:00
55b07cb0ff Add support for SOURCE_DATE_EPOCH environment variable (ALT#34200)
This allows rpmbuild to override file timestamps.

Based on rpm.org commit 8d84878ee05b2e63858af3a5a49d98e9e2933b1b.
2017-11-15 15:29:28 +00:00
36debebed4 4.0.4-alt105
- brp-check_contents: enabled strict error checking by default.
2017-10-26 14:23:23 +00:00
2c2a5545e5 brp-check_contents: do not suppress normal grep output
The concerns of grep output were baseless, let grep print lines
matching the pattern.
2017-10-26 14:23:23 +00:00
232c7538e1 brp-check_contents: enable strict error checking
As the test rebuild of all packages in Sisyphus repository has shown
no false positives, it's safe to enable strict error checking.
2017-10-26 14:19:58 +00:00
877b43c83e 4.0.4-alt104
- Introduced brp-check_contents.
2017-10-25 03:16:59 +00:00
7a81369647 Introduce brp-check_contents
Add a brp interface for checking contents of files in buildroot.
The initial revision of brp-check_contents scripts checks
for suspicious path names like /var/lib/run, complementing
the change introduced in sisyphus_check-0.8.43-alt1.
2017-10-25 03:16:59 +00:00
baee9cdb9c 4.0.4-alt103
- When scanning files for deps, debuginfo, fixup, and verify_elf,
  ignore ELF files generated by GNU Guile.
2017-04-18 16:50:48 +00:00
696f192aea scripts: ignore ELF shared objects with "no" machine type
When scanning files for deps, debuginfo, fixup, and verify_elf,
ignore files with type that matches "ELF * shared object, no machine, *"
pattern.

These are ELF files generated by GNU Guile, ignore them for now.
2017-04-18 16:42:41 +00:00
Ivan Zakharyaschev
c58b3a24d0 4.0.4-alt101.M80P.1 - Merged rpm-build-4.0.4-alt102 into p8 (everything except for separating rpm & -build):
[4.0.4-alt102]
  + verify-elf: fixed passing of LD_PRELOAD in verify_unresolved.
  [4.0.4-alt101]
  + verify-elf: made verify_lfs check shared objects too.
  + Relaxed check for gcc package name in {cpp,pkgconfiglib}.req generators.
  [4.0.4-alt100.99]
  + Updated generator of non-LFS functions list.
  [4.0.4-alt100.97]
  + fixup-libraries: fixed recognition of PIEs (ldv@).
  + verify-elf: treat PIEs as executables in the check for unresolved symbols (ldv@).
2017-01-17 16:16:56 +03:00
cd09d0527e [rpm-build 4.0.4-alt102] cherry-picked (skipped the separation of rpm & -build)
- verify-elf: fixed passing of LD_PRELOAD in verify_unresolved.
2017-01-17 16:16:31 +03:00
88c1020672 verify-elf: fix passing of LD_PRELOAD in verify_unresolved
In verify_unresolved(), do not preload requested objects to $elf_ldd
directly because the latter is not an ELF interpreter but a shell
script.  Instead, pass the list of objects that have to be preloaded
to $elf_ldd script which in turn assigns it to LD_PRELOAD variable
in the ELF interpreter invocation.
2017-01-17 16:16:28 +03:00
9515fd6545 rpmio: fix potential buffer overflow in Fdopen
In file included from /usr/include/string.h:648:0,
                 from ../system.h:76,
                 from rpmio.c:6:
In function 'strncat',
    inlined from 'Fdopen' at rpmio.c:3473:5:
/usr/include/bits/string3.h:158:10: warning: call to __builtin___strncat_chk might overflow destination buffer
   return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest));
2017-01-17 16:16:28 +03:00
Gleb Fotengauer-Malinovskiy
8605fa7393 [rpm-build 4.0.4-alt101] cherry-picked (skipped the separation of rpm & -build)
- verify-elf: made verify_lfs check shared objects too.
- Relaxed check for gcc package name in {cpp,pkgconfiglib}.req generators.
- [not for p8] rpm-build: add R: rpmspec.
2017-01-17 16:16:03 +03:00
Gleb Fotengauer-Malinovskiy
fc627b0ef0 Relax check for gcc package name in {cpp,pkgconfiglib}.req generators 2017-01-17 16:11:35 +03:00
Gleb Fotengauer-Malinovskiy
bea326ff93 verify-elf: make verify_lfs check libraries too
Previously, verify_lfs checked if object has valid interpreter, but it
doesn't make sense in case of shared objects.  verify_lfs check is valid
for all ELFs linked with libraries supporting both LFS and non-LFS API
(libc.so and libz.so in our case).
2017-01-17 16:11:27 +03:00
Gleb Fotengauer-Malinovskiy
e6eb33cf4b [rpm-build 4.0.4-alt100.99] cherry-picked (skipped the separation of rpm & -build)
- Fixed non-LFS check in verify-elf.
- [not for p8] Dropped fake provides made for rpm 4.13.0 bootstrap.
2017-01-17 16:10:06 +03:00
Gleb Fotengauer-Malinovskiy
1b41cd0741 Fix generation of verify-elf-non-lfs-funcs.list
If there were both `func' and `func'64, `func' was considered non-LFS.
Unfortunately, that approach missed functions like fts64_* and
readdir64_r.
2017-01-17 16:07:21 +03:00
8331557f70 4.0.4-alt102
- verify-elf: fixed passing of LD_PRELOAD in verify_unresolved.
2017-01-14 13:42:53 +00:00
a95f23ef1a verify-elf: fix passing of LD_PRELOAD in verify_unresolved
In verify_unresolved(), do not preload requested objects to $elf_ldd
directly because the latter is not an ELF interpreter but a shell
script.  Instead, pass the list of objects that have to be preloaded
to $elf_ldd script which in turn assigns it to LD_PRELOAD variable
in the ELF interpreter invocation.
2017-01-14 13:42:53 +00:00
e8c780c2b0 Disable build and install of unpackaged files
These are no longer packaged anyway, so no need to bother.
2017-01-14 13:42:53 +00:00
e0e8952034 Disable build of static libraries and executables
These are no longer packaged anyway, so no need to bother.
2017-01-14 13:42:53 +00:00
4ab56b3647 rpmio: fix potential buffer overflow in Fdopen
In file included from /usr/include/string.h:648:0,
                 from ../system.h:76,
                 from rpmio.c:6:
In function 'strncat',
    inlined from 'Fdopen' at rpmio.c:3473:5:
/usr/include/bits/string3.h:158:10: warning: call to __builtin___strncat_chk might overflow destination buffer
   return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest));
2017-01-14 13:42:53 +00:00
Gleb Fotengauer-Malinovskiy
509272d41b 4.0.4-alt101
- verify-elf: made verify_lfs check shared objects too.
- Relaxed check for gcc package name in {cpp,pkgconfiglib}.req generators.
- rpm-build: add R: rpmspec.
2016-12-20 20:29:45 +03:00
Gleb Fotengauer-Malinovskiy
6409cf5038 Relax check for gcc package name in {cpp,pkgconfiglib}.req generators 2016-12-20 17:49:07 +03:00
Gleb Fotengauer-Malinovskiy
cec71f3fbf verify-elf: make verify_lfs check libraries too
Previously, verify_lfs checked if object has valid interpreter, but it
doesn't make sense in case of shared objects.  verify_lfs check is valid
for all ELFs linked with libraries supporting both LFS and non-LFS API
(libc.so and libz.so in our case).
2016-12-20 15:31:10 +03:00
Gleb Fotengauer-Malinovskiy
c90b86d89b 4.0.4-alt100.99
- Fixed non-LFS check in verify-elf.
- Dropped fake provides made for rpm 4.13.0 bootstrap.
2016-12-19 17:07:39 +03:00
Gleb Fotengauer-Malinovskiy
ccc38e9d0a Revert "Add fake provides for librpm{,build}"
Bootstrap of rpm-4.13.0 is now complete, we can drop this fake provides.

This reverts commit 477fe329f3.
2016-12-19 17:03:57 +03:00
Gleb Fotengauer-Malinovskiy
0270311591 Fix generation of verify-elf-non-lfs-funcs.list
If there were both `func' and `func'64, `func' was considered non-LFS.
Unfortunately, that approach missed functions like fts64_* and
readdir64_r.
2016-12-19 16:55:34 +03:00
Gleb Fotengauer-Malinovskiy
ad5193bd04 4.0.4-alt100.98
- Restored rpmpopt file.
2016-12-16 19:44:28 +03:00
Ivan Zakharyaschev
22eb7f0c27 4.0.4-alt100.96.M80P.1 - Build for p8. - verify-elf: correctly handle grep's status
...in practically impossible cases.
2016-12-09 03:27:48 +03:00
Ivan Zakharyaschev
f415265c95 Merge branch 'alt', remote-tracking branch 'ldv@ALT/maint' into altM/80P 2016-12-09 03:27:26 +03:00
Ivan Zakharyaschev
2ac0536ff6 verify_rpath(): distinguish grep's failure and a normal valid case
Previously (according to the exit statuses):

0. if something strange was found in $rpath, an error was reported;
1. if nothing strange was found, no error was reported;
2. if grep failed, it looked like the previous case and no error was
reported (as if $rpath was valid).

Now, the pipe (and the whole script) would abort on grep's failure.
2016-12-09 03:23:12 +03:00
Ivan Zakharyaschev
0445f481cc verify_stack(): distinguish failures and a normal status of grep
Now, if something fails, the pipe (and the function, and the whole
script) will fail.

If the exit codes are normal, they are handled according to our logic.

Previously, a failure (which is an exceptional rare case) would lead to:

1. skipping the further exe_stack check and error_strict STACK "$f" 'STACK entry not found'
2. silently skipping the exe_stack check (which was impossible anyway because of the failure)
2016-12-09 03:23:12 +03:00
Ivan Zakharyaschev
fc56b0be97 verify_unresolved(): correctly treat the status of grep in a very unusual case
The pipe (and the function, and the whole script) would fail when the
resulting constructed rpath was empty. But usually at least
$RPM_VERIFY_ELF_LDD_RPATH is not empty, so the bad behavior has not
been observed.
2016-12-09 03:23:12 +03:00
Gleb Fotengauer-Malinovskiy
ecd20cdbb6 4.0.4-alt100.97
- fixup-libraries: fixed recognition of PIEs (ldv@).
- verify-elf: treat PIEs as executables in the check for unresolved symbols (ldv@).
- Disabled rpm's installer part.
- Built rpm-build in "compat" mode with rpm-4.13.
2016-12-08 19:24:36 +03:00
Gleb Fotengauer-Malinovskiy
477fe329f3 Add fake provides for librpm{,build}
This change is needed only for rpm-4.13+rpmbuild-4.0.4 bootstrap.
2016-12-08 19:24:36 +03:00
Gleb Fotengauer-Malinovskiy
2781e0f2af Disable sisyphus_check dirlist test for /usr/lib/rpm
This directory now belongs to both librpm and librpm7.
2016-12-08 19:24:36 +03:00
Gleb Fotengauer-Malinovskiy
3691deca51 Rename macros and rpmrc to buildmacros and rpmbuildrc
This change is needed only for rpm-4.13+rpmbuild-4.0.4 bootstrap.
Files in rpm-4.13 can and should be compatible with rpmbuild-4.0.4 and
vice versa.
2016-12-08 19:23:33 +03:00
Gleb Fotengauer-Malinovskiy
7f429ba6da macros.in: change default database configuration to btree 2016-12-08 19:18:21 +03:00
Gleb Fotengauer-Malinovskiy
d32a8374b4 Build only rpm-build, librpm and librpmbuild packages 2016-12-08 19:18:21 +03:00
0e2f86b0fb 4.0.4-alt100.97
- fixup-libraries: fixed recognition of PIEs.
- verify-elf: treat PIEs as executables in the check for unresolved symbols.
2016-12-07 11:30:44 +00:00
a4fb4d42e7 verify-elf (verify_unresolved): treat PIEs as executables 2016-12-07 11:30:44 +00:00
8c1f9d589b Move "is this ELF shared object an executable" check to a separate script
* configure.ac (AC_OUTPUT): Add scripts/fixup-libraries.
* rpm-4_0.spec (%files build): Add %_rpmlibdir/is_elf_so_executable.
* scripts/is_elf_so_executable: New file.
* scripts/Makefile.am (EXTRA_DIST, config_SCRIPTS): Add it.
* scripts/fixup-libraries: Rename to scripts/fixup-libraries.in,
use is_elf_so_executable.
2016-12-07 11:30:42 +00:00
a51ea574e9 scripts/fixup-libraries: fix recognition of PIEs 2016-12-07 11:30:25 +00:00
Ivan Zakharyaschev
d9f7deba30 4.0.4-alt100.95.M80P.1 - Build for p8. 2016-12-01 13:40:39 +03:00
Ivan Zakharyaschev
401d9520ba 4.0.4-alt100.96
- verify-elf: don't confuse the initial verify_rpath() in case
  of two RUNPATH/RPATHs (ALT#32826).
2016-11-30 17:50:04 +03:00
Ivan Zakharyaschev
d362bae600 verify-elf made a bit safer: pipes or command substitutions make it fail
1. set -o pipefail
2. don't use command substitutions inside other complex expressions; just assign to a var -- then it would make the script fail
2016-11-30 17:49:59 +03:00
Ivan Zakharyaschev
00b00565ea verify-elf: don't call verify_rpath() under a pipe because the errors are saved in a var
(A pipe makes a subshell and the var is modified there.)
2016-11-30 17:48:24 +03:00