>> | > Where sysupgrade ? reboot the machine, see your disks overflow. Boom
>> machine
>> | > kaput.
Disk overflow -> boom can happen anyway even if you had installed all sets
previously.
>> | The problem boils down to: how does sysupgrade, or any other tool, know
>> | which sets have been installed?
>>
>> By having each set install a specific file in a well-known location.
>> Before sysupgrade I wrote my own script to upgrade machines, this uses
>> /var/db/sets/{base,comp,game,man,xbase,xfont,xserve,xshare} to
>> determine what has been installed and upgrade only those sets.
>
> We actually know what file belongs to which set.
> see /usr/lib/locate/src.db
Because sysupgrade depends on boot loader changes in late 6.5-current
snapshots, it doesn't need to concern itself with identifying installed
sets from <=6.5, adding a simple flag file to each set would be enough
to detect them. Something like this untested diff (plus an analogue
in x's mkr).
(To be clear, I think installing a restricted subset of the OS for
security reasons is pointless here, but can be really helpful when you
have to deal with limited space in partitions - and those just saying
"storage is cheap" are ignoring the often very real cost of getting
to the machine to replace the storage :)
Index: etc/Makefile
===================================================================
RCS file: /cvs/src/etc/Makefile,v
retrieving revision 1.471
diff -u -p -r1.471 Makefile
--- etc/Makefile 12 Aug 2019 09:49:21 -0000 1.471
+++ etc/Makefile 17 Sep 2019 14:17:47 -0000
@@ -66,7 +66,8 @@ RCDAEMONS=amd apmd bgpd bootparamd cron
spamlogd sshd statd switchd syslogd tftpd tftpproxy unbound \
unwind vmd watchdogd wsmoused xenodm ypbind ypldap ypserv
-MISETS= base${OSrev}.tgz comp${OSrev}.tgz man${OSrev}.tgz
game${OSrev}.tgz
+MISETLIST=base comp man game
+MISETS= ${MISETLIST:=${OSrev}.tgz}
all clean cleandir depend etc install:
@@ -222,6 +223,8 @@ distribution-etc-root-var: distrib-dirs
${DESTDIR}/etc/rc.d
cd ${DESTDIR}/var; ln -fs ../tmp
chown -h root:wheel ${DESTDIR}/var/tmp
+ cd ${DESTDIR}/var/db/sets; touch ${MISETLIST}
+ chown -R -h root:wheel ${DESTDIR}/var/db/sets
touch ${DESTDIR}/var/sysmerge/etcsum
chown root:wheel ${DESTDIR}/var/sysmerge/etcsum
chmod 644 ${DESTDIR}/var/sysmerge/etcsum
Index: etc/mtree/4.4BSD.dist
===================================================================
RCS file: /cvs/src/etc/mtree/4.4BSD.dist,v
retrieving revision 1.312
diff -u -p -r1.312 4.4BSD.dist
--- etc/mtree/4.4BSD.dist 27 Jul 2019 14:10:21 -0000 1.312
+++ etc/mtree/4.4BSD.dist 17 Sep 2019 14:20:04 -0000
@@ -630,6 +630,8 @@ var
..
pkg
..
+ sets
+ ..
yubikey uname=root gname=auth mode=0770
..
..
Index: distrib/sets/lists/base/mi
===================================================================
RCS file: /cvs/src/distrib/sets/lists/base/mi,v
retrieving revision 1.961
diff -u -p -r1.961 mi
--- distrib/sets/lists/base/mi 19 Aug 2019 19:55:54 -0000 1.961
+++ distrib/sets/lists/base/mi 17 Sep 2019 14:17:47 -0000
@@ -7481,6 +7481,8 @@
./var/db/ldap
./var/db/ns
./var/db/pkg
+./var/db/sets
+./var/db/sets/base
./var/db/yubikey
./var/empty
./var/games
Index: distrib/sets/lists/comp/mi
===================================================================
RCS file: /cvs/src/distrib/sets/lists/comp/mi,v
retrieving revision 1.1469
diff -u -p -r1.1469 mi
--- distrib/sets/lists/comp/mi 9 Sep 2019 16:49:34 -0000 1.1469
+++ distrib/sets/lists/comp/mi 17 Sep 2019 14:17:47 -0000
@@ -3033,3 +3033,4 @@
./usr/share/misc/gprof.callg
./usr/share/misc/gprof.flat
./var/db/libc.tags
+./var/db/sets/comp
Index: distrib/sets/lists/game/mi
===================================================================
RCS file: /cvs/src/distrib/sets/lists/game/mi,v
retrieving revision 1.28
diff -u -p -r1.28 mi
--- distrib/sets/lists/game/mi 6 Apr 2019 17:44:51 -0000 1.28
+++ distrib/sets/lists/game/mi 17 Sep 2019 14:17:47 -0000
@@ -165,6 +165,7 @@
./usr/share/man/man6/worm.6
./usr/share/man/man6/worms.6
./usr/share/man/man6/wump.6
+./var/db/sets/game
./var/games/phantasia
./var/games/phantasia/characs
./var/games/phantasia/gold
Index: distrib/sets/lists/man/mi
===================================================================
RCS file: /cvs/src/distrib/sets/lists/man/mi,v
retrieving revision 1.1531
diff -u -p -r1.1531 mi
--- distrib/sets/lists/man/mi 15 Sep 2019 07:25:18 -0000 1.1531
+++ distrib/sets/lists/man/mi 17 Sep 2019 14:17:47 -0000
@@ -2566,3 +2566,4 @@
./usr/share/man/man8/ypxfr.8
./usr/share/man/man8/zdump.8
./usr/share/man/man8/zic.8
+./var/db/sets/man