Commit Graph

1334 Commits

Author SHA1 Message Date
389d7864cf build/files.c, lib/signature.c: Do not include unused md5.h
(cherry picked from commit fe6df19341)
2008-11-12 05:29:08 +03:00
Alexey Tourbin
f7593429ff posttrans-filetriggers: minor changes 2008-11-12 05:10:51 +03:00
Alexey Tourbin
bd1897e46c psm.c (psmTriggerPosttrans): do not set RPM_INSTALL_ARG1 and RPM_INSTALL_ARG2 2008-11-12 05:10:51 +03:00
Alexey Tourbin
b97cda599e 0ldconfig.filetrigger: simplified system library check 2008-11-12 05:10:51 +03:00
Alexey Tourbin
a70594a4a3 0ldconfig.filetrigger: execute "/sbin/update_chrooted lib" for /lib and /lib64 2008-11-12 05:10:51 +03:00
Alexey Tourbin
639f3382c9 0ldconfig.filetrigger: new script 2008-11-12 05:10:51 +03:00
Alexey Tourbin
ed6095e54a posttrans-filetriggers: better description 2008-11-12 05:10:11 +03:00
Alexey Tourbin
5fffe7272e psm.c (saveTriggerFiles): don't write filenames with '\n' character 2008-11-12 05:10:11 +03:00
Alexey Tourbin
4ada155008 implemented posttrans filetriggers, vaguely based on Mandriva patch 2008-11-12 05:10:11 +03:00
Alexey Tourbin
b51c799f6b 4.0.4-alt95.M41.6
- improved install/upgrade package reordering (in tsort algorithm,
  changed "presentation order" to "chainsaw order")
2008-11-10 05:44:13 +03:00
Alexey Tourbin
0d6020f2bf 4.0.4-alt77.M40.5
- improved install/upgrade package reordering (in tsort algorithm,
  changed "presentation order" to "chainsaw order")
2008-11-10 05:30:09 +03:00
Alexey Tourbin
b8767dceb1 depends.c: disabled tsort presentation order
This should facilitate library upgrades, e.g. glibc-prthread.
Consider that we upgrade gcc-* and glibc-* packages; and glibc
has new subpackage glibc-pthread (with libpthread and librt
shared libraries).

Old order was:
D: ========== tsorting packages (order, #predecessors, #succesors, tree, depth)
D:     0    0   14    0    0  glibc-preinstall-2.8.90-alt3
D:     1    1   21    0    1    glibc-core-2.8.90-alt3
D:     2    1    9    0    2      cpp4.3-4.3.2-alt5
D:     3    1    5    0    2      libgcc4.3-4.3.2-alt5
D:     4    2   13    0    3        glibc-pthread-2.8.90-alt3
D:     5    2   20    0    4          glibc-core-debug-2.8.90-alt3
D:     6    2   17    0    4          glibc-gconv-modules-2.8.90-alt3
D:     7    2   16    0    4          glibc-locales-2.8.90-alt3
D:     8    2   15    0    4          glibc-nss-2.8.90-alt3
D:     9    2   12    0    4          glibc-timezones-2.8.90-alt3
D:    10    2   11    0    4          glibc-utils-2.8.90-alt3
D:    11    2   10    0    5            iconv-2.8.90-alt3
D:    12    8   22    0    6              glibc-2.8.90-alt3
D:    13    4   19    0    7                glibc-devel-2.8.90-alt3
D:    14    1   18    0    8                  glibc-devel-static-2.8.90-alt3
D:    15    4    8    0    8                  gcc4.3-4.3.2-alt5
D:    16    1    4    0    2      libgfortran4.3-4.3.2-alt5
D:    17    2    3    0    3        libgfortran4.3-devel-4.3.2-alt5
D:    18    3    6    0    4          gcc4.3-fortran-4.3.2-alt5
D:    19    2    2    0    3        libstdc++4.3-4.3.2-alt5
D:    20    2    1    0    4          libstdc++4.3-devel-4.3.2-alt5
D: ========== successors only (presentation order)
D:    21    3    7    0    5            gcc4.3-c++-4.3.2-alt5

Note that #succesors value is actually changed using the package index
in the input list of packages (on the command line): earlier packages
have higher values.  This is called "successors from tsort are processed
in presentation order".  E.g. when choosing to upgrade between cpp4.3,
libgcc4.3, and libgfortran4.3, cpp4.3 gets upgraded first.  (The
collation is probably due to using shell glob on the command line.)

The problem is that, in cpp4.3 %post-script, some pthread-dependent
code might be called, and pthread shared library is simply mssing
at that point (after glibc-core upgrade and before glibc-pthread
install).

New order is:
D: ========== tsorting packages (order, #predecessors, #succesors, tree, depth)
D:     0    0    1    0    0  glibc-preinstall-2.8.90-alt3
D:     1    1   17    0    1    glibc-core-2.8.90-alt3
D:     2    1    3    0    2      libgcc4.3-4.3.2-alt5
D:     3    2    8    0    3        glibc-pthread-2.8.90-alt3
D:     4    2    2    0    4          glibc-gconv-modules-2.8.90-alt3
D:     5    2    2    0    4          glibc-nss-2.8.90-alt3
D:     6    2    1    0    5            iconv-2.8.90-alt3
D:     7    2    1    0    4          glibc-locales-2.8.90-alt3
D:     8    2    1    0    4          glibc-timezones-2.8.90-alt3
D:     9    2    1    0    4          glibc-utils-2.8.90-alt3
D:    10    8    1    0    5            glibc-2.8.90-alt3
D:    11    4    4    0    6              glibc-devel-2.8.90-alt3
D:    12    2    1    0    3        libstdc++4.3-4.3.2-alt5
D:    13    2    1    0    4          libstdc++4.3-devel-4.3.2-alt5
D:    14    1    1    0    2      cpp4.3-4.3.2-alt5
D:    15    4    2    0    3        gcc4.3-4.3.2-alt5
D:    16    1    1    0    2      libgfortran4.3-4.3.2-alt5
D:    17    2    1    0    3        libgfortran4.3-devel-4.3.2-alt5
D: ========== successors only (presentation order)
D:    18    2    0    0    4          glibc-core-debug-2.8.90-alt3
D:    19    1    0    0    7                glibc-devel-static-2.8.90-alt3
D:    20    3    0    0    4          gcc4.3-fortran-4.3.2-alt5
D:    21    3    0    0    4          gcc4.3-c++-4.3.2-alt5

Note that #succesors now indicates the number of immediate successors;
libgcc4.3 now has 3 immediate successors (glibc-pthread, gcc4.3, and
libstdc++4.3), while cpp4.3 and libgfortran4.3 have only one immediate
successor.

Also removed tools/rpmsort.c.

> The are various serial representations of a partially ordered set.
>
> The default is what I call "chainsaw", always emit the node that has
> the most children.  The "chainsaw" heuristic tries to emit nodes that
> are depended upon as early as possible to localize interactions
> amongst packages, but really should be
>     Always emit the node of the largest sub-tree.
> rather than the number of immediate children. I call this "buzzsaw".
>
> Anaconda has the constraint of changing cd's during install. So
> "presentation" ordering preserves the arrival ordering into a
> transaction set. Too bad that "presentation" ordering is often
> incorrect because of no loop analysis first.

https://lists.dulug.duke.edu/pipermail/rpm-devel/2005-June/000468.html
2008-11-10 05:21:23 +03:00
Alexey Tourbin
4f75dd558d 4.0.4-alt95.M41.5
- build/reqprov.c: when folding duplicate dependencies, Requires(pre)
  or Requires(post) should not opimitze out bare Requires
- build/files.c: execute find-requires before find-scriptlet-requires
- 0common-files.req.list: added /etc/rc.d/init.d (service)
2008-10-06 09:57:01 +04:00
Alexey Tourbin
bcb791335c 0common-files.req.list: added /etc/rc.d/init.d (service) 2008-10-06 09:55:35 +04:00
Alexey Tourbin
6bb8647870 build/files.c: execute find-requires before find-scriptlet-requires 2008-09-22 18:59:26 +00:00
Alexey Tourbin
0d54c4a6f0 4.0.4-alt95.M41.4+
- build/reqprov.c: when folding duplicate dependencies, Requires(pre)
  or Requires(post) should not opimitze out bare Requires
2008-09-22 18:56:46 +00:00
Alexey Tourbin
216ac45267 4.0.4-alt77.M40.4
- build/reqprov.c: when folding duplicate dependencies, Requires(pre)
  or Requires(post) should not opimitze out bare Requires
2008-09-22 18:52:58 +00:00
Alexey Tourbin
f5c325744d reqprov.c: Requires(post) should not optimize out bare Requires
Both "Requires(post): foo" and "Requires: foo" should be kept.
The first dependency is only for %post-script: after the package
is installed, rpm allows to remove "foo" (though apt-get does not).

This is only a quick fix, perhaps the code should be rewritten.
For instance, if with have both "Requires(pre): foo" and
"Requires(post): foo", those can be folded into single
"Requires(pre,post): foo".
2008-09-22 10:34:53 +00:00
Alexey Tourbin
3b148e0821 shebang.req: fixed typo in description, spotted by Slava Semushin 2008-09-16 15:20:36 +04:00
Alexey Tourbin
f444e26e8e 4.0.4-alt95.M41.4
- build/spec.c: don't allow multiple definition of PatchX or SourceX
  (Jindrich Novy, rhbz#458261, rhbz#458260)
2008-09-16 11:09:57 +04:00
Alexey Tourbin
b81db19611 4.0.4-alt77.M40.3
- build/spec.c: don't allow multiple definition of PatchX or SourceX
  (Jindrich Novy, rhbz#458261, rhbz#458260)
2008-09-16 11:02:21 +04:00
Panu Matilainen
52f50790ff Add parenthesis to make gcc happy 2008-09-15 14:17:37 +04:00
Jindrich Novy
33a4004746 Don't allow multiple definition of PatchX or SourceX (rhbz#458261, rhbz#458260) 2008-09-15 14:17:34 +04:00
Alexey Tourbin
c9b90976f3 4.0.4-alt95.M41.3
- shebang.req: check for trailing <CR> in interpreter path or name;
  also, validate argc, since neither execve(2) nor env(1) split arguments
2008-09-14 13:18:14 +04:00
Alexey Tourbin
d0c2f92f05 shebang.req: validate argc and <CR>
1) In Linux, execve(2) does not split shebang arguments, which implies
that effectively only one argument can be passed to the interpreter.
However, some interpreters, esp. perl, can do a magic here, which is
to split its arguments.

2) Neither /usr/bin/env can split arguments, and no magic is possible
at all.

3) Interpreter path (or name) must not end with <CR>, otherwise execve
(resp. /usr/bin/env) is deemed to fail.  However, some interpreters,
esp. perl, can strip trailing <CR> in its command line options.
2008-09-14 13:17:22 +04:00
Alexey Tourbin
fc4a3e85ed 4.0.4-alt95.M41.2
- find-package: updated check for file path components being alternatives
2008-08-20 00:00:10 +04:00
Alexey Tourbin
b46be108bd find-package: updated check for file path components being alternatives 2008-08-19 23:58:39 +04:00
c8694a9dd7 4.0.4-alt95.M41.1
- %_rpmlibdir/macros: enabled gzip payload compression (w9.gzdio) by default.
2008-07-29 16:29:01 +00:00
9ae2efc524 Revert "macros.in: use w2.lzdio for both %_source_payload and %_binary_payload"
This reverts commit 1c3db84b5f.
2008-07-29 16:26:13 +00:00
Alexey Tourbin
eb4af40306 4.0.4-alt96
- lib.req: use CanonPath() to deal with RPATH like $ORIGIN/../lib
- fixup-{libtool,pkgconfig}: quote substitution text (Dmitry V. Levin, #11437)
- pdeath_execute.c: remove X_OK check, use execvp(3)
- rpm: in %post-script, remove /var/cache/apt/*.bin
2008-07-20 16:31:19 +04:00
77a7f3cc55 Merge branch 'altlinux-4.0'
Conflicts:

	rpm-4_0.spec
2008-07-08 17:57:45 +00:00
b1b00af474 4.0.4-alt77.M40.2
- spec: In %post-script, removed /var/cache/apt/*.bin (Alexey Tourbin).
- pdeath_execute.c: Removed X_OK check, use execvp(3) (Alexey Tourbin).
- fixup-libtool, fixup-pkgconfig: Quote substitution text (Closes: #11437).
- build/files.c: Re-fixed RPMTAG_SIZE calculation (Alexey Tourbin. Closes: #2634).
- parseSpec.c: Fixed duplicating 'rpmbuild -bE' output
  (Kirill Shutemov, Alexey Tourbin. Closes: #5662).
- parsePreamble.c, parseSpec.c: Allow noarch subpackages (Alexey Tourbin).
- rpmrc.c: Added more modern CPU models (Alexey Tourbin, me).
- rpmio.c: Implemented cpio hints for rsyncable_gzwrite() (Alexey Tourbin).
- rpmio.c: Deal with partial rsyncable_gzwrite() return (Alexey Tourbin).
- rpmio.c: Implemented rscynable_gzwrite() (Alexey Tourbin).
- rpmio.c: Introduced rpmGZFILE wrapper for gzdio (Alexey Tourbin).
- scripts/rpm2cpio.sh: Deal with decompressors (Alexey Tourbin).
- spec: Added _binary_payload w9.gzdio (Alexey Tourbin).
- Plugged a memleak in lzclose() (Panu Matilainen).
- Backported LZMA payload compression from SuSE (Alexey Tourbin).
- rpmReadPackageManifest: Fix comments handling.
- files.c (addFile): Check that each intermediate path component
  is a directory (not symlink) (Alexey Tourbin).
- files.c (addFile): File path must be canonical (Alexey Tourbin).
- files.c (addFile): Reassure that file path starts with '/' (Alexey Tourbin).
- files.c (addFile): File path must match buildroot (Alexey Tourbin).
- spec: Removed 'BuildConflicts: rpm-devel' (Alexey Tourbin).
- relative: Fixed potential NULL dereference (Closes: #14067).
- platform.in (%__autoreconf): Added deprecation warning.
- platform.in: Added %warning() macro.
- platform.in: Added %autoreconf macro (Closes: #13925).
- relative.c: Changed to use heap for memory allocation, fix normalize(), cleanup.
- relative.c: Fixed an off-by-one (kind of) error. (Alex Myltsev).
- Added armv5tejl support (Kirill Shutemov).
- rpmrc.in: Removed -fsigned-char from optflags for arm* (Kirill Shutemov).
- Refresh ARM support (Kirill Shutemov).
- Do not check STACK entry in ARM ELF files (Kirill Shutemov).
- More %_target_platform tweaks: cleanup build_os filter; initialize
  %_gnueabi; replace %_gnu with %_gnueabi in %_target_platform.
- %_gnu appended to %_target_platform (Kirill Shutemov).
2008-07-08 14:45:31 +00:00
Alexey Tourbin
5165ed5fd0 spec: in %post-script, remove /var/cache/apt/*.bin
Note that I exepect pdeath_execute to use execvp(3).
2008-07-08 14:39:34 +00:00
Alexey Tourbin
c23e7c1c58 pdeath_execute.c: remove X_OK check, use execvp(3)
Both (F_OK|X_OK) cannot be tested at the same time, which means that
X_OK is X_OK for directories, too.  And anyway there's a huge period
of time between X_OK test and exec.  So I remove the test which cannot
be performed reliably.  As a bonus, I also replace execv() with execvp().
2008-07-08 14:39:01 +00:00
af29ee4d70 fixup-libtool, fixup-pkgconfig: Quote substitution text (ALT#11437) 2008-07-07 22:07:40 +00:00
Alexey Tourbin
b44bb8cb15 spec: in %post-script, remove /var/cache/apt/*.bin
Note that I exepect pdeath_execute to use execvp(3).
2008-07-07 06:15:21 +04:00
Alexey Tourbin
312c51d845 pdeath_execute.c: remove X_OK check, use execvp(3)
Both (F_OK|X_OK) cannot be tested at the same time, which means that
X_OK is X_OK for directories, too.  And anyway there's a huge period
of time between X_OK test and exec.  So I remove the test which cannot
be performed reliably.  As a bonus, I also replace execv() with execvp().
2008-07-07 05:33:00 +04:00
Alexey Tourbin
362a93334a lib.req: use CanonPath() to deal with RPATH like $ORIGIN/../lib 2008-07-07 02:23:34 +04:00
Alexey Tourbin
ba650c669c 4.0.4-alt95
- build/files.c: re-fixed RPMTAG_SIZE calculation (cf. #2634)
- files.req: implemented modular /usr/lib/rpm/*-files.req.list,
  for dependencies on directories
2008-06-24 14:07:31 +04:00
Alexey Tourbin
9b88480ee9 Merge branch 'altlinux-4.0' 2008-06-22 16:20:33 +04:00
Alexey Tourbin
571a12cbdd files.req: added description and copyright 2008-06-22 11:52:53 +04:00
Alexey Tourbin
92b666e6b3 0common-files.req.list: added package names (for ownership check) 2008-06-22 10:48:19 +04:00
Alexey Tourbin
58382849a2 rpm-build.buildreq: added /usr/lib/rpm/*-files.req.list 2008-06-17 13:19:47 +04:00
Alexey Tourbin
dae2eb7249 files.req: reserve second field in *-files.req.list for owner package name 2008-06-17 08:05:10 +04:00
Alexey Tourbin
faeab68da2 build/files.c: re-fixed RPMTAG_SIZE calculation (cf. #2634) 2008-06-17 05:56:35 +04:00
Alexey Tourbin
96f8c331e6 Revert "fixed RPMTAG_SIZE calculation"
This reverts commit 62c081a169.
2008-06-17 04:54:46 +04:00
Alexey Tourbin
c4f579077e files.req: modular /usr/lib/rpm/*-files.req.list with longest match 2008-06-16 13:05:37 +04:00
ace47d0fd2 build/parseSpec.c (readLine): Fix chomp in preprocess mode 2008-06-15 08:43:51 +00:00
Alexey Tourbin
85bb55e8dd spec: forgot to mention `rpmbuild -bE' fix in alt94 changelog entry 2008-06-15 06:36:00 +04:00
Alexey Tourbin
5435ccd10b 4.0.4-alt94
- %_rpmlibdir/macros: enabled LZMA payload compression (w2.lzdio) by default
- parsePreamble.c, parseSpec.c: allow "BuildArch: noarch" subpackages
- psm.c: fixed chown attempts for src.rpm introduced in alt93
- psm.c: also, when installing src.rpm, drop suid/sgid bits
- rpmrc.c: recognize new Intel CPUs (Dmitry V. Levin)
- rpmrc.c: classify SSE2-capable Intel CPUs as "pentium4"
- find-package: corrected host-system lookup for commands
2008-06-15 01:02:21 +04:00