Compare commits

..

36 Commits

Author SHA1 Message Date
Kevin Yue
c3d7a9fee4 Update GH release 2024-02-25 23:40:42 +08:00
Kevin Yue
0a26d6e360 Download gpgui from latest tag 2024-02-25 23:31:35 +08:00
Kevin Yue
3617dd990b Update CI 2024-02-25 23:24:19 +08:00
Kevin Yue
5d9c7b1cc8 Add matrix 2024-02-25 23:16:51 +08:00
Kevin Yue
18d4e1ea28 Upload release 2024-02-25 22:45:16 +08:00
Kevin Yue
8ec07c0486 Upload release 2024-02-25 22:45:05 +08:00
Kevin Yue
09e4a5c227 Fix CI 2024-02-25 22:10:20 +08:00
Kevin Yue
bd29c20f4c Fix CI 2024-02-25 22:08:28 +08:00
Kevin Yue
016e1a4494 Update CI 2024-02-25 22:04:11 +08:00
Kevin Yue
a55616b66a Install gpgui from archive 2024-02-25 08:40:32 -05:00
Kevin Yue
9db62448d9 Update download URL 2024-02-25 20:07:14 +08:00
Kevin Yue
c20ab0f393 Update build 2024-02-25 19:01:40 +08:00
Kevin Yue
e1af1da764 Fix patch 2024-02-25 18:53:44 +08:00
Kevin Yue
3d3d7038db Fix deb 2024-02-25 18:44:02 +08:00
Kevin Yue
d1ec358b8a Update build 2024-02-25 18:34:52 +08:00
Kevin Yue
354f50b671 Update build 2024-02-25 18:02:03 +08:00
Kevin Yue
e8a64539aa Update build 2024-02-25 17:30:41 +08:00
Kevin Yue
3daad748ae Add rust dep for ppa 2024-02-25 13:33:53 +08:00
Kevin Yue
5bca84c9cf Set rust version 2024-02-25 12:42:25 +08:00
Kevin Yue
3a6eca2ed2 Add build dependencies 2024-02-25 11:50:24 +08:00
Kevin Yue
141d66cbde Fix rpm install 2024-02-25 10:57:02 +08:00
Kevin Yue
f44cd85971 Use .build folder 2024-02-25 10:37:52 +08:00
Kevin Yue
55b119d0f2 Install rpm 2024-02-25 10:32:47 +08:00
Kevin Yue
df1bcd6571 Install rpm 2024-02-25 09:59:21 +08:00
Kevin Yue
a19789f1e3 Update rpm packaging 2024-02-25 09:55:52 +08:00
Kevin Yue
a0891e9f04 Update build.yaml 2024-02-24 22:51:27 +08:00
Kevin Yue
5586daf9e5 Add rpm target 2024-02-24 22:32:58 +08:00
Kevin Yue
d2d45910cb Fix CI 2024-02-23 21:59:47 +08:00
Kevin Yue
df4bbe0059 Preserve env for debuild 2024-02-23 21:12:12 +08:00
Kevin Yue
aa0f6bf5bb CI build deb 2024-02-23 06:07:16 -05:00
Kevin Yue
48e22f4f78 Add make ppa 2024-02-23 06:06:59 -05:00
Kevin Yue
480229b69f Fix archive name 2024-02-22 08:29:42 -05:00
Kevin Yue
c446763a05 Improve makefile 2024-02-22 08:20:52 -05:00
Kevin Yue
cfdba00a01 Make tarball 2024-02-21 22:19:34 +08:00
Kevin Yue
5404386972 Add packaging 2024-02-21 07:36:17 -05:00
Kevin Yue
4be877bf8c Add gpgui-helper (#326) 2024-02-21 20:34:14 +08:00
8 changed files with 144 additions and 125 deletions

View File

@@ -35,25 +35,23 @@ jobs:
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Prepare workspace
run: rm -rf source && mkdir source
- name: Checkout GlobalProtect-openconnect
uses: actions/checkout@v3
with:
token: ${{ secrets.GH_PAT }}
repository: yuezk/GlobalProtect-openconnect
path: source/gp
path: gp
- name: Create tarball
run: |
cd source/gp
cd gp
make tarball
- name: Upload tarball
uses: actions/upload-artifact@v3
with:
name: artifact-source
name: artifact-tarball
if-no-files-found: error
path: |
source/gp/.build/tarball/*.tar.gz
gp/.build/tarball/*.tar.gz
build-deb:
needs:
@@ -63,30 +61,38 @@ jobs:
matrix:
os: ${{fromJson(needs.setup-matrix.outputs.matrix)}}
runs-on: ${{ matrix.os }}
container:
image: yuezk/gpdev:main
credentials:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
steps:
- name: Prepare workspace
run: rm -rf build-deb && mkdir build-deb
- name: Download tarball
uses: actions/download-artifact@v3
with:
name: artifact-source
path: build-deb
- name: Docker Login
run: echo ${{ secrets.DOCKER_HUB_TOKEN }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin
- name: Build DEB package in Docker
name: artifact-tarball
- name: Build DEB package
run: |
docker run --rm -v $(pwd)/build-deb:/deb yuezk/gpdev:deb-builder
- name: Install DEB package in Docker
tar -xzf *.tar.gz
cd globalprotect-openconnect-*
make deb BUILD_FE=0
- name: Install DEB package
run: |
docker run --rm -v $(pwd)/build-deb:/deb yuezk/gpdev:deb-builder \
bash -c "sudo dpkg -i /deb/*.deb; gpclient --version; gpservice --version; gpauth --version; gpgui-helper --version;"
cd globalprotect-openconnect-*/
sudo dpkg -i .build/deb/*.deb
gpclient --version
gpservice --version
gpauth --version
gpgui-helper --version
- name: Upload DEB package
uses: actions/upload-artifact@v3
with:
name: artifact-deb-${{ matrix.os }}
if-no-files-found: error
path: |
build-deb/*.deb
globalprotect-openconnect-*/.build/deb/*.deb
build-rpm:
needs:
@@ -96,30 +102,40 @@ jobs:
matrix:
os: ${{fromJson(needs.setup-matrix.outputs.matrix)}}
runs-on: ${{ matrix.os }}
container:
image: yuezk/gpdev:rpm-builder
credentials:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
steps:
- name: Prepare workspace
run: rm -rf build-rpm && mkdir build-rpm
- name: Download tarball
uses: actions/download-artifact@v3
with:
name: artifact-source
path: build-rpm
- name: Docker Login
run: echo ${{ secrets.DOCKER_HUB_TOKEN }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin
- name: Build RPM package in Docker
name: artifact-tarball
- name: Build RPM package
run: |
docker run --rm -v $(pwd)/build-rpm:/rpm yuezk/gpdev:rpm-builder
- name: Install RPM package in Docker
tar -xzf globalprotect-openconnect-*.tar.gz
cd globalprotect-openconnect-*/
make rpm BUILD_FE=0
- name: Install RPM package
run: |
docker run --rm -v $(pwd)/build-rpm:/rpm yuezk/gpdev:rpm-builder \
bash -c "sudo rpm -i /rpm/*.$(uname -m).rpm; gpclient --version; gpservice --version; gpauth --version; gpgui-helper --version;"
cd globalprotect-openconnect-*/
ls -l .build/rpm
sudo rpm -i ".build/rpm/globalprotect-openconnect*.$(uname -m).rpm"
gpclient --version
gpservice --version
gpauth --version
gpgui-helper --version
- name: Upload RPM package
uses: actions/upload-artifact@v3
with:
name: artifact-rpm-${{ matrix.os }}
if-no-files-found: error
path: |
build-rpm/*.rpm
globalprotect-openconnect-*/.build/rpm/*.rpm
build-pkgbuild:
needs:
@@ -129,30 +145,38 @@ jobs:
matrix:
os: ${{fromJson(needs.setup-matrix.outputs.matrix)}}
runs-on: ${{ matrix.os }}
container:
image: yuezk/gpdev:pkgbuild
credentials:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
steps:
- name: Prepare workspace
run: rm -rf build-pkgbuild && mkdir build-pkgbuild
- name: Download tarball
uses: actions/download-artifact@v3
with:
name: artifact-source
path: build-pkgbuild
- name: Docker Login
run: echo ${{ secrets.DOCKER_HUB_TOKEN }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin
- name: Build PKGBUILD package in Docker
name: artifact-tarball
- name: Build PKGBUILD package
run: |
docker run --rm -v $(pwd)/build-pkgbuild:/pkgbuild yuezk/gpdev:pkgbuild
- name: Install PKGBUILD package in Docker
tar -xzf globalprotect-openconnect-*.tar.gz
cd globalprotect-openconnect-*/
make pkgbuild BUILD_FE=0
- name: Install PKGBUILD package
run: |
docker run --rm -v $(pwd)/build-pkgbuild:/pkgbuild yuezk/gpdev:pkgbuild \
bash -c "sudo pacman -U --noconfirm /pkgbuild/*.pkg.tar.zst; gpclient --version; gpservice --version; gpauth --version; gpgui-helper --version;"
cd globalprotect-openconnect-*/
sudo pacman -U --noconfirm .build/pkgbuild/*.pkg.tar.zst
gpclient --version
gpservice --version
gpauth --version
gpgui-helper --version
- name: Upload PKGBUILD package
uses: actions/upload-artifact@v3
with:
name: artifact-pkgbuild-${{ matrix.os }}
if-no-files-found: error
path: |
build-pkgbuild/*.pkg.tar.zst
globalprotect-openconnect-*/.build/pkgbuild/*.pkg.tar.zst
build-binary:
needs:
@@ -162,33 +186,39 @@ jobs:
matrix:
os: ${{fromJson(needs.setup-matrix.outputs.matrix)}}
runs-on: ${{ matrix.os }}
container:
image: yuezk/gpdev:main
credentials:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
steps:
- name: Prepare workspace
run: rm -rf build-binary && mkdir build-binary
- name: Download tarball
uses: actions/download-artifact@v3
with:
name: artifact-source
path: build-binary
- name: Docker Login
run: echo ${{ secrets.DOCKER_HUB_TOKEN }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin
- name: Build binary in Docker
run: |
docker run --rm -v $(pwd)/build-binary:/binary yuezk/gpdev:binary-builder
- name: Install binary in Docker
run: |
cd build-binary
tar -xJf ./*.bin.tar.xz
docker run --rm -v $(pwd):/binary yuezk/gpdev:binary-builder \
bash -c "cd /binary/globalprotect-openconnect*/ && sudo make install && gpclient --version && gpservice --version && gpauth --version && gpgui-helper --version;"
- name: Upload binary
uses: actions/upload-artifact@v3
with:
name: artifact-binary-${{ matrix.os }}
if-no-files-found: error
path: |
build-binary/*.bin.tar.xz
build-binary/*.bin.tar.xz.sha256
- name: Download tarball
uses: actions/download-artifact@v3
with:
name: artifact-tarball
- name: Build binary using OFFLINE mode
run: |
tar -xzf globalprotect-openconnect-*.tar.gz
cd globalprotect-openconnect-*/
make binary OFFLINE=1
- name: Install binary
run: |
cd globalprotect-openconnect-*/
cd .build/binary/globalprotect-openconnect_*_$(uname -m)
sudo make install
gpclient --version
gpservice --version
gpauth --version
gpgui-helper --version
- name: Upload binary
uses: actions/upload-artifact@v3
with:
name: artifact-binary-${{ matrix.os }}
if-no-files-found: error
path: |
globalprotect-openconnect-*/.build/binary/*.bin.tar.xz*
build-gpgui:
needs:
@@ -197,47 +227,40 @@ jobs:
matrix:
os: ${{fromJson(needs.setup-matrix.outputs.matrix)}}
runs-on: ${{ matrix.os }}
container:
image: yuezk/gpdev:main
credentials:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
steps:
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Prepare workspace
run: rm -rf gpgui-source && mkdir gpgui-source
- name: Checkout GlobalProtect-openconnect
uses: actions/checkout@v3
with:
token: ${{ secrets.GH_PAT }}
repository: yuezk/GlobalProtect-openconnect
path: gpgui-source/gp
path: gp
- name: Checkout gpgui
uses: actions/checkout@v3
with:
token: ${{ secrets.GH_PAT }}
repository: yuezk/gpgui
path: gpgui-source/gpgui
- name: Tarball
path: gpgui
- name: Build gpgui
run: |
cd gpgui-source
tar -czf gpgui.tar.gz gpgui gp
- name: Docker Login
run: echo ${{ secrets.DOCKER_HUB_TOKEN }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin
- name: Build gpgui in Docker
run: |
docker run --rm -v $(pwd)/gpgui-source:/gpgui yuezk/gpdev:gpgui-builder
- name: Install gpgui in Docker
run: |
cd gpgui-source
tar -xJf *.bin.tar.xz
docker run --rm -v $(pwd):/gpgui yuezk/gpdev:gpgui-builder \
bash -c "cd /gpgui/gpgui_*/ && ./gpgui --version"
cd gpgui
make package
./target/release/gpgui --version
- name: Upload gpgui
uses: actions/upload-artifact@v3
with:
name: artifact-gpgui-${{ matrix.os }}
if-no-files-found: error
path: |
gpgui-source/*.bin.tar.xz
gpgui-source/*.bin.tar.xz.sha256
gpgui/.build/package/*.tar.xz*
gh-release:
if: startsWith(github.ref, 'refs/tags/')
@@ -250,17 +273,21 @@ jobs:
- build-gpgui
steps:
- name: Prepare workspace
run: rm -rf build-artifact && mkdir build-artifact
- name: Download all artifacts
uses: actions/download-artifact@v3
with:
path: build-artifact
- name: Create GH release
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GH_PAT }}
prerelease: ${{ contains(github.ref, 'latest') }}
fail_on_unmatched_files: true
files: |
build-artifact/artifact-*/*
- name: Download all artifacts
uses: actions/download-artifact@v3
with:
path: artifact
- name: Create GH release
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GH_PAT }}
prerelease: ${{ contains(github.ref, 'latest') }}
fail_on_unmatched_files: true
files: |
artifact/artifact-*/globalprotect-openconnect-*/.build/deb/*.deb
artifact/artifact-*/globalprotect-openconnect-*/.build/rpm/*.rpm
artifact/artifact-*/globalprotect-openconnect-*/.build/pkgbuild/*.pkg.tar.zst
artifact/artifact-*/globalprotect-openconnect-*/.build/binary/*.bin.tar.xz*
artifact/artifact-*/*.bin.tar.xz*
artifact/artifact-*/*.tar.gz

12
Cargo.lock generated
View File

@@ -1423,7 +1423,7 @@ dependencies = [
[[package]]
name = "gpapi"
version = "2.1.0"
version = "2.0.0"
dependencies = [
"anyhow",
"base64 0.21.5",
@@ -1455,7 +1455,7 @@ dependencies = [
[[package]]
name = "gpauth"
version = "2.1.0"
version = "2.0.0"
dependencies = [
"anyhow",
"clap",
@@ -1475,7 +1475,7 @@ dependencies = [
[[package]]
name = "gpclient"
version = "2.1.0"
version = "2.0.0"
dependencies = [
"anyhow",
"clap",
@@ -1496,7 +1496,7 @@ dependencies = [
[[package]]
name = "gpgui-helper"
version = "2.1.0"
version = "2.0.0"
dependencies = [
"anyhow",
"clap",
@@ -1514,7 +1514,7 @@ dependencies = [
[[package]]
name = "gpservice"
version = "2.1.0"
version = "2.0.0"
dependencies = [
"anyhow",
"axum",
@@ -2519,7 +2519,7 @@ dependencies = [
[[package]]
name = "openconnect"
version = "2.1.0"
version = "2.0.0"
dependencies = [
"cc",
"is_executable",

View File

@@ -5,7 +5,7 @@ members = ["crates/*", "apps/gpclient", "apps/gpservice", "apps/gpauth", "apps/g
[workspace.package]
rust-version = "1.70"
version = "2.1.0"
version = "2.0.0"
authors = ["Kevin Yue <k3vinyue@gmail.com>"]
homepage = "https://github.com/yuezk/GlobalProtect-openconnect"
edition = "2021"

View File

@@ -220,15 +220,15 @@ binary: clean-binary tarball
cp .build/tarball/${PKG}.tar.gz .build/binary
tar -xzf .build/binary/${PKG}.tar.gz -C .build/binary
mkdir -p .build/binary/$(PKG_NAME)_$(VERSION)/artifacts
mkdir -p .build/binary/$(PKG_NAME)_$(VERSION)_$(shell uname -m)/artifacts
make -C .build/binary/${PKG} build OFFLINE=$(OFFLINE) BUILD_FE=0
make -C .build/binary/${PKG} install DESTDIR=$(PWD)/.build/binary/$(PKG_NAME)_$(VERSION)/artifacts
make -C .build/binary/${PKG} build OFFLINE=$(OFFLINE)
make -C .build/binary/${PKG} install DESTDIR=$(PWD)/.build/binary/$(PKG_NAME)_$(VERSION)_$(shell uname -m)/artifacts
cp packaging/binary/Makefile.in .build/binary/$(PKG_NAME)_$(VERSION)/Makefile
cp packaging/binary/Makefile.in .build/binary/$(PKG_NAME)_$(VERSION)_$(shell uname -m)/Makefile
# Create a tarball for the binary package
tar -cJf .build/binary/$(PKG_NAME)_$(VERSION)_$(shell uname -m).bin.tar.xz -C .build/binary $(PKG_NAME)_$(VERSION)
tar -cJf .build/binary/$(PKG_NAME)_$(VERSION)_$(shell uname -m).bin.tar.xz -C .build/binary $(PKG_NAME)_$(VERSION)_$(shell uname -m)
# Generate sha256sum
cd .build/binary && sha256sum $(PKG_NAME)_$(VERSION)_$(shell uname -m).bin.tar.xz | cut -d' ' -f1 > $(PKG_NAME)_$(VERSION)_$(shell uname -m).bin.tar.xz.sha256

View File

@@ -1,11 +1,5 @@
# Changelog
## 2.1.0 - 2024-02-27
- Update distribution channel for `gpgui` to complaint with the GPL-3 license.
- Add `mtu` option.
- Retry auth if failed to obtain the auth cookie
## 2.0.0 - 2024-02-05
- Refactor using Tauri

View File

@@ -1,6 +1,6 @@
#!/usr/bin/make -f
export OFFLINE = @OFFLINE@ BUILD_FE=0
export OFFLINE = @OFFLINE@
%:
dh $@

View File

@@ -25,7 +25,7 @@ build() {
# Must unset the CFLAGS, otherwise the build fails
unset CFLAGS
make build OFFLINE=@OFFLINE@ BUILD_FE=0
make build OFFLINE=@OFFLINE@
}
package() {

View File

@@ -35,9 +35,7 @@ A GUI for GlobalProtect VPN, based on OpenConnect, supports the SSO authenticati
%setup
%build
# The injected RUSTFLAGS could fail the build
unset RUSTFLAGS
make build OFFLINE=@OFFLINE@ BUILD_FE=0
make build OFFLINE=@OFFLINE@
%install
%make_install