Bug 1117432 - split qrcode funnctionality out to a optional package
Summary: split qrcode funnctionality out to a optional package
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-qrcode
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Nathaniel McCallum
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-08 16:58 UTC by Peter Robinson
Modified: 2014-09-27 09:56 UTC (History)
11 users (show)

Fixed In Version: freeipa-4.0.3-1.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-27 09:56:56 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Peter Robinson 2014-07-08 16:58:49 UTC
With the upgrade to freeipa 4.0.0 the freeipa-python sub package adds a dependency on python-qrcode which in turn pulls in a large number of dependencies which aren't needed on a minimal install of Fedora which previously worked just fine with freeipa-client.

I'm not sure what functionality would be lost on the client side by not having QR codes but I'm not sure whether the functionality would work on the cli or whether it's designed to provide a QR code to be scanned by a phone through the web console. It looks like the user of it is the otptoken.py plugin.

# yum upgrade
Resolving Dependencies
--> Running transaction check
---> Package freeipa-client.armv7hl 0:3.3.5-4.fc21 will be updated
---> Package freeipa-client.armv7hl 0:4.0.0-1.fc21 will be an update
---> Package freeipa-python.armv7hl 0:3.3.5-4.fc21 will be updated
---> Package freeipa-python.armv7hl 0:4.0.0-1.fc21 will be an update
--> Processing Dependency: python-yubico for package: freeipa-python-4.0.0-1.fc21.armv7hl
--> Processing Dependency: python-qrcode for package: freeipa-python-4.0.0-1.fc21.armv7hl
--> Processing Dependency: python-dateutil for package: freeipa-python-4.0.0-1.fc21.armv7hl
--> Running transaction check
---> Package python-dateutil.noarch 0:1.5-8.fc21 will be installed
---> Package python-qrcode.noarch 0:2.4.1-6.fc21 will be installed
--> Processing Dependency: python-imaging for package: python-qrcode-2.4.1-6.fc21.noarch
---> Package python-yubico.noarch 0:1.2.1-3.fc21 will be installed
--> Processing Dependency: pyusb for package: python-yubico-1.2.1-3.fc21.noarch
--> Running transaction check
---> Package python-pillow.armv7hl 0:2.5.0-1.fc21 will be installed
--> Processing Dependency: libwebpmux.so.1 for package: python-pillow-2.5.0-1.fc21.armv7hl
--> Processing Dependency: libwebpdemux.so.1 for package: python-pillow-2.5.0-1.fc21.armv7hl
--> Processing Dependency: libwebp.so.5 for package: python-pillow-2.5.0-1.fc21.armv7hl
--> Processing Dependency: libtiff.so.5(LIBTIFF_4.0) for package: python-pillow-2.5.0-1.fc21.armv7hl
--> Processing Dependency: libtiff.so.5 for package: python-pillow-2.5.0-1.fc21.armv7hl
--> Processing Dependency: libopenjp2.so.7 for package: python-pillow-2.5.0-1.fc21.armv7hl
--> Processing Dependency: liblcms2.so.2 for package: python-pillow-2.5.0-1.fc21.armv7hl
--> Processing Dependency: libjpeg.so.62(LIBJPEG_6.2) for package: python-pillow-2.5.0-1.fc21.armv7hl
--> Processing Dependency: libjpeg.so.62 for package: python-pillow-2.5.0-1.fc21.armv7hl
--> Processing Dependency: libfreetype.so.6 for package: python-pillow-2.5.0-1.fc21.armv7hl
--> Processing Dependency: ghostscript for package: python-pillow-2.5.0-1.fc21.armv7hl
---> Package pyusb.noarch 0:1.0.0-0.10.b1.fc21 will be installed
--> Running transaction check
---> Package freetype.armv7hl 0:2.5.3-6.fc21 will be installed
--> Processing Dependency: libpng16.so.16(PNG16_0) for package: freetype-2.5.3-6.fc21.armv7hl
--> Processing Dependency: libpng16.so.16 for package: freetype-2.5.3-6.fc21.armv7hl
---> Package ghostscript.armv7hl 0:9.14-4.fc21 will be installed
--> Processing Dependency: urw-fonts >= 1.1 for package: ghostscript-9.14-4.fc21.armv7hl
--> Processing Dependency: poppler-data for package: ghostscript-9.14-4.fc21.armv7hl
--> Processing Dependency: libfontconfig.so.1 for package: ghostscript-9.14-4.fc21.armv7hl
--> Processing Dependency: libXt.so.6 for package: ghostscript-9.14-4.fc21.armv7hl
--> Processing Dependency: libXext.so.6 for package: ghostscript-9.14-4.fc21.armv7hl
--> Processing Dependency: libX11.so.6 for package: ghostscript-9.14-4.fc21.armv7hl
--> Processing Dependency: libSM.so.6 for package: ghostscript-9.14-4.fc21.armv7hl
--> Processing Dependency: libICE.so.6 for package: ghostscript-9.14-4.fc21.armv7hl
--> Processing Dependency: ghostscript-fonts for package: ghostscript-9.14-4.fc21.armv7hl
---> Package lcms2.armv7hl 0:2.6-3.fc21 will be installed
---> Package libjpeg-turbo.armv7hl 0:1.3.1-3.fc21 will be installed
---> Package libtiff.armv7hl 0:4.0.3-16.fc21 will be installed
--> Processing Dependency: libjbig.so.2.0 for package: libtiff-4.0.3-16.fc21.armv7hl
---> Package libwebp.armv7hl 0:0.4.0-4.fc21 will be installed
---> Package openjpeg2.armv7hl 0:2.1.0-2.fc21 will be installed
--> Running transaction check
---> Package fontconfig.armv7hl 0:2.11.1-4.fc21 will be installed
--> Processing Dependency: fontpackages-filesystem for package: fontconfig-2.11.1-4.fc21.armv7hl
--> Processing Dependency: font(:lang=en) for package: fontconfig-2.11.1-4.fc21.armv7hl
---> Package ghostscript-fonts.noarch 0:5.50-33.fc21 will be installed
--> Processing Dependency: xorg-x11-font-utils for package: ghostscript-fonts-5.50-33.fc21.noarch
---> Package jbigkit-libs.armv7hl 0:2.0-11.fc21 will be installed
---> Package libICE.armv7hl 0:1.0.8-7.fc21 will be installed
---> Package libSM.armv7hl 0:1.2.1-7.fc21 will be installed
---> Package libX11.armv7hl 0:1.6.2-1.fc21 will be installed
--> Processing Dependency: libX11-common >= 1.6.2-1.fc21 for package: libX11-1.6.2-1.fc21.armv7hl
--> Processing Dependency: libxcb.so.1 for package: libX11-1.6.2-1.fc21.armv7hl
---> Package libXext.armv7hl 0:1.3.2-3.fc21 will be installed
---> Package libXt.armv7hl 0:1.1.4-9.fc21 will be installed
---> Package libpng.armv7hl 2:1.6.10-2.fc21 will be installed
---> Package poppler-data.noarch 0:0.4.6-5.fc21 will be installed
---> Package urw-fonts.noarch 0:2.4-19.fc21 will be installed
--> Running transaction check
---> Package fontpackages-filesystem.noarch 0:1.44-10.fc21 will be installed
---> Package libX11-common.noarch 0:1.6.2-1.fc21 will be installed
---> Package libxcb.armv7hl 0:1.10-2.fc21 will be installed
--> Processing Dependency: libXau.so.6 for package: libxcb-1.10-2.fc21.armv7hl
---> Package lyx-fonts.noarch 0:2.1.1-1.fc21 will be installed
---> Package xorg-x11-font-utils.armv7hl 1:7.5-19.fc21 will be installed
--> Processing Dependency: libfontenc.so.1 for package: 1:xorg-x11-font-utils-7.5-19.fc21.armv7hl
--> Processing Dependency: libXfont.so.1 for package: 1:xorg-x11-font-utils-7.5-19.fc21.armv7hl
--> Running transaction check
---> Package libXau.armv7hl 0:1.0.8-3.fc21 will be installed
---> Package libXfont.armv7hl 0:1.4.7-2.fc21 will be installed
---> Package libfontenc.armv7hl 0:1.1.1-5.fc21 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                    Arch       Version                 Repository  Size
================================================================================
Updating:
 freeipa-client             armv7hl    4.0.0-1.fc21            rawhide    141 k
 freeipa-python             armv7hl    4.0.0-1.fc21            rawhide    1.1 M
Installing for dependencies:
 fontconfig                 armv7hl    2.11.1-4.fc21           rawhide    216 k
 fontpackages-filesystem    noarch     1.44-10.fc21            rawhide    9.2 k
 freetype                   armv7hl    2.5.3-6.fc21            rawhide    353 k
 ghostscript                armv7hl    9.14-4.fc21             rawhide    4.1 M
 ghostscript-fonts          noarch     5.50-33.fc21            rawhide    324 k
 jbigkit-libs               armv7hl    2.0-11.fc21             rawhide     43 k
 lcms2                      armv7hl    2.6-3.fc21              rawhide    127 k
 libICE                     armv7hl    1.0.8-7.fc21            rawhide     57 k
 libSM                      armv7hl    1.2.1-7.fc21            rawhide     35 k
 libX11                     armv7hl    1.6.2-1.fc21            rawhide    549 k
 libX11-common              noarch     1.6.2-1.fc21            rawhide    186 k
 libXau                     armv7hl    1.0.8-3.fc21            rawhide     28 k
 libXext                    armv7hl    1.3.2-3.fc21            rawhide     33 k
 libXfont                   armv7hl    1.4.7-2.fc21            rawhide    131 k
 libXt                      armv7hl    1.1.4-9.fc21            rawhide    145 k
 libfontenc                 armv7hl    1.1.1-5.fc21            rawhide     27 k
 libjpeg-turbo              armv7hl    1.3.1-3.fc21            rawhide    117 k
 libpng                     armv7hl    2:1.6.10-2.fc21         rawhide    246 k
 libtiff                    armv7hl    4.0.3-16.fc21           rawhide    151 k
 libwebp                    armv7hl    0.4.0-4.fc21            rawhide    170 k
 libxcb                     armv7hl    1.10-2.fc21             rawhide    154 k
 lyx-fonts                  noarch     2.1.1-1.fc21            rawhide    168 k
 openjpeg2                  armv7hl    2.1.0-2.fc21            rawhide     92 k
 poppler-data               noarch     0.4.6-5.fc21            rawhide    2.1 M
 python-dateutil            noarch     1.5-8.fc21              rawhide     84 k
 python-pillow              armv7hl    2.5.0-1.fc21            rawhide    504 k
 python-qrcode              noarch     2.4.1-6.fc21            rawhide     30 k
 python-yubico              noarch     1.2.1-3.fc21            rawhide     46 k
 pyusb                      noarch     1.0.0-0.10.b1.fc21      rawhide     65 k
 urw-fonts                  noarch     2.4-19.fc21             rawhide    3.0 M
 xorg-x11-font-utils        armv7hl    1:7.5-19.fc21           rawhide     82 k

Transaction Summary 
================================================================================
Install             ( 31 Dependent packages)
Upgrade  2 Packages 

Total download size: 15 M
Is this ok [y/d/N]:

Comment 1 Petr Viktorin 2014-07-09 08:01:35 UTC
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/4430

Comment 2 Peter Robinson 2014-07-09 08:24:39 UTC
It might be worthwhile splitting the freeipa-python package into client/server/common if the qrcode bits aren't needed for freeipa-client to make the dependencies more granular

Comment 3 Petr Viktorin 2014-07-09 08:53:12 UTC
The QR code is generated on the client side, so splitting out server packages won't work.

python-pillow has dependency on the image libraries; and newly it pulls in libX11 as well.

Maybe there should be a python-qrcode-headless...

Comment 4 Peter Robinson 2014-07-09 09:05:53 UTC
(In reply to Petr Viktorin from comment #3)
> The QR code is generated on the client side, so splitting out server
> packages won't work.

How is that expected to work on a server platform without any form of means of displaying images such as via ssh, text console or serial console?

Comment 5 Petr Viktorin 2014-07-09 09:38:28 UTC
It prints out the QR code to the console.

http://i.imgur.com/OEpdyT8.png

Comment 6 Peter Robinson 2014-07-09 09:43:45 UTC
(In reply to Petr Viktorin from comment #5)
> It prints out the QR code to the console.

OK, cool, it would be useful to have this as optional. A lot of user (I work in RH GPS) won't use this functionality and won't want the unnecessary associated dependencies.

Comment 7 Nathaniel McCallum 2014-07-09 15:17:11 UTC
I agree with Petr's assessment that this is actually a bug for python-qrcode being more modular. The image generators that python-qrcode ships are actually never used by FreeIPA. These are what drag in the dependencies.

python-qrcode provides three backends by default:
 * pil
 * pure (pymaging)
 * svg

The PIL backend is the default (see https://github.com/lincolnloop/python-qrcode/blob/master/qrcode/main.py#L251). Both pil and pure require external dependencies. The svg backend, however, only requires external dependencies on python < 2.7.

I propose we begin a discussion with upstream about changing the default backend to svg. This would allow us to split out the pil and pure modules as plugins (python-qrcode-pil, python-qrcode-pure). This would reduce dependencies on the core python-qrcode package. Alternatively, we could make a python-qrcode-core package.

Comment 8 Nathaniel McCallum 2014-07-09 15:23:05 UTC
https://github.com/lincolnloop/python-qrcode/issues/60

Comment 9 Fedora Blocker Bugs Application 2014-09-10 18:20:18 UTC
Proposed as a Freeze Exception for 21-alpha by Fedora user sgallagh using the blocker tracking app because:

 This unfortunate dependency causes a large number of python dependencies as well as X dependencies to be pulled into the Server DVD and default installation.

A fix is ready for python-qrcode and freeipa-server to reduce these dependencies significantly, thus saving space both on the install media and the installed system. This is proposed as a Freeze Exception because it is difficult on an end-user to remove excess packages after the installation.

Comment 10 Adam Williamson 2014-09-10 18:46:21 UTC
Discussed at 2014-09-10 freeze exception review meeting: http://meetbot.fedoraproject.org/fedora-blocker-review/2014-09-10/f21-blocker-review.2014-09-10-16.07.log.txt . Accepted as a freeze exception issue, as we want to avoid the large bloat in the Server image and default install.

Comment 11 Fedora Update System 2014-09-15 13:25:57 UTC
python-qrcode-5.0.1-1.fc21, freeipa-4.0.3-1.fc21, 389-ds-base-1.3.3.3-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/FEDORA-2014-10811/389-ds-base-1.3.3.3-1.fc21,python-qrcode-5.0.1-1.fc21,freeipa-4.0.3-1.fc21

Comment 12 Stephen Gallagher 2014-09-15 18:36:43 UTC
I'm withdrawing the Freeze Exception request here. This was made under the expectation that we'd be performing a trivial rebuild of the FreeIPA packages to include this single dependency change. However, instead of that, FreeIPA made numerous changes (including a rebase to 4.0.3 that included changes to a number of other packages including 389 and Dogtag). As a result, this change is now too risky to go into Alpha at this late stage.

It should continue to go through the Bodhi process and should be tested and submitted for stable in time for Fedora 21 Beta.

Comment 13 Martin Kosek 2014-09-15 20:28:56 UTC
I personally would not recommend running image based on FreeIPA 4.0.2 if this being discussed - there were several major issues related to upgrade and use of 389 1.3.3.x.

There are so far no known major issues in 4.0.3 and it's depedencies (AFAIK). Maybe except potentially flawed python-qrcode packaging tracked here:

https://fedorahosted.org/freeipa/ticket/4539

Comment 14 Adam Williamson 2014-09-15 21:50:56 UTC
mkosek: as things stand, Alpha will have 389 1.3.2.x and IPA 4.0.2, which I think is a working combination. So long as the IPA and 389 updates to 1.3.3 and 4.0.3 go out together - which they are, at present - I don't think there should be a problem.

Comment 15 Fedora Update System 2014-09-18 16:12:39 UTC
Package freeipa-4.0.3-1.fc21, 389-ds-base-1.3.3.3-1.fc21, python-qrcode-5.0.1-2.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing freeipa-4.0.3-1.fc21 389-ds-base-1.3.3.3-1.fc21 python-qrcode-5.0.1-2.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-10811/389-ds-base-1.3.3.3-1.fc21,python-qrcode-5.0.1-2.fc21,freeipa-4.0.3-1.fc21
then log in and leave karma (feedback).

Comment 16 Fedora Update System 2014-09-27 09:56:56 UTC
freeipa-4.0.3-1.fc21, 389-ds-base-1.3.3.3-1.fc21, python-qrcode-5.0.1-2.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, 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.