On Thursday, August 31, 2017 3:48:21 PM CEST Michal Novotny wrote:
a) you need an additional db field. you need to have more inputs in
when one has a meaning only if 'custom' is selected in the srpm_generator
select (which means you should hide/unhide that by js in frontend to have nice
user experience), then on API, you need to have one selector (const argument)
for srpm_generator and then another field (name of the script) that has
meaning only if 'custom' has been selected (that will occur on more places in
False. With 'make srpm' you still want to specify where the Makefile is.
I hope you don't expect that the only-for-copr Makefiles will be added to
the root of all the project in the wild...
Anyway, I did not expected that you will complain about *one argument* in
API or anywhere else, that's nitpick. How expensive is that? :) I can
help you with this additional work, sure.
And having the selector in the first place is good because you can
default value and you can implicitly point users to the well-established tools
where people can get more info about them and finally pick the tool most
suitable for them.
Off-topic, selector picks among tito/mock-scm/py2rpm/... or
arbitrary_script. Each method has an arguments.
Additionally `make srpm` carries the message so user knows what's
Why do you care how the end-user names the script? :)
There also needs to be some kind of uniformity because we need to put
output srpm into the predefined place (git repo directory) and also such
scripts would usually tend to have similar names (gen_srpm.py, make_srpm.pl),
so automatically it is good to have a predefined choice, I mean...why not.
How the "name of the generating tool" reflects where the result SRPM is
put, and how "copr is going to import that"?
You can call your any_script.xyz from the Makefile.
No, I __have to__, and that's the difference :) What's the benefit on
Everyone is familar with Makefiles and likes them (for simple things
(rofl) I wish this was truth.
It's a nice tradition. And the approach is the same thing as
callback method that is being called from a certain lib that goes back to your
b) I like Makefiles for simple things, I think it's a neat choice. Also I
hope that the default choice ('rpkg') will serve pretty well.
I like Makefiles too, but that's not about my/your preferences.
Yes, let's have rpkg/tito/mock-scm/xxx2rpm/.. methods to obtain sources, but
let's have also a fall-back option which matches everybody else. After
some time, we'll see how the fall-back is useful (and whether anybody
still uses other declarative and not-flexible methods...).
c) Note that you can cover your use-case (of any-name script) by
calling that script by name from the Makefile if you want. So there is nothing
to be refactored.
Will ninja people install some Makefile only because of CI in Copr? So
you either will be adding ninja support (mistake), or you replace the
"make srpm" build option with general one (api change that annoys users).
That's the refactoring I'm talking about.
>Ok, even better -> allow specifying custom command, like:
>Command to get sources:
cd packaging/rpm/fedora ; SOMEVAR=something ./generate-rpm.sh --some-arg
>Packages needed to obtain sources:
help2man, gettext-devel, wget, git-lfs
>The pattern is important; plus we should declare that only the first
>srpm is going to be built.
This is already _very_ complicated at least for new users that we would
to attract (in addition to satisfying power users).
So these are my reasons. I am willing to discuss this but at the same time
want to spend too much time on this because it really is an implementation
On Thu, Aug 31, 2017 at 1:47 PM, Pavel Raiskup <praiskup(a)redhat.com> wrote:
> On Thursday, August 31, 2017 11:43:08 AM CEST Michal Novotny wrote:
> > On Thu, Aug 31, 2017 at 8:43 AM, Pavel Raiskup <praiskup(a)redhat.com>
> > > I'm curious why you insist on 'make srpm'; that sounds like
> to push
> > > the copr users somewhere, to "standardize something".
> > It's easier on implementation. That's the main reason. I generally
> > that what's easier on implementation is better.
> This is not first time we talk about this...
> (a) can you elaborate what's "easier" to implement on the 'make
> (b) shouldn't you make a life easier to your users? Even when I really
> make, what's easier on "enforcing" Makefile existence to be able
> enable CI in copr?
> (c) Wrong general belief, please, forget about that. Doing it wrong (== an
> "easier" way) in the beginning is much more expensive in the end (try
> grep for "refactor" word...). The proposal is to have "one
> which suits everybody; and never touch it again. But yeah, no-thanks
> not listening. Again.