From 41f10130282ab52e86c6787708b06cfbfd7ef707 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 29 Jul 2020 11:18:17 +0000 Subject: [PATCH 01/19] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- spindown.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spindown.spec b/spindown.spec index a6932a1..30a2aa0 100644 --- a/spindown.spec +++ b/spindown.spec @@ -1,7 +1,7 @@ Summary: Daemon that can spin idle disks down Name: spindown Version: 0.4.0 -Release: 27%{?dist} +Release: 28%{?dist} License: GPLv3+ Url: http://code.google.com/p/spindown Source0: http://spindown.googlecode.com/files/spindown-%{version}.tar.gz @@ -59,6 +59,9 @@ install -p -m 755 spindown.service $RPM_BUILD_ROOT/%{_unitdir}/spindown.service %config(noreplace) %{_sysconfdir}/spindown.conf %changelog +* Wed Jul 29 2020 Fedora Release Engineering - 0.4.0-28 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Fri Jan 31 2020 Fedora Release Engineering - 0.4.0-27 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild From 569bc7ead0f9f1220e5ab94f25e60dda67cbebea Mon Sep 17 00:00:00 2001 From: Martin Cermak Date: Fri, 27 Nov 2020 12:13:51 +0100 Subject: [PATCH 02/19] NVR Bump and rebuild for CI gating updates --- .fmf/version | 1 + gating.yaml | 13 ++++++++ plans/ci.fmf | 6 ++++ spindown.spec | 5 ++- tests/Sanity/basic/main.fmf | 15 +++++++++ tests/Sanity/basic/runtest.sh | 58 +++++++++++++++++++++++++++++++++++ 6 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 .fmf/version create mode 100644 gating.yaml create mode 100644 plans/ci.fmf create mode 100644 tests/Sanity/basic/main.fmf create mode 100755 tests/Sanity/basic/runtest.sh diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..4fab4ec --- /dev/null +++ b/gating.yaml @@ -0,0 +1,13 @@ +--- !Policy +product_versions: + - fedora-* +decision_context: bodhi_update_push_stable +subject_type: koji_build +rules: + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional} +--- !Policy +product_versions: + - rhel-9 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional} diff --git a/plans/ci.fmf b/plans/ci.fmf new file mode 100644 index 0000000..1ad2c12 --- /dev/null +++ b/plans/ci.fmf @@ -0,0 +1,6 @@ +summary: CI Gating Plan +discover: + how: fmf + directory: tests +execute: + how: beakerlib diff --git a/spindown.spec b/spindown.spec index 30a2aa0..885b739 100644 --- a/spindown.spec +++ b/spindown.spec @@ -1,7 +1,7 @@ Summary: Daemon that can spin idle disks down Name: spindown Version: 0.4.0 -Release: 28%{?dist} +Release: 29%{?dist} License: GPLv3+ Url: http://code.google.com/p/spindown Source0: http://spindown.googlecode.com/files/spindown-%{version}.tar.gz @@ -59,6 +59,9 @@ install -p -m 755 spindown.service $RPM_BUILD_ROOT/%{_unitdir}/spindown.service %config(noreplace) %{_sysconfdir}/spindown.conf %changelog +* Fri Nov 27 2020 Martin Cermak - 0.4.0-29 +- NVR Bump and rebuild for CI gating updates + * Wed Jul 29 2020 Fedora Release Engineering - 0.4.0-28 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/tests/Sanity/basic/main.fmf b/tests/Sanity/basic/main.fmf new file mode 100644 index 0000000..ffe00a5 --- /dev/null +++ b/tests/Sanity/basic/main.fmf @@ -0,0 +1,15 @@ +summary: a smoke test +description: '' +contact: +- Martin Cermak +component: +- spindown +test: ./runtest.sh +framework: beakerlib +recommend: +- spindown +- rpm-build +- make +duration: 48h +extra-summary: /tools/spindown/Sanity/basic +extra-task: /tools/spindown/Sanity/basic diff --git a/tests/Sanity/basic/runtest.sh b/tests/Sanity/basic/runtest.sh new file mode 100755 index 0000000..0bb0a92 --- /dev/null +++ b/tests/Sanity/basic/runtest.sh @@ -0,0 +1,58 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /tools/spindown/Sanity/basic +# Description: a smoke test +# Author: Martin Cermak +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2020 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="spindown" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlRun "TmpDir=$(mktemp -d)" + rlRun "pushd $TmpDir" + rlPhaseEnd + + rlPhaseStart FAIL "Smoke test" + rlRun "spindownd -h | fgrep 'spindownd is a daemon'" + rlPhaseEnd + + rlPhaseStart FAIL "Rebuild test" + # This is a Fedora CI infrastructure test basically. + # It is meant as a proof of concept for more complex + # glibc gating. + rlFetchSrcForInstalled spindown + rlRun "dnf builddep -y spindown*src.rpm" + rlRun "rpmbuild --rebuild spindown*src.rpm" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $TmpDir" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd From 039b670d39336cbf07c33a3c4d433e23e9e3421e Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Fri, 8 Jan 2021 21:51:42 +0000 Subject: [PATCH 03/19] Add BuildRequires: make https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot --- spindown.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/spindown.spec b/spindown.spec index 885b739..f29c9b9 100644 --- a/spindown.spec +++ b/spindown.spec @@ -15,6 +15,7 @@ Patch3: spindown-0.4.0-bz1037334.patch Requires(preun): systemd-units +BuildRequires: make BuildRequires: gcc-c++ BuildRequires: iniparser-devel BuildRequires: systemd-units From c14bfaec377555b0864331897c6d60e5099b2792 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 27 Jan 2021 20:53:47 +0000 Subject: [PATCH 04/19] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- spindown.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spindown.spec b/spindown.spec index f29c9b9..3786cd2 100644 --- a/spindown.spec +++ b/spindown.spec @@ -1,7 +1,7 @@ Summary: Daemon that can spin idle disks down Name: spindown Version: 0.4.0 -Release: 29%{?dist} +Release: 30%{?dist} License: GPLv3+ Url: http://code.google.com/p/spindown Source0: http://spindown.googlecode.com/files/spindown-%{version}.tar.gz @@ -60,6 +60,9 @@ install -p -m 755 spindown.service $RPM_BUILD_ROOT/%{_unitdir}/spindown.service %config(noreplace) %{_sysconfdir}/spindown.conf %changelog +* Wed Jan 27 2021 Fedora Release Engineering - 0.4.0-30 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Fri Nov 27 2020 Martin Cermak - 0.4.0-29 - NVR Bump and rebuild for CI gating updates From 21c34a5a59c88fd15ccfa5d55643a3f574a7dda1 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 23 Jul 2021 18:07:07 +0000 Subject: [PATCH 05/19] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- spindown.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spindown.spec b/spindown.spec index 3786cd2..a3b56c9 100644 --- a/spindown.spec +++ b/spindown.spec @@ -1,7 +1,7 @@ Summary: Daemon that can spin idle disks down Name: spindown Version: 0.4.0 -Release: 30%{?dist} +Release: 31%{?dist} License: GPLv3+ Url: http://code.google.com/p/spindown Source0: http://spindown.googlecode.com/files/spindown-%{version}.tar.gz @@ -60,6 +60,9 @@ install -p -m 755 spindown.service $RPM_BUILD_ROOT/%{_unitdir}/spindown.service %config(noreplace) %{_sysconfdir}/spindown.conf %changelog +* Fri Jul 23 2021 Fedora Release Engineering - 0.4.0-31 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Wed Jan 27 2021 Fedora Release Engineering - 0.4.0-30 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From c3f51cd1e065ef402d34b9118dd969bd7c37c6df Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jan 2022 01:29:11 +0000 Subject: [PATCH 06/19] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- spindown.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spindown.spec b/spindown.spec index a3b56c9..4ecccc6 100644 --- a/spindown.spec +++ b/spindown.spec @@ -1,7 +1,7 @@ Summary: Daemon that can spin idle disks down Name: spindown Version: 0.4.0 -Release: 31%{?dist} +Release: 32%{?dist} License: GPLv3+ Url: http://code.google.com/p/spindown Source0: http://spindown.googlecode.com/files/spindown-%{version}.tar.gz @@ -60,6 +60,9 @@ install -p -m 755 spindown.service $RPM_BUILD_ROOT/%{_unitdir}/spindown.service %config(noreplace) %{_sysconfdir}/spindown.conf %changelog +* Sat Jan 22 2022 Fedora Release Engineering - 0.4.0-32 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Fri Jul 23 2021 Fedora Release Engineering - 0.4.0-31 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From 2c7e4ed6986305533e7b6b1c65362c5c7a19d608 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 23 Jul 2022 09:14:13 +0000 Subject: [PATCH 07/19] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- spindown.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spindown.spec b/spindown.spec index 4ecccc6..10007e1 100644 --- a/spindown.spec +++ b/spindown.spec @@ -1,7 +1,7 @@ Summary: Daemon that can spin idle disks down Name: spindown Version: 0.4.0 -Release: 32%{?dist} +Release: 33%{?dist} License: GPLv3+ Url: http://code.google.com/p/spindown Source0: http://spindown.googlecode.com/files/spindown-%{version}.tar.gz @@ -60,6 +60,9 @@ install -p -m 755 spindown.service $RPM_BUILD_ROOT/%{_unitdir}/spindown.service %config(noreplace) %{_sysconfdir}/spindown.conf %changelog +* Sat Jul 23 2022 Fedora Release Engineering - 0.4.0-33 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Sat Jan 22 2022 Fedora Release Engineering - 0.4.0-32 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From 7a1aa23ffc81c1475c57eab47f7a489d77537f6a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 21 Jan 2023 03:52:31 +0000 Subject: [PATCH 08/19] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- spindown.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spindown.spec b/spindown.spec index 10007e1..2189007 100644 --- a/spindown.spec +++ b/spindown.spec @@ -1,7 +1,7 @@ Summary: Daemon that can spin idle disks down Name: spindown Version: 0.4.0 -Release: 33%{?dist} +Release: 34%{?dist} License: GPLv3+ Url: http://code.google.com/p/spindown Source0: http://spindown.googlecode.com/files/spindown-%{version}.tar.gz @@ -60,6 +60,9 @@ install -p -m 755 spindown.service $RPM_BUILD_ROOT/%{_unitdir}/spindown.service %config(noreplace) %{_sysconfdir}/spindown.conf %changelog +* Sat Jan 21 2023 Fedora Release Engineering - 0.4.0-34 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Sat Jul 23 2022 Fedora Release Engineering - 0.4.0-33 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From ec996b1c9ae693eae294264ff5afbefb94fb6ab6 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jul 2023 02:19:18 +0000 Subject: [PATCH 09/19] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- spindown.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spindown.spec b/spindown.spec index 2189007..05ec992 100644 --- a/spindown.spec +++ b/spindown.spec @@ -1,7 +1,7 @@ Summary: Daemon that can spin idle disks down Name: spindown Version: 0.4.0 -Release: 34%{?dist} +Release: 35%{?dist} License: GPLv3+ Url: http://code.google.com/p/spindown Source0: http://spindown.googlecode.com/files/spindown-%{version}.tar.gz @@ -60,6 +60,9 @@ install -p -m 755 spindown.service $RPM_BUILD_ROOT/%{_unitdir}/spindown.service %config(noreplace) %{_sysconfdir}/spindown.conf %changelog +* Sat Jul 22 2023 Fedora Release Engineering - 0.4.0-35 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Sat Jan 21 2023 Fedora Release Engineering - 0.4.0-34 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From ddc64c637ab99579a89dfca2d7dcfc53d001b0b8 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 27 Jan 2024 04:09:36 +0000 Subject: [PATCH 10/19] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- spindown.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spindown.spec b/spindown.spec index 05ec992..aee7060 100644 --- a/spindown.spec +++ b/spindown.spec @@ -1,7 +1,7 @@ Summary: Daemon that can spin idle disks down Name: spindown Version: 0.4.0 -Release: 35%{?dist} +Release: 36%{?dist} License: GPLv3+ Url: http://code.google.com/p/spindown Source0: http://spindown.googlecode.com/files/spindown-%{version}.tar.gz @@ -60,6 +60,9 @@ install -p -m 755 spindown.service $RPM_BUILD_ROOT/%{_unitdir}/spindown.service %config(noreplace) %{_sysconfdir}/spindown.conf %changelog +* Sat Jan 27 2024 Fedora Release Engineering - 0.4.0-36 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Sat Jul 22 2023 Fedora Release Engineering - 0.4.0-35 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From c79ef1b14df7737a7616d428e3587df6a8e536f5 Mon Sep 17 00:00:00 2001 From: Software Management Team Date: Thu, 30 May 2024 12:46:49 +0200 Subject: [PATCH 11/19] Eliminate use of obsolete %patchN syntax (#2283636) --- spindown.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spindown.spec b/spindown.spec index aee7060..f917e10 100644 --- a/spindown.spec +++ b/spindown.spec @@ -34,10 +34,10 @@ matter if the disk is swapped while the daemon is running. rm -rf src/ininiparser3.0b cp -pf %{SOURCE1} spindown.service cp -pf %{SOURCE2} 01spindown -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 +%patch -P0 -p1 +%patch -P1 -p1 +%patch -P2 -p1 +%patch -P3 -p1 %build make %{?_smp_mflags} OPT="$RPM_OPT_FLAGS" From e5af0cffc94a5a1fc6551a50ef078d2f6585e656 Mon Sep 17 00:00:00 2001 From: David Cantrell Date: Thu, 30 May 2024 15:17:46 -0400 Subject: [PATCH 12/19] Rebuild against latest iniparser Update spec file macro use Fix compile issues with latest gcc Signed-off-by: David Cantrell --- spindown-0.4.0-gcc-14.x.patch | 140 +++++++++++++++++++++++++++++++++ spindown-0.4.0-iniparser.patch | 61 +++++++------- spindown.spec | 41 +++++----- 3 files changed, 196 insertions(+), 46 deletions(-) create mode 100644 spindown-0.4.0-gcc-14.x.patch diff --git a/spindown-0.4.0-gcc-14.x.patch b/spindown-0.4.0-gcc-14.x.patch new file mode 100644 index 0000000..4e4da62 --- /dev/null +++ b/spindown-0.4.0-gcc-14.x.patch @@ -0,0 +1,140 @@ +diff -up spindown-0.4.0/src/disk.cpp.orig spindown-0.4.0/src/disk.cpp +--- spindown-0.4.0/src/disk.cpp.orig 2024-05-30 15:03:42.968395337 -0400 ++++ spindown-0.4.0/src/disk.cpp 2024-05-30 15:11:42.618736160 -0400 +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -138,7 +139,7 @@ void Disk::findDevName( string dev ) + //the path to the device + dev = DEVID_PATH + dev; + //read target of the link +- readlink( (char*)dev.data(), (char*)buffer.data(), CHAR_BUF); ++ (void) readlink( (char*)dev.data(), (char*)buffer.data(), CHAR_BUF); + //remove empty characters + buffer.resize( buffer.find_first_of((char)0) ); + //remove ../../ from the link target +@@ -165,6 +166,8 @@ bool Disk::spindown() + throw SpindownException( oss.str() ); + } + } ++ ++ return false; + } + + string Disk::getName() const +diff -up spindown-0.4.0/src/diskset.cpp.orig spindown-0.4.0/src/diskset.cpp +--- spindown-0.4.0/src/diskset.cpp.orig 2009-04-18 12:32:59.000000000 -0400 ++++ spindown-0.4.0/src/diskset.cpp 2024-05-30 15:03:55.457378169 -0400 +@@ -36,7 +36,7 @@ DiskSet::DiskSet(unsigned int sgTime) : + DiskSet::~DiskSet() + { + // remove all stored disks +- for( int i=0 ; i < this->size() ; i++ ) ++ for( long unsigned int i=0 ; i < this->size() ; i++ ) + { + Disk* disk = this->at(i); + +@@ -49,7 +49,7 @@ DiskSet::~DiskSet() + + void DiskSet::setStatsFrom(DiskSet const & set) + { +- for( int i=0 ; i < set.size() ; i++ ) ++ for( long unsigned int i=0 ; i < set.size() ; i++ ) + { + if (!set[i]) + continue; +@@ -78,7 +78,7 @@ Disk* DiskSet::find(Disk const & disk) + { + Disk* found = 0; + +- for( int i=0 ; !found && i < this->size() ; i++ ) ++ for( long unsigned int i=0 ; !found && i < this->size() ; i++ ) + { + Disk* check = this->at(i); + +@@ -95,7 +95,7 @@ int DiskSet::countEntries(Disk const & s + { + int count = 0; + +- for( int i=0 ; i < this->size() ; i++ ) ++ for( long unsigned int i=0 ; i < this->size() ; i++ ) + { + if( this->at(i)->getName() == search.getName() ) + count++; +diff -up spindown-0.4.0/src/spindown.cpp.orig spindown-0.4.0/src/spindown.cpp +--- spindown-0.4.0/src/spindown.cpp.orig 2009-04-18 12:32:59.000000000 -0400 ++++ spindown-0.4.0/src/spindown.cpp 2024-05-30 15:11:19.040768574 -0400 +@@ -20,6 +20,7 @@ + * Contact: Dimitri Michaux + */ + ++#include + #include + + #include +@@ -60,9 +61,9 @@ void Spindown::updateDevNames(DiskSet* s + + if ( (dp = opendir (DEVID_PATH)) != NULL) + { +- while (ep = readdir (dp)) ++ while ((ep = readdir (dp))) + { +- for( int i=0 ; i < set->size() ; i++ ) ++ for( long unsigned int i=0 ; i < set->size() ; i++ ) + set->at(i)->findDevName(ep->d_name); + } + (void) closedir (dp); +@@ -79,9 +80,8 @@ void Spindown::updateDiskStats(DiskSet* + ifstream fin(STATS_PATH, ios::in); + string devNameInp; //the name of the device read from the configuration + unsigned int newRead, newWritten; +- unsigned long int blocks; + char str[CHAR_BUF]; +- int i; ++ long unsigned int i; + + if(fin) + { +@@ -160,7 +160,7 @@ void Spindown::spinDownIdleDisks() + // Commit buffer cache to disk + sync(); + +- for( int i=0 ; i < disks->size() ; i++ ) ++ for( long unsigned int i=0 ; i < disks->size() ; i++ ) + { + disk = disks->at(i); + +@@ -207,7 +207,7 @@ string Spindown::getStatusString( bool a + { + ostringstream status; + +- for( int i=0 ; i < disks->size() ; i++ ) ++ for( long unsigned int i=0 ; i < disks->size() ; i++ ) + { + Disk* disk = disks->at(i); + +diff -up spindown-0.4.0/src/spindownd.cpp.orig spindown-0.4.0/src/spindownd.cpp +--- spindown-0.4.0/src/spindownd.cpp.orig 2024-05-30 15:03:42.968395337 -0400 ++++ spindown-0.4.0/src/spindownd.cpp 2024-05-30 15:12:06.606703184 -0400 +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + #include + + #include +@@ -118,7 +119,7 @@ void Spindownd::sigHandlerPipe(int) + if(errno==0) + { + string status = spindown->getStatusString(); +- write (file, status.data(), status.size()); ++ (void) write (file, status.data(), status.size()); + } + else + Log::get()->message(LOG_INFO, "Failed to write to the fifo."); diff --git a/spindown-0.4.0-iniparser.patch b/spindown-0.4.0-iniparser.patch index 152b13f..a0d5292 100644 --- a/spindown-0.4.0-iniparser.patch +++ b/spindown-0.4.0-iniparser.patch @@ -1,51 +1,58 @@ -diff --git a/src/disk.cpp b/src/disk.cpp -index 4ed7845..1d72a06 100644 ---- a/src/disk.cpp -+++ b/src/disk.cpp -@@ -38,7 +38,9 @@ using std::ostringstream; +diff -up spindown-0.4.0/src/disk.cpp.orig spindown-0.4.0/src/disk.cpp +--- spindown-0.4.0/src/disk.cpp.orig 2009-04-18 12:32:59.000000000 -0400 ++++ spindown-0.4.0/src/disk.cpp 2024-05-30 13:31:25.270211392 -0400 +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -38,7 +39,6 @@ using std::ostringstream; #include "general.h" #include "log.h" #include "exceptions.h" -#include "ininiparser3.0b/iniparser.h" -+extern "C" { -+#include "iniparser.h" -+} #include "disk.h" -diff --git a/src/disk.h b/src/disk.h -index 4cc7d1e..475f281 100644 ---- a/src/disk.h -+++ b/src/disk.h -@@ -28,7 +28,9 @@ +diff -up spindown-0.4.0/src/disk.h.orig spindown-0.4.0/src/disk.h +--- spindown-0.4.0/src/disk.h.orig 2009-04-18 12:32:59.000000000 -0400 ++++ spindown-0.4.0/src/disk.h 2024-05-30 13:39:01.583311861 -0400 +@@ -28,7 +28,7 @@ #ifndef DISC_CLASS_H #define DISC_CLASS_H -#include "ininiparser3.0b/iniparser.h" -+extern "C" { -+#include "iniparser.h" -+} ++#include #include using std::string; -diff --git a/src/spindownd.cpp b/src/spindownd.cpp -index 6517b61..16cc6bc 100644 ---- a/src/spindownd.cpp -+++ b/src/spindownd.cpp -@@ -41,8 +41,10 @@ using std::ofstream; +diff -up spindown-0.4.0/src/spindownd.cpp.orig spindown-0.4.0/src/spindownd.cpp +--- spindown-0.4.0/src/spindownd.cpp.orig 2009-04-18 12:32:59.000000000 -0400 ++++ spindown-0.4.0/src/spindownd.cpp 2024-05-30 13:32:16.962107796 -0400 +@@ -25,6 +25,9 @@ + #include + #include + ++#include ++#include ++ + #include + #include + #include +@@ -41,9 +44,6 @@ using std::ofstream; #include "diskset.h" #include "spindown.h" -#include "ininiparser3.0b/iniparser.h" -#include "ininiparser3.0b/dictionary.h" -+extern "C" { -+#include "iniparser.h" -+#include "dictionary.h" -+} - +- #include "spindownd.h" -@@ -339,4 +341,4 @@ string Spindownd::relToAbs( string path ) + string Spindownd::fifoPath; +@@ -339,4 +339,4 @@ string Spindownd::relToAbs( string path path.insert( 0, runPath+"/" ); return path; diff --git a/spindown.spec b/spindown.spec index f917e10..0281003 100644 --- a/spindown.spec +++ b/spindown.spec @@ -1,23 +1,24 @@ Summary: Daemon that can spin idle disks down Name: spindown Version: 0.4.0 -Release: 36%{?dist} +Release: 37%{?dist} License: GPLv3+ Url: http://code.google.com/p/spindown Source0: http://spindown.googlecode.com/files/spindown-%{version}.tar.gz Source1: spindown.service Source2: 01spindown -Patch0: spindown-0.4.0-Makefile.patch -Patch1: spindown-0.4.0-iniparser.patch -Patch2: spindown-0.4.0-iniparser-3.0-1.patch -Patch3: spindown-0.4.0-bz1037334.patch +Patch0: spindown-0.4.0-Makefile.patch +Patch1: spindown-0.4.0-iniparser.patch +Patch2: spindown-0.4.0-iniparser-3.0-1.patch +Patch3: spindown-0.4.0-bz1037334.patch +Patch4: spindown-0.4.0-gcc-14.x.patch Requires(preun): systemd-units BuildRequires: make -BuildRequires: gcc-c++ -BuildRequires: iniparser-devel +BuildRequires: gcc-c++ +BuildRequires: iniparser-devel >= 4.2.2 BuildRequires: systemd-units %description @@ -30,36 +31,38 @@ the device name (hda, sdb, ...), but the device ID. This means that it doesn't matter if the disk is swapped while the daemon is running. %prep -%setup -q +%autosetup -p1 rm -rf src/ininiparser3.0b cp -pf %{SOURCE1} spindown.service cp -pf %{SOURCE2} 01spindown -%patch -P0 -p1 -%patch -P1 -p1 -%patch -P2 -p1 -%patch -P3 -p1 %build -make %{?_smp_mflags} OPT="$RPM_OPT_FLAGS" +%make_build OPT="$RPM_OPT_FLAGS" %install -make DESTDIR="$RPM_BUILD_ROOT" install -mkdir -p $RPM_BUILD_ROOT/%{_libdir}/pm-utils/sleep.d -mkdir -p $RPM_BUILD_ROOT/%{_unitdir} -install -p -m 755 01spindown $RPM_BUILD_ROOT/%{_libdir}/pm-utils/sleep.d/01spindown -install -p -m 755 spindown.service $RPM_BUILD_ROOT/%{_unitdir}/spindown.service +%make_install +mkdir -p %{buildroot}%{_libdir}/pm-utils/sleep.d +mkdir -p %{buildroot}%{_unitdir} +install -p -m 755 01spindown %{buildroot}%{_libdir}/pm-utils/sleep.d/01spindown +install -p -m 755 spindown.service %{buildroot}%{_unitdir}/spindown.service %preun %systemd_preun spindown.service %files -%doc COPYING CHANGELOG README +%doc CHANGELOG README +%license COPYING %{_unitdir}/spindown.service %{_sbindir}/spindownd %{_libdir}/pm-utils/sleep.d/01spindown %config(noreplace) %{_sysconfdir}/spindown.conf %changelog +* Thu May 30 2024 David Cantrell - 0.4.0-37 +- Rebuild against latest iniparser +- Update spec file macro use +- Fix compile issues with latest gcc + * Sat Jan 27 2024 Fedora Release Engineering - 0.4.0-36 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From e4719f461cd0d6836eca41139346082829c22039 Mon Sep 17 00:00:00 2001 From: David Cantrell Date: Tue, 18 Jun 2024 14:37:47 -0400 Subject: [PATCH 13/19] Rebuild against iniparser-4.2.4 Signed-off-by: David Cantrell --- spindown.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spindown.spec b/spindown.spec index 0281003..fb8feac 100644 --- a/spindown.spec +++ b/spindown.spec @@ -1,7 +1,7 @@ Summary: Daemon that can spin idle disks down Name: spindown Version: 0.4.0 -Release: 37%{?dist} +Release: 38%{?dist} License: GPLv3+ Url: http://code.google.com/p/spindown Source0: http://spindown.googlecode.com/files/spindown-%{version}.tar.gz @@ -58,6 +58,9 @@ install -p -m 755 spindown.service %{buildroot}%{_unitdir}/spindown.service %config(noreplace) %{_sysconfdir}/spindown.conf %changelog +* Tue Jun 18 2024 David Cantrell - 0.4.0-38 +- Rebuild against iniparser-4.2.4 + * Thu May 30 2024 David Cantrell - 0.4.0-37 - Rebuild against latest iniparser - Update spec file macro use From 962b772c82ce64021a8ebc1b0d9b04067b6af9ce Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 20 Jul 2024 06:14:40 +0000 Subject: [PATCH 14/19] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- spindown.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spindown.spec b/spindown.spec index fb8feac..2024d17 100644 --- a/spindown.spec +++ b/spindown.spec @@ -1,7 +1,7 @@ Summary: Daemon that can spin idle disks down Name: spindown Version: 0.4.0 -Release: 38%{?dist} +Release: 39%{?dist} License: GPLv3+ Url: http://code.google.com/p/spindown Source0: http://spindown.googlecode.com/files/spindown-%{version}.tar.gz @@ -58,6 +58,9 @@ install -p -m 755 spindown.service %{buildroot}%{_unitdir}/spindown.service %config(noreplace) %{_sysconfdir}/spindown.conf %changelog +* Sat Jul 20 2024 Fedora Release Engineering - 0.4.0-39 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Tue Jun 18 2024 David Cantrell - 0.4.0-38 - Rebuild against iniparser-4.2.4 From 5b92c51e61737d3a464a75e08d2bce795f926ee7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Thu, 25 Jul 2024 13:18:23 +0200 Subject: [PATCH 15/19] convert GPLv3+ license to SPDX This is part of https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_4 --- spindown.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/spindown.spec b/spindown.spec index 2024d17..ee3eb31 100644 --- a/spindown.spec +++ b/spindown.spec @@ -1,8 +1,9 @@ Summary: Daemon that can spin idle disks down Name: spindown Version: 0.4.0 -Release: 39%{?dist} -License: GPLv3+ +Release: 40%{?dist} +# Automatically converted from old format: GPLv3+ - review is highly recommended. +License: GPL-3.0-or-later Url: http://code.google.com/p/spindown Source0: http://spindown.googlecode.com/files/spindown-%{version}.tar.gz Source1: spindown.service @@ -58,6 +59,9 @@ install -p -m 755 spindown.service %{buildroot}%{_unitdir}/spindown.service %config(noreplace) %{_sysconfdir}/spindown.conf %changelog +* Thu Jul 25 2024 Miroslav Suchý - 0.4.0-40 +- convert license to SPDX + * Sat Jul 20 2024 Fedora Release Engineering - 0.4.0-39 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 3a9e130b275ee9662107607dc400c4a9de74ee8d Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Wed, 31 Jul 2024 15:28:30 -0700 Subject: [PATCH 16/19] Update ci.fmf to fix CI execution Signed-off-by: Adam Williamson --- plans/ci.fmf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plans/ci.fmf b/plans/ci.fmf index 1ad2c12..3fd3ab7 100644 --- a/plans/ci.fmf +++ b/plans/ci.fmf @@ -1,6 +1,5 @@ summary: CI Gating Plan discover: how: fmf - directory: tests execute: - how: beakerlib + how: tmt From 7edd8343660a17061535406ff6e2e0876e5ee548 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 19 Jan 2025 11:25:59 +0000 Subject: [PATCH 17/19] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- spindown.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spindown.spec b/spindown.spec index ee3eb31..b8a702f 100644 --- a/spindown.spec +++ b/spindown.spec @@ -1,7 +1,7 @@ Summary: Daemon that can spin idle disks down Name: spindown Version: 0.4.0 -Release: 40%{?dist} +Release: 41%{?dist} # Automatically converted from old format: GPLv3+ - review is highly recommended. License: GPL-3.0-or-later Url: http://code.google.com/p/spindown @@ -59,6 +59,9 @@ install -p -m 755 spindown.service %{buildroot}%{_unitdir}/spindown.service %config(noreplace) %{_sysconfdir}/spindown.conf %changelog +* Sun Jan 19 2025 Fedora Release Engineering - 0.4.0-41 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Thu Jul 25 2024 Miroslav Suchý - 0.4.0-40 - convert license to SPDX From 9d6521947d08d6880366de1cdb1fa44f274ca5f2 Mon Sep 17 00:00:00 2001 From: Martin Cermak Date: Wed, 19 Feb 2025 17:05:26 +0100 Subject: [PATCH 18/19] Fix for FTBFS #2341373 --- spindown.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/spindown.spec b/spindown.spec index b8a702f..52f4eba 100644 --- a/spindown.spec +++ b/spindown.spec @@ -1,7 +1,7 @@ Summary: Daemon that can spin idle disks down Name: spindown Version: 0.4.0 -Release: 41%{?dist} +Release: 42%{?dist} # Automatically converted from old format: GPLv3+ - review is highly recommended. License: GPL-3.0-or-later Url: http://code.google.com/p/spindown @@ -38,6 +38,7 @@ cp -pf %{SOURCE1} spindown.service cp -pf %{SOURCE2} 01spindown %build +sed -i 's/sbin/bin/' Makefile %make_build OPT="$RPM_OPT_FLAGS" %install @@ -54,11 +55,14 @@ install -p -m 755 spindown.service %{buildroot}%{_unitdir}/spindown.service %doc CHANGELOG README %license COPYING %{_unitdir}/spindown.service -%{_sbindir}/spindownd +%{_bindir}/spindownd %{_libdir}/pm-utils/sleep.d/01spindown %config(noreplace) %{_sysconfdir}/spindown.conf %changelog +* Wed Feb 19 2025 Martin Cermak - 0.4.0-42 +- Fix for FTBFS #2341373 + * Sun Jan 19 2025 Fedora Release Engineering - 0.4.0-41 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 74b80e0c48cf5d56ee973f02deb11d21bc55dc3d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 18:38:30 +0000 Subject: [PATCH 19/19] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- spindown.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spindown.spec b/spindown.spec index 52f4eba..098441e 100644 --- a/spindown.spec +++ b/spindown.spec @@ -1,7 +1,7 @@ Summary: Daemon that can spin idle disks down Name: spindown Version: 0.4.0 -Release: 42%{?dist} +Release: 43%{?dist} # Automatically converted from old format: GPLv3+ - review is highly recommended. License: GPL-3.0-or-later Url: http://code.google.com/p/spindown @@ -60,6 +60,9 @@ install -p -m 755 spindown.service %{buildroot}%{_unitdir}/spindown.service %config(noreplace) %{_sysconfdir}/spindown.conf %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 0.4.0-43 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Wed Feb 19 2025 Martin Cermak - 0.4.0-42 - Fix for FTBFS #2341373