Reworking debconf stuff of merging former live-autobuild-manual and live-autobuild-images into a single live-build-cron.

This commit is contained in:
Daniel Baumann 2011-07-20 11:05:27 +02:00
parent b3e6ff2e14
commit 6a844f1bb2
5 changed files with 197 additions and 163 deletions

View File

@ -18,61 +18,83 @@ done
if [ "${_DEBCONF}" = "true" ]
then
db_set live-build-cron-images/enable "${LIVE_BUILD_CRON_IMAGES}"
db_set live-build-cron-images/directory "${LIVE_BUILD_CRON_IMAGES_DIRECTORY}"
db_set live-build-cron-images/build "${LIVE_BUILD_CRON_IMAGES_BUILD}"
# live-build-cron-images
db_set live-build-cron/images-enable "${LIVE_BUILD_CRON_IMAGES}"
db_set live-build-cron/images-directory "${LIVE_BUILD_CRON_IMAGES_DIRECTORY}"
db_set live-build-cron/images-build "${LIVE_BUILD_CRON_IMAGES_BUILD}"
db_set live-build-cron-images/daily-distributions "${LIVE_BUILD_CRON_IMAGES_DAILY_DISTRIBUTIONS}"
db_set live-build-cron-images/daily-flavours "${LIVE_BUILD_CRON_IMAGES_DAILY_FLAVOURS}"
db_set live-build-cron/images-daily-distributions "${LIVE_BUILD_CRON_IMAGES_DAILY_DISTRIBUTIONS}"
db_set live-build-cron/images-daily-flavours "${LIVE_BUILD_CRON_IMAGES_DAILY_FLAVOURS}"
db_set live-build-cron-images/weekly-distributions "${LIVE_BUILD_CRON_IMAGES_WEEKLY_DISTRIBUTIONS}"
db_set live-build-cron-images/weekly-flavours "${LIVE_BUILD_CRON_IMAGES_WEEKLY_FLAVOURS}"
db_set live-build-cron/images-weekly-distributions "${LIVE_BUILD_CRON_IMAGES_WEEKLY_DISTRIBUTIONS}"
db_set live-build-cron/images-weekly-flavours "${LIVE_BUILD_CRON_IMAGES_WEEKLY_FLAVOURS}"
db_set live-build-cron-images/monthly-distributions "${LIVE_BUILD_CRON_IMAGES_MONTHLY_DISTRIBUTIONS}"
db_set live-build-cron-images/monthly-flavours "${LIVE_BUILD_CRON_IMAGES_MONTHLY_FLAVOURS}"
db_set live-build-cron/images-monthly-distributions "${LIVE_BUILD_CRON_IMAGES_MONTHLY_DISTRIBUTIONS}"
db_set live-build-cron/images-monthly-flavours "${LIVE_BUILD_CRON_IMAGES_MONTHLY_FLAVOURS}"
db_set live-build-cron-images/source "${LIVE_BUILD_CRON_IMAGES_SOURCE}"
db_set live-build-cron/images-source "${LIVE_BUILD_CRON_IMAGES_SOURCE}"
# live-build-cron-manual
db_set live-build-cron/manual-enable "${LIVE_BUILD_CRON_MANUAL}"
fi
db_settitle live-build-cron-images/title
db_input high live-build-cron-images/enable || true
db_settitle live-build-cron/title
db_input high live-build-cron/images-enable || true
db_go
db_get live-build-cron-images/enable
db_get live-build-cron/images-enable
LIVE_BUILD_CRON_IMAGES="${RET}"
if [ "${LIVE_BUILD_CRON_IMAGES}" != "true" ]
if [ "${LIVE_BUILD_CRON_IMAGES}" = "true" ]
then
db_stop
db_settitle live-build-cron/title
db_input low live-build-cron/images-directory || true
db_go
exit 0
db_settitle live-build-cron/title
db_input low live-build-cron/images-build || true
db_go
for _BUILDS in daily weekly monthly
do
db_settitle live-build-cron/title
db_input low live-build-cron/images-${_BUILDS}-distributions || true
db_go
db_settitle live-build-cron/title
db_input low live-build-cron/images-${_BUILDS}-flavours || true
db_go
done
db_settitle live-build-cron/title
db_input low live-build-cron/images-source || true
db_go
db_settitle live-build-cron/title
db_input low live-build-cron/images-cron || true
db_go
fi
db_settitle live-build-cron-images/title
db_input low live-build-cron-images/directory || true
db_settitle live-build-cron/title
db_input high live-build-cron/manual-enable || true
db_go
db_settitle live-build-cron-images/title
db_input low live-build-cron-images/build || true
db_go
db_get live-build-cron/manual-enable
LIVE_BUILD_CRON_MANUAL="${RET}"
for _BUILDS in daily weekly monthly
do
db_settitle live-build-cron-images/title
db_input low live-build-cron-images/${_BUILDS}-distributions || true
if [ "${LIVE_BUILD_CRON_MANUAL}" = "true" ]
then
db_settitle live-build-cron/title
db_input low live-build-cron/manual-username || true
db_go
db_settitle live-build-cron-images/title
db_input low live-build-cron-images/${_BUILDS}-flavours || true
db_settitle live-build-cron/title
db_input low live-build-cron/manual-directory || true
db_go
done
db_settitle live-build-cron-images/title
db_input low live-build-cron-images/source || true
db_go
db_settitle live-build-cron-images/title
db_input low live-build-cron-images/cron || true
db_go
db_settitle live-build-cron/title
db_input low live-build-cron/manual-cron || true
db_go
fi
db_stop

View File

@ -1,22 +1,28 @@
Template: live-build-cron-images/title
Template: live-build-cron/title
Type: title
_Description: Debian Live - System Build Scripts
_Description: Debian Live - System Build Scripts (cron autobuilder)
Template: live-build-cron-images/enable
Template: live-build-cron/images-enable
Type: boolean
Default: false
_Description: Enable live-build-cron-images?
Do you want to enable live-build-cron-images?
_Description: Enable images autobuild?
Do you want to enable autobuild for images?
.
If unsure, use 'no' (default).
Template: live-build-cron-images/directory
Template: live-build-cron/images-directory
Type: string
_Default: /srv/debian.net/live-cdimage
_Description: What directory to put builds to?
Enter the directory where the images should be stored in.
Template: live-build-cron-images/build
Template: live-build-cron/images-cron
Type: string
_Default: 0 0 * * *
_Description: What directory to put builds to?
Enter the cron times where the images should be build.
Template: live-build-cron/images-build
Type: select
_Choices: git, host, release
Default: host
@ -27,56 +33,76 @@ _Description: Which version of live-build to use?
used. host will use the live-build from the host system, and release will
use the last released version.
Template: live-build-cron-images/daily-distributions
Template: live-build-cron/images-daily-distributions
Type: multiselect
_Choices: squeeze, wheezy, sid
Default: sid
_Description: What distributions to build for daily images?
Select the distributions you would like to build for daily-images.
Template: live-build-cron-images/daily-flavours
Template: live-build-cron/images-daily-flavours
Type: multiselect
_Choices: standard, rescue, gnome-desktop, kde-desktop, lxde-desktop, xfce-desktop
Default: standard
_Description: What flavours to build for daily images?
Select the flavours you would like to build for daily-images.
Template: live-build-cron-images/weekly-distributions
Template: live-build-cron/images-weekly-distributions
Type: multiselect
_Choices: squeeze, wheezy, sid
Default: wheezy
_Description: What distributions to build for weekly images?
Select the distributions you would like to build for weekly-images.
Template: live-build-cron-images/weekly-flavours
Template: live-build-cron/images-weekly-flavours
Type: multiselect
_Choices: standard, rescue, gnome-desktop, kde-desktop, lxde-desktop, xfce-desktop
Default: standard
_Description: What flavours to build for weekly images?
Select the flavours you would like to build for weekly-images.
Template: live-build-cron-images/monthly-distributions
Template: live-build-cron/images-monthly-distributions
Type: multiselect
_Choices: squeeze, wheezy, sid
Default: squeeze
_Description: What distributions to build for monthly images?
Select the distributions you would like to build for monthly-images.
Template: live-build-cron-images/monthly-flavours
Template: live-build-cron/images-monthly-flavours
Type: multiselect
_Choices: standard, rescue, gnome-desktop, kde-desktop, lxde-desktop, xfce-desktop
Default: standard
_Description: What flavours to build for monthly images?
Select the flavours you would like to build for monthly-images.
Template: live-build-cron-images/source
Template: live-build-cron/images-source
Type: boolean
Default: false
_Description: Enable source for live-build-cron-images?
Do you sources for live-build-cron-images?
Template: live-build-cron-images/cron
Template: live-build-cron/manual-enable
Type: boolean
Default: false
_Description: Enable live-build-cron-manual?
Do you want to enable live-build-cron-manual?
.
If unsure, use 'no' (default).
Template: live-build-cron/manual-directory
Type: string
_Default: 0 0 * * *
_Default: /srv/debian.net/live-manual
_Description: What directory to put builds to?
Enter the cron times where the images should be build.
Enter the directory where the manual should be stored in.
Template: live-build-cron/manual-cron
Type: string
_Default: 0-59/10 * * * *
_Description: What interval to use for the cron job?
Enter the cron times where the manual should be build.
Template: live-build-cron/manual-username
Type: string
_Default: live-build-cron-manual
_Description: What useraccount to use to build the manual?
Enter the name of the username.

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: live-build@packages.debian.org\n"
"POT-Creation-Date: 2011-07-15 20:31+0200\n"
"POT-Creation-Date: 2011-07-20 11:04+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -20,24 +20,26 @@ msgstr ""
#. Type: title
#. Description
#: ../live-build-cron.templates:1001
msgid "Debian Live - System Build Scripts"
msgid "Debian Live - System Build Scripts (cron autobuilder)"
msgstr ""
#. Type: boolean
#. Description
#: ../live-build-cron.templates:2001
msgid "Enable live-build-cron-images?"
msgid "Enable images autobuild?"
msgstr ""
#. Type: boolean
#. Description
#: ../live-build-cron.templates:2001
msgid "Do you want to enable live-build-cron-images?"
msgid "Do you want to enable autobuild for images?"
msgstr ""
#. Type: boolean
#. Description
#: ../live-build-cron.templates:2001
#. Type: boolean
#. Description
#: ../live-build-cron.templates:2001 ../live-build-cron.templates:13001
msgid "If unsure, use 'no' (default)."
msgstr ""
@ -51,7 +53,10 @@ msgstr ""
#. Description
#. Type: string
#. Description
#: ../live-build-cron.templates:3002 ../live-build-cron.templates:12002
#. Type: string
#. Description
#: ../live-build-cron.templates:3002 ../live-build-cron.templates:4002
#: ../live-build-cron.templates:14002
msgid "What directory to put builds to?"
msgstr ""
@ -61,27 +66,39 @@ msgstr ""
msgid "Enter the directory where the images should be stored in."
msgstr ""
#. Type: string
#. Default
#: ../live-build-cron.templates:4001
msgid "0 0 * * *"
msgstr ""
#. Type: string
#. Description
#: ../live-build-cron.templates:4002
msgid "Enter the cron times where the images should be build."
msgstr ""
#. Type: select
#. Choices
#: ../live-build-cron.templates:4001
#: ../live-build-cron.templates:5001
msgid "git, host, release"
msgstr ""
#. Type: select
#. Description
#: ../live-build-cron.templates:4002
#: ../live-build-cron.templates:5002
msgid "Which version of live-build to use?"
msgstr ""
#. Type: select
#. Description
#: ../live-build-cron.templates:4002
#: ../live-build-cron.templates:5002
msgid "Select the version of live-build to use."
msgstr ""
#. Type: select
#. Description
#: ../live-build-cron.templates:4002
#: ../live-build-cron.templates:5002
msgid ""
"If you choose git, the current version of live-build from git will be used. "
"host will use the live-build from the host system, and release will use the "
@ -94,20 +111,20 @@ msgstr ""
#. Choices
#. Type: multiselect
#. Choices
#: ../live-build-cron.templates:5001 ../live-build-cron.templates:7001
#: ../live-build-cron.templates:9001
#: ../live-build-cron.templates:6001 ../live-build-cron.templates:8001
#: ../live-build-cron.templates:10001
msgid "squeeze, wheezy, sid"
msgstr ""
#. Type: multiselect
#. Description
#: ../live-build-cron.templates:5002
#: ../live-build-cron.templates:6002
msgid "What distributions to build for daily images?"
msgstr ""
#. Type: multiselect
#. Description
#: ../live-build-cron.templates:5002
#: ../live-build-cron.templates:6002
msgid "Select the distributions you would like to build for daily-images."
msgstr ""
@ -117,92 +134,140 @@ msgstr ""
#. Choices
#. Type: multiselect
#. Choices
#: ../live-build-cron.templates:6001 ../live-build-cron.templates:8001
#: ../live-build-cron.templates:10001
#: ../live-build-cron.templates:7001 ../live-build-cron.templates:9001
#: ../live-build-cron.templates:11001
msgid ""
"standard, rescue, gnome-desktop, kde-desktop, lxde-desktop, xfce-desktop"
msgstr ""
#. Type: multiselect
#. Description
#: ../live-build-cron.templates:6002
#: ../live-build-cron.templates:7002
msgid "What flavours to build for daily images?"
msgstr ""
#. Type: multiselect
#. Description
#: ../live-build-cron.templates:6002
#: ../live-build-cron.templates:7002
msgid "Select the flavours you would like to build for daily-images."
msgstr ""
#. Type: multiselect
#. Description
#: ../live-build-cron.templates:7002
#: ../live-build-cron.templates:8002
msgid "What distributions to build for weekly images?"
msgstr ""
#. Type: multiselect
#. Description
#: ../live-build-cron.templates:7002
#: ../live-build-cron.templates:8002
msgid "Select the distributions you would like to build for weekly-images."
msgstr ""
#. Type: multiselect
#. Description
#: ../live-build-cron.templates:8002
#: ../live-build-cron.templates:9002
msgid "What flavours to build for weekly images?"
msgstr ""
#. Type: multiselect
#. Description
#: ../live-build-cron.templates:8002
#: ../live-build-cron.templates:9002
msgid "Select the flavours you would like to build for weekly-images."
msgstr ""
#. Type: multiselect
#. Description
#: ../live-build-cron.templates:9002
#: ../live-build-cron.templates:10002
msgid "What distributions to build for monthly images?"
msgstr ""
#. Type: multiselect
#. Description
#: ../live-build-cron.templates:9002
#: ../live-build-cron.templates:10002
msgid "Select the distributions you would like to build for monthly-images."
msgstr ""
#. Type: multiselect
#. Description
#: ../live-build-cron.templates:10002
#: ../live-build-cron.templates:11002
msgid "What flavours to build for monthly images?"
msgstr ""
#. Type: multiselect
#. Description
#: ../live-build-cron.templates:10002
#: ../live-build-cron.templates:11002
msgid "Select the flavours you would like to build for monthly-images."
msgstr ""
#. Type: boolean
#. Description
#: ../live-build-cron.templates:11001
#: ../live-build-cron.templates:12001
msgid "Enable source for live-build-cron-images?"
msgstr ""
#. Type: boolean
#. Description
#: ../live-build-cron.templates:11001
#: ../live-build-cron.templates:12001
msgid "Do you sources for live-build-cron-images?"
msgstr ""
#. Type: boolean
#. Description
#: ../live-build-cron.templates:13001
msgid "Enable live-build-cron-manual?"
msgstr ""
#. Type: boolean
#. Description
#: ../live-build-cron.templates:13001
msgid "Do you want to enable live-build-cron-manual?"
msgstr ""
#. Type: string
#. Default
#: ../live-build-cron.templates:12001
msgid "0 0 * * *"
#: ../live-build-cron.templates:14001
msgid "/srv/debian.net/live-manual"
msgstr ""
#. Type: string
#. Description
#: ../live-build-cron.templates:12002
msgid "Enter the cron times where the images should be build."
#: ../live-build-cron.templates:14002
msgid "Enter the directory where the manual should be stored in."
msgstr ""
#. Type: string
#. Default
#: ../live-build-cron.templates:15001
msgid "0-59/10 * * * *"
msgstr ""
#. Type: string
#. Description
#: ../live-build-cron.templates:15002
msgid "What interval to use for the cron job?"
msgstr ""
#. Type: string
#. Description
#: ../live-build-cron.templates:15002
msgid "Enter the cron times where the manual should be build."
msgstr ""
#. Type: string
#. Default
#: ../live-build-cron.templates:16001
msgid "live-build-cron-manual"
msgstr ""
#. Type: string
#. Description
#: ../live-build-cron.templates:16002
msgid "What useraccount to use to build the manual?"
msgstr ""
#. Type: string
#. Description
#: ../live-build-cron.templates:16002
msgid "Enter the name of the username."
msgstr ""

View File

@ -1,50 +0,0 @@
#!/bin/sh
set -e
. /usr/share/debconf/confmodule
_FILES="/etc/live/autobuild.conf /etc/live/autobuild.d/*"
for _FILE in "${_FILES}"
do
if [ -e "${_FILE}" ]
then
_DEBCONF="true"
. "${_FILE}" || true
fi
done
if [ "${_DEBCONF}" = "true" ]
then
db_set live-autobuild-manual/enable "${LIVE_AUTOBUILD_MANUAL}"
fi
db_settitle live-autobuild-manual/title
db_input high live-autobuild-manual/enable || true
db_go
db_get live-autobuild-manual/enable
LIVE_AUTOBUILD_MANUAL="${RET}"
if [ "${LIVE_AUTOBUILD_MANUAL}" != "true" ]
then
db_stop
exit 0
fi
db_settitle live-autobuild-manual/title
db_input low live-autobuild-manual/username || true
db_go
db_settitle live-autobuild-manual/title
db_input low live-autobuild-manual/directory || true
db_go
db_settitle live-autobuild-manual/title
db_input low live-autobuild-manual/cron || true
db_go
db_stop

View File

@ -1,29 +0,0 @@
Template: live-autobuild-manual/title
Type: title
Description: Debian Live - System Build Scripts
Template: live-autobuild-manual/enable
Type: boolean
Default: false
Description: Enable live-autobuild-manual?
Do you want to enable live-autobuild-manual?
.
If unsure, use 'no' (default).
Template: live-autobuild-manual/username
Type: string
Default: live-autobuild-manual
Description: What useraccount to use to build the manual?
Enter the name of the username.
Template: live-autobuild-manual/directory
Type: string
Default: /srv/debian.net/live-manual
Description: What directory to put builds to?
Enter the directory where the manual should be stored in.
Template: live-autobuild-manual/cron
Type: string
Default: 0-59/10 * * * *
Description: What directory to put builds to?
Enter the cron times where the manual should be build.