Skip to content

BUG: make sed command POSIX sed#483

Open
VirtualTim wants to merge 1 commit intoseccomp:mainfrom
VirtualTim:patch-1
Open

BUG: make sed command POSIX sed#483
VirtualTim wants to merge 1 commit intoseccomp:mainfrom
VirtualTim:patch-1

Conversation

@VirtualTim
Copy link
Copy Markdown

\+ is a GNU extension. This will not work on BSD sed.
I believe both commands are functionally equivilent.

@pcmoore
Copy link
Copy Markdown
Member

pcmoore commented Apr 8, 2026

Hi @VirtualTim, thanks for the patch! I just approved the GH actions to run on this PR, so we will see how it turns out. @drakenclimber and I will also take a look and perhaps do a back-to-back comparison of the two sed commands to ensure the results are the same.

Aside from that, could you please add a sign-off to your patch and perhaps change the subject line to something like "gperf: make sed command POSIX sed safe"? More information can be found in our CONTRIBUTING.md doc.

@pcmoore pcmoore changed the title Make sed command POSIX sed BUG: make sed command POSIX sed Apr 8, 2026
@pcmoore pcmoore added this to the v2.7.0 milestone Apr 8, 2026
@VirtualTim VirtualTim changed the title BUG: make sed command POSIX sed gperf: make sed command POSIX sed safe Apr 9, 2026
\+ is a GNU extension. This will not work on BSD sed.

Signed-off-by: Tim Lander <timlander@canva.com>
@VirtualTim VirtualTim changed the title gperf: make sed command POSIX sed safe BUG: make sed command POSIX sed Apr 9, 2026
@drakenclimber
Copy link
Copy Markdown
Member

drakenclimber commented Apr 9, 2026

Changes look good to me.

Acked-by: Tom Hromatka <tom.hromatka@oracle.com>

Here's what I did to verify:

  • I asked Oracle AI to convert the original sed snippet to BSD-compatible sed. It generated the same output (with minor whitespace differences)
  • I applied this patch to a local libseccomp build and compared its binary outputs to the head commit
    • nm resulted in the same output
    • readelf resulted in the same output
    • objdump had minor differences, but I believe this is cosmetic

I don't have a BSD system currently, so I didn't do any tests there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants