Commit Graph

22 Commits

Author SHA1 Message Date
56e441c403 rpmio+pack: Update rpmio_flags 'T' with actual threads used
Useful information for debugging liblzma memory issues.

Reviewed-by: Arseny Maslennikov <arseny@altlinux.org>
Reviewed-by: Dmitry V. Levin <ldv@altlinux.org>
2021-01-16 03:16:55 +03:00
b6d1778c72 pack.c: print payload compression string
Given that downgradeLzmaLevel can change the payload compression,
it's useful to have this diagnostics in the output produced by rpmbuild.
2020-12-19 22:43:47 +00:00
Alexey Tourbin
b295de5893 pack.c: downgrade XZ->LZMA automatically for small payloads
Recent changes left downgradeLzmaLevel dysfunctional (because it does
not recognize 'T').  In my view, the only advantage of XZ over LZMA is
that XZ can can split input into blocks and compress them in parallel
(resulting in a speed-up).  Other advantages, such as a checksum, are
immaterial for our purpose (because the package manager must verify the
integrity of a package beforehand).  Therefore, downgradeLzmaLevel will
also downgrade XZ->LZMA automatically, for payloads smaller than
5*dictSize (the default blockSize being 3*dictSize, so that there are
at least two blocks, the second block not too small).
2020-12-19 22:43:47 +00:00
d304554617 packageSources: override RPMTAG_BUILDTIME with $SOURCE_DATE_EPOCH
When hasher generates an src.rpm from pkg.tar, it sets $SOURCE_DATE_EPOCH
according to pkg.tar's specfile modification time which in turn is set to
the corresponding commit time.

When hasher builds from an src.rpm, it sets $SOURCE_DATE_EPOCH according
to the src.rpm's RPMTAG_BUILDTIME.

This changes helps to connect these two stages, setting the
RPMTAG_BUILDTIME of the generated src.rpm to $SOURCE_DATE_EPOCH.

Co-Authored-by: Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
2020-04-21 15:54:47 +00:00
Ivan Zakharyaschev
6be20da468 headerNVR() replaced by the new header{NVRD,Name{,Version}}() in trivial cases
These are the cases where even the release was not needed (so, the
disttag is not needed, too), or one case where the filename is
contructed (and it doesn't include the disttag).

Now grep -Ee 'headerNVR[^D]' will show the remaining non-trivial
cases, where adapting to disttags may be needed.
2019-02-26 23:16:13 +03:00
Alexey Tourbin
72ad101add 4.0.4-alt113
- Implemented limited support for large files: a 2GB+ file can now be packaged,
  but the total size of uncompressed cpio payload is capped at 4 GB.
- Automatically downgrade LZMA compression levels 7-9 -> 6 on small payloads.
2018-06-26 13:03:42 +03:00
Alexey Tourbin
3df35b4d63 build/pack.c: automatically downgrade lzma levels 7-9 on smaller inputs 2018-06-26 12:42:44 +03:00
Alexey Tourbin
d85641818b build/pack.c: pre-calculate cpio archive size, fail gracefully on >= 4G
The nearest goal is to be able to package files up to 4G, on both 32-bit
64-bit architectures, provided that cpio payload size also does not
exceed 4G.  More specifically, the limit is 2^32-2, while 2^32-1 remains
special (this is not my own invention, I adopt it from rpm.org).

If the limit is exceeded, rpmbuild should fail gracefully instead of
writing malformed packages with truncated integer tags.

(Supporting 4G+ files is a distant goal - neither rpm-4.0 nor apt-rpm
can handle them yet.  Besides, it's not clear if producing such big
packages is even a good idea, unless one wishes to package p0rn.)
2018-06-26 12:42:44 +03: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
Alexey Tourbin
61736ed63a build/pack.c: recognize %_debuginfo_payload macro 2011-02-03 09:33:28 +03:00
Alexey Tourbin
7407fd6de4 pack.c, rpmlibprov.c: updated for xz compression 2009-09-24 12:35:43 +04:00
Alexey Tourbin
2b87185206 pack.c: disabled versioning for rpmlib(PayloadIsBzip2) and rpmlib(PayloadIsLzma) dependencies 2009-06-17 06:34:49 +04:00
Alexey Tourbin
23317f11b7 removed _noDirTokens (producing legacy filelist format)
Some code (e.g. apt/genpkglist) explicitly relies on the fact that
header file list is represented with baseNames+dirNames+dirIndexes
arrays.  Thus, generating legacy headers might have issues, and should
be disabled.
2009-06-17 06:32:18 +04:00
Alexey Tourbin
9814453966 backported LZMA payload compression from SuSE 2008-05-24 13:47:41 +04:00
4086557633 fixed rpmExpand usage 2005-09-29 16:01:17 +00:00
ce8ad9b9f0 fix rpmExpandNumeric handling 2005-09-29 15:46:13 +00:00
58e1dad6cc fixed compilation warnings 2003-11-24 18:59:03 +00:00
26732ecd95 packageSources: MkdirP %_srcrpmdir 2003-09-12 17:22:05 +00:00
569410371a used MkdirP 2002-08-29 15:00:42 +00:00
af0e6ef16a Support setting the BuildHost tag explicitly rather than only from what the kernel thinks the system's hostname is (Owl). 2002-06-13 11:28:05 +00:00
dee952c2f8 sync with rpm4 branch: include local headers 2002-03-25 22:02:39 +00:00
82a4763c66 Initial revision 2002-03-25 20:16:26 +00:00