RPM 4.16.0 BETA1 Release Notes (DRAFT)

Download information

Summary of changes from RPM 4.15.x

General bugfixes and enhancements

  • Clarify rpm license wrt rpmio/ sub-directory (#516)
  • Add man pages for all plugins and rpm2archive (#1016)
  • Multiple documentation updates

Command line

  • Add –salvagedb option to rpmdb utility (ndb only for now)
  • Add –rpmv3 option to rpmsign to force rpm v3 header+payload signatures
  • Fix spec queries having side-effects on global macro state
  • Remove –sign option from rpmbuild (#153)
  • Remove –nopromote option

Transactions

  • Add automatic SSD detection and optimization (on Linux)
  • Fix ordering ignoring dependencies in some qualifier combinations (#1030)
  • Clarify the disk space problem messages (#879, RhBug:…, SuseBug:…, …)

Database

  • Fix rpmdb_dump and rpmdb_load utilities being BDB specific
  • Fix confusing message on –rebuilddb to a new backend
  • Fix regression on v3 package handling on database rebuild
BDB
  • Add independent implementation of read-only BDB support (experimental)
  • Remove Berkeley DB-specific helper scripts
  • Deprecate the Berkeley DB backend
LMDB
  • Remove experimental LMDB backend as unsuccessful
NDB
  • Add automatic regeneration of out-of-sync indexes
  • Fix rpmdb getting only partially initialized in some scenarios
  • Fix queries on ndb database on read-only media
  • Fix various corner-case bugs in ndb
  • Fix indexes not getting synced on empty database rebuild
  • Fix databases always mapped as read-write
  • Promote out of experimental status
Sqlite
  • Add new SQLite based database backend (experimental)

Package building

  • Add support for parallel processing in brp-strip
  • Add –reject to autosetup git and git_am to assist with modifying patches
  • Add %arm32, %arm64 and %riscv macros for arch tests in specs
  • Add automatic, secure buildroot clean and creation in %install
  • Add support for meta dependencies (eg Requires(meta): somepkg) that do not affect install/erase ordering (RhBug:1648721)
  • Fix file coloring relying on unreliable libmagic classification
  • Fix file classification errors getting stored in headers instead of stopping the build (eg symlink loops)
  • Fix parallel processing of file classification (regression in 4.15.1)
  • Fix zstd compressed man/info pages not getting recompressed
  • Fix setting build date from %changelog regression (#932)
  • Optimize package generation order for better parallelism

Spec

  • Remove support for bare words in expressions (eg a == b needs to be “a” == “b” now)

Macros

  • Add consistent argument checking to built-in macros
  • Add various missing error messages
  • Add (internal) support for literal macros, ie whose body does not expand
  • Add built-in %{macrobody:...} macro to retrieve the literal body of a macro (#582)
  • Fix double-expansion on built-in macros (#313)
  • Fix handling of paths with ‘%’ signs in %{uncompress:..}
  • Fix zstd compression detection in %{uncompress:...}
  • Fix buffer overflow in %{S:...} and %{P:...} macros (#1019)
  • Remove support for useless %{F:...} built-in macro

Expressions (spec and macros)

  • Add support for ternary operator in expression parser (eg %{expr:1==0?"yes":"no"}, also %[1==0?"yes":"no"])
  • Add support for primary expansion in expression parser as %[...] syntax, in which case possible macros are expanded when evaluating the terms, which differs from %{expr:...} where macros are evaluated first.
  • Add support for short-circuit for logical and ternary operators (eg %[0 && 1 / 0] expands to 0 instead of division by zero error)
  • Add support for not operator on arbitrary items (eg !"%?foo")
  • Add native support for version comparison in expressions via v”…” strings (eg %if v"%{python_version}" < v"3.9" but also cli and arbitrary macros %[v"1:1.2" < v"2.0"])
  • Change || and && operators to return last evaluated term instead of a boolean (eg %[2 || 3] expands to 2, similar to Perl/Python/Ruby)

Buildroot policies

  • Multiple portability fixes

Generators

  • Add support for parametric macro generators
  • Add support for file classification by MIME type (#1097)
  • Add dependencies for OCaml CMX files (#913)
  • Fix perl HEREDOC generating provides (#1106)
  • Numerous improvements and fixes to Python dist generator
  • Convert several generators to parametric macros for speed

Debuginfo

  • Optimize %dir generation
  • Fix corner-case corruption with a manually specified debuginfo package

Package format

  • Add an alternative (uncompressed) payload digest to packages
  • Add NEVR provides for all packages that would be built into source rpms

Signatures and keys

  • Add verify support for alternative signatures and digests
  • Fix package signing regression on some non-rpm.org built packages (#1002)
  • Drop RPM v3 header+payload signatures by default, where possible (#863)

Plugins

  • Fix dlsym() appearing to fail due to unrelated errors
  • Fix spurious error message from lsetfilecon() on filesystems which do not support SELinux (RhBug:1777502)
  • Fix inconsistent and invalid handling of setexecfilecon() failures

Python bindings

  • Add license information to disutils module description (#1236)
  • Add support for EVR strings as arguments to rpm.labelCompare() function
  • Add bindings for the new rpm version API (rpm.ver type objects)
  • Remove obsolete rpm.setEpochPromote() function
  • Remove support for Python 2. Minimum required version is Python 3.1.

Lua interface

  • Fix rpm.vercmp() to compare full EVR values instead of segments (#897)

Removed features

  • Remove experimental LMDB backend as unsuccessful

Deprecated features

  • Deprecate RPM v3 support, visibly (#1007)
  • Deprecate Berkeley DB backend (%db_backend bdb)
  • Deprecate beecrypt and NSS crypto backends

API changes

Added APIs

  • Add rpmdbIndexKeyIteratorInit() for key-only rpmdb index iterator
  • Add rpmPushMacroFlags() for finer control over macro definitions
  • Add rpmExprBoolFlags() and rpmExprStrFlags() for finer control expression parsing
  • Add rpmMacroIsDefined() and rpmMacroIsParametric() for determining whether a macro is defined and whether it is parametric
  • Add rpmdbStat() and rpmdbFStat() for a database backend agnostic way of obtaining information on rpmdb
  • Add API for rpm version parsing and comparison: rpmverParse(), rpmverNew(), rpmverFree(), rpmverEVal(), rpmverE(), rpmverV(), rpmverR(), rpmverEVR(), rpmverCmp() and rpmverOverlap() to librpmio

Changed APIs

  • Change rpmSignArgs signfiles member to a generic flags bitfield
  • Change rpmfiArchiveRead() return type to ssize_t
  • Incapacitate epoch promotion facilities: _rpmds_nopromote value, rpmdsSetNoPromote() and “nopromote” argument to rpmdsAnyMatchesDep() and rpmdsNVRMatchesDep() functions have no effect

Removed APIs

  • N/A

Internal improvements and cleanups

  • Add support for DSA2 (gcrypt) and EdDSA
  • Fix headerExport() modifying the exported header struct
  • Fix various memory and other resource leaks
  • Fix libgcrypt initialization to be thread-safe (#968)
  • Fix negative values in _flush_io and _minimize_writes enabling them
  • Localize chroot in/out operations
  • Improve database backend detection and configuration
  • Optimize dependency checking, rpm -Va in particular
  • Optimize and clean up fingerprinting
  • Remove uses of obsoleted POSIX APIs
  • Refactor Python labelCompare() and rpmdsCompare() to use the new version API
  • Move rpmvercmp() from librpm to librpmio

Build process

  • Add numerous new testcases
  • Add “ci” make target for easy local running (with podman)
  • Fix CI distro version floating over time
  • Fix some cases where host configuration affects testsuite results (#1002)
  • Fix build without Berkeley DB
  • Fix sepdebugcrcfix compilation on platforms without MAP_POPULATE
  • Fix libcrypt detection to use pkg-config when possible
  • Fix various libelf-related conditional compilation issues
  • Update used gettext version to 0.18.2
  • Change default crypto library to libgcrypt
  • Optimize CI
  • Build system cleanup, remove obsolete checks etc

Compatibility notes

  • Some previously working specs will fail to parse due to bare words being illegal now. Always use double-quotes when comparing strings, this is backwards compatible.

Known issues in the 4.16.0 beta release