Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
home:aevseev
bareos
bareos.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File bareos.spec of Package bareos
%define realname bareos %define realver 23.0.1 %define srcext tar.gz %define so_ver %(echo %realver | %__awk -F. '{print $1}') %define bareos_user bareos %define bareos_group bareos %if 0%{?suse_version} %define USER wwwrun %define GROUP www %define APACHE apache2 %else %define USER apache %define GROUP apache %define APACHE httpd %endif # turn off the generation of debuginfo rpm (RH9) ?? %global debug_package %{nil} # Common info Name: %{realname} Version: %{realver} Release: wiz%{?extraver:0.}1%{?dist} License: AGPL-3.0 Group: Productivity/Archiving/Backup URL: http://www.bareos.org/ Summary: Backup Archiving REcovery Open Sourced # Build-time parameters BuildRequires: gcc-c++ BuildRequires: cmake >= 3.17 BuildRequires: ninja BuildRequires: pkgconfig(systemd) BuildRequires: python3%{?suse_version:-base} python3-devel BuildRequires: postgresql-devel BuildRequires: pkgconfig(openssl) >= 3.0 BuildRequires: libcap-devel BuildRequires: pam-devel BuildRequires: lzo-devel BuildRequires: libacl-devel acl BuildRequires: pkgconfig(zlib) BuildRequires: readline-devel BuildRequires: pkgconfig(jansson) BuildRequires: %{?suse_version:lib}mariadb-devel mariadb%{!?suse_version:-server} # libdroplet BuildRequires: pkgconfig(libxml-2.0) %{?suse_version:lib}json-c-devel # BuildRequires: libattr-devel attr BuildRequires: libcap-devel BuildRequires: ncurses-devel BuildRequires: php-devel BuildRequires: rpcgen libtirpc-devel BuildRequires: %{_vendor}-release lsb-release BuildRequires: glusterfs-devel %if 0%{?suse_version} BuildRequires: xtrabackup BuildRequires: fdupes %endif Source0: https://codeload.github.com/bareos/bareos/%{srcext}/refs/tags/Release/%{realver}#/%{realname}-%{realver}%{?extraver}.%{srcext} Source11: nginx-bareos-webui.conf %description Bareos is a set of computer programs that permits you (or the system administrator) to manage backup, recovery, and verification of computer data across a network of computers of different kinds. In technical terms, it is a network Client/Server based backup program. Bareos is relatively easy to use and efficient, while offering many advanced storage management features that make it easy to find and recover lost or damaged files. Due to its modular design, Bareos is scalable from small single computer systems to systems consisting of hundreds of computers located over a large network. %package common Group: Productivity/Archiving/Backup Summary: Open Source Backup, Enterprise ready, Network Backup Tool Requires: logrotate %description common Bareos is a set of computer programs that permits you (or the system administrator) to manage backup, recovery, and verification of computer data across a network of computers of different kinds. In technical terms, it is a network Client/Server based backup program. Bareos is relatively easy to use and efficient, while offering many advanced storage management features that make it easy to find and recover lost or damaged files. Due to its modular design, Bareos is scalable from small single computer systems to systems consisting of hundreds of computers located over a large network. %package director Group: Productivity/Archiving/Backup Summary: Bareos director daemon Requires: %{name}-db-driver Provides: %{name}-dir = %{version}-%{release} %description director The bareos Director service is the program that supervises all the backup, restore, verify and archive operations. The system administrator uses the bareos Director to schedule backups and to recover files. %package storage Group: Productivity/Archiving/Backup Summary: Bareos storage daemon Provides: %{name}-sd = %{version}-%{release} %description storage The bareos Storage services consist of the software programs that perform the storage and recovery of the file attributes and data to the physical backup media or volumes. In other words, the Storage daemon is responsible for reading and writing your tapes (or other storage media, e.g. files). %package client Group: Productivity/Archiving/Backup Summary: Bareos client daemon Provides: %{name}-fd = %{version}-%{release} %description client The bareos File service (also known as the Client program) is the software program that is installed on the machine to be backed up. It is specific to the operating system on which it runs and is responsible for providing the file attributes and data when requested by the Director. The File services are also responsible for the file system dependent part of restoring the file attributes and data during a recovery operation. %package console Group: Productivity/Archiving/Backup Summary: Bareos console Provides: bconsole = %{version}-%{release} %description console The bareos Console service is the program that allows the administrator or user to communicate with the bareos Director. %package postgresql Group: Productivity/Archiving/Backup Summary: PostgreSQL support for bareos director Provides: %{name}-db-driver = %{version}-%{release} Provides: %{name}-pgsql = %{version}-%{release} %description postgresql PostgreSQL database support for bareos director. %package lang Group: Productivity/Archiving/Backup Summary: Localization for bareos BuildArch: noarch %description lang Localization files for bareos. %package webui Group: Productivity/Archiving/Backup Summary: A PHP-Frontend to manage Bareos over the web BuildArch: noarch Requires: bareos-common = %{version}-%{release} Requires: httpd %description webui Bareos WebUI is a PHP-Frontend to manage Bareos over the web. # Preparation step (unpackung and patching if necessary) %prep %setup -q -n %{realname}-Release-%{realver}%{?extraver} %{__sed} -ri '/\s*add_subdirectory\(systemtests\)$/d' CMakeLists.txt %build _CFLAGS='%{optflags} %{?gcc_lto} -mno-avx -mno-avx2 -Wno-error=return-type -Wno-error=unused-parameter' _LDFLAGS='-Wl,--as-needed -Wl,--strip-all -Wl,-z,noexecstack -Wl,-z,now -Wl,-z,relro %{?gcc_lto}' cmake -B build -S . \ -G Ninja \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DCMAKE_INSTALL_LIBDIR=%{_libdir} \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_CXX_FLAGS_RELEASE="$_CFLAGS" \ -DCMAKE_C_FLAGS_RELEASE="$_CFLAGS" \ -DCMAKE_EXE_LINKER_FLAGS_RELEASE="$_LDFLAGS" \ -DCMAKE_MODULE_LINKER_FLAGS_RELEASE="$_LDFLAGS" \ -DCMAKE_SHARED_LINKER_FLAGS_RELEASE="$_LDFLAGS" \ -DCMAKE_SKIP_RPATH=YES \ -DCMAKE_VERBOSE_MAKEFILE=YES \ \ -DENABLE_CAPABILITY=YES \ \ -Dlibdir=%{_libdir} \ -Darchivedir=%{_localstatedir}/spool/bareos \ -Dbackenddir=%{_libexecdir}/bareos/backend \ -Dscriptdir=%{_libexecdir}/bareos \ -Dworkingdir=%{_localstatedir}/spool/bareos \ -Dplugindir=%{_libdir}/bareos \ -Dbsrdir=%{_sysconfdir}/bareos/bsr \ -Dlogdir=%{_localstatedir}/log/bareos \ -Ddir-user=%{bareos_user} \ -Ddir-group=%{bareos_group} \ -Dsd-user=%{bareos_user} \ -Dsd-group=%{bareos_group} \ -Dfd-user=root \ -Dfd-group=root \ -Ddynamic-cats-backends=YES \ -Ddynamic-storage-backends=YES \ -Dpostgresql=YES \ -Dsystemd=YES ninja -C build -v %{?_smp_mflags} %install DESTDIR=%{buildroot} ninja -v -C build install # Create missed directories %{__install} -d -m755 %{buildroot}%{_sysconfdir}/bareos/bsr %{__install} -d -m755 %{buildroot}%{_localstatedir}/log/bareos # Rename logrotate config %{__mv} -f %{buildroot}%{_sysconfdir}/logrotate.d/bareos-dir %{buildroot}%{_sysconfdir}/logrotate.d/bareos # Vim syntax %{__install} -D -m644 core/scripts/filetype.vim %{buildroot}%{_datadir}/vim/site/ftdetect/filetype.vim %{__install} -D -m644 core/scripts/bareos.vim %{buildroot}%{_datadir}/vim/site/syntax/bareos.vim # Webui cd webui # Set cache directory %{__sed} -ri '/cache_dir/ s|data/config/|%{_localstatedir}/cache/bareos-webui/config|' config/application.config.php # Create directories %{__install} -d -m755 %{buildroot}%{_datadir}/bareos-webui %{__install} -d -m755 %{buildroot}%{_localstatedir}/cache/bareos-webui/config %{__install} -d -m755 %{buildroot}%{_localstatedir}/cache/bareos-webui/data # Copy files %{__cp} -r version.php init_autoloader.php config/ module/ public/ vendor/ %{buildroot}%{_datadir}/bareos-webui/ # Install configs %{__install} -D -m 0640 install/directors.ini %{buildroot}%{_sysconfdir}/bareos-webui/directors.ini %{__install} -D -m 0640 install/configuration.ini %{buildroot}%{_sysconfdir}/bareos-webui/configuration.ini %{__install} -D -m 0640 install/bareos/bareos-dir.d/console/admin.conf.example %{buildroot}%{_sysconfdir}/bareos/bareos-dir.d/console/admin.conf.example %{__install} -D -m 0640 install/bareos/bareos-dir.d/profile/webui-admin.conf %{buildroot}%{_sysconfdir}/bareos/bareos-dir.d/profile/webui-admin.conf # Web-server configs will be installed by RPM trigger %{__install} -D -m 0640 install/apache/bareos-webui.conf %{buildroot}%{_datadir}/bareos-webui/apache-bareos-webui.conf %{__install} -D -m 0640 %{S:11} %{buildroot}%{_datadir}/bareos-webui/nginx-bareos-webui.conf # Fix shebangs %{__sed} -ri \ -e '1 s|^#!/usr/bin/env\s+python.*$|#!%{_bindir}/python3|' \ %{buildroot}%{_bindir}/bsmc \ %{buildroot}%{_bindir}/bareos-triggerjob.py # Clean duplicates %if 0%{?suse_version} %fdupes %{buildroot}%{_datadir} %endif %clean [ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot} %files common %defattr(-,root,root) %license core/LICENSE %doc AUTHORS README.md SPONSORS.md %doc core/AGPL-3.0.txt core/README.* %dir %{_sysconfdir}/bareos/bsr %dir %{_sysconfdir}/bareos %dir %{_libdir}/bareos %dir %{_libexecdir}/bareos/backend %dir %{_libexecdir}/bareos/ddl/creates %dir %{_libexecdir}/bareos/ddl/drops %dir %{_libexecdir}/bareos/ddl/grants %dir %{_libexecdir}/bareos/ddl/updates %dir %{_libexecdir}/bareos/ddl %dir %{_libexecdir}/bareos %dir %{_localstatedir}/log/bareos %config(noreplace) %{_sysconfdir}/logrotate.d/bareos %{_libdir}/libbareos.so.%{so_ver}* %{_libdir}//libbareosfastlz.so.* %{_libdir}/libbareosfind.so.%{so_ver}* %{_libdir}/libbareoslmdb.so.%{so_ver}* %{_libdir}/libbareosndmp.so.%{so_ver}* %{_libexecdir}/bareos/btraceback.* %{_bindir}/bregex %{_bindir}/bsmtp %{_bindir}/bwild %{_sbindir}/bareos %{_sbindir}/bpluginfo %exclude %{_sbindir}/bregex %exclude %{_sbindir}/bsmtp %{_sbindir}/btestls %{_sbindir}/btraceback %{_sbindir}/testfind %exclude %{_sbindir}/bwild %{_libexecdir}/bareos/bareos %{_libexecdir}/bareos/bareos-ctl-* %{_libexecdir}/bareos/bareos-config* %{_libexecdir}/bareos/bareos-explorer %{_libexecdir}/bareos/bareos_encode_string.py %dir %{_datadir}/vim/site/ftdetect %dir %{_datadir}/vim/site/syntax %dir %{_datadir}/vim/site %dir %{_datadir}/vim %{_datadir}/vim/site/syntax/bareos.vim %{_datadir}/vim/site/ftdetect/filetype.vim %attr(0750,bareos,bareos) %dir %{_localstatedir}/spool/bareos %doc %{_mandir}/man1/bregex.1* %doc %{_mandir}/man1/bsmtp.1* %doc %{_mandir}/man1/bwild.1* %doc %{_mandir}/man8/bareos.8* %doc %{_mandir}/man8/bpluginfo.8* %doc %{_mandir}/man8/btraceback.8* # This version is built without GlusterFS support %exclude %{_libexecdir}/bareos/bareos-glusterfind-wrapper # tray-monitor is not built %exclude %{_mandir}/man1/bareos-tray-monitor.1.gz # Development libraries %exclude %{_libdir}/*.so %files director %defattr(-,root,root) %dir %{_sysconfdir}/bareos/bareos-dir-export/client %dir %{_sysconfdir}/bareos/bareos-dir-export %dir %{_sysconfdir}/bareos/bareos-dir.d/catalog %dir %{_sysconfdir}/bareos/bareos-dir.d/client %dir %{_sysconfdir}/bareos/bareos-dir.d/console %dir %{_sysconfdir}/bareos/bareos-dir.d/counter %dir %{_sysconfdir}/bareos/bareos-dir.d/director %dir %{_sysconfdir}/bareos/bareos-dir.d/fileset %dir %{_sysconfdir}/bareos/bareos-dir.d/job %dir %{_sysconfdir}/bareos/bareos-dir.d/jobdefs %dir %{_sysconfdir}/bareos/bareos-dir.d/messages %dir %{_sysconfdir}/bareos/bareos-dir.d/pool %dir %{_sysconfdir}/bareos/bareos-dir.d/profile %dir %{_sysconfdir}/bareos/bareos-dir.d/schedule %dir %{_sysconfdir}/bareos/bareos-dir.d/storage %dir %{_sysconfdir}/bareos/bareos-dir.d %dir %{_sysconfdir}/bareos %config(noreplace) %{_sysconfdir}/bareos/bareos-dir.d/*/*.conf %exclude %{_sysconfdir}/bareos/bareos-dir.d/profile/webui-admin.conf %doc %{_sysconfdir}/bareos/bareos-dir.d/*/*.conf.example %{_unitdir}/bareos-dir.service %exclude %{_initrddir}/bareos-dir %exclude %{_sbindir}/rcbareos-dir %if 0%{?suse_version} %config(noreplace) %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/bareos-dir %endif %{_sbindir}/bareos-dir %{_sbindir}/bareos-dbcheck %{_libdir}/libbareossql.so.%{so_ver}* %{_libexecdir}/bareos/create_bareos_database %{_libexecdir}/bareos/delete_catalog_backup %{_libexecdir}/bareos/drop_bareos_database %{_libexecdir}/bareos/drop_bareos_tables %{_libexecdir}/bareos/grant_bareos_privileges %{_libexecdir}/bareos/make_bareos_tables %{_libexecdir}/bareos/make_catalog_backup %{_libexecdir}/bareos/update_bareos_tables %{_libexecdir}/bareos/ddl/versions.map %doc %{_mandir}/man8/bareos-dir.8* %doc %{_mandir}/man8/bareos-dbcheck.8* %doc %{_mandir}/man8/bscan.8* # Python %{_libdir}/bareos/python3-dir.so %{_libdir}/bareos/BareosDir*.py %{_libdir}/bareos/bareos-dir-*.py %{python3_sitearch}/bareosdir.*.so %files storage %defattr(-,root,root) %dir %{_sysconfdir}/bareos/bareos-sd.d/autochanger %dir %{_sysconfdir}/bareos/bareos-sd.d/device/droplet %dir %{_sysconfdir}/bareos/bareos-sd.d/device %dir %{_sysconfdir}/bareos/bareos-sd.d/director %dir %{_sysconfdir}/bareos/bareos-sd.d/messages %dir %{_sysconfdir}/bareos/bareos-sd.d/ndmp %dir %{_sysconfdir}/bareos/bareos-sd.d/storage %dir %{_sysconfdir}/bareos/bareos-sd.d %dir %{_sysconfdir}/bareos %config(noreplace) %{_sysconfdir}/bareos/mtx-changer.conf %config(noreplace) %{_sysconfdir}/bareos/bareos-sd.d/*/*.conf %{_sysconfdir}/bareos/bareos-sd.d/device/droplet/*.profile.example %doc %{_sysconfdir}/bareos/bareos-sd.d/*/*.conf.example %{_unitdir}/bareos-sd.service %exclude %{_initrddir}/bareos-sd %exclude %{_sbindir}/rcbareos-sd %if 0%{?suse_version} %config(noreplace) %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/bareos-sd %endif %{_sbindir}/bareos-sd %{_sbindir}/bcopy %{_sbindir}/bextract %{_sbindir}/bls %{_sbindir}/bscrypto %{_sbindir}/bscan %{_sbindir}/btape %{_libdir}/libbareossd.so.%{so_ver}* %{_libdir}/bareos/autoxflate-sd.so %{_libdir}/bareos/scsicrypto-sd.so %{_libdir}/bareos/scsitapealert-sd.so %{_libexecdir}/bareos/disk-changer %{_libexecdir}/bareos/mtx-changer %{_libexecdir}/bareos/backend/libbareossd-*.so %doc %{_mandir}/man8/bareos-sd.8* %doc %{_mandir}/man8/bcopy.8* %doc %{_mandir}/man8/bextract.8* %doc %{_mandir}/man8/bls.8* %doc %{_mandir}/man8/bscrypto.8* %doc %{_mandir}/man8/btape.8* # Python %{_libdir}/bareos/python3-sd.so %{_libdir}/bareos/BareosSd*.py %{_libdir}/bareos/bareos-sd-*.py %{python3_sitearch}/bareossd.*.so %files client %defattr(-,root,root) %dir %{_sysconfdir}/bareos/bareos-fd.d/client %dir %{_sysconfdir}/bareos/bareos-fd.d/director %dir %{_sysconfdir}/bareos/bareos-fd.d/messages %dir %{_sysconfdir}/bareos/bareos-fd.d %dir %{_sysconfdir}/bareos %config(noreplace) %{_sysconfdir}/bareos/bareos-fd.d/*/*.conf %{_unitdir}/bareos-fd.service %exclude %{_initrddir}/bareos-fd %exclude %{_sbindir}/rcbareos-fd %if 0%{?suse_version} %config(noreplace) %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/bareos-fd %endif %{_sbindir}/bareos-fd %{_libdir}/bareos/*-fd.so %doc %{_mandir}/man8/bareos-fd.8* # Python %{_libdir}/bareos/python3-fd.so %{_libdir}/bareos/BareosFd*.py %{_libdir}/bareos/bareos-fd-*.py %{python3_sitearch}/bareosfd.*.so %{_libdir}/bareos/BareosLibcloudApi.py %{_libdir}/bareos/bareos_libcloud_api/ %{_libdir}/bareos/bareos_mysql_dump/ %{_libdir}/bareos/bareos_tasks/ %{_libdir}/bareos/openvz7/ %files console %defattr(-,root,root) %config(noreplace) %{_sysconfdir}/bareos/bconsole.conf %config(noreplace) %{_sysconfdir}/bareos/bsmc.conf %{_bindir}/bconsole %{_bindir}/bsmc %{_bindir}/bareos-triggerjob.py %exclude %{_sbindir}/bconsole %{_libexecdir}/bareos/query.sql %doc %{_mandir}/man1/bconsole.1* %files postgresql %defattr(-,root,root) %{_libexecdir}/bareos/ddl/creates/postgresql.sql %{_libexecdir}/bareos/ddl/drops/postgresql.sql %{_libexecdir}/bareos/ddl/grants/postgresql-*.sql %{_libexecdir}/bareos/ddl/grants/postgresql.sql %{_libexecdir}/bareos/ddl/updates/postgresql.* ### %files lang -f %{name}.lang ### %defattr(-,root,root) %files webui %defattr(-,root,root) %license webui/copyright %doc AUTHORS webui/README.md SPONSORS.md %dir %{_sysconfdir}/bareos-webui %config(noreplace) %{_sysconfdir}/bareos-webui/*.ini %dir %{_sysconfdir}/bareos/bareos-dir.d/console %dir %{_sysconfdir}/bareos/bareos-dir.d/profile %dir %{_sysconfdir}/bareos/bareos-dir.d %dir %{_sysconfdir}/bareos %config(noreplace) %{_sysconfdir}/bareos/bareos-dir.d/profile/webui-admin.conf %{_datadir}/bareos-webui %dir %attr(0755,%{USER},%{GROUP}) %{_localstatedir}/cache/bareos-webui/config %dir %attr(0755,%{USER},%{GROUP}) %{_localstatedir}/cache/bareos-webui/data %dir %attr(0755,%{USER},%{GROUP}) %{_localstatedir}/cache/bareos-webui %exclude %{_sysconfdir}/httpd/conf.d/bareos-webui.conf %if 0%{?suse_version} %pre director /usr/sbin/groupadd -r %{bareos_group} 2> /dev/null || : /usr/sbin/useradd -r -s /bin/false -c "User for bareos daemons" -d /var/spool/bareos -g %{bareos_group} %{bareos_user} 2> /dev/null || : %{service_add_pre bareos-dir.service} %post director /sbin/ldconfig %{service_add_post bareos-dir.service} %preun director %{service_del_preun bareos-dir.service} %postun director /sbin/ldconfig %{service_del_postun bareos-dir.service} %pre storage /usr/sbin/groupadd -r %{bareos_group} 2> /dev/null || : /usr/sbin/useradd -r -s /bin/false -c "User for bareos daemons" -d /var/spool/bareos -g %{bareos_group} %{bareos_user} 2> /dev/null || : %{service_add_pre bareos-sd.service} %post storage %{service_add_post bareos-sd.service} %preun storage %{service_del_preun bareos-sd.service} %postun storage %{service_del_postun bareos-sd.service} %pre client %{service_add_pre bareos-fd.service} %post client %{service_add_post bareos-fd.service} %preun client %{service_del_preun bareos-fd.service} %postun client %{service_del_postun bareos-fd.service} %else %pre director /usr/sbin/groupadd -r %{bareos_group} 2> /dev/null || : /usr/sbin/useradd -r -s /bin/false -c "User for bareos daemons" -d /var/spool/bareos -g %{bareos_group} %{bareos_user} 2> /dev/null || : %pre storage /usr/sbin/groupadd -r %{bareos_group} 2> /dev/null || : /usr/sbin/useradd -r -s /bin/false -c "User for bareos daemons" -d /var/spool/bareos -g %{bareos_group} %{bareos_user} 2> /dev/null || : %post director -p /sbin/ldconfig %postun director -p /sbin/ldconfig %endif %post common -p /sbin/ldconfig %postun common -p /sbin/ldconfig %preun webui rm -f %{_localstatedir}/cache/basreos-webui/{config,data}/* %triggerin webui -- %{APACHE} setsebool -P httpd_can_network_connect on %{__install} -m 0644 %{_datadir}/%{name}/apache-bareos-webui.conf %{_sysconfdir}/%{APACHE}/conf.d/bareos-webui.conf %triggerun webui -- %{APACHE} setsebool -P httpd_can_network_connect off rm -f %{_sysconfdir}/%{APACHE}/conf.d/bareos-webui.conf %triggerin webui -- nginx %{__install} -m 0644 %{_datadir}/%{name}/nginx-bareos-webui.conf %{_sysconfdir}/nginx/vhosts.d/bareos-webui.conf %triggerun webui -- nginx rm -f %{_sysconfdir}/nginx/vhosts.d/bareos-webui.conf %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor