From: "Антон Мидюков" <midyukov-anton@ya.ru> To: devel-distro@lists.altlinux.org Subject: [devel-distro] Переход на симлинк /var/run -> ../run при сборке Date: Wed, 4 Dec 2019 22:13:40 +0700 Message-ID: <45f66149-5705-1bbf-bc3e-c86ec573008a@ya.ru> (raw) [-- Attachment #1: Type: text/plain, Size: 1074 bytes --] Доброго времени суток В настоящее время в наших лайвах и rootfs всё ещё не осуществлён переход на симлинки: /var/run -> ../run /var/lock -> ../run/lock Это может приводить к проблемам размонтирования /run при выключении, например: https://bugzilla.altlinux.org/37568 Подготовил патч переход при сборке rootfs, live и rescue Результат опробован на сборке беты стартеркитов: http://nightly.altlinux.org/p9/beta/ Я также пробовал добавить скрипт этот на уровень stage2, но это привело к неработоспособности инсталятора (вылетает при переходе на шаг установки загрузчика), а в live перестала сохраняться сессия. -- С уважением, Антон Мидюков <antohami@altlinux.org> [-- Attachment #2: 0001-init-create-symlinks-var-run-run-var-lock-run-lock.patch --] [-- Type: text/x-patch, Size: 4922 bytes --] >From 1a467ace7548aad55b4f4d297cacbf2491b21b9b Mon Sep 17 00:00:00 2001 From: Anton Midyukov <antohami@altlinux.org> Date: Sat, 30 Nov 2019 22:42:21 +0700 Subject: [PATCH 1/8] init: create symlinks /var/run -> /run, /var/lock -> /run/lock See-also: https://bugzilla.altlinux.org/show_bug.cgi?id=35350 --- .../init/live/image-scripts.d/50-var-run-fix | 9 ++++++++ .../init/rescue/image-scripts.d/50-sysvinit | 16 -------------- .../rescue/image-scripts.d/50-var-run-fix | 9 ++++++++ .../init/rootfs/image-scripts.d/40-sysvinit | 10 --------- .../init/rootfs/image-scripts.d/50-sysvinit | 22 ------------------- .../rootfs/image-scripts.d/50-var-run-fix | 9 ++++++++ 6 files changed, 27 insertions(+), 48 deletions(-) create mode 100755 features.in/init/live/image-scripts.d/50-var-run-fix delete mode 100755 features.in/init/rescue/image-scripts.d/50-sysvinit create mode 100755 features.in/init/rescue/image-scripts.d/50-var-run-fix delete mode 100755 features.in/init/rootfs/image-scripts.d/40-sysvinit delete mode 100755 features.in/init/rootfs/image-scripts.d/50-sysvinit create mode 100755 features.in/init/rootfs/image-scripts.d/50-var-run-fix diff --git a/features.in/init/live/image-scripts.d/50-var-run-fix b/features.in/init/live/image-scripts.d/50-var-run-fix new file mode 100755 index 0000000000..57a07b3152 --- /dev/null +++ b/features.in/init/live/image-scripts.d/50-var-run-fix @@ -0,0 +1,9 @@ +#!/bin/sh + +# this was a bunch of dirty complaints +sed -i 's,/var/run,/run,' /{etc,lib}/tmpfiles.d/*.conf ||: + +[ ! -L /var/run ] && rm -r /var/run && ln -s ../run /var/run +[ ! -L /var/lock ] && rm -r /var/lock && ln -s ../run/lock /var/lock + +: diff --git a/features.in/init/rescue/image-scripts.d/50-sysvinit b/features.in/init/rescue/image-scripts.d/50-sysvinit deleted file mode 100755 index 6be4c3bd31..0000000000 --- a/features.in/init/rescue/image-scripts.d/50-sysvinit +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -# the part below relates to sysvinit specifically -rpm -q sysvinit || exit 0 - -# this was a bunch of dirty complaints -sed -i 's,/var/run,/run,' /{etc,lib}/tmpfiles.d/*.conf ||: - -# https://bugzilla.altlinux.org/35350 -# this FAILS: no symlinks... -#rm -rf /var/run /var/lock -# ...so just revert what's been broken in failsystem package -mkdir -p /var/run /var/lock/{serial,subsys,uucp} -chmod 0770 /var/lock/subsys -chmod 0770 /var/lock/{serial,uucp} -chgrp uucp /var/lock/{serial,uucp} diff --git a/features.in/init/rescue/image-scripts.d/50-var-run-fix b/features.in/init/rescue/image-scripts.d/50-var-run-fix new file mode 100755 index 0000000000..57a07b3152 --- /dev/null +++ b/features.in/init/rescue/image-scripts.d/50-var-run-fix @@ -0,0 +1,9 @@ +#!/bin/sh + +# this was a bunch of dirty complaints +sed -i 's,/var/run,/run,' /{etc,lib}/tmpfiles.d/*.conf ||: + +[ ! -L /var/run ] && rm -r /var/run && ln -s ../run /var/run +[ ! -L /var/lock ] && rm -r /var/lock && ln -s ../run/lock /var/lock + +: diff --git a/features.in/init/rootfs/image-scripts.d/40-sysvinit b/features.in/init/rootfs/image-scripts.d/40-sysvinit deleted file mode 100755 index 40aeb68bad..0000000000 --- a/features.in/init/rootfs/image-scripts.d/40-sysvinit +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -# 40: should run before 50-users in deflogin - -# the part below relates to sysvinit specifically -rpm -q sysvinit || exit 0 - -# NM-specific group -case "$GLOBAL_GROUPS" in - *_nmconnect*) groupadd -r _nmconnect ||:;; -esac diff --git a/features.in/init/rootfs/image-scripts.d/50-sysvinit b/features.in/init/rootfs/image-scripts.d/50-sysvinit deleted file mode 100755 index 390d490f47..0000000000 --- a/features.in/init/rootfs/image-scripts.d/50-sysvinit +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh -# 40: should run before 50-users in deflogin - -# the part below relates to sysvinit specifically -rpm -q sysvinit || exit 0 - -# NM-specific group -case "$GLOBAL_GROUPS" in - *_nmconnect*) groupadd -r _nmconnect ||:;; -esac - -# this was a bunch of dirty complaints -sed -i 's,/var/run,/run,' /{etc,lib}/tmpfiles.d/*.conf ||: - -# https://bugzilla.altlinux.org/35350 -# this FAILS: no symlinks... -#rm -rf /var/run /var/lock -# ...so just revert what's been broken in failsystem package -mkdir -p /var/run /var/lock/{serial,subsys,uucp} -chmod 0770 /var/lock/subsys -chmod 0770 /var/lock/{serial,uucp} -chgrp uucp /var/lock/{serial,uucp} diff --git a/features.in/init/rootfs/image-scripts.d/50-var-run-fix b/features.in/init/rootfs/image-scripts.d/50-var-run-fix new file mode 100755 index 0000000000..57a07b3152 --- /dev/null +++ b/features.in/init/rootfs/image-scripts.d/50-var-run-fix @@ -0,0 +1,9 @@ +#!/bin/sh + +# this was a bunch of dirty complaints +sed -i 's,/var/run,/run,' /{etc,lib}/tmpfiles.d/*.conf ||: + +[ ! -L /var/run ] && rm -r /var/run && ln -s ../run /var/run +[ ! -L /var/lock ] && rm -r /var/lock && ln -s ../run/lock /var/lock + +: -- 2.21.0
next reply other threads:[~2019-12-04 15:13 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-12-04 15:13 Антон Мидюков [this message] 2019-12-04 16:12 ` Michael Shigorin 2019-12-04 16:21 ` Антон Мидюков
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=45f66149-5705-1bbf-bc3e-c86ec573008a@ya.ru \ --to=midyukov-anton@ya.ru \ --cc=devel-distro@lists.altlinux.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Distributions development This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/devel-distro/0 devel-distro/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 devel-distro devel-distro/ http://lore.altlinux.org/devel-distro \ devel-distro@lists.altlinux.org devel-distro@lists.altlinux.ru devel-distro@lists.altlinux.com public-inbox-index devel-distro Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.devel-distro AGPL code for this site: git clone https://public-inbox.org/public-inbox.git