Building Rawhide(f18) for PPC

From FedoraProject

Revision as of 20:05, 13 July 2012 by Hamzy (Talk | contribs)

Jump to: navigation, search

I have run into the following issues:


(informational) you need to be running Fedora 17 to run a rawhide mock shell

Your host OS needs to have an rpm version that supports usermove. Also, your host OS is used when files are mounted.

[dwa] Fetch the version of rpm from the builder repos, or update to RHEL 6.3, rpm 4.8.0-27.el6 supports usrmove.

no source repo for rawhide

This is used when downloading source rpms to rebuild when fixing problems. A defect will be written.

cat << __EOF__ >> /etc/yum.conf


(informational) yum not installed during mock --init

[dwa] Edit your mock config files, look at the config_opts['chroot_setup_cmd'] line. or use 'mock -r foo --install <package name>' instead of yum within the chroot.

loop devices not created during mock --init

You have to run the following inside the shell:


apply wwoods patch: hack to fix ppc ISO volume labels so yaboot doesn't flip out

(cd  /usr/lib/python2.7/site-packages/; cat << __EOF__ | patch -p2
commit 04156443a55e1841e86a984c58b5a19531180621
Author: Will Woods <>
Date:   Wed Nov 16 16:17:58 2011 -0500

    hack to fix ppc ISO volume labels so yaboot doesn't flip out

    blerg. yaboot freaks out if there's any slashes in its config, so we
    can't boot anything with non-ascii characters in the volume name. So we
    need to remove all non-ascii chars, and do it the same way lorax does

    This is why lorax and pungi shouldn't both be building bootable images.

diff --git a/src/pypungi/ b/src/pypungi/
index d558307..638e534 100644
--- a/src/pypungi/
+++ b/src/pypungi/
@@ -1120,8 +1120,13 @@ class Pungi(pypungi.PungiBase):
         # NOTE: if this doesn't match what's in the bootloader config, the
         # image won't be bootable!
-        extraargs.append('%s %s %s' % (self.config.get('pungi', 'name'),
-            self.config.get('pungi', 'version'), self.config.get('pungi', 'arch')))
+        cdlabel = '%s %s %s' % (self.config.get('pungi', 'name'),
+                                self.config.get('pungi', 'version'),
+                                self.config.get('pungi', 'arch'))
+        if self.config.get('pungi', 'arch').startswith('ppc'):
+            # special case for PPC, because yaboot is terrible
+            cdlabel = ''.join(ch if ch.isalnum() else '_' for ch in cdlabel)
+        extraargs.append(cdlabel)

         extraargs.extend(['-o', isofile])


yaboot is not in repo

You see the following during the build:

template command error in ppc.tmpl:
  runcmd /srv/pungi/test/work/Fedora/ppc64/installroot/usr/lib/yaboot/addnote /srv/pungi/test/rawhide/Fedora/ppc64/os/ppc/chrp/yaboot
  OSError: [Errno 2] No such file or directory

The solution is to install yaboot. However, yaboot is not in the rawhide repo!

yum install

(fixed) is needed by xorg-x11-drv-nouveau- 1:0.0.16-34.20110720gitb806e3f.fc17.ppc64

I worked on . Karsten fixed it in the build simultaneously.

docbook-style-xsl-1.77.1-1.fc18 was tagged instead of docbook-style-xsl-1.77.2-1.fc18

At one time, ppc.koji looked like this:

NVR                                     Built by        Finished                State
docbook-style-xsl-1.77.1-1.fc18         karsten         2012-06-22 09:34:30     complete
docbook-style-xsl-1.77.1-2.fc18         karsten         2012-06-07 14:03:13     complete

It would be nice if we could figure out how this happened and prevent it in the future...

systemd.spec needs to depend on docbook-style-xsl >= 1.77.1-2

add the following to the spec file: BuildRequires: docbook-style-xsl >= 1.77.1-2

(fixed) apply haraldh dracut patch

dracut's initramfs prefix is not needed anymore

From 77c9a1c05b6c25733f3d7b142f1f6b01bac879d7 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <>
Date: Mon, 4 Jun 2012 16:16:07 +0200
Subject: [PATCH] pylorax/ do not use dracut prefix anymore

dracut's initramfs prefix is not needed anymore.
 src/pylorax/ |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/pylorax/ b/src/pylorax/
index 0ec651f..e498294 100644
--- a/src/pylorax/
+++ b/src/pylorax/
@@ -193,8 +193,7 @@ class TreeBuilder(object):
         '''Rebuild all the initrds in the tree. If backup is specified, each
         initrd will be renamed with backup as a suffix before rebuilding.
         If backup is empty, the existing initrd files will be overwritten.'''
-        dracut = ["dracut", "--prefix=/run/initramfs",
-                  "--nomdadmconf", "--nolvmconf"] + add_args
+        dracut = ["dracut", "--nomdadmconf", "--nolvmconf"] + add_args
         if not backup:

fixed by;a=commit;h=8e71bb045ade2b04ce845cc357326ab21a1d8af1

(optional/helpful) apply pungi debug output

The following would be helpful to know what the full dracut commandline that will be run in case you need to rerun it.

diff -Nur lorax.orig/usr/lib/python2.7/site-packages/pylorax/
--- lorax.orig/usr/lib/python2.7/site-packages/pylorax/      2012-07-12 13:58:51.131356002 -0500
+++       2012-07-12 13:58:49.531356025 -0500
@@ -277,8 +277,8 @@
                                   domacboot=domacboot, templatedir=templatedir)
"rebuilding initramfs images")
-        dracut_args=["--xz", "--add", "anaconda pollcdrom",
-                     "--install", "/.buildstamp"]
+        dracut_args=["--xz", "--add", "anaconda pollcdrom", "--omit", "plymouth",
+                     "--install", "/.buildstamp strace"]
"populating output tree and building boot images")

(fixed) apply hamzy dracut readonly patch

If no prefix is specified on the command line, then the following is seen: /sbin/dracut: line 548: unset: prefix: cannot unset: readonly variable

hamzy submitted 0051-fix-readonly-prefix.patch to

(needed?) add python-udev to builder-rawhide-koji.ks

add "installpkg python-pyudev" to runtime-install.tmpl

You see the following during boot up:

Traceback (most recent call last):
  File "/usr/sbin/anaconda", line 646, in <module>
    from pyanaconda import kickstart
  File "/usr/lib64/python2.7/site-packages/pyanaconda/", line 21, in <module>
    from storage.deviceaction import *
  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/", line 41, in <module>
    from devices import *
  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/", line 116, in <module>
    from udev import *
  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/", line 28, in <module>
    from pyanaconda.baseudev import *
  File "/usr/lib64/python2.7/site-packages/pyanaconda/", line 27, in <module>
    import pyudev
  File "/usr/lib64/python2.7/site-packages/pyanaconda/", line 37, in <module>
    raise ImportError, "No library named %s" % libudev
ImportError: No library named None
<mock-chroot>[root@bluebill ~]# vi /usr/share/lorax/runtime-install.tmpl
installpkg python-pyudev

don't delete ldconfig from glibc in runtime-cleanup.tmpl

It seems that the python code to find the udev library uses

$ ldconfig -p

So the fix would be to not delete it from the runtime image:

<mock-chroot>[root@bluebill ~]# vi /usr/share/lorax/runtime-cleanup.tmpl
removefrom glibc /${libdir}/libthread* /${libdir}/rtkaio* /sbin/*
removefrom glibc /${libdir}/libthread* /${libdir}/rtkaio*

systemd.spec Provides libudev

Now that you've included python-pyudev into the install image, you will see the following:

yum.Errors.YumRPMCheckError: [u'ERROR with transaction check vs depsolve:', 'libudev is needed by python-pyudev-0.15-1.fc18.noarch', u'Please report this error at']

The fix is to fix the systemd rpm to note that systemd-libs-186-1.fc18.ppc64.rpm needs to claim that it provides libudev.

diff -Nur SPECS.orig/systemd.spec SPECS/systemd.spec
--- SPECS.orig/systemd.spec     2012-07-12 14:22:36.791356007 -0500
+++ SPECS/systemd.spec  2012-07-12 14:24:00.741356003 -0500
@@ -93,6 +93,7 @@
 Group:          System Environment/Base
 Summary:        systemd libraries
 License:        LGPLv2+ and MIT
+Provides:       libudev = %{version}
 Obsoletes:      libudev < 183
 Obsoletes:      systemd < 185-4
 Conflicts:      systemd < 185-4

[dwa] Not a bug, udev is being folded into systemd in f18

[hamzy] It looks like a bug to me.

pyanaconda/ uses .0 version of libudev library

Anaconda searches for However, libudev is now

hamzy has submitted the patch to anaconda-devel-list at

don't delete localdef from glibc-common in runtime-cleanup.tmpl

<mock-chroot>[root@bluebill ~]# vi /usr/share/lorax/runtime-cleanup.tmpl
removefrom glibc-common /usr/bin/tzselect /usr/bin/localedef
removefrom glibc-common /usr/bin/tzselect

Failed to start Network Manager

I see the following during startup:

[FAILED] Failed to start Network Manager.
         See 'systemctl status NetworkManager.service' for details.

When trying to look for logs, I could not find any. This seems like another problem to me.

Also, I noticed the following:

[anaconda root@ibm_dpi-13173d /]# systemctl status NetworkManager.service
NetworkManager.service - Network Manager
          Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled)
          Active: failed (Result: signal) since Wed, 11 Jul 2012 02:48:24 +0000; 2min 32s ago
         Process: 1358 ExecStart=/usr/sbin/NetworkManager --no-daemon (code=killed, signal=ABRT)
          CGroup: name=systemd:/system/NetworkManager.service

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.

The following seems to fix it:

switch_root:/# sed -i -e 's/StandardError=null/StandardError=kmesg/' /sysroot/usr/lib/systemd/system/NetworkManager.service

ifconfig does not exist on install root

$ ip addr show

is equivalent. Also, other network tools like ping and nslookup are missing.

Dependency failed for Shell on tty2

This holds booting while waiting for it to timeout:

[ TIME ] Timed out waiting for device dev-tty2.device.
[DEPEND] Dependency failed for Shell on tty2. is needed by sane-backends-libs-1.0.22-10.fc18.ppc64

  YumRPMCheckError: [u'ERROR with transaction check vs depsolve:', ' is needed by sane-backends-libs-1.0.22-10.fc18.ppc64', ' is needed by sane-backends-libs-1.0.22-10.fc18.ppc64', ' is needed by sane-backends-1.0.22-10.fc18.ppc64', ' is needed by sane-backends-1.0.22-10.fc18.ppc64', ' is needed by sane-backends-drivers-cameras-1.0.22-10.fc18.ppc64', ' is needed by sane-backends-drivers-cameras-1.0.22-10.fc18.ppc64', u'Please report this error at']

sane-backends needs to be rebuilt because the SONAME of libgphoto2 has changed.