Merge ~mitchdz/ubuntu/+source/ec2-hibinit-agent:mitch/arm-jammy into ubuntu/+source/ec2-hibinit-agent:ubuntu/jammy-devel

Proposed by Mitchell Dzurick
Status: Merged
Merged at revision: 3fb1a91554db6e02dc5db7e95e6b3a1c8f89d1b2
Proposed branch: ~mitchdz/ubuntu/+source/ec2-hibinit-agent:mitch/arm-jammy
Merge into: ubuntu/+source/ec2-hibinit-agent:ubuntu/jammy-devel
Diff against target: 71 lines (+49/-0)
3 files modified
debian/changelog (+8/-0)
debian/patches/0015-ignore-setting-resume-offset-again-if-dev-snapshot-d.patch (+40/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Lena Voytek (community) Approve
git-ubuntu import Pending
Review via email: mp+466350@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Mitchell Dzurick (mitchdz) wrote :

Due to this MP being the same for multiple release, check the testing results in the bug report at https://bugs.launchpad.net/bugs/2066999

Revision history for this message
Lena Voytek (lvoytek) wrote :

LGTM

dput ubuntu ../ec2-hibinit-agent_1.0.0-0ubuntu11.22.04.5_source.changes
D: Setting host argument.
Checking signature on .changes
gpg: ../ec2-hibinit-agent_1.0.0-0ubuntu11.22.04.5_source.changes: Valid signature from 34B8AD7D9529E793
Checking signature on .dsc
gpg: ../ec2-hibinit-agent_1.0.0-0ubuntu11.22.04.5.dsc: Valid signature from 34B8AD7D9529E793
Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading ec2-hibinit-agent_1.0.0-0ubuntu11.22.04.5.dsc: done.
  Uploading ec2-hibinit-agent_1.0.0-0ubuntu11.22.04.5.debian.tar.xz: done.
  Uploading ec2-hibinit-agent_1.0.0-0ubuntu11.22.04.5_source.buildinfo: done.
  Uploading ec2-hibinit-agent_1.0.0-0ubuntu11.22.04.5_source.changes: done.
Successfully uploaded packages.

Revision history for this message
Lena Voytek (lvoytek) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/debian/changelog b/debian/changelog
index f95cb2d..7b7e9dc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
1ec2-hibinit-agent (1.0.0-0ubuntu11.22.04.5) jammy; urgency=medium
2
3 * d/p/0015-ignore-setting-resume-offset-again-if-dev-snapshot-d.patch: do
4 not set the snapshot swap area if /dev/snapshot does not exist. This is
5 necessary to enable ARM hibernation. (LP: #2066999)
6
7 -- Mitchell Dzurick <mitchell.dzurick@canonical.com> Thu, 23 May 2024 16:43:57 -0700
8
1ec2-hibinit-agent (1.0.0-0ubuntu11.22.04.4) jammy; urgency=medium9ec2-hibinit-agent (1.0.0-0ubuntu11.22.04.4) jammy; urgency=medium
210
3 * d/p/lp2031345-recreate-swap-file.patch: Reduce SWAP size if current SWAP11 * d/p/lp2031345-recreate-swap-file.patch: Reduce SWAP size if current SWAP
diff --git a/debian/patches/0015-ignore-setting-resume-offset-again-if-dev-snapshot-d.patch b/debian/patches/0015-ignore-setting-resume-offset-again-if-dev-snapshot-d.patch
4new file mode 10064412new file mode 100644
index 0000000..65ddd69
--- /dev/null
+++ b/debian/patches/0015-ignore-setting-resume-offset-again-if-dev-snapshot-d.patch
@@ -0,0 +1,40 @@
1Description: Do not set snapshot swap area if it does not exist
2Author: Carolan <secarola@88665a58a118.ant.amazon.com>
3Origin: upstream, https://github.com/aws/amazon-ec2-hibinit-agent/commit/ab70d14fce4d9f05d54b363a0d849c5169e01ffa
4Bug-Ubuntu: https://bugs.launchpad.net/bugs/2066999
5Forwarded: not-needed
6Last-Update: 2024-05-23
7---
8 agent/hibinit-agent | 18 +++++++++---------
9 1 file changed, 9 insertions(+), 9 deletions(-)
10
11This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
12diff --git a/agent/hibinit-agent b/agent/hibinit-agent
13index 2cc97ce..e36150e 100755
14--- a/agent/hibinit-agent
15+++ b/agent/hibinit-agent
16@@ -130,15 +130,15 @@ def update_kernel_swap_offset(swapon, swapoff, filename, grub_update):
17 else:
18 log("Skipping GRUB configuration update")
19
20- log("Setting swap device to %d with offset %d" % (dev, offset))
21-
22- # Set the kernel swap offset, see https://www.kernel.org/doc/Documentation/power/userland-swsusp.txt
23- # From linux/suspend_ioctls.h
24- SNAPSHOT_SET_SWAP_AREA = 0x400C330D
25- buf = struct.pack('LI', offset, dev)
26- with open('/dev/snapshot', 'r') as snap:
27- fcntl.ioctl(snap, SNAPSHOT_SET_SWAP_AREA, buf)
28- log("Done updating the swap offset. Turning swapoff")
29+ if os.path.exists("/dev/snapshot"):
30+ log("Setting swap device to %d with offset %d" % (dev, offset))
31+ # Set the kernel swap offset, see https://www.kernel.org/doc/Documentation/power/userland-swsusp.txt
32+ # From linux/suspend_ioctls.h
33+ SNAPSHOT_SET_SWAP_AREA = 0x400C330D
34+ buf = struct.pack('LI', offset, dev)
35+ with open('/dev/snapshot', 'r') as snap:
36+ fcntl.ioctl(snap, SNAPSHOT_SET_SWAP_AREA, buf)
37+ log("Done updating the swap offset. Turning swapoff")
38 swapoff = swapoff.format(swapfile=filename)
39 log("Running: %s" % swapoff)
40 check_call(swapoff, shell=True)
diff --git a/debian/patches/series b/debian/patches/series
index f66ab04..8e12c8a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -12,3 +12,4 @@ lp1941785-Add-support-for-IMDSv2.patch
12lp2023924-remove-quotes-from-state-dir.patch12lp2023924-remove-quotes-from-state-dir.patch
13lp2024505-fix-locale-issue.patch13lp2024505-fix-locale-issue.patch
14lp2031345-recreate-swap-file.patch14lp2031345-recreate-swap-file.patch
150015-ignore-setting-resume-offset-again-if-dev-snapshot-d.patch

Subscribers

People subscribed via source and target branches