Bug 1995647 - Hplip package shows as proprietary in Gnome Software
Summary: Hplip package shows as proprietary in Gnome Software
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: hplip
Version: 34
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: Zdenek Dohnal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-08-19 14:39 UTC by Eduardo Silva
Modified: 2021-09-24 20:14 UTC (History)
7 users (show)

Fixed In Version: hplip-3.21.2-11.fc34 hplip-3.21.2-11.fc33 hplip-3.21.2-11.fc35
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-09-08 15:06:36 UTC
Type: Bug


Attachments (Terms of Use)
Details information on the hplip package in Gnome Software (12.93 KB, image/png)
2021-08-19 14:39 UTC, Eduardo Silva
no flags Details
devel version (41) of gnome-software (28.88 KB, image/png)
2021-09-02 07:23 UTC, Milan Crha
no flags Details

Description Eduardo Silva 2021-08-19 14:39:07 UTC
Created attachment 1815715 [details]
Details information on the hplip package in Gnome Software

Description of problem:
When installing my printer, I was asked to install hplip from Gnome Software, where it was shown as having the license "Proprietary", which I believe is probably not the case as it is from fedora repository.

Version-Release number of selected component (if applicable):
3.21.2-10.fc34

How reproducible:
Always

Steps to Reproduce:
1.Search for package hplip in Gnome Software


Actual results:
Shows as having proprietary license

Expected results:
Show as having free license

Additional info:
Not sure if this was an issue with the package itself, or with Gnome Software, so if it's the later, and if I'm correct in the licensing of hplip, please tell me and I'll file a ticket for Software.

Comment 1 Zdenek Dohnal 2021-08-20 05:30:30 UTC
Hi Eduardo,

thank you for reporting the issue!

I've checked hplip.appdata.xml[1] and License tag in SPEC file[2] and both contain Fedora accepted licenses[3], so I'm not sure about the source where gnome-software gets 'proprietary' from...

You don't need to create a separate issue, I'll just reassign this one to gnome-software for more investigation.


[1] https://src.fedoraproject.org/rpms/hplip/blob/rawhide/f/hplip.appdata.xml
[2] https://src.fedoraproject.org/rpms/hplip/blob/rawhide/f/hplip.spec
[3] https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#SoftwareLicenses

Comment 2 Milan Crha 2021-08-30 09:07:24 UTC
The GNOME Software reads the information about the license from the appdata file. The link above currently says:

> <project_license>GPL-2.0 and MIT and BSD-2-Clause</project_license>

To determine whether the license is free or proprietary is used `as_license_is_free_license()` from the appstream library. See the detailed investigation done upstream from this comment: https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1200#note_1075522 downwards.

Comment 3 Zdenek Dohnal 2021-09-02 04:56:12 UTC
Hi Milan,

thanks for looking into the issue!

If I'm not mistaken all licenses from hplip.appdata.xml are defined in spdx-free-license-ids.txt and in spdx-license-ids.txt from appstream, there isn't a typo, the licenses are compatible and 'as_license_is_free_license()' doesn't implement AND logic, so IMO the result should be true...

I wanted to debug this in gnome software, but I'm unable to find out 'HPLIP Graphical Tools' in gnome-software :( do you have any tips how to debug why I don't see it in gnome-software?

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

In the meantime, I've built a testing hplip build with only 'GPL-2.0+' license in appdata file - Eduardo, would you mind testing it if gnome-software shows the 'free' license now? Here is the link https://koji.fedoraproject.org/koji/taskinfo?taskID=74973697

Comment 4 Milan Crha 2021-09-02 07:11:52 UTC
It cannot be searched for for some reason, I do not know why. To have it shown, install hplip-gui, then restart gnome-software (gnome-software --quit && gnome-software), after which it is shown in the Installed page.

Comment 5 Milan Crha 2021-09-02 07:23:04 UTC
Created attachment 1819945 [details]
devel version (41) of gnome-software

I get this, when using:
gnome-software-40.4-2.fc34.x86_64
appstream-0.14.5-1.fc34.x86_64

It's different from the previous screenshot, in multiple ways. I do not know why the hplip appdata is missing for (or ignored by) the search.

Comment 6 Milan Crha 2021-09-02 07:30:50 UTC
> I do not know why the hplip appdata is missing for (or ignored by) the search.

A brief check of files in /usr/share/app-info/xmls/ reveal that none of them is referencing hplip, at least here. These are used for the search.

Comment 7 Eduardo Silva 2021-09-02 09:31:37 UTC
Zdenek. sorry, I missed the request made to me.

I will test that tonight.

Comment 8 Zdenek Dohnal 2021-09-02 10:06:56 UTC
Thanks, Eduardo - I'm quite interested in the fact whether you will see a change or not (in case of xml files from  /usr/share/app-info/xmls/ will need to be rebuilt).

Comment 9 Eduardo Silva 2021-09-02 16:17:12 UTC
My current hplip package is version 3.21.2-10, is that the version to test?

Unfortunately, I also cannot find it in Gnome Software to check the license.
I also tried removing the hplip package, and plugging in my printer again in the hopes Gnome Software would pop up with the choice to install it, but it did not. (I also confirmed that I couldn't print without hplip installed).

Comment 10 Milan Crha 2021-09-02 16:33:37 UTC
Aha, did you have it shown in the Software, because cups asked to install the driver for your printer? I'm wondering how it has got to the hplip-gui, or it probably wasn't hplip-gui, but a different package it found. That changes the point of view, because there might be a separate .appdata file for the hplip itself, while there is only an appdata file for the hplip-gui. Am I right?

Comment 11 Eduardo Silva 2021-09-02 17:34:38 UTC
> Aha, did you have it shown in the Software, because cups asked to install the driver for your printer? 
Exactly, the package that then opened in gnome software was just named "hplip". 
But now that I'm remembering it better, it showed hplip as already installed (and then I noticed the proprietary license).

Comment 12 Milan Crha 2021-09-02 18:03:29 UTC
I can show the hplip by this command run from the terminal:

   $ gdbus call --session --dest org.freedesktop.PackageKit --object-path /org/freedesktop/PackageKit --method org.freedesktop.PackageKit.Modify2.InstallPackageNames "['hplip']" "" "" "[]"


It does show the license as proprietary here as well. Looking closer on it, there is no license set, thus the code defaults to the "Proprietary". I'll investigate this further. This might be fixed on the gnome-software side, I think, because the shown info comes from the PackageKit/rpm, not from the appstream like when searching the usual way.

Comment 13 Milan Crha 2021-09-02 19:32:00 UTC
Okay, it took me longer to debug this. The hplip package gets the license from the rpm, thus from the hplip.spec file. It currently reads [1]:

   GPLv2+ and MIT and BSD and IJG and Public Domain and GPLv2+ with exceptions and ISC

it's converted by as_license_to_spdx_id() to:

   GPL-2.0+ AND MIT AND BSD-3-Clause AND IJG AND LicenseRef-public-domain AND GPL-2.0+ AND ISC

and that is considered non-free by the as_license_is_free_license().

[1] https://src.fedoraproject.org/rpms/hplip/blob/rawhide/f/hplip.spec#_11

Comment 14 Zdenek Dohnal 2021-09-03 08:48:14 UTC
(In reply to Milan Crha from comment #13)
> it's converted by as_license_to_spdx_id() to:
> 
>    GPL-2.0+ AND MIT AND BSD-3-Clause AND IJG AND LicenseRef-public-domain
> AND GPL-2.0+ AND ISC
> 

Thanks for the debugging, Milan!

It seems the license guide[1] does not take Public Domain as a license, so I've tried to remove Public Domain from license tag, but the package is still marked as a proprietary...

However, F33 shows me hplip as a free project, and F34 as a proprietary... and hplip is the same on both Fedoras.

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

Ok, I needed to refresh PackageKit cache somehow everytime after installation/uninstallation... but now I'm able to verify that removing 'Public Domain' from License tag changes 'proprietary' -> 'free'.



[1] https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#SoftwareLicenses

Comment 15 Milan Crha 2021-09-03 08:58:11 UTC
(In reply to Zdenek Dohnal from comment #14)
> However, F33 shows me hplip as a free project, and F34 as a proprietary...
> and hplip is the same on both Fedoras.

Yeah, it's because the way to determine whether the app is free or proprietary changed on the gnome-software side. If I recall correctly, the f33 claims the app being free when at least one of the licenses is free. The f34+ gnome-software uses the appstream function to determine whether the license is free or not.

> Ok, I needed to refresh PackageKit cache somehow everytime after installation/uninstallation...

I can second that, it's tricky to make the PackageKit provide correct information with the scratch builds.

Comment 16 Fedora Update System 2021-09-03 10:02:33 UTC
FEDORA-2021-d5cda4ba4c has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2021-d5cda4ba4c

Comment 17 Fedora Update System 2021-09-03 10:22:30 UTC
FEDORA-2021-8be9de992a has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-8be9de992a

Comment 18 Fedora Update System 2021-09-03 10:51:39 UTC
FEDORA-2021-3b3e2c457c has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-3b3e2c457c

Comment 19 Fedora Update System 2021-09-03 15:25:29 UTC
FEDORA-2021-d5cda4ba4c has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-d5cda4ba4c`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-d5cda4ba4c

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 20 Fedora Update System 2021-09-04 20:27:46 UTC
FEDORA-2021-3b3e2c457c has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-3b3e2c457c`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-3b3e2c457c

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 21 Fedora Update System 2021-09-04 20:38:34 UTC
FEDORA-2021-8be9de992a has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-8be9de992a`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-8be9de992a

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 22 Fedora Update System 2021-09-08 15:06:36 UTC
FEDORA-2021-8be9de992a has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 23 Fedora Update System 2021-09-13 03:48:08 UTC
FEDORA-2021-3b3e2c457c has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 24 Fedora Update System 2021-09-24 20:14:54 UTC
FEDORA-2021-d5cda4ba4c has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.