From b74e2464e9e87f9f960447a065097aa22a629981 Mon Sep 17 00:00:00 2001 From: David Duncan Date: Wed, 20 Jan 2021 14:56:50 +0000 Subject: [PATCH 01/32] Revert "Add BuildRequires: make" This reverts commit 18e0081befa6500922fdc4f3db94f83a427edd5f. --- ec2-hibinit-agent.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/ec2-hibinit-agent.spec b/ec2-hibinit-agent.spec index 9cfbc94..45506e2 100644 --- a/ec2-hibinit-agent.spec +++ b/ec2-hibinit-agent.spec @@ -21,7 +21,6 @@ Source0: https://github.com/aws/%{project}/archive/v%{version}/%{name}-%{ BuildArch: noarch -BuildRequires: make BuildRequires: systemd-rpm-macros BuildRequires: python3-devel BuildRequires: selinux-policy From 6414274ecee9c1cd1c6dba07d48bf6e992dfba31 Mon Sep 17 00:00:00 2001 From: David Duncan Date: Thu, 21 Jan 2021 17:29:02 +0000 Subject: [PATCH 02/32] Update spec to reflect updates https://github.com/tstellar/fedora-change-make-buildroot --- ec2-hibinit-agent.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ec2-hibinit-agent.spec b/ec2-hibinit-agent.spec index 9cfbc94..d05f50f 100644 --- a/ec2-hibinit-agent.spec +++ b/ec2-hibinit-agent.spec @@ -12,7 +12,7 @@ Name: ec2-hibinit-agent Version: 1.0.3 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Hibernation setup utility for Amazon EC2 License: ASL 2.0 @@ -140,6 +140,9 @@ fi %selinux_relabel_post -s %{selinuxtype} %changelog +* Thu Jan 21 17:27:18 UTC 2021 David Duncan - 1.0.3-4 +- Add BuildRequires: make, FESCo issue: #2500 + * Tue Nov 03 2020 Mohamed Aboubakr - 1.0.3-3 - Moving selinux folder in packaging directory. - Use make file to generate .pp.bz2 file From 72da59641f0cccafd43f4130143d2c9423710527 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 26 Jan 2021 04:14:27 +0000 Subject: [PATCH 03/32] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ec2-hibinit-agent.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ec2-hibinit-agent.spec b/ec2-hibinit-agent.spec index d05f50f..42382aa 100644 --- a/ec2-hibinit-agent.spec +++ b/ec2-hibinit-agent.spec @@ -12,7 +12,7 @@ Name: ec2-hibinit-agent Version: 1.0.3 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Hibernation setup utility for Amazon EC2 License: ASL 2.0 @@ -140,6 +140,9 @@ fi %selinux_relabel_post -s %{selinuxtype} %changelog +* Tue Jan 26 2021 Fedora Release Engineering - 1.0.3-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Thu Jan 21 17:27:18 UTC 2021 David Duncan - 1.0.3-4 - Add BuildRequires: make, FESCo issue: #2500 From d19024073e34cce97d5f2f6edfb2dcce504737e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 2 Mar 2021 16:13:53 +0100 Subject: [PATCH 04/32] Rebuilt for updated systemd-rpm-macros See https://pagure.io/fesco/issue/2583. --- ec2-hibinit-agent.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ec2-hibinit-agent.spec b/ec2-hibinit-agent.spec index 42382aa..972a601 100644 --- a/ec2-hibinit-agent.spec +++ b/ec2-hibinit-agent.spec @@ -12,7 +12,7 @@ Name: ec2-hibinit-agent Version: 1.0.3 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Hibernation setup utility for Amazon EC2 License: ASL 2.0 @@ -140,6 +140,10 @@ fi %selinux_relabel_post -s %{selinuxtype} %changelog +* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek - 1.0.3-6 +- Rebuilt for updated systemd-rpm-macros + See https://pagure.io/fesco/issue/2583. + * Tue Jan 26 2021 Fedora Release Engineering - 1.0.3-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From 11a9096fa9df1d45206d9e52fbb27c3c8bd85a07 Mon Sep 17 00:00:00 2001 From: Tomas Hrnciar Date: Mon, 19 Apr 2021 13:18:31 +0200 Subject: [PATCH 05/32] BuildRequire setuptools explicitly See https://fedoraproject.org/wiki/Changes/Reduce_dependencies_on_python3-setuptools --- ec2-hibinit-agent.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/ec2-hibinit-agent.spec b/ec2-hibinit-agent.spec index 972a601..27cc407 100644 --- a/ec2-hibinit-agent.spec +++ b/ec2-hibinit-agent.spec @@ -24,6 +24,7 @@ BuildArch: noarch BuildRequires: make BuildRequires: systemd-rpm-macros BuildRequires: python3-devel +BuildRequires: python3-setuptools BuildRequires: selinux-policy BuildRequires: selinux-policy-devel From 66ab0dd737d740121d491064bb26d4ecd0c49620 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 4 Jun 2021 20:03:38 +0200 Subject: [PATCH 06/32] Rebuilt for Python 3.10 --- ec2-hibinit-agent.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ec2-hibinit-agent.spec b/ec2-hibinit-agent.spec index 27cc407..b3580b9 100644 --- a/ec2-hibinit-agent.spec +++ b/ec2-hibinit-agent.spec @@ -12,7 +12,7 @@ Name: ec2-hibinit-agent Version: 1.0.3 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Hibernation setup utility for Amazon EC2 License: ASL 2.0 @@ -141,6 +141,9 @@ fi %selinux_relabel_post -s %{selinuxtype} %changelog +* Fri Jun 04 2021 Python Maint - 1.0.3-7 +- Rebuilt for Python 3.10 + * Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek - 1.0.3-6 - Rebuilt for updated systemd-rpm-macros See https://pagure.io/fesco/issue/2583. From b8bd3c1a4da814d25f50f1638c5c480a5f77bfe4 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Sat, 5 Jun 2021 09:41:37 +0200 Subject: [PATCH 07/32] Rebuilt for Python 3.10 --- ec2-hibinit-agent.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ec2-hibinit-agent.spec b/ec2-hibinit-agent.spec index b3580b9..3e0695b 100644 --- a/ec2-hibinit-agent.spec +++ b/ec2-hibinit-agent.spec @@ -12,7 +12,7 @@ Name: ec2-hibinit-agent Version: 1.0.3 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Hibernation setup utility for Amazon EC2 License: ASL 2.0 @@ -141,6 +141,9 @@ fi %selinux_relabel_post -s %{selinuxtype} %changelog +* Sat Jun 05 2021 Python Maint - 1.0.3-8 +- Rebuilt for Python 3.10 + * Fri Jun 04 2021 Python Maint - 1.0.3-7 - Rebuilt for Python 3.10 From 69f551d20c9d02920cf9a53d99eb243a803d96ac Mon Sep 17 00:00:00 2001 From: David Duncan Date: Thu, 1 Jul 2021 03:17:13 +0000 Subject: [PATCH 08/32] Update to v1.0.4 from upstream repository --- .gitignore | 1 + ec2-hibinit-agent.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index f31ea6e..be8c07a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /ec2-hibinit-agent-1.0.3.tar.gz +/ec2-hibinit-agent-1.0.4.tar.gz diff --git a/ec2-hibinit-agent.spec b/ec2-hibinit-agent.spec index 3e0695b..1de1eb7 100644 --- a/ec2-hibinit-agent.spec +++ b/ec2-hibinit-agent.spec @@ -11,8 +11,8 @@ %global _format() export %1=""; for x in %{modulenames}; do %1+=%2; %1+=" "; done; Name: ec2-hibinit-agent -Version: 1.0.3 -Release: 8%{?dist} +Version: 1.0.4 +Release: 1%{?dist} Summary: Hibernation setup utility for Amazon EC2 License: ASL 2.0 @@ -141,6 +141,9 @@ fi %selinux_relabel_post -s %{selinuxtype} %changelog +* Thu Jul 01 2021 David Duncan - 1.0.4-1 +- Update to v1.0.4 + * Sat Jun 05 2021 Python Maint - 1.0.3-8 - Rebuilt for Python 3.10 diff --git a/sources b/sources index fdd6506..6141781 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ec2-hibinit-agent-1.0.3.tar.gz) = 5a44fdde6cb95c6a989f47b6b69d8611a114e02dbc44ea2421587662b75d6dd9b7e922cc4cf8976d76ed78e3c1bcd3a1e12254e90d31d5c3cf3357b49abd1236 +SHA512 (ec2-hibinit-agent-1.0.4.tar.gz) = a0d857ef7bd561e61dcbf7597261451907af24123a6c7b0048e6fbcafea2456dfe4f5436162e8b0912bc720a60370c3f85b15024d1a71dcd1995758d49565d34 From b4fa8b4a9dbf0eb2f4e1f5d4b4c9ee877867eff9 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 21 Jul 2021 21:36:02 +0000 Subject: [PATCH 09/32] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ec2-hibinit-agent.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ec2-hibinit-agent.spec b/ec2-hibinit-agent.spec index 1de1eb7..e11c717 100644 --- a/ec2-hibinit-agent.spec +++ b/ec2-hibinit-agent.spec @@ -12,7 +12,7 @@ Name: ec2-hibinit-agent Version: 1.0.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Hibernation setup utility for Amazon EC2 License: ASL 2.0 @@ -141,6 +141,9 @@ fi %selinux_relabel_post -s %{selinuxtype} %changelog +* Wed Jul 21 2021 Fedora Release Engineering - 1.0.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Thu Jul 01 2021 David Duncan - 1.0.4-1 - Update to v1.0.4 From 5c8d5ea9897b4f4eca20b31ba463de27e2fc2594 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jan 2022 01:35:12 +0000 Subject: [PATCH 10/32] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ec2-hibinit-agent.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ec2-hibinit-agent.spec b/ec2-hibinit-agent.spec index e11c717..304f717 100644 --- a/ec2-hibinit-agent.spec +++ b/ec2-hibinit-agent.spec @@ -12,7 +12,7 @@ Name: ec2-hibinit-agent Version: 1.0.4 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Hibernation setup utility for Amazon EC2 License: ASL 2.0 @@ -141,6 +141,9 @@ fi %selinux_relabel_post -s %{selinuxtype} %changelog +* Thu Jan 20 2022 Fedora Release Engineering - 1.0.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Wed Jul 21 2021 Fedora Release Engineering - 1.0.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From ead2d1da00ba83144bcf0675f1757639ac5bf8a4 Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Mon, 31 Jan 2022 09:36:45 -0800 Subject: [PATCH 11/32] epel8-playground decommissioned : https://pagure.io/epel/issue/136 --- .gitignore | 1 - README.md | 3 - dead.package | 1 + ec2-hibinit-agent.spec | 167 ----------------------------------------- sources | 1 - 5 files changed, 1 insertion(+), 172 deletions(-) delete mode 100644 .gitignore delete mode 100644 README.md create mode 100644 dead.package delete mode 100644 ec2-hibinit-agent.spec delete mode 100644 sources diff --git a/.gitignore b/.gitignore deleted file mode 100644 index f31ea6e..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/ec2-hibinit-agent-1.0.3.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 80c3042..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# ec2-hibinit-agent - -The Amazon Linux hibernation agent \ No newline at end of file diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..a72aec0 --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +epel8-playground decommissioned : https://pagure.io/epel/issue/136 diff --git a/ec2-hibinit-agent.spec b/ec2-hibinit-agent.spec deleted file mode 100644 index 45506e2..0000000 --- a/ec2-hibinit-agent.spec +++ /dev/null @@ -1,167 +0,0 @@ -%{?python_enable_dependency_generator} - -%global modulenames ec2hibernatepolicy -%global selinuxtype targeted -%global moduletype services -%global project amazon-ec2-hibinit-agent - -# Usage: _format var format -# Expand 'modulenames' into various formats as needed -# Format must contain '$x' somewhere to do anything useful -%global _format() export %1=""; for x in %{modulenames}; do %1+=%2; %1+=" "; done; - -Name: ec2-hibinit-agent -Version: 1.0.3 -Release: 3%{?dist} -Summary: Hibernation setup utility for Amazon EC2 - -License: ASL 2.0 -URL: https://github.com/aws/amazon-%{name} -Source0: https://github.com/aws/%{project}/archive/v%{version}/%{name}-%{version}.tar.gz - -BuildArch: noarch - -BuildRequires: systemd-rpm-macros -BuildRequires: python3-devel -BuildRequires: selinux-policy -BuildRequires: selinux-policy-devel - -%{?selinux_requires} -Requires: acpid -Requires: grubby -Requires: systemd -Requires: tuned - -%description -An EC2 agent that creates a setup for instance hibernation - -%prep -%autosetup -n %{project}-%{version} - -%build -%py3_build - -# Makefile generates pp.bz2 from .tt file. -# Generating tt file https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/selinux_users_and_administrators_guide/security-enhanced_linux-the-sepolicy-suite-sepolicy_generate -make -C %{_builddir}/%{project}-%{version}/packaging/rhel/ec2hibernatepolicy - -%install -%py3_install - -mkdir -p %{buildroot}%{python3_sitelib} -mkdir -p "%{buildroot}%{_unitdir}" -mkdir -p %{buildroot}%{_sysconfdir}/acpi/events -mkdir -p %{buildroot}%{_sharedstatedir}/hibinit-agent -mkdir -p %{buildroot}%{_sysconfdir}/acpi/actions - -install -p -m 644 "%{_builddir}/%{project}-%{version}/hibinit-agent.service" %{buildroot}%{_unitdir} -install -p -m 644 "%{_builddir}/%{project}-%{version}/acpid.sleep.conf" %{buildroot}%{_sysconfdir}/acpi/events/sleepconf - -mkdir -p %{buildroot}%{_prefix}/lib/systemd/logind.conf.d -mkdir -p %{buildroot}%{_prefix}/lib/systemd/system-sleep - -install -p -m 644 "%{_builddir}/%{project}-%{version}/etc/hibinit-config.cfg" %{buildroot}/%{_sysconfdir}/hibinit-config.cfg -install -p -m 644 "%{_builddir}/%{project}-%{version}/packaging/rhel/00-hibinit-agent.conf" %{buildroot}%{_prefix}/lib/systemd/logind.conf.d/00-hibinit-agent.conf -install -p -m 755 "%{_builddir}/%{project}-%{version}/packaging/rhel/acpid.sleep.sh" %{buildroot}%{_sysconfdir}/acpi/actions/sleep.sh -install -p -m 755 "%{_builddir}/%{project}-%{version}/packaging/rhel/sleep-handler.sh" %{buildroot}%{_prefix}/lib/systemd/system-sleep/sleep-handler.sh - -#Disable transparent huge page -mkdir -p %{buildroot}%{_sysconfdir}/tuned/nothp_profile -install -p -m 644 "%{_builddir}/%{project}-%{version}/packaging/rhel/tuned.conf" %{buildroot}%{_sysconfdir}/tuned/nothp_profile/tuned.conf - -# Install policy modules -%_format MODULES $x.pp.bz2 -install -d %{buildroot}%{_datadir}/selinux/packages -install -m 0644 %{_builddir}/%{project}-%{version}/packaging/rhel/ec2hibernatepolicy/$MODULES \ - %{buildroot}%{_datadir}/selinux/packages - - -%files -%doc README.md -%license LICENSE.txt - -%config(noreplace) %{_sysconfdir}/hibinit-config.cfg -%{_unitdir}/hibinit-agent.service -%{_bindir}/hibinit-agent -%config(noreplace) %{_sysconfdir}/acpi/events/sleepconf -%config(noreplace) %{_sysconfdir}/acpi/actions/sleep.sh -%{python3_sitelib}/ec2_hibinit_agent-*.egg-info/ -%dir %{_sharedstatedir}/hibinit-agent -%ghost %attr(0600,root,root) %{_sharedstatedir}/hibinit-agent/hibernation-enabled - -%dir %{_prefix}/lib/systemd/logind.conf.d -%dir %{_prefix}/lib/systemd/system-sleep - -%dir %{_sysconfdir}/tuned/nothp_profile -%config(noreplace) %{_sysconfdir}/tuned/nothp_profile/tuned.conf - -%{_prefix}/lib/systemd/system-sleep/sleep-handler.sh -%{_prefix}/lib/systemd/logind.conf.d/00-hibinit-agent.conf -%attr(0644,root,root) %{_datadir}/selinux/packages/*.pp.bz2 - -%pre -%selinux_relabel_pre -s %{selinuxtype} - -%post -%systemd_post hibinit-agent.service - -# -# Install all modules in a single transaction -# -%_format MODULES %{_datadir}/selinux/packages/$x.pp.bz2 -%selinux_modules_install -s %{selinuxtype} $MODULES - -# -# Disable THP by switching to nothp_profile profile -# -tuned-adm profile nothp_profile - - -%preun -%systemd_preun hibinit-agent.service - - -%postun -%systemd_postun_with_restart hibinit-agent.service - -# -# Enable THP -# -tuned-adm profile virtual-guest - -# https://fedoraproject.org/wiki/SELinux/IndependentPolicy -if [ $1 -eq 0 ]; then - %selinux_modules_uninstall -s %{selinuxtype} $MODULES -fi - - -%posttrans -%selinux_relabel_post -s %{selinuxtype} - -%changelog -* Tue Nov 03 2020 Mohamed Aboubakr - 1.0.3-3 -- Moving selinux folder in packaging directory. -- Use make file to generate .pp.bz2 file - -* Fri Oct 02 2020 David Duncan - 1.0.3-2 -- Modify Spec for build requirements - -* Thu Aug 13 2020 Mohamed Aboubakr - 1.0.3-1 -- Support Redhat and Fedora by adding sepolicy -- Ignore handle hibernation in systemd configuration - -* Fri Jan 24 2020 Frederick Lefebvre - 1.0.1-2 -- Restart the hibinit-agent service on upgrade - -* Thu Jan 23 2020 Frederick Lefebvre - 1.0.1-1 -- Added IMDSv2 support -- Renamed spec file to match the actual package name - -* Fri Jun 14 2019 Anchal Agarwal - 1.0.0-4 -- Added hibernation re-try logic in case of hibernation failure - -* Wed Nov 07 2018 Matt Dees - 1.0.0-2 -- Clean up hibernation configured check - -* Wed Oct 31 2018 Anchal Agarwal - 1.0.0-1 -- Initial build diff --git a/sources b/sources deleted file mode 100644 index fdd6506..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -SHA512 (ec2-hibinit-agent-1.0.3.tar.gz) = 5a44fdde6cb95c6a989f47b6b69d8611a114e02dbc44ea2421587662b75d6dd9b7e922cc4cf8976d76ed78e3c1bcd3a1e12254e90d31d5c3cf3357b49abd1236 From 6a90344d05311a4cb9a13b3931e6bad66b2f8937 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Wed, 15 Jun 2022 18:15:34 +0200 Subject: [PATCH 12/32] Rebuilt for Python 3.11 --- ec2-hibinit-agent.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ec2-hibinit-agent.spec b/ec2-hibinit-agent.spec index 304f717..bf9b851 100644 --- a/ec2-hibinit-agent.spec +++ b/ec2-hibinit-agent.spec @@ -12,7 +12,7 @@ Name: ec2-hibinit-agent Version: 1.0.4 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Hibernation setup utility for Amazon EC2 License: ASL 2.0 @@ -141,6 +141,9 @@ fi %selinux_relabel_post -s %{selinuxtype} %changelog +* Wed Jun 15 2022 Python Maint - 1.0.4-4 +- Rebuilt for Python 3.11 + * Thu Jan 20 2022 Fedora Release Engineering - 1.0.4-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From 2ac0452c81f1065bccaf5493e0b982a3ea351c5a Mon Sep 17 00:00:00 2001 From: Lumir Balhar Date: Tue, 21 Jun 2022 12:47:35 +0200 Subject: [PATCH 13/32] Fix compatibility with newer setuptools --- ec2-hibinit-agent.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ec2-hibinit-agent.spec b/ec2-hibinit-agent.spec index bf9b851..2720873 100644 --- a/ec2-hibinit-agent.spec +++ b/ec2-hibinit-agent.spec @@ -12,7 +12,7 @@ Name: ec2-hibinit-agent Version: 1.0.4 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Hibernation setup utility for Amazon EC2 License: ASL 2.0 @@ -39,6 +39,9 @@ An EC2 agent that creates a setup for instance hibernation %prep %autosetup -n %{project}-%{version} +# Fix build with setuptools 62.1 +# https://github.com/aws/amazon-ec2-hibinit-agent/issues/24 +sed -i "20i packages=[]," setup.py %build %py3_build @@ -141,6 +144,9 @@ fi %selinux_relabel_post -s %{selinuxtype} %changelog +* Tue Jun 21 2022 Lumír Balhar - 1.0.4-5 +- Fix compatibility with newer setuptools + * Wed Jun 15 2022 Python Maint - 1.0.4-4 - Rebuilt for Python 3.11 From 94af61e75ec2a1a33b14de0fdac60ee1c6e267f8 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 21 Jul 2022 01:34:29 +0000 Subject: [PATCH 14/32] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ec2-hibinit-agent.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ec2-hibinit-agent.spec b/ec2-hibinit-agent.spec index 2720873..90c3b7b 100644 --- a/ec2-hibinit-agent.spec +++ b/ec2-hibinit-agent.spec @@ -12,7 +12,7 @@ Name: ec2-hibinit-agent Version: 1.0.4 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Hibernation setup utility for Amazon EC2 License: ASL 2.0 @@ -144,6 +144,9 @@ fi %selinux_relabel_post -s %{selinuxtype} %changelog +* Thu Jul 21 2022 Fedora Release Engineering - 1.0.4-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Tue Jun 21 2022 Lumír Balhar - 1.0.4-5 - Fix compatibility with newer setuptools From 3fee0c6dd897a02cffb97fa4edfa1775593e5c76 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 19 Jan 2023 02:03:29 +0000 Subject: [PATCH 15/32] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ec2-hibinit-agent.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ec2-hibinit-agent.spec b/ec2-hibinit-agent.spec index 90c3b7b..f575ebb 100644 --- a/ec2-hibinit-agent.spec +++ b/ec2-hibinit-agent.spec @@ -12,7 +12,7 @@ Name: ec2-hibinit-agent Version: 1.0.4 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Hibernation setup utility for Amazon EC2 License: ASL 2.0 @@ -144,6 +144,9 @@ fi %selinux_relabel_post -s %{selinuxtype} %changelog +* Thu Jan 19 2023 Fedora Release Engineering - 1.0.4-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Thu Jul 21 2022 Fedora Release Engineering - 1.0.4-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 1aecb6782a35620081fd45d27d0ecb85b4ff6198 Mon Sep 17 00:00:00 2001 From: David Duncan Date: Tue, 25 Apr 2023 00:50:25 -0500 Subject: [PATCH 16/32] bump: update package to 1.0.5 version of the agent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Description of changes: With recent versions of systemd, if your system has an additional or multiple swapfiles configured, then swapon adds a swapfile to the system with the next lowest priority. The issue with this is, the system will hibernate to the swapfile with the highest priority. In this case, /swapfile is -2, the highest of any of the swapfiles. Hibernation will fail, due to only /swap-hibinit being correctly set up on the kernel command line with resume= and resume_offset=. The result is that the EC2 console says "Stopping" for 20 minutes, and then force stops the instance at the 20 minute timeout. Fix this by ensuring we swapon the hibinit swapfile with the highest priority, 32767, which will be higher than any manually created swapfiles. # The commit type can include the following: #: feat – a new feature is introduced with the changes #: fix – a bug fix has occurred #: chore – changes that do not relate to a fix or feature and don't modify src or test files (for example updating dependencies) #: refactor – refactored code that neither fixes a bug nor adds a feature #: docs – updates to documentation such as a the README or other markdown files #: style – changes that do not affect the meaning of the code, likely related to code formatting such as white-space, missing semi-colons, and so on. #: test – including new or correcting previous tests #: perf – performance improvements #: ci – continuous integration related #: build – changes that affect the build system or external dependencies #: revert – reverts a previous commit --- .gitignore | 3 +++ ec2-hibinit-agent.spec | 7 +++++-- sources | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index be8c07a..d1d0df8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ /ec2-hibinit-agent-1.0.3.tar.gz /ec2-hibinit-agent-1.0.4.tar.gz +*.~undo-tree~ +amazon-ec2-hibinit-agent.spec +/ec2-hibinit-agent-1.0.5.tar.gz diff --git a/ec2-hibinit-agent.spec b/ec2-hibinit-agent.spec index f575ebb..1bf5071 100644 --- a/ec2-hibinit-agent.spec +++ b/ec2-hibinit-agent.spec @@ -11,8 +11,8 @@ %global _format() export %1=""; for x in %{modulenames}; do %1+=%2; %1+=" "; done; Name: ec2-hibinit-agent -Version: 1.0.4 -Release: 7%{?dist} +Version: 1.0.5 +Release: 1%{?dist} Summary: Hibernation setup utility for Amazon EC2 License: ASL 2.0 @@ -144,6 +144,9 @@ fi %selinux_relabel_post -s %{selinuxtype} %changelog +* Tue Apr 25 2023 David Duncan <> - 1.0.5-1 +- Ensure we swapon the hibinit swapfile with the highest priority + * Thu Jan 19 2023 Fedora Release Engineering - 1.0.4-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild diff --git a/sources b/sources index 6141781..60c6846 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ec2-hibinit-agent-1.0.4.tar.gz) = a0d857ef7bd561e61dcbf7597261451907af24123a6c7b0048e6fbcafea2456dfe4f5436162e8b0912bc720a60370c3f85b15024d1a71dcd1995758d49565d34 +SHA512 (ec2-hibinit-agent-1.0.5.tar.gz) = e6201d006fc18a6fab06bd4026333b7e5310511560ff237e724262a12d60f73f507bf314d224059d314705899aaf3c4d10226dbce776e797c03ee4b0ab819982 From d6db7d683deb1b1ed75593f225030fc6b80f61e9 Mon Sep 17 00:00:00 2001 From: David Duncan Date: Tue, 25 Apr 2023 01:04:20 -0500 Subject: [PATCH 17/32] 1.0.5 From fa6acbbc3f70e56bdd9be7dab5d86d4b845b5fcd Mon Sep 17 00:00:00 2001 From: Python Maint Date: Wed, 14 Jun 2023 23:08:00 +0200 Subject: [PATCH 18/32] Rebuilt for Python 3.12 --- ec2-hibinit-agent.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ec2-hibinit-agent.spec b/ec2-hibinit-agent.spec index 1bf5071..743c3d6 100644 --- a/ec2-hibinit-agent.spec +++ b/ec2-hibinit-agent.spec @@ -12,7 +12,7 @@ Name: ec2-hibinit-agent Version: 1.0.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Hibernation setup utility for Amazon EC2 License: ASL 2.0 @@ -144,6 +144,9 @@ fi %selinux_relabel_post -s %{selinuxtype} %changelog +* Wed Jun 14 2023 Python Maint - 1.0.5-2 +- Rebuilt for Python 3.12 + * Tue Apr 25 2023 David Duncan <> - 1.0.5-1 - Ensure we swapon the hibinit swapfile with the highest priority From 3c56a0a305aa7d5cbc001ae7484186ed1b66aa27 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 19 Jul 2023 18:10:50 +0000 Subject: [PATCH 19/32] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ec2-hibinit-agent.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ec2-hibinit-agent.spec b/ec2-hibinit-agent.spec index 743c3d6..5061a8d 100644 --- a/ec2-hibinit-agent.spec +++ b/ec2-hibinit-agent.spec @@ -12,7 +12,7 @@ Name: ec2-hibinit-agent Version: 1.0.5 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Hibernation setup utility for Amazon EC2 License: ASL 2.0 @@ -144,6 +144,9 @@ fi %selinux_relabel_post -s %{selinuxtype} %changelog +* Wed Jul 19 2023 Fedora Release Engineering - 1.0.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Wed Jun 14 2023 Python Maint - 1.0.5-2 - Rebuilt for Python 3.12 From 2f29b08b0940ff4b3bf74a33b4e9506487f6bdfa Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jan 2024 17:48:58 +0000 Subject: [PATCH 20/32] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- ec2-hibinit-agent.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ec2-hibinit-agent.spec b/ec2-hibinit-agent.spec index 5061a8d..fb9d042 100644 --- a/ec2-hibinit-agent.spec +++ b/ec2-hibinit-agent.spec @@ -12,7 +12,7 @@ Name: ec2-hibinit-agent Version: 1.0.5 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Hibernation setup utility for Amazon EC2 License: ASL 2.0 @@ -144,6 +144,9 @@ fi %selinux_relabel_post -s %{selinuxtype} %changelog +* Fri Jan 19 2024 Fedora Release Engineering - 1.0.5-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Wed Jul 19 2023 Fedora Release Engineering - 1.0.5-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From 0bbca160b0b2f89434853813dea9c58b89d81035 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 24 Jan 2024 10:05:40 +0000 Subject: [PATCH 21/32] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- ec2-hibinit-agent.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ec2-hibinit-agent.spec b/ec2-hibinit-agent.spec index fb9d042..60b3273 100644 --- a/ec2-hibinit-agent.spec +++ b/ec2-hibinit-agent.spec @@ -12,7 +12,7 @@ Name: ec2-hibinit-agent Version: 1.0.5 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Hibernation setup utility for Amazon EC2 License: ASL 2.0 @@ -144,6 +144,9 @@ fi %selinux_relabel_post -s %{selinuxtype} %changelog +* Wed Jan 24 2024 Fedora Release Engineering - 1.0.5-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Fri Jan 19 2024 Fedora Release Engineering - 1.0.5-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From ff1a7e438682d94f1af4c036e2340b867a8d02d9 Mon Sep 17 00:00:00 2001 From: Dominik Wombacher Date: Mon, 8 Apr 2024 09:42:45 +0000 Subject: [PATCH 22/32] feat: Update to 1.0.8 and migrated to SPDX v1.0.8, Graceful Termination Improvements - Critical termination protection v1.0.7, Btrfs Support for hibernation - Change message when removing SWAP - Adding btrfs-enabled to set No_COW and get offset using btrfs v1.0.6 - Add initial Amazon Linux 2022 support - Add pm-utils for required package - Recreating the swap file if the current size is sufficiently larger - Update /sys/power/resume_offset and /sys/power/resume only if present --- .gitignore | 1 + ec2-hibinit-agent.spec | 10 +++++++--- sources | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index d1d0df8..d940b6e 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ *.~undo-tree~ amazon-ec2-hibinit-agent.spec /ec2-hibinit-agent-1.0.5.tar.gz +/ec2-hibinit-agent-1.0.8.tar.gz diff --git a/ec2-hibinit-agent.spec b/ec2-hibinit-agent.spec index 60b3273..99417cc 100644 --- a/ec2-hibinit-agent.spec +++ b/ec2-hibinit-agent.spec @@ -11,11 +11,11 @@ %global _format() export %1=""; for x in %{modulenames}; do %1+=%2; %1+=" "; done; Name: ec2-hibinit-agent -Version: 1.0.5 -Release: 5%{?dist} +Version: 1.0.8 +Release: 1%{?dist} Summary: Hibernation setup utility for Amazon EC2 -License: ASL 2.0 +License: Apache-2.0 URL: https://github.com/aws/amazon-%{name} Source0: https://github.com/aws/%{project}/archive/v%{version}/%{name}-%{version}.tar.gz @@ -144,6 +144,10 @@ fi %selinux_relabel_post -s %{selinuxtype} %changelog +* Mon Apr 8 2024 Dominik Wombacher - 1.0.8-1 +- Update to 1.0.8 +- migrated to SPDX license + * Wed Jan 24 2024 Fedora Release Engineering - 1.0.5-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild diff --git a/sources b/sources index 60c6846..e0c7e00 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ec2-hibinit-agent-1.0.5.tar.gz) = e6201d006fc18a6fab06bd4026333b7e5310511560ff237e724262a12d60f73f507bf314d224059d314705899aaf3c4d10226dbce776e797c03ee4b0ab819982 +SHA512 (ec2-hibinit-agent-1.0.8.tar.gz) = a0ea22a268a236eea9a2a510ce393c8933600984bd7b1c532ebbebccaefe26ec84b6288f9822aa32a64056f6c4f5445e332f5d5864b4b6668713a60ec7d42f51 From f2bc9f24ee9398d1adab307a2293065b716c3b49 Mon Sep 17 00:00:00 2001 From: Dominik Wombacher Date: Mon, 6 May 2024 12:34:01 +0000 Subject: [PATCH 23/32] feat: Packit onboarding --- .packit.yaml | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .packit.yaml diff --git a/.packit.yaml b/.packit.yaml new file mode 100644 index 0000000..1046338 --- /dev/null +++ b/.packit.yaml @@ -0,0 +1,41 @@ +# See the documentation for more information: +# https://packit.dev/docs/configuration/ + +upstream_project_url: https://github.com/aws/amazon-ec2-hibinit-agent +upstream_package_name: amazon-ec2-hibinit-agent +downstream_package_name: ec2-hibinit-agent + +jobs: + - job: pull_from_upstream + trigger: release + # Keeping dist-git branches non-divergent + # Requirs manual local merge from rawhide to stable release branches + # https://packit.dev/docs/fedora-releases-guide#keeping-dist-git-branches-non-divergent + dist_git_branches: + - fedora-rawhide + + - job: koji_build + trigger: commit + allowed_pr_authors: + - packit + - all_admins + - all_committers + - '@cloud-sig' # string with @ needs quotes to be valid yaml + allowed_committers: + - all_admins + - all_committers + - '@cloud-sig' # string with @ needs quotes to be valid yaml + dist_git_branches: + - fedora-all + - epel-all + + - job: bodhi_update + trigger: commit + allowed_builders: + - packit + - all_admins + - all_committers + - '@cloud-sig' # string with @ needs quotes to be valid yaml + dist_git_branches: + - fedora-branched # rawhide updates are created automatically + - epel-all From 32c76d1f5c7be63306a1de8dfdf5d24cbc6cc39c Mon Sep 17 00:00:00 2001 From: Dominik Wombacher Date: Sun, 2 Jun 2024 10:03:10 +0000 Subject: [PATCH 24/32] fix(Packit): Set 'upstream_tag_template' because of 'ERROR Cannot checkout release tag.' in latest Packit Job. --- .packit.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.packit.yaml b/.packit.yaml index 1046338..6dfe3a6 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -2,6 +2,7 @@ # https://packit.dev/docs/configuration/ upstream_project_url: https://github.com/aws/amazon-ec2-hibinit-agent +upstream_tag_template: v{version} upstream_package_name: amazon-ec2-hibinit-agent downstream_package_name: ec2-hibinit-agent From c6fb8d2397fa395f54541e6055ac618b1b9f3928 Mon Sep 17 00:00:00 2001 From: Packit Date: Sun, 2 Jun 2024 10:04:57 +0000 Subject: [PATCH 25/32] Update to 1.0.9 upstream release Upstream tag: v1.0.9 Upstream commit: 527a5f69 Commit authored by Packit automation (https://packit.dev/) --- .gitignore | 1 + README.packit | 3 +++ ec2-hibinit-agent.spec | 5 ++++- sources | 2 +- 4 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 README.packit diff --git a/.gitignore b/.gitignore index d940b6e..0b85970 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ amazon-ec2-hibinit-agent.spec /ec2-hibinit-agent-1.0.5.tar.gz /ec2-hibinit-agent-1.0.8.tar.gz +/ec2-hibinit-agent-1.0.9.tar.gz diff --git a/README.packit b/README.packit new file mode 100644 index 0000000..2fa216c --- /dev/null +++ b/README.packit @@ -0,0 +1,3 @@ +This repository is maintained by packit. +https://packit.dev/ +The file was generated using packit 0.97.1.post1.dev4+g1268842e. diff --git a/ec2-hibinit-agent.spec b/ec2-hibinit-agent.spec index 99417cc..bcb529e 100644 --- a/ec2-hibinit-agent.spec +++ b/ec2-hibinit-agent.spec @@ -11,7 +11,7 @@ %global _format() export %1=""; for x in %{modulenames}; do %1+=%2; %1+=" "; done; Name: ec2-hibinit-agent -Version: 1.0.8 +Version: 1.0.9 Release: 1%{?dist} Summary: Hibernation setup utility for Amazon EC2 @@ -144,6 +144,9 @@ fi %selinux_relabel_post -s %{selinuxtype} %changelog +* Sun Jun 02 2024 Packit - 1.0.9-1 +- Update to version 1.0.9 + * Mon Apr 8 2024 Dominik Wombacher - 1.0.8-1 - Update to 1.0.8 - migrated to SPDX license diff --git a/sources b/sources index e0c7e00..607710a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ec2-hibinit-agent-1.0.8.tar.gz) = a0ea22a268a236eea9a2a510ce393c8933600984bd7b1c532ebbebccaefe26ec84b6288f9822aa32a64056f6c4f5445e332f5d5864b4b6668713a60ec7d42f51 +SHA512 (ec2-hibinit-agent-1.0.9.tar.gz) = a056f3cf19775f1dca2079bf810d3a73cb0ddd4ad9de585e5878b5061683fc271577c02cf85a4332510f9e958bc84180a0a559a2f3f5de6c215002336b31f155 From fbeb0c13bf1dc61aa20f02ed0e3f814645dafe57 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 7 Jun 2024 18:57:16 +0200 Subject: [PATCH 26/32] Rebuilt for Python 3.13 --- ec2-hibinit-agent.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ec2-hibinit-agent.spec b/ec2-hibinit-agent.spec index bcb529e..ddb1ee1 100644 --- a/ec2-hibinit-agent.spec +++ b/ec2-hibinit-agent.spec @@ -12,7 +12,7 @@ Name: ec2-hibinit-agent Version: 1.0.9 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Hibernation setup utility for Amazon EC2 License: Apache-2.0 @@ -144,6 +144,9 @@ fi %selinux_relabel_post -s %{selinuxtype} %changelog +* Fri Jun 07 2024 Python Maint - 1.0.9-2 +- Rebuilt for Python 3.13 + * Sun Jun 02 2024 Packit - 1.0.9-1 - Update to version 1.0.9 From de7514a8ee9998cd234ffce47d90c6b7b0ff7808 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 17 Jul 2024 21:40:34 +0000 Subject: [PATCH 27/32] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- ec2-hibinit-agent.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ec2-hibinit-agent.spec b/ec2-hibinit-agent.spec index ddb1ee1..026f627 100644 --- a/ec2-hibinit-agent.spec +++ b/ec2-hibinit-agent.spec @@ -12,7 +12,7 @@ Name: ec2-hibinit-agent Version: 1.0.9 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Hibernation setup utility for Amazon EC2 License: Apache-2.0 @@ -144,6 +144,9 @@ fi %selinux_relabel_post -s %{selinuxtype} %changelog +* Wed Jul 17 2024 Fedora Release Engineering - 1.0.9-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Fri Jun 07 2024 Python Maint - 1.0.9-2 - Rebuilt for Python 3.13 From c8eb6a5d671336d2d6c13e7040ccf045e2d93e95 Mon Sep 17 00:00:00 2001 From: Dominik Wombacher Date: Fri, 8 Nov 2024 09:22:19 +0000 Subject: [PATCH 28/32] fix: Ensure swapon with maximum priority before hibernation Refs: https://github.com/aws/amazon-ec2-hibinit-agent/pull/49 Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2322884 --- ...-maximum-priority-before-hibernation.patch | 54 +++++++++++++++++++ ec2-hibinit-agent.spec | 12 ++++- 2 files changed, 64 insertions(+), 2 deletions(-) create mode 100644 0001-swapon-with-maximum-priority-before-hibernation.patch diff --git a/0001-swapon-with-maximum-priority-before-hibernation.patch b/0001-swapon-with-maximum-priority-before-hibernation.patch new file mode 100644 index 0000000..cba7e2f --- /dev/null +++ b/0001-swapon-with-maximum-priority-before-hibernation.patch @@ -0,0 +1,54 @@ +From f75434659a731ebdfc259990eb37777700900ea2 Mon Sep 17 00:00:00 2001 +From: Dominik Wombacher +Date: Thu, 7 Nov 2024 15:27:03 +0000 +Subject: [PATCH 1/1] fix(rhel): Swapon with maximum priority before + hibernation + +Apply swapon high priority related changes from /acpid.sleep.sh to /packaging/rhel/acpid.sleep.sh + +Refs: https://github.com/aws/amazon-ec2-hibinit-agent/commit/a2303d269610a6e7415c5045766da605eaa7e30f +--- + packaging/rhel/acpid.sleep.sh | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +diff --git a/packaging/rhel/acpid.sleep.sh b/packaging/rhel/acpid.sleep.sh +index ca3db22..9b381f9 100755 +--- a/packaging/rhel/acpid.sleep.sh ++++ b/packaging/rhel/acpid.sleep.sh +@@ -3,11 +3,14 @@ + PATH=/sbin:/bin:/usr/bin + failed='false' + ++# Hibernation selects the swapfile with highest priority. Since there may be ++# other swapfiles configured, ensure /swap is selected as hibernation ++# target by setting to maximum priority. ++swap_priority=32767 ++ + hibernate() + { +- swapon /swap +- systemctl hibernate +- ++ swapon --priority=$swap_priority /swap && systemctl hibernate + if [ $? -ne 0 ] + then + logger "Hibernation failed, Sleeping 2 mins before retry" +@@ -15,6 +18,7 @@ hibernate() + else + failed='false' + fi ++ swapoff /swap + } + + case "$2" in +@@ -26,6 +30,7 @@ case "$2" in + hibernate + if [ $failed == 'true' ]; + then ++ swapoff /swap + sleep 2m + else + break +-- +2.47.0 + diff --git a/ec2-hibinit-agent.spec b/ec2-hibinit-agent.spec index 026f627..876af8e 100644 --- a/ec2-hibinit-agent.spec +++ b/ec2-hibinit-agent.spec @@ -12,13 +12,17 @@ Name: ec2-hibinit-agent Version: 1.0.9 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Hibernation setup utility for Amazon EC2 License: Apache-2.0 URL: https://github.com/aws/amazon-%{name} Source0: https://github.com/aws/%{project}/archive/v%{version}/%{name}-%{version}.tar.gz +# Ensure swapon with maximum priority before hibernation +# Upstream Patch: https://github.com/aws/amazon-ec2-hibinit-agent/pull/49) +Patch1: 0001-swapon-with-maximum-priority-before-hibernation.patch + BuildArch: noarch BuildRequires: make @@ -38,7 +42,7 @@ Requires: tuned An EC2 agent that creates a setup for instance hibernation %prep -%autosetup -n %{project}-%{version} +%autosetup -p1 -n %{project}-%{version} # Fix build with setuptools 62.1 # https://github.com/aws/amazon-ec2-hibinit-agent/issues/24 sed -i "20i packages=[]," setup.py @@ -144,6 +148,10 @@ fi %selinux_relabel_post -s %{selinuxtype} %changelog +* Fri Nov 08 2024 Dominik Wombacher - 1.0.9-4 +- Include upstream Patch to ensure swapon with maximum priority before hibernation +- Resolves rhbz#2322884 + * Wed Jul 17 2024 Fedora Release Engineering - 1.0.9-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 8faa7d0264ce6952a00903dfc306885e80dfdeac Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 16 Jan 2025 16:35:05 +0000 Subject: [PATCH 29/32] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- ec2-hibinit-agent.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ec2-hibinit-agent.spec b/ec2-hibinit-agent.spec index 876af8e..fd95562 100644 --- a/ec2-hibinit-agent.spec +++ b/ec2-hibinit-agent.spec @@ -12,7 +12,7 @@ Name: ec2-hibinit-agent Version: 1.0.9 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Hibernation setup utility for Amazon EC2 License: Apache-2.0 @@ -148,6 +148,9 @@ fi %selinux_relabel_post -s %{selinuxtype} %changelog +* Thu Jan 16 2025 Fedora Release Engineering - 1.0.9-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Fri Nov 08 2024 Dominik Wombacher - 1.0.9-4 - Include upstream Patch to ensure swapon with maximum priority before hibernation - Resolves rhbz#2322884 From 8d3ba6125a5bda8200a5569cd5267a901d90b74e Mon Sep 17 00:00:00 2001 From: Frank Liang Date: Tue, 18 Mar 2025 09:37:33 +0800 Subject: [PATCH 30/32] fix swapoff breaks hibernate process Refs: https://github.com/aws/amazon-ec2-hibinit-agent/pull/50 Signed-off-by: Frank Liang (cherry picked from commit 2ebeb61bbb6573874a24df7568d2f4c70c6e376a) --- ...fix-swapoff-breaks-hibernate-process.patch | 59 +++++++++++++++++++ ec2-hibinit-agent.spec | 6 +- 2 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 0002-rhel-fix-swapoff-breaks-hibernate-process.patch diff --git a/0002-rhel-fix-swapoff-breaks-hibernate-process.patch b/0002-rhel-fix-swapoff-breaks-hibernate-process.patch new file mode 100644 index 0000000..06c042e --- /dev/null +++ b/0002-rhel-fix-swapoff-breaks-hibernate-process.patch @@ -0,0 +1,59 @@ +From 0197c7173a5ad1470060862a0be96b9a976bdf49 Mon Sep 17 00:00:00 2001 +From: Frank Liang +Date: Thu, 2 Jan 2025 22:28:12 +0800 +Subject: [PATCH] rhel: fix swapoff breaks hibernate process + +hibernate() always calling swapoff breaks hibernation process. +The hibernation wont continue if call swapoff too fast in rhel or amazon +linux. + +"swapon --priority=32767 /swap && systemctl hibernate ;echo $?; swapoff /swap" + +Signed-off-by: Frank Liang +--- + packaging/rhel/acpid.sleep.sh | 17 ++++++----------- + 1 file changed, 6 insertions(+), 11 deletions(-) + +diff --git a/packaging/rhel/acpid.sleep.sh b/packaging/rhel/acpid.sleep.sh +index 9b381f9..1e55b51 100755 +--- a/packaging/rhel/acpid.sleep.sh ++++ b/packaging/rhel/acpid.sleep.sh +@@ -11,29 +11,24 @@ swap_priority=32767 + hibernate() + { + swapon --priority=$swap_priority /swap && systemctl hibernate +- if [ $? -ne 0 ] +- then ++ if [ $? -ne 0 ]; then + logger "Hibernation failed, Sleeping 2 mins before retry" + failed='true' ++ swapoff /swap ++ sleep 2m + else + failed='false' + fi +- swapoff /swap + } + + case "$2" in + SBTN) + # The iteration had been placed here to add retry logic to hibernation + # in case of failures and to avoid force stop of instances after 20min +- for i in 1 2 3 +- do ++ for i in 1 2 3; do + hibernate +- if [ $failed == 'true' ]; +- then +- swapoff /swap +- sleep 2m +- else +- break ++ if [ $failed == 'false' ]; then ++ break + fi + done + ;; +-- +2.48.1 + diff --git a/ec2-hibinit-agent.spec b/ec2-hibinit-agent.spec index fd95562..1d38962 100644 --- a/ec2-hibinit-agent.spec +++ b/ec2-hibinit-agent.spec @@ -12,7 +12,7 @@ Name: ec2-hibinit-agent Version: 1.0.9 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Hibernation setup utility for Amazon EC2 License: Apache-2.0 @@ -22,6 +22,7 @@ Source0: https://github.com/aws/%{project}/archive/v%{version}/%{name}-%{ # Ensure swapon with maximum priority before hibernation # Upstream Patch: https://github.com/aws/amazon-ec2-hibinit-agent/pull/49) Patch1: 0001-swapon-with-maximum-priority-before-hibernation.patch +Patch2: 0002-rhel-fix-swapoff-breaks-hibernate-process.patch BuildArch: noarch @@ -148,6 +149,9 @@ fi %selinux_relabel_post -s %{selinuxtype} %changelog +* Tue Mar 18 2025 Frank Liang - 1.0.9-6 +- Include upstream Patch to fix swapoff breaks hibernate process + * Thu Jan 16 2025 Fedora Release Engineering - 1.0.9-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From b01e3c9b651437ade275ad10e81506c5f4c6e195 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Tue, 3 Jun 2025 12:20:16 +0200 Subject: [PATCH 31/32] Rebuilt for Python 3.14 --- ec2-hibinit-agent.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ec2-hibinit-agent.spec b/ec2-hibinit-agent.spec index 1d38962..c26867c 100644 --- a/ec2-hibinit-agent.spec +++ b/ec2-hibinit-agent.spec @@ -12,7 +12,7 @@ Name: ec2-hibinit-agent Version: 1.0.9 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Hibernation setup utility for Amazon EC2 License: Apache-2.0 @@ -149,6 +149,9 @@ fi %selinux_relabel_post -s %{selinuxtype} %changelog +* Tue Jun 03 2025 Python Maint - 1.0.9-7 +- Rebuilt for Python 3.14 + * Tue Mar 18 2025 Frank Liang - 1.0.9-6 - Include upstream Patch to fix swapoff breaks hibernate process From 907cf67e48e5e8841e253f02bd71556fd8680e75 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 23 Jul 2025 19:41:21 +0000 Subject: [PATCH 32/32] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- ec2-hibinit-agent.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ec2-hibinit-agent.spec b/ec2-hibinit-agent.spec index c26867c..9defa5e 100644 --- a/ec2-hibinit-agent.spec +++ b/ec2-hibinit-agent.spec @@ -12,7 +12,7 @@ Name: ec2-hibinit-agent Version: 1.0.9 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Hibernation setup utility for Amazon EC2 License: Apache-2.0 @@ -149,6 +149,9 @@ fi %selinux_relabel_post -s %{selinuxtype} %changelog +* Wed Jul 23 2025 Fedora Release Engineering - 1.0.9-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Tue Jun 03 2025 Python Maint - 1.0.9-7 - Rebuilt for Python 3.14