[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Slink-CD (Part II)



Hi Steve,

I've now used the script you've provided but had to change some parts
and noticed some other oddities.  Do you want me to file the bugs as
bug reports so they get recorded and you get a reminder?

 2. Is there any reason why slink-cd is not an official Debian package
    such as debian-cd and dpkg-multicd?  I'd appreciate if it would be
    part of the standard distribution.

 3. Since slink-cd doesn't really depend on lha but needs it only for
    m68k cds you should change the depends in a recommends or suggests
    line.  lha is non-free thus slink-cd should not depend on it.

 4. There is /usr/src/slink-cd/COPYING which is superflous.

 5. In /usr/src/slink-cd/README, which should be in /usr/doc/slink-cd,
    you should mention how many free disk space is needed for the cd
    images.  Are all binary discs discs built at the same time?  Is
    free space for one enough?  What about "memory" so save Packages
    files?

 6. In /usr/src/slink-cd/README do a s/ustomise/ustomize/g (only in
    case my English isn't too bad)

 7. Why isn't there an overall configuration file where one can list
    the position of the slink mirror, non-US, tmp dir etc.?

 8. You write in /usr/src/slink-cd/README

       There is a patch for mkhybrid 1.12a4.7 included with this
       program. Grab the original source from
       http://www.ps.ucl.ac.uk/~jcpearso/mkhybrid.html or
       http://www.chiark.greenend.org.uk/~stevem/DebianCD/ . There is also a
       statically-linked i386 binary at the latter site. You will also need
       to add the "-F" option to the mkhybrid command line for this sym-links
       hack to work.

    I wonder why the patch isn't included in mkhybrid as included with
    Debian / and forwarded upstream?

 9. In /usr/src/slink-cd/README do a s/borken/broken/g

10. Why are executables placed in /usr/src/slink-cd instead of
    /usr/sbin/ or /usr/lib/slink-cd?  Such as mklist, mklinks,
    pkg-order etc.

11. slink_cd isn't as flexible as I thought, one can't precopy the
    .mkisofsrc, patch will follow.  The patch got bigger... It's
    appended.

12. In slink_cd I miss the ability to add local scripts in order to
    give special design, files or whatever to the disc, added in my
    version.  Check the patch for hook scripts.

13. I miss the ability to reconstruct the Contents file from scratch
    which looks proper to me if you create a 1 cd set or a set with
    additions (like Gnome 1.0) which are not present in regular slink.
    Patch will follow.  Not done yet, too few time atm.  FIXME

14. From what I analysed the slink_cd program doesn't create multicd
    discs as described in /usr/doc/dpkg-multicd/readme.txt.gz . I
    wonder why slink-cd doesn't use the proper multicd layout.

15. At least README.multicd misses a trailing newline

Regards,

	Joey

-- 
Unix is user friendly ...  It's just picky about its friends.

Please always Cc to me when replying to me on the lists.
--- ../slink_cd	Thu Apr  1 08:49:55 1999
+++ slink_cd	Tue Apr 13 11:22:58 1999
@@ -52,9 +52,9 @@
 # Options to use with mkisofs/mkhybrid - one of these should do you
 # If you're using i386 then -J will be added later to add Joliet stuff
 # * Why can't Windows read RockRidge like any sensible OS? *
-#MKISOFS_OPTS=${MKISOFS_OPTS:-"-a -r -T"} # For normal users
+MKISOFS_OPTS=${MKISOFS_OPTS:-"-a -r -T"} # For normal users
 
-MKISOFS_OPTS=${MKISOFS_OPTS:-"-a -r -F -T"} # For sym-link farmers. 
+#MKISOFS_OPTS=${MKISOFS_OPTS:-"-a -r -F -T"} # For sym-link farmers. 
 # Also make sure you have a patched mkhybrid - read the README
 
 # TDIR must be on the same partition as the mirror for hard links trick 
@@ -233,34 +233,65 @@
 fi
 
 error=0
-vecho VERBOSE=$VERBOSE
-vecho CLEAN=$CLEAN
-vecho GENLIST=$GENLIST
-vecho TREE=$TREE
-vecho GENLINKS=$GENLINKS
-vecho FLATTEN=$FLATTEN
-vecho MD5CHECK=$MD5CHECK
-vecho PACKAGES=$PACKAGES
-vecho BOOT=$BOOT
-vecho EXTRAS=$EXTRAS
-vecho MD5LIST=$MD5LIST
-vecho IMAGES=$IMAGES
-vecho IMAGE1=$IMAGE1 
-vecho IMAGE2=$IMAGE2
-vecho IMAGE3=$IMAGE3 
-vecho IMAGE4=$IMAGE4 
-vecho IMAGE5=$IMAGE5 
-vecho IMAGESUMS=$IMAGESUMS
-vecho ARCH=$ARCH
-vecho MIRROR=$MIRROR
-vecho NONUS=$NONUS
-vecho MKISOFS=$MKISOFS
-vecho TDIR=$TDIR
-vecho OUT=$OUT
-vecho BASEDIR=$BASEDIR
-vecho NU=$NU
-vecho NF=$NF
-vecho SINGLE_DISK=$SINGLE_DISK
+vvvecho VERBOSE=$VERBOSE
+vvvecho CLEAN=$CLEAN
+vvvecho GENLIST=$GENLIST
+vvvecho TREE=$TREE
+vvvecho GENLINKS=$GENLINKS
+vvvecho FLATTEN=$FLATTEN
+vvvecho MD5CHECK=$MD5CHECK
+vvvecho PACKAGES=$PACKAGES
+vvvecho BOOT=$BOOT
+vvvecho EXTRAS=$EXTRAS
+vvvecho MD5LIST=$MD5LIST
+vvvecho IMAGES=$IMAGES
+vvvecho IMAGE1=$IMAGE1 
+vvvecho IMAGE2=$IMAGE2
+vvvecho IMAGE3=$IMAGE3 
+vvvecho IMAGE4=$IMAGE4 
+vvvecho IMAGE5=$IMAGE5 
+vvvecho IMAGESUMS=$IMAGESUMS
+vvvecho ARCH=$ARCH
+vvvecho MIRROR=$MIRROR
+vvvecho NONUS=$NONUS
+vvvecho MKISOFS=$MKISOFS
+vvvecho TDIR=$TDIR
+vvvecho OUT=$OUT
+vvvecho BASEDIR=$BASEDIR
+vvvecho NU=$NU
+vvvecho NF=$NF
+vvvecho SINGLE_DISK=$SINGLE_DISK
+
+# Export the variables so they will be present in hook scripts as well
+export VERBOSE
+export CLEAN
+export GENLIST
+export TREE
+export GENLINKS
+export FLATTEN
+export MD5CHECK
+export PACKAGES
+export BOOT
+export EXTRAS
+export MD5LIST
+export IMAGES
+export IMAGE1
+export IMAGE2
+export IMAGE3
+export IMAGE4
+export IMAGE5
+export IMAGESUMS
+export ARCH
+export MIRROR
+export NONUS
+export MKISOFS
+export TDIR
+export OUT
+export BASEDIR
+export NU
+export NF
+export SINGLE_DISK
+
 
 # Sort out non-US link - this should be done better...
 if [ "$NU"x = "1"x ] ; then
@@ -291,7 +322,7 @@
 fi
 TDIR=$PWD
 popd >/dev/null
-vecho TDIR is now $TDIR
+vvecho TDIR is now $TDIR
 
 vecho Checking MIRROR is set OK
 # Does it exist?
@@ -430,65 +461,91 @@
 	fi
 fi	
 
+# If you want to use your own configuration which might be different
+# from the one provided in this package, simply copy your files into
+# $TDIR, they won't be overwritten.
+
 vecho "Making working copies of config files, converting ARCH to $ARCH"
-if [ -e $TDIR/slink1.list ] ; then
-    vecho "You already appear to have them. I therefore assume the ones in"
-    vecho "$TDIR are correct and I will leave them alone. If you"
-    vecho "want to generate new ones, delete the file \"slink1.list\" in"
-    vecho "$TDIR and try again."
-else
-    for i in $DISKLIST
+vecho "If you already installed them in $TDIR I assume they are"
+vecho "correct and I will leave them alone.  If you want to generate new"
+vecho "ones, delete the proper file in $TDIR and try again."
+
+for i in $DISKLIST
+do
+    for TYPE in list info volid extras optional
     do
-        for TYPE in list info volid extras optional
-        do
-			if [ -e slink$i.$TYPE ] ; then
-				vecho "    slink$i.$TYPE"
-				cat slink$i.$TYPE | sed "s/ARCH/$ARCH/g" >$TDIR/slink$i.$TYPE
-			fi
-        done
-    done
-	vecho "    mkisofsrc"
-	cat mkisofsrc | sed "s/ARCH/$ARCH/g" >$TDIR/.mkisofs
-	ln -s .mkisofs $TDIR/.mkisofsrc
-	vecho "    slink1.needed" 
-	slice master
-	if [ $? -gt 0 ] ; then
-		echo "\"slice master\" failed - do you have the slice package installed?"
-		echo Exit.
-		exit 1
+	if [ -e slink$i.$TYPE ] ; then
+	    vecho "    slink$i.$TYPE"
+	    if [ -e $TDIR/slink$i.$TYPE ] ; then
+		vecho  "        not overwritten"
+	    else
+		cat slink$i.$TYPE | sed "s/ARCH/$ARCH/g" >$TDIR/slink$i.$TYPE
+	    fi
 	fi
-	echo "# Do not edit this file - it is automatically generated." >$TDIR/slink1.needed
-	echo "# Edit \"master\" instead." >>$TDIR/slink1.needed
-	cat master.$ARCH | awk -F':' '
-	/Packages:/ {packages++; next} 
-	/.+.+/      {if(packages) {print $1}}
-	' |sort |uniq >>$TDIR/slink1.needed
-	rm master.*
+    done
+done
 
-	vecho "    slink1.useful" 
-	slice useful
-	if [ $? -gt 0 ] ; then
-		echo "\"slice useful\" failed - do you have the slice package installed?"
-		echo Exit.
-		exit 1
-	fi
-	echo "# Do not edit this file - it is automatically generated." >$TDIR/slink1.useful
-	echo "# Edit \"useful\" instead." >>$TDIR/slink1.useful
-	cat useful.$ARCH | awk -F':' '
-	/.+.+/      {print $1}
-	' |sort |uniq >>$TDIR/slink1.useful
-	rm useful.*
-
-	# Check for non-US entries in these files - if we mention it then fix it...
-	if [ "$NU"x != "1"x ] ; then
-		vecho "non-US option not given, so removing non-US references from file lists"
-		for file in $TDIR/slink*.list
-		do
-			mv $file $file.1
-			vecho "    $file"
-			grep -v non-US $file.1 >$file
-		done
-	fi
+vecho "    mkisofs"
+if [ -e $TDIR/.mkisofs ] ; then
+    vecho  "        not overwritten"
+else
+    cat mkisofsrc | sed "s/ARCH/$ARCH/g" >$TDIR/.mkisofs
+fi
+
+vecho "    mkisofsrc"
+if [ -e $TDIR/.mkisofsrc ] ; then
+    vecho  "        not overwritten"
+else
+    ln -s .mkisofs $TDIR/.mkisofsrc
+fi
+
+vecho "    slink1.needed" 
+if [ -e $TDIR/slink1.needed ] ; then
+    vecho  "        not overwritten"
+else
+    slice master
+    if [ $? -gt 0 ] ; then
+	echo "\"slice master\" failed - do you have the slice package installed?"
+	echo Exit.
+	exit 1
+    fi
+    echo "# Do not edit this file - it is automatically generated." >$TDIR/slink1.needed
+    echo "# Edit \"master\" instead." >>$TDIR/slink1.needed
+    cat master.$ARCH | awk -F':' '
+    /Packages:/ {packages++; next} 
+    /.+.+/      {if(packages) {print $1}}
+    ' |sort |uniq >>$TDIR/slink1.needed
+    rm master.*
+fi
+
+vecho "    slink1.useful" 
+if [ -e $TDIR/slink1.useful ] ; then
+    vecho  "        not overwritten"
+else
+    slice useful
+    if [ $? -gt 0 ] ; then
+	echo "\"slice useful\" failed - do you have the slice package installed?"
+	echo Exit.
+	exit 1
+    fi
+    echo "# Do not edit this file - it is automatically generated." >$TDIR/slink1.useful
+    echo "# Edit \"useful\" instead." >>$TDIR/slink1.useful
+    cat useful.$ARCH | awk -F':' '
+    /.+.+/      {print $1}
+    ' |sort |uniq >>$TDIR/slink1.useful
+    rm useful.*
+fi
+
+# Check for non-US entries in these files - if we mention it then fix it...
+if [ "$NU"x != "1"x ] ; then
+    vecho "non-US option not given, so removing non-US references from file lists"
+    for file in $TDIR/slink*.list
+    do
+	mv $file $file.1
+	vecho "    $file"
+	grep -v non-US $file.1 >$file
+	rm $file.1
+    done
 fi
 
 if [ $error -eq 0 ] ; then
@@ -562,7 +619,7 @@
 # Make initial tree(s)
 if [ $error -eq 0 ] ; then
     if [ "$TREE"x = "1"x ] ; then
-		echo TREE:
+	vecho "Make initial tree(s)"
         cd $TDIR
 
 		# First of all the general stuff to go on all disks.
@@ -873,6 +930,17 @@
     fi
 fi
 
+# Call a hook with hook-script <nr. disk> <before-scanpackages | before-mkisofs>
+vecho "Executing hook scripts"
+for i in $DISKLIST
+do
+    if [ -x $TDIR/slink$i.hook ]
+    then
+	vecho "    slink$i.hook $DISKLIST before-scanpackages"
+	$TDIR/slink$i.hook $DISKLIST before-scanpackages
+    fi
+done
+
 if [ $error -eq 0 ] ; then
     if [ "$PACKAGES"x = "1"x ] ; then
 		echo PACKAGES:
@@ -959,7 +1027,8 @@
 		echo "Checking dependencies"
 		echo "   CD #1"
 		>/tmp/foo
-		$BASEDIR/pkg-order --nocheck-conflicts --nooutput-order --installed-packages /tmp/foo $TDIR/Packages-main.1 >$TDIR/pkg-order.1 2>&1 
+		$BASEDIR/pkg-order --nocheck-conflicts --nooutput-order --installed-packages /tmp/foo $TDIR/Packages-main.1 \
+		    >$TDIR/pkg-order.1 2>&1 
 		if [ $? -gt 0 ] ; then
 			echo "Dependencies of CD #1 cannot be met:"
 		    cat $TDIR/pkg-order.1
@@ -974,8 +1043,10 @@
 		if [ "$SINGLE_DISK"x != "1"x ] ; then
 			echo "   All CDs"
 			# Use sed here to fix broken package Depends: line
-			cat $TDIR/Packages* | sed 's/^Suggests:\ metro-motif-devel\ (2/Suggests:\ metro-motif-devel\ (=\ 2/g' >$TDIR/Packages-all
-			$BASEDIR/pkg-order --nocheck-conflicts --nooutput-order --check-recommends --installed-packages /tmp/foo $TDIR/Packages-all >$TDIR/pkg-order.2 2>&1 
+			cat $TDIR/Packages* \
+			    |sed 's/^Suggests:\ metro-motif-devel\ (2/Suggests:\ metro-motif-devel\ (=\ 2/g' >$TDIR/Packages-all
+			$BASEDIR/pkg-order --nocheck-conflicts --nooutput-order --check-recommends --installed-packages /tmp/foo \
+			    $TDIR/Packages-all >$TDIR/pkg-order.2 2>&1 
 			if [ $? -gt 0 ] ; then
 				echo Dependencies of the CD set cannot be met:
 				if [ "$NF"x = 1 -a "$NU"x = 1 ] ; then
@@ -1154,6 +1225,17 @@
     fi
 fi
 
+# Call a hook with hook-script <nr. disk> <before-scanpackges | before-mkisofs>
+vecho "Executing hook scripts"
+for i in $DISKLIST
+do
+    if [ -x $TDIR/slink$i.hook ]
+    then
+	vecho "    slink$i.hook $DISKLIST before-mkisofs"
+	$TDIR/slink$i.hook $DISKLIST before-mkisofs
+    fi
+done
+
 if [ $error -eq 0 ] ; then
 
 	# Add HFS flags for m68k/powerpc for macs
@@ -1175,6 +1257,8 @@
 			-o $OUT/slink1-$ARCH.raw $MKISOFS_OPTS_DISC1 slink1 
         $MKISOFS $MKISOFS_OPTS -V "$VOLID1" \
 			-o $OUT/slink1-$ARCH.raw $MKISOFS_OPTS_DISC1 slink1
+        vecho $MKISOFS $MKISOFS_OPTS -V "$VOLID1" \
+			-o $OUT/slink1-$ARCH.raw $MKISOFS_OPTS_DISC1 slink1 
     fi
 
     if [ "$IMAGE2"x = "1"x ] ; then

Reply to: