Skip to content

Commit 4554aef

Browse files
chore: create a snap package for i386
Signed-off-by: Claudio André <[email protected]>
1 parent cc977c8 commit 4554aef

File tree

3 files changed

+27
-13
lines changed

3 files changed

+27
-13
lines changed

.github/actions/spelling/expect.txt

+2
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ google
115115
GOST
116116
gpg
117117
GPUs
118+
gui
118119
hashicorp
119120
hccap
120121
hicolor
@@ -238,6 +239,7 @@ sonarsource
238239
sonoma
239240
squashfs
240241
ssd
242+
sse
241243
SSSE
242244
stdlib
243245
strderr

deploy/snap/build.sh

+12-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,18 @@ fi
7070
echo ""
7171
echo "---------------------------- BUILDING -----------------------------"
7272

73-
if [[ "$arch" == "x86_64" ]]; then
73+
if [[ "$arch" == "i686" ]]; then
74+
# CPU (OMP and extensions fallback)
75+
./configure $X86_NO_OPENMP --enable-simd=sse2 CPPFLAGS="-D_SNAP -D_BOXED" && do_build ../run/john-sse2
76+
./configure $X86_REGULAR --enable-simd=sse2 CPPFLAGS="-D_SNAP -D_BOXED -DOMP_FALLBACK -DOMP_FALLBACK_BINARY=\"\\\"john-sse2\\\"\"" && do_build ../run/john-sse2-omp
77+
./configure $X86_NO_OPENMP --enable-simd=avx CPPFLAGS="-D_SNAP -D_BOXED" && do_build ../run/john-avx
78+
./configure $X86_REGULAR --enable-simd=avx CPPFLAGS="-D_SNAP -D_BOXED -DOMP_FALLBACK -DOMP_FALLBACK_BINARY=\"\\\"john-avx\\\"\" -DCPU_FALLBACK -DCPU_FALLBACK_BINARY=\"\\\"john-sse2-omp\\\"\"" && do_build ../run/john-avx-omp
79+
./configure $X86_NO_OPENMP --enable-simd=avx2 CPPFLAGS="-D_SNAP -D_BOXED" && do_build ../run/john-avx2
80+
./configure $X86_REGULAR --enable-simd=avx2 CPPFLAGS="-D_SNAP -D_BOXED -DOMP_FALLBACK -DOMP_FALLBACK_BINARY=\"\\\"john-avx2\\\"\" -DCPU_FALLBACK -DCPU_FALLBACK_BINARY=\"\\\"john-avx-omp\\\"\"" && do_build ../run/john-avx2-omp
81+
BINARY="john-avx2-omp"
82+
OPENCL_SUPPORT="Yes"
83+
84+
elif [[ "$arch" == "x86_64" ]]; then
7485
# x86_64 CPU (OMP and SIMD fallback)
7586
do_configure "$X86_NO_OPENMP" --enable-simd=avx CPPFLAGS="-D_SNAP -D_BOXED" && do_build ../run/john-avx
7687
do_configure "$X86_REGULAR" --enable-simd=avx CPPFLAGS="-D_SNAP -D_BOXED -DOMP_FALLBACK_BINARY=\"\\\"john-avx\\\"\"" && do_build ../run/john-avx-omp

deploy/snap/snapcraft.yaml

+13-12
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,13 @@
2121
# More info at https://github.com/openwall/john-packages
2222
---
2323
name: john-the-ripper
24-
version: bleeding
24+
version: v2.0.0
2525

26-
base: core24
26+
base: core18
2727
confinement: strict
2828
grade: stable #TODO: [stable or devel] edit before release (BLEEDING_RELEASE)
2929

30-
assumes: [snapd2.65]
31-
adopt-info: john-the-ripper
30+
assumes: [snapd2.41]
3231

3332
license: GPL-2.0
3433
title: John the Ripper CE Auditing Tool
@@ -102,11 +101,14 @@ parts:
102101
cp "$SNAPCRAFT_STAGE"/build.sh .
103102
./build.sh
104103
105-
craftctl set version="$(cat version.txt)"
104+
# craftctl set version="$(cat version.txt)"
106105
107106
mkdir -p ../install/etc/bash_completion
108107
cp run/john.*_completion ../install/etc/bash_completion/
109108
109+
mkdir -p ../install/share/icons
110+
cp com.openwall.John.png ../install/share/icons/icon.png
111+
110112
build-packages:
111113
- build-essential
112114
- libssl-dev
@@ -119,10 +121,9 @@ parts:
119121
- curl
120122
- patch
121123
# OpenCL stuff
122-
- on amd64:
123-
- libpocl-dev
124-
- ocl-icd-opencl-dev
125-
- pocl-opencl-icd
124+
- libpocl-dev
125+
- ocl-icd-opencl-dev
126+
- pocl-opencl-icd
126127
- on arm64:
127128
- libpocl-dev
128129
- ocl-icd-opencl-dev
@@ -138,9 +139,8 @@ parts:
138139

139140
stage-packages:
140141
- libgomp1
141-
- libpcap0.8t64
142-
- on amd64:
143-
- ocl-icd-libopencl1
142+
- libpcap0.8
143+
- ocl-icd-libopencl1
144144
- on arm64:
145145
- ocl-icd-libopencl1
146146

@@ -156,3 +156,4 @@ parts:
156156
organize:
157157
../build/com.openwall.John.desktop: com.openwall.John.desktop
158158
../build/run-john.sh: bin/run-john.sh
159+
../build/com.openwall.John.png: icon.png

0 commit comments

Comments
 (0)