Print this page
Remove Python 2.6
| Split |
Close |
| Expand all |
| Collapse all |
--- old/build/pkg/build.sh
+++ new/build/pkg/build.sh
1 1 #!/usr/bin/bash
2 2 #
3 3 # CDDL HEADER START
4 4 #
5 5 # The contents of this file are subject to the terms of the
6 6 # Common Development and Distribution License, Version 1.0 only
7 7 # (the "License"). You may not use this file except in compliance
8 8 # with the License.
9 9 #
10 10 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11 11 # or http://www.opensolaris.org/os/licensing.
12 12 # See the License for the specific language governing permissions
13 13 # and limitations under the License.
|
↓ open down ↓ |
13 lines elided |
↑ open up ↑ |
14 14 #
15 15 # When distributing Covered Code, include this CDDL HEADER in each
16 16 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17 17 # If applicable, add the following below this CDDL HEADER, with the
18 18 # fields enclosed by brackets "[]" replaced with your own identifying
19 19 # information: Portions Copyright [yyyy] [name of copyright owner]
20 20 #
21 21 # CDDL HEADER END
22 22 #
23 23 #
24 -# Copyright 2011-2012 OmniTI Computer Consulting, Inc. All rights reserved.
24 +# Copyright 2017 OmniTI Computer Consulting, Inc. All rights reserved.
25 25 # Use is subject to license terms.
26 26 #
27 27 # Load support functions
28 28 . ../../lib/functions.sh
29 29
30 30 # This are used so people can see what packages get built.. pkg actually publishes
31 31 PKG=package/pkg
32 32 PKG=system/zones/brand/ipkg
33 33 PKG=system/zones/brand/lipkg
34 34 SUMMARY="This isn't used, it's in the makefiles for pkg"
35 35 DESC="This isn't used, it's in the makefiles for pkg"
36 36
37 37 PROG=pkg
38 38 VER=omni
39 39 BUILDNUM=$RELVER
40 40 if [[ -z "$PKGPUBLISHER" ]]; then
|
↓ open down ↓ |
6 lines elided |
↑ open up ↑ |
41 41 logerr "No PKGPUBLISHER specified. Check lib/site.sh?"
42 42 exit # Force it, we're fucked here.
43 43 fi
44 44
45 45 GIT=/usr/bin/git
46 46 # On a running system, these are in /usr/include/.
47 47 HEADERS="libbrand.h libuutil.h libzonecfg.h"
48 48 BRAND_CFLAGS="-I./gate-include"
49 49
50 50 BUILD_DEPENDS_IPS="developer/versioning/git developer/versioning/mercurial system/zones/internal"
51 -DEPENDS_IPS="runtime/python-26@2.6.7"
51 +DEPENDS_IPS="runtime/python-27"
52 52
53 53 crib_headers(){
54 54 # Use PREBUILT_ILLUMOS if available, otherwise, just pull off the
55 55 # running system.
56 56 mkdir -p $TMPDIR/$BUILDDIR/pkg/src/brand/gate-include ||
57 57 logerr "Cannot create include stub directory"
58 58 for hdr in $HEADERS; do
59 59 # first just copy from the running system
60 60 cp /usr/include/$hdr $TMPDIR/$BUILDDIR/pkg/src/brand/gate-include/. ||
61 61 logerr "Copy $hdr from /usr/include failed"
62 62 # then see if we can get the more recent PREBUILT_ILLUMOS version...
63 63 cp $PREBUILT_ILLUMOS/proto/root_`uname -p`/usr/include/$hdr \
64 64 $TMPDIR/$BUILDDIR/pkg/src/brand/gate-include/. ||
65 65 logmsg "Copy $hdr from PREBUILT_ILLUMOS ($PREBUILT_ILLUMOS) failed. Using /usr/include version."
66 66 done
67 67 }
68 68
69 69 # Respect an environmental override on this, for development's sake.
70 70 PKG_SOURCE_REPO=${PKG_SOURCE_REPO:-https://github.com/omniti-labs/pkg5}
71 71
72 72 clone_source(){
73 73 logmsg "pkg -> $TMPDIR/$BUILDDIR/pkg"
74 74 logcmd mkdir -p $TMPDIR/$BUILDDIR
75 75 pushd $TMPDIR/$BUILDDIR > /dev/null
76 76 # Even though our default is "pkg5" now, still call the directory
77 77 # "pkg" for now due to the hideous number of places "pkg" occurs here.
78 78 if [[ ! -d pkg ]]; then
79 79 logcmd $GIT clone $PKG_SOURCE_REPO pkg
80 80 fi
81 81 pushd pkg > /dev/null || logerr "no source"
82 82 logcmd $GIT pull || logerr "failed to pull"
83 83 logcmd $GIT checkout r$RELVER || logmsg "No r$RELVER branch, using master."
84 84 popd > /dev/null
85 85 popd > /dev/null
86 86 }
87 87
88 88 build(){
89 89 pushd $TMPDIR/$BUILDDIR/pkg/src > /dev/null || logerr "Cannot change to src dir"
90 90 find . -depth -name \*.mo -exec touch {} \;
91 91 touch `find gui/help -depth -name \*.in | sed -e 's/\.in$//'`
92 92 pushd $TMPDIR/$BUILDDIR/pkg/src/brand > /dev/null
93 93 logmsg "--- brand subbuild"
94 94 logcmd make clean
95 95 ISALIST=i386 CC=gcc CFLAGS="$BRAND_CFLAGS" logcmd make \
96 96 CODE_WS=$TMPDIR/$BUILDDIR/pkg || logerr "brand make failed"
97 97 popd
98 98 logmsg "--- toplevel build"
99 99 logcmd make clean
100 100 ISALIST=i386 CC=gcc logcmd make \
101 101 CODE_WS=$TMPDIR/$BUILDDIR/pkg || logerr "toplevel make failed"
102 102 logmsg "--- proto install"
103 103 ISALIST=i386 CC=gcc logcmd make install \
104 104 CODE_WS=$TMPDIR/$BUILDDIR/pkg || logerr "proto install failed"
105 105 popd > /dev/null
106 106 }
107 107 package(){
108 108 pushd $TMPDIR/$BUILDDIR/pkg/src/pkg > /dev/null
109 109 logmsg "--- packaging"
110 110 logcmd make clean
111 111 ISALIST=i386 CC=gcc logcmd make \
112 112 CODE_WS=$TMPDIR/$BUILDDIR/pkg \
113 113 BUILDNUM=$BUILDNUM || logerr "pkg make failed"
114 114 ISALIST=i386 CC=gcc logcmd make publish-pkgs \
115 115 CODE_WS=$TMPDIR/$BUILDDIR/pkg \
116 116 BUILDNUM=$BUILDNUM \
117 117 PKGSEND_OPTS="" \
118 118 PKGPUBLISHER=$PKGPUBLISHER \
119 119 PKGREPOTGT="" \
120 120 PKGREPOLOC="$PKGSRVR" \
121 121 || logerr "publish failed"
122 122 popd > /dev/null
123 123 }
124 124
125 125 init
126 126 clone_source
127 127 # This is hugely expensive
128 128 # We've committed these files to pkg, but they need to be kept up to date
129 129 #crib_headers
130 130 build
131 131 package
|
↓ open down ↓ |
70 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX