iproute2/adjust-installation-directories-for-openSUSE-SLE.patch
Jan Engelhardt 31c2334e96 Accepting request 1084545 from home:polslinux:branches:security:netfilter
- Update to release 6.3:
  * New release of iproute2 corresponding to the 6.3 kernel.
    No large feature improvements only incremental improvements to
    the bridge mdb support, mostly just bug fixes.
- Rebase patches.

OBS-URL: https://build.opensuse.org/request/show/1084545
OBS-URL: https://build.opensuse.org/package/show/security:netfilter/iproute2?expand=0&rev=240
2023-05-04 07:34:29 +00:00

75 lines
2.2 KiB
Diff

From: Michal Kubecek <mkubecek@suse.cz>
Date: Fri, 15 Jan 2016 07:29:44 +0100
Subject: adjust installation directories for openSUSE/SLE
Patch-mainline: Never, SUSE specific
Match the directory layout of openSUSE and SLE.
---
Makefile | 4 ++--
netem/Makefile | 5 +++--
tc/q_netem.c | 2 +-
3 files changed, 6 insertions(+), 5 deletions(-)
Index: iproute2-6.3.0/Makefile
===================================================================
--- iproute2-6.3.0.orig/Makefile
+++ iproute2-6.3.0/Makefile
@@ -15,9 +15,9 @@ MAKEFLAGS += --no-print-directory
endif
PREFIX?=/usr
-SBINDIR?=/sbin
+SBINDIR?=/usr/sbin
CONFDIR?=/etc/iproute2
-NETNS_RUN_DIR?=/var/run/netns
+NETNS_RUN_DIR?=/run/netns
NETNS_ETC_DIR?=/etc/netns
DATADIR?=$(PREFIX)/share
HDRDIR?=$(PREFIX)/include/iproute2
@@ -32,7 +32,7 @@ DBM_INCLUDE:=$(DESTDIR)/usr/include
SHARED_LIBS = y
-DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\"
+DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\" -DPKGDATADIR=\"$(DATADIR)/tc\"
ifneq ($(SHARED_LIBS),y)
DEFINES+= -DNO_SHARED_LIBS
endif
Index: iproute2-6.3.0/netem/Makefile
===================================================================
--- iproute2-6.3.0.orig/netem/Makefile
+++ iproute2-6.3.0/netem/Makefile
@@ -7,6 +7,7 @@ DISTDATA = normal.dist pareto.dist paret
HOSTCC ?= $(CC)
CCOPTS = $(CBUILD_CFLAGS)
LDLIBS += -lm
+LIBDIR = /usr/lib
all: $(DISTGEN) $(DISTDATA)
@@ -23,9 +24,9 @@ stats: stats.c
$(HOSTCC) $(CCOPTS) -I../include -o $@ $@.c -lm
install: all
- mkdir -p $(DESTDIR)$(LIBDIR)/tc
+ mkdir -p $(DESTDIR)/usr/share/tc
for i in $(DISTDATA); \
- do install -m 644 $$i $(DESTDIR)$(LIBDIR)/tc; \
+ do install -m 644 $$i $(DESTDIR)/usr/share/tc; \
done
clean:
Index: iproute2-6.3.0/tc/q_netem.c
===================================================================
--- iproute2-6.3.0.orig/tc/q_netem.c
+++ iproute2-6.3.0/tc/q_netem.c
@@ -130,7 +130,7 @@ static int get_distribution(const char *
char *line = NULL;
char name[128];
- snprintf(name, sizeof(name), "%s/%s.dist", get_tc_lib(), type);
+ snprintf(name, sizeof(name), "%s/%s.dist", PKGDATADIR, type);
f = fopen(name, "r");
if (f == NULL) {
fprintf(stderr, "No distribution data for %s (%s: %s)\n",