Mailing List Archive

building from git archive tarball
Hi,

Building in OBS from the git archive currently doesn't work,
because Makefile.am contains:

all-local: $(SPEC)

The spec file generation depends on .git which is not present in
the tar ball (as produced with git archive). Do we need all-local
or can we produce the spec file in some other way? Of course, we
don't need a spec file in this case.

Cheers,

Dejan
building from git archive tarball [ In reply to ]
On 05/28/2011 07:34 PM, Dejan Muhamedagic wrote:
> Hi,
>
> Building in OBS from the git archive currently doesn't work,
> because Makefile.am contains:

What is OBS?

>
> all-local: $(SPEC)
>
> The spec file generation depends on .git which is not present in
> the tar ball (as produced with git archive).

Use make dist to generate the tarball and it will have the
.tarball-version that fulfil the same goal as having .git locally.

> Do we need all-local
> or can we produce the spec file in some other way? Of course, we
> don't need a spec file in this case.
>

The reason why we generate the spec file is to guarantee that the
version info are correct and reflect the git status at "make dist" or
"make spec" time.

If you have another way to do achieve the same, I am fine to change.

Fabio
building from git archive tarball [ In reply to ]
On 29/05/11 06:07, Fabio M. Di Nitto wrote:
> On 05/28/2011 07:34 PM, Dejan Muhamedagic wrote:
>> Hi,
>>
>> Building in OBS from the git archive currently doesn't work,
>> because Makefile.am contains:
>
> What is OBS?

https://build.opensuse.org/

(See also http://news.opensuse.org/2011/05/26/opensuse-renames-obs/ -
sorry couldn't resist the plug.)

Regards,

Tim
--
Tim Serong <tserong at novell.com>
Senior Clustering Engineer, OPS Engineering, Novell Inc.
building from git archive tarball [ In reply to ]
On 05/29/2011 05:57 AM, Tim Serong wrote:
> On 29/05/11 06:07, Fabio M. Di Nitto wrote:
>> On 05/28/2011 07:34 PM, Dejan Muhamedagic wrote:
>>> Hi,
>>>
>>> Building in OBS from the git archive currently doesn't work,
>>> because Makefile.am contains:
>>
>> What is OBS?
>
> https://build.opensuse.org/
>
> (See also http://news.opensuse.org/2011/05/26/opensuse-renames-obs/ -
> sorry couldn't resist the plug.)

Ok thanks.

Do you upload a tarball directly or an srpm there? if you can quickly
explain how it works I might be able to fix it without too much rework.

Fabio
building from git archive tarball [ In reply to ]
On Sun, May 29, 2011 at 6:21 AM, Fabio M. Di NItto
<fabbione at fabbione.net> wrote:
> On 05/29/2011 05:57 AM, Tim Serong wrote:
>> On 29/05/11 06:07, Fabio M. Di Nitto wrote:
>>> On 05/28/2011 07:34 PM, Dejan Muhamedagic wrote:
>>>> Hi,
>>>>
>>>> Building in OBS from the git archive currently doesn't work,
>>>> because Makefile.am contains:
>>>
>>> What is OBS?
>>
>> https://build.opensuse.org/
>>
>> (See also http://news.opensuse.org/2011/05/26/opensuse-renames-obs/ -
>> sorry couldn't resist the plug.)
>
> Ok thanks.
>
> Do you upload a tarball directly

Tarball directly from Git.
Not everyone likes make dist remember.

> or an srpm there? if you can quickly
> explain how it works I might be able to fix it without too much rework.
>
> Fabio
> _______________________________________________
> ha-wg-technical mailing list
> ha-wg-technical at lists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/ha-wg-technical
>
building from git archive tarball [ In reply to ]
On 05/29/2011 08:36 AM, Andrew Beekhof wrote:
> On Sun, May 29, 2011 at 6:21 AM, Fabio M. Di NItto
> <fabbione at fabbione.net> wrote:
>> On 05/29/2011 05:57 AM, Tim Serong wrote:
>>> On 29/05/11 06:07, Fabio M. Di Nitto wrote:
>>>> On 05/28/2011 07:34 PM, Dejan Muhamedagic wrote:
>>>>> Hi,
>>>>>
>>>>> Building in OBS from the git archive currently doesn't work,
>>>>> because Makefile.am contains:
>>>>
>>>> What is OBS?
>>>
>>> https://build.opensuse.org/
>>>
>>> (See also http://news.opensuse.org/2011/05/26/opensuse-renames-obs/ -
>>> sorry couldn't resist the plug.)
>>
>> Ok thanks.
>>
>> Do you upload a tarball directly
>
> Tarball directly from Git.

Ok, if so there is no option to make it right. It's a catch 22. Either
we get a proper spec file generated with correct version info and ras
set defaults or we get to update all of the above manually every time.

> Not everyone likes make dist remember.

Yes, you already made your point clear several times. It doesn't exclude
the option to find a slightly different balance that can work for everybody.

Fabio
building from git archive tarball [ In reply to ]
They don't need a generated spec file.
And putting it in the tarball makes no sense... since it contains the instructions for using said tarball.

Sent from a mobile device

On 29 May 2011, at 09:55, "Fabio M. Di Nitto" <fdinitto at redhat.com> wrote:

> On 05/29/2011 08:36 AM, Andrew Beekhof wrote:
>> On Sun, May 29, 2011 at 6:21 AM, Fabio M. Di NItto
>> <fabbione at fabbione.net> wrote:
>>> On 05/29/2011 05:57 AM, Tim Serong wrote:
>>>> On 29/05/11 06:07, Fabio M. Di Nitto wrote:
>>>>> On 05/28/2011 07:34 PM, Dejan Muhamedagic wrote:
>>>>>> Hi,
>>>>>>
>>>>>> Building in OBS from the git archive currently doesn't work,
>>>>>> because Makefile.am contains:
>>>>>
>>>>> What is OBS?
>>>>
>>>> https://build.opensuse.org/
>>>>
>>>> (See also http://news.opensuse.org/2011/05/26/opensuse-renames-obs/ -
>>>> sorry couldn't resist the plug.)
>>>
>>> Ok thanks.
>>>
>>> Do you upload a tarball directly
>>
>> Tarball directly from Git.
>
> Ok, if so there is no option to make it right. It's a catch 22. Either
> we get a proper spec file generated with correct version info and ras
> set defaults or we get to update all of the above manually every time.
>
>> Not everyone likes make dist remember.
>
> Yes, you already made your point clear several times. It doesn't exclude
> the option to find a slightly different balance that can work for everybody.
>
> Fabio
> _______________________________________________
> ha-wg-technical mailing list
> ha-wg-technical at lists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/ha-wg-technical
building from git archive tarball [ In reply to ]
On 05/29/2011 10:46 AM, Andrew Beekhof wrote:
> They don't need a generated spec file.

Yes they do, to define the default ras set to ship.

./configure --with-ras-set="..." will also set the spec file defaults.

They asked the option to define what ras set to build in their rpm
because they don't want to ship rgmanager bits and pieces. A generic
spec file doesn't work for that.

> And putting it in the tarball makes no sense... since it contains the instructions for using said tarball.

Yeah instead having to use git to get to it makes sense... tar is alot
more common than git, rpmbuild -ta tarball and you are done. Don't even
need to unpack it.

Fabio
building from git archive tarball [ In reply to ]
On Sun, May 29, 2011 at 10:53 AM, Fabio M. Di Nitto <fdinitto at redhat.com> wrote:
> On 05/29/2011 10:46 AM, Andrew Beekhof wrote:
>> They don't need a generated spec file.
>
> Yes they do, to define the default ras set to ship.

Having actually used OBS, no, they don't.
It might be helpful for Joe User doing random builds, but you know as
much as anyone that distros don't require an upstream spec file at
all.

> ./configure --with-ras-set="..." will also set the spec file defaults.

And they couldn't possibly add that option to the spec file they already have?

> They asked the option to define what ras set to build in their rpm
> because they don't want to ship rgmanager bits and pieces. A generic
> spec file doesn't work for that.
>
>> And putting it in the tarball makes no sense... since it contains the instructions for using said tarball.
>
> Yeah instead having to use git to get to it makes sense...

Not sure why you'd use git

wget -O agents.tgz
https://github.com/ClusterLabs/resource-agents/tarball/master

Or curl if you prefer

> tar is alot
> more common than git, rpmbuild -ta tarball and you are done. Don't even
> need to unpack it.
>
> Fabio
>
building from git archive tarball [ In reply to ]
On 05/29/2011 11:14 AM, Andrew Beekhof wrote:
> On Sun, May 29, 2011 at 10:53 AM, Fabio M. Di Nitto <fdinitto at redhat.com> wrote:
>> On 05/29/2011 10:46 AM, Andrew Beekhof wrote:
>>> They don't need a generated spec file.
>>
>> Yes they do, to define the default ras set to ship.
>
> Having actually used OBS, no, they don't.
> It might be helpful for Joe User doing random builds, but you know as
> much as anyone that distros don't require an upstream spec file at
> all.
>
>> ./configure --with-ras-set="..." will also set the spec file defaults.
>
> And they couldn't possibly add that option to the spec file they already have?

Ok so explain to me.. they are asking for a working spec file in the
tarball / git because the lack of it breaks OBS, but they don't need it
because OBS has one...

Now it's all clear....

Fabio
building from git archive tarball [ In reply to ]
On Sun, May 29, 2011 at 11:27 AM, Fabio M. Di Nitto <fdinitto at redhat.com> wrote:
> On 05/29/2011 11:14 AM, Andrew Beekhof wrote:
>> On Sun, May 29, 2011 at 10:53 AM, Fabio M. Di Nitto <fdinitto at redhat.com> wrote:
>>> On 05/29/2011 10:46 AM, Andrew Beekhof wrote:
>>>> They don't need a generated spec file.
>>>
>>> Yes they do, to define the default ras set to ship.
>>
>> Having actually used OBS, no, they don't.
>> It might be helpful for Joe User doing random builds, but you know as
>> much as anyone that distros don't require an upstream spec file at
>> all.
>>
>>> ./configure --with-ras-set="..." will also set the spec file defaults.
>>
>> And they couldn't possibly add that option to the spec file they already have?
>
> Ok so explain to me.. they are asking for a working spec file in the
> tarball / git because the lack of it breaks OBS, but they don't need it
> because OBS has one...
>
> Now it's all clear....

You give OBS a tarball, a spec file and any patches you want applied -
just like in fedora.

IIUC, the only reason they care about the spec inside the tarball is
that "make all" depends all-local which depends on $(SPEC) which can't
be found.

Perhaps have $(SPEC) be a dependancy of dist or srpm instead and the
problem would go away.
building from git archive tarball [ In reply to ]
On 05/30/2011 09:58 AM, Andrew Beekhof wrote:

> IIUC, the only reason they care about the spec inside the tarball is
> that "make all" depends all-local which depends on $(SPEC) which can't
> be found.

but $(SPEC) would be generated. So I guess it is failing because there
are not enough info to generate it. Dejan, can you confirm?

>
> Perhaps have $(SPEC) be a dependancy of dist or srpm instead and the
> problem would go away.

If that's the problem, we can easily make it a dist target and decouple
it from all-local:.

That's far from being an issue with me and would make everybody happy.

Fabio
building from git archive tarball [ In reply to ]
Hi,

On Mon, May 30, 2011 at 10:04:13AM +0200, Fabio M. Di Nitto wrote:
> On 05/30/2011 09:58 AM, Andrew Beekhof wrote:
>
> > IIUC, the only reason they care about the spec inside the tarball is
> > that "make all" depends all-local which depends on $(SPEC) which can't
> > be found.

Right. We just need a tarball, the spec file is already there.

> but $(SPEC) would be generated. So I guess it is failing because there
> are not enough info to generate it. Dejan, can you confirm?

The tar ball is created with "git archive". Then "make all" wants
to create a spec file and for that it uses git which requires
.git/. That directory is not in the tarball.

> > Perhaps have $(SPEC) be a dependancy of dist or srpm instead and the
> > problem would go away.
>
> If that's the problem, we can easily make it a dist target and decouple
> it from all-local:.

OK, that's what I wanted to know in the first place :)

> That's far from being an issue with me and would make everybody happy.

Cheers,

Dejan
>
> Fabio
> _______________________________________________
> ha-wg-technical mailing list
> ha-wg-technical at lists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/ha-wg-technical
building from git archive tarball [ In reply to ]
On 05/30/2011 12:11 PM, Dejan Muhamedagic wrote:
> Hi,
>>> Perhaps have $(SPEC) be a dependancy of dist or srpm instead and the
>>> problem would go away.
>>
>> If that's the problem, we can easily make it a dist target and decouple
>> it from all-local:.
>
> OK, that's what I wanted to know in the first place :)

Oh perfect. I'll get to it later today or early tomorrow morning. I need
to finish up some stuff.

If it's a big problem for your testing, please just drop the all-local:
$(SPEC) dependency right away in git :)

Fabio