You are not logged in.

#1 2019-12-08 12:44:29

GFdevelop
Member
Registered: 2017-09-18
Posts: 24

[SOLVED] License directory/naming

Two questions:

  1. With a vcs package (name-git) where I have to put the license?

    install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/name/LICENSE"

    but namcap give me:

    E: Missing custom license directory (usr/share/licenses/name-git)

    I must use this below?

    install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/name-git/LICENSE"
  2. I have the license name LICENSE.txt, I must rename this as LICENSE?

    install -Dm644 LICENSE.txt "${pkgdir}/usr/share/licenses/name/LICENSE"

Last edited by GFdevelop (2019-12-08 18:09:02)

Offline

#2 2019-12-08 13:03:56

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 9,510
Website

Re: [SOLVED] License directory/naming

The wiki says to install the license to /usr/share/licenses/$pkgname/, although personally I think it makes more sense to install the license to a directory named after the software (i.e. 'name' rather than 'name-git'). Either way, I don't think it really matters so long as the license is installed *somewhere* that makes sense so the end user can find it.

You don't need to rename the file; again, so long as the name makes sense, it doesn't really matter what it's called.


Sakura:-
Mobo: MSI X299 TOMAHAWK ARCTIC // Processor: Intel Core i7-7820X 3.6GHz // GFX: nVidia GeForce GTX 970 // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 5x 1TB HDD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2019-12-08 13:04:49

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 22,810
Website

Re: [SOLVED] License directory/naming

The directory name must match the package name.  The suggestion in the wiki is simply to use the variable $pkgname in the install path.

You can check the actual file names that exist under /usr/share/licenses/*/ and you will find that most of them are simply LICENSE, but there is a wide range of others.  A notable exception is packages with multiple licenses will have files named LICENSE.$component (e.g., linux-firmware).  Some others do have LICENSE.txt even when that's the only file.  Others use COPYING, and COPYING-component (e.g., xorg-proto) and one I have on my system even uses a completely different filename, though that is an AUR package.

So in otherwords, it seems there is no strict rule on the filename.  But I'd advocate for just LICENSE, unless you have good reason to do otherwise.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2019-12-08 13:07:39

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 22,810
Website

Re: [SOLVED] License directory/naming

WorMzy wrote:

although personally I think it makes more sense to install the license to a directory named after the software

I disagree.  The same upstream software could be distributed in different packages potentially with different license.  Perhaps a 1.0 version was distributed under the MIT license, but then in the subsequent development it was provided with a GPL license.  It would be misleading (and technically illegal) to have the vcs version associated with a permissive license.

Or even with non-vcs packages, the repos contain openssl and openssl-1.0 which can both be installed concurrently.  They each have seperate license directories based on the package name and the licenses do differ (slightly).

Last edited by Trilby (2019-12-08 13:11:05)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2019-12-08 13:23:42

GFdevelop
Member
Registered: 2017-09-18
Posts: 24

Re: [SOLVED] License directory/naming

Trilby wrote:
WorMzy wrote:

although personally I think it makes more sense to install the license to a directory named after the software

I disagree.  The same upstream software could be distributed in different packages potentially with different license.  Perhaps a 1.0 version was distributed under the MIT license, but then in the subsequent development it was provided with a GPL license.  It would be misleading (and technically illegal) to have the vcs version associated with a permissive license.

Or even with non-vcs packages, the repos contain openssl and openssl-1.0 which can both be installed concurrently.  They each have seperate license directories based on the package name and the licenses do differ (slightly).

It seems to make sense.

Trilby wrote:

So in otherwords, it seems there is no strict rule on the filename.  But I'd advocate for just LICENSE, unless you have good reason to do otherwise.

I am not the owner of the remote repository (I have LICENSE.txt and can't rename this): I keep the name LICENSE.txt , is right?

Offline

#6 2019-12-08 17:37:22

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 22,810
Website

Re: [SOLVED] License directory/naming

You can't rename it in the remote repository, but when you issue the install command in the PKGBUILD, you can specify any filename you'd like - you even gave an example of doing so in your first post under #2.  But yes, LICENSE.txt would be fine too.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#7 2019-12-08 18:08:04

GFdevelop
Member
Registered: 2017-09-18
Posts: 24

Re: [SOLVED] License directory/naming

Thank you so much, solved.

Offline

#8 2019-12-18 17:37:17

eschwartz
Trusted User/Bug Wrangler
Registered: 2014-08-08
Posts: 3,139

Re: [SOLVED] License directory/naming

WorMzy wrote:

The wiki says to install the license to /usr/share/licenses/$pkgname/, although personally I think it makes more sense to install the license to a directory named after the software (i.e. 'name' rather than 'name-git'). Either way, I don't think it really matters so long as the license is installed *somewhere* that makes sense so the end user can find it.

The directory "/usr/share/licenses/" is a flat-file database, and the lookup key is the pkgname field. You are not permitted to install to something other than the name of the *package*, per the wiki documentation, because that breaks the flat-file database lookup.

I'm unsure why you think it's acceptable to use a directory naming convention that requires the user to guess which of many options to use, cannot be programmatically determined under any circumstances, and doesn't come with built-in namespacing in the event that two different pkgnames want to install the same human-readable software name. (For example, python3 and python3 modules).

tl;dr It does indeed matter.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#9 2019-12-18 18:10:32

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 9,510
Website

Re: [SOLVED] License directory/naming

Because I was assuming that the licenses are installed for the user benefit. If user X is running firefox, and wants to check the license, it makes sense to me to look in /usr/share/licenses/firefox. Even if the user has installed firefox-completely-random-build-with-bells-on from the AUR. The software is still "firefox", the license is from the "firefox" source tree (or website, or wherever), the package name is redundant. Trilby has a good point about licenses changing, which wouldn't matter if there was only one firefox package on the system (the license would be for the one that was installed), but it falls apart when multiple packages provide firefox and can be installed simultaneously. You also raise a good point about namespacing.

I humbly accept that I was wrong, and thank you for the explanations. wink


Sakura:-
Mobo: MSI X299 TOMAHAWK ARCTIC // Processor: Intel Core i7-7820X 3.6GHz // GFX: nVidia GeForce GTX 970 // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 5x 1TB HDD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#10 2019-12-19 03:59:42

eschwartz
Trusted User/Bug Wrangler
Registered: 2014-08-08
Posts: 3,139

Re: [SOLVED] License directory/naming

WorMzy wrote:

I humbly accept that I was wrong, and thank you for the explanations. wink

No problem. smile


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB