From 7c09387156790e579ff9a821ecb05224a9c7b2be Mon Sep 17 00:00:00 2001 From: Andrei Belov Date: Mon, 26 Nov 2018 13:05:37 +0300 Subject: Packages: added strict version dependency for unit-dev/unit-devel. --- pkg/deb/debian/control | 3 ++- pkg/rpm/unit.spec.in | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'pkg') diff --git a/pkg/deb/debian/control b/pkg/deb/debian/control index c0873a1c..9828b6ab 100644 --- a/pkg/deb/debian/control +++ b/pkg/deb/debian/control @@ -34,6 +34,7 @@ Package: unit-dev Section: libdevel Priority: optional Architecture: any -Depends: ${misc:Depends} +Depends: unit (= ${binary:Version}), + ${misc:Depends} Description: NGINX Unit (development files) Library and include files required for NGINX Unit modules development. diff --git a/pkg/rpm/unit.spec.in b/pkg/rpm/unit.spec.in index e3523cb3..1ef02881 100644 --- a/pkg/rpm/unit.spec.in +++ b/pkg/rpm/unit.spec.in @@ -65,6 +65,7 @@ Summary: NGINX Unit (development files) Version: %%VERSION%% Release: %%RELEASE%%%{?dist}.ngx Group: Development/Libraries +Requires: unit == %%VERSION%%-%%RELEASE%%%{?dist}.ngx %description devel Library and include files required for NGINX Unit modules development. -- cgit From 63d16aa5f6faf6c96188188c58b4a369ec4f3a4c Mon Sep 17 00:00:00 2001 From: Andrei Belov Date: Thu, 29 Nov 2018 12:10:16 +0300 Subject: Packages: made unit-go architecture-dependent. This closes #172 issue on GitHub. --- pkg/deb/Makefile | 4 +- pkg/deb/Makefile.go | 2 - pkg/deb/Makefile.go110 | 2 - pkg/deb/Makefile.go17 | 2 - pkg/deb/Makefile.go18 | 2 - pkg/deb/Makefile.go19 | 2 - pkg/deb/debian.module/control-noarch.in | 23 -------- pkg/deb/debian.module/rules-noarch.in | 100 -------------------------------- pkg/rpm/Makefile.go | 2 - 9 files changed, 2 insertions(+), 137 deletions(-) delete mode 100644 pkg/deb/debian.module/control-noarch.in delete mode 100755 pkg/deb/debian.module/rules-noarch.in (limited to 'pkg') diff --git a/pkg/deb/Makefile b/pkg/deb/Makefile index 735f283b..2dcf6f50 100644 --- a/pkg/deb/Makefile +++ b/pkg/deb/Makefile @@ -199,7 +199,7 @@ endif prebuild=`echo "$$MODULE_PREBUILD_$*" | sed -e ':a' -e 'N' -e '$$!ba' -e "s/\n/\$$CR/g"` ; \ preinstall=`echo "$$MODULE_PREINSTALL_$*" | sed -e ':a' -e 'N' -e '$$!ba' -e "s/\n/\$$CR/g"` ; \ post=`echo "$$MODULE_POST_$*" | sed -e ':a' -e 'N' -e '$$!ba' -e "s/\n/\$$CR/g"` ; \ - cat debian.module/$(if $(MODULE_NOARCH_$*),control-noarch.in,control.in) | sed \ + cat debian.module/control.in | sed \ -e "s#%%NAME%%#unit-$(MODULE_SUFFIX_$*)#g" \ -e "s#%%SUMMARY%%#$(MODULE_SUMMARY_$*)#g" \ -e "s#%%CODENAME%%#$(CODENAME)#g" \ @@ -210,7 +210,7 @@ endif -e "s#%%MODULE_BUILD_DEPENDS%%#$(MODULE_BUILD_DEPENDS_$*)#g" \ -e "s#%%MODULE_DEPENDS%%#$(MODULE_DEPENDS_$*)#g" \ > $@/$(SRCDIR)/debian/control ; \ - cat debian.module/$(if $(MODULE_NOARCH_$*),rules-noarch.in,rules.in) | sed \ + cat debian.module/rules.in | sed \ -e "s#%%NAME%%#unit-$(MODULE_SUFFIX_$*)#g" \ -e "s#%%CODENAME%%#$(CODENAME)#g" \ -e "s#%%UNIT_VERSION%%#$(VERSION)#g" \ diff --git a/pkg/deb/Makefile.go b/pkg/deb/Makefile.go index 2d7d6537..bbade7a3 100644 --- a/pkg/deb/Makefile.go +++ b/pkg/deb/Makefile.go @@ -19,8 +19,6 @@ BUILD_DEPENDS+= $(BUILD_DEPENDS_go) MODULE_BUILD_DEPENDS_go=,golang MODULE_DEPENDS_go=,golang -MODULE_NOARCH_go= true - define MODULE_PREINSTALL_go mkdir -p debian/unit-go/usr/share/doc/unit-go/examples/go-app install -m 644 -p debian/unit.example-go-app debian/unit-go/usr/share/doc/unit-go/examples/go-app/let-my-people.go diff --git a/pkg/deb/Makefile.go110 b/pkg/deb/Makefile.go110 index 863f7c90..9fb3da9d 100644 --- a/pkg/deb/Makefile.go110 +++ b/pkg/deb/Makefile.go110 @@ -19,8 +19,6 @@ BUILD_DEPENDS+= $(BUILD_DEPENDS_go110) MODULE_BUILD_DEPENDS_go110=,golang-1.10 MODULE_DEPENDS_go110=,golang-1.10 -MODULE_NOARCH_go110= true - define MODULE_PREINSTALL_go110 mkdir -p debian/unit-go1.10/usr/share/doc/unit-go1.10/examples/go-app install -m 644 -p debian/unit.example-go-app debian/unit-go1.10/usr/share/doc/unit-go1.10/examples/go-app/let-my-people.go diff --git a/pkg/deb/Makefile.go17 b/pkg/deb/Makefile.go17 index 201b32b2..4c3cc73f 100644 --- a/pkg/deb/Makefile.go17 +++ b/pkg/deb/Makefile.go17 @@ -19,8 +19,6 @@ BUILD_DEPENDS+= $(BUILD_DEPENDS_go17) MODULE_BUILD_DEPENDS_go17=,golang-1.7 MODULE_DEPENDS_go17=,golang-1.7 -MODULE_NOARCH_go17= true - define MODULE_PREINSTALL_go17 mkdir -p debian/unit-go1.7/usr/share/doc/unit-go1.7/examples/go-app install -m 644 -p debian/unit.example-go-app debian/unit-go1.7/usr/share/doc/unit-go1.7/examples/go-app/let-my-people.go diff --git a/pkg/deb/Makefile.go18 b/pkg/deb/Makefile.go18 index 70b155d4..a9db87e0 100644 --- a/pkg/deb/Makefile.go18 +++ b/pkg/deb/Makefile.go18 @@ -19,8 +19,6 @@ BUILD_DEPENDS+= $(BUILD_DEPENDS_go18) MODULE_BUILD_DEPENDS_go18=,golang-1.8 MODULE_DEPENDS_go18=,golang-1.8 -MODULE_NOARCH_go18= true - define MODULE_PREINSTALL_go18 mkdir -p debian/unit-go1.8/usr/share/doc/unit-go1.8/examples/go-app install -m 644 -p debian/unit.example-go-app debian/unit-go1.8/usr/share/doc/unit-go1.8/examples/go-app/let-my-people.go diff --git a/pkg/deb/Makefile.go19 b/pkg/deb/Makefile.go19 index 9ddcc493..43611560 100644 --- a/pkg/deb/Makefile.go19 +++ b/pkg/deb/Makefile.go19 @@ -19,8 +19,6 @@ BUILD_DEPENDS+= $(BUILD_DEPENDS_go19) MODULE_BUILD_DEPENDS_go19=,golang-1.9 MODULE_DEPENDS_go19=,golang-1.9 -MODULE_NOARCH_go19= true - define MODULE_PREINSTALL_go19 mkdir -p debian/unit-go1.9/usr/share/doc/unit-go1.9/examples/go-app install -m 644 -p debian/unit.example-go-app debian/unit-go1.9/usr/share/doc/unit-go1.9/examples/go-app/let-my-people.go diff --git a/pkg/deb/debian.module/control-noarch.in b/pkg/deb/debian.module/control-noarch.in deleted file mode 100644 index e22bb49a..00000000 --- a/pkg/deb/debian.module/control-noarch.in +++ /dev/null @@ -1,23 +0,0 @@ -Source: %%NAME%% -Section: admin -Priority: extra -Maintainer: Andrei Belov -Build-Depends: debhelper (>= 9), - linux-libc-dev%%MODULE_BUILD_DEPENDS%% -Standards-Version: 3.9.5 -Homepage: https://unit.nginx.org - -Package: %%NAME%% -Section: admin -Architecture: all -Depends: lsb-base, - ${misc:Depends}, - unit (= %%UNIT_VERSION%%-%%UNIT_RELEASE%%~%%CODENAME%%)%%MODULE_DEPENDS%% -Description: %%SUMMARY%% - NGINX Unit is a runtime and delivery environment for modern distributed - applications. It runs the application code in multiple languages - (PHP, Python, Go, etc.), and tightly couples it with traffic delivery - 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. - This package contains %%SUMMARY%%. diff --git a/pkg/deb/debian.module/rules-noarch.in b/pkg/deb/debian.module/rules-noarch.in deleted file mode 100755 index d75134db..00000000 --- a/pkg/deb/debian.module/rules-noarch.in +++ /dev/null @@ -1,100 +0,0 @@ -#!/usr/bin/make -f - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -export DEB_BUILD_MAINT_OPTIONS=hardening=+all,-pie -export DEB_CFLAGS_MAINT_APPEND=-Wp,-D_FORTIFY_SOURCE=2 -fPIC -DPKG_EXPORT_BUILDFLAGS = 1 -include /usr/share/dpkg/buildflags.mk - -BUILDDIR_unit = $(CURDIR)/debian/build-unit -BUILDDIR_unit_debug = $(CURDIR)/debian/build-unit-debug -INSTALLDIR = $(CURDIR)/debian/%%NAME%% -BASEDIR = $(CURDIR) - -%%MODULE_DEFINITIONS%% - -config.env.%: - dh_testdir - mkdir -p $(BUILDDIR_$*) - cp -Pa $(CURDIR)/auto $(BUILDDIR_$*)/ - cp -Pa $(CURDIR)/configure $(BUILDDIR_$*)/ - cp -Pa $(CURDIR)/src $(BUILDDIR_$*)/ - cp -Pa $(CURDIR)/test $(BUILDDIR_$*)/ - touch $@ - -configure.unit: config.env.unit - cd $(BUILDDIR_unit) && \ - CFLAGS= ./configure \ - %%CONFIGURE_ARGS%% \ - --modules=/usr/lib/unit/modules \ - --cc-opt="$(CFLAGS)" && \ - ./configure %%MODULE_CONFARGS%% - touch $@ - -configure.unit_debug: config.env.unit_debug - cd $(BUILDDIR_unit_debug) && \ - CFLAGS= ./configure \ - %%CONFIGURE_ARGS%% \ - --modules=/usr/lib/unit/debug-modules \ - --cc-opt="$(CFLAGS)" \ - --debug && \ - ./configure %%MODULE_CONFARGS%% - touch $@ - -build-arch.%: configure.% - dh_testdir - $(MAKE) -C $(BUILDDIR_$*) %%MODULE_MAKEARGS%% - touch $@ - -build-indep: - dh_testdir - touch $@ - -build-arch: build-arch.unit build-arch.unit_debug - dh_testdir - touch $@ - -build: build-arch build-indep - dh_testdir - touch $@ - -clean: - dh_testdir - dh_testroot - dh_clean - find $(CURDIR) -maxdepth 1 -size 0 -delete - -install: build - dh_testdir - dh_testroot - dh_prep - dh_installdirs - dh_installinit - dh_installlogrotate -%%MODULE_PREINSTALL%% - cd $(BUILDDIR_unit) && \ - DESTDIR=$(INSTALLDIR) make %%MODULE_INSTARGS%% - cd $(BUILDDIR_unit_debug) && \ - DESTDIR=$(INSTALLDIR) make %%MODULE_INSTARGS%% - -binary-indep: build install - dh_testdir - dh_testroot - dh_installdocs - dh_installchangelogs - dh_link - dh_compress - dh_fixperms - dh_installdeb - dh_perl - dh_gencontrol - dh_md5sums - dh_builddeb - -binary-arch: install - -binary: binary-indep binary-arch - -.PHONY: clean binary-indep binary-arch binary install build diff --git a/pkg/rpm/Makefile.go b/pkg/rpm/Makefile.go index 40ebf8fb..d13e8d1a 100644 --- a/pkg/rpm/Makefile.go +++ b/pkg/rpm/Makefile.go @@ -26,13 +26,11 @@ BUILD_DEPENDS+= $(BUILD_DEPENDS_go) ifneq (,$(findstring $(OSVER),opensuse-leap opensuse-tumbleweed)) define MODULE_DEFINITIONS_go BuildRequires: $(BUILD_DEPENDS_go) -BuildArch: noarch %define gopath /usr/share/go/contrib endef else define MODULE_DEFINITIONS_go BuildRequires: $(BUILD_DEPENDS_go) -BuildArch: noarch endef endif export MODULE_DEFINITIONS_go -- cgit From d6f38a3268dd4df717bdb9054f3f9ee47fa1f429 Mon Sep 17 00:00:00 2001 From: Alexander Borisov Date: Wed, 19 Dec 2018 15:56:57 +0300 Subject: Node.js: added check for libunit version at compile time. --- pkg/npm/Makefile | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'pkg') diff --git a/pkg/npm/Makefile b/pkg/npm/Makefile index 2696c226..dfa9ccdc 100644 --- a/pkg/npm/Makefile +++ b/pkg/npm/Makefile @@ -3,7 +3,11 @@ DEFAULT_VERSION := $(shell grep 'define NXT_VERSION' ../../src/nxt_main.h \ | sed -e 's/^.*"\(.*\)".*/\1/') +DEFAULT_VERNUM := $(shell grep 'define NXT_VERNUM' ../../src/nxt_main.h \ + | sed -e 's/[^0-9]//g') + VERSION ?= $(DEFAULT_VERSION) +VERNUM ?= $(DEFAULT_VERNUM) NPM ?= npm default: @@ -11,6 +15,7 @@ default: copy: cp -rp ../../src/nodejs/unit-http . + echo '#define NXT_NODE_VERNUM ${VERNUM}' > unit-http/version.h mv unit-http/binding_pub.gyp unit-http/binding.gyp sed -e 's/"version"\s*:.*/"version": "${VERSION}.0",/' \ unit-http/package.json > unit-http/package.json.tmp -- cgit From c51e1aa47dcb13b7118e0be00619736ccca839df Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Thu, 20 Dec 2018 19:17:08 +0300 Subject: Generated Dockerfiles for Unit 1.7. --- pkg/docker/Dockerfile.full | 2 +- pkg/docker/Dockerfile.go1.7-dev | 2 +- pkg/docker/Dockerfile.go1.8-dev | 2 +- pkg/docker/Dockerfile.minimal | 2 +- pkg/docker/Dockerfile.perl5.24 | 2 +- pkg/docker/Dockerfile.php7.0 | 2 +- pkg/docker/Dockerfile.python2.7 | 2 +- pkg/docker/Dockerfile.python3.5 | 2 +- pkg/docker/Dockerfile.ruby2.3 | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) (limited to 'pkg') diff --git a/pkg/docker/Dockerfile.full b/pkg/docker/Dockerfile.full index f3663eb4..c513bb1e 100644 --- a/pkg/docker/Dockerfile.full +++ b/pkg/docker/Dockerfile.full @@ -2,7 +2,7 @@ FROM debian:stretch-slim LABEL maintainer="NGINX Docker Maintainers " -ENV UNIT_VERSION 1.6-1~stretch +ENV UNIT_VERSION 1.7-1~stretch RUN set -x \ && apt-get update \ diff --git a/pkg/docker/Dockerfile.go1.7-dev b/pkg/docker/Dockerfile.go1.7-dev index 2c6975e2..7c8b2af2 100644 --- a/pkg/docker/Dockerfile.go1.7-dev +++ b/pkg/docker/Dockerfile.go1.7-dev @@ -2,7 +2,7 @@ FROM debian:stretch-slim LABEL maintainer="NGINX Docker Maintainers " -ENV UNIT_VERSION 1.6-1~stretch +ENV UNIT_VERSION 1.7-1~stretch RUN set -x \ && apt-get update \ diff --git a/pkg/docker/Dockerfile.go1.8-dev b/pkg/docker/Dockerfile.go1.8-dev index 1cd1acfc..aecdeb41 100644 --- a/pkg/docker/Dockerfile.go1.8-dev +++ b/pkg/docker/Dockerfile.go1.8-dev @@ -2,7 +2,7 @@ FROM debian:stretch-slim LABEL maintainer="NGINX Docker Maintainers " -ENV UNIT_VERSION 1.6-1~stretch +ENV UNIT_VERSION 1.7-1~stretch RUN set -x \ && apt-get update \ diff --git a/pkg/docker/Dockerfile.minimal b/pkg/docker/Dockerfile.minimal index 0ffff5c9..0c42a942 100644 --- a/pkg/docker/Dockerfile.minimal +++ b/pkg/docker/Dockerfile.minimal @@ -2,7 +2,7 @@ FROM debian:stretch-slim LABEL maintainer="NGINX Docker Maintainers " -ENV UNIT_VERSION 1.6-1~stretch +ENV UNIT_VERSION 1.7-1~stretch RUN set -x \ && apt-get update \ diff --git a/pkg/docker/Dockerfile.perl5.24 b/pkg/docker/Dockerfile.perl5.24 index 9cbbc645..a7c8c9dc 100644 --- a/pkg/docker/Dockerfile.perl5.24 +++ b/pkg/docker/Dockerfile.perl5.24 @@ -2,7 +2,7 @@ FROM debian:stretch-slim LABEL maintainer="NGINX Docker Maintainers " -ENV UNIT_VERSION 1.6-1~stretch +ENV UNIT_VERSION 1.7-1~stretch RUN set -x \ && apt-get update \ diff --git a/pkg/docker/Dockerfile.php7.0 b/pkg/docker/Dockerfile.php7.0 index 70ea8bbc..48aa472a 100644 --- a/pkg/docker/Dockerfile.php7.0 +++ b/pkg/docker/Dockerfile.php7.0 @@ -2,7 +2,7 @@ FROM debian:stretch-slim LABEL maintainer="NGINX Docker Maintainers " -ENV UNIT_VERSION 1.6-1~stretch +ENV UNIT_VERSION 1.7-1~stretch RUN set -x \ && apt-get update \ diff --git a/pkg/docker/Dockerfile.python2.7 b/pkg/docker/Dockerfile.python2.7 index 4cb4d5f3..fdd0bc7a 100644 --- a/pkg/docker/Dockerfile.python2.7 +++ b/pkg/docker/Dockerfile.python2.7 @@ -2,7 +2,7 @@ FROM debian:stretch-slim LABEL maintainer="NGINX Docker Maintainers " -ENV UNIT_VERSION 1.6-1~stretch +ENV UNIT_VERSION 1.7-1~stretch RUN set -x \ && apt-get update \ diff --git a/pkg/docker/Dockerfile.python3.5 b/pkg/docker/Dockerfile.python3.5 index 26c54174..da6f825a 100644 --- a/pkg/docker/Dockerfile.python3.5 +++ b/pkg/docker/Dockerfile.python3.5 @@ -2,7 +2,7 @@ FROM debian:stretch-slim LABEL maintainer="NGINX Docker Maintainers " -ENV UNIT_VERSION 1.6-1~stretch +ENV UNIT_VERSION 1.7-1~stretch RUN set -x \ && apt-get update \ diff --git a/pkg/docker/Dockerfile.ruby2.3 b/pkg/docker/Dockerfile.ruby2.3 index b0d9de49..0672a8c1 100644 --- a/pkg/docker/Dockerfile.ruby2.3 +++ b/pkg/docker/Dockerfile.ruby2.3 @@ -2,7 +2,7 @@ FROM debian:stretch-slim LABEL maintainer="NGINX Docker Maintainers " -ENV UNIT_VERSION 1.6-1~stretch +ENV UNIT_VERSION 1.7-1~stretch RUN set -x \ && apt-get update \ -- cgit