Merge ~mitchdz/ubuntu/+source/ec2-hibinit-agent:fix-locale-and-quotes-mantic into ubuntu/+source/ec2-hibinit-agent:ubuntu/devel

Proposed by Mitchell Dzurick
Status: Merged
Merge reported by: Robie Basak
Merged at revision: ed847a1e624ca1cc262485041d4fc7ea17480cb5
Proposed branch: ~mitchdz/ubuntu/+source/ec2-hibinit-agent:fix-locale-and-quotes-mantic
Merge into: ubuntu/+source/ec2-hibinit-agent:ubuntu/devel
Diff against target: 78 lines (+50/-0)
4 files modified
debian/changelog (+11/-0)
debian/patches/lp2023924-remove-quotes-from-state-dir.patch (+19/-0)
debian/patches/lp2024505-fix-locale-issue.patch (+18/-0)
debian/patches/series (+2/-0)
Reviewer Review Type Date Requested Status
Utkarsh Gupta (community) Approve
Canonical Server Reporter Pending
Review via email: mp+445087@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Utkarsh Gupta (utkarsh) wrote :

Hey, thanks for this! It looks good and I've uploaded to Mantic:

$ dput ubuntu ../ec2-hibinit-agent_1.0.0-0ubuntu15_source.changes
Checking signature on .changes
gpg: ../ec2-hibinit-agent_1.0.0-0ubuntu15_source.changes: Valid signature from 823E967606C34B96
Checking signature on .dsc
gpg: ../ec2-hibinit-agent_1.0.0-0ubuntu15.dsc: Valid signature from 823E967606C34B96
Package includes an .orig.tar.gz file although the debian revision suggests
that it might not be required. Multiple uploads of the .orig.tar.gz may be
rejected by the upload queue management software.
Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading ec2-hibinit-agent_1.0.0-0ubuntu15.dsc: done.
  Uploading ec2-hibinit-agent_1.0.0.orig.tar.gz: done.
  Uploading ec2-hibinit-agent_1.0.0-0ubuntu15.debian.tar.xz: done.
  Uploading ec2-hibinit-agent_1.0.0-0ubuntu15_source.buildinfo: done.
  Uploading ec2-hibinit-agent_1.0.0-0ubuntu15_source.changes: done.
Successfully uploaded packages.

review: Approve

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 e3aaae8..0aa68c1 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,14 @@
6+ec2-hibinit-agent (1.0.0-0ubuntu15) mantic; urgency=medium
7+
8+ * debian/patches/lp2023924-remove-quotes-from-state-dir.patch: fixes
9+ an issue where a weird directory would be created in root
10+ (LP: #2023924)
11+ * debian/patches/lp2024505-fix-locale-issue.patch: fixes an issue where
12+ certain locales can cause an error when trying to decode the output of
13+ `df -P` (LP: #2024505)
14+
15+ -- Mitchell Dzurick <mitchell.dzurick@canonical.com> Tue, 20 Jun 2023 17:01:17 -0700
16+
17 ec2-hibinit-agent (1.0.0-0ubuntu14) mantic; urgency=medium
18
19 * d/p/lp1941785-Add-support-for-IMDSv2.patch: add IMDSv2 support
20diff --git a/debian/patches/lp2023924-remove-quotes-from-state-dir.patch b/debian/patches/lp2023924-remove-quotes-from-state-dir.patch
21new file mode 100644
22index 0000000..d178d21
23--- /dev/null
24+++ b/debian/patches/lp2023924-remove-quotes-from-state-dir.patch
25@@ -0,0 +1,19 @@
26+Description: Remove quotes in config file for state_dir value
27+It creates strange directory /"
28+Author: Anchal Agarwal <anchalag@amazon.com>
29+Origin: backport, https://github.com/aws/amazon-ec2-hibinit-agent/commit/d87d6365009f1663247fd8595b487c59d9b121f1
30+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/ec2-hibinit-agent/+bug/2023924
31+Last-Update: 2023-06-20
32+---
33+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
34+--- a/etc/hibinit-config.cfg
35++++ b/etc/hibinit-config.cfg
36+@@ -12,7 +12,7 @@
37+ touch-swap = False
38+
39+ # Location where to create any state files
40+-state-dir = "/var/lib/hibinit-agent"
41++state-dir = /var/lib/hibinit-agent
42+
43+ [swap]
44+ # If there's no swap then we create it to be equal to the specified
45diff --git a/debian/patches/lp2024505-fix-locale-issue.patch b/debian/patches/lp2024505-fix-locale-issue.patch
46new file mode 100644
47index 0000000..15a0a0d
48--- /dev/null
49+++ b/debian/patches/lp2024505-fix-locale-issue.patch
50@@ -0,0 +1,18 @@
51+Description: Change encoding to use the system locale instead of ascii.
52+Author: einynot <111812541+einynot@users.noreply.github.com>
53+Origin: backport, https://github.com/aws/amazon-ec2-hibinit-agent/commit/2392e860c7a75c2b61baef749bb90e79a2a3e81e
54+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/ec2-hibinit-agent/+bug/2024505
55+Last-Update: 2023-06-20
56+---
57+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
58+--- a/agent/hibinit-agent
59++++ b/agent/hibinit-agent
60+@@ -145,7 +145,7 @@
61+
62+ def find_device_for_file(filename):
63+ # Find the mount point for the swap file ('df -P /swap')
64+- df_out = check_output(['df', '-P', filename]).decode('ascii')
65++ df_out = check_output(['df', '-P', filename]).decode(sys.getfilesystemencoding())
66+ dev_str = df_out.split("\n")[1].split()[0]
67+ return dev_str
68+
69diff --git a/debian/patches/series b/debian/patches/series
70index 043841d..0dce030 100644
71--- a/debian/patches/series
72+++ b/debian/patches/series
73@@ -10,3 +10,5 @@ detect-hibernate-cmd-by-default.patch
74 lp1968805-Swapon-with-maximum-priority-before-hibernation.patch
75 fix-setuptools-package-discovery.patch
76 lp1941785-Add-support-for-IMDSv2.patch
77+lp2023924-remove-quotes-from-state-dir.patch
78+lp2024505-fix-locale-issue.patch

Subscribers

People subscribed via source and target branches