Commit Graph

1757 Commits

Author SHA1 Message Date
0358825884 pruneRDeps1: fix check for cycles
The check for cycles introduced in 4.0.4-alt100.17-6-ga71e004 appeared
to be incomplete.  For example, it fails to recognize a cycle in the
following example:

%package -n test
Requires: libtest = %version-%release

%package -n libtest
Requires: libtest-common = %version-%release

%package -n libtest-common
Requires: libtest = %version-%release
2011-03-14 02:27:17 +00:00
37ca0532c0 addReqProv: fix optimization of subpackage self-requirements
Optimization of subpackage self-requirements never worked before because
version-release is normally not defined for subpackages at parse time.
2011-03-14 01:49:42 +00:00
Alexey Tourbin
3f500eb080 4.0.4-alt100.22
- cpp.req: New dependency generator for C and C++ header files.
- Reverted "pkg-config --print-requires-private" change introduced in alt100.2.
2011-02-27 07:39:08 +03:00
Alexey Tourbin
808184893c cpp.req: disable for gcc 2011-02-27 07:17:15 +03:00
Alexey Tourbin
91d73ac0ae find-package: prune generic devel deps like gcc4.x in HOST_PKG mode 2011-02-27 06:29:15 +03:00
Alexey Tourbin
3df5f4ac6d cpp.req: try to enter c++ mode after the first failure 2011-02-27 05:34:23 +03:00
Alexey Tourbin
5bce334b5e cpp.req: new dependency generator for header files 2011-02-27 03:51:26 +03:00
Alexey Tourbin
a9278eb466 Revert "pkgconfig.req: pass --print-requires-private to pkg-config"
This reverts commit 2fc9a40da8.
2011-02-27 03:39:08 +03:00
Alexey Tourbin
3cc4ba3448 4.0.4-alt100.21
- build/files.c: Fixed RPMTAG_SIZE for src.rpm packages (broken in alt100.16).
2011-02-09 14:17:15 +03:00
Alexey Tourbin
57ecc37f6f build/files.c: fixed RPMTAG_SIZE for src.rpm packages 2011-02-09 14:15:54 +03:00
Alexey Tourbin
5fe2c17ec3 4.0.4-alt100.20
- find-requires, shell.req: improved support for 'buildreq -bi'.
2011-02-09 07:20:36 +03:00
Alexey Tourbin
6f60362519 find-requires: absolute smbolic links should not be passed to file(1)
Again, this is to improve 'buildreq -bi' support.  See, file(1) is
so full of shit that, to determine whether a link is broken, it has
to read the link and stat its destination (instead of bare stat
on the link).  This hardly makes any sense, but enables buildreq
to calculate self-dependency when the package is installed.
2011-02-09 07:09:01 +03:00
Alexey Tourbin
9b87852e0f shell.req: avoid 'type -t' call for paths
This is to improve 'buildreq -bi' support: 'type -t' will stat
absolute paths and buildreq will make self-dependency.  Note
that in the next command PATH is nullified to avoid stat/search
for regular commands.
2011-02-09 06:31:40 +03:00
Alexey Tourbin
d549b5b04d 4.0.4-alt100.19
- build/interdep.c: Diagnose mssing Epoch in subpackage dependencies.
- build/interdep.c: Diagnose non-strict dependencies between subpackages.
2011-02-08 09:07:10 +03:00
Alexey Tourbin
d5b1a5e2f2 build/interdep.c: missing alFree 2011-02-08 08:28:24 +03:00
Alexey Tourbin
7891bc3a46 build/interdep.c: diagnose non-strict dependencies between subpackages
warning: util-linux: non-strict dependency on libblkid
warning: util-linux: non-strict dependency on libuuid
warning: util-linux: non-strict dependency on libmount
warning: mount: non-strict dependency on libblkid
warning: cfdisk: non-strict dependency on libblkid
warning: fdisk: non-strict dependency on libblkid
warning: libblkid: non-strict dependency on libuuid
warning: libblkid-devel: non-strict dependency on libuuid-devel
warning: libmount-devel: non-strict dependency on libblkid-devel
warning: util-linux-debuginfo: non-strict dependency on libblkid-debuginfo
warning: util-linux-debuginfo: non-strict dependency on libuuid-debuginfo
warning: util-linux-debuginfo: non-strict dependency on libmount-debuginfo
warning: mount-debuginfo: non-strict dependency on libblkid-debuginfo
warning: cfdisk-debuginfo: non-strict dependency on libblkid-debuginfo
warning: fdisk-debuginfo: non-strict dependency on libblkid-debuginfo
warning: libblkid-debuginfo: non-strict dependency on libuuid-debuginfo

Note that the right time for this check is after strict dependencies
are propagated, and also after debuginfo dependencies have been lifted.
2011-02-08 07:19:01 +03:00
Alexey Tourbin
d92517ed56 build/interdep.c: diagnose mssing Epoch in subpackage dependencies
warning: libX11-devel: dependency on libX11 needs Epoch
warning: libX11: dependency on libX11-locales needs Epoch
2011-02-08 05:21:38 +03:00
Alexey Tourbin
622fd8f698 4.0.4-alt100.18
- lib.req: Indirect functions need dependency on rtld(GNU_IFUNC).
- build/interdep.c: Prune already required deps between dependent subpackages.
2011-02-07 07:45:18 +03:00
Alexey Tourbin
a71e004bdf build/interdep.c: cycles must not be pruned completely
%package -n test
Requires: libtest = %version-%release
Requires: libtest-common = %version-%release

%package -n libtest
Requires: libtest-common = %version-%release

%package -n libtest-common
Requires: libtest = %version-%release

Here libtest and libtest-common make a cycle, and the "test" package
requires a cycle.  Naiive optimization against a cycle can simply
wipe out all dependencies: the dependency on libtest-common will be
optimized out, because libtest-common is already required by libtest;
likewise, the dependency on libtest will be optimized out, because
libtest is already required required by libtest-common.
2011-02-07 07:38:04 +03:00
Alexey Tourbin
e9d4612abe build/interdep.c: recognize %_deps_optimization
%_deps_optimization is now treated as optimization level 0, 1, or 2
(the default is 2).  Level 1 will make single-package optimizations.
Level 2 will additionally optimize dependencies between subpackages.
2011-02-07 06:26:02 +03:00
Alexey Tourbin
f5ed7f870a build/interdep.c: prune already required deps between dependent subpackages 2011-02-07 06:03:02 +03:00
Alexey Tourbin
705b043ac2 build/reqprov.c, rpmbuild.h: export compare_deps() 2011-02-07 04:28:18 +03:00
Alexey Tourbin
0cf73c5886 lib.req, lib.prov: simplify leading number check in ProvidedSymbols 2011-02-06 03:42:15 +03:00
Alexey Tourbin
a405f7c61e lib.req: indirect functions need dependency on rtld(GNU_IFUNC) 2011-02-06 03:38:32 +03:00
Alexey Tourbin
d2457ebf7b 4.0.4-alt100.17
- build/files.c: Missing error check resulted in "Bad CSA data" error.
- build/checkFiles.c: Disabled intersection check for /usr/src/debug.
2011-02-06 01:02:06 +03:00
Alexey Tourbin
856fad26a6 build/checkFiles.c: disable intersection check for /usr/src/debug
Though the intersection check can be useful even for /usr/src/debug
(it indicates binary code duplication and/or poor dependencies between
subpackages), it is too noisy and can eat up quite a bit of output.
The same information is still available directly within the packages
or via contents_index.
2011-02-05 23:54:19 +03:00
Alexey Tourbin
033bb95511 brp-debuginfo: pass LD_ORIGIN_PATH=/usr/bin to eu-strip
This is the same as with eu-findtextrel and eu-elflint; eu-strip
needs to load EBL backend only with --strip-debug, though.
2011-02-05 23:34:11 +03:00
Alexey Tourbin
a7b7111110 build/files.c (processBinaryFiles): fixed return after find-requires failure 2011-02-05 09:22:40 +03:00
Alexey Tourbin
a421d99177 4.0.4-alt100.16
- find-debuginfo-files: Create /usr/lib/debug/.build-id links.
- build/pack.c: Added support for %_debuginfo_payload macro.
- brp-debuginfo, platfrom.in: Impelemnted %brp_strip_{debug,none} macros.
- debuginfo.{req,prov}: Implemented soname-based debug dependencies.
- build/interdep.c: Prune extra deps between dependent subpackages.
- build/files.c: Calculate RPMTAG_SIZE after build/interdep.c optimizations.
2011-02-05 07:28:59 +03:00
Alexey Tourbin
8d0056fd39 build/interdep.c: also prune rpmlib(SetVersions) dependency 2011-02-05 07:25:46 +03:00
Alexey Tourbin
c1cccab3d8 debuginfo.req: avoid repeated "not yet debuginfo-enabled" warnings 2011-02-05 04:11:46 +03:00
Alexey Tourbin
e061586385 build/files.c (finalizePkg): calculate RPMTAG_SIZE after optimizations
Note that checkHardLinks function is now removed.  It was unclear
whether it was supposed to verify %lang attributes (returning non-zero
on error) or indicate if all hardlinks are packaged within the package.

It turns out that only a single package in our repo has
PartialHardlinkSets dependency:

$ cd /ALT/Sisyphus/files/x86_64/RPMS/
$ rpm -qp --qf '[%{NAME}\t%{REQUIRENAME}\n]' *.rpm |fgrep 'PartialHardlinkSets'
$ cd /ALT/Sisyphus/files/noarch/RPMS/
$ rpm -qp --qf '[%{NAME}\t%{REQUIRENAME}\n]' *.rpm |fgrep 'PartialHardlinkSets'
freeciv-common  rpmlib(PartialHardlinkSets)
$

This probably means that freeciv-common has hardlinks with different
%lang attributes (which probably was supposed to be an error).  So
the whole issue should be reconsidered.  A leave XXX marks in the
code and suggest new PartialHardlinkSets implementation (however,
the dependency is not being added yet).
2011-02-05 03:49:54 +03:00
Alexey Tourbin
91656ccf79 brp-debuginfo: hopefully fixed hardlink support
Note that 'sh -e' mode is unreliable when the last pipeline command
is non-simple command (such as while loop).  So the script was somehow
failing on hardlinks and it went unnoticed.  I choose to replace
pipe-to-while with a temporary file for now.
2011-02-05 01:27:25 +03:00
Alexey Tourbin
614b27b4d1 brp-debuginfo: added /usr/src to prune_paths 2011-02-05 01:27:23 +03:00
Alexey Tourbin
a6c78a83c9 build/interdep.c: prune extra deps between dependent subpackages
When pkg1 has strict dependency on pkg2, all other non-strict/virtual
dependencies on pkg2 will be reaped off pkg1.  Note that the are subtle
cases: though I try to make something about merging dependency flags,
it is not always possible, as the dependency on pkg2 can be obtained
via a transitive chain.  I see this being a non-critical issue which
is worthwhile to be mentioned.
2011-02-05 01:26:16 +03:00
Alexey Tourbin
e81ad7e376 build/interdep.c (liftDebuginfoDeps): social lift for debuginfo
Basically, if pkg1 has strict dependency on pkg2, the question
is whether pkg1-debuginfo should possess a strict dependency on
pkg2-debuginfo.  The answer is "yes" provided that pkg1-debuginfo
is already dependent on pkg2-debuginfo (i.e. has new soname-based
debuginfo dependencies resolved to pkg2-debuginfo).  This provides
an opportunity for dependency optimization between dependend
debuginfo subpackages.
2011-02-04 23:45:01 +03:00
Alexey Tourbin
43261c6111 build/interdep.c (processDependentDebuginfo): factored from pruneDebuginfoSrc 2011-02-04 02:56:14 +03:00
Alexey Tourbin
83147e6c03 implemented debuginfo.req and debuginfo.prov 2011-02-04 02:55:25 +03:00
Alexey Tourbin
140d6de605 build/interdep.c: do not propagate self-Requires 2011-02-03 23:10:49 +03:00
Alexey Tourbin
abc7218045 platform.in: added %brp_strip_debug and %brp_strip_none macros 2011-02-03 11:52:06 +03:00
Alexey Tourbin
845fefb64f brp-debuginfo: recognize $RPM_BRP_STRIP_DEBUG and $RPM_BRP_STRIP_NONE
This finally provides missing strip controls.  Note that even with
STRIP_NONE, the file will be edited with debugedit.  So there is no
way to bypass brp-debuginfo completely (and maybe we should tolerate
debugedit failures with STRIP_NONE).  But there is also an advantage:
/usr/src/debug sources will be installed even for non-stripped files!
This is why sources are now associated with .debuginfo/src/"$f"
instead of .debuginfo/src/"$debugf".
2011-02-03 11:30:45 +03:00
Alexey Tourbin
61736ed63a build/pack.c: recognize %_debuginfo_payload macro 2011-02-03 09:33:28 +03:00
Alexey Tourbin
f90e69d3f1 find-debuginfo-files: create /usr/lib/debug/.build-id/ links
It might seem that build-id links should be created in brp-debuginfo.
However, there are corner cases: in brp-debugino, it is not yet known
which files are going to be packaged.  This might be a problem when a
few identical files or hardlinks are created under buildroot: it is
possible create a symbolic link to a "wrong" file which will not be
packaged.

The solution is create build-id links in find-debuginfo-files: the link
will point to the first packaged file with the given build-id.  However,
note that find-debuginfo-files is not part of the install stage, and
should remain "reenterable" (so that e.g. rpm -bl can be executed
multiple times).  This means that the script should not make assumptions
whether the links have already been created.
2011-02-03 09:07:54 +03:00
Alexey Tourbin
3132ca2851 4.0.4-alt100.15
- build/files.c (runPkgScript): New helper function for autodep-like scripts.
- build/files.c (makeDebugInfo): Implemented automatic *-debuginfo packages.
- find-debuginfo-files: Initial revision, makes *-debuginfo %files list.
- GROUPS: added Development/Debug.
- build/interdep.c: Initial revision, inter-package analysis and optimizations.
- build/interdep.c: Prune /usr/src/debug dups among dependent subpackages.
2011-01-31 07:34:46 +03:00
Alexey Tourbin
2e38d0ef4c build/interdep.c: prune debuginfo src dups, Vierter und letzter Theil 2011-01-31 06:22:29 +03:00
Alexey Tourbin
31fc3dcd6f build/interdep.c: prune debuginfo src dups, part 3 - directories 2011-01-31 06:22:28 +03:00
Alexey Tourbin
c7567ffb9a build/interdep.c: prune debuginfo src dups, part 2
The output now is like this:
removing 12 sources from rpm-debuginfo and adding dependency on librpm-debuginfo
removing 11 sources from rpm-debuginfo and adding dependency on librpmbuild-debuginfo
removing 13 sources from rpm-build-debuginfo and adding dependency on rpm-debuginfo
removing 14 sources from rpm-static-debuginfo and adding dependency on rpm-debuginfo
removing 20 sources from librpmbuild-debuginfo and adding dependency on librpm-debuginfo
removing 13 sources from rpm-build-debuginfo and adding dependency on librpm-debuginfo
removing 80 sources from rpm-static-debuginfo and adding dependency on librpm-debuginfo
removing 12 sources from python-module-rpm-debuginfo and adding dependency on librpm-debuginfo
removing 12 sources from rpm-build-debuginfo and adding dependency on librpmbuild-debuginfo
removing 35 sources from rpm-static-debuginfo and adding dependency on librpmbuild-debuginfo
2011-01-31 06:22:25 +03:00
Alexey Tourbin
e00c43536c build/interdep.c: prune debuginfo src dups, part 1
The output is like this:
remove sources from rpm-debuginfo because it requires librpm-debuginfo
remove sources from rpm-debuginfo because it requires librpmbuild-debuginfo
remove sources from rpm-build-debuginfo because it requires rpm-debuginfo
remove sources from rpm-static-debuginfo because it requires rpm-debuginfo
remove sources from librpmbuild-debuginfo because it requires librpm-debuginfo
remove sources from rpm-build-debuginfo because it requires librpm-debuginfo
remove sources from rpm-static-debuginfo because it requires librpm-debuginfo
remove sources from python-module-rpm-debuginfo because it requires librpm-debuginfo
remove sources from rpm-build-debuginfo because it requires librpmbuild-debuginfo
remove sources from rpm-static-debuginfo because it requires librpmbuild-debuginfo
2011-01-31 06:22:11 +03:00
Alexey Tourbin
2213cb3f56 build/interdep.c: propagate dependencies 2011-01-31 04:54:22 +03:00
Alexey Tourbin
2c673900ce build/interdep.c: initial revision 2011-01-31 04:53:26 +03:00