diff --git a/README.en.md b/README.en.md deleted file mode 100644 index be830170698cb122bb35ffaf25fbd18869fb5819..0000000000000000000000000000000000000000 --- a/README.en.md +++ /dev/null @@ -1,36 +0,0 @@ -# varnish - -#### Description -{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**} - -#### Software Architecture -Software architecture description - -#### Installation - -1. xxxx -2. xxxx -3. xxxx - -#### Instructions - -1. xxxx -2. xxxx -3. xxxx - -#### Contribution - -1. Fork the repository -2. Create Feat_xxx branch -3. Commit your code -4. Create Pull Request - - -#### Gitee Feature - -1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md -2. Gitee blog [blog.gitee.com](https://blog.gitee.com) -3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) -4. The most valuable open source project [GVP](https://gitee.com/gvp) -5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/README.md b/README.md deleted file mode 100644 index 80355e14765897d0341914cee8685a4d23522a9f..0000000000000000000000000000000000000000 --- a/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# varnish - -#### 介绍 -{**以下是码云平台说明,您可以替换此简介** -码云是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台 -无论是个人、团队、或是企业,都能够用码云实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)} - -#### 软件架构 -软件架构说明 - - -#### 安装教程 - -1. xxxx -2. xxxx -3. xxxx - -#### 使用说明 - -1. xxxx -2. xxxx -3. xxxx - -#### 参与贡献 - -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request - - -#### 码云特技 - -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目 -5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/pkg-varnish-cache-0ad2f22.tar.gz b/pkg-varnish-cache-0ad2f22.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..15aa1138aa2c3cd1cdb6dd4d466bac183d940d99 Binary files /dev/null and b/pkg-varnish-cache-0ad2f22.tar.gz differ diff --git a/varnish-5.1.1.fix_ld_library_path_in_doc_build.patch b/varnish-5.1.1.fix_ld_library_path_in_doc_build.patch new file mode 100644 index 0000000000000000000000000000000000000000..127a23f7d31c885225587199f0146f9807700f95 --- /dev/null +++ b/varnish-5.1.1.fix_ld_library_path_in_doc_build.patch @@ -0,0 +1,41 @@ +--- a/doc/sphinx/Makefile.in 2017-03-16 16:01:18.440999286 +0100 ++++ b/doc/sphinx/Makefile.in 2017-03-16 16:02:38.557728852 +0100 +@@ -626,28 +626,38 @@ + # XXX add varnishstat here when it's been _opt2rst'ed + + include/varnishncsa_options.rst: $(top_builddir)/bin/varnishncsa/varnishncsa ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/bin/varnishncsa/varnishncsa --options > $@ + include/varnishncsa_synopsis.rst: $(top_builddir)/bin/varnishncsa/varnishncsa ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/bin/varnishncsa/varnishncsa --synopsis > $@ + + include/varnishlog_options.rst: $(top_builddir)/bin/varnishlog/varnishlog ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/bin/varnishlog/varnishlog --options > $@ + include/varnishlog_synopsis.rst: $(top_builddir)/bin/varnishlog/varnishlog ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/bin/varnishlog/varnishlog --synopsis > $@ + + include/varnishtop_options.rst: $(top_builddir)/bin/varnishtop/varnishtop ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/bin/varnishtop/varnishtop --options > $@ + include/varnishtop_synopsis.rst: $(top_builddir)/bin/varnishtop/varnishtop ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/bin/varnishtop/varnishtop --synopsis > $@ + + include/varnishhist_options.rst: $(top_builddir)/bin/varnishhist/varnishhist ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/bin/varnishhist/varnishhist --options > $@ + include/varnishhist_synopsis.rst: $(top_builddir)/bin/varnishhist/varnishhist ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/bin/varnishhist/varnishhist --synopsis > $@ + + include/varnishstat_options.rst: $(top_builddir)/bin/varnishstat/varnishstat ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/bin/varnishstat/varnishstat --options > $@ + include/varnishstat_synopsis.rst: $(top_builddir)/bin/varnishstat/varnishstat ++ LD_LIBRARY_PATH=$(top_builddir)/lib/libvarnishapi/.libs \ + $(top_builddir)/bin/varnishstat/varnishstat --synopsis > $@ + + include/vsl-tags.rst: $(top_builddir)/lib/libvarnishapi/vsl2rst diff --git a/varnish-6.0.0.tgz b/varnish-6.0.0.tgz new file mode 100644 index 0000000000000000000000000000000000000000..8c30010891d1193d669ea0333474985e80275485 Binary files /dev/null and b/varnish-6.0.0.tgz differ diff --git a/varnish.spec b/varnish.spec new file mode 100644 index 0000000000000000000000000000000000000000..1eefd1091ad26e24321e9509227f6ca6fb28e72d --- /dev/null +++ b/varnish.spec @@ -0,0 +1,161 @@ +Name: varnish +Summary: A web application accelerator +Version: 6.0.0 +Release: 4 +License: BSD +URL: https://www.varnish-cache.org/ +Source0: http://varnish-cache.org/_downloads/varnish-%{version}.tgz + +# https://github.com/varnishcache/pkg-varnish-cache +Source1: https://github.com/varnishcache/pkg-varnish-cache/archive/0ad2f22629c4a368959c423a19e352c9c6c79682/pkg-varnish-cache-0ad2f22.tar.gz + +Patch0001: varnish-5.1.1.fix_ld_library_path_in_doc_build.patch + +BuildRequires: python3-sphinx python3-docutils pkgconfig make graphviz nghttp2 systemd-units +BuildRequires: ncurses-devel pcre-devel libedit-devel +Requires: logrotate ncurses pcre jemalloc openEuler-rpm-config gcc +Requires(pre): shadow-utils +Requires(post): /usr/bin/uuidgen systemd-units systemd-sysv +Requires(preun): systemd-units +Requires(postun): systemd-units +Obsoletes: varnish-libs + +%description +This is Varnish Cache, 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. + +%package devel +Summary: Development files for varnish +BuildRequires: ncurses-devel +Requires: varnish = %{version}-%{release} python3 +Provides: varnish-libs-devel = %{version}-%{release} +Obsoletes: varnish-libs-devel + +%description devel +Development files for varnish. +Varnish Cache is a high-performance HTTP accelerator + +%package help +Summary: Help documentation files for varnish +Requires: varnish = %{version}-%{release} +Provides: varnish-docs = %{version}-%{release} +Obsoletes: varnish-docs < %{version}-%{release} +BuildArch: noarch + +%description help +Help documentation files for varnish. + +%prep +%autosetup -p1 -a 0 -a 1 +ln -s pkg-varnish-cache-0ad2f22629c4a368959c423a19e352c9c6c79682/redhat redhat +ln -s pkg-varnish-cache-0ad2f22629c4a368959c423a19e352c9c6c79682/debian debian +cp redhat/find-provides . + +%build +export RST2MAN=/bin/true + +%configure --disable-static \ +%ifarch aarch64 + --with-jemalloc=no \ +%endif + --localstatedir=/var/lib \ + --docdir="%{_docdir}/varnish" + +sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g; + s|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool + +mkdir lib/libvarnishapi/.libs +pushd lib/libvarnishapi/.libs +ln -s libvarnishapi.so libvarnishapi.so.1 +popd + +%make_build + +sed -i 's,User=varnishlog,User=varnish,g;' redhat/varnishncsa.service +sed -i 's/env python/python3/g;' lib/libvcc/vmodtool.py + +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/ +mkdir -p %{buildroot}%{_unitdir} + +install -D -m 0644 etc/example.vcl %{buildroot}%{_sysconfdir}/varnish/default.vcl +install -D -m 0644 redhat/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 +install -D -m 0644 redhat/varnish.service %{buildroot}%{_unitdir}/varnish.service +install -D -m 0644 redhat/varnishncsa.service %{buildroot}%{_unitdir}/varnishncsa.service +install -D -m 0755 redhat/varnishreload %{buildroot}%{_sbindir}/varnishreload + +echo %{_libdir}/varnish > %{buildroot}%{_sysconfdir}/ld.so.conf.d/varnish-%{_arch}.conf + +chmod 644 lib/libvmod_*/*.c +chmod 644 lib/libvmod_*/*.h + +%check +%ifarch aarch64 +sed -i 's/48/128/g;' bin/varnishtest/tests/c00057.vtc +%endif +make %{?_smp_mflags} check LD_LIBRARY_PATH="%{buildroot}%{_libdir}:%{buildroot}%{_libdir}/%{name}" VERBOSE=1 + +%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.service +/sbin/ldconfig + +chown varnish:varnish /var/log/varnish/varnishncsa.log 2>/dev/null || true + +test -f /etc/varnish/secret || (uuidgen > /etc/varnish/secret && chmod 0600 /etc/varnish/secret) + +%preun +%systemd_preun varnish.service + +%files +%license LICENSE +%dir %{_sysconfdir}/varnish/ +%attr(0700,varnish,varnish) %dir %{_var}/log/varnish +%{_sbindir}/* +%{_bindir}/* +%{_libdir}/*.so.* +%{_libdir}/varnish +%{_var}/lib/varnish +%config(noreplace) %{_sysconfdir}/varnish/default.vcl +%config(noreplace) %{_sysconfdir}/logrotate.d/varnish +%config %{_sysconfdir}/ld.so.conf.d/varnish-%{_arch}.conf + +%{_unitdir}/varnish.service +%{_unitdir}/varnishncsa.service + +%files devel +%{_includedir}/varnish +%{_libdir}/lib*.so +%{_libdir}/pkgconfig/varnishapi.pc +%{_datadir}/varnish +%{_datadir}/aclocal/*.m4 +%exclude %{_docdir}/varnish/{builtin.vcl,example.vcl} + +%files help +%doc doc/html doc/changes*.html README.rst ChangeLog etc/builtin.vcl etc/example.vcl +%{_mandir}/man1/*.1* +%{_mandir}/man3/*.3* +%{_mandir}/man7/*.7* + +%changelog +* Mon Feb 10 2020 wangye - 6.0.0-4 +- Init package