Skip to content

Commit 01123f8

Browse files
committed
fix ovn build (#3166)
Signed-off-by: 张祖建 <zhangzujian.7@gmail.com>
1 parent f3b6460 commit 01123f8

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

.github/workflows/build-windows.yaml

+8-7
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ jobs:
102102
# fix kernel crash
103103
Invoke-WebRequest -Uri "https://github.com/kubeovn/ovs/commit/64383c14a9c25e9e0ca53c6758d9499c60132536.patch" -OutFile ..\ovs-01.patch
104104
# support for building in github actions
105-
Invoke-WebRequest -Uri "https://github.com/kubeovn/ovs/commit/08a95db2ca506fce4d89fdf4fafab74607b2bb9f.patch" -OutFile ..\ovs-02.patch
105+
Invoke-WebRequest -Uri "https://github.com/kubeovn/ovs/commit/d170c6237cb6a7bbe16f916ab2286c3c942a852c.patch" -OutFile ..\ovs-02.patch
106106
# listen on tcp 127.0.0.1:6643 by default
107107
Invoke-WebRequest -Uri "https://github.com/kubeovn/ovs/commit/680e77a190ae7df3086bc35bb6150238e97f9020.patch" -OutFile ..\ovs-03.patch
108108
git apply ..\ovs-01.patch
@@ -112,14 +112,17 @@ jobs:
112112
- name: Apply OVN patches
113113
working-directory: ovn
114114
run: |
115+
# python: Rename build related code to ovs_build_helpers.
116+
Invoke-WebRequest -Uri "https://github.com/kubeovn/ovn/commit/9d961aec6fd7ef3e3002bc34e285833279e989c2.patch" -OutFile ..\ovn-00.patch
115117
# change hash type from dp_hash to hash with field src_ip
116118
Invoke-WebRequest -Uri "https://github.com/kubeovn/ovn/commit/5a04402c01df1463b9e1edcbc1c5634793687140.patch" -OutFile ..\ovn-01.patch
117119
# add support for windows
118-
Invoke-WebRequest -Uri "https://github.com/kubeovn/ovn/commit/2c85af7097e4c39d225c98dc68b55a964d0197d7.patch" -OutFile ..\ovn-02.patch
120+
Invoke-WebRequest -Uri "https://github.com/kubeovn/ovn/commit/2be843b9fc7cba253fb27fc57c384034e97db148.patch" -OutFile ..\ovn-02.patch
119121
# set br-int controller to TCP 127.0.0.1:6653
120122
Invoke-WebRequest -Uri "https://github.com/kubeovn/ovn/commit/24dcd9485ebb0f6c962250684fae512850cd9210.patch" -OutFile ..\ovn-03.patch
121123
# ovn-controller: do not send GARP on localnet for Kube-OVN ports
122124
Invoke-WebRequest -Uri "https://github.com/kubeovn/ovn/commit/30ff0ba51745f5ea1b38ed63e8cd8e0479d0f916.patch" -OutFile ..\ovn-04.patch
125+
git apply ..\ovn-00.patch
123126
git apply ..\ovn-01.patch
124127
git apply ..\ovn-02.patch
125128
git apply ..\ovn-03.patch
@@ -132,9 +135,6 @@ jobs:
132135
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
133136
nmake all install
134137
135-
- name: Install pypiwin32
136-
run: python3 -m pip install pypiwin32
137-
138138
- name: Build OVS and OVN
139139
shell: cmd
140140
env:
@@ -154,14 +154,15 @@ jobs:
154154
echo %%~d | findstr /C:"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise" > nul && set _vs_path=!_vs_path!;%%~d
155155
)
156156
SET PATH="%_vs_path%;%PATH%"
157-
C:\msys64\usr\bin\bash.exe -lc "pacman -S --noconfirm libtool autoconf automake-wrapper"
157+
C:\msys64\usr\bin\bash.exe -lc "pacman -S --noconfirm python-pip libtool autoconf automake-wrapper"
158+
C:\msys64\usr\bin\bash.exe -lc "python3 -m pip install pypiwin32"
158159
C:\msys64\usr\bin\bash.exe -lc "rm -f `which link`"
159160
C:\msys64\usr\bin\bash.exe -lc "cd '%_ovs_dir%' && ./boot.sh"
160161
C:\msys64\usr\bin\bash.exe -lc "cd '%_ovs_dir%' && ./configure CC=./build-aux/cccl LD='`which link`' LIBS='-lws2_32 -lShlwapi -liphlpapi -lwbemuuid -lole32 -loleaut32' --prefix='C:/openvswitch/usr' --localstatedir='C:/openvswitch/var' --sysconfdir='C:/openvswitch/etc' --with-pthread='%_p4w_dir%' --disable-ssl"
161162
C:\msys64\usr\bin\bash.exe -lc "cd '%_ovs_dir%' && make -j"
162163
C:\msys64\usr\bin\bash.exe -lc "cd '%_ovs_dir%' && make windows_installer"
163164
C:\msys64\usr\bin\bash.exe -lc "cd '%_ovn_dir%' && ./boot.sh"
164-
C:\msys64\usr\bin\bash.exe -lc "cd '%_ovn_dir%' && ./configure CC=./build-aux/cccl LD='`which link`' LIBS='-lws2_32 -lShlwapi -liphlpapi -lwbemuuid -lole32 -loleaut32' --prefix='C:/ovn/usr' --localstatedir='C:/ovn/var' --sysconfdir='C:/ovn/etc' --with-pthread='%_p4w_dir%' --disable-ssl --with-ovs-source='../ovs' --with-ovs-build='../ovs'"
165+
C:\msys64\usr\bin\bash.exe -lc "cd '%_ovn_dir%' && ./configure CC=./build-aux/cccl LD='`which link`' LIBS='-lws2_32 -lShlwapi -liphlpapi -lwbemuuid -lole32 -loleaut32' --prefix='C:/ovn/usr' --localstatedir='C:/ovn/var' --sysconfdir='C:/ovn/etc' --with-pthread='%_p4w_dir%' --disable-ssl --with-ovs-source='../ovs'"
165166
C:\msys64\usr\bin\bash.exe -lc "cd '%_ovn_dir%' && make -j"
166167
C:\msys64\usr\bin\bash.exe -lc "cd '%_ovn_dir%' && make install"
167168

dist/images/Dockerfile.base

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ RUN cd /usr/src/ && \
2929

3030
RUN cd /usr/src/ && git clone -b branch-22.12 --depth=1 https://github.com/ovn-org/ovn.git && \
3131
cd ovn && \
32+
# python: Rename build related code to ovs_build_helpers.
33+
curl -s https://github.com/kubeovn/ovn/commit/9d961aec6fd7ef3e3002bc34e285833279e989c2.patch | git apply && \
3234
# change hash type from dp_hash to hash with field src_ip
3335
curl -s https://github.com/kubeovn/ovn/commit/daa09e380eec61620d4ee317e3265c44366d1147.patch | git apply && \
3436
# set ether dst addr for dnat on logical switch

0 commit comments

Comments
 (0)