Commit graph

96 commits

Author SHA1 Message Date
Jan Mojžíš
9d9704050f Merge branch 'stderr' into 'master'
Default error-log-path is stderr (Closes: #1025858)

See merge request nginx-team/nginx!44
2022-12-12 16:51:38 +00:00
Jan Mojžíš
2572ddf3ff Merge branch 'patch-enable-stream-realip' into 'master'
Enable stream_realip_module

See merge request nginx-team/nginx!45
2022-12-12 16:45:06 +00:00
Miao Wang
096c566945 Explicitly disable pcre2
Our intention is to to build nginx with pcre3. However, nginx by default
prefers pcre2. As a result, when libpcre2-dev is installed, nginx will
be built with pcre2, which is not intended.

Furthermore, users of nginx-dev will also meet test failures when they
try to compile module related to pcre because of this. To reproduce,
simply:

```
apt-get install nginx-dev devscripts libpcre2-dev
apt-get source libnginx-mod-http-subs-filter
cd libnginx-mod-http-subs-filter-*/ && debuild -us -uc
```
2022-12-12 15:23:32 +08:00
Miao Wang
4a172ade6f Enable stream_realip_module 2022-12-11 14:24:55 +00:00
Jérémy Lal
7d7692e5fd Default error-log-path is stderr (Closes: #1025858) 2022-12-11 14:00:47 +01:00
Jan Mojžíš
10a2613f37
remove 3th party modules 2022-12-10 05:26:48 +01:00
Jan Mojžíš
11ca3f5693
remove modules ndk,nchan,rtmp 2022-12-08 12:56:39 +01:00
Jan Mojžíš
6c68d264f3
d/rules: enable NDK upstream list module NDK_UPSTREAM_LIST 2022-12-03 08:28:23 +01:00
Jan Mojžíš
212327ed57
http-lua: remove 2022-08-17 06:54:21 +02:00
Jan Mojžíš
142c95ade0
add libnginx-mod-http-ndk-dev to nginx to build ngx-lua 2022-07-23 10:47:23 +02:00
Miao Wang
15c55ec59b dh_nginx: move to debian/debhelper
Move dh_nginx script to debian/debhelper so that all debhelper scripts
are located together.
2022-06-26 15:20:30 +08:00
Miao Wang
d4b9d6a1da Adding nginx-dev package for tools for building out-of-tree modules
Nginx does not officially provide a mechanism to build out-of-tree modules,
however, this can be achieved by using all the headers and the configure
scripts in the auto/ directory. As a result, a nginx-dev package can thus be
developed for build out-of-tree modules.

The detailed steps to build an out-of-tree module in the headers-only nginx
source tree is:

1. Execute the configure script of nginx, with the same configure arguments
(excluding the reference to other dynamic modules, but including the reference
to depending modules as a built-in module). To prevent the configure scripts
modifying the nginx ource tree, we can 1. point the build dir to a directory
elsewhere, to generate all the build time files outside; 2. slightly patch the
configure scripts to prevent generating a makefile directly in the source tree,
which simply includes the generated makefile at the build dir.

2. Execute make at the source tree, but providing the generated makefile in the
build dir. The command is `make -C /path/to/nginx/source -f
/path/to/build_dir/Makefile modules`

To make sure the compiled module is compatible with the nginx binary and the
nginx binaries with the same upstream version, the key points are:

- Module signature: A module signature containing the (upstream) version number
and encoding the necessary configuration flags is put in each module as well as
the nginx binary itself. When loading a module, nginx will compare the signature
on the module with its own. As long as the configure flags, especially those
encoded in the signature, and the version of the nginx source used to build the
module are the same as thoes used to build the nginx binary, the moudle can pass
the signature check. As a result, the module can depend on the exact nginx
upstream version, ignoring the debian revison.
- ABI compatibility: We should maintain nginx precisely, to prevent making any
ABI changes between different debian revisions.
- Build check: When building the module, we can perform a simple module loading
check via `nginx -t`. This test serves as a "smoking test", to ensure we are
actually building loadable modules.

Summing all the above up and adding the necessary automation scripts for module
packaging, the nginx-dev package can be composed, including the following parts:

- The headers and configure scripts: generated and filtered out from the source
tree. The scripts are slightly patched to prevent generating a makefile directly
in the source tree, as stated above;
- The recorded configure options: all the modules built should include these
options when configured;
- dh_nginx script and its man page: modified from the original dh_nginx script,
adding a "--in-nginx-tree" option. When specified, the behavior remains the same
as the original version (so the option is added in the rule building the
in-package modules). When not specified, the dependency added into misc:Depends
will be the exact upstream nginx version, ignoring the debian revision. E.g.
nginx-common >= 1.20.2, << 1.20.2.1~
- a debhelper sequence plugin which can be enabled by module packages with `dh
--with=nginx`, inserting `dh_nginx` after `dh_install`
- a build system plugin which can bu enabled by module packages with `dh
--buildsystem=nginx_mod`, automating the module building process using the steps
mentioned before.
- autoscript templates used by dh_nginx are also installed without modification.

Currently. the architecture of nginx-dev is any because nginx has arch related
dependencies, which is brought in by http-lua module. After it is
removed from the nginx source tree, the architecture can be changed to
all since no binary is included in this package.
2022-06-26 15:19:47 +08:00
Ondřej Nový
6930b5ac14 Add stream-geoip and stream-geoip2 modules 2020-06-05 09:33:44 +02:00
Ondřej Nový
6982ab38dd Introduce nginx-core and make it new default for "nginx"
Version of nginx identical to that of nginx-full, but without
any third-party modules, and only modules in the original nginx
code base.
2020-06-04 22:33:03 +02:00
Ondřej Nový
3edca8428c Build dynamic modules only in extras flavour 2020-06-04 20:23:32 +02:00
Ondřej Surý
4851b6ec88 http-geoip2: Add ngx_http_geoip2_module 3.3
Co-authored-by: Ondřej Nový <onovy@debian.org>
2020-06-04 09:57:31 +02:00
Ondřej Nový
7f0bb450a9 d/rules/dh_installinit: Replace --no-restart-on-upgrade with --no-stop-on-upgrade 2020-05-28 20:49:21 +02:00
Ondřej Nový
2b4e972bd3 Replace dh_systemd_enable with dh_installsystemd 2020-05-28 20:36:23 +02:00
Mohamed Akram
55ef39e8e1 Enable --with-compat configure option
Closes: #897926
2020-05-11 23:00:59 +04:00
Christos Trochalakis
515a80bc0a mod: Normalize module locations
Use the package name to infer module location. This
will make it easier to script our maintaining tasks.
2017-10-12 10:37:22 +03:00
Christos Trochalakis
2005e7e35d Explicitly disable autoreconf (debhelper 10)
Since debhelper 10 systemd & autoreconf are enabled by default, we need
systemd and not autoconf so we reverse the logic.

While at it, drop not needed autotools dependency.
2017-08-29 11:05:37 +03:00
Nicolas Dandrimont
1dc67ccb2a Introduce libnginx-mod-rtmp third party module
We choose not to include rtmp in nginx-extras for now.

Minor changes by Chistos Trochalakis

Closes: #843777
2017-07-03 13:45:23 +03:00
Christos Trochalakis
f4299b95f4 Enable SSL Preread builtin module on nginx-full & nginx-extras
Closes: #854214
2017-05-02 10:00:36 +03:00
Christos Trochalakis
16f4fb2b88 Drop perl build flags patch, it is now handled upstream 2017-05-02 10:00:28 +03:00
Christos Trochalakis
c3a656b1a6 Drop --with-ipv6 flag, IPv6 support is enabled automatically 2017-05-02 10:00:25 +03:00
Christos Trochalakis
a418797080 Reuse the same build flags for the perl module
Using the same flags broke the build since -shared was not positioned
after pie/pic flags. Changing the perl LDDFLAGS patch and moving
Config{lddflags} to the end solved that issue.

As a general note, the injected -fPIC in debian/rules is not needed
since dpkg 1.18.13. We inject -fPIC so that it overrides previous -PIE
flag, but the latest dpkg automatically strips pie flags when building
shared libraries (man dpkg-buildflags).

We temporary keep the -fPIC injection for wheezy/jessie backports and
downstream Ubuntu builds.
2017-04-25 10:40:55 +03:00
Christos Trochalakis
84d1abef83 Reenable ipv6, was accidentally dropped in the last commit
Dbp-Dch: Ignore
2017-04-25 10:25:48 +03:00
Michael Lustfield
f4307ddb14 Configure build flags to work with other arches and downstreams. 2017-02-12 00:11:20 -06:00
Christos Trochalakis
a9504afcbe Move module patches to debian/modules/patches
Everything under debian/patches has a special meaning in various tools
like gbp-pq.
2017-01-22 12:50:54 +02:00
Christos Trochalakis
add52334d1 Reactivate PIE
Thanks: Markus Waldeck for the suggestion
2016-12-24 12:09:12 +02:00
Christos Trochalakis
bf78540e31 debian/rules: Correctly clean patched modules
Closes: #844506
Thanks: Sven-Haegar Koch for the initial patch.
2016-12-01 09:29:47 +02:00
Christos Trochalakis
340b30f10c Rethink module patches logic
Collect all patches under debian/patches/modules so they can be
easily tracked and apply them before configure.
2016-11-03 14:57:35 +02:00
Christos Trochalakis
62276a745b mod: Convert dav-ext to dynamic module
Patch by Florian Kinder
2016-11-03 14:57:35 +02:00
Christos Trochalakis
8b6e35fe35 Drop nginx-*-dbg packages
Switch to autogenerated -dbgsym packages.
2016-09-14 10:48:31 +03:00
Christos Trochalakis
3953784152 wrap-and-sort 2016-09-06 11:05:26 +03:00
Christos Trochalakis
3381e6e548 mod: Convert substitution module to dynamic 2016-09-06 11:05:26 +03:00
Christos Trochalakis
577178cdff mod: Convert upload progress module to dynamic 2016-09-06 11:05:24 +03:00
Christos Trochalakis
cf3d323bd5 mod: Convert fancyindex to a dynamic module 2016-09-06 11:05:00 +03:00
Christos Trochalakis
acf0e3123d Enable SCGI & uWSGI module for nginx-light
Other proxy modules like FastCGI & Proxy were already enabled, but the
true reason for this change is that libnginx-http-cache-purge depends on
those modules being enable.

It makes things much easier if all our modules are installable along
with all possible nginx binaries. After all, this is transient until
we move to a single nginx-binary package that ships /usr/bin/nginx.
2016-09-06 11:05:00 +03:00
Christos Trochalakis
ffa01fb473 mod: Convert http-cache to a dynamic module 2016-09-06 11:05:00 +03:00
Christos Trochalakis
f2b7f2cbcc mod: Convert headers-more to a dynamic module 2016-09-06 11:04:55 +03:00
Christos Trochalakis
d0712299ce mod: Convert upstream-fair to dynamic module 2016-09-06 11:03:09 +03:00
Christos Trochalakis
155f1a5b11 mod: Convert http-echo to a dynamic module 2016-09-06 11:03:07 +03:00
Christos Trochalakis
18532f376a mod: Convert nchan to a dynamic module 2016-08-31 16:20:06 +03:00
Christos Trochalakis
b04fb6c678 Replace http-push module with nchan v1.0.2 by the same author 2016-08-31 16:20:00 +03:00
Christos Trochalakis
c06d35b103 Enable slice module on all flavors 2016-08-26 12:40:48 +03:00
Christos Trochalakis
7ffd2fc6a9 Generate dbgsym packages only if dh_strip supports it
Makes backporting easier.
2016-05-31 16:09:41 +03:00
Christos Trochalakis
481751859a Introduce libnginx-mod-http-ndk module 2016-04-18 11:47:37 +03:00
Christos Trochalakis
d5ba950907 Perl module ifdefs for SSI so it cannot be loaded across builds.
nginx-light is the only flavor that doesn't include SSI so we
are including it there.

Also, we switch the nginx-light module test to use
libnginx-mod-http-perl, that way it's more likely to fail.
2016-03-31 09:34:35 +03:00
Christos Trochalakis
6d20e665d3 Introduce libnginx-mod-http-perl 2016-03-31 09:34:35 +03:00