On Sat, Feb 26, 2022 at 01:45:24PM -0500, Ionen Wolkens wrote:
> On Sat, Feb 26, 2022 at 11:55:10AM -0600, William Hubbs wrote:
> > If I change the instructions as you suggest to re-package upstream's
> > tarball the name wouldn't need the -vendor suffix since the tarball would 
> > be a
> > fork, but I'm not asking people to fork and repackage upstream's tarballs, 
> > just
> > the vendor folder. Fortunately, there is no reason to fork since it is very
> > easy to package the vendor folder with Go's tools.
> 
> Doing:
>     tar ... project-1.0-vendor.tar.xz project-1.0/vendor
> 
> would only package the "vendor" directory and not the whole
> project directory. Then when auto-unpacked by src_unpack, the
> vendor directory is added under project-1.0/
> 
> So this isn't repacking upstream's or a fork.

Ok, I get what you are saying, but normally the directory you have the
package in doesn't have a version number if you are working from a git
repository, so I don't know how to get around this:

cd path/to/project
# note, no version number in "project"
go mod vendor
cd ..
tar -acf project/vendor project-1.0-vendor.tar.xz

This will put everything in the tarball under "project/" instead of
"project-1.0/".

Does tar have an option to change that top level path that I don't know
about?

Thanks,

William

Attachment: signature.asc
Description: PGP signature

Reply via email to