From e751c3abbe29bced82b1f80dc9585b8b29486a5e Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 6 Feb 2017 11:01:12 +0100 Subject: [PATCH] Revert "vnstat: update to v1.16" This reverts commit 79b6e9dc61dc37e4745f08d83ce44593d256fd12. Undo the recent vnstat update due to upstream bugs preventing database restoration. Signed-off-by: Jo-Philipp Wich --- net/vnstat/Makefile | 6 +-- ...guration-defaults.patch => 001-conf.patch} | 11 +---- net/vnstat/patches/002-no_install_strip.patch | 35 ++++++++++++++++ net/vnstat/patches/003-no_install_uname.patch | 15 +++++++ net/vnstat/patches/100-musl-compat.patch | 10 +++++ net/vnstat/patches/991-no-invocation.patch | 40 ------------------- 6 files changed, 64 insertions(+), 53 deletions(-) rename net/vnstat/patches/{990-adjust-configuration-defaults.patch => 001-conf.patch} (59%) create mode 100644 net/vnstat/patches/002-no_install_strip.patch create mode 100644 net/vnstat/patches/003-no_install_uname.patch create mode 100644 net/vnstat/patches/100-musl-compat.patch delete mode 100644 net/vnstat/patches/991-no-invocation.patch diff --git a/net/vnstat/Makefile b/net/vnstat/Makefile index 9d9d3ba524..921597dcf1 100644 --- a/net/vnstat/Makefile +++ b/net/vnstat/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=vnstat -PKG_VERSION:=1.16 +PKG_VERSION:=1.12 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://humdi.net/vnstat -PKG_HASH:=420fec6c89229a100697f3189e824a1b81f7148dd651558f2ff03cc298308e8b +PKG_MD5SUM:=a154b2196771e06a8accd1c24374009c PKG_MAINTAINER:=Jo-Philipp Wich PKG_INSTALL:=1 @@ -86,7 +86,7 @@ define Package/vnstat/install $(INSTALL_DIR) $(1)/usr/sbin $(CP) $(PKG_INSTALL_DIR)/usr/sbin/vnstatd $(1)/usr/sbin/ $(INSTALL_DIR) $(1)/etc - $(INSTALL_CONF) $(PKG_BUILD_DIR)/cfg/vnstat.conf $(1)/etc/ + $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/vnstat.conf $(1)/etc/ $(INSTALL_DIR) $(1)/etc/config $(INSTALL_CONF) ./files/vnstat.config $(1)/etc/config/vnstat $(INSTALL_DIR) $(1)/etc/init.d diff --git a/net/vnstat/patches/990-adjust-configuration-defaults.patch b/net/vnstat/patches/001-conf.patch similarity index 59% rename from net/vnstat/patches/990-adjust-configuration-defaults.patch rename to net/vnstat/patches/001-conf.patch index 1627b4d726..5fb24c3ce3 100644 --- a/net/vnstat/patches/990-adjust-configuration-defaults.patch +++ b/net/vnstat/patches/001-conf.patch @@ -1,15 +1,6 @@ -From: Jo-Philipp Wich -Date: Thu, 26 Jan 2017 15:30:00 +0100 -Subject: [PATCH] config: adjust default values - -Adjust the default interval settings to be better suited for slower embedded -devices. - -Signed-off-by: Jo-Philipp Wich - --- a/cfg/vnstat.conf +++ b/cfg/vnstat.conf -@@ -87,13 +87,13 @@ DaemonUser "" +@@ -78,13 +78,13 @@ DaemonUser "" DaemonGroup "" # how often (in seconds) interface data is updated diff --git a/net/vnstat/patches/002-no_install_strip.patch b/net/vnstat/patches/002-no_install_strip.patch new file mode 100644 index 0000000000..8f11de6f70 --- /dev/null +++ b/net/vnstat/patches/002-no_install_strip.patch @@ -0,0 +1,35 @@ +--- a/Makefile ++++ b/Makefile +@@ -66,11 +66,11 @@ install: + + # install everything else + install -d -m 755 $(BIN) $(SBIN) $(MAN)/man1 $(MAN)/man5 +- install -s -m 755 src/vnstat $(BIN) +- install -s -m 755 src/vnstatd $(SBIN) ++ install -m 755 src/vnstat $(BIN) ++ install -m 755 src/vnstatd $(SBIN) + @if [ -f "src/vnstati" ]; \ +- then echo install -s -m 755 src/vnstati $(BIN); \ +- install -s -m 755 src/vnstati $(BIN); \ ++ then echo install -m 755 src/vnstati $(BIN); \ ++ install -m 755 src/vnstati $(BIN); \ + fi + + # update man pages, gzip it if previous version was done so +@@ -139,12 +139,12 @@ bsdinstall: + + # install binaries + install -d -m 755 $(DESTDIR)/var/db/vnstat +- install -s -m 755 src/vnstat $(BIN_BSD) +- install -s -m 755 src/vnstatd $(SBIN_BSD) ++ install -m 755 src/vnstat $(BIN_BSD) ++ install -m 755 src/vnstatd $(SBIN_BSD) + + @if [ -f "src/vnstati" ]; \ +- then echo install -s -m 755 src/vnstati $(BIN_BSD); \ +- install -s -m 755 src/vnstati $(BIN_BSD); \ ++ then echo install -m 755 src/vnstati $(BIN_BSD); \ ++ install -m 755 src/vnstati $(BIN_BSD); \ + fi + + # install default config if such doesn't exist diff --git a/net/vnstat/patches/003-no_install_uname.patch b/net/vnstat/patches/003-no_install_uname.patch new file mode 100644 index 0000000000..14c17d5ba8 --- /dev/null +++ b/net/vnstat/patches/003-no_install_uname.patch @@ -0,0 +1,15 @@ +--- a/Makefile ++++ b/Makefile +@@ -33,12 +33,6 @@ debug: + install: + @echo "Installing vnStat..." + +-# check that system is really Linux +- @if [ `uname` != "Linux" ]; \ +- then echo "This isn't a Linux system. Maybe 'make bsdinstall' is what you need?"; \ +- false; \ +- fi +- + # check that there's something to install + @if [ ! -f "src/vnstat" ] || [ ! -f "src/vnstatd" ]; \ + then echo "Nothing to install, run make first."; \ diff --git a/net/vnstat/patches/100-musl-compat.patch b/net/vnstat/patches/100-musl-compat.patch new file mode 100644 index 0000000000..05123899b7 --- /dev/null +++ b/net/vnstat/patches/100-musl-compat.patch @@ -0,0 +1,10 @@ +--- a/src/common.h ++++ b/src/common.h +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__) || defined(__FreeBSD_kernel__) + #include diff --git a/net/vnstat/patches/991-no-invocation.patch b/net/vnstat/patches/991-no-invocation.patch deleted file mode 100644 index b56950b7d4..0000000000 --- a/net/vnstat/patches/991-no-invocation.patch +++ /dev/null @@ -1,40 +0,0 @@ -From: Jo-Philipp Wich -Date: Thu, 26 Jan 2017 15:31:00 +0100 -Subject: [PATCH] make: do not invoke vnstat --showconfig - -In a cross-compile setting we cannot invoke the complied target executable, -therfore commit out the --showconfig call in order to prevent make from -exiting with an error. - -Signed-off-by: Jo-Philipp Wich - ---- a/Makefile.am -+++ b/Makefile.am -@@ -104,9 +104,9 @@ release: distcheck - ls -l $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz - - install-data-hook: -- $(DESTDIR)$(bindir)/vnstat$(EXEEXT) --showconfig >vnstat.conf && \ -- $(MKDIR_P) $(DESTDIR)$(sysconfdir) && \ -- mv -f vnstat.conf $(DESTDIR)$(sysconfdir)/vnstat.conf -+ #$(DESTDIR)$(bindir)/vnstat$(EXEEXT) --showconfig >vnstat.conf && \ -+ # $(MKDIR_P) $(DESTDIR)$(sysconfdir) && \ -+ # mv -f vnstat.conf $(DESTDIR)$(sysconfdir)/vnstat.conf - @echo - @echo "============================================================================" - @echo " Note: No service file has been installed for starting the daemon" ---- a/Makefile.in -+++ b/Makefile.in -@@ -2051,9 +2051,9 @@ release: distcheck - ls -l $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz - - install-data-hook: -- $(DESTDIR)$(bindir)/vnstat$(EXEEXT) --showconfig >vnstat.conf && \ -- $(MKDIR_P) $(DESTDIR)$(sysconfdir) && \ -- mv -f vnstat.conf $(DESTDIR)$(sysconfdir)/vnstat.conf -+ #$(DESTDIR)$(bindir)/vnstat$(EXEEXT) --showconfig >vnstat.conf && \ -+ # $(MKDIR_P) $(DESTDIR)$(sysconfdir) && \ -+ # mv -f vnstat.conf $(DESTDIR)$(sysconfdir)/vnstat.conf - @echo - @echo "============================================================================" - @echo " Note: No service file has been installed for starting the daemon" -- 2.30.2