pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/59842: cwrappers doesn't transform if "cc @command-line-aguments" syntax is used
>Number: 59842
>Category: pkg
>Synopsis: cwrappers doesn't transform if "cc @command-line-aguments" syntax is used
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Dec 16 04:05:00 +0000 2025
>Originator: coypu
>Release: pkgsrc-current as of 2025-12-15, cwrappers-20220403
>Organization:
>Environment:
NetBSD 10.1 NetBSD 10.1 (GENERIC) #0: Mon Dec 16 13:08:11 UTC 2024 mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC amd64
>Description:
Here is a reproducer trying to build things "normally" and then with @command-line-arguments. Both are using -lnonexistent, which should be removed by cwrappers config, but isn't in the second case.
A package (mongodb) was using this syntax to avoid exceeding max command line length.
#!/bin/sh
set -ex
cat << EOF > main.c
int main() { return 0; }
EOF
cat << EOF > cc
worklog=.work.log
exec=/usr/bin/cc
exec_path=/usr/pkg/libexec/cwrappers/cc-wrapper
transform=rm:-lnonexistent
EOF
cat << EOF > mainlink
main.c -lnonexistent
EOF
# Normal command, works fine
env CWRAPPERS_CONFIG_DIR=. /usr/pkg/libexec/cwrappers/cc-wrapper main.c -lnonexistent
# Same command passed with '@mainlink', transform doesn't work
env CWRAPPERS_CONFIG_DIR=. /usr/pkg/libexec/cwrappers/cc-wrapper '@mainlink'
>How-To-Repeat:
>Fix:
Home |
Main Index |
Thread Index |
Old Index