On Wed, Feb 28, 2024 at 10:43 PM Changqing Li
<changqing...@windriver.com> wrote:
>
>
> On 2/29/24 14:04, Khem Raj wrote:
> > CAUTION: This email comes from a non Wind River email account!
> > Do not click links or open attachments unless you recognize the sender and 
> > know the content is safe.
> >
> > On Wed, Feb 28, 2024 at 9:56 PM Changqing Li
> > <changqing...@eng.windriver.com> wrote:
> >>
> >> On 2/28/24 17:45, Alexander Kanavin wrote:
> >>
> >> CAUTION: This email comes from a non Wind River email account!
> >> Do not click links or open attachments unless you recognize the sender and 
> >> know the content is safe.
> >>
> >> On Wed, 28 Feb 2024 at 04:19, Changqing Li <changqing...@windriver.com> 
> >> wrote:
> >>
> >> 1.
> >>
> >> Currently,  There is one line in /usr/lib/tmpfile.d/legacy.conf(this is in 
> >> package systemd),
> >>
> >> "L /var/log/README - - - - ../../usr/share/doc/systemd/README.logs"
> >>
> >> This line will create an link to "${datadir}/doc/systemd/README.logs" 
> >> during boot,
> >>
> >> and ${datadir}/doc/systemd/README.logs is in package systemd-doc. So there 
> >> will be dead link when systemd-doc is not installed.
> >>
> >> So that's why I create another legacy-doc.conf packaged into systemd-doc
> >>
> >> Then legacy.conf and README.logs should be placed into the same
> >> package. I would suggest that README.logs just goes into main systemd
> >> package. (the other option is placing legacy.conf into systemd-doc,
> >> but that file is not doc-specific, and should stay in systemd package,
> >> especially if more entries are added to it).
> >>
> >> The solution is also good. But package "${docdir}/systemd/README.logs" in 
> >> package systemd may make things more complicated.
> >>
> >> since in bitabke .conf, ${PN}-doc is before ${PN} in PACKAGES, and  
> >> FILES:${PN}-doc = "${docdir}  ...". we need to adjust the sequence,
> >>
> >> and may have influences to current list of files and directories that are 
> >> placed in a package.
> >>
> >> So maybe this patch is more simple and reasonable, and will not have other 
> >> impact.
> >>
> >> 2.
> >>
> >> The symlink in legacy.conf use relative path.  but for oe, when 
> >> VOLATILE_LOG_DIR is true, /var/log is a link to /var/volatile/log, so
> >>
> >> /var/log/README need link to ../../../usr/share/doc/systemd/README.logs,
> >>
> >> while VOLATILE_LOG_DIR is false, /var/log is a dir, so /var/log/README
> >>
> >> need link to ../../usr/share/doc/systemd/README.logs.
> >>
> >> After change it to absolute path, checking of VOLATILE_LOG_DIR is not 
> >> needed.
> >>
> >> That's ok, but can you make fixing the path to an absolute one a
> >> separate, second commit then?
> >>
> >> if  use solution in this patch,  it is better they are in one commit.  I 
> >> can update description more detail.
> >>
> > You could also explore using -Dcreate-log-dirs=false via EXTRA_OEMESON
>
> Thanks. I had do some research about turn off CREATE_LOG_DIR,
>
> if turn off CREATE_LOG_DIR, " /var/log/journal/" will not be created.
> By default,  VOLATILE__LOG_DIR = "yes",  this change will have no
> influence, since we will remove content under /var/log.
>
> if VOLATILE_LOG_DIR set to "no", the current default behavior will be
> changed,  log will saved from persistent  to memory.   our default
> Storage set to auto,  if " /var/log/journal/" not exist, the log will
>
> save  in memory /run/log/journal.  Refer [1].  So I did not try to turn
> off it in case current default behavior is changed.
>

The option -Dcreate-log-dirs will control if systemd build emits
relevant info into generated legacy.conf
or not thats all. Whatever logic you have in OE is high level which
might be covering it across the distro. so
what I am suggesting is to use the meson option to control it when
building systemd, the knob logic
to apply it will depend on OE's logic for log persistence.

> Refer:
>
> [1] https://www.freedesktop.org/software/systemd/man/journald.conf.html
>
> //Changqing
>
> >
> >> Thanks
> >>
> >> Changqing
> >>
> >> Thanks,
> >> Alex
> >>
> >>
> >> 
> >>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#196454): 
https://lists.openembedded.org/g/openembedded-core/message/196454
Mute This Topic: https://lists.openembedded.org/mt/104598170/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to