Skip to content

Commit

Permalink
build: stop adding unnecessary libraries (#731)
Browse files Browse the repository at this point in the history
Do not install libraries marked as keg-only in Homebrew [1].

[1] which means it is not symlinked into /usr/local because macOS
    already provides this software. Installing another version in
    parallel can cause conflicts and other issues.

See: #723.

Signed-off-by: Claudio André <[email protected]>
  • Loading branch information
claudioandre-br committed Feb 9, 2025
1 parent 5ae498c commit 830b8c2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
11 changes: 10 additions & 1 deletion deploy/Mac_ARM-Delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# | | | |
# |_| |_|
#
# Copyright (c) 2023-2024 Claudio André <dev at claudioandre.slmail.me>
# Copyright (c) 2023-2025 Claudio André <dev at claudioandre.slmail.me>
#
# This program comes with ABSOLUTELY NO WARRANTY; express or implied.
#
Expand Down Expand Up @@ -58,6 +58,15 @@ macOS_task:
.ci/ci_controller.sh "$TARGET_ARCH" TEST
package_script: |
otool -L run/john
if false; then
# Add the necessary Homebrew libraries to the final package
cp "/opt/homebrew/opt/libomp/lib/libomp.dylib" run/
cp "/opt/homebrew/opt/openssl@3/lib/libssl.3.dylib" run/
cp "/opt/homebrew/opt/openssl@3/lib/libcrypto.3.dylib" run/
cp "/opt/homebrew/opt/gmp/lib/libgmp.10.dylib" run/
fi
wget https://raw.githubusercontent.com/openwall/john-packages/main/scripts/clean_package.sh \
-O .ci/clean_package.sh
source .ci/clean_package.sh
Expand Down
2 changes: 1 addition & 1 deletion requirements.hash
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
8eaf3bbf120f883f688e100b9329ce9629a78f2c775239d7483efd937240f942 ./ci_controller.sh
3d10ec86d6253bdf899bbd7aa1c1f43533c3588dd2acd276301c68d6e70c0409 ./ci_controller.sh
e25fca925ee687bc46f5be6487c48ee977b697d05df97ccaca86d36ee8d213dc ./clean_package.sh
829470da958b5afce3b2023d66eeac9b41d493e9ad8c20fca25109e156312cf0 ./helper.sh
75de2f0f7c4c02dd16baab447492de281e90e8413f276f86d6a5faeec9dc9025 ./merge_procedures.sh
Expand Down
8 changes: 2 additions & 6 deletions scripts/ci_controller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# | | | |
# |_| |_|
#
# Copyright (c) 2019-2024 Claudio André <dev at claudioandre.slmail.me>
# Copyright (c) 2019-2025 Claudio André <dev at claudioandre.slmail.me>
#
# This program comes with ABSOLUTELY NO WARRANTY; express or implied.
#
Expand Down Expand Up @@ -45,7 +45,7 @@ fi

if [[ "$TARGET_ARCH" == *"macOS"* && $2 == "INFO" ]]; then
brew update
brew install openssl libpcap libomp gmp coreutils p7zip
brew install gmp coreutils p7zip
fi

# Download the required and missing file
Expand Down Expand Up @@ -88,10 +88,6 @@ if [[ "$2" == "BUILD" ]]; then
CFLAGS_gmp="-I/$MAC_LOCAL_PATH/gmp/include"
CFLAGS_omp="-I/$MAC_LOCAL_PATH/libomp/include"

if [[ $TARGET_ARCH == *"macOS ARM"* ]]; then
brew link openssl --force
fi

if [[ $TARGET_ARCH == *"macOS X86"* ]]; then
do_configure "$NO_OPENMP" --enable-simd=avx && do_build ../run/john-avx
do_configure "$REGULAR" --enable-simd=avx LDFLAGS="$LDFLAGS_omp" CPPFLAGS="-Xclang -fopenmp $CFLAGS_omp -DOMP_FALLBACK_BINARY=\"\\\"john-avx\\\"\" " && do_build ../run/john-avx-omp
Expand Down

1 comment on commit 830b8c2

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@check-spelling-bot Report

🔴 Please review

See the 📜action log or 📝 job summary for details.

Unrecognized words (3)

dylib
libcrypto
otool

To accept these unrecognized words as correct, you could run the following commands

... in a clone of the [email protected]:openwall/john-packages.git repository
on the fix/macos branch (ℹ️ how do I use this?):

curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/b365ac888c4713bf3a082b07b342feed0f3438fe/apply.pl' |
perl - 'https://github.com/openwall/john-packages/actions/runs/13226293644/attempts/1'
Available 📚 dictionaries could cover words (expected and unrecognized) not in the 📘 dictionary

This includes both expected items (290) from .github/actions/spelling/expect.txt and unrecognized words (3)

Dictionary Entries Covers Uniquely
cspell:node/dict/node.txt 891 24 6
cspell:aws/aws.txt 218 11 5
cspell:python/src/python/python-lib.txt 2417 16 4
cspell:filetypes/filetypes.txt 264 9 4
cspell:php/dict/php.txt 1689 15 3

Consider adding them (in .github/workflows/spelling.yml) in jobs:/spelling: for uses: check-spelling/check-spelling@b365ac888c4713bf3a082b07b342feed0f3438fe in its with:

      with:
        extra_dictionaries: |
          cspell:node/dict/node.txt
          cspell:aws/aws.txt
          cspell:python/src/python/python-lib.txt
          cspell:filetypes/filetypes.txt
          cspell:php/dict/php.txt

To stop checking additional dictionaries, add (in .github/workflows/spelling.yml) for uses: check-spelling/check-spelling@b365ac888c4713bf3a082b07b342feed0f3438fe in its with:

check_extra_dictionaries: ''

Please sign in to comment.