Commit Graph

619 Commits

Author SHA1 Message Date
Konstantin A. Lepikhov
d093bb9f0d cpp.req: skip cpp checks for llvm
Skip any cpp checks for llvm packages, anyway we don't know how to deal
with them.

Signed-off-by: Konstantin A. Lepikhov <lakostis@altlinux.ru>
2019-01-13 22:39:58 +00:00
Konstantin A. Lepikhov
169f3ece9a verify-elf: bypass lint checks by request
lld linked binaries differ by structure from GNU ld, so eu-lint will
always complaint about.  Allow to skip those checks by passing
%set_verify_elf_method lint=(skip|no)

Signed-off-by: Konstantin A. Lepikhov <lakostis@altlinux.ru>
2019-01-13 22:39:58 +00:00
Nikita Ermakov (0x90)
835d775268 Disable stack verification and elflint on RISC-V 2018-12-20 11:46:01 +00:00
Gleb Fotengauer-Malinovskiy
4f4a1d1465 lib.prov, lib.req: enhance ProvidedSymbols
This enhances ProvidedSymbols() in two ways:
* fixes st_shndx check for the case when it is not $7 in
"readelf --wide --dyn-syms" output as it happens on some architectures
like ppc64le;
* filters out special symbols (__bss_start, _edata, _end, _fini, _init)
after stripping of versioning.

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-12-16 23:09:47 +00:00
6feb190125 0common-files.req.list: remove /etc/syslog.d
Since /etc/syslog.d has been moved from syslog-common to filesystem,
there is no need to keep /etc/syslog.d in the list.
2018-08-28 18:05:40 +00:00
Ivan A. Melnikov
c038a07d61 Disable stack verification and elflint on mips*
Most of the binaries on mipsel do not contain the stack section,
so this check is not relevant for that architecture. Morover,
it fails, since it can't find the stack section, which is
(rightfully) not present.

eu-elflint does not understand mipsel binaries currently,
so here we disable that check, too.
2018-07-26 17:44:30 +03:00
Ivan Zakharyaschev
ea7ca90347 verify-elf(get_verify_policy): fix whitespace 2018-05-23 17:02:10 +03:00
Ivan Zakharyaschev
c8d9060245 shell.req.files: include #!/usr/bin/env sh 2018-05-23 17:00:54 +03:00
Ivan Zakharyaschev
67ec541700 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.
2018-05-23 17:00:54 +03:00
Ivan Zakharyaschev
b491c783f6 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)
2018-05-23 17:00:54 +03:00
Ivan Zakharyaschev
cdefa4ab34 verify-elf(verify_unresolved): correctly treat grep's status, allow standalone use
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.

However, when verify-elf is used standalone, $RPM_VERIFY_ELF_LDD_RPATH
is empty indeed, and this improvement becomes important.

Before this improvement:

$ RPM_BUILD_ROOT=/home /usr/lib/rpm/verify-elf /bin/pwd; echo $?
1

After this improvement:

$ VERIFY_ELF_UNRESOLVED=strict RPM_BUILD_ROOT=/home /usr/lib/rpm/verify-elf /bin/pwd; echo $?
0
$ VERIFY_ELF_UNRESOLVED=strict RPM_BUILD_ROOT=/home /usr/lib/rpm/verify-elf /usr/lib64/python3/site-packages/_cffi_backend.cpython-35m.so; echo $?
verify-elf: ERROR: /usr/lib64/python3/site-packages/_cffi_backend.cpython-35m.so: undefined symbol: PyExc_SystemError
....
1
2018-05-23 17:00:54 +03:00
30d9979184 ldd.in: try interpreters listed in /usr/bin/ldd
When the given ELF file doesn't specify PT_INTERP, e.g. if it's a shared
library, we have to guess it.  We used to try the program interpreter
of dump_ld_config, but it doesn't work well enough in multilib
environments, so extend the guess by trying interpreters listed
in RTLDLIST from /usr/bin/ldd script.
2018-05-15 17:26:10 +00:00
Ivan Zakharyaschev
e8c7bc4453 find-package.in: group the pruned packages nicer in the list 2018-05-15 17:26:10 +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
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
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
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
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
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
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
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
d78a04e393 brp-fix-perms: fix "find -perm" syntax 2012-08-08 13:15:41 +00:00
8d16b4186d 0common-files.req.list: add /etc/sudoers.d 2012-07-12 10:02:33 +00:00
Igor Vlasenko
da9e0cf514 scripts/find-lang.in: add --all-name option (ALT#27284)
Add PLD/Fedora compatible --all-name option (by mkochano,pascalek@PLD).
2012-05-24 13:44:54 +00:00
Alexey Tourbin
53661a9938 cpp.req: fix double buildroot in filename-specific -I options 2012-02-19 19:09:55 +04:00
Alexey Tourbin
d7b8e36a16 cpp.req: single pkg-config invocation
Running pkg-config multiple times can produce too many cflags, most
of them being dups.  With this change, I rely on pkg-config itself to
discard dups properly - pkg-config(1) manpage says that "duplicate
flags are merged (maintaining proper ordering)".
2012-02-19 18:26:41 +04:00
Alexey Tourbin
50a5ad7320 cpp.req: recover missing once-only pushes using -dI
Hierarchical processing makes cpp.req more susceptible to "once-only
header" optimization.  To demonstrate the problem, I've implemented
some debugging facilities.  Here is how <gtk/gtk.h> is processed.

$ cpp.req -vv /usr/include/gtk-2.0/gtk/gtk.h
[...]
  Include gdk/gdk.h
+ Push /usr/include/gtk-2.0/gdk/gdk.h
    Include gdk/gdkapplaunchcontext.h
+   Push /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h
      Include gio/gio.h
!     Push /usr/include/glib-2.0/gio/gio.h
        Include gio/giotypes.h
        Push /usr/include/glib-2.0/gio/giotypes.h
          Include gio/gioenums.h
          Push /usr/include/glib-2.0/gio/gioenums.h
            Include glib-object.h
            Push /usr/include/glib-2.0/glib-object.h
              Include gobject/gbinding.h
              Push /usr/include/glib-2.0/gobject/gbinding.h
                Include glib.h
                Push /usr/include/glib-2.0/glib.h
[...]
+               Push /usr/include/gtk-2.0/gtk/gtkdebug.h
                  Include glib.h
                Pop
[...]
recovered glib.h -> /usr/include/glib-2.0/glib.h
recovered stdarg.h -> /usr/lib64/gcc/x86_64-alt-linux/4.5.3/include/stdarg.h
recovered time.h -> /usr/include/time.h
recovered glib-object.h -> /usr/include/glib-2.0/glib-object.h

In the output, "Include" lines annotate "#include" instructions which
are about to be processed by cpp; "Push" and "Pop" annotate actual
file operations performed by cpp.  Technically, "Include" annotations
are enabled via -dI option which installs cb_include callback in
gcc/c-ppoutput.c; "Push" and "Pop" are triggered in the guts of the
libcpp library.  The library has hardcoded optimization against repeated
inclusions.  According to "info cpp", "It remembers when a header file
has a wrapper #ifndef.  If a subsequent #include specifies that header,
and the macro in the #ifndef is still defined, it does not bother to
rescan the file at all."  (See should_stack_file in libcpp/files.c.)

This means that, normally, each "Include" should be followed by a
corresponding "Push".  However, due to "once-only header" optimization,
some includes are not followed by a push.  This means that the file
has already been pushed, and it happens to use a wrapper #ifndef.
Note that, in the output, this is exactly the case with <glib2.h>.

Also note that, in the output, files internal to the package are marked
with "+" on the left.  They are tracked down to the first non-packaged
file, which makes a dependency; these files are marked with "!".  The
problem with <glib2.h> is then that it gets first included in an
external file.  Later it is also included in an internal file, but
a "Push" is not triggered.  And since the internal file is subordinate
to <gtk/gtk.h> and is not going to be processed on its own, the
dependency on <glib2.h> is lost.

To recover missing pushes, we have to associate each include with the
first-time push.  In other words, we need a table which maintains a
(header -> filename) mapping; in the above example, the table will
contain (glib.h -> /usr/include/glib-2.0/glib.h).  Using this table,
we can ascertain that each internal #include produced a result.

Now, this might still have some corner cases: includes with
non-canonical header names probably will not be recovered, and it is not
clear whether <foo.h> and "foo.h" should be processed differently.
It works well enough in simple cases, though.
2012-02-19 18:23:24 +04:00
Alexey Tourbin
e4835167bb cpp.req: hierarchical processing - fewer errors and major speedup
I have to admit that cpp.req can be slow and often fails in an ugly
manner.  To address these issues, this change introduces "hierarchical
processing".  Consider the package libgtk+2-devel.  Only a few header
files from this package can be included directly, and these files in
turn include other "private" headers which are protected against direct
inclusion.  The idea is then that only those few files with the highest
rank have to be processed explicitly, and most of the "private" files
can be processed implicitly as they are included on behalf of
higher-ranking files.

To implement the idea, somehow we have to sort the files by their rank.
This probably has to involve some guesswork.  However, assigning higher
ranks to shorter filenames seems to produce nice guesses.  More precisely,
files are sorted by shorter directory names and then by shorter basenames.
Another possible criteria which is not currently implemented is also to
take into account the number of path components in a directory name.

The result is pretty amazing: the amount of time needed to process
libgtk+2-devel headers is reduced from 150s to 5s.  Notably <gtk/gtk.h>
includes 241 packaged files.  This is also due to other optimizations:
packaged files are excluded from dependencies early on, and each
required filename gets passed to FindPackage only once.
2012-02-19 09:13:44 +04:00
Vitaly Kuznetsov
ca5b17e03c introduce brp-hardlink_pyo_pyc (splitted from brp-bytecompile_python)
Hardlinking identical .pyo and .pyc files splitted from brp-bytecompile_python to
brp-hardlink_pyo_pyc to make this brp work for python3 files (generated by separate
brp-bytecompile_python3).
2012-01-25 14:23:12 +00:00
Vitaly Kuznetsov
a771af0403 brp: introduce /usr/lib/rpm/brp.d directory
Made it possible for third party packages to have their own brp-* scripts. All
existent brp-* scripts migrated to /usr/lib/rpm/brp.d, brp-alt taught to execute
all from this directory in alphabetical order. All brp-* scripts obligated to
have three digit prefix (to specify execution order) and .brp suffix.
2012-01-25 14:16:15 +00:00
3a6b8bd83b 0common-files.req.list: remove /etc/sysctl.d
/etc/sysctl.d is going to be added to filesystem package.

This reverts commit bec54ac071.
2011-12-13 14:55:50 +00:00
820414df17 verify-elf: move check for rpath, stack and unresolved symbols to separate functions 2011-12-12 16:27:52 +00:00
c66e9c38e4 verify-elf: more RPATH checks
Check RPATH for non-ascii symbols, invalid absolute and relative paths,
and standard library directories.
2011-12-10 21:51:42 +00:00
6eea0604ad verify-elf: Rewrite error reporting code 2011-12-10 17:50:11 +00:00
9e73931c30 find-debuginfo-files: fix packaging of symlinks
Package only those /usr/lib/debug/* symlinks that complement the package
being processed and point to debuginfo regular files which are going to
be packaged along with these symlinks.

The most obvious consequence of this change is that library symlinks for
use of ld(1) will not result to their
/usr/lib/debug/usr/lib*/libNAME.so.debug counterparts to be packaged.
2011-12-06 15:04:05 +00:00
bf54b11cf4 cpp.req: do not insist on trying c++ mode when c++ support is not installed
When plain cpp check fails, cpp.req tries to process the same file in
c++ mode, which requires c++ support to be installed.  As result, when
c++ support is not installed, cpp.req clutter the log with vain attempts
to process files in c++ mode.  This change reduces the noise by checking
whether c++ support is actually available.
2011-12-04 21:25:53 +00:00
016617f027 find-lang: handle more exotic GNOME help locale directories (ALT#26417) 2011-12-01 02:08:29 +00:00
Alexey Tourbin
7dea69eca4 brp-cleanup: perl cleanup routines moved to rpm-build-perl 2011-10-21 01:27:51 +04:00
19d7160080 find-lang: handle %_datadir/help/%lang/%name subdirectories (ALT#26417) 2011-10-10 21:54:07 +00:00
ae55da575e find-lang: add support for GNOME >= 3.2 help files location (ALT#26417) 2011-10-06 20:38:04 +00:00
Alexey Tourbin
4d747a6312 removed brp-strip & related macros 2011-09-23 03:36:28 +04:00
Alexey Tourbin
8af14dd777 cpp.req: track included files down to the first external file
Some header files have protection against being included into user
code directly.  This means that, when processing such files, cpp
is going to fail, and some dependencies probably will be missing.

/usr/include/gtk-2.0/gtk/gtkaccessible.h:
    20  #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
    21  #error "Only <gtk/gtk.h> can be included directly."
    22  #endif
    23
    24  #ifndef __GTK_ACCESSIBLE_H__
    25  #define __GTK_ACCESSIBLE_H__
    26
    27  #include <atk/atk.h>
    28  #include <gtk/gtkwidget.h>

To remedy the problem, we should, as per the above example, process
gtk/gtk.h dependencies recursively.  Dependencies which we now attribute
to gtk/gtk.h are: 1) files which are packaged within the same subpackage
- these dependencies will be optimized out later by rpm; 2) the first
file not packaged into this subpackage, which is atk/atk.h.  Files below
atk/atk.h are not processed.

    Packaged?     Stack
                +---------------------+
        +       | gtk/gtk.h           |
                +---------------------+
        +       | gtk/gtkaccessible.h | <- SPmark
                +---------------------+
        -       | atk/atk.h           |
                +---------------------+
                | ...                 |

Also note that packaged files in cpp output should not be identified by
filenames, since filenames in the output will be possibly non-canonical.
Therefore I use standard unix technique to identify files by (dev,ino).

/usr/include/boost/spirit/home/support/detail/lexer/containers/ptr_vector.hpp:
     9  #include "../size_t.hpp"
2011-09-22 03:08:14 +04:00
Alexey Tourbin
cf9820cea4 cpp.req: simplify filename handling in cpp output 2011-09-22 03:08:11 +04:00
Alexey Tourbin
3d7945aad6 scripts: introduced tmpdir.sh 2011-09-22 02:58:59 +04:00
Alexey Tourbin
36d69f322f cpp.req: process subpackage *.pc files before other *.pc files
This helps to handle subtle cases like separate *-gtk2-devel
and *-gtk3-devel subpackages.

RPM_BUILD_ROOT=$PWD RPM_SUBPACKAGE_NAME=libgtk3vnc-devel /usr/lib/rpm/cpp.req $PWD/usr/include/gtk-vnc-2.0/vnc*.h
RPM_BUILD_ROOT=$PWD RPM_SUBPACKAGE_NAME=libgtk3vnc-devel ~/git.alt/rpm/scripts/cpp.req.in $PWD/usr/include/gtk-vnc-2.0/vnc*.h
@@ -1,6 +1,6 @@
-libgtk+2-devel
-/usr/include/gtk-vnc-1.0/vncgrabsequence.h
+libgtk+3-devel
+/usr/include/gtk-vnc-2.0/vncgrabsequence.h
 glib2-devel
 glib2-devel
-libgtk+2-devel
+libgtk+3-devel
 /usr/include/gvnc-1.0/vncbaseframebuffer.h
2011-09-18 05:27:41 +04:00
925d594b1b debuginfo.req: fix handling of exotic sonames written as pathnames (ALT#26247) 2011-09-07 23:28:18 +00:00
caad5da212 verify-elf: Add /lib/../lib64 to the list of prohibited RPATH elements 2011-09-07 21:44:34 +00:00