From 6efbf02fcfd19f451f719fd92573c888931efddd Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Mon, 24 Jun 2024 10:49:34 +0300 Subject: [PATCH] Minor fixes + reorg to 4.20 release notes - brp-strip is a rather obscure build/spec thing, move to that section - clarify the spec conditional comment and BuildArch behaviors - %prep being a normal scriptlet is more than just internal cleanup, better make it visible up front - mention compatibility in the %patchN replacement - the user/file ownership thing is not a regression - add some missing macro fixes --- wiki/Releases/4.20.0.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/wiki/Releases/4.20.0.md b/wiki/Releases/4.20.0.md index 01ef95d..7de14e3 100644 --- a/wiki/Releases/4.20.0.md +++ b/wiki/Releases/4.20.0.md @@ -18,49 +18,54 @@ Last update: 2024-05-20 * A new low-level package dump utility, installed as `/usr/lib/rpm/rpmdump` * The `rpm2archive(8)` utility now supports cpio file format, replacing the implementation of `rpm2cpio(8)` which is now installed as a symlink to the former * The `${XDG_CONFIG_HOME}/rpm` directory is now the preferred location when loading per-user macro configuration ([#2153](https://github.com/rpm-software-management/rpm/issues/2153)) +* Support package signing with ECDSA keys * A new plugin `rpm-plugin-unshare(8)` that allows for using various Linux-specific namespace-related technologies inside transactions, such as to harden and limit scriptlet access to resources ([#2632](https://github.com/rpm-software-management/rpm/issues/2632), [#2665](https://github.com/rpm-software-management/rpm/issues/2665)) -* `brp-strip` no longer attempts to process Ruby, Python or Javascript files, making it more efficient and faster, especially where I/O is expensive (such as in container builds) * The plugin API is now public ([#1536](https://github.com/rpm-software-management/rpm/issues/1536)) ### SPEC & Package Building * Support for [declarative buildsystems](https://rpm-software-management.github.io/rpm/manual/buildsystem.html) ([#1087](https://github.com/rpm-software-management/rpm/issues/1087)) * A per-package build directory that's fully RPM-controlled is now used and exposed as the new `%builddir` macro at build time ([#2078](https://github.com/rpm-software-management/rpm/issues/2078)) * Support for [SPEC-local](https://rpm-software-management.github.io/rpm/manual/dependency_generators.html#using-file-attributes-in-their-own-package) file attributes and generators ([#782](https://github.com/rpm-software-management/rpm/issues/782)) +* The `%prep` section is now implemented as a regular build scriptlet (instead of being treated specially by the spec parser). This fixes [#1870](https://github.com/rpm-software-management/rpm/issues/1870) as well as makes the behavior consistent with the other spec sections. * Build scriptlets (such as `%build`, `%install` or `%check`) can now be [augmented](https://rpm-software-management.github.io/rpm/manual/spec.html#build-scriptlets) arbitrary number of times by appending or prepending to them with the new `-a` and `-p` options * A new `-C` option in `%autosetup` which ensures that the sources will be extracted in the root of the build directory ([#2664](https://github.com/rpm-software-management/rpm/issues/2664)) * File trigger scripts now receive package count arguments, much like regular triggers ([#2755](https://github.com/rpm-software-management/rpm/issues/2755)) -* Comments (starting with a `#`) after SPEC conditionals are now legal syntax. These were previously allowed due to a SPEC parser bug but would still trigger a build warning. ([#829](https://github.com/rpm-software-management/rpm/issues/829)) +* Comments (starting with a `#`) after SPEC conditionals are now legal syntax. These were originally allowed due to a SPEC parser bug but in recent versions triggered a build warning. ([#829](https://github.com/rpm-software-management/rpm/issues/829)) * Indentation is now [allowed](https://rpm-software-management.github.io/rpm/manual/spec.html#preamble-tags) for SPEC tags ([#2927](https://github.com/rpm-software-management/rpm/issues/2927)) * Group membership lines are now supported in `sysusers.d(5)` files * Distributions can now override build conditionals (`%bcond`) system-wide with the new `%{bcond_override_default NAME VALUE}` macro * A new [multi-file protocol](https://rpm-software-management.github.io/rpm/manual/dependency_generators.html#writing-dependency-generators) allowing for much faster dependency generation * Better support for reproducible builds. It's now possible to set a [timestamp handling policy](https://rpm-software-management.github.io/rpm/manual/buildprocess.html#reproducability) via the new macro `%build_mtime_policy`. Two policies are currently available; one for clamping the timestamps to `$SOURCE_DATE_EPOCH` (which deprecates and replaces the `%clamp_mtime_to_source_date_epoch` macro) and one for clamping them to the build time (this is a new feature). Set the macro to `clamp_to_source_date_epoch` or `clamp_to_buildtime` to use the respective policy. Additionally, build time is now exposed to build scriptlets via the new `$RPM_BUILD_TIME` environment variable and can also be overridden manually via the new `%_buildtime` macro. * Proper distribution-agnostic debuginfo enablement logic ([#2204](https://github.com/rpm-software-management/rpm/issues/2204)). Distributions no longer need to override the `%install` section with a macro in order to inject the `%debug_package` boilerplate themselves. Debuginfo generation is now handled automatically and properly using [Dynamic Specs](https://rpm-software-management.github.io/rpm/manual/dynamic_specs.html), and is enabled on Linux by default. +* `brp-strip` no longer attempts to process Ruby, Python or Javascript files, making it more efficient and faster, especially where I/O is expensive (such as in container builds) ## Bug & Regression Fixes * Regression: Packages with unsupported usage of the `%config` flag (e.g. with directories), such as those made with the [gradle plugin](https://plugins.gradle.org/plugin/com.netflix.nebula.ospackage), no longer fail to install ([#2890](https://github.com/rpm-software-management/rpm/issues/2890)) * Regression: Ensure binary and source headers are identified as such in rpmspec queries ([#2819](https://github.com/rpm-software-management/rpm/issues/2819)) -* Regression: Never use current user info or file ownership during build ([#2604](https://github.com/rpm-software-management/rpm/issues/2604)) * Regression: Fix dependency generators sometimes dying with `SIGPIPE` ([#2949](https://github.com/rpm-software-management/rpm/issues/2949)) +* Never use current user info or file ownership during build ([#2604](https://github.com/rpm-software-management/rpm/issues/2604)) * Ignore non-scriptlet weak dependencies in ordering ([#1346](https://github.com/rpm-software-management/rpm/issues/1346)) * Ensure rpmbuild's cleanup doesn't fail due to permissions ([#2519](https://github.com/rpm-software-management/rpm/issues/2519)) * Let eBPF ELF files be packaged in noarch packages ([#2875](https://github.com/rpm-software-management/rpm/issues/2875)) * Really allow qualifiers like pre/post/meta for weak dependencies ([#624](https://github.com/rpm-software-management/rpm/issues/624)) * Set git commit dates in `%autosetup -S git` based on `$SOURCE_DATE_EPOCH` ([#9](https://pagure.io/fedora-reproducible-builds/project/issue/9)) * Issue a warning when passing arguments to non-parametric macros ([#2932](https://github.com/rpm-software-management/rpm/issues/2932)) +* Fix multiply defined local macros escaping scope ([#3056](https://github.com/rpm-software-management/rpm/issues/3056)) +* Fix %quote macro special characters leaking to the outside +* Fix %shescape macro to escape all arguments * Make `%dirname` and `%basename` behave like `dirname(3)` and `basename(3)` ([#2928](https://github.com/rpm-software-management/rpm/issues/2928)) * Run build scriptlets with closed stdin to enforce unattended builds -* Fix possible build configuration inconsistency when both `BuildArch` and `--target` are used ([#3049](https://github.com/rpm-software-management/rpm/issues/3049)) +* Automatically load proper platform configuration on `BuildArch` when `--target` is not used ([#3049](https://github.com/rpm-software-management/rpm/issues/3049)) * Always create `%specpartsdir` on build ([#3063](https://github.com/rpm-software-management/rpm/issues/3063)) +* Multiple fixes to the archives created by `rpm2archive`. ## Internal Cleanup -* The `%prep` section is now implemented as a regular build scriptlet (instead of being treated specially by the spec parser). This fixes [#1870](https://github.com/rpm-software-management/rpm/issues/1870) as well as makes the behavior consistent with the other spec sections. * The internal OpenPGP parser has been removed. RPM can now also be built completely without OpenPGP support (i.e. without Sequoia) to allow for easier bootstrapping, see the INSTALL file for details. ([#2414](https://github.com/rpm-software-management/rpm/issues/2414)) * The Python bindings have been ported to the stable Python ABI ([#2345](https://github.com/rpm-software-management/rpm/issues/2345)) * The Perl dependency generators have been split out of the main repository ([#2873](https://github.com/rpm-software-management/rpm/issues/2873)) ## Compatibility Notes -* The `%patchN` macro syntax (where `N` is a patch number) is now obsolete and will produce a build error. Use `%patch N` (or `%patch -P N`) instead. +* The `%patchN` macro syntax (where `N` is a patch number) is now obsolete and will produce a build error. Use `%patch N` (or for maximum compatibility, `%patch -P N`) instead. * Since `%prep` is now a regular build scriptlet, `%setup` and `%patch` are now real macros as well, and are therefore expanded even inside comments. This can lead to unexpected build failures for specs that have these macros commented out but not escaped, for example: ``` @@ -91,4 +96,5 @@ Last update: 2024-05-20 * The `%clamp_mtime_to_source_date_epoch` macro is now deprecated in favor of `%build_mtime_policy` set to `clamp_to_source_date_epoch`. * Non-comment text (i.e. not starting with a `#`) after SPEC conditionals is now a build error. +* Lua functions posix.fork(), posix.exec(), posix.wait() and rpm.redirect2null() are deprecated. Use rpm.execute() instead. * Python 3.7 (when enabled) is now the minimum build requirement.