Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

fakeroot install -o root no longer works on mac os x 10.11 #46927

Closed
dankegel opened this issue Dec 12, 2015 · 7 comments
Closed

fakeroot install -o root no longer works on mac os x 10.11 #46927

dankegel opened this issue Dec 12, 2015 · 7 comments

Comments

@dankegel
Copy link

The commands

touch foo
fakeroot install -o root foo bar

should copy 'foo' to 'bar', but on Mac OS X 10.11, the install fails with

install: bar: chown/chgrp: Operation not permitted

This is with Xcode 7.1 and fully updated brew. fakeroot -v reports version 1.20.2.
brew --version reports Homebrew 0.9.5 (git revision b3139; last commit 2015-12-11)

@dankegel
Copy link
Author

I tried compiling my own fakeroot using the patches from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=766649 outside of brew:

wget -c 'https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;bug=766649;att=1;filename=0001-Implement-openat-2-wrapper-which-handles-optional-ar.patch' -O 0001.patch
wget -c 'https://bugs.debian.org/cgi-bin/bugreport.cgi?filename=0002-OS-X-10.10-introduced-id_t-int-in-gs-etpriority.patch;bug=766649;msg=5;att=2' -O 0002.patch
wget -c 'https://bugs.debian.org/cgi-bin/bugreport.cgi?att=2;bug=766649;msg=20;filename=fakeroot-always-pass-mode.patch' -O 0003.patch
wget -c 'https://bugs.debian.org/cgi-bin/bugreport.cgi?filename=fakeroot-patch-wraptmpf-h.patch;att=3;msg=20;bug=766649' -O post.patch
wget -c 'https://mirrors.kernel.org/debian/pool/main/f/fakeroot/fakeroot_1.20.2.orig.tar.bz2'
tar -xzvf fakeroot_1.20.2.orig.tar.bz2
cd fakeroot-1.20.2
patch -p1 < ../0001.patch
patch -p1 < ../0002.patch
patch -p1 < ../0003.patch

./bootstrap 
CFLAGS='-Wno-deprecated-declarations' ./configure --disable-dependency-tracking --disable-static
make wraptmpf.h
patch -p1 < ../post.patch
make
make check

but alas, 'make check' failed four tests: t.chmod_dev, t.mknod, t.tar, and t.touchinstall.

@dankegel dankegel changed the title fakeroot no longer works on mac os x 10.11 fakeroot install -o root no longer works on mac os x 10.11 Dec 12, 2015
@dankegel
Copy link
Author

The test failures might not be showstoppers. Homebrew's fakeroot seems to work on the test program:

#include <unistd.h>
#include <stdio.h>

int main(int argc, char **argv)
{
    int x = chown(argv[1], 0, 0);
    printf("chown(%s, 0, 0) returns %d\n", argv[1], x);
    if (x)
        perror("failed");
}

so maybe it's only Apple's signed install that doesn't work?

Sure enough, 'fakeroot ginstall -o root foo bar' works.

@tdsmith
Copy link
Contributor

tdsmith commented Dec 12, 2015

This is probably a consequence of 10.11's System Integrity Protection feature, which limits the operations you can do with signed code. Do you think Homebrew needs to take action here? I don't see anything obviously actionable.

@DomT4
Copy link
Member

DomT4 commented Dec 12, 2015

Yeah, a touch heavy on the irony, to use the same command with Apple's install you need to execute sudo on the er, fakeroot command 😓.

@dankegel
Copy link
Author

As long as brew always uses its own install, all I can think of is "help users by pointing out the problem and suggesting a workaround". Which is more or less completed by the existence of this bug report :-)

@tdsmith
Copy link
Contributor

tdsmith commented Dec 27, 2015

Okay, great. Thanks for reporting! Let us know if we can help with anything or if just closing this ticket was not the action you expected.

@tdsmith tdsmith closed this as completed Dec 27, 2015
@dankegel
Copy link
Author

Heh. I'm not convinced it works, even with the workaround, but have been too lazy to file a new ticket. I'll try to get to it this week. Thanks...

@Homebrew Homebrew locked and limited conversation to collaborators Jul 10, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants