Re: Legal issues with haskell-unix-time

2016-05-26 Thread vheuser
The functions themselves might be subject to design patent, but they are not 
subject to copyright (in the US.)

Only the *particular expression* of a creative work is subject to copyright.
The code sample implementing the functions is *the work* copyrighted.

Seems like three choices:
1. Drop the copyrighted code section altogether
2. Find or create an equivalent code not derived from the prior work
3. Get a special license from the copyright holder.

Vince Heuser
Louisville KY  USA




- Original Message - 
From: "Eloi" <entfe...@gmail.com>

To: <debian-legal@lists.debian.org>
Sent: Thursday, May 26, 2016 3:19 AM
Subject: Re: Legal issues with haskell-unix-time


El 24/05/16 a les 12:36, Dmitry Bogatov ha escrit:

There is 'cbits/conv.c' in 'haskell-unix-time' source package, which
is probably is of same copyright, as haskell code (BSD-3-clause),
but there is part of it, that is explicitly marked as all-rights-reserved.
No email is provided. This troublesome part is only for portability on
Solaris, and is not used on GNU/Linux systems.

What is the best way to deal with situation? I know, there is 
Files-Excludes:

clause in debian/copyright, but what to do with part of file?

For your convenience, offending file is attached, but you probably
interested in whole package.



Just a side question: Are these funcions even copyrightable? The is_leap
function is quite trivial, and the typical exercise for a programming
student; the timegm is a conversion from a tm struct to an unix time
which could even be reimplemented with no great effort.



Re: Legal issues with haskell-unix-time

2016-05-26 Thread Ben Finney
Eloi  writes:

> Just a side question: Are these funcions even copyrightable?

Copyright is not a thing done to works; it exists automatically, from
the moment a work exists in fixed form. (From this unfortunate fact,
comes many of the thorny issues of making works free.)

I assume you're asking something like “does copyright law restrict
recipients of a work consisting entirely of these functions?”

> The is_leap function is quite trivial, and the typical exercise for a
> programming student; the timegm is a conversion from a tm struct to an
> unix time which could even be reimplemented with no great effort.

The question of “does copyright apply?” varies significantly by
jurisdiction, and across years, and across case law.

One common rule of thumb to tell whether copyright might obtain in a
work is: was there creative decision-making involved in generating the
work?

If the work could feasibly be expressed in various ways, then any given
expression may be considered – by whichever copyright jurisdiction
decides the hypothetical case in the future – to be a creative work.

-- 
 \ “Oh, I realize it's a penny here and a penny there, but look at |
  `\  me: I've worked myself up from nothing to a state of extreme |
_o__)  poverty.” —Groucho Marx |
Ben Finney



Re: Legal issues with haskell-unix-time

2016-05-26 Thread Eloi
El 24/05/16 a les 12:36, Dmitry Bogatov ha escrit:
> There is 'cbits/conv.c' in 'haskell-unix-time' source package, which
> is probably is of same copyright, as haskell code (BSD-3-clause),
> but there is part of it, that is explicitly marked as all-rights-reserved.
> No email is provided. This troublesome part is only for portability on
> Solaris, and is not used on GNU/Linux systems.
>
> What is the best way to deal with situation? I know, there is Files-Excludes:
> clause in debian/copyright, but what to do with part of file?
>
> For your convenience, offending file is attached, but you probably
> interested in whole package.
>

Just a side question: Are these funcions even copyrightable? The is_leap
function is quite trivial, and the typical exercise for a programming
student; the timegm is a conversion from a tm struct to an unix time
which could even be reimplemented with no great effort.



Re: Legal issues with haskell-unix-time

2016-05-24 Thread Paul Wise
On Tue, May 24, 2016 at 6:36 PM, Dmitry Bogatov wrote:

> There is 'cbits/conv.c' in 'haskell-unix-time' source package, which
> is probably is of same copyright, as haskell code (BSD-3-clause),
> but there is part of it, that is explicitly marked as all-rights-reserved.
> No email is provided. This troublesome part is only for portability on
> Solaris, and is not used on GNU/Linux systems.

I would suggest sending upstream a patch that copies the version from
one of the BSDs, which would probably be BSD licensed, or the version
from glibc.

> What is the best way to deal with situation? I know, there is Files-Excludes:
> clause in debian/copyright, but what to do with part of file?

You could exclude the whole file and add a copy without the bad part
via a patch.

> For your convenience, offending file is attached, but you probably
> interested in whole package.

Now the Debian mailing list archives are illegally distributing the code.

-- 
bye,
pabs

https://wiki.debian.org/PaulWise



Legal issues with haskell-unix-time

2016-05-24 Thread Dmitry Bogatov

There is 'cbits/conv.c' in 'haskell-unix-time' source package, which
is probably is of same copyright, as haskell code (BSD-3-clause),
but there is part of it, that is explicitly marked as all-rights-reserved.
No email is provided. This troublesome part is only for portability on
Solaris, and is not used on GNU/Linux systems.

What is the best way to deal with situation? I know, there is Files-Excludes:
clause in debian/copyright, but what to do with part of file?

For your convenience, offending file is attached, but you probably
interested in whole package.

-- 
Accept: text/plain, text/x-diff
Accept-Language: eo,en,ru
X-Keep-In-CC: yes
X-Web-Site: sinsekvu.github.io
#include "config.h"

#if IS_LINUX
/* Linux cheats AC_CHECK_FUNCS(strptime_l), sigh. */
#define THREAD_SAFE 0
#define _XOPEN_SOURCE
#define _BSD_SOURCE
#elif HAVE_STRPTIME_L
#define THREAD_SAFE 1
#define _GNU_SOURCE
#else
#define THREAD_SAFE 0
#endif

#include 
#include 
#include 

#if THREAD_SAFE
#if HAVE_XLOCALE_H
#include 
#endif

locale_t c_locale = NULL;

void init_locale() {
if (c_locale == NULL) c_locale = newlocale(LC_TIME_MASK, "C", NULL);
}
#else
void init_locale() {
static int initialized = 0;
if (initialized == 0) {
setlocale(LC_TIME, "C");
	initialized == 1;
}
}
#endif

time_t c_parse_unix_time(char *fmt, char *src) {
struct tm dst;
init_locale();
memset(, 0, sizeof(struct tm));
#if THREAD_SAFE
strptime_l(src, fmt, , c_locale);
#else
strptime(src, fmt, );
#endif
return mktime();
}

#if !defined(HAVE_TIMEGM)
/* This part is for Solaris that doesn't have timegm.
 * The copyright notice of timegm and is_leap is as below:
 *
 * Copyright (c) 1997 Kungliga Tekniska H.gskolan
 * (Royal Institute of Technology, Stockholm, Sweden).
 * All rights reserved. 
 */

static int
is_leap(unsigned y)
{
  y += 1900;
  return (y % 4) == 0 && ((y % 100) != 0 || (y % 400) == 0);
}

static time_t
timegm (struct tm *tm)
{
  static const unsigned ndays[2][12] ={
{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
{31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}};
  time_t res = 0;
  unsigned i;

  for (i = 70; i < tm->tm_year; ++i)
res += is_leap(i) ? 366 : 365;

  for (i = 0; i < tm->tm_mon; ++i)
res += ndays[is_leap(tm->tm_year)][i];
  res += tm->tm_mday - 1;
  res *= 24;
  res += tm->tm_hour;
  res *= 60;
  res += tm->tm_min;
  res *= 60;
  res += tm->tm_sec;
  return res;
}
#endif /* HAVE_TIMEGM */

time_t c_parse_unix_time_gmt(char *fmt, char *src) {
struct tm dst;
init_locale();
memset(, 0, sizeof(struct tm));
#if THREAD_SAFE
strptime_l(src, fmt, , c_locale);
#else
strptime(src, fmt, );
#endif
return timegm();
}

size_t c_format_unix_time(char *fmt, time_t src, char* dst, int siz) {
struct tm tim;
init_locale();
localtime_r(, );
#if THREAD_SAFE
return strftime_l(dst, siz, fmt, , c_locale);
#else
return strftime(dst, siz, fmt, );
#endif
}

size_t c_format_unix_time_gmt(char *fmt, time_t src, char* dst, int siz) {
struct tm tim;
init_locale();
gmtime_r(, );
#if THREAD_SAFE
return strftime_l(dst, siz, fmt, , c_locale);
#else
return strftime(dst, siz, fmt, );
#endif
}