devkitPro / pacman

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

OS X El Capitan can't create /usr/share/pacman #7

Closed plaidman closed 6 years ago

plaidman commented 6 years ago

Hey when I tried to run through the instructions, I failed at the part where you install the keyring.

Apparently Mac El Capitan comes with a system protection that disables writing to anything in /usr/ except /usr/local. Would it be possible to recompile dkp-pacman to install things into /usr/local/share instead of /usr/share?

https://stackoverflow.com/questions/32659348/operation-not-permitted-when-on-root-el-capitan-rootless-disabled

sudo dkp-pacman -U https://downloads.devkitpro.org/devkitpro-keyring-r1.787e015-2-any.pkg.tar.xz
loading packages...
warning: devkitpro-keyring-r1.787e015-2 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) devkitpro-keyring-r1.787e015-2

Total Installed Size:  0.01 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n] y
(1/1) checking package integrity                                                [##############################################] 100%
(1/1) loading package files                                                     [##############################################] 100%
(1/1) checking for file conflicts                                               [##############################################] 100%
(1/1) checking available disk space                                             [##############################################] 100%
warning: could not get file information for usr/share/pacman/
warning: could not get file information for usr/share/pacman/keyrings/
warning: could not get file information for usr/share/pacman/keyrings/devkitpro-revoked
warning: could not get file information for usr/share/pacman/keyrings/devkitpro-trusted
warning: could not get file information for usr/share/pacman/keyrings/devkitpro.gpg
:: Processing package changes...
error: cannot remove file '/usr/': Operation not permitted
(1/1) reinstalling devkitpro-keyring                                            [##############################################] 100%
warning: warning given when extracting /usr/share/pacman/ (Can't create '/usr/share/pacman')
warning: warning given when extracting /usr/share/pacman/keyrings/ (Failed to create dir '/usr/share/pacman')
warning: warning given when extracting /usr/share/pacman/keyrings/devkitpro-revoked (Failed to create dir '/usr/share/pacman')
warning: warning given when extracting /usr/share/pacman/keyrings/devkitpro-trusted (Failed to create dir '/usr/share/pacman')
warning: warning given when extracting /usr/share/pacman/keyrings/devkitpro.gpg (Failed to create dir '/usr/share/pacman')
WinterMute commented 6 years ago

You're following the instructions to manually install keys on a system that already has pacman. On OSX you use the .pkg from https://github.com/devkitPro/pacman/releases/latest which sets everything up for you.

There are no instructions anywhere which tell you to install the key package manually with dkp-pacman.

plaidman commented 6 years ago

Ah yes I see that now. Thanks for the clarification! Everything seems to work. =)