diff --git a/fedora/SPECS/BackupPC-XS.spec b/fedora/SPECS/BackupPC-XS.spec new file mode 100644 index 0000000..0c65fb4 --- /dev/null +++ b/fedora/SPECS/BackupPC-XS.spec @@ -0,0 +1,59 @@ +Name: BackupPC-XS +Version: 0.56 +Release: 3%{?dist} +Summary: Implementation of various BackupPC functions in a perl-callable module + +License: GPLv3+ and (GPL+ or Artistic) and zlib +URL: https://github.com/backuppc/backuppc-xs +Source0: https://github.com/backuppc/backuppc-xs/releases/download/%{version}/%{name}-%{version}.tar.gz + +BuildRequires: gcc +BuildRequires: perl-interpreter perl-devel +BuildRequires: perl-generators +BuildRequires: perl(constant) +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(strict) +BuildRequires: perl(warnings) +BuildRequires: perl(XSLoader) +# Testing requirement +BuildRequires: perl(Test::More) + +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) + +Provides: bundled(zlib) = 1.2.3 + +%description +BackupPC::XS implements various BackupPC functions in a perl-callable +module. This module is required for BackupPC V4+. + + +%prep +%autosetup + + +%build +%{__perl} Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 +make + + +%install +make pure_install DESTDIR=%{buildroot} +%{_fixperms} %{buildroot} + + +%check +make test + + +%files +%doc Changes README +%{perl_vendorarch}/* +%exclude %dir %{perl_vendorarch}/auto/ +%{_mandir}/man3/BackupPC::XS.3pm* + + +%changelog +* Sat Oct 7 2017 Daniel Steiner - 4.1.3-2 +- Iniital build. + diff --git a/fedora/SPECS/BackupPC.spec b/fedora/SPECS/BackupPC.spec new file mode 100644 index 0000000..871ef8c --- /dev/null +++ b/fedora/SPECS/BackupPC.spec @@ -0,0 +1,339 @@ +%global _hardened_build 1 +%define backupdir /backup/%{name} +%define bpcuser backuppc + +# tmpfiles.d & systemd support in all supported Fedora now, but not RHEL < 7 +%if 0%{?fedora} || 0%{?rhel} >= 7 +%global _with_tmpfilesd 1 +%global _with_systemd 1 +%endif + +%global _updatedb_conf /etc/updatedb.conf + +%global ver_major 4 +%global ver_minor 1 +%global ver_patch 3 +%global ver_under %{ver_major}_%{ver_minor}_%{ver_patch} + +Name: BackupPC +Version: %{ver_major}.%{ver_minor}.%{ver_patch} +Release: 1%{?dist} +Summary: High-performance backup system + +License: GPLv2+ +URL: http://backuppc.github.io/backuppc/index.html +Source0: https://github.com/backuppc/backuppc/releases/download/%{version}/%{name}-%{version}.tar.gz +Source1: BackupPC.htaccess +Source2: BackupPC.logrotate +Source3: README.setup +#A C wrapper to use since perl-suidperl is no longer provided +Source4: BackupPC_Admin.c +Source5: backuppc.service +Source6: BackupPC.tmpfiles +Source7: README.RHEL + +Patch0: BackupPC-4.1.3-docfix.patch + +BuildRequires: perl-generators +BuildRequires: perl(BackupPC::XS) >= 0.53 +BuildRequires: perl(CGI) +BuildRequires: perl(Compress::Zlib) +BuildRequires: perl(Data::Dumper) +BuildRequires: perl(Digest::MD5) +BuildRequires: perl(Encode) +BuildRequires: perl(File::Listing) +BuildRequires: perl(Pod::Usage) +BuildRequires: perl(version) +%if 0%{?_with_systemd} +BuildRequires: systemd +%endif +BuildRequires: httpd-tools + +# Unbundled libraries +Requires: perl(Net::FTP::AutoReconnect) +Requires: perl(Net::FTP::RetrHandle) + +Requires: bzip2 +Requires: httpd +Requires: iputils +Requires: openssh-clients +%if ! 0%{?el6} +Requires: par2cmdline +%endif +Requires: rrdtool +Requires: rsync-bpc >= 3.0.9.6 +Requires: perl(Archive::Zip) +Requires: perl(BackupPC::XS) >= 0.53 +Requires: perl(CGI) +Requires: perl(Compress::Zlib) +Requires: perl(Digest::MD5) +Requires: perl(Encode) +Requires: perl(File::Listing) +Requires: perl-Time-modules +Requires: perl(version) +Requires: perl(XML::RSS) +Requires: samba-client +Requires: %{_sbindir}/sendmail + +Requires(pre): shadow-utils +%if 0%{?_with_systemd} +Requires(preun): systemd +Requires(post): systemd shadow-utils +Requires(postun): systemd +%else +Requires(preun): initscripts chkconfig +Requires(post): initscripts chkconfig shadow-utils +Requires(postun): initscripts +%endif + +Requires: policycoreutils +BuildRequires: selinux-policy-devel checkpolicy +Provides: backuppc = %{version} + + +%description +BackupPC is a high-performance, enterprise-grade system for backing up Linux +and WinXX and Mac OS X PCs and laptops to a server's disk. BackupPC is highly +configurable and easy to install and maintain. + +NOTE: Proper configuration is required after install, see README.setup for more +information. + + +%prep +%autosetup -p1 + +for f in ChangeLog; do + iconv -f ISO-8859-1 -t UTF-8 $f > $f.utf && mv $f.utf $f +done + +cp %{SOURCE3} . +cp %{SOURCE7} . +cp %{SOURCE4} . + +mkdir selinux +pushd selinux + +cat >%{name}.te <%{name}.fc < /dev/null || : + +%preun +%if 0%{?_with_systemd} +%systemd_preun %{bpcuser}.service +%else +if [ $1 = 0 ]; then + # Package removal, not upgrade + service %{bpcuser} stop > /dev/null 2>&1 || : + chkconfig --del %{bpcuser} || : +fi +%endif + +%post +( + # Install/update Selinux policy + semodule -i %{_datadir}/selinux/packages/%{name}/%{name}.pp + # files created by app + restorecon -R %{_sysconfdir}/%{name} + restorecon -R %{_localstatedir}/log/%{name} +) &>/dev/null + +%if 0%{?_with_systemd} +%systemd_post %{bpcuser}.service +%else +if [ $1 -eq 1 ]; then + # initial installation + chkconfig --add %{bpcuser} || : +fi +%{_sbindir}/usermod -a -G %{bpcuser} apache || : +%endif + +# add BackupPC backup directories to PRUNEPATHS in locate database +if [ -w %{_updatedb_conf} ]; then + grep ^PRUNEPATHS %{_updatedb_conf} | grep %{_localstatedir}/lib/%{name} > /dev/null + if [ $? -eq 1 ]; then + sed -i '\@PRUNEPATHS@s@"$@ '%{_localstatedir}/lib/%{name}'"@' %{_updatedb_conf} + fi +fi +: + +%postun +# clear out any BackupPC configuration in apache +service httpd condrestart > /dev/null 2>&1 || : + +if [ $1 -eq 0 ]; then + # uninstall + # Remove the SElinux policy. + semodule -r %{name} &> /dev/null || : + # remove BackupPC backup directories from PRUNEPATHS in locate database + if [ -w %{_updatedb_conf} ]; then + sed -i '\@PRUNEPATHS@s@[ ]*'%{_localstatedir}/lib/%{name}'@@' %{_updatedb_conf} || : + fi +fi + +%systemd_postun_with_restart %{bpcuser}.service + + +%files +%doc README.md README.setup README.RHEL ChangeLog doc/* +%license LICENSE +%dir %attr(-,%{bpcuser},%{bpcuser}) %{_localstatedir}/log/%{name} +%dir %attr(-,%{bpcuser},%{bpcuser}) %{_sysconfdir}/%{name}/ +%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf +%config(noreplace) %attr(0640,%{bpcuser},apache) %{_sysconfdir}/%{name}/config.pl +%config(noreplace) %attr(0640,%{bpcuser},apache) %{_sysconfdir}/%{name}/config.pl.sample +%config(noreplace) %attr(0640,%{bpcuser},apache) %{_sysconfdir}/%{name}/hosts.sample +%config(noreplace) %attr(0640,%{bpcuser},apache) %{_sysconfdir}/%{name}/hosts +%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/%{name}/apache.users +%dir %attr(0750,%{bpcuser},apache) %{_sysconfdir}/%{name}/pc +%config(noreplace) %{_sysconfdir}/logrotate.d/%{name} +%dir %{_datadir}/%{name} +%dir %{_datadir}/%{name}/sbin +%{_datadir}/%{name}/[^s]* +%attr(750,%{bpcuser},apache) %{_datadir}/%{name}/sbin/BackupPC_Admin + +%if 0%{?_with_tmpfilesd} +%{_tmpfilesdir}/%{name}.conf +%endif +%dir %attr(0775,%{bpcuser},%{bpcuser}) %{_localstatedir}/run/%{name} + +%if 0%{?_with_systemd} +%{_unitdir}/%{bpcuser}.service +%else +%attr(0755,root,root) %{_initrddir}/%{bpcuser} +%endif + +%attr(4750,%{bpcuser},apache) %{_libexecdir}/%{name}/BackupPC_Admin +%attr(-,%{bpcuser},root) %{backupdir}/ +%{_datadir}/selinux/packages/%{name}/%{name}.pp + + +%changelog +* Sat Oct 7 2017 Daniel Steiner - 4.1.3-2 +- Iniital build. + diff --git a/fedora/SPECS/percona-monitoring-plugins.spec b/fedora/SPECS/percona-monitoring-plugins.spec new file mode 100644 index 0000000..1f114a4 --- /dev/null +++ b/fedora/SPECS/percona-monitoring-plugins.spec @@ -0,0 +1,149 @@ +Name: percona-monitoring-plugins +Summary: Percona Monitoring Plugins are high-quality components to add enterprise-class MySQL monitoring and graphing capabilities to your existing on-premise monitoring solutions. +Group: Applications/Databases +Version: 1.1.7 +Release: 1%{?dist} +Distribution: %{distro_description} +License: GPL +Source: percona-monitoring-plugins-%{version}.tar.gz +Patch0: percona-cacti.patch +URL: http://www.percona.com/software/percona-monitoring-plugins +Packager: Percona MySQL Development Team +Vendor: Percona +BuildArch: noarch +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: PyYAML +%if 0%{?rhel} > 6 +BuildRequires: perl-Digest-MD5 +%else +BuildRequires: perl-MD5 +%endif + + +%description +Summary: Percona Monitoring Plugins are high-quality components to add enterprise-class MySQL monitoring and graphing capabilities to your existing on-premise monitoring solutions. + + +############################################################################## +# Sub package definition +############################################################################## + + +%package -n percona-cacti-templates +Summary: Percona Monitoring Plugins for Cacti +Group: Applications/Databases +License: GPL +Requires: cacti >= 0.8.6 + +%description -n percona-cacti-templates +The Percona Monitoring Plugins are high-quality components to add enterprise- +grade MySQL monitoring and graphing capabilities to your existing in-house, +on-premises monitoring solutions. The components are designed to integrate +seamlessly with widely deployed solutions such as Nagios, Cacti and Zabbix, +and are delivered in the form of templates, plugins, and scripts. + + +%package -n percona-nagios-plugins +Summary: Percona Monitoring Plugins for Nagios +Group: Applications/Databases +License: GPL + +%description -n percona-nagios-plugins +The Percona Monitoring Plugins are high-quality components to add enterprise- +grade MySQL monitoring and graphing capabilities to your existing in-house, +on-premises monitoring solutions. The components are designed to integrate +seamlessly with widely deployed solutions such as Nagios, Cacti and Zabbix, +and are delivered in the form of templates, plugins, and scripts. + + +%package -n percona-zabbix-templates +Summary: Percona Monitoring Plugins for Zabbix +Group: Applications/Databases +License: GPL + +%description -n percona-zabbix-templates +The Percona Monitoring Plugins are high-quality components to add enterprise- +grade MySQL monitoring and graphing capabilities to your existing in-house, +on-premises monitoring solutions. The components are designed to integrate +seamlessly with widely deployed solutions such as Nagios, Cacti and Zabbix, +and are delivered in the form of templates, plugins, and scripts. + +############################################################################## + + +%prep +%setup -q +%patch0 + +%build +./make.sh nodocs + +%install + +#========ZABBIX======== +install -m 0755 -d $RPM_BUILD_ROOT/var/lib/zabbix/percona/scripts +install -m 0755 -d $RPM_BUILD_ROOT/var/lib/zabbix/percona/templates +install -m 0755 release/%{name}-%{version}/zabbix/scripts/* $RPM_BUILD_ROOT/var/lib/zabbix/percona/scripts +install -m 0644 release/%{name}-%{version}/zabbix/templates/* $RPM_BUILD_ROOT/var/lib/zabbix/percona/templates +#====================== + +#========NAGIOS======== +install -m 0755 -d $RPM_BUILD_ROOT%{_libdir}/nagios/plugins +install -m 0755 release/%{name}-%{version}/nagios/bin/pmp-* $RPM_BUILD_ROOT%{_libdir}/nagios/plugins +#====================== + +#========CACTI========= +install -m 0755 -d $RPM_BUILD_ROOT/usr/share/cacti/resource/percona/bin +install -m 0755 -d $RPM_BUILD_ROOT/usr/share/cacti/resource/percona/definitions +install -m 0755 -d $RPM_BUILD_ROOT/usr/share/cacti/resource/percona/misc +install -m 0755 -d $RPM_BUILD_ROOT/usr/share/cacti/resource/percona/templates +install -m 0755 -d $RPM_BUILD_ROOT/usr/share/cacti/scripts +install -m 0755 release/%{name}-%{version}/cacti/bin/* $RPM_BUILD_ROOT/usr/share/cacti/resource/percona/bin +install -m 0644 release/%{name}-%{version}/cacti/definitions/* $RPM_BUILD_ROOT/usr/share/cacti/resource/percona/definitions +install -m 0644 release/%{name}-%{version}/cacti/misc/* $RPM_BUILD_ROOT/usr/share/cacti/resource/percona/misc +install -m 0644 release/%{name}-%{version}/cacti/templates/* $RPM_BUILD_ROOT/usr/share/cacti/resource/percona/templates +install -m 0644 release/%{name}-%{version}/cacti/scripts/*.php $RPM_BUILD_ROOT/usr/share/cacti/scripts +install -m 0755 release/%{name}-%{version}/cacti/scripts/*.py $RPM_BUILD_ROOT/usr/share/cacti/scripts +#====================== + +# exit 0 disables running helpers which generates *.pyc, *.pyo files. +exit 0 + +%clean +rm -rf $RPM_BUILD_ROOT + +%post -n percona-zabbix-templates +echo +echo "Scripts are installed to /var/lib/zabbix/percona/scripts" +echo "Templates are installed to /var/lib/zabbix/percona/templates" + + +%files -n percona-zabbix-templates +%dir /var/lib/zabbix/percona +/var/lib/zabbix/percona/* + + +%post -n percona-nagios-plugins +echo +echo "Plugins are installed to %{_libdir}/nagios/plugins" + + +%files -n percona-nagios-plugins +%{_libdir}/nagios/plugins/* + + +%post -n percona-cacti-templates +echo +echo "Scripts are installed to /usr/share/cacti/scripts" +echo "Templates are installed to /usr/share/cacti/resource/percona" + + +%files -n percona-cacti-templates +%dir /usr/share/cacti/resource/percona +/usr/share/cacti/resource/percona/* +/usr/share/cacti/scripts/* + + +%changelog +* Thu Dec 1 2016 1.1.7 +- Initial Package diff --git a/fedora/SPECS/rsync-bpc.spec b/fedora/SPECS/rsync-bpc.spec new file mode 100644 index 0000000..776b2b1 --- /dev/null +++ b/fedora/SPECS/rsync-bpc.spec @@ -0,0 +1,61 @@ +%global ver_major 3 +%global ver_minor 0 +%global ver_patch 9 +%global ver_tweak 6 +%global ver_under %{ver_major}_%{ver_minor}_%{ver_patch}_%{ver_tweak} + + +Name: rsync-bpc +Version: 3.0.9.8 +Release: 1%{?dist} +Summary: A customized version of rsync that is used as part of BackupPC + +License: GPLv3+ +URL: https://github.com/backuppc/rsync-bpc +Source0: https://github.com/backuppc/rsync-bpc/releases/download/%{version}/%{name}-%{version}.tar.gz + +BuildRequires: autoconf +BuildRequires: gcc +BuildRequires: libacl-devel +BuildRequires: libattr-devel +BuildRequires: popt-devel + + +%description +Rsync-bpc is a customized version of rsync that is used as part of +BackupPC, an open source backup system. + +The main change to rsync is adding a shim layer (in the subdirectory +backuppc, and in bpc_sysCalls.c) that emulates the system calls for +accessing the file system so that rsync can directly read/write files +in BackupPC's format. + +Rsync-bpc is fully line-compatible with vanilla rsync, so it can talk +to rsync servers and clients. + +Rsync-bpc serves no purpose outside of BackupPC. + + +%prep +%autosetup -n %{name}-%{version} + + +%build +%configure +%make_build + + +%install +%make_install + + +%files +%license COPYING +%doc NEWS README +%{_bindir}/rsync_bpc + + +%changelog +* Sat Oct 7 2017 Daniel Steiner - 4.1.3-2 +- Iniital build. +