diff options
author | Konstantin Pavlov <thresh@nginx.com> | 2024-12-13 03:40:17 +0000 |
---|---|---|
committer | Konstantin Pavlov <pavlov.konstantin@gmail.com> | 2024-12-18 11:01:11 -0800 |
commit | 6f9954bdc044add9eeeb65c2fb67d553b32e9214 (patch) | |
tree | 561570db0d59dc760b0b6b8ec5c6ec5b2ce04fab | |
parent | 326865b28d41d00ee6408b1dd50d45ff054e596e (diff) | |
download | unit-6f9954bdc044add9eeeb65c2fb67d553b32e9214.tar.gz unit-6f9954bdc044add9eeeb65c2fb67d553b32e9214.tar.bz2 |
Packages: enable otel support
-rw-r--r-- | pkg/deb/Makefile | 3 | ||||
-rw-r--r-- | pkg/deb/debian/rules.in | 4 | ||||
-rw-r--r-- | pkg/rpm/Makefile | 3 | ||||
-rw-r--r-- | pkg/rpm/unit.spec.in | 20 |
4 files changed, 23 insertions, 7 deletions
diff --git a/pkg/deb/Makefile b/pkg/deb/Makefile index fadc96a8..9b7f7ed8 100644 --- a/pkg/deb/Makefile +++ b/pkg/deb/Makefile @@ -119,7 +119,8 @@ CONFIGURE_ARGS_COMMON=\ CONFIGURE_ARGS=\ $(CONFIGURE_ARGS_COMMON) \ - --njs + --njs \ + --otel export CR=\\n diff --git a/pkg/deb/debian/rules.in b/pkg/deb/debian/rules.in index dd75b562..d43da2de 100644 --- a/pkg/deb/debian/rules.in +++ b/pkg/deb/debian/rules.in @@ -79,7 +79,7 @@ configure.unit_debug: config.env.unit_debug build-arch.%: configure.% dh_testdir - $(MAKE) -C $(BUILDDIR_$*) + $(MAKE) -C $(BUILDDIR_$*) E=0 $(MAKE) -C $(BUILDDIR_$*) build/lib/libunit.a ifeq ($(DOTESTS), 1) $(MAKE) -C $(BUILDDIR_$*) tests @@ -121,7 +121,7 @@ install: build do.tests dh_installsystemd -punit --name=unit unit.service dh_installsystemd -punit --name=unit-debug --no-start --no-enable unit-debug.service dh_installlogrotate - cd $(BUILDDIR_unit) && DESTDIR=$(INSTALLDIR) make install + cd $(BUILDDIR_unit) && DESTDIR=$(INSTALLDIR) make install E=0 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 diff --git a/pkg/rpm/Makefile b/pkg/rpm/Makefile index 63213dc8..fed2d290 100644 --- a/pkg/rpm/Makefile +++ b/pkg/rpm/Makefile @@ -122,7 +122,8 @@ CONFIGURE_ARGS_COMMON=\ CONFIGURE_ARGS=\ $(CONFIGURE_ARGS_COMMON) \ - --njs + --njs \ + --otel export CR=\\n diff --git a/pkg/rpm/unit.spec.in b/pkg/rpm/unit.spec.in index 9360ff7e..fc3feb14 100644 --- a/pkg/rpm/unit.spec.in +++ b/pkg/rpm/unit.spec.in @@ -76,6 +76,13 @@ Library and include files required for NGINX Unit modules development. %build %{__make} %{?_smp_mflags} -C pkg/contrib .njs +# openssl-sys rust crate doesnt detect openssl11.pc in Amazon Linux 2, so needs +# a bit of a helping hand. +%if (0%{?amzn2}) +export OPENSSL_LIB_DIR=%_libdir +export OPENSSL_INCLUDE_DIR=%_includedir +%endif + PKG_CONFIG_PATH=%{bdir}/pkg/contrib/njs/build \ ./configure \ %{CONFIGURE_ARGS} \ @@ -84,7 +91,7 @@ PKG_CONFIG_PATH=%{bdir}/pkg/contrib/njs/build \ --cc-opt="%{CC_OPT}" \ --ld-opt="%{LD_OPT}" \ --debug -%{__make} %{?_smp_mflags} +%{__make} %{?_smp_mflags} E=0 %{__make} %{?_smp_mflags} build/lib/libunit.a %{__mv} build build-debug @@ -95,7 +102,7 @@ PKG_CONFIG_PATH=%{bdir}/pkg/contrib/njs/build \ --libdir=%{_libdir} \ --cc-opt="%{CC_OPT}" \ --ld-opt="%{LD_OPT}" -%{__make} %{?_smp_mflags} +%{__make} %{?_smp_mflags} E=0 %{__mv} build build-nodebug %if (0%{?fedora}) || (0%{?rhel} >= 8) || (0%{?amzn2}) @@ -103,8 +110,15 @@ PKG_CONFIG_PATH=%{bdir}/pkg/contrib/njs/build \ %endif %install +# openssl-sys rust crate doesnt detect openssl11.pc in Amazon Linux 2, so needs +# a bit of a helping hand. +%if (0%{?amzn2}) +export OPENSSL_LIB_DIR=%_libdir +export OPENSSL_INCLUDE_DIR=%_includedir +%endif + %{__ln_s} build-nodebug build -DESTDIR=%{buildroot} make unitd-install libunit-install manpage-install +DESTDIR=%{buildroot} make unitd-install libunit-install manpage-install E=0 %{__mkdir} -p %{buildroot}%{_bindir} %{__install} -m755 %{bdir}/tools/unitc \ %{buildroot}%{_bindir}/unitc |