代码拉取完成,页面将自动刷新
%global _hardened_build 0
%global debug_package %{nil}
%global __provides_exclude_from ^%{_libdir}/varnish/vmods
%global abi eef25264e5ca5f96a77129308edb83ccf84cb1b1
%global vrt 16.0
%global commit1 cfa8cb3724e4ca6398f60b09157715bcb99d189d
%global shortcommit1 %(c=%{commit1}; echo ${c:0:7})
Summary: High-performance HTTP accelerator
Name: varnish
Version: 7.5.0
Release: 1%{?dist}
License: BSD
URL: https://www.varnish-cache.org/
Source0: http://varnish-cache.org/_downloads/%{name}-%{version}.tgz
Source1: https://github.com/varnishcache/pkg-varnish-cache/archive/%{commit1}.tar.gz#/pkg-varnish-cache-%{shortcommit1}.tar.gz
BuildRequires: gcc make
BuildRequires: python3, python3-sphinx, python3-docutils
BuildRequires: jemalloc-devel libedit-devel ncurses-devel
BuildRequires: pcre2-devel pkgconfig nghttp2
BuildRequires: systemd-units
Requires: logrotate jemalloc ncurses pcre2
Requires: system-rpm-config
Requires(pre): shadow-utils
Requires(post): /usr/bin/uuidgen
Requires: gcc
Requires(post): systemd-units
Requires(post): systemd-sysv
Requires(preun): systemd-units
Requires(postun): systemd-units
Provides: varnish = %{version}-%{release}
Provides: varnishd(abi) = %{abi}
Provides: varnishd(vrt) = %{vrt}
Provides: vmod(blob) = %{version}-%{release}
Provides: vmod(cookie) = %{version}-%{release}
Provides: vmod(debug) = %{version}-%{release}
Provides: vmod(directors) = %{version}-%{release}
Provides: vmod(proxy) = %{version}-%{release}
Provides: vmod(purge) = %{version}-%{release}
Provides: vmod(std) = %{version}-%{release}
Provides: vmod(unix) = %{version}-%{release}
Provides: vmod(vtc) = %{version}-%{release}
%description
Varnish Cache is a web application accelerator also known as a
caching HTTP reverse proxy. You install it in front of any server
that speaks HTTP and configure it to cache the contents. Varnish
Cache is really, really fast. It typically speeds up delivery with
a factor of 300 - 1000x, depending on your architecture. A high
level overview of what Varnish does can be seen in this video.
%package devel
Summary: Development files for %{name}
Provides: varnish-libs-devel = %{version}-%{release}
Requires: %{name} = %{version}-%{release}
Requires: python3
%description devel
Development files for %{name}
%package docs
Summary: Documentation files for %name
%description docs
Documentation files for %name
%prep
%autosetup
tar xzf %SOURCE1
cp pkg-varnish-cache-%{commit1}/redhat/* .
sed -i 's,rst2man-3.6,rst2man-3.4,g; s,rst2html-3.6,rst2html-3.4,g; s,phinx-build-3.6,phinx-build-3.4,g' configure
%build
export RST2MAN=/bin/true
export PYTHON=%{__python3}
%configure LT_SYS_LIBRARY_PATH=%_libdir \
--disable-static \
--localstatedir=/var/lib \
--with-contrib \
--docdir=%{_pkgdocdir}
%make_build
sed -i 's,User=varnishlog,User=varnish,g;' varnishncsa.service
rm -rf doc/html/_sources
%install
%{make_install}
find %{buildroot}/%{_libdir}/ -name '*.la' -exec rm -f {} ';'
mkdir -p %{buildroot}/var/lib/varnish
mkdir -p %{buildroot}/var/log/varnish
mkdir -p %{buildroot}/var/run/varnish
mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d/
install -D -m 0644 etc/example.vcl %{buildroot}%{_sysconfdir}/varnish/default.vcl
install -D -m 0644 varnish.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/varnish
install -D -m 0644 include/vcs_version.h %{buildroot}%{_includedir}/varnish
install -D -m 0644 include/vrt.h %{buildroot}%{_includedir}/varnish
mkdir -p %{buildroot}%{_unitdir}
install -D -m 0644 varnish.service %{buildroot}%{_unitdir}/varnish.service
install -D -m 0644 varnishncsa.service %{buildroot}%{_unitdir}/varnishncsa.service
install -D -m 0755 varnishreload %{buildroot}%{_sbindir}/varnishreload
echo %{_libdir}/varnish > %{buildroot}%{_sysconfdir}/ld.so.conf.d/varnish-%{_arch}.conf
%check
sed -i 's/thread_pool_stack 80k/thread_pool_stack 128k/g;' bin/varnishtest/tests/*.vtc
sed -i 's/file,2M/file,8M/' bin/varnishtest/tests/r04036.vtc
%make_build check
%pre
getent group varnish >/dev/null || groupadd -r varnish
getent passwd varnish >/dev/null || \
useradd -r -g varnish -d /var/lib/varnish -s /sbin/nologin \
-c "Varnish Cache" varnish
exit 0
%post
%systemd_post varnish varnishncsa
/sbin/ldconfig
test -f /etc/varnish/secret || (uuidgen > /etc/varnish/secret && chmod 0600 /etc/varnish/secret)
%postun
%systemd_postun_with_restart varnish varnishncsa
/sbin/ldconfig
%preun
%systemd_preun varnish varnishncsa
%files
%license LICENSE
%doc README.rst ChangeLog
%doc etc/builtin.vcl etc/example.vcl
%{_sbindir}/*
%{_bindir}/*
%{_libdir}/*.so.*
%{_libdir}/%{name}
%{_var}/lib/varnish
%dir %{_sysconfdir}/varnish/
%attr(0700,varnish,varnish) %dir %{_var}/log/varnish
%config(noreplace) %{_sysconfdir}/varnish/default.vcl
%config(noreplace) %{_sysconfdir}/logrotate.d/varnish
%config %{_sysconfdir}/ld.so.conf.d/varnish-%{_arch}.conf
%{_mandir}/man1/*.1*
%{_mandir}/man3/*.3*
%{_mandir}/man7/*.7*
%{_unitdir}/varnish.service
%{_unitdir}/varnishncsa.service
%files devel
%license LICENSE
%doc README.rst
%{_libdir}/lib*.so
%{_includedir}/%{name}
%{_libdir}/pkgconfig/varnishapi.pc
%{_datadir}/%{name}
%{_datadir}/aclocal/*.m4
%files docs
%license LICENSE
%doc doc/html
%doc doc/changes*.html
%changelog
* Fri Apr 19 2024 jackeyji <jackeyji@tencent.com> - 7.5.0-1
- [Type] security
- [DESC] upgrade to 7.5.0 to fix CVE-2024-30156
* Fri Sep 08 2023 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 7.2.1-4
- Rebuilt for OpenCloudOS Stream 23.09
* Fri Apr 28 2023 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 7.2.1-3
- Rebuilt for OpenCloudOS Stream 23.05
* Fri Mar 31 2023 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 7.2.1-2
- Rebuilt for OpenCloudOS Stream 23
* Wed Dec 7 2022 cunshunxia <cunshunxia@tencent.com> - 7.2.1-1
- initial build
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。