commit:     cb2e8152e1910de86adab41459feafcc9d43cbef
Author:     Guilherme Amadio <amadio <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 22 09:18:43 2025 +0000
Commit:     Guilherme Amadio <amadio <AT> gentoo <DOT> org>
CommitDate: Tue Apr 22 15:06:38 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cb2e8152

net-fs/cvmfs: fix compilation with >=protobuf-30, bug 954089

Closes: https://bugs.gentoo.org/954089
Signed-off-by: Guilherme Amadio <amadio <AT> gentoo.org>

 net-fs/cvmfs/cvmfs-2.12.7.ebuild               |  1 +
 net-fs/cvmfs/files/cvmfs-2.12.7-protobuf.patch | 27 ++++++++++++++++++++++++++
 2 files changed, 28 insertions(+)

diff --git a/net-fs/cvmfs/cvmfs-2.12.7.ebuild b/net-fs/cvmfs/cvmfs-2.12.7.ebuild
index f929cf78f411..0ea9638a1c44 100644
--- a/net-fs/cvmfs/cvmfs-2.12.7.ebuild
+++ b/net-fs/cvmfs/cvmfs-2.12.7.ebuild
@@ -46,6 +46,7 @@ DEPEND="${CDEPEND}
 
 PATCHES=(
                "${FILESDIR}"/${PN}-2.10.1-gentoo.patch
+               "${FILESDIR}"/${PN}-2.12.7-protobuf.patch
 )
 
 pkg_setup() {

diff --git a/net-fs/cvmfs/files/cvmfs-2.12.7-protobuf.patch 
b/net-fs/cvmfs/files/cvmfs-2.12.7-protobuf.patch
new file mode 100644
index 000000000000..29e5dfc17234
--- /dev/null
+++ b/net-fs/cvmfs/files/cvmfs-2.12.7-protobuf.patch
@@ -0,0 +1,27 @@
+
+ Fix build with protobuf >= 30
+ https://protobuf.dev/support/migration/#string_view-return-type
+
+--- a/cvmfs/cache_extern.cc
++++ b/cvmfs/cache_extern.cc
+@@ -538,7 +538,7 @@ void *ExternalCacheManager::MainRead(void *data) {
+       continue;
+     } else {
+       PANIC(kLogSyslogErr | kLogDebug, "unexpected message %s",
+-            msg->GetTypeName().c_str());
++            msg->GetTypeName().data());
+     }
+ 
+     RpcInFlight rpc_inflight;
+diff --git a/cvmfs/cache_plugin/channel.cc b/cvmfs/cache_plugin/channel.cc
+index 4c52d7604..e74d3aa8a 100644
+--- a/cvmfs/cache_plugin/channel.cc
++++ b/cvmfs/cache_plugin/channel.cc
+@@ -550,7 +550,7 @@ bool CachePlugin::HandleRequest(int fd_con) {
+   } else {
+     LogCvmfs(kLogCache, kLogSyslogErr | kLogDebug,
+              "unexpected message from client: %s",
+-             msg_typed->GetTypeName().c_str());
++             msg_typed->GetTypeName().data());
+     return false;
+   }

Reply via email to