Skip to content
Snippets Groups Projects
Commit f3a5d3f3 authored by Francesco Giacomini's avatar Francesco Giacomini
Browse files

Add HTTPG and VOMS support to openresty 1.19.9.1

* Start from the upstream SPEC file.
* Use the %{name} macro instead of explicitly repeating openresty-voms
* Use system zlib, openssl and pcre dependencies and do not specify minimum
  versions
* Remove unused macros oroprefix, {zlib,pcre,openssl}_prefix
* The voms_module_prefix macro is assumed
* Mv-ing openresty binary in openresty-voms seems irrelevant
* Don't consider "tapset" files, they don't exist (any more)
* For debug builds use -Og
* Review the packaging script
  - Minimize the list of build-time packages to install
  - Set the voms_module_prefix macro in the .rpmmacros file. The prefix is
    on the command line, with a default
  - Build only the optimized RPM
* Start docker:dind with --tls=false to avoid timeouts during CI

Issue #17
parent c5ba123a
No related branches found
No related tags found
1 merge request!18Rebase to openresty 1.19.9.1
Pipeline #61942 failed
...@@ -10,8 +10,7 @@ build-rpm: ...@@ -10,8 +10,7 @@ build-rpm:
stage: build stage: build
script: script:
- env | sort - env | sort
- export VOMS_MODULE_HOME=${CI_PROJECT_DIR} - cd rpm && sh make_packaging.sh ${CI_PROJECT_DIR} && cd ..
- cd rpm && sh make_packaging.sh && cd ..
- mv ${HOME}/rpmbuild ./rpmbuild - mv ${HOME}/rpmbuild ./rpmbuild
artifacts: artifacts:
paths: paths:
...@@ -23,7 +22,8 @@ docker-build-rpm: ...@@ -23,7 +22,8 @@ docker-build-rpm:
stage: docker-build stage: docker-build
image: docker:latest image: docker:latest
services: services:
- docker:dind - name: docker:dind
command: ["--tls=false"]
dependencies: dependencies:
- build-rpm - build-rpm
script: script:
...@@ -42,7 +42,8 @@ push-to-dockerhub: ...@@ -42,7 +42,8 @@ push-to-dockerhub:
stage: docker-push stage: docker-push
image: docker:latest image: docker:latest
services: services:
- docker:dind - name: docker:dind
command: ["--tls=false"]
dependencies: dependencies:
- docker-build-rpm - docker-build-rpm
script: script:
......
Name: openresty-voms Name: openresty-voms
Version: 1.15.8.1 Version: 1.19.9.1
Release: 7%{?dist} Release: 1%{?dist}
Summary: OpenResty with Voms Summary: OpenResty, scalable web platform by extending NGINX with Lua, with HTTPG and VOMS support
Group: System Environment/Daemons Group: System Environment/Daemons
...@@ -12,34 +12,27 @@ URL: https://openresty.org/ ...@@ -12,34 +12,27 @@ URL: https://openresty.org/
Source0: https://openresty.org/download/openresty-%{version}.tar.gz Source0: https://openresty.org/download/openresty-%{version}.tar.gz
Patch0: nginx-httpg_no_delegation.patch Patch0: nginx-httpg_no_delegation.patch
%if 0%{?amzn} >= 2 || 0%{?suse_version} || 0%{?fedora} || 0%{?rhel} >= 7 %if 0%{?amzn} >= 2 || 0%{?suse_version} || 0%{?fedora} || 0%{?rhel} >= 7
%define use_systemd 1 %define use_systemd 1
%endif %endif
Source1: openresty-voms.service Source1: %{name}.service
Source2: openresty-voms.init Source2: %{name}.init
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: perl-File-Temp BuildRequires: perl-File-Temp
BuildRequires: ccache, gcc, make, perl, systemtap-sdt-devel BuildRequires: ccache, gcc, make, perl, systemtap-sdt-devel
#BuildRequires: openresty-zlib-devel >= 1.2.11-3 BuildRequires: zlib-devel
BuildRequires: zlib-devel >= 1.2.7-18 BuildRequires: openssl-devel
#BuildRequires: openresty-openssl-devel >= 1.1.0h-1 BuildRequires: pcre-devel
BuildRequires: openssl-devel >= 1.0.2k-19 BuildRequires: voms-devel
#BuildRequires: openresty-pcre-devel >= 8.42-1 BuildRequires: boost-devel
BuildRequires: pcre-devel >= 8.32-17 Requires: zlib
#Requires: openresty-zlib >= 1.2.11-3 Requires: openssl
Requires: zlib >= 1.2.7-18 Requires: pcre
#Requires: openresty-openssl >= 1.1.0h-1 Requires: voms
Requires: openssl >= 1.0.2k-19
#Requires: openresty-pcre >= 8.42-1
Requires: pcre >= 8.32-17
# The path location is /usr/local/openresty-voms, therefore I can avoid to handle
# Conflicts for standard rpm
# Conflicts: openresty >= 1.15.8.2
%if 0%{?suse_version} %if 0%{?suse_version}
...@@ -69,31 +62,6 @@ Requires(preun): chkconfig, initscripts ...@@ -69,31 +62,6 @@ Requires(preun): chkconfig, initscripts
AutoReqProv: no AutoReqProv: no
%define orprefix %{_usr}/local/%{name} %define orprefix %{_usr}/local/%{name}
%define oroprefix /usr
%define zlib_prefix %{orprefix}/zlib
%define pcre_prefix %{orprefix}/pcre
%define openssl_prefix %{orprefix}/openssl
%define voms_module_prefix ${VOMS_MODULE_HOME}
# Remove source code from debuginfo package.
%define __debug_install_post \
%{_rpmconfigdir}/find-debuginfo.sh %{?_missing_build_ids_terminate_build:--strict-build-id} %{?_find_debuginfo_opts} "%{_builddir}/%{?buildsubdir}"; \
rm -rf "${RPM_BUILD_ROOT}/usr/src/debug"; \
mkdir -p "${RPM_BUILD_ROOT}/usr/src/debug/openresty-%{version}"; \
mkdir -p "${RPM_BUILD_ROOT}/usr/src/debug/tmp"; \
mkdir -p "${RPM_BUILD_ROOT}/usr/src/debug/builddir"; \
%{nil}
%if 0%{?fedora} >= 27
%undefine _debugsource_packages
%undefine _debuginfo_subpackages
%endif
%if 0%{?rhel} >= 8
%undefine _debugsource_packages
%undefine _debuginfo_subpackages
%endif
%description %description
...@@ -115,17 +83,41 @@ web applications that are capable to handle 10K ~ 1000K+ connections in ...@@ -115,17 +83,41 @@ web applications that are capable to handle 10K ~ 1000K+ connections in
a single box. a single box.
%if 0%{?suse_version}
%debug_package
%else
# Remove source code from debuginfo package.
%define __debug_install_post \
%{_rpmconfigdir}/find-debuginfo.sh %{?_missing_build_ids_terminate_build:--strict-build-id} %{?_find_debuginfo_opts} "%{_builddir}/%{?buildsubdir}"; \
rm -rf "${RPM_BUILD_ROOT}/usr/src/debug"; \
mkdir -p "${RPM_BUILD_ROOT}/usr/src/debug/openresty-%{version}"; \
mkdir -p "${RPM_BUILD_ROOT}/usr/src/debug/tmp"; \
mkdir -p "${RPM_BUILD_ROOT}/usr/src/debug/builddir"; \
%{nil}
%endif
%if 0%{?fedora} >= 27
%undefine _debugsource_packages
%undefine _debuginfo_subpackages
%endif
%if 0%{?rhel} >= 8
%undefine _debugsource_packages
%undefine _debuginfo_subpackages
%endif
%package resty %package resty
Summary: OpenResty command-line utility, resty Summary: OpenResty command-line utility, resty
Group: Development/Tools Group: Development/Tools
Requires: perl, openresty-voms >= %{version}-%{release} Requires: perl, %{name} >= %{version}-%{release}
Requires: perl(File::Spec), perl(FindBin), perl(List::Util), perl(Getopt::Long), perl(File::Temp), perl(POSIX), perl(Time::HiRes) Requires: perl(File::Spec), perl(FindBin), perl(List::Util), perl(Getopt::Long), perl(File::Temp), perl(POSIX), perl(Time::HiRes)
# The path location is /usr/local/openresty-voms, therefore I can avoid to handle
# Conflicts for standard rpm
# Conflicts: openresty-resty >= 1.15.8.2
%if 0%{?fedora} >= 10 || 0%{?rhel} >= 6 || 0%{?centos} >= 6 %if 0%{?fedora} >= 10 || 0%{?rhel} >= 6 || 0%{?centos} >= 6
BuildArch: noarch BuildArch: noarch
%endif %endif
...@@ -149,10 +141,6 @@ Summary: OpenResty documentation tool, restydoc ...@@ -149,10 +141,6 @@ Summary: OpenResty documentation tool, restydoc
Group: Development/Tools Group: Development/Tools
Requires: perl, perl(Getopt::Std), perl(File::Spec), perl(FindBin), perl(Cwd), perl(File::Temp), perl(Pod::Man), perl(Pod::Text) Requires: perl, perl(Getopt::Std), perl(File::Spec), perl(FindBin), perl(Cwd), perl(File::Temp), perl(Pod::Man), perl(Pod::Text)
# The path location is /usr/local/openresty-voms, therefore I can avoid to handle
# Conflicts for standard rpm
# Conflicts: openresty-doc >= 1.15.8.2
%if (!0%{?rhel} || 0%{?rhel} < 7) && !0%{?fedora} %if (!0%{?rhel} || 0%{?rhel} < 7) && !0%{?fedora}
Requires: groff Requires: groff
%endif %endif
...@@ -183,16 +171,12 @@ services, and dynamic web gateways. ...@@ -183,16 +171,12 @@ services, and dynamic web gateways.
Summary: OpenResty Package Manager Summary: OpenResty Package Manager
Group: Development/Tools Group: Development/Tools
Requires: perl, openresty-voms >= %{version}-%{release}, perl(Digest::MD5) Requires: perl, %{name} >= %{version}-%{release}, perl(Digest::MD5)
Requires: openresty-voms-doc >= %{version}-%{release}, openresty-voms-resty >= %{version}-%{release} Requires: %{name}-doc >= %{version}-%{release}, %{name}-resty >= %{version}-%{release}
Requires: curl, tar, gzip Requires: curl, tar, gzip
#BuildRequires: perl(Digest::MD5) #BuildRequires: perl(Digest::MD5)
Requires: perl(Encode), perl(FindBin), perl(File::Find), perl(File::Path), perl(File::Spec), perl(Cwd), perl(Digest::MD5), perl(File::Copy), perl(File::Temp), perl(Getopt::Long) Requires: perl(Encode), perl(FindBin), perl(File::Find), perl(File::Path), perl(File::Spec), perl(Cwd), perl(Digest::MD5), perl(File::Copy), perl(File::Temp), perl(Getopt::Long)
# The path location is /usr/local/openresty-voms, therefore I can avoid to handle
# Conflicts for standard rpm
# Conflicts: openresty-opm >= 1.15.8.2
%if 0%{?fedora} >= 10 || 0%{?rhel} >= 6 || 0%{?centos} >= 6 %if 0%{?fedora} >= 10 || 0%{?rhel} >= 6 || 0%{?centos} >= 6
BuildArch: noarch BuildArch: noarch
%endif %endif
...@@ -214,8 +198,7 @@ cd ../.. ...@@ -214,8 +198,7 @@ cd ../..
--prefix="%{orprefix}" \ --prefix="%{orprefix}" \
--with-cc='ccache gcc -fdiagnostics-color=always' \ --with-cc='ccache gcc -fdiagnostics-color=always' \
--with-debug \ --with-debug \
--with-cc-opt="-DNGX_LUA_ABORT_AT_PANIC -I%{zlib_prefix}/include -I%{pcre_prefix}/include -I%{openssl_prefix}/include -O0" \ --with-cc-opt="-DNGX_LUA_ABORT_AT_PANIC -Og" \
--with-ld-opt="-L%{zlib_prefix}/lib -L%{pcre_prefix}/lib -L%{openssl_prefix}/lib -Wl,-rpath,%{zlib_prefix}/lib:%{pcre_prefix}/lib:%{openssl_prefix}/lib" \
--with-pcre-jit \ --with-pcre-jit \
--without-http_rds_json_module \ --without-http_rds_json_module \
--without-http_rds_csv_module \ --without-http_rds_csv_module \
...@@ -240,12 +223,12 @@ cd ../.. ...@@ -240,12 +223,12 @@ cd ../..
--with-http_mp4_module \ --with-http_mp4_module \
--with-http_gunzip_module \ --with-http_gunzip_module \
--with-threads \ --with-threads \
--with-compat \
--with-luajit-xcflags='-DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT' \ --with-luajit-xcflags='-DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT' \
--with-dtrace-probes \
--add-module=%{voms_module_prefix} \ --add-module=%{voms_module_prefix} \
%{?_smp_mflags} -j`nproc`
make %{?_smp_mflags} make -j`nproc`
%install %install
...@@ -256,12 +239,10 @@ rm -rf %{buildroot}%{orprefix}/luajit/share/man ...@@ -256,12 +239,10 @@ rm -rf %{buildroot}%{orprefix}/luajit/share/man
rm -rf %{buildroot}%{orprefix}/luajit/lib/libluajit-5.1.a rm -rf %{buildroot}%{orprefix}/luajit/lib/libluajit-5.1.a
mkdir -p %{buildroot}/usr/bin mkdir -p %{buildroot}/usr/bin
mv %{buildroot}%{orprefix}/bin/openresty %{buildroot}%{orprefix}/bin/%{name}
ln -sf %{orprefix}/bin/resty %{buildroot}/usr/bin/ ln -sf %{orprefix}/bin/resty %{buildroot}/usr/bin/
ln -sf %{orprefix}/bin/restydoc %{buildroot}/usr/bin/ ln -sf %{orprefix}/bin/restydoc %{buildroot}/usr/bin/
ln -sf %{orprefix}/bin/opm %{buildroot}/usr/bin/ ln -sf %{orprefix}/bin/opm %{buildroot}/usr/bin/
ln -sf %{orprefix}/nginx/sbin/nginx %{buildroot}/usr/bin/%{name} ln -sf %{orprefix}/nginx/sbin/nginx %{buildroot}/usr/bin/%{name}
ls -al %{buildroot}/usr/bin
%if 0%{?use_systemd} %if 0%{?use_systemd}
...@@ -286,7 +267,7 @@ rm -rf %{buildroot} ...@@ -286,7 +267,7 @@ rm -rf %{buildroot}
%post %post
%if 0%{?use_systemd} %if 0%{?use_systemd}
%systemd_post openresty-voms.service %systemd_post %{name}.service
%else %else
%if ! 0%{?suse_version} %if ! 0%{?suse_version}
/sbin/chkconfig --add %{name} /sbin/chkconfig --add %{name}
...@@ -296,7 +277,7 @@ rm -rf %{buildroot} ...@@ -296,7 +277,7 @@ rm -rf %{buildroot}
%preun %preun
%if 0%{?use_systemd} %if 0%{?use_systemd}
%systemd_preun openresty-voms.service %systemd_preun %{name}.service
%else %else
%if ! 0%{?suse_version} %if ! 0%{?suse_version}
if [ $1 = 0 ]; then if [ $1 = 0 ]; then
...@@ -309,7 +290,7 @@ fi ...@@ -309,7 +290,7 @@ fi
%if 0%{?use_systemd} %if 0%{?use_systemd}
%postun %postun
%systemd_postun_with_restart openresty-voms.service %systemd_postun_with_restart %{name}.service
%endif %endif
...@@ -329,7 +310,6 @@ fi ...@@ -329,7 +310,6 @@ fi
%{orprefix}/nginx/html/* %{orprefix}/nginx/html/*
%{orprefix}/nginx/logs/ %{orprefix}/nginx/logs/
%{orprefix}/nginx/sbin/* %{orprefix}/nginx/sbin/*
%{orprefix}/nginx/tapset/*
%config(noreplace) %{orprefix}/nginx/conf/* %config(noreplace) %{orprefix}/nginx/conf/*
%{orprefix}/COPYRIGHT %{orprefix}/COPYRIGHT
...@@ -363,6 +343,18 @@ fi ...@@ -363,6 +343,18 @@ fi
%changelog %changelog
* Fri Nov 12 2021 Francesco Giacomini
- add HTTPG and VOMS support to openresty 1.19.9.1
* Fri Aug 6 2021 Yichun Zhang (agentzh) 1.19.9.1-1
- upgraded openresty to 1.19.9.1.
* Mon May 31 2021 Yichun Zhang (agentzh) 1.19.3.2-1
- upgraded openresty to 1.19.3.2.
* Fri Nov 6 2020 Yichun Zhang (agentzh) 1.19.3.1-1
- upgraded openresty to 1.19.3.1.
* Mon Jul 13 2020 Yichun Zhang (agentzh) 1.17.8.2-1
- upgraded openresty to 1.17.8.2.
* Fri Jul 3 2020 Yichun Zhang (agentzh) 1.17.8.1-1
- upgraded openresty to 1.17.8.1.
* Mon Nov 18 2019 Elisabetta Ronchieri 1.15.8.2-7 * Mon Nov 18 2019 Elisabetta Ronchieri 1.15.8.2-7
- handled rpm package with voms module. - handled rpm package with voms module.
* Thu Aug 29 2019 Yichun Zhang (agentzh) 1.15.8.2-1 * Thu Aug 29 2019 Yichun Zhang (agentzh) 1.15.8.2-1
......
Name: openresty-voms Name: openresty-voms
Version: 1.19.9.1 Version: 1.19.9.1
Release: 7%{?dist} Release: 1%{?dist}
Summary: OpenResty with Voms Summary: OpenResty, scalable web platform by extending NGINX with Lua, with HTTPG and VOMS support
Group: System Environment/Daemons Group: System Environment/Daemons
...@@ -12,32 +12,27 @@ URL: https://openresty.org/ ...@@ -12,32 +12,27 @@ URL: https://openresty.org/
Source0: https://openresty.org/download/openresty-%{version}.tar.gz Source0: https://openresty.org/download/openresty-%{version}.tar.gz
Patch0: nginx-httpg_no_delegation.patch Patch0: nginx-httpg_no_delegation.patch
%if 0%{?amzn} >= 2 || 0%{?suse_version} || 0%{?fedora} || 0%{?rhel} >= 7 %if 0%{?amzn} >= 2 || 0%{?suse_version} || 0%{?fedora} || 0%{?rhel} >= 7
%define use_systemd 1 %define use_systemd 1
%endif %endif
Source1: openresty-voms.service Source1: %{name}.service
Source2: openresty-voms.init Source2: %{name}.init
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: perl-File-Temp BuildRequires: perl-File-Temp
BuildRequires: ccache, gcc, make, perl, systemtap-sdt-devel BuildRequires: ccache, gcc, make, perl, systemtap-sdt-devel
BuildRequires: zlib-devel >= 1.2.7-18 BuildRequires: zlib-devel
BuildRequires: openssl-devel >= 1.0.2k-19 BuildRequires: openssl-devel
BuildRequires: pcre-devel >= 8.32-17 BuildRequires: pcre-devel
BuildRequires: voms-devel BuildRequires: voms-devel
BuildRequires: boost-devel BuildRequires: boost-devel
Requires: zlib >= 1.2.7-18 Requires: zlib
Requires: openssl >= 1.0.2k-19 Requires: openssl
Requires: pcre >= 8.32-17 Requires: pcre
Requires: voms Requires: voms
# The path location is /usr/local/openresty-voms, therefore I can avoid to handle
# Conflicts for standard rpm
# Conflicts: openresty
%if 0%{?suse_version} %if 0%{?suse_version}
...@@ -67,31 +62,6 @@ Requires(preun): chkconfig, initscripts ...@@ -67,31 +62,6 @@ Requires(preun): chkconfig, initscripts
AutoReqProv: no AutoReqProv: no
%define orprefix %{_usr}/local/%{name} %define orprefix %{_usr}/local/%{name}
#%define oroprefix %{_usr}/local/openresty
%define zlib_prefix /usr
%define pcre_prefix /usr
%define openssl_prefix %{orprefix}/openssl
%define voms_module_prefix ${VOMS_MODULE_HOME}
# Remove source code from debuginfo package.
%define __debug_install_post \
%{_rpmconfigdir}/find-debuginfo.sh %{?_missing_build_ids_terminate_build:--strict-build-id} %{?_find_debuginfo_opts} "%{_builddir}/%{?buildsubdir}"; \
rm -rf "${RPM_BUILD_ROOT}/usr/src/debug"; \
mkdir -p "${RPM_BUILD_ROOT}/usr/src/debug/openresty-%{version}"; \
mkdir -p "${RPM_BUILD_ROOT}/usr/src/debug/tmp"; \
mkdir -p "${RPM_BUILD_ROOT}/usr/src/debug/builddir"; \
%{nil}
%if 0%{?fedora} >= 27
%undefine _debugsource_packages
%undefine _debuginfo_subpackages
%endif
%if 0%{?rhel} >= 8
%undefine _debugsource_packages
%undefine _debuginfo_subpackages
%endif
%description %description
...@@ -113,17 +83,41 @@ web applications that are capable to handle 10K ~ 1000K+ connections in ...@@ -113,17 +83,41 @@ web applications that are capable to handle 10K ~ 1000K+ connections in
a single box. a single box.
%if 0%{?suse_version}
%debug_package
%else
# Remove source code from debuginfo package.
%define __debug_install_post \
%{_rpmconfigdir}/find-debuginfo.sh %{?_missing_build_ids_terminate_build:--strict-build-id} %{?_find_debuginfo_opts} "%{_builddir}/%{?buildsubdir}"; \
rm -rf "${RPM_BUILD_ROOT}/usr/src/debug"; \
mkdir -p "${RPM_BUILD_ROOT}/usr/src/debug/openresty-%{version}"; \
mkdir -p "${RPM_BUILD_ROOT}/usr/src/debug/tmp"; \
mkdir -p "${RPM_BUILD_ROOT}/usr/src/debug/builddir"; \
%{nil}
%endif
%if 0%{?fedora} >= 27
%undefine _debugsource_packages
%undefine _debuginfo_subpackages
%endif
%if 0%{?rhel} >= 8
%undefine _debugsource_packages
%undefine _debuginfo_subpackages
%endif
%package resty %package resty
Summary: OpenResty command-line utility, resty Summary: OpenResty command-line utility, resty
Group: Development/Tools Group: Development/Tools
Requires: perl, openresty-voms >= %{version}-%{release} Requires: perl, %{name} >= %{version}-%{release}
Requires: perl(File::Spec), perl(FindBin), perl(List::Util), perl(Getopt::Long), perl(File::Temp), perl(POSIX), perl(Time::HiRes) Requires: perl(File::Spec), perl(FindBin), perl(List::Util), perl(Getopt::Long), perl(File::Temp), perl(POSIX), perl(Time::HiRes)
# The path location is /usr/local/openresty-voms, therefore I can avoid to handle
# Conflicts for standard rpm
# Conflicts: openresty-resty
%if 0%{?fedora} >= 10 || 0%{?rhel} >= 6 || 0%{?centos} >= 6 %if 0%{?fedora} >= 10 || 0%{?rhel} >= 6 || 0%{?centos} >= 6
BuildArch: noarch BuildArch: noarch
%endif %endif
...@@ -147,10 +141,6 @@ Summary: OpenResty documentation tool, restydoc ...@@ -147,10 +141,6 @@ Summary: OpenResty documentation tool, restydoc
Group: Development/Tools Group: Development/Tools
Requires: perl, perl(Getopt::Std), perl(File::Spec), perl(FindBin), perl(Cwd), perl(File::Temp), perl(Pod::Man), perl(Pod::Text) Requires: perl, perl(Getopt::Std), perl(File::Spec), perl(FindBin), perl(Cwd), perl(File::Temp), perl(Pod::Man), perl(Pod::Text)
# The path location is /usr/local/openresty-voms, therefore I can avoid to handle
# Conflicts for standard rpm
# Conflicts: openresty-doc >= 1.15.8.2
%if (!0%{?rhel} || 0%{?rhel} < 7) && !0%{?fedora} %if (!0%{?rhel} || 0%{?rhel} < 7) && !0%{?fedora}
Requires: groff Requires: groff
%endif %endif
...@@ -181,16 +171,12 @@ services, and dynamic web gateways. ...@@ -181,16 +171,12 @@ services, and dynamic web gateways.
Summary: OpenResty Package Manager Summary: OpenResty Package Manager
Group: Development/Tools Group: Development/Tools
Requires: perl, openresty-voms >= %{version}-%{release}, perl(Digest::MD5) Requires: perl, %{name} >= %{version}-%{release}, perl(Digest::MD5)
Requires: openresty-voms-doc >= %{version}-%{release}, openresty-voms-resty >= %{version}-%{release} Requires: %{name}-doc >= %{version}-%{release}, %{name}-resty >= %{version}-%{release}
Requires: curl, tar, gzip Requires: curl, tar, gzip
#BuildRequires: perl(Digest::MD5) #BuildRequires: perl(Digest::MD5)
Requires: perl(Encode), perl(FindBin), perl(File::Find), perl(File::Path), perl(File::Spec), perl(Cwd), perl(Digest::MD5), perl(File::Copy), perl(File::Temp), perl(Getopt::Long) Requires: perl(Encode), perl(FindBin), perl(File::Find), perl(File::Path), perl(File::Spec), perl(Cwd), perl(Digest::MD5), perl(File::Copy), perl(File::Temp), perl(Getopt::Long)
# The path location is /usr/local/openresty-voms, therefore I can avoid to handle
# Conflicts for standard rpm
# Conflicts: openresty-opm >= 1.15.8.2
%if 0%{?fedora} >= 10 || 0%{?rhel} >= 6 || 0%{?centos} >= 6 %if 0%{?fedora} >= 10 || 0%{?rhel} >= 6 || 0%{?centos} >= 6
BuildArch: noarch BuildArch: noarch
%endif %endif
...@@ -211,8 +197,7 @@ cd ../.. ...@@ -211,8 +197,7 @@ cd ../..
./configure \ ./configure \
--prefix="%{orprefix}" \ --prefix="%{orprefix}" \
--with-cc='ccache gcc -fdiagnostics-color=always' \ --with-cc='ccache gcc -fdiagnostics-color=always' \
--with-cc-opt="-DNGX_LUA_ABORT_AT_PANIC -I%{zlib_prefix}/include -I%{pcre_prefix}/include -I%{openssl_prefix}/include" \ --with-cc-opt="-DNGX_LUA_ABORT_AT_PANIC" \
--with-ld-opt="-L%{zlib_prefix}/lib -L%{pcre_prefix}/lib -L%{openssl_prefix}/lib -Wl,-rpath,%{zlib_prefix}/lib:%{pcre_prefix}/lib:%{openssl_prefix}/lib" \
--with-pcre-jit \ --with-pcre-jit \
--without-http_rds_json_module \ --without-http_rds_json_module \
--without-http_rds_csv_module \ --without-http_rds_csv_module \
...@@ -237,12 +222,12 @@ cd ../.. ...@@ -237,12 +222,12 @@ cd ../..
--with-http_mp4_module \ --with-http_mp4_module \
--with-http_gunzip_module \ --with-http_gunzip_module \
--with-threads \ --with-threads \
--with-compat \
--with-luajit-xcflags='-DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT' \ --with-luajit-xcflags='-DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT' \
--with-dtrace-probes \
--add-module=%{voms_module_prefix} \ --add-module=%{voms_module_prefix} \
%{?_smp_mflags} -j`nproc`
make %{?_smp_mflags} make -j`nproc`
%install %install
...@@ -253,12 +238,10 @@ rm -rf %{buildroot}%{orprefix}/luajit/share/man ...@@ -253,12 +238,10 @@ rm -rf %{buildroot}%{orprefix}/luajit/share/man
rm -rf %{buildroot}%{orprefix}/luajit/lib/libluajit-5.1.a rm -rf %{buildroot}%{orprefix}/luajit/lib/libluajit-5.1.a
mkdir -p %{buildroot}/usr/bin mkdir -p %{buildroot}/usr/bin
mv %{buildroot}%{orprefix}/bin/openresty %{buildroot}%{orprefix}/bin/%{name}
ln -sf %{orprefix}/bin/resty %{buildroot}/usr/bin/ ln -sf %{orprefix}/bin/resty %{buildroot}/usr/bin/
ln -sf %{orprefix}/bin/restydoc %{buildroot}/usr/bin/ ln -sf %{orprefix}/bin/restydoc %{buildroot}/usr/bin/
ln -sf %{orprefix}/bin/opm %{buildroot}/usr/bin/ ln -sf %{orprefix}/bin/opm %{buildroot}/usr/bin/
ln -sf %{orprefix}/nginx/sbin/nginx %{buildroot}/usr/bin/%{name} ln -sf %{orprefix}/nginx/sbin/nginx %{buildroot}/usr/bin/%{name}
ls -al %{buildroot}/usr/bin
%if 0%{?use_systemd} %if 0%{?use_systemd}
...@@ -283,7 +266,7 @@ rm -rf %{buildroot} ...@@ -283,7 +266,7 @@ rm -rf %{buildroot}
%post %post
%if 0%{?use_systemd} %if 0%{?use_systemd}
%systemd_post openresty-voms.service %systemd_post %{name}.service
%else %else
%if ! 0%{?suse_version} %if ! 0%{?suse_version}
/sbin/chkconfig --add %{name} /sbin/chkconfig --add %{name}
...@@ -293,7 +276,7 @@ rm -rf %{buildroot} ...@@ -293,7 +276,7 @@ rm -rf %{buildroot}
%preun %preun
%if 0%{?use_systemd} %if 0%{?use_systemd}
%systemd_preun openresty-voms.service %systemd_preun %{name}.service
%else %else
%if ! 0%{?suse_version} %if ! 0%{?suse_version}
if [ $1 = 0 ]; then if [ $1 = 0 ]; then
...@@ -306,7 +289,7 @@ fi ...@@ -306,7 +289,7 @@ fi
%if 0%{?use_systemd} %if 0%{?use_systemd}
%postun %postun
%systemd_postun_with_restart openresty-voms.service %systemd_postun_with_restart %{name}.service
%endif %endif
...@@ -326,7 +309,6 @@ fi ...@@ -326,7 +309,6 @@ fi
%{orprefix}/nginx/html/* %{orprefix}/nginx/html/*
%{orprefix}/nginx/logs/ %{orprefix}/nginx/logs/
%{orprefix}/nginx/sbin/* %{orprefix}/nginx/sbin/*
%{orprefix}/nginx/tapset/*
%config(noreplace) %{orprefix}/nginx/conf/* %config(noreplace) %{orprefix}/nginx/conf/*
%{orprefix}/COPYRIGHT %{orprefix}/COPYRIGHT
...@@ -360,6 +342,18 @@ fi ...@@ -360,6 +342,18 @@ fi
%changelog %changelog
* Fri Nov 12 2021 Francesco Giacomini
- add HTTPG and VOMS support to openresty 1.19.9.1
* Fri Aug 6 2021 Yichun Zhang (agentzh) 1.19.9.1-1
- upgraded openresty to 1.19.9.1.
* Mon May 31 2021 Yichun Zhang (agentzh) 1.19.3.2-1
- upgraded openresty to 1.19.3.2.
* Fri Nov 6 2020 Yichun Zhang (agentzh) 1.19.3.1-1
- upgraded openresty to 1.19.3.1.
* Mon Jul 13 2020 Yichun Zhang (agentzh) 1.17.8.2-1
- upgraded openresty to 1.17.8.2.
* Fri Jul 3 2020 Yichun Zhang (agentzh) 1.17.8.1-1
- upgraded openresty to 1.17.8.1.
* Mon Nov 18 2019 Elisabetta Ronchieri 1.15.8.2-7 * Mon Nov 18 2019 Elisabetta Ronchieri 1.15.8.2-7
- handled rpm package with voms module. - handled rpm package with voms module.
* Thu Aug 29 2019 Yichun Zhang (agentzh) 1.15.8.2-1 * Thu Aug 29 2019 Yichun Zhang (agentzh) 1.15.8.2-1
......
#!/bin/sh #!/bin/sh
# install rpm build tools: voms_module_prefix=${HOME}/ngx_http_voms_module
sudo yum install -y rpm-build redhat-rpm-config rpmdevtools if [ $# -eq 1 ]; then
voms_module_prefix=$1
# install openresty's build requirements: fi
sudo yum install -y gcc make perl \
perl-Data-Dumper libtool ElectricFence systemtap-sdt-devel valgrind-devel \
ccache clang boost-devel
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
echo '%_topdir %(echo $HOME)/rpmbuild' > ~/.rpmmacros
cp ${HOME}/nginx-httpg_no_delegation.patch ~/rpmbuild/SOURCES/ if [ ! -d "$voms_module_prefix" ]; then
echo "$voms_module_prefix doesn't exist" >&2
exit 1
fi
cp SOURCES/* ~/rpmbuild/SOURCES/ # install rpm build tools:
cp SPECS/*.spec ~/rpmbuild/SPECS/ sudo yum install -y rpm-build redhat-rpm-config rpmdevtools
cd ~/rpmbuild/SPECS
for file in *.spec; do mkdir -p ${HOME}/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
spectool -g -R $file cat <<EOF > ${HOME}/.rpmmacros
done %_topdir %{getenv:HOME}/rpmbuild
%voms_module_prefix ${voms_module_prefix}
EOF
cat ${CI_PROJECT_DIR}/.rpmmacros cat ${HOME}/.rpmmacros
rpmbuild -ba openresty-voms.spec cp ${HOME}/nginx-httpg_no_delegation.patch ${HOME}/rpmbuild/SOURCES/
cd ~ cp SOURCES/* ${HOME}/rpmbuild/SOURCES/
cp SPECS/*.spec ${HOME}/rpmbuild/SPECS/
# tar cvzf rpmbuild.tar.gz rpmbuild spectool -g -R ${HOME}/rpmbuild/SPECS/openresty-voms.spec
rpmbuild -ba ${HOME}/rpmbuild/SPECS/openresty-voms.spec
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment