Skip to content

Commit

Permalink
VPN-6738: Statically link socksproxy to OpenSSL for Static Qt (#10060)
Browse files Browse the repository at this point in the history
* Statically link socksproxy to OpenSSL for Static Qt
* Set OPENSSL_USE_STATIC_LIBS in the debian/rules file instead
* Upgrade Linux source bundle job to Ubuntu-22.04
  • Loading branch information
oskirby authored Nov 25, 2024
1 parent 304e992 commit f4f7ecb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ concurrency:
jobs:
source-bundle:
name: Source Bundle
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@v4
Expand All @@ -35,9 +35,7 @@ jobs:
- name: Build source bundle
shell: bash
env:
GITREF: ${{github.ref}}
run: ./scripts/linux/script.sh --source --gitref ${GITREF}
run: ./scripts/linux/script.sh --source --gitref ${{github.ref}}

- name: Upload source bundle
uses: actions/upload-artifact@v4
Expand Down
11 changes: 10 additions & 1 deletion linux/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,22 @@ ifneq (ok,$(shell dpkg --compare-versions $(GOLANG_NATIVE_VERSION) ge 2:1.18 &&
export PATH := $(GODIR)/bin:$(PATH)
endif

# Check Qt features.
QT_INSTALL_HEADERS := $(shell pkg-config --variable=includedir Qt6Core || qmake6 -query QT_INSTALL_HEADERS || true)
qtfeature = $(shell test -d "$(QT_INSTALL_HEADERS)" && echo "$(1)" | gcc -I "$(QT_INSTALL_HEADERS)" -include QtCore/qconfig.h -E - | grep -e '^[[:alnum:]_-]')
ifeq (1,$(call qtfeature,QT_FEATURE_static))
ifeq (1,$(call qtfeature,QT_FEATURE_openssl_linked))
OPENSSL_BUILD_ARGS := -DOPENSSL_USE_STATIC_LIBS=ON
endif
endif

CMAKE_BUILD_DIR := build-$(DEB_HOST_MULTIARCH)

%:
dh $@ --with=systemd --buildsystem=cmake+ninja --builddirectory=$(CMAKE_BUILD_DIR) --warn-missing

override_dh_auto_configure:
dh_auto_configure -- -DWEBEXT_INSTALL_LIBDIR=/lib -DBUILD_ID=$(DEB_VERSION) -DBUILD_TESTS=OFF
dh_auto_configure -- -DWEBEXT_INSTALL_LIBDIR=/lib -DBUILD_ID=$(DEB_VERSION) -DBUILD_TESTS=OFF ${OPENSSL_BUILD_ARGS}

override_dh_auto_test:

Expand Down

0 comments on commit f4f7ecb

Please sign in to comment.