kdePackages.plasma-nm: clean up patch, add strongswan (#493929)
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
diff --git a/vpn/openvpn/openvpnadvancedwidget.cpp b/vpn/openvpn/openvpnadvancedwidget.cpp
|
||||
index 2f11ba1d..310f11b4 100644
|
||||
--- a/vpn/openvpn/openvpnadvancedwidget.cpp
|
||||
+++ b/vpn/openvpn/openvpnadvancedwidget.cpp
|
||||
@@ -75,7 +75,7 @@ OpenVpnAdvancedWidget::OpenVpnAdvancedWidget(const NetworkManager::VpnSetting::P
|
||||
connect(m_ui->cmbProxyType, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &OpenVpnAdvancedWidget::proxyTypeChanged);
|
||||
|
||||
// start openVPN process and get its cipher list
|
||||
- const QString openVpnBinary = QStandardPaths::findExecutable("openvpn", QStringList{"/sbin", "/usr/sbin"});
|
||||
+ const QString openVpnBinary = "@openvpn@/bin/openvpn";
|
||||
const QStringList ciphersArgs(QLatin1String("--show-ciphers"));
|
||||
const QStringList versionArgs(QLatin1String("--version"));
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{
|
||||
lib,
|
||||
mkKdeDerivation,
|
||||
replaceVars,
|
||||
pkg-config,
|
||||
@@ -7,13 +8,15 @@
|
||||
mobile-broadband-provider-info,
|
||||
openconnect,
|
||||
openvpn,
|
||||
strongswan,
|
||||
}:
|
||||
mkKdeDerivation {
|
||||
pname = "plasma-nm";
|
||||
|
||||
patches = [
|
||||
(replaceVars ./0002-openvpn-binary-path.patch {
|
||||
inherit openvpn;
|
||||
(replaceVars ./hardcode-paths.patch {
|
||||
openvpn = lib.getExe openvpn;
|
||||
ipsec = lib.getExe' strongswan "ipsec";
|
||||
})
|
||||
];
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
diff --git a/vpn/l2tp/l2tpipsecwidget.cpp b/vpn/l2tp/l2tpipsecwidget.cpp
|
||||
index bcc92dfd6..6708128fa 100644
|
||||
--- a/vpn/l2tp/l2tpipsecwidget.cpp
|
||||
+++ b/vpn/l2tp/l2tpipsecwidget.cpp
|
||||
@@ -387,7 +387,7 @@ bool L2tpIpsecWidget::hasIpsecDaemon()
|
||||
return true;
|
||||
}
|
||||
|
||||
- QString ipsecBinary = QStandardPaths::findExecutable(QStringLiteral("ipsec"), QStringList() << QStringLiteral("/sbin") << QStringLiteral("/usr/sbin"));
|
||||
+ QString ipsecBinary = "@ipsec@";
|
||||
|
||||
// On some Linux distributions, ipsec executable has been renamed strongswan
|
||||
if (ipsecBinary.isEmpty()) {
|
||||
diff --git a/vpn/openvpn/openvpnadvancedwidget.cpp b/vpn/openvpn/openvpnadvancedwidget.cpp
|
||||
index a1c2c553d..111f6138c 100644
|
||||
--- a/vpn/openvpn/openvpnadvancedwidget.cpp
|
||||
+++ b/vpn/openvpn/openvpnadvancedwidget.cpp
|
||||
@@ -102,7 +102,7 @@ OpenVpnAdvancedWidget::OpenVpnAdvancedWidget(const NetworkManager::VpnSetting::P
|
||||
});
|
||||
|
||||
// start openVPN process and get its cipher list
|
||||
- const QString openVpnBinary = QStandardPaths::findExecutable("openvpn", QStringList{"/sbin", "/usr/sbin"});
|
||||
+ const QString openVpnBinary = "@openvpn@";
|
||||
const QStringList ciphersArgs(QLatin1String("--show-ciphers"));
|
||||
const QStringList versionArgs(QLatin1String("--version"));
|
||||
|
||||
Reference in New Issue
Block a user