[PC-BSD Commits] r21262 - in pcbsd/current: build-files/conf src-sh/pc-extractoverlay src-sh/pc-extractoverlay/desktop-overlay/etc src-sh/pc-extractoverlay/desktop-overlay/usr/local/etc src-sh/pc-updatemanager src-sh/port-files

svn at pcbsd.org svn at pcbsd.org
Thu Jan 31 09:32:35 PST 2013


Author: kris
Date: 2013-01-31 17:32:35 +0000 (Thu, 31 Jan 2013)
New Revision: 21262

Added:
   pcbsd/current/src-sh/pc-extractoverlay/desktop-excludes
   pcbsd/current/src-sh/pc-extractoverlay/desktop-overlay/
   pcbsd/current/src-sh/pc-extractoverlay/desktop-overlay/usr/local/etc/pkg.conf
   pcbsd/current/src-sh/pc-extractoverlay/port-excludes
   pcbsd/current/src-sh/pc-extractoverlay/server-excludes
   pcbsd/current/src-sh/pc-extractoverlay/server-overlay/
Removed:
   pcbsd/current/build-files/conf/pcbsd-version
   pcbsd/current/build-files/conf/upgrade-excludes
   pcbsd/current/src-sh/pc-extractoverlay/desktop-overlay/etc/gettytab
   pcbsd/current/src-sh/pc-extractoverlay/desktop-overlay/usr/local/etc/pkg.conf
   pcbsd/current/src-sh/pc-extractoverlay/dist-excludes
Modified:
   pcbsd/current/src-sh/pc-extractoverlay/install.sh
   pcbsd/current/src-sh/pc-extractoverlay/pc-extractoverlay
   pcbsd/current/src-sh/pc-updatemanager/pc-updatemanager
   pcbsd/current/src-sh/port-files/pkg-plist
Log:


Finish moving last bits of overlay data into
pc-extract overlay command. This now lets us encapsulate
all of PC-BSD into two ports for application on top of FreeBSD



Modified: pcbsd/current/src-sh/pc-extractoverlay/install.sh
===================================================================
--- pcbsd/current/src-sh/pc-extractoverlay/install.sh	2013-01-31 16:28:37 UTC (rev 21261)
+++ pcbsd/current/src-sh/pc-extractoverlay/install.sh	2013-01-31 17:32:35 UTC (rev 21262)
@@ -17,15 +17,35 @@
 fi
 
 # Copy exclude list
-cp dist-excludes /usr/local/share/pcbsd/conf
+cp port-excludes /usr/local/share/pcbsd/conf
 if [ $? -ne 0 ] ; then
   exit 1
 fi
+cp desktop-excludes /usr/local/share/pcbsd/conf
+if [ $? -ne 0 ] ; then
+  exit 1
+fi
+cp server-excludes /usr/local/share/pcbsd/conf
+if [ $? -ne 0 ] ; then
+  exit 1
+fi
 
 # Now create overlay.txz file
-tar cvJf /usr/local/share/pcbsd/distfiles/overlay.txz -C ports-overlay .
+tar cvJf /usr/local/share/pcbsd/distfiles/port-overlay.txz -C ports-overlay .
 if [ $? -ne 0 ] ; then
   exit 1
 fi
 
+# Now create desktop-overlay.txz file
+tar cvJf /usr/local/share/pcbsd/distfiles/desktop-overlay.txz -C desktop-overlay .
+if [ $? -ne 0 ] ; then
+  exit 1
+fi
+
+# Now create server-overlay.txz file
+tar cvJf /usr/local/share/pcbsd/distfiles/server-overlay.txz -C server-overlay .
+if [ $? -ne 0 ] ; then
+  exit 1
+fi
+
 exit 0

Modified: pcbsd/current/src-sh/pc-extractoverlay/pc-extractoverlay
===================================================================
--- pcbsd/current/src-sh/pc-extractoverlay/pc-extractoverlay	2013-01-31 16:28:37 UTC (rev 21261)
+++ pcbsd/current/src-sh/pc-extractoverlay/pc-extractoverlay	2013-01-31 17:32:35 UTC (rev 21262)
@@ -1,12 +1,104 @@
 #!/bin/sh
 
-distFile="/usr/local/share/pcbsd/distfiles/overlay.txz"
-excludeFile="/usr/local/share/pcbsd/conf/dist-excludes"
+do_ports_overlay()
+{
 
-# Remove the following files
-rm /usr/local/share/xsessions/*.desktop
+  distFile="/usr/local/share/pcbsd/distfiles/overlay.txz"
+  excludeFile="/usr/local/share/pcbsd/conf/dist-excludes"
 
-echo "Extracting overlay data..."
-cd /
-tar xvmf ${distFile} -X ${excludeFile} . 2>/dev/null
-exit $?
+  # Remove the following files
+  rm /usr/local/share/xsessions/*.desktop
+
+  echo -e "Extracting ports overlay data...\c"
+  cd /
+  tar xvmf ${distFile} -X ${excludeFile} . 2>/dev/null
+  if [ $? -eq 0 ] ; then
+    echo -e "DONE"
+    exit 0
+  else
+    echo -e "FAILED"
+    exit 1
+  fi
+}
+
+do_desktop_overlay()
+{
+  distFile="/usr/local/share/pcbsd/distfiles/desktop-overlay.txz"
+  if [ "$sysinit" != "YES" ] ; then
+    excludeOpt="-X /usr/local/share/pcbsd/conf/desktop-excludes"
+  fi
+
+  echo -e "Extracting desktop overlay data...\c"
+  cd /
+  tar xvmf ${distFile} ${excludeOpt} . 2>/dev/null
+  if [ $? -eq 0 ] ; then
+    echo -e "DONE"
+    exit 0
+  else
+    echo -e "FAILED"
+    exit 1
+  fi
+}
+
+do_server_overlay()
+{
+  distFile="/usr/local/share/pcbsd/distfiles/server-overlay.txz"
+  if [ "$sysinit" != "YES" ] ; then
+    excludeOpt="-X /usr/local/share/pcbsd/conf/server-excludes"
+  fi
+
+  echo -e "Extracting server overlay data...\c"
+  cd /
+  tar xvmf ${distFile} ${excludeOpt} . 2>/dev/null
+  if [ $? -eq 0 ] ; then
+    echo -e "DONE"
+    exit 0
+  else
+    echo -e "FAILED"
+    exit 1
+  fi
+}
+
+show_opts()
+{
+   cat << EOF
+
+usage: `basename $0` [options]
+                
+Options:
+  ports          -- Extract port overlay files
+  desktop        -- Extract desktop overlay files (Excluding user-configurable)
+  server         -- Extract server overlay files (Excluding user-configurable)
+  --sysinit      -- Overwrite user-configurable files (Used for first time init)
+
+EOF
+
+}
+
+# Set some defaults
+sysinit="no"
+
+# Parse CLI flags
+while [ $# -gt 0 ]; do
+   case "$1" in
+     desktop) target="desktop" ;;
+      server) target="server" ;;
+       ports) target="ports" ;;
+   --sysinit) sysinit="YES" ;;
+           *) echo "Invalid option $1 specified!"
+	      show_opts
+	      exit 1
+              ;;
+    esac
+    shift
+done
+
+# Now DO it
+case $target in
+    desktop) do_desktop_overlay ;;
+     server) do_server_overlay ;;
+      ports) do_ports_overlay ;;
+          *) show_opts ;;
+esac
+
+exit 0

Modified: pcbsd/current/src-sh/pc-updatemanager/pc-updatemanager
===================================================================
--- pcbsd/current/src-sh/pc-updatemanager/pc-updatemanager	2013-01-31 16:28:37 UTC (rev 21261)
+++ pcbsd/current/src-sh/pc-updatemanager/pc-updatemanager	2013-01-31 17:32:35 UTC (rev 21262)
@@ -458,7 +458,7 @@
   result=$?
 
   # Lets now re-extract our overlay data to grab any adjusted port files
-  pc-extractoverlay >/dev/null 2>/dev/null
+  pc-extractoverlay ports >/dev/null 2>/dev/null
 
   # Cleanup EVENT_PIPE
   if [ -n "$PCFETCHGUI" ] ; then

Modified: pcbsd/current/src-sh/port-files/pkg-plist
===================================================================
--- pcbsd/current/src-sh/port-files/pkg-plist	2013-01-31 16:28:37 UTC (rev 21261)
+++ pcbsd/current/src-sh/port-files/pkg-plist	2013-01-31 17:32:35 UTC (rev 21262)
@@ -49,8 +49,12 @@
 share/warden/scripts/backend/zfscronsnap.sh
 share/warden/linux-installs/debian-6-squeeze
 share/warden/linux-installs/gentoo-stage3-i486
-share/pcbsd/conf/dist-excludes
-share/pcbsd/distfiles/overlay.txz
+share/pcbsd/conf/port-excludes
+share/pcbsd/conf/desktop-excludes
+share/pcbsd/conf/server-excludes
+share/pcbsd/distfiles/desktop-overlay.txz
+share/pcbsd/distfiles/port-overlay.txz
+share/pcbsd/distfiles/server-overlay.txz
 share/pcbsd/pc-xdgutil/applications.menu
 share/pcbsd/pc-xdgutil/xfce-applications.menu
 share/pcbsd/pc-xdgutil/desktop-dirs/pcbsd-toys.directory



More information about the Commits mailing list