* [rocko][sumo][master][PATCH 1/2] bitbake.conf: add PERSISTENT_LOG_DIR variable
@ 2018-08-18 0:59 Ankur Tyagi
2018-08-18 0:59 ` [rocko][sumo][master][PATCH 2/2] base-files: respect PERSISTENT_LOG_DIR Ankur Tyagi
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Ankur Tyagi @ 2018-08-18 0:59 UTC (permalink / raw)
To: openembedded-core; +Cc: Ankur Tyagi
This variable is only respected when VOLATILE_LOG_DIR is "no".
The default value is "" which results in the /var/log being log directory.
The user could override this value to a path e.g "/home/root/log" which
results /var/log being a link pointing to /home/root/log directory on
persistent storage.
Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
---
meta/conf/bitbake.conf | 2 ++
1 file changed, 2 insertions(+)
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index e5dc1ac..9db22c8 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -88,6 +88,8 @@ ROOT_HOME ??= "/home/root"
# If set to boolean true ('yes', 'y', 'true', 't', '1'), /var/log links to /var/volatile/log.
# If set to boolean false ('no', 'n', 'false', 'f', '0'), /var/log is on persistent storage.
VOLATILE_LOG_DIR ?= "yes"
+# If VOLATILE_LOG_DIR is false and PERSISTENT_LOG_DIR is set, /var/log links to PERSISTENT_LOG_DIR
+PERSISTENT_LOG_DIR ??= ""
##################################################################
# Architecture-dependent build variables.
--
2.7.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [rocko][sumo][master][PATCH 2/2] base-files: respect PERSISTENT_LOG_DIR
2018-08-18 0:59 [rocko][sumo][master][PATCH 1/2] bitbake.conf: add PERSISTENT_LOG_DIR variable Ankur Tyagi
@ 2018-08-18 0:59 ` Ankur Tyagi
2018-08-24 21:08 ` Ankur Tyagi
2018-08-25 0:16 ` Khem Raj
2018-08-20 1:53 ` [rocko][sumo][master][PATCH 1/2] bitbake.conf: add PERSISTENT_LOG_DIR variable ChenQi
2018-08-24 21:07 ` Ankur Tyagi
2 siblings, 2 replies; 12+ messages in thread
From: Ankur Tyagi @ 2018-08-18 0:59 UTC (permalink / raw)
To: openembedded-core; +Cc: Ankur Tyagi
Respect PERSISTENT_LOG_DIR variable. In this way, if the user overrides
this variable to be e.g "/home/root/log", /var/log on the final image would
be a link pointing to /home/root/log on persistent storage.
Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
---
meta/recipes-core/base-files/base-files_3.0.14.bb | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb
index 1c0863b..597fdaa 100644
--- a/meta/recipes-core/base-files/base-files_3.0.14.bb
+++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
@@ -42,7 +42,7 @@ dirs755 = "/boot /dev ${base_bindir} ${base_sbindir} ${base_libdir} \
${localstatedir}/backups ${localstatedir}/lib \
/sys ${localstatedir}/lib/misc ${localstatedir}/spool \
${localstatedir}/volatile \
- ${localstatedir}/${@'volatile/' if oe.types.boolean('${VOLATILE_LOG_DIR}') else ''}log \
+ ${@'${localstatedir}/volatile/log' if oe.types.boolean('${VOLATILE_LOG_DIR}') else '${PERSISTENT_LOG_DIR}' if d.getVar('PERSISTENT_LOG_DIR') else '${localstatedir}/log' } \
/home ${prefix}/src ${localstatedir}/local \
/media"
@@ -106,6 +106,10 @@ do_install () {
ln -sf volatile/$d ${D}${localstatedir}/$d
done
+ if [ ${@ oe.types.boolean('${VOLATILE_LOG_DIR}') } = False -a ! -z ${PERSISTENT_LOG_DIR} ]; then
+ ln -sf ${PERSISTENT_LOG_DIR} ${D}/${localstatedir}/log
+ fi
+
ln -snf ../run ${D}${localstatedir}/run
ln -snf ../run/lock ${D}${localstatedir}/lock
--
2.7.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [rocko][sumo][master][PATCH 1/2] bitbake.conf: add PERSISTENT_LOG_DIR variable
2018-08-18 0:59 [rocko][sumo][master][PATCH 1/2] bitbake.conf: add PERSISTENT_LOG_DIR variable Ankur Tyagi
2018-08-18 0:59 ` [rocko][sumo][master][PATCH 2/2] base-files: respect PERSISTENT_LOG_DIR Ankur Tyagi
@ 2018-08-20 1:53 ` ChenQi
2018-08-20 9:12 ` Ankur Tyagi
2018-08-24 21:07 ` Ankur Tyagi
2 siblings, 1 reply; 12+ messages in thread
From: ChenQi @ 2018-08-20 1:53 UTC (permalink / raw)
To: Ankur Tyagi, openembedded-core
The requirement is to put logs into directories other than /var/log.
Could it be achieved by modifying the syslog daemon configuration file
(e.g. /etc/syslog.conf) to replace /var/log with the specified
directory. Maybe the corresponding logrotate configuration file also
needs to be modified.
Best Regards,
Chen Qi
On 08/18/2018 08:59 AM, Ankur Tyagi wrote:
> This variable is only respected when VOLATILE_LOG_DIR is "no".
>
> The default value is "" which results in the /var/log being log directory.
>
> The user could override this value to a path e.g "/home/root/log" which
> results /var/log being a link pointing to /home/root/log directory on
> persistent storage.
>
> Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
> ---
> meta/conf/bitbake.conf | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> index e5dc1ac..9db22c8 100644
> --- a/meta/conf/bitbake.conf
> +++ b/meta/conf/bitbake.conf
> @@ -88,6 +88,8 @@ ROOT_HOME ??= "/home/root"
> # If set to boolean true ('yes', 'y', 'true', 't', '1'), /var/log links to /var/volatile/log.
> # If set to boolean false ('no', 'n', 'false', 'f', '0'), /var/log is on persistent storage.
> VOLATILE_LOG_DIR ?= "yes"
> +# If VOLATILE_LOG_DIR is false and PERSISTENT_LOG_DIR is set, /var/log links to PERSISTENT_LOG_DIR
> +PERSISTENT_LOG_DIR ??= ""
>
> ##################################################################
> # Architecture-dependent build variables.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [rocko][sumo][master][PATCH 1/2] bitbake.conf: add PERSISTENT_LOG_DIR variable
2018-08-20 1:53 ` [rocko][sumo][master][PATCH 1/2] bitbake.conf: add PERSISTENT_LOG_DIR variable ChenQi
@ 2018-08-20 9:12 ` Ankur Tyagi
2018-08-22 8:11 ` Ankur Tyagi
0 siblings, 1 reply; 12+ messages in thread
From: Ankur Tyagi @ 2018-08-20 9:12 UTC (permalink / raw)
To: Qi.Chen; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 2050 bytes --]
Initially I thought of doing that but then dropped it because it would
create a dependency on syslog configuration file.
If in future syslog configuration parameter (LOGFILE) gets renamed, then we
need to make corresponding change as well.
I think creating /var/log as a link is a less dependent change.
Let me know your thoughts.
Regards
Ankur
On Mon, Aug 20, 2018 at 1:49 PM ChenQi <Qi.Chen@windriver.com> wrote:
> The requirement is to put logs into directories other than /var/log.
> Could it be achieved by modifying the syslog daemon configuration file
> (e.g. /etc/syslog.conf) to replace /var/log with the specified
> directory. Maybe the corresponding logrotate configuration file also
> needs to be modified.
>
> Best Regards,
> Chen Qi
>
> On 08/18/2018 08:59 AM, Ankur Tyagi wrote:
> > This variable is only respected when VOLATILE_LOG_DIR is "no".
> >
> > The default value is "" which results in the /var/log being log
> directory.
> >
> > The user could override this value to a path e.g "/home/root/log" which
> > results /var/log being a link pointing to /home/root/log directory on
> > persistent storage.
> >
> > Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
> > ---
> > meta/conf/bitbake.conf | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> > index e5dc1ac..9db22c8 100644
> > --- a/meta/conf/bitbake.conf
> > +++ b/meta/conf/bitbake.conf
> > @@ -88,6 +88,8 @@ ROOT_HOME ??= "/home/root"
> > # If set to boolean true ('yes', 'y', 'true', 't', '1'), /var/log
> links to /var/volatile/log.
> > # If set to boolean false ('no', 'n', 'false', 'f', '0'), /var/log is
> on persistent storage.
> > VOLATILE_LOG_DIR ?= "yes"
> > +# If VOLATILE_LOG_DIR is false and PERSISTENT_LOG_DIR is set, /var/log
> links to PERSISTENT_LOG_DIR
> > +PERSISTENT_LOG_DIR ??= ""
> >
> > ##################################################################
> > # Architecture-dependent build variables.
>
>
>
[-- Attachment #2: Type: text/html, Size: 3394 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [rocko][sumo][master][PATCH 1/2] bitbake.conf: add PERSISTENT_LOG_DIR variable
2018-08-20 9:12 ` Ankur Tyagi
@ 2018-08-22 8:11 ` Ankur Tyagi
0 siblings, 0 replies; 12+ messages in thread
From: Ankur Tyagi @ 2018-08-22 8:11 UTC (permalink / raw)
To: Qi.Chen; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 2220 bytes --]
Ping
Regards
Ankur
On Mon 20 Aug, 2018, 9:12 PM Ankur Tyagi, <ankur.tyagi85@gmail.com> wrote:
> Initially I thought of doing that but then dropped it because it would
> create a dependency on syslog configuration file.
> If in future syslog configuration parameter (LOGFILE) gets renamed, then
> we need to make corresponding change as well.
>
> I think creating /var/log as a link is a less dependent change.
>
> Let me know your thoughts.
>
> Regards
> Ankur
>
> On Mon, Aug 20, 2018 at 1:49 PM ChenQi <Qi.Chen@windriver.com> wrote:
>
>> The requirement is to put logs into directories other than /var/log.
>> Could it be achieved by modifying the syslog daemon configuration file
>> (e.g. /etc/syslog.conf) to replace /var/log with the specified
>> directory. Maybe the corresponding logrotate configuration file also
>> needs to be modified.
>>
>> Best Regards,
>> Chen Qi
>>
>> On 08/18/2018 08:59 AM, Ankur Tyagi wrote:
>> > This variable is only respected when VOLATILE_LOG_DIR is "no".
>> >
>> > The default value is "" which results in the /var/log being log
>> directory.
>> >
>> > The user could override this value to a path e.g "/home/root/log" which
>> > results /var/log being a link pointing to /home/root/log directory on
>> > persistent storage.
>> >
>> > Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
>> > ---
>> > meta/conf/bitbake.conf | 2 ++
>> > 1 file changed, 2 insertions(+)
>> >
>> > diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
>> > index e5dc1ac..9db22c8 100644
>> > --- a/meta/conf/bitbake.conf
>> > +++ b/meta/conf/bitbake.conf
>> > @@ -88,6 +88,8 @@ ROOT_HOME ??= "/home/root"
>> > # If set to boolean true ('yes', 'y', 'true', 't', '1'), /var/log
>> links to /var/volatile/log.
>> > # If set to boolean false ('no', 'n', 'false', 'f', '0'), /var/log is
>> on persistent storage.
>> > VOLATILE_LOG_DIR ?= "yes"
>> > +# If VOLATILE_LOG_DIR is false and PERSISTENT_LOG_DIR is set, /var/log
>> links to PERSISTENT_LOG_DIR
>> > +PERSISTENT_LOG_DIR ??= ""
>> >
>> > ##################################################################
>> > # Architecture-dependent build variables.
>>
>>
>>
[-- Attachment #2: Type: text/html, Size: 3854 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [rocko][sumo][master][PATCH 1/2] bitbake.conf: add PERSISTENT_LOG_DIR variable
2018-08-18 0:59 [rocko][sumo][master][PATCH 1/2] bitbake.conf: add PERSISTENT_LOG_DIR variable Ankur Tyagi
2018-08-18 0:59 ` [rocko][sumo][master][PATCH 2/2] base-files: respect PERSISTENT_LOG_DIR Ankur Tyagi
2018-08-20 1:53 ` [rocko][sumo][master][PATCH 1/2] bitbake.conf: add PERSISTENT_LOG_DIR variable ChenQi
@ 2018-08-24 21:07 ` Ankur Tyagi
2 siblings, 0 replies; 12+ messages in thread
From: Ankur Tyagi @ 2018-08-24 21:07 UTC (permalink / raw)
To: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 1282 bytes --]
Ping
Regards
Ankur
On Sat 18 Aug, 2018, 12:59 PM Ankur Tyagi, <ankur.tyagi85@gmail.com> wrote:
> This variable is only respected when VOLATILE_LOG_DIR is "no".
>
> The default value is "" which results in the /var/log being log directory.
>
> The user could override this value to a path e.g "/home/root/log" which
> results /var/log being a link pointing to /home/root/log directory on
> persistent storage.
>
> Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
> ---
> meta/conf/bitbake.conf | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> index e5dc1ac..9db22c8 100644
> --- a/meta/conf/bitbake.conf
> +++ b/meta/conf/bitbake.conf
> @@ -88,6 +88,8 @@ ROOT_HOME ??= "/home/root"
> # If set to boolean true ('yes', 'y', 'true', 't', '1'), /var/log links
> to /var/volatile/log.
> # If set to boolean false ('no', 'n', 'false', 'f', '0'), /var/log is on
> persistent storage.
> VOLATILE_LOG_DIR ?= "yes"
> +# If VOLATILE_LOG_DIR is false and PERSISTENT_LOG_DIR is set, /var/log
> links to PERSISTENT_LOG_DIR
> +PERSISTENT_LOG_DIR ??= ""
>
> ##################################################################
> # Architecture-dependent build variables.
> --
> 2.7.4
>
>
[-- Attachment #2: Type: text/html, Size: 1916 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [rocko][sumo][master][PATCH 2/2] base-files: respect PERSISTENT_LOG_DIR
2018-08-18 0:59 ` [rocko][sumo][master][PATCH 2/2] base-files: respect PERSISTENT_LOG_DIR Ankur Tyagi
@ 2018-08-24 21:08 ` Ankur Tyagi
2018-08-25 0:16 ` Khem Raj
1 sibling, 0 replies; 12+ messages in thread
From: Ankur Tyagi @ 2018-08-24 21:08 UTC (permalink / raw)
To: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 1894 bytes --]
Ping
Regards
Ankur
On Sat 18 Aug, 2018, 12:59 PM Ankur Tyagi, <ankur.tyagi85@gmail.com> wrote:
> Respect PERSISTENT_LOG_DIR variable. In this way, if the user overrides
> this variable to be e.g "/home/root/log", /var/log on the final image would
> be a link pointing to /home/root/log on persistent storage.
>
> Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
> ---
> meta/recipes-core/base-files/base-files_3.0.14.bb | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb
> b/meta/recipes-core/base-files/base-files_3.0.14.bb
> index 1c0863b..597fdaa 100644
> --- a/meta/recipes-core/base-files/base-files_3.0.14.bb
> +++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
> @@ -42,7 +42,7 @@ dirs755 = "/boot /dev ${base_bindir} ${base_sbindir}
> ${base_libdir} \
> ${localstatedir}/backups ${localstatedir}/lib \
> /sys ${localstatedir}/lib/misc ${localstatedir}/spool \
> ${localstatedir}/volatile \
> - ${localstatedir}/${@'volatile/' if
> oe.types.boolean('${VOLATILE_LOG_DIR}') else ''}log \
> + ${@'${localstatedir}/volatile/log' if
> oe.types.boolean('${VOLATILE_LOG_DIR}') else '${PERSISTENT_LOG_DIR}' if
> d.getVar('PERSISTENT_LOG_DIR') else '${localstatedir}/log' } \
> /home ${prefix}/src ${localstatedir}/local \
> /media"
>
> @@ -106,6 +106,10 @@ do_install () {
> ln -sf volatile/$d ${D}${localstatedir}/$d
> done
>
> + if [ ${@ oe.types.boolean('${VOLATILE_LOG_DIR}') } = False -a ! -z
> ${PERSISTENT_LOG_DIR} ]; then
> + ln -sf ${PERSISTENT_LOG_DIR} ${D}/${localstatedir}/log
> + fi
> +
> ln -snf ../run ${D}${localstatedir}/run
> ln -snf ../run/lock ${D}${localstatedir}/lock
>
> --
> 2.7.4
>
>
[-- Attachment #2: Type: text/html, Size: 2944 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [rocko][sumo][master][PATCH 2/2] base-files: respect PERSISTENT_LOG_DIR
2018-08-18 0:59 ` [rocko][sumo][master][PATCH 2/2] base-files: respect PERSISTENT_LOG_DIR Ankur Tyagi
2018-08-24 21:08 ` Ankur Tyagi
@ 2018-08-25 0:16 ` Khem Raj
2018-08-27 19:45 ` Ankur Tyagi
1 sibling, 1 reply; 12+ messages in thread
From: Khem Raj @ 2018-08-25 0:16 UTC (permalink / raw)
To: Ankur Tyagi; +Cc: Patches and discussions about the oe-core layer
On Fri, Aug 17, 2018 at 6:00 PM Ankur Tyagi <ankur.tyagi85@gmail.com> wrote:
>
> Respect PERSISTENT_LOG_DIR variable. In this way, if the user overrides
> this variable to be e.g "/home/root/log", /var/log on the final image would
> be a link pointing to /home/root/log on persistent storage.
>
I would suggest to stick with VOLATILE_BINDS
> Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
> ---
> meta/recipes-core/base-files/base-files_3.0.14.bb | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb
> index 1c0863b..597fdaa 100644
> --- a/meta/recipes-core/base-files/base-files_3.0.14.bb
> +++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
> @@ -42,7 +42,7 @@ dirs755 = "/boot /dev ${base_bindir} ${base_sbindir} ${base_libdir} \
> ${localstatedir}/backups ${localstatedir}/lib \
> /sys ${localstatedir}/lib/misc ${localstatedir}/spool \
> ${localstatedir}/volatile \
> - ${localstatedir}/${@'volatile/' if oe.types.boolean('${VOLATILE_LOG_DIR}') else ''}log \
> + ${@'${localstatedir}/volatile/log' if oe.types.boolean('${VOLATILE_LOG_DIR}') else '${PERSISTENT_LOG_DIR}' if d.getVar('PERSISTENT_LOG_DIR') else '${localstatedir}/log' } \
> /home ${prefix}/src ${localstatedir}/local \
> /media"
>
> @@ -106,6 +106,10 @@ do_install () {
> ln -sf volatile/$d ${D}${localstatedir}/$d
> done
>
> + if [ ${@ oe.types.boolean('${VOLATILE_LOG_DIR}') } = False -a ! -z ${PERSISTENT_LOG_DIR} ]; then
> + ln -sf ${PERSISTENT_LOG_DIR} ${D}/${localstatedir}/log
> + fi
> +
> ln -snf ../run ${D}${localstatedir}/run
> ln -snf ../run/lock ${D}${localstatedir}/lock
>
> --
> 2.7.4
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [rocko][sumo][master][PATCH 2/2] base-files: respect PERSISTENT_LOG_DIR
2018-08-25 0:16 ` Khem Raj
@ 2018-08-27 19:45 ` Ankur Tyagi
2018-08-30 8:34 ` Ankur Tyagi
0 siblings, 1 reply; 12+ messages in thread
From: Ankur Tyagi @ 2018-08-27 19:45 UTC (permalink / raw)
To: Khem Raj; +Cc: openembedded-core
On Sat, Aug 25, 2018 at 12:17 PM Khem Raj <raj.khem@gmail.com> wrote:
>
> On Fri, Aug 17, 2018 at 6:00 PM Ankur Tyagi <ankur.tyagi85@gmail.com> wrote:
> >
> > Respect PERSISTENT_LOG_DIR variable. In this way, if the user overrides
> > this variable to be e.g "/home/root/log", /var/log on the final image would
> > be a link pointing to /home/root/log on persistent storage.
> >
>
> I would suggest to stick with VOLATILE_BINDS
But this won't help with VOLATILE_LOG_DIR set as "no".
I think it is a common requirement to have persistent logging mounted
in a separate partition.
This patch makes it easy (hopefully) for the user to achieve the above
without any additional recipe.
>
> > Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
> > ---
> > meta/recipes-core/base-files/base-files_3.0.14.bb | 6 +++++-
> > 1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb
> > index 1c0863b..597fdaa 100644
> > --- a/meta/recipes-core/base-files/base-files_3.0.14.bb
> > +++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
> > @@ -42,7 +42,7 @@ dirs755 = "/boot /dev ${base_bindir} ${base_sbindir} ${base_libdir} \
> > ${localstatedir}/backups ${localstatedir}/lib \
> > /sys ${localstatedir}/lib/misc ${localstatedir}/spool \
> > ${localstatedir}/volatile \
> > - ${localstatedir}/${@'volatile/' if oe.types.boolean('${VOLATILE_LOG_DIR}') else ''}log \
> > + ${@'${localstatedir}/volatile/log' if oe.types.boolean('${VOLATILE_LOG_DIR}') else '${PERSISTENT_LOG_DIR}' if d.getVar('PERSISTENT_LOG_DIR') else '${localstatedir}/log' } \
> > /home ${prefix}/src ${localstatedir}/local \
> > /media"
> >
> > @@ -106,6 +106,10 @@ do_install () {
> > ln -sf volatile/$d ${D}${localstatedir}/$d
> > done
> >
> > + if [ ${@ oe.types.boolean('${VOLATILE_LOG_DIR}') } = False -a ! -z ${PERSISTENT_LOG_DIR} ]; then
> > + ln -sf ${PERSISTENT_LOG_DIR} ${D}/${localstatedir}/log
> > + fi
> > +
> > ln -snf ../run ${D}${localstatedir}/run
> > ln -snf ../run/lock ${D}${localstatedir}/lock
> >
> > --
> > 2.7.4
> >
> > --
> > _______________________________________________
> > Openembedded-core mailing list
> > Openembedded-core@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [rocko][sumo][master][PATCH 2/2] base-files: respect PERSISTENT_LOG_DIR
2018-08-27 19:45 ` Ankur Tyagi
@ 2018-08-30 8:34 ` Ankur Tyagi
2018-08-30 8:38 ` Khem Raj
0 siblings, 1 reply; 12+ messages in thread
From: Ankur Tyagi @ 2018-08-30 8:34 UTC (permalink / raw)
To: Khem Raj; +Cc: openembedded-core
Hi Khem,
Is this patch being accepted ?
regards
Ankur
On Tue, Aug 28, 2018 at 7:45 AM Ankur Tyagi <ankur.tyagi85@gmail.com> wrote:
>
> On Sat, Aug 25, 2018 at 12:17 PM Khem Raj <raj.khem@gmail.com> wrote:
> >
> > On Fri, Aug 17, 2018 at 6:00 PM Ankur Tyagi <ankur.tyagi85@gmail.com> wrote:
> > >
> > > Respect PERSISTENT_LOG_DIR variable. In this way, if the user overrides
> > > this variable to be e.g "/home/root/log", /var/log on the final image would
> > > be a link pointing to /home/root/log on persistent storage.
> > >
> >
> > I would suggest to stick with VOLATILE_BINDS
>
> But this won't help with VOLATILE_LOG_DIR set as "no".
> I think it is a common requirement to have persistent logging mounted
> in a separate partition.
> This patch makes it easy (hopefully) for the user to achieve the above
> without any additional recipe.
>
> >
> > > Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
> > > ---
> > > meta/recipes-core/base-files/base-files_3.0.14.bb | 6 +++++-
> > > 1 file changed, 5 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb
> > > index 1c0863b..597fdaa 100644
> > > --- a/meta/recipes-core/base-files/base-files_3.0.14.bb
> > > +++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
> > > @@ -42,7 +42,7 @@ dirs755 = "/boot /dev ${base_bindir} ${base_sbindir} ${base_libdir} \
> > > ${localstatedir}/backups ${localstatedir}/lib \
> > > /sys ${localstatedir}/lib/misc ${localstatedir}/spool \
> > > ${localstatedir}/volatile \
> > > - ${localstatedir}/${@'volatile/' if oe.types.boolean('${VOLATILE_LOG_DIR}') else ''}log \
> > > + ${@'${localstatedir}/volatile/log' if oe.types.boolean('${VOLATILE_LOG_DIR}') else '${PERSISTENT_LOG_DIR}' if d.getVar('PERSISTENT_LOG_DIR') else '${localstatedir}/log' } \
> > > /home ${prefix}/src ${localstatedir}/local \
> > > /media"
> > >
> > > @@ -106,6 +106,10 @@ do_install () {
> > > ln -sf volatile/$d ${D}${localstatedir}/$d
> > > done
> > >
> > > + if [ ${@ oe.types.boolean('${VOLATILE_LOG_DIR}') } = False -a ! -z ${PERSISTENT_LOG_DIR} ]; then
> > > + ln -sf ${PERSISTENT_LOG_DIR} ${D}/${localstatedir}/log
> > > + fi
> > > +
> > > ln -snf ../run ${D}${localstatedir}/run
> > > ln -snf ../run/lock ${D}${localstatedir}/lock
> > >
> > > --
> > > 2.7.4
> > >
> > > --
> > > _______________________________________________
> > > Openembedded-core mailing list
> > > Openembedded-core@lists.openembedded.org
> > > http://lists.openembedded.org/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [rocko][sumo][master][PATCH 2/2] base-files: respect PERSISTENT_LOG_DIR
2018-08-30 8:34 ` Ankur Tyagi
@ 2018-08-30 8:38 ` Khem Raj
2018-08-30 8:42 ` Ankur Tyagi
0 siblings, 1 reply; 12+ messages in thread
From: Khem Raj @ 2018-08-30 8:38 UTC (permalink / raw)
To: Ankur Tyagi; +Cc: Patches and discussions about the oe-core layer
On Thu, Aug 30, 2018 at 1:34 AM Ankur Tyagi <ankur.tyagi85@gmail.com> wrote:
>
> Hi Khem,
>
> Is this patch being accepted ?
>
I am not convinced if we need this patch as we can do this using volatile binds.
or base-files changes if needed.
> regards
> Ankur
>
> On Tue, Aug 28, 2018 at 7:45 AM Ankur Tyagi <ankur.tyagi85@gmail.com> wrote:
> >
> > On Sat, Aug 25, 2018 at 12:17 PM Khem Raj <raj.khem@gmail.com> wrote:
> > >
> > > On Fri, Aug 17, 2018 at 6:00 PM Ankur Tyagi <ankur.tyagi85@gmail.com> wrote:
> > > >
> > > > Respect PERSISTENT_LOG_DIR variable. In this way, if the user overrides
> > > > this variable to be e.g "/home/root/log", /var/log on the final image would
> > > > be a link pointing to /home/root/log on persistent storage.
> > > >
> > >
> > > I would suggest to stick with VOLATILE_BINDS
> >
> > But this won't help with VOLATILE_LOG_DIR set as "no".
> > I think it is a common requirement to have persistent logging mounted
> > in a separate partition.
> > This patch makes it easy (hopefully) for the user to achieve the above
> > without any additional recipe.
> >
> > >
> > > > Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
> > > > ---
> > > > meta/recipes-core/base-files/base-files_3.0.14.bb | 6 +++++-
> > > > 1 file changed, 5 insertions(+), 1 deletion(-)
> > > >
> > > > diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb
> > > > index 1c0863b..597fdaa 100644
> > > > --- a/meta/recipes-core/base-files/base-files_3.0.14.bb
> > > > +++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
> > > > @@ -42,7 +42,7 @@ dirs755 = "/boot /dev ${base_bindir} ${base_sbindir} ${base_libdir} \
> > > > ${localstatedir}/backups ${localstatedir}/lib \
> > > > /sys ${localstatedir}/lib/misc ${localstatedir}/spool \
> > > > ${localstatedir}/volatile \
> > > > - ${localstatedir}/${@'volatile/' if oe.types.boolean('${VOLATILE_LOG_DIR}') else ''}log \
> > > > + ${@'${localstatedir}/volatile/log' if oe.types.boolean('${VOLATILE_LOG_DIR}') else '${PERSISTENT_LOG_DIR}' if d.getVar('PERSISTENT_LOG_DIR') else '${localstatedir}/log' } \
> > > > /home ${prefix}/src ${localstatedir}/local \
> > > > /media"
> > > >
> > > > @@ -106,6 +106,10 @@ do_install () {
> > > > ln -sf volatile/$d ${D}${localstatedir}/$d
> > > > done
> > > >
> > > > + if [ ${@ oe.types.boolean('${VOLATILE_LOG_DIR}') } = False -a ! -z ${PERSISTENT_LOG_DIR} ]; then
> > > > + ln -sf ${PERSISTENT_LOG_DIR} ${D}/${localstatedir}/log
> > > > + fi
> > > > +
> > > > ln -snf ../run ${D}${localstatedir}/run
> > > > ln -snf ../run/lock ${D}${localstatedir}/lock
> > > >
> > > > --
> > > > 2.7.4
> > > >
> > > > --
> > > > _______________________________________________
> > > > Openembedded-core mailing list
> > > > Openembedded-core@lists.openembedded.org
> > > > http://lists.openembedded.org/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [rocko][sumo][master][PATCH 2/2] base-files: respect PERSISTENT_LOG_DIR
2018-08-30 8:38 ` Khem Raj
@ 2018-08-30 8:42 ` Ankur Tyagi
0 siblings, 0 replies; 12+ messages in thread
From: Ankur Tyagi @ 2018-08-30 8:42 UTC (permalink / raw)
To: Khem Raj; +Cc: openembedded-core
On Thu, Aug 30, 2018 at 8:38 PM Khem Raj <raj.khem@gmail.com> wrote:
>
> On Thu, Aug 30, 2018 at 1:34 AM Ankur Tyagi <ankur.tyagi85@gmail.com> wrote:
> >
> > Hi Khem,
> >
> > Is this patch being accepted ?
> >
>
> I am not convinced if we need this patch as we can do this using volatile binds.
> or base-files changes if needed.
>
How volatile binds will help with VOLATILE_LOG_DIR set as "no" ?
This patch is modifying base-files so that users can simply set a
variable in conf file instead of modifying base-files.
> > regards
> > Ankur
> >
> > On Tue, Aug 28, 2018 at 7:45 AM Ankur Tyagi <ankur.tyagi85@gmail.com> wrote:
> > >
> > > On Sat, Aug 25, 2018 at 12:17 PM Khem Raj <raj.khem@gmail.com> wrote:
> > > >
> > > > On Fri, Aug 17, 2018 at 6:00 PM Ankur Tyagi <ankur.tyagi85@gmail.com> wrote:
> > > > >
> > > > > Respect PERSISTENT_LOG_DIR variable. In this way, if the user overrides
> > > > > this variable to be e.g "/home/root/log", /var/log on the final image would
> > > > > be a link pointing to /home/root/log on persistent storage.
> > > > >
> > > >
> > > > I would suggest to stick with VOLATILE_BINDS
> > >
> > > But this won't help with VOLATILE_LOG_DIR set as "no".
> > > I think it is a common requirement to have persistent logging mounted
> > > in a separate partition.
> > > This patch makes it easy (hopefully) for the user to achieve the above
> > > without any additional recipe.
> > >
> > > >
> > > > > Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
> > > > > ---
> > > > > meta/recipes-core/base-files/base-files_3.0.14.bb | 6 +++++-
> > > > > 1 file changed, 5 insertions(+), 1 deletion(-)
> > > > >
> > > > > diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb
> > > > > index 1c0863b..597fdaa 100644
> > > > > --- a/meta/recipes-core/base-files/base-files_3.0.14.bb
> > > > > +++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
> > > > > @@ -42,7 +42,7 @@ dirs755 = "/boot /dev ${base_bindir} ${base_sbindir} ${base_libdir} \
> > > > > ${localstatedir}/backups ${localstatedir}/lib \
> > > > > /sys ${localstatedir}/lib/misc ${localstatedir}/spool \
> > > > > ${localstatedir}/volatile \
> > > > > - ${localstatedir}/${@'volatile/' if oe.types.boolean('${VOLATILE_LOG_DIR}') else ''}log \
> > > > > + ${@'${localstatedir}/volatile/log' if oe.types.boolean('${VOLATILE_LOG_DIR}') else '${PERSISTENT_LOG_DIR}' if d.getVar('PERSISTENT_LOG_DIR') else '${localstatedir}/log' } \
> > > > > /home ${prefix}/src ${localstatedir}/local \
> > > > > /media"
> > > > >
> > > > > @@ -106,6 +106,10 @@ do_install () {
> > > > > ln -sf volatile/$d ${D}${localstatedir}/$d
> > > > > done
> > > > >
> > > > > + if [ ${@ oe.types.boolean('${VOLATILE_LOG_DIR}') } = False -a ! -z ${PERSISTENT_LOG_DIR} ]; then
> > > > > + ln -sf ${PERSISTENT_LOG_DIR} ${D}/${localstatedir}/log
> > > > > + fi
> > > > > +
> > > > > ln -snf ../run ${D}${localstatedir}/run
> > > > > ln -snf ../run/lock ${D}${localstatedir}/lock
> > > > >
> > > > > --
> > > > > 2.7.4
> > > > >
> > > > > --
> > > > > _______________________________________________
> > > > > Openembedded-core mailing list
> > > > > Openembedded-core@lists.openembedded.org
> > > > > http://lists.openembedded.org/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2018-08-30 8:42 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-18 0:59 [rocko][sumo][master][PATCH 1/2] bitbake.conf: add PERSISTENT_LOG_DIR variable Ankur Tyagi
2018-08-18 0:59 ` [rocko][sumo][master][PATCH 2/2] base-files: respect PERSISTENT_LOG_DIR Ankur Tyagi
2018-08-24 21:08 ` Ankur Tyagi
2018-08-25 0:16 ` Khem Raj
2018-08-27 19:45 ` Ankur Tyagi
2018-08-30 8:34 ` Ankur Tyagi
2018-08-30 8:38 ` Khem Raj
2018-08-30 8:42 ` Ankur Tyagi
2018-08-20 1:53 ` [rocko][sumo][master][PATCH 1/2] bitbake.conf: add PERSISTENT_LOG_DIR variable ChenQi
2018-08-20 9:12 ` Ankur Tyagi
2018-08-22 8:11 ` Ankur Tyagi
2018-08-24 21:07 ` Ankur Tyagi
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.