Skip to content

Commit 147aea6

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

File tree

3 files changed

+64
-50
lines changed

3 files changed

+64
-50
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

+50-49
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
@@ -50,42 +49,42 @@ apps:
5049
john-the-ripper:
5150
command: bin/john
5251
plugs: [home, removable-media]
53-
opencl:
54-
command: bin/john
55-
plugs: [home, removable-media]
56-
dmg2john:
57-
command: bin/dmg2john
58-
plugs: [home, removable-media]
59-
hccap2john:
60-
command: bin/hccap2john
61-
plugs: [home, removable-media]
62-
racf2john:
63-
command: bin/racf2john
64-
plugs: [home, removable-media]
65-
vncpcap2john:
66-
command: bin/vncpcap2john
67-
plugs: [home, removable-media]
68-
zip2john:
69-
command: bin/zip2john
70-
plugs: [home, removable-media]
71-
gpg2john:
72-
command: bin/gpg2john
73-
plugs: [home, removable-media]
74-
keepass2john:
75-
command: bin/keepass2john
76-
plugs: [home, removable-media]
77-
putty2john:
78-
command: bin/putty2john
79-
plugs: [home, removable-media]
80-
rar2john:
81-
command: bin/rar2john
82-
plugs: [home, removable-media]
83-
uaf2john:
84-
command: bin/uaf2john
85-
plugs: [home, removable-media]
86-
wpapcap2john:
87-
command: bin/wpapcap2john
88-
plugs: [home, removable-media]
52+
# opencl:
53+
# command: bin/john
54+
# plugs: [home, removable-media]
55+
# dmg2john:
56+
# command: bin/dmg2john
57+
# plugs: [home, removable-media]
58+
# hccap2john:
59+
# command: bin/hccap2john
60+
# plugs: [home, removable-media]
61+
# racf2john:
62+
# command: bin/racf2john
63+
# plugs: [home, removable-media]
64+
# vncpcap2john:
65+
# command: bin/vncpcap2john
66+
# plugs: [home, removable-media]
67+
# zip2john:
68+
# command: bin/zip2john
69+
# plugs: [home, removable-media]
70+
# gpg2john:
71+
# command: bin/gpg2john
72+
# plugs: [home, removable-media]
73+
# keepass2john:
74+
# command: bin/keepass2john
75+
# plugs: [home, removable-media]
76+
# putty2john:
77+
# command: bin/putty2john
78+
# plugs: [home, removable-media]
79+
# rar2john:
80+
# command: bin/rar2john
81+
# plugs: [home, removable-media]
82+
# uaf2john:
83+
# command: bin/uaf2john
84+
# plugs: [home, removable-media]
85+
# wpapcap2john:
86+
# command: bin/wpapcap2john
87+
# plugs: [home, removable-media]
8988
info:
9089
command: bin/run-john.sh
9190
desktop: com.openwall.John.desktop
@@ -100,12 +99,16 @@ parts:
10099

101100
override-build: |
102101
cp "$SNAPCRAFT_STAGE"/build.sh .
103-
./build.sh
102+
echo "" > run/john; chmod +x run/john #./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/
108+
ls -lR ..
109+
mkdir -p ../install/meta/gui
110+
echo "" > ../install/meta/gui/icon.png
111+
cp ../build/com.openwall.John.png ../install/meta/gui/icon.png || true
109112
110113
build-packages:
111114
- build-essential
@@ -119,10 +122,9 @@ parts:
119122
- curl
120123
- patch
121124
# OpenCL stuff
122-
- on amd64:
123-
- libpocl-dev
124-
- ocl-icd-opencl-dev
125-
- pocl-opencl-icd
125+
- libpocl-dev
126+
- ocl-icd-opencl-dev
127+
- pocl-opencl-icd
126128
- on arm64:
127129
- libpocl-dev
128130
- ocl-icd-opencl-dev
@@ -138,9 +140,8 @@ parts:
138140

139141
stage-packages:
140142
- libgomp1
141-
- libpcap0.8t64
142-
- on amd64:
143-
- ocl-icd-libopencl1
143+
- libpcap0.8
144+
- ocl-icd-libopencl1
144145
- on arm64:
145146
- ocl-icd-libopencl1
146147

0 commit comments

Comments
 (0)