From b0bb829107094a64ed6c93b88b6ed4847bd3fa53 Mon Sep 17 00:00:00 2001 From: Konstantin Pavlov Date: Mon, 6 Feb 2023 12:39:06 -0800 Subject: Packages: get rid of deprecated configure options. --- pkg/deb/debian/rules.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkg/deb/debian/rules.in') diff --git a/pkg/deb/debian/rules.in b/pkg/deb/debian/rules.in index 23812926..0fe34b72 100644 --- a/pkg/deb/debian/rules.in +++ b/pkg/deb/debian/rules.in @@ -48,7 +48,7 @@ configure.unit: config.env.unit PKG_CONFIG_PATH=$(CURDIR)/pkg/contrib/njs/build \ CFLAGS= ./configure \ %%CONFIGURE_ARGS%% \ - --modules=/usr/lib/unit/modules \ + --modulesdir=/usr/lib/unit/modules \ --libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \ --cc-opt="$(CFLAGS)" \ --ld-opt="$(LDFLAGS)" @@ -59,7 +59,7 @@ configure.unit_debug: config.env.unit_debug PKG_CONFIG_PATH=$(CURDIR)/pkg/contrib/njs/build \ CFLAGS= ./configure \ %%CONFIGURE_ARGS%% \ - --modules=/usr/lib/unit/debug-modules \ + --modulesdir=/usr/lib/unit/debug-modules \ --libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \ --cc-opt="$(CFLAGS)" \ --ld-opt="$(LDFLAGS)" \ -- cgit From 6e16d7ac5bb86140a55ea30a35c69ee0df3eff8d Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Wed, 22 Mar 2023 16:55:02 +0100 Subject: Auto: mirroring installation structure in build tree. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This makes the build tree more organized, which is good for adding new stuff. Now, it's useful for example for adding manual pages in man3/, but it may be useful in the future for example for extending the build system to run linters (e.g., clang-tidy(1), Clang analyzer, ...) on the C source code. Previously, the build tree was quite flat, and looked like this (after `./configure && make`): $ tree -I src build build ├── Makefile ├── autoconf.data ├── autoconf.err ├── echo ├── libnxt.a ├── nxt_auto_config.h ├── nxt_version.h ├── unitd └── unitd.8 1 directory, 9 files And after this patch, it looks like this: $ tree -I src build build ├── Makefile ├── autoconf.data ├── autoconf.err ├── bin │ └── echo ├── include │ ├── nxt_auto_config.h │ └── nxt_version.h ├── lib │ ├── libnxt.a │ └── unit │ └── modules ├── sbin │ └── unitd ├── share │ └── man │ └── man8 │ └── unitd.8 └── var ├── lib │ └── unit ├── log │ └── unit └── run └── unit 17 directories, 9 files It also solves one issue introduced in 5a37171f733f ("Added default values for pathnames."). Before that commit, it was possible to run unitd from the build system (`./build/unitd`). Now, since it expects files in a very specific location, that has been broken. By having a directory structure that mirrors the installation, it's possible to trick it to believe it's installed, and run it from there: $ ./configure --prefix=./build $ make $ ./build/sbin/unitd Fixes: 5a37171f733f ("Added default values for pathnames.") Reported-by: Liam Crilly Reviewed-by: Konstantin Pavlov Reviewed-by: Andrew Clayton Cc: Andrei Zeliankou Cc: Zhidao Hong Signed-off-by: Alejandro Colomar --- pkg/deb/debian/rules.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pkg/deb/debian/rules.in') diff --git a/pkg/deb/debian/rules.in b/pkg/deb/debian/rules.in index 0fe34b72..01604e86 100644 --- a/pkg/deb/debian/rules.in +++ b/pkg/deb/debian/rules.in @@ -69,7 +69,7 @@ configure.unit_debug: config.env.unit_debug build-arch.%: configure.% dh_testdir $(MAKE) -C $(BUILDDIR_$*) - $(MAKE) -C $(BUILDDIR_$*) build/libunit.a + $(MAKE) -C $(BUILDDIR_$*) build/lib/libunit.a ifeq ($(DOTESTS), 1) $(MAKE) -C $(BUILDDIR_$*) tests endif @@ -112,8 +112,8 @@ install: build do.tests dh_installlogrotate cd $(BUILDDIR_unit) && DESTDIR=$(INSTALLDIR) make install cd $(BUILDDIR_unit) && DESTDIR=$(INSTALLDIR_dev) make libunit-install - install -m 755 $(BUILDDIR_unit_debug)/build/unitd $(INSTALLDIR)/usr/sbin/unitd-debug - install -m 644 $(BUILDDIR_unit_debug)/build/libunit.a $(INSTALLDIR_dev)/usr/lib/$(DEB_HOST_MULTIARCH)/libunit-debug.a + install -m 755 $(BUILDDIR_unit_debug)/build/sbin/unitd $(INSTALLDIR)/usr/sbin/unitd-debug + install -m 644 $(BUILDDIR_unit_debug)/build/lib/libunit.a $(INSTALLDIR_dev)/usr/lib/$(DEB_HOST_MULTIARCH)/libunit-debug.a mkdir -p $(INSTALLDIR)/usr/share/doc/unit/examples install -m 644 debian/unit.example.config $(INSTALLDIR)/usr/share/doc/unit/examples/example.config install -m 644 CHANGES $(INSTALLDIR)/usr/share/doc/unit/changelog -- cgit From 73c6c8a7f7cae0ef18131c6db000bffd82ce9593 Mon Sep 17 00:00:00 2001 From: Konstantin Pavlov Date: Thu, 30 Mar 2023 16:03:41 -0700 Subject: Packages: added unitc and setup-unit. --- pkg/deb/debian/rules.in | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pkg/deb/debian/rules.in') diff --git a/pkg/deb/debian/rules.in b/pkg/deb/debian/rules.in index 01604e86..46286e83 100644 --- a/pkg/deb/debian/rules.in +++ b/pkg/deb/debian/rules.in @@ -32,6 +32,7 @@ config.env.%: njs cp -Pa $(CURDIR)/configure $(BUILDDIR_$*)/ cp -Pa $(CURDIR)/src $(BUILDDIR_$*)/ cp -Pa $(CURDIR)/test $(BUILDDIR_$*)/ + cp -Pa $(CURDIR)/tools $(BUILDDIR_$*)/ cp -Pa $(CURDIR)/version $(BUILDDIR_$*)/ cp -Pa $(CURDIR)/CHANGES $(BUILDDIR_$*)/ cp -Pa $(CURDIR)/LICENSE $(BUILDDIR_$*)/ @@ -112,6 +113,8 @@ install: build do.tests dh_installlogrotate cd $(BUILDDIR_unit) && DESTDIR=$(INSTALLDIR) make install cd $(BUILDDIR_unit) && DESTDIR=$(INSTALLDIR_dev) make libunit-install + install -m 755 $(BUILDDIR_unit)/tools/unitc $(INSTALLDIR)/usr/bin/unitc + install -m 755 $(BUILDDIR_unit)/tools/setup-unit $(INSTALLDIR)/usr/bin/setup-unit install -m 755 $(BUILDDIR_unit_debug)/build/sbin/unitd $(INSTALLDIR)/usr/sbin/unitd-debug install -m 644 $(BUILDDIR_unit_debug)/build/lib/libunit.a $(INSTALLDIR_dev)/usr/lib/$(DEB_HOST_MULTIARCH)/libunit-debug.a mkdir -p $(INSTALLDIR)/usr/share/doc/unit/examples -- cgit From 1266eda80c2f3b67d50b13d88d1ea51729eab772 Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Mon, 24 Apr 2023 17:59:34 +0200 Subject: Docs: moved uintd.8 to man8/ subdirectory. Reviewed-by: Artem Konev Signed-off-by: Alejandro Colomar --- pkg/deb/debian/rules.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkg/deb/debian/rules.in') diff --git a/pkg/deb/debian/rules.in b/pkg/deb/debian/rules.in index 46286e83..0d7cf830 100644 --- a/pkg/deb/debian/rules.in +++ b/pkg/deb/debian/rules.in @@ -40,8 +40,8 @@ config.env.%: njs cp -Pa $(CURDIR)/README.md $(BUILDDIR_$*)/ cp -Pa $(CURDIR)/CONTRIBUTING.md $(BUILDDIR_$*)/ cp -Pa $(CURDIR)/go $(BUILDDIR_$*)/ - mkdir -p $(BUILDDIR_$*)/docs/man - cp -Pa $(CURDIR)/docs/man/unitd.8.in $(BUILDDIR_$*)/docs/man/ + mkdir -p $(BUILDDIR_$*)/docs/man/man8 + cp -Pa $(CURDIR)/docs/man/man8/unitd.8.in $(BUILDDIR_$*)/docs/man/man8/ touch $@ configure.unit: config.env.unit -- cgit