<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>34031</bug_id>
          
          <creation_ts>2017-10-19 17:01:17 +0300</creation_ts>
          <short_desc>create static device inodes for SysV init</short_desc>
          <delta_ts>2017-10-22 17:55:55 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>udev</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>https://bugzilla.altlinux.org/show_bug.cgi?id=31718#c27</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>31718</dependson>
          <blocked>34019</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Ivan Zakharyaschev">imz</reporter>
          <assigned_to name="Alexey Shabalin">shaba</assigned_to>
          <cc>arseny</cc>
    
    <cc>shaba</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>166404</commentid>
    <comment_count>0</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2017-10-19 17:01:17 +0300</bug_when>
    <thetext>(In reply to comment https://bugzilla.altlinux.org/show_bug.cgi?id=31718#c2 )

&gt; - для создания static-nodes в /dev используется systemd-tmpfiles под sysv из
&gt; /etc/rc.d/init.d/udevd

Сейчас не работает. Я так понял, что нужно вместо:

create_static_inodes()
{
        mkdir -p /run/tmpfiles.d
        [ -x &quot;$kmod&quot; ] &amp;&amp; $kmod static-nodes --format=tmpfiles
--output=/run/tmpfiles.d/kmod.conf
        [ -x &quot;$systemd_tmpfiles&quot; ] &amp;&amp; $systemd_tmpfiles --prefix=/dev --create
}

делать:

create_static_inodes()
{
        mkdir -p /run/tmpfiles.d
        [ -x &quot;$kmod&quot; ] &amp;&amp; $kmod static-nodes --format=tmpfiles
--output=/run/tmpfiles.d/kmod.conf
        [ -x &quot;$systemd_tmpfiles&quot; ] &amp;&amp; $systemd_tmpfiles --prefix=/dev --create
--boot
}

Не знаю, для каких версий помимо Sisyphus это актуально.

Устройства не создаются, когда там восклицательные знаки (только с --boot
обрабатываются) при таких версиях:

-bash-4.3# rpm -qf /etc/init.d/udevd
udev-233-alt1.x86_64
-bash-4.3# cat /run/tmpfiles.d/kmod.conf 
c! /dev/autofs 0600 - - - 10:235
c! /dev/fuse 0600 - - - 10:229
c! /dev/cuse 0600 - - - 10:203
c! /dev/btrfs-control 0600 - - - 10:234
d /dev/net 0755 - - -
c! /dev/net/tun 0600 - - - 10:200
c! /dev/ppp 0600 - - - 108:0
c! /dev/userio 0600 - - - 10:240
c! /dev/uinput 0600 - - - 10:223
d /dev/mapper 0755 - - -
c! /dev/mapper/control 0600 - - - 10:236
d /dev/vfio 0755 - - -
c! /dev/vfio/vfio 0600 - - - 10:196
c! /dev/vhci 0600 - - - 10:137
c! /dev/uhid 0600 - - - 10:239
c! /dev/vhost-net 0600 - - - 10:238
d /dev/snd 0755 - - -
c! /dev/snd/timer 0600 - - - 116:33
d /dev/snd 0755 - - -
c! /dev/snd/seq 0600 - - - 116:1
-bash-4.3# rpm -qf /bin/kmod 
kmod-23-alt1.x86_64
-bash-4.3# 

и при таких:

[root@vb ~]# cat /run/tmpfiles.d/kmod.conf 
c! /dev/autofs 0600 - - - 10:235
c! /dev/fuse 0600 - - - 10:229
c! /dev/cuse 0600 - - - 10:203
c! /dev/btrfs-control 0600 - - - 10:234
d /dev/net 0755 - - -
c! /dev/net/tun 0600 - - - 10:200
c! /dev/ppp 0600 - - - 108:0
c! /dev/userio 0600 - - - 10:240
c! /dev/uinput 0600 - - - 10:223
d /dev/mapper 0755 - - -
c! /dev/mapper/control 0600 - - - 10:236
d /dev/vfio 0755 - - -
c! /dev/vfio/vfio 0600 - - - 10:196
c! /dev/vhci 0600 - - - 10:137
c! /dev/uhid 0600 - - - 10:239
c! /dev/vhost-net 0600 - - - 10:238
d /dev/snd 0755 - - -
c! /dev/snd/timer 0600 - - - 116:33
d /dev/snd 0755 - - -
c! /dev/snd/seq 0600 - - - 116:1
[root@vb ~]# man systemd-tmpfiles
[root@vb ~]# rpm -qf /etc/init.d/udevd
udev-232-alt1
[root@vb ~]# rpm -qf /bin/kmod 
kmod-21-alt1
[root@vb ~]# cut --fields=2 -d&apos; &apos; &lt;/lib/modules/&quot;$(uname -r)&quot;/modules.devname |
(cd /dev/; xargs ls -ld)
ls: cannot access Device: No such file or directory
ls: cannot access fuse: No such file or directory
ls: cannot access cuse: No such file or directory
ls: cannot access btrfs-control: No such file or directory
ls: cannot access ppp: No such file or directory
ls: cannot access userio: No such file or directory
ls: cannot access uinput: No such file or directory
ls: cannot access vfio/vfio: No such file or directory
ls: cannot access vhci: No such file or directory
ls: cannot access uhid: No such file or directory
ls: cannot access vhost-net: No such file or directory
ls: cannot access snd/timer: No such file or directory
ls: cannot access snd/seq: No such file or directory
crw------- 1 root root 10, 235 авг  8 23:13 autofs
crw------- 1 root root 10, 236 авг  8 23:13 mapper/control
crw-rw-rw- 1 root root 10, 200 авг  8 23:13 net/tun
[root@vb ~]# 

Почувствовал это из-за отсутствия /dev/net/tun при работе libvirtd без systemd
-- как у них: https://bugzilla.novell.com/show_bug.cgi?id=792178#c3 (libvirt
should load tun module)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>166407</commentid>
    <comment_count>1</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2017-10-19 19:05:38 +0300</bug_when>
    <thetext>Исправил в task #190896, можно пропустить, если нет замечаний.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>166463</commentid>
    <comment_count>2</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2017-10-22 17:55:55 +0300</bug_when>
    <thetext>systemd-1:234-alt4 -&gt; sisyphus:

Thu Oct 19 2017 Ivan Zakharyaschev &lt;imz@altlinux.org&gt; 1:234-alt4
- udevd.init (SysV): fix creating static device inodes (ALT: #34031).
  (Use an option introduced in v209 for &quot;unsafe&quot; tmpfiles actions,
  because the static devices are listed as such by kmod.)
- This also helps the unmounting of NFS when halting after having
  upgraded/reinstalled udev (&amp; other) on a system with SysV init
  (ALT: #34019) by a lucky coincidence.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>