1 |
On Thu, 2019-09-12 at 11:39 -0500, William Hubbs wrote: |
2 |
> On Thu, Sep 12, 2019 at 05:39:42AM +0000, Michał Górny wrote: |
3 |
> > Dnia September 11, 2019 11:11:15 PM UTC, William Hubbs <williamh@g.o> napisał(a): |
4 |
> > > You are right, and currently I quietly ignore your vendor tarball if |
5 |
> > > upstream |
6 |
> > > vendors the dependencies also. I could change this to generate a |
7 |
> > > warning |
8 |
> > > or die and force you to fix the ebuild, but that would not be possible |
9 |
> > > if I follow your suggestion because I would not be able to tell whether |
10 |
> > > the vendored dependencies came from us or upstream. |
11 |
> > |
12 |
> > Why would anyone create a vendor tarball if things work without it? That makes no sense. Also adding unused archives to SRC_URI is a QA violation. |
13 |
> |
14 |
> All the more reason to not have the vendor tarball overwrite the vendor |
15 |
> directory upstream. I will show you when I update the eclass. |
16 |
|
17 |
If there is a vendor directory, then you should not have custom vendor |
18 |
tarball to override it in the first place. If you have the tarball, |
19 |
the eclass should explode and tell the developer he's doing silly things |
20 |
and needs to stop, not silently pretend everything is fine and surprise |
21 |
people by coincidentally choosing not to do anything. |
22 |
|
23 |
> |
24 |
> > > Also, another concern about your suggestion is the --transform switch |
25 |
> > > that would have to be added to the tar command people use to create |
26 |
> > > the |
27 |
> > > vendor tarball, something like: |
28 |
> > > |
29 |
> > > tar -acvf package-version-vendor.tar.gz |
30 |
> > > --transform='s#^vendor#package-version-vendor#' vendor |
31 |
> > > |
32 |
> > > You suggested that a maintainer could create a new tarball and build on |
33 |
> > > top of it. I guess you mean don't use upstream's tarball if they don't |
34 |
> > > vendor and create my own tarball and add the vendor directory to it. |
35 |
> > > I'm |
36 |
> > > against that option because I don't feel that we should manually |
37 |
> > > tinker |
38 |
> > > with upstream tarballs. That opens a pretty big can of worms imo. |
39 |
> > |
40 |
> > No. I suggested that rather than adding another git clone and checking out a tag (which sooner or later would mean someone forgetting and using master instead), you could unpack the same archive you're going to use in the ebuild. |
41 |
> |
42 |
> Ok, I am really not following you, so let's talk about this in the |
43 |
> context of an example. |
44 |
> |
45 |
> Look at app-misc/spire and tell me how you would do it differently. |
46 |
> |
47 |
|
48 |
ebuild spire-0.8.1.ebuild fetch |
49 |
tar -xf ${DISTDIR}/spire-0.8.1.tar.gz |
50 |
cd spire-0.8.1/ |
51 |
go mod vendor |
52 |
cd ../ |
53 |
tar -cf spire-0.8.1-vendor.tar spire-0.8.1/vendor |
54 |
|
55 |
Now you don't need special src_prepare() to unpack it. |
56 |
|
57 |
-- |
58 |
Best regards, |
59 |
Michał Górny |