Is it possible to not show all of the licenses ? #931

Closed
opened 2025-11-02 03:42:06 -06:00 by GiteaMirror · 16 comments
Owner

Originally created by @freedomtrain on GitHub (Jul 31, 2017).

Is it possible to not show all of the licenses ?

Thanks

Originally created by @freedomtrain on GitHub (Jul 31, 2017). Is it possible to not show all of the licenses ? Thanks
GiteaMirror added the type/featureissue/confirmed labels 2025-11-02 03:42:06 -06:00
Author
Owner

@lafriks commented on GitHub (Jul 31, 2017):

I don't think so but you can set PREFERRED_LICENSES in app.ini that will be shown on top in select box

@lafriks commented on GitHub (Jul 31, 2017): I don't think so but you can set `PREFERRED_LICENSES` in app.ini that will be shown on top in select box
Author
Owner

@freedomtrain commented on GitHub (Jul 31, 2017):

Thanks !!!!
Are the licenses entries hard coded ?
I deleted all of the licenses files that we do not want to show as an option and they still are showing up

@freedomtrain commented on GitHub (Jul 31, 2017): Thanks !!!! Are the licenses entries hard coded ? I deleted all of the licenses files that we do not want to show as an option and they still are showing up
Author
Owner

@lafriks commented on GitHub (Jul 31, 2017):

They are compiled in binary. So to remove them you would have to recompile from source

@lafriks commented on GitHub (Jul 31, 2017): They are compiled in binary. So to remove them you would have to recompile from source
Author
Owner

@freedomtrain commented on GitHub (Jul 31, 2017):

Ah ha ......
Thanks !!!! Is there any documentation on how to recompile my current build from source ?

@freedomtrain commented on GitHub (Jul 31, 2017): Ah ha ...... Thanks !!!! Is there any documentation on how to recompile my current build from source ?
Author
Owner

@sapk commented on GitHub (Aug 1, 2017):

We have custom licenses, as stated in docs here, but the behavior is to extend the default one not replace them.

To compile the exact same build you need a golang env ready and follow https://docs.gitea.io/en-us/install-from-source/.
To know the commit/banch/version of binary use ./gitea -v of your current version. It will also display TAGS used to build the binary like sqlite or bindata

@sapk commented on GitHub (Aug 1, 2017): We have custom licenses, as stated in docs [here](https://github.com/go-gitea/docs/blob/master/content/doc/advanced/customizing-gitea.en-us.md#customizing-gitignores-labels-licenses-locales-and-readmes), but the behavior is to extend the default one not replace them. To compile the exact same build you need a golang env ready and follow https://docs.gitea.io/en-us/install-from-source/. To know the commit/banch/version of binary use `./gitea -v` of your current version. It will also display TAGS used to build the binary like `sqlite `or `bindata`
Author
Owner

@sapk commented on GitHub (Aug 1, 2017):

And I forget, if you find any bottleneck following the documentation, feel free to contribute to https://github.com/go-gitea/docs and ask question on Discord or here. 😉

@sapk commented on GitHub (Aug 1, 2017): And I forget, if you find any bottleneck following the documentation, feel free to contribute to https://github.com/go-gitea/docs and ask question on [Discord](https://discord.gg/NsatcWJ) or here. :wink:
Author
Owner

@freedomtrain commented on GitHub (Aug 1, 2017):

I have have followed the instructions here https://docs.gitea.io/en-us/install-from-source/
The license that I have deleted are still showing up.

Are they in bindata ?

@freedomtrain commented on GitHub (Aug 1, 2017): I have have followed the instructions here https://docs.gitea.io/en-us/install-from-source/ The license that I have deleted are still showing up. Are they in bindata ?
Author
Owner

@sapk commented on GitHub (Aug 1, 2017):

For context, bindata (more exacly go-bindata) is a program that convert file in go source code accessible like a filesystem.
Generated code should be under module/options. try to do a make clean, remove file under options/license that you don't want, and do make generate build with your tags.
You could also try without bindata tag but you will need to keep around static file like /templates or /public to work.

@sapk commented on GitHub (Aug 1, 2017): For context, bindata (more exacly go-bindata) is a program that convert file in go source code accessible like a filesystem. Generated code should be under module/options. try to do a `make clean`, remove file under [options/license](https://github.com/go-gitea/gitea/tree/master/options/license) that you don't want, and do `make generate build` with your tags. You could also try without bindata tag but you will need to keep around static file like /templates or /public to work.
Author
Owner

@lafriks commented on GitHub (Aug 4, 2017):

As a feature this should be implemented in the future to be able manage licenses

@lafriks commented on GitHub (Aug 4, 2017): As a feature this should be implemented in the future to be able manage licenses
Author
Owner

@sapk commented on GitHub (Aug 4, 2017):

One easy way could be to not use default licence if custom/licenses are used ? or add an option to not use default.

@sapk commented on GitHub (Aug 4, 2017): One easy way could be to not use default licence if custom/licenses are used ? or add an option to not use default.
Author
Owner

@BjoernAkAManf commented on GitHub (Aug 24, 2017):

I was looking for something similar. How about a special file inside the license (or other overriding) folder like .INCLUDE or .EXCLUDE to specify included or exclude licenses respectively? It would be a shame to maintain a separate set of licenses just to remove some defaults.

@BjoernAkAManf commented on GitHub (Aug 24, 2017): I was looking for something similar. How about a special file inside the license (or other overriding) folder like .INCLUDE or .EXCLUDE to specify included or exclude licenses respectively? It would be a shame to maintain a separate set of licenses just to remove some defaults.
Author
Owner

@strk commented on GitHub (Dec 19, 2017):

Pull request adding documentation for PREFERRED_LICENSES: https://github.com/go-gitea/gitea/pull/3230

@strk commented on GitHub (Dec 19, 2017): Pull request adding documentation for `PREFERRED_LICENSES`: https://github.com/go-gitea/gitea/pull/3230
Author
Owner

@stale[bot] commented on GitHub (Feb 10, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Feb 10, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@wolftune commented on GitHub (Dec 30, 2023):

I think it would be preferable to indeed have a shorter list. At the least, showing all versions of licenses (such as even CC-BY 1.0 and 2.0 and 2.5 etc) is really noisy. If someone is actually going to use obscure or outdated licensing or is importing an old repo, they can do that without using the dropdown menu in creating new repos.

I would urge that a shorter list be used in general even for the relatively complete set. And it would be nicest to have a default of showing only the PREFERRED_LICENSES

@wolftune commented on GitHub (Dec 30, 2023): I think it would be preferable to indeed have a shorter list. At the least, showing all versions of licenses (such as even CC-BY 1.0 and 2.0 and 2.5 etc) is really noisy. If someone is actually going to use obscure or outdated licensing or is importing an old repo, they can do that without using the dropdown menu in creating new repos. I would urge that a shorter list be used in general even for the relatively complete set. And it would be nicest to have a default of showing *only* the `PREFERRED_LICENSES`
Author
Owner

@lunny commented on GitHub (Jan 15, 2024):

I think this could be closed and we can track #28661.

@lunny commented on GitHub (Jan 15, 2024): I think this could be closed and we can track #28661.
Author
Owner

@github-actions[bot] commented on GitHub (Mar 1, 2024):

Automatically locked because of our CONTRIBUTING guidelines

@github-actions[bot] commented on GitHub (Mar 1, 2024): Automatically locked because of our [CONTRIBUTING guidelines](https://github.com/go-gitea/gitea/blob/main/CONTRIBUTING.md#issue-locking)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#931