## START: Set by rpmautospec ## (rpmautospec version 0.8.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 2; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global origname nginx-otel Name: nginx-mod-otel Version: 0.1.2 Release: %autorelease -p Summary: NGINX Native OpenTelemetry (OTel) Module License: Apache-2.0 URL: https://github.com/nginxinc/nginx-otel Source: %{url}/archive/v%{version}/%{origname}-%{version}.tar.gz # The version of protobuf in Fedora is slightly outdated # and does not come with cmake configuration. Patch: nginx-mod-otel-0.1.2-find-protobuf.patch # `config` provided with the module defines some paths incorrectly. Patch: %{url}/pull/103.patch#/nginx-mod-otel-0.1.2-fix-build-with-absolute-builddir.patch BuildRequires: cmake BuildRequires: gcc-c++ # nginx-otel BuildRequires: cmake(gRPC) BuildRequires: cmake(opentelemetry-cpp) BuildRequires: opentelemetry-proto-devel BuildRequires: protobuf-compiler BuildRequires: protobuf-devel # nginx BuildRequires: nginx-mod-devel BuildRequires: openssl-devel BuildRequires: zlib-devel %description The ngx_otel_module dynamic module enables NGINX to send telemetry data to an OTel collector. It provides support for W3C trace context propagation, OpenTelemetry Protocol (OTLP)/gRPC trace exports and offers several benefits over exiting OTel modules. %prep %autosetup -p1 -n %{origname}-%{version} %build declare -a CMAKE_OPTS=( -DNGX_OTEL_GRPC:STRING=package -DNGX_OTEL_SDK:STRING=package -DNGX_OTEL_PROTO_DIR:PATH=%{_includedir} ) export NGX_OTEL_CMAKE_OPTS="${CMAKE_OPTS[@]}" %nginx_modconfigure --with-http_ssl_module %nginx_modbuild %install pushd %{_vpath_builddir} install -dm 0755 %{buildroot}%{nginx_moddir} install -pm 0755 ngx_otel_module.so %{buildroot}%{nginx_moddir} install -dm 0755 %{buildroot}%{nginx_modconfdir} echo 'load_module "%{nginx_moddir}/ngx_otel_module.so";' \ > %{buildroot}%{nginx_modconfdir}/mod-otel.conf popd %files %license LICENSE %doc README.md %{nginx_moddir}/ngx_otel_module.so %{nginx_modconfdir}/mod-otel.conf %changelog ## START: Generated by rpmautospec * Thu Oct 09 2025 Aleksei Bavshin - 0.1.2-0.2 - Add patch for absolute builddir support * Thu Oct 02 2025 Aleksei Bavshin - 0.1.2-0.1 - Initial package ## END: Generated by rpmautospec