Bug 507419

Summary: s-c-k mustn't require pyxf86config on s390 and s390x
Product: [Fedora] Fedora Reporter: Karsten Hopp <karsten>
Component: system-config-keyboardAssignee: Lubomir Rintel <lkundrak>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: medium    
Version: 11CC: lkundrak
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-07-26 21:53:51 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On:    
Bug Blocks: 467765    

Description Karsten Hopp 2009-06-22 13:39:59 EDT
Description of problem:
libxf86config and pyxf86config are not available on mainframe and shouldn't be required by system-config-keyboard on those archs.

Version-Release number of selected component (if applicable):
system-config-keyboard-1.2.15-8.fc11

How reproducible:
always

Steps to Reproduce:
1. try to build boot images for s390x
2. anaconda requires  system-config-keyboard which in turn requires pyxf86config
3. pyxf86config is not available on this arch as we don't have any X servers there
4. failure

or just try to install anaconda on s390x
  
Actual results:
creation of boot images fails, this is blocking progress with F-11/s390x atm.

Additional info:
A simple "%ifnarch s390 s390x" around the Requirement for pyxf86config doesn't
work as ifnarch is ignored in noarch packages.
Comment 1 Lubomir Rintel 2009-06-23 04:06:19 EDT
Karsten: I think you (or was it someone else?) committed that fix. If this is a request for fix in another branch, or I remember incorrectly, feel free to fix whatever you want to wherever you want to (I'd grant permission in pkgdb, but i think you secondary arch people have cvs write access there anyways?)
Comment 2 Lubomir Rintel 2009-06-23 04:07:56 EDT
Oh now I see you backed out the change.

About the only solution I can see here is to make the package arch-dependent by removing the BuildArch, right?
Comment 3 Karsten Hopp 2009-06-29 05:35:47 EDT
I've talked with the anaconda maintainer to see if we can drop the requirement for s-c-k in anaconda for s390 and s390x. Unfortunately it looks like we need it at least for the keyboard layout selection in vnc installs. All other methods with
an x3270 terminal will use whatever the setup on your local machine is.

So yes, it seems that we can't avoid turning this package into a real arch package. Maybe you find a nasty trick to do arch dependent requirements in noarch packages  ;-)

This is currently blocking any progress on getting bootable images for s390x,
I'd appreciate it if you could take some time in the next few days to think of a solution.
Comment 4 Karsten Hopp 2009-06-29 07:00:46 EDT
In addition to the Requirement fix, we need to check what exactly needs pyxf86config and disable that in the code, too (for s390 and s390x).
Comment 5 David Cantrell 2009-06-30 16:05:39 EDT
In /usr/share/system-config-keyboard/keyboard_backend.py, we have class KeyboardBackend and inside that we have a method called modifyXConfig().  This method imports pyxf86config (import xf86config) for the purposes of modifying the keyboard section of the X configuration file.

For s390x, we don't need this so KeyboardBackend should do something like this on s390x:

class KeyboardBackend:
    def modifyXConfig(self, fullname, layout, model, variant, options):
        pass

This may not be the best way to solve things, but this is the part of system-config-keyboard that uses pyxf86config.
Comment 6 Karsten Hopp 2009-07-20 05:55:46 EDT
I just had a look at s-c-k and the xf86config is already protected by a check
for /etc/X11/XF86Config and /etc/X11/xorg.conf. AFAIK we don't have those files
on s390x, so we don't need to anything in the code, just in the spec file
Comment 7 Lubomir Rintel 2009-07-26 21:53:51 EDT
Done.