Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ocf-resource-agents: 4.10.0 -> 4.12.0 (and fix build on i686) #233009

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
From 5ff43935d87b727fdd2a26781f22d6519bfe0fc2 Mon Sep 17 00:00:00 2001
From: Tobias Markus <[email protected]>
Date: Sat, 20 May 2023 13:53:03 +0200
Subject: [PATCH] storage_mon: Fix printf format string on i686

---
tools/storage_mon.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/storage_mon.c b/tools/storage_mon.c
index f829c508..8af28beb 100644
--- a/tools/storage_mon.c
+++ b/tools/storage_mon.c
@@ -67,7 +67,7 @@ static void *test_device(const char *device, int verbose, int inject_error_perce
goto error;
}
if (verbose) {
- printf("%s: opened %s O_DIRECT, size=%zu\n", device, (flags & O_DIRECT)?"with":"without", devsize);
+ printf("%s: opened %s O_DIRECT, size=%llu\n", device, (flags & O_DIRECT)?"with":"without", devsize);
}

/* Don't fret about real randomness */
@@ -120,7 +120,7 @@ static void *test_device(const char *device, int verbose, int inject_error_perce
goto error;
}
if (res < (int)sizeof(buffer)) {
- fprintf(stderr, "Failed to read %ld bytes from %s, got %d\n", sizeof(buffer), device, res);
+ fprintf(stderr, "Failed to read %zd bytes from %s, got %d\n", sizeof(buffer), device, res);
goto error;
}
}
--
2.40.1

11 changes: 8 additions & 3 deletions pkgs/os-specific/linux/ocf-resource-agents/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ let

resource-agentsForOCF = stdenv.mkDerivation rec {
pname = "resource-agents";
version = "4.10.0";
version = "4.12.0";

src = fetchFromGitHub {
owner = "ClusterLabs";
repo = pname;
rev = "v${version}";
sha256 = "0haryi3yrszdfpqnkfnppxj1yiy6ipah6m80snvayc7v0ss0wnir";
sha256 = "sha256-+UIjmHmCOi1aitJ01tC8k/2/Xb361UhMVtj/9wC/TEE=";
};

nativeBuildInputs = [
Expand All @@ -42,6 +42,11 @@ let
python3
];

patches = [
# See https://github.com/ClusterLabs/resource-agents/pull/1870
./0001-storage_mon-Fix-printf-format-string-on-i686.patch
];

env.NIX_CFLAGS_COMPILE = toString (lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12") [
# Needed with GCC 12 but breaks on darwin (with clang) or older gcc
"-Wno-error=maybe-uninitialized"
Expand All @@ -52,7 +57,7 @@ let
description = "Combined repository of OCF agents from the RHCS and Linux-HA projects";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ ryantm astro ];
maintainers = with maintainers; [ ryantm astro tmarkus ];
};
};

Expand Down