-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement macOS sandbox #7
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Removed `Status` and `Retrieve` RPCs from `PackageService` in `package.proto`. - Updated `BuildRequest` message to remove `ignore_paths` field and adjust field numbers. - Removed `StatusRequest`, `StatusResponse`, `RetrieveRequest`, and `RetrieveResponse` messages from `package.proto`. refactor(service): update service implementation to match proto changes - Removed `Status` and `Retrieve` RPC implementations from `service.rs`. - Updated `Build` RPC implementation to handle new `BuildRequest` structure. - Refactored variable names for clarity and consistency. - Added TODO comments for future implementation steps. refactor(database): add find_source_by_id function - Added `find_source_by_id` function to `database/mod.rs` to query source by ID. - Renamed `find_source` to `find_source_by_uri` for clarity.
- Moved build logic to `src/builder/build/mod.rs` - Moved prepare logic to `src/builder/prepare/mod.rs` - Updated `src/builder/service.rs` to use the new modularized functions - Added `mod build` and `mod prepare` to `src/builder/mod.rs` for module inclusion - Simplified `impl PackageService for Packager` by delegating to the new modularized functions
- Added new dependencies: `bstr`, `crossbeam-deque`, `crossbeam-epoch`, `crossbeam-utils`, `globset`, `globwalk`, `ignore`, `pest`, `pest_derive`, `pest_generator`, `pest_meta`, `ryu`, `serde_json`, `signal-hook-registry`, `tera`, `ucd-trie`, `unic-char-property`, `unic-char-range`, `unic-common`, `unic-segment`, `unic-ucd-segment`, `unic-ucd-version`, `tempfile`. - Updated `Cargo.lock` and `Cargo.toml` to include new dependencies. - Modified `package.proto` to change `source_id` type from `string` to `int32` and renamed `BuildResponse` field `data` to `package_data`. - Updated `flake.nix` with new `cargoSha256`. - Enhanced build process in `build/mod.rs` to include new steps for handling temporary directories, scripts, and sandbox execution. - Added `sandbox_default.rs` for sandbox profile template. - Updated `prepare/mod.rs` to handle new source directory structure and unpacking logic. - Modified database schema and functions to store and retrieve source by `hash` and `name` instead of `uri`. - Refactored `store/mod.rs` to include new utility functions for handling paths, file hashes, and source unpacking. - Updated `notary/mod.rs` to use async file operations and reduced key size to 2048 bits.
…ions in sandbox_default.rs
- Updated `package.proto` to include `is_compressed` field in `BuildResponse` message. - Modified `run` function in `mod.rs` to set `is_compressed` flag based on the presence of tar file. - Added OS type check to ensure the build runs only on macOS. - Adjusted build output path logic to handle both compressed and uncompressed package data. - Improved logging to display the correct build output path.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
sandbox-exec
implementation for macOS