From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Nicolas Morey-Chaisemartin
<NMoreyChaisemartin-l3A5Bk7waGM@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH rdma-core 3/3] cbuild: use rpmspec for macro replacement
Date: Wed, 9 Aug 2017 14:19:32 -0600 [thread overview]
Message-ID: <20170809201932.GA7363@obsidianresearch.com> (raw)
In-Reply-To: <f42a6eaa-79f9-1063-b58a-08da363d09e7-l3A5Bk7waGM@public.gmane.org>
On Wed, Aug 09, 2017 at 06:39:23PM +0200, Nicolas Morey-Chaisemartin wrote:
> >>> subprocess.check_call(["git","archive",
> >>> - "--prefix","%s/"%(os.path.splitext(tarfn)[0]),
> >>> + # This must match the prefix generated buildlib/github-release
> >>> + "--prefix","%s-%s/"%(project,get_version()),
> >>> "--output",os.path.join(tmpdir,"SOURCES",tarfn),
> >> You have an issue here because tarfn is not set yet.
> > No, it was still set above, see the first hunk.
>
> Yes. But the value it has is "wrong"
> If I take the current spec file used in OBS:
> Source0: %{name}-%{version}%{git_ver}.tar.xz
>
> Omitting the Source0 that should be changed to Source, this wille set tarfn to rdma-core-15%{git_ver}.tar.xz
Okay..
Why not use
%setup -n %{name}-%{version}
In the spec file? Eg do not include the git version in the prefix so
it matches the format produced by the github scripts.
Then, the above will make a archive with 'rdma-core-15/' as the prefix.
The archive will be called
'SOURCE/%{name}-%{version}%{git_ver}.tar.xz'
Then the go.py will parse and determine that the archive should be
called
'SOURCE/rdma-core-15-git124556.tar.xz'
And drop a symlink to fix it up.
> This means that we would need to detar/rename/retar the package in
> the go.py. It feels overly complicated :/ What we use this for is
> mainly for RC and non-release packages. We set the git_ver to -rc1,
> -<NN>-g<SHA1> so we know at a glance that this is not an official
> release. I can either try to get this working in the go.py, or I'll
> simply drop this from our spec and bring it back when needed for non
> release packages.
I think if this is your usage then you would be fine to use '%setup
-n'..
We can already recover the git HEAD from a git archive output by using
'git get-tar-commit-id' so it isn't really necessary to include the
git commit id in the prefix.
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-08-09 20:19 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-04 16:57 [PATCH rdma-core 0/3] cbuild tweaks Nicolas Morey-Chaisemartin
[not found] ` <27366048-d80f-3711-c6cd-93c87809650e-l3A5Bk7waGM@public.gmane.org>
2017-08-04 16:58 ` [PATCH rdma-core 1/3] cbuild: allow indentation in RPM version Nicolas Morey-Chaisemartin
2017-08-04 16:59 ` [PATCH rdma-core 2/3] cbuild: support .tar.(gz|bz|>...) extensions Nicolas Morey-Chaisemartin
2017-08-04 16:59 ` [PATCH rdma-core 3/3] cbuild: use rpmspec for macro replacement Nicolas Morey-Chaisemartin
[not found] ` <8ad0438f-b4a5-aec9-1e44-a9c9dc1ca17b-l3A5Bk7waGM@public.gmane.org>
2017-08-08 23:04 ` Jason Gunthorpe
[not found] ` <20170808230459.GF29372-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-08-09 9:56 ` Nicolas Morey-Chaisemartin
[not found] ` <b3993b0c-0b9d-a917-cbf8-22f68c1d2a97-l3A5Bk7waGM@public.gmane.org>
2017-08-09 15:55 ` Jason Gunthorpe
[not found] ` <20170809155532.GC15586-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-08-09 16:39 ` Nicolas Morey-Chaisemartin
[not found] ` <f42a6eaa-79f9-1063-b58a-08da363d09e7-l3A5Bk7waGM@public.gmane.org>
2017-08-09 20:19 ` Jason Gunthorpe [this message]
[not found] ` <20170809201932.GA7363-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-08-09 21:08 ` Nicolas Morey-Chaisemartin
[not found] ` <5c4de783-ce62-2b8d-78aa-ee2f181fe719-l3A5Bk7waGM@public.gmane.org>
2017-08-09 21:15 ` Jason Gunthorpe
[not found] ` <20170809211536.GA10191-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-08-13 6:37 ` Leon Romanovsky
[not found] ` <20170813063706.GQ24282-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-08-21 7:52 ` Nicolas Morey-Chaisemartin
[not found] ` <a17d1a6e-653a-0c8e-4b1b-d5ef2bf6d9b2-l3A5Bk7waGM@public.gmane.org>
2017-08-21 15:42 ` Jason Gunthorpe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170809201932.GA7363@obsidianresearch.com \
--to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
--cc=NMoreyChaisemartin-l3A5Bk7waGM@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox