%define __cmake_in_source_build 1 Name: lizardfs Summary: Distributed, fault tolerant file system Version: 3.12.0 Release: 30%{?dist} # LizardFS is under GPLv3 while crcutil is under ASL 2.0 and there's one header, # src/common/coroutine.h, under the Boost license # Automatically converted from old format: GPLv3 and ASL 2.0 and Boost - review is highly recommended. License: GPL-3.0-only AND Apache-2.0 AND BSL-1.0 URL: http://www.lizardfs.org/ Source: https://github.com/lizardfs/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz Source1: pam-lizardfs Source2: 95-lizardfs.conf # Use spdlog system library if available Patch0: 0001-Put-customized-spdlog-in-source-so-we-don-t-download.patch # Fix for building with GCC 8 # See https://github.com/lizardfs/lizardfs/pull/677 Patch1: 0001-Add-missing-header.patch # Use python 3 rather than python 2 for cgi server Patch2: lizardfs-3.12-cgi-py3.patch # Fix missing includes Patch3: 0003-missing-includes.patch # Starting with Fedora 42, /bin and /sbin are the same directory Patch4: 0004-bin-sbin-merge.patch BuildRequires: asciidoc BuildRequires: cmake BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: make BuildRequires: pkgconfig BuildRequires: systemd BuildRequires: boost-devel BuildRequires: fuse-devel BuildRequires: Judy-devel BuildRequires: libdb-devel BuildRequires: pam-devel BuildRequires: systemd-devel BuildRequires: zlib-devel # libcrcutil is basically a copylib with a dead upstream # https://code.google.com/archive/p/crcutil/ Provides: bundled(libcrcutil) = 1.0 # spdlog is a copylib that lizardfs changes, so we can't use the system version Provides: bundled(spdlib) = 0.14.0 %global liz_project mfs %global liz_group %{liz_project} %global liz_user %{liz_project} %global liz_datadir %{_localstatedir}/lib/%{liz_project} %global liz_confdir %{_sysconfdir}/%{liz_project} %description LizardFS is an Open Source, easy to deploy and maintain, distributed, fault tolerant file system for POSIX compliant OSes. LizardFS is a fork of MooseFS. For more information please visit http://lizardfs.com # Packages ############################################################ %package master Summary: LizardFS master server Requires: pam %{?systemd_requires} %description master LizardFS master (metadata) server together with metadata restore utility. %package metalogger Summary: LizardFS metalogger server %{?systemd_requires} %description metalogger LizardFS metalogger (metadata replication) server. %package chunkserver Summary: LizardFS data server %{?systemd_requires} %description chunkserver LizardFS data server. %package client Summary: LizardFS client Requires: fuse %description client LizardFS client: mfsmount and lizardfs. %package cgi Summary: LizardFS CGI Monitor Requires: python3 %description cgi LizardFS CGI Monitor. %package cgiserv Summary: Simple CGI-capable HTTP server to run LizardFS CGI Monitor Requires: %{name}-cgi = %{version}-%{release} %{?systemd_requires} %description cgiserv Simple CGI-capable HTTP server to run LizardFS CGI Monitor. %package adm Summary: LizardFS administration utility %description adm LizardFS command line administration utility. # Scriptlets - master ############################################################ %post master %systemd_post lizardfs-master.service %preun master %systemd_preun lizardfs-master.service %postun master %systemd_postun_with_restart lizardfs-master.service # Scriptlets - metalogger ############################################################ %pre metalogger getent group %{liz_group} >/dev/null || groupadd -r %{liz_group} getent passwd %{liz_user} >/dev/null || \ useradd -r -g %{liz_group} -d %{liz_datadir} -s /sbin/nologin \ -c "LizardFS System Account" %{liz_user} exit 0 %post metalogger %systemd_post lizardfs-metalogger.service %preun metalogger %systemd_preun lizardfs-metalogger.service %postun metalogger %systemd_postun_with_restart lizardfs-metalogger.service # Scriptlets - chunkserver ############################################################ %pre chunkserver getent group %{liz_group} >/dev/null || groupadd -r %{liz_group} getent passwd %{liz_user} >/dev/null || \ useradd -r -g %{liz_group} -d %{liz_datadir} -s /sbin/nologin \ -c "LizardFS System Account" %{liz_user} exit 0 %post chunkserver %systemd_post lizardfs-chunkserver.service %preun chunkserver %systemd_preun lizardfs-chunkserver.service %postun chunkserver %systemd_postun_with_restart lizardfs-chunkserver.service # Scriptlets - CGI server ############################################################ %post cgiserv %systemd_post lizardfs-cgiserv.service %preun cgiserv %systemd_preun lizardfs-cgiserv.service %postun cgiserv %systemd_postun_with_restart lizardfs-cgiserv.service # Prep, build, install, files... ############################################################ %prep %autosetup -p1 # Remove /usr/bin/env from bash scripts for i in src/tools/mfstools.sh src/master/mfsrestoremaster.in \ src/common/serialization_macros_generate.sh src/data/postinst.in \ utils/coverage.sh utils/cpp-interpreter.sh utils/wireshark/plugins/lizardfs/generate.sh; do sed -i 's@#!/usr/bin/env bash@#!/bin/bash@' $i done # Remove /usr/bin/env from python3 scripts for i in src/cgi/cgiserv.py.in src/cgi/chart.cgi.in src/cgi/lizardfs-cgiserver.py.in src/cgi/mfs.cgi.in utils/wireshark/plugins/lizardfs/make_dissector.py; do sed -i 's@#!/usr/bin/env python3@#!/usr/bin/python3@' $i done # Create a sysusers.d config file cat >lizardfs.sysusers.conf <