<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:26:58 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-9526] Fix issues with systemd variables in lustre.spec.in</title>
                <link>https://jira.whamcloud.com/browse/LU-9526</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;&lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9439&quot; title=&quot;Introduce an lnet systemd service&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9439&quot;&gt;&lt;del&gt;LU-9439&lt;/del&gt;&lt;/a&gt; (change 26925) introduced some issues in the spec file that should be cleaned up before 2.10.&lt;/p&gt;

&lt;p&gt;First of all, the patch added:&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;%bcond_with    systemd
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;That is right and good. But then the spec files goes on to almost completely avoid using that, and that part is bad. &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;

&lt;p&gt;There is already a perfect example of how to unset a bcond when another setting overrides the bcond early in the file:&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;%if %{without servers}
    # --without servers overrides --with {ldiskfs|zfs}
    # so undefine the internal variables set by bcond_*
    %undefine with_ldiskfs
    %undefine with_zfs
%endif
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If you want to &lt;em&gt;set&lt;/em&gt; a bcond, do the opposite. So setting the internal variable for the systemd bcond would look like this:&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;#define with_systemd
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;That&apos;s it! Now you can use the %{with systemd} and %{without systemd} macros instead of introducing a second systemd variable (_systemd).&lt;/p&gt;

&lt;p&gt;So the main change needed is to eliminate the _systemd macro.&lt;/p&gt;

&lt;p&gt;This block can be removed entirely:&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;# Generic enable switch for systemd
%if %{with systemd}
%define _systemd 1
%endif

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Then change each instance of:&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;%define _systemd 1
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;into:&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;%define with_systemd
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Change each instance of:&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;%if 0%{?_systemd}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;into:&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;%if %{with systemd}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Change:&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;%if 0%{!?_systemd:1}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;into:&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;%if %{without systemd}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And finally, instead of introducing a &lt;em&gt;third&lt;/em&gt; systemd macro here:&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;%if 0%{?_systemd}
    %define systemd --with-systemdsystemunitdir=%{_unitdir}
%else
    %define systemd --with-systemdsystemunitdir=no
%endif
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;You can just inline the options in eval_configure 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;          %{?with_systemd:--with-systemdsystemunitdir=%{_unitdir}} \
          %{!?with_systemd:--with-systemdsystemunitdir=no} \
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I would think that when systemd is not detected, I would have thought that &quot;--with-systemdsystemunitdir=no&quot; would already be the default.  Perhaps that line can be dropped?&lt;/p&gt;
</description>
                <environment></environment>
        <key id="46167">LU-9526</key>
            <summary>Fix issues with systemd variables in lustre.spec.in</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.whamcloud.com/images/icons/priorities/major.svg">Major</priority>
                        <status id="5" iconUrl="https://jira.whamcloud.com/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="1">Fixed</resolution>
                                        <assignee username="dinatale2">Giuseppe Di Natale</assignee>
                                    <reporter username="morrone">Christopher Morrone</reporter>
                        <labels>
                    </labels>
                <created>Thu, 18 May 2017 00:28:45 +0000</created>
                <updated>Sat, 3 Jun 2017 04:29:25 +0000</updated>
                            <resolved>Sat, 3 Jun 2017 04:29:25 +0000</resolved>
                                                    <fixVersion>Lustre 2.10.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                            <comments>
                            <comment id="196500" author="dinatale2" created="Fri, 19 May 2017 18:12:16 +0000"  >&lt;p&gt;These will be taken care of in &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9526&quot; title=&quot;Fix issues with systemd variables in lustre.spec.in&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9526&quot;&gt;&lt;del&gt;LU-9526&lt;/del&gt;&lt;/a&gt; since the patches got reverted.&lt;/p&gt;</comment>
                            <comment id="196506" author="dinatale2" created="Fri, 19 May 2017 18:24:43 +0000"  >&lt;p&gt;&lt;a href=&quot;https://review.whamcloud.com/#/c/27214/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/#/c/27214/&lt;/a&gt; in case anyone is interested in reviewing.&lt;/p&gt;</comment>
                            <comment id="196511" author="dinatale2" created="Fri, 19 May 2017 19:49:49 +0000"  >&lt;p&gt;Actually, looks like the lnet systemd addition didn&apos;t get reverted, my mistake. Will introduce a new patch under this ticket.&lt;/p&gt;</comment>
                            <comment id="196514" author="gerrit" created="Fri, 19 May 2017 20:25:31 +0000"  >&lt;p&gt;Giuseppe Di Natale (dinatale2@llnl.gov) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/27215&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/27215&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9526&quot; title=&quot;Fix issues with systemd variables in lustre.spec.in&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9526&quot;&gt;&lt;del&gt;LU-9526&lt;/del&gt;&lt;/a&gt; spec: Improve systemd compat in spec file&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: f5440e4e3f1ec0c3a003f8dd044e1577aa42e263&lt;/p&gt;</comment>
                            <comment id="198009" author="gerrit" created="Sat, 3 Jun 2017 03:57:16 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/27215/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/27215/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9526&quot; title=&quot;Fix issues with systemd variables in lustre.spec.in&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9526&quot;&gt;&lt;del&gt;LU-9526&lt;/del&gt;&lt;/a&gt; spec: Improve systemd compat in spec file&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 933cfab484343742cbcbf46e234d7c80b5f66160&lt;/p&gt;</comment>
                            <comment id="198040" author="pjones" created="Sat, 3 Jun 2017 04:29:25 +0000"  >&lt;p&gt;Landed for 2.10&lt;/p&gt;</comment>
                    </comments>
                    <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_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzzd1j:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10060" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Severity</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10022"><![CDATA[3]]></customfieldvalue>

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