2 <html lang="en-us" itemscope itemtype="http://schema.org/Article">
5 <meta name="description" content=" Attempting to build LOS178 - CR 570 (Posix) Tried to make changes for package.sh. Problems are: Waiting for CR fom Moscow to address including of libstdc++ for LOS 2.1.0 GD lacks libstdc++ from ppc.cdksol.tar.gz! Entered CR #38 for that...">
6 <meta name="generator" content="Movable Type 5.2.3">
7 <title>LOS178-570/int/package and check - Status</title>
8 <link rel="alternate" type="application/atom+xml" title="Recent Entries" href="http://defaria.com/blogs/Status/atom.xml">
9 <link rel="canonical" href="http://defaria.com/blogs/Status/2005/05/los178570intpac.html">
10 <meta name="viewport" content="width=device-width,initial-scale=1">
11 <link rel="stylesheet" href="http://defaria.com/blogs/Status/styles.css">
13 <link rel="stylesheet" href="http://defaria.com/blogs/Status/styles_ie.css">
14 <script src="/mt/mt-static/support/theme_static/rainier/js/html5shiv.js"></script>
17 <link rel="start" href="http://defaria.com/blogs/Status/">
19 <link rel="prev" href="http://defaria.com/blogs/Status/2005/05/los178-tot.html" title="LOS178 TOT">
20 <link rel="next" href="http://defaria.com/blogs/Status/2005/05/los178-tot-1.html" title="LOS178 TOT">
21 <!-- Open Graph Protocol -->
22 <meta property="og:type" content="article">
23 <meta property="og:locale" content="en-us">
24 <meta property="og:title" content="LOS178-570/int/package and check">
25 <meta property="og:url" content="http://defaria.com/blogs/Status/2005/05/los178570intpac.html">
26 <meta property="og:description" content=" Attempting to build LOS178 - CR 570 (Posix) Tried to make changes for package.sh. Problems are: Waiting for CR fom Moscow to address including of libstdc++ for LOS 2.1.0 GD lacks libstdc++ from ppc.cdksol.tar.gz! Entered CR #38 for that...">
27 <meta property="og:site_name" content="Status">
28 <meta property="og:image" content="/mt/mt-static/support/theme_static/rainier/img/siteicon-sample.png">
30 <meta itemprop="description" content=" Attempting to build LOS178 - CR 570 (Posix) Tried to make changes for package.sh. Problems are: Waiting for CR fom Moscow to address including of libstdc++ for LOS 2.1.0 GD lacks libstdc++ from ppc.cdksol.tar.gz! Entered CR #38 for that...">
31 <link itemprop="url" href="http://defaria.com/blogs/Status/2005/05/los178570intpac.html">
32 <link itemprop="image" href="/mt/mt-static/support/theme_static/rainier/img/siteicon-sample.png">
37 <div id="container-inner">
38 <header id="header" role="banner">
39 <div id="header-inner">
40 <div id="header-content">
42 <a href="http://defaria.com/blogs/Status/">
51 <nav role="navigation">
53 <li><a href="http://defaria.com/blogs/Status/">Home</a></li>
62 <div id="content-inner">
63 <ul class="breadcrumb breadcrumb-list">
64 <li class="breadcrumb-list-item"><a href="http://defaria.com/blogs/Status/">Home</a></li>
65 <li class="breadcrumb-list-item">LOS178-570/int/package and check</li>
67 <div id="individual-main" class="main" role="main">
68 <article id="entry-1631" class="entry entry-asset asset hentry">
69 <div class="asset-header">
70 <h2 itemprop="name" class="asset-name entry-title">LOS178-570/int/package and check</h2>
71 <footer class="asset-meta">
72 <ul class="asset-meta-list">
73 <li class="asset-meta-list-item">Posted on <time datetime="2005-05-18T18:27:23-08:00" itemprop="datePublished">May 18, 2005</time></li>
74 <li class="asset-meta-list-item">by <span class="author entry-author vcard"></span></li>
77 <li class="asset-meta-list-item">in <a itemprop="articleSection" rel="tag" href="http://defaria.com/blogs/Status/lynuxworks/">LynuxWorks</a></li>
83 <div class="entry-content asset-content" itemprop="articleBody">
85 <li>Attempting to build LOS178 - CR 570 (Posix)</li>
87 <li>Tried to make changes for package.sh. Problems are:</li>
90 <li>Waiting for CR fom Moscow to address including of libstdc++ for LOS 2.1.0</li>
92 <li>GD lacks libstdc++ from ppc.cdksol.tar.gz! Entered CR #38 for that</lii>
94 <li>It was thought that changes to package.sh could be made without the need for a CR. Unfortunately the CVS setup is such that a CR is required, even for comitting changes to toolbox</li>
97 <li>Described new scripts for check and package. Check can be used to help tally the number of growing warnings</li>
99 <li>Described plan for a /int area so as to centralized our tools and scripts</li>
101 <h3>Check and Package</h3>
103 <p>I've done a little work on trying to come up with more generic scripts that can be used across build machines or indeed the organization. Specifically I've been targeting things like packaging and checking. My scripting language of choice is Perl.</p>
105 <p>All scripts are relative to my machine at present at saturn:/int. You are free to mount this file system from my machine to your machine to check out the code. In the future I plan on putting this all into a cvs repository and making if available to all who want/need it via a global file system such that adding /int/bin and perhaps /int/adm/bin to one's PATH is all that is needed to gain access to these scripts on any machine. Details of this will be forthcoming in another email.</p>
107 <p>In this message I will only describe the check and package scripts. Other scripts, including such things as cvs_report, ecrc as well as web pages and scripts will eventually be documented probably through a series of web pages.</p>
109 <h4>Check script</h4>
111 <p>Jas had asked me to enhance the checking of install.logs so as to keep track of the growing number of warnings. The check script does this. It will check for errors using the common error strings of other check like scripts as well as warning and optionally issue a total number of errors and warnings. The check script is in /int/bin/check. Here's a short usage:</p>
112 <div class="code"><pre>
113 Usage: check [-u] [-v] [-d] [-t] [-w] <logfile [logfile]>
118 -v Turn on verbose mode
119 -d Turn on debug mode
120 -t Display total line
122 <logfile> One or more log files to check
124 <p>With no options except logfile(s) check will output nothing but set the return status to the number of errors encountered. This allows future script to be able to use this in their script and just check the return status.</p>
126 <h4>Package script</h4>
128 <p>The idea here is to separate the definition of a package from the packaging code itself. The hope is to hand the package definition over to the developers themselves so that they can maintain that - after all they know better what goes where than we do.</p>
130 <p>Packaging is implemented as a module, specifically a Perl module and as a Perl object itself. The idea is to encapsulate what can be done with a package into an object. The object module is at /int/lib/LWPackage.pm. The "LW" stands for "LynuxWorks". An LWPackage object currently has 3 methods: new, list and package. The new method is called to create a new package object. One parameter must be specified, that being a pathname to a package spec file. That package spec file is parsed and the package object is populated. The list method will list all of the information about the package including the file list. Finally the package method produces the package image itself.</p>
132 <p>Here is a small Perl snippet that utilizes the LWPackage methods:</p>
133 <div class="code"><pre>
134 my $pkg = LWPackage->new (spec => $spec);
135 $pkg->list if get_verbose;
138 <p>In fact that's the main code for /int/bin/package, the packaging script. It creates a new LWPackage using the filename in $spec, calls the list method if verbose is turned on (get_verbose is part of the Display package) then calls the package method to create the package image.</p>
140 <h4>Package spec file</h4>
142 <p>Package spec files are denoted by the .lwp extension convention. The format of the spec file is pretty simple. As usual "#" indicate comments, etc. Look at /int/spec/* for example files. Basically the format is similar to:</p>
143 <div class="code"><pre>
154 <p>Name, ProductNbr, etc. are used in the creation of the image file name ($ProductNbr-$Release.$Name.$Version.tar.gz). The Fileset section defines the file sets included in the package relative to Base. An "*" denotes the usual connotation of "everything". Other path names could be listed one by one. For example, I could have:</p>
155 <div class="code"><pre>
164 <p>A minus sign does what you'd think - remove files denoted by this. So the above says, "everything under $Base except everything under $Base/data".</p>
166 <p>As for Fileset lines you can list multiple lines and they are processed in the order that they are entered. Duplicate filenames are removed and the Fileset list is ultimately sorted. You can list either directory names for whole directories (that are recursively processed) or individual file pathnames. Regex's are not supported (yet but should be).</p>
168 <p>The idea of a package spec is to define the Fileset from where they stand thus eliminating the need to copy large quantities of data into an alternate area so that that alternate area is "clean". IOW it should be able to pull only those necessary files from even a CVS or build tree directly. To that extend future arrangement of things into distinct areas will make writing packaging specs easier.</p>
170 <h3>A plan for /int</h4>
172 <p>We are seeking an NFS mountable global area where we can place various tools and scripts that will help us do our job. A previous email about the check and packaging scripts are an example of this. The basic idea is to be able to mount a global file system area to a short named path on the local system so that scripts like package and check, etc are accessible and readily available when needed.</p>
174 <p>So, for example, if t3:/export/int were that globally accessible file system one would mount t3:/export/int /int and then add /int/bin and perhaps /int/adm/bin to their path and these scripts would be available.</p>
176 <p>As these scripts will be used in business processes they are as valuable as our products themselves and thus should be placed under CVS. Let's assume that t3:/cvs/int-cvs were the CVS repository for these scripts. We could check out and modify our own scripts as we further develop them. A nightly cronjob could be set up to cvs export -r >RELTAG< /export/int to make sure that /export/int reflects <RELTAG> where >RELTAG< is some release tag. Then people could check out and enhance/modify our scripts in a test like environment and when "released" simply move the >RELTAG< to the committed version. The updated version would be available the next day (or we could force it by hand if necessary).</p>
178 <p>As for what gets put into /int I see the following directory structure:</p>
181 <b>adm:</b> Administrative area
183 <b>bin:</b> Administrative bin scripts<br>
184 <b>data:</b> Any adm data files that you might need<br>
185 <b>etc:</b> Rough equivalent of /etc<br>
186 <b>functions:</b> bash script functions (currently symlinked to ../functions)
188 <b>bin:</b> Scripts and apps for int<br>
189 <b>data:</b> Any data you might want<br>
190 <b>functions:</b> bash script functions<br>
191 <b>lib:</b> For Perl and other library modules<br>
192 <b>spec:</b> Spec files (may get rid of this)<br>
193 <b>test:</b> Any test scripts. For example, test script to test the functionality of the modules in ../lib<br>
194 <b>web:</b> Might want to move this elsewhere. Basically a replica of the web pages and scripts I've been doing (so as to have a copy)
197 <p>Of course this can change and evolve over time. The main idea is to have a standard place that is globally accessible and short pathed (you could easily type /int/bin/check if /int/bin is not in your path) at a well known path name. Also to sort of replicate or mimic the OS's standard directories like bin, etc, and the like so that it's easily understandable and "natural".</p>
199 <nav class="page-navigation entry-navigation pagination content-nav">
200 <ul class="page-navigation-list">
202 <li class="page-navigation-list-item page-navigation-prev"><a rel="prev" href="http://defaria.com/blogs/Status/2005/05/los178-tot.html" title="LOS178 TOT">Previous entry</a></li>
205 <li class="page-navigation-list-item page-navigation-next"><a rel="next" href="http://defaria.com/blogs/Status/2005/05/los178-tot-1.html" title="LOS178 TOT">Next entry</a></li>
210 <aside id="zenback" class="zenback feedback">
211 Please paste Zenback script code here.
218 <aside class="widgets related" role="complementary">
219 <nav class="widget-search widget">
220 <div class="widget-content">
221 <form method="get" id="search" action="http://defaria.com/mt/mt-search.cgi">
223 <input type="text" name="search" value="" placeholder="Search...">
225 <input type="hidden" name="IncludeBlogs" value="8">
227 <input type="hidden" name="limit" value="20">
228 <button type="submit" name="button">
229 <img alt="Search" src="/mt/mt-static/support/theme_static/rainier/img/search-icon.png">
235 <nav class="widget-archive-category widget">
236 <h3 class="widget-header">Categories</h3>
237 <div class="widget-content">
240 <ul class="widget-list">
243 <li class="widget-list-item"><a href="http://defaria.com/blogs/Status/ameriquest/">Ameriquest (99)</a>
251 <li class="widget-list-item"><a href="http://defaria.com/blogs/Status/audience/">Audience (3)</a>
259 <li class="widget-list-item"><a href="http://defaria.com/blogs/Status/broadcom/">Broadcom (76)</a>
267 <li class="widget-list-item"><a href="http://defaria.com/blogs/Status/gpdb/">GPDB (35)</a>
275 <li class="widget-list-item"><a href="http://defaria.com/blogs/Status/general-dynamics/">General Dynamics (61)</a>
283 <li class="widget-list-item"><a href="http://defaria.com/blogs/Status/general-electric/">General Electric (13)</a>
291 <li class="widget-list-item"><a href="http://defaria.com/blogs/Status/hewlett-packard/">Hewlett Packard (13)</a>
299 <li class="widget-list-item"><a href="http://defaria.com/blogs/Status/lynuxworks/">LynuxWorks (162)</a>
307 <li class="widget-list-item"><a href="http://defaria.com/blogs/Status/pqa/">PQA (35)</a>
315 <li class="widget-list-item"><a href="http://defaria.com/blogs/Status/salira/">Salira (79)</a>
323 <li class="widget-list-item"><a href="http://defaria.com/blogs/Status/tellabs/">Tellabs (2)</a>
331 <li class="widget-list-item"><a href="http://defaria.com/blogs/Status/texas-instruments/">Texas Instruments (31)</a>
343 <nav class="widget-archive-dropdown widget">
344 <h3 class="widget-header">Archives</h3>
345 <div class="widget-content">
347 <option>Select a Month...</option>
349 <option value="http://defaria.com/blogs/Status/2016/02/">February 2016</option>
353 <option value="http://defaria.com/blogs/Status/2014/09/">September 2014</option>
357 <option value="http://defaria.com/blogs/Status/2014/04/">April 2014</option>
361 <option value="http://defaria.com/blogs/Status/2014/03/">March 2014</option>
365 <option value="http://defaria.com/blogs/Status/2013/02/">February 2013</option>
369 <option value="http://defaria.com/blogs/Status/2012/09/">September 2012</option>
373 <option value="http://defaria.com/blogs/Status/2012/08/">August 2012</option>
377 <option value="http://defaria.com/blogs/Status/2012/05/">May 2012</option>
381 <option value="http://defaria.com/blogs/Status/2012/04/">April 2012</option>
385 <option value="http://defaria.com/blogs/Status/2012/02/">February 2012</option>
389 <option value="http://defaria.com/blogs/Status/2012/01/">January 2012</option>
393 <option value="http://defaria.com/blogs/Status/2011/10/">October 2011</option>
397 <option value="http://defaria.com/blogs/Status/2011/07/">July 2011</option>
401 <option value="http://defaria.com/blogs/Status/2010/09/">September 2010</option>
405 <option value="http://defaria.com/blogs/Status/2010/08/">August 2010</option>
409 <option value="http://defaria.com/blogs/Status/2010/04/">April 2010</option>
413 <option value="http://defaria.com/blogs/Status/2010/03/">March 2010</option>
417 <option value="http://defaria.com/blogs/Status/2010/02/">February 2010</option>
421 <option value="http://defaria.com/blogs/Status/2009/05/">May 2009</option>
425 <option value="http://defaria.com/blogs/Status/2009/04/">April 2009</option>
429 <option value="http://defaria.com/blogs/Status/2008/07/">July 2008</option>
433 <option value="http://defaria.com/blogs/Status/2008/05/">May 2008</option>
437 <option value="http://defaria.com/blogs/Status/2008/04/">April 2008</option>
441 <option value="http://defaria.com/blogs/Status/2008/03/">March 2008</option>
445 <option value="http://defaria.com/blogs/Status/2008/02/">February 2008</option>
449 <option value="http://defaria.com/blogs/Status/2008/01/">January 2008</option>
453 <option value="http://defaria.com/blogs/Status/2007/12/">December 2007</option>
457 <option value="http://defaria.com/blogs/Status/2007/11/">November 2007</option>
461 <option value="http://defaria.com/blogs/Status/2007/10/">October 2007</option>
465 <option value="http://defaria.com/blogs/Status/2007/09/">September 2007</option>
469 <option value="http://defaria.com/blogs/Status/2007/08/">August 2007</option>
473 <option value="http://defaria.com/blogs/Status/2007/07/">July 2007</option>
477 <option value="http://defaria.com/blogs/Status/2007/06/">June 2007</option>
481 <option value="http://defaria.com/blogs/Status/2007/05/">May 2007</option>
485 <option value="http://defaria.com/blogs/Status/2007/04/">April 2007</option>
489 <option value="http://defaria.com/blogs/Status/2007/03/">March 2007</option>
493 <option value="http://defaria.com/blogs/Status/2007/01/">January 2007</option>
497 <option value="http://defaria.com/blogs/Status/2006/12/">December 2006</option>
501 <option value="http://defaria.com/blogs/Status/2006/11/">November 2006</option>
505 <option value="http://defaria.com/blogs/Status/2006/10/">October 2006</option>
509 <option value="http://defaria.com/blogs/Status/2006/09/">September 2006</option>
513 <option value="http://defaria.com/blogs/Status/2006/07/">July 2006</option>
517 <option value="http://defaria.com/blogs/Status/2006/06/">June 2006</option>
521 <option value="http://defaria.com/blogs/Status/2006/05/">May 2006</option>
525 <option value="http://defaria.com/blogs/Status/2006/04/">April 2006</option>
529 <option value="http://defaria.com/blogs/Status/2006/03/">March 2006</option>
533 <option value="http://defaria.com/blogs/Status/2006/02/">February 2006</option>
537 <option value="http://defaria.com/blogs/Status/2006/01/">January 2006</option>
541 <option value="http://defaria.com/blogs/Status/2005/12/">December 2005</option>
545 <option value="http://defaria.com/blogs/Status/2005/11/">November 2005</option>
549 <option value="http://defaria.com/blogs/Status/2005/10/">October 2005</option>
553 <option value="http://defaria.com/blogs/Status/2005/09/">September 2005</option>
557 <option value="http://defaria.com/blogs/Status/2005/08/">August 2005</option>
561 <option value="http://defaria.com/blogs/Status/2005/07/">July 2005</option>
565 <option value="http://defaria.com/blogs/Status/2005/06/">June 2005</option>
569 <option value="http://defaria.com/blogs/Status/2005/05/">May 2005</option>
573 <option value="http://defaria.com/blogs/Status/2005/04/">April 2005</option>
577 <option value="http://defaria.com/blogs/Status/2005/03/">March 2005</option>
581 <option value="http://defaria.com/blogs/Status/2005/02/">February 2005</option>
585 <option value="http://defaria.com/blogs/Status/2005/01/">January 2005</option>
589 <option value="http://defaria.com/blogs/Status/2004/12/">December 2004</option>
593 <option value="http://defaria.com/blogs/Status/2004/09/">September 2004</option>
597 <option value="http://defaria.com/blogs/Status/2004/08/">August 2004</option>
601 <option value="http://defaria.com/blogs/Status/2004/07/">July 2004</option>
605 <option value="http://defaria.com/blogs/Status/2004/06/">June 2004</option>
609 <option value="http://defaria.com/blogs/Status/2004/05/">May 2004</option>
613 <option value="http://defaria.com/blogs/Status/2004/04/">April 2004</option>
617 <option value="http://defaria.com/blogs/Status/2004/03/">March 2004</option>
621 <option value="http://defaria.com/blogs/Status/2004/02/">February 2004</option>
625 <option value="http://defaria.com/blogs/Status/2004/01/">January 2004</option>
629 <option value="http://defaria.com/blogs/Status/2003/12/">December 2003</option>
633 <option value="http://defaria.com/blogs/Status/2003/11/">November 2003</option>
641 <div class="widget-syndication widget section">
642 <div class="widget-content">
643 <p><img src="http://defaria.com/mt/mt-static/images/status_icons/feed.gif" alt="Subscribe to feed" width="9" height="9" /> <a href="http://defaria.com/blogs/Status/atom.xml">Subscribe to this blog's feed</a></p>
651 <footer id="footer" role="contentinfo">
652 <div id="footer-inner">
653 <div id="footer-content">
654 <nav role="navigation">
656 <li><a href="http://defaria.com/blogs/Status/">Home</a></li>
662 <p class="license">© Copyright 2016.</p>
663 <p class="poweredby">Powered by <a href="http://www.movabletype.org/">Movable Type</a></p>
669 <script src="http://defaria.com/mt/mt-static/jquery/jquery.min.js"></script>
670 <script src="http://defaria.com/blogs/Status/mt-theme-scale2.js"></script>