Licensing example programs in man-pages (was [PATCH v3] ioctl_tty.2: Add example how to get or set baudrate on the serial port)

Alejandro Colomar (man-pages) alx.manpages@gmail.com
Thu Aug 5 16:45:57 GMT 2021


Hi Greg,

On 8/5/21 6:14 PM, Greg Kroah-Hartman wrote:
> On Thu, Aug 05, 2021 at 05:28:49PM +0200, Alejandro Colomar (man-pages) wrote:
>> Hi Pali,
>>
>> On 8/5/21 11:51 AM, Pali Rohár wrote:
>>>>>> Also, you forgot a license for this code, that is required if you want
>>>>>> people to use it...
>>>>>
>>>>> Hm... I do not see any license in other manpage examples. Does not apply
>>>>> for it global license defined in ioctl_tty.2 file?
>>>>
>>>> That does not mean you do not need it.
>>
>> I don't know what is the status of the current code examples in terms of
>> licensing.
>>
>> I thought I had seen an SPDX license identifier in one of them some time
>> ago, but now I can't find it.
>>
>> Technically, the pages have a license at the top of each file, which isn't
>> printed on the rendered output (the license text doesn't require so) (see
>> that text below).
>>
>> If you want a different license for your example (let's say you want it BSD
>> for example), I guess you could add an SPDX line at the top of the example
>> for simplicity.
>>
>> But if your code example adheres to the same license as the rest of the
>> page, I guess you don't need to do anything in your patch.
> 
> What is the license of a man page?

Typically, the one I showed in my last email (the "Verbatim" license").
See <https://www.kernel.org/doc/man-pages/licenses.html>.

> 
> What is the license of this page?

.../linux/man-pages$ head -n8 man2/ioctl_tty.2
.\" Copyright 2002 Walter Harms <walter.harms@informatik.uni-oldenburg.de>
.\" and Andries Brouwer <aeb@cwi.nl>.
.\"
.\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
.\" Distributed under GPL
.\" %%%LICENSE_END
.\"
.TH IOCTL_TTY 2 2021-03-22 "Linux" "Linux Programmer's Manual"

I'm don't know what GPL_NOVERSION_ONLINE is at all.

CC += Walter, Andries

> 
> And if it is not shown in the code segment itself, that's going to be a
> mess, please make it explicit, otherwise no one can ever use any of the
> code examples for anything.

I'm not against that.  At

However, there's an explicit mention (without any rationale at all, or I 
couldn't find it) in man-pages(7) that the Linux man-pages project 
doesn't use the COPYRIGHT section:

[
DESCRIPTION
        This page describes the conventions that should be employed
        when writing man pages for  the  Linux  man‐pages  project,
        which  documents  the  user‐space API provided by the Linux
        kernel and the GNU C library.  The  project  thus  provides
        most  of the pages in Section 2, many of the pages that ap‐
        pear in Sections 3, 4, and 7, and a few of the  pages  that
        appear  in Sections 1, 5, and 8 of the man pages on a Linux
        system.  The conventions described on this page may also be
        useful for authors writing man pages for other projects.

        [...]

    Sections within a manual page
        The  list  below  shows conventional or suggested sections.
        Most manual pages should include at least  the  highlighted
        sections.   Arrange  a new manual page so that sections are
        placed in the order shown in the list.

        [...]
               COPYRIGHT        [Not used in man‐pages]
] [[man-pages(7)]]

Maybe Michael can provide a rationale for this.

Still, if the code is going to have a different license than the rest of 
the page, it could perfectly have an SPDX comment in the first line of 
the example program.


Thanks,

Alex


-- 
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/


More information about the Libc-alpha mailing list