* [PATCH V2] systemd: fix a dead link under /var/log
@ 2024-02-04 8:01 changqing.li
2024-02-04 16:57 ` [OE-core] " Peter Kjellerstedt
0 siblings, 1 reply; 3+ messages in thread
From: changqing.li @ 2024-02-04 8:01 UTC (permalink / raw)
To: openembedded-core
From: Changqing Li <changqing.li@windriver.com>
Commit 6fe23ff31c0 changed README to a symlink to README.logs, and
install README.logs under systemd doc dir.
But for OE, systemd doc dir is splited into package systemd-doc, when it
is not installed on the target, there will be an dead link:
Eg:
root@intel-x86-64:/var/log# ls -l README
lrwxrwxrwx 1 root root 39 Jun 20 08:57 README -> ../../usr/share/doc/systemd/README.logs
root@intel-x86-64:/var/log# ls -l ../../usr/share/doc/systemd/README.logs
ls: cannot access '../../usr/share/doc/systemd/README.logs': No such file or directory
Meantime, relative path for a symlink also will meet issue like
"No such file or directory"
Since OE have set ForwardToSyslog=yes, this README is not needed.
So remove this symlink from package systemd
Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
meta/recipes-core/systemd/systemd_255.1.bb | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/meta/recipes-core/systemd/systemd_255.1.bb b/meta/recipes-core/systemd/systemd_255.1.bb
index 9e09c89355..3669d3cdc8 100644
--- a/meta/recipes-core/systemd/systemd_255.1.bb
+++ b/meta/recipes-core/systemd/systemd_255.1.bb
@@ -386,6 +386,10 @@ do_install() {
sed -i -e 's/#RebootWatchdogSec=10min/RebootWatchdogSec=${WATCHDOG_TIMEOUT}/' \
${D}/${sysconfdir}/systemd/system.conf
fi
+
+ if [ -f "${D}${prefix}/lib/tmpfiles.d/legacy.conf" ]; then
+ sed -i -e '/^L \/var\/log\/README/d' ${D}${prefix}/lib/tmpfiles.d/legacy.conf
+ fi
}
python populate_packages:prepend (){
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [OE-core] [PATCH V2] systemd: fix a dead link under /var/log
2024-02-04 8:01 [PATCH V2] systemd: fix a dead link under /var/log changqing.li
@ 2024-02-04 16:57 ` Peter Kjellerstedt
2024-02-07 8:35 ` Changqing Li
0 siblings, 1 reply; 3+ messages in thread
From: Peter Kjellerstedt @ 2024-02-04 16:57 UTC (permalink / raw)
To: Changqing Li, openembedded-core
> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> On Behalf Of Changqing Li
> Sent: den 4 februari 2024 09:01
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCH V2] systemd: fix a dead link under /var/log
>
> From: Changqing Li <changqing.li@windriver.com>
>
> Commit 6fe23ff31c0 changed README to a symlink to README.logs, and
> install README.logs under systemd doc dir.
>
> But for OE, systemd doc dir is splited into package systemd-doc, when it
> is not installed on the target, there will be an dead link:
> Eg:
> root@intel-x86-64:/var/log# ls -l README
> lrwxrwxrwx 1 root root 39 Jun 20 08:57 README -> ../../usr/share/doc/systemd/README.logs
> root@intel-x86-64:/var/log# ls -l ../../usr/share/doc/systemd/README.logs
> ls: cannot access '../../usr/share/doc/systemd/README.logs': No such file or directory
>
> Meantime, relative path for a symlink also will meet issue like
> "No such file or directory"
>
> Since OE have set ForwardToSyslog=yes, this README is not needed.
> So remove this symlink from package systemd
Wouldn't it make more sense to package the link in the systemd-doc
package, along with the rest of the documentation?
>
> Signed-off-by: Changqing Li <changqing.li@windriver.com>
> ---
> meta/recipes-core/systemd/systemd_255.1.bb | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/meta/recipes-core/systemd/systemd_255.1.bb b/meta/recipes-core/systemd/systemd_255.1.bb
> index 9e09c89355..3669d3cdc8 100644
> --- a/meta/recipes-core/systemd/systemd_255.1.bb
> +++ b/meta/recipes-core/systemd/systemd_255.1.bb
> @@ -386,6 +386,10 @@ do_install() {
> sed -i -e 's/#RebootWatchdogSec=10min/RebootWatchdogSec=${WATCHDOG_TIMEOUT}/' \
> ${D}/${sysconfdir}/systemd/system.conf
> fi
> +
> + if [ -f "${D}${prefix}/lib/tmpfiles.d/legacy.conf" ]; then
> + sed -i -e '/^L \/var\/log\/README/d' ${D}${prefix}/lib/tmpfiles.d/legacy.conf
> + fi
> }
>
> python populate_packages:prepend (){
> --
> 2.25.1
//Peter
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [OE-core] [PATCH V2] systemd: fix a dead link under /var/log
2024-02-04 16:57 ` [OE-core] " Peter Kjellerstedt
@ 2024-02-07 8:35 ` Changqing Li
0 siblings, 0 replies; 3+ messages in thread
From: Changqing Li @ 2024-02-07 8:35 UTC (permalink / raw)
To: Peter Kjellerstedt, Changqing Li, openembedded-core
On 2/5/24 00:57, Peter Kjellerstedt 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.
>
>> -----Original Message-----
>> From: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> On Behalf Of Changqing Li
>> Sent: den 4 februari 2024 09:01
>> To: openembedded-core@lists.openembedded.org
>> Subject: [OE-core] [PATCH V2] systemd: fix a dead link under /var/log
>>
>> From: Changqing Li <changqing.li@windriver.com>
>>
>> Commit 6fe23ff31c0 changed README to a symlink to README.logs, and
>> install README.logs under systemd doc dir.
>>
>> But for OE, systemd doc dir is splited into package systemd-doc, when it
>> is not installed on the target, there will be an dead link:
>> Eg:
>> root@intel-x86-64:/var/log# ls -l README
>> lrwxrwxrwx 1 root root 39 Jun 20 08:57 README -> ../../usr/share/doc/systemd/README.logs
>> root@intel-x86-64:/var/log# ls -l ../../usr/share/doc/systemd/README.logs
>> ls: cannot access '../../usr/share/doc/systemd/README.logs': No such file or directory
>>
>> Meantime, relative path for a symlink also will meet issue like
>> "No such file or directory"
>>
>> Since OE have set ForwardToSyslog=yes, this README is not needed.
>> So remove this symlink from package systemd
> Wouldn't it make more sense to package the link in the systemd-doc
> package, along with the rest of the documentation?
Thanks, V3 is sent.
Regards
Changqing
>
>> Signed-off-by: Changqing Li <changqing.li@windriver.com>
>> ---
>> meta/recipes-core/systemd/systemd_255.1.bb | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/meta/recipes-core/systemd/systemd_255.1.bb b/meta/recipes-core/systemd/systemd_255.1.bb
>> index 9e09c89355..3669d3cdc8 100644
>> --- a/meta/recipes-core/systemd/systemd_255.1.bb
>> +++ b/meta/recipes-core/systemd/systemd_255.1.bb
>> @@ -386,6 +386,10 @@ do_install() {
>> sed -i -e 's/#RebootWatchdogSec=10min/RebootWatchdogSec=${WATCHDOG_TIMEOUT}/' \
>> ${D}/${sysconfdir}/systemd/system.conf
>> fi
>> +
>> + if [ -f "${D}${prefix}/lib/tmpfiles.d/legacy.conf" ]; then
>> + sed -i -e '/^L \/var\/log\/README/d' ${D}${prefix}/lib/tmpfiles.d/legacy.conf
>> + fi
>> }
>>
>> python populate_packages:prepend (){
>> --
>> 2.25.1
> //Peter
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-02-07 8:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-04 8:01 [PATCH V2] systemd: fix a dead link under /var/log changqing.li
2024-02-04 16:57 ` [OE-core] " Peter Kjellerstedt
2024-02-07 8:35 ` Changqing Li
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.