1 This hg repository is a child of the ON gate. In order to build it, 2 take a clone of it as you would the normal ON gate. It allows ON 3 developers to experiment with creating an IPS repository from the ON 4 source bits. 5 6 Questions should be sent to on-ips-dev (a] opensolaris.org. Users of this 7 gate are required to sign up for this alias as the code is experimental 8 and procedures may change rapidly. 9 10 Bugs can be filed at defect.opensolaris.org in 11 Development / osnet-pkg / build. 12 Bugs in bugster which are resolved as a side-effect of this putback 13 are being marked with the "on_ips" keyword. Feel free to add to them. 14 15 Prerequisites 16 17 You must be running at least build 131 of OpenSolaris from 18 ipkg.sfbay/dev (SWAN) or pkg.opensolaris.org/dev repository. 19 We expect to relax this requirement some for initial putback, 20 but that work's not done yet, and Nevada has stopped releasing 21 new bits, so you'll have to upgrade your build machines soon 22 anyways. It's a good time to install OpenSolaris on your build 23 machines. 24 25 Building 26 27 1. hg clone ssh://anon (a] hg.opensolaris.org/hg/pkg/on_ips 28 1'. If you're running closed builds, you need the closed bits as well. 29 If you're external to SWAN, this isn't available nor necessary, 30 and you should keep running the open build. 31 32 hg clone ssh://mrliberal.central//export/gates/on-ips-closed 33 34 2. Do a normal ON build, including the -t and -p options, using 35 the nightly script in the gate you pulled above. (If you haven't 36 done so before, use 'ws' or your normal 'bldenv', 37 cd usr/src/tools/scripts; make. That will build nightly for 38 your use.) 39 40 3. Your repos should now be in 41 $CODEMGR_WS/packages/$MACH/nightly[-nd]/repo.(extra|redist) 42 43 repo.redist contains the bulk of ON, and is what is delivered 44 to the main OpenSolaris 'dev' and 'release' repositories. 45 46 repo.extra will only be built for Closed builds, and contains 47 non-redistributable (without a proper legal agreement) pieces 48 which may or may not be suitable for inclusion in the 49 pkg.sun.com/opensolaris/extra repository, including the 50 SUNWcryptoint bits necessary for working crypto in a Closed 51 build. Do not distribute any of the bits in repo.extra 52 without prior agreement from the appropriate lawyers. 53 54 Testing 55 56 0. Make sure your test system is running latest OpenSolaris bits 57 from ipkg.sfbay/dev (SWAN) or pkg.opensolaris.org/dev. 58 59 1. On your test system, you can use the "onu" script from 60 usr/src/tools/scripts/onu. (This script will be available 61 in the normal SUNWonbld locations after putback.) 62 63 onu -t mybits-1 -d <nfs path to repo directory> 64 65 If you're building Open bits only, add the -O flag to the above. 66 67 1'. Or, if you plan to upgrade lots of test systems to these bits, 68 or if there's a relatively slow pipe between the two machines, 69 setup a repository server manually. 70 71 a. On your build server, 72 73 $ cd $CODEMGR_WS/packages/$MACH/nightly[-nd] 74 $ /usr/lib/pkg.depotd -d repo.redist -p 13000 & 75 (or another unused port) 76 77 And if you're not building Open bits, you'll need SUNWcryptoint, 78 which isn't available in redist. 79 $ /usr/lib/pkg.depotd -d repo.extra -p 13001 & 80 (or another unused port) 81 82 b. On your test system, 83 84 # pkg set-publisher -P -O http://<your server host>:13000 on-nightly 85 # pkg set-publisher --non-sticky opensolaris.org 86 # pkg uninstall entire 87 88 (And again, only if you're building non-Open bits: 89 # pkg set-publisher -O http://<your server host>:13001 on-extra 90 ) 91 92 # pkg image-update 93 # reboot 94 95 Or, you can archive (tar, cpio, whatever) the "repo" directories, and 96 have people copy your depot to a local machine and start pkg.depotd 97 there. The pkg.depotd can even be running on the system you're 98 updating. 99 100 If you've been upgrading from pre-January on-nightly repositories, 101 please look at README.repo in this directory for some important, 102 though easy to resolve gotchas. 103 104 Making Packaging Changes 105 106 You'll need to make corresponding packaging changes to the IPS 107 manifests. Here's how. In all cases, the ".mf" manifest files live 108 in usr/src/pkg/manifests. 109 110 For modifications to existing prototype_* files: 111 * Add appropriate actions to the .mf files. 112 113 For driver modifications to postinstall scripts: 114 * Translate the postinstall invocation into an appropriate 115 "driver" action in the proper usr/src/pkg/manifests/*.manifest 116 file. 117 * Often, this just requires adding alias= entries to the existing 118 action. 119 120 For other modifications to postinstall scripts: 121 * Generally, they must be ignored for now. 122 123 For new packages: 124 * Create a new .mf file, using another package as a template. 125 The metadata mostly comes from pkginfo.tmpl. 126 * If at all possible, model your work on a similar, existing 127 package manifest. Ie a different audio driver, etc. 128 * Make sure to consider whether the package should be combined with 129 any others. The u/r package split is explicitly gone now, so 130 no need to create new packages to contain files in /usr when 131 there's already an appropriate root package. 132 133 For deleted packages: 134 * Edit the manifest; grep for "pkg.obsolete" for an example. 135 136 For renamed packages: 137 * Edit the manifest; grep for "pkg.renamed" for an example. 138 139 Remember, you can check your work with "make check" in usr/src/pkg. 140 141 Incremental Builds 142 143 If you want to process a subset of manifests, simply set PKGS on the 144 make command line and specify the "all" target. If you want to process 145 them all, simply specify the "all" target. 146 147 % dmake -e PKGS="BRCMbnx BRCMbnxe" all 148 % dmake -e all 149 150 If you want to publish a subset of packages, simply set PKGS on the 151 make command line and specify the "install" target. If you want to 152 publish them all, simply specify the "install" target. 153 154 % dmake -e PKGS="BRCMbnx BRCMbnxe" install 155 % dmake -e install 156 157 You can also use package names, or package names with ".pub" 158 extensions, as build targets. This will cause processing or 159 publication of the specified package(s). This differs from using 160 the "all" or "install" targets and overriding PKGS in that it will 161 not clear out the target repositories, and it will not build 162 synthetic packages or package lists. 163 164 The on-disk repository will be initialized when it does not exist, 165 or when you use the "install" target. If you publish individual 166 packages, they will simply be added to the existing repository. 167 168 To do cross-platform packaging, prefix your target with (for 169 example) "sparc/", as in "dmake sparc/install" Note that we 170 currently pull some license files directly from a built source 171 tree, so if you do this in a workspace that had proto area copied 172 in via nightly -U, then you'll need to set $SRC to point to the 173 workspace that was actually built. 174 175