Re: Revert "Many Pages: Remove references to C89"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[CC += Sam, Marcos]

Hi Oskari, Sam, Marcos,

On 3/18/23 05:58, Oskari Pirhonen wrote:
> Hi,
> 
> On Thu, Mar 16, 2023 at 02:43:54 +0100, Alejandro Colomar wrote:
>> Hi Tom,
>>
>> On 3/15/23 19:10, Tom Schwindl wrote:
>>> Hi Alex,
>>>>
>>>> Do you know if we can distribute them?  which license applied to them?
>>>> I'm worried that some distros are very strict in what can be distributed
>>>> in a package (e.g., Fedora, Debian (main)).  There were issues with
>>>> man-pages-posix in the past.
>>>>
>>>> Should we maybe open a separate project iso-c-drafts that installs
>>>> drafts of the ISO C standards and maybe some scripts that will be useful
>>>> with them?
>>>>
>>>
>>> This is probably a legal gray area and I'd be careful.
>>
>> Yeah, that's what I think.  Until I'm 100% sure that it's legal, I
>> won't do it.
>>
>>> ISOs license agreement[0] explicitly states the following:
>>
>> I had some doubts, because since the drafts have always been published
>> in many sites, I don't know if that's legal, or simply ISO doesn't
>> enforce the license over drafts...  If someone knows for sure and can
>> clarify, that would help.  In fact, maybe I can write to someone in the
>> committee...
>>
>> Thanks,
>>
>> Alex
>>
>>>
>>>   > The ISO publication(s) you order is/are copyrighted by the International
>>>   > Organization for Standardization. You acknowledge and agree to respect ISO’s
>>>   > copyright in our publications by purchasing, downloading, copying or
>>>   > otherwise using (an) ISO publication(s). Except as provided for under this
>>>   > Licence Agreement, you may not lend, lease, reproduce, distribute or
>>>   > otherwise commercially exploit ISO publication(s). In the case of joint
>>>   > standards (such as ISO/IEC standards), this clause shall apply to the
>>>   > respective joint copyright ownership.
>>>
>>> As we (or a third party) can only produce a plaintext version by downloading the
>>> original PDF draft and converting it, we agree with the above. Thus, we can't
>>> "reproduce" or "distribute" the standard, at least that's my understanding[1].
>>> I highly doubt that major distibutions would take that risk, nor should we.
>>>
>>>
>>> [0] <https://www.iso.org/terms-conditions-licence-agreement.html#Customer-Licence>
>>> [1] For the record: I'm not a lawyer, this is not legal advice. It's very well
>>>     possible that I've overlooked something.
>>>
> 
> Gentoo has a concept of "fetch restricted packages" [1] where ebuilds
> are available through Portage, but you have to provide the distfiles
> yourself. Perhaps something similar in spririt can be used here if the
> license terms forbid/are unclear about distributing the standards (or
> drafts) themselves?
> 
> Here's my idea:
> 
> - Create the utils with the assumption that the docs exist at some TBD
>   path and ship them (the utils, that is).

I think that would qualify as a "contrib" package in Debian policy.  So
that would be for a new package, separate from the man-pages, which
should go in main.

> - Include a check for the docs and instruct the user to install them to
>   that path manually if they don't exist.

I'm not even sure about the legality of that.  So far I've written the
script assuming the files exist, and we'll see how to get the files
there (I have them in my system).  I'll be cautious before writing any
advice on how to get them in a program :).

> - If it turns out the docs can be distributed, the check can be removed.
>   Although it might be better to keep it around for the sake of the
>   pickier distros in hopes that they don't patch out the utils from
>   their packages.
> 
> Obligatory I'm not a lawyer either.
> 
> For people unfamiliar with Gentoo terminology, "ebuilds" are basically
> scripts used to fetch, build, and install packages and "distfiles" are
> what's being fetched (source code, etc).
> 
> - Oskari
> 
> [1]: https://devmanual.gentoo.org/general-concepts/licenses/index.html#license-implied-restrictions

Here goes something that works for c89, c99, and c11 (thoroughly tested
only for c89; lightly tested for the others).

I'll create a public git repository for it in my website later this week
(if I find the time this week).

Cheers,

Alex
---

(I might change the interface in the future, and will document it when
I'm convinced by it.)


$ cat /usr/local/bin/stdc 
#!/bin/bash

set -Eefuo pipefail;

prefix="/usr/local";
datarootdir="$prefix/share";
docdir="$datarootdir/doc";

err()
{
	>&2 echo "$(basename "$0"): error: $*";
	exit 1;
}

grep_proto()
{
	pcregrep -M "(?s)\b$1 *\([[:alnum:]*,._\s\(\)-]*\);$";
}

c89_libc_summ()
{
	sed -n '/A.3 LIBRARY SUMMARY/,$p' <"$docdir/c/c89/c89-draft.txt";
}

c99_libc_summ()
{
	sed -n '/Library summary$/,/Sequence points$/p' \
		<"$docdir/c/c99/n1256.txt";
}

c11_libc_summ()
{
	sed -n '/Library summary$/,/Sequence points$/p' \
		<"$docdir/c/c11/n1570.txt";
}

case $# in
0)
	err "missing ISO C version.";
	;;
1)
	err "missing function name.";
	;;
2)
	;;
*)
	shift;
	shift;
	err "unsupported extra argument(s): $*";
	;;
esac;

case "$1" in
c89)
	shift;
	c89_libc_summ | grep_proto $@;
	;;
c99)
	shift;
	c99_libc_summ | grep_proto $@;
	;;
c11)
	shift;
	c11_libc_summ | grep_proto $@;
	;;
*)
	err "$1: unsupported ISO C version.";
	;;
esac;

-- 
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux