Bug 35891 - Миграция на /run и /run/lock
Summary: Миграция на /run и /run/lock
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: samba (show other bugs)
Version: unstable
Hardware: all Linux
: P3 normal
Assignee: Evgeny Sinelnikov
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks: 35881
  Show dependency tree
 
Reported: 2019-01-12 17:27 MSK by Антон Мидюков
Modified: 2021-05-05 23:40 MSK (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Антон Мидюков 2019-01-12 17:27:18 MSK
Исправьте конфиг f: 
's|/var/run|/run|'

Также надо заменить везде:
's|/var/run|/run|g'
's|/var/lock|/run/lock|g'
Comment 1 Evgeny Sinelnikov 2019-04-11 10:15:43 MSK
Там достаточно много мест, где это прибито. Первый шаг я уже сделал. Отваливалось на соответствии FHS.
Comment 2 Антон Мидюков 2019-04-11 11:04:51 MSK
Теперь можно в /run директории паковать:
http://git.altlinux.org/tasks/archive/done/_221/226655/

И как примеры:
http://git.altlinux.org/tasks/archive/done/_221/226647/
http://git.altlinux.org/tasks/archive/done/_220/225801/

Но я уже не уверен в необходимости такого перехода прямо сейчас.
Comment 3 Антон Мидюков 2021-04-27 06:15:03 MSK
Для того, чтобы мусор не сыпался при загрузке, достаточно исправить только packaging/systemd/samba.conf.tmp
Больше ничего исправлять не надо, так как /var/run является симлинком на /run, а /var/lock симлинком на /run/lock.
Comment 4 Evgeny Sinelnikov 2021-05-04 06:21:33 MSK
Пробуем исправить в ближайшей сборке.

Пока непонятно что с этим всем делать:

$ git grep /var/lock

ctdb/config/ctdb.init:      [ $RETVAL -eq 0 ] && touch /var/lock/subsys/ctdb || RETVAL=1
ctdb/config/ctdb.init:      [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/ctdb
docs-xml/manpages/nmbd.8.xml:   </filename> in the <filename>/usr/local/samba/var/locks</filename>
docs-xml/manpages/winbindd.8.xml:               This directory is by default <filename>/usr/local/samba/var/locks
docs-xml/smbdotconf/generate-file-list.sh:<!ENTITY pathconfig.LOCKDIR              '\${prefix}/var/lock'>
docs-xml/smbdotconf/generate-file-list.sh:<!ENTITY pathconfig.STATEDIR             '\${prefix}/var/locks'>
extra/ctdb.init:LOCKFILE=/var/lock/subsys/ctdbd
extra/nmb.init:LOCKFILE=/var/lock/subsys/nmb
extra/samba.init:lockfile=/var/lock/subsys/$prog
extra/smb.init:LOCKFILE=/var/lock/subsys/smb
extra/winbind.init:LOCKFILE=/var/lock/subsys/winbindd
Binary file packaging/Example/skeleton.tar matches
python/samba/tests/gpo.py:        path = '/usr/local/samba/var/locks/sysvol/../../../../../../root/'
source3/script/tests/test_groupmap.sh:rm -f $PREFIX_ABS/var/locks/group_mapping.?db
source4/scripting/devel/config_base:    "lock dir" : "${PREFIX}/var/locks",
source4/selftest/provisions/multi-dc-samba-master-c596ac6/etc/smb.conf: path = /usr/local/samba/var/locks/sysvol/samdom.example.com/scripts
source4/selftest/provisions/multi-dc-samba-master-c596ac6/etc/smb.conf: path = /usr/local/samba/var/locks/sysvol
Comment 5 Evgeny Sinelnikov 2021-05-04 06:22:30 MSK
Да и с этим тоже непонятно:

$ git grep /var/run

ctdb/config/ctdb.init:# pidfile: /var/run/ctdb/ctdbd.pid
ctdb/config/ctdb.init:pidfile="/var/run/ctdb/ctdbd.pid"
ctdb/doc/examples/config_migrate.test_input:CTDB_SOCKET="/var/run/ctdb.sock"
ctdb/doc/examples/nfs-ganesha-callout:  _pidfile="/var/run/ganesha.pid"
ctdb/tests/UNIT/eventscripts/31.clamd.monitor.002.sh:CTDB_CLAMD_SOCKET="/var/run/clamd.sock"
ctdb/tests/UNIT/eventscripts/31.clamd.monitor.003.sh:CTDB_CLAMD_SOCKET="/var/run/clamd.sock"
ctdb/tests/UNIT/eventscripts/scripts/31.clamd.sh:CTDB_CLAMD_SOCKET="/var/run/clamd.sock"
ctdb/wscript:    sed_expr4 = 's|/usr/local/var/run/ctdb|%s|g'  % (bld.env.CTDB_RUNDIR)
docs-xml/manpages/vfs_virusfilter.8.xml:                <emphasis>/var/run/savdi/sssp.sock</emphasis>.</para>
docs-xml/manpages/vfs_virusfilter.8.xml:                <emphasis>/var/run/clamav/clamd.ctl</emphasis>.</para>
docs-xml/smbdotconf/generate-file-list.sh:<!ENTITY pathconfig.NCALRPCDIR           '\${prefix}/var/run/ncalrpc'>
docs-xml/smbdotconf/generate-file-list.sh:<!ENTITY pathconfig.PIDDIR               '\${prefix}/var/run'>
docs-xml/smbdotconf/generate-file-list.sh:<!ENTITY pathconfig.WINBINDD_SOCKET_DIR  '\${prefix}/var/run/winbindd'>
docs-xml/smbdotconf/misc/cachedirectory.xml:<value type="example">/var/run/samba/locks/cache</value>
docs-xml/smbdotconf/misc/lockdirectory.xml:<value type="example">/var/run/samba/locks</value>
docs-xml/smbdotconf/misc/ncalrpcdir.xml:<value type="example">/var/run/samba/ncalrpc</value>
docs-xml/smbdotconf/misc/piddirectory.xml:<value type="example">/var/run/</value>
docs-xml/smbdotconf/misc/statedirectory.xml:<value type="example">/var/run/samba/locks/state</value>
docs-xml/smbdotconf/misc/utmpdirectory.xml:     <filename moreinfo="none">/var/run/utmp</filename> on Linux).</para>
docs-xml/smbdotconf/misc/utmpdirectory.xml:<value type="example">/var/run/utmp</value>
docs-xml/smbdotconf/misc/wtmpdirectory.xml:     <filename moreinfo="none">/var/run/wtmp</filename> on Linux).
extra/ctdb.init:# pidfile: /var/run/ctdb/ctdbd.pid
extra/ctdb.init:PIDFILE=/var/run/ctdbd/ctdbd.pid
extra/nmb.init:# pidfile: /var/run/samba/nmbd.pid
extra/nmb.init:PIDFILE=/var/run/nmbd.pid
extra/samba.init:pidfile=/var/run/$prog.pid
extra/smb.init:# pidfile: /var/run/samba/smbd.pid
extra/smb.init:PIDFILE=/var/run/smbd.pid
extra/winbind.init:# pidfile: /var/run/winbindd.pid
extra/winbind.init:PIDFILE=/var/run/winbindd.pid
libgpo/admx/en-US/samba.adml:Example: /var/run/samba/locks/cache</string>
libgpo/admx/en-US/samba.adml:Example: /var/run/samba/locks</string>
libgpo/admx/en-US/samba.adml:Example: /var/run/samba/ncalrpc</string>
libgpo/admx/en-US/samba.adml:Example: /var/run/</string>
libgpo/admx/en-US/samba.adml:Example: /var/run/samba/locks/state</string>
libgpo/admx/en-US/samba.adml:      <string id="POL_21565354_4253_5482_97D2_9C2558461C47_Help">This parameter is only available if Samba has been configured and compiled with the option --with-utmp. It specifies a directory pathname tha>
libgpo/admx/en-US/samba.adml:Example: /var/run/utmp</string>
libgpo/admx/en-US/samba.adml:      <string id="POL_4F8E9BC0_CFAB_52F8_9C49_B8BB7400E60A_Help">This parameter is only available if Samba has been configured and compiled with the option --with-utmp. It specifies a directory pathname tha>
packaging/systemd/README:With systemd the /run or /var/run are tmpfs filesystems. This means
python/samba/tests/domain_backup.py:        settings = {'state directory': '/var/run',
samba4.spec:  with oldstyle /var/run due it symlink in modern linux installations
samba4.spec:- Prepare to replace runtime files from /var/run to /run directory
source3/modules/vfs_virusfilter_clamav.c:#  define VIRUSFILTER_DEFAULT_SOCKET_PATH      "/var/run/clamav/clamd.ctl"
source3/modules/vfs_virusfilter_sophos.c:#  define VIRUSFILTER_DEFAULT_SOCKET_PATH      "/var/run/savdi/sssp.sock"
source4/heimdal/lib/hcrypto/rand-egd.c:static const char *egd_path = "/var/run/egd-pool";
source4/heimdal/lib/krb5/replay.c:    return "FILE:/var/run/default_rcache";
source4/heimdal/lib/roken/roken-common.h:#define _PATH_VARRUN "/var/run/"
source4/scripting/devel/config_base:    "pid directory" : "${PREFIX}/var/run",
source4/scripting/devel/config_base:    "winbindd socket directory" : "${PREFIX}/var/run/winbindd",
source4/scripting/devel/config_base:    "ntp signd socket directory" : "${PREFIX}/var/run/ntp_signd"
Comment 6 Repository Robot 2021-05-05 23:40:24 MSK
samba-4.14.4-alt1 -> sisyphus:

 Fri Apr 30 2021 Evgeny Sinelnikov <sin@altlinux> 4.14.4-alt1
 - Fix buffer overrun in sids_to_unixids() (Fixes: CVE-2021-20254)
 - Final migration to /run directory (Closes: 35891, 36652, 39992)
 - Avoid build problems on e2k