From 11d4c40d1e37edf8604f4053b0d5e3448d8ef366 Mon Sep 17 00:00:00 2001 From: Brian Bockelman Date: Mon, 30 Jul 2018 20:12:49 -0500 Subject: [PATCH 1/2] [XrdMacaroons] Fix build failures due to warnings on Fedora rawhide. --- src/XrdMacaroons/XrdMacaroons.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/XrdMacaroons/XrdMacaroons.cc b/src/XrdMacaroons/XrdMacaroons.cc index 0f3f94e808d..4865787f5d1 100644 --- a/src/XrdMacaroons/XrdMacaroons.cc +++ b/src/XrdMacaroons/XrdMacaroons.cc @@ -82,7 +82,7 @@ XrdAccAuthorize *XrdAccAuthorizeObject(XrdSysLogger *log, { return new Macaroons::Authz(log, config, chain_authz); } - catch (std::runtime_error e) + catch (std::runtime_error &e) { XrdSysError err(log, "macaroons"); err.Emsg("Config", "Configuration of Macaroon authorization handler failed", e.what()); @@ -103,7 +103,7 @@ XrdHttpExtHandler *XrdHttpGetExtHandler( { return new Macaroons::Handler(log, config, env, def_authz); } - catch (std::runtime_error e) + catch (std::runtime_error &e) { log->Emsg("Config", "Generation of Macaroon handler failed", e.what()); return NULL; From 76f8a613897f18684a5e3750f389de2b1d36f739 Mon Sep 17 00:00:00 2001 From: Brian Bockelman Date: Mon, 30 Jul 2018 20:14:43 -0500 Subject: [PATCH 2/2] [XrdMacaroons] Only require macaroons package on supported platforms. --- packaging/rhel/xrootd.spec.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packaging/rhel/xrootd.spec.in b/packaging/rhel/xrootd.spec.in index b5780e97f15..6753d2010e8 100644 --- a/packaging/rhel/xrootd.spec.in +++ b/packaging/rhel/xrootd.spec.in @@ -71,7 +71,9 @@ BuildRequires: zlib-devel BuildRequires: ncurses-devel BuildRequires: libcurl-devel BuildRequires: libuuid-devel +%if %{have_macaroons} BuildRequires: libmacaroons-devel +%ensid BuildRequires: json-c-devel BuildRequires: python2-devel