Merge ~andreserl/maas:better_packaging_clean_lint into maas:master

Proposed by Andres Rodriguez
Status: Merged
Approved by: Andres Rodriguez
Approved revision: 188aa1978872dee7b7f0c91e959b7588dda6cea6
Merge reported by: MAAS Lander
Merged at revision: not available
Proposed branch: ~andreserl/maas:better_packaging_clean_lint
Merge into: maas:master
Diff against target: 248 lines (+32/-35)
20 files modified
debian/changelog (+4/-0)
debian/control (+1/-1)
debian/maas-common.lintian-overrides (+4/-2)
debian/maas-common.postinst (+1/-1)
debian/maas-dhcp.postinst (+4/-4)
debian/maas-proxy.lintian-overrides (+1/-1)
debian/maas-proxy.postinst (+2/-2)
debian/maas-proxy.postrm (+2/-2)
debian/maas-rack-controller.lintian-overrides (+1/-0)
debian/maas-rack-controller.postinst (+4/-4)
debian/maas-rack-controller.postrm (+2/-2)
debian/maas-region-api.lintian-overrides (+3/-3)
debian/maas-region-api.postinst (+1/-2)
debian/maas-region-controller.postinst (+1/-1)
debian/rules (+0/-8)
debian/source.lintian-overrides (+1/-1)
dev/null (+0/-1)
src/maasserver/templates/maasserver/base.html (+0/-0)
src/maasserver/templates/maasserver/index.html (+0/-0)
src/maasserver/templates/maasserver/zone_list.html (+0/-0)
Reviewer Review Type Date Requested Status
Blake Rouse (community) Approve
MAAS Lander Approve
Review via email: mp+353458@code.launchpad.net

Commit message

debian/*: Improve packaging towards being lintian clean.

There are various packaging errors. This branch improves it so there are significantly less, but it doesn't make it fully lintian clean.

To post a comment you must log in.
Revision history for this message
MAAS Lander (maas-lander) wrote :

UNIT TESTS
-b better_packaging_clean_lint lp:~andreserl/maas/+git/maas into -b master lp:~maas-committers/maas

STATUS: SUCCESS
COMMIT: 76e5773970fe8536bef609324e3877dbec198f06

review: Approve
Revision history for this message
Blake Rouse (blake-rouse) :
review: Needs Information
Revision history for this message
Blake Rouse (blake-rouse) wrote :

Looks good.

review: Approve
Revision history for this message
MAAS Lander (maas-lander) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 5e57b59..268e1fc 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -4,6 +4,10 @@ maas (2.5.0~alpha2-0ubuntu1) UNRELEASED; urgency=medium
6 * Don't autostart maas-rackd on install to avoid initialization errors.
7 - debian/rules: add --no-start for maas-rackd.
8 - debian/maas-rack-controller.postinst: enable/start maas-rackd.
9+ * Make package more lintian clean:
10+ - debian/*.postinst: Remove of use of systemctl for deb-system-*
11+ - debian/*.lintin-overrides: Add overrides for a few warnings.
12+ * debian/rules: Do not override dh_installinit as we are using systemd.
13
14 -- Andres Rodriguez <andreserl@ubuntu.com> Mon, 20 Aug 2018 14:19:25 -0400
15
16diff --git a/debian/control b/debian/control
17index d6e42cc..4650721 100644
18--- a/debian/control
19+++ b/debian/control
20@@ -279,7 +279,7 @@ Description: MAAS DHCP server
21
22 Package: maas-dns
23 Architecture: all
24-Depends: maas-region-api (>= 2.4.0~beta1~)
25+Depends: maas-region-api (>= 2.4.0~beta1~), ${misc:Depends}
26 Description: dummy transitional package for MAAS DNS server
27 This package can be safely removed, as the configuration this package
28 performed is now integrated in 'maas-region-api'.
29diff --git a/debian/maas-common.lintian-overrides b/debian/maas-common.lintian-overrides
30index bb8d8f4..6852fdb 100644
31--- a/debian/maas-common.lintian-overrides
32+++ b/debian/maas-common.lintian-overrides
33@@ -1,2 +1,4 @@
34-maas-common: binary-without-manpage
35-maas-common: maintainer-script-calls-systemctl
36+maas-common: python-script-but-no-python-dep usr/lib/maas/maas-common
37+maas-common: python-script-but-no-python-dep usr/lib/maas/maas-delete-file
38+maas-common: python-script-but-no-python-dep usr/lib/maas/maas-write-file
39+maas-common: maintainer-script-should-not-use-recursive-chown-or-chmod
40diff --git a/debian/maas-common.postinst b/debian/maas-common.postinst
41index b6d346f..b3cf420 100644
42--- a/debian/maas-common.postinst
43+++ b/debian/maas-common.postinst
44@@ -11,7 +11,7 @@ configure_logging() {
45 fi
46 chown syslog:syslog /var/log/maas/maas.log
47 # Make sure rsyslog reads our config
48- systemctl restart rsyslog >/dev/null 2>&1 || true
49+ deb-systemd-invoke restart 'rsyslog.service' >/dev/null || true
50 }
51
52 configure_lib_dir() {
53diff --git a/debian/maas-dhcp.lintian-overrides b/debian/maas-dhcp.lintian-overrides
54deleted file mode 100644
55index 5fc172a..0000000
56--- a/debian/maas-dhcp.lintian-overrides
57+++ /dev/null
58@@ -1 +0,0 @@
59-maas-dhcp: maintainer-script-calls-systemctl
60diff --git a/debian/maas-dhcp.postinst b/debian/maas-dhcp.postinst
61index 902287a..6e38492 100644
62--- a/debian/maas-dhcp.postinst
63+++ b/debian/maas-dhcp.postinst
64@@ -6,10 +6,10 @@ if [ "$1" = "configure" ]
65 then
66 # Stop the dhcpd instance that came with the isc-dhcp-server package.
67 # We run our own dhcpd instances.
68- systemctl stop isc-dhcp-server >/dev/null 2>&1 || true
69- systemctl disable isc-dhcp-server >/dev/null 2>&1 || true
70- systemctl stop isc-dhcp-server6 >/dev/null 2>&1 || true
71- systemctl disable isc-dhcp-server6 >/dev/null 2>&1 || true
72+ deb-systemd-invoke stop isc-dhcp-server >/dev/null || true
73+ deb-systemd-helper disble isc-dhcp-server >/dev/null || true
74+ deb-systemd-invoke stop isc-dhcp-server6 >/dev/null || true
75+ deb-systemd-helper disble isc-dhcp-server6 >/dev/null || true
76
77 dhcpd_prof="/etc/apparmor.d/usr.sbin.dhcpd"
78 if [ -f "${dhcpd_prof}" ] && command -v apparmor_parser >/dev/null 2>&1
79diff --git a/debian/maas-proxy.lintian-overrides b/debian/maas-proxy.lintian-overrides
80index d05b23c..00fbdf5 100644
81--- a/debian/maas-proxy.lintian-overrides
82+++ b/debian/maas-proxy.lintian-overrides
83@@ -1 +1 @@
84-maas-proxy: maintainer-script-calls-systemctl
85+maas-proxy: maintainer-script-should-not-use-recursive-chown-or-chmod
86diff --git a/debian/maas-proxy.postinst b/debian/maas-proxy.postinst
87index 74dd16a..9769fc2 100644
88--- a/debian/maas-proxy.postinst
89+++ b/debian/maas-proxy.postinst
90@@ -8,8 +8,8 @@ then
91 # We run our own squid3 instances.
92 # Handle both versions of the name, for safety.
93 for SQUID in squid squid3; do
94- systemctl stop ${SQUID} >/dev/null 2>&1 || true
95- systemctl disable ${SQUID} >/dev/null 2>&1 || true
96+ deb-systemd-invoke stop ${SQUID} >/dev/null || true
97+ deb-systemd-helper disable ${SQUID} >/dev/null || true
98 done
99
100 # Ensure log folder is created.
101diff --git a/debian/maas-proxy.postrm b/debian/maas-proxy.postrm
102index 9f5c346..cfe5093 100644
103--- a/debian/maas-proxy.postrm
104+++ b/debian/maas-proxy.postrm
105@@ -12,7 +12,7 @@ fi
106 # MAAS installation disables system squid so it doesn't
107 # prevent MAAS from running our own squid daemon. As such,
108 # on removal, reenable squid.
109-systemctl enable squid >/dev/null 2>&1 || true
110-systemctl start squid >/dev/null 2>&1 || true
111+deb-systemd-helper enable squid >/dev/null || true
112+deb-systemd-invoke start squid >/dev/null || true
113
114 #DEBHELPER#
115diff --git a/debian/maas-rack-controller.lintian-overrides b/debian/maas-rack-controller.lintian-overrides
116index 50d0059..e720c16 100644
117--- a/debian/maas-rack-controller.lintian-overrides
118+++ b/debian/maas-rack-controller.lintian-overrides
119@@ -1 +1,2 @@
120 maas-rack-controller: binary-without-manpage
121+maas-rack-controller: maintainer-script-should-not-use-recursive-chown-or-chmod
122diff --git a/debian/maas-rack-controller.postinst b/debian/maas-rack-controller.postinst
123index fcddbb9..db119f1 100644
124--- a/debian/maas-rack-controller.postinst
125+++ b/debian/maas-rack-controller.postinst
126@@ -148,8 +148,8 @@ fix_dns_permissions() {
127 }
128
129 disable_nginx() {
130- systemctl stop nginx >/dev/null 2>&1 || true
131- systemctl disable nginx >/dev/null 2>&1 || true
132+ deb-systemd-invoke stop nginx >/dev/null || true
133+ deb-systemd-helper disable nginx >/dev/null || true
134 }
135
136 # Unconditionally ensure that there is at least an empty configuration
137@@ -197,9 +197,9 @@ elif [ "$1" = "configure" ] && dpkg --compare-versions "$2" gt 0.1+bzr266+dfsg-0
138 edit_named_options
139 fi
140
141-deb-systemd-invoke enable maas-rackd >/dev/null || true
142+deb-systemd-helper enable maas-rackd >/dev/null || true
143 deb-systemd-invoke restart maas-rackd >/dev/null || true
144-invoke-rc.d bind9 restart || true
145+deb-systemd-invoke restart bind9 >/dev/null || true
146
147 db_stop
148
149diff --git a/debian/maas-rack-controller.postrm b/debian/maas-rack-controller.postrm
150index aa28f1a..ee7a63d 100644
151--- a/debian/maas-rack-controller.postrm
152+++ b/debian/maas-rack-controller.postrm
153@@ -52,5 +52,5 @@ fi
154 # MAAS installation disables system nginx so it doesn't
155 # prevent MAAS from running our own nginx daemon. As such,
156 # on removal, reenable nginx.
157-systemctl enable nginx >/dev/null 2>&1 || true
158-systemctl start nginx >/dev/null 2>&1 || true
159+deb-systemd-helper enable nginx >/dev/null || true
160+deb-systemd-invoke start nginx >/dev/null || true
161diff --git a/debian/maas-region-api.lintian-overrides b/debian/maas-region-api.lintian-overrides
162index 0c504dd..d3598ac 100644
163--- a/debian/maas-region-api.lintian-overrides
164+++ b/debian/maas-region-api.lintian-overrides
165@@ -1,7 +1,7 @@
166-maas-region-api: maintainer-script-calls-systemctl
167 maas-region-api: command-with-path-in-maintainer-script
168 maas-region-api: executable-not-elf-or-script
169+maas-region-api: binary-without-manpage usr/sbin/regiond
170 maas-region-api: binary-without-manpage usr/sbin/maas-region
171 maas-region-api: binary-without-manpage usr/sbin/maas-region-admin
172-maas-region-api: binary-without-manpage usr/sbin/maas-generate-winrm-cert
173-maas-region-api: font-in-non-font-package
174+maas-region-api: binary-without-manpage usr/bin/maas-generate-winrm-cert
175+maas-region-api: maintainer-script-should-not-use-recursive-chown-or-chmod
176diff --git a/debian/maas-region-api.postinst b/debian/maas-region-api.postinst
177index e643650..aae70a6 100644
178--- a/debian/maas-region-api.postinst
179+++ b/debian/maas-region-api.postinst
180@@ -20,8 +20,7 @@ configure_logging() {
181
182 # Make sure rsyslog reads our config after creating the
183 # destination folder.
184- systemctl restart rsyslog >/dev/null 2>&1 || true
185-
186+ deb-systemd-invoke restart 'rsyslog.service' >/dev/null || true
187 }
188
189 configure_libdir() {
190diff --git a/debian/maas-region-controller.postinst b/debian/maas-region-controller.postinst
191index c4d6c28..582f202 100644
192--- a/debian/maas-region-controller.postinst
193+++ b/debian/maas-region-controller.postinst
194@@ -71,7 +71,7 @@ configure_migrate_maas_dns() {
195 maas-region edit_named_options \
196 --migrate-conflicting-options --config-path \
197 /etc/bind/named.conf.options
198- invoke-rc.d bind9 restart || true
199+ deb-systemd-invoke bind9 restart || true
200 }
201
202 if [ "$1" = "configure" ] && [ -z "$2" ]; then
203diff --git a/debian/rules b/debian/rules
204index d38b472..51b946b 100755
205--- a/debian/rules
206+++ b/debian/rules
207@@ -10,14 +10,6 @@ override_dh_auto_test:
208 # do nothing as we don't want the tests to run because they require
209 # internet access
210
211-override_dh_installinit:
212- dh_installinit -p maas-region-api --name=maas-regiond --no-start
213- dh_installinit -p maas-rack-controller --name=maas-rackd --no-start
214- dh_installinit -p maas-rack-controller --name=maas-http
215- dh_installinit -p maas-proxy --name=maas-proxy
216- dh_installinit -p maas-dhcp --name=maas-dhcpd
217- dh_installinit -p maas-dhcp --name=maas-dhcpd6
218-
219 override_dh_systemd_enable:
220 dh_systemd_enable -p maas-region-api --name=maas-regiond
221 dh_systemd_enable -p maas-rack-controller --name=maas-rackd
222diff --git a/debian/source.lintian-overrides b/debian/source.lintian-overrides
223index 2e38544..b1e82db 100644
224--- a/debian/source.lintian-overrides
225+++ b/debian/source.lintian-overrides
226@@ -1,3 +1,3 @@
227 source: source-is-missing src/maasserver/static/js/bundle/maas-min.js
228 source: source-is-missing src/maasserver/static/js/bundle/vendor-min.js
229-source: source-is-missing src/maasserver/static/js/macaroon/js-macaroon.js
230+source: source-is-missing src/maasserver/static/js/macaroon/js-macaroon.js line length is 514 characters (>512)
231diff --git a/src/maasserver/templates/maasserver/base.html b/src/maasserver/templates/maasserver/base.html
232old mode 100755
233new mode 100644
234index fc65508..fc65508
235--- a/src/maasserver/templates/maasserver/base.html
236+++ b/src/maasserver/templates/maasserver/base.html
237diff --git a/src/maasserver/templates/maasserver/index.html b/src/maasserver/templates/maasserver/index.html
238old mode 100755
239new mode 100644
240index ff2b1ae..ff2b1ae
241--- a/src/maasserver/templates/maasserver/index.html
242+++ b/src/maasserver/templates/maasserver/index.html
243diff --git a/src/maasserver/templates/maasserver/zone_list.html b/src/maasserver/templates/maasserver/zone_list.html
244old mode 100755
245new mode 100644
246index f2758b9..f2758b9
247--- a/src/maasserver/templates/maasserver/zone_list.html
248+++ b/src/maasserver/templates/maasserver/zone_list.html

Subscribers

People subscribed via source and target branches