[systemd-devel] some issues with missing HAVE_SYSV_COMPAT and /run/lock

Lennart Poettering lennart at poettering.net
Wed Apr 6 07:01:41 PDT 2011


On Wed, 06.04.11 15:30, Marius Tolzmann (tolzmann at molgen.mpg.de) wrote:

Heya,

> Hi..
> 
> i just built and installed systemd-v23 (upgraded from v19)
> 
> since we are using a linux from scratch based distribution i used the
> following configure options:
> 
>  --with-distro=other \
>  --with-sysvinit-path="" \
>  --with-sysvrcd-path="" \
>  --with-pamlibdir="/lib/security" \
>  --with-rootdir=""
> 
> this also disables SYSV_COMPAT..
> 
> 
> after the reboot i experienced some problems with the new /run, /run/lock:
> 
> * var-lock.mount is still wanted by local-fs.target but was not
>   installed due to missing SYSV_COMPAT

Oh, that's a bug. I have now fixed that in git: we shouldn't enable
var-lock.mount if we don't actually install it.

> * /run/lock is not mounted/created since tmpfiles.d/legacy.conf is not
>   installed (?)

Yes, correct.

> * dependencies on var-lock.mount are also failing with:
>   "Cannot add dependency job for unit var-lock.mount, ignoring: Unit
>    var-lock.mount failed to load: No such file or directory. See system
>    logs and 'systemctl status' for details."
>   (ATM i don't know which unit triggers this)

Hmm, what has dependencies on this execept for local-fs.target (which
doesn't anymore as mentioned above)?

> So how am i supposed to fix the missing /run/lock issue? i thought
> systemd would be responsible for creating this or mounting some tmpfs
> (i don't know the status quo in the /run / lock / lockdev discussion ;)

Well, we came to the conclusion that /var/lock is just completely broken
and we only want it on systems caring for legacy support. On legacy-free
systems that dir shouldn't exist (or at least systemd should not create
it) since it is deeply broken and we shouldn't bless something that
broken.

> are tmpfiles.d/legacy.conf and var-lock.mount really dependent on the
> sysv-compatibility / the existence of sysv-init-directories?
> (we don't have any sysv-init scripts installed anymore since we
> completly switched to systemd v15 some time ago)

Well, "SYSV" is a codeword for "legacy" here. A full SysV system needs
UUCP/SysV lock files. If you don't need SysV compat, you don't need
/var/lock.

Apps should much rather take a BSD lock on the tty fd itself than place
a lock file anywhere.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list