-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't try to patch /etc/cgrules.conf when the patch was already applied
Fixes update warning. Related to xapi-project/sm#705 Signed-off-by: Samuel Verschelde <[email protected]>
- Loading branch information
Showing
1 changed file
with
17 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
Summary: sm - XCP storage managers | ||
Name: sm | ||
Version: 3.2.3 | ||
Release: 1.1%{?xsrel}%{?dist} | ||
Release: 1.2%{?xsrel}%{?dist} | ||
License: LGPL | ||
URL: https://github.com/xapi-project/sm | ||
Source0: sm-3.2.3.tar.gz | ||
|
@@ -90,7 +90,7 @@ make install DESTDIR=%{buildroot} | |
|
||
# Mark processes that should be moved to the data path | ||
%triggerin -- libcgroup-tools | ||
( patch -tsN -r - -d / -p0 )>/dev/null << 'EOF' | ||
CGRULES_PATCH=$(cat << 'EOF' | ||
--- /etc/cgrules.conf 2018-04-11 02:33:52.000000000 +0000 | ||
+++ /tmp/cgrules.conf 2024-01-26 17:30:29.204242549 +0000 | ||
@@ -7,4 +7,6 @@ | ||
|
@@ -101,6 +101,17 @@ make install DESTDIR=%{buildroot} | |
+% blkio vm.slice/ | ||
# End of file | ||
EOF | ||
) | ||
|
||
# Do not apply patch if it was already applied | ||
if ! echo "$CGRULES_PATCH" | patch --dry-run -RsN -d / -p1 >/dev/null; then | ||
# Apply patch. Output NOT redirected to /dev/null so that error messages are displayed | ||
if ! echo "$CGRULES_PATCH" | patch -tsN -r - -d / -p1; then | ||
echo "Error: failed to apply patch:" | ||
echo "$CGRULES_PATCH" | ||
false | ||
fi | ||
fi | ||
|
||
%pre | ||
# Remove sm-multipath on install or upgrade, to ensure it goes | ||
|
@@ -360,6 +371,10 @@ Manager and some other packages | |
|
||
|
||
%changelog | ||
* Mon Aug 19 2024 Samuel Verschelde <[email protected]> - 3.2.3-1.2 | ||
- Don't try to patch /etc/cgrules.conf when the patch was already applied | ||
- Fixes update warning | ||
|
||
* Tue Aug 13 2024 Benjamin Reis <[email protected]> - 3.2.3-1.1 | ||
- Rebase on 3.2.3-1 | ||
- Add 0028-reflect-upstream-changes-in-our-tests.patch | ||
|