Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some rpm versions lose second and later lines in a multi-line macro #1857

Open
keszybz opened this issue Dec 11, 2021 · 0 comments
Open

some rpm versions lose second and later lines in a multi-line macro #1857

keszybz opened this issue Dec 11, 2021 · 0 comments
Labels

Comments

@keszybz
Copy link
Contributor

keszybz commented Dec 11, 2021

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

rpm-4.16.1.3-1.fc33.x86_64:

$ 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:

$ 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.

@pmatilai pmatilai added the bug label Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Backlog
Development

No branches or pull requests

2 participants