Date: Saturday, April 25, 2020 @ 19:07:29 Author: eworm Revision: 621046
archrelease: copy trunk to community-staging-x86_64 Added: multipath-tools/repos/community-staging-x86_64/ multipath-tools/repos/community-staging-x86_64/0001-fix-boolean-value-with-json-c-0.14.patch (from rev 621045, multipath-tools/trunk/0001-fix-boolean-value-with-json-c-0.14.patch) multipath-tools/repos/community-staging-x86_64/PKGBUILD (from rev 621045, multipath-tools/trunk/PKGBUILD) -----------------------------------------------+ 0001-fix-boolean-value-with-json-c-0.14.patch | 33 ++++++++++++++++ PKGBUILD | 49 ++++++++++++++++++++++++ 2 files changed, 82 insertions(+) Copied: multipath-tools/repos/community-staging-x86_64/0001-fix-boolean-value-with-json-c-0.14.patch (from rev 621045, multipath-tools/trunk/0001-fix-boolean-value-with-json-c-0.14.patch) =================================================================== --- community-staging-x86_64/0001-fix-boolean-value-with-json-c-0.14.patch (rev 0) +++ community-staging-x86_64/0001-fix-boolean-value-with-json-c-0.14.patch 2020-04-25 19:07:29 UTC (rev 621046) @@ -0,0 +1,33 @@ +From 51430bc54d4d36aa4f722801d7dd06c663eda661 Mon Sep 17 00:00:00 2001 +From: Christian Hesse <m...@eworm.de> +Date: Sat, 25 Apr 2020 21:04:51 +0200 +Subject: [PATCH 1/1] fix boolean value with json-c 0.14 + +Upstream removed the TRUE and FALSE defines in commit +0992aac61f8b087efd7094e9ac2b84fa9c040fcd. +--- + libdmmp/libdmmp_private.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libdmmp/libdmmp_private.h b/libdmmp/libdmmp_private.h +index ac85b63f..29400826 100644 +--- a/libdmmp/libdmmp_private.h ++++ b/libdmmp/libdmmp_private.h +@@ -82,7 +82,7 @@ static out_type func_name(struct dmmp_context *ctx, const char *var_name) { \ + do { \ + json_type j_type = json_type_null; \ + json_object *j_obj_tmp = NULL; \ +- if (json_object_object_get_ex(j_obj, key, &j_obj_tmp) != TRUE) { \ ++ if (json_object_object_get_ex(j_obj, key, &j_obj_tmp) != 1) { \ + _error(ctx, "Invalid JSON output from multipathd IPC: " \ + "key '%s' not found", key); \ + rc = DMMP_ERR_IPC_ERROR; \ +@@ -90,7 +90,7 @@ do { \ + } \ + if (j_obj_tmp == NULL) { \ + _error(ctx, "BUG: Got NULL j_obj_tmp from " \ +- "json_object_object_get_ex() while it return TRUE"); \ ++ "json_object_object_get_ex() while it return 1"); \ + rc = DMMP_ERR_BUG; \ + goto out; \ + } \ Copied: multipath-tools/repos/community-staging-x86_64/PKGBUILD (from rev 621045, multipath-tools/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2020-04-25 19:07:29 UTC (rev 621046) @@ -0,0 +1,49 @@ +# Maintainer: Robin Broda <ro...@broda.me> +# Contributor: Michael Lass <be...@bi-co.net> +# Contributor: Justin Dray <jus...@dray.be> +# Contributor: Patrick McCarty <pnorcks at gmail dot com> +# Contributor: Bartłomiej Piotrowski <nos...@bpiotrowski.pl> +# Contributor: Thomas S Hatch <thatch45 ar gmail dot com> +# Contributor: Michael P <ptchins...@archlinux.us> +# Contributor: Matt Heagney <m...@heagney.com> + +pkgname=multipath-tools +pkgver=0.8.3 +pkgrel=2 +pkgdesc='Multipath tools for Linux (including kpartx)' +arch=('x86_64') +url='http://christophe.varoqui.free.fr/' +license=('GPL2') +depends=('libaio' 'device-mapper' 'json-c' 'liburcu' 'systemd-libs') +makedepends=('git') +source=("multipath-tools::git+https://git.opensvc.com/multipath-tools/.git#tag=${pkgver}" + '0001-fix-boolean-value-with-json-c-0.14.patch') +sha256sums=('SKIP' + '9aa4970790616637e0cc1b2ae609ca6bffb57effda0e8263fa73cbefc7f16a11') + +prepare() { + cd "${pkgname}" + + # Fix systemd version detection in Makefile + sed -i 's/sed -n .*$/head -n1 | cut -d" " -f2\)/g' Makefile.inc + + # Fix bindir in Makefile + sed -i 's|$(exec_prefix)/sbin|$(exec_prefix)/bin|g' Makefile.inc + + patch -Np1 < ../0001-fix-boolean-value-with-json-c-0.14.patch +} + +build() { + cd "${pkgname}" + + make +} + +package() { + cd "${pkgname}" + + make DESTDIR="${pkgdir}" \ + exec_prefix="/usr" \ + LIB="/usr/lib" \ + install +}