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

clippy: make the cargo wrapper work in bash #171

Merged
merged 1 commit into from
Jun 3, 2024
Merged

Commits on Jun 3, 2024

  1. clippy: make the cargo wrapper work in bash

    It turned out that the last change was not properly tested.
    The previously used syntax is not recognized by bash:
    ```
    [...]
    cd ./librsvg && \
    PKG_CONFIG_ALLOW_CROSS=1 \
    PKG_CONFIG='/usr/bin/pkg-config' \
    CARGO_TARGET_DIR=/builddir/build/BUILD/librsvg-2.50.7/target \
    cargo --locked build --verbose  --release \
    && cd /builddir/build/BUILD/librsvg-2.50.7 && /bin/sh ./libtool  --tag=CC   --mode=link gcc  -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection  -Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -o librsvg_c_api.la _rsvg_dummy.lo && mv /builddir/build/BUILD/librsvg-2.50.7/target/release/librsvg_c_api.a .libs/librsvg_c_api.a
    /usr/bin/cargo: line 5: ${@[i]}: bad substitution
    [...]
    ```
    
    This commit fixes it.  Moreover, the invocation of `cargo_original` was
    wrong because the wrapper path was passed as the first command-line arg
    by mistake:
    ```
    [...]
    cd ./librsvg &&                     \
    PKG_CONFIG_ALLOW_CROSS=1                        \
    PKG_CONFIG='/usr/bin/x86_64-redhat-linux-gnu-pkg-config'                        \
    CARGO_TARGET_DIR=/builddir/build/BUILD/librsvg-2.50.7/target                    \
    cargo --locked build --verbose  --release \
    && cd /builddir/build/BUILD/librsvg-2.50.7 && /bin/sh ./libtool  --tag=CC   --mode=link gcc  -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=forma
    + /usr/bin/cargo_original /usr/bin/cargo --locked clippy --verbose --release --message-format=json
    error: running `/usr/bin/cargo` requires `-Zscript`
    + break
    + exec /usr/bin/cargo_original --locked build --verbose --release
    [...]
    ```
    
    Related: https://issues.redhat.com/browse/OSH-30
    kdudka committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    a059ab9 View commit details
    Browse the repository at this point in the history