Skip to content

Commit

Permalink
snap - fix long-lasting issue with snap builds
Browse files Browse the repository at this point in the history
  • Loading branch information
astibal committed Jul 16, 2024
1 parent c1fb3f5 commit 7b3c05e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 25 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,10 @@ else()
message(">> libmicrohttpd DISABLED")
endif()

find_package(PythonLibs 3 REQUIRED)

if("${USE_PYTHON}" STREQUAL "Y")
find_package(PythonLibs 3 REQUIRED)

if(PYTHONLIBS_FOUND)
include_directories(${PYTHON_INCLUDE_DIRS})
message(">> python includes: " ${PYTHON_INCLUDE_DIRS})
Expand Down
35 changes: 12 additions & 23 deletions snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

name: smithproxy
version: 0.9.31
version: 0.9.32
summary: Fast and featured transparent TCP/UDP/TLS proxy
description: |
Smithproxy is fast transparent TCP/UDP/TLS (SSL) proxy. It's highly configurable
Expand Down Expand Up @@ -44,6 +44,7 @@ description: |
grade: stable # must be 'stable' to release into candidate/stable channels
confinement: strict # use 'strict' once you have the right plugs and slots
license: GPL-3.0 or later

base: core22

Expand Down Expand Up @@ -76,9 +77,6 @@ layout:
/usr/bin/smithproxy:
bind-file: $SNAP/usr/bin/smithproxy

/usr/bin/smithd:
bind-file: $SNAP/usr/bin/smithd

/var/log/smithproxy:
bind: $SNAP_DATA/log

Expand Down Expand Up @@ -115,12 +113,6 @@ apps:
- network-bind
- network-control

# smithd:
# command: usr/bin/smithd
# plugs:
# - network
# - network-bind

cli:
command: usr/bin/sx_cli
plugs:
Expand All @@ -131,15 +123,14 @@ apps:
environment:
PYTHONPATH: $SNAP/usr/lib/python3/dist-packages:$SNAP/lib/python3.10/site-packages
plugs:
- network # to guess hostname and IP

# passwd:
# command: usr/bin/sx_passwd
- network

# autoportalcert:
# command: usr/bin/sx_autoportalcert
# plugs:
# - network # to guess hostname and IP
autoportalcert:
command: usr/bin/sx_autoportalcert
environment:
PYTHONPATH: $SNAP/usr/lib/python3/dist-packages:$SNAP/lib/python3.10/site-packages
plugs:
- network

certinfo-ca:
command: usr/bin/sx_certinfo_ca
Expand All @@ -157,7 +148,6 @@ apps:
plugs:
- network


net:
command: usr/bin/sx_network
plugs:
Expand All @@ -175,13 +165,10 @@ parts:

source: https://github.com/astibal/smithproxy
source-type: git
source-branch: release-0.9.31
source-branch: master
build-environment:
- PYTHONPATH: "$SNAPCRAFT_PART_INSTALL/usr/lib/python3/dist-packages"

# source: .
# source-type: local

build-packages:
- g++
- make
Expand All @@ -196,6 +183,7 @@ parts:
- libxslt1-dev
- libxmlsec1-dev
- nlohmann-json3-dev
- libcurl4-openssl-dev

- python3-distutils
- telnet
Expand All @@ -205,6 +193,7 @@ parts:
- iptables
- libconfig++9v5
- libmicrohttpd12
- libcurl4
- telnet
- wget
- python3
Expand Down
6 changes: 5 additions & 1 deletion tools/linux-build.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#!/usr/bin/env bash

mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release && make install -j `nproc`
if [ -d build ]; then
rm -r build/
fi

mkdir build/ && cd build/ && cmake .. -DCMAKE_BUILD_TYPE=Release && make install -j "$(nproc)"

0 comments on commit 7b3c05e

Please sign in to comment.