<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:38:23 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Whamcloud Community JIRA</title>
    <link>https://jira.whamcloud.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.4.14</version>
        <build-number>940014</build-number>
        <build-date>05-12-2023</build-date>
    </build-info>


<item>
            <title>[LU-3956] Eliminate lbuild&apos;s nonstandard build process</title>
                <link>https://jira.whamcloud.com/browse/LU-3956</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;lbuild&apos;s nonstandard build process is making improvements in lustre&apos;s build and packaging systems far more difficult than it should be.  We really need to move beyond lbuild&apos;s non-standard approach.&lt;/p&gt;

&lt;p&gt;To support proper build procedures for rpm-based distributions, we need a build farm that is capable of building rpms the way that stnards distros like Fedora do it.  One approach would be to use &lt;a href=&quot;http://fedoraproject.org/wiki/Projects/Mock&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;mock&lt;/a&gt;.  Another approach would be to boot a new VM instances for every build on every single version of each Linux distribution.  The VM instances would be launched from many known clean, basic images.&lt;/p&gt;

&lt;p&gt;Each piece of software that we want to build should have a .src.rpm.  That .src.rpm should have all proper dependencies expressed to allow it to be built under mock and other similar processes.&lt;/p&gt;

&lt;p&gt;&lt;del&gt;We&apos;ll need something that sits on top of mock to coordinate the build of dependant packages.  At LLNL we use a home-grown script, that honestly has probably exceeded its lifetime.&lt;/del&gt;&lt;/p&gt;

&lt;p&gt;&lt;del&gt;I would suggest that we again evaluate &lt;a href=&quot;http://fedoraproject.org/wiki/Koji&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Koji&lt;/a&gt;, which is Fedora&apos;s solution.  I haven&apos;t used it personally, so I don&apos;t know how suitable Koji would be.&lt;/del&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="20972">LU-3956</key>
            <summary>Eliminate lbuild&apos;s nonstandard build process</summary>
                <type id="3" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11318&amp;avatarType=issuetype">Task</type>
                                            <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</priority>
                        <status id="3" iconUrl="https://jira.whamcloud.com/images/icons/statuses/inprogress.png" description="This issue is being actively worked on at the moment by the assignee.">In Progress</status>
                    <statusCategory id="4" key="indeterminate" colorName="inprogress"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="mdiep">Minh Diep</assignee>
                                    <reporter username="morrone">Christopher Morrone</reporter>
                        <labels>
                    </labels>
                <created>Mon, 16 Sep 2013 20:40:46 +0000</created>
                <updated>Wed, 20 Jul 2016 18:26:26 +0000</updated>
                                            <version>Lustre 2.5.0</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                            <comments>
                            <comment id="117965" author="mdiep" created="Tue, 9 Jun 2015 19:50:40 +0000"  >&lt;p&gt;I am starting this conversion about using Fedora mock to build lustre. First off, I tried the mock command pulling lustre-release git. However, since git repo has lustre.spec.in, mock doesn&apos;t understand that and expecting lustre.spec. Any idea?&lt;/p&gt;</comment>
                            <comment id="117967" author="morrone" created="Tue, 9 Jun 2015 20:14:42 +0000"  >&lt;p&gt;I recommend building the .src.rpm, and then feeding that to mock.&lt;/p&gt;</comment>
                            <comment id="117971" author="morrone" created="Tue, 9 Jun 2015 20:54:15 +0000"  >&lt;p&gt;Perhaps I should give a bit more of an explanation so it is clear what is going on.&lt;/p&gt;

&lt;p&gt;By design, Lustre cannot be built from its state in the git repository without first taking a prerequisite action.  The build system needs to be bootstrapped into place before any configuration, compilation, and/or packaging can take place.&lt;/p&gt;

&lt;p&gt;Autotools (autoconf, automake, libtool) form the basis of Lustre&apos;s build system.  The bootstrapping step is a requirement for any system built on autotools.  When it comes to storing your source code in a source repository, there are two schools of thought when it comes to what to do with the products of the bootstrapping process: refresh and commit to the source repository the bootstrap products every time a build system file is modified, or never commit the products and just bootstrap before building.  There are advantages and disadvantages to both approaches.  Lustre chose the latter; we do not check the bootstrap products into the repository.&lt;/p&gt;

&lt;p&gt;So when we go to build lustre, the first step is always to bootstrap the build system.  We named the bootstrapping script autogen.sh, which is a commonly chosen name.  From the base of the source tree, run:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;sh autogen.sh&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Once autogen.sh is run, it is now possible to configure the build for the specific target platform (by running &quot;configure&quot; and choosing any desired configuration options), and then compile Lustre.  That is what a developers commonly do during development.  But when we are planning to package Lustre for distribution, we want to take a slightly different approach for the second step.&lt;/p&gt;

&lt;p&gt;After bootstrapping, we want to generate the canonical full tarball of the source code, ready to be used for further distro packaging, or for end users to untar and compile directly.&lt;/p&gt;

&lt;p&gt;To make the canonical tarball, we employ the &quot;make dist&quot; target.  That target is created by autotools.  The Makefiles themselves are generated by autotools as well.  So even though we are not ready to configure the build tree for a specific target environment, we need to run the configure script to create the Makefiles that will allow us to create the tarball.&lt;/p&gt;

&lt;p&gt;It is very important at this step to &lt;em&gt;not&lt;/em&gt; make any decisions during the configuration step at this point that would in change the contents of the tarball.  That tarball must include the full sources.  (The decisions about kernel choice, which OSD, etc. will be made later when the tarball is unpacked and configure is run again to actually test the environment and make decisions about how the sources need to be built.)  Since we are not making decisions about the environment yet, we can bypass most of the normal checks that we do when we run &lt;em&gt;configure&lt;/em&gt;.  In lustre we do that like so:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;./configure --enable-dist&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It is a struggle to keep the build system clean, so there are probably still some checks in there that are unnecessary, but it should be much better now on master than it was several years ago.&lt;/p&gt;

&lt;p&gt;And now, we can finally generate the canonical tarball:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;make dist&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;That tarball now contains the .spec files as well.  Before bootstrapping and configuration steps, the files were .spec.in as you noted.  We employ autotools to fill in a very few number of variables in the spec files.  They are: VERSION, DOWNSTREAM_RELEASE, and PACKAGE.  All other use of autotools variables in the spec files is forbidden, for reasons I won&apos;t go into.&lt;/p&gt;

&lt;p&gt;So now you have the canonical tarball.  Ideally this one tarball would be the input into an entire build system.  Different OS build environments would all use that one-time generated source tarball, and not start over from the git repo for each.&lt;/p&gt;

&lt;p&gt;For rpm-based systems, there is no longer just one .spec file.  That is worth keeping in mind.  I would not be surprised if we pushed that model further.  We might have different spec files for RHEL-like systems and SUSE-like systems, for instance.  Already we have a separate spec file for DKMS builds of lustre.&lt;/p&gt;

&lt;p&gt;Hopefully that provides some illumination on why the spec files have the &quot;.in&quot; extension straight from the git repository.&lt;/p&gt;</comment>
                            <comment id="117985" author="mdiep" created="Wed, 10 Jun 2015 00:57:08 +0000"  >&lt;p&gt;Thanks Chris, that is the most comprehensive explanation I have seen.&lt;/p&gt;</comment>
                            <comment id="135313" author="morrone" created="Fri, 4 Dec 2015 23:35:43 +0000"  >&lt;p&gt;FYI, I have more experience with koji now, because we are using it to build the TOSS distro here.  It would not really be appropriate for building just lustre.&lt;/p&gt;</comment>
                            <comment id="135899" author="morrone" created="Thu, 10 Dec 2015 18:35:35 +0000"  >&lt;p&gt;I changed the summary and description for this ticket to make it a little more high level.  The main goal is really to eliminate the non-standard way that lbuild currently builds things.  The specific solution is less important to me.&lt;/p&gt;

&lt;p&gt;Another approach that may or may not employ mock is to have every build on every version of each distribution start with a cleanly started VM instance.   &lt;a href=&quot;http://buildbot.net/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;buildbot&lt;/a&gt; makes it pretty easy to generate new VM instances from known clean images on the fly as needed.  If we went the mock-less approach, we would still need to keep in mind that we want to have a process that ensures that our .src.rpm remains functional.&lt;/p&gt;</comment>
                            <comment id="136052" author="mdiep" created="Fri, 11 Dec 2015 17:26:50 +0000"  >&lt;p&gt;Perhaps we need to understand more about the build standard; and what so &apos;non-standard&apos; way that lbuild is doing.&lt;br/&gt;
Lbuild is just a script to build lustre ecosystem: zfs, ofed, patch the kernel, and lustre. &lt;br/&gt;
Lbuild can build Centos/Rehat/Suse/Ubuntu and can also save the built kernel so the next patch don&apos;t have to rebuild kernel.&lt;br/&gt;
Lbuild is using rpmbuild which is not so &apos;non-standard&apos; IMHO.&lt;/p&gt;

&lt;p&gt;We will need a script to build lustre regardless it&apos;s called lbuild or not. Perhaps we need to see what we can improve the script rather declare to eliminate it.&lt;/p&gt;

&lt;p&gt;In our lab, we are using Jenkins to build not only lustre but many other tools (rpm and non rpm). Jenkins is flexible enough to allow us to achieve that. we have talked about using chroot or generate new VM for every build. However that won&apos;t necessary be an improvement and might introduce more overhead to build times&lt;/p&gt;

&lt;p&gt;However, if you have specific change to lbuild (or any new name), we are please to see a patch &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.whamcloud.com/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; &lt;/p&gt;</comment>
                            <comment id="136090" author="morrone" created="Fri, 11 Dec 2015 19:41:40 +0000"  >&lt;p&gt;First, read &lt;a href=&quot;https://jira.hpdd.intel.com/browse/LU-5614?focusedCommentId=135996&amp;amp;page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-135996&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Stephen Champion&apos;s comment&lt;/a&gt; in &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-5614&quot; title=&quot;use %kernel_module_package for weak-updates&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-5614&quot;&gt;&lt;del&gt;LU-5614&lt;/del&gt;&lt;/a&gt;.  He is exactly right.&lt;/p&gt;

&lt;p&gt;Everything lbuild does &lt;em&gt;before&lt;/em&gt; rpmbuild is non-standard.  Here is the most egregious thing that lbuild does:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;    rpm2cpio $rpm | cpio -id
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It repeatedly sidesteps all standard packing practices by manually tearing apart the packages and putting their contents in random non-standard locations.  lbuild&apos;s foundations are unsound.  We can&apos;t fix that with simple patches; it needs a complete overhaul.&lt;/p&gt;

&lt;p&gt;You can&apos;t reasonably address the requirements that Stephen rightly states with a system that repeatedly sidesteps the very packing systems it is targeting.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="26509">LU-5614</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="19392">LU-3463</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                            <customfield id="customfield_10890" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10490" key="com.atlassian.jira.plugin.system.customfieldtypes:datepicker">
                        <customfieldname>End date</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 11 Dec 2015 20:40:46 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzw2qn:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>10526</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10493" key="com.atlassian.jira.plugin.system.customfieldtypes:datepicker">
                        <customfieldname>Start date</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 16 Sep 2013 20:40:46 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    </customfields>
    </item>
</channel>
</rss>