From c2fbdcb454975bfe5aed789ebdcd2fa15667a019 Mon Sep 17 00:00:00 2001 From: Alok Kumar Date: Thu, 23 Jan 2025 21:05:29 +0530 Subject: [PATCH 1/4] use both AssemblyVersion and Assembly Version Reference: https://github.com/aboutcode-org/scancode-toolkit/issues/3790 Signed-off-by: Alok Kumar --- src/packagedcode/win_pe.py | 1 + ...crosoft.Practices.EnterpriseLibrary.Caching.dll.expected.json | 1 + tests/packagedcode/data/win_pe/Moq.Silverlight.dll.expected.json | 1 + tests/packagedcode/data/win_pe/Windows.AI.winmd.expected.json | 1 + tests/packagedcode/data/win_pe/_ctypes_test.pyd.expected.json | 1 + tests/packagedcode/data/win_pe/chcp.com.expected.json | 1 + tests/packagedcode/data/win_pe/clfs.sys.mui.expected.json | 1 + tests/packagedcode/data/win_pe/crypt32.dll.mun.expected.json | 1 + tests/packagedcode/data/win_pe/euc-jp.so.expected.json | 1 + tests/packagedcode/data/win_pe/file.exe.expected.json | 1 + tests/packagedcode/data/win_pe/libiconv2.dll.expected.json | 1 + tests/packagedcode/data/win_pe/libintl3.dll.expected.json | 1 + tests/packagedcode/data/win_pe/stdole2.tlb.expected.json | 1 + tests/packagedcode/data/win_pe/tbs.sys.expected.json | 1 + tests/packagedcode/data/win_pe/tre4.dll.expected.json | 1 + tests/packagedcode/data/win_pe/zlib1.dll.expected.json | 1 + 16 files changed, 16 insertions(+) diff --git a/src/packagedcode/win_pe.py b/src/packagedcode/win_pe.py index 2790cf5a6aa..2400f772eeb 100644 --- a/src/packagedcode/win_pe.py +++ b/src/packagedcode/win_pe.py @@ -110,6 +110,7 @@ def logger_debug(*args): 'ProductVersion', # the actual version 'FileVersion', # another common version 'Assembly Version', # a version common in MSFT, redundant when present with ProductVersion + 'AssemblyVersion', # a version common in MSFT, redundant when present with ProductVersion 'BuildDate', # rare but useful when there 2013/02/04-18:07:46 2018-11-10 14:38 diff --git a/tests/packagedcode/data/win_pe/Microsoft.Practices.EnterpriseLibrary.Caching.dll.expected.json b/tests/packagedcode/data/win_pe/Microsoft.Practices.EnterpriseLibrary.Caching.dll.expected.json index c54cfd4a90d..00c7bed7cc5 100644 --- a/tests/packagedcode/data/win_pe/Microsoft.Practices.EnterpriseLibrary.Caching.dll.expected.json +++ b/tests/packagedcode/data/win_pe/Microsoft.Practices.EnterpriseLibrary.Caching.dll.expected.json @@ -3,6 +3,7 @@ "ProductVersion": "2.0.0.0", "FileVersion": "2.0.0.0", "Assembly Version": "2.0.0.0", + "AssemblyVersion": null, "BuildDate": null, "ProductName": "Microsoft Enterprise Library for .NET", "OriginalFilename": "Microsoft.Practices.EnterpriseLibrary.Caching.dll", diff --git a/tests/packagedcode/data/win_pe/Moq.Silverlight.dll.expected.json b/tests/packagedcode/data/win_pe/Moq.Silverlight.dll.expected.json index 996b6b9c0ba..f164ecac685 100644 --- a/tests/packagedcode/data/win_pe/Moq.Silverlight.dll.expected.json +++ b/tests/packagedcode/data/win_pe/Moq.Silverlight.dll.expected.json @@ -3,6 +3,7 @@ "ProductVersion": "4.2.1507.0118", "FileVersion": "4.2.1507.0118", "Assembly Version": "4.2.1507.118", + "AssemblyVersion": null, "BuildDate": null, "ProductName": "Moq", "OriginalFilename": "Moq.Silverlight.dll", diff --git a/tests/packagedcode/data/win_pe/Windows.AI.winmd.expected.json b/tests/packagedcode/data/win_pe/Windows.AI.winmd.expected.json index a7a86d981b2..edde0d9dca7 100644 --- a/tests/packagedcode/data/win_pe/Windows.AI.winmd.expected.json +++ b/tests/packagedcode/data/win_pe/Windows.AI.winmd.expected.json @@ -3,6 +3,7 @@ "ProductVersion": "10.0.10011.16384", "FileVersion": "10.0.10011.16384", "Assembly Version": null, + "AssemblyVersion": null, "BuildDate": null, "ProductName": "Windows SDK", "OriginalFilename": "", diff --git a/tests/packagedcode/data/win_pe/_ctypes_test.pyd.expected.json b/tests/packagedcode/data/win_pe/_ctypes_test.pyd.expected.json index bd7cdbb0ff2..36292fe45d1 100644 --- a/tests/packagedcode/data/win_pe/_ctypes_test.pyd.expected.json +++ b/tests/packagedcode/data/win_pe/_ctypes_test.pyd.expected.json @@ -3,6 +3,7 @@ "ProductVersion": null, "FileVersion": null, "Assembly Version": null, + "AssemblyVersion": null, "BuildDate": null, "ProductName": null, "OriginalFilename": null, diff --git a/tests/packagedcode/data/win_pe/chcp.com.expected.json b/tests/packagedcode/data/win_pe/chcp.com.expected.json index f32b310f048..5d1a1f3d8ee 100644 --- a/tests/packagedcode/data/win_pe/chcp.com.expected.json +++ b/tests/packagedcode/data/win_pe/chcp.com.expected.json @@ -3,6 +3,7 @@ "ProductVersion": "10.0.17763.1", "FileVersion": "10.0.17763.1 (WinBuild.160101.0800)", "Assembly Version": null, + "AssemblyVersion": null, "BuildDate": null, "ProductName": "Microsoft\u00ae Windows\u00ae Operating System", "OriginalFilename": "CHCP.COM", diff --git a/tests/packagedcode/data/win_pe/clfs.sys.mui.expected.json b/tests/packagedcode/data/win_pe/clfs.sys.mui.expected.json index f4c972a0396..22dde26f180 100644 --- a/tests/packagedcode/data/win_pe/clfs.sys.mui.expected.json +++ b/tests/packagedcode/data/win_pe/clfs.sys.mui.expected.json @@ -3,6 +3,7 @@ "ProductVersion": "10.0.18362.1256", "FileVersion": "10.0.18362.1256 (WinBuild.160101.0800)", "Assembly Version": null, + "AssemblyVersion": null, "BuildDate": null, "ProductName": "Microsoft\u00ae Windows\u00ae Operating System", "OriginalFilename": "Clfs.Sys.MUI", diff --git a/tests/packagedcode/data/win_pe/crypt32.dll.mun.expected.json b/tests/packagedcode/data/win_pe/crypt32.dll.mun.expected.json index d4eea7da1d6..e49dd23b1e8 100644 --- a/tests/packagedcode/data/win_pe/crypt32.dll.mun.expected.json +++ b/tests/packagedcode/data/win_pe/crypt32.dll.mun.expected.json @@ -3,6 +3,7 @@ "ProductVersion": "10.0.18362.1256", "FileVersion": "10.0.18362.1256 (WinBuild.160101.0800)", "Assembly Version": null, + "AssemblyVersion": null, "BuildDate": null, "ProductName": "Microsoft\u00ae Windows\u00ae Operating System", "OriginalFilename": "CRYPT32.DLL", diff --git a/tests/packagedcode/data/win_pe/euc-jp.so.expected.json b/tests/packagedcode/data/win_pe/euc-jp.so.expected.json index bd7cdbb0ff2..36292fe45d1 100644 --- a/tests/packagedcode/data/win_pe/euc-jp.so.expected.json +++ b/tests/packagedcode/data/win_pe/euc-jp.so.expected.json @@ -3,6 +3,7 @@ "ProductVersion": null, "FileVersion": null, "Assembly Version": null, + "AssemblyVersion": null, "BuildDate": null, "ProductName": null, "OriginalFilename": null, diff --git a/tests/packagedcode/data/win_pe/file.exe.expected.json b/tests/packagedcode/data/win_pe/file.exe.expected.json index 1eb171d9749..44e8468cce5 100644 --- a/tests/packagedcode/data/win_pe/file.exe.expected.json +++ b/tests/packagedcode/data/win_pe/file.exe.expected.json @@ -3,6 +3,7 @@ "ProductVersion": "5.03.3414.16721", "FileVersion": "5.03.3414.16721", "Assembly Version": null, + "AssemblyVersion": null, "BuildDate": null, "ProductName": "File", "OriginalFilename": "file.exe", diff --git a/tests/packagedcode/data/win_pe/libiconv2.dll.expected.json b/tests/packagedcode/data/win_pe/libiconv2.dll.expected.json index 9ac7a5dcea6..c73fb1e849a 100644 --- a/tests/packagedcode/data/win_pe/libiconv2.dll.expected.json +++ b/tests/packagedcode/data/win_pe/libiconv2.dll.expected.json @@ -3,6 +3,7 @@ "ProductVersion": "1.9.2.1519", "FileVersion": "1.9.2.1519", "Assembly Version": null, + "AssemblyVersion": null, "BuildDate": null, "ProductName": "LibIconv", "OriginalFilename": "libiconv2.dll", diff --git a/tests/packagedcode/data/win_pe/libintl3.dll.expected.json b/tests/packagedcode/data/win_pe/libintl3.dll.expected.json index c2e81d04a2e..48c789a1aba 100644 --- a/tests/packagedcode/data/win_pe/libintl3.dll.expected.json +++ b/tests/packagedcode/data/win_pe/libintl3.dll.expected.json @@ -3,6 +3,7 @@ "ProductVersion": "0.14.4.1952", "FileVersion": "0.14.4.1952", "Assembly Version": null, + "AssemblyVersion": null, "BuildDate": null, "ProductName": "GetText", "OriginalFilename": "libintl3.dll", diff --git a/tests/packagedcode/data/win_pe/stdole2.tlb.expected.json b/tests/packagedcode/data/win_pe/stdole2.tlb.expected.json index c80f73252c1..d51a91c9b66 100644 --- a/tests/packagedcode/data/win_pe/stdole2.tlb.expected.json +++ b/tests/packagedcode/data/win_pe/stdole2.tlb.expected.json @@ -3,6 +3,7 @@ "ProductVersion": "10.0.18362.1256", "FileVersion": "10.0.18362.1256 (WinBuild.160101.0800)", "Assembly Version": null, + "AssemblyVersion": null, "BuildDate": null, "ProductName": "Microsoft\u00ae Windows\u00ae Operating System", "OriginalFilename": "STDOLE2.TLB", diff --git a/tests/packagedcode/data/win_pe/tbs.sys.expected.json b/tests/packagedcode/data/win_pe/tbs.sys.expected.json index 247a8632e0d..39edfdfda4e 100644 --- a/tests/packagedcode/data/win_pe/tbs.sys.expected.json +++ b/tests/packagedcode/data/win_pe/tbs.sys.expected.json @@ -3,6 +3,7 @@ "ProductVersion": "10.0.17763.1697", "FileVersion": "10.0.17763.1697 (WinBuild.160101.0800)", "Assembly Version": null, + "AssemblyVersion": null, "BuildDate": null, "ProductName": "Microsoft\u00ae Windows\u00ae Operating System", "OriginalFilename": "TBS.SYS", diff --git a/tests/packagedcode/data/win_pe/tre4.dll.expected.json b/tests/packagedcode/data/win_pe/tre4.dll.expected.json index 0377b71b7d4..25c0280c77e 100644 --- a/tests/packagedcode/data/win_pe/tre4.dll.expected.json +++ b/tests/packagedcode/data/win_pe/tre4.dll.expected.json @@ -3,6 +3,7 @@ "ProductVersion": "0.7.5.3276", "FileVersion": "0.7.5.3276", "Assembly Version": null, + "AssemblyVersion": null, "BuildDate": null, "ProductName": "Tre", "OriginalFilename": "tre4.dll", diff --git a/tests/packagedcode/data/win_pe/zlib1.dll.expected.json b/tests/packagedcode/data/win_pe/zlib1.dll.expected.json index f0327fd6b95..dd5ee0d3675 100644 --- a/tests/packagedcode/data/win_pe/zlib1.dll.expected.json +++ b/tests/packagedcode/data/win_pe/zlib1.dll.expected.json @@ -3,6 +3,7 @@ "ProductVersion": "1.2.3.2532", "FileVersion": "1.2.3.2532", "Assembly Version": null, + "AssemblyVersion": null, "BuildDate": null, "ProductName": "Zlib", "OriginalFilename": "zlib1.dll", From 6c981d1cfa841954495a30dd1f2629e818677d94 Mon Sep 17 00:00:00 2001 From: Alok Kumar Date: Sun, 22 Jun 2025 15:21:10 +0530 Subject: [PATCH 2/4] minor changes Signed-off-by: Alok Kumar --- src/packagedcode/win_pe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/packagedcode/win_pe.py b/src/packagedcode/win_pe.py index 2400f772eeb..00225b55541 100644 --- a/src/packagedcode/win_pe.py +++ b/src/packagedcode/win_pe.py @@ -110,7 +110,7 @@ def logger_debug(*args): 'ProductVersion', # the actual version 'FileVersion', # another common version 'Assembly Version', # a version common in MSFT, redundant when present with ProductVersion - 'AssemblyVersion', # a version common in MSFT, redundant when present with ProductVersion + 'AssemblyVersion', # a version common in MSFT, redundant when present with ProductVersion 'BuildDate', # rare but useful when there 2013/02/04-18:07:46 2018-11-10 14:38 From 29ce4b4e00cc7da6106d5821a224f42f4eecaddf Mon Sep 17 00:00:00 2001 From: Alok Kumar Date: Sat, 16 Aug 2025 10:39:16 +0530 Subject: [PATCH 3/4] update Signed-off-by: Alok Kumar --- src/licensedcode/data/rules/bsd-new_105.RULE | 58 ++++++++++---------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/src/licensedcode/data/rules/bsd-new_105.RULE b/src/licensedcode/data/rules/bsd-new_105.RULE index 7d629e4e3c4..84ac31d8a0f 100644 --- a/src/licensedcode/data/rules/bsd-new_105.RULE +++ b/src/licensedcode/data/rules/bsd-new_105.RULE @@ -1,30 +1,30 @@ ---- -license_expression: bsd-new -is_license_text: yes ---- - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +--- +license_expression: bsd-new +is_license_text: yes +--- + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of [[6]] nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file From 33785a3bde5afee581757f621ca18add69397120 Mon Sep 17 00:00:00 2001 From: Alok Kumar Date: Sat, 16 Aug 2025 10:40:21 +0530 Subject: [PATCH 4/4] fix Signed-off-by: Alok Kumar --- src/licensedcode/data/rules/bsd-new_105.RULE | 58 ++++++++++---------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/src/licensedcode/data/rules/bsd-new_105.RULE b/src/licensedcode/data/rules/bsd-new_105.RULE index 84ac31d8a0f..7d629e4e3c4 100644 --- a/src/licensedcode/data/rules/bsd-new_105.RULE +++ b/src/licensedcode/data/rules/bsd-new_105.RULE @@ -1,30 +1,30 @@ ---- -license_expression: bsd-new -is_license_text: yes ---- - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of [[6]] nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +--- +license_expression: bsd-new +is_license_text: yes +--- + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file