fix: vendor vpnc script in linux packages

This commit is contained in:
Kevin Yue committed 2026-05-06 23:20:57 +08:00
1 parent fb6db0dc12
commit 08a77f9d38
8 files changed
+1223 -14

No files matched your search

+2 -1
View File
@@ -125,7 +125,7 @@ install:
install -Dm755 .build/gpgui/gpgui_*/gpgui $(DESTDIR)/usr/bin/gpgui; \
fi
# Install the HIP report script
install -Dm755 packaging/files/usr/libexec/gpclient/vpnc-script $(DESTDIR)/usr/libexec/gpclient/vpnc-script
install -Dm755 packaging/files/usr/libexec/gpclient/hipreport.sh $(DESTDIR)/usr/libexec/gpclient/hipreport.sh
# Install the disconnect hooks
@@ -148,6 +148,7 @@ uninstall:
rm -f $(DESTDIR)/usr/bin/gpgui-helper
rm -f $(DESTDIR)/usr/bin/gpgui
rm -f $(DESTDIR)/usr/libexec/gpclient/vpnc-script
rm -f $(DESTDIR)/usr/libexec/gpclient/hipreport.sh
rm -f $(DESTDIR)/usr/lib/NetworkManager/dispatcher.d/pre-down.d/gpclient.down
+2
View File
@@ -3,6 +3,8 @@ use std::{io, path::Path};
use is_executable::IsExecutable;
const VPNC_SCRIPT_LOCATIONS: &[&str] = &[
"/usr/libexec/gpclient/vpnc-script",
"/usr/lib/gpclient/vpnc-script",
"/usr/local/share/vpnc-scripts/vpnc-script",
"/usr/local/sbin/vpnc-script",
"/usr/share/vpnc-scripts/vpnc-script",
+2 -4
View File
@@ -59,7 +59,6 @@
buildInputs =
with pkgs;
[
vpnc-scripts
libxml2
zlib
lz4
@@ -103,9 +102,8 @@
{
postPatch = ''
substituteInPlace crates/openconnect/src/vpn_utils.rs \
--replace-fail /etc/vpnc/vpnc-script ${pkgs.vpnc-scripts}/bin/vpnc-script \
--replace-fail /usr/libexec/gpclient/hipreport.sh $out/libexec/gpclient/hipreport.sh \
--replace-fail /usr/lib/openconnect/hipreport.sh ${pkgs.openconnect}/libexec/openconnect/hipreport.sh
--replace-fail /usr/libexec/gpclient/vpnc-script $out/libexec/gpclient/vpnc-script \
--replace-fail /usr/libexec/gpclient/hipreport.sh $out/libexec/gpclient/hipreport.sh
substituteInPlace crates/common/src/constants.rs \
--replace-fail /usr/bin/gpclient $out/bin/gpclient \
+2 -1
View File
@@ -10,7 +10,7 @@ install:
install -Dm755 artifacts/usr/bin/gpgui $(DESTDIR)/usr/bin/gpgui; \
fi
# Install the HIP report script
install -Dm755 artifacts/usr/libexec/gpclient/vpnc-script $(DESTDIR)/usr/libexec/gpclient/vpnc-script
install -Dm755 artifacts/usr/libexec/gpclient/hipreport.sh $(DESTDIR)/usr/libexec/gpclient/hipreport.sh
# Install the disconnect hooks
@@ -33,6 +33,7 @@ uninstall:
rm -f $(DESTDIR)/usr/bin/gpgui-helper
rm -f $(DESTDIR)/usr/bin/gpgui
rm -f $(DESTDIR)/usr/libexec/gpclient/vpnc-script
rm -f $(DESTDIR)/usr/libexec/gpclient/hipreport.sh
rm -f $(DESTDIR)/usr/lib/NetworkManager/dispatcher.d/pre-down.d/gpclient.down
-2
View File
@@ -11,7 +11,6 @@ Build-Depends: debhelper (>= 9),
libayatana-appindicator3-1,
gnome-keyring,
libwebkit2gtk-4.1-dev,
libopenconnect-dev (>= 8.20),
rust-@RUST_VERSION@-all
Homepage: https://github.com/yuezk/GlobalProtect-openconnect
@@ -21,7 +20,6 @@ Multi-Arch: foreign
Depends:
${misc:Depends},
${shlibs:Depends},
vpnc-scripts,
libsecret-1-0,
libayatana-appindicator3-1,
gnome-keyring,
File diff suppressed because it is too large. Load diff
+1 -2
View File
@@ -10,8 +10,7 @@ url="https://github.com/yuezk/GlobalProtect-openconnect"
license=('GPL3')
makedepends=('make' 'pkg-config' 'cargo' 'file')
depends=('webkit2gtk-4.1' 'libappindicator-gtk3' 'librsvg' 'libsecret' 'openssl' 'appmenu-gtk-module'
'gnutls' 'libxml2' 'vpnc' 'lz4' 'libp11-kit' 'nettle' 'xdg-utils'
'openconnect>=8.20')
'gnutls' 'libxml2' 'lz4' 'libp11-kit' 'nettle' 'xdg-utils')
optdepends=('wmctrl: for window management')
provides=('globalprotect-openconnect' 'gpclient' 'gpservice' 'gpauth' 'gpgui')
@@ -15,7 +15,6 @@ BuildRequires: automake
BuildRequires: gcc-c++
BuildRequires: cargo
BuildRequires: pkg-config
BuildRequires: openconnect-devel
BuildRequires: (openssl-devel or libopenssl-devel)
BuildRequires: wget
BuildRequires: file
@@ -30,9 +29,6 @@ BuildRequires: webkit2gtk4.1-devel
BuildRequires: (libappindicator-gtk3-devel or libappindicator3-1)
BuildRequires: (librsvg2-devel or librsvg-devel)
# Still requires openconnect because of the latest vpnc-script it provides on
# some distros (e.g., opensuse)
Requires: openconnect >= 8.20
Requires: (libappindicator-gtk3 or libayatana-appindicator)
Conflicts: globalprotect-openconnect-snapshot
@@ -58,6 +54,7 @@ make build
%files
%defattr(-,root,root)
%{_bindir}/*
%{_libexecdir}/gpclient/vpnc-script
%{_libexecdir}/gpclient/hipreport.sh
%{_datadir}/applications/gpgui.desktop
%{_datadir}/icons/hicolor/32x32/apps/gpgui.png