|Summary:||sys-apps/openrc-0.11.8 - tmpfiles.sh typo prevents 'L' rules from working|
|Product:||Gentoo Hosted Projects||Reporter:||Hank Leininger <hlein>|
|Component:||OpenRC||Assignee:||OpenRC Team <openrc>|
|Package list:||Runtime testing required:||---|
|Bug Depends on:|
|Attachments:||Fix for tmpfiles.sh L rule typo|
Description Hank Leininger 2013-07-16 03:05:04 UTC
sys-apps/openrc provides /lib64/rc/sh/tmpfiles.sh, which is the back end for /etc/init.d/tmpfiles.setup There is a typo in tmpfiles.sh, '"$args"' should be '"$arg"'. tmpfiles.sh reads config lines from /etc/tmpfiles.d/* and creates files, directories, or links with the necessary ownership and permissions. It's mostly intended to allow you to populate /var/run after bootup, since it is now a ramdisk, so nothing is persistent. There is a typo in the handler for symlink rules (L), in the function _L. The argument that should become the target of the symlink is read into the variable $arg, but then the ln command line is built with it as $args. Since that variable is not set, ln gets one fewer arguments than it expects, and fails. Reproducible: Always Steps to Reproduce: 1. Create a link rule (L) in /etc/tmpfiles.d/* 2. Run /lib64/rc/sh/tmpfiles.sh --create --remove 3. Enjoy your error. Actual Results: ln: failed to create symbolic link '/var/run/something' -> '': No such file or directory [ !! ] Expected Results: The symlink should be created. I'll attach a simple one-liner patch. Comments in /lib64/rc/sh/tmpfiles.sh indicate that Gentoo imported this from Arch, but the URL seems to no longer be valid, so I don't know if this bug is something we inherited from them, or unique to Gentoo.
Comment 1 Hank Leininger 2013-07-16 03:06:15 UTC
Created attachment 353408 [details, diff] Fix for tmpfiles.sh L rule typo
Comment 2 William Hubbs 2013-07-17 16:45:18 UTC
This has been applied in commit 3af434a and will be in OpenRc-0.12.