Bug 101762 - sysinstall(8) does not obey /usr/ports symlink while installing ports tree
Summary: sysinstall(8) does not obey /usr/ports symlink while installing ports tree
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 6.1-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-sysinstall (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-10 16:30 UTC by Eugene Grosbein
Modified: 2015-11-10 09:12 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Grosbein 2006-08-10 16:30:15 UTC
	I've booted 6.1-RELEASE installation CD and installed this release
	using 'Custom' mode. I've created 128M-sized root and 256M-sized /usr,
	4G /usr/local and 15G /home and selected only base distribution
	(and kernels).

	I've booted the new installation from hard drive, created directory
	/home/ports and made symlink /usr/ports -> /home/ports.
	Then I mounted CD and ran sysinstall to install Ports Collection.
	I hoped it will populate /home/ports. However, sysinstall removed
	/usr/ports symlink and started to fill /usr/ports directory,
	quickly ran out of vnodes and failed.

	The same attempt for src distribution was successful, sysinstall
	has not removed /usr/src -> /home/src symlink and populated /home/src
	directory.

Fix: 

Unknown.
How-To-Repeat: 	
	Make empty /home/ports directory, make /usr/ports symlink pointing
	to /home/ports, run sysinstall and try to install Ports Collection
	from FreeBSD 6.1-RELEASE CD (disk1). Sysinstall removes /usr/ports
	symlink, recreates it as directory and unrolls ports to /usr partition.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2006-08-10 20:18:32 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-qa

Over to maintainer(s).
Comment 2 Erwin Lansing freebsd_committer freebsd_triage 2006-12-17 15:52:04 UTC
State Changed
From-To: open->analyzed

The problem here is that the tarballs for source are packaged 
relative to /usr/src/... while the ports tarball is relative 
to /usr/... and unpackages ports/... Thus the src tarballs 
never touch src/, but ports will create, and overwrite any 
existing, ports/. 

Fixing is easy, from a code viewpoint.  Change the 
DTE_TARBALL for ports to /usr/ports and let the release 
building process build ports relative to /usr/ports/. 
However, doing this will create a ports tarball that is 
no longer usable by older sysinstall and some form of 
backwards compatability magic is needed.
Comment 3 Gavin Atkinson freebsd_committer freebsd_triage 2010-07-13 14:37:09 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-sysinstall

Over to maintainer(s)
Comment 4 Garrett Cooper 2010-07-13 16:27:34 UTC
To add another dimension to the issue, cpio is used when extracting
the dist tarballs, and -du is specified on the cpio command line:

     -d      (i and p modes) Create directories as necessary.

     -u      (i and p modes) Unconditionally overwrite existing files.  Ordi-
             narily, an older file will not overwrite a newer file on disk.

So it creates the directories if they don't already exist.

See media.c for more details.

Cheers,
-Garrett
Comment 5 Enji Cooper freebsd_committer freebsd_triage 2015-11-10 09:07:22 UTC
sysinstall has been replaced by bsdinstall in FreeBSD 9.x. Closing.
Comment 6 Enji Cooper freebsd_committer freebsd_triage 2015-11-10 09:12:14 UTC
sysinstall has been replaced by bsdinstall in FreeBSD 9.x. Closing.