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

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

    <bug>
          <bug_id>40802</bug_id>
          
          <creation_ts>2021-08-23 14:13:18 +0300</creation_ts>
          <short_desc>бессмысленный запуск ldconfig при загрузке с LiveCD</short_desc>
          <delta_ts>2024-05-09 17:07:39 +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>mkimage-profiles</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></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexey Sheplyakov">asheplyakov</reporter>
          <assigned_to name="Антон Мидюков">antohami</assigned_to>
          <cc>antohami</cc>
    
    <cc>mike</cc>
    
    <cc>sem</cc>
    
    <cc>shaba</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>201967</commentid>
    <comment_count>0</comment_count>
    <who name="Alexey Sheplyakov">asheplyakov</who>
    <bug_when>2021-08-23 14:13:18 +0300</bug_when>
    <thetext># systemd-analyze critical-chain 
graphical.target @8.265s
└─lightdm.service @8.220s +43ms
  └─systemd-user-sessions.service @5.054s +6ms
    └─network.target @5.051s
      └─NetworkManager.service @4.770s +280ms
        └─network.service @4.397s +371ms
          └─sysinit.target @4.373s
            └─systemd-update-done.service @4.368s +5ms
              └─ldconfig.service @1.233s +3.134s
                └─local-fs.target @1.232s
                  └─tmp.mount @1.229s +3ms
                    └─local-fs-pre.target @1.228s
                      └─lvm2-monitor.service @308ms +919ms
                        └─systemd-journald.socket @294ms
                          └─system.slice @284ms
                            └─-.slice @284ms

38% времени тратится впустую на (бессмысленное) выполнение ldconfig.
Можно обойти, загрузившись с

systemd.condition-needs-update=no

но хочется, чтоб работало &quot;из коробки&quot;, без чёрной магии.
Например, чтобы в образе был (пустой) файл /etc/.updated, с mtime более &quot;новым&quot;,
чем у директории /usr (см. man systemd-update-done.service)

P.S. Проблема не только в Simply, но и в Workstation и прочих образах.

P.P.S. На какой пакет можно повесить этот баг?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>209471</commentid>
    <comment_count>1</comment_count>
    <who name="Mikhail Efremov">sem</who>
    <bug_when>2022-04-13 14:22:02 +0300</bug_when>
    <thetext>Навскидку: для live можно добавить прямо в m-p, для устанавливаемых систем - postinstall-скрипт в installer.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>209477</commentid>
    <comment_count>2</comment_count>
    <who name="Антон Мидюков">antohami</who>
    <bug_when>2022-04-13 14:41:10 +0300</bug_when>
    <thetext>(Ответ для Alexey Sheplyakov на комментарий #0)
&gt; но хочется, чтоб работало &quot;из коробки&quot;, без чёрной магии.
&gt; Например, чтобы в образе был (пустой) файл /etc/.updated, с mtime более
&gt; &quot;новым&quot;,
&gt; чем у директории /usr (см. man systemd-update-done.service)

Точно пустой? У меня два одинаковых файла /etc/.updated и /var/.updated:
# This file was created by systemd-update-done. Its only 
# purpose is to hold a timestamp of the time this directory
# was updated. See man:systemd-update-done.service(8).
TIMESTAMP_NSEC=1600057782544812822</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>209505</commentid>
    <comment_count>3</comment_count>
    <who name="Антон Мидюков">antohami</who>
    <bug_when>2022-04-13 17:54:02 +0300</bug_when>
    <thetext>(Ответ для Антон Мидюков на комментарий #2)
&gt; (Ответ для Alexey Sheplyakov на комментарий #0)
&gt; &gt; но хочется, чтоб работало &quot;из коробки&quot;, без чёрной магии.
&gt; &gt; Например, чтобы в образе был (пустой) файл /etc/.updated, с mtime более
&gt; &gt; &quot;новым&quot;,
&gt; &gt; чем у директории /usr (см. man systemd-update-done.service)
&gt; 
&gt; Точно пустой? У меня два одинаковых файла /etc/.updated и /var/.updated:
&gt; # This file was created by systemd-update-done. Its only 
&gt; # purpose is to hold a timestamp of the time this directory
&gt; # was updated. See man:systemd-update-done.service(8).
&gt; TIMESTAMP_NSEC=1600057782544812822

Да, пустые файлы проблему решают. Сделал такой коммит в mkimage-profiles:
https://git.altlinux.org/people/antohami/packages/mkimage-profiles.git?p=mkimage-profiles.git;a=commitdiff;h=4662dc203d14f6c7157ef3ad7e0480196c5e1565</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>209509</commentid>
    <comment_count>4</comment_count>
    <who name="Mikhail Efremov">sem</who>
    <bug_when>2022-04-13 18:04:32 +0300</bug_when>
    <thetext>Вообще у меня некоторые сомнения по этому поводу. Запуск ldconfig действительно выглядит бесполезным в данном случае, но так ведь отключается все действия, завязанные на systemd-update-done.service, насколько я понимаю. Там ведь может быть и что-то важное. Может лучше с ldconfig.service что-то сделать?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>209510</commentid>
    <comment_count>5</comment_count>
    <who name="Антон Мидюков">antohami</who>
    <bug_when>2022-04-13 18:09:49 +0300</bug_when>
    <thetext>(Ответ для Mikhail Efremov на комментарий #4)
&gt; Вообще у меня некоторые сомнения по этому поводу. Запуск ldconfig
&gt; действительно выглядит бесполезным в данном случае, но так ведь отключается
&gt; все действия, завязанные на systemd-update-done.service, насколько я
&gt; понимаю. Там ведь может быть и что-то важное. Может лучше с ldconfig.service
&gt; что-то сделать?

Замаскировать?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>209516</commentid>
    <comment_count>6</comment_count>
    <who name="Mikhail Efremov">sem</who>
    <bug_when>2022-04-13 18:36:37 +0300</bug_when>
    <thetext>Ну как вариант... Может его вообще не паковать? В каких случаях этот сервис может быть нам полезным?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>243684</commentid>
    <comment_count>7</comment_count>
    <who name="Антон Мидюков">antohami</who>
    <bug_when>2024-03-28 11:25:00 +0300</bug_when>
    <thetext>Сделал пакет livecd-no-ldconfig-service https://packages.altlinux.org/ru/sisyphus/srpms/livecd-no-ldconfig-service/
Как попадёт в p10, добавлю в mkimage-profiles в цель use/live.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>246010</commentid>
    <comment_count>8</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2024-05-09 17:07:39 +0300</bug_when>
    <thetext>mkimage-profiles-1.6.4-alt1 -&gt; sisyphus:

 Wed May 08 2024 Anton Midyukov &lt;antohami@altlinux&gt; 1.6.4-alt1
 - live: disable ldconfig.service by using livecd-no-ldconfig.service
   (Closes: 40802)
 - stage2: do not remove cjk and legacy fonts
 - Do not add menu items for SUBPROFILES
 - live: add use/live/rescue/extra as an analogue of use/rescue
 - regular.mk: initial regular-rescue-live
 - install2, live: add missing e2fsprogs
 - cleanup: create postinstall script for cleanup package for live with installer
 - init: add missing mingetty to sysvinit
 - mobile.mk: renaming of targets
 - server-v: apply commits from @andy</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>