Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 387355 - sys-apps/openrc: use of extended regular expressions with "sed" may not be supported on some systems
Summary: sys-apps/openrc: use of extended regular expressions with "sed" may not be su...
Status: CONFIRMED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-17 03:25 UTC by William Hubbs
Modified: 2012-09-14 21:09 UTC (History)
0 users

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


Attachments
init.d-procfs.patch (init-d--procfs.patch,1.23 KB, patch)
2011-10-17 08:52 UTC, Francesco Riosa
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description William Hubbs gentoo-dev 2011-10-17 03:25:29 UTC
All,

I had spoken with the author of commit 

2d180551ef5f2541e22a5eaf90b4efc7aadba914

regarding the status of this commit recently, because I had heard him
mention on an irc chat that this was not posix compliant code.

I checked the tracker today and was closing bugs to get ready to release
0.9.4. My plan was to speak to the author about fixing this before the
release.

Since openrc 0.9.4 has already been released, I am asking that this be
fixed in the next 24 hours so we can drop 0.9.4 from the tree and
release 0.9.5.
Comment 1 Francesco Riosa 2011-10-17 08:52:36 UTC
Created attachment 290029 [details, diff]
init.d-procfs.patch

also this grep seem strange to me (the "")

grep -hsv -e '^[#;]' -e '^[[:space:]]*$' \
 /run/binfmt.d/*.conf \
 "/etc"/binfmt.d/*.conf \
 ""/usr/lib/binfmt.d/*.conf
Comment 2 SpanKY gentoo-dev 2011-10-17 14:47:53 UTC
Comment on attachment 290029 [details, diff]
init.d-procfs.patch

has nothing to do with this bug.  and comparing generated code hides the actual reasons behind what you're seeing.
Comment 3 William Hubbs gentoo-dev 2011-10-17 16:15:29 UTC
After speaking with Christian about this bug, the question seems to come
down to whether or not we use extended regular expressions [1].

Christian and I think that using them is the best way to go because they
make things easier, but that assumes that all of the systems openrc runs
on have tools that support them. Mike, is this a safe assumption? What
do you think, should we use EREs or should we rework our code to use
BREs?

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_04
Comment 4 SpanKY gentoo-dev 2011-10-17 16:18:37 UTC
my opinion is to just use the readlink implementation if we're going to use anything here.  that should be more robust rather than assuming anything underlying symlink behavior.
Comment 5 Christian Ruppert (idl0r) archtester Gentoo Infrastructure gentoo-dev Security 2012-01-27 18:53:58 UTC
<snip>
18:41:20  idl0r | hm, i'm just curious.. wouldn't it make sense to start to extend the BRE (Basic Regular Expressions)? esp. (), ?, +, | would be awesome
19:35:38   twkm | idl0r: the bre was extended, which is why we have ere.
19:38:56  idl0r | twkm: well.. ERE may not be available, right?
19:45:53   twkm | may not?  REG_EXTENDED isn't optional.  but if you mean, does every utility provide it, then that's correct, they do not (or at least are not required to), e.g., sed uses bre w/additions but not ere.
</snip>

Just for the record...
Comment 6 William Hubbs gentoo-dev 2012-05-19 20:37:16 UTC
All,

I'm not quite clear now about what we need to do on this bug.

The irc exchange in comment #5 seems to say that ere are required for
posix compliance, but all posix compliant utilities are not required  to
support ere. So, is it safe to just verify that the utility we are using
with ERE does support ERE and fix issues with it as they come up?