Skip to content

Commit

Permalink
Fixes #26008: Still some errors with dependencies with pcre2, rework …
Browse files Browse the repository at this point in the history
…debian build dependencies (#2930)
  • Loading branch information
VinceMacBuche authored Dec 3, 2024
1 parent 28fb3e6 commit 078b1f0
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
10 changes: 8 additions & 2 deletions rudder-agent/SPECS/rudder-agent.spec
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ Requires: perl
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

# Generic requirements
BuildRequires: gcc bison flex autoconf automake libtool pam-devel pcre2-devel libacl-devel
Requires: pcre2 libacl
BuildRequires: gcc bison flex autoconf automake libtool pam-devel libacl-devel
Requires: libacl
Conflicts: rudder-agent-thin

# Specific requirements
Expand Down Expand Up @@ -257,6 +257,12 @@ BuildRequires: libxml2-devel
Requires: libxml2
%endif

## pcre build dependencies
%if "%{with_pcre2}" == "false"
BuildRequires: pcre2-devel
Requires: pcre2
%endif

## CURL dependencies
%if "%{with_libcurl}" == "false"
BuildRequires: curl-devel
Expand Down
3 changes: 1 addition & 2 deletions rudder-agent/debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ Source: rudder-agent
Section: admin
Priority: optional
Maintainer: Rudder Team <[email protected]>
Build-Depends: debhelper (>= 7), bison, gcc, flex, autoconf, automake, libtool, libpcre2-dev | libpcre3-dev, libpam0g-dev, ca-certificates, perl, lsb-release, libyaml-dev, libxml2-dev, libacl1-dev, python | python3, rsync, libssl-dev, libcurl4-openssl-dev, libmodule-corelist-perl, libmodule-install-perl, libreadline-dev, pkg-config, libsystemd-dev | aegis, libapt-pkg-dev
# Hack: aegis exist on old distros (debian<=8) but not on server distros (debian>=9) where we need libsystemd-dev so this will work unconditionnaly
Build-Depends: debhelper (>= 7), bison, gcc, flex, autoconf, automake, libtool, libpam0g-dev, ca-certificates, perl, lsb-release, libacl1-dev, python | python3, rsync, libmodule-corelist-perl, libmodule-install-perl, libreadline-dev, pkg-config, ${rudder:build-deps}
Standards-Version: 4.6.1
Homepage: https://www.rudder.io

Expand Down
12 changes: 11 additions & 1 deletion rudder-agent/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,14 @@ endif
# manage dependencies
ifeq ($(findstring with-openssl,$(WITH)),)
DEPS := $(DEPS), openssl
BUILD_DEPS := $(BUILD_DEPS), libssl-dev
endif
ifeq ($(findstring with-perl,$(WITH)),)
DEPS := $(DEPS), libxml-treepp-perl, perl
endif
ifeq ($(findstring with-libcurl,$(WITH)),)
DEPS := $(DEPS), curl
BUILD_DEPS := $(BUILD_DEPS), libcurl4-openssl-dev
endif
ifeq ($(findstring with-augeas,$(WITH)),)
DEPS := $(DEPS), augeas-tools
Expand All @@ -125,18 +127,26 @@ DEPS := $(DEPS), jq
endif
ifeq ($(findstring with-libyaml,$(WITH)),)
DEPS := $(DEPS), libyaml-0-2
BUILD_DEPS := $(BUILD_DEPS), libyaml-dev
endif
ifeq ($(findstring with-libxml2,$(WITH)),)
DEPS := $(DEPS), libxml2
BUILD_DEPS := $(BUILD_DEPS), libxml2-dev
endif
ifeq ($(findstring with-pcre2,$(WITH)),)
DEPS := $(DEPS), libpcre2-8-0
BUILD_DEPS := $(BUILD_DEPS), libpcre2-dev
endif
ifeq ($(findstring with-lmdb,$(WITH)),)
DEPS := $(DEPS), liblmdb0
endif
ifeq ($(findstring disable-systemd,$(WITH)),)
DEPS := $(DEPS), systemd
BUILD_DEPS := $(BUILD_DEPS), libsystemd-dev
endif
ifeq ($(findstring disable-apt,$(WITH)),)
DEPS := $(DEPS), libapt-pkg
BUILD_DEPS := $(BUILD_DEPS), libapt-pkg-dev
endif

build:
Expand Down Expand Up @@ -203,7 +213,7 @@ endif
# LD_LIBRARY_PATH necessary to avoid libcrypto detection problems on old OSes like Ubuntu 10.04
# Please see https://issues.rudder.io/issues/6337 for details
LD_LIBRARY_PATH="$(CURDIR)/debian/tmp/opt/rudder/lib:$${LD_LIBRARY_PATH}" dh_shlibdeps -- --ignore-missing-info
dh_gencontrol -- "-Vrudder:deps=$(DEPS)"
dh_gencontrol -- "-Vrudder:deps=$(DEPS) -Vrudder:build-deps=$(BUILD_DEPS)"
dh_md5sums
dh_builddeb $(BUILDDEB_OPT)

Expand Down

0 comments on commit 078b1f0

Please sign in to comment.