Permalink
Browse files

Massive update to build process including:

 - change to makefile to make people who want "make world" happy
 - separated joyent specific stuff into files that are not required to build
 - new ./configure script to set everything up
 - removed stuff we don't want in proto and renamed proto to 'overlay'
 - script now takes files from system if missing in both proto and overlay
 - ability to build everything into one proto area
 - add bootparams tool to build
  • Loading branch information...
1 parent b9442ac commit 43be32e3db7808f499199e58dc9c88425c95ebe2 @joshwilsdon joshwilsdon committed Oct 31, 2010
Showing with 281 additions and 1,127 deletions.
  1. +7 −0 .gitignore
  2. +28 −0 Makefile
  3. +163 −0 configure
  4. +1 −12 manifest
  5. 0 {proto → overlay}/etc/bash/bash_completion.example
  6. 0 {proto → overlay}/etc/bash/bashrc.example
  7. 0 {proto → overlay}/etc/bash/inputrc.example
  8. 0 {proto → overlay}/etc/coreadm.conf
  9. 0 {proto → overlay}/etc/default/passwd
  10. 0 {proto → overlay}/etc/dispadmin.conf
  11. 0 {proto → overlay}/etc/driver_aliases
  12. 0 {proto → overlay}/etc/driver_classes
  13. 0 {proto → overlay}/etc/dumpadm.conf
  14. 0 {proto → overlay}/etc/group
  15. 0 {proto → overlay}/etc/inittab
  16. 0 {proto → overlay}/etc/minor_perm
  17. +9 −0 overlay/etc/motd
  18. 0 {proto → overlay}/etc/name_to_major
  19. 0 {proto → overlay}/etc/nodename
  20. 0 {proto → overlay}/etc/passwd
  21. 0 {proto → overlay}/etc/path_to_inst
  22. 0 {proto → overlay}/etc/release
  23. 0 {proto → overlay}/etc/rtc_config
  24. 0 {proto → overlay}/etc/shadow
  25. 0 {proto → overlay}/etc/skel/.bashrc
  26. 0 {proto → overlay}/etc/ssh/sshd_config
  27. 0 {proto → overlay}/etc/svc/profile/generic.xml
  28. 0 {proto → overlay}/etc/svc/profile/platform.xml
  29. 0 {proto → overlay}/etc/system
  30. 0 {proto → overlay}/etc/vfstab
  31. 0 {proto → overlay}/lib/svc/manifest/network/nfs/client.xml
  32. 0 {proto → overlay}/lib/svc/manifest/network/nfs/nlockmgr.xml
  33. 0 {proto → overlay}/lib/svc/manifest/network/nfs/server.xml
  34. 0 {proto → overlay}/lib/svc/method/fs-usr
  35. 0 {proto → overlay}/lib/svc/method/net-physical
  36. 0 {proto → overlay}/lib/svc/method/sysidtool-net
  37. 0 {proto → overlay}/lib/svc/method/sysidtool-system
  38. 0 {proto → overlay}/lib/svc/share/net_include.sh
  39. 0 {proto → overlay}/var/svc/manifest/system/sysidtool.xml
  40. +0 −7 proto/etc/motd
  41. BIN proto/usr/lib/locale/C/LC_MESSAGES/AMD.mo
  42. BIN proto/usr/lib/locale/C/LC_MESSAGES/DISK.mo
  43. BIN proto/usr/lib/locale/C/LC_MESSAGES/FMD.mo
  44. BIN proto/usr/lib/locale/C/LC_MESSAGES/FMNOTIFY.mo
  45. BIN proto/usr/lib/locale/C/LC_MESSAGES/GMCA.mo
  46. BIN proto/usr/lib/locale/C/LC_MESSAGES/INTEL.mo
  47. BIN proto/usr/lib/locale/C/LC_MESSAGES/NXGE.mo
  48. BIN proto/usr/lib/locale/C/LC_MESSAGES/PCI.mo
  49. BIN proto/usr/lib/locale/C/LC_MESSAGES/PCIEX.mo
  50. BIN proto/usr/lib/locale/C/LC_MESSAGES/SENSOR.mo
  51. BIN proto/usr/lib/locale/C/LC_MESSAGES/SMF.mo
  52. BIN proto/usr/lib/locale/C/LC_MESSAGES/STORAGE.mo
  53. BIN proto/usr/lib/locale/C/LC_MESSAGES/SUNOS.mo
  54. BIN proto/usr/lib/locale/C/LC_MESSAGES/ZFS.mo
  55. BIN proto/usr/lib/locale/POSIX/LC_MESSAGES/AMD.mo
  56. BIN proto/usr/lib/locale/POSIX/LC_MESSAGES/DISK.mo
  57. BIN proto/usr/lib/locale/POSIX/LC_MESSAGES/FMD.mo
  58. BIN proto/usr/lib/locale/POSIX/LC_MESSAGES/FMNOTIFY.mo
  59. BIN proto/usr/lib/locale/POSIX/LC_MESSAGES/GMCA.mo
  60. BIN proto/usr/lib/locale/POSIX/LC_MESSAGES/INTEL.mo
  61. BIN proto/usr/lib/locale/POSIX/LC_MESSAGES/NXGE.mo
  62. BIN proto/usr/lib/locale/POSIX/LC_MESSAGES/PCI.mo
  63. BIN proto/usr/lib/locale/POSIX/LC_MESSAGES/PCIEX.mo
  64. BIN proto/usr/lib/locale/POSIX/LC_MESSAGES/SENSOR.mo
  65. BIN proto/usr/lib/locale/POSIX/LC_MESSAGES/SMF.mo
  66. BIN proto/usr/lib/locale/POSIX/LC_MESSAGES/STORAGE.mo
  67. BIN proto/usr/lib/locale/POSIX/LC_MESSAGES/SUNOS.mo
  68. BIN proto/usr/lib/locale/POSIX/LC_MESSAGES/ZFS.mo
  69. +0 −751 proto/usr/lib/locale/common/LC_CTYPE/LCL_DEF_unicode
  70. BIN proto/usr/lib/locale/common/LC_CTYPE/amd64/wdresolve_unicode.so
  71. BIN proto/usr/lib/locale/common/LC_CTYPE/ldterm_unicode.dat
  72. BIN proto/usr/lib/locale/common/LC_CTYPE/wdresolve_unicode.so
  73. BIN proto/usr/lib/locale/common/LO_LTYPE/amd64/umle.layout.so.1
  74. BIN proto/usr/lib/locale/common/LO_LTYPE/umle.layout.so.1
  75. BIN proto/usr/lib/locale/common/amd64/methods_unicode.so.3
  76. BIN proto/usr/lib/locale/common/methods_unicode.so.3
  77. BIN proto/usr/lib/locale/en_US.ISO8859-1/LC_COLLATE/LCL_DATA
  78. BIN proto/usr/lib/locale/en_US.ISO8859-1/LC_CTYPE/LCL_DATA
  79. +0 −4 proto/usr/lib/locale/en_US.ISO8859-1/LC_MESSAGES/LCL_DATA
  80. +0 −15 proto/usr/lib/locale/en_US.ISO8859-1/LC_MONETARY/LCL_DATA
  81. +0 −3 proto/usr/lib/locale/en_US.ISO8859-1/LC_NUMERIC/LCL_DATA
  82. +0 −58 proto/usr/lib/locale/en_US.ISO8859-1/LC_TIME/LCL_DATA
  83. BIN proto/usr/lib/locale/en_US.ISO8859-15/LC_COLLATE/LCL_DATA
  84. BIN proto/usr/lib/locale/en_US.ISO8859-15/LC_CTYPE/LCL_DATA
  85. +0 −4 proto/usr/lib/locale/en_US.ISO8859-15/LC_MESSAGES/LCL_DATA
  86. +0 −15 proto/usr/lib/locale/en_US.ISO8859-15/LC_MONETARY/LCL_DATA
  87. +0 −3 proto/usr/lib/locale/en_US.ISO8859-15/LC_NUMERIC/LCL_DATA
  88. +0 −58 proto/usr/lib/locale/en_US.ISO8859-15/LC_TIME/LCL_DATA
  89. BIN proto/usr/lib/locale/en_US.US-ASCII/LC_COLLATE/LCL_DATA
  90. BIN proto/usr/lib/locale/en_US.US-ASCII/LC_CTYPE/LCL_DATA
  91. +0 −4 proto/usr/lib/locale/en_US.US-ASCII/LC_MESSAGES/LCL_DATA
  92. +0 −15 proto/usr/lib/locale/en_US.US-ASCII/LC_MONETARY/LCL_DATA
  93. +0 −3 proto/usr/lib/locale/en_US.US-ASCII/LC_NUMERIC/LCL_DATA
  94. +0 −58 proto/usr/lib/locale/en_US.US-ASCII/LC_TIME/LCL_DATA
  95. BIN proto/usr/lib/locale/en_US.UTF-8/LC_COLLATE/LCL_DATA
  96. BIN proto/usr/lib/locale/en_US.UTF-8/LC_CTYPE/LCL_DATA
  97. +0 −4 proto/usr/lib/locale/en_US.UTF-8/LC_MESSAGES/LCL_DATA
  98. +0 −15 proto/usr/lib/locale/en_US.UTF-8/LC_MONETARY/LCL_DATA
  99. +0 −3 proto/usr/lib/locale/en_US.UTF-8/LC_NUMERIC/LCL_DATA
  100. +0 −58 proto/usr/lib/locale/en_US.UTF-8/LC_TIME/LCL_DATA
  101. +4 −1 src/Makefile
  102. +19 −0 tools/build_illumos
  103. +43 −35 { → tools}/build_live
  104. +7 −1 { → tools}/customize
  105. 0 { → tools}/scanner
  106. 0 { → tools}/sorter
View
@@ -0,0 +1,7 @@
+/configure.*
+/output
+/projects
+/proto
+/log
+/src/bootparams
+/0-*-stamp
View
@@ -0,0 +1,28 @@
+# Copyright (c) 2010 Joyent Inc., All rights reserved.
+
+ROOT:sh=pwd
+PROTO=$(ROOT)/proto
+
+world: 0-illumos-stamp 0-extra-stamp 0-livesrc-stamp
+
+live: world
+ (cd $(ROOT) && ./tools/build_live $(ROOT)/manifest)
+
+0-illumos-stamp:
+ (cd $(ROOT) && ./tools/build_illumos)
+ touch 0-illumos-stamp
+
+0-extra-stamp:
+ (cd $(ROOT)/projects/illumos-extras && make DESTDIR=$(PROTO) && make DESTDIR=$(PROTO) install)
+ touch 0-extra-stamp
+
+0-livesrc-stamp: src/bootparams.c
+ (cd $(ROOT)/src && make DESTDIR=$(PROTO) && make DESTDIR=$(PROTO) install)
+ touch 0-livesrc-stamp
+
+clean:
+ (cd $(ROOT)/src && make clean)
+ (cd $(ROOT)/projects/illumos-extras && make clean)
+ (cd $(ROOT) && rm -rf $(PROTO))
+ (cd $(ROOT) && mkdir -p $(PROTO))
+ rm -f 0-*-stamp
View
163 configure
@@ -0,0 +1,163 @@
+#!/usr/bin/env bash
+#
+# Copyright (c) 2010 Joyent Inc.
+#
+
+set -e
+
+# Load all site-specific configure files
+source configure.*
+
+echo "==> Installing illumos build dependencies..."
+pfexec pkg install \
+ text/groff \
+ system/zones/internal \
+ library/libxml2 \
+ developer/gnome/gettext \
+ library/python-2/setuptools-26 \
+ library/gnome/gnome-vfs \
+ runtime/perl-510 \
+ runtime/perl-510/extra \
+ developer/build/gnu-make \
+ developer/build/onbld \
+ developer/gcc-3 \
+ developer/astdev \
+ developer/lexer/flex \
+ library/nspr/header-nspr \
+ system/library/mozilla-nss/header-nss \
+ data/docbook \
+ text/gnu-gettext \
+ || /bin/true
+
+
+# TODO: move this to illumos-extras itself
+echo "==> Installing illumos-extras dependencies..."
+pfexec pkg install \
+ compatibility/ucb \
+ developer/build/autoconf \
+ developer/build/automake-19 \
+ developer/build/automake-110 \
+ developer/build/cmake \
+ developer/build/libtool \
+ developer/parser/bison \
+ library/libevent \
+ || /bin/true
+
+
+echo "==> Checking for /opt/SUNWspro/bin/cc..."
+echo " +--> Ensuring SUNWspro (12.1-patched) installed in /opt/SUNWspro/sunstudio12.1..."
+if [ ! -f "/opt/SUNWspro/sunstudio12.1/prod/bin/cc" ]; then
+ if [ ! -z "${SUNW_SPRO12u1_URL}" ]; then
+ (pfexec mkdir -p /opt/SUNWspro \
+ && cd /opt/SUNWspro \
+ && curl -k ${SUNW_SPRO12u1_URL} \
+ | pfexec gtar -zxf -)
+ else
+ echo "FATAL: unable to download sunstudio12u1, no URL is set. Please set SUNW_SPRO12u1_URL in configure.*"
+ exit 1
+ fi
+fi
+echo " +--> Ensuring SUNWspro (12-patched) installed in /opt/SUNWspro..."
+if [ ! -f "/opt/SUNWspro/prod/bin/cc" ]; then
+ if [ ! -z "${SUNW_SPRO12_URL}" ]; then
+ (pfexec mkdir -p /opt/SUNWspro \
+ && cd /opt/SUNWspro \
+ && curl -k "${SUNW_SPRO12_URL}" \
+ | pfexec gtar -jxf -)
+ else
+ echo "FATAL: unable to download sunstudio12, no URL is set. Please set SUNW_SPRO12_URL in configure.*"
+ exit 1
+ fi
+fi
+
+echo "==> Creating the missing symlinks..."
+test -f /usr/bin/aclocal || pfexec ln -s /usr/bin/aclocal-1.10 /usr/bin/aclocal
+test -f /usr/bin/automake || pfexec ln -s /usr/bin/automake-1.10 /usr/bin/automake
+# so builds can use --mode and such
+test -f /usr/bin/install || pfexec ln -s /usr/bin/ginstall /usr/bin/install
+test -f /usr/bin/pod2man || pfexec ln -s /usr/perl5/5.10.0/bin/pod2man /usr/bin/pod2man
+
+echo "==> Populating projects/ directories..."
+[ ! -d "projects" ] || mkdir -p projects
+if [ ! -d "projects" ] ; then
+ echo "FATAL: unable to create projects/ directory."
+ exit 1
+fi
+
+if [ ! -f "projects/illumos/usr/src/tools/env/illumos.sh" ]; then
+ echo " +--> Getting illumos source tree..."
+ if [ -z "${GET_ILLUMOS}" ]; then
+ echo "FATAL: No GET_ILLUMOS defined in configure.*, can't get illumos!"
+ exit 1
+ fi
+ /bin/bash -c "cd projects && ${GET_ILLUMOS} && cd -"
+ if [ ! -f "projects/illumos/usr/src/tools/env/illumos.sh" ]; then
+ echo "FATAL: GET_ILLUMOS command failed to get illumos!"
+ exit 1
+ fi
+fi
+
+if [ ! -f "projects/illumos-extras/Makefile" ]; then
+ echo " +--> Getting illumos-extras source tree..."
+ if [ -z "${GET_ILLUMOS_EXTRAS}" ]; then
+ echo "FATAL: No GET_ILLUMOS_EXTRAS defined in configure.*, can't get illumos-extras!"
+ exit 1
+ fi
+ /bin/bash -c "cd projects && ${GET_ILLUMOS_EXTRAS} && cd -"
+ if [ ! -f "projects/illumos-extras/Makefile" ]; then
+ echo "FATAL: GET_ILLUMOS_EXTRAS command failed to get illumos-extras!"
+ exit 1
+ fi
+fi
+
+if [ ! -f "projects/opensolaris-man/README" ]; then
+ echo " +--> Getting opensolaris-man source tree..."
+ if [ -z "${GET_OPENSOLARIS_MAN}" ]; then
+ echo "FATAL: No GET_OPENSOLARIS_MAN defined in configure.*, can't get opensolaris-man!"
+ exit 1
+ fi
+ /bin/bash -c "cd projects && ${GET_OPENSOLARIS_MAN} && cd -"
+ if [ ! -f "projects/opensolaris-man/README" ]; then
+ echo "FATAL: GET_OPENSOLARIS_MAN command failed to get opensolaris-man!"
+ exit 1
+ fi
+fi
+
+ROOT=`pwd`
+echo "==> Setting up illumos-gate"
+
+cd ${ROOT}/projects/illumos
+
+if [ ! -f on-closed-bins.i386.tar.bz2 ]; then
+ if [ -z "${ON_CLOSED_BINS_URL}" ]; then
+ curl -O http://dlc.sun.com/osol/on/downloads/20100817/on-closed-bins.i386.tar.bz2
+ else
+ curl -k -O "${ON_CLOSED_BINS_URL}"
+ fi
+ tar xvpf on-closed-bins.i386.tar.bz2
+fi
+if [ ! -f on-closed-bins-nd.i386.tar.bz2 ]; then
+ if [ -z "${ON_CLOSED_BINS_ND_URL}" ]; then
+ curl -O http://dlc.sun.com/osol/on/downloads/20100817/on-closed-bins-nd.i386.tar.bz2
+ else
+ curl -k -O "${ON_CLOSED_BINS_ND_URL}"
+ fi
+ tar xvpf on-closed-bins-nd.i386.tar.bz2
+fi
+
+cp usr/src/tools/env/illumos.sh .
+[ ! -z "${RELEASE_VER}" ] && /usr/gnu/bin/sed -i -e "s|^GATE=.*$|GATE=\"${RELEASE_VER}\"; export GATE|" illumos.sh
+[ ! -z "${PUBLISHER}" ] && /usr/gnu/bin/sed -i -e "s|^# PKGPUBLISHER_REDIST=.*$|PKGPUBLISHER_REDIST=\"${PUBLISHER}\"; export PKGPUBLISHER_REDIST|" illumos.sh
+/usr/gnu/bin/sed -i -e "s|^CODEMGR_WS=.*$|CODEMGR_WS=\"${ROOT}/projects/illumos\"; export CODEMGR_WS|" illumos.sh
+/usr/gnu/bin/sed -i -e "s|^NIGHTLY_OPTIONS=.*$|NIGHTLY_OPTIONS=\"-nCmprt\"; export NIGHTLY_OPTIONS|" illumos.sh
+/usr/gnu/bin/sed -i -e "s|^ROOT=.*$|ROOT="${ROOT}/proto"; export ROOT|" illumos.sh
+/usr/gnu/bin/sed -i -e "s|^PARENT_ROOT=.*$|PARENT_ROOT="${ROOT}/proto"; export PARENT_ROOT|" illumos.sh
+
+# For some reason this disappeared before
+touch ${ROOT}/projects/illumos/usr/src/tools/findunref/exception_list.unknown
+
+echo ""
+echo "Configuration complete. You should now be able to build a live image using ./build_live"
+echo ""
+
+exit 0
View
@@ -134,7 +134,6 @@ s dev/sad/admin=../../devices/pseudo/sad@0:admin
s dev/sad/user=../../devices/pseudo/sad@0:user
s dev/sdp=../devices/pseudo/sdp@0:sdp
s dev/smbios=../devices/pseudo/smbios@0:smbios
-s dev/sndstat=../devices/pseudo/audio@0:sound,sndstat0
s dev/spdsock=../devices/pseudo/spdsock@0:spdsock
s dev/sppp=../devices/pseudo/clone@0:sppp
s dev/sppptun=../devices/pseudo/clone@0:sppptun
@@ -300,9 +299,6 @@ f etc/dladm/flowprop.conf 0644 dladm netadm
f etc/dladm/secobj.conf 0660 dladm netadm
f etc/driver_aliases 0644 root sys
f etc/driver_classes 0644 root sys
-d etc/ds 0755 root sys
-f etc/ds/dfstab 0644 root sys
-f etc/ds/fstypes 0644 root root
f etc/dumpadm.conf 0644 root other
f etc/dumpdates 0664 root sys
s etc/ff=../usr/sbin/ff
@@ -552,7 +548,6 @@ d etc/saf/zsmon 0755 root sys
f etc/saf/zsmon/_pid 0644 root root
f etc/saf/zsmon/_pmtab 0644 root sys
d etc/sasl 0755 root sys
-f etc/screenrc 0644 root sys
f etc/sdp.conf 0644 root sys
d etc/security 0755 root sys
d etc/security/audit 0755 root sys
@@ -661,7 +656,6 @@ s etc/wtmpx=../var/adm/wtmpx
d etc/xdg 0755 root sys
d etc/xdg/autostart 0755 root sys
d etc/zfs 0755 root sys
-f etc/zfs/zpool.cache 0644 root root
d etc/zones 0755 root sys
f etc/zones/Joyent.xml 0444 root bin
f etc/zones/SUNWblank.xml 0444 root bin
@@ -2494,6 +2488,7 @@ f usr/bin/bc 0555 root bin
f usr/bin/bdiff 0755 root bin
f usr/bin/bfs 0555 root bin
f usr/bin/bg 0555 root bin
+f usr/bin/bootparams 0555 root bin
f usr/bin/bunzip2 0555 root bin
f usr/bin/busstat 0555 root bin
h usr/bin/bzcat=usr/bin/bunzip2
@@ -13813,12 +13808,6 @@ s usr/sbin/lockfs=../lib/fs/ufs/lockfs
f usr/sbin/lockstat 0555 root bin
f usr/sbin/lofiadm 0555 root bin
f usr/sbin/logadm 0555 root bin
-f usr/sbin/lpfilter 0555 root lp
-f usr/sbin/lpforms 0555 root lp
-f usr/sbin/lpinfo 0555 root bin
-f usr/sbin/lpshut 0555 root lp
-f usr/sbin/lpsystem 0555 root lp
-f usr/sbin/lpusers 0555 root lp
f usr/sbin/lshal 0555 root bin
f usr/sbin/luxadm 0555 root bin
f usr/sbin/makedbm 0555 root bin
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View
@@ -0,0 +1,9 @@
+ _____
+ ____ ____
+ _____ _____ . .
+ __ __ | .-. . . .-. :--. |-
+ _____ _____ ;| || |(.-' | | |
+ ____ ____ `--' `-' `;-| `-' ' ' `-'
+ _____ / ; Joyent Live Image v0.147+
+ `-' build: 00000000T000000Z
+
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View
@@ -1,7 +0,0 @@
- __ __
- __ / /___ __ _____ ____ / /_
- __/ /___ / / __ \/ / / / _ \/ __ \/ __/
- /_ __/ /_/ / /_/ / /_/ / __/ / / / /_
- /_/ \____/\____/\__, /\___/_/ /_/\__/
- v0.147+ /____/ Joyent Live Image!
-
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.

0 comments on commit 43be32e

Please sign in to comment.