From f3d490a1448fcdfa546a41b4c795d4c1daf4f7d5 Mon Sep 17 00:00:00 2001 From: Benjamin Fleischer Date: Tue, 13 Jun 2017 22:11:02 +0200 Subject: [PATCH 01/10] Update copyright year in license --- LICENSE.txt | 11 +++++------ support | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/LICENSE.txt b/LICENSE.txt index cfd415d6..5b92d4ef 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,7 +1,6 @@ -FUSE for macOS is a software developed by the osxfuse project and is covered -under the following BSD-style license: +FUSE for macOS is covered under the following BSD-style license: - Copyright (c) 2011-2016 Benjamin Fleischer + Copyright (c) 2011-2017 Benjamin Fleischer Copyright (c) 2011-2012 Erik Larsson All rights reserved. @@ -13,9 +12,9 @@ under the following BSD-style license: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - 3. Neither the name of osxfuse nor the names of its contributors may be used - to endorse or promote products derived from this software without specific - prior written permission. + 3. Neither the name of the copyright holder nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/support b/support index ab7b7818..914ab765 160000 --- a/support +++ b/support @@ -1 +1 @@ -Subproject commit ab7b7818617f516690db67d6fc7a35c9cae5021f +Subproject commit 914ab76581b6c198383be488c99ce2b14b36e549 From 07a14507dd016bfa7692fb05a0936d278ff49c42 Mon Sep 17 00:00:00 2001 From: Benjamin Fleischer Date: Thu, 15 Jun 2017 18:15:53 +0200 Subject: [PATCH 02/10] Move volume icon to file system bundle FUSE will fall back to the default icon in case no volume icon was specified, when mounting the volume. In previous releases the fallback was only available to file systems linking against the FUSE framework. --- build.d/targets/framework.sh | 5 ----- framework | 2 +- fuse | 2 +- support | 2 +- 4 files changed, 3 insertions(+), 8 deletions(-) diff --git a/build.d/targets/framework.sh b/build.d/targets/framework.sh index 13108549..c96b20b4 100755 --- a/build.d/targets/framework.sh +++ b/build.d/targets/framework.sh @@ -73,11 +73,6 @@ function framework_build framework_path="`osxfuse_find "${BUILD_TARGET_BUILD_DIRECTORY}"/*.framework`" common_die_on_error "Failed to locate framework" - # Copy default volume icon to framework - - /bin/cp "${BUILD_SOURCE_DIRECTORY}/support/Volume.icns" "${framework_path}/Resources/DefaultVolumeIcon.icns" 1>&3 2>&4 - common_die_on_error "Failed to copy default volume icon to framework" - # Sign framework build_target_codesign "${framework_path}" diff --git a/framework b/framework index ae7d4de1..77897c16 160000 --- a/framework +++ b/framework @@ -1 +1 @@ -Subproject commit ae7d4de10641d5996eaf1943f9bb1483149ef21c +Subproject commit 77897c16de4e4a5955e4d5afd663bb17a8898eba diff --git a/fuse b/fuse index b6d17a58..a2d9503e 160000 --- a/fuse +++ b/fuse @@ -1 +1 @@ -Subproject commit b6d17a5857aeb482f67587a96305fe3ee00cbdbe +Subproject commit a2d9503ede30c0429f16a5e783c41e82f555c490 diff --git a/support b/support index 914ab765..bca321dd 160000 --- a/support +++ b/support @@ -1 +1 @@ -Subproject commit 914ab76581b6c198383be488c99ce2b14b36e549 +Subproject commit bca321dda762c74e2c253fddc6d710dcbc9de35d From a9a5d0da4c12261f219c2373ad22f76a040d9ebe Mon Sep 17 00:00:00 2001 From: Benjamin Fleischer Date: Thu, 15 Jun 2017 20:08:16 +0200 Subject: [PATCH 03/10] (support) Alert if kernel extension is blocked --- support | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support b/support index bca321dd..1bca21af 160000 --- a/support +++ b/support @@ -1 +1 @@ -Subproject commit bca321dda762c74e2c253fddc6d710dcbc9de35d +Subproject commit 1bca21afa33dccaab668afe5cac4154519104bc0 From fab5cbe1fefb17ffe8ae2d72914d911bde0ffd31 Mon Sep 17 00:00:00 2001 From: Benjamin Fleischer Date: Fri, 16 Jun 2017 18:02:11 +0200 Subject: [PATCH 04/10] (support) Drop set-user-ID before mounting volume --- support | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support b/support index 1bca21af..a6c1937e 160000 --- a/support +++ b/support @@ -1 +1 @@ -Subproject commit 1bca21afa33dccaab668afe5cac4154519104bc0 +Subproject commit a6c1937eefd67cac40d5e5e8ea4a3cea3160d004 From 23706ec18083220d67027ceb3906ccd73ebca6a0 Mon Sep 17 00:00:00 2001 From: Benjamin Fleischer Date: Tue, 20 Jun 2017 23:58:38 +0200 Subject: [PATCH 05/10] (fuse) Close device handle for unmounted volumes --- fuse | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fuse b/fuse index a2d9503e..b1af00aa 160000 --- a/fuse +++ b/fuse @@ -1 +1 @@ -Subproject commit a2d9503ede30c0429f16a5e783c41e82f555c490 +Subproject commit b1af00aafa5e0941d5b2bfcfb828c3b273b9e7a1 From fdc20d9d00d50d4b85ec40deca9f931500d32168 Mon Sep 17 00:00:00 2001 From: Benjamin Fleischer Date: Sun, 2 Jul 2017 10:38:23 +0200 Subject: [PATCH 06/10] Add "PostInstall" installer plugin --- build.d/extensions/osxfuse.sh | 16 ++- build.d/targets/distribution.sh | 184 +++++++++++++++++++-------- build.d/targets/framework.sh | 4 +- build.d/targets/fsbundle.sh | 4 +- build.d/targets/installer_plugins.sh | 76 +++++++++++ build.d/targets/kext.sh | 4 +- build.d/targets/library.sh | 4 +- build.d/targets/macfuse_framework.sh | 4 +- build.d/targets/macfuse_library.sh | 4 +- build.d/targets/release.sh | 4 +- support | 2 +- 11 files changed, 231 insertions(+), 75 deletions(-) create mode 100755 build.d/targets/installer_plugins.sh diff --git a/build.d/extensions/osxfuse.sh b/build.d/extensions/osxfuse.sh index 200fc950..936f708f 100755 --- a/build.d/extensions/osxfuse.sh +++ b/build.d/extensions/osxfuse.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (c) 2011-2015 Benjamin Fleischer +# Copyright (c) 2011-2017 Benjamin Fleischer # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -119,7 +119,7 @@ function osxfuse_build_component_package # Create component property list - local component_plist_path="${package_target_path%.*}.plist" + local component_plist_path="${name}.plist" build_target_pkgbuild --analyze --root "${root}" "${component_plist_path}" common_die_on_error "Failed to create component property list" @@ -159,11 +159,12 @@ function osxfuse_build_component_package function osxfuse_build_distribution_package { local -a options=() - common_getopt options "p:,package-path:,c:,component-package:,d:,deployment-target:" "${@}" + common_getopt options "package-path:,c:,component-package:,plugin-path:,d:,deployment-target:" "${@}" common_die_on_error "${options[@]}" set -- "${options[@]}" + local plugin_path="" local package_path="" local -a component_packages=() local -a deployment_targets=() @@ -183,6 +184,10 @@ function osxfuse_build_distribution_package component_packages+=("${2}") shift 2 ;; + --plugin-path) + plugin_path="${2}" + shift 2 + ;; -d|--deployment-target) deployment_targets+=("${2}") shift 2 @@ -332,8 +337,9 @@ EOF EOF - build_target_productbuild --resources "${OSXFUSE_PACKAGE_DIRECTORY}/Distribution/Resources" \ - --distribution Distribution \ + build_target_productbuild --distribution Distribution \ --package-path "${package_path}" \ + --resources "${OSXFUSE_PACKAGE_DIRECTORY}/Distribution/Resources" \ + --plugins "${plugin_path}" \ "${package_target_path}" } diff --git a/build.d/targets/distribution.sh b/build.d/targets/distribution.sh index 6e5a6364..1eced5a9 100755 --- a/build.d/targets/distribution.sh +++ b/build.d/targets/distribution.sh @@ -29,43 +29,45 @@ declare -ra BUILD_TARGET_ACTIONS=("build" "clean" "install") +declare BUILD_TARGET_SOURCE_DIRECTORY="${BUILD_SOURCE_DIRECTORY}/support" declare -a DISTRIBUTION_KEXT_TASKS=() +declare DISTRIBUTION_INSTALLER_PLUGINS_SDK="" declare -i DISTRIBUTION_MACFUSE=0 function distribution_create_stage_core { - local stage_directory="${1}" - common_assert "[[ -n `string_escape "${stage_directory}"` ]]" - - /bin/mkdir -p "${stage_directory}" \ - "${stage_directory}/Library/Filesystems" \ - "${stage_directory}/Library/Frameworks" \ - "${stage_directory}/usr/local/include" \ - "${stage_directory}/usr/local/lib" \ - "${stage_directory}/usr/local/lib/pkgconfig" 1>&3 2>&4 + local root_directory="${1}" + common_assert "[[ -n `string_escape "${root_directory}"` ]]" + + /bin/mkdir -p "${root_directory}" \ + "${root_directory}/Library/Filesystems" \ + "${root_directory}/Library/Frameworks" \ + "${root_directory}/usr/local/include" \ + "${root_directory}/usr/local/lib" \ + "${root_directory}/usr/local/lib/pkgconfig" 1>&3 2>&4 } function distribution_create_stage_prefpane { - local stage_directory="${1}" - common_assert "[[ -n `string_escape "${stage_directory}"` ]]" + local root_directory="${1}" + common_assert "[[ -n `string_escape "${root_directory}"` ]]" - /bin/mkdir -p "${stage_directory}" \ - "${stage_directory}/Library/PreferencePanes" 1>&3 2>&4 + /bin/mkdir -p "${root_directory}" \ + "${root_directory}/Library/PreferencePanes" 1>&3 2>&4 } function distribution_create_stage_macfuse { - local stage_directory="${1}" - common_assert "[[ -n `string_escape "${stage_directory}"` ]]" - - /bin/mkdir -p "${stage_directory}" \ - "${stage_directory}/Library/Frameworks" \ - "${stage_directory}/usr/local/include" \ - "${stage_directory}/usr/local/lib" \ - "${stage_directory}/usr/local/lib/pkgconfig" 1>&3 2>&4 + local root_directory="${1}" + common_assert "[[ -n `string_escape "${root_directory}"` ]]" + + /bin/mkdir -p "${root_directory}" \ + "${root_directory}/Library/Frameworks" \ + "${root_directory}/usr/local/include" \ + "${root_directory}/usr/local/lib" \ + "${root_directory}/usr/local/lib/pkgconfig" 1>&3 2>&4 } function distribution_build @@ -77,6 +79,10 @@ function distribution_build DISTRIBUTION_KEXT_TASKS+=("${2}") return 2 ;; + --installer-plugins-sdk) + DISTRIBUTION_INSTALLER_PLUGINS_SDK="${2}" + return 2 + ;; --macfuse) DISTRIBUTION_MACFUSE=1 return 1 @@ -88,7 +94,7 @@ function distribution_build esac } - build_target_getopt -p build -s "kext:,macfuse,no-macfuse" -h distribution_build_getopt_handler -- "${@}" + build_target_getopt -p build -s "kext:,installer-plugins-sdk:,macfuse,no-macfuse" -h distribution_build_getopt_handler -- "${@}" unset distribution_build_getopt_handler if [[ ${#DISTRIBUTION_KEXT_TASKS[@]} -eq 0 ]] @@ -96,7 +102,32 @@ function distribution_build DISTRIBUTION_KEXT_TASKS+=("${BUILD_TARGET_OPTION_DEPLOYMENT_TARGET}") fi + if [[ -z "${DISTRIBUTION_INSTALLER_PLUGINS_SDK}" ]] + then + version_compare "${BUILD_TARGET_OPTION_SDK}" "10.6" + if (( ${?} != 1 )) + then + DISTRIBUTION_INSTALLER_PLUGINS_SDK="${BUILD_TARGET_OPTION_SDK}" + else + for sdk in "${DEFAULT_SDK_SUPPORTED[@]}" + do + version_compare "${sdk}" "10.6" + if (( ${?} != 1 )) + then + DISTRIBUTION_INSTALLER_PLUGINS_SDK="${sdk}" + break + fi + done + + if [[ -z "${DISTRIBUTION_INSTALLER_PLUGINS_SDK}" ]] + then + common_die "No supported macOS SDK for building installer plugins installed" + fi + fi + fi + common_log_variable DISTRIBUTION_KEXT_TASKS + common_log_variable DISTRIBUTION_INSTALLER_PLUGINS_SDK common_log_variable DISTRIBUTION_MACFUSE common_log "Clean target" @@ -124,23 +155,39 @@ function distribution_build "--code-sign-identity=${BUILD_TARGET_OPTION_CODE_SIGN_IDENTITY}" "--product-sign-identity=${BUILD_TARGET_OPTION_PRODUCT_SIGN_IDENTITY}") - local stage_directory_core="${BUILD_TARGET_BUILD_DIRECTORY}/Core" - local stage_directory_prefpane="${BUILD_TARGET_BUILD_DIRECTORY}/PrefPane" + local -a installer_plugins_build_options=("-s${DISTRIBUTION_INSTALLER_PLUGINS_SDK}" + "-d${BUILD_TARGET_OPTION_DEPLOYMENT_TARGET}" + "-c${BUILD_TARGET_OPTION_BUILD_CONFIGURATION}" + "${BUILD_TARGET_OPTION_BUILD_SETTINGS[@]/#/-b}" + "${BUILD_TARGET_OPTION_MACROS[@]/#/-m}") + local debug_directory="${BUILD_TARGET_BUILD_DIRECTORY}/Debug" - local packages_directory="${BUILD_TARGET_BUILD_DIRECTORY}/Packages" - /bin/mkdir -p "${BUILD_TARGET_BUILD_DIRECTORY}" 1>&3 2>&4 - common_die_on_error "Failed to create build directory" + local core_directory="${BUILD_TARGET_BUILD_DIRECTORY}/Core" + local prefpane_directory="${BUILD_TARGET_BUILD_DIRECTORY}/PrefPane" - distribution_create_stage_core "${stage_directory_core}" - common_die_on_error "Failed to create core stage" + local distribution_directory="${BUILD_TARGET_BUILD_DIRECTORY}/Distribution" + local plugins_directory="${distribution_directory}/Plugins" + local packages_directory="${distribution_directory}/Packages" - distribution_create_stage_prefpane "${stage_directory_prefpane}" - common_die_on_error "Failed to create preference pane stage" + /bin/mkdir -p "${BUILD_TARGET_BUILD_DIRECTORY}" 1>&3 2>&4 + common_die_on_error "Failed to create build directory" /bin/mkdir -p "${debug_directory}" 1>&3 2>&4 common_die_on_error "Failed to create debug directory" + distribution_create_stage_core "${core_directory}" + common_die_on_error "Failed to create core staging directory" + + distribution_create_stage_prefpane "${prefpane_directory}" + common_die_on_error "Failed to create preference pane staging directory" + + /bin/mkdir -p "${distribution_directory}" 1>&3 2>&4 + common_die_on_error "Failed to create distribution directory" + + /bin/mkdir -p "${plugins_directory}" 1>&3 2>&4 + common_die_on_error "Failed to create plugins directory" + /bin/mkdir -p "${packages_directory}" 1>&3 2>&4 common_die_on_error "Failed to create packages directory" @@ -151,13 +198,13 @@ function distribution_build build_target_invoke fsbundle build "${default_build_options[@]}" "${DISTRIBUTION_KEXT_TASKS[@]/#/--kext=}" common_die_on_error "Failed to build file system bundle" - build_target_invoke fsbundle install --debug="${debug_directory}" -- "${stage_directory_core}/Library/Filesystems" + build_target_invoke fsbundle install --debug="${debug_directory}" -- "${core_directory}/Library/Filesystems" common_die_on_error "Failed to install file system bundle" # Locate file system bundle local fsbundle_path="" - fsbundle_path="`osxfuse_find "${stage_directory_core}/Library/Filesystems"/*.fs`" + fsbundle_path="`osxfuse_find "${core_directory}/Library/Filesystems"/*.fs`" common_die_on_error "Failed to locate file system bundle" # Set loader SUID bit @@ -198,29 +245,35 @@ function distribution_build build_target_invoke library build "${library_build_options[@]}" common_die_on_error "Failed to build library" - build_target_invoke library install --debug="${debug_directory}" -- "${stage_directory_core}" + build_target_invoke library install --debug="${debug_directory}" -- "${core_directory}" common_die_on_error "Failed to install library" - /bin/ln -s "libosxfuse.2.dylib" "${stage_directory_core}/usr/local/lib/libosxfuse_i64.2.dylib" && \ - /bin/ln -s "libosxfuse.dylib" "${stage_directory_core}/usr/local/lib/libosxfuse_i64.dylib" && \ - /bin/ln -s "libosxfuse.la" "${stage_directory_core}/usr/local/lib/libosxfuse_i64.la" && \ - /bin/ln -s "osxfuse.pc" "${stage_directory_core}/usr/local/lib/pkgconfig/fuse.pc" + /bin/ln -s "libosxfuse.2.dylib" "${core_directory}/usr/local/lib/libosxfuse_i64.2.dylib" && \ + /bin/ln -s "libosxfuse.dylib" "${core_directory}/usr/local/lib/libosxfuse_i64.dylib" && \ + /bin/ln -s "libosxfuse.la" "${core_directory}/usr/local/lib/libosxfuse_i64.la" && \ + /bin/ln -s "osxfuse.pc" "${core_directory}/usr/local/lib/pkgconfig/fuse.pc" common_die_on_error "Failed to create legacy library links" # Build framework - build_target_invoke framework build "${default_build_options[@]}" --library-prefix="${stage_directory_core}/usr/local" + build_target_invoke framework build "${default_build_options[@]}" --library-prefix="${core_directory}/usr/local" common_die_on_error "Failed to build framework" - build_target_invoke framework install --debug="${debug_directory}" -- "${stage_directory_core}/Library/Frameworks" + build_target_invoke framework install --debug="${debug_directory}" -- "${core_directory}/Library/Frameworks" common_die_on_error "Failed to install framework" # Build core component package common_log -v 3 "Build core component package" - osxfuse_build_component_package -n Core -r "${stage_directory_core}" "${packages_directory}/Core.pkg" + pushd "${BUILD_TARGET_BUILD_DIRECTORY}" > /dev/null 2>&1 + common_die_on_error "Build directory '${BUILD_TARGET_BUILD_DIRECTORY}' does not exist" + + osxfuse_build_component_package -n Core -r "${core_directory}" "${packages_directory}/Core.pkg" common_die_on_error "Failed to build core package" + + popd > /dev/null 2>&1 + component_packages+=("${packages_directory}/Core.pkg") # Build preference pane @@ -228,54 +281,74 @@ function distribution_build build_target_invoke prefpane build "${default_build_options[@]}" common_die_on_error "Failed to build preference pane" - build_target_invoke prefpane install -- "${stage_directory_prefpane}/Library/PreferencePanes" + build_target_invoke prefpane install -- "${prefpane_directory}/Library/PreferencePanes" common_die_on_error "Failed to install preference pane" # Build preference pane component package common_log -v 3 "Build preference pane component package" - osxfuse_build_component_package -n PrefPane -r "${stage_directory_prefpane}" "${packages_directory}/PrefPane.pkg" + pushd "${BUILD_TARGET_BUILD_DIRECTORY}" > /dev/null 2>&1 + common_die_on_error "Build directory '${BUILD_TARGET_BUILD_DIRECTORY}' does not exist" + + osxfuse_build_component_package -n PrefPane -r "${prefpane_directory}" "${packages_directory}/PrefPane.pkg" common_die_on_error "Failed to build preference pane package" + + popd > /dev/null 2>&1 + component_packages+=("${packages_directory}/PrefPane.pkg") # MacFUSE if (( DISTRIBUTION_MACFUSE != 0 )) then - local stage_directory_macfuse="${BUILD_TARGET_BUILD_DIRECTORY}/MacFUSE" + local macfuse_directory="${BUILD_TARGET_BUILD_DIRECTORY}/MacFUSE" - distribution_create_stage_macfuse "${stage_directory_macfuse}" - common_die_on_error "Failed to create MacFUSE stage" + distribution_create_stage_macfuse "${macfuse_directory}" + common_die_on_error "Failed to create MacFUSE staging directory" # Build library build_target_invoke macfuse_library build "${library_build_options[@]}" common_die_on_error "Failed to build MacFUSE library" - build_target_invoke macfuse_library install --debug="${debug_directory}" -- "${stage_directory_macfuse}" + build_target_invoke macfuse_library install --debug="${debug_directory}" -- "${macfuse_directory}" common_die_on_error "Failed to install MacFUSE library" - /bin/ln -s "libfuse.dylib" "${stage_directory_macfuse}/usr/local/lib/libfuse.0.dylib" && \ + /bin/ln -s "libfuse.dylib" "${macfuse_directory}/usr/local/lib/libfuse.0.dylib" && \ common_die_on_error "Failed to create MacFUSE legacy library links" # Build framework - build_target_invoke macfuse_framework build "${default_build_options[@]}" --library-prefix="${stage_directory_macfuse}/usr/local" + build_target_invoke macfuse_framework build "${default_build_options[@]}" --library-prefix="${macfuse_directory}/usr/local" common_die_on_error "Failed to build MacFUSE framework" - build_target_invoke macfuse_framework install --debug="${debug_directory}" -- "${stage_directory_macfuse}/Library/Frameworks" + build_target_invoke macfuse_framework install --debug="${debug_directory}" -- "${macfuse_directory}/Library/Frameworks" common_die_on_error "Failed to install MacFUSE framework" # Build MacFUSE component package common_log -v 3 "Build MacFUSE component package" - osxfuse_build_component_package -n MacFUSE -r "${stage_directory_macfuse}" "${packages_directory}/MacFUSE.pkg" + pushd "${BUILD_TARGET_BUILD_DIRECTORY}" > /dev/null 2>&1 + common_die_on_error "Build directory '${BUILD_TARGET_BUILD_DIRECTORY}' does not exist" + + osxfuse_build_component_package -n MacFUSE -r "${macfuse_directory}" "${packages_directory}/MacFUSE.pkg" common_die_on_error "Failed to build MacFUSE package" + + popd > /dev/null 2>&1 + component_packages+=("${packages_directory}/MacFUSE.pkg") fi + # Build installer plugins + + build_target_invoke installer_plugins build "${installer_plugins_build_options[@]}" + common_die_on_error "Failed to build installer plugins" + + build_target_invoke installer_plugins install --debug="${debug_directory}" -- "${plugins_directory}" + common_die_on_error "Failed to install preference pane" + # Build distribution package common_log -v 3 "Build distribution package" @@ -293,11 +366,12 @@ function distribution_build fi done - pushd "${BUILD_TARGET_BUILD_DIRECTORY}" > /dev/null 2>&1 - common_die_on_error "Build directory '${BUILD_TARGET_BUILD_DIRECTORY}' does not exist" + pushd "${distribution_directory}" > /dev/null 2>&1 + common_die_on_error "Distribution directory '${distribution_directory}' does not exist" - osxfuse_build_distribution_package -p "${packages_directory}" \ + osxfuse_build_distribution_package --package-path="${packages_directory}" \ "${component_packages[@]/#/-c}" \ + --plugin-path="${plugins_directory}" \ "${macos_versions_supported[@]/#/-d}" \ "${distribution_package_path}" common_die_on_error "Failed to build distribution package" @@ -328,6 +402,6 @@ function distribution_install if [[ -n "${BUILD_TARGET_OPTION_DEBUG_DIRECTORY}" ]] then build_target_install "${BUILD_TARGET_BUILD_DIRECTORY}/Debug/" "${BUILD_TARGET_OPTION_DEBUG_DIRECTORY}" - common_die_on_error "Failed to Install debug files" + common_die_on_error "Failed to install debug files" fi } diff --git a/build.d/targets/framework.sh b/build.d/targets/framework.sh index c96b20b4..6418357e 100755 --- a/build.d/targets/framework.sh +++ b/build.d/targets/framework.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (c) 2011-2014 Benjamin Fleischer +# Copyright (c) 2011-2017 Benjamin Fleischer # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -106,6 +106,6 @@ function framework_install common_die_on_error "Failed to locate framework debug information" build_target_install "${framework_dsym_source_path}" "${BUILD_TARGET_OPTION_DEBUG_DIRECTORY}" - common_die_on_error "Failed to Install debug files" + common_die_on_error "Failed to install debug files" fi } diff --git a/build.d/targets/fsbundle.sh b/build.d/targets/fsbundle.sh index 71abacd0..aaf2af42 100755 --- a/build.d/targets/fsbundle.sh +++ b/build.d/targets/fsbundle.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (c) 2011-2016 Benjamin Fleischer +# Copyright (c) 2011-2017 Benjamin Fleischer # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -156,6 +156,6 @@ function fsbundle_install if [[ -n "${BUILD_TARGET_OPTION_DEBUG_DIRECTORY}" ]] then build_target_install "${BUILD_TARGET_BUILD_DIRECTORY}/Debug/" "${BUILD_TARGET_OPTION_DEBUG_DIRECTORY}" - common_die_on_error "Failed to Install debug files" + common_die_on_error "Failed to install debug files" fi } diff --git a/build.d/targets/installer_plugins.sh b/build.d/targets/installer_plugins.sh new file mode 100755 index 00000000..f3621c78 --- /dev/null +++ b/build.d/targets/installer_plugins.sh @@ -0,0 +1,76 @@ +#!/bin/bash + +# Copyright (c) 2011-2017 Benjamin Fleischer +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# 3. Neither the name of osxfuse nor the names of its contributors may be used +# to endorse or promote products derived from this software without specific +# prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + + +declare -ra BUILD_TARGET_ACTIONS=("build" "clean" "install") +declare BUILD_TARGET_SOURCE_DIRECTORY="${BUILD_SOURCE_DIRECTORY}/support/Packages/Distribution/Plugins" + + +function installer_plugins_build +{ + build_target_getopt -p build -- "${@}" + + common_log "Clean target" + build_target_invoke "${BUILD_TARGET_NAME}" clean + common_die_on_error "Failed to clean target" + + common_log "Build target for macOS ${BUILD_TARGET_OPTION_DEPLOYMENT_TARGET}" + build_target_xcodebuild -project PostInstall.xcodeproj -target PostInstall clean build + common_die_on_error "Failed to build target" +} + +function installer_plugins_install +{ + local -a arguments=() + build_target_getopt -p install -o arguments -- "${@}" + + local target_directory="${arguments[0]}" + if [[ ! -d "${target_directory}" ]] + then + common_die "Target directory '${target_directory}' does not exist" + fi + + common_log "Install target" + + local postinstall_source_path="${BUILD_TARGET_BUILD_DIRECTORY}/PostInstall.bundle" + + build_target_install "${postinstall_source_path}" "${target_directory}" + common_die_on_error "Failed to install target" + + build_target_install "${BUILD_TARGET_SOURCE_DIRECTORY}/InstallerSections.plist" "${target_directory}" + common_die_on_error "Failed to install target" + + if [[ -n "${BUILD_TARGET_OPTION_DEBUG_DIRECTORY}" ]] + then + local postinstall_dsym_source_path="${BUILD_TARGET_BUILD_DIRECTORY}/PostInstall.bundle.dSYM" + + build_target_install "${postinstall_dsym_source_path}" "${BUILD_TARGET_OPTION_DEBUG_DIRECTORY}" + common_die_on_error "Failed to install debug files" + fi +} diff --git a/build.d/targets/kext.sh b/build.d/targets/kext.sh index bc192e24..b2a05dbb 100755 --- a/build.d/targets/kext.sh +++ b/build.d/targets/kext.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (c) 2011-2014 Benjamin Fleischer +# Copyright (c) 2011-2017 Benjamin Fleischer # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -71,6 +71,6 @@ function kext_install if [[ -n "${BUILD_TARGET_OPTION_DEBUG_DIRECTORY}" ]] then build_target_install "${BUILD_TARGET_BUILD_DIRECTORY}/Debug/" "${BUILD_TARGET_OPTION_DEBUG_DIRECTORY}" - common_die_on_error "Failed to Install debug files" + common_die_on_error "Failed to install debug files" fi } diff --git a/build.d/targets/library.sh b/build.d/targets/library.sh index 44b98fb6..7febe82b 100755 --- a/build.d/targets/library.sh +++ b/build.d/targets/library.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (c) 2011-2015 Benjamin Fleischer +# Copyright (c) 2011-2017 Benjamin Fleischer # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -126,6 +126,6 @@ function library_install if [[ -n "${BUILD_TARGET_OPTION_DEBUG_DIRECTORY}" ]] then build_target_install "${debug_directory}/" "${BUILD_TARGET_OPTION_DEBUG_DIRECTORY}" - common_die_on_error "Failed to Install debug files" + common_die_on_error "Failed to install debug files" fi } diff --git a/build.d/targets/macfuse_framework.sh b/build.d/targets/macfuse_framework.sh index 81bf036f..03e4bb9d 100755 --- a/build.d/targets/macfuse_framework.sh +++ b/build.d/targets/macfuse_framework.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (c) 2011-2014 Benjamin Fleischer +# Copyright (c) 2011-2017 Benjamin Fleischer # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -90,6 +90,6 @@ function macfuse_framework_install common_die_on_error "Failed to locate framework debug information" build_target_install "${framework_dsym_source_path}" "${BUILD_TARGET_OPTION_DEBUG_DIRECTORY}" - common_die_on_error "Failed to Install debug files" + common_die_on_error "Failed to install debug files" fi } diff --git a/build.d/targets/macfuse_library.sh b/build.d/targets/macfuse_library.sh index 56c4ceb6..276cd6d3 100755 --- a/build.d/targets/macfuse_library.sh +++ b/build.d/targets/macfuse_library.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (c) 2011-2015 Benjamin Fleischer +# Copyright (c) 2011-2017 Benjamin Fleischer # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -126,6 +126,6 @@ function macfuse_library_install if [[ -n "${BUILD_TARGET_OPTION_DEBUG_DIRECTORY}" ]] then build_target_install "${debug_directory}/" "${BUILD_TARGET_OPTION_DEBUG_DIRECTORY}" - common_die_on_error "Failed to Install debug files" + common_die_on_error "Failed to install debug files" fi } diff --git a/build.d/targets/release.sh b/build.d/targets/release.sh index 2b351e60..e8eb671d 100755 --- a/build.d/targets/release.sh +++ b/build.d/targets/release.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (c) 2011-2016 Benjamin Fleischer +# Copyright (c) 2011-2017 Benjamin Fleischer # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -84,7 +84,7 @@ function release_build # Build distribution package - build_target_invoke distribution build -s 10.5 -d 10.5 -c Release \ + build_target_invoke distribution build -s 10.5 -d 10.5 --installer-plugins-sdk=10.6 -c Release \ --kext=10.5 --kext=10.6 --kext="10.7->10.6" --kext="10.8->10.6" --kext=10.9 --kext="10.10->10.9" --kext="10.11->10.9" --kext="10.12->10.9" --kext="10.13->10.9" \ --macfuse \ --code-sign-identity="${BUILD_TARGET_OPTION_CODE_SIGN_IDENTITY}" \ diff --git a/support b/support index a6c1937e..9c2fa7bf 160000 --- a/support +++ b/support @@ -1 +1 @@ -Subproject commit a6c1937eefd67cac40d5e5e8ea4a3cea3160d004 +Subproject commit 9c2fa7bf4447be16d4bb717c20d46eb3bb9e9962 From 86c4c97c610058979f8829c88c2fea6ba704e3a8 Mon Sep 17 00:00:00 2001 From: Benjamin Fleischer Date: Mon, 3 Jul 2017 00:06:52 +0200 Subject: [PATCH 07/10] (support) Reword blocked system extension alert --- support | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support b/support index 9c2fa7bf..68c018ee 160000 --- a/support +++ b/support @@ -1 +1 @@ -Subproject commit 9c2fa7bf4447be16d4bb717c20d46eb3bb9e9962 +Subproject commit 68c018eee65d74081d168f23c0f9fd2783cb06eb From 80cb9842cdd00252dcead898736beddb75c7e1ec Mon Sep 17 00:00:00 2001 From: Benjamin Fleischer Date: Wed, 5 Jul 2017 07:56:42 +0200 Subject: [PATCH 08/10] Fix unmount of not-yet-alive volume --- fuse | 2 +- macfuse_fuse | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fuse b/fuse index b1af00aa..bbfbd252 160000 --- a/fuse +++ b/fuse @@ -1 +1 @@ -Subproject commit b1af00aafa5e0941d5b2bfcfb828c3b273b9e7a1 +Subproject commit bbfbd25271c4dc07bfc7d3e6de188efe9eb222f3 diff --git a/macfuse_fuse b/macfuse_fuse index 5b551819..046ea217 160000 --- a/macfuse_fuse +++ b/macfuse_fuse @@ -1 +1 @@ -Subproject commit 5b55181934626667df6ebde6671cb17308079e5c +Subproject commit 046ea217869fcd1967987df1d9be76a227709e99 From d61b2c88f7b2a6fc2a14ec8239988c7dfd29278b Mon Sep 17 00:00:00 2001 From: Benjamin Fleischer Date: Wed, 5 Jul 2017 21:12:13 +0200 Subject: [PATCH 09/10] (prefpane) Add retina version of FUSE logo --- prefpane | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prefpane b/prefpane index 87df3f11..8a65eb24 160000 --- a/prefpane +++ b/prefpane @@ -1 +1 @@ -Subproject commit 87df3f1101fa850ee13b5ec947bfa9fc73c4d261 +Subproject commit 8a65eb24605e1e703025fc64816a7c531b5bf5b3 From 0beff6c5f204afc7bbe4217b4cb73e1ddb9084ba Mon Sep 17 00:00:00 2001 From: Benjamin Fleischer Date: Sat, 8 Jul 2017 17:39:26 +0200 Subject: [PATCH 10/10] Bump version to 3.6.1 --- common/fuse_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/fuse_version.h b/common/fuse_version.h index a7909115..3176b4df 100644 --- a/common/fuse_version.h +++ b/common/fuse_version.h @@ -28,7 +28,7 @@ /* Version */ -#define OSXFUSE_VERSION_LITERAL 3.6.0 +#define OSXFUSE_VERSION_LITERAL 3.6.1 #define OSXFUSE_TIMESTAMP __DATE__ ", " __TIME__ #define OSXFUSE_VERSION FUSE_PP_STRINGIFY(OSXFUSE_VERSION_LITERAL)