Browse Source

We don't need /platform in a zone

master
Peter Tribble 5 years ago
parent
commit
fa73ae7f97
  1. 3
      etc/zones/TRIBsparse.xml
  2. 2
      pkginfo
  3. 4
      usr/lib/brand/sparse-root/pkgcreatezone
  4. 5
      usr/lib/brand/whole-root/pkgcreatezone
  5. 4
      usr/share/man/man5/sparse-root.5

3
etc/zones/TRIBsparse.xml

@ -10,9 +10,6 @@
<filesystem special="/sbin" directory="/sbin" type="lofs">
<fsoption name="ro"/>
</filesystem>
<filesystem special="/platform" directory="/platform" type="lofs">
<fsoption name="ro"/>
</filesystem>
<filesystem special="/zonelib/lib" directory="/lib" type="lofs">
<fsoption name="ro"/>
</filesystem>

2
pkginfo

@ -1,6 +1,6 @@
PKG="TRIBblix-zones"
NAME="Tribblix zone brands"
VERSION="0.20.1"
VERSION="0.20.2"
ZAP_URL="https://github.com/tribblix/tribblix-zones"
ARCH="i386,sparc"
CATEGORY="application"

4
usr/lib/brand/sparse-root/pkgcreatezone

@ -101,7 +101,7 @@ cd /
grep '^/etc' /var/sadm/install/contents | nawk '{print $1}' | sed -e 's:=: :' -e 's:/::' | nawk '{print $1}' | cpio -pdm $ZONEROOT
grep '^/var' /var/sadm/install/contents | nawk '{print $1}' | sed 's:=: :' | nawk '{print $1}' | cpio -pdm $ZONEROOT
find var/sadm/pkg var/sadm/overlays -print -depth | grep -v save/pspool | cpio -pdm $ZONEROOT
mkdir -p $ZONEROOT/opt $ZONEROOT/usr $ZONEROOT/lib $ZONEROOT/platform
mkdir -p $ZONEROOT/opt $ZONEROOT/usr $ZONEROOT/lib
mkdir -p $ZONEROOT/mnt $ZONEROOT/sbin $ZONEROOT/export
mkdir -m 777 $ZONEROOT/tmp
mkdir -m 700 $ZONEROOT/root
@ -118,7 +118,7 @@ find /var/sadm/pkg -xdev -type f | grep '.*/pspool/.*/reloc/var' | nawk -v DEST=
#
# copy in a cleaned up contents file
#
egrep -v '^/(boot|kernel|devices|opt)' /var/sadm/install/contents > $ZONEROOT/var/sadm/install/contents
egrep -v '^/(boot|kernel|devices|opt|platform)' /var/sadm/install/contents > $ZONEROOT/var/sadm/install/contents
#
# remove metadata for any installed packages that populate /opt

5
usr/lib/brand/whole-root/pkgcreatezone

@ -169,7 +169,6 @@ grep '^/etc' $CONTENTS_SOURCE | nawk '{print $1}' | sed -e 's:=: :' -e 's:/::' |
grep '^/var' $CONTENTS_SOURCE | nawk '{print $1}' | sed 's:=: :' | nawk '{print $1}' | cpio -pdm $ZONEROOT
grep '^/usr' $CONTENTS_SOURCE | nawk '{print $1}' | sed 's:=: :' | nawk '{print $1}' | cpio -pdm $ZONEROOT
grep '^/sbin' $CONTENTS_SOURCE | nawk '{print $1}' | sed 's:=: :' | nawk '{print $1}' | cpio -pdm $ZONEROOT
grep '^/platform' $CONTENTS_SOURCE | nawk '{print $1}' | sed 's:=: :' | nawk '{print $1}' | cpio -pdm $ZONEROOT
grep '^/lib' $CONTENTS_SOURCE | nawk '{print $1}' | sed 's:=: :' | nawk '{print $1}' | cpio -pdm $ZONEROOT
#
@ -217,9 +216,9 @@ cd /
# filter by installed overlays/packages
#
if [ -n "$copy_overlays" ]; then
egrep -v '^/(boot|kernel|devices|opt)' $CONTENTS_SOURCE | /bin/tr ' ' '\012' | fgrep -xv -f ${TDIR}/xplist | /bin/tr '\012' ' ' | /usr/bin/gsed 's: /:\n/:g' | /usr/bin/gsed 's: $:\n:g' > $ZONEROOT/var/sadm/install/contents
egrep -v '^/(boot|kernel|devices|opt|platform)' $CONTENTS_SOURCE | /bin/tr ' ' '\012' | fgrep -xv -f ${TDIR}/xplist | /bin/tr '\012' ' ' | /usr/bin/gsed 's: /:\n/:g' | /usr/bin/gsed 's: $:\n:g' > $ZONEROOT/var/sadm/install/contents
else
egrep -v '^/(boot|kernel|devices|opt)' $CONTENTS_SOURCE > $ZONEROOT/var/sadm/install/contents
egrep -v '^/(boot|kernel|devices|opt|platform)' $CONTENTS_SOURCE > $ZONEROOT/var/sadm/install/contents
fi
#

4
usr/share/man/man5/sparse-root.5

@ -1,4 +1,4 @@
.TH "SPARSE-ROOT" "5" "Jun 4, 2017" "Tribblix"
.TH "SPARSE-ROOT" "5" "Apr 24, 2018" "Tribblix"
.SH "NAME"
sparse-root zone variant
.SH DESCRIPTION
@ -6,7 +6,7 @@ sparse-root zone variant
The sparse-root zone brand in Tribblix is similar, but not identical,
to the sparse-root zones in Solaris 10.
.LP
The /usr, /sbin, /platform, and /lib file system hierarchies are lofs
The /usr, /sbin, and /lib file system hierarchies are lofs
mounts from a parent system. By default, the parent system is the
global zone. Unlike Solaris 10, an alternative parent, called a zone
template, can be created and used.

Loading…
Cancel
Save