Commit Graph

4244 Commits

Author SHA1 Message Date
Ariel Abreu
a405dbea35 [rpm] Build binary RPMs only
This should help cut down build times
2023-05-12 10:05:41 -07:00
Ariel Abreu
be134fcbec Build RPMs with the CI; enable ccache on CI 2023-05-12 10:05:41 -07:00
Ariel Abreu
f1153d9b1a Major overhaul for RPM packaging
First of all, the RPM packaging code hadn't been updated in quite a
while (it was still using the LKM), so this updates it to build with
darlingserver instead of the LKM.

Second, this update also adds a dependency generator that is used at
build time to automatically pick up the ELF dependencies in installed
Mach-Os. I prefer Debian's approach to this (simply having the option to
dynamically generate the requirements into a file at build time). This
seems like a convoluted approach (having to install a `fileattribute`
globally on the build machine), but at least it works.

Finally, this update also splits the package into multiple component
packages like the Debian packages. Note that `darling-cli-devenv` needs
to install files with the same names as those installed by
`darling-gui`, so it has to be built as a completely separate package. To
avoid having to rebuild a large portion of the project (about 8000
files), we simply generate a binary "source" tarball when building the
main Darling packages and then use this as the source for
`darling-cli-devenv`.
2023-05-12 10:05:41 -07:00
Ariel Abreu
0d3e01769a Add component dep info for cli_dev_gui_stubs 2023-05-12 10:05:41 -07:00
Ariel Abreu
ade8cdcbcd Install files to /private/etc, not /etc
This is necessary to install files to the right directory when doing
single-component installations (as used by binary packaging) since the
`/etc` symlink is only installed by the `core` component.
2023-05-12 10:05:41 -07:00
Ariel Abreu
c0102e5d01 [deb] Split package into multiple component packages 2023-05-12 10:05:41 -07:00
Ariel Abreu
1edcfebc27 Add ability to install individual components
This change allows you to build multiple components and still choose to
install only some of them using CMake's `cmake_install.cmake` script.
2023-05-12 10:05:41 -07:00
Ariel Abreu
1ad855c8ff Initial modular build commit
This new build setup allows you to only build and install certain
components of Darling according to your needs. The primary motivation
for this change is to allow you to build Darling without any GUI
dependencies if you only care about or need the CLI.

JavaScriptCore is now excluded by default. This is a huge build item
that 99% of people don't need and we certainly don't use (yet).

There will be an update to the docs to describe the component options.
2023-05-12 10:05:37 -07:00
Ariel Abreu
8974de2700 Add a script to generate minimal stubs for some frameworks needed by Xcode
This is mainly used for the modular build, so that we have
dependency-free stubs for certain GUI frameworks that Xcode loads but
doesn't actually use in the CLI.
2023-05-12 10:01:53 -07:00
Ariel Abreu
98c8acf3da [carbon] Get rid of X11 dependency for now
We weren't actually using it anyways, so let's just comment out the last
remaining uses (for the modular build update).
2023-05-12 10:01:53 -07:00
Ariel Abreu
b926434fe6 Add exec subcommand to darling executable
This subcommand allows you to execute a binary directly, without the
need for a shell.
2023-05-12 10:01:53 -07:00
Ariel Abreu
ad4e30fe5f Add coresymbolicationd stub service
This service is used by Xcode when it crashes to help symbolicate the
stack trace. However, stubbing it to return empty dictionary replies
seems to be enough to get by.
2023-05-12 10:01:53 -07:00
Thomas A
ad4e9aef62 [kernel/libsyscall] Add work_interval_instance Stubs 2023-05-02 16:22:08 -07:00
Thomas A
f6877678ff [SoftLinking] Fix WeakLinking.h Symlink 2023-05-02 16:22:08 -07:00
Thomas A
df2cbbab82 [Security] Change "security_libDER" Header Folder Into A Symlink 2023-05-02 16:22:08 -07:00
Thomas A
91a3dafa8d [AvailabilityVersions] Update "for_dyld_priv.inc" And "VersionMap.h" Symlinks 2023-05-02 16:22:08 -07:00
Thomas A
d5a3aef387 Fix i386 Process Crashing When Calling "syscall(...)"
Based off of 98bc803. Added in "#ifdef DARLING" to make it clear that this is a Darling specific change.
2023-05-02 16:22:07 -07:00
Thomas A
fabc631139 Change Include From <CoreServices/...> to <CarbonCore/...> 2023-05-02 16:22:07 -07:00
Thomas A
7a159ad3e0 Update Version To 11.7.4. Update Kernel Version To 20.6.0. 2023-05-02 16:22:07 -07:00
Thomas A
ff59437f5f [mldr] Use __builtin_ctzl Instead Of log2 To Calculate The Page Shift 2023-05-02 16:22:07 -07:00
Thomas A
29e4908663 [mldr] Don't Terminate If Command Size Is Greater Then PAGE_SIZE
On later versions of macOS, the command size limit is 32KiB. We don't need to worry about that in mldr.
2023-05-02 16:22:07 -07:00
Thomas A
27e006e1fd Update Target Triplet To Use darwin20
Matches the target triplet uses for macOS Big Sur.
2023-05-02 16:22:07 -07:00
Thomas A
d3a244ccf7 Update CMAKE_OSX_DEPLOYMENT_TARGET To 11.0
A bit of a backstory: macOS Big Sur was the first version of macOS to increment it's major version number from 10 to 11. Since Apple doesn't want to break old applications that assume the "10.x" version scheme, they applied a small hack in the xnu kernel to have older applications read off of the SystemVersionCompat.plist instead. So instead of seeing "11.6", the app would see "10.16" instead.

Since the macOS deployment target was not updated to BIg Sur's version, sw_vers would report "10.16". Fixes #1334
2023-05-02 16:22:07 -07:00
Thomas A
4592bb2e11 [SecurityTokend] Update Header Path 2023-05-02 16:22:07 -07:00
Thomas A
a3702a0934 [cups] Symlink To cups/darling/include/cups Folder 2023-05-02 16:22:07 -07:00
Thomas A
d9cd75ae16 [networkextension] Add NEHelperClient.h in usr/include 2023-05-02 16:22:07 -07:00
Thomas A
3006c13f80 [networkextension] Add ne_session_service_get_dns_service_id And ne_session_type_t Stubs 2023-05-02 16:22:06 -07:00
Thomas A
62403382ff [zip] Check CMakeLists.txt In external/zip Instead 2023-05-02 16:22:06 -07:00
Thomas A
bfbc9660a7 [SoftLinking] Add WeakLinking.h From WTF 2023-05-02 16:22:06 -07:00
Thomas A
1b188186c9 [libunwind] Add __libunwind_config.h 2023-05-02 16:22:06 -07:00
Thomas A
5f0606b9eb [MobileGestalt] Add MobileGestalt Header File 2023-05-02 16:22:06 -07:00
Thomas A
c86fdac732 [kernel/libsyscall] Build mach/task.c 2023-05-02 16:22:06 -07:00
Thomas A
de8c9bbed3 [netcat] Add netcat in CMakeLists.txt 2023-05-02 16:22:06 -07:00
Thomas A
969ae338a2 [ncurses] Remove form stub.
We will be using the ncurses-form source instead.
2023-05-02 16:22:06 -07:00
Thomas A
23546c082d [ncurses] Update libncurses.5.4.dylib Path 2023-05-02 16:22:06 -07:00
Thomas A
df122723ac Copy over generated mach header files 2023-05-02 16:22:06 -07:00
Thomas A
216a6718bf [libMobileGestalt] Add libMobileGestalt to use_ld64 2023-05-02 16:22:05 -07:00
Thomas A
c47298092f [AuthenticationServices] Add Stubs For Security Framework 2023-05-02 16:22:05 -07:00
Thomas A
4405bdc5b8 [CoreServices] Relocate Header Files From CoreServices To CarbonCore
When I was looking at the XCode SDK, I noticed that a lot of the header files in CoreServices actually live in CarbonCore instead.
2023-05-02 16:22:05 -07:00
Thomas A
20b91fbfc2 [CryptoTokenKit] Add kTKTokenCreateAttributeTestMode and TKAddSecureToken stub 2023-05-02 16:22:05 -07:00
Thomas A
589052bfe8 [LocalAuthentication] Include <LocalAuthentication/LACFSupport.h> in coreauthd_spi.h 2023-05-02 16:22:05 -07:00
Thomas A
5f3ee4a529 [CoreSymbolication] Fix CSSymbolicatorGetSymbolWithNameAtTime Arguments 2023-05-02 16:22:05 -07:00
Thomas A
0fb58c73a0 [sandbox] Add sandbox_query_approval_policy_for_path stub. Add sandbox_check_by_audit_token declaration and SANDBOX_FILTER_DESCRIPTOR in header. 2023-05-02 16:22:05 -07:00
Thomas A
bdd06ac934 [MobileGestalt] Fix MGCopyAnswer Arguments. Add kMGQReleaseType. 2023-05-02 16:22:05 -07:00
Thomas A
3ebbde4a79 [Security] Update Framework Header Symbolic-Link 2023-05-02 16:22:05 -07:00
Thomas A
306299150a [Security] Symbol-Link libDER Folder From Security Submodule 2023-05-02 16:22:05 -07:00
Thomas A
0142aac817 [ConfigurationProfiles] Add CP_GetBootstrapTokenWithOptions Stub 2023-05-02 16:22:04 -07:00
Thomas A
e2ecd0327e [CryptoTokenKit] Add TKBindUserAm Stub 2023-05-02 16:22:04 -07:00
Thomas A
e00e69447b [LDAP] Update Framework header Symbolic-Link 2023-05-02 16:22:04 -07:00
Thomas A
1586d4b60e [CoreServices] Update macOS System Version to 11.6. Added SystemVersionCompat.plist 2023-05-02 16:22:04 -07:00