Skip to content

Commit febb78f

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

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

.github/workflows/build-windows.yaml

+11-10
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,11 @@ jobs:
9696
working-directory: ovs
9797
run: |
9898
# ovsdb-idl: Support write-only-changed IDL monitor mode
99-
Invoke-WebRequest -Uri "https://github.com/kubeovn/ovs/commit/03ce8faf7d0eb79d7dd99f4310dc15be160e92fc.patch" -OutFile ..\ovs-01.patch
99+
Invoke-WebRequest -Uri "https://github.com/kubeovn/ovs/commit/bef703ef862fbbf8740b8d5bf6ca8df9ed617da5.patch" -OutFile ..\ovs-01.patch
100100
# fix kernel crash
101101
Invoke-WebRequest -Uri "https://github.com/kubeovn/ovs/commit/64383c14a9c25e9e0ca53c6758d9499c60132536.patch" -OutFile ..\ovs-02.patch
102102
# support for building in github actions
103-
Invoke-WebRequest -Uri "https://github.com/kubeovn/ovs/commit/08a95db2ca506fce4d89fdf4fafab74607b2bb9f.patch" -OutFile ..\ovs-03.patch
103+
Invoke-WebRequest -Uri "https://github.com/kubeovn/ovs/commit/d170c6237cb6a7bbe16f916ab2286c3c942a852c.patch" -OutFile ..\ovs-03.patch
104104
# listen on tcp 127.0.0.1:6643 by default
105105
Invoke-WebRequest -Uri "https://github.com/kubeovn/ovs/commit/680e77a190ae7df3086bc35bb6150238e97f9020.patch" -OutFile ..\ovs-04.patch
106106
git apply ..\ovs-01.patch
@@ -111,12 +111,15 @@ jobs:
111111
- name: Apply OVN patches
112112
working-directory: ovn
113113
run: |
114+
# python: Rename build related code to ovs_build_helpers.
115+
Invoke-WebRequest -Uri "https://github.com/kubeovn/ovn/commit/9d961aec6fd7ef3e3002bc34e285833279e989c2.patch" -OutFile ..\ovn-00.patch
114116
# change hash type from dp_hash to hash with field src_ip
115-
Invoke-WebRequest -Uri "https://github.com/kubeovn/ovn/commit/ab923b252271cbbcccc8091e338ee7efe75e5fcd.patch" -OutFile ..\ovn-01.patch
117+
Invoke-WebRequest -Uri "https://github.com/kubeovn/ovn/commit/168a3f20579b720370f137c82c04cf3b1a9811e2.patch" -OutFile ..\ovn-01.patch
116118
# add support for windows
117-
Invoke-WebRequest -Uri "https://github.com/kubeovn/ovn/commit/700870525ffbbccb70c6b00ca0f807b2a387e6ee.patch" -OutFile ..\ovn-02.patch
119+
Invoke-WebRequest -Uri "https://github.com/kubeovn/ovn/commit/65b5de6304c1b974b11bab0945770488ccc09d2e.patch" -OutFile ..\ovn-02.patch
118120
# set br-int controller to TCP 127.0.0.1:6653
119-
Invoke-WebRequest -Uri "https://github.com/kubeovn/ovn/commit/e498c03eda80248dd786775d8f7779d9b895e3ff.patch" -OutFile ..\ovn-03.patch
121+
Invoke-WebRequest -Uri "https://github.com/kubeovn/ovn/commit/4fa77ab0460150b9ac79d7308c81045c82633565.patch" -OutFile ..\ovn-03.patch
122+
git apply ..\ovn-00.patch
120123
git apply ..\ovn-01.patch
121124
git apply ..\ovn-02.patch
122125
git apply ..\ovn-03.patch
@@ -128,9 +131,6 @@ jobs:
128131
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
129132
nmake all install
130133
131-
- name: Install pypiwin32
132-
run: python3 -m pip install pypiwin32
133-
134134
- name: Build OVS and OVN
135135
shell: cmd
136136
env:
@@ -150,14 +150,15 @@ jobs:
150150
echo %%~d | findstr /C:"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise" > nul && set _vs_path=!_vs_path!;%%~d
151151
)
152152
SET PATH="%_vs_path%;%PATH%"
153-
C:\msys64\usr\bin\bash.exe -lc "pacman -S --noconfirm libtool autoconf automake-wrapper"
153+
C:\msys64\usr\bin\bash.exe -lc "pacman -S --noconfirm python-pip libtool autoconf automake-wrapper"
154+
C:\msys64\usr\bin\bash.exe -lc "python3 -m pip install pypiwin32"
154155
C:\msys64\usr\bin\bash.exe -lc "rm -f `which link`"
155156
C:\msys64\usr\bin\bash.exe -lc "cd '%_ovs_dir%' && ./boot.sh"
156157
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"
157158
C:\msys64\usr\bin\bash.exe -lc "cd '%_ovs_dir%' && make -j"
158159
C:\msys64\usr\bin\bash.exe -lc "cd '%_ovs_dir%' && make windows_installer"
159160
C:\msys64\usr\bin\bash.exe -lc "cd '%_ovn_dir%' && ./boot.sh"
160-
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'"
161+
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'"
161162
C:\msys64\usr\bin\bash.exe -lc "cd '%_ovn_dir%' && make -j"
162163
C:\msys64\usr\bin\bash.exe -lc "cd '%_ovn_dir%' && make install"
163164

dist/images/Dockerfile.base

+2
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ RUN dpkg -i /usr/src/python3-openvswitch*.deb /usr/src/libopenvswitch*.deb
4444

4545
RUN cd /usr/src/ && git clone -b branch-22.03 --depth=1 https://github.com/ovn-org/ovn.git && \
4646
cd ovn && \
47+
# python: Rename build related code to ovs_build_helpers.
48+
curl -s https://github.com/kubeovn/ovn/commit/9d961aec6fd7ef3e3002bc34e285833279e989c2.patch | git apply && \
4749
# fix ssl listen address
4850
curl -s https://github.com/kubeovn/ovn/commit/dca043b2c35756fd370214fc40d61f755bd3a66f.patch | git apply && \
4951
# ovn-controller: Add a generic way to check if the daemon started recently.

0 commit comments

Comments
 (0)