Bug 13900

Summary: [PATCH] sysinstall can get SIGPIPE if a distr. file is broken
Product: Base System Reporter: un1i <un1i>
Component: confAssignee: jkh
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.0-CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description un1i 1999-09-22 20:10:00 UTC
	Under certain circumstances (e.g., when fetching files in FTP ASCII mode
	from a server that does LF->CRLF substitution), distribution files can
	be damaged in such a way that gunzip or cpio stops. Sysinstall tries to
    write more data to it and therefore gets a SIGPIPE.

Fix: I don't think it's necessary to handle this case differently from others
	that are already handled, so ignoring the signal is enough.
	But a hint for the user might be helpful (in dist.c and media.c).

/usr/src/release#diff -ru sysinstall sysinstall.new 
How-To-Repeat: 
/tmp%mkdir compat20 ; cd compat20
/tmp/compat20%fetch ftp://ftp2.de.freebsd.org/pub/FreeBSD/releases/i386/3.3-RELEASE/compat20/compat20.aa
/tmp/compat20%fetch ftp://ftp2.de.freebsd.org/pub/FreeBSD/releases/i386/3.3-RELEASE/compat20/compat20.ab
/tmp/compat20%fetch ftp://ftp2.de.freebsd.org/pub/FreeBSD/releases/i386/3.3-RELEASE/compat20/compat20.inf
/tmp/compat20%fetch ftp://ftp2.de.freebsd.org/pub/FreeBSD/releases/i386/3.3-RELEASE/compat20/compat20.mtree
/tmp/compat20%mv compat20.aa x
/tmp/compat20%sed -e 's/.*/&^M/' < x > compat20.aa   # simulate damage

Now use sysinstall to install this distribution from filesystem.
Comment 1 Sheldon Hearn freebsd_committer freebsd_triage 1999-09-22 20:32:08 UTC
Responsible Changed
From-To: freebsd-bugs->jkh

's see what Jordan has to say about this. :-) 
Comment 2 jkh freebsd_committer freebsd_triage 2000-01-04 04:28:56 UTC
State Changed
From-To: open->closed

Agreed, fix adopted, thanks.