[Rpm-maint] [rpm-software-management/rpm] some rpm versions lose second and later lines in a multi-line macro (Issue #1857)

Zbigniew Jędrzejewski-Szmek notifications at github.com
Sat Dec 11 12:05:46 UTC 2021


Forwarded from https://pagure.io/fedora-rust/rust2rpm/issue/138:

rpm-4.16.1.3-1.fc33.x86_64:
```console
$ cat rust-nix.spec | grep -A4 %check
%check
# skip a test that tends to hang in systemd-nspawn environments
%cargo_test -- -- \
  --skip sys::test_socket::test_af_alg_aead \
  --skip sys::test_socket::test_af_alg_aead
$ rpmspec -P *spec | grep -A4 %check
%check
# skip a test that tends to hang in systemd-nspawn environments

  /usr/bin/env CARGO_HOME=.cargo RUSTC_BOOTSTRAP=1 /usr/bin/cargo test -j12 -Z avoid-dev-deps --release --no-fail-fast -- \ 
(empty line here)
```
Same file, rpm-4.17.0-1.fc35.x86_64:
```console
$ rpmspec -P $PWD/*spec|grep -A5 %check
%check
# skip a test that tends to hang in systemd-nspawn environments

/usr/bin/env CARGO_HOME=.cargo RUSTC_BOOTSTRAP=1 /usr/bin/cargo test -j4 -Z avoid-dev-deps --release --no-fail-fast -- \  --skip sys::test_socket::test_af_alg_aead \
  --skip sys::test_socket::test_af_alg_aead
```

As discussed in the rust2rpm ticket, neither behaviour seems correct. Completely losing those lines is pretty bad and breaks users, but even the behaviour in 4.17.0 is strange: rpm neither completely ignores continuations and let's them through, nor does it completely consume them and concatenate the lines. Instead, it concatenates the lines but leaves the continuation symbols, effectively feeding escaped spaces to the next level of processing.

Based on the discussion in https://bugzilla.redhat.com/show_bug.cgi?id=1045723, the behaviour in 4.17.0 was similar  in Fedora 21, so the behaviour in 4.16 seems to be regression that was (partially?) fixed.

Please make multi-line macros work, and also please document what to expect.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1857
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20211211/f1291b14/attachment.html>


More information about the Rpm-maint mailing list