* [ptxdist] [PATCH] timezone: introduce option TIMEZONE_INSTALL_LOCALTIME for more flexibility with own rules
@ 2012-10-09 16:03 Alexander Dahl
2012-10-09 16:30 ` Michael Olbrich
0 siblings, 1 reply; 5+ messages in thread
From: Alexander Dahl @ 2012-10-09 16:03 UTC (permalink / raw)
To: ptxdist
This patch introduces TIMEZONE_INSTALL_LOCALTIME as variable before
GLIBC_LOCALTIME. You can decide now if you want to install
/etc/localtime and /etc/timezone. I actually used this for a
"depends on !TIMEZONE_INSTALL_LOCALTIME"
in one of my own rules which where I can decide if this is stored in
root filesystem or on a separare data partition with symlinks to it.
Maybe it's handy for the public.
Signed-off-by: Alexander Dahl <post@lespocky.de>
---
rules/timezone.in | 28 ++++++++++++++++++++--------
1 files changed, 20 insertions(+), 8 deletions(-)
diff --git a/rules/timezone.in b/rules/timezone.in
index 09a3d9d..b663d5a 100644
--- a/rules/timezone.in
+++ b/rules/timezone.in
@@ -15,15 +15,27 @@ if TIMEZONE
comment "Timezone support"
-config GLIBC_LOCALTIME
- prompt "Timezone for /etc/localtime and /etc/timezone"
- default "Europe/Berlin"
- string
+menuconfig TIMEZONE_INSTALL_LOCALTIME
+ bool
+ prompt "Install /etc/localtime and /etc/timezone"
+ default y
help
- Where should /etc/localtime point to? (e.g. put in "Europe/Berlin"
- here to let it point to /usr/share/zoneinfo/Europe/Berlin)
- Additionally this value is written to /etc/timezone like on Debian
- or for systemd.
+ Optionally install /etc/localtime as symlink to zoneinfo folder
+ and /etc/timezone for convenient reading of current setting. This
+ determines the system local time.
+
+if TIMEZONE_INSTALL_LOCALTIME
+ config GLIBC_LOCALTIME
+ prompt "Timezone for /etc/localtime and /etc/timezone"
+ default "Europe/Berlin"
+ string
+ help
+ Where should /etc/localtime point to? (e.g. put in
+ "Europe/Berlin" here to let it point to
+ /usr/share/zoneinfo/Europe/Berlin)
+ Additionally this value is written to /etc/timezone like on
+ Debian or for systemd.
+endif
config TIMEZONE_LOCAL_DATABASE
bool
--
1.7.2.5
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ptxdist] [PATCH] timezone: introduce option TIMEZONE_INSTALL_LOCALTIME for more flexibility with own rules
2012-10-09 16:03 [ptxdist] [PATCH] timezone: introduce option TIMEZONE_INSTALL_LOCALTIME for more flexibility with own rules Alexander Dahl
@ 2012-10-09 16:30 ` Michael Olbrich
2012-10-09 16:49 ` Alexander Dahl
2012-10-10 8:59 ` [ptxdist] [PATCH] timezone: rename GLIBC_LOCALTIME and targetinstall only if not empty Alexander Dahl
0 siblings, 2 replies; 5+ messages in thread
From: Michael Olbrich @ 2012-10-09 16:30 UTC (permalink / raw)
To: ptxdist
On Tue, Oct 09, 2012 at 06:03:38PM +0200, Alexander Dahl wrote:
> This patch introduces TIMEZONE_INSTALL_LOCALTIME as variable before
> GLIBC_LOCALTIME. You can decide now if you want to install
> /etc/localtime and /etc/timezone. I actually used this for a
>
> "depends on !TIMEZONE_INSTALL_LOCALTIME"
>
> in one of my own rules which where I can decide if this is stored in
> root filesystem or on a separare data partition with symlinks to it.
>
> Maybe it's handy for the public.
keep is simple:
rename GLIBC_LOCALTIME -> TIMEZONE_LOCALTIME while at it.
and use
ifneq ($(call remove_quotes,$(PTXCONF_TIMEZONE_LOCALTIME)),)
in targetinstall
then you can just use an empty string and
depends on GLIBC_LOCALTIME = ""
in your rules.
Michael
> Signed-off-by: Alexander Dahl <post@lespocky.de>
> ---
> rules/timezone.in | 28 ++++++++++++++++++++--------
> 1 files changed, 20 insertions(+), 8 deletions(-)
>
> diff --git a/rules/timezone.in b/rules/timezone.in
> index 09a3d9d..b663d5a 100644
> --- a/rules/timezone.in
> +++ b/rules/timezone.in
> @@ -15,15 +15,27 @@ if TIMEZONE
>
> comment "Timezone support"
>
> -config GLIBC_LOCALTIME
> - prompt "Timezone for /etc/localtime and /etc/timezone"
> - default "Europe/Berlin"
> - string
> +menuconfig TIMEZONE_INSTALL_LOCALTIME
> + bool
> + prompt "Install /etc/localtime and /etc/timezone"
> + default y
> help
> - Where should /etc/localtime point to? (e.g. put in "Europe/Berlin"
> - here to let it point to /usr/share/zoneinfo/Europe/Berlin)
> - Additionally this value is written to /etc/timezone like on Debian
> - or for systemd.
> + Optionally install /etc/localtime as symlink to zoneinfo folder
> + and /etc/timezone for convenient reading of current setting. This
> + determines the system local time.
> +
> +if TIMEZONE_INSTALL_LOCALTIME
> + config GLIBC_LOCALTIME
> + prompt "Timezone for /etc/localtime and /etc/timezone"
> + default "Europe/Berlin"
> + string
> + help
> + Where should /etc/localtime point to? (e.g. put in
> + "Europe/Berlin" here to let it point to
> + /usr/share/zoneinfo/Europe/Berlin)
> + Additionally this value is written to /etc/timezone like on
> + Debian or for systemd.
> +endif
>
> config TIMEZONE_LOCAL_DATABASE
> bool
> --
> 1.7.2.5
>
>
> --
> ptxdist mailing list
> ptxdist@pengutronix.de
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ptxdist] [PATCH] timezone: introduce option TIMEZONE_INSTALL_LOCALTIME for more flexibility with own rules
2012-10-09 16:30 ` Michael Olbrich
@ 2012-10-09 16:49 ` Alexander Dahl
2012-10-10 8:59 ` [ptxdist] [PATCH] timezone: rename GLIBC_LOCALTIME and targetinstall only if not empty Alexander Dahl
1 sibling, 0 replies; 5+ messages in thread
From: Alexander Dahl @ 2012-10-09 16:49 UTC (permalink / raw)
To: ptxdist
Hei hei,
Am 2012-10-09 18:30, schrieb Michael Olbrich:
> depends on GLIBC_LOCALTIME = ""
I was not aware kconfig allows this, the documentation was not clear
about this. I will have a look into it tomorrow.
Greets
Alex
--
»With the first link, the chain is forged. The first speech censured,
the first thought forbidden, the first freedom denied, chains us all
irrevocably.« (Jean-Luc Picard, quoting Judge Aaron Satie)
*** GnuPG-FP: 02C8 A590 7FE5 CA5F 3601 D1D5 8FBA 7744 CC87 10D0 ***
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ptxdist] [PATCH] timezone: rename GLIBC_LOCALTIME and targetinstall only if not empty
2012-10-09 16:30 ` Michael Olbrich
2012-10-09 16:49 ` Alexander Dahl
@ 2012-10-10 8:59 ` Alexander Dahl
2012-10-12 9:57 ` Michael Olbrich
1 sibling, 1 reply; 5+ messages in thread
From: Alexander Dahl @ 2012-10-10 8:59 UTC (permalink / raw)
To: ptxdist
Revised with fresh morning mind. I could not test the migrate stuff,
please review!
Greets
Alex
Signed-off-by: Alexander Dahl <post@lespocky.de>
---
rules/timezone.in | 5 +++--
rules/timezone.make | 6 +++---
scripts/migrate/migrate_ptx | 6 ++++++
3 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/rules/timezone.in b/rules/timezone.in
index 09a3d9d..1298afc 100644
--- a/rules/timezone.in
+++ b/rules/timezone.in
@@ -15,7 +15,7 @@ if TIMEZONE
comment "Timezone support"
-config GLIBC_LOCALTIME
+config TIMEZONE_LOCALTIME
prompt "Timezone for /etc/localtime and /etc/timezone"
default "Europe/Berlin"
string
@@ -23,7 +23,8 @@ config GLIBC_LOCALTIME
Where should /etc/localtime point to? (e.g. put in "Europe/Berlin"
here to let it point to /usr/share/zoneinfo/Europe/Berlin)
Additionally this value is written to /etc/timezone like on Debian
- or for systemd.
+ or for systemd. Note: if you leave this empty /etc/timezone and
+ /etc/localtime are NOT created.
config TIMEZONE_LOCAL_DATABASE
bool
diff --git a/rules/timezone.make b/rules/timezone.make
index 6625f85..b51e317 100644
--- a/rules/timezone.make
+++ b/rules/timezone.make
@@ -19,7 +19,7 @@ PACKAGES-$(PTXCONF_TIMEZONE) += timezone
TIMEZONE_VERSION := 1.0
TIMEZONE := timezone-$(TIMEZONE_VERSION)
-TIMEZONE_LOCALTIME_FILE := /usr/share/zoneinfo/$(PTXCONF_GLIBC_LOCALTIME)
+TIMEZONE_LOCALTIME_FILE := /usr/share/zoneinfo/$(PTXCONF_TIMEZONE_LOCALTIME)
TIMEZONE-$(PTXCONF_TIMEZONE_AFRICA) := "Africa"
TIMEZONE-$(PTXCONF_TIMEZONE_ATLANTIC) += "Atlantic"
@@ -118,12 +118,12 @@ $(STATEDIR)/timezone.targetinstall:
$(call install_copy, timezone, 0, 0, 0644, -, /usr/share/zoneinfo/$$f,n); \
done
-ifdef PTXCONF_GLIBC_LOCALTIME
+ifneq ($(call remove_quotes,$(PTXCONF_TIMEZONE_LOCALTIME)),)
@$(call install_link, timezone, ..$(TIMEZONE_LOCALTIME_FILE), \
/etc/localtime)
@$(call install_alternative, timezone, 0, 0, 0644, /etc/timezone)
@$(call install_replace, timezone, /etc/timezone, @TIMEZONE@, \
- $(PTXCONF_GLIBC_LOCALTIME))
+ $(PTXCONF_TIMEZONE_LOCALTIME))
endif
@$(call install_finish, timezone)
diff --git a/scripts/migrate/migrate_ptx b/scripts/migrate/migrate_ptx
index 5682890..47f324b 100755
--- a/scripts/migrate/migrate_ptx
+++ b/scripts/migrate/migrate_ptx
@@ -189,3 +189,9 @@ s/^\(\(# \)\?PTXCONF_GLIBC_LOCALTIME\)_LINK\(.*\)/\1\3/
# reason : cleanup
#
s/^\(\(# \)\?PTXCONF_GSTREAMER_\)_\(.*$\)/\1\3/
+
+#
+# symbol : GLIBC_LOCALTIME -> TIMEZONE_LOCALTIME
+# reason : cleanup
+#
+s/^\(\(# \)\?PTXCONF_\)GLIBC\(_LOCALTIME\)/\1TIMEZONE\3/
--
1.7.2.5
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ptxdist] [PATCH] timezone: rename GLIBC_LOCALTIME and targetinstall only if not empty
2012-10-10 8:59 ` [ptxdist] [PATCH] timezone: rename GLIBC_LOCALTIME and targetinstall only if not empty Alexander Dahl
@ 2012-10-12 9:57 ` Michael Olbrich
0 siblings, 0 replies; 5+ messages in thread
From: Michael Olbrich @ 2012-10-12 9:57 UTC (permalink / raw)
To: ptxdist
On Wed, Oct 10, 2012 at 10:59:45AM +0200, Alexander Dahl wrote:
> Revised with fresh morning mind. I could not test the migrate stuff,
> please review!
It works as expected. Thanks, applied.
Michael
> Greets
> Alex
>
> Signed-off-by: Alexander Dahl <post@lespocky.de>
> ---
> rules/timezone.in | 5 +++--
> rules/timezone.make | 6 +++---
> scripts/migrate/migrate_ptx | 6 ++++++
> 3 files changed, 12 insertions(+), 5 deletions(-)
>
> diff --git a/rules/timezone.in b/rules/timezone.in
> index 09a3d9d..1298afc 100644
> --- a/rules/timezone.in
> +++ b/rules/timezone.in
> @@ -15,7 +15,7 @@ if TIMEZONE
>
> comment "Timezone support"
>
> -config GLIBC_LOCALTIME
> +config TIMEZONE_LOCALTIME
> prompt "Timezone for /etc/localtime and /etc/timezone"
> default "Europe/Berlin"
> string
> @@ -23,7 +23,8 @@ config GLIBC_LOCALTIME
> Where should /etc/localtime point to? (e.g. put in "Europe/Berlin"
> here to let it point to /usr/share/zoneinfo/Europe/Berlin)
> Additionally this value is written to /etc/timezone like on Debian
> - or for systemd.
> + or for systemd. Note: if you leave this empty /etc/timezone and
> + /etc/localtime are NOT created.
>
> config TIMEZONE_LOCAL_DATABASE
> bool
> diff --git a/rules/timezone.make b/rules/timezone.make
> index 6625f85..b51e317 100644
> --- a/rules/timezone.make
> +++ b/rules/timezone.make
> @@ -19,7 +19,7 @@ PACKAGES-$(PTXCONF_TIMEZONE) += timezone
> TIMEZONE_VERSION := 1.0
> TIMEZONE := timezone-$(TIMEZONE_VERSION)
>
> -TIMEZONE_LOCALTIME_FILE := /usr/share/zoneinfo/$(PTXCONF_GLIBC_LOCALTIME)
> +TIMEZONE_LOCALTIME_FILE := /usr/share/zoneinfo/$(PTXCONF_TIMEZONE_LOCALTIME)
>
> TIMEZONE-$(PTXCONF_TIMEZONE_AFRICA) := "Africa"
> TIMEZONE-$(PTXCONF_TIMEZONE_ATLANTIC) += "Atlantic"
> @@ -118,12 +118,12 @@ $(STATEDIR)/timezone.targetinstall:
> $(call install_copy, timezone, 0, 0, 0644, -, /usr/share/zoneinfo/$$f,n); \
> done
>
> -ifdef PTXCONF_GLIBC_LOCALTIME
> +ifneq ($(call remove_quotes,$(PTXCONF_TIMEZONE_LOCALTIME)),)
> @$(call install_link, timezone, ..$(TIMEZONE_LOCALTIME_FILE), \
> /etc/localtime)
> @$(call install_alternative, timezone, 0, 0, 0644, /etc/timezone)
> @$(call install_replace, timezone, /etc/timezone, @TIMEZONE@, \
> - $(PTXCONF_GLIBC_LOCALTIME))
> + $(PTXCONF_TIMEZONE_LOCALTIME))
> endif
>
> @$(call install_finish, timezone)
> diff --git a/scripts/migrate/migrate_ptx b/scripts/migrate/migrate_ptx
> index 5682890..47f324b 100755
> --- a/scripts/migrate/migrate_ptx
> +++ b/scripts/migrate/migrate_ptx
> @@ -189,3 +189,9 @@ s/^\(\(# \)\?PTXCONF_GLIBC_LOCALTIME\)_LINK\(.*\)/\1\3/
> # reason : cleanup
> #
> s/^\(\(# \)\?PTXCONF_GSTREAMER_\)_\(.*$\)/\1\3/
> +
> +#
> +# symbol : GLIBC_LOCALTIME -> TIMEZONE_LOCALTIME
> +# reason : cleanup
> +#
> +s/^\(\(# \)\?PTXCONF_\)GLIBC\(_LOCALTIME\)/\1TIMEZONE\3/
> --
> 1.7.2.5
>
>
> --
> ptxdist mailing list
> ptxdist@pengutronix.de
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-10-12 9:57 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-09 16:03 [ptxdist] [PATCH] timezone: introduce option TIMEZONE_INSTALL_LOCALTIME for more flexibility with own rules Alexander Dahl
2012-10-09 16:30 ` Michael Olbrich
2012-10-09 16:49 ` Alexander Dahl
2012-10-10 8:59 ` [ptxdist] [PATCH] timezone: rename GLIBC_LOCALTIME and targetinstall only if not empty Alexander Dahl
2012-10-12 9:57 ` Michael Olbrich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox