Skip to content

Commit

Permalink
Fix El Capitan install and more
Browse files Browse the repository at this point in the history
  • Loading branch information
Federico Benavento committed Oct 15, 2015
1 parent c91ccf3 commit d24314c
Show file tree
Hide file tree
Showing 14 changed files with 157 additions and 91 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export MACOSX_DEPLOYMENT_TARGET=10.5
#export ARCHS=-arch i386 -arch x86_64 -arch ppc
export SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
export WARNINGS=-Wall -Wmost -Wextra -Wno-missing-braces -Wno-private-extern -Werror
export CFLAGS=-g -isysroot $(SYSROOT) $(WARNINGS) -DNDEBUG
export CFLAGS=-g -isysroot $(SYSROOT) $(WARNINGS) #-DNDEBUG
export LFLAGS=-g -isysroot $(SYSROOT)
#export CC=llvm-gcc-4.2
export CC=clang
Expand Down
26 changes: 16 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
# Mac9P #
# Mac9P 1.1 #

**Mac9P** is a software that allows you to mount [9P](http://en.wikipedia.org/wiki/9P ) file systems on a Mac OS X system.

## Install ##
Install the **Mac9P.pkg** from the [Mac9P.dmg](https://bitbucket.org/fgb/mac9p/downloads/Mac9P.dmg).
Run **Install Mac9P** from the **Mac9P.dmg**.

## Uninstall ##

Run **Uninstall.tool** from the [Mac9P.dmg](https://bitbucket.org/fgb/mac9p/downloads/Mac9P.dmg).
Run **Uninstall.tool** from the **Mac9P.dmg**.

## Building ##
### Prerequisites ###
* **Xcode**.
* **PackageMaker** to create the installer from [Auxiliary Tools for Xcode](https://developer.apple.com/downloads/index.action?name=PackageMaker).

### Compiling ###
In a terminal run:
```
#!sh
cd mac9
make all
Expand All @@ -27,18 +24,27 @@ make all

## Mounting ##
### From the Finder ###
_(Broken if the binary is not signed)
**Go** -> **Connect to Server...**: _9p://sources.cs.bell-labs.com_.
### From a Terminal ###


```
#!sh
mkdir /tmp/sources
mount -t 9p sources.cs.bell-labs.com /tmp/sources
mount -t 9p -onoauth sources.cs.bell-labs.com /tmp/sources
```


## Documentation ##
See **mount_9p(8)**.
See **mount_9p(8)**.

## Troubleshooting ##
### Disable kext signing check ###

1. Boot into Recovery Mode by restarting your mac while holding down _Command+R_.
2. Open a Terminal from **Utilities** -> **Terminal** and run:
```
csrutil disable
csrutil enable --without kext
```
Binary file added inst/DS_Store
Binary file not shown.
4 changes: 2 additions & 2 deletions inst/FSInfo.plist
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
Expand All @@ -13,7 +13,7 @@
<key>CFBundlePackageType</key>
<string>fs</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<string>1.1</string>
<key>FSPersonalities</key>
<dict>
<key>9p</key>
Expand Down
1 change: 0 additions & 1 deletion inst/InstallationCheck.strings

This file was deleted.

2 changes: 1 addition & 1 deletion inst/KEInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<string>1.1</string>
<key>OSBundleLibraries</key>
<dict>
<key>com.apple.kpi.bsd</key>
Expand Down
19 changes: 10 additions & 9 deletions inst/License.rtf
Original file line number Diff line number Diff line change
@@ -1,31 +1,32 @@
{\rtf1\ansi\ansicpg1252\cocoartf1344\cocoasubrtf720
{\rtf1\ansi\ansicpg1252\cocoartf1404\cocoasubrtf110
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
\vieww17300\viewh9220\viewkind0
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0

\f0\b\fs24 \cf0 Mac9P
\b0 is a package developed by Federico G. Benavento and is covered under the following BSD license:\
\
Copyright (c) 2015 by Federico G. Benavento.\
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\partightenfactor0
\cf0 All rights reserved.\
\
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\
\pard\tx220\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li720\fi-720
\pard\tx220\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li720\fi-720\partightenfactor0
\ls1\ilvl0\cf0 {\listtext \'95 }Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\
{\listtext \'95 }Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\
{\listtext \'95 }Neither the name of the copyright holders nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\partightenfactor0
\cf0 \
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT OWNER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
\cf0 \
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
Available at: {\field{\*\fldinst{HYPERLINK "https://github.com/benavento/mac9p"}}{\fldrslt https://github.com/benavento/mac9p}}\
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\partightenfactor0
\cf0 \
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
\cf0 Portions of this package were derived from u9fs which is distributed under the following license:\
\
The authors of this software are Bob Flandrena, Ken Thompson, Rob Pike, and Russ Cox.\
Expand All @@ -40,7 +41,7 @@ Available at: {\field{\*\fldinst{HYPERLINK "http://code.google.com/p/u9fs/"}}{\f
\
mntopts.h is distributed under the following license:\
\
\pard\tx529\pardeftab529\pardirnatural
\pard\tx529\pardeftab529\pardirnatural\partightenfactor0
\cf0 \CocoaLigature0 This file contains Original Code and/or Modifications of Original Code as defined in and that are subject to the Apple Public Source License\
Version 2.0 (the 'License'). You may not use this file except in compliance with the License. Please obtain a copy of the License at {\field{\*\fldinst{HYPERLINK "http://www.opensource.apple.com/apsl/"}}{\fldrslt http://www.opensource.apple.com/apsl/}} and read it before using this file.\
\
Expand Down
122 changes: 68 additions & 54 deletions inst/Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
NAME=Mac9P
PKG=$(NAME).pkg
PKG=Install\ $(NAME).pkg
DMG=$(NAME).dmg

PKGROOT=/tmp/$(NAME)
KEDIR=$(PKGROOT)/System/Library/Extensions/9p.kext
FSDIR=$(PKGROOT)/System/Library/FileSystems/9p.fs
NPDIR=$(PKGROOT)/System/Library/FileSystems/NetFSPlugins/9p.bundle
TMPDIR=/tmp/$(NAME)
PKGROOT=$(TMPDIR)/root
KEDIR=$(PKGROOT)/Library/Extensions/9p.kext
FSDIR=$(PKGROOT)/Library/FileSystems/9p.fs
NPDIR=$(PKGROOT)/Library/FileSystems/NetFSPlugins/9p.bundle
MNDIR=$(PKGROOT)/usr/local/share/man/man8

PKGRESDIR=$(PKG)/Contents/Resources
PKGRESFILES=\
License.rtf\
Welcome.rtf\
InstallationCheck\
InstallationCheck.strings\
# background.tiff\

PKGDEP=\
../kext/9p\
Expand All @@ -25,58 +19,78 @@ PKGDEP=\
FSInfo.plist\
KEInfo.plist\
NPInfo.plist\
$(PKGRESFILES)
License.rtf\
Welcome.rtf\
InstallationCheck\
distribution.xml\
# background.tiff\
all: pkg dmg

PKGTMP=$(NAME).pkg.tmp
$(PKG): $(PKGDEP)
mkdir -p $(KEDIR)/Contents
cp -pX KEInfo.plist $(KEDIR)/Contents/Info.plist
mkdir -p $(KEDIR)/Contents/MacOS
cp -pX ../kext/9p $(KEDIR)/Contents/MacOS/9p
chmod 644 $(KEDIR)/Contents/MacOS/9p
mkdir -p $(KEDIR)/Contents/Resources
cp -pX ../load/load_9p $(KEDIR)/Contents/Resources
mkdir -p $(FSDIR)/Contents
cp -pX FSInfo.plist $(FSDIR)/Contents/Info.plist
mkdir -p $(FSDIR)/Contents/Resources
cp -pX ../mount/mount_9p $(FSDIR)/Contents/Resources
mkdir -p $(NPDIR)/Contents
cp -pX NPInfo.plist $(NPDIR)/Contents/Info.plist
mkdir -p $(NPDIR)/Contents/MacOS
cp -pX ../plugin/9p $(NPDIR)/Contents/MacOS/9p
mkdir -p $(MNDIR)
cp -pX mount_9p.8 $(MNDIR)
sudo chown -R root:wheel $(PKGROOT)
sudo chmod u+s $(KEDIR)/Contents/Resources/load_9p
$(PACKAGEMAKER) \
--root $(PKGROOT) \
--id com.lab-fgb.9p \
--domain system \
--no-recommend \
--root-volume-only \
--out $@
cp -pX $(PKGRESFILES) $(PKGRESDIR)
sudo rm -fr $(PKGROOT)
echo building $(PKG)
mkdir -p "$(KEDIR)/Contents"
cp -pX KEInfo.plist "$(KEDIR)/Contents/Info.plist"
mkdir -p "$(KEDIR)/Contents/MacOS"
cp -pX ../kext/9p "$(KEDIR)/Contents/MacOS/9p"
chmod 644 "$(KEDIR)/Contents/MacOS/9p"
mkdir -p "$(KEDIR)/Contents/Resources"
cp -pX ../load/load_9p "$(KEDIR)/Contents/Resources"
mkdir -p "$(FSDIR)/Contents"
cp -pX FSInfo.plist "$(FSDIR)/Contents/Info.plist"
mkdir -p "$(FSDIR)/Contents/Resources"
cp -pX ../mount/mount_9p "$(FSDIR)/Contents/Resources"
mkdir -p "$(NPDIR)/Contents"
cp -pX NPInfo.plist "$(NPDIR)/Contents/Info.plist"
mkdir -p "$(NPDIR)/Contents/MacOS"
cp -pX ../plugin/9p "$(NPDIR)/Contents/MacOS/9p"
mkdir -p "$(MNDIR)"
cp -pX mount_9p.8 "$(MNDIR)"
chmod u+s "$(KEDIR)/Contents/Resources/load_9p"
mkdir -p "$(TMPDIR)/Scripts"
cp -pX InstallationCheck "$(TMPDIR)/Scripts"
pkgbuild \
--root "$(PKGROOT)" \
--identifier com.lab-fgb.9p \
--install-location "/" \
--ownership recommended "$(PKGTMP)"
productbuild \
--identifier com.lab-fgb.9p \
--resources ./ \
--scripts "$(TMPDIR)/Scripts" \
--package-path "$(PKGTMP)" \
--distribution distribution.xml \
"$@"
rm -fr "$(PKGTMP)" "$(TMPDIR)"

DMGFILES=\
$(PKG)\
License.rtf\
Uninstall.tool\

DMGDEP=\
$(DMGFILES)\
DS_Store\
# VolumeIcon.icns\
TDMG=tmp.dmg
VOLUME=/Volumes/$(NAME)
$(DMG): $(PKG) #volume.icns
hdiutil create -quiet -layout NONE -size 512k -fs HFS+ -volname $(NAME) $(TDMG)
hdiutil attach -quiet -private -nobrowse $(TDMG)
cp -pRX $(PKG) $(VOLUME)
# cp -pX volume.icns $(VOLUME)/.VolumeIcon.icns
# /Developer/usr/bin/SetFile -a -C $(VOLUME)
ln -s $(VOLUME)/$(PKGRESDIR)/License.rtf $(VOLUME)/License.rtf
cp -pX Uninstall.tool $(VOLUME)
# cp -pX DS_Store $(VOLUME)/.DS_Store
hdiutil detach -quiet $(VOLUME)
hdiutil convert -quiet -format UDBZ $(TDMG) -o /tmp/$@
mv -f /tmp/$@ $@
$(DMG): $(DMGDEP)
hdiutil create -quiet -layout NONE -size 512k -fs HFS+ -volname "$(NAME)" "$(TDMG)"
hdiutil attach -quiet -private -nobrowse "$(TDMG)"
cp -pX $(DMGFILES) "$(VOLUME)"
# hide extension
SetFile -a E $(VOLUME)/$(PKG) $(VOLUME)/License.rtf
# cp -pX VolumeIcon.icns "$(VOLUME)/.VolumeIcon.icns"
# SetFile -a -C "$(VOLUME)"
cp -pX DS_Store "$(VOLUME)/.DS_Store"
hdiutil detach -quiet "$(VOLUME)"
hdiutil convert -quiet -format UDBZ "$(TDMG)" -o "$@"
rm -f $(TDMG)

clean:
rm -fr *.dmg *.pkg
rm -fr *.dmg *.pkg *.tmp

dmg: $(DMG)
pkg: $(PKG)
12 changes: 10 additions & 2 deletions inst/NPInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>1.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<string>1.1</string>
<key>CFPlugInDynamicRegisterFunction</key>
<string></string>
<key>CFPlugInDynamicRegistration</key>
Expand All @@ -37,6 +37,14 @@
<array>
<string>6E571287-6305-4B5F-B21F-9D573AAA2828</string>
</array>
<key>4A866879-F34E-11D5-A6BF-003065A0E6DE</key>
<array>
<string>6E571287-6305-4B5F-B21F-9D573AAA2828</string>
</array>
<key>4BE7B7CA-F34E-11D5-8D67-003065A0E6DE</key>
<array>
<string>6E571287-6305-4B5F-B21F-9D573AAA2828</string>
</array>
</dict>
<key>CFBundleURLTypes</key>
<array>
Expand Down
6 changes: 3 additions & 3 deletions inst/Uninstall.tool
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ export PATH="/bin:/usr/bin:/sbin:/usr/sbin:$PATH"

PKG=com.lab-fgb.9p
KEXT=com.lab-fgb.kext.9p
KEDIR=/System/Library/Extensions/9p.kext
FSDIR=/System/Library/FileSystems/9p.fs
NPDIR=/System/Library/FileSystems/NetFSPlugins/9p.bundle
KEDIR=/Library/Extensions/9p.kext
FSDIR=/Library/FileSystems/9p.fs
NPDIR=/Library/FileSystems/NetFSPlugins/9p.bundle
MAN=/usr/local/share/man/man8/mount_9p.8

DIRS=""
Expand Down
14 changes: 8 additions & 6 deletions inst/Welcome.rtf
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
{\rtf1\ansi\ansicpg1252\cocoartf1344\cocoasubrtf720
{\rtf1\ansi\ansicpg1252\cocoartf1404\cocoasubrtf110
\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
\margl1440\margr1440\vieww9000\viewh8400\viewkind0
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\qj
\margl1440\margr1440\vieww12040\viewh8580\viewkind0
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\qj\partightenfactor0

\f0\b\fs24 \cf0 Mac9P
\b0 allows you to mount 9P based file systems on Mac OS X.\
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
\cf0 \
For more information, please visit the
\b Mac9P
\b0 web site:\
\
{\field{\*\fldinst{HYPERLINK "https://bitbucket.org/fgb/mac9p/"}}{\fldrslt https://bitbucket.org/fgb/mac9p/}}\
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
{\field{\*\fldinst{HYPERLINK "https://github.com/benavento/mac9p"}}{\fldrslt https://github.com/benavento/mac9p}}\
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
{\field{\*\fldinst{HYPERLINK "http://code.google.com/p/mac9p"}}{\fldrslt \cf0 }}\
\'97\
Federico G. Benavento\
benavento@gmail.com\
}
Loading

0 comments on commit d24314c

Please sign in to comment.