Packaging: removed support for SLES and derivatives.

The packages were never built for those OSes.
This commit is contained in:
Konstantin Pavlov
2022-06-21 15:04:19 +04:00
parent c65e04682e
commit 97124fc349
13 changed files with 5 additions and 144 deletions

View File

@@ -18,12 +18,6 @@ else ifeq ($(shell rpm --eval "%{?rhel}"), 9)
OSVER = centos9
else ifeq ($(shell rpm --eval "%{?amzn}"), 2)
OSVER = amazonlinux2
else ifeq ($(shell test `rpm --eval '0%{?suse_version} -ge 1315 -a 0%{?suse_version} -lt 1330 -a 0%{?is_opensuse} -eq 1'`; echo $$?), 0)
OSVER = opensuse-leap
else ifeq ($(shell test `rpm --eval '0%{?suse_version} -ge 1330 -a 0%{?is_opensuse} -eq 1'`; echo $$?), 0)
OSVER = opensuse-tumbleweed
else ifeq ($(shell test `rpm --eval '0%{?suse_version} -ge 1315 -a 0%{?is_opensuse} -eq 0'`; echo $$?), 0)
OSVER = sles
else ifeq ($(shell test `rpm --eval '0%{?fedora} -ge 35'`; echo $$?),0)
OSVER = fedora
endif
@@ -34,15 +28,11 @@ ifeq ($(OSVER), centos7)
BUILD_DEPENDS_unit += which
endif
ifneq (,$(findstring $(OSVER),opensuse-leap opensuse-tumbleweed sles))
BUILD_DEPENDS_unit += libxml2-tools libxslt1 libopenssl-devel
else
ifneq (,$(findstring $(OSVER),amazonlinux2))
BUILD_DEPENDS_unit += libxml2 libxslt openssl11-devel
else
BUILD_DEPENDS_unit += libxml2 libxslt openssl-devel
endif
endif
BUILD_DEPENDS = $(BUILD_DEPENDS_unit)
@@ -90,29 +80,6 @@ include Makefile.jsc-common
include Makefile.jsc8
endif
ifeq ($(OSVER), opensuse-leap)
include Makefile.python27
include Makefile.python34
include Makefile.go
include Makefile.perl
include Makefile.ruby
endif
ifeq ($(OSVER), opensuse-tumbleweed)
include Makefile.php
include Makefile.python27
include Makefile.python36
include Makefile.go
include Makefile.perl
include Makefile.ruby
endif
ifeq ($(OSVER), sles)
include Makefile.python27
include Makefile.python34
include Makefile.perl
endif
ifeq ($(OSVER), fedora)
include Makefile.php
include Makefile.python310

View File

@@ -15,28 +15,17 @@ MODULE_SOURCES_go= unit.example-go-app \
ifeq ($(OSVER), centos6)
BUILD_DEPENDS_go= epel-release golang
else ifneq (,$(findstring $(OSVER),opensuse-leap opensuse-tumbleweed))
BUILD_DEPENDS_go= go1.9
else
BUILD_DEPENDS_go= golang
endif
BUILD_DEPENDS+= $(BUILD_DEPENDS_go)
ifneq (,$(findstring $(OSVER),opensuse-leap opensuse-tumbleweed))
define MODULE_DEFINITIONS_go
BuildArch: noarch
Requires: unit-devel == $(VERSION)-$(RELEASE)%{?dist}.ngx
BuildRequires: $(BUILD_DEPENDS_go)
%define gopath /usr/share/go/contrib
endef
else
define MODULE_DEFINITIONS_go
BuildArch: noarch
Requires: unit-devel == $(VERSION)-$(RELEASE)%{?dist}.ngx
BuildRequires: $(BUILD_DEPENDS_go)
endef
endif
export MODULE_DEFINITIONS_go
define MODULE_PREINSTALL_go

View File

@@ -13,11 +13,7 @@ MODULE_INSTARGS_perl= perl-install
MODULE_SOURCES_perl= unit.example-perl-app \
unit.example-perl-config
ifneq (,$(findstring $(OSVER),opensuse-leap opensuse-tumbleweed sles))
BUILD_DEPENDS_perl= perl
else
BUILD_DEPENDS_perl= perl-devel perl-libs perl-ExtUtils-Embed
endif
BUILD_DEPENDS+= $(BUILD_DEPENDS_perl)

View File

@@ -13,11 +13,7 @@ MODULE_INSTARGS_php= php-install
MODULE_SOURCES_php= unit.example-php-app \
unit.example-php-config
ifeq ($(OSVER), opensuse-tumbleweed)
BUILD_DEPENDS_php= php7-devel php7-embed
else
BUILD_DEPENDS_php= php-devel php-embedded
endif
BUILD_DEPENDS+= $(BUILD_DEPENDS_php)

View File

@@ -13,9 +13,7 @@ MODULE_INSTARGS_python27= python2.7-install
MODULE_SOURCES_python27= unit.example-python-app \
unit.example-python27-config
ifneq (,$(findstring $(OSVER),opensuse-leap opensuse-tumbleweed sles))
BUILD_DEPENDS_python27= python-devel
else ifneq (,$(findstring $(OSVER),fedora centos8))
ifneq (,$(findstring $(OSVER),fedora centos8))
BUILD_DEPENDS_python27= python2-devel
else ifneq (,$(findstring $(OSVER),centos7 amazonlinux2))
BUILD_DEPENDS_python27= python-devel

View File

@@ -13,7 +13,7 @@ MODULE_INSTARGS_python310= python3.10-install
MODULE_SOURCES_python310= unit.example-python-app \
unit.example-python310-config
ifneq (,$(findstring $(OSVER),opensuse-tumbleweed sles fedora amazonlinux2))
ifneq (,$(findstring $(OSVER),fedora amazonlinux2))
BUILD_DEPENDS_python310= python3-devel
else
BUILD_DEPENDS_python310= python310-devel

View File

@@ -1,57 +0,0 @@
MODULES+= python34
MODULE_SUFFIX_python34= python3.4
MODULE_SUMMARY_python34= Python 3.4 module for NGINX Unit
MODULE_VERSION_python34= $(VERSION)
MODULE_RELEASE_python34= 1
MODULE_CONFARGS_python34= python --config=python3.4-config
MODULE_MAKEARGS_python34= python3.4
MODULE_INSTARGS_python34= python3.4-install
MODULE_SOURCES_python34= unit.example-python-app \
unit.example-python34-config
ifneq (,$(findstring $(OSVER),opensuse-leap sles))
BUILD_DEPENDS_python34= python3-devel
else
BUILD_DEPENDS_python34= python34-devel
endif
BUILD_DEPENDS+= $(BUILD_DEPENDS_python34)
define MODULE_PREINSTALL_python34
%{__mkdir} -p %{buildroot}%{_datadir}/doc/unit-python34/examples/python-app
%{__install} -m 644 -p %{SOURCE100} \
%{buildroot}%{_datadir}/doc/unit-python34/examples/python-app/wsgi.py
%{__install} -m 644 -p %{SOURCE101} \
%{buildroot}%{_datadir}/doc/unit-python34/examples/unit.config
endef
export MODULE_PREINSTALL_python34
define MODULE_FILES_python34
%{_libdir}/unit/modules/*
%{_libdir}/unit/debug-modules/*
endef
export MODULE_FILES_python34
define MODULE_POST_python34
cat <<BANNER
----------------------------------------------------------------------
The $(MODULE_SUMMARY_python34) has been installed.
To check the sample app, run these commands:
sudo service unit start
cd /usr/share/doc/%{name}/examples
sudo curl -X PUT --data-binary @unit.config --unix-socket /var/run/unit/control.sock http://localhost/config
curl http://localhost:8400/
Online documentation is available at https://unit.nginx.org
----------------------------------------------------------------------
BANNER
endef
export MODULE_POST_python34

View File

@@ -13,7 +13,7 @@ MODULE_INSTARGS_python36= python3.6-install
MODULE_SOURCES_python36= unit.example-python-app \
unit.example-python36-config
ifneq (,$(findstring $(OSVER),opensuse-tumbleweed sles fedora centos7))
ifneq (,$(findstring $(OSVER),fedora centos7))
BUILD_DEPENDS_python36= python3-devel
else
BUILD_DEPENDS_python36= python36-devel

View File

@@ -13,7 +13,7 @@ MODULE_INSTARGS_python37= python3.7-install
MODULE_SOURCES_python37= unit.example-python-app \
unit.example-python37-config
ifneq (,$(findstring $(OSVER),opensuse-tumbleweed sles fedora amazonlinux2))
ifneq (,$(findstring $(OSVER),fedora amazonlinux2))
BUILD_DEPENDS_python37= python3-devel
else
BUILD_DEPENDS_python37= python37-devel

View File

@@ -13,7 +13,7 @@ MODULE_INSTARGS_python39= python3.9-install
MODULE_SOURCES_python39= unit.example-python-app \
unit.example-python39-config
ifneq (,$(findstring $(OSVER),opensuse-tumbleweed sles fedora amazonlinux2 centos9))
ifneq (,$(findstring $(OSVER),fedora amazonlinux2 centos9))
BUILD_DEPENDS_python39= python3-devel
else
BUILD_DEPENDS_python39= python39-devel

View File

@@ -13,13 +13,7 @@ MODULE_INSTARGS_ruby= ruby-install
MODULE_SOURCES_ruby= unit.example-ruby-app \
unit.example-ruby-config
ifeq ($(OSVER), opensuse-leap)
RACK_PACKAGE= ruby2.1-rubygem-rack
else ifeq ($(OSVER), opensuse-tumbleweed)
RACK_PACKAGE= ruby2.5-rubygem-rack
else
RACK_PACKAGE= rubygem-rack
endif
BUILD_DEPENDS_ruby= ruby-devel $(RACK_PACKAGE)
BUILD_DEPENDS+= $(BUILD_DEPENDS_ruby)

View File

@@ -16,10 +16,6 @@ BuildRequires: openssl-devel
%endif
%endif
%if 0%{?suse_version} >= 1315
BuildRequires: libopenssl-devel
%endif
%define unit_version %%UNIT_VERSION%%
%define unit_release %%UNIT_RELEASE%%%{?dist}.ngx
@@ -54,10 +50,6 @@ directly in the cloud / container environments and fully control your app
dynamically via an API.
This package contains %%SUMMARY%%.
%if 0%{?suse_version}
%debug_package
%endif
%if (0%{?fedora}) || (0%{?rhel} >= 8)
%define _debugsource_template %{nil}
%endif
@@ -106,9 +98,6 @@ DESTDIR=%{buildroot} make %%MODULE_INSTARGS%%
cd %{bdir}
grep -v 'usr/src' debugfiles.list > debugfiles.list.new && mv debugfiles.list.new debugfiles.list
cat /dev/null > debugsources.list
%if 0%{?suse_version} >= 1500
cat /dev/null > debugsourcefiles.list
%endif
%clean
%{__rm} -rf %{buildroot}

View File

@@ -17,10 +17,6 @@ BuildRequires: openssl-devel
%endif
%endif
%if 0%{?suse_version} >= 1315
BuildRequires: libopenssl-devel
%endif
%define CC_OPT %{optflags} -fPIC
%define LD_OPT -Wl,-z,relro -Wl,-z,now -pie
@@ -59,10 +55,6 @@ in and out of the application. Take this application server and proxy
directly in the cloud / container environments and fully control your app
dynamically via an API.
%if 0%{?suse_version}
%debug_package
%endif
%if (0%{?fedora}) || (0%{?rhel} >= 8)
%define _debugsource_template %{nil}
%endif
@@ -142,9 +134,6 @@ cd %{bdir} && make tests && ./build/tests
cd %{bdir}
grep -v 'usr/src' debugfiles.list > debugfiles.list.new && mv debugfiles.list.new debugfiles.list
cat /dev/null > debugsources.list
%if 0%{?suse_version} >= 1500
cat /dev/null > debugsourcefiles.list
%endif
%clean
%{__rm} -rf %{buildroot}