Blob Blame History Raw
From 358ce5cf068fb9f630a699e94e5aa1498856296a Mon Sep 17 00:00:00 2001
Message-ID: <358ce5cf068fb9f630a699e94e5aa1498856296a.1695218419.git.aclaudi@redhat.com>
From: Andrea Claudi <aclaudi@redhat.com>
Date: Wed, 20 Sep 2023 15:52:51 +0200
Subject: [PATCH] Makefile: ensure CONF_USR_DIR honours the libdir config

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2237746
Upstream Status: iproute2.git commit 946753a4

commit 946753a4459bd035132a27bb2eb87529c1979b90
Author: Andrea Claudi <aclaudi@redhat.com>
Date:   Fri Sep 15 21:59:06 2023 +0200

    Makefile: ensure CONF_USR_DIR honours the libdir config

    Following commit cee0cf84bd32 ("configure: add the --libdir option"),
    iproute2 lib directory is configurable using the --libdir option on the
    configure script. However, CONF_USR_DIR does not honour the configured
    lib path in its default value.

    This fixes the issue simply using $(LIBDIR) instead of $(PREFIX)/lib.
    Please note that the default value for $(LIBDIR) is exactly
    $(PREFIX)/lib, so this does not change the default value for
    CONF_USR_DIR.

    Fixes: 0a0a8f12fa1b ("Read configuration files from /etc and /usr")
    Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
    Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 7d1819ce..54539ce4 100644
--- a/Makefile
+++ b/Makefile
@@ -17,7 +17,7 @@ endif
 PREFIX?=/usr
 SBINDIR?=/sbin
 CONF_ETC_DIR?=/etc/iproute2
-CONF_USR_DIR?=$(PREFIX)/lib/iproute2
+CONF_USR_DIR?=$(LIBDIR)/iproute2
 NETNS_RUN_DIR?=/var/run/netns
 NETNS_ETC_DIR?=/etc/netns
 DATADIR?=$(PREFIX)/share
-- 
2.41.0