diff -u rdate-1.1.2/debian/changelog rdate-1.1.2/debian/changelog --- rdate-1.1.2/debian/changelog +++ rdate-1.1.2/debian/changelog @@ -1,3 +1,14 @@ +rdate (1:1.1.2-5ubuntu1) hardy; urgency=low + + * Added the ability to preseed the udeb for synchronization during + install by choosing rdate synchronization host, port, and protocol. + * Added the option to download temporary timezone data from remote + URL during the early part of the install. + * Modify Maintainer value to match the DebianMaintainerField + specification. + + -- Matt T. Proud Sun, 03 Feb 2008 23:15:42 -0800 + rdate (1:1.1.2-5) unstable; urgency=low * Allowed "rdate -o 123 -n" w/o needing libnss_files and diff -u rdate-1.1.2/debian/rules rdate-1.1.2/debian/rules --- rdate-1.1.2/debian/rules +++ rdate-1.1.2/debian/rules @@ -66,6 +66,9 @@ dh_compress dh_fixperms dh_installdeb + dh_installdebconf + (echo ; po2debconf debian/rdate-udeb.templates ) \ + >> debian/rdate-udeb/DEBIAN/templates dh_shlibdeps dh_gencontrol dh_md5sums -a --no-package=rdate-udeb diff -u rdate-1.1.2/debian/control rdate-1.1.2/debian/control --- rdate-1.1.2/debian/control +++ rdate-1.1.2/debian/control @@ -1,7 +1,8 @@ Source: rdate Section: net Priority: optional -Maintainer: Anibal Monsalve Salazar +Maintainer: Ubuntu MOTU Developers +XSBC-Original-Maintainer: Anibal Monsalve Salazar Build-Depends: debhelper (>= 5), autotools-dev Standards-Version: 3.7.2 @@ -24,4 +25,5 @@ Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} +Depends: configured-network, ${shlibs:Depends}, ${misc:Depends} XC-Package-Type: udeb +XB-Installer-Menu-Item: 1800 Description: sets the system's date from a remote host only in patch2: unchanged: --- rdate-1.1.2.orig/debian/po/POTFILES.in +++ rdate-1.1.2/debian/po/POTFILES.in @@ -0,0 +1 @@ +[type: gettext/rfc822deb] rdate-udeb.templates only in patch2: unchanged: --- rdate-1.1.2.orig/debian/po/templates.pot +++ rdate-1.1.2/debian/po/templates.pot @@ -0,0 +1,118 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: Source: rdate@packages.debian.org\n" +"POT-Creation-Date: 2008-02-04 00:56-0800\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: select +#. Description +#: ../rdate-udeb.templates:1001 +msgid "What type of time synchronization should be performed?" +msgstr "" + +#. Type: select +#. Description +#: ../rdate-udeb.templates:1001 +msgid "" +"The rdate utility has the ability to synchronize the local computer's clock " +"with a remote host. Two protocols are available: Time (RFC 868) or SNTP " +"(RFC 2030). Choose none for no synchronization. SNTP is capable of " +"interoperating with NTP (RFC 1305)." +msgstr "" + +#. Type: string +#. Description +#: ../rdate-udeb.templates:2001 +msgid "What host should the clock be synchronized with?" +msgstr "" + +#. Type: string +#. Description +#: ../rdate-udeb.templates:2001 +msgid "The machine must be running a RFC 868 or RFC 2030 compatible service." +msgstr "" + +#. Type: string +#. Description +#. Type: string +#. Description +#: ../rdate-udeb.templates:3001 ../rdate-udeb.templates:4001 +msgid "What remote port should rdate connect to?" +msgstr "" + +#. Type: string +#. Description +#: ../rdate-udeb.templates:3001 +msgid "By default, Time uses port 37." +msgstr "" + +#. Type: string +#. Description +#: ../rdate-udeb.templates:4001 +msgid "By default, SNTP uses port 123." +msgstr "" + +#. Type: string +#. Description +#: ../rdate-udeb.templates:5001 +msgid "What URL should rdate retrieve this machine's tzinfo from?" +msgstr "" + +#. Type: string +#. Description +#: ../rdate-udeb.templates:5001 +msgid "" +"By default, machines running at this stage of the installation do not have " +"timezone information set. This is normally not needed, but in some local " +"cases it may." +msgstr "" + +#. Type: string +#. Description +#: ../rdate-udeb.templates:5001 +msgid "" +"If it is needed, what URL should be accessed for retrieving the timezone " +"information? Leave blank for no action." +msgstr "" + +#. Type: error +#. Description +#: ../rdate-udeb.templates:6001 +msgid "An error occurred during synchronization. Check the logs" +msgstr "" + +#. Type: error +#. Description +#: ../rdate-udeb.templates:6001 +msgid "for more details." +msgstr "" + +#. Type: error +#. Description +#: ../rdate-udeb.templates:7001 +msgid "An error occurred while fetching the timezone information." +msgstr "" + +#. Type: error +#. Description +#: ../rdate-udeb.templates:7001 +msgid "Check the logs for more details." +msgstr "" + +#. Type: text +#. Description +#: ../rdate-udeb.templates:8001 +msgid "Synchronize the system clock with a remote host" +msgstr "" only in patch2: unchanged: --- rdate-1.1.2.orig/debian/rdate-udeb.templates +++ rdate-1.1.2/debian/rdate-udeb.templates @@ -0,0 +1,52 @@ +Template: rdate-udeb/synchronization_type +Type: select +Choices: none, Time, SNTP +Default: none +_Description: What type of time synchronization should be performed? + The rdate utility has the ability to synchronize the local computer's + clock with a remote host. Two protocols are available: Time (RFC 868) or + SNTP (RFC 2030). Choose none for no synchronization. SNTP is capable of + interoperating with NTP (RFC 1305). + +Template: rdate-udeb/remote_host +Type: string +Default: +_Description: What host should the clock be synchronized with? + The machine must be running a RFC 868 or RFC 2030 compatible service. + +Template: rdate-udeb/time_port +Type: string +Default: 37 +_Description: What remote port should rdate connect to? + By default, Time uses port 37. + +Template: rdate-udeb/sntp_port +Type: string +Default: 123 +_Description: What remote port should rdate connect to? + By default, SNTP uses port 123. + +Template: rdate-udeb/tzinfo_url +Type: string +Default: +_Description: What URL should rdate retrieve this machine's tzinfo from? + By default, machines running at this stage of the installation do not have + timezone information set. This is normally not needed, but in some local + cases it may. + . + If it is needed, what URL should be accessed for retrieving the timezone + information? Leave blank for no action. + +Template: rdate-udeb/synchronization_failure +Type: error +_Description: An error occurred during synchronization. Check the logs + for more details. + +Template: rdate-udeb/tzinfo_fetch_failure +Type: error +_Description: An error occurred while fetching the timezone information. + Check the logs for more details. + +Template: debian-installer/rdate-udeb/title +Type: text +_Description: Synchronize the system clock with a remote host only in patch2: unchanged: --- rdate-1.1.2.orig/debian/rdate-udeb.postinst +++ rdate-1.1.2/debian/rdate-udeb.postinst @@ -0,0 +1,56 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + +NAMESPACE=rdate-udeb + +db_input low ${NAMESPACE}/synchronization_type || true +db_go + +db_get ${NAMESPACE}/synchronization_type +synchronization_type="${RET}" + +if [ "${synchronization_type}" = "none" ]; then + exit 0 +else + db_input medium ${NAMESPACE}/remote_host || true + db_go + db_get ${NAMESPACE}/remote_host + remote_host="${RET}" + + # Parameter substitution is used with the ports, because getaddrinfo will + # fail if this information is not included. + if [ "${synchronization_type}" = "Time" ]; then + db_input low ${NAMESPACE}/time_port || true + db_go + db_get ${NAMESPACE}/time_port + time_port="${RET:-37}" + program_options="-o ${time_port}" + elif [ "${synchronization_type}" = "SNTP" ]; then + db_input low ${NAMESPACE}/sntp_port || true + db_go + db_get ${NAMESPACE}/sntp_port + sntp_port="${RET:-123}" + program_options="-o ${sntp_port} -n" + fi + + TZFILE="/etc/localtime" + + if [ ! -f "${TZFILE}" ]; then + db_input low ${NAMESPACE}/tzinfo_url || true + db_go + db_get ${NAMESPACE}/tzinfo_url + tzinfo_url="${RET}" + + if [ -n "${tzinfo_url}" ]; then + log-output wget "${tzinfo_url}" -O "${TZFILE}" || db_input critical \ + ${NAMESPACE}/tzinfo_fetch_failure + fi + fi + + log-output rdate ${remote_host} ${program_options} || db_input critical \ + ${NAMESPACE}/synchronization_failure +fi +