Re: rpmbuild --define - some rpm sorcerer around?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 08/06/18 16:39, Todd Zullinger wrote:
Hi,

lejeczek via users wrote:
how do you pass vars to rpmbuild for definition? eg

rpmbuild --define \'"${_definition2}"\'

I've been fiddling with ways to escape, but none is fricking working..
I mean, rpmbuild rushes to work(no errors nor failure) so if you try just
command line do not believe it, because later as it executes %if you will
see process does not see these definitions.
The format would be --define '_definition2 value'.  The you
would use %{_definition2} in your spec file, (which I'm
presuming you already have, it's just not being defined).

The man page explains is this way:

     -D, --define='MACRO EXPR'
             Defines MACRO with value EXPR.



Try to pass bash var to rpmbuild, eg:

$ _def1="_me 1"
$ rpmbuild --define=${_def1}

%if does not seem to catch/see these definitions. Like I said rpmbuild will run but you should see it is not there as .spec gets digested & processed.


_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx/message/DTIIF332XVZNYJMB2PQT4BGMEFYMD3BV/
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx/message/LEVG6FW3PR4MC6SKUXQGMHAO6KCJH662/



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux