diff options
Diffstat (limited to 'debian')
-rw-r--r-- | debian/99-cloud-init-disable-diskprovisioning.conf | 28 | ||||
-rw-r--r-- | debian/changelog | 8 | ||||
-rw-r--r-- | debian/docs | 1 | ||||
-rw-r--r-- | debian/ephemeral-disk-warning.service | 16 | ||||
-rwxr-xr-x | debian/ephemeral-disk-warning.sh | 23 | ||||
-rw-r--r-- | debian/install | 2 | ||||
-rw-r--r-- | debian/patches/disable-udev-rules.patch | 7 | ||||
-rw-r--r-- | debian/patches/disable_provisioning.patch | 25 | ||||
-rw-r--r-- | debian/patches/fix-waagent-service.patch | 32 | ||||
-rw-r--r-- | debian/patches/series | 6 | ||||
-rw-r--r-- | debian/patches/sshd_config_newline_fix.patch | 22 | ||||
-rwxr-xr-x | debian/rules | 3 | ||||
-rw-r--r-- | debian/upstart | 24 | ||||
-rw-r--r-- | debian/waagent.conf | 29 | ||||
l---------[-rw-r--r--] | debian/walinuxagent.service | 14 | ||||
-rw-r--r-- | debian/watch | 3 |
16 files changed, 128 insertions, 115 deletions
diff --git a/debian/99-cloud-init-disable-diskprovisioning.conf b/debian/99-cloud-init-disable-diskprovisioning.conf new file mode 100644 index 0000000..7a45100 --- /dev/null +++ b/debian/99-cloud-init-disable-diskprovisioning.conf @@ -0,0 +1,28 @@ +# On Windows Azure, the resource disk is checked and formated +# each reboot. For some users, this causes some problems, especially +# when it comes to handling Swap partitions. +# +# If you would like WALinuxAgent to handle the ephemeral disk rather +# than Cloud-init, copy this file to /etc/cloud/cloud.d and enable +# provisioning in /etc/waagent.conf: + +cloud_config_modules: + - emit_upstart + - ssh-import-id + - locale + - set-passwords + - snappy + - grub-dpkg + - apt-pipelining + - apt-configure + - package-update-upgrade-install + - landscape + - timezone + - puppet + - chef + - salt-minion + - mcollective + - disable-ec2-metadata + - runcmd + - byobu + diff --git a/debian/changelog b/debian/changelog index 54b65f8..121361a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +walinuxagent (2.0.12-0ubuntu1) vivid; urgency=medium + + * New upstream release. + * Added debian/watch for easier maintenance. + * Fix regression of missing dataloss warning by adding systemd unit file. + + -- Ben Howard <ben.howard@ubuntu.com> Wed, 25 Mar 2015 11:04:05 -0600 + walinuxagent (2.0.8-0ubuntu7) vivid; urgency=medium * Added /lib/udev/rules.d/66-azure-storage.rules: create symlinks for diff --git a/debian/docs b/debian/docs index b924fd1..56b0555 100644 --- a/debian/docs +++ b/debian/docs @@ -1,3 +1,4 @@ +debian/99-cloud-init-disable-diskprovisioning.conf NOTICE LICENSE-2.0.txt README diff --git a/debian/ephemeral-disk-warning.service b/debian/ephemeral-disk-warning.service new file mode 100644 index 0000000..7bc0fe7 --- /dev/null +++ b/debian/ephemeral-disk-warning.service @@ -0,0 +1,16 @@ +[Unit] +Description= +After=cloud-final.service +ConditionVirtualization=microsoft +ConditionPathIsMountPoint=/mnt +ConditionPathExists=/dev/disk/azure/resource-part1 + +[Service] +Type=oneshot +ExecStart=/usr/sbin/ephemeral-disk-warning.sh +RemainAfterExit=yes +StandardOutput=journal+console + +[Install] +WantedBy=multi-user.target + diff --git a/debian/ephemeral-disk-warning.sh b/debian/ephemeral-disk-warning.sh new file mode 100755 index 0000000..82b043b --- /dev/null +++ b/debian/ephemeral-disk-warning.sh @@ -0,0 +1,23 @@ +#!/bin/sh +dev_resource=$(readlink -f /dev/disk/azure/resource-part1) +dev_resource_mp=$(mount | awk '$1==R {print$3}' "R=${dev_resource}") +warn_file="${dev_resource_mp}/DATALOSS_WARNING_README.txt" + +if [ ! -f "${warn_file}" ]; then + cat > ${warn_file} <<EOM +WARNING: THIS IS A TEMPORARY DISK. + +Any data stored on this drive is SUBJECT TO LOSS and THERE IS NO WAY TO +RECOVER IT. + +Please do not use this disk for storing any personal or application data. + +For additional details to please refer to the MSDN documentation at: +http://msdn.microsoft.com/en-us/library/windowsazure/jj672979.aspx +EOM + + chmod 0444 ${warn_file} + chattr +i ${warn_file} + logger "Added ephemeral disk warning to ${warn_file}" +fi + diff --git a/debian/install b/debian/install index 27589a6..5f441de 100644 --- a/debian/install +++ b/debian/install @@ -1,3 +1,5 @@ config/91_walinuxagent.cfg etc/cloud/cloud.cfg.d +debian/ephemeral-disk-warning.service lib/systemd/system debian/ephemeral-disk-warning.conf etc/init +debian/ephemeral-disk-warning.sh usr/sbin debian/66-azure-storage.rules lib/udev/rules.d diff --git a/debian/patches/disable-udev-rules.patch b/debian/patches/disable-udev-rules.patch index 56c5acf..8157f40 100644 --- a/debian/patches/disable-udev-rules.patch +++ b/debian/patches/disable-udev-rules.patch @@ -1,11 +1,6 @@ -Description: Prevent the removal of udev rules by agent - Agent violates packaging rules by modifying the files from another - package. This patch makes the package compliant. -Author: Ben Howard -Last-Update: 2013-07-11 --- a/waagent +++ b/waagent -@@ -90,8 +90,7 @@ +@@ -92,8 +92,7 @@ VMM_STARTUP_SCRIPT_NAME='install' VMM_CONFIG_FILE_NAME='linuxosconfiguration.xml' global RulesFiles diff --git a/debian/patches/disable_provisioning.patch b/debian/patches/disable_provisioning.patch index 02a90cb..08d8ee0 100644 --- a/debian/patches/disable_provisioning.patch +++ b/debian/patches/disable_provisioning.patch @@ -1,21 +1,6 @@ -Description: Disable provisioning - On Ubuntu, provisioning requires cloud-init. We disable all the - provisioning functions for the agent. -Author: Ben Howard -Last-Update: 2013-07-11 --- a/config/waagent.conf +++ b/config/waagent.conf -@@ -1,6 +1,9 @@ - # - # Windows Azure Linux Agent Configuration - # -+# Ubuntu uses Cloud-init to provision on Windows Azure. This configuration -+# file is used to ensure that cloud-init does the prep of the disk -+# - - # Specified program is invoked with the argument "Ready" when we report ready status - # to the endpoint server. -@@ -14,29 +17,29 @@ +@@ -14,30 +14,34 @@ Role.TopologyConsumer=None # Enable instance creation @@ -45,10 +30,14 @@ Last-Update: 2013-07-11 # Typically ext3 or ext4. FreeBSD images should use 'ufs2' here. ResourceDisk.Filesystem=ext4 --# ount point for the resource disk + # Mount point for the resource disk -ResourceDisk.MountPoint=/mnt/resource -+# Mount point for the resource disk +ResourceDisk.MountPoint=/mnt ++# NOTE: Ubuntu uses Cloud-init for disk-provisioning. This will ++# unless you disable Cloud-init disk provisioning. Please see ++# /usr/share/doc/walinuxagent/99-cloud-init-disable-diskprovisioning.conf ++# # Create and use swapfile on resource disk. ResourceDisk.EnableSwap=n + diff --git a/debian/patches/fix-waagent-service.patch b/debian/patches/fix-waagent-service.patch new file mode 100644 index 0000000..a44cd75 --- /dev/null +++ b/debian/patches/fix-waagent-service.patch @@ -0,0 +1,32 @@ +--- a/distro/systemd/waagent.service ++++ /dev/null +@@ -1,13 +0,0 @@ +-[Unit] +-Description=Windows Azure Linux Agent +-After=network.target +-After=sshd.service +-ConditionFileIsExecutable=/usr/sbin/waagent +-ConditionPathExists=/etc/waagent.conf +- +-[Service] +-Type=simple +-ExecStart=/usr/sbin/waagent -daemon +- +-[Install] +-WantedBy=multi-user.target +--- /dev/null ++++ b/distro/systemd/walinuxagent.service +@@ -0,0 +1,13 @@ ++[Unit] ++Description=Windows Azure Linux Agent ++After=network.target ++Wants=sshd.service sshd-keygen.service ++ConditionFileIsExecutable=/usr/sbin/waagent ++ConditionPathExists=/etc/waagent.conf ++ ++[Service] ++Type=simple ++ExecStart=/usr/sbin/waagent -daemon ++ ++[Install] ++WantedBy=multi-user.target diff --git a/debian/patches/series b/debian/patches/series index 49ac87a..60e6520 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,5 +1,5 @@ -disable-udev-rules.patch -disable_provisioning.patch fixup_setup_file.patch cloud-init-default-cfg.patch -sshd_config_newline_fix.patch +disable_provisioning.patch +disable-udev-rules.patch +fix-waagent-service.patch diff --git a/debian/patches/sshd_config_newline_fix.patch b/debian/patches/sshd_config_newline_fix.patch deleted file mode 100644 index b2db231..0000000 --- a/debian/patches/sshd_config_newline_fix.patch +++ /dev/null @@ -1,22 +0,0 @@ -Description: Fix for broken sshd configuration (LP: #1305418) - Change modification of sshd_config to address lack of newline at EOF. - Lack of newline resulted in appended config line on same line - as existing configuration option, breaking sshd_config. - -Author: Robert C Jennings <robert.jennings@canonical.com> -Bug-Ubuntu: https://bugs.launchpad.net/bugs/1305418 ---- - waagent | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/waagent -+++ b/waagent -@@ -3838,7 +3838,7 @@ - # Disable RFC 4252 and RFC 4256 authentication schemes. - ReplaceFileContentsAtomic(filepath, "\n".join(filter(lambda a: not - (a.startswith("PasswordAuthentication") or a.startswith("ChallengeResponseAuthentication")), -- GetFileContents(filepath).split('\n'))) + "PasswordAuthentication no\nChallengeResponseAuthentication no\n") -+ GetFileContents(filepath).split('\n'))) + "\nPasswordAuthentication no\nChallengeResponseAuthentication no\n") - Log("Disabled SSH password-based authentication methods.") - if self.AdminPassword != None: - MyDistro.changePass('root',self.AdminPassword) diff --git a/debian/rules b/debian/rules index 5b9c8e9..5358b7e 100755 --- a/debian/rules +++ b/debian/rules @@ -1,4 +1,6 @@ #!/usr/bin/make -f +INIT_SYSTEM ?= upstart,systemd +export PYBUILD_INSTALL_ARGS=--init-system=$(INIT_SYSTEM) DEB_VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p') ORIG_SRC=https://github.com/WindowsAzure/WALinuxAgent @@ -6,6 +8,7 @@ ORIG_SRC=https://github.com/WindowsAzure/WALinuxAgent get-packaged-orig-source: git clone --separate-git-dir=.git \ $(ORIG_SRC) orig_source + git checkout -b tags/$(DEB_VERSION) git archive --format=tar.gz WALinuxAgent-$(DEB_VERSION) \ -o walinuxagent_$(DEB_VERSION).orig.tar.gz diff --git a/debian/upstart b/debian/upstart deleted file mode 100644 index 4ba35bc..0000000 --- a/debian/upstart +++ /dev/null @@ -1,24 +0,0 @@ -description "Windows Azure Linux agent" -author "Ben Howard <ben.howard@canonical.com>" - -start on runlevel [2345] -stop on runlevel [!2345] - -pre-start script - - [ -r /etc/default/walinuxagent ] && . /etc/default/walinuxagent - - if [ "$WALINUXAGENT_ENABLED" != "1" ]; then - stop ; exit 0 - fi - - if [ ! -x /usr/sbin/waagent ]; then - stop ; exit 0 - fi - - #Load the udf module - modprobe -b udf - -end script - -exec /usr/sbin/waagent -daemon diff --git a/debian/waagent.conf b/debian/waagent.conf deleted file mode 100644 index 2ce476c..0000000 --- a/debian/waagent.conf +++ /dev/null @@ -1,29 +0,0 @@ -# -# Windows Azure Linux Agent Configuration -# This configuration is modified to work with Cloud-init -# - -Role.StateConsumer=None # Specified program is invoked with "Ready" or "Shutdown". - # Shutdown will be initiated only after the program returns. Windows Azure will - # power off the VM if shutdown is not completed within ?? minutes. -Role.ConfigurationConsumer=None # Specified program is invoked with XML file argument specifying role configuration. -Role.TopologyConsumer=None # Specified program is invoked with XML file argument specifying role topology. - -Provisioning.Enabled=n # -Provisioning.DeleteRootPassword=n # Password authentication for root account will be unavailable. -Provisioning.RegenerateSshHostKeyPair=n # Generate fresh host key pair. -Provisioning.SshHostKeyPairType=rsa # Supported values are "rsa", "dsa" and "ecdsa". -Provisioning.MonitorHostName=n # Monitor host name changes and publish changes via DHCP requests. - -ResourceDisk.Format=n # Format if unformatted. If 'n', resource disk will not be mounted. -ResourceDisk.Filesystem=ext4 # -ResourceDisk.MountPoint=/mnt # -ResourceDisk.EnableSwap=n # Create and use swapfile on resource disk. -ResourceDisk.SwapSizeMB=0 # Size of the swapfile. - -LBProbeResponder=y # Respond to load balancer probes if requested by Windows Azure. - -Logs.Verbose=n # - -OS.RootDeviceScsiTimeout=300 # Root device timeout in seconds. -OS.OpensslPath=None # If "None", the system default version is used. diff --git a/debian/walinuxagent.service b/debian/walinuxagent.service index 9177258..1abb506 100644..120000 --- a/debian/walinuxagent.service +++ b/debian/walinuxagent.service @@ -1,13 +1 @@ -[Unit] -Description=Windows Azure Linux Agent -After=network.target -Wants=sshd.service sshd-keygen.service -ConditionFileIsExecutable=/usr/sbin/waagent -ConditionPathExists=/etc/waagent.conf - -[Service] -Type=simple -ExecStart=/usr/sbin/waagent -daemon - -[Install] -WantedBy=multi-user.target +../distro/systemd/walinuxagent.service
\ No newline at end of file diff --git a/debian/watch b/debian/watch new file mode 100644 index 0000000..1cbe705 --- /dev/null +++ b/debian/watch @@ -0,0 +1,3 @@ +version=3 +opts=filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/<project>-$1\.tar\.gz/ \ + https://github.com/Azure/WALinuxAgent/tags .*/?(\d\.\d.\d{1,})\.tar\.gz |