Re: [dev][announce] lr: tiny log rotater

From: Laslo Hunhold <dev_AT_frign.de>
Date: Sun, 22 Jan 2017 23:28:43 +0100

On Sun, 22 Jan 2017 15:48:00 -0500
Wolfgang Corcoran-Mathe <wcm_AT_sigwinch.xyz> wrote:

Hey Wolfgang,

> I’ve written a simple log rotation program. It rotates a given file
> through n backups, appending a numeric suffix. Logs may also be piped
> through a command, and an optional suffix may be appended.
>
> lr is static and is configured solely through command-line flags.
> There is no built-in support for periodic rotation (e.g. every two
> weeks, or when a file has reached a given size), which is better
> handled by external utilities.
>
> It is a very boring program. Unlike logrotate, however, it is
> fairly sane.

Alexander raises a valid point. Log rotation, with growing hard drive
space, is becoming less and less relevant, however, I can see the uses
for some applications.

The topic of licensing came up, so let me say a few words about it: If
you want to maximize the number of people benefitting from your code,
then you should not put it in the public domain. Period.
I and many on this ml have seen the big mess that came up when Google
actually did not want to use musl for an internal project because parts
of musl were licensed as public domain. Given public domain is not
well-defined globally, it's more of an "all rights reserved" and
companies are (rightfully) very careful when they plan to integrate a
piece of software into their set of tools.

-----------------------------------------------------------------------

Okay, so how do you construct a simple, but effective license for your
needs? Given we are very liberal about software here, there are only
two choices we might make when we give a license to something: Do we
want to be attributed or not?

If the answer is yes, we use the standard ISC-header[0]:

        Permission to use, copy, modify, and/or distribute this
        software for any purpose with or without fee is hereby granted,
        provided that the above copyright notice and this permission
        notice appear in all copies.

If not, we use the standard "ISC"-header, but without the attribution
clause at the end. This is also known as the BSD 0-Clause License[1]
(0BSD):

        Permission to use, copy, modify, and/or distribute this
        software for any purpose with or without fee is hereby granted.

After that, we add the warranty-block, which is the same for every
license. The ISC-license provides a nice one that has been simplified
based on some international terms agreed upon at the Berne convention:

        THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
        WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
        WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
        THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
        CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
        LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
        NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
        CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

To make it easier for people to see which license it is, add a

        ISC-License

or

        0BSD-License

at the very top of your LICENSE file. COPYING or COPYRIGHT is not a good
name for this file, given the license not only covers copying the code,
but what also applies to compilates and your disclamation of any
implied warranty. Also, from my experience, I much more often encounter
LICENSE rather than COPYING and it's the first thing I look for in a
codebase.

-----------------------------------------------------------------------

I also don't see the value in public domain really, given the choices
above which are 100% legally waterproof, easy to understand as the
legal concepts are well-drawn and well-established in the free
software community and even at corporations.
Legally speaking, you _never_ lose your copyright in something. And
tell me one aspect where 0BSD is in any way inferior to Public Domain.
It just complicates things and as you've seen above, you can really use
two simple licenses for your daily needs. On the other hand, public
domain might really hinder your software from being used by
corporations who have to keep their checks in place. If you argue that
corporations are evil let me remind you that in the long run, them
using good, clean, well-tested open source code is much more beneficial
to the users of their software than them handrolling a crappy solution
in a few days on a tight budget.

And as a last piece of advice: Never allow your codebase to host
multiply-licensed code if you can prevent it. Legacy codebases are of
course and exception, but if you happen to stumble upon a GPL-fanatic
or a PD-fanatic who just does not agree to license his submission under
the license imposed by the project, it might not even be worth it to
merge his changes. It's just complicated to read a gem like this[2],
where it's not even well-defined what certain parts of a code are
actually licensed as.

With best regards

Laslo

[0]: https://tldrlegal.com/license/-isc-license
[1]: https://tldrlegal.com/license/bsd-0-clause-license
[2]: http://git.musl-libc.org/cgit/musl/tree/COPYRIGHT

-- 
Laslo Hunhold <dev_AT_frign.de>
Received on Sun Jan 22 2017 - 23:28:43 CET

This archive was generated by hypermail 2.3.0 : Sun Jan 22 2017 - 23:36:13 CET