Re: [Rpm-maint] [rpm-software-management/rpm] RFE: Configurable macro file search path(s) (#363)

2018-03-06 Thread Jeff Johnson
RPM uses macros instead of envvars to increase reproducibility of builds. How rpm is configured, and how rpmbuild is invoked, are matters that you need to take up with build systems. That would also be true if envvar's were used instead of macros. Note that there is (or at least was) a 3rd way

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: Configurable macro file search path(s) (#363)

2018-03-06 Thread Jeff Johnson
Alternatively, choose known file names, and use a %load for each file in a spec file. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: Configurable macro file search path(s) (#363)

2018-03-06 Thread Jeff Johnson
Then invoke rpmbuild with --macros, appending your patterns at the end of the colon separated list. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: Configurable macro file search path(s) (#363)

2018-03-06 Thread Vít Ondruch
I am looking for a way to tell RPM that there might be some paths which might contain arbitrary macro files. If such files are located, they should be loaded by RPM. IOW given there is metapackage like this \[[1]\] and I have installed rh-ruby22-runtime package and I call ```scl enable

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: Configurable macro file search path(s) (#363)

2018-03-06 Thread Jeff Johnson
What exactly are you looking for? You have yet to post any example here that does not include a pattern when the documentation for %load explicitly says "file". Have you tried strace to verify that rpm is trying to load a file? -- You are receiving this because you are subscribed to this

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: Configurable macro file search path(s) (#363)

2018-03-06 Thread Vít Ondruch
I am not surprised at all that the wildcard is not supported. I am just surprised I am suggested to use ```%load``` where it is not usable in its current form. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: Configurable macro file search path(s) (#363)

2018-03-05 Thread Jeff Johnson
Try removing the leading '?', and note that the added documentation explicitly says "file" not pattern. You can verify the load (or attempt) by using "strace -e open" -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: Configurable macro file search path(s) (#363)

2018-03-05 Thread Vít Ondruch
Of course, that was just test. So I did different one: ~~~ $ git diff diff --git a/ruby.spec b/ruby.spec index c9ff8dc..ecc5e93 100644 --- a/ruby.spec +++ b/ruby.spec @@ -102,8 +102,7 @@ Source14: test_systemtap.rb # The load directive is supported since RPM 4.12, i.e. F21+. The build process

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: Configurable macro file search path(s) (#363)

2018-03-05 Thread ニール・ゴンパ
``` +%{?load:%{_rpmmacrodir}/macros.*} ``` This is redundant... RPM already does this... -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: Configurable macro file search path(s) (#363)

2018-03-05 Thread Vít Ondruch
This passes: ~~~ $ git diff diff --git a/ruby.spec b/ruby.spec index c9ff8dc..3748781 100644 --- a/ruby.spec +++ b/ruby.spec @@ -104,6 +104,7 @@ Source14: test_systemtap.rb # fails on older Fedoras. %{?load:%{SOURCE4}} %{?load:%{SOURCE5}} +%{?load:%{_rpmmacrodir}/macros.*} # Fix

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: Configurable macro file search path(s) (#363)

2018-03-05 Thread Vít Ondruch
Just quick test: ~~~ $ git diff diff --git a/ruby.spec b/ruby.spec index c9ff8dc..fc2e68b 100644 --- a/ruby.spec +++ b/ruby.spec @@ -104,6 +104,7 @@ Source14: test_systemtap.rb # fails on older Fedoras. %{?load:%{SOURCE4}} %{?load:%{SOURCE5}} +%{load:%{_rpmmacrodir}/*} # Fix ruby_version

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: Configurable macro file search path(s) (#363)

2018-03-05 Thread Vít Ondruch
Ok, so I can imagine I put this into every SCL meta package, but then I have a few questions. * Does the load macro support the wild cards? * What happens if there is no such macro file? Does it fail or just continue? -- You are receiving this because you are subscribed to this thread. Reply

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: Configurable macro file search path(s) (#363)

2018-03-05 Thread ニール・ゴンパ
@voxik No, no no. You can put the macros wherever, just have a `%{load:..}` directive that points to it. If I remember correctly, you can also do something like `%{load:/opt///rpm/macros.d/macros.*}` to load it. However, you have to be careful, since if the macros don't exist, the spec will

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: Configurable macro file search path(s) (#363)

2018-03-05 Thread Vít Ondruch
I am disappointed. Many people calls SCL being big hack, but you won't make it any easier :( So if I read it correctly, the suggestion is that scl-utils should put something into ```%{_rpmmacrodir}``` (please note that the collection itself are generally not allowed to put anything outside

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: Configurable macro file search path(s) (#363)

2018-03-05 Thread Panu Matilainen
I guess this was always more a matter of missing documentation than missing feature. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: Configurable macro file search path(s) (#363)

2018-03-05 Thread Panu Matilainen
Closed #363. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/363#event-1504309831___ Rpm-maint mailing list

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: Configurable macro file search path(s) (#363)

2017-11-28 Thread Panu Matilainen
Doh... Well it's there now: https://github.com/rpm-software-management/rpm-web/commit/87e2b6ffa451593a4077570f26182c2bb3dbe440 -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: Configurable macro file search path(s) (#363)

2017-11-28 Thread ニール・ゴンパ
@khardix It's not in the website, but it's in the documentation generated by rpm itself: https://github.com/rpm-software-management/rpm/blob/master/doc/manual/macros#L91 -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: Configurable macro file search path(s) (#363)

2017-11-28 Thread Jan Staněk
@n3npq @Conan-Kudo Thanks a lot for pointing that out – I kind-of feel like I should RTFM more . > Have you thought about using the %{load: in the spec to load extra macros? @Conan-Kudo: This might again be just search issue, but could you point me to the documentation of the `%{load:...}`

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: Configurable macro file search path(s) (#363)

2017-11-27 Thread Vít Ondruch
@n3npq Good to see that extending RPM to support env variable shouldn't be hard, since RPM has the --macros CLI option alrady. @Conan-Kudo It might be risky, but we are doing it anyway. This is request to do it a bit better way then we are doing it now. It would even improve the situation,

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: Configurable macro file search path(s) (#363)

2017-11-24 Thread Jeff Johnson
Um, this simply isn't true. RPM has always searched multiple directories for macro definition files. See also the --macros CLI option (which takes a colon separated set of paths to load) to override the default value for macro search paths. -- You are receiving this because you are subscribed

[Rpm-maint] [rpm-software-management/rpm] RFE: Configurable macro file search path(s) (#363)

2017-11-24 Thread Jan Staněk
Currently, RPM looks for macro definitions in only one directory, which is hard-coded and cannot be changed. This pose significant complication for packaging of RPM Software Collections which need to provide their own version of macro files – basically, the SCL installs all its files into