Merge ~lucaskanashiro/ubuntu/+source/fence-agents:merge-kinetic into ubuntu/+source/fence-agents:debian/sid

Proposed by Lucas Kanashiro
Status: Merged
Approved by: git-ubuntu bot
Approved revision: not available
Merge reported by: Lucas Kanashiro
Merged at revision: b6965379332c53c0aebaaac1356c4822eb82321a
Proposed branch: ~lucaskanashiro/ubuntu/+source/fence-agents:merge-kinetic
Merge into: ubuntu/+source/fence-agents:debian/sid
Diff against target: 516 lines (+322/-49)
10 files modified
debian/changelog (+139/-0)
debian/control (+68/-7)
debian/curated-agents (+11/-0)
debian/extract-agents-description (+32/-0)
debian/fence-virt.install (+4/-4)
debian/fence-virtd.install (+5/-5)
debian/install-curated-agents (+16/-0)
debian/rules (+40/-24)
debian/tests/delay (+7/-1)
dev/null (+0/-8)
Reviewer Review Type Date Requested Status
git-ubuntu bot Approve
Bryce Harrington (community) Approve
Canonical Server Pending
Ubuntu Server Developers Pending
Canonical Server Reporter Pending
Review via email: mp+427980@code.launchpad.net

Description of the change

Merge version 4.7.1-1 from Debian unstable. All the delta to split the agents into -base and -extra was kept, plus some more changes to support the 2 new binaries introduced by Debian.

PPA with the proposed package:

https://launchpad.net/~lucaskanashiro/+archive/ubuntu/ha-stack/+packages

autopkgtest summary:

autopkgtest [14:58:19]: @@@@@@@@@@@@@@@@@@@@ summary
metadata PASS
delay PASS
fence-dummy PASS
fence-aws SKIP exit status 77 and marked as skippable
command1 PASS
command2 PASS

To post a comment you must log in.
Revision history for this message
Bryce Harrington (bryce) wrote :

All logical changes are represented in git history. Some of the lines don't mention the affected files, so e.g. d/control, d/rules, d/fence-agents.install, etc. could be added. However, that's probably better to leave to next merge.

I wonder also if some of these changes could be squashed together, e.g. the d/curated-agents might ok to collect together. Again, not worth dealing with for kinetic but maybe next merge.

Some of the changes sound like they might be acceptable to Debian, has there been efforts to push them up?

The new change this merge, fixing installation, LGTM

Autopkgtest looks good:

$ lp-test-ppa ppa:lucaskanashiro/ha-stack -r kinetic -p fence-agents
  fence-agents @ amd64:
    09.08.22 21:08:48 Log 🗒️ ✅ Triggers: fence-agents/4.11.0-1ubuntu1~ppa2
  fence-agents @ arm64:
    09.08.22 21:33:29 Log 🗒️ ✅ Triggers: fence-agents/4.11.0-1ubuntu1~ppa2
  fence-agents @ armhf:
    09.08.22 21:22:00 Log 🗒️ ✅ Triggers: fence-agents/4.11.0-1ubuntu1~ppa2
    09.08.22 22:17:12 Log 🗒️ ✅ Triggers: fence-agents/4.11.0-1ubuntu1~ppa2
  fence-agents @ ppc64el:
    09.08.22 21:15:48 Log 🗒️ ✅ Triggers: fence-agents/4.11.0-1ubuntu1~ppa2
  fence-agents @ s390x:
    09.08.22 21:16:04 Log 🗒️ ✅ Triggers: fence-agents/4.11.0-1ubuntu1~ppa2

review: Approve
Revision history for this message
git-ubuntu bot (git-ubuntu-bot) wrote :

Approvers: lucaskanashiro, bryce
Uploaders: lucaskanashiro, bryce
MP auto-approved

review: Approve
Revision history for this message
Bryce Harrington (bryce) wrote :

(Sorry, I had reviewed this yesterday but had a system lockup that morning. I thought I'd saved the review before the crash but apparently not.)

Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Thanks for the review Bryce. I'll be considering your suggestions in the next merge.

Package uploaded:

Uploading fence-agents_4.11.0-1ubuntu1.dsc
Uploading fence-agents_4.11.0.orig.tar.gz
Uploading fence-agents_4.11.0-1ubuntu1.debian.tar.xz
Uploading fence-agents_4.11.0-1ubuntu1_source.buildinfo
Uploading fence-agents_4.11.0-1ubuntu1_source.changes

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 0c8d40b..f34d61d 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,37 @@
6+fence-agents (4.11.0-1ubuntu1) kinetic; urgency=medium
7+
8+ * Merge with Debian unstable (LP: #1971275). Remaining changes:
9+ - d/t/delay: Reduce minimum delay when running on ppc64el.
10+ - d/rules: install files in debian/fence-agents instead of debian/tmp.
11+ - Create the fence-agents-common binary package with files to be
12+ shared by agents.
13+ - Create the fence-agents-base binary package.
14+ To add a new curated agent it should be added to debian/curated-agents
15+ file in a new line.
16+ - Update the way agents description are added to the package
17+ description to support the split.
18+ - Rename fence-agents with non-curated agents to fence-agents-extra.
19+ - Create a transitional binary package called fence-agents.
20+ It depends on both fence-agents-{base,extra}.
21+ - d/control: Add missing Breaks/Replaces to the fence-agents-base.
22+ - d/curated-agents: add fence_scsi to the -base package.
23+ - d/curated-agents: add fence_mpath to the -base package.
24+ - d/rules: do not install /var/run directory anymore.
25+ This was causing a lintian error because of the /var/run/cluster
26+ directory created by the upstream build system. The needed files in
27+ /var/run should be created by the agents during runtime.
28+ - d/curated-agents: add fence_ipmilan and fence_sbd to the -base
29+ package (LP #1965312).
30+ Also add the following agents which are symlinks to fence_ipmilan:
31+ fence_idrac, fence_ilo3, fence_ilo4, fence_ilo5, fence_imm, and
32+ fence_ipmilanplus.
33+ - d/control: suggest dependecies of agents in the -base package
34+ (LP #1863677).
35+ * Added:
36+ - Fix installation of fence-virt{,d} binary packages.
37+
38+ -- Lucas Kanashiro <kanashiro@ubuntu.com> Fri, 05 Aug 2022 14:48:47 -0300
39+
40 fence-agents (4.11.0-1) unstable; urgency=medium
41
42 * New upstream version 4.11.0
43@@ -13,6 +47,111 @@ fence-agents (4.11.0-1) unstable; urgency=medium
44
45 -- Valentin Vidic <vvidic@debian.org> Sun, 01 May 2022 17:51:59 +0200
46
47+fence-agents (4.7.1-1ubuntu8) jammy; urgency=medium
48+
49+ * d/curated-agents: add fence_ipmilan and fence_sbd to the -base package.
50+ Also add the following agents which are symlinks to fence_ipmilan:
51+ fence_idrac, fence_ilo3, fence_ilo4, fence_ilo5, fence_imm, and
52+ fence_ipmilanplus (LP: #1965312).
53+ * d/control: suggest dependecies of agents in the -base package (LP: #1863677)
54+
55+ -- Lucas Kanashiro <kanashiro@ubuntu.com> Thu, 17 Mar 2022 11:43:13 -0300
56+
57+fence-agents (4.7.1-1ubuntu7) impish; urgency=medium
58+
59+ * d/rules: do not install /var/run directory anymore.
60+ This was causing a lintian error because of the /var/run/cluster
61+ directory created by the upstream build system. The needed files in
62+ /var/run should be created by the agents during runtime.
63+
64+ -- Lucas Kanashiro <kanashiro@ubuntu.com> Tue, 28 Sep 2021 09:16:11 -0300
65+
66+fence-agents (4.7.1-1ubuntu6) impish; urgency=medium
67+
68+ * d/curated-agents: add fence_mpath to the -base package (LP: #1942368).
69+
70+ -- Lucas Kanashiro <kanashiro@ubuntu.com> Tue, 20 Jul 2021 10:53:33 -0300
71+
72+fence-agents (4.7.1-1ubuntu5) impish; urgency=medium
73+
74+ * d/curated-agents: add fence_scsi to the -base package.
75+
76+ -- Lucas Kanashiro <kanashiro@ubuntu.com> Wed, 30 Jun 2021 16:54:03 -0300
77+
78+fence-agents (4.7.1-1ubuntu4) impish; urgency=medium
79+
80+ * Rename fence-agents with non-curated agents to fence-agents-extra.
81+ - d/control: rename the fence-agents binary package to fence-agents-extra.
82+ - d/extract-agents-description:
83+ + Rename the package name used in the substvars filename.
84+ + Rename all the occurrences of the 'unsupported' term to 'non-curated'.
85+ - d/move-supported-agents: update the binary package name in the path used
86+ to move files.
87+ - d/rules:
88+ + Rename FENCE_AGENTS_DIR to FENCE_AGENTS_EXTRA_DIR with the appropriate
89+ path.
90+ + Edit comments to avoid the term 'supported'.
91+ * Rename fence-agent-supported with curated agents to fence-agents-base.
92+ - d/control:
93+ + Rename fence-agents-supported binary package to fence-agents-base.
94+ + Update the short and long description to not use the 'supported' term.
95+ + Rename the supportedAgents substvar to curatedAgents.
96+ - d/curated-agents: new file, this is the renamed d/supported-agents file.
97+ - d/extract-agents-description:
98+ + Rename the package name used in the substvars filename.
99+ + Rename all the occurrences of the 'supported' term to 'curated'.
100+ - d/move-curated-agents: new file, this is the renamed
101+ d/move-supported-agents script.
102+ - d/rules:
103+ + Call d/move-curated-agents instead of d/move-supported-agents.
104+ + Edit comments to avoid the term 'supported'.
105+ * Create a transitional binary package called fence-agents.
106+ - d/control: add a new section for the transitional package, adding
107+ fence-agents-{base,extra} as dependencies.
108+ * d/control: add a missing Breaks/Replaces relation to the fence-agents-base.
109+ * d/move-curated-agents: use readonly variables to store the binary
110+ packages' path.
111+
112+ -- Lucas Kanashiro <kanashiro@ubuntu.com> Wed, 12 May 2021 15:44:43 -0300
113+
114+fence-agents (4.7.1-1ubuntu3) impish; urgency=medium
115+
116+ * d/control: make fence-agents recommend fence-agents-supported.
117+
118+ -- Lucas Kanashiro <kanashiro@ubuntu.com> Mon, 03 May 2021 09:14:56 -0300
119+
120+fence-agents (4.7.1-1ubuntu2) impish; urgency=medium
121+
122+ * d/rules: install files in debian/fence-agents instead of debian/tmp.
123+ * d/install: removed, it is not needed.
124+ * Create the fence-agents-common binary package with files to be shared by
125+ the supported and unsupported agents.
126+ - d/control: add a new paragraph for the new binary package and move some
127+ runtime dependencies from fence-agents to fence-agents-common.
128+ - d/rules: move the common code to the new binary package.
129+ * Create the fence-agents-supported package
130+ - d/control: add a new paragraph for the new binary package.
131+ - d/move-supported-agents: added a shell script to manage the move of all
132+ supported agents to the right binary package.
133+ - d/rules: call the d/move-supported-agents shell script and also run the
134+ checks for the agents in the new binary package.
135+ - d/supported-agents: added a file with a list of the supported agents.
136+ * Update the way agent descriptions are added to the package description to
137+ support the split.
138+ - d/control: added a new variable to generate the list of supported agents
139+ during build time and fix the indentation.
140+ - d/extract-agents-description: added a shell script to generate a list of
141+ supported and unsupported agents with their description.
142+ - d/rules: call the d/extract-agents-description script in dh_gencontrol.
143+
144+ -- Lucas Kanashiro <kanashiro@ubuntu.com> Mon, 12 Apr 2021 18:27:29 -0300
145+
146+fence-agents (4.7.1-1ubuntu1) hirsute; urgency=medium
147+
148+ * d/t/delay: Reduce minimum delay when running on ppc64el.
149+
150+ -- Sergio Durigan Junior <sergio.durigan@canonical.com> Fri, 26 Feb 2021 16:46:48 -0500
151+
152 fence-agents (4.7.1-1) unstable; urgency=medium
153
154 * New upstream version 4.7.1
155diff --git a/debian/control b/debian/control
156index 4d07925..f87b827 100644
157--- a/debian/control
158+++ b/debian/control
159@@ -1,7 +1,8 @@
160 Source: fence-agents
161 Section: admin
162 Priority: optional
163-Maintainer: Debian HA Maintainers <debian-ha-maintainers@alioth-lists.debian.net>
164+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
165+XSBC-Original-Maintainer: Debian HA Maintainers <debian-ha-maintainers@alioth-lists.debian.net>
166 Uploaders: Adrian Vondendriesch <adrian.vondendriesch@credativ.de>,
167 Valentin Vidic <vvidic@debian.org>
168 Build-Depends: autoconf,
169@@ -40,18 +41,33 @@ Vcs-Browser: https://salsa.debian.org/ha-team/fence-agents
170 Vcs-Git: https://salsa.debian.org/ha-team/fence-agents.git
171
172 Package: fence-agents
173+Architecture: all
174+Section: oldlibs
175+Depends: ${misc:Depends},
176+ fence-agents-base (>= ${source:Version}),
177+ fence-agents-extra (>= ${source:Version})
178+Description: Transitional package for the fence-agents
179+ Red Hat Fence Agents is a collection of scripts to handle remote
180+ power management for several devices. They allow failed or
181+ unreachable nodes to be forcibly restarted and removed from the
182+ cluster.
183+ .
184+ This is a transitional package which provides a set of curated
185+ (fence-agents-base) and non-curated (fence-agents-extra) agents.
186+
187+Package: fence-agents-extra
188 Architecture: any
189 Depends: ${misc:Depends}, ${perl:Depends}, ${python3:Depends}, ${shlibs:Depends},
190+ fence-agents-common (>= ${source:Version}),
191 python3-boto3,
192 python3-googleapi,
193 python3-oauth2client,
194- python3-pycurl,
195- python3-pexpect,
196 python3-requests,
197 python3-suds
198-Breaks: cman (<= 3.0.12-2ubuntu4)
199-Replaces: cman (<= 3.0.12-2ubuntu4)
200-Recommends: libnet-telnet-perl,
201+Breaks: cman (<= 3.0.12-2ubuntu4), fence-agents (<< 4.7.1-1ubuntu2)
202+Replaces: cman (<= 3.0.12-2ubuntu4), fence-agents (<< 4.7.1-1ubuntu2)
203+Recommends: fence-agents-base (>= ${source:Version}),
204+ libnet-telnet-perl,
205 openssh-client,
206 sg3-utils,
207 snmp
208@@ -72,7 +88,7 @@ Description: Fence Agents for Red Hat Cluster
209 cluster.
210 .
211 Fence agents included:
212- ${agents}
213+ ${agents}
214
215 Package: fence-virt
216 Architecture: any
217@@ -100,3 +116,48 @@ Description: Pluggable fencing framework for virtual machines - daemon
218 .
219 This package contains the fence_virtd daemon to be used on the
220 physical host.
221+
222+Package: fence-agents-base
223+Architecture: all
224+Multi-Arch: foreign
225+Depends: ${misc:Depends}, ${python3:Depends},
226+ fence-agents-common (>= ${source:Version})
227+Suggests:
228+# for fence_ipmilan (and its symlinks)
229+ ipmitool,
230+# for fence_mpath
231+ multipath-tools,
232+# for fence_sbd
233+ sbd,
234+# for fence_scsi
235+ sg3-utils,
236+# for fence_virsh
237+ libvirt-clients
238+Breaks: cman (<= 3.0.12-2ubuntu4), fence-agents (<< 4.7.1-1ubuntu2)
239+Replaces: cman (<= 3.0.12-2ubuntu4), fence-agents (<< 4.7.1-1ubuntu2)
240+Description: Fence Agents for Red Hat Cluster curated by Ubuntu
241+ Red Hat Fence Agents is a collection of scripts to handle remote
242+ power management for several devices. They allow failed or
243+ unreachable nodes to be forcibly restarted and removed from the
244+ cluster.
245+ .
246+ This package contains the Fence Agents that are curated by the Ubuntu
247+ Server team.
248+ .
249+ Fence agents included:
250+ ${curatedAgents}
251+
252+Package: fence-agents-common
253+Architecture: any
254+Depends: ${misc:Depends}, ${python3:Depends},
255+ python3-pexpect,
256+ python3-pycurl
257+Breaks: fence-agents (<< 4.7.1-1ubuntu2)
258+Replaces: fence-agents (<< 4.7.1-1ubuntu2)
259+Description: Common files used by the Fence Agents for Red Hat Cluster
260+ Red Hat Fence Agents is a collection of scripts to handle remote
261+ power management for several devices. They allow failed or
262+ unreachable nodes to be forcibly restarted and removed from the
263+ cluster.
264+ .
265+ This package provides common files used by the Fence Agents.
266diff --git a/debian/curated-agents b/debian/curated-agents
267new file mode 100644
268index 0000000..dcba8c2
269--- /dev/null
270+++ b/debian/curated-agents
271@@ -0,0 +1,11 @@
272+fence_idrac
273+fence_ilo3
274+fence_ilo4
275+fence_ilo5
276+fence_imm
277+fence_ipmilan
278+fence_ipmilanplus
279+fence_mpath
280+fence_sbd
281+fence_scsi
282+fence_virsh
283diff --git a/debian/extract-agents-description b/debian/extract-agents-description
284new file mode 100755
285index 0000000..3bb4e7e
286--- /dev/null
287+++ b/debian/extract-agents-description
288@@ -0,0 +1,32 @@
289+#!/bin/bash
290+
291+set -x
292+
293+export LC_ALL=C
294+
295+agents=()
296+curated_agents=()
297+non_curated_agents=()
298+
299+for file in tests/data/metadata/*.xml; do
300+ agent=$(sed -ne 's/<resource-agent name="\(.*\)" shortdesc="\(.*\)".*/\1: \2/p' "$file" | \
301+ sed -e 's/\(I.O \)\?\(Fence\|Fencing\) agent for //')
302+ agents+=("$agent")
303+done
304+
305+for agent in "${agents[@]}"; do
306+ # This agent was already skipped previously, not related to the split of the
307+ # supported and unsupported fence-agents.
308+ if grep -qFx "fence_amt_ws" <<< "$agent"; then
309+ continue
310+ fi
311+
312+ if grep -qFx $(cut -d: -f1 <<< "$agent") debian/curated-agents; then
313+ curated_agents+=("$agent\${Newline}")
314+ else
315+ non_curated_agents+=("$agent\${Newline}")
316+ fi
317+done
318+
319+echo "supportedAgents=${curated_agents[*]}" >> debian/fence-agents-base.substvars
320+echo "agents=${non_curated_agents[*]}" >> debian/fence-agents-extra.substvars
321diff --git a/debian/fence-agents.docs b/debian/fence-agents-common.docs
322similarity index 100%
323rename from debian/fence-agents.docs
324rename to debian/fence-agents-common.docs
325diff --git a/debian/fence-agents.install b/debian/fence-agents.install
326deleted file mode 100644
327index 2d43a71..0000000
328--- a/debian/fence-agents.install
329+++ /dev/null
330@@ -1,8 +0,0 @@
331-usr/libexec/fence-agents/fence_kdump_send
332-usr/sbin/fence*
333-usr/share/cluster/fence*
334-usr/share/cluster/relaxng*
335-usr/share/doc
336-usr/share/fence*
337-usr/share/man/man8/fence*
338-usr/share/pkgconfig/fence-agents.pc
339diff --git a/debian/fence-virt.install b/debian/fence-virt.install
340index 7bbfe98..205ac34 100644
341--- a/debian/fence-virt.install
342+++ b/debian/fence-virt.install
343@@ -1,4 +1,4 @@
344-usr/sbin/fence_virt
345-usr/sbin/fence_xvm
346-usr/share/man/man8/fence_virt.8
347-usr/share/man/man8/fence_xvm.8
348+debian/fence-agents-extra/usr/sbin/fence_virt usr/sbin/
349+debian/fence-agents-extra/usr/sbin/fence_xvm usr/sbin/
350+debian/fence-agents-extra/usr/share/man/man8/fence_virt.8 usr/share/man/man8/
351+debian/fence-agents-extra/usr/share/man/man8/fence_xvm.8 usr/share/man/man8/
352diff --git a/debian/fence-virtd.install b/debian/fence-virtd.install
353index 3f9f6f1..bf20135 100644
354--- a/debian/fence-virtd.install
355+++ b/debian/fence-virtd.install
356@@ -1,5 +1,5 @@
357-etc/fence_virt.conf
358-usr/lib/*/fence-virt/*.so
359-usr/sbin/fence_virtd
360-usr/share/man/man5/fence_virt.conf.5
361-usr/share/man/man8/fence_virtd.8
362+debian/fence-agents-extra/etc/fence_virt.conf etc/
363+debian/fence-agents-extra/usr/lib/*/fence-virt/*.so usr/lib/${DEB_HOST_MULTIARCH}/fence-virt/
364+debian/fence-agents-extra/usr/sbin/fence_virtd usr/sbin/
365+debian/fence-agents-extra/usr/share/man/man5/fence_virt.conf.5 usr/share/man/man5/
366+debian/fence-agents-extra/usr/share/man/man8/fence_virtd.8 usr/share/man/man8/
367diff --git a/debian/install-curated-agents b/debian/install-curated-agents
368new file mode 100755
369index 0000000..e0298e2
370--- /dev/null
371+++ b/debian/install-curated-agents
372@@ -0,0 +1,16 @@
373+#!/bin/bash
374+
375+set -x
376+
377+readonly FENCE_AGENTS_BASE="debian/fence-agents-base"
378+readonly FENCE_AGENTS_EXTRA="debian/fence-agents-extra"
379+
380+mkdir -p "$FENCE_AGENTS_BASE"/usr/sbin \
381+ "$FENCE_AGENTS_BASE"/usr/share/man/man8
382+
383+for agent in $(cat debian/curated-agents); do
384+ mv "$FENCE_AGENTS_EXTRA"/usr/sbin/$agent \
385+ "$FENCE_AGENTS_BASE"/usr/sbin/
386+ mv "$FENCE_AGENTS_EXTRA"/usr/share/man/man8/$agent.8 \
387+ "$FENCE_AGENTS_BASE"/usr/share/man/man8/
388+done
389diff --git a/debian/rules b/debian/rules
390index 4bb0153..dde48ad 100755
391--- a/debian/rules
392+++ b/debian/rules
393@@ -5,6 +5,9 @@ DPKG_EXPORT_BUILDFLAGS = 1
394 include /usr/share/dpkg/buildflags.mk
395 include /usr/share/dpkg/pkg-info.mk
396
397+FENCE_AGENTS_EXTRA_DIR="$(CURDIR)/debian/fence-agents-extra"
398+FENCE_AGENTS_COMMON_DIR="$(CURDIR)/debian/fence-agents-common"
399+
400 %:
401 dh $@ --with python3
402
403@@ -27,32 +30,52 @@ override_dh_auto_build:
404 LC_ALL=C dh_auto_build
405
406 override_dh_auto_install:
407- $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
408+ $(MAKE) install DESTDIR=$(FENCE_AGENTS_EXTRA_DIR)
409
410 override_dh_install:
411- rm -v debian/tmp/usr/share/doc/fence-agents/COPY*
412- rm -v debian/tmp/usr/share/doc/fence-agents/README.licence
413- rmdir debian/tmp/usr/share/doc/fence-agents
414+ rm -v $(FENCE_AGENTS_EXTRA_DIR)/usr/share/doc/fence-agents/COPY*
415+ rm -v $(FENCE_AGENTS_EXTRA_DIR)/usr/share/doc/fence-agents/README.licence
416+ rmdir $(FENCE_AGENTS_EXTRA_DIR)/usr/share/doc/fence-agents
417 ifneq ($(shell dpkg-architecture -qDEB_HOST_ARCH),s390x)
418 # remove fence_zvm because it doesn't do anything except on 390x
419- rm -v debian/tmp/usr/sbin/fence_zvm
420- rm -v debian/tmp/usr/share/man/man8/fence_zvm.8
421+ rm -v $(FENCE_AGENTS_EXTRA_DIR)/usr/sbin/fence_zvm
422+ rm -v $(FENCE_AGENTS_EXTRA_DIR)/usr/share/man/man8/fence_zvm.8
423 endif
424+
425+ # Move the curated agents to the right binary package
426+ debian/install-curated-agents
427+
428+ # Move the common python code to a separate binary package to be used
429+ # by -base and -extra.
430+ mkdir -vp $(FENCE_AGENTS_COMMON_DIR)/usr/share/fence
431+ mv -v $(FENCE_AGENTS_EXTRA_DIR)/usr/share/fence/*.py \
432+ $(FENCE_AGENTS_COMMON_DIR)/usr/share/fence/
433+
434+ # Move var directory to fence-agents-common
435+ mv -v $(FENCE_AGENTS_EXTRA_DIR)/var \
436+ $(FENCE_AGENTS_COMMON_DIR)
437+ # /var/run/... is temporary and recreated on demand by the agents
438+ rm -vrf $(FENCE_AGENTS_COMMON_DIR)/var/run
439+
440+ # Move pkgconfig directory to fence-agents-common
441+ mv -v $(FENCE_AGENTS_EXTRA_DIR)/usr/share/pkgconfig \
442+ $(FENCE_AGENTS_COMMON_DIR)/usr/share/
443+
444 dh_install
445 # test agents (skip ack_manual, it doesn't have --help, skip vmware_helper, it wants VIRuntime.pm)
446 # we test in tmp after install so the .pyc files generated don't make it into the package
447- for agent in debian/tmp/usr/sbin/*; do \
448- case $${agent##*/} in fence_ack_manual|fence_vmware_helper|fence_virt) continue;; esac; \
449+ for agent in $(CURDIR)/debian/fence-agents*/usr/sbin/*; do \
450+ case $${agent##*/} in fence_ack_manual|fence_vmware_helper) continue;; esac; \
451 echo "Testing $$agent"; \
452- PYTHONPATH=debian/tmp/usr/share/fence $$agent --help >/dev/null || exit; \
453+ PYTHONPATH=$(FENCE_AGENTS_COMMON_DIR)/usr/share/fence $$agent --help >/dev/null || exit; \
454 done
455 # fence_virt is in a separate package
456- rm -v debian/fence-agents/usr/sbin/fence_virt
457- rm -v debian/fence-agents/usr/sbin/fence_virtd
458- rm -v debian/fence-agents/usr/sbin/fence_xvm
459- rm -v debian/fence-agents/usr/share/man/man8/fence_virt.8
460- rm -v debian/fence-agents/usr/share/man/man8/fence_virtd.8
461- rm -v debian/fence-agents/usr/share/man/man8/fence_xvm.8
462+ rm -v $(FENCE_AGENTS_EXTRA_DIR)/usr/sbin/fence_virt
463+ rm -v $(FENCE_AGENTS_EXTRA_DIR)/usr/sbin/fence_virtd
464+ rm -v $(FENCE_AGENTS_EXTRA_DIR)/usr/sbin/fence_xvm
465+ rm -v $(FENCE_AGENTS_EXTRA_DIR)/usr/share/man/man8/fence_virt.8
466+ rm -v $(FENCE_AGENTS_EXTRA_DIR)/usr/share/man/man8/fence_virtd.8
467+ rm -v $(FENCE_AGENTS_EXTRA_DIR)/usr/share/man/man8/fence_xvm.8
468
469 # tests are slow and require network access so moved to debian/tests/{delay,metadata}
470 override_dh_auto_test:
471@@ -70,17 +93,10 @@ override_dh_installinit:
472 dh_installinit -pfence-virtd --name=fence_virtd
473
474 override_dh_missing:
475- rm debian/tmp/usr/lib/*/fence-virt/*.*a
476+ rm $(FENCE_AGENTS_EXTRA_DIR)/usr/lib/*/fence-virt/*.*a
477 dh_missing --fail-missing
478
479 override_dh_gencontrol:
480 # extract agent descriptions for use in debian/control
481- export LC_ALL=C; \
482- ( echo -n "agents="; \
483- sed -ne 's/<resource-agent name="\(.*\)" shortdesc="\(.*\)".*/\1: \2/p' tests/data/metadata/*.xml | \
484- sed -e 's/\(I.O \)\?\(Fence\|Fencing\) agent for //' | \
485- grep -v 'fence_amt_ws:\|fence_virt:' | \
486- while read line; do echo -n " $$line\$${Newline}"; done ; \
487- echo ; \
488- ) >> debian/fence-agents.substvars
489+ debian/extract-agents-description
490 dh_gencontrol
491diff --git a/debian/tests/delay b/debian/tests/delay
492index ad0af03..1ad534f 100755
493--- a/debian/tests/delay
494+++ b/debian/tests/delay
495@@ -6,6 +6,12 @@ DEFAULT_ARGS='delay=10\n login=test\n passwd=test\n ipaddr=127.0.0.1\n port=1\n
496 OUTPUT=$AUTOPKGTEST_TMP/delay
497 mkdir -p $OUTPUT
498
499+if [ "$(dpkg --print-architecture)" = "ppc64el" ]; then
500+ MIN_DELAY=500
501+else
502+ MIN_DELAY=1000
503+fi
504+
505 for agent in /usr/sbin/fence_*; do
506 [ "$agent" = "/usr/sbin/fence_ack_manual" ] && continue
507 [ "$agent" = "/usr/sbin/fence_kdump" ] && continue
508@@ -18,7 +24,7 @@ for agent in /usr/sbin/fence_*; do
509
510 (
511 TIME=$(/usr/bin/time -p sh -c "printf '$ARGS' | $agent " 2>&1 | awk -F"[. ]" -vOFS= '/real/ {print $2,$3}')
512- if [ "$TIME" -lt 1000 ]; then
513+ if [ "$TIME" -lt "$MIN_DELAY" ]; then
514 echo "$agent delay too low: $TIME" | tee $LOG
515 else
516 echo "$agent delay ok: $TIME" | tee $LOG

Subscribers

People subscribed via source and target branches