Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2015
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.23 KB | None | 0 0
  1. #
  2. # CDDL HEADER START
  3. #
  4. # The contents of this file are subject to the terms of the
  5. # Common Development and Distribution License (the "License").
  6. # You may not use this file except in compliance with the License.
  7. #
  8. # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  9. # or http://www.opensolaris.org/os/licensing.
  10. # See the License for the specific language governing permissions
  11. # and limitations under the License.
  12. #
  13. # When distributing Covered Code, include this CDDL HEADER in each
  14. # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15. # If applicable, add the following below this CDDL HEADER, with the
  16. # fields enclosed by brackets "[]" replaced with your own identifying
  17. # information: Portions Copyright [yyyy] [name of copyright owner]
  18. #
  19. # CDDL HEADER END
  20. #
  21. # Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  22. # Copyright 2015 Nexenta Systems, Inc. All rights reserved.
  23. # Copyright 2012 Joshua M. Clulow <josh@sysmgr.org>
  24. # Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved.
  25. #
  26.  
  27. # Configuration variables for the runtime environment of the nightly
  28. # build script and other tools for construction and packaging of
  29. # releases.
  30. # This example is suitable for building an illumos workspace, which
  31. # will contain the resulting archives. It is based off the onnv
  32. # release. It sets NIGHTLY_OPTIONS to make nightly do:
  33. # DEBUG build only (-D, -F)
  34. # do not bringover from the parent (-n)
  35. # runs 'make check' (-C)
  36. # checks for new interfaces in libraries (-A)
  37. # runs lint in usr/src (-l plus the LINTDIRS variable)
  38. # sends mail on completion (-m and the MAILTO variable)
  39. # creates packages for PIT/RE (-p)
  40. # checks for changes in ELF runpaths (-r)
  41. # build and use this workspace's tools in $SRC/tools (-t)
  42. #
  43. # - This file is sourced by "bldenv.sh" and "nightly.sh" and should not
  44. # be executed directly.
  45. # - This script is only interpreted by ksh93 and explicitly allows the
  46. # use of ksh93 language extensions.
  47. #
  48. export NIGHTLY_OPTIONS='-FnCDAmprt'
  49.  
  50. # by default will generated IPS packages.
  51. # if you need DEB packages uncomment line.
  52. export PKGS_TYPE="deb"
  53.  
  54. # if you use DEB packages you have to define DEB_VERSION
  55. export DEB_VERSION="1.x.x"
  56.  
  57. # provide maintainer name
  58. export DEB_MAINTAINER="Maintainer Name <your_email@domain.org>"
  59.  
  60. # you can define flags for dpkg_buildpackage.
  61. # if you want sign your packages by GPG key you can remove '-uc'
  62. # run 'dpkg_buildpackage --help' for more information about flags
  63. export DPKG_BUILD_FLAGS="-b -d -uc"
  64.  
  65. # CODEMGR_WS - where is your workspace at
  66. #export CODEMGR_WS="$HOME/ws/illumos-gate"
  67. export CODEMGR_WS="`git rev-parse --show-toplevel`"
  68.  
  69. # Maximum number of dmake jobs. The recommended number is 2 + NCPUS,
  70. # where NCPUS is the number of logical CPUs on your build system.
  71. function maxjobs
  72. {
  73. nameref maxjobs=$1
  74. integer ncpu
  75. integer -r min_mem_per_job=512 # minimum amount of memory for a job
  76.  
  77. ncpu=$(builtin getconf ; getconf 'NPROCESSORS_ONLN')
  78. (( maxjobs=ncpu + 2 ))
  79.  
  80. # Throttle number of parallel jobs launched by dmake to a value which
  81. # gurantees that all jobs have enough memory. This was added to avoid
  82. # excessive paging/swapping in cases of virtual machine installations
  83. # which have lots of CPUs but not enough memory assigned to handle
  84. # that many parallel jobs
  85. if [[ $(/usr/sbin/prtconf 2>'/dev/null') == ~(E)Memory\ size:\ ([[:digit:]]+)\ Megabytes ]] ; then
  86. integer max_jobs_per_memory # parallel jobs which fit into physical memory
  87. integer physical_memory # physical memory installed
  88.  
  89. # The array ".sh.match" contains the contents of capturing
  90. # brackets in the last regex, .sh.match[1] will contain
  91. # the value matched by ([[:digit:]]+), i.e. the amount of
  92. # memory installed
  93. physical_memory="10#${.sh.match[1]}"
  94.  
  95. ((
  96. max_jobs_per_memory=round(physical_memory/min_mem_per_job) ,
  97. maxjobs=fmax(2, fmin(maxjobs, max_jobs_per_memory))
  98. ))
  99. fi
  100.  
  101. return 0
  102. }
  103.  
  104. maxjobs DMAKE_MAX_JOBS # "DMAKE_MAX_JOBS" passed as ksh(1) name reference
  105. export DMAKE_MAX_JOBS
  106.  
  107. # path to onbld tool binaries
  108. ONBLD_BIN='/opt/onbld/bin'
  109.  
  110. # PARENT_WS is used to determine the parent of this workspace. This is
  111. # for the options that deal with the parent workspace (such as where the
  112. # proto area will go).
  113. export PARENT_WS=''
  114.  
  115. # CLONE_WS is the workspace nightly should do a bringover from.
  116. export CLONE_WS='ssh://anonhg@hg.illumos.org/illumos-gate'
  117. export CLONE_WS='https://bitbucket.org/dilos/dilos-illumos-gate'
  118.  
  119. # The bringover, if any, is done as STAFFER.
  120. # Set STAFFER to your own login as gatekeeper or developer
  121. # The point is to use group "staff" and avoid referencing the parent
  122. # workspace as root.
  123. # Some scripts optionally send mail messages to MAILTO.
  124. #
  125. export STAFFER="$LOGNAME"
  126. export MAILTO="$STAFFER"
  127.  
  128. # If you wish the mail messages to be From: an arbitrary address, export
  129. # MAILFROM.
  130. #export MAILFROM="user@example.com"
  131.  
  132. # The project (see project(4)) under which to run this build. If not
  133. # specified, the build is simply run in a new task in the current project.
  134. export BUILD_PROJECT=''
  135.  
  136. # You should not need to change the next three lines
  137. export ATLOG="$CODEMGR_WS/log"
  138. export LOGFILE="$ATLOG/nightly.log"
  139. export MACH="$(uname -p)"
  140.  
  141. #
  142. # The following macro points to the closed binaries. Once illumos has
  143. # totally freed itself, we can remove this reference.
  144. #
  145. # Location of encumbered binaries.
  146. export ON_CLOSED_BINS="$CODEMGR_WS/closed"
  147.  
  148. # REF_PROTO_LIST - for comparing the list of stuff in your proto area
  149. # with. Generally this should be left alone, since you want to see differences
  150. # from your parent (the gate).
  151. #
  152. export REF_PROTO_LIST="$PARENT_WS/usr/src/proto_list_${MACH}"
  153.  
  154.  
  155. export ROOT="$CODEMGR_WS/proto/root_${MACH}"
  156. export SRC="$CODEMGR_WS/usr/src"
  157. export MULTI_PROTO="no"
  158.  
  159. #
  160. # build environment variables, including version info for mcs, motd,
  161. # motd, uname and boot messages. Mostly you shouldn't change this except
  162. # when the release slips (nah) or you move an environment file to a new
  163. # release
  164. #
  165. export VERSION="`git describe --long --all HEAD | cut -d/ -f2-`"
  166.  
  167. #
  168. # the RELEASE and RELEASE_DATE variables are set in Makefile.master;
  169. # there might be special reasons to override them here, but that
  170. # should not be the case in general
  171. #
  172. # export RELEASE='5.11'
  173. # export RELEASE_DATE='October 2007'
  174.  
  175. # proto area in parent for optionally depositing a copy of headers and
  176. # libraries corresponding to the protolibs target
  177. # not applicable given the NIGHTLY_OPTIONS
  178. #
  179. export PARENT_ROOT="$PARENT_WS/proto/root_$MACH"
  180. export PARENT_TOOLS_ROOT="$PARENT_WS/usr/src/tools/proto/root_$MACH-nd"
  181.  
  182. # Package creation variables. You probably shouldn't change these,
  183. # either.
  184. #
  185. # PKGARCHIVE determines where the repository will be created.
  186. #
  187. # PKGPUBLISHER_REDIST controls the publisher setting for the repository.
  188. #
  189. export PKGARCHIVE="${CODEMGR_WS}/packages/${MACH}/nightly"
  190.  
  191. # path for local APT repo. Uncomment line below if needed
  192. export PKGARCHIVEAPT="${CODEMGR_WS}/packages/${MACH}/apt"
  193.  
  194. # export PKGPUBLISHER_REDIST='on-redist'
  195.  
  196. # Package manifest format version.
  197. export PKGFMT_OUTPUT='v1'
  198.  
  199. # we want make to do as much as it can, just in case there's more than
  200. # one problem.
  201. export MAKEFLAGS='k'
  202.  
  203. # Magic variable to prevent the devpro compilers/teamware from sending
  204. # mail back to devpro on every use.
  205. export UT_NO_USAGE_TRACKING='1'
  206.  
  207. # Build tools - don't change these unless you know what you're doing. These
  208. # variables allows you to get the compilers and onbld files locally.
  209. # Set BUILD_TOOLS to pull everything from one location.
  210. # Alternately, you can set ONBLD_TOOLS to where you keep the contents of
  211. # SUNWonbld and SPRO_ROOT to where you keep the compilers. SPRO_VROOT
  212. # exists to make it easier to test new versions of the compiler.
  213. export BUILD_TOOLS='/opt'
  214. #export ONBLD_TOOLS='/opt/onbld'
  215. export SPRO_ROOT='/opt/sunstudio12.1'
  216. export SPRO_VROOT="$SPRO_ROOT"
  217.  
  218. # This goes along with lint - it is a series of the form "A [y|n]" which
  219. # means "go to directory A and run 'make lint'" Then mail me (y) the
  220. # difference in the lint output. 'y' should only be used if the area you're
  221. # linting is actually lint clean or you'll get lots of mail.
  222. # You shouldn't need to change this though.
  223. #export LINTDIRS="$SRC y"
  224.  
  225. # Set this flag to 'n' to disable the use of 'checkpaths'. The default,
  226. # if the 'N' option is not specified, is to run this test.
  227. #CHECK_PATHS='y'
  228.  
  229. # POST_NIGHTLY can be any command to be run at the end of nightly. See
  230. # nightly(1) for interactions between environment variables and this command.
  231. #POST_NIGHTLY=
  232.  
  233. # Comment this out to disable support for IPP printing, i.e. if you
  234. # don't want to bother providing the Apache headers this needs.
  235. export ENABLE_IPP_PRINTING=
  236.  
  237. # Comment this out to disable support for SMB printing, i.e. if you
  238. # don't want to bother providing the CUPS headers this needs.
  239. export ENABLE_SMB_PRINTING=
  240.  
  241. #
  242. # These checks ensure that if we accidentally run a program linked against the
  243. # proto area, that we then fail the build.
  244. #
  245. export LD_TOXIC_PATH="$ROOT/lib:$ROOT/usr/lib"
  246.  
  247. export __GNUC="" # enable GCC as default compiler
  248. export CW_NO_SHADOW=1 # disable shadow compiler
  249. export GCC_ROOT="/usr/gcc/4.8" # path to GCC44 binaries installed
  250. export CW_GCC_DIR="$GCC_ROOT/bin" # hack for compilation build tools
  251. export JAVA_HOME='/export/home/tsoome/jdk1.7.0_79' # where is your oracle JDK7 installed
  252. # disable SMB_PRINTING
  253. export ENABLE_SMB_PRINTING='#'
  254. export ENABLE_IPP_PRINTING='#'
  255. export GATE='1.1a3-dbg' # it is variable will be updated on loading kernel screen.
  256. export BLD_REVISION="de2635cff452" # it is HG revision from command: hg log -l 1
  257.  
  258. #export PKGS_TYPE="deb" # dilos-illumos-gate contain it as default.
  259. export DEB_VERSION="1.3.7.84-1" # DEB packages version, must be incremented for correct upgrade
  260. export DEB_MAINTAINER="Igor Kozhukhov <ikozhukhov@gmail.com>" # you can use your name here
  261. export DPKG_BUILD_FLAGS="-b -d -uc" # flags for dpkg-buildpackage. You can provide your flags.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement