Skip to content

Commit

Permalink
Bug 40755: Use openssl-1.0.2 for building libdmg-hfsplus outside cont…
Browse files Browse the repository at this point in the history
…ainers

libdmg-hfsplus fails to build with openssl1.1:
planetbeing/libdmg-hfsplus#14
  • Loading branch information
boklm authored and Richard Pospesel committed Jan 31, 2023
1 parent 72ff4a2 commit 38b371a
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 2 deletions.
5 changes: 4 additions & 1 deletion projects/libdmg-hfsplus/build
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@ distdir=/var/tmp/dist/[% project %]
mkdir -p /var/tmp/dist
tar -C /var/tmp/dist -xf [% c('input_files_by_name/cmake') %]
tar -C /var/tmp/dist -xf [% c('input_files_by_name/ninja') %]
[% IF c("container/global_disable") -%]
tar -C /var/tmp/dist -xf [% c('input_files_by_name/openssl-1.0.2') %]
[% END -%]
export PATH="/var/tmp/dist/ninja:/var/tmp/dist/cmake/bin:$PATH"

mkdir /var/tmp/build
tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.gz
cd /var/tmp/build/[% project %]-[% c('version') %]
patch -p1 < "$rootdir/libdmg.patch"
cmake . -GNinja -DCMAKE_BUILD_TYPE=Release
cmake . -GNinja -DCMAKE_BUILD_TYPE=Release [% c("var/cmake_opts") %]
ninja -j[% c("num_procs") %] -v

mkdir $distdir
Expand Down
9 changes: 9 additions & 0 deletions projects/libdmg-hfsplus/config
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,19 @@ var:
- build-essential
- zlib1g-dev
- libbz2-dev
targets:
no_containers:
var:
cmake_opts: |
-DOPENSSL_USE_STATIC_LIBS=1 \
-DOPENSSL_ROOT_DIR=/var/tmp/dist/openssl
input_files:
- project: container-image
- name: cmake
project: cmake
- name: ninja
project: ninja
- filename: libdmg.patch
- name: openssl-1.0.2
project: openssl-1.0.2
enable: '[% c("container/global_disable") %]'
15 changes: 15 additions & 0 deletions projects/openssl-1.0.2/build
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash
[% c("var/set_default_env") -%]
distdir=/var/tmp/dist/openssl
mkdir -p /var/tmp/build
tar -C /var/tmp/build -xf openssl-[% c('version') %].tar.gz
cd /var/tmp/build/openssl-[% c('version') %]
export SOURCE_DATE_EPOCH='[% c("timestamp") %]'
./Configure --prefix="$distdir" -shared enable-ec_nistp_64_gcc_128 linux-x86_64
make -j[% c("num_procs") %]
make -j[% c("num_procs") %] install
cd /var/tmp/dist
[% c('tar', {
tar_src => [ 'openssl' ],
tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'),
}) %]
11 changes: 11 additions & 0 deletions projects/openssl-1.0.2/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# vim: filetype=yaml sw=2
#
# We need openssl-1.0.2 for building libdmg-hfsplus:
# https://github.com/planetbeing/libdmg-hfsplus/issues/14
#
version: 1.0.2u
filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.gz'

input_files:
- URL: 'https://www.openssl.org/source/openssl-[% c("version") %].tar.gz'
sha256sum: ecd0c6ffb493dd06707d38b14bb4d8c2288bb7033735606569d8f90f89669d16
2 changes: 1 addition & 1 deletion tools/signing/gatekeeper-bundling.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ test -f $faketime_path || \
exit_error "$faketime_path is missing"
test -d $macos_stapled_dir || \
exit_error "The stapled macos zip files should be placed in directory $macos_stapled_dir"
libdmg_file="$script_dir/../../out/libdmg-hfsplus/libdmg-hfsplus-2ee327795680-aa3810.tar.gz"
libdmg_file="$script_dir/../../out/libdmg-hfsplus/libdmg-hfsplus-2ee327795680-555a7e.tar.gz"
test -f "$libdmg_file" || \
exit_error "$libdmg_file is missing." \
"You can build it with:" \
Expand Down

0 comments on commit 38b371a

Please sign in to comment.