Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

util-linux/lib/parse-date.y license #891

Closed
hfuse opened this issue Nov 6, 2019 · 10 comments
Closed

util-linux/lib/parse-date.y license #891

hfuse opened this issue Nov 6, 2019 · 10 comments

Comments

@hfuse
Copy link

hfuse commented Nov 6, 2019

I found someone committed following files to the git repository

https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/commit/lib/parse-date.y?id=7088bd88323fa9152ec9fbe4089fe76807445ed3

The lib/parse-date.y is created as GPLv3

Because the library in lib directory is used for creating some util-linux packages, I think that current util-linux license seems GPLv3

But COPYING in top directory said util-linux is GPLv2

https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/tree/COPYING

This confused me

I think that lib/parse-date.y should be LGPLv2.1

@hfuse
Copy link
Author

hfuse commented Nov 7, 2019

As described the comment, lib/parse-date.y was imported from gnulib

And gnulib-tool was used for importing gnulib software
I also checked gnulib-tool and found --lgpl option

My understanding is that the developer can change gnulib software license to LGPL by using gnulib-tool --lgpl option

@karelzak
Copy link
Collaborator

karelzak commented Nov 7, 2019

No, we do not use parse_date() everywhere and do not link all tools with it. The util-linux license is not GPLv3 at all. We use many licenses and it's per-util, see README.licences.

I have moved parse-date.y to hwclock-parse-date.y to make it more obvious that we use the code only in hwclock and not everywhere. So, if we want to be strict and follow the licence headers that hwclock is GPLv3 now. It would be nice if we can re-introduce the file, but with LGPL to make it more usable for us.

@karelzak
Copy link
Collaborator

karelzak commented Nov 7, 2019

It seems you're right,
gnulib/modules/parse-datetime define License: LGPLv2+

althougth lib/parse-datetime.y uses GPLv3. I guess the code has been originally exported manually as copy rather than by gnulib-tool ;-(

Anyway not sure, how to export it as LGPL

   gnulib-tool --lgpl=3orGPLv2 --create-testdir --dir foo parse-datetime

generates all necessary stuff, but foo/gllib/parse-datetime.y is still with GPLv3, bug?

@karelzak
Copy link
Collaborator

karelzak commented Nov 7, 2019

Maybe I have a solution -- remove all parse-date.y and use parse_timestamp() from lib/timeutils.c.

The timeutils.c already covers many date-time formats, it's without problematic license, without dependence on bison, etc.

@hfuse
Copy link
Author

hfuse commented Nov 7, 2019 via email

@hfuse
Copy link
Author

hfuse commented Nov 7, 2019

The util-linux license is not GPLv3 at all. We use many licenses and it's per-util, see README.licences.

I think that removing GPLv3 codes is best solution
Did you try "gnulib-tool --lgpl=2" command?

@karelzak
Copy link
Collaborator

karelzak commented Nov 8, 2019

$ /home/projects/gnulib/gnulib/gnulib-tool --lgpl=2 --create-testdir --dir foo parse-datetime
$ head foo/gllib/parse-datetime.y
%{
/* Parse a string into an internal timestamp.

   Copyright (C) 1999-2000, 2002-2019 Free Software Foundation, Inc.

   This program 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.

... so it works, but the file is still with GPLv3.

@hfuse
Copy link
Author

hfuse commented Nov 11, 2019

I got same result
It seems that we can not get LGPLv2.1 version of parse-datetime.y

BTW, you proposed another solution

Maybe I have a solution -- remove all parse-date.y and use parse_timestamp() from lib/timeutils.c.
The timeutils.c already covers many date-time formats, it's without problematic license, without dependence on bison, etc.

Could you create hwclocl binary with about file?

Regards,

@karelzak
Copy link
Collaborator

Well, is hwclock with GPLv3 so big problem? :-)

We can use parse_timestamp() from lib/timeutils.c, but it implements only small subset of date-time formats and for some users it may be a regression...

We had exec() for date(1) in hwclock originally; this has been replaced by parse-date.y to avoid dependence on date(1) -- so date(1) like time formats are supported for pretty long time and I'm not sure if we want to change it.

@karelzak
Copy link
Collaborator

Closing for now. It seems we can alive with GPLv3 hwclock -- at least until someone send patch with better date-time parser ;-)

karelzak added a commit that referenced this issue Jan 27, 2020
The currently used date/time parser (for hwclock --set --date <date>)
is gnulib based code with GPLv3.

This patch allows to avoid this code and replace it with minimalistic
date/time parser.

Addresses: #891
Reported-by: Carlos Santos <unixmania@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
karelzak added a commit that referenced this issue Jan 27, 2020
The currently used date/time parser (for hwclock --set --date <date>)
is gnulib based code with GPLv3.

This patch allows to avoid this code and replace it with minimalistic
date/time parser.

Addresses: #891
Reported-by: Carlos Santos <unixmania@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants