launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #11183
[Merge] lp:~andreserl/maas/packaging_cobbler_removal into lp:~maas-maintainers/maas/packaging
Andres Rodriguez has proposed merging lp:~andreserl/maas/packaging_cobbler_removal into lp:~maas-maintainers/maas/packaging.
Requested reviews:
MAAS Maintainers (maas-maintainers)
For more details, see:
https://code.launchpad.net/~andreserl/maas/packaging_cobbler_removal/+merge/120635
--
https://code.launchpad.net/~andreserl/maas/packaging_cobbler_removal/+merge/120635
Your team MAAS Maintainers is requested to review the proposed merge of lp:~andreserl/maas/packaging_cobbler_removal into lp:~maas-maintainers/maas/packaging.
=== modified file 'debian/changelog'
--- debian/changelog 2012-08-10 23:50:38 +0000
+++ debian/changelog 2012-08-21 19:37:21 +0000
@@ -1,10 +1,19 @@
-maas (0.1+bzr865+dfsg-0ubuntu1) UNRELEASED; urgency=low
+maas (0.1+bzr908+dfsg-0ubuntu1) UNRELEASED; urgency=low
* New upstream release
* debian/maas.postinst:
- include '/MAAS' for DEFAULT_MAAS_URL.(LP: #1033956)
- Update bzr version to safely upgrade.
* Add maas-dns package that configures DNS in MAAS (LP: #1030860)
+ * Remove cobbler related bits
+ - drop maas-dhcp packaging but leave as transitional package.
+ - debian/maas.postinst: Drop cobbler configuration
+ - debian/maas.install: Drop installation of snippets/preseeds.
+ - debian/control: Drop Depends on maas-provision. Depends on bind9utils.
+ - debian/patches:
+ + 02-pserv-config.patch: Updated. Do not patch cobbler related bits.
+ + 99-dnssec-keygen-path.patch: Added to add full path of dnssec-keygen
+ or otherwise it will fail to run.
-- Andres Rodriguez <andreserl@xxxxxxxxxx> Thu, 02 Aug 2012 09:01:43 -0400
=== modified file 'debian/control'
--- debian/control 2012-08-20 12:59:15 +0000
+++ debian/control 2012-08-21 19:37:21 +0000
@@ -12,7 +12,7 @@
Architecture: all
Depends: apache2,
avahi-daemon,
- maas-provision (>= 2.2.2),
+ bind9utils,
dbconfig-common,
distro-info,
ipmitool,
@@ -33,7 +33,6 @@
${misc:Depends},
${python:Depends}
Recommends: openssh-server, maas-dns
-Suggests: maas-dhcp
Description: Ubuntu MAAS Server
Ubuntu MAAS Server is the successor to Orchestra. It offers a
nice UI to provision your Ubuntu servers. Each physical server
@@ -83,8 +82,8 @@
Package: maas-dhcp
Architecture: all
-Depends: ${misc:Depends}, maas, debconf, dnsmasq
-Description: Ubuntu MAAS Server - DHCP configuration (metapackage)
+Depends: maas, maas-dns
+Description: Ubuntu MAAS Server (transitional package)
Ubuntu MAAS Server is the successor to Orchestra. It offers a
nice UI to provision your Ubuntu servers. Each physical server
(“node”) will be commissioned automatically on first boot.
@@ -94,7 +93,7 @@
be deployed on demand by name, or allocated to a queue for
dynamic allocation to services being deployed on this MAAS.
.
- This package configures a DHCP that can be used with MAAS.
+ This package is a transitional package.
Package: maas-dns
Architecture: all
=== removed file 'debian/maas-dhcp.config'
--- debian/maas-dhcp.config 2012-04-06 19:39:27 +0000
+++ debian/maas-dhcp.config 1970-01-01 00:00:00 +0000
@@ -1,30 +0,0 @@
-#!/bin/sh -e
-
-# Only ask this question on new installs and reconfigures
-if ([ "$1" = "configure" ] && [ -z "$2" ]) || [ "$1" = "reconfigure" ]; then
- . /usr/share/debconf/confmodule
-
- # Try to obtain the default range for dnsmasq-dhcp-range and set it
- range=$(grep -s "^dhcp-range=.*$" /etc/cobbler/dnsmasq.template | awk '{split($0,array,"=")} END{print array[2]}')
- if [ -n "$range" ]; then
- db_set maas-dhcp/dnsmasq-dhcp-range "$range"
- fi
-
- # try to obtain the default gateway and set it
- gateway=$(grep -s "^dhcp-option=.*$" /etc/cobbler/dnsmasq.template | awk '{split($0,array,"3,")} END{print array[2]}')
- if [ "$gateway" = "\$next_server" ]; then
- # If gateway is $next_server, obtain the IP address of gateway
- gateway=$(grep -s "^next_server:.*$" /etc/cobbler/settings | awk '{split($0,array,": ")} END{print array[2]}')
- fi
- if [ -n "$gateway" ]; then
- db_set maas-dhcp/dnsmasq-default-gateway "$gateway"
- fi
-
- # try to obtain the domain and set it
- domain=$(grep -s "^domain=.*$" /etc/cobbler/dnsmasq.template | awk '{split($0,array,"=")} END{print array[2]}')
- if [ -n "$domain" ]; then
- db_set maas-dhcp/dnsmasq-domain-name "$domain"
- fi
-
-fi
-#DEBHELPER#
=== removed file 'debian/maas-dhcp.lintian-overrides'
--- debian/maas-dhcp.lintian-overrides 2012-04-10 19:26:20 +0000
+++ debian/maas-dhcp.lintian-overrides 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-maas-dhcp: postinst-uses-db-input
=== removed file 'debian/maas-dhcp.postinst'
--- debian/maas-dhcp.postinst 2012-04-06 19:39:27 +0000
+++ debian/maas-dhcp.postinst 1970-01-01 00:00:00 +0000
@@ -1,61 +0,0 @@
-#!/bin/sh -e
-
-. /usr/share/debconf/confmodule
-db_version 2.0
-
-if ([ "$1" = "configure" ] && [ -z "$2" ]) || [ "$1" = "reconfigure" ] || [ -n "$DEBCONF_RECONFIGURE" ]; then
- db_input high maas-dhcp/dnsmasq-dhcp-range || true
- db_go
- db_input high maas-dhcp/dnsmasq-default-gateway || true
- db_go
- db_input high maas-dhcp/dnsmasq-domain-name || true
- db_go
-
- # Setup dnsmasq
- sed -i -e "s/^manage_dns:.*$/manage_dns: 1/" \
- -e "s/^manage_dhcp:.*$/manage_dhcp: 1/" /etc/cobbler/settings
- sed -i -e "s/^module = manage_bind/module = manage_dnsmasq/" \
- -e "s/^module = manage_isc/module = manage_dnsmasq/" /etc/cobbler/modules.conf
-
- # Set the DHCP range
- db_get maas-dhcp/dnsmasq-dhcp-range || true
- range="$RET"
- if [ -n "$range" ]; then
- sed -i -e "s/^dhcp-range=.*$/dhcp-range=$range/" /etc/cobbler/dnsmasq.template
- fi
-
- # Setup Default Gateway
- db_get maas-dhcp/dnsmasq-default-gateway || true
- ipaddr="$RET"
- if [ -n "$ipaddr" ]; then
- # If template has $next_server as default gateway, set it to $ipaddr
- if grep -qs "^dhcp-option=.*$" /etc/cobbler/dnsmasq.template; then
- sed -i -e "s/^dhcp-option=.*$/dhcp-option=3,$ipaddr/" /etc/cobbler/dnsmasq.template
- fi
- fi
-
- # Setup Domain Name
- db_get maas-dhcp/dnsmasq-domain-name || true
- domain="$RET"
- if [ -n "$domain" ]; then
- # if the domain hasn't been set, set it to $domain
- if grep -qs "^#domain=.*$" /etc/cobbler/dnsmasq.template; then
- sed -i -e "s/^#domain=.*/domain=$domain/" /etc/cobbler/dnsmasq.template
- # if the domain has been set, change it to $domain
- elif grep -qs "^domain=.*$" /etc/cobbler/dnsmasq.template; then
- sed -i -e "s/^domain=.*$/domain=$domain/" /etc/cobbler/dnsmasq.template
- fi
- elif [ -z "$domain" ]; then
- # if the domain has been set to empty, then disable it
- if grep -qs "^domain=.*$" /etc/cobbler/dnsmasq.template; then
- sed -i -e "s/^domain=.*$/#domain=/" /etc/cobbler/dnsmasq.template
- fi
- fi
- if [ -x /usr/sbin/invoke-rc.d ]; then
- invoke-rc.d cobbler restart || true
- fi
-
-fi
-
-#DEBHELPER#
-exit 0
=== removed file 'debian/maas-dhcp.postrm'
--- debian/maas-dhcp.postrm 2012-04-10 19:26:20 +0000
+++ debian/maas-dhcp.postrm 1970-01-01 00:00:00 +0000
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-set -e
-
-. /usr/share/debconf/confmodule
-db_version 2.0
-
-if [ "$1" = "purge" ] ; then
- if [ -f /etc/cobbler/settings ]; then
- sed -i -e "s/^manage_dns:.*$/manage_dns: 0/" \
- -e "s/^manage_dhcp:.*$/manage_dhcp: 0/" /etc/cobbler/settings
- fi
- if [ -x /usr/sbin/invoke-rc.d ]; then
- invoke-rc.d cobbler restart || true
- fi
-fi
-
-#DEBHELPER#
-
-exit 0
=== removed file 'debian/maas-dhcp.templates'
--- debian/maas-dhcp.templates 2012-04-04 15:44:12 +0000
+++ debian/maas-dhcp.templates 1970-01-01 00:00:00 +0000
@@ -1,26 +0,0 @@
-Template: maas-dhcp/dnsmasq-dhcp-range
-Type: string
-_Description: Set the network range for DHCP Clients:
- Ubuntu MAAS Server can manage DHCP for address allocation for
- the provisioned systems. If the network range for the DHCP is
- different from the default (192.168.1.5,192.168.1.200), you
- should set it here.
- .
- An example of how a network range should be specified is:
- .
- 10.10.10.2,10.10.10.254
-
-Template: maas-dhcp/dnsmasq-default-gateway
-Type: string
-_Description: Set default Gateway for DHCP Clients:
- Ubuntu MAAS Server can manage DHCP for address allocation for
- the provisioned systems. If the Ubuntu MAAS Server is NOT the
- default Gateway for the provisioned systems, you should set the
- default Gateway here, otherwise leave this blank.
-
-Template: maas-dhcp/dnsmasq-domain-name
-Type: string
-_Description: Set the domain name for DHCP Clients:
- Ubuntu MAAS Server can manage DHCP for address allocation for
- the provisioned systems. If these systems are required to be
- under a domain, you should enter it here.
=== modified file 'debian/maas.install'
--- debian/maas.install 2012-08-15 12:37:41 +0000
+++ debian/maas.install 2012-08-21 19:37:21 +0000
@@ -22,9 +22,8 @@
# Install Celery Config
debian/tmp/etc/maas/celeryconfig.py
-# Install maas-import-pxe-files and old maas-import-isos compatibility stub
+# Install maas-import-pxe-files
debian/tmp/usr/sbin/maas-import-pxe-files
-debian/tmp/usr/sbin/maas-import-isos
# Install maas-import-pxe-files and related files
etc/cron.d/maas-import-pxe-files
@@ -48,7 +47,3 @@
debian/extras/20-maas.conf etc/rsyslog.d
debian/extras/maas_remote_syslog_compress etc/cron.d
debian/extras/99-maas etc/squid-deb-proxy/mirror-dstdomain.acl.d
-
-# Install old preseeds/snippets
-contrib/preseeds/* var/lib/cobbler/kickstarts
-contrib/snippets/* var/lib/cobbler/snippets
=== modified file 'debian/maas.postinst'
--- debian/maas.postinst 2012-08-20 13:00:07 +0000
+++ debian/maas.postinst 2012-08-21 19:37:21 +0000
@@ -37,14 +37,6 @@
fi
}
-restart_cobbler(){
- if [ -x /usr/sbin/invoke-rc.d ]; then
- invoke-rc.d cobbler restart || true
- else
- /etc/init.d/cobbler restart || true
- fi
-}
-
add_user_group(){
local user="maas"
local group="maas"
@@ -60,32 +52,6 @@
fi
}
-configure_maas_cobbler_user() {
- # Create 'maas' user and password to autoconfigure
- local cblr_pass=
- local hash=
- cblr_pass="$(pwgen -s 20)"
- hash=$(printf "maas:Cobbler:$cblr_pass" | md5sum | awk '{print $1}')
- [ -e /etc/cobbler/users.digest ] || install -o root -g root -m 0600 /dev/null /etc/cobbler/users.digest
- htpasswd -D /etc/cobbler/users.digest "maas" || true
- printf "maas:Cobbler:$hash\n" >> /etc/cobbler/users.digest
-
- if grep -qs "^\ \{1,\}password:.*$" /etc/maas/pserv.yaml; then
- sed -i "s/^\ \{1,\}password:.*$/ password: \""$cblr_pass"\"/" /etc/maas/pserv.yaml
- fi
-}
-
-configure_maas_pserv_user() {
- local pserv_pass=
- pserv_pass="$(pwgen -s 20)"
- if grep -qs "^password: \".*\"$" /etc/maas/pserv.yaml; then
- sed -i '/^password:/s/".*"$/"'"${pserv_pass}"'"/' /etc/maas/pserv.yaml
- fi
- if grep -qs "^PSERV_URL\ =\ " /etc/maas/maas_local_settings.py; then
- sed -i '/^PSERV_URL[ =]/s/maas:.*@/'"maas:${pserv_pass}"'@/' /etc/maas/maas_local_settings.py
- fi
-}
-
configure_maas_txlongpoll_rabbitmq_user() {
local longpoll_user="maas_longpoll"
local longpoll_pass=
@@ -134,14 +100,6 @@
sed -i "s/^DEFAULT_MAAS_URL\ \= \"[a-zA-Z0-9:/.]\{0,\}\"$/DEFAULT_MAAS_URL = \"http:\/\/"$ipaddr"\/MAAS\"/" \
/etc/maas/maas_local_settings.py
fi
-
- # Replace for PXE
- if grep -qs "^next_server:.*$" /etc/cobbler/settings; then
- sed -i "s/^next_server:.*$/next_server: $ipaddr/" /etc/cobbler/settings
- fi
- if grep -qs "^server:.*$" /etc/cobbler/settings; then
- sed -i "s/^server:.*$/server: $ipaddr/" /etc/cobbler/settings
- fi
}
if [ "$1" = "configure" ] && [ -z "$2" ]; then
@@ -170,18 +128,6 @@
a2enmod wsgi
#########################################################
- ########### Configure maas user for Cobbler #############
- #########################################################
-
- configure_maas_cobbler_user
-
- #########################################################
- ############ Configure maas user for pserv ##############
- #########################################################
-
- configure_maas_pserv_user
-
- #########################################################
########## Configure DEFAULT_MAAS_URL #################
#########################################################
@@ -272,7 +218,6 @@
if [ -n "$ipaddr" ]; then
configure_maas_default_url "$ipaddr"
fi
- restart_cobbler
elif [ "$1" = "configure" ] && dpkg --compare-versions "$2" gt 0.1+bzr266+dfsg-0ubuntu1; then
# If upgrading to any later package version, then upgrade db.
@@ -296,22 +241,12 @@
if dpkg --compare-versions "$2" lt 0.1+bzr459+dfsg-0ubuntu1; then
configure_maas_tgt
fi
- # If upgrading from any version lower than 0.1+bzr865+dfsg-0ubuntu1
+ # If upgrading from any version lower than 0.1+bzr908+dfsg-0ubuntu1
# we need to regenerate the passwords and update configs.
- if dpkg --compare-versions "$2" lt 0.1+bzr865+dfsg-0ubuntu1; then
- # configure maas user for cobbler
- configure_maas_cobbler_user
- # configure pserv user for cobbler
- configure_maas_pserv_user
+ if dpkg --compare-versions "$2" lt 0.1+bzr908+dfsg-0ubuntu1; then
# configure maas default url
db_get maas/default-maas-url
ipaddr="$RET"
- # If nothing in the database, obtain the IP from cobbler settings
- # which is the same as MAAS_DEFAULT_URL
- if [ -z "$ipaddr" ]; then
- ipaddr=$(awk '$1 == "server:" { print $2 }' /etc/cobbler/settings)
- db_set maas/default-maas-url "$ipaddr"
- fi
configure_maas_default_url "$ipaddr"
# make sure rabbitmq is running
restart_rabbitmq
=== modified file 'debian/patches/02-pserv-config.patch'
--- debian/patches/02-pserv-config.patch 2012-07-12 20:31:49 +0000
+++ debian/patches/02-pserv-config.patch 2012-08-21 19:37:21 +0000
@@ -3,26 +3,11 @@
include port, logfile, oops directory, cobbler url and username
Author: Andres Rodriguez <andreserl@xxxxxxxxxx>
-Index: maas-0.1+bzr734+dfsg.orig/etc/pserv.yaml
+Index: maas-0.1+bzr908+dfsg.orig/etc/pserv.yaml
===================================================================
---- maas-0.1+bzr734+dfsg.orig.orig/etc/pserv.yaml 2012-07-11 12:09:18.400599486 -0400
-+++ maas-0.1+bzr734+dfsg.orig/etc/pserv.yaml 2012-07-11 12:09:20.952599551 -0400
-@@ -4,12 +4,13 @@
-
- ## The port on which the Provisioning API will be made available.
- #
--# port: 5241
-+port: 5241
-
- ## The credentials which the Provisioning API will require.
- #
- # username: <current user>
- # password:
-+username: maas
- password: "test"
-
- ## Network interface to bind the service on.
-@@ -22,7 +23,7 @@
+--- maas-0.1+bzr908+dfsg.orig.orig/etc/pserv.yaml 2012-08-21 11:41:04.000000000 -0400
++++ maas-0.1+bzr908+dfsg.orig/etc/pserv.yaml 2012-08-21 11:47:54.529807736 -0400
+@@ -6,7 +6,7 @@
## running server.
#
# logfile: "pserv.log"
@@ -31,7 +16,7 @@
## OOPS configuration (optional).
#
-@@ -31,7 +32,7 @@
+@@ -15,7 +15,7 @@
# or directories other than what the oops machinery creates there.
#
# directory:
@@ -40,14 +25,3 @@
# reporter:
reporter: "maas-pserv"
-@@ -53,8 +54,8 @@
- # password: "test"
-
- # vdenv specific; see vdenv/README.txt.
-- url: http://local.cobbler.dev/cobbler_api
-- username: cobbler
-+ url: http://localhost/cobbler_api
-+ username: maas
- password: xcobbler
-
- ## TFTP configuration.
=== modified file 'debian/patches/series'
--- debian/patches/series 2012-07-25 14:19:10 +0000
+++ debian/patches/series 2012-08-21 19:37:21 +0000
@@ -1,3 +1,4 @@
01-fix-database-settings.patch
02-pserv-config.patch
03-txlongpoll-config.patch
+99-dnssec-keygen-path.patch