Explicitly using python3 on all targets
Explicitly using utf8 under install on el6 for python quirks
This commit is contained in:
parent
323126fe83
commit
0e21e17167
44
varnish.spec
44
varnish.spec
@ -9,17 +9,10 @@
|
|||||||
%global commit1 0ad2f22629c4a368959c423a19e352c9c6c79682
|
%global commit1 0ad2f22629c4a368959c423a19e352c9c6c79682
|
||||||
%global shortcommit1 %(c=%{commit1}; echo ${c:0:7})
|
%global shortcommit1 %(c=%{commit1}; echo ${c:0:7})
|
||||||
|
|
||||||
%bcond_without python2
|
|
||||||
%bcond_with python3
|
|
||||||
|
|
||||||
%if %{with python2} == %{with python3}
|
|
||||||
%error Pick exactly one Python version
|
|
||||||
%endif
|
|
||||||
|
|
||||||
Summary: High-performance HTTP accelerator
|
Summary: High-performance HTTP accelerator
|
||||||
Name: varnish
|
Name: varnish
|
||||||
Version: 6.0.1
|
Version: 6.0.1
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
License: BSD
|
License: BSD
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
URL: https://www.varnish-cache.org/
|
URL: https://www.varnish-cache.org/
|
||||||
@ -34,20 +27,13 @@ Patch12: varnish-6.0.1_fix_bug2668.patch
|
|||||||
|
|
||||||
Obsoletes: varnish-libs
|
Obsoletes: varnish-libs
|
||||||
|
|
||||||
%if %{with python3}
|
|
||||||
%if 0%{?rhel} == 6
|
%if 0%{?rhel} == 6
|
||||||
BuildRequires: python34-docutils
|
BuildRequires: python-sphinx python34-docutils
|
||||||
%else
|
%else
|
||||||
BuildRequires: python3-sphinx, python3-docutils
|
BuildRequires: python3-sphinx, python3-docutils
|
||||||
%endif
|
%endif
|
||||||
%else
|
|
||||||
%if 0%{?rhel} >= 6
|
|
||||||
BuildRequires: python-sphinx
|
|
||||||
%endif
|
|
||||||
BuildRequires: jemalloc-devel
|
BuildRequires: jemalloc-devel
|
||||||
BuildRequires: libedit-devel
|
BuildRequires: libedit-devel
|
||||||
BuildRequires: python-docutils
|
|
||||||
%endif
|
|
||||||
BuildRequires: ncurses-devel
|
BuildRequires: ncurses-devel
|
||||||
BuildRequires: pcre-devel
|
BuildRequires: pcre-devel
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
@ -107,15 +93,11 @@ Development files for %{name}
|
|||||||
Varnish Cache is a high-performance HTTP accelerator
|
Varnish Cache is a high-performance HTTP accelerator
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
|
||||||
%if %{with python3}
|
|
||||||
%if 0%{?rhel} == 6
|
%if 0%{?rhel} == 6
|
||||||
Requires: python34
|
Requires: python34
|
||||||
%else
|
%else
|
||||||
Requires: python3
|
Requires: python3
|
||||||
%endif
|
%endif
|
||||||
%else
|
|
||||||
Requires: python
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%package docs
|
%package docs
|
||||||
Summary: Documentation files for %name
|
Summary: Documentation files for %name
|
||||||
@ -169,9 +151,8 @@ export CFLAGS="%{optflags} -fno-exceptions -fPIC -ffloat-store"
|
|||||||
|
|
||||||
# Man pages are prebuilt. No need to regenerate them.
|
# Man pages are prebuilt. No need to regenerate them.
|
||||||
export RST2MAN=/bin/true
|
export RST2MAN=/bin/true
|
||||||
%if %{with python3}
|
# Explicit python, please
|
||||||
export PYTHON=/usr/bin/python3
|
export PYTHON=/usr/bin/python3
|
||||||
%endif
|
|
||||||
|
|
||||||
%configure --disable-static \
|
%configure --disable-static \
|
||||||
%ifarch aarch64
|
%ifarch aarch64
|
||||||
@ -208,11 +189,8 @@ make %{?_smp_mflags} V=1
|
|||||||
sed -i 's,User=varnishlog,User=varnish,g;' redhat/varnishncsa.service
|
sed -i 's,User=varnishlog,User=varnish,g;' redhat/varnishncsa.service
|
||||||
|
|
||||||
# Explicit python, please
|
# Explicit python, please
|
||||||
%if %{with python2}
|
sed -i 's,env python,python3,;' lib/libvcc/vmodtool.py
|
||||||
sed -i 's/env python/python2/g;' lib/libvcc/vmodtool.py
|
sed -i 's,env python,python3,;' lib/libvcc/vsctool.py
|
||||||
%else
|
|
||||||
sed -i 's/env python/python3/g;' lib/libvcc/vmodtool.py
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# Clean up the html documentation
|
# Clean up the html documentation
|
||||||
rm -rf doc/html/_sources
|
rm -rf doc/html/_sources
|
||||||
@ -225,6 +203,12 @@ make %{?_smp_mflags} check LD_LIBRARY_PATH="%{buildroot}%{_libdir}:%{buildroot}%
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
|
# el6 defaults to LANG=C, which makes python3 fail on utf8
|
||||||
|
%if 0%{?rhel} == 6
|
||||||
|
export LANG=en_US.UTF-8
|
||||||
|
%endif
|
||||||
|
|
||||||
make install DESTDIR=%{buildroot} INSTALL="install -p"
|
make install DESTDIR=%{buildroot} INSTALL="install -p"
|
||||||
|
|
||||||
# None of these for fedora
|
# None of these for fedora
|
||||||
@ -389,12 +373,16 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Oct 09 2018 Ingvar Hagelund <ingvar@redpill-linpro.com> - 6.0.1-2
|
||||||
|
- Explicitly using python3 on all targets
|
||||||
|
- Explicitly using utf8 under install on el6 for python quirks
|
||||||
|
|
||||||
* Thu Sep 27 2018 Ingvar Hagelund <ingvar@redpill-linpro.com> - 6.0.1-1
|
* Thu Sep 27 2018 Ingvar Hagelund <ingvar@redpill-linpro.com> - 6.0.1-1
|
||||||
- New upstream release
|
- New upstream release
|
||||||
- Removed graphciz from BuildRequires. It is not used
|
- Removed graphciz from BuildRequires. It is not used
|
||||||
- Removed patch for fortify_source on el6. It is merged upstream
|
- Removed patch for fortify_source on el6. It is merged upstream
|
||||||
- Small workaround for test suite problem with old readline/curses on el6
|
- Small workaround for test suite problem with old readline/curses on el6
|
||||||
- Now fully using bcond_with python3, for simpler future deprication of python2
|
- Supports bcond_with python3, for simpler future deprication of python2
|
||||||
- Added -fno-exceptions to CFLAGS on el6, see upstream issue #2793
|
- Added -fno-exceptions to CFLAGS on el6, see upstream issue #2793
|
||||||
|
|
||||||
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.0-2
|
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.0-2
|
||||||
|
Loading…
Reference in New Issue
Block a user