Commit Graph

545 Commits

Author SHA1 Message Date
a51ea574e9 scripts/fixup-libraries: fix recognition of PIEs 2016-12-07 11:30:25 +00: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
Ivan Zakharyaschev
c0f11587a5 verify-elf: don't confuse verify_rpath() in case of two RUNPATH/RPATHs (ALT#32826) 2016-11-30 17:30:49 +03:00
Ivan Zakharyaschev
91c923f251 verify-elf: tiny cleanup: unify the awk expression for RPATH extraction
Rewritten equivalently, like in lib.req.
2016-11-30 17:09:09 +03:00
Ivan Zakharyaschev
70369c1a8e verify-elf: tiny cleanup: local var declaration moved to the place of use
The other occurence of "rpath" is in the second part of a pipe and is
local to that subshell anyway.
2016-11-30 17:08:09 +03:00
Ivan Zakharyaschev
3172abb8c1 %%distribution: ALT Linux --> ALT (ALT#32707) and some minor corrections of old @altlinux.ru addresses 2016-11-29 15:12:34 +03:00
Ivan Zakharyaschev
66f1a4cb8d verify-elf: RUNPATH overrides RPATH for verify_unresolved
From ld.so's documentation about the search order:

Using the directories specified in the DT_RPATH dynamic section
attribute of the binary if present and DT_RUNPATH attribute does not
exist. Use of DT_RPATH is deprecated.
2016-11-29 15:11:46 +03:00
Ivan Zakharyaschev
65509e2763 verify-elf: honor RUNPATH, too (like in lib.req.in:95 and debuginfo.req.in:76)
in addition to RPATH
2016-11-28 22:37:18 +03:00
Ivan Zakharyaschev
e2810bda5c added me to "Copyright (C)" 2016-11-28 22:37:13 +03:00
Ivan Zakharyaschev
d2e5d7dce7 shell.req: generalize the shebang regexp w.r.t. other locations of env
No need to be too strict here: shebang.req would (or should) catch bad
locations. It's not our work.
2016-05-27 16:02:37 +03:00
Ivan Zakharyaschev
ef66de16d5 shell.req: more idiomatic regexp for reading the shebang (use ?)
Compared with a similar regexp in Emacs sources --
http://git.altlinux.org/gears/e/emacs24.git?p=emacs24.git;a=blob;f=lisp/progmodes/sh-script.el;h=4700324d376db79e27d05e5352fff2f7e841a603;hb=HEAD#l1637
: "#![ \t]?\\([^ \t\n]*/bin/env[ \t]\\)?\\([^ \t\n]+\\)"

Conclusion: mostly identical meaning, with the exception of a more
liberal path of env in Emacs.

But ALT Sisyphus has /usr/bin/env only, so I don't see a good reason
to make the regexp more general. (If a different path is written
there, it won't work in ALT Sisyphus.)
2016-05-27 15:19:10 +03:00
Ivan Zakharyaschev
f9bf39c2aa shell.req: use the version of (ba|)sh from the shebang 2016-05-24 23:08:04 +03:00
Ivan Zakharyaschev
4d23ad4702 percolate: removed loop optimization (for code clarity), result won't change 2016-04-06 03:26:17 +03:00
Ivan Zakharyaschev
5630438416 debuginfo.req.files: ignore everything under /usr/lib/debug/.build-id/
The special directory structure there doesn't correspond to the
directory structure where debuginfo.req expects to find and process
*.debug files.
2016-04-05 22:57:42 +03:00
Ivan Zakharyaschev
dc0def4a3b percolate: hopefully, it will work just with /bin/sh (not to create an extra dep)
Conflicts:
	scripts/percolate
2016-04-05 22:57:42 +03:00
Ivan Zakharyaschev
0f969acf44 percolate: register it in Makefile etc. 2016-04-05 22:57:42 +03:00
Ivan Zakharyaschev
70bf25fc08 percolate: a helper script (will be used to follow symlinks only through known files) 2016-04-05 22:57:35 +03:00
Ivan Zakharyaschev
c024ff3ce7 brp-verify_elf: set -o pipefail -- just in case 2016-03-31 21:23:29 +03:00
Ivan Zakharyaschev
e124ef0b4c brp-verify_elf: handle all rules for setting LD_PRELOAD in the form of pairs of RPM_LD_PRELOAD_@ and RPM_FILES_TO_LD_PRELOAD_@ env vars 2016-03-31 21:23:29 +03:00
Ivan Zakharyaschev
9d2611ea44 verify-elf: substitute LD_PRELOAD before ldd (with what is passed on stdin after \t)
Of course, this will clean any externally set LD_PRELOAD.
2016-03-31 21:23:22 +03:00
b78cc75d12 lib.req: make "no symbol bindings" condition fatal 2016-03-10 15:30:27 +00:00
864001eba2 Revert "ldd.in: pass --list to rtld"
ld.so --list option is incompatible with LD_TRACE_LOADED_OBJECTS.

This reverts commit da9e6dfaab.
2016-03-10 16:10:54 +00:00
42eacfcc82 brp-bytecompile_python: exclude paths listed in $RPM_PYTHON3_COMPILE_INCLUDE (ALT#28606)
$RPM_PYTHON3_COMPILE_INCLUDE is usually a subset of
$RPM_PYTHON_COMPILE_INCLUDE, so add the former to the exclude list.
2016-03-09 15:02:22 +00:00
da9e6dfaab ldd.in: pass --list to rtld 2016-01-11 18:19:19 +00:00
Gleb Fotengauer-Malinovskiy
ae81f541b9 compress_files: change default method to xz 2015-12-02 21:46:44 +03:00
Gleb Fotengauer-Malinovskiy
39018f9f32 find-package: add support for newer naming of gcc and libstdc++-devel 2015-05-21 18:07:37 +03:00
6ad3a37cb9 verify-elf: fix regression in verify_lfs 2015-01-28 13:41:37 +00:00
a44f6ae523 verify-elf: make verify_stack work again 2015-01-23 14:56:29 +00:00
213af284d9 fixup-binconfig: strip rpaths
Extend library search path stripping algorithm to handle rpaths.
2014-02-25 12:25:51 +00:00
2992fcc3ab pkgconfig.req.in: allow pkgconfig names to start with + (ALT#29737) 2014-02-25 12:22:12 +00:00
f1dc627616 cpp.req: fix for cpp 4.8.x output
Adapt cpp output parser to handle cpp 4.8.x output properly.

  $ cpp-4.7 /dev/null
  # 1 "/dev/null"
  # 1 "<command-line>"
  # 1 "/dev/null"
  $ cpp-4.8 /dev/null
  # 1 "/dev/null"
  # 1 "<command-line>"
  # 1 "/usr/include/stdc-predef.h" 1 3 4
  # 1 "<command-line>" 2
  # 1 "/dev/null"
2014-02-15 03:06:45 +00:00
6fb9f3ddc8 brp-debuginfo: add $RPM_DEBUGINFO_SKIPLIST support 2013-10-29 00:51:04 +00:00
02fb57b32c fixup-pkgconfig: workaround some broken pkgconfig files (ALT#29427) 2013-10-24 12:42:15 +00:00
98730b6009 find-lang: update copyright information 2013-03-11 23:15:51 +00:00
c525a0dea9 find-lang: minor regexp optimization 2013-03-11 23:13:27 +00:00
d5936fb3eb find-lang: enhance QT files lookup regexps 2013-03-11 23:04:17 +00:00
bd376047fd find-lang: enhance KDE lookup regexps 2013-03-11 22:50:38 +00:00
00809aa77f find-lang: enhance GNOME lookup regexps 2013-03-11 22:38:28 +00:00
9e3d656706 find-lang: enhance man lookup regexps 2013-03-11 21:49:30 +00:00
bdda18ca1f find-lang: enhance .mo files lookup regexps 2013-03-11 21:46:43 +00:00
5a139641b0 find-lang: add --with-qt option to getopt (ALT#28288) 2013-03-10 00:04:56 +00:00
1096c10bec find-lang: add QT .qm files support and --with-qt option (ALT#28288) 2013-03-08 17:07:49 +00:00
2cbf4d4cd9 find-lang: minor cleanup 2013-03-08 15:22:59 +00:00
53e2358f62 scripts/fixup-desktop.awk: fix regexp 2013-01-11 22:36:49 +00:00
d92c009d2d verify-elf: implement LFS check (ALT#28290) 2013-01-10 23:15:07 +00:00
279f487ca4 scripts/functions: export LC_ALL=C
A lot of code relies on C collation, C messages and so on.
Do not pretend it is expected to work with a non-C locale.
2013-01-10 22:38:52 +00:00
1fe269bb6c scripts: cleanup readelf(1) invocations
Prefer long options to short options.
Constistently use --wide option.
2013-01-10 22:04:19 +00:00
5a8fdc10de pkgconfig.req.files: ignore file type, treat all non-symlinks the same way
Stop relying on file(1) output for obvious reasons (see e.g. ALT#28261),
assume that all non-symlinks in pkgconfig directories are valid input.
2012-12-22 14:41:22 +00:00
7d84f7da5a 0ldconfig.filetrigger: execute telinit if appropriate 2012-08-30 23:05:00 +00:00