Commit Graph

54 Commits

Author SHA1 Message Date
Alejandro Colomar 6e16d7ac5b Auto: mirroring installation structure in build tree.
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
5a37171f73 ("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: 5a37171f73 ("Added default values for pathnames.")
Reported-by: Liam Crilly <liam@nginx.com>
Reviewed-by: Konstantin Pavlov <thresh@nginx.com>
Reviewed-by: Andrew Clayton <a.clayton@nginx.com>
Cc: Andrei Zeliankou <zelenkov@nginx.com>
Cc: Zhidao Hong <z.hong@f5.com>
Signed-off-by: Alejandro Colomar <alx@nginx.com>
2023-03-29 00:41:08 +02:00
Alejandro Colomar 5ba79b9b52 Renamed --libstatedir to --statedir.
In BSD systems, it's usually </var/db> or some other dir under </var>
that is not </var/lib>, so $statedir is a more generic name.  See
hier(7).

Reported-by: Andrei Zeliankou <zelenkov@nginx.com>
Reported-by: Zhidao Hong <z.hong@f5.com>
Reviewed-by: Konstantin Pavlov <thresh@nginx.com>
Reviewed-by: Andrew Clayton <a.clayton@nginx.com>
Cc: Liam Crilly <liam@nginx.com>
Signed-off-by: Alejandro Colomar <alx@nginx.com>
2023-03-29 00:40:40 +02:00
Konstantin Pavlov b0bb829107 Packages: get rid of deprecated configure options. 2023-02-06 12:39:06 -08:00
Konstantin Pavlov 24e3f17102 Packages: added njs support. 2022-12-07 18:20:44 -08:00
Konstantin Pavlov 6afc524116 Packages: added Ubuntu 22.10 "kinetic" support. 2022-11-16 17:05:57 +04:00
Konstantin Pavlov 2ac4a7527d Packages: relaxed dependencies between modules and base package.
This allows us to update base or single modules packages without
updating the whole set.
2022-11-04 16:52:19 +04:00
Konstantin Pavlov 637a2006a6 Packages: cleanup targets that are not supported anymore. 2022-06-20 18:20:11 +04:00
Konstantin Pavlov 3e06ae3b34 Packages: ship README.md and CONTRIBUTING.md. 2022-05-16 17:22:40 +04:00
Konstantin Pavlov b512eff4ac Packages: added Ubuntu 22.04 "jammy" support. 2022-05-05 13:25:52 +04:00
Andrei Belov b6b15c552d Packages: fixed dependency checks on multi-arch Debian/Ubuntu. 2021-11-09 12:19:54 +03:00
Andrei Belov 7503cc96df Packages: removed support for EOL'ed Debian/Ubuntu distros.
While here, default debhelper compat level bumped to 11 (this is the
version installed out of the box on Ubuntu 18.04 "bionic" which is
the oldest one from supported distros).
2021-10-21 15:28:58 +03:00
Andrei Belov 0900edb10d Packages: added Ubuntu 21.10 "impish" support. 2021-10-21 13:23:25 +03:00
Andrei Belov 3bd60e317c Packages: added Debian 11 "bullseye" support. 2021-08-17 16:45:51 +03:00
Andrei Belov e00ad18d80 Packages: added Ubuntu 21.04 "hirsute" support. 2021-05-27 13:12:52 +03:00
Andrei Belov f90754f84a Packages: switched to common address for package maintainers. 2021-04-21 16:07:26 +03:00
Konstantin Pavlov 4a2dcb46dd Packages: added man page on debian-based systems. 2021-03-24 18:45:45 +03:00
Andrei Belov c981ac6558 Packages: fixed an ability to override package version.
This was broken since 00d8049418cf.
2020-12-24 16:17:27 +03:00
Andrei Belov c99b175988 Packages: set the "--user" value to "nobody" for build-stage tests.
This allows tests to pass well in cases when the default user specified in
the ./configure parameters does not exist in the building environment.
2020-12-23 18:31:18 +03:00
Andrei Belov 53d847615b Packages: run non-privileged processes under "unit" user. 2020-12-17 14:30:18 +03:00
Andrei Belov c33b10a41f Packages: eliminated debuild warning about debian/rules. 2020-12-16 09:56:04 +03:00
Andrei Belov d15acabfc5 Packages: introduced PYTEST_ARGS env variable for test targets.
This is useful for running particular tests, e.g.:
PYTEST_ARGS='test/test_respawn.py::TestRespawn::test_respawn_router' make test
2020-12-16 09:55:59 +03:00
Andrei Belov b2771702fb Packages: added Ubuntu 20.10 "groovy" support. 2020-11-09 16:12:59 +03:00
Andrei Zeliankou d5e9159340 Tests: migrated to the pytest. 2020-09-16 21:31:15 +01:00
Andrei Belov af9392af1f Packages: added Ubuntu 20.04 "focal" support. 2020-04-23 19:55:19 +03:00
Max Romanov 5296be0b82 Using disk file to store large request body.
This closes #386 on GitHub.
2020-03-12 17:54:29 +03:00
Max Romanov f5a2984acf Go: moving source files to the root of the project.
This patch includes packaging changes related to files move.
2019-12-24 17:59:52 +03:00
Max Romanov 3d712a7078 Packages: making unit-go architecture independent.
To support Go modules, the unit-go module should be platform independent.
All platform-dependent logic is moved to libunit, so the unit-dev package
should be installed before building unit-go.
2019-12-24 17:59:44 +03:00
Andrei Belov 5758a06374 Packages: added Ubuntu 19.10 "eoan" support. 2019-11-21 14:13:24 +03:00
Andrei Belov bc14605fd6 Packages: added Python 3.8 on Ubuntu 18.04, 19.04. 2019-11-19 12:43:51 +03:00
Andrei Belov c0aad59d13 Packages: Debian 10 "buster" support added. 2019-07-09 14:17:03 +03:00
Andrei Belov c62cb7acdc Packages: switched to Java 11 on Ubuntu 18.04. 2019-06-07 14:17:37 +03:00
Andrei Belov be515d2a36 Packages: added Python 3.7 on Ubuntu 18.04.
This closes #251 issue on GitHub.
2019-06-04 12:16:57 +03:00
Andrei Belov 48ae47017b Packages: Ubuntu 19.04 "disco" support added. 2019-04-22 13:50:02 +03:00
Andrei Belov 5b98f0a552 Packages: removed Ubuntu 17.04 and 17.10 references due to EOL. 2019-03-01 10:46:46 +03:00
Andrei Belov 7ce6f05975 Packages: added unit-jsc (Java Servlet Container) family. 2019-02-28 18:22:15 +03:00
Andrei Belov aa7478267a Packages: yet another fix added, missed in a7af31b69692. 2019-02-26 14:53:28 +03:00
Alexander Borisov 608e09e9de Improvement and unification of version processing in build scripts.
This also eliminates expressions that incompatible with BSD make, thus fixing
installation of Node.js module on FreeBSD (broken by dace60fc4926).
2019-02-22 16:31:44 +03:00
Andrei Belov be049932b1 Packages: Ubuntu 18.10 "cosmic" support added. 2018-12-27 11:07:24 +03:00
Andrei Belov 63d16aa5f6 Packages: made unit-go architecture-dependent.
This closes #172 issue on GitHub.
2018-11-29 12:10:16 +03:00
Valentin Bartenev d55282105a Packages: updated to 1.5-1. 2018-10-25 17:49:10 +03:00
Andrei Belov 2a9fc6b1fe Packages: updated to 1.4-2. 2018-09-27 15:05:03 +03:00
Andrei Belov fea05e3065 Packages: enabled OpenSSL support. 2018-09-20 16:14:29 +03:00
Andrei Belov 8a156a9fc4 Packages: Ubuntu 18.10 "bionic" support added. 2018-05-14 14:11:37 +03:00
Andrei Belov aa8f2c3295 Added Ruby packaging support. 2018-04-02 15:48:33 +03:00
Andrei Belov 5d5117ce34 Packages: unified check-build-depends target. 2018-03-01 23:03:03 +03:00
Andrei Belov b2fb20780a Packages: added essential build dependencies. 2018-02-28 10:12:25 +03:00
Andrei Belov dc96d08961 Packages: fixed building of deb packages with redefined versions. 2018-02-07 17:26:38 +03:00
Andrei Belov 539caf0946 Packages: added Perl package. 2018-02-07 17:26:37 +03:00
Andrei Belov 51009004af Packages: "test" and "test-debug" targets for deb. 2018-01-26 17:44:27 +03:00
Andrei Belov be8df0631a Packages: improved per-module dependency tracking. 2018-01-22 16:39:31 +03:00