From owner-freebsd-stable Fri Sep 4 18:48:53 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA18977 for freebsd-stable-outgoing; Fri, 4 Sep 1998 18:48:53 -0700 (PDT) (envelope-from owner-freebsd-stable@FreeBSD.ORG) Received: from news.westbend.net (news.westbend.net [207.217.224.197]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id SAA18970 for ; Fri, 4 Sep 1998 18:48:51 -0700 (PDT) (envelope-from hetzels@westbend.net) Received: from admin (admin.westbend.net [207.217.224.195]) by news.westbend.net (8.9.1/8.9.1) with SMTP id UAA25530; Fri, 4 Sep 1998 20:47:39 -0500 (CDT) (envelope-from hetzels@westbend.net) Message-ID: <004301bdd86f$0930bb40$c3e0d9cf@westbend.net> From: "Scot W. Hetzel" To: "Jan B. Koum " Cc: Subject: Re: cvsup + make world shell script Date: Fri, 4 Sep 1998 20:46:43 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.0518.4 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.0518.4 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG From: Jan B. Koum > > Hello, > > Anyone has a script which would CVSup and then make world which >they run every few days or so? If not, I'll write one. I was thinking of >having it even fetch(1) cvsup binary if there isn't one already and then >do CVSup based on uname -r and do some sanity checks... > Add to /etc/make.conf SUP_UPDATE= yes SUP= /usr/local/bin/cvsup SUPFLAGS= -g -L 2 -z SUPFILE= /etc/cvsupfile Then Create the /etc/cvsupfile *default host=cvsup.freebsd.org *default base=/usr *default prefix=/usr *default release=cvs *default tag=RELENG_2_2 *default delete use-rel-suffix src-all *default host=internate.freebsd.org #Only needed if not cvsuping from the US/Canada src-crypto src-secure *default tag=. ports-all doc-all Place the following script in the source directory (/usr/src): #!/bin/sh # # clean_obj(): This Routine removes the schg flag and cleans the obj directory clean_obj() { chflags -R noschg /usr/obj rm -r /usr/obj/* } # # make_update(): This routine uses the update target to run cvsup. make_update() { make update } # # patch(): This routine applies any user patches to the source tree. patch() { if [ -d patches ]; then \ ( cd patches ; make ); fi } # # make_world(): make_world() { make world -DNOGAMES 2>&1 | tee /var/tmp/mw.out } # # make_buildworld(): make_buildworld() { make buildworld -DNOGAMES 2>&1 | tee /var/tmp/mw.out } # # make_installworld(): make_installworld() { make installworld -DNOGAMES 2>&1 | tee /var/tmp/mw.out } # # make_cf(): Create a new sendmail cf file. make_cf() { SENDMAIL_CF=usr.sbin/sendmail/cf/cf ( cd ${SENDMAIL_CF} ; m4 ../m4/cf.m4 ${1}.mc > /etc/${1}.cf ) } # #make_kernel(): Creates a new kernel, but doesn't install it. Also, if the directories # for the ETinc HDLC card are present, we append the appropriate device info to # the /sys/i386/conf/files.386 file. make_kernel() { ( cd /sys/i386/conf ; \ if [ -f /usr/hdlc/dev/files.i386 ] ; then \ cp -rp files.i386 files.i386.orig ; \ echo "" >> files.i386.orig ; \ cat files.i386.orig /usr/hdlc/dev/files.i386 > files.i386 ; \ fi ; \ config ${1} ; \ cd ../../compile/${1} ; \ make depend ; \ make ) } # #make_root(): Creates a dummy tree (/var/tmp/root), containing all of the files # that are different from the main tree (/) make_root() { # #make_etc(): Backs up the current /etc, runs mtree to create the root, var, and # usr trees in the dummy root, and then creates the distribution in the dummy root make_etc() { ETC="/usr/src/etc" MTREE="mtree -deU -f" if [ -d /etc.old ] ; then rm -r /etc.old fi cp -rp /etc /etc.old if [ ! -d ${1} ] ; then mkdir ${1} fi ${MTREE} ${ETC}/mtree/BSD.root.dist -p ${1} ${MTREE} ${ETC}/mtree/BSD.var.dist -p ${1}/var ${MTREE} ${ETC}/mtree/BSD.usr.dist -p ${1}/usr ( cd ${ETC} ; \ make DESTDIR=${1} distribution ) } # #check_files(): Compares files from the main tree to the dummy tree, and removes # any files that are the same from the dummy tree. check_files() { ORIG=/ ( cd ${1} ; \ for i in `find -d . -type f` ; \ do \ diff -s ${1}/${i} ${ORIG}${i} ; \ TEST=$? ; \ if [ ${TEST} = 0 ] ; then \ rm ${1}/${i} ; \ fi ; \ done ) } # #rm_empty_dir(): This routine removes empty directories from the dummy tree. rm_empty_dir() { ( cd ${1}; find -d . -type d | /usr/bin/perl -lne \ 'opendir(D,$_);@f=readdir(D);rmdir if $#f = 1;closedir(D);' ) } TARGET="/var/tmp/root" make_etc ${TARGET} check_files ${TARGET} rm_empty_dir ${TARGET} } # # main # clean_obj make_update patch make_world #make_buildworld #make_installworld make_cf loretta #Change this to the name of your *.mc file make_kernel LORETTA #Change this to the name of your kernel config file make_root Scot To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message