this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Namespace FBProcess runtime and streamline signing

alice 4b173942 566401c9

+75 -5
+2
.gitignore
··· 14 14 idb_checkout/ 15 15 /build_products/*.zip 16 16 /build_products/Frameworks 17 + /build_products/XCFrameworks 18 + /build_products/axe 17 19 /build_derived_data 18 20 19 21 # Generated version file
+32
patches/idb/fbprocess-runtime-rename.patch
··· 1 + --- a/FBControlCore/Tasks/FBProcess.h 2 + +++ b/FBControlCore/Tasks/FBProcess.h 3 + @@ -6,12 +6,21 @@ 4 + */ 5 + 6 + #import <Foundation/Foundation.h> 7 + +#import <TargetConditionals.h> 8 + 9 + #import <FBControlCore/FBFuture.h> 10 + #import <FBControlCore/FBiOSTargetOperation.h> 11 + 12 + NS_ASSUME_NONNULL_BEGIN 13 + 14 + +#if !defined(FBCC_RUNTIME_RENAME_FBPROCESS) 15 + +#if TARGET_OS_OSX 16 + +#define FBCC_RUNTIME_RENAME_FBPROCESS __attribute__((objc_runtime_name("AXEFBProcess"))) 17 + +#else 18 + +#define FBCC_RUNTIME_RENAME_FBPROCESS 19 + +#endif 20 + +#endif 21 + + 22 + static const size_t FBProcessOutputErrorMessageLength = 200; 23 + 24 + @class FBProcessSpawnConfiguration; 25 + @@ -19,6 +28,7 @@ static const size_t FBProcessOutputErrorMessageLength = 200; 26 + /** 27 + A representation of a process that has been launched. 28 + */ 29 + +FBCC_RUNTIME_RENAME_FBPROCESS 30 + @interface FBProcess <StdInType : id, StdOutType : id, StdErrType : id> : NSObject 31 + 32 + #pragma mark Properties
+41 -5
scripts/build.sh
··· 7 7 # Environment and Configuration 8 8 IDB_CHECKOUT_DIR="${IDB_CHECKOUT_DIR:-./idb_checkout}" 9 9 IDB_GIT_REF="${IDB_GIT_REF:-76639e4d0e1741adf391cab36f19fbc59378153e}" 10 + IDB_PATCHES_DIR="${IDB_PATCHES_DIR:-./patches/idb}" 10 11 BUILD_OUTPUT_DIR="${BUILD_OUTPUT_DIR:-./build_products}" 11 12 DERIVED_DATA_PATH="${DERIVED_DATA_PATH:-./build_derived_data}" 12 13 BUILD_XCFRAMEWORK_DIR="${BUILD_XCFRAMEWORK_DIR:-${BUILD_OUTPUT_DIR}/XCFrameworks}" ··· 15 16 16 17 FRAMEWORK_SDK="macosx" 17 18 FRAMEWORK_CONFIGURATION="Release" 19 + 20 + # Codesigning configuration (override by exporting AXE_CODESIGN_IDENTITY) 21 + DEFAULT_CODESIGN_IDENTITY="Developer ID Application: Cameron Cooke (BR6WD3M6ZD)" 22 + CODESIGN_IDENTITY="${AXE_CODESIGN_IDENTITY:-$DEFAULT_CODESIGN_IDENTITY}" 18 23 19 24 # Notarization Configuration 20 25 NOTARIZATION_API_KEY_PATH="${NOTARIZATION_API_KEY_PATH:-./keys/AuthKey_8TJYVXVDQ6.p8}" ··· 87 92 git clone https://github.com/facebook/idb.git $IDB_CHECKOUT_DIR 88 93 (cd $IDB_CHECKOUT_DIR && git checkout "$IDB_GIT_REF") 89 94 print_success "idb repository cloned at $IDB_GIT_REF." 95 + apply_idb_patches 90 96 else 91 97 print_info "Updating idb repository to $IDB_GIT_REF..." 92 98 (cd $IDB_CHECKOUT_DIR && git fetch --all --tags --prune && git reset --hard "$IDB_GIT_REF") 93 99 print_success "idb repository updated to $IDB_GIT_REF." 100 + apply_idb_patches 94 101 fi 95 102 } 96 103 104 + function apply_idb_patches() { 105 + if [ ! -d "$IDB_PATCHES_DIR" ]; then 106 + return 107 + fi 108 + 109 + shopt -s nullglob 110 + local patches=("$IDB_PATCHES_DIR"/*.patch) 111 + if [ ${#patches[@]} -eq 0 ]; then 112 + shopt -u nullglob 113 + return 114 + fi 115 + 116 + print_info "Applying local patches to idb repository..." 117 + # Ensure we start from a clean working tree so patches apply consistently. 118 + (cd "$IDB_CHECKOUT_DIR" && git checkout -- . >/dev/null 2>&1 && git clean -fd >/dev/null 2>&1) || true 119 + 120 + local patch_file 121 + for patch_file in "${patches[@]}"; do 122 + local patch_abs 123 + patch_abs="$(cd "$(dirname "$patch_file")" && pwd)/$(basename "$patch_file")" 124 + print_info " → $(basename "$patch_file")" 125 + if ! (cd "$IDB_CHECKOUT_DIR" && patch -p1 -N < "$patch_abs"); then 126 + echo "❌ Error: Failed to apply patch $(basename "$patch_file")" 127 + exit 1 128 + fi 129 + done 130 + shopt -u nullglob 131 + } 132 + 97 133 # Function to build a single framework 98 134 # $1: Scheme name 99 135 # $2: Project file path ··· 217 253 find "$framework_path" -name "*.dylib" -type f | while read -r dylib_path; do 218 254 print_info " Signing dylib: $(basename "$dylib_path")" 219 255 codesign --force \ 220 - --sign "Developer ID Application: Cameron Cooke (BR6WD3M6ZD)" \ 256 + --sign "${CODESIGN_IDENTITY}" \ 221 257 --options runtime \ 222 258 --timestamp \ 223 259 --verbose \ ··· 236 272 # Sign the main framework bundle with specific notarization-compatible options 237 273 print_info "Signing main framework bundle: ${framework_name}" 238 274 codesign --force \ 239 - --sign "Developer ID Application: Cameron Cooke (BR6WD3M6ZD)" \ 275 + --sign "${CODESIGN_IDENTITY}" \ 240 276 --options runtime \ 241 277 --entitlements entitlements.plist \ 242 278 --timestamp \ ··· 282 318 283 319 # Sign XCFramework with Developer ID and runtime hardening 284 320 codesign --force \ 285 - --sign "Developer ID Application: Cameron Cooke (BR6WD3M6ZD)" \ 321 + --sign "${CODESIGN_IDENTITY}" \ 286 322 --options runtime \ 287 323 --deep \ 288 324 --timestamp \ ··· 386 422 387 423 # Sign with Developer ID and runtime hardening 388 424 codesign --force \ 389 - --sign "Developer ID Application: Cameron Cooke (BR6WD3M6ZD)" \ 425 + --sign "${CODESIGN_IDENTITY}" \ 390 426 --options runtime \ 391 427 --entitlements entitlements.plist \ 392 428 --timestamp \ ··· 882 918 exit 1;; 883 919 esac 884 920 885 - exit 0 921 + exit 0