[packages/lizardfs] - added thrift C++ fixes, build with polonaise server and client library
qboosh
qboosh at pld-linux.org
Wed Apr 16 19:05:30 CEST 2025
commit f80d893ef2e5a0cf86472d34f1cbfab2e83da8bc
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Wed Apr 16 18:44:37 2025 +0200
- added thrift C++ fixes, build with polonaise server and client library
lizardfs-libsuffix.patch | 11 +++++
lizardfs-thrift-c++11.patch | 40 +++++++++++++++++
lizardfs.spec | 103 +++++++++++++++++++++++++++++++++++---------
3 files changed, 133 insertions(+), 21 deletions(-)
---
diff --git a/lizardfs.spec b/lizardfs.spec
index 2b200af..610b798 100644
--- a/lizardfs.spec
+++ b/lizardfs.spec
@@ -18,6 +18,8 @@ Patch0: system-spdlog.patch
Patch1: x32.patch
Patch2: 0001-Add-missing-header.patch
Patch3: spdlog.patch
+Patch4: %{name}-thrift-c++11.patch
+Patch5: %{name}-libsuffix.patch
URL: https://github.com/lizardfs/lizardfs
BuildRequires: /usr/bin/a2x
BuildRequires: asciidoc
@@ -35,6 +37,7 @@ BuildRequires: libfuse-devel
BuildRequires: libisal-devel
BuildRequires: pam-devel
BuildRequires: pkgconfig
+BuildRequires: polonaise-devel
BuildRequires: rpmbuild(macros) >= 1.647
BuildRequires: spdlog-devel >= 1.12-2
BuildRequires: systemd-devel
@@ -62,53 +65,88 @@ LizardFS is jest niezawodnym, skalowalnym i efektywnym rozproszonym
systemem plików. Rozkłada dane na rózne fizyczne serwery, dająć
użytkownikowi końcowemu widok pojedynczego systemu plików.
+%package libs
+Summary: LizardFS client libraries
+Summary(pl.UTF-8): Biblioteki klienta LizardFS
+Group: Libraries
+
+%description libs
+LizardFS client libraries.
+
+%description libs -l pl.UTF-8
+Biblioteki klienta LizardFS.
+
+%package devel
+Summary: Header files for LizardFS client libraries
+Summary(pl.UTF-8): Pliki nagłówkowe bibliotek klienta LizardFS
+Group: Development/Libraries
+Requires: %{name}-libs = %{version}-%{release}
+
+%description devel
+Header files for LizardFS client libraries.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe bibliotek klienta LizardFS.
+
+%package static
+Summary: Static LizardFS client libraries
+Summary(pl.UTF-8): Statyczne biblioteki klienta LizardFS
+Group: Development/Libraries
+Requires: %{name}-devel = %{version}-%{release}
+
+%description static
+Static LizardFS client libraries.
+
+%description static -l pl.UTF-8
+Statyczne biblioteki klienta LizardFS.
+
%package master
-Summary: Master/shadow metadata server
-Summary(pl.UTF-8): Główny i zapasowy serwer metadanych
+Summary: LizardFS master/shadow metadata server
+Summary(pl.UTF-8): Główny i zapasowy serwer metadanych LizardFS
Group: Networking/Daemons
Requires: %{name} = %{version}-%{release}
%description master
-Master/shadow metadata server.
+LizardFS master/shadow metadata server.
%description master -l pl.UTF-8
-Główny i zapasowy serwer metadanych.
+Główny i zapasowy serwer metadanych LizardFS.
%package chunkserver
-Summary: Chunk server
-Summary(pl.UTF-8): Serwer porcji danych
+Summary: LizardFS chunk server
+Summary(pl.UTF-8): Serwer porcji danych LizardFS
Group: Networking/Daemons
Requires: %{name} = %{version}-%{release}
%description chunkserver
-Chunk server.
+LizardFS chunk server.
%description chunkserver -l pl.UTF-8
-Serwer porcji danych.
+Serwer porcji danych LizardFS.
%package metalogger
-Summary: Metalogger server
-Summary(pl.UTF-8): Serwer logujący zmiany metadanych
+Summary: LizardFS metalogger server
+Summary(pl.UTF-8): Serwer logujący zmiany metadanych LizardFS
Group: Networking/Daemons
Requires: %{name} = %{version}-%{release}
%description metalogger
-Metalogger server.
+LizardFS metalogger server.
%description metalogger -l pl.UTF-8
-Serwer logujący zmiany metadanych.
+Serwer logujący zmiany metadanych LizardFS.
%package cgiserver
-Summary: CGI server
-Summary(pl.UTF-8): Serwer CGI
+Summary: LizardFS CGI server
+Summary(pl.UTF-8): Serwer CGI LizardFS
Group: Networking/Daemons
Requires: %{name} = %{version}-%{release}
%description cgiserver
-CGI server.
+LizardFS CGI server.
%description cgiserver -l pl.UTF-8
-Serwer CGI.
+Serwer CGI LizardFS.
%prep
%setup -q
@@ -116,6 +154,8 @@ Serwer CGI.
%patch -P1 -p1
%patch -P2 -p1
%patch -P3 -p1
+%patch -P4 -p1
+%patch -P5 -p1
%{__rm} -r external/crcutil-1.0
@@ -132,10 +172,11 @@ Serwer CGI.
%build
install -d build
cd build
-%cmake ../ \
- -DBUILD_SHARED_LIBS=FALSE \
- -DCMAKE_INSTALL_PREFIX:PATH=/ \
- -DENABLE_DEBIAN_PATHS=TRUE
+%cmake .. \
+ -DBUILD_SHARED_LIBS=OFF \
+ -DCMAKE_INSTALL_PREFIX:PATH=/ \
+ -DENABLE_CLIENT_LIB=ON \
+ -DENABLE_DEBIAN_PATHS=ON
%{__make}
%install
@@ -168,6 +209,9 @@ if [ "$1" = "0" ]; then
%groupremove mfs
fi
+%post libs -p /sbin/ldconfig
+%postun libs -p /sbin/ldconfig
+
%post master
%systemd_post %{name}-master.service
@@ -197,9 +241,10 @@ fi
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mfs/mfsgoals.cfg.dist
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mfs/mfsmount.cfg.dist
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mfs/mfstopology.cfg.dist
+%attr(755,root,root) %{_bindir}/lizardfs
%attr(755,root,root) %{_bindir}/lizardfs-admin
+%attr(755,root,root) %{_bindir}/lizardfs-polonaise-server
%attr(755,root,root) %{_bindir}/lizardfs-probe
-%attr(755,root,root) %{_bindir}/lizardfs
%attr(755,root,root) %{_bindir}/mfsappendchunks
%attr(755,root,root) %{_bindir}/mfscheckfile
%attr(755,root,root) %{_bindir}/mfsdeleattr
@@ -239,6 +284,22 @@ fi
%{_mandir}/man8/mfs*.8*
/etc/bash_completion.d/lizardfs
+%files libs
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/liblizardfs-client.so
+%attr(755,root,root) %{_libdir}/liblizardfsmount_shared.so
+
+%files devel
+%defattr(644,root,root,755)
+%{_includedir}/lizardfs
+%{_libdir}/liblizardfs-client-cpp_pic.a
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/liblizardfs-client.a
+%{_libdir}/liblizardfs-client_pic.a
+%{_libdir}/liblizardfs-client-cpp.a
+
%files master
%defattr(644,root,root,755)
%attr(755,root,root) %{_sbindir}/mfsmaster
diff --git a/lizardfs-libsuffix.patch b/lizardfs-libsuffix.patch
new file mode 100644
index 0000000..314d9f4
--- /dev/null
+++ b/lizardfs-libsuffix.patch
@@ -0,0 +1,11 @@
+--- lizardfs-3.12.0/CMakeLists.txt.orig 2025-04-16 06:15:16.577367613 +0200
++++ lizardfs-3.12.0/CMakeLists.txt 2025-04-16 06:21:42.358995990 +0200
+@@ -181,7 +181,7 @@ if(ENABLE_DEBIAN_PATHS)
+ endif()
+ set(BIN_SUBDIR "usr/bin")
+ set(SBIN_SUBDIR "usr/sbin")
+- set(LIB_SUBDIR "usr/lib${LIBSUFFIX}")
++ set(LIB_SUBDIR "usr/lib${LIB_SUFFIX}")
+ set(ETC_SUBDIR "etc/mfs")
+ set(RUN_SUBDIR "var/run/mfs")
+ set(DATA_SUBDIR "var/lib/mfs")
diff --git a/lizardfs-thrift-c++11.patch b/lizardfs-thrift-c++11.patch
new file mode 100644
index 0000000..389fe03
--- /dev/null
+++ b/lizardfs-thrift-c++11.patch
@@ -0,0 +1,40 @@
+--- lizardfs-3.12.0/src/mount/polonaise/main.cc.orig 2017-12-20 10:59:37.000000000 +0100
++++ lizardfs-3.12.0/src/mount/polonaise/main.cc 2025-04-16 06:23:29.964431143 +0200
+@@ -22,7 +22,6 @@
+ #include <signal.h>
+ #include <stdio.h>
+ #include <iostream>
+-#include <boost/make_shared.hpp>
+ #include <polonaise/polonaise_constants.h>
+ #include <polonaise/Polonaise.h>
+ #include <thrift/protocol/TBinaryProtocol.h>
+@@ -948,9 +947,9 @@ public:
+ static const uint32_t kReadBufferSize = 512 * 1024;
+ static const uint32_t kWriteBufferSize = 4096;
+
+- virtual boost::shared_ptr<apache::thrift::transport::TTransport> getTransport(
+- boost::shared_ptr<apache::thrift::transport::TTransport> transport) {
+- return boost::make_shared<apache::thrift::transport::TBufferedTransport>(
++ virtual std::shared_ptr<apache::thrift::transport::TTransport> getTransport(
++ std::shared_ptr<apache::thrift::transport::TTransport> transport) {
++ return std::make_shared<apache::thrift::transport::TBufferedTransport>(
+ transport, kReadBufferSize, kWriteBufferSize);
+ }
+ };
+@@ -1075,11 +1074,11 @@ int main (int argc, char **argv) {
+ using namespace ::apache::thrift;
+ using namespace ::apache::thrift::transport;
+ using namespace ::apache::thrift::server;
+- boost::shared_ptr<PolonaiseHandler> handler(new PolonaiseHandler());
+- boost::shared_ptr<TProcessor> processor(new PolonaiseProcessor(handler));
+- boost::shared_ptr<TTransportFactory> transportFactory(new BigBufferedTransportFactory());
+- boost::shared_ptr<TProtocolFactory> protocolFactory(new TBinaryProtocolFactory());
+- boost::shared_ptr<TServerTransport> serverTransport;
++ std::shared_ptr<PolonaiseHandler> handler(new PolonaiseHandler());
++ std::shared_ptr<TProcessor> processor(new PolonaiseProcessor(handler));
++ std::shared_ptr<TTransportFactory> transportFactory(new BigBufferedTransportFactory());
++ std::shared_ptr<TProtocolFactory> protocolFactory(new TBinaryProtocolFactory());
++ std::shared_ptr<TServerTransport> serverTransport;
+
+ #ifdef _WIN32
+ if (gSetup.bind_port > 0) {
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/lizardfs.git/commitdiff/f80d893ef2e5a0cf86472d34f1cbfab2e83da8bc
More information about the pld-cvs-commit
mailing list