Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#6929 closed defect (fixed)

Sugar should include a string that explains that it is free software and under the GPL

Reported by: mako Owned by: dsd
Priority: normal Milestone: 8.2.0 (was Update.2)
Component: sugar Version:
Keywords: 8.2.0:? r+ 8.2-759:+ Cc: mako, gnu, Eben, marco
Blocked By: Blocking: #4265
Deployments affected: Action Needed: finalize
Verified: no

Description

As part of solving the #4265 and coming into compliance with the GPL and with the spirit of free software, several change to the current builds are needed.

One reasonably easy thing will be including a note in a translated string somewhere in the sugar interface (some sort of about screen, etc) that mentions that Sugar is released under the GPL and that it is free software. This is standard procedure with interactive pieces of software.

See #4265 for more information and history.

Attachments (11)

Change History (54)

comment:1 Changed 6 years ago by tomeu

  • Cc Eben marco added
  • Keywords 8.2.0:? added
  • Milestone changed from Never Assigned to 8.2.0 (was Update.2)

Eben, please specify where to place this, although we are past string freeze.

comment:2 Changed 6 years ago by Eben

The "About this XO" module of the control panel seems to be the most appropriate place to me. I'm certainly open to other suggestions, though. If we choose to include a "getting started guide" of sorts, we could include it within that as well.

comment:3 Changed 6 years ago by erikos

  • Action Needed set to never set
  • Owner changed from tomeu to Eben

Eben, if you spec me something I can add it.

comment:4 Changed 6 years ago by Eben

  • Action Needed changed from never set to communicate
  • Owner changed from Eben to sj

Let's add a short paragraph to the software section of the "About my XO" module. I'm not the right one to phrase the language, though. SJ, could you pull something together for this? (Or, perhaps you'd like to, Mako?) Ideally we'd keep it to 3-4 lines of text, with a link either to a document with a complete license or to a website with more information.

comment:5 Changed 6 years ago by marco

  • Keywords 8.2.0:- added; 8.2.0:? removed
  • Milestone changed from 8.2.0 (was Update.2) to 9.1.0

comment:6 Changed 6 years ago by mstone

SJ, Mako - this ticket is slipping. Are you going to stand by?

comment:7 Changed 6 years ago by gnu

Need wording? It's easy to steal from any GNU program. From GDB, modified for Sugar:

Sugar version xxxx.
Copyright (C) 2008 One Laptop Per Child.
Sugar is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Start "Browse" and open "file:///usr/share/licenses/common-licenses/GPL" for details.
There is absolutely no warranty for Sugar.

When translating that string, they can point to the Spanish translation of the GPL, if someone fixes #6928 too.

comment:8 Changed 6 years ago by Eben

  • Action Needed changed from communicate to code
  • Keywords 8.2.0:? added; 8.2.0:- removed
  • Owner changed from sj to dsd

dsd and I discussed the basics of the design, incorporating gnu's above working, on IRC. We'll see how it comes together.

Changed 6 years ago by gnu

Patch for src/controlpanel/view/aboutxo.py to add copyright/license notice

Changed 6 years ago by dsd

screenshot

comment:9 Changed 6 years ago by dsd

  • Action Needed changed from code to review
  • Keywords r? added

comment:10 Changed 6 years ago by Eben

Design review:

  1. I think we should use the Unicode copyright symbol © (U+00A9) See http://www.fileformat.info/info/unicode/char/00a9/index.htm for additional encoding info.
  2. "Copyright" is indicated 3 times: section header, word, symbol. Let's trim. I think you can leave out the word in the first line, leaving "© 2008 One Laptop per Child". Can we label the section just "License" The copyright seems self-evident enough anyway.
  3. "graphical user interface" needn't be capitalized.
  4. Let's conclude with "...certain conditions described therein."
  5. Any reason the text wraps so early?
  6. And, let's change the expander label to "Full license" instead of "License text".

comment:11 Changed 6 years ago by Eben

Addendum: I'm dissatisfied with the appearance of the full license, since it has been formatted for output in an 80 char display in a fixed width font. I'd be more content if the title and headers were simply left aligned, but as dsd described to me, this is read from a package on the system and might not be trivial to adjust at this point.

It would be even nicer if it had some basic formatting to make the lengthy body easier to parse....maybe one day...

comment:12 follow-up: Changed 6 years ago by gnu

I agree with most of Eben's design review suggestions. I do think we should keep the section title as "Copyright and License" for legal reasons; you don't have anything to license unless you establish your copyright on it. The GPL requires us to display not only the license, but also the copyright notice. But the word "Copyright" should be struck from the first line, and using the Unicode symbol would be great.

I'd be totally happy if it shipped the way it is, or anything close, of course!

If you're revising it, though, is there a reason there are two nested scrolling boxes? Why not just have the text appear without any box around it, when you open the "Full license" item? Then the main scrollbar will suffice for moving up and down in it. I think that'd be less confusing for the kids. You could make it even simpler by eliminating the "Full license" button
and simply always include the license (which people will only see the top part of, unless they scroll the scroll bar).

comment:13 in reply to: ↑ 12 Changed 6 years ago by Eben

Replying to gnu:

I agree with most of Eben's design review suggestions. I do think we should keep the section title as "Copyright and License" for legal reasons; you don't have anything to license unless you establish your copyright on it. The GPL requires us to display not only the license, but also the copyright notice. But the word "Copyright" should be struck from the first line, and using the Unicode symbol would be great.

Fair enough.

I'd be totally happy if it shipped the way it is, or anything close, of course!

Me too!

If you're revising it, though, is there a reason there are two nested scrolling boxes? Why not just have the text appear without any box around it, when you open the "Full license" item? Then the main scrollbar will suffice for moving up and down in it. I think that'd be less confusing for the kids. You could make it even simpler by eliminating the "Full license" button

I'm fine with this idea. I wasn't sure which would be better, but you're likely correct that the nested scrolling could be confusing.

and simply always include the license (which people will only see the top part of, unless they scroll the scroll bar).

I'd still prefer to tuck it away one level. Many of these kids won't even be reading, let alone have the comprehension to understand all that text. Additionally, this module will grow with additional hardware and software information. I don't want the length of the license(s) to decrease the scrollbar fidelity or make it possible to get "lost".

Changed 6 years ago by dsd

new screenshot

comment:14 Changed 6 years ago by dsd

posted a new patch and screenshot above, incorporating all the above feedback

comment:15 Changed 6 years ago by Eben

Looks good to me! Out of curiosity, how does this interact with string freeze/translation support? The GNU license has several "unofficial" translations: http://www.gnu.org/licenses/translations.html. Is this something we can provide in some form?

comment:16 Changed 6 years ago by erikos

is 'copyright 2008 One Laptop per Child' correct? We have code that went in from marco which is marced to be copyrighted for redhat.

comment:17 Changed 6 years ago by dsd

I don't know about the freeze. The translations will happen by the translators translating the filename string in model/aboutxo.py. See ticket #6928 where I'm adding the Spanish translations.

Who can provide further insight on the required copyright notices?

comment:18 Changed 6 years ago by dsd

  • Milestone changed from 9.1.0 to 8.2.0 (was Update.2)

comment:19 follow-up: Changed 6 years ago by marco

Please separate the widget creation code in different blocks (single \n). You are doing it in some places, but not consistently

+    license_file = _("/usr/share/licenses/common-licenses/GPL-2")

Do we need to rely on a translated string for this? It seems like we could just figure out the path in the code from the current lang codes.

+        label_info = gtk.Label(_("Sugar is the graphical user interface that you are looking at. Sugar is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions described therein."))

80 cols, please split the string up. This makes me think you didn't pylint the code. Please do so, see the note about pylint here:

http://sugarlabs.org/go/DevelopmentTeam/CodeReview#Buildbot

+        label_info.set_size_request(600, -1)

I'd make this screen size relative gtk.gdk.screen_width() / 2 or something.

+            view_license.set_border_window_size(gtk.TEXT_WINDOW_LEFT, 1)
+            view_license.set_border_window_size(gtk.TEXT_WINDOW_RIGHT, 1)
+            view_license.set_border_window_size(gtk.TEXT_WINDOW_TOP, 1)
+            view_license.set_border_window_size(gtk.TEXT_WINDOW_BOTTOM, 1)

Do we actually want this border? In what color is it rendered? Eben?

+            view_license.set_left_margin(3)

Why a margin only on the left? I'd prefer to use style.DEFAULT_PADDING anyway.

comment:20 Changed 6 years ago by marco

  • Keywords r- added; r? removed

comment:21 Changed 6 years ago by marco

I'm not sure what the copyright there refers to exactly. Maybe Mako can advise? Many activities will have different copyright holders. I think clearly Red Hat needs to be there, since a bunch of the Sugar code has that copyright.

comment:22 Changed 6 years ago by cscott

I think the legally correct text would be something like: "(c) 2006-2008 One Laptop per Child Association, Inc; Red Hat, Inc; and Contributors." Check out the "About Firefox" dialog in your web browser, it says just "(c) 1998-2008 Contributors." That should be sufficient.

comment:23 Changed 6 years ago by mako

If it's an official copyright statement, you should list all copyright holders who have contributed non-trivial amounts of code (especially functionality and features). That should certainly list Red Hat and OLPC who have done most of the work through work for hire. If getting that list is unreasonable, a short list like the one the Scott mentions would be perfectly suitable. Especially if it has a phrase explaining how people can get the full list. Something like (See source files for full copyright statements). It's not perfect but it's great progress.

comment:24 in reply to: ↑ 19 Changed 6 years ago by dsd

  • Keywords r? added; r- removed

Replying to marco:

Please separate the widget creation code in different blocks (single \n). You are doing it in some places, but not consistently

I don't understand the request. I assume you are talking about view/aboutxo.py. I double checked and I'm doing it the same (whitespace-wise) as the rest of the code in the file.

+    license_file = _("/usr/share/licenses/common-licenses/GPL-2")

Do we need to rely on a translated string for this? It seems like we could just figure out the path in the code from the current lang codes.

I guess we could do that. How should it be implemented? Should I take the whole string (en_US.utf-8) and look for files based on that? Or strip off the .utf-8 and have all files UTF-8 (as is currently)? Or just take the first section "en"?

+        label_info = gtk.Label(_("Sugar is the graphical user interface that you are looking at. Sugar is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions described therein."))

80 cols, please split the string up. This makes me think you didn't pylint the code.

Fixed

+        label_info.set_size_request(600, -1)

I'd make this screen size relative gtk.gdk.screen_width() / 2 or something.

Fixed

+            view_license.set_border_window_size(gtk.TEXT_WINDOW_LEFT, 1)
+            view_license.set_border_window_size(gtk.TEXT_WINDOW_RIGHT, 1)
+            view_license.set_border_window_size(gtk.TEXT_WINDOW_TOP, 1)
+            view_license.set_border_window_size(gtk.TEXT_WINDOW_BOTTOM, 1)

Do we actually want this border? In what color is it rendered? Eben?

Its in dark grey as you can see in the screenshot. It looks a bit better bordered off, in my opinion.

+            view_license.set_left_margin(3)

Why a margin only on the left? I'd prefer to use style.DEFAULT_PADDING anyway.

Because otherwise the text is right up against the border and looks ugly. The other margins seem to be appropriate already - the displayed text sits at least a few pixels away from the right, top and bottom borders.
If we remove the border then the margin is not needed.

I also updated the copyright notice in this new patch.

comment:25 Changed 6 years ago by dsd

Newest patch removes the border and margin, and locates the license file according to the following scheme:

Assuming the LANG environment variable is es_ES.UTF-8 it tries:

  • /usr/share/licenses/common-licenses/GPL-2.es_ES
  • /usr/share/licenses/common-licenses/GPL-2.es
  • /usr/share/licenses/common-licenses/GPL-2

displaying the first one that finds

comment:26 Changed 6 years ago by marco

  • Keywords r+ added; r? removed

Should be enough to catch IOError on the open exception right? Anyway r+.

To land on the sucrose-0.83 branch (which is used by 8.2.0), you will need to request a string freeze break, and hope that translator doesn't get too angry.

http://sugarlabs.org/go/ReleaseTeam#Feature_freeze

comment:27 Changed 6 years ago by marco

|TestCase|

Open the control panel, go to the "About my XO" page. Verify that there is a license text.

comment:28 Changed 6 years ago by marco

  • Keywords r- added; r+ removed

I didn't notice the other two patches... A couple of things about them:

  • I'd rather put the scrolled window in the about section instead of in the generic one. I'm worried about the effect it could have on other pages layout.
  • Using the sugar shell module version is not quite right. We should AC_SUBST a SUCROSE_VERSION = 0.82 in configure.ac and use it in the config.py.

comment:29 Changed 6 years ago by dsd

  • Keywords r? added; r- removed

new patches attached

comment:30 Changed 6 years ago by marco

  • Keywords r+ added; r? removed

You don't need to keep a reference on the scrolledwindow, it looks like. r+

Please land on master, request string freeze break (see link I posted above) and once it's approved push on the sucrose-0.82 branch.

comment:31 Changed 6 years ago by dsd

OK. Pushed to master and requested string freeze break for 8.2

comment:32 Changed 6 years ago by dsd

  • Action Needed changed from review to package

pushed to sucrose-0.82

comment:33 Changed 6 years ago by erikos

  • Action Needed changed from package to test in build

comment:34 Changed 6 years ago by erikos

  • Action Needed changed from test in build to add to build

is present an issue occurred with the translation which is tracked by #8250

comment:35 Changed 6 years ago by cscott

  • Action Needed changed from add to build to approve for release

Exact package name & version for addition to 8.2, please.

comment:36 Changed 6 years ago by mstone

  • Action Needed changed from approve for release to add to release

comment:37 Changed 6 years ago by marco

sugar-0.82.2-1.fc9

comment:38 Changed 6 years ago by cscott

  • Action Needed changed from add to release to test in release

Committed to stable repo:
http://mock.laptop.org/gitweb/gitweb.cgi?p=repos;a=commitdiff;h=e0489cd6dec4b910445f489632adb44ba136c1c1

Should be in build 758 and following; please test.

comment:39 Changed 6 years ago by gnu

Works for me in English in 8.2-759. Very pretty!

I reset the language to Spanish; it shows off the translated GPL. (The translated strings have not yet caught up with the main Sugar copyright/license string, though.)

Congratulations for fitting in this improvement.

comment:40 Changed 6 years ago by mako

Great! Thanks for following up on this!

comment:41 Changed 6 years ago by dsd

  • Action Needed changed from test in release to finalize
  • Keywords 8.2-759:+ added

confirmed working in 8.2-759

comment:42 Changed 6 years ago by cscott

  • Resolution set to fixed
  • Status changed from new to closed

comment:43 Changed 6 years ago by frances

works in 8.2-760

Note: See TracTickets for help on using tickets.