From: Alexey Shabalin <a.shabalin@gmail.com> To: ALT Linux Team development discussions <devel@lists.altlinux.org> Subject: Re: [devel] I: sysvinit vs systemd Date: Fri, 24 Dec 2021 20:50:18 +0300 Message-ID: <CAEdvWkTdxPc8x+hbqSp7Afbk9z+iOfoC=uLyPpX1CGAERTSxrA@mail.gmail.com> (raw) In-Reply-To: <20211224003013.GA8630@altlinux.org> пт, 24 дек. 2021 г. в 03:30, Dmitry V. Levin <ldv@altlinux.org>: > > On Fri, Dec 24, 2021 at 03:00:29AM +0300, Dmitry V. Levin wrote: > > On Fri, Dec 24, 2021 at 02:36:45AM +0300, Dmitry V. Levin wrote: > > > On Thu, Dec 23, 2021 at 06:53:56PM +0300, Alexey Shabalin wrote: > > > > чт, 23 дек. 2021 г. в 17:20, Dmitry V. Levin <ldv@altlinux.org>: > > > > > > Дима предложил порядок действий: > > > > > > > > > > > > + В startup ссылки /etc/modules и /etc/sysctl.conf заменяются на > > > > > > зависимости. > > > > > > > > > > > > + Из systemd ссылка /etc/modules-load.d/modules.conf заменяется на > > > > > > зависимость. > > > > > > > > > > > > + В systemd-sysctl-common ссылка /etc/sysctl.d/99-sysctl.conf заменяется > > > > > > на файл и добавляется ссылка /etc/sysctl.conf. > > > > > > > > > > > > + В новом systemd-modules-common добавляется файл > > > > > > /etc/modules-load.d/modules.conf и ссылка /etc/modules на него. > > > > > > > > > > > > + В обоих -common добавляются %pre, которые перемещают заменяемые файлы на > > > > > > новые места. > > > > > > > > > > > > После этого startup перестанет появляться на системах с systemd и > > > > > > вытягивать ненужные зависимости. > > > > > > > > > > Чтобы не было разночтений, я ожидаю, что мантейнер пакета systemd всё это > > > > > исправит. Если он по той или иной причине не сможет, я буду искать того, > > > > > кто сможет. > > > > > > > > Тоже внесу ясность. Я жду от мантейнеров пакета startup предложенных > > > > изменений. Он первый в списке. От изменений в нем зависит все > > > > остальное. > > > > > > $ rpmquery -Rp /ALT/Sisyphus/files/SRPMS/startup-0.9.9.13-alt1.src.rpm > > > rpmlib(PayloadIsLzma) > > > $ rpmquery -Rp /ALT/Sisyphus/files/SRPMS/systemd-249.7-alt5.src.rpm |wc -l > > > 54 > > > > > > На всякий случай при таком раскладе лучше собирать пакет startup > > > последним подзаданием в сборочном задании. > > > > https://git.altlinux.org/people/ldv/packages/?p=startup.git;a=tag;h=0.9.9.14-alt1 > > - я проверил, что этот пакет собирается. https://git.altlinux.org/people/shaba/packages/systemd.git Проверил сборку и обновление. > > PoC, untested: Спасибо. > > %pre -n systemd-modules-common > src=/etc/modules > dst=/etc/modules-load.d/modules.conf > tmp=$dst.rpmmove > rm -f $tmp > if [ -L $dst -a -s $src -a ! -L $src ]; then Убрал проверку -L $dst. Потому что может не быть такого симлинка (напрмер на системах sysv). На самом деле не важно, есть ли там сейчас симлинк, все равно в итоге там должен оказаться файл с содержимым /etc/modules. > mkdir -p ${tmp%/*} Убрал mkdir, т.к. все эти каталоги принадлежат пакету filesystem и обязаны присутствовать в системе. > mv $src $tmp Оказалось что нельзя делать mv. При отсутствии $src выдает ошибку rpm про cpio archive. Заменил на cp. Rpm сам успешно преобразует $src файл в симлинк и дополнительную помощь не приветствует. > fi > > %post -n systemd-modules-common > src=/etc/modules-load.d/modules.conf.rpmmove > dst=/etc/modules-load.d/modules.conf > tmp=$dst.rpmsave > if [ -s $src ]; then > mv $dst $tmp > mv $src $dst > if cmp -s $dst $tmp; then > rm -f $tmp > fi Если мы тут создаем rpmsave вручную, то я еще добавил удаление /etc/modules.rpmsave автоматически создаваемое rpm. > fi > -- Alexey Shabalin
next prev parent reply other threads:[~2021-12-24 17:50 UTC|newest] Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-12-17 12:07 Alexey Gladkov 2021-12-17 12:09 ` Dmitry V. Levin 2021-12-21 17:25 ` Alexey Shabalin 2021-12-21 17:28 ` Антон Мидюков 2021-12-21 17:54 ` Sergey Y. Afonin 2021-12-22 4:00 ` Антон Мидюков 2021-12-17 12:12 ` Dmitry V. Levin 2021-12-17 12:38 ` Sergey V Turchin 2021-12-17 12:43 ` Alexey Gladkov 2021-12-17 12:56 ` Sergey V Turchin 2021-12-17 12:57 ` Anton Farygin 2021-12-17 14:41 ` Sergey V Turchin 2021-12-17 13:07 ` [devel] rpm-macro systemctl --user (was: sysvinit vs systemd) Sergey V Turchin 2021-12-17 13:22 ` Dmitry V. Levin 2021-12-17 13:35 ` Sergey V Turchin 2021-12-17 18:52 ` Dmitry V. Levin 2021-12-17 20:14 ` Alexey V. Vissarionov 2021-12-18 0:15 ` Sergey V Turchin 2021-12-18 13:22 ` Sergey V Turchin 2021-12-18 18:07 ` Alexey V. Vissarionov 2021-12-18 19:35 ` Sergey V Turchin 2021-12-18 0:06 ` Sergey V Turchin 2021-12-20 8:29 ` [devel] I: sysvinit vs systemd Stanislav Levin 2021-12-20 8:39 ` Andrey Savchenko 2021-12-20 8:48 ` Stanislav Levin 2021-12-20 10:00 ` Andrey Savchenko 2021-12-20 15:25 ` [devel] всё как в апстрме Dmitry V. Levin 2021-12-20 16:16 ` Anton Farygin 2021-12-20 16:35 ` Dmitry V. Levin 2021-12-21 12:45 ` [devel] I: sysvinit vs systemd Paul Wolneykien 2021-12-21 12:46 ` Paul Wolneykien 2021-12-21 12:47 ` Anton Farygin 2021-12-21 19:32 ` Антон Мидюков 2021-12-21 20:06 ` Leonid Krivoshein 2021-12-21 20:15 ` Leonid Krivoshein 2021-12-22 4:33 ` Антон Мидюков 2021-12-22 10:14 ` Sergey V Turchin 2021-12-22 10:37 ` Антон Мидюков 2021-12-22 11:00 ` Sergey V Turchin 2021-12-22 12:30 ` Alexey V. Vissarionov 2021-12-22 12:43 ` Sergey V Turchin 2021-12-22 11:01 ` Alexey Gladkov 2021-12-23 14:20 ` Dmitry V. Levin 2021-12-23 15:53 ` Alexey Shabalin 2021-12-23 23:26 ` Alexey Gladkov 2021-12-23 23:36 ` Dmitry V. Levin 2021-12-24 0:00 ` Dmitry V. Levin 2021-12-24 0:30 ` Dmitry V. Levin 2021-12-24 17:50 ` Alexey Shabalin [this message] 2021-12-24 18:04 ` Dmitry V. Levin 2021-12-25 13:35 ` Dmitry V. Levin 2021-12-24 15:07 ` Alexey Shabalin 2021-12-24 15:32 ` Dmitry V. Levin 2021-12-24 17:28 ` Alexey Shabalin 2021-12-24 17:55 ` Dmitry V. Levin 2021-12-26 8:02 ` Alexey V. Vissarionov 2021-12-23 15:59 ` Anton Farygin 2021-12-23 20:19 ` Dmitry V. Levin 2021-12-23 14:03 ` Sergey V Turchin 2021-12-23 14:15 ` Sergey V Turchin
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='CAEdvWkTdxPc8x+hbqSp7Afbk9z+iOfoC=uLyPpX1CGAERTSxrA@mail.gmail.com' \ --to=a.shabalin@gmail.com \ --cc=devel@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 Team development discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/devel/0 devel/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 devel/ http://lore.altlinux.org/devel \ devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru public-inbox-index devel Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.devel AGPL code for this site: git clone https://public-inbox.org/public-inbox.git