Browse Source

openvswitch: pass KERNEL_MAKE_FLAGS for reproducible build

Reported-by: Paul Spooren <mail@aparcar.org>
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
lilik-openwrt-22.03
Yousong Zhou 5 years ago
parent
commit
26291bba4e
6 changed files with 35 additions and 8 deletions
  1. +3
    -1
      net/openvswitch/Makefile
  2. +1
    -1
      net/openvswitch/patches/0001-netdev-linux-Let-interface-flag-survive-internal-por.patch
  3. +4
    -4
      net/openvswitch/patches/0002-python-separate-host-target-python-for-cross-compile.patch
  4. +1
    -1
      net/openvswitch/patches/0003-ovs-lib-fix-install_dir.patch
  5. +1
    -1
      net/openvswitch/patches/0005-datapath-unexport-LDFLAGS.patch
  6. +25
    -0
      net/openvswitch/patches/0006-datapath-allow-passing-additional-OVS_KERNEL_MAKE_FL.patch

+ 3
- 1
net/openvswitch/Makefile View File

@ -17,7 +17,7 @@ include ./openvswitch.mk
# #
PKG_NAME:=openvswitch PKG_NAME:=openvswitch
PKG_VERSION:=$(ovs_version) PKG_VERSION:=$(ovs_version)
PKG_RELEASE:=4
PKG_RELEASE:=5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.openvswitch.org/releases/ PKG_SOURCE_URL:=https://www.openvswitch.org/releases/
PKG_HASH:=dd5f727427e36cab22bdeae61529d8c8fccacc53d968cfa7658f7f935ddda531 PKG_HASH:=dd5f727427e36cab22bdeae61529d8c8fccacc53d968cfa7658f7f935ddda531
@ -274,6 +274,8 @@ endif
TARGET_CFLAGS += -flto -std=gnu99 TARGET_CFLAGS += -flto -std=gnu99
MAKE_VARS += PYTHONPATH="$(HOST_PYTHON3PATH)" MAKE_VARS += PYTHONPATH="$(HOST_PYTHON3PATH)"
export OVS_KERNEL_MAKE_FLAGS=$(KERNEL_MAKE_FLAGS)
override CONFIG_AUTOREMOVE= override CONFIG_AUTOREMOVE=
$(foreach p,$(ovs_kmod_packages),\ $(foreach p,$(ovs_kmod_packages),\


+ 1
- 1
net/openvswitch/patches/0001-netdev-linux-Let-interface-flag-survive-internal-por.patch View File

@ -1,4 +1,4 @@
From 6fda3936a85319d6b09108dda67466baa1c93b6c Mon Sep 17 00:00:00 2001
From 66f96259c596f8f303bd98e5323a447cd60adbb2 Mon Sep 17 00:00:00 2001
From: Helmut Schaa <helmut.schaa@googlemail.com> From: Helmut Schaa <helmut.schaa@googlemail.com>
Date: Wed, 8 Jan 2014 13:48:49 +0100 Date: Wed, 8 Jan 2014 13:48:49 +0100
Subject: [PATCH] netdev-linux: Let interface flag survive internal port setup Subject: [PATCH] netdev-linux: Let interface flag survive internal port setup


+ 4
- 4
net/openvswitch/patches/0002-python-separate-host-target-python-for-cross-compile.patch View File

@ -1,4 +1,4 @@
From c17f9e73b543043b438dee6759ae20047ee33d4a Mon Sep 17 00:00:00 2001
From 29c5b1f1b53010a49d2ce1cc59060c334b1a40fc Mon Sep 17 00:00:00 2001
From: Yousong Zhou <yszhou4tech@gmail.com> From: Yousong Zhou <yszhou4tech@gmail.com>
Date: Fri, 20 Mar 2020 15:11:31 +0800 Date: Fri, 20 Mar 2020 15:11:31 +0800
Subject: [PATCH] python: separate host/target python for cross-compile Subject: [PATCH] python: separate host/target python for cross-compile
@ -6,8 +6,8 @@ Subject: [PATCH] python: separate host/target python for cross-compile
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com> Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
--- ---
Makefile.am | 2 +- Makefile.am | 2 +-
m4/openvswitch.m4 | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
m4/openvswitch.m4 | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am diff --git a/Makefile.am b/Makefile.am
index b279303d1..6140b2c7f 100644 index b279303d1..6140b2c7f 100644
@ -23,7 +23,7 @@ index b279303d1..6140b2c7f 100644
ALL_LOCAL = ALL_LOCAL =
BUILT_SOURCES = BUILT_SOURCES =
diff --git a/m4/openvswitch.m4 b/m4/openvswitch.m4 diff --git a/m4/openvswitch.m4 b/m4/openvswitch.m4
index add3aabcc..839eb7bda 100644
index add3aabcc..ada31c491 100644
--- a/m4/openvswitch.m4 --- a/m4/openvswitch.m4
+++ b/m4/openvswitch.m4 +++ b/m4/openvswitch.m4
@@ -383,6 +383,8 @@ else: @@ -383,6 +383,8 @@ else:


+ 1
- 1
net/openvswitch/patches/0003-ovs-lib-fix-install_dir.patch View File

@ -1,4 +1,4 @@
From e8203d10706e6289f773bfe84a3fd87f19fcee07 Mon Sep 17 00:00:00 2001
From 1c0697cb4b57e85deafc0d518b68e0b13ba2995b Mon Sep 17 00:00:00 2001
From: Yousong Zhou <yszhou4tech@gmail.com> From: Yousong Zhou <yszhou4tech@gmail.com>
Date: Wed, 14 Mar 2018 16:44:13 +0800 Date: Wed, 14 Mar 2018 16:44:13 +0800
Subject: [PATCH] ovs-lib: fix install_dir() Subject: [PATCH] ovs-lib: fix install_dir()


+ 1
- 1
net/openvswitch/patches/0005-datapath-unexport-LDFLAGS.patch View File

@ -1,4 +1,4 @@
From cb16c9b1be1a0d11a26a3027af8168bd314c4114 Mon Sep 17 00:00:00 2001
From b2c26315339fc17d0ad9d0009321671850cc7295 Mon Sep 17 00:00:00 2001
From: Yousong Zhou <yszhou4tech@gmail.com> From: Yousong Zhou <yszhou4tech@gmail.com>
Date: Mon, 16 Mar 2020 15:18:16 +0800 Date: Mon, 16 Mar 2020 15:18:16 +0800
Subject: [PATCH] datapath: unexport LDFLAGS Subject: [PATCH] datapath: unexport LDFLAGS


+ 25
- 0
net/openvswitch/patches/0006-datapath-allow-passing-additional-OVS_KERNEL_MAKE_FL.patch View File

@ -0,0 +1,25 @@
From f29d4866cf566c916000426e0c206db008be4fb3 Mon Sep 17 00:00:00 2001
From: Yousong Zhou <yszhou4tech@gmail.com>
Date: Tue, 26 May 2020 22:45:53 +0800
Subject: [PATCH] datapath: allow passing additional $(OVS_KERNEL_MAKE_FLAGS)
This can be useful for passing args like -iremap for reproducible builds
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
---
datapath/linux/Makefile.main.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/datapath/linux/Makefile.main.in b/datapath/linux/Makefile.main.in
index 6db4aa3ab..6f295387a 100644
--- a/datapath/linux/Makefile.main.in
+++ b/datapath/linux/Makefile.main.in
@@ -68,7 +68,7 @@ ifeq (,$(wildcard $(CONFIG_FILE)))
endif
default:
- $(MAKE) -C $(KSRC) $(if @KARCH@,ARCH=@KARCH@) M=$(builddir) modules
+ $(MAKE) -C $(KSRC) $(OVS_KERNEL_MAKE_FLAGS) $(if @KARCH@,ARCH=@KARCH@) M=$(builddir) modules
modules_install:
$(MAKE) -C $(KSRC) $(if @KARCH@,ARCH=@KARCH@) M=$(builddir) modules_install

Loading…
Cancel
Save