Re: [Rpm-maint] [rpm-software-management/rpm] `%build -a` and `%install -a` overwrite build/installation instructions from `%buildsystem_*_*` (Issue #3024)

2024-04-23 Thread Panu Matilainen
Closed #3024 as completed via #3047.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3024#event-12570032397
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] `%build -a` and `%install -a` overwrite build/installation instructions from `%buildsystem_*_*` (Issue #3024)

2024-04-09 Thread Panu Matilainen
Hmm, ugh. We have a test for this very scenario (%build -a) in the test-suite, 
but looking closer indeed the buildsystem %build is lost. It's just that 
autotools "make install" masks the issue by building automatically since not 
already done. We also have bunch of other tests for -a/-p modes, so this is 
just a bad interaction between the buildsystem stuff and append/prepend. Which 
does mean the buildsystem thing is rather broken in the alpha then :unamused: 

Thanks for the report!

Another buildsystem related breakage spotted while looking at this is that on 
Fedora there's this old hack around %install which breaks with -a:

```
%install %{?_enable_debug_packages:%{?buildsubdir:%{debug_package}}}\
%%install\
%{nil}
```

That can probably be worked around in the macro, but we also may want to shoot 
for an expedited fix to #2204 



-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3024#issuecomment-2044376454
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] `%build -a` and `%install -a` overwrite build/installation instructions from `%buildsystem_*_*` (Issue #3024)

2024-04-07 Thread Bernhard Rosenkraenzer
**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-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint