devkitPro / pacman

GNU General Public License v2.0
168 stars 16 forks source link

All packages fail to install under macOS Catalina with default flags #15

Closed spotlightishere closed 4 years ago

spotlightishere commented 5 years ago

Hi! macOS Catalina is still in beta, but as it heads towards release, I figured it'd be best to give a head's up. This might be an issue upstream with pacman as well - I do not have a good way to test and see no mentions on pacman-dev.

10.15 separates the user's into system and user data. System is mounted read-only at /, and user data is mounted at /System/Volumes/Data. They both transparently merge.

For this reason, dkp-pacman currently fails with

error: Partition / is mounted read only
error: not enough free disk space
error: failed to commit transaction (not enough free disk space)

Edit: @WinterMute

Until the macOS package is updated to adjust for this you can edit /opt/devkitPro/pacman/etc/pacman.conf, uncomment RootDir & set the path there to /System/Volumes/Data

It's currently possible to circumvent such a restriction with -r /System/Volumes/Data, which overlays and allows access at /opt/devkitpro.

khalilgharbaoui commented 4 years ago

Thanks! I think this should be documented properly because it is a pain to find out the hard way! I updated the documentation with your findings under UNIX like platforms: https://switchbrew.org/wiki/Setting_up_Development_Environment sudo (dkp-)pacman -S switch-dev -r /System/Volumes/Data

WinterMute commented 4 years ago

Problem is, it may not be possible to support Catalina properly given Apple moving towards tighter and tighter control of what gets installed on macOS.

The thing that concerns me here is how someone installs devkitPro pacman on macOS catalina if there's no access to /. This needs testing properly rather than people updating documentation with workarounds that may or may not be appropriate.

khalilgharbaoui commented 4 years ago

It does work tough, for now.

ixalsera commented 4 years ago

@WinterMute I believe the install of dkp-pacman succeeds because that's run via a native macOS installer package which is inherently aware of the transparent overlay of the two volumes. I managed to install it without issue on a virgin 10.15.2 system but then ran in to the issue noted here since / is mounted read-only to preserve OS integrity.

The /opt and /usr/local directories are designated for user installed content so there shouldn't (and I say that fully expecting to eat my words in a few years/months) ever be any issue adding content there.

Since there's no man pages installed for dkp-pacman, I wouldn't have known about using -r if I hadn't found this issue (never thought to check the pacman manual either).

By way of explanation of the above for anyone else landing here, the -r argument sets the root directory for the installation, overriding the default of /.

WinterMute commented 4 years ago

@h0bd0b1in Thanks for reporting that the dkp-pacman installer succeeds on Catalina, that's good to know. However, while using -r does work it's obviously not an ideal solution. What will work & what I recommend in the meantime until I fix the installer to suit is to edit /opt/devkitPro/pacman/etc/pacman.conf, uncomment RootDir & set the path there to /System/Volumes/Data which I'll edit the description of this issue to reflect.

PikalaxALT commented 4 years ago

Thanks for the update, @WinterMute. The suggested patch bypasses this error on my Catalina install.

jbmagination commented 4 years ago

Was having this issue with 105GB free space. The fix does the job.

However, sw_vers -productVersion outputs my Catalina version, 10.15.3. Perhaps there can be a code check to see if 10.15.* is running? Not a good coder so I'm likely not able to do this, but if I can learn enough I'll probably make a pull request if this change doesn't get implemented.

shortbow123 commented 4 years ago

I mean, you could always just mount the system partition as read/write (sudo mount -uw /) if you know you wont mess up your system. I don't know if you need to do this every time you try to compile with devkitpro. But after a restart the system will be mounted as read only.

Please follow the advice given in the first post and do not mess with your system. We know from bitter experience that people can and do follow advice they don't understand and end up breaking their systems.

juanKme commented 4 years ago

The current best practice can be found in the first post. https://github.com/devkitPro/pacman/issues/15#issue-474773602

Thanks! I think this should be documented properly because it is a pain to find out the hard way! I updated the documentation with your findings under UNIX like platforms: https://switchbrew.org/wiki/Setting_up_Development_Environment sudo (dkp-)pacman -S switch-dev -r /System/Volumes/Data

Hey, I found in my case (probably due to my very own hardware/software constraints) that the commands for the shell (zsh) should lack parenthesis:

sudo dkp-pacman -S switch-dev -r /System/Volumes/Data

I am still working to have a fully working development environment.

oreo639 commented 4 years ago

That's normal. The point of the parenthesis is that the command dkp-pacman is only for systems that do not already provide pacman. The parenthesis indicate to the reader that the command may either be dkp-pacman or simply just pacman depending on your setup.

Also, WinterMute already gave a more proper workaround: https://github.com/devkitPro/pacman/issues/15#issuecomment-573863753

joshenders commented 4 years ago

This issue is unresolved as of macOS 10.15.5. Big Sur was announced last week and is under developer preview. Does it make sense to get ahead of this issue and work on testing a solution for macOS 11 Big Sur?

WinterMute commented 4 years ago

macOS .pkg now updated with 1.0.2 which has been tested on High Sierra, Mojave and Catalina. What happens with Big Sur remains to be seen but the installer will adjust RootDir on 10.15 or greater so hopefully that will do it for now.