Browse Source

Fix upgrade path from v1.17.1 to v1.18.x for deb packages (#7118)

Konstantinos Natsakis 5 years ago
parent
commit
eb01440d2a

+ 1 - 0
contrib/debian/control

@@ -50,6 +50,7 @@ Depends: adduser,
          libprotoc10,
          ${misc:Depends},
          ${shlibs:Depends}
+Pre-Depends: dpkg (>= 1.17.14)
 Description: real-time charts for system monitoring
  Netdata is a daemon that collects data in realtime (per second)
  and presents a web site to view and analyze them. The presentation

+ 1 - 0
contrib/debian/control.buster

@@ -50,6 +50,7 @@ Depends: adduser,
          libprotoc17,
          ${misc:Depends},
          ${shlibs:Depends}
+Pre-Depends: dpkg (>= 1.17.14)
 Description: real-time charts for system monitoring
  Netdata is a daemon that collects data in realtime (per second)
  and presents a web site to view and analyze them. The presentation

+ 1 - 0
contrib/debian/control.jessie

@@ -48,6 +48,7 @@ Depends: adduser,
          libprotoc10,
          ${misc:Depends},
          ${shlibs:Depends}
+Pre-Depends: dpkg (>= 1.17.14)
 Description: real-time charts for system monitoring
  Netdata is a daemon that collects data in realtime (per second)
  and presents a web site to view and analyze them. The presentation

+ 1 - 0
contrib/debian/control.trusty

@@ -48,6 +48,7 @@ Depends: adduser,
          libprotoc8,
          ${misc:Depends},
          ${shlibs:Depends}
+Pre-Depends: dpkg (>= 1.17.14)
 Description: real-time charts for system monitoring
  Netdata is a daemon that collects data in realtime (per second)
  and presents a web site to view and analyze them. The presentation

+ 1 - 0
contrib/debian/control.xenial

@@ -50,6 +50,7 @@ Depends: adduser,
          libprotoc9v5,
          ${misc:Depends},
          ${shlibs:Depends}
+Pre-Depends: dpkg (>= 1.17.14)
 Description: real-time charts for system monitoring
  Netdata is a daemon that collects data in realtime (per second)
  and presents a web site to view and analyze them. The presentation

+ 13 - 0
contrib/debian/netdata.postinst.in

@@ -2,6 +2,19 @@
 
 set -e
 
+dpkg-maintscript-helper dir_to_symlink \
+	/var/lib/netdata/www/.well-known /usr/share/netdata/www/.well-known 1.18.1~ netdata -- "$@"
+dpkg-maintscript-helper dir_to_symlink \
+	/var/lib/netdata/www/css /usr/share/netdata/www/css 1.18.1~ netdata -- "$@"
+dpkg-maintscript-helper dir_to_symlink \
+	/var/lib/netdata/www/fonts /usr/share/netdata/www/fonts 1.18.1~ netdata -- "$@"
+dpkg-maintscript-helper dir_to_symlink \
+	/var/lib/netdata/www/images /usr/share/netdata/www/images 1.18.1~ netdata -- "$@"
+dpkg-maintscript-helper dir_to_symlink \
+	/var/lib/netdata/www/lib /usr/share/netdata/www/lib 1.18.1~ netdata -- "$@"
+dpkg-maintscript-helper dir_to_symlink \
+	/var/lib/netdata/www/static /usr/share/netdata/www/static 1.18.1~ netdata -- "$@"
+
 case "$1" in
   configure)
         if [ -z "$2" ]; then

+ 13 - 0
contrib/debian/netdata.postrm

@@ -2,6 +2,19 @@
 
 set -e
 
+dpkg-maintscript-helper dir_to_symlink \
+	/var/lib/netdata/www/.well-known /usr/share/netdata/www/.well-known 1.18.1~ netdata -- "$@"
+dpkg-maintscript-helper dir_to_symlink \
+	/var/lib/netdata/www/css /usr/share/netdata/www/css 1.18.1~ netdata -- "$@"
+dpkg-maintscript-helper dir_to_symlink \
+	/var/lib/netdata/www/fonts /usr/share/netdata/www/fonts 1.18.1~ netdata -- "$@"
+dpkg-maintscript-helper dir_to_symlink \
+	/var/lib/netdata/www/images /usr/share/netdata/www/images 1.18.1~ netdata -- "$@"
+dpkg-maintscript-helper dir_to_symlink \
+	/var/lib/netdata/www/lib /usr/share/netdata/www/lib 1.18.1~ netdata -- "$@"
+dpkg-maintscript-helper dir_to_symlink \
+	/var/lib/netdata/www/static /usr/share/netdata/www/static 1.18.1~ netdata -- "$@"
+
 case "$1" in
 	remove)
 		;;

+ 16 - 0
contrib/debian/netdata.preinst

@@ -0,0 +1,16 @@
+#!/bin/sh
+
+set -e
+
+dpkg-maintscript-helper dir_to_symlink \
+	/var/lib/netdata/www/.well-known /usr/share/netdata/www/.well-known 1.18.1~ netdata -- "$@"
+dpkg-maintscript-helper dir_to_symlink \
+	/var/lib/netdata/www/css /usr/share/netdata/www/css 1.18.1~ netdata -- "$@"
+dpkg-maintscript-helper dir_to_symlink \
+	/var/lib/netdata/www/fonts /usr/share/netdata/www/fonts 1.18.1~ netdata -- "$@"
+dpkg-maintscript-helper dir_to_symlink \
+	/var/lib/netdata/www/images /usr/share/netdata/www/images 1.18.1~ netdata -- "$@"
+dpkg-maintscript-helper dir_to_symlink \
+	/var/lib/netdata/www/lib /usr/share/netdata/www/lib 1.18.1~ netdata -- "$@"
+dpkg-maintscript-helper dir_to_symlink \
+	/var/lib/netdata/www/static /usr/share/netdata/www/static 1.18.1~ netdata -- "$@"