Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] - Allow custom tar name #101

Closed
KaoruDev opened this issue Oct 7, 2019 · 6 comments
Closed

[FR] - Allow custom tar name #101

KaoruDev opened this issue Oct 7, 2019 · 6 comments
Assignees
Labels
P3 An issue that we are not working on but will review quarterly

Comments

@KaoruDev
Copy link

KaoruDev commented Oct 7, 2019

Problem

When creating an RPM, I'd like to use the %setup macro, which I believe assumes you have a tar file with the same NVR. As it currently stands the tar rule will default to using the label name. I'd like to make this configurable (also using --define) with the default going to the label. I'd be happy to open a PR!

Goal

Allow users to modify tar name.

@aiuto
Copy link
Collaborator

aiuto commented Apr 13, 2020

I have no way to evaluate if this is a reasonable feature or not. The %setup docs seem to talk about unpacking source tarballs, but then rpmbuild would try to build them, which is exactly what we wouldn't do with bazel.

Can you provide an example of what the goal is, and how you would expect to use it?

@aiuto aiuto added the P3 An issue that we are not working on but will review quarterly label Apr 13, 2020
@davschne
Copy link
Contributor

I think this would be a generally useful feature, beyond just the problem identified above (which I confess I don't understand). As my team works with pkg_tar, we keep having to come up with awkward workarounds for the limitation that the generated archive must always be named the same as the corresponding target. To me it seems allowing this property to be configurable introduces flexibility without unduly complicating the design of the macros/rules.

@aiuto
Copy link
Collaborator

aiuto commented Jun 25, 2020

I have to say, I don't understand the %setup thing either. I don't use RPM enough to understand the nuances.
The last comment seems related to #193

@davschne
Copy link
Contributor

Heh, yes, the proposals in #193 are a more complicated approach to creating the archive name (as well as package_dir). I'm interested to see where that discussion leads. Compared with that, I feel the present proposal is low-hanging fruit. For the project Konstantin and I are working on, both would be useful.

@aiuto
Copy link
Collaborator

aiuto commented Sep 25, 2020

#193 is now ready for review. It will allow you to rename archives any way you want.
In the simple form, you just add another attribute with the name you want.
In the more complex usage, you also point to a rule providing a map of name/value pairs you can substitute into the filename. (e.g. {cpu}).
Once that gets submitted, I can do the same thing for deb, rpm and zip.

@aiuto
Copy link
Collaborator

aiuto commented Oct 27, 2020

Resolved by #198.

@aiuto aiuto closed this as completed Oct 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 An issue that we are not working on but will review quarterly
Projects
None yet
Development

No branches or pull requests

3 participants