ovn: fix missing scripts and wrong paths
Add missing ovs-appctl and ovs-vsctl scripts used by ovn-ctl.
ovs-ctl is looking for ${bindir}/ovs-appctl but I did not find a configure flag for bindir and sbindir in OVS, which default to /usr/local/{bin,sbin}, so I fixed it with sed.
We need to set the --with-dbdir configure flag so that ovn_dbdir does not default to ${ pkgs.ovn }/etc/ovn and is not in the Nix store, as ovn_dbdir contains stateful information.
"--enable-ssl" is the default if I did not misread the autoconf files, but it does not hurt to add it.
This commit is contained in:
committed by
Etienne Guillot
parent
229982d354
commit
676d91998d
@@ -52,7 +52,11 @@ stdenv.mkDerivation rec {
|
||||
popd
|
||||
'';
|
||||
|
||||
configureFlags = [ "--localstatedir=/var" ];
|
||||
configureFlags = [
|
||||
"--localstatedir=/var"
|
||||
"--with-dbdir=/var/lib/ovn"
|
||||
"--enable-ssl"
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
@@ -66,7 +70,13 @@ stdenv.mkDerivation rec {
|
||||
|
||||
postInstall = ''
|
||||
mkdir -vp $out/share/openvswitch/scripts
|
||||
mkdir -vp $out/etc/ovn
|
||||
cp ovs/utilities/ovs-appctl $out/share/openvswitch/scripts
|
||||
cp ovs/utilities/ovs-vsctl $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
|
||||
sed -i '/chown -R $INSTALL_USER:$INSTALL_GROUP $ovn_etcdir/d' $out/share/ovn/scripts/ovn-ctl
|
||||
'';
|
||||
|
||||
# https://docs.ovn.org/en/latest/topics/testing.html
|
||||
|
||||
Reference in New Issue
Block a user