Merge lp:~ericsnowcurrently/landscape-client/fix-1680875-fix-packaging-conflicts into lp:~landscape/landscape-client/trunk

Proposed by Eric Snow
Status: Superseded
Proposed branch: lp:~ericsnowcurrently/landscape-client/fix-1680875-fix-packaging-conflicts
Merge into: lp:~landscape/landscape-client/trunk
Diff against target: 1096 lines (+379/-486)
31 files modified
.bzrignore (+7/-11)
debian/changelog (+1/-1)
debian/control (+54/-11)
debian/landscape-client-common.dirs (+3/-0)
debian/landscape-client-common.postinst (+84/-0)
debian/landscape-client-common.postrm (+38/-0)
debian/landscape-common.config (+0/-10)
debian/landscape-common.dirs (+0/-4)
debian/landscape-common.manpages (+0/-1)
debian/landscape-common.postinst (+0/-110)
debian/landscape-common.postrm (+0/-40)
debian/landscape-common.prerm (+0/-42)
debian/landscape-common.templates (+0/-20)
debian/landscape-common3.config (+0/-10)
debian/landscape-common3.dirs (+0/-4)
debian/landscape-common3.manpages (+0/-1)
debian/landscape-common3.postinst (+0/-110)
debian/landscape-common3.postrm (+0/-40)
debian/landscape-common3.prerm (+0/-42)
debian/landscape-common3.templates (+0/-20)
debian/landscape-sysinfo.config (+10/-0)
debian/landscape-sysinfo.dirs (+2/-0)
debian/landscape-sysinfo.install (+2/-0)
debian/landscape-sysinfo.manpages (+1/-0)
debian/landscape-sysinfo.postinst (+73/-0)
debian/landscape-sysinfo.postrm (+37/-0)
debian/landscape-sysinfo.prerm (+42/-0)
debian/landscape-sysinfo.templates (+20/-0)
debian/python-landscape-lib.install (+0/-2)
debian/python3-landscape-lib.install (+0/-2)
debian/rules (+5/-5)
To merge this branch: bzr merge lp:~ericsnowcurrently/landscape-client/fix-1680875-fix-packaging-conflicts
Reviewer Review Type Date Requested Status
Landscape Pending
Landscape Pending
Review via email: mp+322240@code.launchpad.net

This proposal has been superseded by a proposal from 2017-04-07.

Description of the change

Factor out a common setup package for landscape-client and landscape-sysinfo.

This removes possible conflicts between the Python 2 and Python 3 lib packages.

Note that, as part of this change, the landscape-common packages have been
renamed to pythonX-landscape-lib.

Testing instructions:

make package DEBUILD_OPTS="-us -uc"
sudo apt-cache policy landscape-client landscape-sysinfo landscape-client-common python3-landscape-lib python-landscape-lib
sudo apt-get install landscape-client-common # no missing deps, created landscape user
sudo apt-get remove landscape-client-common # removes landscape user
sudo apt-get install landscape-client # fails due to missing common, sysinfo, py3 lib
sudo apt-get install landscape-sysinfo # fails due to missing common, py3 lib
sudo apt-get install python-landscape-lib # does not add landscape user
sudo apt-get install python3-landscape-lib # does not add landscape user
sudo apt-get install landscape-client-common
sudo apt-get install landscape-sysinfo
sudo apt-get install landscape-client
sudo apt-cache policy landscape-client landscape-sysinfo landscape-client-common python3-landscape-lib python-landscape-lib

To post a comment you must log in.
1023. By Eric Snow

Fix up the conflicts.

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '.bzrignore'
2--- .bzrignore 2017-04-04 13:46:49 +0000
3+++ .bzrignore 2017-04-07 22:19:27 +0000
4@@ -2,20 +2,16 @@
5 docs/api
6 build
7 build-stamp
8+debian/*.debhelper
9+debian/*.debhelper.log
10+debian/*.substvars
11 debian/tmp
12 debian/files
13 debian/landscape-client
14-debian/landscape-client.postinst.debhelper
15-debian/landscape-client.postrm.debhelper
16-debian/landscape-client.prerm.debhelper
17-debian/landscape-client.substvars
18-debian/landscape-client.debhelper.log
19-debian/landscape-common*/
20-debian/landscape-common*.debhelper.log
21-debian/landscape-common*.postinst.debhelper
22-debian/landscape-common*.postrm.debhelper
23-debian/landscape-common*.prerm.debhelper
24-debian/landscape-common*.substvars
25+debian/landscape-client-common
26+debian/landscape-sysinfo
27+debian/python-landscape-lib
28+debian/python3-landscape-lib
29 man/landscape-client.1
30 man/landscape-config.1
31 man/landscape-message.1
32
33=== modified file 'debian/changelog'
34--- debian/changelog 2017-04-06 21:27:32 +0000
35+++ debian/changelog 2017-04-07 22:19:27 +0000
36@@ -3,7 +3,7 @@
37 [ Steffen Allner ]
38 * New local test build
39
40- -- Eric Snow (landscape-dev) <esnow@landscape-dev.lxd> Thu, 06 Apr 2017 21:20:37 +0000
41+ -- Eric Snow (landscape-dev) <esnow@landscape-dev.lxd> Fri, 07 Apr 2017 21:36:04 +0000
42
43 landscape-client (17.04-0ubuntu1) UNRELEASED; urgency=medium
44
45
46=== modified file 'debian/control'
47--- debian/control 2017-04-06 21:27:32 +0000
48+++ debian/control 2017-04-07 22:19:27 +0000
49@@ -7,7 +7,7 @@
50 Standards-Version: 3.8.2
51 XS-Python-Version: >= 2.4, << 2.8
52
53-Package: landscape-common
54+Package: python-landscape-lib
55 Architecture: any
56 Depends: ${python:Depends}, ${misc:Depends}, ${extra:Depends},
57 ${shlibs:Depends},
58@@ -24,10 +24,13 @@
59 lshw,
60 libpam-modules
61 Suggests: ${extra:Suggests}
62-Breaks: landscape-client-ui (<< 16.04), landscape-client-ui-install (<< 16.04)
63-Replaces: landscape-client-ui (<< 16.04), landscape-client-ui-install (<< 16.04)
64-Conflicts: landscape-common3
65-Description: Landscape administration system client - Common files
66+Breaks: landscape-client-ui (<< 16.04),
67+ landscape-client-ui-install (<< 16.04),
68+ landscape-common (<< 17.04)
69+Replaces: landscape-client-ui (<< 16.04),
70+ landscape-client-ui-install (<< 16.04),
71+ landscape-common (<< 17.04)
72+Description: Landscape administration system client - Python 2 lib
73 Landscape is a web-based tool for managing Ubuntu systems. This
74 package is necessary if you want your machine to be managed in a
75 Landscape account.
76@@ -35,7 +38,7 @@
77 This package provides the core libraries.
78 XB-Python-Version: ${python:Versions}
79
80-Package: landscape-common3
81+Package: python3-landscape-lib
82 Architecture: any
83 Depends: ${python:Depends}, ${misc:Depends}, ${extra:Depends},
84 ${shlibs:Depends},
85@@ -52,10 +55,13 @@
86 lshw,
87 libpam-modules
88 Suggests: ${extra:Suggests}
89-Breaks: landscape-client-ui (<< 16.04), landscape-client-ui-install (<< 16.04)
90-Replaces: landscape-client-ui (<< 16.04), landscape-client-ui-install (<< 16.04)
91-Conflicts: landscape-common
92-Description: Landscape administration system client - Common files
93+Breaks: landscape-client-ui (<< 16.04),
94+ landscape-client-ui-install (<< 16.04),
95+ landscape-common3 (<< 17.04)
96+Replaces: landscape-client-ui (<< 16.04),
97+ landscape-client-ui-install (<< 16.04),
98+ landscape-common3 (<< 17.04)
99+Description: Landscape administration system client - Python 3 lib
100 Landscape is a web-based tool for managing Ubuntu systems. This
101 package is necessary if you want your machine to be managed in a
102 Landscape account.
103@@ -63,13 +69,50 @@
104 This package provides the core libraries.
105 XB-Python-Version: ${python:Versions}
106
107+Package: landscape-client-common
108+Architecture: any
109+Depends: ${misc:Depends}, ${extra:Depends}, ${shlibs:Depends},
110+ adduser,
111+ libpam-modules
112+Suggests: ${extra:Suggests}
113+Breaks: landscape-client-ui (<< 16.04),
114+ landscape-client-ui-install (<< 16.04),
115+ landscape-common (<< 17.04)
116+Conflicts: landscape-common (<< 17.04), landscape-common3 (<< 17.04)
117+Description: Landscape administration system client - Common setup
118+ Landscape is a web-based tool for managing Ubuntu systems. This
119+ package is necessary if you want your machine to be managed in a
120+ Landscape account.
121+ .
122+ This package provides the base setup for other packages related
123+ to the Landscape client.
124+
125+Package: landscape-sysinfo
126+Architecture: any
127+Depends: ${python:Depends}, ${misc:Depends}, ${extra:Depends},
128+ ${shlibs:Depends},
129+ landscape-client-common (= ${binary:Version}),
130+ python3-twisted,
131+ python3-landscape-lib (= ${binary:Version})
132+Suggests: ${extra:Suggests}
133+Description: Landscape administration system client - sysinfo tool
134+ Landscape is a web-based tool for managing Ubuntu systems. This
135+ package is necessary if you want your machine to be managed in a
136+ Landscape account.
137+ .
138+ This package provides the landscape-sysinfo tool that Landscape uses
139+ to get information about the host.
140+XB-Python-Version: ${python:Versions}
141+
142 Package: landscape-client
143 Architecture: any
144 Depends: ${python:Depends}, ${misc:Depends}, ${extra:Depends},
145 ${shlibs:Depends},
146+ landscape-client-common (= ${binary:Version}),
147+ landscape-sysinfo (= ${binary:Version}),
148 python3-twisted,
149 python3-pycurl,
150- landscape-common3 (= ${binary:Version})
151+ python3-landscape-lib (= ${binary:Version})
152 Suggests: ${extra:Suggests}
153 Description: Landscape administration system client
154 Landscape is a web-based tool for managing Ubuntu systems. This
155
156=== added file 'debian/landscape-client-common.dirs'
157--- debian/landscape-client-common.dirs 1970-01-01 00:00:00 +0000
158+++ debian/landscape-client-common.dirs 2017-04-07 22:19:27 +0000
159@@ -0,0 +1,3 @@
160+etc/landscape
161+var/lib/landscape
162+var/log/landscape
163
164=== added file 'debian/landscape-client-common.postinst'
165--- debian/landscape-client-common.postinst 1970-01-01 00:00:00 +0000
166+++ debian/landscape-client-common.postinst 2017-04-07 22:19:27 +0000
167@@ -0,0 +1,84 @@
168+#!/bin/sh
169+set -e
170+
171+# summary of how this script can be called:
172+# * <postinst> `configure' <most-recently-configured-version>
173+# * <old-postinst> `abort-upgrade' <new version>
174+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
175+# <new-version>
176+# * <postinst> `abort-remove'
177+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
178+# <failed-install-package> <version> `removing'
179+# <conflicting-package> <version>
180+# for details, see http://www.debian.org/doc/debian-policy/ or
181+# the debian-policy package
182+
183+. /usr/share/debconf/confmodule
184+trap "db_stop || true" EXIT HUP INT QUIT TERM
185+
186+PACKAGE=landscape-client-common
187+
188+# Use the default installed Python. Running just "python" might run
189+# something from /usr/local/bin, which doesn't necessarily support
190+# running the landscape client.
191+PYTHON=/usr/bin/python
192+
193+case "$1" in
194+ configure)
195+
196+ # 0.9.1 introduces non-backwards compatible changes. This detects
197+ # whether or not the data is in the current format. If not, all
198+ # existing data is removed.
199+ DATA_DIR=/var/lib/landscape
200+
201+ if [ -d $DATA_DIR/data ]; then
202+ rm -rf $DATA_DIR/*
203+ elif [ -f $DATA_DIR/client/data.bpickle ]; then
204+ LAST_BYTE=`sed -n '$,$s/.*\(.\)/\1/p' $DATA_DIR/client/data.bpickle`
205+ if [ "$LAST_BYTE" = e ]; then
206+ rm -rf $DATA_DIR/*
207+ fi
208+ fi
209+
210+ # Create landscape system user
211+ if ! getent passwd landscape >/dev/null; then
212+ adduser --quiet --system --group --disabled-password \
213+ --home /var/lib/landscape --no-create-home landscape
214+ fi
215+
216+ # Create landscape system group (for <= 1.0.29.1-0ubuntu0.9.04.0)
217+ if ! getent group landscape >/dev/null; then
218+ addgroup --quiet --system landscape
219+ fi
220+
221+ # Ensure primary group is landscape (for <= 1.0.29.1-0ubuntu0.9.04.0)
222+ if ! usermod -g landscape landscape > /dev/null 2>&1; then
223+ echo "ERROR: usermod -g landscape landscape failed."
224+ fi
225+
226+ # Fix prior ownerships, we exclude the custom-graph-scripts directory
227+ # because there might script-generated files that we want to preserve
228+ # the ownership of.
229+ if [ -d /var/lib/landscape/client ]; then
230+ find /var/lib/landscape/client/ -wholename /var/lib/landscape/client/custom-graph-scripts -prune -or -exec chown landscape {} \; > /dev/null 2>&1
231+ fi
232+ [ -d /var/lib/landscape/.gnupg ] && chown -R landscape /var/lib/landscape/.gnupg || :
233+ chown -R landscape /var/log/landscape
234+
235+ ;;
236+
237+ abort-upgrade|abort-remove|abort-deconfigure)
238+ ;;
239+
240+ *)
241+ echo "postinst called with unknown argument \`$1'" >&2
242+ exit 1
243+ ;;
244+esac
245+
246+# dh_installdeb will replace this with shell code automatically
247+# generated by other debhelper scripts.
248+
249+#DEBHELPER#
250+
251+exit 0
252
253=== added file 'debian/landscape-client-common.postrm'
254--- debian/landscape-client-common.postrm 1970-01-01 00:00:00 +0000
255+++ debian/landscape-client-common.postrm 2017-04-07 22:19:27 +0000
256@@ -0,0 +1,38 @@
257+#!/bin/sh
258+set -e
259+
260+# summary of how this script can be called:
261+# * <postrm> `remove'
262+# * <postrm> `purge'
263+# * <old-postrm> `upgrade' <new-version>
264+# * <new-postrm> `failed-upgrade' <old-version>
265+# * <new-postrm> `abort-install'
266+# * <new-postrm> `abort-install' <old-version>
267+# * <new-postrm> `abort-upgrade' <old-version>
268+# * <disappearer's-postrm> `disappear' <overwriter>
269+# <overwriter-version>
270+# for details, see http://www.debian.org/doc/debian-policy/ or
271+# the debian-policy package
272+
273+case "$1" in
274+ purge)
275+ CONFIG_FILE=/etc/landscape/client.conf
276+ deluser --quiet --system landscape >/dev/null || true
277+ rm -f "${CONFIG_FILE}"
278+ ;;
279+
280+ remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
281+ ;;
282+
283+ *)
284+ echo "postrm called with unknown argument \`$1'" >&2
285+ exit 1
286+ ;;
287+esac
288+
289+# dh_installdeb will replace this with shell code automatically
290+# generated by other debhelper scripts.
291+
292+#DEBHELPER#
293+
294+exit 0
295
296=== removed file 'debian/landscape-common.config'
297--- debian/landscape-common.config 2017-04-04 13:46:49 +0000
298+++ debian/landscape-common.config 1970-01-01 00:00:00 +0000
299@@ -1,10 +0,0 @@
300-#!/bin/sh
301-
302-PACKAGE=landscape-common
303-
304-set -e
305-. /usr/share/debconf/confmodule
306-
307-# Ask questions.
308-db_input medium $PACKAGE/sysinfo || true
309-db_go
310
311=== removed file 'debian/landscape-common.dirs'
312--- debian/landscape-common.dirs 2017-04-07 18:52:18 +0000
313+++ debian/landscape-common.dirs 1970-01-01 00:00:00 +0000
314@@ -1,4 +0,0 @@
315-etc/update-motd.d
316-etc/landscape
317-var/lib/landscape
318-var/log/landscape
319
320=== removed file 'debian/landscape-common.manpages'
321--- debian/landscape-common.manpages 2017-04-04 13:46:49 +0000
322+++ debian/landscape-common.manpages 1970-01-01 00:00:00 +0000
323@@ -1,1 +0,0 @@
324-man/landscape-sysinfo.1
325
326=== removed file 'debian/landscape-common.postinst'
327--- debian/landscape-common.postinst 2017-04-04 13:46:49 +0000
328+++ debian/landscape-common.postinst 1970-01-01 00:00:00 +0000
329@@ -1,110 +0,0 @@
330-#!/bin/sh
331-set -e
332-
333-# summary of how this script can be called:
334-# * <postinst> `configure' <most-recently-configured-version>
335-# * <old-postinst> `abort-upgrade' <new version>
336-# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
337-# <new-version>
338-# * <postinst> `abort-remove'
339-# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
340-# <failed-install-package> <version> `removing'
341-# <conflicting-package> <version>
342-# for details, see http://www.debian.org/doc/debian-policy/ or
343-# the debian-policy package
344-
345-. /usr/share/debconf/confmodule
346-trap "db_stop || true" EXIT HUP INT QUIT TERM
347-
348-PACKAGE=landscape-common
349-
350-# Use the default installed Python. Running just "python" might run
351-# something from /usr/local/bin, which doesn't necessarily support
352-# running the landscape client.
353-PYTHON=/usr/bin/python
354-
355-case "$1" in
356- configure)
357-
358- # Since motd shows a different number of security updates, suppress the message
359- dpkg-divert --package landscape-common --rename /etc/update-motd.d/90-updates-available
360-
361- db_get $PACKAGE/sysinfo
362- # Choices:
363- # * Do not display sysinfo on login
364- # * Cache sysinfo in /etc/motd
365- # * Run sysinfo on every login
366- SYSINFO="${RET:-Cache sysinfo in /etc/motd}"
367- WRAPPER=/usr/share/landscape/landscape-sysinfo.wrapper
368- PROFILE_LOCATION=/etc/profile.d/50-landscape-sysinfo.sh
369- UPDATE_MOTD_LOCATION=/etc/update-motd.d/50-landscape-sysinfo
370- if [ "$RET" = "Cache sysinfo in /etc/motd" ]; then
371- rm -f $PROFILE_LOCATION 2>/dev/null || true
372- ln -sf $WRAPPER $UPDATE_MOTD_LOCATION
373- update-motd 2>/dev/null || true
374- elif [ "$RET" = "Run sysinfo on every login" ]; then
375- rm -f $UPDATE_MOTD_LOCATION 2>/dev/null || true
376- update-motd 2>/dev/null || true
377- ln -sf $WRAPPER $PROFILE_LOCATION
378- else
379- rm -f $UPDATE_MOTD_LOCATION 2>/dev/null || true
380- update-motd 2>/dev/null || true
381- rm -f $PROFILE_LOCATION || true
382- fi
383-
384- # 0.9.1 introduces non-backwards compatible changes. This detects
385- # whether or not the data is in the current format. If not, all
386- # existing data is removed.
387- DATA_DIR=/var/lib/landscape
388-
389- if [ -d $DATA_DIR/data ]; then
390- rm -rf $DATA_DIR/*
391- elif [ -f $DATA_DIR/client/data.bpickle ]; then
392- LAST_BYTE=`sed -n '$,$s/.*\(.\)/\1/p' $DATA_DIR/client/data.bpickle`
393- if [ "$LAST_BYTE" = e ]; then
394- rm -rf $DATA_DIR/*
395- fi
396- fi
397-
398- # Create landscape system user
399- if ! getent passwd landscape >/dev/null; then
400- adduser --quiet --system --group --disabled-password \
401- --home /var/lib/landscape --no-create-home landscape
402- fi
403-
404- # Create landscape system group (for <= 1.0.29.1-0ubuntu0.9.04.0)
405- if ! getent group landscape >/dev/null; then
406- addgroup --quiet --system landscape
407- fi
408-
409- # Ensure primary group is landscape (for <= 1.0.29.1-0ubuntu0.9.04.0)
410- if ! usermod -g landscape landscape > /dev/null 2>&1; then
411- echo "ERROR: usermod -g landscape landscape failed."
412- fi
413-
414- # Fix prior ownerships, we exclude the custom-graph-scripts directory
415- # because there might script-generated files that we want to preserve
416- # the ownership of.
417- if [ -d /var/lib/landscape/client ]; then
418- find /var/lib/landscape/client/ -wholename /var/lib/landscape/client/custom-graph-scripts -prune -or -exec chown landscape {} \; > /dev/null 2>&1
419- fi
420- [ -d /var/lib/landscape/.gnupg ] && chown -R landscape /var/lib/landscape/.gnupg || :
421- chown -R landscape /var/log/landscape
422-
423- ;;
424-
425- abort-upgrade|abort-remove|abort-deconfigure)
426- ;;
427-
428- *)
429- echo "postinst called with unknown argument \`$1'" >&2
430- exit 1
431- ;;
432-esac
433-
434-# dh_installdeb will replace this with shell code automatically
435-# generated by other debhelper scripts.
436-
437-#DEBHELPER#
438-
439-exit 0
440
441=== removed file 'debian/landscape-common.postrm'
442--- debian/landscape-common.postrm 2017-04-04 13:46:49 +0000
443+++ debian/landscape-common.postrm 1970-01-01 00:00:00 +0000
444@@ -1,40 +0,0 @@
445-#!/bin/sh
446-set -e
447-
448-# summary of how this script can be called:
449-# * <postrm> `remove'
450-# * <postrm> `purge'
451-# * <old-postrm> `upgrade' <new-version>
452-# * <new-postrm> `failed-upgrade' <old-version>
453-# * <new-postrm> `abort-install'
454-# * <new-postrm> `abort-install' <old-version>
455-# * <new-postrm> `abort-upgrade' <old-version>
456-# * <disappearer's-postrm> `disappear' <overwriter>
457-# <overwriter-version>
458-# for details, see http://www.debian.org/doc/debian-policy/ or
459-# the debian-policy package
460-
461-case "$1" in
462- purge)
463- LOG_DIR=/var/log/landscape
464- CONFIG_FILE=/etc/landscape/client.conf
465- deluser --quiet --system landscape >/dev/null || true
466- rm -f "${LOG_DIR}/sysinfo.log"*
467- rm -f "${CONFIG_FILE}"
468- ;;
469-
470- remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
471- ;;
472-
473- *)
474- echo "postrm called with unknown argument \`$1'" >&2
475- exit 1
476- ;;
477-esac
478-
479-# dh_installdeb will replace this with shell code automatically
480-# generated by other debhelper scripts.
481-
482-#DEBHELPER#
483-
484-exit 0
485
486=== removed file 'debian/landscape-common.prerm'
487--- debian/landscape-common.prerm 2017-04-06 20:59:56 +0000
488+++ debian/landscape-common.prerm 1970-01-01 00:00:00 +0000
489@@ -1,42 +0,0 @@
490-#!/bin/sh
491-# prerm script for landscape-common
492-#
493-# see: dh_installdeb(1)
494-
495-set -e
496-
497-# summary of how this script can be called:
498-# * <prerm> `remove'
499-# * <old-prerm> `upgrade' <new-version>
500-# * <new-prerm> `failed-upgrade' <old-version>
501-# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
502-# * <deconfigured's-prerm> `deconfigure' `in-favour'
503-# <package-being-installed> <version> `removing'
504-# <conflicting-package> <version>
505-# for details, see http://www.debian.org/doc/debian-policy/ or
506-# the debian-policy package
507-
508-
509-case "$1" in
510- remove|upgrade|deconfigure)
511- dpkg-divert --remove --package landscape-common --rename /etc/update-motd.d/90-updates-available
512- rm -f /etc/update-motd.d/50-landscape-sysinfo 2>/dev/null || true
513- update-motd 2>/dev/null || true
514- rm -f /etc/profile.d/landscape-sysinfo.sh 2>/dev/null || true
515- ;;
516-
517- failed-upgrade)
518- ;;
519-
520- *)
521- echo "prerm called with unknown argument \`$1'" >&2
522- exit 1
523- ;;
524-esac
525-
526-# dh_installdeb will replace this with shell code automatically
527-# generated by other debhelper scripts.
528-
529-#DEBHELPER#
530-
531-exit 0
532
533=== removed file 'debian/landscape-common.templates'
534--- debian/landscape-common.templates 2017-04-06 20:59:56 +0000
535+++ debian/landscape-common.templates 1970-01-01 00:00:00 +0000
536@@ -1,20 +0,0 @@
537-Template: landscape-common/sysinfo
538-Type: select
539-# Translators beware! the following three strings form a single
540-# Choices menu. - Every one of these strings has to fit in a standard
541-# 80 characters console, as the fancy screen setup takes up some space
542-# try to keep below ~71 characters.
543-# DO NOT USE commas (,) in Choices translations otherwise
544-# this will break the choices shown to users
545-__Choices: Do not display sysinfo on login, Cache sysinfo in /etc/motd, Run sysinfo on every login
546-Default: Cache sysinfo in /etc/motd
547-_Description: landscape-sysinfo configuration:
548- Landscape includes a tool and a set of modules that can display
549- system status, information, and statistics on login.
550- .
551- This information can be gathered periodically (every 10 minutes)
552- and automatically written to /etc/motd. The data could be a few
553- minutes out-of-date.
554- .
555- Or, this information can be gathered at login. The data will be
556- more current, but might introduce a small delay at login.
557
558=== removed file 'debian/landscape-common3.config'
559--- debian/landscape-common3.config 2017-03-31 12:05:57 +0000
560+++ debian/landscape-common3.config 1970-01-01 00:00:00 +0000
561@@ -1,10 +0,0 @@
562-#!/bin/sh
563-
564-PACKAGE=landscape-common3
565-
566-set -e
567-. /usr/share/debconf/confmodule
568-
569-# Ask questions.
570-db_input medium $PACKAGE/sysinfo || true
571-db_go
572
573=== removed file 'debian/landscape-common3.dirs'
574--- debian/landscape-common3.dirs 2017-04-07 18:52:18 +0000
575+++ debian/landscape-common3.dirs 1970-01-01 00:00:00 +0000
576@@ -1,4 +0,0 @@
577-etc/update-motd.d
578-etc/landscape
579-var/lib/landscape
580-var/log/landscape
581
582=== removed file 'debian/landscape-common3.manpages'
583--- debian/landscape-common3.manpages 2017-04-06 20:59:56 +0000
584+++ debian/landscape-common3.manpages 1970-01-01 00:00:00 +0000
585@@ -1,1 +0,0 @@
586-man/landscape-sysinfo.1
587
588=== removed file 'debian/landscape-common3.postinst'
589--- debian/landscape-common3.postinst 2017-03-31 12:05:57 +0000
590+++ debian/landscape-common3.postinst 1970-01-01 00:00:00 +0000
591@@ -1,110 +0,0 @@
592-#!/bin/sh
593-set -e
594-
595-# summary of how this script can be called:
596-# * <postinst> `configure' <most-recently-configured-version>
597-# * <old-postinst> `abort-upgrade' <new version>
598-# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
599-# <new-version>
600-# * <postinst> `abort-remove'
601-# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
602-# <failed-install-package> <version> `removing'
603-# <conflicting-package> <version>
604-# for details, see http://www.debian.org/doc/debian-policy/ or
605-# the debian-policy package
606-
607-. /usr/share/debconf/confmodule
608-trap "db_stop || true" EXIT HUP INT QUIT TERM
609-
610-PACKAGE=landscape-common3
611-
612-# Use the default installed Python 3. Running just "python" might run
613-# something from /usr/local/bin, which doesn't necessarily support
614-# running the landscape client.
615-PYTHON=/usr/bin/python3
616-
617-case "$1" in
618- configure)
619-
620- # Since motd shows a different number of security updates, suppress the message
621- dpkg-divert --package landscape-common3 --rename /etc/update-motd.d/90-updates-available
622-
623- db_get $PACKAGE/sysinfo
624- # Choices:
625- # * Do not display sysinfo on login
626- # * Cache sysinfo in /etc/motd
627- # * Run sysinfo on every login
628- SYSINFO="${RET:-Cache sysinfo in /etc/motd}"
629- WRAPPER=/usr/share/landscape/landscape-sysinfo.wrapper
630- PROFILE_LOCATION=/etc/profile.d/50-landscape-sysinfo.sh
631- UPDATE_MOTD_LOCATION=/etc/update-motd.d/50-landscape-sysinfo
632- if [ "$RET" = "Cache sysinfo in /etc/motd" ]; then
633- rm -f $PROFILE_LOCATION 2>/dev/null || true
634- ln -sf $WRAPPER $UPDATE_MOTD_LOCATION
635- update-motd 2>/dev/null || true
636- elif [ "$RET" = "Run sysinfo on every login" ]; then
637- rm -f $UPDATE_MOTD_LOCATION 2>/dev/null || true
638- update-motd 2>/dev/null || true
639- ln -sf $WRAPPER $PROFILE_LOCATION
640- else
641- rm -f $UPDATE_MOTD_LOCATION 2>/dev/null || true
642- update-motd 2>/dev/null || true
643- rm -f $PROFILE_LOCATION || true
644- fi
645-
646- # 0.9.1 introduces non-backwards compatible changes. This detects
647- # whether or not the data is in the current format. If not, all
648- # existing data is removed.
649- DATA_DIR=/var/lib/landscape
650-
651- if [ -d $DATA_DIR/data ]; then
652- rm -rf $DATA_DIR/*
653- elif [ -f $DATA_DIR/client/data.bpickle ]; then
654- LAST_BYTE=`sed -n '$,$s/.*\(.\)/\1/p' $DATA_DIR/client/data.bpickle`
655- if [ "$LAST_BYTE" = e ]; then
656- rm -rf $DATA_DIR/*
657- fi
658- fi
659-
660- # Create landscape system user
661- if ! getent passwd landscape >/dev/null; then
662- adduser --quiet --system --group --disabled-password \
663- --home /var/lib/landscape --no-create-home landscape
664- fi
665-
666- # Create landscape system group (for <= 1.0.29.1-0ubuntu0.9.04.0)
667- if ! getent group landscape >/dev/null; then
668- addgroup --quiet --system landscape
669- fi
670-
671- # Ensure primary group is landscape (for <= 1.0.29.1-0ubuntu0.9.04.0)
672- if ! usermod -g landscape landscape > /dev/null 2>&1; then
673- echo "ERROR: usermod -g landscape landscape failed."
674- fi
675-
676- # Fix prior ownerships, we exclude the custom-graph-scripts directory
677- # because there might script-generated files that we want to preserve
678- # the ownership of.
679- if [ -d /var/lib/landscape/client ]; then
680- find /var/lib/landscape/client/ -wholename /var/lib/landscape/client/custom-graph-scripts -prune -or -exec chown landscape {} \; > /dev/null 2>&1
681- fi
682- [ -d /var/lib/landscape/.gnupg ] && chown -R landscape /var/lib/landscape/.gnupg || :
683- chown -R landscape /var/log/landscape
684-
685- ;;
686-
687- abort-upgrade|abort-remove|abort-deconfigure)
688- ;;
689-
690- *)
691- echo "postinst called with unknown argument \`$1'" >&2
692- exit 1
693- ;;
694-esac
695-
696-# dh_installdeb will replace this with shell code automatically
697-# generated by other debhelper scripts.
698-
699-#DEBHELPER#
700-
701-exit 0
702
703=== removed file 'debian/landscape-common3.postrm'
704--- debian/landscape-common3.postrm 2017-04-06 20:59:56 +0000
705+++ debian/landscape-common3.postrm 1970-01-01 00:00:00 +0000
706@@ -1,40 +0,0 @@
707-#!/bin/sh
708-set -e
709-
710-# summary of how this script can be called:
711-# * <postrm> `remove'
712-# * <postrm> `purge'
713-# * <old-postrm> `upgrade' <new-version>
714-# * <new-postrm> `failed-upgrade' <old-version>
715-# * <new-postrm> `abort-install'
716-# * <new-postrm> `abort-install' <old-version>
717-# * <new-postrm> `abort-upgrade' <old-version>
718-# * <disappearer's-postrm> `disappear' <overwriter>
719-# <overwriter-version>
720-# for details, see http://www.debian.org/doc/debian-policy/ or
721-# the debian-policy package
722-
723-case "$1" in
724- purge)
725- LOG_DIR=/var/log/landscape
726- CONFIG_FILE=/etc/landscape/client.conf
727- deluser --quiet --system landscape >/dev/null || true
728- rm -f "${LOG_DIR}/sysinfo.log"*
729- rm -f "${CONFIG_FILE}"
730- ;;
731-
732- remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
733- ;;
734-
735- *)
736- echo "postrm called with unknown argument \`$1'" >&2
737- exit 1
738- ;;
739-esac
740-
741-# dh_installdeb will replace this with shell code automatically
742-# generated by other debhelper scripts.
743-
744-#DEBHELPER#
745-
746-exit 0
747
748=== removed file 'debian/landscape-common3.prerm'
749--- debian/landscape-common3.prerm 2017-04-06 20:59:56 +0000
750+++ debian/landscape-common3.prerm 1970-01-01 00:00:00 +0000
751@@ -1,42 +0,0 @@
752-#!/bin/sh
753-# prerm script for landscape-common3
754-#
755-# see: dh_installdeb(1)
756-
757-set -e
758-
759-# summary of how this script can be called:
760-# * <prerm> `remove'
761-# * <old-prerm> `upgrade' <new-version>
762-# * <new-prerm> `failed-upgrade' <old-version>
763-# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
764-# * <deconfigured's-prerm> `deconfigure' `in-favour'
765-# <package-being-installed> <version> `removing'
766-# <conflicting-package> <version>
767-# for details, see http://www.debian.org/doc/debian-policy/ or
768-# the debian-policy package
769-
770-
771-case "$1" in
772- remove|upgrade|deconfigure)
773- dpkg-divert --remove --package landscape-common3 --rename /etc/update-motd.d/90-updates-available
774- rm -f /etc/update-motd.d/50-landscape-sysinfo 2>/dev/null || true
775- update-motd 2>/dev/null || true
776- rm -f /etc/profile.d/landscape-sysinfo.sh 2>/dev/null || true
777- ;;
778-
779- failed-upgrade)
780- ;;
781-
782- *)
783- echo "prerm called with unknown argument \`$1'" >&2
784- exit 1
785- ;;
786-esac
787-
788-# dh_installdeb will replace this with shell code automatically
789-# generated by other debhelper scripts.
790-
791-#DEBHELPER#
792-
793-exit 0
794
795=== removed file 'debian/landscape-common3.templates'
796--- debian/landscape-common3.templates 2017-04-06 20:59:56 +0000
797+++ debian/landscape-common3.templates 1970-01-01 00:00:00 +0000
798@@ -1,20 +0,0 @@
799-Template: landscape-common3/sysinfo
800-Type: select
801-# Translators beware! the following three strings form a single
802-# Choices menu. - Every one of these strings has to fit in a standard
803-# 80 characters console, as the fancy screen setup takes up some space
804-# try to keep below ~71 characters.
805-# DO NOT USE commas (,) in Choices translations otherwise
806-# this will break the choices shown to users
807-__Choices: Do not display sysinfo on login, Cache sysinfo in /etc/motd, Run sysinfo on every login
808-Default: Cache sysinfo in /etc/motd
809-_Description: landscape-sysinfo configuration:
810- Landscape includes a tool and a set of modules that can display
811- system status, information, and statistics on login.
812- .
813- This information can be gathered periodically (every 10 minutes)
814- and automatically written to /etc/motd. The data could be a few
815- minutes out-of-date.
816- .
817- Or, this information can be gathered at login. The data will be
818- more current, but might introduce a small delay at login.
819
820=== added file 'debian/landscape-sysinfo.config'
821--- debian/landscape-sysinfo.config 1970-01-01 00:00:00 +0000
822+++ debian/landscape-sysinfo.config 2017-04-07 22:19:27 +0000
823@@ -0,0 +1,10 @@
824+#!/bin/sh
825+
826+PACKAGE=landscape-sysinfo
827+
828+set -e
829+. /usr/share/debconf/confmodule
830+
831+# Ask questions.
832+db_input medium $PACKAGE/sysinfo || true
833+db_go
834
835=== added file 'debian/landscape-sysinfo.dirs'
836--- debian/landscape-sysinfo.dirs 1970-01-01 00:00:00 +0000
837+++ debian/landscape-sysinfo.dirs 2017-04-07 22:19:27 +0000
838@@ -0,0 +1,2 @@
839+etc/profile.d
840+etc/update-motd.d
841
842=== added file 'debian/landscape-sysinfo.install'
843--- debian/landscape-sysinfo.install 1970-01-01 00:00:00 +0000
844+++ debian/landscape-sysinfo.install 2017-04-07 22:19:27 +0000
845@@ -0,0 +1,2 @@
846+usr/bin/landscape-sysinfo
847+usr/share/landscape/landscape-sysinfo.wrapper
848
849=== added file 'debian/landscape-sysinfo.manpages'
850--- debian/landscape-sysinfo.manpages 1970-01-01 00:00:00 +0000
851+++ debian/landscape-sysinfo.manpages 2017-04-07 22:19:27 +0000
852@@ -0,0 +1,1 @@
853+man/landscape-sysinfo.1
854
855=== added file 'debian/landscape-sysinfo.postinst'
856--- debian/landscape-sysinfo.postinst 1970-01-01 00:00:00 +0000
857+++ debian/landscape-sysinfo.postinst 2017-04-07 22:19:27 +0000
858@@ -0,0 +1,73 @@
859+#!/bin/sh
860+set -e
861+
862+# summary of how this script can be called:
863+# * <postinst> `configure' <most-recently-configured-version>
864+# * <old-postinst> `abort-upgrade' <new version>
865+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
866+# <new-version>
867+# * <postinst> `abort-remove'
868+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
869+# <failed-install-package> <version> `removing'
870+# <conflicting-package> <version>
871+# for details, see http://www.debian.org/doc/debian-policy/ or
872+# the debian-policy package
873+
874+. /usr/share/debconf/confmodule
875+trap "db_stop || true" EXIT HUP INT QUIT TERM
876+
877+PACKAGE=landscape-sysinfo
878+
879+# Use the default installed Python 3. Running just "python3" might run
880+# something from /usr/local/bin, which doesn't necessarily support
881+# running the landscape client.
882+PYTHON=/usr/bin/python3
883+
884+case "$1" in
885+ configure)
886+
887+ # Since motd shows a different number of security updates, suppress the message
888+ dpkg-divert --package landscape-sysinfo --rename /etc/update-motd.d/90-updates-available
889+
890+ db_get $PACKAGE/sysinfo
891+ # Choices:
892+ # * Do not display sysinfo on login
893+ # * Cache sysinfo in /etc/motd
894+ # * Run sysinfo on every login
895+ SYSINFO="${RET:-Cache sysinfo in /etc/motd}"
896+ WRAPPER=/usr/share/landscape/landscape-sysinfo.wrapper
897+ PROFILE_LOCATION=/etc/profile.d/50-landscape-sysinfo.sh
898+ UPDATE_MOTD_LOCATION=/etc/update-motd.d/50-landscape-sysinfo
899+ if [ "$RET" = "Cache sysinfo in /etc/motd" ]; then
900+ rm -f $PROFILE_LOCATION 2>/dev/null || true
901+ ln -sf $WRAPPER $UPDATE_MOTD_LOCATION
902+ update-motd 2>/dev/null || true
903+ elif [ "$RET" = "Run sysinfo on every login" ]; then
904+ rm -f $UPDATE_MOTD_LOCATION 2>/dev/null || true
905+ update-motd 2>/dev/null || true
906+ ln -sf $WRAPPER $PROFILE_LOCATION
907+ else
908+ rm -f $UPDATE_MOTD_LOCATION 2>/dev/null || true
909+ update-motd 2>/dev/null || true
910+ rm -f $PROFILE_LOCATION || true
911+ fi
912+
913+ # We rely on landscape-common to create the user and log dir.
914+
915+ ;;
916+
917+ abort-upgrade|abort-remove|abort-deconfigure)
918+ ;;
919+
920+ *)
921+ echo "postinst called with unknown argument \`$1'" >&2
922+ exit 1
923+ ;;
924+esac
925+
926+# dh_installdeb will replace this with shell code automatically
927+# generated by other debhelper scripts.
928+
929+#DEBHELPER#
930+
931+exit 0
932
933=== added file 'debian/landscape-sysinfo.postrm'
934--- debian/landscape-sysinfo.postrm 1970-01-01 00:00:00 +0000
935+++ debian/landscape-sysinfo.postrm 2017-04-07 22:19:27 +0000
936@@ -0,0 +1,37 @@
937+#!/bin/sh
938+set -e
939+
940+# summary of how this script can be called:
941+# * <postrm> `remove'
942+# * <postrm> `purge'
943+# * <old-postrm> `upgrade' <new-version>
944+# * <new-postrm> `failed-upgrade' <old-version>
945+# * <new-postrm> `abort-install'
946+# * <new-postrm> `abort-install' <old-version>
947+# * <new-postrm> `abort-upgrade' <old-version>
948+# * <disappearer's-postrm> `disappear' <overwriter>
949+# <overwriter-version>
950+# for details, see http://www.debian.org/doc/debian-policy/ or
951+# the debian-policy package
952+
953+case "$1" in
954+ purge)
955+ LOG_DIR=/var/log/landscape
956+ rm -f "${LOG_DIR}/sysinfo.log"*
957+ ;;
958+
959+ remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
960+ ;;
961+
962+ *)
963+ echo "postrm called with unknown argument \`$1'" >&2
964+ exit 1
965+ ;;
966+esac
967+
968+# dh_installdeb will replace this with shell code automatically
969+# generated by other debhelper scripts.
970+
971+#DEBHELPER#
972+
973+exit 0
974
975=== added file 'debian/landscape-sysinfo.prerm'
976--- debian/landscape-sysinfo.prerm 1970-01-01 00:00:00 +0000
977+++ debian/landscape-sysinfo.prerm 2017-04-07 22:19:27 +0000
978@@ -0,0 +1,42 @@
979+#!/bin/sh
980+# prerm script for landscape-sysinfo
981+#
982+# see: dh_installdeb(1)
983+
984+set -e
985+
986+# summary of how this script can be called:
987+# * <prerm> `remove'
988+# * <old-prerm> `upgrade' <new-version>
989+# * <new-prerm> `failed-upgrade' <old-version>
990+# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
991+# * <deconfigured's-prerm> `deconfigure' `in-favour'
992+# <package-being-installed> <version> `removing'
993+# <conflicting-package> <version>
994+# for details, see http://www.debian.org/doc/debian-policy/ or
995+# the debian-policy package
996+
997+
998+case "$1" in
999+ remove|upgrade|deconfigure)
1000+ dpkg-divert --remove --package landscape-sysinfo --rename /etc/update-motd.d/90-updates-available
1001+ rm -f /etc/update-motd.d/50-landscape-sysinfo 2>/dev/null || true
1002+ update-motd 2>/dev/null || true
1003+ rm -f /etc/profile.d/landscape-sysinfo.sh 2>/dev/null || true
1004+ ;;
1005+
1006+ failed-upgrade)
1007+ ;;
1008+
1009+ *)
1010+ echo "prerm called with unknown argument \`$1'" >&2
1011+ exit 1
1012+ ;;
1013+esac
1014+
1015+# dh_installdeb will replace this with shell code automatically
1016+# generated by other debhelper scripts.
1017+
1018+#DEBHELPER#
1019+
1020+exit 0
1021
1022=== added file 'debian/landscape-sysinfo.templates'
1023--- debian/landscape-sysinfo.templates 1970-01-01 00:00:00 +0000
1024+++ debian/landscape-sysinfo.templates 2017-04-07 22:19:27 +0000
1025@@ -0,0 +1,20 @@
1026+Template: landscape-sysinfo/sysinfo
1027+Type: select
1028+# Translators beware! the following three strings form a single
1029+# Choices menu. - Every one of these strings has to fit in a standard
1030+# 80 characters console, as the fancy screen setup takes up some space
1031+# try to keep below ~71 characters.
1032+# DO NOT USE commas (,) in Choices translations otherwise
1033+# this will break the choices shown to users
1034+__Choices: Do not display sysinfo on login, Cache sysinfo in /etc/motd, Run sysinfo on every login
1035+Default: Cache sysinfo in /etc/motd
1036+_Description: landscape-sysinfo configuration:
1037+ Landscape includes a tool and a set of modules that can display
1038+ system status, information, and statistics on login.
1039+ .
1040+ This information can be gathered periodically (every 10 minutes)
1041+ and automatically written to /etc/motd. The data could be a few
1042+ minutes out-of-date.
1043+ .
1044+ Or, this information can be gathered at login. The data will be
1045+ more current, but might introduce a small delay at login.
1046
1047=== renamed file 'debian/landscape-common.install' => 'debian/python-landscape-lib.install'
1048--- debian/landscape-common.install 2017-04-06 21:08:46 +0000
1049+++ debian/python-landscape-lib.install 2017-04-07 22:19:27 +0000
1050@@ -1,3 +1,1 @@
1051 usr/lib/python2*
1052-usr/bin/landscape-sysinfo
1053-usr/share/landscape/landscape-sysinfo.wrapper
1054
1055=== renamed file 'debian/landscape-common3.install' => 'debian/python3-landscape-lib.install'
1056--- debian/landscape-common3.install 2017-04-06 21:08:46 +0000
1057+++ debian/python3-landscape-lib.install 2017-04-07 22:19:27 +0000
1058@@ -1,3 +1,1 @@
1059 usr/lib/python3*
1060-usr/bin/landscape-sysinfo
1061-usr/share/landscape/landscape-sysinfo.wrapper
1062
1063=== modified file 'debian/rules'
1064--- debian/rules 2017-04-07 18:52:18 +0000
1065+++ debian/rules 2017-04-07 22:19:27 +0000
1066@@ -2,7 +2,7 @@
1067
1068 dist_release := $(shell lsb_release -cs)
1069
1070-dh_extra_flags = -plandscape-common -plandscape-common3 -plandscape-client
1071+dh_extra_flags = -ppython-landscape-lib -ppython3-landscape-lib -plandscape-client-common -plandscape-client -plandscape-sysinfo
1072
1073 -include /usr/share/python/python.mk
1074 ifeq (,$(py_sitename))
1075@@ -17,8 +17,8 @@
1076
1077 revision = $(shell dpkg-parsechangelog | grep ^Version | cut -f 2 -d " "| cut -f 2 -d "-")
1078
1079-landscape_common_substvars = debian/landscape-common.substvars
1080-landscape_common3_substvars = debian/landscape-common3.substvars
1081+python_landscape_lib_substvars = debian/python-landscape-lib.substvars
1082+python3_landscape_lib_substvars = debian/python3-landscape-lib.substvars
1083 landscape_client_substvars = debian/landscape-client.substvars
1084
1085 build-arch: build
1086@@ -77,8 +77,8 @@
1087
1088 # from quantal onwards, we don't want python-gnupginterface anymore (#1045237)
1089 ifneq (,$(filter $(dist_release),lucid precise))
1090- echo "extra:Depends=python-gnupginterface" >> $(landscape_common_substvars)
1091- echo "extra:Depends=python-gnupginterface" >> $(landscape_common3_substvars)
1092+ echo "extra:Depends=python-gnupginterface" >> $(python_landscape_lib_substvars)
1093+ echo "extra:Depends=python-gnupginterface" >> $(python3_landscape_lib_substvars)
1094 endif
1095
1096 # In xenial the client needs to depend on libpam-systemd (#1590838)

Subscribers

People subscribed via source and target branches

to all changes: