Merge ~vpa1977/ubuntu/+source/pgpool2:fix-autopkgtest into ubuntu/+source/pgpool2:ubuntu/devel

Proposed by Vladimir Petko
Status: Merged
Merged at revision: f3c884a922defa660430d8b4d21577202b24cd3b
Proposed branch: ~vpa1977/ubuntu/+source/pgpool2:fix-autopkgtest
Merge into: ubuntu/+source/pgpool2:ubuntu/devel
Diff against target: 106 lines (+61/-2)
5 files modified
debian/changelog (+8/-0)
debian/control (+2/-1)
debian/control.in (+2/-1)
debian/patches/java21-deprecation.patch (+48/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Pushkar Kulkarni (community) Approve
git-ubuntu import Pending
Review via email: mp+461214@code.launchpad.net

Description of the change

This MR fixes autopkgtest failure for Java 21

PPA: ppa:vpa1977/plusone [1]

Changes:
 - Remove deprecated API calls

Testing:
 - autopkgtest:
 pgpool2/4.3.7-1ubuntu1~ppa1
    + ✅ pgpool2 on noble for amd64 @ 26.02.24 03:15:21 Log️ 🗒️ [2]
    + ✅ pgpool2 on noble for arm64 @ 26.02.24 03:39:35 Log️ 🗒️ [3]
    + ❌ pgpool2 on noble for armhf @ 26.02.24 03:33:37 Log️ 🗒️ [4]
      • jdbc-tests FAIL 🟥
      • installcheck PASS 🟩
    + ✅ pgpool2 on noble for ppc64el @ 26.02.24 03:26:14 Log️ 🗒️ [5]
    + ✅ pgpool2 on noble for s390x @ 26.02.24 03:19:48 Log️ 🗒️ [6]

Note: armf failure is an existing issue[7]
  - install-remove, install-upgrade-purge test [8].

[1] https://launchpad.net/~vpa1977/+archive/ubuntu/plusone/+packages
[2] https://autopkgtest.ubuntu.com/results/autopkgtest-noble-vpa1977-plusone/noble/amd64/p/pgpool2/20240226_031521_b3869@/log.gz
[3] https://autopkgtest.ubuntu.com/results/autopkgtest-noble-vpa1977-plusone/noble/arm64/p/pgpool2/20240226_033935_e8357@/log.gz
[4] https://autopkgtest.ubuntu.com/results/autopkgtest-noble-vpa1977-plusone/noble/armhf/p/pgpool2/20240226_033337_a020b@/log.gz
[5] https://autopkgtest.ubuntu.com/results/autopkgtest-noble-vpa1977-plusone/noble/ppc64el/p/pgpool2/20240226_032614_e33b4@/log.gz
[6] https://autopkgtest.ubuntu.com/results/autopkgtest-noble-vpa1977-plusone/noble/s390x/p/pgpool2/20240226_031948_4810a@/log.gz
[7] https://autopkgtest.ubuntu.com/packages/p/pgpool2/noble/armhf
[8] https://bugs.launchpad.net/ubuntu/+source/pgpool2/+bug/2054944/comments/1

To post a comment you must log in.
Revision history for this message
Pushkar Kulkarni (pushkarnk) wrote :

Pushing the patch creates a stray getTestName() call which could be removed. Also, the indentation needs to be fixed. Comments inline.

review: Needs Fixing
Revision history for this message
Vladimir Petko (vpa1977) wrote (last edit ):

> Pushing the patch creates a stray getTestName() call which could be removed.
Fixed, Thank you!!!!

> Also, the indentation needs to be fixed. Comments inline.
LP does not show inline comments ;( I have replaced tab-tab with tab-spaces

Revision history for this message
Pushkar Kulkarni (pushkarnk) wrote :

Thanks! LGTM.

review: Approve
Revision history for this message
Vladimir Petko (vpa1977) wrote :

Uploaded, thank you!

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 0a70233..11e6702 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,11 @@
6+pgpool2 (4.3.7-1ubuntu1) noble; urgency=medium
7+
8+ * d/p/java21-deprecation.patch: fix autopkgtest failure with
9+ Java 21. Use Runtime.exec(String[]) to avoid deprecation warning
10+ (LP: #2054944).
11+
12+ -- Vladimir Petko <vladimir.petko@canonical.com> Mon, 26 Feb 2024 14:41:25 +1300
13+
14 pgpool2 (4.3.7-1) unstable; urgency=medium
15
16 * New upstream version 4.3.7.
17diff --git a/debian/control b/debian/control
18index d872a7e..43460ff 100644
19--- a/debian/control
20+++ b/debian/control
21@@ -1,7 +1,8 @@
22 Source: pgpool2
23 Section: database
24 Priority: optional
25-Maintainer: Debian PostgreSQL Maintainers <team+postgresql@tracker.debian.org>
26+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
27+XSBC-Original-Maintainer: Debian PostgreSQL Maintainers <team+postgresql@tracker.debian.org>
28 Uploaders:
29 Christoph Berg <myon@debian.org>,
30 Marco Nenciarini <mnencia@debian.org>,
31diff --git a/debian/control.in b/debian/control.in
32index d7f0a98..47b376c 100644
33--- a/debian/control.in
34+++ b/debian/control.in
35@@ -1,7 +1,8 @@
36 Source: pgpool2
37 Section: database
38 Priority: optional
39-Maintainer: Debian PostgreSQL Maintainers <team+postgresql@tracker.debian.org>
40+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
41+XSBC-Original-Maintainer: Debian PostgreSQL Maintainers <team+postgresql@tracker.debian.org>
42 Uploaders:
43 Christoph Berg <myon@debian.org>,
44 Marco Nenciarini <mnencia@debian.org>,
45diff --git a/debian/patches/java21-deprecation.patch b/debian/patches/java21-deprecation.patch
46new file mode 100644
47index 0000000..e68239c
48--- /dev/null
49+++ b/debian/patches/java21-deprecation.patch
50@@ -0,0 +1,48 @@
51+Description: replace Runtime.exec(String) with Runtime.exec(String[])
52+ Runtime.exec(String) is deprecated in Java 21.
53+ The deprecation warning is output to stderr failing autopkgtests.
54+Author: Vladimir Petko <vladimir.petko@canonical.com>
55+Bug: https://github.com/pgpool/pgpool2/pull/40
56+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1064789
57+Bug-Ubuntu: https://bugs.launchpad.net/debian/+source/pgpool2/+bug/2054944
58+Last-Update: 2024-02-26
59+--- a/src/test/regression/tests/005.jdbc/PgpoolTest.java
60++++ b/src/test/regression/tests/005.jdbc/PgpoolTest.java
61+@@ -52,11 +52,16 @@
62+
63+ public void check() {
64+ try {
65+- String command_line = "diff -u expected/" + getTestName() + " result/" +
66+- getTestName();
67+ Process proc;
68+
69+- proc = Runtime.getRuntime().exec(command_line);
70++ proc = Runtime.getRuntime().exec(new String[]{
71++ "diff",
72++ "-u",
73++ "expected/",
74++ getTestName(),
75++ "result/",
76++ getTestName()
77++ });
78+ proc.waitFor();
79+ System.out.print(getTestName() + ": ");
80+ if (proc.exitValue() == 0)
81+--- a/src/test/regression/tests/005.jdbc/RunTest.java
82++++ b/src/test/regression/tests/005.jdbc/RunTest.java
83+@@ -23,10 +23,11 @@
84+ String dbname = prop.getProperty("pgpooltest.dbname");
85+
86+ // setup database
87+- String command_line = "psql -f prepare.sql";
88+- command_line = command_line + " -h " + host + " -p " + port +
89+- " -U " + user + " " + dbname;
90+- Process proc = Runtime.getRuntime().exec(command_line);
91++ Process proc = Runtime.getRuntime().exec(new String[]{
92++ "psql", "-f", "prepare.sql",
93++ "-h", host, "-p ", port,
94++ "-U", user, dbname
95++ });
96+ proc.waitFor();
97+
98+ StringTokenizer tokenizer = new StringTokenizer(tests, " ");
99diff --git a/debian/patches/series b/debian/patches/series
100index c0c8554..490cddb 100644
101--- a/debian/patches/series
102+++ b/debian/patches/series
103@@ -1,2 +1,3 @@
104 pgpool2-debian-config.patch
105 sbin-paths
106+java21-deprecation.patch

Subscribers

People subscribed via source and target branches