Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ovn: fix more missing ovs binaries #378038

Merged
merged 1 commit into from
Jan 30, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions pkgs/by-name/ov/ovn/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,16 @@ stdenv.mkDerivation rec {
preConfigure = ''
pushd ovs
./boot.sh
./configure
./configure --with-dbdir=/var/lib/openvswitch
make -j $NIX_BUILD_CORES
popd
'';

configureFlags = [
"--localstatedir=/var"
"--sharedstatedir=/var"
"--with-dbdir=/var/lib/ovn"
"--sbindir=$(out)/bin"
"--enable-ssl"
];

Expand All @@ -71,14 +73,20 @@ stdenv.mkDerivation rec {
postInstall = ''
mkdir -vp $out/share/openvswitch/scripts
mkdir -vp $out/etc/ovn
cp ovs/ovsdb/ovsdb-client $out/share/openvswitch/scripts
cp ovs/ovsdb/ovsdb-server $out/share/openvswitch/scripts
cp ovs/ovsdb/ovsdb-tool $out/share/openvswitch/scripts
cp ovs/utilities/ovs-appctl $out/share/openvswitch/scripts
cp ovs/utilities/ovs-vsctl $out/share/openvswitch/scripts
cp ovs/ovsdb/ovsdb-client $out/bin
cp ovs/ovsdb/ovsdb-server $out/bin
cp ovs/ovsdb/ovsdb-tool $out/bin
cp ovs/vswitchd/ovs-vswitchd $out/bin
cp ovs/utilities/ovs-appctl $out/bin
cp ovs/utilities/ovs-vsctl $out/bin
cp ovs/utilities/ovs-ctl $out/share/openvswitch/scripts
cp ovs/utilities/ovs-lib $out/share/openvswitch/scripts
sed -i "s#/usr/local/bin#$out/share/openvswitch/scripts#g" $out/share/openvswitch/scripts/ovs-lib
sed -i "s#/usr/local/sbin#$out/share/openvswitch/scripts#g" $out/share/openvswitch/scripts/ovs-lib
cp ovs/utilities/ovs-kmod-ctl $out/share/openvswitch/scripts
cp ovs/vswitchd/vswitch.ovsschema $out/share/openvswitch
sed -i "s#/usr/local/etc#/var/lib#g" $out/share/openvswitch/scripts/ovs-lib
sed -i "s#/usr/local/bin#$out/bin#g" $out/share/openvswitch/scripts/ovs-lib
sed -i "s#/usr/local/sbin#$out/bin#g" $out/share/openvswitch/scripts/ovs-lib
sed -i "s#/usr/local/share#$out/share#g" $out/share/openvswitch/scripts/ovs-lib
sed -i '/chown -R $INSTALL_USER:$INSTALL_GROUP $ovn_etcdir/d' $out/share/ovn/scripts/ovn-ctl
'';

Expand Down