]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
fireinfo: Update to 2.1.12
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 14 Dec 2017 17:44:20 +0000 (17:44 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 14 Dec 2017 17:44:20 +0000 (17:44 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
lfs/fireinfo
src/patches/fireinfo/0001-Add-an-other-forbidden-string-Serial.patch [deleted file]
src/patches/fireinfo/0002-Escape-any-non-printable-ascii-characters.patch [deleted file]
src/patches/fireinfo/0003-Skip-search-for-hypervisor-name-when-the-CPU-string-.patch [deleted file]
src/patches/fireinfo/0004-Filter-all-IDs-that-only-consist-of-0xff.patch [deleted file]
src/patches/fireinfo/0005-Fix-crash-if-there-is-id-has-already-been-reset-to-N.patch [deleted file]

index 67d4cba452d7d0843e1ff90477c803a8549a6119..dec588705d8f59b822518b17928004d5ed00161b 100644 (file)
@@ -24,7 +24,7 @@
 
 include Config
 
-VER        = 2.1.11
+VER        = 2.1.12
 
 THISAPP    = fireinfo-v$(VER)
 DL_FILE    = $(THISAPP).tar.gz
@@ -40,7 +40,7 @@ objects = $(DL_FILE)
 
 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
 
-$(DL_FILE)_MD5 = 093799207ab7397cc7f2d5eb45868c69
+$(DL_FILE)_MD5 = 40ada8f4eceeb69661d09e43308e5a6a
 
 install : $(TARGET)
 
@@ -70,11 +70,6 @@ $(subst %,%_MD5,$(objects)) :
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
        @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
-       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/fireinfo/0001-Add-an-other-forbidden-string-Serial.patch
-       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/fireinfo/0002-Escape-any-non-printable-ascii-characters.patch
-       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/fireinfo/0003-Skip-search-for-hypervisor-name-when-the-CPU-string-.patch
-       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/fireinfo/0004-Filter-all-IDs-that-only-consist-of-0xff.patch
-       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/fireinfo/0005-Fix-crash-if-there-is-id-has-already-been-reset-to-N.patch
 
        cd $(DIR_APP) && [ -x "configure" ] || sh ./autogen.sh
        cd $(DIR_APP) && ./configure --prefix=/usr
diff --git a/src/patches/fireinfo/0001-Add-an-other-forbidden-string-Serial.patch b/src/patches/fireinfo/0001-Add-an-other-forbidden-string-Serial.patch
deleted file mode 100644 (file)
index 00c9838..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-From edacae4b2cdc41f1c0bfc93e041532ff6c49f60c Mon Sep 17 00:00:00 2001
-From: Michael Tremer <michael.tremer@ipfire.org>
-Date: Tue, 17 Mar 2015 22:19:17 +0100
-Subject: [PATCH 1/5] Add an other forbidden string: "Serial"
-
----
- src/fireinfo/system.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/fireinfo/system.py b/src/fireinfo/system.py
-index daf77b399d20..9d7872822b85 100644
---- a/src/fireinfo/system.py
-+++ b/src/fireinfo/system.py
-@@ -45,7 +45,7 @@ INVALID_ID_STRINGS = (
-       "EVAL",
-       "Not Applicable",
-       "None", "empty",
--      "System Serial Number",
-+      "Serial", "System Serial Number",
-       "XXXXX",
-       "01010101-0101-0101-0101-010101010101",
-       "00020003-0004-0005-0006-000700080009",
--- 
-2.4.3
-
diff --git a/src/patches/fireinfo/0002-Escape-any-non-printable-ascii-characters.patch b/src/patches/fireinfo/0002-Escape-any-non-printable-ascii-characters.patch
deleted file mode 100644 (file)
index 576154b..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-From 4468fb2eb49e21d2350f6619584e6816f5159d29 Mon Sep 17 00:00:00 2001
-From: Michael Tremer <michael.tremer@ipfire.org>
-Date: Sat, 28 Mar 2015 13:17:57 +0100
-Subject: [PATCH 2/5] Escape any non-printable ascii characters
-
-http://forum.ipfire.org/viewtopic.php?f=5&t=12970
----
- src/fireinfo/system.py | 18 ++++++++++++++----
- 1 file changed, 14 insertions(+), 4 deletions(-)
-
-diff --git a/src/fireinfo/system.py b/src/fireinfo/system.py
-index 9d7872822b85..4148c66eded7 100644
---- a/src/fireinfo/system.py
-+++ b/src/fireinfo/system.py
-@@ -325,6 +325,16 @@ class System(object):
-               return v, m
-+      @staticmethod
-+      def escape_string(s):
-+              """
-+                      Will remove all non-printable characters from the given string
-+              """
-+              if s is None:
-+                      return
-+
-+              return filter(lambda x: x in string.printable, s)
-+
-       @property
-       def vendor(self):
-               """
-@@ -334,14 +344,14 @@ class System(object):
-               for file in ("sys_vendor", "board_vendor", "chassis_vendor",):
-                       ret = read_from_file(os.path.join(SYS_CLASS_DMI, file))
-                       if ret:
--                              return ret
-+                              return self.escape_string(ret)
-               if os.path.exists("/proc/device-tree"):
-                       ret = self.__cpuinfo.get("Hardware", None)
-               else:
-                       ret, m = self.vendor_model_tuple()
--              return ret
-+              return self.escape_string(ret)
-       @property
-       def model(self):
-@@ -352,7 +362,7 @@ class System(object):
-               for file in ("product_name", "board_model", "chassis_model",):
-                       ret = read_from_file(os.path.join(SYS_CLASS_DMI, file))
-                       if ret:
--                              return ret
-+                              return self.escape_string(ret)
-               # Read device-tree model if available
-               ret = read_from_file("/proc/device-tree/model")
-@@ -364,7 +374,7 @@ class System(object):
-               if not ret:
-                       v, ret = self.vendor_model_tuple()
--              return ret
-+              return self.escape_string(ret)
-       @property
-       def memory(self):
--- 
-2.4.3
-
diff --git a/src/patches/fireinfo/0003-Skip-search-for-hypervisor-name-when-the-CPU-string-.patch b/src/patches/fireinfo/0003-Skip-search-for-hypervisor-name-when-the-CPU-string-.patch
deleted file mode 100644 (file)
index f643251..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-From c667589410912ca980a78f417e86dd6585d58f9a Mon Sep 17 00:00:00 2001
-From: Michael Tremer <michael.tremer@ipfire.org>
-Date: Mon, 4 May 2015 16:00:31 +0200
-Subject: [PATCH 3/5] Skip search for hypervisor name when the CPU string is
- empty
-
----
- src/_fireinfo/fireinfo.c | 11 ++++++-----
- 1 file changed, 6 insertions(+), 5 deletions(-)
-
-diff --git a/src/_fireinfo/fireinfo.c b/src/_fireinfo/fireinfo.c
-index fc639d9d4cd9..6601c21a733f 100644
---- a/src/_fireinfo/fireinfo.c
-+++ b/src/_fireinfo/fireinfo.c
-@@ -156,11 +156,12 @@ int detect_hypervisor(int *hypervisor) {
-               *hypervisor = HYPER_OTHER;
--              int id;
--              for (id = HYPER_NONE + 1; id < HYPER_LAST; id++) {
--                      if (strcmp(hypervisor_ids[id], sig.text) == 0) {
--                              *hypervisor = id;
--                              break;
-+              if (*sig.text) {
-+                      for (int id = HYPER_NONE + 1; id < HYPER_LAST; id++) {
-+                              if (strcmp(hypervisor_ids[id], sig.text) == 0) {
-+                                      *hypervisor = id;
-+                                      break;
-+                              }
-                       }
-               }
--- 
-2.4.3
-
diff --git a/src/patches/fireinfo/0004-Filter-all-IDs-that-only-consist-of-0xff.patch b/src/patches/fireinfo/0004-Filter-all-IDs-that-only-consist-of-0xff.patch
deleted file mode 100644 (file)
index 737a319..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-From d58f8ef75a29dd6f8968084b5383ce0f39c75666 Mon Sep 17 00:00:00 2001
-From: Michael Tremer <michael.tremer@ipfire.org>
-Date: Wed, 12 Aug 2015 10:50:42 +0100
-Subject: [PATCH 4/5] Filter all IDs that only consist of 0xff
-
-Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
----
- src/fireinfo/system.py | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/fireinfo/system.py b/src/fireinfo/system.py
-index 4148c66eded7..edf7359a17e6 100644
---- a/src/fireinfo/system.py
-+++ b/src/fireinfo/system.py
-@@ -255,6 +255,10 @@ class System(object):
-                                               id = None
-                                               break
-+                      # Check if the string only contains 0xff
-+                      if all((e == "\xff" for e in id)):
-+                              id = None
-+
-                       if id:
-                               _ids.append(id)
--- 
-2.4.3
-
diff --git a/src/patches/fireinfo/0005-Fix-crash-if-there-is-id-has-already-been-reset-to-N.patch b/src/patches/fireinfo/0005-Fix-crash-if-there-is-id-has-already-been-reset-to-N.patch
deleted file mode 100644 (file)
index dcc552d..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-From deafec982e4c8f2e6ffa3bf70b0a94fa30158e9a Mon Sep 17 00:00:00 2001
-From: Michael Tremer <michael.tremer@ipfire.org>
-Date: Wed, 9 Sep 2015 15:04:43 +0100
-Subject: [PATCH 5/5] Fix crash if there is id has already been reset to None
-
-Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
----
- src/fireinfo/system.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/fireinfo/system.py b/src/fireinfo/system.py
-index edf7359a17e6..c2ba12e818f0 100644
---- a/src/fireinfo/system.py
-+++ b/src/fireinfo/system.py
-@@ -256,7 +256,7 @@ class System(object):
-                                               break
-                       # Check if the string only contains 0xff
--                      if all((e == "\xff" for e in id)):
-+                      if id and all((e == "\xff" for e in id)):
-                               id = None
-                       if id:
--- 
-2.4.3
-