diff options
| author | Carl Hetherington <cth@carlh.net> | 2019-12-03 21:47:27 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2019-12-04 22:49:40 +0100 |
| commit | d386392e79d59f0c5647b0d778348b72d7cd7069 (patch) | |
| tree | f44c52ffbee819924114592e00c91b73b09347c8 | |
| parent | b2743153dde1355d13d9c3ab3a7e85cd76ea61f7 (diff) | |
Package a patched openssl which creates certificates with
a validity period starting a week before now; fixes #1422.
| -rw-r--r-- | cscript | 10 | ||||
| -rwxr-xr-x | debian/rules | 1 | ||||
| -rw-r--r-- | platform/osx/make_dmg.sh | 5 | ||||
| -rw-r--r-- | platform/windows/wscript | 1 | ||||
| -rw-r--r-- | src/lib/cross.cc | 14 |
5 files changed, 27 insertions, 4 deletions
@@ -271,6 +271,7 @@ def make_spec(filename, version, target, options, requires=None): print('%{_bindir}/dcpomatic2_kdm_cli', file=f) print('%{_bindir}/dcpomatic2_player', file=f) print('%{_bindir}/dcpomatic2_playlist', file=f) + print('%{_bindir}/dcpomatic2_openssl', file=f) if options['variant'] == 'swaroop-studio': print('%{_bindir}/dcpomatic2_ecinema', file=f) print('%{_bindir}/dcpomatic2_uuid', file=f) @@ -312,13 +313,13 @@ def make_spec(filename, version, target, options, requires=None): print('%build', file=f) print('cd dcpomatic-%s' % version, file=f) print('export PKG_CONFIG_PATH=%s/lib/pkgconfig:%s/lib64/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig' % (target.directory, target.directory), file=f) - print('CXXFLAGS="-I%s/include" LDFLAGS="-L%s/lib" ./waf configure --prefix=%%{buildroot}/usr --install-prefix=/usr %s' % (target.directory, target.directory, configure_options(target, options)), file=f) print('./waf', file=f) print('%install', file=f) print('cd dcpomatic-%s' % version, file=f) print('./waf install', file=f) + print('/bin/cp %s/src/openssl/apps/openssl %%{buildroot}/usr/bin/dcpomatic2_openssl' % target.directory, file=f) print('', file=f) print('%post', file=f) print('/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :', file=f) @@ -350,6 +351,11 @@ def dependencies(target): deps.append(('libdcp', None)) deps.append(('libsub', None)) deps.append(('rtaudio', 'carl')) + # We get our OpenSSL libraries from the environment, but we + # also need a patched openssl binary to make certificates. + # This dependency is to get that binary, which is added into + # the appropriate place later + deps.append(('openssl', 'carl')) return deps @@ -546,6 +552,7 @@ def package_debian(target, cpu, version, options): target.set('CDIST_LINKFLAGS', target.get('LINKFLAGS')) target.set('CDIST_CXXFLAGS', target.get('CXXFLAGS')) target.set('CDIST_PKG_CONFIG_PATH', target.get('PKG_CONFIG_PATH')) + target.set('CDIST_DIRECTORY', target.directory) target.set('CDIST_CONFIGURE', '"' + configure_options(target, options) + '"') if target.debug: @@ -596,6 +603,7 @@ def make_appimage(target, nice_name, internal_name, version): nice_filename = nice_name.replace(' ', '_') os.makedirs('build/%s.AppDir/usr/bin' % nice_filename) target.command('cp %s/bin/%s build/%s.AppDir/usr/bin' % (target.directory, internal_name, nice_filename)) + target.command('cp %s/src/openssl/apps/openssl build/%s.AppDir/usr/bin/dcpomatic2_openssl' % (target.directory, nice_filename)) with open('build/%s.AppDir/AppRun' % nice_filename, 'w') as f: print('#!/bin/bash', file=f) print('export APPDIR="$(dirname "$(readlink -f "$0")")"', file=f) diff --git a/debian/rules b/debian/rules index c84a78453..6a8c156f1 100755 --- a/debian/rules +++ b/debian/rules @@ -37,6 +37,7 @@ override_dh_auto_install: cp -a /usr/share/locale/pl/LC_MESSAGES/wxstd.mo debian/dcpomatic/usr/share/locale/pl/LC_MESSAGES/dcpomatic2-wxstd.mo mkdir -p debian/dcpomatic/usr/share/locale/ru/LC_MESSAGES/ cp -a /usr/share/locale/ru/LC_MESSAGES/wxstd.mo debian/dcpomatic/usr/share/locale/ru/LC_MESSAGES/dcpomatic2-wxstd.mo + cp -a $(CDIST_DIRECTORY)/src/openssl/apps/openssl debian/dcpomatic/usr/bin/dcpomatic2_openssl .PHONY: override_dh_strip override_dh_strip: diff --git a/platform/osx/make_dmg.sh b/platform/osx/make_dmg.sh index ab5dd3934..95e8f8db0 100644 --- a/platform/osx/make_dmg.sh +++ b/platform/osx/make_dmg.sh @@ -383,6 +383,7 @@ copy $ROOT src/dcpomatic/build/src/tools/dcpomatic2 "$approot/MacOS" copy $ROOT src/dcpomatic/build/src/tools/dcpomatic2_cli "$approot/MacOS" copy $ROOT src/dcpomatic/build/src/tools/dcpomatic2_create "$approot/MacOS" copy $ROOT bin/ffprobe "$approot/MacOS" +copy $ROOT src/openssl/apps/openssl "$approot/MacOS" cp $prefix/src/dcpomatic/build/platform/osx/dcpomatic2.Info.plist "$approot/Info.plist" rl=("$approot/MacOS/dcpomatic2" "$approot/MacOS/dcpomatic2_cli" "$approot/MacOS/dcpomatic2_create" "$approot/MacOS/ffprobe" "$approot/Frameworks/"*.dylib) relink "${rl[@]}" @@ -392,6 +393,7 @@ make_dmg "$appdir" "DCP-o-matic" com.dcpomatic setup "DCP-o-matic 2 KDM Creator.app" copy $ROOT src/dcpomatic/build/src/tools/dcpomatic2_kdm "$approot/MacOS" copy $ROOT src/dcpomatic/build/src/tools/dcpomatic2_kdm_cli "$approot/MacOS" +copy $ROOT src/openssl/apps/openssl "$approot/MacOS" cp $prefix/src/dcpomatic/build/platform/osx/dcpomatic2_kdm.Info.plist "$approot/Info.plist" rl=("$approot/MacOS/dcpomatic2_kdm" "$approot/MacOS/dcpomatic2_kdm_cli" "$approot/Frameworks/"*.dylib) relink "${rl[@]}" @@ -401,6 +403,7 @@ make_dmg "$appdir" "DCP-o-matic KDM Creator" com.dcpomatic.kdm setup "DCP-o-matic 2 Encode Server.app" copy $ROOT src/dcpomatic/build/src/tools/dcpomatic2_server "$approot/MacOS" copy $ROOT src/dcpomatic/build/src/tools/dcpomatic2_server_cli "$approot/MacOS" +copy $ROOT src/openssl/apps/openssl "$approot/MacOS" cp $prefix/src/dcpomatic/build/platform/osx/dcpomatic2_server.Info.plist "$approot/Info.plist" rl=("$approot/MacOS/dcpomatic2_server" "$approot/MacOS/dcpomatic2_server_cli" "$approot/Frameworks/"*.dylib) relink "${rl[@]}" @@ -409,6 +412,7 @@ make_dmg "$appdir" "DCP-o-matic Encode Server" com.dcpomatic.server # DCP-o-matic Batch Converter setup "DCP-o-matic 2 Batch converter.app" copy $ROOT src/dcpomatic/build/src/tools/dcpomatic2_batch "$approot/MacOS" +copy $ROOT src/openssl/apps/openssl "$approot/MacOS" cp $prefix/src/dcpomatic/build/platform/osx/dcpomatic2_batch.Info.plist "$approot/Info.plist" rl=("$approot/MacOS/dcpomatic2_batch" "$approot/Frameworks/"*.dylib) relink "${rl[@]}" @@ -417,6 +421,7 @@ make_dmg "$appdir" "DCP-o-matic Batch Converter" com.dcpomatic.batch # DCP-o-matic Player setup "DCP-o-matic 2 Player.app" copy $ROOT src/dcpomatic/build/src/tools/dcpomatic2_player "$approot/MacOS" +copy $ROOT src/openssl/apps/openssl "$approot/MacOS" cp $prefix/src/dcpomatic/build/platform/osx/dcpomatic2_player.Info.plist "$approot/Info.plist" rl=("$approot/MacOS/dcpomatic2_player" "$approot/Frameworks/"*.dylib) relink "${rl[@]}" diff --git a/platform/windows/wscript b/platform/windows/wscript index 933c4078f..b5dde858d 100644 --- a/platform/windows/wscript +++ b/platform/windows/wscript @@ -194,6 +194,7 @@ File "%cdist_deps%/bin/dcp-1.0.dll" File "%cdist_deps%/bin/cxml-0.dll" File "%cdist_deps%/bin/sub-1.0.dll" File "%cdist_deps%/bin/ffprobe.exe" +File "%cdist_deps%/src/openssl/apps/openssl.exe" """, file=f) if windows_version == 'xp': diff --git a/src/lib/cross.cc b/src/lib/cross.cc index dcd4ddfd8..8d82f7a51 100644 --- a/src/lib/cross.cc +++ b/src/lib/cross.cc @@ -300,9 +300,17 @@ openssl_path () boost::filesystem::path path = dir; path /= "openssl.exe"; return path; -#else - /* We assume that it's on the path for Linux and OS X */ - return "openssl"; +#endif + +#ifdef DCPOMATIC_OSX + boost::filesystem::path path = app_contents(); + path /= "MacOS"; + path /= "openssl"; + return path; +#endif + +#ifdef DCPOMATIC_LINUX + return "dcpomatic2_openssl"; #endif } |
