From c7ec8e48ad44d1422fcd90b0b377d589cc119b6f Mon Sep 17 00:00:00 2001 From: Daniel Steiner Date: Thu, 3 Jun 2021 10:21:11 +0200 Subject: [PATCH] Now, goaccess support mmdb not legacy geoip database --- centos/SPECS/mydumper.spec | 62 ++++++++++++++++++++++++++++++++++++++ fedora/SPECS/goaccess.spec | 51 ++++++++++++++++--------------- 2 files changed, 88 insertions(+), 25 deletions(-) create mode 100644 centos/SPECS/mydumper.spec diff --git a/centos/SPECS/mydumper.spec b/centos/SPECS/mydumper.spec new file mode 100644 index 0000000..2867749 --- /dev/null +++ b/centos/SPECS/mydumper.spec @@ -0,0 +1,62 @@ +# binlog funtion will be deprecated in future: +%define mysqlbinlog 0 +%define pxc_cluster 0 +Name: mydumper +Summary: mydumper and myloader MySQL backup tools for PXC cluster 8.0 +Version: 0.10.5 +Release: 1%{?dist} +Group: Applications/Databases +License: GPL +Vendor: Max Bubenick +URL: https://github.com/maxbube/mydumper +Source: mydumper-%{version}.tar.gz +BuildRequires: glib2-devel openssl-devel pcre-devel zlib-devel +%if %pxc_cluster == 1 +BuildRequires: percona-xtradb-cluster-devel +%else +BuildRequires: percona-server-devel +%endif +BuildRequires: mysql-devel >= 8.0 +AutoReq: no + +%description +This package provides mydumper and myloader MySQL backup tools. + +mydumper is a tool used for backing up MySQL database servers much +faster than the mysqldump tool distributed with MySQL. It also has the +capability to retrieve the binary logs from the remote server at the same time +as the dump itself. The advantages of mydumper are: parallelism, +easier to manage output, consistency, manageability. + +myloader is a tool used for multi-threaded restoration of mydumper backups. + +%prep +%setup -q + +%build +%define debug_package %{nil} +%if %mysqlbinlog == 1 +cmake . -DWITH_BINLOG=ON -DWITH_SSL=ON -DCMAKE_INSTALL_PREFIX=%{_prefix} +%else +cmake . -DWITH_BINLOG=OFF -DWITH_SSL=ON -DCMAKE_INSTALL_PREFIX=%{_prefix} +%endif + +make + +%install +install -m 0755 -d ${RPM_BUILD_ROOT}%{_bindir} +install -m 0555 mydumper ${RPM_BUILD_ROOT}%{_bindir} +install -m 0555 myloader ${RPM_BUILD_ROOT}%{_bindir} + +%clean +rm -rf ${RPM_BUILD_ROOT} + +%files +%defattr(-,root,root,-) +%{_bindir}/* + +%changelog +* Wed May 26 2021 Daniel Steiner +- Initial build for CentOS 8. + + diff --git a/fedora/SPECS/goaccess.spec b/fedora/SPECS/goaccess.spec index ff7d399..df697a6 100644 --- a/fedora/SPECS/goaccess.spec +++ b/fedora/SPECS/goaccess.spec @@ -1,23 +1,28 @@ +%bcond_without lto +%bcond_without openssl + +%if %{with lto} +%global optflags %{optflags} -flto +%global build_ldflags %{build_ldflags} -flto +%endif + Name: goaccess -Version: 1.4.1 -Release: 2%{?dist} +Version: 1.5 +Release: 99%{?dist} Summary: Real-time web log analyzer and interactive viewer License: GPLv2+ URL: https://goaccess.io/ -Source0: http://tar.goaccess.io/%{name}-%{version}.tar.gz +Source0: https://tar.goaccess.io/%{name}-%{version}.tar.gz BuildRequires: autoconf BuildRequires: automake BuildRequires: gcc BuildRequires: GeoIP-devel BuildRequires: ncurses-devel -BuildRequires: tokyocabinet-devel -BuildRequires: zlib-devel -BuildRequires: bzip2-devel -BuildRequires: gettext-devel -BuildRequires: libmaxminddb-devel -%if %{with openssl} -BuildRequires: openssl-devel +BuildRequires: gettext-devel +%if %{with openssl} +BuildRequires: openssl-devel %endif +BuildRequires: make %description GoAccess is a real-time web log analyzer and interactive viewer that runs in a @@ -28,7 +33,7 @@ Features: GoAccess parses the specified web log file and outputs the data to terminal. * General statistics, bandwidth, etc. -* Time taken to serve the request (useful to track pages that are slowing down. +* Time taken to serve the request (useful to track pages that are slowing down your site). * Metrics for cumulative, average and slowest running requests. * Top visitors. @@ -59,20 +64,20 @@ not limited to: * W3C format (IIS). %prep -%setup -q +%autosetup # Prevent flags being overridden again and again. #sed -i 's|-pthread|$CFLAGS \0|' configure.ac sed -i '/-pthread/d' configure.ac %build -autoreconf -fiv +# autoreconf -fiv +# %%configure --enable-debug --enable-geoip --enable-utf8 --enable-tcb=btree --with-getline %configure \ - --enable-debug \ - --enable-geoip=legacy \ - --enable-geoip=mmdb \ - --enable-utf8 \ - --with-getline \ - --with-openssl + --enable-debug \ + --enable-geoip=mmdb \ + --enable-utf8 \ + --with-getline \ + %{?with_openssl: --with-openssl} %make_build %install @@ -88,10 +93,6 @@ autoreconf -fiv %{_mandir}/man1/%{name}.1* %changelog -* Sat Oct 31 2020 Daniel Steiner -- First build for Fedora 33. - -* Fri Aug 28 2020 Daniel Steiner -- mmdb enabled for new GeoLite2 dBs. -- First, initial version for Fedora 32 (1.4.1) +* Thu Jun 3 2021 Daniel Steiner +- New build for Fedora 34 (1.5)