Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 478850 - Unit files need a copyright
Summary: Unit files need a copyright
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo systemd Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-30 17:54 UTC by Justin Lecher (RETIRED)
Modified: 2017-04-20 21:13 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Lecher (RETIRED) gentoo-dev 2013-07-30 17:54:21 UTC
Similar to the init scripts we provide the unit files should also have a copyright statement
Is this correct? And if so we should proceed with this quickly.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-07-30 18:15:36 UTC
IMO they're too insignificant to need a specific copyright. Most unit files are intended to go upstream; then AFAIU they get the same license as the package.
Comment 2 Richard Freeman gentoo-dev 2013-07-30 20:39:44 UTC
(In reply to Michał Górny from comment #1)
> IMO they're too insignificant to need a specific copyright. Most unit files
> are intended to go upstream; then AFAIU they get the same license as the
> package.

I tend to agree here.  Plus unit files are just a set of item/value pairs - a database in essence.  They aren't a touring-complete programming language like init scripts.  The opportunity for creativity is minimal.
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2013-07-31 06:04:32 UTC
<hat type="license-team">
Just because they are a database, doesn't meant they don't need to be licensed. I think that the French database copyright could still be applied to the files (the structure of them specifically).

I think a reasonable middle-ground is as one of the two following options:
1.
# Copyright 1999-YYYY Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# OR the license of the upstream package.
This allows upstream to merge it without concerns, while still covering it.

2.
EXPLICITLY release it into the public domain.
</hat>
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2016-03-27 23:16:33 UTC
Dropping trustees from this bug, no further actions needed.

I think the more complex unit files should have a copyright header, but simple ones aren't copyrightable.

Be safe, just include the usual header.
Comment 5 Mike Gilbert gentoo-dev 2016-03-28 00:01:44 UTC
Pasting the standard Gentoo copyright in these trivial files is just silly. I'm opposed to this.
Comment 6 Ulrich Müller gentoo-dev 2016-03-28 00:26:43 UTC
(In reply to Robin Johnson from comment #3)
> 2.
> EXPLICITLY release it into the public domain.

This cannot be done in some jurisdictions.


(In reply to Mike Gilbert from comment #5)
> Pasting the standard Gentoo copyright in these trivial files is just silly.
> I'm opposed to this.

There is no need for a header if the file is not copyrightable, which is the case if the file is either:
- very short, or
- contains only factual information with no freedom of expression.
The problem is where to draw the line. The FSF says that "a rule of thumb is
that any file with less than 15 lines of actual content is trivial" (see admin/notes/copyright in the GNU Emacs repo). When in doubt, I would add a copyright header.

Also I don't think that any EU sui generis database rights could be applied to unit files. The EU directive (96/9/EC Article 7) says that such rights apply only if "there has been qualitatively and/or quantitatively a substantial investment in either the obtaining, verification or presentation of the contents".

Disclaimer: IANAL, TINLA
Comment 7 Richard Freeman gentoo-dev 2016-03-28 00:38:04 UTC
The main concern I see is that many or perhaps most unit files in Gentoo came from someplace else (perhaps with modifications), and not necessarily upstream.  For upstream unit files, I'd suggest just installing them as-is and not patching them (I doubt we routinely patch other files to add copyright lines when upstream doesn't supply them).

So, I'd be hesitant to just add Gentoo copyrights to all the unit files in my packages.
Comment 8 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2016-03-28 06:05:15 UTC
(In reply to Mike Gilbert from comment #5)
> Pasting the standard Gentoo copyright in these trivial files is just silly.
> I'm opposed to this.
If the file is actually trivial, then there is no need for copyright. But I stated that the complex files are the ones that really need it.

I offer this openrc init script as an example of something that we already considered copyrightable, despite it's length:
sys-apps/busybox/files/watchdog.initd:
======
#!/sbin/runscript
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

command="/bin/busybox watchdog"
command_args="${WATCHDOG_OPTS}"
pidfile="/var/run/watchdog.pid"
======

This case is very short, and has no freedom of expression (it could be made more complicated, but has the same functionality as this minimal form).

The reason that the copyright header should be on something that is sufficiently complicated, is to say WHO the copyright belongs to and WHAT license it can be used under.

Here's an example of something from lennert, but there are some much more complicated unit files in the tree.

/usr/lib64/systemd/system/rtkit-daemon.service
=======
# This file is part of RealtimeKit.
#
# Copyright 2010 Lennart Poettering
#
# RealtimeKit is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# RealtimeKit is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with RealtimeKit. If not, see <http://www.gnu.org/licenses/>.

[Unit]
Description=RealtimeKit Scheduling Policy Service
After=syslog.target

[Service]
ExecStart=/usr/libexec/rtkit-daemon
Type=dbus
BusName=org.freedesktop.RealtimeKit1
NotifyAccess=main
ControlGroup=cpu:/

[Install]
WantedBy=graphical.target
=======

It's 11 lines excluding the comments and whitespace. It took definite development to come up with it.

(In reply to Ulrich Müller from comment #6)
> (In reply to Robin Johnson from comment #3)
> > 2.
> > EXPLICITLY release it into the public domain.
> This cannot be done in some jurisdictions.
CC0 can be used in those jurisdictions still.

(In reply to Richard Freeman from comment #7)
> The main concern I see is that many or perhaps most unit files in Gentoo
> came from someplace else (perhaps with modifications), and not necessarily
> upstream.  For upstream unit files, I'd suggest just installing them as-is
> and not patching them (I doubt we routinely patch other files to add
> copyright lines when upstream doesn't supply them).
> 
> So, I'd be hesitant to just add Gentoo copyrights to all the unit files in
> my packages.
I'd say we can resolve it to answering two questions:
1. Is it non-trivial?
2. Are either of the following are true?
2.a) Did you write the unit file yourself 
2.b) Did you have a substantial involvement to modify it after you took it from somewhere else?

If both #1 & #2 are true, then it should clearly have a copyright statement.
Comment 9 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2016-03-28 06:41:45 UTC
Can I pitch a slightly a possibly controversial idea, that can hopefully resolve this? The intent is to mark files that are thought of as trivial from those that are not. Then if a file is not trivial, somebody owns the copyright, and we can either mark it as unknown or with the

Tagging as many files in the tree as possible with their copyright status, except where it's:
- explicitly covered: has a copyright declaration.
- implicitly clear (Manifest).
- implicitly covered (profiles/ a special case see below).

I'd like it to be a SINGLE comment line, in a header format with comment characters suitable for the filetype.
X-Gentoo-Copyright-Status: $STATUS
Where $STATUS is one of the following:
- "Unknown" (stuff that we inherited of unknown provenience)
- "Uncopyrightable:trivial"
- "Copyrighted" - It should have a copyright block elsewhere in the file.
- "Public domain" - the author has declared it to be in the public domain or equivalent (better that the declaration is referenced, but good enough).

For example, all of the metadata.xml files would get
<-- X-Gentoo-Copyright-Status: Uncopyrightable:trivial -->

The trivial unit files could have the same, just in a suitable format:
# X-Gentoo-Copyright-Status: Uncopyrightable:trivial

The Non-trivial unit files example:
# X-Gentoo-Copyright-Status: Copyrighted
# Copyright YYYY Yoyodyne Inc.

Looking at the tree, it's like this for now:
~103k files in the tree:
Not Copyrightable:
~19k metadata.xml
~19k Manifests
(~37k subtotal)

Already marked with Copyright statements of some form:
~40k .ebuilds
~250 .eclass
~2k files in /files/
~1k files elsewhere in the tree, mostly profiles
~100 files marked public domain/CC0
(subtotal ~44k)

Files without copyright statements:
~20k files in /files/
~2k files in /profiles/
135 other files
(subtotal ~22k)

I realize that /profiles/ is an interesting case. The individual files are mostly trivial, but collectively could constitute sui generis database.
Comment 10 Ulrich Müller gentoo-dev 2016-03-28 09:24:22 UTC
(In reply to Robin Johnson from comment #9)
> X-Gentoo-Copyright-Status: $STATUS

tl;dr I don't think that this is a good idea.

> Where $STATUS is one of the following:
> - "Unknown" (stuff that we inherited of unknown provenience)

I fear that the only option for files that we identify as non-trivial and of unknown copyright status is to remove them. IMHO, explicitly tagging them makes our position worse, because then we cannot claim any more that we distribute them in good faith, or that we were ignorant of the issue.

> - "Uncopyrightable:trivial"
> - "Copyrighted" - It should have a copyright block elsewhere in the file.

Redundant. Files that have a copyright header (e.g. ebuilds) can do without such an extra line.

> - "Public domain" - the author has declared it to be in the public domain or
> equivalent (better that the declaration is referenced, but good enough).
> 
> For example, all of the metadata.xml files would get
> <-- X-Gentoo-Copyright-Status: Uncopyrightable:trivial -->

That's a rather bold assumption. Looking at metadata.xml of app-misc/gramps, dev-haskell/hashtable, or dev-libs/ecore, I wouldn't be so sure that their longdescriptions aren't copyrightable.

> The trivial unit files could have the same, just in a suitable format:
> # X-Gentoo-Copyright-Status: Uncopyrightable:trivial
> 
> The Non-trivial unit files example:
> # X-Gentoo-Copyright-Status: Copyrighted
> # Copyright YYYY Yoyodyne Inc.

Again, I don't see why that line would be needed if the file has an extra copyright header. And what if the file is under a license that allows distribution but not modification?

> [...]

> I realize that /profiles/ is an interesting case. The individual files are
> mostly trivial, but collectively could constitute sui generis database.

The ones in profiles/ should all be © Gentoo Foundation, though? Then we could simply put a COPYING file in the top-level profile dir.
Comment 11 Richard Freeman gentoo-dev 2016-03-28 11:45:46 UTC
Just to confirm, the intent is to apply this policy to unit files in the Gentoo repo, not to all unit files that are installed by packages?  So, unit files that are provided by make install would remain identical to however upstream provides them (presumably if upstream cared about the copyright notices they'd insert them).

I think this is generally sensible.  It probably makes sense for just about anything in FILESDIR to have a copyright notice if the file format supports comments/etc.
Comment 12 Mike Gilbert gentoo-dev 2016-03-28 15:02:33 UTC
To clarify, I'm fine with having a copyright notice in unit files, though adding that notice is up to the author.

I just don't think it makes sense to require a copyright notice for the "trivial" ones.
Comment 13 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-03-28 15:06:28 UTC
Also note that many of the unit files end up being copied from other distros / random sources. I'm not really happy with Gentoo claiming copyright on something that was copied from source that considered it non-copyrightable.
Comment 14 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2016-03-28 23:28:05 UTC
(In reply to Ulrich Müller from comment #10)
> > Where $STATUS is one of the following:
> > - "Unknown" (stuff that we inherited of unknown provenience)
> I fear that the only option for files that we identify as non-trivial and of
> unknown copyright status is to remove them. IMHO, explicitly tagging them
> makes our position worse, because then we cannot claim any more that we
> distribute them in good faith, or that we were ignorant of the issue.
It can be taken as a good faith sign to clear up the status of the tree. If you read the lists, it was raised many years ago, during the Gentoo Technologies copyright assignment debacle.

> > - "Uncopyrightable:trivial"
> > - "Copyrighted" - It should have a copyright block elsewhere in the file.
> Redundant. Files that have a copyright header (e.g. ebuilds) can do without
> such an extra line.
Yes, it's redundant IFF the file has a copyright header that covers all of the file (if it's a patch that happens to include a copyright header in the context, a simple check might not always be right. However it can be a good start. I'd be ok with making it optional if another copyright header exists in the file.

> > For example, all of the metadata.xml files would get
> > <-- X-Gentoo-Copyright-Status: Uncopyrightable:trivial -->
> 
> That's a rather bold assumption. Looking at metadata.xml of app-misc/gramps,
> dev-haskell/hashtable, or dev-libs/ecore, I wouldn't be so sure that their
> longdescriptions aren't copyrightable.
I hadn't seen how large those had gotten. They are definitely to the range that there SHOULD be a copyright header in the files.

> > The Non-trivial unit files example:
> > # X-Gentoo-Copyright-Status: Copyrighted
> > # Copyright YYYY Yoyodyne Inc.
> 
> Again, I don't see why that line would be needed if the file has an extra
> copyright header. And what if the file is under a license that allows
> distribution but not modification?
Do we have any such files present in the gentoo repo itself? I hope not. If we do, there should probably have large warnings around them.

> > I realize that /profiles/ is an interesting case. The individual files are
> > mostly trivial, but collectively could constitute sui generis database.
> The ones in profiles/ should all be © Gentoo Foundation, though? Then we
> could simply put a COPYING file in the top-level profile dir.
Yes; and since it's Git, we can just put in a symlink to licenses/GPL-2 :-).

(In reply to Richard Freeman from comment #11)
> Just to confirm, the intent is to apply this policy to unit files in the
> Gentoo repo, not to all unit files that are installed by packages? 
Yes, this policy applies ONLY to files located in the Gentoo repo. Unit files are a good first candidate for it, and we can expand it to other files later on (clarifying the status of patches would be a huge step forward).

(In reply to Mike Gilbert from comment #12)
> I just don't think it makes sense to require a copyright notice for the
> "trivial" ones.
Just add a single line declaring the file to be trivial (and therefore uncopyrightable).
Comment 15 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2016-03-28 23:32:42 UTC
(In reply to Michał Górny from comment #13)
> Also note that many of the unit files end up being copied from other distros
> / random sources. I'm not really happy with Gentoo claiming copyright on
> something that was copied from source that considered it non-copyrightable.
I'm NOT out to claim copyright for non-copyrightable things, or for work of non-Gentoo people. I simply want to DECLARE the status of those things, rather than leaving it as having to figure out every file each time it's seen.

A hierarchy of possible options:

1. Unit file written by a Gentoo dev/user explicitly.
1.1. Trivial -> not copyrightable: add trivial header
1.2. Non-trivial: Add Gentoo copyright header

2. Unit file taken from another source, Subtantially modified to work with Gentoo
2.1. Trivial: Add trivial header
2.2. Non-Trivial: Add Gentoo copyright header

3. Unit file taken from another source, UNMODIFIED
3.1. Trivial: Add trivial header
3.2. Non-Trivial: Add unknown header OR a copyright header to the author
Comment 16 Mike Gilbert gentoo-dev 2016-03-29 00:54:35 UTC
> (In reply to Mike Gilbert from comment #12)
> > I just don't think it makes sense to require a copyright notice for the
> > "trivial" ones.
> Just add a single line declaring the file to be trivial (and therefore
> uncopyrightable).

Personally, I would prefer a solution that does not involve changing the content of the files themselves. It's just going to look awfully weird.

However, I acknowledge that it is a simple way to add the metadata you are trying to express. If it solves a real problem, I guess it's ok by me.