<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>35014</bug_id>
          
          <creation_ts>2018-06-09 16:32:10 +0300</creation_ts>
          <short_desc>treat undefined macros as errors in more sections</short_desc>
          <delta_ts>2018-06-09 16:32:10 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>rpm-build</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ivan Zakharyaschev">imz</reporter>
          <assigned_to name="placeholder@altlinux.org">placeholder</assigned_to>
          <cc>arseny</cc>
    
    <cc>glebfm</cc>
    
    <cc>imz</cc>
    
    <cc>ldv</cc>
    
    <cc>placeholder</cc>
    
    <cc>vt</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>171790</commentid>
    <comment_count>0</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2018-06-09 16:32:10 +0300</bug_when>
    <thetext>rpm-build-4.0.4-alt111.x86_64

When someone uses an undefined macro in %build, this is usually an error.

Now it is just a warning.

Sometimes, the % signs are to be passed verbatim. Sometimes, they are even to be used to generate rpm directives (say, sed generating a %files section). These cases can be fixed.

There are not so many packages with these warnings:

[imz@team success]$ fgrep &apos;warning: Macro %&apos; -slr . | wc -l
257
[imz@team success]$ pwd
/beehive/logs/Sisyphus-x86_64/latest/success

Here is a related discussion of this feature (but not about turning on errors for %build): http://lists.rpm.org/pipermail/rpm-maint/2013-February/003383.html

More details about the motivation: if I use a (new) macro in a spec (as the author), I want that other people when trying to build the package either get an explicit error (if they don&apos;t have the definition of this macro) or build correctly (if this macro is defined for them already).

Now I need to worry whether it will always be built correctly.

Putting BuildPreReq on a specific release of rpm-build is a way which I don&apos;t like because the definitions in question can be cherry-picked, so there is no fixed release number which guarantees the presence of this macro definition.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>