diff mbox series

[bug#41118] gnu: inkscape: Update to 1.0.

Message ID 87y2q41l9d.fsf@gmail.com
State Accepted
Headers show
Series [bug#41118] gnu: inkscape: Update to 1.0. | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job

Commit Message

Maxim Cournoyer May 7, 2020, 3:23 a.m. UTC
Hello!

The following updates Inkscape to its 1.0 version.  The test suite is
enabled and an effort is made to unbundle as much of 3rd party libraries
as possible (but more can be done, if you'd like to help: see the
comments in the patch).

The last patch of the series (Add libdepixelize) is added as a WIP, and
is included as a curiosity only (not intended to be merged in its
current state).

Enjoy!

Maxim

Comments

Leo Famulari May 7, 2020, 3:20 p.m. UTC | #1
On Wed, May 06, 2020 at 11:23:10PM -0400, Maxim Cournoyer wrote:
> The following updates Inkscape to its 1.0 version.  The test suite is
> enabled and an effort is made to unbundle as much of 3rd party libraries
> as possible (but more can be done, if you'd like to help: see the
> comments in the patch).
> 
> The last patch of the series (Add libdepixelize) is added as a WIP, and
> is included as a curiosity only (not intended to be merged in its
> current state).

Thanks!

Too bad about the licensing issues... it seems like it might be a while
before they are resolved upstream. I think it's not totally correct to
say that the license of lib2geom is effectively GPL3+. Only the
copyright-holders of lib2geom can say that, right? The licenses are
effectively incoherent and I'd say the software is not something we have
the right to distribute :/ I'm no expert, however.

I did notice that Inkscape's COPYING has addressed this issue for a few
years, due to some files from copied GIMP, and reads: "As such, the
complete binaries of Inkscape are currently covered by the terms of GNU
GPL version 3 or later." Given that, I guess we are only waiting on
lib2geom to make a decision?

I saw the bug report on Inkscape's GitLab page [0], but I'm wondering if
there was actually any public discussion upstream, like on a mailing
list?

[0] https://gitlab.com/inkscape/inkscape/-/issues/784
Leo Famulari May 7, 2020, 3:27 p.m. UTC | #2
On Wed, May 06, 2020 at 11:23:10PM -0400, Maxim Cournoyer wrote:
> The following updates Inkscape to its 1.0 version.  The test suite is
> enabled and an effort is made to unbundle as much of 3rd party libraries
> as possible (but more can be done, if you'd like to help: see the
> comments in the patch).

What commit do these patches apply to? I can't get patch 7 to apply to
either master or core-updates.
Leo Famulari May 7, 2020, 3:30 p.m. UTC | #3
On Thu, May 07, 2020 at 11:27:32AM -0400, Leo Famulari wrote:
> What commit do these patches apply to? I can't get patch 7 to apply to
> either master or core-updates.

Sorry, false alarm! I wasn't actually applying them to my core-updates
tree. They do apply on core-udpates.
Maxim Cournoyer May 15, 2020, 1:36 p.m. UTC | #4
Hello Leo!

Leo Famulari <leo@famulari.name> writes:

> On Wed, May 06, 2020 at 11:23:10PM -0400, Maxim Cournoyer wrote:
>> The following updates Inkscape to its 1.0 version.  The test suite is
>> enabled and an effort is made to unbundle as much of 3rd party libraries
>> as possible (but more can be done, if you'd like to help: see the
>> comments in the patch).
>> 
>> The last patch of the series (Add libdepixelize) is added as a WIP, and
>> is included as a curiosity only (not intended to be merged in its
>> current state).
>
> Thanks!

Thanks for having a look.

> Too bad about the licensing issues... it seems like it might be a while
> before they are resolved upstream. I think it's not totally correct to
> say that the license of lib2geom is effectively GPL3+. Only the
> copyright-holders of lib2geom can say that, right? The licenses are
> effectively incoherent and I'd say the software is not something we have
> the right to distribute :/ I'm no expert, however.

You're probably right, that this needs to be sorted upstream first.

> I did notice that Inkscape's COPYING has addressed this issue for a few
> years, due to some files from copied GIMP, and reads: "As such, the
> complete binaries of Inkscape are currently covered by the terms of GNU
> GPL version 3 or later." Given that, I guess we are only waiting on
> lib2geom to make a decision?

Yes, it seems only inertia is preventing a move to GPL v3+ as a whole,
which would be much clearer, but in the meantime, there's at least that
bit of text which means it's safe to distribute Inkscape under the GPL
v3+ license.  Thanks for pointing that out to me!

> I saw the bug report on Inkscape's GitLab page [0], but I'm wondering if
> there was actually any public discussion upstream, like on a mailing
> list?

I've searched the mailing lists of both Inkscape and lib2geom, but
haven't found any recent discussion on the licensing topic.

> [0] https://gitlab.com/inkscape/inkscape/-/issues/784

I've attempted to stir up some action in that thread.  A comment was
made by one of the Inkscape developer on the matter, directed to another
Inkscape developer:

> If a license change from GPLv2+ to GPLv3+ (of the raw Inkscape code)
> is something you're actually interested in you should probably make a
> comparison of pros and cons of either license (i.e. why would we as a
> project as well as possible re-users profit from upgrading to GPLv3+?
> What would we loose?) and post it to the mailing list. I don't think
> anybody feels particularly strong about keeping GPLv2 in principle,
> but a lot of effort was put in to keep our codebase compatible with it
> in the past, so there's some hesitation to just "throw that away"
> without having good reasons for doing so.

This was made here: https://gitlab.com/inkscape/inkscape/-/issues/784.
If you have a good grasp of the GPL v2 vs GPL v3 merits, perhaps it'd be
useful to them to to post that there.  IIRC, I think the big new things
in GPL v3 were immunization to patent attacks (nice to have for
Inkscape) as well as preventing tivoization (this is not so applicable),
and clarifying that linking with GPL code means the whole should be GPL.
I'll re-read the licenses text in detail when I have a chance.

Anyway, if this doesn't move quickly enough, we could reluctantly build
Inkscape with its bundled lib2geom, which is a subset of the full
lib2geom and which doesn't link with GSL (IIRC).

Maxim
Leo Famulari May 15, 2020, 2:43 p.m. UTC | #5
On Fri, May 15, 2020 at 09:36:13AM -0400, Maxim Cournoyer wrote:
> This was made here: https://gitlab.com/inkscape/inkscape/-/issues/784.
> If you have a good grasp of the GPL v2 vs GPL v3 merits, perhaps it'd be
> useful to them to to post that there.  IIRC, I think the big new things
> in GPL v3 were immunization to patent attacks (nice to have for
> Inkscape) as well as preventing tivoization (this is not so applicable),
> and clarifying that linking with GPL code means the whole should be GPL.
> I'll re-read the licenses text in detail when I have a chance.
> 
> Anyway, if this doesn't move quickly enough, we could reluctantly build
> Inkscape with its bundled lib2geom, which is a subset of the full
> lib2geom and which doesn't link with GSL (IIRC).

In <https://gitlab.com/inkscape/inkscape/-/issues/784#note_343293612>
they seem to demonstrate a misunderstanding about lib2geom's license.
That commenter thinks that lib2geom is GPL2+, when it's actually
LGPL-2.1 or MPL-1.1.

However, gnu.org says that LGPL-2.1 is compatible with GPL2 and GPL3. So
maybe it's fine; I don't know. I think we should ask FSF for advice
<https://www.fsf.org/licensing>.
Maxim Cournoyer May 16, 2020, 3:53 a.m. UTC | #6
Hello Leo,

Leo Famulari <leo@famulari.name> writes:

> On Fri, May 15, 2020 at 09:36:13AM -0400, Maxim Cournoyer wrote:
>> This was made here: https://gitlab.com/inkscape/inkscape/-/issues/784.
>> If you have a good grasp of the GPL v2 vs GPL v3 merits, perhaps it'd be
>> useful to them to to post that there.  IIRC, I think the big new things
>> in GPL v3 were immunization to patent attacks (nice to have for
>> Inkscape) as well as preventing tivoization (this is not so applicable),
>> and clarifying that linking with GPL code means the whole should be GPL.
>> I'll re-read the licenses text in detail when I have a chance.
>> 
>> Anyway, if this doesn't move quickly enough, we could reluctantly build
>> Inkscape with its bundled lib2geom, which is a subset of the full
>> lib2geom and which doesn't link with GSL (IIRC).

Actually, this doesn't help with the licensing incompatibility, given
that Inkscape already depends on the GPL v3+ GNU Scientific Library
(GSL) and that the bundled lib2geom sources within Inkscape make use of
GSL.  I've pointed that here:
https://gitlab.com/inkscape/inkscape/-/issues/784#note_343667232.

> In <https://gitlab.com/inkscape/inkscape/-/issues/784#note_343293612>
> they seem to demonstrate a misunderstanding about lib2geom's license.
> That commenter thinks that lib2geom is GPL2+, when it's actually
> LGPL-2.1 or MPL-1.1.

I've brought this to their attention, thank you.

> However, gnu.org says that LGPL-2.1 is compatible with GPL2 and GPL3. So
> maybe it's fine; I don't know. I think we should ask FSF for advice
> <https://www.fsf.org/licensing>.

That's a good idea.

Maxim
Marius Bakke May 16, 2020, 11:05 a.m. UTC | #7
Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

> Hello Leo,
>
> Leo Famulari <leo@famulari.name> writes:
>
>> On Fri, May 15, 2020 at 09:36:13AM -0400, Maxim Cournoyer wrote:
>>> This was made here: https://gitlab.com/inkscape/inkscape/-/issues/784.
>>> If you have a good grasp of the GPL v2 vs GPL v3 merits, perhaps it'd be
>>> useful to them to to post that there.  IIRC, I think the big new things
>>> in GPL v3 were immunization to patent attacks (nice to have for
>>> Inkscape) as well as preventing tivoization (this is not so applicable),
>>> and clarifying that linking with GPL code means the whole should be GPL.
>>> I'll re-read the licenses text in detail when I have a chance.
>>> 
>>> Anyway, if this doesn't move quickly enough, we could reluctantly build
>>> Inkscape with its bundled lib2geom, which is a subset of the full
>>> lib2geom and which doesn't link with GSL (IIRC).
>
> Actually, this doesn't help with the licensing incompatibility, given
> that Inkscape already depends on the GPL v3+ GNU Scientific Library
> (GSL) and that the bundled lib2geom sources within Inkscape make use of
> GSL.  I've pointed that here:
> https://gitlab.com/inkscape/inkscape/-/issues/784#note_343667232.

What exactly is the license incompatibility?  As Leo points out,
LGPL2.1+ is compatible with GPL3.  Your initial assessment that the
entire works become GPL3+ seems correct to me.

GNU has a handy chart that shows compatibility between the various GNU
licenses: <https://www.gnu.org/licenses/gpl-faq.html#AllCompatibility>.
Maxim Cournoyer May 16, 2020, 6:59 p.m. UTC | #8
Hey Marius!

Marius Bakke <mbakke@fastmail.com> writes:

> Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:
>
>> Hello Leo,
>>
>> Leo Famulari <leo@famulari.name> writes:
>>
>>> On Fri, May 15, 2020 at 09:36:13AM -0400, Maxim Cournoyer wrote:
>>>> This was made here: https://gitlab.com/inkscape/inkscape/-/issues/784.
>>>> If you have a good grasp of the GPL v2 vs GPL v3 merits, perhaps it'd be
>>>> useful to them to to post that there.  IIRC, I think the big new things
>>>> in GPL v3 were immunization to patent attacks (nice to have for
>>>> Inkscape) as well as preventing tivoization (this is not so applicable),
>>>> and clarifying that linking with GPL code means the whole should be GPL.
>>>> I'll re-read the licenses text in detail when I have a chance.
>>>> 
>>>> Anyway, if this doesn't move quickly enough, we could reluctantly build
>>>> Inkscape with its bundled lib2geom, which is a subset of the full
>>>> lib2geom and which doesn't link with GSL (IIRC).
>>
>> Actually, this doesn't help with the licensing incompatibility, given
>> that Inkscape already depends on the GPL v3+ GNU Scientific Library
>> (GSL) and that the bundled lib2geom sources within Inkscape make use of
>> GSL.  I've pointed that here:
>> https://gitlab.com/inkscape/inkscape/-/issues/784#note_343667232.
>
> What exactly is the license incompatibility?  As Leo points out,
> LGPL2.1+ is compatible with GPL3.  Your initial assessment that the
> entire works become GPL3+ seems correct to me.
>
> GNU has a handy chart that shows compatibility between the various GNU
> licenses:
> <https://www.gnu.org/licenses/gpl-faq.html#AllCompatibility>.

This helps! It indeed shows that's it's OK to copy code from a GPLv3+
project (link to) from a LGPL2.1+ code base, as long as the combined
work becomes GPLv3+.

What I wasn't sure, following the remark from Leo, was if this
permission was automatically granted to downstream users, without having
the upstream stating that yes, it indeed is OK to do so.

In retrospect, it would make sense that users are empowered to choose
the combination of their choice, as long as the effective license is
properly stated.  I just find it confusing that upstream says 'this is
LGPLv2+', when in reality the combined product is necessarily GPLv3+.

Thanks for tipping in, Marius!

Maxim
Maxim Cournoyer May 28, 2020, 3:34 a.m. UTC | #9
Hi Leo!

Leo Famulari <leo@famulari.name> writes:

> On Thu, May 07, 2020 at 11:27:32AM -0400, Leo Famulari wrote:
>> What commit do these patches apply to? I can't get patch 7 to apply to
>> either master or core-updates.
>
> Sorry, false alarm! I wasn't actually applying them to my core-updates
> tree. They do apply on core-udpates.

Did you have a chance to try this?  With the licensing issue resolved
(it's OK to license the combined works as GPLv3+ for both lib2geom and
Inkscape), I'll be looking to merge this while it's still relatively
fresh :-).

I'll leave it another week, then merge it to staging if no one objects.

Maxim
Leo Famulari May 28, 2020, 1:39 p.m. UTC | #10
On Wed, May 27, 2020 at 11:34:56PM -0400, Maxim Cournoyer wrote:
> Did you have a chance to try this?  With the licensing issue resolved
> (it's OK to license the combined works as GPLv3+ for both lib2geom and
> Inkscape), I'll be looking to merge this while it's still relatively
> fresh :-).

No, I didn't try it... if it works for you, I'm sure it's okay. I'd
check for post-release major bugs before pushing since it's probably
been well-tested in other distros.
Maxim Cournoyer June 1, 2020, 3:14 a.m. UTC | #11
Leo Famulari <leo@famulari.name> writes:

> On Wed, May 27, 2020 at 11:34:56PM -0400, Maxim Cournoyer wrote:
>> Did you have a chance to try this?  With the licensing issue resolved
>> (it's OK to license the combined works as GPLv3+ for both lib2geom and
>> Inkscape), I'll be looking to merge this while it's still relatively
>> fresh :-).
>
> No, I didn't try it... if it works for you, I'm sure it's okay. I'd
> check for post-release major bugs before pushing since it's probably
> been well-tested in other distros.

I've made some edits to simplify the wording of some comments, made sure
to not cause a rebuild of many packages, and pushed to master (staging
is currently frozen) as a second inkscape-1.0 package.

Thank you, I'm closing this.

Maxim
diff mbox series

Patch

From 3853fb03cbd15ab84a6744cb8f65231e5702b0e1 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Thu, 6 Feb 2020 00:13:06 -0500
Subject: [PATCH 14/14] gnu: WIP: Add libdepixelize.

WIP: This currently fails to build.  We need to figure out which ancient
version of lib2geom it needs to link against.

* gnu/packages/graphics.scm (libdepixelize): New variable.
---
 gnu/packages/graphics.scm | 67 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 67 insertions(+)

diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index 208e2a521c..d27440dfea 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -71,6 +71,7 @@ 
   #:use-module (gnu packages photo)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages plotutils)
+  #:use-module (gnu packages popt)
   #:use-module (gnu packages pth)
   #:use-module (gnu packages pulseaudio)  ; libsndfile, libsamplerate
   #:use-module (gnu packages python)
@@ -87,6 +88,7 @@ 
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system python)
   #:use-module (guix download)
+  #:use-module (guix bzr-download)
   #:use-module (guix git-download)
   #:use-module (guix hg-download)
   #:use-module ((guix licenses) #:prefix license:)
@@ -465,6 +467,71 @@  basic geometries.")
       ;; and https://gitlab.com/inkscape/inkscape/issues/784).
       (license license:gpl3+))))
 
+;;; This older version of 2geom is used by libpixelize.
+(define-public lib2geom-0.9
+  (package
+    (inherit lib2geom)
+    (name "lib2geom")
+    (version "0.9")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://gitlab.com/inkscape/lib2geom.git")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1zfb9mkggn36pxyp04z67dvj7r0vqfdw8yy2a41zg7rlcw5v6v67"))
+              (modules '((guix build utils)))
+              (snippet
+               '(begin
+                  (delete-file-recursively "src/googletest")
+                  ;; Fix py2geom module initialization (see:
+                  ;; https://gitlab.com/inkscape/lib2geom/merge_requests/18).
+                  (substitute* "src/py2geom/__init__.py"
+                    (("_py2geom") "py2geom._py2geom"))
+                  ;; Disable toys and tests, as they cause build issues.
+                  (substitute* "src/CMakeLists.txt"
+                    ((".*ADD_SUBDIRECTORY \\(.*tests\\).*") "")
+                    ((".*ADD_SUBDIRECTORY \\(toys\\).*") "")
+                    ((".*gtest.*") ""))
+                  #t))))))
+
+(define-public libdepixelize
+  (let ((revision "187")                ;no tags or official releases
+        (guix-revision "1"))
+    (package
+      (name "libdepixelize")
+      (version (string-append "0.0.0-" guix-revision "." revision))
+      (source (origin
+                (method bzr-fetch)
+                (uri (bzr-reference
+                      (url (string-append "lp:" name))
+                      (revision revision)))
+                (file-name (string-append name "-" version "-checkout"))
+                (sha256
+                 (base32
+                  "19znvam2d2bya05d9sxcj37lnrnvj9c0403aa2p5fv60985xi5b9"))))
+      (build-system cmake-build-system)
+      (arguments
+       `(#:phases (modify-phases %standard-phases
+                    (add-after 'unpack 'patch-sources
+                      (lambda _
+                        (substitute* "src/priv/splines-kopf2011.h"
+                          ((".*dest\\.pathVector\\.reserve.*") ""))
+                        #t)))))
+      (native-inputs `(("pkg-config" ,pkg-config)))
+      (inputs `(("gtkmm" ,gtkmm-2)
+                ("lib2geom" ,lib2geom-0.9)
+                ("popt" ,popt)))
+      (home-page "https://launchpad.net/libdepixelize")
+      (synopsis "C++ library for vectorizing raster graphics")
+      (description "Depixelize is a library (and utility) for converting
+raster graphics into vector graphics.  It implements the algorithm described in
+@url{https://johanneskopf.de/publications/pixelart/paper/pixel.pdf,Depixelizing
+Pixel Art}.")
+      (license (list license:gpl2+ license:lgpl2.1+))))) ;dual licensed
+
 (define-public pstoedit
   (package
     (name "pstoedit")
-- 
2.26.2