[Rpm-maint] [rpm-software-management/rpm] `%build -a` and `%install -a` overwrite build/installation instructions from `%buildsystem_*_*` (Issue #3024)
Bernhard Rosenkraenzer
notifications at github.com
Sun Apr 7 20:13:32 UTC 2024
**Describe the bug**
I've just updated my rpm to 4.19.90, and tried out the declarative build bits. Overall, they're working nicely, but `%build -a` doesn't seem to work as documented - instead of adding to `%buildsystem_*_build`, it is treated as the only build/install script present.
**To Reproduce**
Steps to reproduce the behavior:
Simplified version of the macros I've been playing with (simplified to not call any other macros etc. for easier reproducibility etc.):
```
%buildsystem_autotools_conf() \
./configure --prefix=/usr %*
%buildsystem_autotools_build() \
make %*
%buildsystem_autotools_install() \
make install %*
```
Everything works as expected if I don't have any `%build` section in the spec - but if I add
```
%build -a
echo test
```
in the spec, only `echo test` is executed, not `make`.
**Expected behavior**
The code is built (`make`), and afterwards `test` is printed.
**Output**
`test` is printed, without any signs of running `make`.
**Environment**
- OS / Distribution: OpenMandriva Cooker
- Version rpm-4.19.90
**Additional context**
There's no funky stuff like macros redefining `%build` or something (that actually used to be present in older Mandriva versions).
```
$ rpmbuild --eval '%{build}'
%{build}
```
Simplified spec that works:
```
Summary: A utility for determining file types
Name: file
Version: 5.45
Release: 1
License: BSD
Url: https://www.darwinsys.com/file/
Source0: ftp://ftp.astron.com/pub/file/%{name}-%{version}.tar.gz
BuildSystem: autotools
BuildOption: --enable-static
%description
A utility for determining file types
%files
/usr
```
Modified version of the spec that shows the problem:
```
Summary: A utility for determining file types
Name: file
Version: 5.45
Release: 1
License: BSD
Url: https://www.darwinsys.com/file/
Source0: ftp://ftp.astron.com/pub/file/%{name}-%{version}.tar.gz
BuildSystem: autotools
BuildOption: --enable-static
%description
A utility for determining file types
%build -a
echo test
%install -a
echo test
%files
/usr
```
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3024
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/issues/3024 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20240407/d48f4308/attachment.html>
More information about the Rpm-maint
mailing list