iproute2/adjust-installation-directories-for-openSUSE-SLE.patch
Jan Engelhardt e89f2382c1 Accepting request 965034 from home:gmbr3:Active
- update to 5.17:
  * lib/fs: fix memory leak in get_task_name()
  * bridge: Remove vlan listing from `bridge link`
  * bond: add arp_missed_max option
  * libnetlink: fix socket leak in rtnl_open_byproto()
  * dcb: Fix error reporting when accessing "dcb app"
  * tc_util: Fix parsing action control with space and slash
  * lib: fix ax25.h include for musl
  * uapi: add missing rose and ax25 files
  * rdma: Fix res_print_uint() and add res_print_u64()
  * tc: Add support for ce_threshold_value/mask in fq_codel
- Add tmpfiles.d conf for /run/netns

OBS-URL: https://build.opensuse.org/request/show/965034
OBS-URL: https://build.opensuse.org/package/show/security:netfilter/iproute2?expand=0&rev=222
2022-03-26 14:50:12 +00:00

67 lines
1.8 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(-)
--- a/Makefile
+++ b/Makefile
@@ -14,7 +14,7 @@ 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
@@ -31,7 +31,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
--- a/netem/Makefile
+++ b/netem/Makefile
@@ -7,6 +7,7 @@ DISTDATA = normal.dist pareto.dist paretonormal.dist experimental.dist
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:
--- a/tc/q_netem.c
+++ b/tc/q_netem.c
@@ -96,7 +96,7 @@ static int get_distribution(const char *type, __s16 *data, int maxdata)
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",