-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[RFC] vlicense hook #21272
[RFC] vlicense hook #21272
Conversation
I haven't checked if we need to reset |
I don't see a (big) advantage over specifying |
On 2020-04-23 09:17:45-0700, Jürgen Buchmüller ***@***.***> wrote:
I don't see a (big) advantage over specifying `vlicense …` somewhere
in `do_install()` or `post_install()`.
How about using glob for LICENSE/COPYING?
You may save at most 2 lines
in a template. And you cannot handle cases where the license file is
created in e.g. `post_install()` from cropping some README.md,
index.html or other source file.
I think we should encourage those crops in patch phase instead.
…--
Danh
|
The license file can still be created in A |
I want @leahneukirchen to review before this is merged. I personally think the addition of a human readable variable helps in quickly scanning templates for anything weird. |
I think it cleans up many templates that only need a hook to install the license. |
I was supposed to review it because I brought up the idea. |
@xtraeme Are you the only one who calls out what seems to be bad behavior? If so, why? EUNHELPFUL. |
Sounds like someone I know. This thread is off topic. Are we merging this? |
+1 to merge |
-1 to merge unless it is capable to replace all vlicense usages. It is missing installation of multiple files by glob, like |
I also suggest to use |
On 2020-04-24 09:40:41-0700, Piotr ***@***.***> wrote:
-1 to merge unless it is capable to replace all vlicense usages. It
is missing installation of multiple files by glob, like `xorgproto`
or `CLion`.
I think multiple files is handled by now, and glob should be handled,
too (I need to check again, though).
…--
Danh
|
On 2020-04-24 09:48:20-0700, Leah Neukirchen ***@***.***> wrote:
I also suggest to use `license_file="SOURCE>TARGET"`.
s/:/>/ is _NOT_ a big deal,
I'm thinking about the glob. Allowing glob will need shell word
expansion and the consequence for "glob*>target"
…--
Danh
|
I second the greater-than syntax. It parallels its use in |
If I think |
So is it too confusing to have two ways to do things? I think not: distfiles works similarly, you can fetch if you must. |
No, to the contrary, I think having But if it makes sense to do something more complicated like glob matching for installing multiple license files in one pass, leave that for manual work in one of the build/install hooks. |
I like that I prefer single solution; either staying with vlicense because it works well; or introducing license_files that handles almost all cases, i.e files and globs, banning vlicense and using vinstall (possibly with $LICENSEDIR) for corner cases; over another TIMTOWTDI. |
Or maybe we could teach vinstall to install directories, what will be useful on its own, then copy licenses by glob, and put directory into license_files. |
Is this over-complicated? If we decide to do glob, I'll do it in |
Thinking about it now. I think we should add checksum for $license_files instead. |
Is license change a common enough problem that it's worth adding a checksum? The point of |
I've seen examples of "sed"ed License files from the source. Just a FYI that those might be one of the corner cases. |
The point is: license should be changed very rarely. |
Yes, it's one common case, I've made some LICENSE like that. |
I don't like this approach, personally.
If a project relicenses, this must be noted in the changelog, and updaters have to read the changelog. Relicensing only happens rarely (e.g. Openssl -> Apache, LLVM -> Apache), too. |
I don't think if its implementation is complicated it is bad. As long as the template is simple for packagers, I am fine. xbps-src and bash have complex implementations already. |
The rarity of relicensing militates against adding a checksum. Adding more burden on the packagers just to catch some corner cases doesn't seem to be worthwhile. Furthermore, this would only be an issue if a project changed the license from something that shouldn't be installed (e.g., Apache-2.0 or one of the GPL versions) to something that should be installed. Most of those cases would be moving away from GPL (6933 templates in If a package already requires This seems like a practical non-issue to me. |
I'm lukewarm on glob support in
but is it worth complicating the implementation? If glob support is a must, I certainly wouldn't try to support renames during the globs. Either the matches are copied with their original names, or indiviual files can be listed with |
I'd rather the hook be used for simple cases, and vlicense whenever anything gets complicated. Not supporting complicated things that just increase work for all like checksumming or globbing. |
Yes, I think having two ways is too complicated. There will be need to look for license files in two parts of template while reviewing.
|
Oh. In fact, hook already handles globs, as they are expanded under for. |
No description provided.