OpenSolaris
Collectives
Discussions
Documentation
Download
Source Browser
Free CD
Log-in
|
en
Project xfce
:
Building Xfce
>
How to build in a Zone
Top Menu
Show
:
Comments
Attachments
History
Information
Print
:
Print
Print preview
Export as PDF
Export as RTF
Export as HTML
Export as XAR
Wiki code for
How to build in a Zone
Hide Line numbers
1: == How to build in a Zone == 2: 3: Building the Xfce Desktop or JDS can cause a few problems if you happen to building a library or binary which you currently are using or need to use. What makes it almost impossible is if you follow the build instructions and do a "pkgtool uninstall *.spec". If you are using Xfce or JDS you are removing everything that is currently your desktop depends on. One way to get around this is to first switch to CDE. This maybe ok, if you can do without such things as firefox, and thunderbird for awhile. Though there is another way you can do a full build of JDS and/or Xfce, without disturbing your desktop. The method that is shown below is creating a Solaris Zone and using it as your build environment. 4: 5: The first problem if you do this is that the default zone install remounts the /usr directory as read-only into the zone. The second problem is that package changes (and patches) in the global can change the zone you are building on. The solution for the first problem is to create a "whole root zone" by removing the default inherited packages. The solution to the second problem is use a brandz zone which is identical to a native zone. 6: 7: === What’s Required === 8: 9: * Recent Solaris Nevada Distribution 10: * Sun Studio 11 - Installed automatically with Solaris Express Developers Edition 11: * [[JDS Common Build Environment>>Project jds.building]] installed and configured in the global zone. 12: * At least one user with the "Software Installation" profile, which is setup to use JDS CBE. This user(s) will have their home directory mounted in both the global zone and the build zone. 13: 14: 15: === Getting Started === 16: 17: Before you start you will need to download the [[initial~_cbe~_zone script>>attach:initialcbezone]], and modify the top section to suit your needs. This script does the following - 18: * Copies and modifies the configuration files from a native brandz zone to a new cbe brandz zone. 19: * Creates a default zone template, which remounts selected users home directory from the global zone into build zone. 20: * Creates and installs a cbe zone (called jdsclone) from which you can clone as many cbe build zones from as you like. Note: This zone is never booted.... 21: 22: Once you have downloaded the script, you need to run it from the root account. As this may take some time, you can take a coffee break (or maybe lunch) while this is happening - 23: 24: {{{ 25: root@prae> bash ./initial~_cbe~_zone 26: . 27: . 28: . 29: }}} 30: 31: === Making a CBE Build Zone === 32: 33: Once the script has finished, we next need to configure a build zone from the OSOLcbe template. The following is an example to configure a zone called "jds1". You will need to adjust the name, zonepath, and network address to suit your system. 34: 35: {{{ 36: root@prae> zonecfg -z jds1 37: jdstest: No such zone configured 38: Use ’create’ to begin configuring a new zone. 39: zonecfg:jds1> create -t OSOLcbe 40: zonecfg:jds1> set zonepath=/export/zones/jds1 41: zonecfg:jds1> set autoboot=true 42: zonecfg:jds1> add net 43: zonecfg:jds1:net> set address=192.168.1.34/24 44: zonecfg:jds1:net> set physical=nge0 45: zonecfg:jds1:net> end 46: zonecfg:jds1> commit 47: zonecfg:jds1> exit 48: }}} 49: 50: The next step is to clone the jdsclone zone to the zone you just configured. 51: 52: {{{ 53: root@prae> zoneadm -z jds1 clone jdsclone 54: Cloning snapshot userdata/export/zones/jdsclone@SUNWzone1 55: Instead of copying, a ZFS clone has been created for this zone. 56: zoneadm: zone ’jds1’: mount operation is invalid for branded zones. 57: Could not mount zone for sys-unconfig 58: zoneadm: zone ’jds1’: post-clone configuration failed. 59: }}} 60: 61: You will probably see a few error messages as I did. You can safely ignore these messages change the zone status to "installed" by editing the /etc/zone/index file. You can use your favorite editor (which should be vi), or you can do something like my magic one-liner. 62: 63: {{{ 64: root@prae> printf "/jds1:/s/incomplete/installed/\nwq\n" | ex - /etc/zones/index 65: }}} 66: 67: Just before you boot the system, edit the sysidcfg file, so the zone will be automatically configured. Below is an example of what this file looks like. For more information "man sysidcfg" and/or read the Solaris Containers-Resource Management and Solaris Zones manual from docs.sun.com 68: 69: {{{ 70: root@prae> vi /export/zones/jds1/root/etc/sysidcfg 71: }}} 72: 73: {{{ 74: system~_locale=en~_AU.UTF-8 75: terminal=xterm 76: timezone=Asia/Bangkok 77: network~_interface=PRIMARY { hostname=jds1 } 78: name~_service=DNS { 79: domain~_name=priv 80: name~_server=192.168.1.30 81: } 82: nfs4~_domain=dynamic 83: security~_policy=none 84: root~_password=LglKGo875zdew 85: }}} 86: 87: === Booting the Build Zone === 88: 89: Now you have got this far you can boot the jds1 zone. Using the zlogin command to connect to the jds1 console, you can watch the boot process and check for any errors. If there is an error, it will most likely be that you have an incorrect /etc/sysidcfg file. If this happens, you will need to halt and uninstall the zone, and re-clone the zone again. 90: 91: {{{ 92: root@prae> zoneadm -z jds1 boot 93: root@prae> zlogin -e "#" -C jds1 94: [Connected to zone ’jds1’ console] 95: [NOTICE: Zone booting up] 96: SunOS Release 5.11 Version snv_59 64-bit 97: Copyright 1983-2006 Sun Microsystems, Inc. All rights reserved. 98: Use is subject to license terms. 99: Hostname: jds1 100: Loading smf(5) service descriptions: 140/140 101: Creating new rsa public/private host key pair 102: Creating new dsa public/private host key pair 103: Configuring network interface addresses: nge0. 104: 105: rebooting system due to change(s) in /etc/default/init 106: 107: [NOTICE: Zone rebooting] 108: }}} 109: 110: {{{ 111: SunOS Release 5.11 Version snv_59 64-bit 112: Copyright 1983-2006 Sun Microsystems, Inc. All rights reserved. 113: Use is subject to license terms. 114: Hostname: jds1 115: 116: jds1 console login: 117: }}} 118: 119: === Using the Build Zone === 120: 121: If you have got this far you should be able to login, or even better ssh into the zone from either the global zone, or a remote machine. Everything you do in this zone is isolated from all other zones including the global zone. 122: 123: {{{ 124: doug@prae> ssh jdsbuild@jds1 125: Password: blahblah 126: Last login: Sun Mar 18 15:47:04 2007 from prae.priv 127: Sun Microsystems Inc. SunOS 5.11 snv_59 October 2007 128: JDS/Solaris CBE version 1.5.1 built on 2007-03-08 by jdsbuild@prae 129: Unsetting LC_MONETARY 130: Unsetting LC_NUMERIC 131: Unsetting USER 132: Unsetting LC_MESSAGES 133: Unsetting LC_COLLATE 134: Unsetting LANG 135: Unsetting LC_CTYPE 136: Setting default C compiler CC=/usr/bin/cc 137: Setting default C++ compiler CXX=/usr/bin/CC 138: Setting 32-bit C compiler CC32=/usr/bin/cc 139: Setting 32-bit C++ compiler CXX32=/usr/bin/CC 140: Setting 64-bit C compiler CC64=/usr/bin/cc 141: Setting 64-bit C++ compiler CXX64=/usr/bin/CC 142: Setting LD=/opt/jdsbld/bin/ld-wrapper 143: Setting 144: PATH=/opt/jdsbld/bin:/usr/ccs/bin:/usr/gnu/bin:/usr/bin:/usr/sbin:/bin:/usr/sfw/bin:/usr/bin 145: jdsbuild@jds1> cd spec-files-xfce 146: jdsbuild@jds1> pkgtool uninstall-pkgs *.spec 147: jdsbuild@jds1> pkgtool build \-\-download *.spec 148: }}} 149: 150: === Installing the new Packages for your Desktop === 151: 152: Once you have built and tested the packages you want in the build zone, you can then install them in the global zone as your desktop. Since your build user’s home directory is the same in both zones, this step is easy. 153: 154: 155: {{{ 156: doug@prae> su - jdsbuild 157: Password: blahblah 158: jdsbuild@prae> cd spec-files-xfce 159: jdsbuild@prae> pkgtool uninstall-pkgs *.spec 160: jdsbuild@prae> pkgtool install-pkgs *.spec 161: }}}
Search
Collectives
Community Group
Academic and Research
Accessibility
Advocacy
Appliances
Approachability
Architecture Process and Tools
BrandZ
Chinese Users
Community Advisory Board
Databases
Desktop
Device Drivers
Distribution
Documentation
DTrace
Emerging Platforms
Fault Management
Games on OpenSolaris
HA Clusters
HPC Developer
Installation and Packaging
Internationalization and Localization
Laptop
Logical Domains
Modular Debugger (MDB)
Networking
NFS
Observability
OpenSolaris Governing Board (OGB)
OpenSolaris Printing
OS/Net (ON)
Performance
Power Management
PowerPC
Security
Service Management Facility (smf(5))
Software Porters
Solaris Volume Manager
Storage
Systems Administration Community Group
Testing
Tools Home
Unix File Systems (UFS)
Website Community
X Window System
Xen
ZFS
Zones
Project
ADSL Modem Enhancement
ARC Process Definition
ARM Platform Port
Automatic Data Migration
BIND Update
Bluetooth Stack & Drivers
Brocade FC HBA - Initiator
Brocade FC HBA - Target
Brussels - unified network link configuration
Caiman, Solaris Install Revisited
Celeste
Český portál
Chime Visualization Tool for DTrace
CIFS client for Solaris
CIFS Server
Clearview: Network Interface Coherence
Cluster Agent: Informix Dynamic Server
Cluster Agent: OpenSolaris Container
Cluster Agent: OpenSolaris xVM
Cluster Agent: Oracle E-Business Suite
Cluster agent: PostgreSQL
Cluster Agent: Samba
Cluster Agent: Tomcat
CMT
Coarse Data Flow Parallelism
Colorado: Open HA Cluster on OpenSolaris
Command Assistant
Common Array Manager
Companion - /opt/sfw: Free and Open Source software
COMSTAR: Common Multiprotocol SCSI Target
Content
Contest
CPU Observability
Credentials Process Groups
Crossbow: Network Virtualization and Resource Control
Crypto KMS Agent Toolkit
Cryptographic Framework
Data Migration Manager
Data Tethers
Deutsches Portal
Device Detection Tool
Device Driver Utility
Device Manager
Device Mapper
Direct Rendering Infrastructure & 3D drivers
DTrace Guide
Duckwater: Simplified name services management
Easy Tools
Emancipation
Emulex Fibre Channel Device Driver
Emulex Advanced Ethernet Device Driver
Enable/Enhance Solaris support for Intel Platform
Enhance the support of USB webcams
Enhanced SMF Profiles
Enhancements for AMD-based Platforms
Erlang DTrace Integration
Ethernet bridge module for Solaris
Evaluate Conary
Events Registry
Ext3 file system support
F/OSS Package Base
Facilitation
Fibre Channel over Ethernet
Fine Grained Access Policy (FGAP)
Fingerprint Authentication
Flexible Mandatory Access Control
Forensic Tools
Fully Open X Project
Fuse on Solaris
gcore
Generic Machine Check Architecture Improvements
Google SOC
HA-JBoss
HA-MySQL
Hadoop Live CD
Hitachi
HoneyComb Fixed Content Storage
HPC Stack
Image Packaging System
Improved Performance MIB
Indiana
Innovation Awards
Input Method
Intel Graphics
Internet Key Exchange, version 2
Interrupt Resource Management
IP Datapath Refactoring
IP over Infiniband
IPsec Tunnel Reform
iSCSI Extensions for Remote DMA (iSER)
iSNS Server
JeOS - Just enough Operating System
JKstat - a java binding for libkstat
Journaled File System (JFS)
K Desktop Environment
Kerberos
Kernel Sockets
Kernel SSL Enhancements
Key Management Framework
Korn Shell 93 integration/migration project
Labeled IPsec
LatencyTOP
Layer 2 Filtering
LDoms Manager
Lending
libMicro - portable microbenchmarks
Link Layer Discovery
Live Media: Technologies for distributions running from CD and other media
Locale Data
lofi compression and cryptography support
lx64 brand
Media Management System
Mega_sas
Mexico
MilaX minimal Live Distribution
MIPS Platform Port
Mozilla DTrace
MRSL.NONsharedDevice
Multi-lingual Glossary
Multi-pathing software (MPxIO)
Multiple disk sector size support
Multiple DOI
Muskoka: An open repository for OpenSolaris technical content
Navigator
Nemo: A Framework for High-Performance Networking
Network Auto-Magic
Network Data Management Protocol
Network MIBs
Network Storage
Network Time Protocol (NTP)
Nevada Globalization
New Design of 4over6 Mechanism Based on OpenSolaris
NFS RDMA transport update and performance analysis
NFS Server in non-Global Zones
NFS version 4.1 pNFS
NFSv4 namespace extensions
Nightingale: Port Songbird to OpenSolaris
NPort ID Virtualization (NPIV)
NUMA
Object Storage Device (OSD) support for Solaris
OHACGE Script Based Plug-in
ON/Nevada (ONNV) Project
Open Development Infrastructure
Open HA Cluster Utilities
Open Sound System
OpenGrok
OpenPegasus CIM Server
OpenRTI
OpenSolaris Busybox
OpenSolaris Desktop
OpenSolaris Hispano
OpenSolaris Security Audit
OpenSolaris support for the QEMU processor emulator: host and guest
PEF: Packet Event Framework
Performance Wrappers
Pkgfactory
Polski Portal
Portail Francophone
Portal Brasil
Portals
Power Management Usability Interfaces
Presto: Automatic Printing Configuration
Printable Many Page Solaris Manuals
Promise SuperTrak RAID HBA Driver
QLogic Converged Network Adapter GLDv3 NIC Driver
Quagga Routing Protocol Suite Integration
RAID Configuration Utility
RBridge (IETF TRILL) support
RDMA Offload Framework
Reno: Login Process Enhancements for Interop
Resource Management
s10brand
SAM/QFS
SCM Migration Project
SCSI RDMA Protocol
SDcard Drivers
Sensor Abstraction Layer
Session Initiation Protocol
SFW
Shell: bourne shell, korn shell, C shell, etc.
Sierra: Intel WiFi Chipsets Support
Simple Panels
SM-HBA Based SAS HBA Management
SMF Documentation
Solaris iSCSI Target
Solaris PowerPC Port
SourceJuicer
Sparks: name service switch/nscd enhancements
Squashfs
Star integration/migration project
Starfish
Starter Kit
Storage Power Management
Sun Security Toolkit
Sun StorageTek Availability Suite
Support for OpenFabrics User Verbs / API on OpenSolaris OS
Support gcc4/GCCfss in Solaris
Suspend/Resume
SVR4 Packaging
Systemz
Tamarack: Removable Media Enhancements in Solaris
Tesla: OpenSolaris Enhanced Power Management
Test Development
Tickless Kernel Architecture
TIPC
Trademarks
Trusted networking interface policy database for Trusted Extensions
Trusted Platform Module support
Use Case
Validated Execution Project
Virtual Console
Virtual Network Machines
Visual Panels
Visualization for HPC
Volo
VRRP: Virtual Router Redundancy Protocol Implementation
VSCAN service
Web Stack
Website
Winchester: Schema mapping and ID mapping for AD Interoperability
Wireless USB Support
Wireless Wide Area Network
X Consolidation
x86 Generic FMA Topology Enumerator
Xen Gate
Xfce: A lightweight desktop environment
ZFS Boot and Install
ZFS on disk encryption support
Zone Manager
Zone Statistics
Русский портал
البوابة العربية
भारतीय पोर्टल
中国门户
日本ポータル
한국 포탈
User Group
Adelaide
Argentina
Arizona
Atlanta
Baltimore-Washington
Bangalore
Bangkok
Bangladesh
Beijing
Bélem
Berlin
Bhimavaram
Bloomington
Campus Ambassadors
Capital Region
Cardiff
Charlotte
Chengdu
Chennai
Chihuahua
Chile
Cleveland
Colombia
Columbus
Connecticut
Cracow
Czech
Dallas/Ft. Worth
Danish
Delaware
Edinburgh
Egypt
Finland
Florida
Front Range
FuZhou
Great Lakes
Greece
Hangzhou
Hawaii
HeFei
Houston
Hyderabad
Indonesia
Irish
Israel
Italian
Jinan
Kabul
Kansas City
Latvia
London
Madurai
Manchester
Mato Grosso
Melbourne
Minas Gerais
Minnesota
Montreal
Moscow
Mumbai
Munich
NEA
Netherlands
New England
New York City
New Zealand
NIT Hamirpur
Noroeste
Oklahoma City
Osnabrück
Peru
Philadelphia
Piaski
Pittsburgh
Porto Alegre
Puget Sound
Pune
Queensland
Research Triangle Park
Romania
Russia
San Antonio
San Diego
San Francisco
São Paulo
Scottish
Serbia
Shanghai
Shenzhen
Silicon Valley
Singapore
Slovak
South African
Southern Connecticut
St. Louis
Sweden
Switzerland
Sydney
Szczecin
Taiwan
Tecum
Thames Valley
Tokyo
Toronto
Trondheim
Tulsa
Turkey
Ukraine
University of Melbourne
Vale do Paraíba
Vancouver
Venezuela
Welsh - Cymru
Wisconsin
Xi'an
Subsites
Code Reviews
Code Repositories
Package Search
Bugster
Bugzilla
Test Machines
Planet
Mailing Lists
Elections & Polls
ARC Case Logs
Source Juicer
Package Factory
User Authentication
Project xfce Pages
Building Xfce
How to build in a Zone
What's new or fixed
Getting Xfce
Xfce Goodies
Screenshots