Skip to contentSkip to conversation

wireshark-src: improve reproducibility

PATCH New Oleksiy Obitotskyy 1 participant 1 message Feb 17, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wireshark-src: improve reproducibility

What was done:
- add --noline option to flex, --no-line to bison and -l to lemon generators to prevent
adding #line directives with absolute path.
- eliminate absolute source path in python code generator and use baseline instead.

---
 ...ireshark-src-improve-reproducibility.patch | 44 +++++++++++
 .../0002-flex-Remove-line-directives.patch    | 46 +++++++++++
 .../0003-bison-Remove-line-directives.patch   | 59 ++++++++++++++
 .../0004-lemon-Remove-line-directives.patch   | 77 +++++++++++++++++++
 .../wireshark/wireshark_3.4.3.bb              |  7 ++
 5 files changed, 233 insertions(+)
 create mode 100644 meta-networking/recipes-support/wireshark/files/0001-wireshark-src-improve-reproducibility.patch
 create mode 100644 meta-networking/recipes-support/wireshark/files/0002-flex-Remove-line-directives.patch
 create mode 100644 meta-networking/recipes-support/wireshark/files/0003-bison-Remove-line-directives.patch
 create mode 100644 meta-networking/recipes-support/wireshark/files/0004-lemon-Remove-line-directives.patch
meta-networking/recipes-support/wireshark/files/0001-wireshark-src-improve-reproducibility.patch new file +44 -0
new file mode 100644
index 000000000..0b83ca4ae
@@ -0,0 +1,44 @@
+From 0a9ab056ce7582033a21d6bc541ece520bf2b0b6 Mon Sep 17 00:00:00 2001
+From: Oleksiy Obitotskyy <[email protected]>
+Date: Thu, 26 Nov 2020 05:38:31 -0800
+Subject: [PATCH] wireshark-src: improve reproducibility
+
+Cut absolute path for filename in generated code
+comments.
+
+Upstream-Status: Pending
+Signed-off-by: Oleksiy Obitotskyy <[email protected]>
+---
+ tools/make-plugin-reg.py | 2 +-
+ tools/ncp2222.py         | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tools/make-plugin-reg.py b/tools/make-plugin-reg.py
+index 66b4656..c52b3fc 100755
+--- a/tools/make-plugin-reg.py
++++ b/tools/make-plugin-reg.py
+@@ -28,7 +28,7 @@ preamble = """\
+  *
+  * Generated automatically from %s.
+  */
+-""" % (sys.argv[0])
++""" % (os.path.basename(sys.argv[0]))
+ 
+ # Create the proper list of filenames
+ filenames = []
+diff --git a/tools/ncp2222.py b/tools/ncp2222.py
+index 1dea4ec..dc376e3 100755
+--- a/tools/ncp2222.py
++++ b/tools/ncp2222.py
+@@ -5858,7 +5858,7 @@ def produce_code():
+ 
+     print("/*")
+     print(" * Do not modify this file. Changes will be overwritten.")
+-    print(" * Generated automatically from %s" % (sys.argv[0]))
++    print(" * Generated automatically from %s" % (os.path.basename(sys.argv[0])))
+     print(" */\n")
+ 
+     print("""
+-- 
+2.26.2.Cisco
+
meta-networking/recipes-support/wireshark/files/0002-flex-Remove-line-directives.patch new file +46 -0

46 lines not on this page · raw message

meta-networking/recipes-support/wireshark/files/0003-bison-Remove-line-directives.patch new file +59 -0

59 lines not on this page · raw message

meta-networking/recipes-support/wireshark/files/0004-lemon-Remove-line-directives.patch new file +77 -0

77 lines not on this page · raw message

meta-networking/recipes-support/wireshark/wireshark_3.4.3.bb +7 -0
index 1c470d8bc..e730b18a0 100644
@@ -10,6 +10,13 @@ DEPENDS_append_class-target = " wireshark-native chrpath-replacement-native "
 
 SRC_URI = "https://1.eu.dl.wireshark.org/src/all-versions/wireshark-${PV}.tar.xz"
 
+SRC_URI += " \
+    file://0001-wireshark-src-improve-reproducibility.patch \
+    file://0002-flex-Remove-line-directives.patch \
+    file://0003-bison-Remove-line-directives.patch \
+    file://0004-lemon-Remove-line-directives.patch \
+"
+
 UPSTREAM_CHECK_URI = "https://1.as.dl.wireshark.org/src"
 
 SRC_URI[sha256sum] = "f467cc77f0fc73fce0b854cdbc292f132d4879fca69d417eccad5f967fbf262b"
Signature · 1 line
2.26.2.Cisco