From a7bace5391ad98a5cc8012ddbdebe44472bcbe14 Mon Sep 17 00:00:00 2001 From: Dan Horák Date: Mar 27 2012 18:54:53 +0000 Subject: add ppc patch by Mark Hamzy --- diff --git a/anaconda-17.14-ppc.patch b/anaconda-17.14-ppc.patch new file mode 100644 index 0000000..39ce41e --- /dev/null +++ b/anaconda-17.14-ppc.patch @@ -0,0 +1,141 @@ +From hamzy@us.ibm.com Mon Mar 26 15:09:36 2012 +Received: from int-mx10.intmail.prod.int.phx2.redhat.com + (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) + by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP + id q2QJ9a79016154 + for ; + Mon, 26 Mar 2012 15:09:36 -0400 +Received: from mx1.redhat.com (ext-mx14.extmail.prod.ext.phx2.redhat.com + [10.5.110.19]) + by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP + id q2QJ9VwR003936 + for ; Mon, 26 Mar 2012 15:09:31 -0400 +Received: from e2.ny.us.ibm.com (e2.ny.us.ibm.com [32.97.182.142]) + by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q2QJ9QNr020742 + for ; Mon, 26 Mar 2012 15:09:26 -0400 +Received: from /spool/local + by e2.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! + Violators will be prosecuted + for from ; + Mon, 26 Mar 2012 15:09:26 -0400 +Received: from d01dlp02.pok.ibm.com (9.56.224.85) + by e2.ny.us.ibm.com (192.168.1.102) with IBM ESMTP SMTP Gateway: + Authorized Use Only! Violators will be prosecuted; + Mon, 26 Mar 2012 15:08:55 -0400 +Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) + by d01dlp02.pok.ibm.com (Postfix) with ESMTP id 08B096E8055 + for ; + Mon, 26 Mar 2012 15:08:54 -0400 (EDT) +Received: from d03av03.boulder.ibm.com (d03av03.boulder.ibm.com [9.17.195.169]) + by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id + q2QJ8ohR206290 + for ; Mon, 26 Mar 2012 15:08:52 -0400 +Received: from d03av03.boulder.ibm.com (loopback [127.0.0.1]) + by d03av03.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP + id q2QJ8Y4v024114 + for ; Mon, 26 Mar 2012 13:08:34 -0600 +Received: from bluebill.rchland.ibm.com (bluebill.rchland.ibm.com + [9.5.250.146]) + by d03av03.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id + q2QJ8YFC024057; Mon, 26 Mar 2012 13:08:34 -0600 +From: Mark Hamzy +To: anaconda-devel-list@redhat.com +Subject: [PATCH] Format PReP partition +Date: Mon, 26 Mar 2012 14:05:30 -0500 +Message-Id: <1332788730-34740-1-git-send-email-hamzy@us.ibm.com> +X-Content-Scanned: Fidelis XPS MAILER +x-cbid: 12032619-5112-0000-0000-0000068420B8 +X-RedHat-Spam-Score: -5.011 (RCVD_IN_DNSWL_HI,SPF_PASS,T_RP_MATCHES_RCVD) +X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 +X-Scanned-By: MIMEDefang 2.68 on 10.5.110.19 +X-loop: anaconda-devel-list@redhat.com +Cc: Mark Hamzy +X-BeenThere: anaconda-devel-list@redhat.com +X-Mailman-Version: 2.1.12 +Precedence: junk +Reply-To: Discussion of Development and Customization of the Red Hat Linux + Installer +List-Id: Discussion of Development and Customization of the Red Hat Linux + Installer +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Mon, 26 Mar 2012 19:09:36 -0000 + +This fixes two bugs. The first is that the PReP partition is not created +during a text mode install. The second is that the PReP partition needs +to be zeroed out before grub is run. Grub verifies that no data exists +on the partition before installation. + +--- + pyanaconda/storage/formats/prepboot.py | 28 ++++++++++++++++++++++++++++ + pyanaconda/storage/partitioning.py | 3 ++- + 2 files changed, 30 insertions(+), 1 deletions(-) + +diff --git a/pyanaconda/storage/formats/prepboot.py b/pyanaconda/storage/formats/prepboot.py +index b7d1c60..b8d8490 100644 +--- a/pyanaconda/storage/formats/prepboot.py ++++ b/pyanaconda/storage/formats/prepboot.py +@@ -23,6 +23,9 @@ + from ..errors import * + from . import DeviceFormat, register_device_format + from parted import PARTITION_PREP ++import os ++import logging ++log = logging.getLogger("storage") + + class PPCPRePBoot(DeviceFormat): + """ Generic device format. """ +@@ -46,6 +49,31 @@ class PPCPRePBoot(DeviceFormat): + """ + DeviceFormat.__init__(self, *args, **kwargs) + ++ def create(self, *args, **kwargs): ++ if self.exists: ++ raise FSError("filesystem already exists") ++ ++ DeviceFormat.create(self, *args, **kwargs) ++ ++ try: ++ fd = os.open(self.device, os.O_RDWR) ++ length = os.lseek(fd, 0, os.SEEK_END) ++ os.lseek(fd, 0, os.SEEK_SET) ++ buf = '\0' * 1024 * 1024 ++ while length > 0: ++ if length >= len(buf): ++ os.write(fd, buf) ++ length -= len(buf) ++ else: ++ buf = '0' * length ++ os.write(fd, buf) ++ length = 0 ++ os.close(fd) ++ except Exception as e: ++ log.error("error zeroing out %s: %s" % (self.device, e)) ++ if fd: ++ os.close(fd) ++ + @property + def status(self): + return False +diff --git a/pyanaconda/storage/partitioning.py b/pyanaconda/storage/partitioning.py +index 49faa78..c380b0c 100644 +--- a/pyanaconda/storage/partitioning.py ++++ b/pyanaconda/storage/partitioning.py +@@ -120,7 +120,8 @@ def _schedulePartitions(storage, disks): + + if request.fstype is None: + request.fstype = storage.defaultFSType +- elif request.fstype == "prepboot" and storage.bootLoaderDevice: ++ elif request.fstype == "prepboot" and storage.bootLoaderDevice and \ ++ storage.bootLoaderDevice != storage.bootDevice: + # there should never be a need for more than one of these + # partitions, so skip them. + log.info("skipping unneeded stage1 prepboot request") +-- +1.7.7.6 + diff --git a/anaconda.spec b/anaconda.spec index 6119e0b..68c2ae0 100644 --- a/anaconda.spec +++ b/anaconda.spec @@ -3,7 +3,7 @@ Summary: Graphical system installer Name: anaconda Version: 17.14 -Release: 1%{?dist} +Release: 1%{?dist}.1 License: GPLv2+ Group: Applications/System URL: http://fedoraproject.org/wiki/Anaconda @@ -14,6 +14,8 @@ URL: http://fedoraproject.org/wiki/Anaconda # ./autogen.sh # make dist Source0: %{name}-%{version}.tar.bz2 +# commit 22c0e94db +Patch0: %{name}-17.14-ppc.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -187,6 +189,7 @@ runtime on NFS/HTTP/FTP servers or local disks. %prep %setup -q +%patch0 -p1 -b .ppc %build %configure --disable-static @@ -255,6 +258,9 @@ update-desktop-database &> /dev/null || : /usr/lib/dracut/modules.d/80%{name}/* %changelog +* Mon Mar 26 2012 Dan Horák - 17.14-1.1 +- add ppc patch by Mark Hamzy + * Thu Mar 22 2012 Brian C. Lane - 17.14-1 - Revert "dracut: use /run/install/source for repodir" (bcl) - Disable creation of btrfs filesystems aside from kickstart. (#787341)