xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [OSSTEST PATCH] i18n/l10n: Make Timezone configurable and change the default
@ 2015-05-15 10:44 Ian Jackson
  2015-05-15 11:34 ` Ian Campbell
  0 siblings, 1 reply; 4+ messages in thread
From: Ian Jackson @ 2015-05-15 10:44 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Ian Campbell

* Introduce a new config option Timezone
* Replace hardcoded Europe/London everywhere with $c{Timezone}
* The default is UTC
* But in production-config-cambridge set it to Europe/London

The overall effect is:
* No change in Cambridge
* Default timezone changes to UTC but can now be overridden
* Production instance timezone changes to UTC

(It appears that there is no reasonable way to find out the Olson TZ
name of the controller host's default timezone.  If there were, or we
discover one, we should arrange that the default is set
appropriately.)

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 Osstest.pm                  |    2 ++
 Osstest/Debian.pm           |    2 +-
 production-config-cambridge |    2 ++
 ts-freebsd-install          |    2 +-
 ts-redhat-install           |    2 +-
 5 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/Osstest.pm b/Osstest.pm
index 7f72bc6..e8bd77b 100644
--- a/Osstest.pm
+++ b/Osstest.pm
@@ -76,6 +76,8 @@ our %c = qw(
     DebianNonfreeFirmware firmware-bnx2
 
     HostnameSortSwapWords 0
+
+    Timezone UTC
 );
 
 $c{$_}='' foreach qw(
diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index a577d1d..3adc84f 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -567,7 +567,7 @@ d-i mirror/country string manual
 d-i mirror/http/proxy string
 
 d-i clock-setup/utc boolean true
-d-i time/zone string Europe/London
+d-i time/zone string $c{Timezone}
 d-i clock-setup/ntp boolean true
 
 d-i partman-md/device_remove_md boolean true
diff --git a/production-config-cambridge b/production-config-cambridge
index 62215d0..f32cd84 100644
--- a/production-config-cambridge
+++ b/production-config-cambridge
@@ -30,6 +30,8 @@ HostnameSortSwapWords 1
 DnsDomain xs.citrite.net
 NetNameservers 10.80.248.2 10.80.16.28 10.80.16.67
 
+Timezone Europe/London
+
 Stash /home/xc_osstest/logs
 Images /home/xc_osstest/images
 Logs /home/xc_osstest/logs
diff --git a/ts-freebsd-install b/ts-freebsd-install
index 6e8fada..0d6eb0c 100755
--- a/ts-freebsd-install
+++ b/ts-freebsd-install
@@ -82,7 +82,7 @@ END
 
             sed -i '/^ttyu0/s/off/on/' $mnt/etc/ttys
 
-            cp $mnt/usr/share/zoneinfo/Europe/London $mnt/etc/localtime
+            cp $mnt/usr/share/zoneinfo/$c{Timezone} $mnt/etc/localtime
 
             cat <<'ENDKEYS' >$mnt/boot/loader.conf
 boot_multicons="YES"
diff --git a/ts-redhat-install b/ts-redhat-install
index 22c3061..10da559 100755
--- a/ts-redhat-install
+++ b/ts-redhat-install
@@ -59,7 +59,7 @@ selinux --disable
 sshpw --username=root xenroot --plaintext
 sshpw --username=iwj xenroot --plaintext
 
-timezone --utc Europe/London
+timezone --utc $c{Timezone}
 bootloader --location=mbr --driveorder=sda --append="crashkernel=auto rhgb console=ttyS0,$c{Baud}n8"
 
 # The following is the partition information you requested
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [OSSTEST PATCH] i18n/l10n: Make Timezone configurable and change the default
  2015-05-15 10:44 [OSSTEST PATCH] i18n/l10n: Make Timezone configurable and change the default Ian Jackson
@ 2015-05-15 11:34 ` Ian Campbell
  2015-05-15 11:56   ` Ian Jackson
  0 siblings, 1 reply; 4+ messages in thread
From: Ian Campbell @ 2015-05-15 11:34 UTC (permalink / raw)
  To: Ian Jackson; +Cc: xen-devel

On Fri, 2015-05-15 at 11:44 +0100, Ian Jackson wrote:
> * Introduce a new config option Timezone
> * Replace hardcoded Europe/London everywhere with $c{Timezone}
> * The default is UTC
> * But in production-config-cambridge set it to Europe/London
> 
> The overall effect is:
> * No change in Cambridge
> * Default timezone changes to UTC but can now be overridden
> * Production instance timezone changes to UTC
> 
> (It appears that there is no reasonable way to find out the Olson TZ
> name of the controller host's default timezone.  If there were, or we
> discover one, we should arrange that the default is set
> appropriately.)
> 
> Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>

Acked-by: Ian Campbell <ian.campbell@citrix.com>

(I wouldn't have objected to moving Cambridge to UTC either, lets see
how confused we get looking at machines in both pools!)

> ---
>  Osstest.pm                  |    2 ++
>  Osstest/Debian.pm           |    2 +-
>  production-config-cambridge |    2 ++
>  ts-freebsd-install          |    2 +-
>  ts-redhat-install           |    2 +-
>  5 files changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/Osstest.pm b/Osstest.pm
> index 7f72bc6..e8bd77b 100644
> --- a/Osstest.pm
> +++ b/Osstest.pm
> @@ -76,6 +76,8 @@ our %c = qw(
>      DebianNonfreeFirmware firmware-bnx2
>  
>      HostnameSortSwapWords 0
> +
> +    Timezone UTC
>  );
>  
>  $c{$_}='' foreach qw(
> diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
> index a577d1d..3adc84f 100644
> --- a/Osstest/Debian.pm
> +++ b/Osstest/Debian.pm
> @@ -567,7 +567,7 @@ d-i mirror/country string manual
>  d-i mirror/http/proxy string
>  
>  d-i clock-setup/utc boolean true
> -d-i time/zone string Europe/London
> +d-i time/zone string $c{Timezone}
>  d-i clock-setup/ntp boolean true
>  
>  d-i partman-md/device_remove_md boolean true
> diff --git a/production-config-cambridge b/production-config-cambridge
> index 62215d0..f32cd84 100644
> --- a/production-config-cambridge
> +++ b/production-config-cambridge
> @@ -30,6 +30,8 @@ HostnameSortSwapWords 1
>  DnsDomain xs.citrite.net
>  NetNameservers 10.80.248.2 10.80.16.28 10.80.16.67
>  
> +Timezone Europe/London
> +
>  Stash /home/xc_osstest/logs
>  Images /home/xc_osstest/images
>  Logs /home/xc_osstest/logs
> diff --git a/ts-freebsd-install b/ts-freebsd-install
> index 6e8fada..0d6eb0c 100755
> --- a/ts-freebsd-install
> +++ b/ts-freebsd-install
> @@ -82,7 +82,7 @@ END
>  
>              sed -i '/^ttyu0/s/off/on/' $mnt/etc/ttys
>  
> -            cp $mnt/usr/share/zoneinfo/Europe/London $mnt/etc/localtime
> +            cp $mnt/usr/share/zoneinfo/$c{Timezone} $mnt/etc/localtime
>  
>              cat <<'ENDKEYS' >$mnt/boot/loader.conf
>  boot_multicons="YES"
> diff --git a/ts-redhat-install b/ts-redhat-install
> index 22c3061..10da559 100755
> --- a/ts-redhat-install
> +++ b/ts-redhat-install
> @@ -59,7 +59,7 @@ selinux --disable
>  sshpw --username=root xenroot --plaintext
>  sshpw --username=iwj xenroot --plaintext
>  
> -timezone --utc Europe/London
> +timezone --utc $c{Timezone}
>  bootloader --location=mbr --driveorder=sda --append="crashkernel=auto rhgb console=ttyS0,$c{Baud}n8"
>  
>  # The following is the partition information you requested

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [OSSTEST PATCH] i18n/l10n: Make Timezone configurable and change the default
  2015-05-15 11:34 ` Ian Campbell
@ 2015-05-15 11:56   ` Ian Jackson
  2015-05-15 12:01     ` Ian Campbell
  0 siblings, 1 reply; 4+ messages in thread
From: Ian Jackson @ 2015-05-15 11:56 UTC (permalink / raw)
  To: Ian Jackson, xen-devel

Ian Campbell writes ("Re: [OSSTEST PATCH] i18n/l10n: Make Timezone configurable and change the default"):
> On Fri, 2015-05-15 at 11:44 +0100, Ian Jackson wrote:
> > Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
> 
> Acked-by: Ian Campbell <ian.campbell@citrix.com>

Thanks.

I've made a new version which also documents the variable in README;
I guess you're happy for me to keep your ack.

Ian.

commit 3c425a513e603184b8dd128b28398ceec2aea4b4
Author: Ian Jackson <ian.jackson@eu.citrix.com>
Date:   Fri May 15 11:31:35 2015 +0100

    i18n/l10n: Make Timezone configurable and change the default
    
    * Introduce a new config option Timezone
    * Replace hardcoded Europe/London everywhere with $c{Timezone}
    * The default is UTC
    * But in production-config-cambridge set it to Europe/London
    
    The overall effect is:
    * No change in Cambridge
    * Default timezone changes to UTC but can now be overridden
    * Production instance timezone changes to UTC
    
    (It appears that there is no reasonable way to find out the Olson TZ
    name of the controller host's default timezone.  If there were, or we
    discover one, we should arrange that the default is set
    appropriately.)
    
    Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>

diff --git a/Osstest.pm b/Osstest.pm
index 7f72bc6..e8bd77b 100644
--- a/Osstest.pm
+++ b/Osstest.pm
@@ -76,6 +76,8 @@ our %c = qw(
     DebianNonfreeFirmware firmware-bnx2
 
     HostnameSortSwapWords 0
+
+    Timezone UTC
 );
 
 $c{$_}='' foreach qw(
diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index a577d1d..3adc84f 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -567,7 +567,7 @@ d-i mirror/country string manual
 d-i mirror/http/proxy string
 
 d-i clock-setup/utc boolean true
-d-i time/zone string Europe/London
+d-i time/zone string $c{Timezone}
 d-i clock-setup/ntp boolean true
 
 d-i partman-md/device_remove_md boolean true
diff --git a/README b/README
index 0aaba2c..44e2989 100644
--- a/README
+++ b/README
@@ -476,6 +476,9 @@ TftpPxeTemplatesReal
     Template filename which mg-hosts mkpxedir should make be a symlink to
     the TftpPxeTemplates.  Not used otherwise.
 
+Timezone
+    Olson TZ name, used by host and guest installers
+
 ========================================
 
 Host-specific config settigs
diff --git a/production-config-cambridge b/production-config-cambridge
index 62215d0..f32cd84 100644
--- a/production-config-cambridge
+++ b/production-config-cambridge
@@ -30,6 +30,8 @@ HostnameSortSwapWords 1
 DnsDomain xs.citrite.net
 NetNameservers 10.80.248.2 10.80.16.28 10.80.16.67
 
+Timezone Europe/London
+
 Stash /home/xc_osstest/logs
 Images /home/xc_osstest/images
 Logs /home/xc_osstest/logs
diff --git a/ts-freebsd-install b/ts-freebsd-install
index 6e8fada..0d6eb0c 100755
--- a/ts-freebsd-install
+++ b/ts-freebsd-install
@@ -82,7 +82,7 @@ END
 
             sed -i '/^ttyu0/s/off/on/' $mnt/etc/ttys
 
-            cp $mnt/usr/share/zoneinfo/Europe/London $mnt/etc/localtime
+            cp $mnt/usr/share/zoneinfo/$c{Timezone} $mnt/etc/localtime
 
             cat <<'ENDKEYS' >$mnt/boot/loader.conf
 boot_multicons="YES"
diff --git a/ts-redhat-install b/ts-redhat-install
index 22c3061..10da559 100755
--- a/ts-redhat-install
+++ b/ts-redhat-install
@@ -59,7 +59,7 @@ selinux --disable
 sshpw --username=root xenroot --plaintext
 sshpw --username=iwj xenroot --plaintext
 
-timezone --utc Europe/London
+timezone --utc $c{Timezone}
 bootloader --location=mbr --driveorder=sda --append="crashkernel=auto rhgb console=ttyS0,$c{Baud}n8"
 
 # The following is the partition information you requested

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [OSSTEST PATCH] i18n/l10n: Make Timezone configurable and change the default
  2015-05-15 11:56   ` Ian Jackson
@ 2015-05-15 12:01     ` Ian Campbell
  0 siblings, 0 replies; 4+ messages in thread
From: Ian Campbell @ 2015-05-15 12:01 UTC (permalink / raw)
  To: Ian Jackson; +Cc: xen-devel

On Fri, 2015-05-15 at 12:56 +0100, Ian Jackson wrote:
> Ian Campbell writes ("Re: [OSSTEST PATCH] i18n/l10n: Make Timezone configurable and change the default"):
> > On Fri, 2015-05-15 at 11:44 +0100, Ian Jackson wrote:
> > > Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
> > 
> > Acked-by: Ian Campbell <ian.campbell@citrix.com>
> 
> Thanks.
> 
> I've made a new version which also documents the variable in README;
> I guess you're happy for me to keep your ack.

Yep!

> 
> Ian.
> 
> commit 3c425a513e603184b8dd128b28398ceec2aea4b4
> Author: Ian Jackson <ian.jackson@eu.citrix.com>
> Date:   Fri May 15 11:31:35 2015 +0100
> 
>     i18n/l10n: Make Timezone configurable and change the default
>     
>     * Introduce a new config option Timezone
>     * Replace hardcoded Europe/London everywhere with $c{Timezone}
>     * The default is UTC
>     * But in production-config-cambridge set it to Europe/London
>     
>     The overall effect is:
>     * No change in Cambridge
>     * Default timezone changes to UTC but can now be overridden
>     * Production instance timezone changes to UTC
>     
>     (It appears that there is no reasonable way to find out the Olson TZ
>     name of the controller host's default timezone.  If there were, or we
>     discover one, we should arrange that the default is set
>     appropriately.)
>     
>     Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
> 
> diff --git a/Osstest.pm b/Osstest.pm
> index 7f72bc6..e8bd77b 100644
> --- a/Osstest.pm
> +++ b/Osstest.pm
> @@ -76,6 +76,8 @@ our %c = qw(
>      DebianNonfreeFirmware firmware-bnx2
>  
>      HostnameSortSwapWords 0
> +
> +    Timezone UTC
>  );
>  
>  $c{$_}='' foreach qw(
> diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
> index a577d1d..3adc84f 100644
> --- a/Osstest/Debian.pm
> +++ b/Osstest/Debian.pm
> @@ -567,7 +567,7 @@ d-i mirror/country string manual
>  d-i mirror/http/proxy string
>  
>  d-i clock-setup/utc boolean true
> -d-i time/zone string Europe/London
> +d-i time/zone string $c{Timezone}
>  d-i clock-setup/ntp boolean true
>  
>  d-i partman-md/device_remove_md boolean true
> diff --git a/README b/README
> index 0aaba2c..44e2989 100644
> --- a/README
> +++ b/README
> @@ -476,6 +476,9 @@ TftpPxeTemplatesReal
>      Template filename which mg-hosts mkpxedir should make be a symlink to
>      the TftpPxeTemplates.  Not used otherwise.
>  
> +Timezone
> +    Olson TZ name, used by host and guest installers
> +
>  ========================================
>  
>  Host-specific config settigs
> diff --git a/production-config-cambridge b/production-config-cambridge
> index 62215d0..f32cd84 100644
> --- a/production-config-cambridge
> +++ b/production-config-cambridge
> @@ -30,6 +30,8 @@ HostnameSortSwapWords 1
>  DnsDomain xs.citrite.net
>  NetNameservers 10.80.248.2 10.80.16.28 10.80.16.67
>  
> +Timezone Europe/London
> +
>  Stash /home/xc_osstest/logs
>  Images /home/xc_osstest/images
>  Logs /home/xc_osstest/logs
> diff --git a/ts-freebsd-install b/ts-freebsd-install
> index 6e8fada..0d6eb0c 100755
> --- a/ts-freebsd-install
> +++ b/ts-freebsd-install
> @@ -82,7 +82,7 @@ END
>  
>              sed -i '/^ttyu0/s/off/on/' $mnt/etc/ttys
>  
> -            cp $mnt/usr/share/zoneinfo/Europe/London $mnt/etc/localtime
> +            cp $mnt/usr/share/zoneinfo/$c{Timezone} $mnt/etc/localtime
>  
>              cat <<'ENDKEYS' >$mnt/boot/loader.conf
>  boot_multicons="YES"
> diff --git a/ts-redhat-install b/ts-redhat-install
> index 22c3061..10da559 100755
> --- a/ts-redhat-install
> +++ b/ts-redhat-install
> @@ -59,7 +59,7 @@ selinux --disable
>  sshpw --username=root xenroot --plaintext
>  sshpw --username=iwj xenroot --plaintext
>  
> -timezone --utc Europe/London
> +timezone --utc $c{Timezone}
>  bootloader --location=mbr --driveorder=sda --append="crashkernel=auto rhgb console=ttyS0,$c{Baud}n8"
>  
>  # The following is the partition information you requested

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-05-15 12:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-15 10:44 [OSSTEST PATCH] i18n/l10n: Make Timezone configurable and change the default Ian Jackson
2015-05-15 11:34 ` Ian Campbell
2015-05-15 11:56   ` Ian Jackson
2015-05-15 12:01     ` Ian Campbell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).