Now cpio works for me. (it was Mostly confusion about when the chroot

happened)
Make vsystem crunch aware in an intelligent fashion.
make the boot.flp target more specific (and faster).
This commit is contained in:
Poul-Henning Kamp 1995-05-20 23:33:14 +00:00
parent 96fe1684f2
commit 3525074d14
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=8663
7 changed files with 42 additions and 48 deletions

View File

@ -1,4 +1,4 @@
# $Id: Makefile,v 1.159 1995/05/20 13:49:47 jkh Exp $
# $Id: Makefile,v 1.160 1995/05/20 13:52:53 jkh Exp $
#
# How to roll a release:
#
@ -58,6 +58,10 @@ RD= ${RELEASEDIR}/stage
FD= ${RELEASEDIR}/ftp
CD= ${RELEASEDIR}/cdrom
.if !defined(WHICH_CRUNCH)
WHICH_CRUNCH= boot cpio fixit
.endif
release:
.if !defined(CHROOTDIR) || !defined(BUILDNAME)
@echo "To make a release you must set CHROOTDIR and BUILDNAME" && false
@ -200,12 +204,13 @@ release.4:
@cd ${.CURDIR} ; $(MAKE) ckRELEASEDIR
rm -rf ${RD}/crunch
mkdir -p ${RD}/crunch
for j in boot cpio fixit; do \
for j in ${WHICH_CRUNCH} ; do \
rm -rf $${j}_crunch && \
mkdir $${j}_crunch && \
( cd $${j}_crunch && \
crunchgen ${.CURDIR}/$${j}_crunch.conf && \
${MAKE} -f $${j}_crunch.mk objs exe NOCRYPT=yes ) && \
${MAKE} -f $${j}_crunch.mk objs exe NOCRYPT=yes \
"CFLAGS=${CFLAGS} -DCRUNCHED_BINARY") && \
mv $${j}_crunch/$${j}_crunch ${RD}/crunch/$${j} && \
rm -rf $${j}_crunch ; \
done
@ -439,6 +444,10 @@ floppies:
rm -f release.4 release.6 release.7 release.10
cd ${.CURDIR} && ${MAKE} doRELEASE
boot.flp:
rm -f release.4 release.6
cd ${.CURDIR} && ${MAKE} release.4 release.6 WHICH_CRUNCH=boot
ckRELEASEDIR:
.if !defined(RELEASEDIR)
@echo "To make a release RELEASEDIR must be defined" && false

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: install.c,v 1.42 1995/05/20 19:22:20 jkh Exp $
* $Id: install.c,v 1.43 1995/05/20 20:30:08 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -140,6 +140,8 @@ installInitial(void)
make_filesystems();
copy_self();
dialog_clear();
chroot("/mnt");
chdir("/");
cpio_extract();
alreadyDone = TRUE;
}
@ -272,7 +274,7 @@ copy_self(void)
int i;
msgNotify("Copying the boot floppy to /stand on root filesystem");
i = vsystem("find -x / | cpio -pdmv /mnt");
i = vsystem("find -x /stand | cpio -pdmv /mnt");
if (i)
msgConfirm("Copy returned error status of %d!", i);
}
@ -292,7 +294,7 @@ cpio_extract(void)
}
j = fork();
if (!j) {
chroot("/mnt"); chdir("/");
chdir("/");
msgNotify("Extracting contents of CPIO floppy...");
pipe(pfd);
zpid = fork();
@ -341,14 +343,14 @@ cpio_extract(void)
}
else
i = wait(&j);
if (i < 0 || _WSTATUS(j) || access("/mnt/OK", R_OK) == -1) {
if (i < 0 || _WSTATUS(j) || access("/OK", R_OK) == -1) {
dialog_clear();
msgConfirm("CPIO floppy did not extract properly! Please verify\nthat your media is correct and try again.");
close(CpioFD);
CpioFD = -1;
goto tryagain;
}
unlink("/mnt/OK");
unlink("/OK");
}
static void

View File

@ -276,12 +276,10 @@ systemChangeScreenmap(const u_char newmap[])
dialog_clear();
}
}
#if 0
/* Execute a command that is crunched into the same binary */
int
vsystem(char *fmt, ...)
{
#ifdef CRUNCHED_BINARY
va_list args;
union wait pstat;
pid_t pid;
@ -329,12 +327,7 @@ vsystem(char *fmt, ...)
msgDebug("Command `%s' returns status of %d\n", cmd, i);
free(cmd);
return i;
}
#else
/* Execute a system command, with varargs */
int
vsystem(char *fmt, ...)
{
#else /* Not crunched */
va_list args;
union wait pstat;
pid_t pid;
@ -377,5 +370,5 @@ vsystem(char *fmt, ...)
msgDebug("Command `%s' returns status of %d\n", cmd, i);
free(cmd);
return i;
}
#endif
}

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: install.c,v 1.42 1995/05/20 19:22:20 jkh Exp $
* $Id: install.c,v 1.43 1995/05/20 20:30:08 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -140,6 +140,8 @@ installInitial(void)
make_filesystems();
copy_self();
dialog_clear();
chroot("/mnt");
chdir("/");
cpio_extract();
alreadyDone = TRUE;
}
@ -272,7 +274,7 @@ copy_self(void)
int i;
msgNotify("Copying the boot floppy to /stand on root filesystem");
i = vsystem("find -x / | cpio -pdmv /mnt");
i = vsystem("find -x /stand | cpio -pdmv /mnt");
if (i)
msgConfirm("Copy returned error status of %d!", i);
}
@ -292,7 +294,7 @@ cpio_extract(void)
}
j = fork();
if (!j) {
chroot("/mnt"); chdir("/");
chdir("/");
msgNotify("Extracting contents of CPIO floppy...");
pipe(pfd);
zpid = fork();
@ -341,14 +343,14 @@ cpio_extract(void)
}
else
i = wait(&j);
if (i < 0 || _WSTATUS(j) || access("/mnt/OK", R_OK) == -1) {
if (i < 0 || _WSTATUS(j) || access("/OK", R_OK) == -1) {
dialog_clear();
msgConfirm("CPIO floppy did not extract properly! Please verify\nthat your media is correct and try again.");
close(CpioFD);
CpioFD = -1;
goto tryagain;
}
unlink("/mnt/OK");
unlink("/OK");
}
static void

View File

@ -276,12 +276,10 @@ systemChangeScreenmap(const u_char newmap[])
dialog_clear();
}
}
#if 0
/* Execute a command that is crunched into the same binary */
int
vsystem(char *fmt, ...)
{
#ifdef CRUNCHED_BINARY
va_list args;
union wait pstat;
pid_t pid;
@ -329,12 +327,7 @@ vsystem(char *fmt, ...)
msgDebug("Command `%s' returns status of %d\n", cmd, i);
free(cmd);
return i;
}
#else
/* Execute a system command, with varargs */
int
vsystem(char *fmt, ...)
{
#else /* Not crunched */
va_list args;
union wait pstat;
pid_t pid;
@ -377,5 +370,5 @@ vsystem(char *fmt, ...)
msgDebug("Command `%s' returns status of %d\n", cmd, i);
free(cmd);
return i;
}
#endif
}

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: install.c,v 1.42 1995/05/20 19:22:20 jkh Exp $
* $Id: install.c,v 1.43 1995/05/20 20:30:08 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -140,6 +140,8 @@ installInitial(void)
make_filesystems();
copy_self();
dialog_clear();
chroot("/mnt");
chdir("/");
cpio_extract();
alreadyDone = TRUE;
}
@ -272,7 +274,7 @@ copy_self(void)
int i;
msgNotify("Copying the boot floppy to /stand on root filesystem");
i = vsystem("find -x / | cpio -pdmv /mnt");
i = vsystem("find -x /stand | cpio -pdmv /mnt");
if (i)
msgConfirm("Copy returned error status of %d!", i);
}
@ -292,7 +294,7 @@ cpio_extract(void)
}
j = fork();
if (!j) {
chroot("/mnt"); chdir("/");
chdir("/");
msgNotify("Extracting contents of CPIO floppy...");
pipe(pfd);
zpid = fork();
@ -341,14 +343,14 @@ cpio_extract(void)
}
else
i = wait(&j);
if (i < 0 || _WSTATUS(j) || access("/mnt/OK", R_OK) == -1) {
if (i < 0 || _WSTATUS(j) || access("/OK", R_OK) == -1) {
dialog_clear();
msgConfirm("CPIO floppy did not extract properly! Please verify\nthat your media is correct and try again.");
close(CpioFD);
CpioFD = -1;
goto tryagain;
}
unlink("/mnt/OK");
unlink("/OK");
}
static void

View File

@ -276,12 +276,10 @@ systemChangeScreenmap(const u_char newmap[])
dialog_clear();
}
}
#if 0
/* Execute a command that is crunched into the same binary */
int
vsystem(char *fmt, ...)
{
#ifdef CRUNCHED_BINARY
va_list args;
union wait pstat;
pid_t pid;
@ -329,12 +327,7 @@ vsystem(char *fmt, ...)
msgDebug("Command `%s' returns status of %d\n", cmd, i);
free(cmd);
return i;
}
#else
/* Execute a system command, with varargs */
int
vsystem(char *fmt, ...)
{
#else /* Not crunched */
va_list args;
union wait pstat;
pid_t pid;
@ -377,5 +370,5 @@ vsystem(char *fmt, ...)
msgDebug("Command `%s' returns status of %d\n", cmd, i);
free(cmd);
return i;
}
#endif
}