Subject: pkg/16638: most Darwin installs lack a pkgsrc-compatible filesystem
To: None <gnats-bugs@gnats.netbsd.org>
From: None <schmonz@netbsd.org>
List: netbsd-bugs
Date: 05/03/2002 18:20:18
>Number: 16638
>Category: pkg
>Synopsis: most Darwin installs lack a pkgsrc-compatible filesystem
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri May 03 11:21:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Amitai Schlair
>Release: Darwin 5.4
>Organization:
Schmonz Enterprises
>Environment:
Darwin g3.apart.ment 5.4 Darwin Kernel Version 5.4: Wed Apr 10 09:27:47 PDT 2002; root:xnu/xnu-201.19.3.obj~1/RELEASE_PPC Power Macintosh powerpc
>Description:
Darwin supports two main filesystem types: HFS+ and UFS. The current
consensus is that pkgsrc requires UFS. However, most Darwin systems
are HFS+ and don't have a spare partition to format with UFS. Nor
is there (AFAIK) any easy way to convert from HFS+ to UFS.
(Rationale: The large majority of Darwin systems are factory-installed
Mac OS X, which means the disk is partitioned as one big HFS+. The
remainder are custom installs; the install docs recommend HFS+,
and the installers default to HFS+. Thus the odds are, to put it
delicately, not in our favor.)
>How-To-Repeat:
Given an ordinary Darwin system, attempt to extract pkgsrc.tar.gz
and fail due to filesystem case-insensitivity. Attempt to create
a UFS disk partition and fail for lack of unformatted disk space.
Attempt to prepare a UFS disk image for pkgsrc and fail due to
sub-obvious tools. :-)
>Fix:
I've written a small shell script that provides a sensible interface
to working with UFS disk images on Darwin. The bootstrap kit should
include it in some fashion -- either with instructions for running
it manually, or perhaps by automagically offering to prepare a UFS
disk image if there aren't any mounted UFS filesystems.
It needs a little more work before going in, but here's what I have
so far:
$ ftp http://netbsd.schmonz.com/misc/dmg_create
$ chmod +x dmg_create
$ for i in format mount umount; do ln dmg_create dmg_${i}; done
$ ./dmg_create ufsdisk.dmg 1024 # megabytes
$ ./dmg_format ufsdisk.dmg
$ ./dmg_mount ufsdisk.dmg /path/to/mount/point
$ ./dmg_umount /path/to/mount/point
>Release-Note:
>Audit-Trail:
>Unformatted: