Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 545162 - sys-apps/openrc: fix binfmt.d processing
Summary: sys-apps/openrc: fix binfmt.d processing
Status: RESOLVED FIXED
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: 544150 openrc-0.14
  Show dependency tree
 
Reported: 2015-03-31 14:55 UTC by William Hubbs
Modified: 2015-04-21 15:17 UTC (History)
1 user (show)

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


Attachments
0001-Fix-binfmt-processing.patch (0001-Fix-binfmt-processing.patch,4.33 KB, patch)
2015-03-31 21:07 UTC, William Hubbs
Details | Diff
0001-Fix-binfmt-processing.patch (0001-Fix-binfmt-processing.patch,4.24 KB, patch)
2015-03-31 21:35 UTC, William Hubbs
Details | Diff
0001-Fix-binfmt-processing.patch (0001-Fix-binfmt-processing.patch,4.23 KB, patch)
2015-03-31 21:41 UTC, William Hubbs
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description William Hubbs gentoo-dev 2015-03-31 14:55:51 UTC
The current binfnt.d processing does not quite follow the spec.
It should be identical to how tmpfiles.d files are processed [1].

In particular, notice the rules of precedence on the referenced page.

[1] http://man7.org/linux/man-pages/man5/binfmt.d.5.html
Comment 1 William Hubbs gentoo-dev 2015-03-31 15:20:30 UTC
Actually above is the wrong reference for the spec; it is here [1].

In a nutshell, all  vendor-provided binfmt files go in
/usr/lib/binfmt.d/*.conf, and if a sys admin wants to disable them
zero-length versions of them go in /etc/binfmt.d/*.conf.

[1] http://0pointer.de/public/systemd-man/binfmt.d.html
Comment 2 William Hubbs gentoo-dev 2015-03-31 15:22:50 UTC
I am working on this bug as we speak.
Comment 3 Mike Gilbert gentoo-dev 2015-03-31 15:35:27 UTC
Thanks for working on this.

I believe the canonical reference would be the current manpage from systemd, available here:

http://www.freedesktop.org/software/systemd/man/binfmt.d.html

As of this writing, it is identical to the version on Lennart's website (0pointer.de).
Comment 4 William Hubbs gentoo-dev 2015-03-31 21:07:04 UTC
Created attachment 400300 [details, diff]
0001-Fix-binfmt-processing.patch

This patch should take care of making sure binfmt files are loaded
correctly.
correctly.  I do not use this facility, so I need testers.

Thanks,

William
Comment 5 William Hubbs gentoo-dev 2015-03-31 21:35:10 UTC
Created attachment 400304 [details, diff]
0001-Fix-binfmt-processing.patch

This is an updated version of the patch with a couple of small fixes.

- only increment error once and make sure that dryrun actually works.
Comment 6 William Hubbs gentoo-dev 2015-03-31 21:41:40 UTC
Created attachment 400306 [details, diff]
0001-Fix-binfmt-processing.patch

One more typo fix.
Comment 7 William Hubbs gentoo-dev 2015-03-31 22:25:44 UTC
The latest code for this is in a pull request on github so we don't spam
the bug with changes [1].

https://github.com/OpenRC/openrc/pull/48
Comment 8 William Hubbs gentoo-dev 2015-04-21 15:17:25 UTC
This will be included in openrc-0.14.