This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 2.x development tree".
The branch, next has been updated via 257ce821ee076adf318a806eda40e1793da0215c (commit) from bc7cb3eaeb118fb524f05dffa8d525f1c14aff88 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 257ce821ee076adf318a806eda40e1793da0215c Author: Michael Tremer michael.tremer@ipfire.org Date: Wed Sep 9 15:32:09 2015 +0100
fireinfo: Import upstream fixes
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
-----------------------------------------------------------------------
Summary of changes: lfs/fireinfo | 8 ++- ...001-Add-an-other-forbidden-string-Serial.patch} | 4 +- ...Escape-any-non-printable-ascii-characters.patch | 69 ++++++++++++++++++++++ ...for-hypervisor-name-when-the-CPU-string-.patch} | 5 +- ...Filter-all-IDs-that-only-consist-of-0xff.patch} | 4 +- ...f-there-is-id-has-already-been-reset-to-N.patch | 26 ++++++++ 6 files changed, 107 insertions(+), 9 deletions(-) rename src/patches/{fireinfo-Add-an-other-forbidden-string-Serial.patch => fireinfo/0001-Add-an-other-forbidden-string-Serial.patch} (90%) create mode 100644 src/patches/fireinfo/0002-Escape-any-non-printable-ascii-characters.patch rename src/patches/{fireinfo-Skip-search-for-hypervisor-name-when-the-CPU-string-.patch => fireinfo/0003-Skip-search-for-hypervisor-name-when-the-CPU-string-.patch} (90%) rename src/patches/fireinfo/{0001-Filter-all-IDs-that-only-consist-of-0xff.patch => 0004-Filter-all-IDs-that-only-consist-of-0xff.patch} (86%) create mode 100644 src/patches/fireinfo/0005-Fix-crash-if-there-is-id-has-already-been-reset-to-N.patch
Difference in files: diff --git a/lfs/fireinfo b/lfs/fireinfo index eae6c99..55a7845 100644 --- a/lfs/fireinfo +++ b/lfs/fireinfo @@ -70,9 +70,11 @@ $(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-Add-an-other-forbidden-string-Serial.patch - cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/fireinfo-Skip-search-for-hypervisor-name-when-the-CPU-string-.patch - cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/fireinfo/0001-Filter-all-IDs-that-only-consist-of-0xff.patch + 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-Add-an-other-forbidden-string-Serial.patch b/src/patches/fireinfo-Add-an-other-forbidden-string-Serial.patch deleted file mode 100644 index d710852..0000000 --- a/src/patches/fireinfo-Add-an-other-forbidden-string-Serial.patch +++ /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] 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.1.0 - diff --git a/src/patches/fireinfo-Skip-search-for-hypervisor-name-when-the-CPU-string-.patch b/src/patches/fireinfo-Skip-search-for-hypervisor-name-when-the-CPU-string-.patch deleted file mode 100644 index 24a8ca1..0000000 --- a/src/patches/fireinfo-Skip-search-for-hypervisor-name-when-the-CPU-string-.patch +++ /dev/null @@ -1,34 +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] 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.1.0 - 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 new file mode 100644 index 0000000..00c9838 --- /dev/null +++ b/src/patches/fireinfo/0001-Add-an-other-forbidden-string-Serial.patch @@ -0,0 +1,25 @@ +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/0001-Filter-all-IDs-that-only-consist-of-0xff.patch b/src/patches/fireinfo/0001-Filter-all-IDs-that-only-consist-of-0xff.patch deleted file mode 100644 index 0c6fe43..0000000 --- a/src/patches/fireinfo/0001-Filter-all-IDs-that-only-consist-of-0xff.patch +++ /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] 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 4148c66..edf7359 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/0002-Escape-any-non-printable-ascii-characters.patch b/src/patches/fireinfo/0002-Escape-any-non-printable-ascii-characters.patch new file mode 100644 index 0000000..576154b --- /dev/null +++ b/src/patches/fireinfo/0002-Escape-any-non-printable-ascii-characters.patch @@ -0,0 +1,69 @@ +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 new file mode 100644 index 0000000..f643251 --- /dev/null +++ b/src/patches/fireinfo/0003-Skip-search-for-hypervisor-name-when-the-CPU-string-.patch @@ -0,0 +1,35 @@ +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 new file mode 100644 index 0000000..737a319 --- /dev/null +++ b/src/patches/fireinfo/0004-Filter-all-IDs-that-only-consist-of-0xff.patch @@ -0,0 +1,28 @@ +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 new file mode 100644 index 0000000..dcc552d --- /dev/null +++ b/src/patches/fireinfo/0005-Fix-crash-if-there-is-id-has-already-been-reset-to-N.patch @@ -0,0 +1,26 @@ +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 +
hooks/post-receive -- IPFire 2.x development tree