Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 533756 - sys-libs/musl - fix the handling of '!' and other non arguments in getopt
Summary: sys-libs/musl - fix the handling of '!' and other non arguments in getopt
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2014-12-28 10:13 UTC by Veovis
Modified: 2014-12-30 13:27 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
add support for non-option arguments extension to getopt (musl-1.1.5-support-non-option-args.patch,1.37 KB, patch)
2014-12-28 10:14 UTC, Veovis
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Veovis 2014-12-28 10:13:37 UTC
musl-1.1.5 does not support non-option arguments like '!'.
This behaviour prevents iptables from working correctly with the negate operator, which is '!'

Reproducible: Always

Steps to Reproduce:
1. Try adding this iptables rule: iptables --append INPUT -p icmp -m icmp ! --icmp-type redirect -m comment --comment 'accept all icmp except redirects' -j ACCEPT
2.
3.
Actual Results:  
The rule is not added. iptables display a message saying --icmp-type must be used (because of -m icmp).

Expected Results:  
The rule should work. The same rule without the exclamation mark is successfully added, but it's not the same rule.

The bug has already been fixed in upstream: http://git.musl-libc.org/cgit/musl/commit/?id=b72cd07f176b876aa51864d93aa8101477b1d732
Comment 1 Veovis 2014-12-28 10:14:43 UTC
Created attachment 392550 [details, diff]
add support for non-option arguments extension to getopt
Comment 2 Anthony Basile gentoo-dev 2014-12-29 13:57:34 UTC
(In reply to Veovis from comment #1)
> Created attachment 392550 [details, diff] [details, diff]
> add support for non-option arguments extension to getopt

I'm waiting for the next release.  I'll ping dalias upstream.
Comment 3 Anthony Basile gentoo-dev 2014-12-30 13:27:39 UTC
Upstreams says there will be a release soon.  musl is still undergoing rapid development so backporting doesn't make sense.