Skip to content

Commit efbfbe8

Browse files
committed
upgrade gpauth
1 parent 32cb582 commit efbfbe8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+4526
-6576
lines changed

.devcontainer/Dockerfile

Lines changed: 38 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:18.04
1+
FROM ubuntu:22.04
22

33
ARG USERNAME=vscode
44
ARG USER_UID=1000
@@ -7,8 +7,9 @@ ARG USER_GID=$USER_UID
77
ENV RUSTUP_HOME=/usr/local/rustup \
88
CARGO_HOME=/usr/local/cargo \
99
PATH=/usr/local/cargo/bin:$PATH \
10-
RUST_VERSION=1.75.0
10+
RUST_VERSION=1.80.0
1111

12+
# Install common dependencies
1213
RUN set -eux; \
1314
apt-get update; \
1415
apt-get install -y --no-install-recommends \
@@ -18,34 +19,50 @@ RUN set -eux; \
1819
gnupg \
1920
git \
2021
less \
21-
software-properties-common \
22-
# Tauri dependencies
23-
libwebkit2gtk-4.0-dev build-essential wget libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev; \
24-
# Install openconnect
25-
add-apt-repository ppa:yuezk/globalprotect-openconnect; \
26-
apt-get update; \
27-
apt-get install -y openconnect libopenconnect-dev; \
28-
# Create a non-root user
22+
software-properties-common
23+
24+
# Create a non-root user
25+
RUN set -eux; \
2926
groupadd --gid $USER_GID $USERNAME; \
3027
useradd --uid $USER_UID --gid $USER_GID -m $USERNAME; \
3128
echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME; \
32-
chmod 0440 /etc/sudoers.d/$USERNAME; \
33-
# Install Node.js
34-
mkdir -p /etc/apt/keyrings; \
35-
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg; \
36-
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list; \
37-
apt-get update; \
38-
apt-get install -y nodejs; \
39-
corepack enable; \
40-
# Install diff-so-fancy
41-
npm install -g diff-so-fancy; \
42-
# Install Rust
29+
chmod 0440 /etc/sudoers.d/$USERNAME
30+
31+
# Install Rust
32+
RUN set -eux; \
4333
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain $RUST_VERSION; \
4434
chown -R $USERNAME:$USERNAME $RUSTUP_HOME $CARGO_HOME; \
4535
rustup --version; \
4636
cargo --version; \
4737
rustc --version
4838

39+
# Install Node.js
40+
RUN set -eux; \
41+
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -; \
42+
apt-get install -y nodejs; \
43+
corepack enable; \
44+
# Install diff-so-fancy
45+
npm install -g diff-so-fancy
46+
47+
# Install openconnect
48+
RUN set -eux; \
49+
add-apt-repository ppa:yuezk/globalprotect-openconnect; \
50+
apt-get update; \
51+
apt-get install -y openconnect libopenconnect-dev
52+
53+
# Tauri dependencies
54+
RUN set -eux; \
55+
apt-get install -y \
56+
libwebkit2gtk-4.1-dev \
57+
build-essential \
58+
curl \
59+
wget \
60+
file \
61+
libxdo-dev \
62+
libssl-dev \
63+
libayatana-appindicator3-dev \
64+
librsvg2-dev
65+
4966
USER $USERNAME
5067

5168
# Install Oh My Zsh

.github/workflows/build.yaml

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ jobs:
2424
- name: Set up matrix
2525
id: set-matrix
2626
run: |
27-
if [[ "${{ github.ref }}" == "refs/tags/"* ]]; then
27+
# Set the matrix to include arm64 if the ref is a tag or is the dev branch
28+
if [[ "${{ github.ref }}" == "refs/tags/"* || "${{ github.ref }}" == "refs/heads/dev" ]]; then
2829
echo 'matrix=[{"runner": "ubuntu-latest", "arch": "amd64"}, {"runner": "arm64", "arch": "arm64"}]' >> $GITHUB_OUTPUT
2930
else
3031
echo 'matrix=[{"runner": "ubuntu-latest", "arch": "amd64"}]' >> $GITHUB_OUTPUT
@@ -34,13 +35,13 @@ jobs:
3435
runs-on: ubuntu-latest
3536
needs: [setup-matrix]
3637
steps:
37-
- uses: pnpm/action-setup@v2
38+
- uses: pnpm/action-setup@v4
3839
with:
39-
version: 8
40+
version: 9
4041
- name: Prepare workspace
4142
run: rm -rf source && mkdir source
4243
- name: Checkout GlobalProtect-openconnect
43-
uses: actions/checkout@v3
44+
uses: actions/checkout@v4
4445
with:
4546
token: ${{ secrets.GH_PAT }}
4647
repository: yuezk/GlobalProtect-openconnect
@@ -55,7 +56,7 @@ jobs:
5556
fi
5657
make tarball
5758
- name: Upload tarball
58-
uses: actions/upload-artifact@v3
59+
uses: actions/upload-artifact@v4
5960
with:
6061
name: artifact-source
6162
if-no-files-found: error
@@ -79,7 +80,7 @@ jobs:
7980
rm -rf build-gp-${{ matrix.package }}
8081
mkdir -p build-gp-${{ matrix.package }}
8182
- name: Download tarball
82-
uses: actions/download-artifact@v3
83+
uses: actions/download-artifact@v4
8384
with:
8485
name: artifact-source
8586
path: build-gp-${{ matrix.package }}
@@ -89,16 +90,16 @@ jobs:
8990
run: |
9091
docker run --rm \
9192
-v $(pwd)/build-gp-${{ matrix.package }}:/${{ matrix.package }} \
92-
yuezk/gpdev:${{ matrix.package }}-builder
93+
yuezk/gpdev:${{ matrix.package }}-builder-tauri2
9394
- name: Install ${{ matrix.package }} package in Docker
9495
run: |
9596
docker run --rm \
9697
-e GPGUI_INSTALLED=0 \
9798
-v $(pwd)/build-gp-${{ matrix.package }}:/${{ matrix.package }} \
98-
yuezk/gpdev:${{ matrix.package }}-builder \
99+
yuezk/gpdev:${{ matrix.package }}-builder-tauri2 \
99100
bash install.sh
100101
- name: Upload ${{ matrix.package }} package
101-
uses: actions/upload-artifact@v3
102+
uses: actions/upload-artifact@v4
102103
with:
103104
name: artifact-gp-${{ matrix.package }}-${{ matrix.os.arch }}
104105
if-no-files-found: error
@@ -114,20 +115,20 @@ jobs:
114115
runs-on: ${{ matrix.os.runner }}
115116
name: build-gpgui (${{ matrix.os.arch }})
116117
steps:
117-
- uses: pnpm/action-setup@v2
118+
- uses: pnpm/action-setup@v4
118119
with:
119-
version: 8
120+
version: 9
120121
- name: Prepare workspace
121122
run: rm -rf gpgui-source && mkdir gpgui-source
122123
- name: Checkout GlobalProtect-openconnect
123-
uses: actions/checkout@v3
124+
uses: actions/checkout@v4
124125
with:
125126
token: ${{ secrets.GH_PAT }}
126127
repository: yuezk/GlobalProtect-openconnect
127128
ref: ${{ github.ref }}
128129
path: gpgui-source/gp
129130
- name: Checkout gpgui@${{ github.ref_name }}
130-
uses: actions/checkout@v3
131+
uses: actions/checkout@v4
131132
with:
132133
token: ${{ secrets.GH_PAT }}
133134
repository: yuezk/gpgui
@@ -141,15 +142,15 @@ jobs:
141142
run: echo ${{ secrets.DOCKER_HUB_TOKEN }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin
142143
- name: Build gpgui in Docker
143144
run: |
144-
docker run --rm -v $(pwd)/gpgui-source:/gpgui yuezk/gpdev:gpgui-builder
145+
docker run --rm -v $(pwd)/gpgui-source:/gpgui yuezk/gpdev:gpgui-builder-tauri2
145146
- name: Install gpgui in Docker
146147
run: |
147148
cd gpgui-source
148149
tar -xJf *.bin.tar.xz
149-
docker run --rm -v $(pwd):/gpgui yuezk/gpdev:gpgui-builder \
150+
docker run --rm -v $(pwd):/gpgui yuezk/gpdev:gpgui-builder-tauri2 \
150151
bash -c "cd /gpgui/gpgui_*/ && ./gpgui --version"
151152
- name: Upload gpgui
152-
uses: actions/upload-artifact@v3
153+
uses: actions/upload-artifact@v4
153154
with:
154155
name: artifact-gpgui-${{ matrix.os.arch }}
155156
if-no-files-found: error
@@ -170,15 +171,15 @@ jobs:
170171
run: rm -rf gh-release && mkdir gh-release
171172

172173
- name: Checkout GlobalProtect-openconnect
173-
uses: actions/checkout@v3
174+
uses: actions/checkout@v4
174175
with:
175176
token: ${{ secrets.GH_PAT }}
176177
repository: yuezk/GlobalProtect-openconnect
177178
ref: ${{ github.ref }}
178179
path: gh-release/gp
179180

180181
- name: Download all artifacts
181-
uses: actions/download-artifact@v3
182+
uses: actions/download-artifact@v4
182183
with:
183184
path: gh-release/gp/.build/artifacts
184185

.github/workflows/publish.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ jobs:
4747
if: ${{ inputs.ppa }}
4848
runs-on: ubuntu-latest
4949
steps:
50-
- uses: pnpm/action-setup@v2
50+
- uses: pnpm/action-setup@v4
5151
with:
52-
version: 8
52+
version: 9
5353
- name: Prepare workspace
5454
run: rm -rf publish-ppa && mkdir publish-ppa
5555
- name: Download ${{ inputs.tag }} source code
@@ -71,12 +71,12 @@ jobs:
7171
7272
# Prepare the debian directory with custom files
7373
mkdir -p .build/debian
74-
sed 's/@RUST@/rust-all(>=1.70)/g' packaging/deb/control.in > .build/debian/control
74+
sed 's/@RUST@/rust-all(>=1.80)/g' packaging/deb/control.in > .build/debian/control
7575
sed 's/@OFFLINE@/1/g' packaging/deb/rules.in > .build/debian/rules
7676
cp packaging/deb/postrm .build/debian/postrm
7777
7878
- name: Publish to PPA
79-
uses: yuezk/publish-ppa-package@v2
79+
uses: yuezk/publish-ppa-package@gp
8080
with:
8181
repository: "yuezk/globalprotect-openconnect"
8282
gpg_private_key: ${{ secrets.PPA_GPG_PRIVATE_KEY }}
@@ -85,5 +85,7 @@ jobs:
8585
debian_dir: publish-ppa/globalprotect-openconnect-*/.build/debian
8686
deb_email: "[email protected]"
8787
deb_fullname: "Kevin Yue"
88-
extra_ppa: "yuezk/globalprotect-openconnect liushuyu-011/rust-bpo-1.75"
88+
extra_ppa: "yuezk/globalprotect-openconnect liushuyu-011/rust-updates-1.80"
89+
# Ubuntu 18.04 and 20.04 are excluded because tauri2 no longer supports them
90+
excluded_series: "bionic focal"
8991
revision: ${{ inputs.revision }}

.github/workflows/release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ jobs:
122122
bash install.sh
123123
124124
- name: Upload ${{ matrix.package }} package
125-
uses: actions/upload-artifact@v3
125+
uses: actions/upload-artifact@v4
126126
with:
127127
name: artifact-${{ matrix.os }}-${{ matrix.package }}
128128
if-no-files-found: error
@@ -138,7 +138,7 @@ jobs:
138138
- name: Prepare workspace
139139
run: rm -rf gh-release && mkdir gh-release
140140
- name: Download artifact
141-
uses: actions/download-artifact@v3
141+
uses: actions/download-artifact@v4
142142
with:
143143
path: gh-release
144144
- name: Update release

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@
88
.cargo
99
.build
1010
SNAPSHOT
11+
12+
# Tauri generated files
13+
gen

0 commit comments

Comments
 (0)