[arch-commits] Commit in iproute2/repos (3 files)

2020-12-26 Thread Christian Hesse via arch-commits
Date: Saturday, December 26, 2020 @ 18:43:37
  Author: eworm
Revision: 405020

archrelease: copy trunk to testing-x86_64

Added:
  iproute2/repos/testing-x86_64/
  iproute2/repos/testing-x86_64/0001-make-iproute2-fhs-compliant.patch
(from rev 405019, iproute2/trunk/0001-make-iproute2-fhs-compliant.patch)
  iproute2/repos/testing-x86_64/PKGBUILD
(from rev 405019, iproute2/trunk/PKGBUILD)

+
 0001-make-iproute2-fhs-compliant.patch |  101 +++
 PKGBUILD   |   58 +
 2 files changed, 159 insertions(+)

Copied: iproute2/repos/testing-x86_64/0001-make-iproute2-fhs-compliant.patch 
(from rev 405019, iproute2/trunk/0001-make-iproute2-fhs-compliant.patch)
===
--- testing-x86_64/0001-make-iproute2-fhs-compliant.patch   
(rev 0)
+++ testing-x86_64/0001-make-iproute2-fhs-compliant.patch   2020-12-26 
18:43:37 UTC (rev 405020)
@@ -0,0 +1,101 @@
+From f0624f6cc656cb177b64e2664f2a806221bfab58 Mon Sep 17 00:00:00 2001
+From: Christian Hesse 
+Date: Thu, 28 Jul 2016 08:49:20 +0200
+Subject: [PATCH 1/1] make iproute2 fhs compliant
+
+Signed-off-by: Christian Hesse 
+---
+ Makefile   |  2 +-
+ netem/Makefile |  4 ++--
+ tc/q_netem.c   |  2 +-
+ tc/tc_util.c   | 15 +++
+ tc/tc_util.h   |  1 +
+ 5 files changed, 20 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index eb571a5..db0a04c 100644
+--- a/Makefile
 b/Makefile
+@@ -14,7 +14,7 @@ DBM_INCLUDE:=$(DESTDIR)/usr/include
+ 
+ SHARED_LIBS = y
+ 
+-DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\"
++DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\" -DDATADIR=\"$(DATADIR)\"
+ ifneq ($(SHARED_LIBS),y)
+ DEFINES+= -DNO_SHARED_LIBS
+ endif
+diff --git a/netem/Makefile b/netem/Makefile
+index e52e125..5b4d283 100644
+--- a/netem/Makefile
 b/netem/Makefile
+@@ -20,9 +20,9 @@ stats: stats.c
+   $(HOSTCC) $(CCOPTS) -I../include -o $@ $@.c -lm
+ 
+ install: all
+-  mkdir -p $(DESTDIR)$(LIBDIR)/tc
++  mkdir -p $(DESTDIR)$(DATADIR)/tc
+   for i in $(DISTDATA); \
+-  do install -m 644 $$i $(DESTDIR)$(LIBDIR)/tc; \
++  do install -m 644 $$i $(DESTDIR)$(DATADIR)/tc; \
+   done
+ 
+ clean:
+diff --git a/tc/q_netem.c b/tc/q_netem.c
+index 8fe2204..a15a5c7 100644
+--- a/tc/q_netem.c
 b/tc/q_netem.c
+@@ -113,7 +113,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", get_tc_datadir(), type);
+   if ((f = fopen(name, "r")) == NULL) {
+   fprintf(stderr, "No distribution data for %s (%s: %s)\n",
+   type, name, strerror(errno));
+diff --git a/tc/tc_util.c b/tc/tc_util.c
+index afc4cf5..728b854 100644
+--- a/tc/tc_util.c
 b/tc/tc_util.c
+@@ -32,6 +32,10 @@
+ #define LIBDIR "/usr/lib"
+ #endif
+ 
++#ifndef DATADIR
++#define DATADIR "/usr/share"
++#endif
++
+ static struct db_names *cls_names;
+ 
+ #define NAMES_DB "/etc/iproute2/tc_cls"
+@@ -73,6 +77,17 @@ const char *get_tc_lib(void)
+   return lib_dir;
+ }
+ 
++const char *get_tc_datadir(void)
++{
++  const char *data_dir;
++
++  data_dir = getenv("TC_DATA_DIR");
++  if (!data_dir)
++  data_dir = DATADIR "/tc/";
++
++  return data_dir;
++}
++
+ int get_qdisc_handle(__u32 *h, const char *str)
+ {
+   __u32 maj;
+diff --git a/tc/tc_util.h b/tc/tc_util.h
+index 61e60b1..6d448de 100644
+--- a/tc/tc_util.h
 b/tc/tc_util.h
+@@ -55,6 +55,7 @@ struct exec_util {
+ };
+ 
+ const char *get_tc_lib(void);
++const char *get_tc_datadir(void);
+ 
+ struct qdisc_util *get_qdisc_kind(const char *str);
+ struct filter_util *get_filter_kind(const char *str);

Copied: iproute2/repos/testing-x86_64/PKGBUILD (from rev 405019, 
iproute2/trunk/PKGBUILD)
===
--- testing-x86_64/PKGBUILD (rev 0)
+++ testing-x86_64/PKGBUILD 2020-12-26 18:43:37 UTC (rev 405020)
@@ -0,0 +1,58 @@
+# Maintainer: Christian Hesse 
+# Maintainer: Ronald van Haren 
+# Contributor: Judd Vinet 
+
+pkgname=iproute2
+pkgver=5.10.0
+pkgrel=2
+pkgdesc='IP Routing Utilities'
+arch=('x86_64')
+license=('GPL2')
+url='https://git.kernel.org/pub/scm/network/iproute2/iproute2.git'
+depends=('glibc' 'iptables' 'libelf')
+optdepends=('db: userspace arp daemon'
+'linux-atm: ATM support')
+provides=('iproute')
+backup=('etc/iproute2/ematch_map'
+'etc/iproute2/rt_dsfield'
+'etc/iproute2/rt_protos'
+'etc/iproute2/rt_realms'
+'etc/iproute2/rt_scopes'
+'etc/iproute2/rt_tables')
+makedepends=('linux-atm')
+options=('staticlibs')
+validpgpkeys=('9F6FC345B05BE7E766B83C8F80A77F6095CDE47E') # Stephen 

[arch-commits] Commit in iproute2/repos (3 files)

2020-12-20 Thread Christian Hesse via arch-commits
Date: Sunday, December 20, 2020 @ 22:15:10
  Author: eworm
Revision: 404708

archrelease: copy trunk to testing-x86_64

Added:
  iproute2/repos/testing-x86_64/
  iproute2/repos/testing-x86_64/0001-make-iproute2-fhs-compliant.patch
(from rev 404707, iproute2/trunk/0001-make-iproute2-fhs-compliant.patch)
  iproute2/repos/testing-x86_64/PKGBUILD
(from rev 404707, iproute2/trunk/PKGBUILD)

+
 0001-make-iproute2-fhs-compliant.patch |  101 +++
 PKGBUILD   |   58 +
 2 files changed, 159 insertions(+)

Copied: iproute2/repos/testing-x86_64/0001-make-iproute2-fhs-compliant.patch 
(from rev 404707, iproute2/trunk/0001-make-iproute2-fhs-compliant.patch)
===
--- testing-x86_64/0001-make-iproute2-fhs-compliant.patch   
(rev 0)
+++ testing-x86_64/0001-make-iproute2-fhs-compliant.patch   2020-12-20 
22:15:10 UTC (rev 404708)
@@ -0,0 +1,101 @@
+From f0624f6cc656cb177b64e2664f2a806221bfab58 Mon Sep 17 00:00:00 2001
+From: Christian Hesse 
+Date: Thu, 28 Jul 2016 08:49:20 +0200
+Subject: [PATCH 1/1] make iproute2 fhs compliant
+
+Signed-off-by: Christian Hesse 
+---
+ Makefile   |  2 +-
+ netem/Makefile |  4 ++--
+ tc/q_netem.c   |  2 +-
+ tc/tc_util.c   | 15 +++
+ tc/tc_util.h   |  1 +
+ 5 files changed, 20 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index eb571a5..db0a04c 100644
+--- a/Makefile
 b/Makefile
+@@ -14,7 +14,7 @@ DBM_INCLUDE:=$(DESTDIR)/usr/include
+ 
+ SHARED_LIBS = y
+ 
+-DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\"
++DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\" -DDATADIR=\"$(DATADIR)\"
+ ifneq ($(SHARED_LIBS),y)
+ DEFINES+= -DNO_SHARED_LIBS
+ endif
+diff --git a/netem/Makefile b/netem/Makefile
+index e52e125..5b4d283 100644
+--- a/netem/Makefile
 b/netem/Makefile
+@@ -20,9 +20,9 @@ stats: stats.c
+   $(HOSTCC) $(CCOPTS) -I../include -o $@ $@.c -lm
+ 
+ install: all
+-  mkdir -p $(DESTDIR)$(LIBDIR)/tc
++  mkdir -p $(DESTDIR)$(DATADIR)/tc
+   for i in $(DISTDATA); \
+-  do install -m 644 $$i $(DESTDIR)$(LIBDIR)/tc; \
++  do install -m 644 $$i $(DESTDIR)$(DATADIR)/tc; \
+   done
+ 
+ clean:
+diff --git a/tc/q_netem.c b/tc/q_netem.c
+index 8fe2204..a15a5c7 100644
+--- a/tc/q_netem.c
 b/tc/q_netem.c
+@@ -113,7 +113,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", get_tc_datadir(), type);
+   if ((f = fopen(name, "r")) == NULL) {
+   fprintf(stderr, "No distribution data for %s (%s: %s)\n",
+   type, name, strerror(errno));
+diff --git a/tc/tc_util.c b/tc/tc_util.c
+index afc4cf5..728b854 100644
+--- a/tc/tc_util.c
 b/tc/tc_util.c
+@@ -32,6 +32,10 @@
+ #define LIBDIR "/usr/lib"
+ #endif
+ 
++#ifndef DATADIR
++#define DATADIR "/usr/share"
++#endif
++
+ static struct db_names *cls_names;
+ 
+ #define NAMES_DB "/etc/iproute2/tc_cls"
+@@ -73,6 +77,17 @@ const char *get_tc_lib(void)
+   return lib_dir;
+ }
+ 
++const char *get_tc_datadir(void)
++{
++  const char *data_dir;
++
++  data_dir = getenv("TC_DATA_DIR");
++  if (!data_dir)
++  data_dir = DATADIR "/tc/";
++
++  return data_dir;
++}
++
+ int get_qdisc_handle(__u32 *h, const char *str)
+ {
+   __u32 maj;
+diff --git a/tc/tc_util.h b/tc/tc_util.h
+index 61e60b1..6d448de 100644
+--- a/tc/tc_util.h
 b/tc/tc_util.h
+@@ -55,6 +55,7 @@ struct exec_util {
+ };
+ 
+ const char *get_tc_lib(void);
++const char *get_tc_datadir(void);
+ 
+ struct qdisc_util *get_qdisc_kind(const char *str);
+ struct filter_util *get_filter_kind(const char *str);

Copied: iproute2/repos/testing-x86_64/PKGBUILD (from rev 404707, 
iproute2/trunk/PKGBUILD)
===
--- testing-x86_64/PKGBUILD (rev 0)
+++ testing-x86_64/PKGBUILD 2020-12-20 22:15:10 UTC (rev 404708)
@@ -0,0 +1,58 @@
+# Maintainer: Christian Hesse 
+# Maintainer: Ronald van Haren 
+# Contributor: Judd Vinet 
+
+pkgname=iproute2
+pkgver=5.10.0
+pkgrel=1
+pkgdesc='IP Routing Utilities'
+arch=('x86_64')
+license=('GPL2')
+url='https://git.kernel.org/pub/scm/network/iproute2/iproute2.git'
+depends=('glibc' 'iptables' 'libelf')
+optdepends=('db: userspace arp daemon'
+'linux-atm: ATM support')
+provides=('iproute')
+backup=('etc/iproute2/ematch_map'
+'etc/iproute2/rt_dsfield'
+'etc/iproute2/rt_protos'
+'etc/iproute2/rt_realms'
+'etc/iproute2/rt_scopes'
+'etc/iproute2/rt_tables')
+makedepends=('linux-atm')
+options=('staticlibs')
+validpgpkeys=('9F6FC345B05BE7E766B83C8F80A77F6095CDE47E') # Stephen Hemminger

[arch-commits] Commit in iproute2/repos (3 files)

2020-10-16 Thread Christian Hesse via arch-commits
Date: Friday, October 16, 2020 @ 18:33:39
  Author: eworm
Revision: 398450

archrelease: copy trunk to testing-x86_64

Added:
  iproute2/repos/testing-x86_64/
  iproute2/repos/testing-x86_64/0001-make-iproute2-fhs-compliant.patch
(from rev 398449, iproute2/trunk/0001-make-iproute2-fhs-compliant.patch)
  iproute2/repos/testing-x86_64/PKGBUILD
(from rev 398449, iproute2/trunk/PKGBUILD)

+
 0001-make-iproute2-fhs-compliant.patch |  101 +++
 PKGBUILD   |   57 +
 2 files changed, 158 insertions(+)

Copied: iproute2/repos/testing-x86_64/0001-make-iproute2-fhs-compliant.patch 
(from rev 398449, iproute2/trunk/0001-make-iproute2-fhs-compliant.patch)
===
--- testing-x86_64/0001-make-iproute2-fhs-compliant.patch   
(rev 0)
+++ testing-x86_64/0001-make-iproute2-fhs-compliant.patch   2020-10-16 
18:33:39 UTC (rev 398450)
@@ -0,0 +1,101 @@
+From f0624f6cc656cb177b64e2664f2a806221bfab58 Mon Sep 17 00:00:00 2001
+From: Christian Hesse 
+Date: Thu, 28 Jul 2016 08:49:20 +0200
+Subject: [PATCH 1/1] make iproute2 fhs compliant
+
+Signed-off-by: Christian Hesse 
+---
+ Makefile   |  2 +-
+ netem/Makefile |  4 ++--
+ tc/q_netem.c   |  2 +-
+ tc/tc_util.c   | 15 +++
+ tc/tc_util.h   |  1 +
+ 5 files changed, 20 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index eb571a5..db0a04c 100644
+--- a/Makefile
 b/Makefile
+@@ -14,7 +14,7 @@ DBM_INCLUDE:=$(DESTDIR)/usr/include
+ 
+ SHARED_LIBS = y
+ 
+-DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\"
++DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\" -DDATADIR=\"$(DATADIR)\"
+ ifneq ($(SHARED_LIBS),y)
+ DEFINES+= -DNO_SHARED_LIBS
+ endif
+diff --git a/netem/Makefile b/netem/Makefile
+index e52e125..5b4d283 100644
+--- a/netem/Makefile
 b/netem/Makefile
+@@ -20,9 +20,9 @@ stats: stats.c
+   $(HOSTCC) $(CCOPTS) -I../include -o $@ $@.c -lm
+ 
+ install: all
+-  mkdir -p $(DESTDIR)$(LIBDIR)/tc
++  mkdir -p $(DESTDIR)$(DATADIR)/tc
+   for i in $(DISTDATA); \
+-  do install -m 644 $$i $(DESTDIR)$(LIBDIR)/tc; \
++  do install -m 644 $$i $(DESTDIR)$(DATADIR)/tc; \
+   done
+ 
+ clean:
+diff --git a/tc/q_netem.c b/tc/q_netem.c
+index 8fe2204..a15a5c7 100644
+--- a/tc/q_netem.c
 b/tc/q_netem.c
+@@ -113,7 +113,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", get_tc_datadir(), type);
+   if ((f = fopen(name, "r")) == NULL) {
+   fprintf(stderr, "No distribution data for %s (%s: %s)\n",
+   type, name, strerror(errno));
+diff --git a/tc/tc_util.c b/tc/tc_util.c
+index afc4cf5..728b854 100644
+--- a/tc/tc_util.c
 b/tc/tc_util.c
+@@ -32,6 +32,10 @@
+ #define LIBDIR "/usr/lib"
+ #endif
+ 
++#ifndef DATADIR
++#define DATADIR "/usr/share"
++#endif
++
+ static struct db_names *cls_names;
+ 
+ #define NAMES_DB "/etc/iproute2/tc_cls"
+@@ -73,6 +77,17 @@ const char *get_tc_lib(void)
+   return lib_dir;
+ }
+ 
++const char *get_tc_datadir(void)
++{
++  const char *data_dir;
++
++  data_dir = getenv("TC_DATA_DIR");
++  if (!data_dir)
++  data_dir = DATADIR "/tc/";
++
++  return data_dir;
++}
++
+ int get_qdisc_handle(__u32 *h, const char *str)
+ {
+   __u32 maj;
+diff --git a/tc/tc_util.h b/tc/tc_util.h
+index 61e60b1..6d448de 100644
+--- a/tc/tc_util.h
 b/tc/tc_util.h
+@@ -55,6 +55,7 @@ struct exec_util {
+ };
+ 
+ const char *get_tc_lib(void);
++const char *get_tc_datadir(void);
+ 
+ struct qdisc_util *get_qdisc_kind(const char *str);
+ struct filter_util *get_filter_kind(const char *str);

Copied: iproute2/repos/testing-x86_64/PKGBUILD (from rev 398449, 
iproute2/trunk/PKGBUILD)
===
--- testing-x86_64/PKGBUILD (rev 0)
+++ testing-x86_64/PKGBUILD 2020-10-16 18:33:39 UTC (rev 398450)
@@ -0,0 +1,57 @@
+# Maintainer: Christian Hesse 
+# Maintainer: Ronald van Haren 
+# Contributor: Judd Vinet 
+
+pkgname=iproute2
+pkgver=5.9.0
+pkgrel=1
+pkgdesc='IP Routing Utilities'
+arch=('x86_64')
+license=('GPL2')
+url='https://git.kernel.org/pub/scm/network/iproute2/iproute2.git'
+depends=('glibc' 'iptables' 'libelf')
+optdepends=('linux-atm: ATM support')
+provides=('iproute')
+backup=('etc/iproute2/ematch_map'
+'etc/iproute2/rt_dsfield'
+'etc/iproute2/rt_protos'
+'etc/iproute2/rt_realms'
+'etc/iproute2/rt_scopes'
+'etc/iproute2/rt_tables')
+makedepends=('linux-atm')
+options=('staticlibs')
+validpgpkeys=('9F6FC345B05BE7E766B83C8F80A77F6095CDE47E') # Stephen Hemminger

[arch-commits] Commit in iproute2/repos (3 files)

2020-08-08 Thread Christian Hesse via arch-commits
Date: Saturday, August 8, 2020 @ 21:49:42
  Author: eworm
Revision: 393328

archrelease: copy trunk to testing-x86_64

Added:
  iproute2/repos/testing-x86_64/
  iproute2/repos/testing-x86_64/0001-make-iproute2-fhs-compliant.patch
(from rev 393327, iproute2/trunk/0001-make-iproute2-fhs-compliant.patch)
  iproute2/repos/testing-x86_64/PKGBUILD
(from rev 393327, iproute2/trunk/PKGBUILD)

+
 0001-make-iproute2-fhs-compliant.patch |  101 +++
 PKGBUILD   |   57 +
 2 files changed, 158 insertions(+)

Copied: iproute2/repos/testing-x86_64/0001-make-iproute2-fhs-compliant.patch 
(from rev 393327, iproute2/trunk/0001-make-iproute2-fhs-compliant.patch)
===
--- testing-x86_64/0001-make-iproute2-fhs-compliant.patch   
(rev 0)
+++ testing-x86_64/0001-make-iproute2-fhs-compliant.patch   2020-08-08 
21:49:42 UTC (rev 393328)
@@ -0,0 +1,101 @@
+From f0624f6cc656cb177b64e2664f2a806221bfab58 Mon Sep 17 00:00:00 2001
+From: Christian Hesse 
+Date: Thu, 28 Jul 2016 08:49:20 +0200
+Subject: [PATCH 1/1] make iproute2 fhs compliant
+
+Signed-off-by: Christian Hesse 
+---
+ Makefile   |  2 +-
+ netem/Makefile |  4 ++--
+ tc/q_netem.c   |  2 +-
+ tc/tc_util.c   | 15 +++
+ tc/tc_util.h   |  1 +
+ 5 files changed, 20 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index eb571a5..db0a04c 100644
+--- a/Makefile
 b/Makefile
+@@ -14,7 +14,7 @@ DBM_INCLUDE:=$(DESTDIR)/usr/include
+ 
+ SHARED_LIBS = y
+ 
+-DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\"
++DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\" -DDATADIR=\"$(DATADIR)\"
+ ifneq ($(SHARED_LIBS),y)
+ DEFINES+= -DNO_SHARED_LIBS
+ endif
+diff --git a/netem/Makefile b/netem/Makefile
+index e52e125..5b4d283 100644
+--- a/netem/Makefile
 b/netem/Makefile
+@@ -20,9 +20,9 @@ stats: stats.c
+   $(HOSTCC) $(CCOPTS) -I../include -o $@ $@.c -lm
+ 
+ install: all
+-  mkdir -p $(DESTDIR)$(LIBDIR)/tc
++  mkdir -p $(DESTDIR)$(DATADIR)/tc
+   for i in $(DISTDATA); \
+-  do install -m 644 $$i $(DESTDIR)$(LIBDIR)/tc; \
++  do install -m 644 $$i $(DESTDIR)$(DATADIR)/tc; \
+   done
+ 
+ clean:
+diff --git a/tc/q_netem.c b/tc/q_netem.c
+index 8fe2204..a15a5c7 100644
+--- a/tc/q_netem.c
 b/tc/q_netem.c
+@@ -113,7 +113,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", get_tc_datadir(), type);
+   if ((f = fopen(name, "r")) == NULL) {
+   fprintf(stderr, "No distribution data for %s (%s: %s)\n",
+   type, name, strerror(errno));
+diff --git a/tc/tc_util.c b/tc/tc_util.c
+index afc4cf5..728b854 100644
+--- a/tc/tc_util.c
 b/tc/tc_util.c
+@@ -32,6 +32,10 @@
+ #define LIBDIR "/usr/lib"
+ #endif
+ 
++#ifndef DATADIR
++#define DATADIR "/usr/share"
++#endif
++
+ static struct db_names *cls_names;
+ 
+ #define NAMES_DB "/etc/iproute2/tc_cls"
+@@ -73,6 +77,17 @@ const char *get_tc_lib(void)
+   return lib_dir;
+ }
+ 
++const char *get_tc_datadir(void)
++{
++  const char *data_dir;
++
++  data_dir = getenv("TC_DATA_DIR");
++  if (!data_dir)
++  data_dir = DATADIR "/tc/";
++
++  return data_dir;
++}
++
+ int get_qdisc_handle(__u32 *h, const char *str)
+ {
+   __u32 maj;
+diff --git a/tc/tc_util.h b/tc/tc_util.h
+index 61e60b1..6d448de 100644
+--- a/tc/tc_util.h
 b/tc/tc_util.h
+@@ -55,6 +55,7 @@ struct exec_util {
+ };
+ 
+ const char *get_tc_lib(void);
++const char *get_tc_datadir(void);
+ 
+ struct qdisc_util *get_qdisc_kind(const char *str);
+ struct filter_util *get_filter_kind(const char *str);

Copied: iproute2/repos/testing-x86_64/PKGBUILD (from rev 393327, 
iproute2/trunk/PKGBUILD)
===
--- testing-x86_64/PKGBUILD (rev 0)
+++ testing-x86_64/PKGBUILD 2020-08-08 21:49:42 UTC (rev 393328)
@@ -0,0 +1,57 @@
+# Maintainer: Christian Hesse 
+# Maintainer: Ronald van Haren 
+# Contributor: Judd Vinet 
+
+pkgname=iproute2
+pkgver=5.8.0
+pkgrel=1
+pkgdesc='IP Routing Utilities'
+arch=('x86_64')
+license=('GPL2')
+url='https://git.kernel.org/pub/scm/network/iproute2/iproute2.git'
+depends=('glibc' 'iptables' 'libelf')
+optdepends=('linux-atm: ATM support')
+provides=('iproute')
+backup=('etc/iproute2/ematch_map'
+'etc/iproute2/rt_dsfield'
+'etc/iproute2/rt_protos'
+'etc/iproute2/rt_realms'
+'etc/iproute2/rt_scopes'
+'etc/iproute2/rt_tables')
+makedepends=('linux-atm')
+options=('staticlibs')
+validpgpkeys=('9F6FC345B05BE7E766B83C8F80A77F6095CDE47E') # Stephen Hemminger

[arch-commits] Commit in iproute2/repos (3 files)

2020-06-03 Thread Christian Hesse via arch-commits
Date: Wednesday, June 3, 2020 @ 07:12:04
  Author: eworm
Revision: 388133

archrelease: copy trunk to testing-x86_64

Added:
  iproute2/repos/testing-x86_64/
  iproute2/repos/testing-x86_64/0001-make-iproute2-fhs-compliant.patch
(from rev 388132, iproute2/trunk/0001-make-iproute2-fhs-compliant.patch)
  iproute2/repos/testing-x86_64/PKGBUILD
(from rev 388132, iproute2/trunk/PKGBUILD)

+
 0001-make-iproute2-fhs-compliant.patch |  101 +++
 PKGBUILD   |   57 +
 2 files changed, 158 insertions(+)

Copied: iproute2/repos/testing-x86_64/0001-make-iproute2-fhs-compliant.patch 
(from rev 388132, iproute2/trunk/0001-make-iproute2-fhs-compliant.patch)
===
--- testing-x86_64/0001-make-iproute2-fhs-compliant.patch   
(rev 0)
+++ testing-x86_64/0001-make-iproute2-fhs-compliant.patch   2020-06-03 
07:12:04 UTC (rev 388133)
@@ -0,0 +1,101 @@
+From f0624f6cc656cb177b64e2664f2a806221bfab58 Mon Sep 17 00:00:00 2001
+From: Christian Hesse 
+Date: Thu, 28 Jul 2016 08:49:20 +0200
+Subject: [PATCH 1/1] make iproute2 fhs compliant
+
+Signed-off-by: Christian Hesse 
+---
+ Makefile   |  2 +-
+ netem/Makefile |  4 ++--
+ tc/q_netem.c   |  2 +-
+ tc/tc_util.c   | 15 +++
+ tc/tc_util.h   |  1 +
+ 5 files changed, 20 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index eb571a5..db0a04c 100644
+--- a/Makefile
 b/Makefile
+@@ -14,7 +14,7 @@ DBM_INCLUDE:=$(DESTDIR)/usr/include
+ 
+ SHARED_LIBS = y
+ 
+-DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\"
++DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\" -DDATADIR=\"$(DATADIR)\"
+ ifneq ($(SHARED_LIBS),y)
+ DEFINES+= -DNO_SHARED_LIBS
+ endif
+diff --git a/netem/Makefile b/netem/Makefile
+index e52e125..5b4d283 100644
+--- a/netem/Makefile
 b/netem/Makefile
+@@ -20,9 +20,9 @@ stats: stats.c
+   $(HOSTCC) $(CCOPTS) -I../include -o $@ $@.c -lm
+ 
+ install: all
+-  mkdir -p $(DESTDIR)$(LIBDIR)/tc
++  mkdir -p $(DESTDIR)$(DATADIR)/tc
+   for i in $(DISTDATA); \
+-  do install -m 644 $$i $(DESTDIR)$(LIBDIR)/tc; \
++  do install -m 644 $$i $(DESTDIR)$(DATADIR)/tc; \
+   done
+ 
+ clean:
+diff --git a/tc/q_netem.c b/tc/q_netem.c
+index 8fe2204..a15a5c7 100644
+--- a/tc/q_netem.c
 b/tc/q_netem.c
+@@ -113,7 +113,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", get_tc_datadir(), type);
+   if ((f = fopen(name, "r")) == NULL) {
+   fprintf(stderr, "No distribution data for %s (%s: %s)\n",
+   type, name, strerror(errno));
+diff --git a/tc/tc_util.c b/tc/tc_util.c
+index afc4cf5..728b854 100644
+--- a/tc/tc_util.c
 b/tc/tc_util.c
+@@ -32,6 +32,10 @@
+ #define LIBDIR "/usr/lib"
+ #endif
+ 
++#ifndef DATADIR
++#define DATADIR "/usr/share"
++#endif
++
+ static struct db_names *cls_names;
+ 
+ #define NAMES_DB "/etc/iproute2/tc_cls"
+@@ -73,6 +77,17 @@ const char *get_tc_lib(void)
+   return lib_dir;
+ }
+ 
++const char *get_tc_datadir(void)
++{
++  const char *data_dir;
++
++  data_dir = getenv("TC_DATA_DIR");
++  if (!data_dir)
++  data_dir = DATADIR "/tc/";
++
++  return data_dir;
++}
++
+ int get_qdisc_handle(__u32 *h, const char *str)
+ {
+   __u32 maj;
+diff --git a/tc/tc_util.h b/tc/tc_util.h
+index 61e60b1..6d448de 100644
+--- a/tc/tc_util.h
 b/tc/tc_util.h
+@@ -55,6 +55,7 @@ struct exec_util {
+ };
+ 
+ const char *get_tc_lib(void);
++const char *get_tc_datadir(void);
+ 
+ struct qdisc_util *get_qdisc_kind(const char *str);
+ struct filter_util *get_filter_kind(const char *str);

Copied: iproute2/repos/testing-x86_64/PKGBUILD (from rev 388132, 
iproute2/trunk/PKGBUILD)
===
--- testing-x86_64/PKGBUILD (rev 0)
+++ testing-x86_64/PKGBUILD 2020-06-03 07:12:04 UTC (rev 388133)
@@ -0,0 +1,57 @@
+# Maintainer: Christian Hesse 
+# Maintainer: Ronald van Haren 
+# Contributor: Judd Vinet 
+
+pkgname=iproute2
+pkgver=5.7.0
+pkgrel=1
+pkgdesc='IP Routing Utilities'
+arch=('x86_64')
+license=('GPL2')
+url='https://git.kernel.org/pub/scm/network/iproute2/iproute2.git'
+depends=('glibc' 'iptables' 'libelf')
+optdepends=('linux-atm: ATM support')
+provides=('iproute')
+backup=('etc/iproute2/ematch_map'
+'etc/iproute2/rt_dsfield'
+'etc/iproute2/rt_protos'
+'etc/iproute2/rt_realms'
+'etc/iproute2/rt_scopes'
+'etc/iproute2/rt_tables')
+makedepends=('linux-atm')
+options=('staticlibs')
+validpgpkeys=('9F6FC345B05BE7E766B83C8F80A77F6095CDE47E') # Stephen Hemminger

[arch-commits] Commit in iproute2/repos (3 files)

2020-04-02 Thread Christian Hesse via arch-commits
Date: Thursday, April 2, 2020 @ 19:02:39
  Author: eworm
Revision: 379157

archrelease: copy trunk to testing-x86_64

Added:
  iproute2/repos/testing-x86_64/
  iproute2/repos/testing-x86_64/0001-make-iproute2-fhs-compliant.patch
(from rev 379156, iproute2/trunk/0001-make-iproute2-fhs-compliant.patch)
  iproute2/repos/testing-x86_64/PKGBUILD
(from rev 379156, iproute2/trunk/PKGBUILD)

+
 0001-make-iproute2-fhs-compliant.patch |  101 +++
 PKGBUILD   |   57 +
 2 files changed, 158 insertions(+)

Copied: iproute2/repos/testing-x86_64/0001-make-iproute2-fhs-compliant.patch 
(from rev 379156, iproute2/trunk/0001-make-iproute2-fhs-compliant.patch)
===
--- testing-x86_64/0001-make-iproute2-fhs-compliant.patch   
(rev 0)
+++ testing-x86_64/0001-make-iproute2-fhs-compliant.patch   2020-04-02 
19:02:39 UTC (rev 379157)
@@ -0,0 +1,101 @@
+From f0624f6cc656cb177b64e2664f2a806221bfab58 Mon Sep 17 00:00:00 2001
+From: Christian Hesse 
+Date: Thu, 28 Jul 2016 08:49:20 +0200
+Subject: [PATCH 1/1] make iproute2 fhs compliant
+
+Signed-off-by: Christian Hesse 
+---
+ Makefile   |  2 +-
+ netem/Makefile |  4 ++--
+ tc/q_netem.c   |  2 +-
+ tc/tc_util.c   | 15 +++
+ tc/tc_util.h   |  1 +
+ 5 files changed, 20 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index eb571a5..db0a04c 100644
+--- a/Makefile
 b/Makefile
+@@ -14,7 +14,7 @@ DBM_INCLUDE:=$(DESTDIR)/usr/include
+ 
+ SHARED_LIBS = y
+ 
+-DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\"
++DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\" -DDATADIR=\"$(DATADIR)\"
+ ifneq ($(SHARED_LIBS),y)
+ DEFINES+= -DNO_SHARED_LIBS
+ endif
+diff --git a/netem/Makefile b/netem/Makefile
+index e52e125..5b4d283 100644
+--- a/netem/Makefile
 b/netem/Makefile
+@@ -20,9 +20,9 @@ stats: stats.c
+   $(HOSTCC) $(CCOPTS) -I../include -o $@ $@.c -lm
+ 
+ install: all
+-  mkdir -p $(DESTDIR)$(LIBDIR)/tc
++  mkdir -p $(DESTDIR)$(DATADIR)/tc
+   for i in $(DISTDATA); \
+-  do install -m 644 $$i $(DESTDIR)$(LIBDIR)/tc; \
++  do install -m 644 $$i $(DESTDIR)$(DATADIR)/tc; \
+   done
+ 
+ clean:
+diff --git a/tc/q_netem.c b/tc/q_netem.c
+index 8fe2204..a15a5c7 100644
+--- a/tc/q_netem.c
 b/tc/q_netem.c
+@@ -113,7 +113,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", get_tc_datadir(), type);
+   if ((f = fopen(name, "r")) == NULL) {
+   fprintf(stderr, "No distribution data for %s (%s: %s)\n",
+   type, name, strerror(errno));
+diff --git a/tc/tc_util.c b/tc/tc_util.c
+index afc4cf5..728b854 100644
+--- a/tc/tc_util.c
 b/tc/tc_util.c
+@@ -32,6 +32,10 @@
+ #define LIBDIR "/usr/lib"
+ #endif
+ 
++#ifndef DATADIR
++#define DATADIR "/usr/share"
++#endif
++
+ static struct db_names *cls_names;
+ 
+ #define NAMES_DB "/etc/iproute2/tc_cls"
+@@ -73,6 +77,17 @@ const char *get_tc_lib(void)
+   return lib_dir;
+ }
+ 
++const char *get_tc_datadir(void)
++{
++  const char *data_dir;
++
++  data_dir = getenv("TC_DATA_DIR");
++  if (!data_dir)
++  data_dir = DATADIR "/tc/";
++
++  return data_dir;
++}
++
+ int get_qdisc_handle(__u32 *h, const char *str)
+ {
+   __u32 maj;
+diff --git a/tc/tc_util.h b/tc/tc_util.h
+index 61e60b1..6d448de 100644
+--- a/tc/tc_util.h
 b/tc/tc_util.h
+@@ -55,6 +55,7 @@ struct exec_util {
+ };
+ 
+ const char *get_tc_lib(void);
++const char *get_tc_datadir(void);
+ 
+ struct qdisc_util *get_qdisc_kind(const char *str);
+ struct filter_util *get_filter_kind(const char *str);

Copied: iproute2/repos/testing-x86_64/PKGBUILD (from rev 379156, 
iproute2/trunk/PKGBUILD)
===
--- testing-x86_64/PKGBUILD (rev 0)
+++ testing-x86_64/PKGBUILD 2020-04-02 19:02:39 UTC (rev 379157)
@@ -0,0 +1,57 @@
+# Maintainer: Christian Hesse 
+# Maintainer: Ronald van Haren 
+# Contributor: Judd Vinet 
+
+pkgname=iproute2
+pkgver=5.6.0
+pkgrel=1
+pkgdesc='IP Routing Utilities'
+arch=('x86_64')
+license=('GPL2')
+url='https://git.kernel.org/pub/scm/network/iproute2/iproute2.git'
+depends=('glibc' 'iptables' 'libelf')
+optdepends=('linux-atm: ATM support')
+provides=('iproute')
+backup=('etc/iproute2/ematch_map'
+'etc/iproute2/rt_dsfield'
+'etc/iproute2/rt_protos'
+'etc/iproute2/rt_realms'
+'etc/iproute2/rt_scopes'
+'etc/iproute2/rt_tables')
+makedepends=('linux-atm')
+options=('staticlibs')
+validpgpkeys=('9F6FC345B05BE7E766B83C8F80A77F6095CDE47E') # Stephen Hemminger

[arch-commits] Commit in iproute2/repos (3 files)

2020-01-27 Thread Christian Hesse via arch-commits
Date: Monday, January 27, 2020 @ 14:16:10
  Author: eworm
Revision: 374080

archrelease: copy trunk to testing-x86_64

Added:
  iproute2/repos/testing-x86_64/
  iproute2/repos/testing-x86_64/0001-make-iproute2-fhs-compliant.patch
(from rev 374079, iproute2/trunk/0001-make-iproute2-fhs-compliant.patch)
  iproute2/repos/testing-x86_64/PKGBUILD
(from rev 374079, iproute2/trunk/PKGBUILD)

+
 0001-make-iproute2-fhs-compliant.patch |  101 +++
 PKGBUILD   |   57 +
 2 files changed, 158 insertions(+)

Copied: iproute2/repos/testing-x86_64/0001-make-iproute2-fhs-compliant.patch 
(from rev 374079, iproute2/trunk/0001-make-iproute2-fhs-compliant.patch)
===
--- testing-x86_64/0001-make-iproute2-fhs-compliant.patch   
(rev 0)
+++ testing-x86_64/0001-make-iproute2-fhs-compliant.patch   2020-01-27 
14:16:10 UTC (rev 374080)
@@ -0,0 +1,101 @@
+From f0624f6cc656cb177b64e2664f2a806221bfab58 Mon Sep 17 00:00:00 2001
+From: Christian Hesse 
+Date: Thu, 28 Jul 2016 08:49:20 +0200
+Subject: [PATCH 1/1] make iproute2 fhs compliant
+
+Signed-off-by: Christian Hesse 
+---
+ Makefile   |  2 +-
+ netem/Makefile |  4 ++--
+ tc/q_netem.c   |  2 +-
+ tc/tc_util.c   | 15 +++
+ tc/tc_util.h   |  1 +
+ 5 files changed, 20 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index eb571a5..db0a04c 100644
+--- a/Makefile
 b/Makefile
+@@ -14,7 +14,7 @@ DBM_INCLUDE:=$(DESTDIR)/usr/include
+ 
+ SHARED_LIBS = y
+ 
+-DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\"
++DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\" -DDATADIR=\"$(DATADIR)\"
+ ifneq ($(SHARED_LIBS),y)
+ DEFINES+= -DNO_SHARED_LIBS
+ endif
+diff --git a/netem/Makefile b/netem/Makefile
+index e52e125..5b4d283 100644
+--- a/netem/Makefile
 b/netem/Makefile
+@@ -20,9 +20,9 @@ stats: stats.c
+   $(HOSTCC) $(CCOPTS) -I../include -o $@ $@.c -lm
+ 
+ install: all
+-  mkdir -p $(DESTDIR)$(LIBDIR)/tc
++  mkdir -p $(DESTDIR)$(DATADIR)/tc
+   for i in $(DISTDATA); \
+-  do install -m 644 $$i $(DESTDIR)$(LIBDIR)/tc; \
++  do install -m 644 $$i $(DESTDIR)$(DATADIR)/tc; \
+   done
+ 
+ clean:
+diff --git a/tc/q_netem.c b/tc/q_netem.c
+index 8fe2204..a15a5c7 100644
+--- a/tc/q_netem.c
 b/tc/q_netem.c
+@@ -113,7 +113,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", get_tc_datadir(), type);
+   if ((f = fopen(name, "r")) == NULL) {
+   fprintf(stderr, "No distribution data for %s (%s: %s)\n",
+   type, name, strerror(errno));
+diff --git a/tc/tc_util.c b/tc/tc_util.c
+index afc4cf5..728b854 100644
+--- a/tc/tc_util.c
 b/tc/tc_util.c
+@@ -32,6 +32,10 @@
+ #define LIBDIR "/usr/lib"
+ #endif
+ 
++#ifndef DATADIR
++#define DATADIR "/usr/share"
++#endif
++
+ static struct db_names *cls_names;
+ 
+ #define NAMES_DB "/etc/iproute2/tc_cls"
+@@ -73,6 +77,17 @@ const char *get_tc_lib(void)
+   return lib_dir;
+ }
+ 
++const char *get_tc_datadir(void)
++{
++  const char *data_dir;
++
++  data_dir = getenv("TC_DATA_DIR");
++  if (!data_dir)
++  data_dir = DATADIR "/tc/";
++
++  return data_dir;
++}
++
+ int get_qdisc_handle(__u32 *h, const char *str)
+ {
+   __u32 maj;
+diff --git a/tc/tc_util.h b/tc/tc_util.h
+index 61e60b1..6d448de 100644
+--- a/tc/tc_util.h
 b/tc/tc_util.h
+@@ -55,6 +55,7 @@ struct exec_util {
+ };
+ 
+ const char *get_tc_lib(void);
++const char *get_tc_datadir(void);
+ 
+ struct qdisc_util *get_qdisc_kind(const char *str);
+ struct filter_util *get_filter_kind(const char *str);

Copied: iproute2/repos/testing-x86_64/PKGBUILD (from rev 374079, 
iproute2/trunk/PKGBUILD)
===
--- testing-x86_64/PKGBUILD (rev 0)
+++ testing-x86_64/PKGBUILD 2020-01-27 14:16:10 UTC (rev 374080)
@@ -0,0 +1,57 @@
+# Maintainer: Christian Hesse 
+# Maintainer: Ronald van Haren 
+# Contributor: Judd Vinet 
+
+pkgname=iproute2
+pkgver=5.5.0
+pkgrel=1
+pkgdesc='IP Routing Utilities'
+arch=('x86_64')
+license=('GPL2')
+url='https://git.kernel.org/pub/scm/network/iproute2/iproute2.git'
+depends=('glibc' 'iptables' 'libelf')
+optdepends=('linux-atm: ATM support')
+provides=('iproute')
+backup=('etc/iproute2/ematch_map'
+'etc/iproute2/rt_dsfield'
+'etc/iproute2/rt_protos'
+'etc/iproute2/rt_realms'
+'etc/iproute2/rt_scopes'
+'etc/iproute2/rt_tables')
+makedepends=('linux-atm')
+options=('staticlibs')
+validpgpkeys=('9F6FC345B05BE7E766B83C8F80A77F6095CDE47E') # Stephen Hemminger

[arch-commits] Commit in iproute2/repos (3 files)

2019-11-25 Thread Christian Hesse via arch-commits
Date: Monday, November 25, 2019 @ 20:24:45
  Author: eworm
Revision: 369768

archrelease: copy trunk to testing-x86_64

Added:
  iproute2/repos/testing-x86_64/
  iproute2/repos/testing-x86_64/0001-make-iproute2-fhs-compliant.patch
(from rev 369767, iproute2/trunk/0001-make-iproute2-fhs-compliant.patch)
  iproute2/repos/testing-x86_64/PKGBUILD
(from rev 369767, iproute2/trunk/PKGBUILD)

+
 0001-make-iproute2-fhs-compliant.patch |  101 +++
 PKGBUILD   |   57 +
 2 files changed, 158 insertions(+)

Copied: iproute2/repos/testing-x86_64/0001-make-iproute2-fhs-compliant.patch 
(from rev 369767, iproute2/trunk/0001-make-iproute2-fhs-compliant.patch)
===
--- testing-x86_64/0001-make-iproute2-fhs-compliant.patch   
(rev 0)
+++ testing-x86_64/0001-make-iproute2-fhs-compliant.patch   2019-11-25 
20:24:45 UTC (rev 369768)
@@ -0,0 +1,101 @@
+From f0624f6cc656cb177b64e2664f2a806221bfab58 Mon Sep 17 00:00:00 2001
+From: Christian Hesse 
+Date: Thu, 28 Jul 2016 08:49:20 +0200
+Subject: [PATCH 1/1] make iproute2 fhs compliant
+
+Signed-off-by: Christian Hesse 
+---
+ Makefile   |  2 +-
+ netem/Makefile |  4 ++--
+ tc/q_netem.c   |  2 +-
+ tc/tc_util.c   | 15 +++
+ tc/tc_util.h   |  1 +
+ 5 files changed, 20 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index eb571a5..db0a04c 100644
+--- a/Makefile
 b/Makefile
+@@ -14,7 +14,7 @@ DBM_INCLUDE:=$(DESTDIR)/usr/include
+ 
+ SHARED_LIBS = y
+ 
+-DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\"
++DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\" -DDATADIR=\"$(DATADIR)\"
+ ifneq ($(SHARED_LIBS),y)
+ DEFINES+= -DNO_SHARED_LIBS
+ endif
+diff --git a/netem/Makefile b/netem/Makefile
+index e52e125..5b4d283 100644
+--- a/netem/Makefile
 b/netem/Makefile
+@@ -20,9 +20,9 @@ stats: stats.c
+   $(HOSTCC) $(CCOPTS) -I../include -o $@ $@.c -lm
+ 
+ install: all
+-  mkdir -p $(DESTDIR)$(LIBDIR)/tc
++  mkdir -p $(DESTDIR)$(DATADIR)/tc
+   for i in $(DISTDATA); \
+-  do install -m 644 $$i $(DESTDIR)$(LIBDIR)/tc; \
++  do install -m 644 $$i $(DESTDIR)$(DATADIR)/tc; \
+   done
+ 
+ clean:
+diff --git a/tc/q_netem.c b/tc/q_netem.c
+index 8fe2204..a15a5c7 100644
+--- a/tc/q_netem.c
 b/tc/q_netem.c
+@@ -113,7 +113,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", get_tc_datadir(), type);
+   if ((f = fopen(name, "r")) == NULL) {
+   fprintf(stderr, "No distribution data for %s (%s: %s)\n",
+   type, name, strerror(errno));
+diff --git a/tc/tc_util.c b/tc/tc_util.c
+index afc4cf5..728b854 100644
+--- a/tc/tc_util.c
 b/tc/tc_util.c
+@@ -32,6 +32,10 @@
+ #define LIBDIR "/usr/lib"
+ #endif
+ 
++#ifndef DATADIR
++#define DATADIR "/usr/share"
++#endif
++
+ static struct db_names *cls_names;
+ 
+ #define NAMES_DB "/etc/iproute2/tc_cls"
+@@ -73,6 +77,17 @@ const char *get_tc_lib(void)
+   return lib_dir;
+ }
+ 
++const char *get_tc_datadir(void)
++{
++  const char *data_dir;
++
++  data_dir = getenv("TC_DATA_DIR");
++  if (!data_dir)
++  data_dir = DATADIR "/tc/";
++
++  return data_dir;
++}
++
+ int get_qdisc_handle(__u32 *h, const char *str)
+ {
+   __u32 maj;
+diff --git a/tc/tc_util.h b/tc/tc_util.h
+index 61e60b1..6d448de 100644
+--- a/tc/tc_util.h
 b/tc/tc_util.h
+@@ -55,6 +55,7 @@ struct exec_util {
+ };
+ 
+ const char *get_tc_lib(void);
++const char *get_tc_datadir(void);
+ 
+ struct qdisc_util *get_qdisc_kind(const char *str);
+ struct filter_util *get_filter_kind(const char *str);

Copied: iproute2/repos/testing-x86_64/PKGBUILD (from rev 369767, 
iproute2/trunk/PKGBUILD)
===
--- testing-x86_64/PKGBUILD (rev 0)
+++ testing-x86_64/PKGBUILD 2019-11-25 20:24:45 UTC (rev 369768)
@@ -0,0 +1,57 @@
+# Maintainer: Christian Hesse 
+# Maintainer: Ronald van Haren 
+# Contributor: Judd Vinet 
+
+pkgname=iproute2
+pkgver=5.4.0
+pkgrel=1
+pkgdesc='IP Routing Utilities'
+arch=('x86_64')
+license=('GPL2')
+url='https://git.kernel.org/pub/scm/network/iproute2/iproute2.git'
+depends=('glibc' 'iptables' 'libelf')
+optdepends=('linux-atm: ATM support')
+provides=('iproute')
+backup=('etc/iproute2/ematch_map'
+'etc/iproute2/rt_dsfield'
+'etc/iproute2/rt_protos'
+'etc/iproute2/rt_realms'
+'etc/iproute2/rt_scopes'
+'etc/iproute2/rt_tables')
+makedepends=('linux-atm')
+options=('staticlibs')
+validpgpkeys=('9F6FC345B05BE7E766B83C8F80A77F6095CDE47E') # Stephen Hemminger

[arch-commits] Commit in iproute2/repos (3 files)

2019-11-13 Thread Evangelos Foutras via arch-commits
Date: Wednesday, November 13, 2019 @ 16:51:04
  Author: foutrelis
Revision: 368253

archrelease: copy trunk to staging-x86_64

Added:
  iproute2/repos/staging-x86_64/
  iproute2/repos/staging-x86_64/0001-make-iproute2-fhs-compliant.patch
(from rev 368252, iproute2/trunk/0001-make-iproute2-fhs-compliant.patch)
  iproute2/repos/staging-x86_64/PKGBUILD
(from rev 368252, iproute2/trunk/PKGBUILD)

+
 0001-make-iproute2-fhs-compliant.patch |  101 +++
 PKGBUILD   |   57 +
 2 files changed, 158 insertions(+)

Copied: iproute2/repos/staging-x86_64/0001-make-iproute2-fhs-compliant.patch 
(from rev 368252, iproute2/trunk/0001-make-iproute2-fhs-compliant.patch)
===
--- staging-x86_64/0001-make-iproute2-fhs-compliant.patch   
(rev 0)
+++ staging-x86_64/0001-make-iproute2-fhs-compliant.patch   2019-11-13 
16:51:04 UTC (rev 368253)
@@ -0,0 +1,101 @@
+From f0624f6cc656cb177b64e2664f2a806221bfab58 Mon Sep 17 00:00:00 2001
+From: Christian Hesse 
+Date: Thu, 28 Jul 2016 08:49:20 +0200
+Subject: [PATCH 1/1] make iproute2 fhs compliant
+
+Signed-off-by: Christian Hesse 
+---
+ Makefile   |  2 +-
+ netem/Makefile |  4 ++--
+ tc/q_netem.c   |  2 +-
+ tc/tc_util.c   | 15 +++
+ tc/tc_util.h   |  1 +
+ 5 files changed, 20 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index eb571a5..db0a04c 100644
+--- a/Makefile
 b/Makefile
+@@ -14,7 +14,7 @@ DBM_INCLUDE:=$(DESTDIR)/usr/include
+ 
+ SHARED_LIBS = y
+ 
+-DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\"
++DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\" -DDATADIR=\"$(DATADIR)\"
+ ifneq ($(SHARED_LIBS),y)
+ DEFINES+= -DNO_SHARED_LIBS
+ endif
+diff --git a/netem/Makefile b/netem/Makefile
+index e52e125..5b4d283 100644
+--- a/netem/Makefile
 b/netem/Makefile
+@@ -20,9 +20,9 @@ stats: stats.c
+   $(HOSTCC) $(CCOPTS) -I../include -o $@ $@.c -lm
+ 
+ install: all
+-  mkdir -p $(DESTDIR)$(LIBDIR)/tc
++  mkdir -p $(DESTDIR)$(DATADIR)/tc
+   for i in $(DISTDATA); \
+-  do install -m 644 $$i $(DESTDIR)$(LIBDIR)/tc; \
++  do install -m 644 $$i $(DESTDIR)$(DATADIR)/tc; \
+   done
+ 
+ clean:
+diff --git a/tc/q_netem.c b/tc/q_netem.c
+index 8fe2204..a15a5c7 100644
+--- a/tc/q_netem.c
 b/tc/q_netem.c
+@@ -113,7 +113,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", get_tc_datadir(), type);
+   if ((f = fopen(name, "r")) == NULL) {
+   fprintf(stderr, "No distribution data for %s (%s: %s)\n",
+   type, name, strerror(errno));
+diff --git a/tc/tc_util.c b/tc/tc_util.c
+index afc4cf5..728b854 100644
+--- a/tc/tc_util.c
 b/tc/tc_util.c
+@@ -32,6 +32,10 @@
+ #define LIBDIR "/usr/lib"
+ #endif
+ 
++#ifndef DATADIR
++#define DATADIR "/usr/share"
++#endif
++
+ static struct db_names *cls_names;
+ 
+ #define NAMES_DB "/etc/iproute2/tc_cls"
+@@ -73,6 +77,17 @@ const char *get_tc_lib(void)
+   return lib_dir;
+ }
+ 
++const char *get_tc_datadir(void)
++{
++  const char *data_dir;
++
++  data_dir = getenv("TC_DATA_DIR");
++  if (!data_dir)
++  data_dir = DATADIR "/tc/";
++
++  return data_dir;
++}
++
+ int get_qdisc_handle(__u32 *h, const char *str)
+ {
+   __u32 maj;
+diff --git a/tc/tc_util.h b/tc/tc_util.h
+index 61e60b1..6d448de 100644
+--- a/tc/tc_util.h
 b/tc/tc_util.h
+@@ -55,6 +55,7 @@ struct exec_util {
+ };
+ 
+ const char *get_tc_lib(void);
++const char *get_tc_datadir(void);
+ 
+ struct qdisc_util *get_qdisc_kind(const char *str);
+ struct filter_util *get_filter_kind(const char *str);

Copied: iproute2/repos/staging-x86_64/PKGBUILD (from rev 368252, 
iproute2/trunk/PKGBUILD)
===
--- staging-x86_64/PKGBUILD (rev 0)
+++ staging-x86_64/PKGBUILD 2019-11-13 16:51:04 UTC (rev 368253)
@@ -0,0 +1,57 @@
+# Maintainer: Christian Hesse 
+# Maintainer: Ronald van Haren 
+# Contributor: Judd Vinet 
+
+pkgname=iproute2
+pkgver=5.3.0
+pkgrel=2
+pkgdesc='IP Routing Utilities'
+arch=('x86_64')
+license=('GPL2')
+url='https://git.kernel.org/pub/scm/network/iproute2/iproute2.git'
+depends=('glibc' 'iptables' 'libelf')
+optdepends=('linux-atm: ATM support')
+provides=('iproute')
+backup=('etc/iproute2/ematch_map'
+'etc/iproute2/rt_dsfield'
+'etc/iproute2/rt_protos'
+'etc/iproute2/rt_realms'
+'etc/iproute2/rt_scopes'
+'etc/iproute2/rt_tables')
+makedepends=('linux-atm')
+options=('staticlibs')
+validpgpkeys=('9F6FC345B05BE7E766B83C8F80A77F6095CDE47E') # Stephen Hemminger

[arch-commits] Commit in iproute2/repos (3 files)

2019-09-24 Thread Christian Hesse via arch-commits
Date: Tuesday, September 24, 2019 @ 20:54:26
  Author: eworm
Revision: 363365

archrelease: copy trunk to testing-x86_64

Added:
  iproute2/repos/testing-x86_64/
  iproute2/repos/testing-x86_64/0001-make-iproute2-fhs-compliant.patch
(from rev 363364, iproute2/trunk/0001-make-iproute2-fhs-compliant.patch)
  iproute2/repos/testing-x86_64/PKGBUILD
(from rev 363364, iproute2/trunk/PKGBUILD)

+
 0001-make-iproute2-fhs-compliant.patch |  101 +++
 PKGBUILD   |   58 +
 2 files changed, 159 insertions(+)

Copied: iproute2/repos/testing-x86_64/0001-make-iproute2-fhs-compliant.patch 
(from rev 363364, iproute2/trunk/0001-make-iproute2-fhs-compliant.patch)
===
--- testing-x86_64/0001-make-iproute2-fhs-compliant.patch   
(rev 0)
+++ testing-x86_64/0001-make-iproute2-fhs-compliant.patch   2019-09-24 
20:54:26 UTC (rev 363365)
@@ -0,0 +1,101 @@
+From f0624f6cc656cb177b64e2664f2a806221bfab58 Mon Sep 17 00:00:00 2001
+From: Christian Hesse 
+Date: Thu, 28 Jul 2016 08:49:20 +0200
+Subject: [PATCH 1/1] make iproute2 fhs compliant
+
+Signed-off-by: Christian Hesse 
+---
+ Makefile   |  2 +-
+ netem/Makefile |  4 ++--
+ tc/q_netem.c   |  2 +-
+ tc/tc_util.c   | 15 +++
+ tc/tc_util.h   |  1 +
+ 5 files changed, 20 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index eb571a5..db0a04c 100644
+--- a/Makefile
 b/Makefile
+@@ -14,7 +14,7 @@ DBM_INCLUDE:=$(DESTDIR)/usr/include
+ 
+ SHARED_LIBS = y
+ 
+-DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\"
++DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\" -DDATADIR=\"$(DATADIR)\"
+ ifneq ($(SHARED_LIBS),y)
+ DEFINES+= -DNO_SHARED_LIBS
+ endif
+diff --git a/netem/Makefile b/netem/Makefile
+index e52e125..5b4d283 100644
+--- a/netem/Makefile
 b/netem/Makefile
+@@ -20,9 +20,9 @@ stats: stats.c
+   $(HOSTCC) $(CCOPTS) -I../include -o $@ $@.c -lm
+ 
+ install: all
+-  mkdir -p $(DESTDIR)$(LIBDIR)/tc
++  mkdir -p $(DESTDIR)$(DATADIR)/tc
+   for i in $(DISTDATA); \
+-  do install -m 644 $$i $(DESTDIR)$(LIBDIR)/tc; \
++  do install -m 644 $$i $(DESTDIR)$(DATADIR)/tc; \
+   done
+ 
+ clean:
+diff --git a/tc/q_netem.c b/tc/q_netem.c
+index 8fe2204..a15a5c7 100644
+--- a/tc/q_netem.c
 b/tc/q_netem.c
+@@ -113,7 +113,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", get_tc_datadir(), type);
+   if ((f = fopen(name, "r")) == NULL) {
+   fprintf(stderr, "No distribution data for %s (%s: %s)\n",
+   type, name, strerror(errno));
+diff --git a/tc/tc_util.c b/tc/tc_util.c
+index afc4cf5..728b854 100644
+--- a/tc/tc_util.c
 b/tc/tc_util.c
+@@ -32,6 +32,10 @@
+ #define LIBDIR "/usr/lib"
+ #endif
+ 
++#ifndef DATADIR
++#define DATADIR "/usr/share"
++#endif
++
+ static struct db_names *cls_names;
+ 
+ #define NAMES_DB "/etc/iproute2/tc_cls"
+@@ -73,6 +77,17 @@ const char *get_tc_lib(void)
+   return lib_dir;
+ }
+ 
++const char *get_tc_datadir(void)
++{
++  const char *data_dir;
++
++  data_dir = getenv("TC_DATA_DIR");
++  if (!data_dir)
++  data_dir = DATADIR "/tc/";
++
++  return data_dir;
++}
++
+ int get_qdisc_handle(__u32 *h, const char *str)
+ {
+   __u32 maj;
+diff --git a/tc/tc_util.h b/tc/tc_util.h
+index 61e60b1..6d448de 100644
+--- a/tc/tc_util.h
 b/tc/tc_util.h
+@@ -55,6 +55,7 @@ struct exec_util {
+ };
+ 
+ const char *get_tc_lib(void);
++const char *get_tc_datadir(void);
+ 
+ struct qdisc_util *get_qdisc_kind(const char *str);
+ struct filter_util *get_filter_kind(const char *str);

Copied: iproute2/repos/testing-x86_64/PKGBUILD (from rev 363364, 
iproute2/trunk/PKGBUILD)
===
--- testing-x86_64/PKGBUILD (rev 0)
+++ testing-x86_64/PKGBUILD 2019-09-24 20:54:26 UTC (rev 363365)
@@ -0,0 +1,58 @@
+# Maintainer: Christian Hesse 
+# Maintainer: Ronald van Haren 
+# Contributor: Judd Vinet 
+
+pkgname=iproute2
+pkgver=5.3.0
+pkgrel=1
+pkgdesc='IP Routing Utilities'
+arch=('x86_64')
+license=('GPL2')
+url='https://git.kernel.org/pub/scm/network/iproute2/iproute2.git'
+depends=('glibc' 'iptables' 'libelf')
+optdepends=('linux-atm: ATM support')
+groups=('base')
+provides=('iproute')
+backup=('etc/iproute2/ematch_map'
+'etc/iproute2/rt_dsfield'
+'etc/iproute2/rt_protos'
+'etc/iproute2/rt_realms'
+'etc/iproute2/rt_scopes'
+'etc/iproute2/rt_tables')
+makedepends=('linux-atm')
+options=('staticlibs')
+validpgpkeys=('9F6FC345B05BE7E766B83C8F80A77F6095CDE47E') # Stephen Hemminger

[arch-commits] Commit in iproute2/repos (3 files)

2019-07-08 Thread Christian Hesse via arch-commits
Date: Monday, July 8, 2019 @ 19:48:31
  Author: eworm
Revision: 357405

archrelease: copy trunk to testing-x86_64

Added:
  iproute2/repos/testing-x86_64/
  iproute2/repos/testing-x86_64/0001-make-iproute2-fhs-compliant.patch
(from rev 357404, iproute2/trunk/0001-make-iproute2-fhs-compliant.patch)
  iproute2/repos/testing-x86_64/PKGBUILD
(from rev 357404, iproute2/trunk/PKGBUILD)

+
 0001-make-iproute2-fhs-compliant.patch |  101 +++
 PKGBUILD   |   58 +
 2 files changed, 159 insertions(+)

Copied: iproute2/repos/testing-x86_64/0001-make-iproute2-fhs-compliant.patch 
(from rev 357404, iproute2/trunk/0001-make-iproute2-fhs-compliant.patch)
===
--- testing-x86_64/0001-make-iproute2-fhs-compliant.patch   
(rev 0)
+++ testing-x86_64/0001-make-iproute2-fhs-compliant.patch   2019-07-08 
19:48:31 UTC (rev 357405)
@@ -0,0 +1,101 @@
+From f0624f6cc656cb177b64e2664f2a806221bfab58 Mon Sep 17 00:00:00 2001
+From: Christian Hesse 
+Date: Thu, 28 Jul 2016 08:49:20 +0200
+Subject: [PATCH 1/1] make iproute2 fhs compliant
+
+Signed-off-by: Christian Hesse 
+---
+ Makefile   |  2 +-
+ netem/Makefile |  4 ++--
+ tc/q_netem.c   |  2 +-
+ tc/tc_util.c   | 15 +++
+ tc/tc_util.h   |  1 +
+ 5 files changed, 20 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index eb571a5..db0a04c 100644
+--- a/Makefile
 b/Makefile
+@@ -14,7 +14,7 @@ DBM_INCLUDE:=$(DESTDIR)/usr/include
+ 
+ SHARED_LIBS = y
+ 
+-DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\"
++DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\" -DDATADIR=\"$(DATADIR)\"
+ ifneq ($(SHARED_LIBS),y)
+ DEFINES+= -DNO_SHARED_LIBS
+ endif
+diff --git a/netem/Makefile b/netem/Makefile
+index e52e125..5b4d283 100644
+--- a/netem/Makefile
 b/netem/Makefile
+@@ -20,9 +20,9 @@ stats: stats.c
+   $(HOSTCC) $(CCOPTS) -I../include -o $@ $@.c -lm
+ 
+ install: all
+-  mkdir -p $(DESTDIR)$(LIBDIR)/tc
++  mkdir -p $(DESTDIR)$(DATADIR)/tc
+   for i in $(DISTDATA); \
+-  do install -m 644 $$i $(DESTDIR)$(LIBDIR)/tc; \
++  do install -m 644 $$i $(DESTDIR)$(DATADIR)/tc; \
+   done
+ 
+ clean:
+diff --git a/tc/q_netem.c b/tc/q_netem.c
+index 8fe2204..a15a5c7 100644
+--- a/tc/q_netem.c
 b/tc/q_netem.c
+@@ -113,7 +113,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", get_tc_datadir(), type);
+   if ((f = fopen(name, "r")) == NULL) {
+   fprintf(stderr, "No distribution data for %s (%s: %s)\n",
+   type, name, strerror(errno));
+diff --git a/tc/tc_util.c b/tc/tc_util.c
+index afc4cf5..728b854 100644
+--- a/tc/tc_util.c
 b/tc/tc_util.c
+@@ -32,6 +32,10 @@
+ #define LIBDIR "/usr/lib"
+ #endif
+ 
++#ifndef DATADIR
++#define DATADIR "/usr/share"
++#endif
++
+ static struct db_names *cls_names;
+ 
+ #define NAMES_DB "/etc/iproute2/tc_cls"
+@@ -73,6 +77,17 @@ const char *get_tc_lib(void)
+   return lib_dir;
+ }
+ 
++const char *get_tc_datadir(void)
++{
++  const char *data_dir;
++
++  data_dir = getenv("TC_DATA_DIR");
++  if (!data_dir)
++  data_dir = DATADIR "/tc/";
++
++  return data_dir;
++}
++
+ int get_qdisc_handle(__u32 *h, const char *str)
+ {
+   __u32 maj;
+diff --git a/tc/tc_util.h b/tc/tc_util.h
+index 61e60b1..6d448de 100644
+--- a/tc/tc_util.h
 b/tc/tc_util.h
+@@ -55,6 +55,7 @@ struct exec_util {
+ };
+ 
+ const char *get_tc_lib(void);
++const char *get_tc_datadir(void);
+ 
+ struct qdisc_util *get_qdisc_kind(const char *str);
+ struct filter_util *get_filter_kind(const char *str);

Copied: iproute2/repos/testing-x86_64/PKGBUILD (from rev 357404, 
iproute2/trunk/PKGBUILD)
===
--- testing-x86_64/PKGBUILD (rev 0)
+++ testing-x86_64/PKGBUILD 2019-07-08 19:48:31 UTC (rev 357405)
@@ -0,0 +1,58 @@
+# Maintainer: Christian Hesse 
+# Maintainer: Ronald van Haren 
+# Contributor: Judd Vinet 
+
+pkgname=iproute2
+pkgver=5.2.0
+pkgrel=1
+pkgdesc='IP Routing Utilities'
+arch=('x86_64')
+license=('GPL2')
+url='https://git.kernel.org/pub/scm/network/iproute2/iproute2.git'
+depends=('glibc' 'iptables' 'libelf')
+optdepends=('linux-atm: ATM support')
+groups=('base')
+provides=('iproute')
+backup=('etc/iproute2/ematch_map'
+'etc/iproute2/rt_dsfield'
+'etc/iproute2/rt_protos'
+'etc/iproute2/rt_realms'
+'etc/iproute2/rt_scopes'
+'etc/iproute2/rt_tables')
+makedepends=('linux-atm')
+options=('staticlibs')
+validpgpkeys=('9F6FC345B05BE7E766B83C8F80A77F6095CDE47E') # Stephen Hemminger

[arch-commits] Commit in iproute2/repos (3 files)

2019-05-10 Thread Christian Hesse via arch-commits
Date: Friday, May 10, 2019 @ 20:18:11
  Author: eworm
Revision: 352828

archrelease: copy trunk to testing-x86_64

Added:
  iproute2/repos/testing-x86_64/
  iproute2/repos/testing-x86_64/0001-make-iproute2-fhs-compliant.patch
(from rev 352827, iproute2/trunk/0001-make-iproute2-fhs-compliant.patch)
  iproute2/repos/testing-x86_64/PKGBUILD
(from rev 352827, iproute2/trunk/PKGBUILD)

+
 0001-make-iproute2-fhs-compliant.patch |  101 +++
 PKGBUILD   |   58 +
 2 files changed, 159 insertions(+)

Copied: iproute2/repos/testing-x86_64/0001-make-iproute2-fhs-compliant.patch 
(from rev 352827, iproute2/trunk/0001-make-iproute2-fhs-compliant.patch)
===
--- testing-x86_64/0001-make-iproute2-fhs-compliant.patch   
(rev 0)
+++ testing-x86_64/0001-make-iproute2-fhs-compliant.patch   2019-05-10 
20:18:11 UTC (rev 352828)
@@ -0,0 +1,101 @@
+From f0624f6cc656cb177b64e2664f2a806221bfab58 Mon Sep 17 00:00:00 2001
+From: Christian Hesse 
+Date: Thu, 28 Jul 2016 08:49:20 +0200
+Subject: [PATCH 1/1] make iproute2 fhs compliant
+
+Signed-off-by: Christian Hesse 
+---
+ Makefile   |  2 +-
+ netem/Makefile |  4 ++--
+ tc/q_netem.c   |  2 +-
+ tc/tc_util.c   | 15 +++
+ tc/tc_util.h   |  1 +
+ 5 files changed, 20 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index eb571a5..db0a04c 100644
+--- a/Makefile
 b/Makefile
+@@ -14,7 +14,7 @@ DBM_INCLUDE:=$(DESTDIR)/usr/include
+ 
+ SHARED_LIBS = y
+ 
+-DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\"
++DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\" -DDATADIR=\"$(DATADIR)\"
+ ifneq ($(SHARED_LIBS),y)
+ DEFINES+= -DNO_SHARED_LIBS
+ endif
+diff --git a/netem/Makefile b/netem/Makefile
+index e52e125..5b4d283 100644
+--- a/netem/Makefile
 b/netem/Makefile
+@@ -20,9 +20,9 @@ stats: stats.c
+   $(HOSTCC) $(CCOPTS) -I../include -o $@ $@.c -lm
+ 
+ install: all
+-  mkdir -p $(DESTDIR)$(LIBDIR)/tc
++  mkdir -p $(DESTDIR)$(DATADIR)/tc
+   for i in $(DISTDATA); \
+-  do install -m 644 $$i $(DESTDIR)$(LIBDIR)/tc; \
++  do install -m 644 $$i $(DESTDIR)$(DATADIR)/tc; \
+   done
+ 
+ clean:
+diff --git a/tc/q_netem.c b/tc/q_netem.c
+index 8fe2204..a15a5c7 100644
+--- a/tc/q_netem.c
 b/tc/q_netem.c
+@@ -113,7 +113,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", get_tc_datadir(), type);
+   if ((f = fopen(name, "r")) == NULL) {
+   fprintf(stderr, "No distribution data for %s (%s: %s)\n",
+   type, name, strerror(errno));
+diff --git a/tc/tc_util.c b/tc/tc_util.c
+index afc4cf5..728b854 100644
+--- a/tc/tc_util.c
 b/tc/tc_util.c
+@@ -32,6 +32,10 @@
+ #define LIBDIR "/usr/lib"
+ #endif
+ 
++#ifndef DATADIR
++#define DATADIR "/usr/share"
++#endif
++
+ static struct db_names *cls_names;
+ 
+ #define NAMES_DB "/etc/iproute2/tc_cls"
+@@ -73,6 +77,17 @@ const char *get_tc_lib(void)
+   return lib_dir;
+ }
+ 
++const char *get_tc_datadir(void)
++{
++  const char *data_dir;
++
++  data_dir = getenv("TC_DATA_DIR");
++  if (!data_dir)
++  data_dir = DATADIR "/tc/";
++
++  return data_dir;
++}
++
+ int get_qdisc_handle(__u32 *h, const char *str)
+ {
+   __u32 maj;
+diff --git a/tc/tc_util.h b/tc/tc_util.h
+index 61e60b1..6d448de 100644
+--- a/tc/tc_util.h
 b/tc/tc_util.h
+@@ -55,6 +55,7 @@ struct exec_util {
+ };
+ 
+ const char *get_tc_lib(void);
++const char *get_tc_datadir(void);
+ 
+ struct qdisc_util *get_qdisc_kind(const char *str);
+ struct filter_util *get_filter_kind(const char *str);

Copied: iproute2/repos/testing-x86_64/PKGBUILD (from rev 352827, 
iproute2/trunk/PKGBUILD)
===
--- testing-x86_64/PKGBUILD (rev 0)
+++ testing-x86_64/PKGBUILD 2019-05-10 20:18:11 UTC (rev 352828)
@@ -0,0 +1,58 @@
+# Maintainer: Christian Hesse 
+# Maintainer: Ronald van Haren 
+# Contributor: Judd Vinet 
+
+pkgname=iproute2
+pkgver=5.1.0
+pkgrel=1
+pkgdesc='IP Routing Utilities'
+arch=('x86_64')
+license=('GPL2')
+url='https://git.kernel.org/pub/scm/network/iproute2/iproute2.git'
+depends=('glibc' 'iptables' 'libelf')
+optdepends=('linux-atm: ATM support')
+groups=('base')
+provides=('iproute')
+backup=('etc/iproute2/ematch_map'
+'etc/iproute2/rt_dsfield'
+'etc/iproute2/rt_protos'
+'etc/iproute2/rt_realms'
+'etc/iproute2/rt_scopes'
+'etc/iproute2/rt_tables')
+makedepends=('linux-atm')
+options=('staticlibs')
+validpgpkeys=('9F6FC345B05BE7E766B83C8F80A77F6095CDE47E') # Stephen Hemminger

[arch-commits] Commit in iproute2/repos (3 files)

2019-03-19 Thread Christian Hesse via arch-commits
Date: Tuesday, March 19, 2019 @ 19:29:50
  Author: eworm
Revision: 348723

archrelease: copy trunk to testing-x86_64

Added:
  iproute2/repos/testing-x86_64/
  iproute2/repos/testing-x86_64/0001-make-iproute2-fhs-compliant.patch
(from rev 348722, iproute2/trunk/0001-make-iproute2-fhs-compliant.patch)
  iproute2/repos/testing-x86_64/PKGBUILD
(from rev 348722, iproute2/trunk/PKGBUILD)

+
 0001-make-iproute2-fhs-compliant.patch |  101 +++
 PKGBUILD   |   58 +
 2 files changed, 159 insertions(+)

Copied: iproute2/repos/testing-x86_64/0001-make-iproute2-fhs-compliant.patch 
(from rev 348722, iproute2/trunk/0001-make-iproute2-fhs-compliant.patch)
===
--- testing-x86_64/0001-make-iproute2-fhs-compliant.patch   
(rev 0)
+++ testing-x86_64/0001-make-iproute2-fhs-compliant.patch   2019-03-19 
19:29:50 UTC (rev 348723)
@@ -0,0 +1,101 @@
+From f0624f6cc656cb177b64e2664f2a806221bfab58 Mon Sep 17 00:00:00 2001
+From: Christian Hesse 
+Date: Thu, 28 Jul 2016 08:49:20 +0200
+Subject: [PATCH 1/1] make iproute2 fhs compliant
+
+Signed-off-by: Christian Hesse 
+---
+ Makefile   |  2 +-
+ netem/Makefile |  4 ++--
+ tc/q_netem.c   |  2 +-
+ tc/tc_util.c   | 15 +++
+ tc/tc_util.h   |  1 +
+ 5 files changed, 20 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index eb571a5..db0a04c 100644
+--- a/Makefile
 b/Makefile
+@@ -14,7 +14,7 @@ DBM_INCLUDE:=$(DESTDIR)/usr/include
+ 
+ SHARED_LIBS = y
+ 
+-DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\"
++DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\" -DDATADIR=\"$(DATADIR)\"
+ ifneq ($(SHARED_LIBS),y)
+ DEFINES+= -DNO_SHARED_LIBS
+ endif
+diff --git a/netem/Makefile b/netem/Makefile
+index e52e125..5b4d283 100644
+--- a/netem/Makefile
 b/netem/Makefile
+@@ -20,9 +20,9 @@ stats: stats.c
+   $(HOSTCC) $(CCOPTS) -I../include -o $@ $@.c -lm
+ 
+ install: all
+-  mkdir -p $(DESTDIR)$(LIBDIR)/tc
++  mkdir -p $(DESTDIR)$(DATADIR)/tc
+   for i in $(DISTDATA); \
+-  do install -m 644 $$i $(DESTDIR)$(LIBDIR)/tc; \
++  do install -m 644 $$i $(DESTDIR)$(DATADIR)/tc; \
+   done
+ 
+ clean:
+diff --git a/tc/q_netem.c b/tc/q_netem.c
+index 8fe2204..a15a5c7 100644
+--- a/tc/q_netem.c
 b/tc/q_netem.c
+@@ -113,7 +113,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", get_tc_datadir(), type);
+   if ((f = fopen(name, "r")) == NULL) {
+   fprintf(stderr, "No distribution data for %s (%s: %s)\n",
+   type, name, strerror(errno));
+diff --git a/tc/tc_util.c b/tc/tc_util.c
+index afc4cf5..728b854 100644
+--- a/tc/tc_util.c
 b/tc/tc_util.c
+@@ -32,6 +32,10 @@
+ #define LIBDIR "/usr/lib"
+ #endif
+ 
++#ifndef DATADIR
++#define DATADIR "/usr/share"
++#endif
++
+ static struct db_names *cls_names;
+ 
+ #define NAMES_DB "/etc/iproute2/tc_cls"
+@@ -73,6 +77,17 @@ const char *get_tc_lib(void)
+   return lib_dir;
+ }
+ 
++const char *get_tc_datadir(void)
++{
++  const char *data_dir;
++
++  data_dir = getenv("TC_DATA_DIR");
++  if (!data_dir)
++  data_dir = DATADIR "/tc/";
++
++  return data_dir;
++}
++
+ int get_qdisc_handle(__u32 *h, const char *str)
+ {
+   __u32 maj;
+diff --git a/tc/tc_util.h b/tc/tc_util.h
+index 61e60b1..6d448de 100644
+--- a/tc/tc_util.h
 b/tc/tc_util.h
+@@ -55,6 +55,7 @@ struct exec_util {
+ };
+ 
+ const char *get_tc_lib(void);
++const char *get_tc_datadir(void);
+ 
+ struct qdisc_util *get_qdisc_kind(const char *str);
+ struct filter_util *get_filter_kind(const char *str);

Copied: iproute2/repos/testing-x86_64/PKGBUILD (from rev 348722, 
iproute2/trunk/PKGBUILD)
===
--- testing-x86_64/PKGBUILD (rev 0)
+++ testing-x86_64/PKGBUILD 2019-03-19 19:29:50 UTC (rev 348723)
@@ -0,0 +1,58 @@
+# Maintainer: Christian Hesse 
+# Maintainer: Ronald van Haren 
+# Contributor: Judd Vinet 
+
+pkgname=iproute2
+pkgver=5.0.0
+pkgrel=1
+pkgdesc='IP Routing Utilities'
+arch=('x86_64')
+license=('GPL2')
+url='https://git.kernel.org/pub/scm/network/iproute2/iproute2.git'
+depends=('glibc' 'iptables' 'libelf')
+optdepends=('linux-atm: ATM support')
+groups=('base')
+provides=('iproute')
+backup=('etc/iproute2/ematch_map'
+'etc/iproute2/rt_dsfield'
+'etc/iproute2/rt_protos'
+'etc/iproute2/rt_realms'
+'etc/iproute2/rt_scopes'
+'etc/iproute2/rt_tables')
+makedepends=('linux-atm')
+options=('staticlibs')
+validpgpkeys=('9F6FC345B05BE7E766B83C8F80A77F6095CDE47E') # Stephen Hemminger

[arch-commits] Commit in iproute2/repos (3 files)

2019-01-07 Thread Christian Hesse via arch-commits
Date: Monday, January 7, 2019 @ 19:54:46
  Author: eworm
Revision: 343085

archrelease: copy trunk to testing-x86_64

Added:
  iproute2/repos/testing-x86_64/
  iproute2/repos/testing-x86_64/0001-make-iproute2-fhs-compliant.patch
(from rev 343084, iproute2/trunk/0001-make-iproute2-fhs-compliant.patch)
  iproute2/repos/testing-x86_64/PKGBUILD
(from rev 343084, iproute2/trunk/PKGBUILD)

+
 0001-make-iproute2-fhs-compliant.patch |  101 +++
 PKGBUILD   |   58 +
 2 files changed, 159 insertions(+)

Copied: iproute2/repos/testing-x86_64/0001-make-iproute2-fhs-compliant.patch 
(from rev 343084, iproute2/trunk/0001-make-iproute2-fhs-compliant.patch)
===
--- testing-x86_64/0001-make-iproute2-fhs-compliant.patch   
(rev 0)
+++ testing-x86_64/0001-make-iproute2-fhs-compliant.patch   2019-01-07 
19:54:46 UTC (rev 343085)
@@ -0,0 +1,101 @@
+From f0624f6cc656cb177b64e2664f2a806221bfab58 Mon Sep 17 00:00:00 2001
+From: Christian Hesse 
+Date: Thu, 28 Jul 2016 08:49:20 +0200
+Subject: [PATCH 1/1] make iproute2 fhs compliant
+
+Signed-off-by: Christian Hesse 
+---
+ Makefile   |  2 +-
+ netem/Makefile |  4 ++--
+ tc/q_netem.c   |  2 +-
+ tc/tc_util.c   | 15 +++
+ tc/tc_util.h   |  1 +
+ 5 files changed, 20 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index eb571a5..db0a04c 100644
+--- a/Makefile
 b/Makefile
+@@ -14,7 +14,7 @@ DBM_INCLUDE:=$(DESTDIR)/usr/include
+ 
+ SHARED_LIBS = y
+ 
+-DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\"
++DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\" -DDATADIR=\"$(DATADIR)\"
+ ifneq ($(SHARED_LIBS),y)
+ DEFINES+= -DNO_SHARED_LIBS
+ endif
+diff --git a/netem/Makefile b/netem/Makefile
+index e52e125..5b4d283 100644
+--- a/netem/Makefile
 b/netem/Makefile
+@@ -20,9 +20,9 @@ stats: stats.c
+   $(HOSTCC) $(CCOPTS) -I../include -o $@ $@.c -lm
+ 
+ install: all
+-  mkdir -p $(DESTDIR)$(LIBDIR)/tc
++  mkdir -p $(DESTDIR)$(DATADIR)/tc
+   for i in $(DISTDATA); \
+-  do install -m 644 $$i $(DESTDIR)$(LIBDIR)/tc; \
++  do install -m 644 $$i $(DESTDIR)$(DATADIR)/tc; \
+   done
+ 
+ clean:
+diff --git a/tc/q_netem.c b/tc/q_netem.c
+index 8fe2204..a15a5c7 100644
+--- a/tc/q_netem.c
 b/tc/q_netem.c
+@@ -113,7 +113,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", get_tc_datadir(), type);
+   if ((f = fopen(name, "r")) == NULL) {
+   fprintf(stderr, "No distribution data for %s (%s: %s)\n",
+   type, name, strerror(errno));
+diff --git a/tc/tc_util.c b/tc/tc_util.c
+index afc4cf5..728b854 100644
+--- a/tc/tc_util.c
 b/tc/tc_util.c
+@@ -32,6 +32,10 @@
+ #define LIBDIR "/usr/lib"
+ #endif
+ 
++#ifndef DATADIR
++#define DATADIR "/usr/share"
++#endif
++
+ static struct db_names *cls_names;
+ 
+ #define NAMES_DB "/etc/iproute2/tc_cls"
+@@ -73,6 +77,17 @@ const char *get_tc_lib(void)
+   return lib_dir;
+ }
+ 
++const char *get_tc_datadir(void)
++{
++  const char *data_dir;
++
++  data_dir = getenv("TC_DATA_DIR");
++  if (!data_dir)
++  data_dir = DATADIR "/tc/";
++
++  return data_dir;
++}
++
+ int get_qdisc_handle(__u32 *h, const char *str)
+ {
+   __u32 maj;
+diff --git a/tc/tc_util.h b/tc/tc_util.h
+index 61e60b1..6d448de 100644
+--- a/tc/tc_util.h
 b/tc/tc_util.h
+@@ -55,6 +55,7 @@ struct exec_util {
+ };
+ 
+ const char *get_tc_lib(void);
++const char *get_tc_datadir(void);
+ 
+ struct qdisc_util *get_qdisc_kind(const char *str);
+ struct filter_util *get_filter_kind(const char *str);

Copied: iproute2/repos/testing-x86_64/PKGBUILD (from rev 343084, 
iproute2/trunk/PKGBUILD)
===
--- testing-x86_64/PKGBUILD (rev 0)
+++ testing-x86_64/PKGBUILD 2019-01-07 19:54:46 UTC (rev 343085)
@@ -0,0 +1,58 @@
+# Maintainer: Christian Hesse 
+# Maintainer: Ronald van Haren 
+# Contributor: Judd Vinet 
+
+pkgname=iproute2
+pkgver=4.20.0
+pkgrel=1
+pkgdesc='IP Routing Utilities'
+arch=('x86_64')
+license=('GPL2')
+url='https://git.kernel.org/pub/scm/network/iproute2/iproute2.git'
+depends=('glibc' 'iptables' 'libelf')
+optdepends=('linux-atm: ATM support')
+groups=('base')
+provides=('iproute')
+backup=('etc/iproute2/ematch_map'
+'etc/iproute2/rt_dsfield'
+'etc/iproute2/rt_protos'
+'etc/iproute2/rt_realms'
+'etc/iproute2/rt_scopes'
+'etc/iproute2/rt_tables')
+makedepends=('linux-atm')
+options=('staticlibs')
+validpgpkeys=('9F6FC345B05BE7E766B83C8F80A77F6095CDE47E') # Stephen Hemminger

[arch-commits] Commit in iproute2/repos (3 files)

2018-10-24 Thread Christian Hesse via arch-commits
Date: Wednesday, October 24, 2018 @ 07:48:44
  Author: eworm
Revision: 337209

archrelease: copy trunk to testing-x86_64

Added:
  iproute2/repos/testing-x86_64/
  iproute2/repos/testing-x86_64/0001-make-iproute2-fhs-compliant.patch
(from rev 337208, iproute2/trunk/0001-make-iproute2-fhs-compliant.patch)
  iproute2/repos/testing-x86_64/PKGBUILD
(from rev 337208, iproute2/trunk/PKGBUILD)

+
 0001-make-iproute2-fhs-compliant.patch |  101 +++
 PKGBUILD   |   58 +
 2 files changed, 159 insertions(+)

Copied: iproute2/repos/testing-x86_64/0001-make-iproute2-fhs-compliant.patch 
(from rev 337208, iproute2/trunk/0001-make-iproute2-fhs-compliant.patch)
===
--- testing-x86_64/0001-make-iproute2-fhs-compliant.patch   
(rev 0)
+++ testing-x86_64/0001-make-iproute2-fhs-compliant.patch   2018-10-24 
07:48:44 UTC (rev 337209)
@@ -0,0 +1,101 @@
+From f0624f6cc656cb177b64e2664f2a806221bfab58 Mon Sep 17 00:00:00 2001
+From: Christian Hesse 
+Date: Thu, 28 Jul 2016 08:49:20 +0200
+Subject: [PATCH 1/1] make iproute2 fhs compliant
+
+Signed-off-by: Christian Hesse 
+---
+ Makefile   |  2 +-
+ netem/Makefile |  4 ++--
+ tc/q_netem.c   |  2 +-
+ tc/tc_util.c   | 15 +++
+ tc/tc_util.h   |  1 +
+ 5 files changed, 20 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index eb571a5..db0a04c 100644
+--- a/Makefile
 b/Makefile
+@@ -14,7 +14,7 @@ DBM_INCLUDE:=$(DESTDIR)/usr/include
+ 
+ SHARED_LIBS = y
+ 
+-DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\"
++DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\" -DDATADIR=\"$(DATADIR)\"
+ ifneq ($(SHARED_LIBS),y)
+ DEFINES+= -DNO_SHARED_LIBS
+ endif
+diff --git a/netem/Makefile b/netem/Makefile
+index e52e125..5b4d283 100644
+--- a/netem/Makefile
 b/netem/Makefile
+@@ -20,9 +20,9 @@ stats: stats.c
+   $(HOSTCC) $(CCOPTS) -I../include -o $@ $@.c -lm
+ 
+ install: all
+-  mkdir -p $(DESTDIR)$(LIBDIR)/tc
++  mkdir -p $(DESTDIR)$(DATADIR)/tc
+   for i in $(DISTDATA); \
+-  do install -m 644 $$i $(DESTDIR)$(LIBDIR)/tc; \
++  do install -m 644 $$i $(DESTDIR)$(DATADIR)/tc; \
+   done
+ 
+ clean:
+diff --git a/tc/q_netem.c b/tc/q_netem.c
+index 8fe2204..a15a5c7 100644
+--- a/tc/q_netem.c
 b/tc/q_netem.c
+@@ -113,7 +113,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", get_tc_datadir(), type);
+   if ((f = fopen(name, "r")) == NULL) {
+   fprintf(stderr, "No distribution data for %s (%s: %s)\n",
+   type, name, strerror(errno));
+diff --git a/tc/tc_util.c b/tc/tc_util.c
+index afc4cf5..728b854 100644
+--- a/tc/tc_util.c
 b/tc/tc_util.c
+@@ -32,6 +32,10 @@
+ #define LIBDIR "/usr/lib"
+ #endif
+ 
++#ifndef DATADIR
++#define DATADIR "/usr/share"
++#endif
++
+ static struct db_names *cls_names;
+ 
+ #define NAMES_DB "/etc/iproute2/tc_cls"
+@@ -73,6 +77,17 @@ const char *get_tc_lib(void)
+   return lib_dir;
+ }
+ 
++const char *get_tc_datadir(void)
++{
++  const char *data_dir;
++
++  data_dir = getenv("TC_DATA_DIR");
++  if (!data_dir)
++  data_dir = DATADIR "/tc/";
++
++  return data_dir;
++}
++
+ int get_qdisc_handle(__u32 *h, const char *str)
+ {
+   __u32 maj;
+diff --git a/tc/tc_util.h b/tc/tc_util.h
+index 61e60b1..6d448de 100644
+--- a/tc/tc_util.h
 b/tc/tc_util.h
+@@ -55,6 +55,7 @@ struct exec_util {
+ };
+ 
+ const char *get_tc_lib(void);
++const char *get_tc_datadir(void);
+ 
+ struct qdisc_util *get_qdisc_kind(const char *str);
+ struct filter_util *get_filter_kind(const char *str);

Copied: iproute2/repos/testing-x86_64/PKGBUILD (from rev 337208, 
iproute2/trunk/PKGBUILD)
===
--- testing-x86_64/PKGBUILD (rev 0)
+++ testing-x86_64/PKGBUILD 2018-10-24 07:48:44 UTC (rev 337209)
@@ -0,0 +1,58 @@
+# Maintainer: Christian Hesse 
+# Maintainer: Ronald van Haren 
+# Contributor: Judd Vinet 
+
+pkgname=iproute2
+pkgver=4.19.0
+pkgrel=1
+pkgdesc='IP Routing Utilities'
+arch=('x86_64')
+license=('GPL2')
+url='https://git.kernel.org/pub/scm/network/iproute2/iproute2.git'
+depends=('glibc' 'iptables' 'libelf')
+optdepends=('linux-atm: ATM support')
+groups=('base')
+provides=('iproute')
+backup=('etc/iproute2/ematch_map'
+'etc/iproute2/rt_dsfield'
+'etc/iproute2/rt_protos'
+'etc/iproute2/rt_realms'
+'etc/iproute2/rt_scopes'
+'etc/iproute2/rt_tables')
+makedepends=('linux-atm')
+options=('staticlibs')
+validpgpkeys=('9F6FC345B05BE7E766B83C8F80A77F6095CDE47E') # Stephen Hemminger

[arch-commits] Commit in iproute2/repos (3 files)

2018-08-13 Thread Christian Hesse via arch-commits
Date: Tuesday, August 14, 2018 @ 05:39:14
  Author: eworm
Revision: 331478

archrelease: copy trunk to testing-x86_64

Added:
  iproute2/repos/testing-x86_64/
  iproute2/repos/testing-x86_64/0001-make-iproute2-fhs-compliant.patch
(from rev 331477, iproute2/trunk/0001-make-iproute2-fhs-compliant.patch)
  iproute2/repos/testing-x86_64/PKGBUILD
(from rev 331477, iproute2/trunk/PKGBUILD)

+
 0001-make-iproute2-fhs-compliant.patch |  101 +++
 PKGBUILD   |   59 ++
 2 files changed, 160 insertions(+)

Copied: iproute2/repos/testing-x86_64/0001-make-iproute2-fhs-compliant.patch 
(from rev 331477, iproute2/trunk/0001-make-iproute2-fhs-compliant.patch)
===
--- testing-x86_64/0001-make-iproute2-fhs-compliant.patch   
(rev 0)
+++ testing-x86_64/0001-make-iproute2-fhs-compliant.patch   2018-08-14 
05:39:14 UTC (rev 331478)
@@ -0,0 +1,101 @@
+From f0624f6cc656cb177b64e2664f2a806221bfab58 Mon Sep 17 00:00:00 2001
+From: Christian Hesse 
+Date: Thu, 28 Jul 2016 08:49:20 +0200
+Subject: [PATCH 1/1] make iproute2 fhs compliant
+
+Signed-off-by: Christian Hesse 
+---
+ Makefile   |  2 +-
+ netem/Makefile |  4 ++--
+ tc/q_netem.c   |  2 +-
+ tc/tc_util.c   | 15 +++
+ tc/tc_util.h   |  1 +
+ 5 files changed, 20 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index eb571a5..db0a04c 100644
+--- a/Makefile
 b/Makefile
+@@ -14,7 +14,7 @@ DBM_INCLUDE:=$(DESTDIR)/usr/include
+ 
+ SHARED_LIBS = y
+ 
+-DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\"
++DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\" -DDATADIR=\"$(DATADIR)\"
+ ifneq ($(SHARED_LIBS),y)
+ DEFINES+= -DNO_SHARED_LIBS
+ endif
+diff --git a/netem/Makefile b/netem/Makefile
+index e52e125..5b4d283 100644
+--- a/netem/Makefile
 b/netem/Makefile
+@@ -20,9 +20,9 @@ stats: stats.c
+   $(HOSTCC) $(CCOPTS) -I../include -o $@ $@.c -lm
+ 
+ install: all
+-  mkdir -p $(DESTDIR)$(LIBDIR)/tc
++  mkdir -p $(DESTDIR)$(DATADIR)/tc
+   for i in $(DISTDATA); \
+-  do install -m 644 $$i $(DESTDIR)$(LIBDIR)/tc; \
++  do install -m 644 $$i $(DESTDIR)$(DATADIR)/tc; \
+   done
+ 
+ clean:
+diff --git a/tc/q_netem.c b/tc/q_netem.c
+index 8fe2204..a15a5c7 100644
+--- a/tc/q_netem.c
 b/tc/q_netem.c
+@@ -113,7 +113,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", get_tc_datadir(), type);
+   if ((f = fopen(name, "r")) == NULL) {
+   fprintf(stderr, "No distribution data for %s (%s: %s)\n",
+   type, name, strerror(errno));
+diff --git a/tc/tc_util.c b/tc/tc_util.c
+index afc4cf5..728b854 100644
+--- a/tc/tc_util.c
 b/tc/tc_util.c
+@@ -32,6 +32,10 @@
+ #define LIBDIR "/usr/lib"
+ #endif
+ 
++#ifndef DATADIR
++#define DATADIR "/usr/share"
++#endif
++
+ static struct db_names *cls_names;
+ 
+ #define NAMES_DB "/etc/iproute2/tc_cls"
+@@ -73,6 +77,17 @@ const char *get_tc_lib(void)
+   return lib_dir;
+ }
+ 
++const char *get_tc_datadir(void)
++{
++  const char *data_dir;
++
++  data_dir = getenv("TC_DATA_DIR");
++  if (!data_dir)
++  data_dir = DATADIR "/tc/";
++
++  return data_dir;
++}
++
+ int get_qdisc_handle(__u32 *h, const char *str)
+ {
+   __u32 maj;
+diff --git a/tc/tc_util.h b/tc/tc_util.h
+index 61e60b1..6d448de 100644
+--- a/tc/tc_util.h
 b/tc/tc_util.h
+@@ -55,6 +55,7 @@ struct exec_util {
+ };
+ 
+ const char *get_tc_lib(void);
++const char *get_tc_datadir(void);
+ 
+ struct qdisc_util *get_qdisc_kind(const char *str);
+ struct filter_util *get_filter_kind(const char *str);

Copied: iproute2/repos/testing-x86_64/PKGBUILD (from rev 331477, 
iproute2/trunk/PKGBUILD)
===
--- testing-x86_64/PKGBUILD (rev 0)
+++ testing-x86_64/PKGBUILD 2018-08-14 05:39:14 UTC (rev 331478)
@@ -0,0 +1,59 @@
+# $Id$
+# Maintainer: Christian Hesse 
+# Maintainer: Ronald van Haren 
+# Contributor: Judd Vinet 
+
+pkgname=iproute2
+pkgver=4.18.0
+pkgrel=1
+pkgdesc='IP Routing Utilities'
+arch=('x86_64')
+license=('GPL2')
+url='https://git.kernel.org/pub/scm/network/iproute2/iproute2.git'
+depends=('glibc' 'iptables' 'libelf')
+optdepends=('linux-atm: ATM support')
+groups=('base')
+provides=('iproute')
+backup=('etc/iproute2/ematch_map'
+'etc/iproute2/rt_dsfield'
+'etc/iproute2/rt_protos'
+'etc/iproute2/rt_realms'
+'etc/iproute2/rt_scopes'
+'etc/iproute2/rt_tables')
+makedepends=('linux-atm')
+options=('staticlibs')
+validpgpkeys=('9F6FC345B05BE7E766B83C8F80A77F6095CDE47E') # Stephen Hemminger

[arch-commits] Commit in iproute2/repos (3 files)

2018-06-08 Thread Christian Hesse via arch-commits
Date: Friday, June 8, 2018 @ 19:47:21
  Author: eworm
Revision: 326496

archrelease: copy trunk to testing-x86_64

Added:
  iproute2/repos/testing-x86_64/
  iproute2/repos/testing-x86_64/0001-make-iproute2-fhs-compliant.patch
(from rev 326495, iproute2/trunk/0001-make-iproute2-fhs-compliant.patch)
  iproute2/repos/testing-x86_64/PKGBUILD
(from rev 326495, iproute2/trunk/PKGBUILD)

+
 0001-make-iproute2-fhs-compliant.patch |  101 +++
 PKGBUILD   |   59 ++
 2 files changed, 160 insertions(+)

Copied: iproute2/repos/testing-x86_64/0001-make-iproute2-fhs-compliant.patch 
(from rev 326495, iproute2/trunk/0001-make-iproute2-fhs-compliant.patch)
===
--- testing-x86_64/0001-make-iproute2-fhs-compliant.patch   
(rev 0)
+++ testing-x86_64/0001-make-iproute2-fhs-compliant.patch   2018-06-08 
19:47:21 UTC (rev 326496)
@@ -0,0 +1,101 @@
+From f0624f6cc656cb177b64e2664f2a806221bfab58 Mon Sep 17 00:00:00 2001
+From: Christian Hesse 
+Date: Thu, 28 Jul 2016 08:49:20 +0200
+Subject: [PATCH 1/1] make iproute2 fhs compliant
+
+Signed-off-by: Christian Hesse 
+---
+ Makefile   |  2 +-
+ netem/Makefile |  4 ++--
+ tc/q_netem.c   |  2 +-
+ tc/tc_util.c   | 15 +++
+ tc/tc_util.h   |  1 +
+ 5 files changed, 20 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index eb571a5..db0a04c 100644
+--- a/Makefile
 b/Makefile
+@@ -14,7 +14,7 @@ DBM_INCLUDE:=$(DESTDIR)/usr/include
+ 
+ SHARED_LIBS = y
+ 
+-DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\"
++DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\" -DDATADIR=\"$(DATADIR)\"
+ ifneq ($(SHARED_LIBS),y)
+ DEFINES+= -DNO_SHARED_LIBS
+ endif
+diff --git a/netem/Makefile b/netem/Makefile
+index e52e125..5b4d283 100644
+--- a/netem/Makefile
 b/netem/Makefile
+@@ -20,9 +20,9 @@ stats: stats.c
+   $(HOSTCC) $(CCOPTS) -I../include -o $@ $@.c -lm
+ 
+ install: all
+-  mkdir -p $(DESTDIR)$(LIBDIR)/tc
++  mkdir -p $(DESTDIR)$(DATADIR)/tc
+   for i in $(DISTDATA); \
+-  do install -m 644 $$i $(DESTDIR)$(LIBDIR)/tc; \
++  do install -m 644 $$i $(DESTDIR)$(DATADIR)/tc; \
+   done
+ 
+ clean:
+diff --git a/tc/q_netem.c b/tc/q_netem.c
+index 8fe2204..a15a5c7 100644
+--- a/tc/q_netem.c
 b/tc/q_netem.c
+@@ -113,7 +113,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", get_tc_datadir(), type);
+   if ((f = fopen(name, "r")) == NULL) {
+   fprintf(stderr, "No distribution data for %s (%s: %s)\n",
+   type, name, strerror(errno));
+diff --git a/tc/tc_util.c b/tc/tc_util.c
+index afc4cf5..728b854 100644
+--- a/tc/tc_util.c
 b/tc/tc_util.c
+@@ -32,6 +32,10 @@
+ #define LIBDIR "/usr/lib"
+ #endif
+ 
++#ifndef DATADIR
++#define DATADIR "/usr/share"
++#endif
++
+ static struct db_names *cls_names;
+ 
+ #define NAMES_DB "/etc/iproute2/tc_cls"
+@@ -73,6 +77,17 @@ const char *get_tc_lib(void)
+   return lib_dir;
+ }
+ 
++const char *get_tc_datadir(void)
++{
++  const char *data_dir;
++
++  data_dir = getenv("TC_DATA_DIR");
++  if (!data_dir)
++  data_dir = DATADIR "/tc/";
++
++  return data_dir;
++}
++
+ int get_qdisc_handle(__u32 *h, const char *str)
+ {
+   __u32 maj;
+diff --git a/tc/tc_util.h b/tc/tc_util.h
+index 61e60b1..6d448de 100644
+--- a/tc/tc_util.h
 b/tc/tc_util.h
+@@ -55,6 +55,7 @@ struct exec_util {
+ };
+ 
+ const char *get_tc_lib(void);
++const char *get_tc_datadir(void);
+ 
+ struct qdisc_util *get_qdisc_kind(const char *str);
+ struct filter_util *get_filter_kind(const char *str);

Copied: iproute2/repos/testing-x86_64/PKGBUILD (from rev 326495, 
iproute2/trunk/PKGBUILD)
===
--- testing-x86_64/PKGBUILD (rev 0)
+++ testing-x86_64/PKGBUILD 2018-06-08 19:47:21 UTC (rev 326496)
@@ -0,0 +1,59 @@
+# $Id$
+# Maintainer: Christian Hesse 
+# Maintainer: Ronald van Haren 
+# Contributor: Judd Vinet 
+
+pkgname=iproute2
+pkgver=4.17.0
+pkgrel=1
+pkgdesc='IP Routing Utilities'
+arch=('x86_64')
+license=('GPL2')
+url='https://git.kernel.org/pub/scm/network/iproute2/iproute2.git'
+depends=('glibc' 'iptables' 'libelf')
+optdepends=('linux-atm: ATM support')
+groups=('base')
+provides=('iproute')
+backup=('etc/iproute2/ematch_map'
+'etc/iproute2/rt_dsfield'
+'etc/iproute2/rt_protos'
+'etc/iproute2/rt_realms'
+'etc/iproute2/rt_scopes'
+'etc/iproute2/rt_tables')
+makedepends=('linux-atm')
+options=('staticlibs')
+validpgpkeys=('9F6FC345B05BE7E766B83C8F80A77F6095CDE47E') # Stephen Hemminger

[arch-commits] Commit in iproute2/repos (3 files)

2018-04-02 Thread Christian Hesse via arch-commits
Date: Monday, April 2, 2018 @ 18:35:36
  Author: eworm
Revision: 320851

archrelease: copy trunk to testing-x86_64

Added:
  iproute2/repos/testing-x86_64/
  iproute2/repos/testing-x86_64/0001-make-iproute2-fhs-compliant.patch
(from rev 320850, iproute2/trunk/0001-make-iproute2-fhs-compliant.patch)
  iproute2/repos/testing-x86_64/PKGBUILD
(from rev 320850, iproute2/trunk/PKGBUILD)

+
 0001-make-iproute2-fhs-compliant.patch |  101 +++
 PKGBUILD   |   63 +++
 2 files changed, 164 insertions(+)

Copied: iproute2/repos/testing-x86_64/0001-make-iproute2-fhs-compliant.patch 
(from rev 320850, iproute2/trunk/0001-make-iproute2-fhs-compliant.patch)
===
--- testing-x86_64/0001-make-iproute2-fhs-compliant.patch   
(rev 0)
+++ testing-x86_64/0001-make-iproute2-fhs-compliant.patch   2018-04-02 
18:35:36 UTC (rev 320851)
@@ -0,0 +1,101 @@
+From f0624f6cc656cb177b64e2664f2a806221bfab58 Mon Sep 17 00:00:00 2001
+From: Christian Hesse 
+Date: Thu, 28 Jul 2016 08:49:20 +0200
+Subject: [PATCH 1/1] make iproute2 fhs compliant
+
+Signed-off-by: Christian Hesse 
+---
+ Makefile   |  2 +-
+ netem/Makefile |  4 ++--
+ tc/q_netem.c   |  2 +-
+ tc/tc_util.c   | 15 +++
+ tc/tc_util.h   |  1 +
+ 5 files changed, 20 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index eb571a5..db0a04c 100644
+--- a/Makefile
 b/Makefile
+@@ -14,7 +14,7 @@ DBM_INCLUDE:=$(DESTDIR)/usr/include
+ 
+ SHARED_LIBS = y
+ 
+-DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\"
++DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\" -DDATADIR=\"$(DATADIR)\"
+ ifneq ($(SHARED_LIBS),y)
+ DEFINES+= -DNO_SHARED_LIBS
+ endif
+diff --git a/netem/Makefile b/netem/Makefile
+index e52e125..5b4d283 100644
+--- a/netem/Makefile
 b/netem/Makefile
+@@ -20,9 +20,9 @@ stats: stats.c
+   $(HOSTCC) $(CCOPTS) -I../include -o $@ $@.c -lm
+ 
+ install: all
+-  mkdir -p $(DESTDIR)$(LIBDIR)/tc
++  mkdir -p $(DESTDIR)$(DATADIR)/tc
+   for i in $(DISTDATA); \
+-  do install -m 644 $$i $(DESTDIR)$(LIBDIR)/tc; \
++  do install -m 644 $$i $(DESTDIR)$(DATADIR)/tc; \
+   done
+ 
+ clean:
+diff --git a/tc/q_netem.c b/tc/q_netem.c
+index 8fe2204..a15a5c7 100644
+--- a/tc/q_netem.c
 b/tc/q_netem.c
+@@ -113,7 +113,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", get_tc_datadir(), type);
+   if ((f = fopen(name, "r")) == NULL) {
+   fprintf(stderr, "No distribution data for %s (%s: %s)\n",
+   type, name, strerror(errno));
+diff --git a/tc/tc_util.c b/tc/tc_util.c
+index afc4cf5..728b854 100644
+--- a/tc/tc_util.c
 b/tc/tc_util.c
+@@ -32,6 +32,10 @@
+ #define LIBDIR "/usr/lib"
+ #endif
+ 
++#ifndef DATADIR
++#define DATADIR "/usr/share"
++#endif
++
+ static struct db_names *cls_names;
+ 
+ #define NAMES_DB "/etc/iproute2/tc_cls"
+@@ -73,6 +77,17 @@ const char *get_tc_lib(void)
+   return lib_dir;
+ }
+ 
++const char *get_tc_datadir(void)
++{
++  const char *data_dir;
++
++  data_dir = getenv("TC_DATA_DIR");
++  if (!data_dir)
++  data_dir = DATADIR "/tc/";
++
++  return data_dir;
++}
++
+ int get_qdisc_handle(__u32 *h, const char *str)
+ {
+   __u32 maj;
+diff --git a/tc/tc_util.h b/tc/tc_util.h
+index 61e60b1..6d448de 100644
+--- a/tc/tc_util.h
 b/tc/tc_util.h
+@@ -55,6 +55,7 @@ struct exec_util {
+ };
+ 
+ const char *get_tc_lib(void);
++const char *get_tc_datadir(void);
+ 
+ struct qdisc_util *get_qdisc_kind(const char *str);
+ struct filter_util *get_filter_kind(const char *str);

Copied: iproute2/repos/testing-x86_64/PKGBUILD (from rev 320850, 
iproute2/trunk/PKGBUILD)
===
--- testing-x86_64/PKGBUILD (rev 0)
+++ testing-x86_64/PKGBUILD 2018-04-02 18:35:36 UTC (rev 320851)
@@ -0,0 +1,63 @@
+# $Id$
+# Maintainer: Christian Hesse 
+# Maintainer: Ronald van Haren 
+# Contributor: Judd Vinet 
+
+pkgname=iproute2
+pkgver=4.16.0
+pkgrel=1
+pkgdesc='IP Routing Utilities'
+arch=('x86_64')
+license=('GPL2')
+url='https://git.kernel.org/pub/scm/network/iproute2/iproute2.git'
+depends=('glibc' 'iptables' 'libelf')
+optdepends=('linux-atm: ATM support')
+groups=('base')
+provides=('iproute')
+# Upstream commit b2fd7a0e6efa7b85a041b5cb9ea6fc1a6a798fd3 removed old 
documentation.
+# Add conflict and replace to get rid of the package. TODO: Remove anytime 
soon.
+conflicts=('iproute' 'iproute2-doc')
+replaces=('iproute' 'iproute2-doc')
+backup=('etc/iproute2/ematch_map'
+   

[arch-commits] Commit in iproute2/repos (3 files)

2018-01-29 Thread Christian Hesse via arch-commits
Date: Monday, January 29, 2018 @ 19:16:16
  Author: eworm
Revision: 315598

archrelease: copy trunk to testing-x86_64

Added:
  iproute2/repos/testing-x86_64/
  iproute2/repos/testing-x86_64/0001-make-iproute2-fhs-compliant.patch
(from rev 315597, iproute2/trunk/0001-make-iproute2-fhs-compliant.patch)
  iproute2/repos/testing-x86_64/PKGBUILD
(from rev 315597, iproute2/trunk/PKGBUILD)

+
 0001-make-iproute2-fhs-compliant.patch |  101 +++
 PKGBUILD   |   63 +++
 2 files changed, 164 insertions(+)

Copied: iproute2/repos/testing-x86_64/0001-make-iproute2-fhs-compliant.patch 
(from rev 315597, iproute2/trunk/0001-make-iproute2-fhs-compliant.patch)
===
--- testing-x86_64/0001-make-iproute2-fhs-compliant.patch   
(rev 0)
+++ testing-x86_64/0001-make-iproute2-fhs-compliant.patch   2018-01-29 
19:16:16 UTC (rev 315598)
@@ -0,0 +1,101 @@
+From f0624f6cc656cb177b64e2664f2a806221bfab58 Mon Sep 17 00:00:00 2001
+From: Christian Hesse 
+Date: Thu, 28 Jul 2016 08:49:20 +0200
+Subject: [PATCH 1/1] make iproute2 fhs compliant
+
+Signed-off-by: Christian Hesse 
+---
+ Makefile   |  2 +-
+ netem/Makefile |  4 ++--
+ tc/q_netem.c   |  2 +-
+ tc/tc_util.c   | 15 +++
+ tc/tc_util.h   |  1 +
+ 5 files changed, 20 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index eb571a5..db0a04c 100644
+--- a/Makefile
 b/Makefile
+@@ -14,7 +14,7 @@ DBM_INCLUDE:=$(DESTDIR)/usr/include
+ 
+ SHARED_LIBS = y
+ 
+-DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\"
++DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\" -DDATADIR=\"$(DATADIR)\"
+ ifneq ($(SHARED_LIBS),y)
+ DEFINES+= -DNO_SHARED_LIBS
+ endif
+diff --git a/netem/Makefile b/netem/Makefile
+index e52e125..5b4d283 100644
+--- a/netem/Makefile
 b/netem/Makefile
+@@ -20,9 +20,9 @@ stats: stats.c
+   $(HOSTCC) $(CCOPTS) -I../include -o $@ $@.c -lm
+ 
+ install: all
+-  mkdir -p $(DESTDIR)$(LIBDIR)/tc
++  mkdir -p $(DESTDIR)$(DATADIR)/tc
+   for i in $(DISTDATA); \
+-  do install -m 644 $$i $(DESTDIR)$(LIBDIR)/tc; \
++  do install -m 644 $$i $(DESTDIR)$(DATADIR)/tc; \
+   done
+ 
+ clean:
+diff --git a/tc/q_netem.c b/tc/q_netem.c
+index 8fe2204..a15a5c7 100644
+--- a/tc/q_netem.c
 b/tc/q_netem.c
+@@ -113,7 +113,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", get_tc_datadir(), type);
+   if ((f = fopen(name, "r")) == NULL) {
+   fprintf(stderr, "No distribution data for %s (%s: %s)\n",
+   type, name, strerror(errno));
+diff --git a/tc/tc_util.c b/tc/tc_util.c
+index afc4cf5..728b854 100644
+--- a/tc/tc_util.c
 b/tc/tc_util.c
+@@ -32,6 +32,10 @@
+ #define LIBDIR "/usr/lib"
+ #endif
+ 
++#ifndef DATADIR
++#define DATADIR "/usr/share"
++#endif
++
+ static struct db_names *cls_names;
+ 
+ #define NAMES_DB "/etc/iproute2/tc_cls"
+@@ -73,6 +77,17 @@ const char *get_tc_lib(void)
+   return lib_dir;
+ }
+ 
++const char *get_tc_datadir(void)
++{
++  const char *data_dir;
++
++  data_dir = getenv("TC_DATA_DIR");
++  if (!data_dir)
++  data_dir = DATADIR "/tc/";
++
++  return data_dir;
++}
++
+ int get_qdisc_handle(__u32 *h, const char *str)
+ {
+   __u32 maj;
+diff --git a/tc/tc_util.h b/tc/tc_util.h
+index 61e60b1..6d448de 100644
+--- a/tc/tc_util.h
 b/tc/tc_util.h
+@@ -55,6 +55,7 @@ struct exec_util {
+ };
+ 
+ const char *get_tc_lib(void);
++const char *get_tc_datadir(void);
+ 
+ struct qdisc_util *get_qdisc_kind(const char *str);
+ struct filter_util *get_filter_kind(const char *str);

Copied: iproute2/repos/testing-x86_64/PKGBUILD (from rev 315597, 
iproute2/trunk/PKGBUILD)
===
--- testing-x86_64/PKGBUILD (rev 0)
+++ testing-x86_64/PKGBUILD 2018-01-29 19:16:16 UTC (rev 315598)
@@ -0,0 +1,63 @@
+# $Id$
+# Maintainer: Christian Hesse 
+# Maintainer: Ronald van Haren 
+# Contributor: Judd Vinet 
+
+pkgname=iproute2
+pkgver=4.15.0
+pkgrel=1
+pkgdesc='IP Routing Utilities'
+arch=('x86_64')
+license=('GPL2')
+url='https://git.kernel.org/pub/scm/network/iproute2/iproute2.git'
+depends=('glibc' 'iptables' 'libelf')
+optdepends=('linux-atm: ATM support')
+groups=('base')
+provides=('iproute')
+# Upstream commit b2fd7a0e6efa7b85a041b5cb9ea6fc1a6a798fd3 removed old 
documentation.
+# Add conflict and replace to get rid of the package. TODO: Remove anytime 
soon.
+conflicts=('iproute' 'iproute2-doc')
+replaces=('iproute' 'iproute2-doc')
+backup=('etc/iproute2/ematch_map'
+

[arch-commits] Commit in iproute2/repos (3 files)

2017-11-13 Thread Christian Hesse
Date: Monday, November 13, 2017 @ 19:51:22
  Author: eworm
Revision: 309879

archrelease: copy trunk to testing-x86_64

Added:
  iproute2/repos/testing-x86_64/
  iproute2/repos/testing-x86_64/0001-make-iproute2-fhs-compliant.patch
(from rev 309878, iproute2/trunk/0001-make-iproute2-fhs-compliant.patch)
  iproute2/repos/testing-x86_64/PKGBUILD
(from rev 309878, iproute2/trunk/PKGBUILD)

+
 0001-make-iproute2-fhs-compliant.patch |  101 +++
 PKGBUILD   |   63 +++
 2 files changed, 164 insertions(+)

Copied: iproute2/repos/testing-x86_64/0001-make-iproute2-fhs-compliant.patch 
(from rev 309878, iproute2/trunk/0001-make-iproute2-fhs-compliant.patch)
===
--- testing-x86_64/0001-make-iproute2-fhs-compliant.patch   
(rev 0)
+++ testing-x86_64/0001-make-iproute2-fhs-compliant.patch   2017-11-13 
19:51:22 UTC (rev 309879)
@@ -0,0 +1,101 @@
+From f0624f6cc656cb177b64e2664f2a806221bfab58 Mon Sep 17 00:00:00 2001
+From: Christian Hesse 
+Date: Thu, 28 Jul 2016 08:49:20 +0200
+Subject: [PATCH 1/1] make iproute2 fhs compliant
+
+Signed-off-by: Christian Hesse 
+---
+ Makefile   |  2 +-
+ netem/Makefile |  4 ++--
+ tc/q_netem.c   |  2 +-
+ tc/tc_util.c   | 15 +++
+ tc/tc_util.h   |  1 +
+ 5 files changed, 20 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index eb571a5..db0a04c 100644
+--- a/Makefile
 b/Makefile
+@@ -14,7 +14,7 @@ DBM_INCLUDE:=$(DESTDIR)/usr/include
+ 
+ SHARED_LIBS = y
+ 
+-DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\"
++DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\" -DDATADIR=\"$(DATADIR)\"
+ ifneq ($(SHARED_LIBS),y)
+ DEFINES+= -DNO_SHARED_LIBS
+ endif
+diff --git a/netem/Makefile b/netem/Makefile
+index e52e125..5b4d283 100644
+--- a/netem/Makefile
 b/netem/Makefile
+@@ -20,9 +20,9 @@ stats: stats.c
+   $(HOSTCC) $(CCOPTS) -I../include -o $@ $@.c -lm
+ 
+ install: all
+-  mkdir -p $(DESTDIR)$(LIBDIR)/tc
++  mkdir -p $(DESTDIR)$(DATADIR)/tc
+   for i in $(DISTDATA); \
+-  do install -m 644 $$i $(DESTDIR)$(LIBDIR)/tc; \
++  do install -m 644 $$i $(DESTDIR)$(DATADIR)/tc; \
+   done
+ 
+ clean:
+diff --git a/tc/q_netem.c b/tc/q_netem.c
+index 8fe2204..a15a5c7 100644
+--- a/tc/q_netem.c
 b/tc/q_netem.c
+@@ -113,7 +113,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", get_tc_datadir(), type);
+   if ((f = fopen(name, "r")) == NULL) {
+   fprintf(stderr, "No distribution data for %s (%s: %s)\n",
+   type, name, strerror(errno));
+diff --git a/tc/tc_util.c b/tc/tc_util.c
+index afc4cf5..728b854 100644
+--- a/tc/tc_util.c
 b/tc/tc_util.c
+@@ -32,6 +32,10 @@
+ #define LIBDIR "/usr/lib"
+ #endif
+ 
++#ifndef DATADIR
++#define DATADIR "/usr/share"
++#endif
++
+ static struct db_names *cls_names;
+ 
+ #define NAMES_DB "/etc/iproute2/tc_cls"
+@@ -73,6 +77,17 @@ const char *get_tc_lib(void)
+   return lib_dir;
+ }
+ 
++const char *get_tc_datadir(void)
++{
++  const char *data_dir;
++
++  data_dir = getenv("TC_DATA_DIR");
++  if (!data_dir)
++  data_dir = DATADIR "/tc/";
++
++  return data_dir;
++}
++
+ int get_qdisc_handle(__u32 *h, const char *str)
+ {
+   __u32 maj;
+diff --git a/tc/tc_util.h b/tc/tc_util.h
+index 61e60b1..6d448de 100644
+--- a/tc/tc_util.h
 b/tc/tc_util.h
+@@ -55,6 +55,7 @@ struct exec_util {
+ };
+ 
+ const char *get_tc_lib(void);
++const char *get_tc_datadir(void);
+ 
+ struct qdisc_util *get_qdisc_kind(const char *str);
+ struct filter_util *get_filter_kind(const char *str);

Copied: iproute2/repos/testing-x86_64/PKGBUILD (from rev 309878, 
iproute2/trunk/PKGBUILD)
===
--- testing-x86_64/PKGBUILD (rev 0)
+++ testing-x86_64/PKGBUILD 2017-11-13 19:51:22 UTC (rev 309879)
@@ -0,0 +1,63 @@
+# $Id$
+# Maintainer: Christian Hesse 
+# Maintainer: Ronald van Haren 
+# Contributor: Judd Vinet 
+
+pkgname=iproute2
+pkgver=4.14.1
+pkgrel=1
+pkgdesc='IP Routing Utilities'
+arch=('i686' 'x86_64')
+license=('GPL2')
+url='http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2'
+depends=('glibc' 'iptables' 'libelf')
+optdepends=('linux-atm: ATM support')
+groups=('base')
+provides=('iproute')
+# Upstream commit b2fd7a0e6efa7b85a041b5cb9ea6fc1a6a798fd3 removed old 
documentation.
+# Add conflict and replace to get rid of the package. TODO: Remove anytime 
soon.
+conflicts=('iproute' 'iproute2-doc')
+replaces=('iproute' 'iproute2-doc')