[rootfs-resize] Add patch to fix issue when there's not 2 partitions. RHBZ 837111
Peter Robinson
pbrobinson at fedoraproject.org
Wed Oct 24 21:18:16 UTC 2012
commit bd25475447a760740dd8ca551f37757e97f9fddc
Author: Peter Robinson <pbrobinson at gmail.com>
Date: Wed Oct 24 22:17:58 2012 +0100
Add patch to fix issue when there's not 2 partitions. RHBZ 837111
rootfs-resize-cmdline.patch | 39 +++++++++++++++++++++++++++++++++++++++
rootfs-resize.spec | 7 ++++++-
2 files changed, 45 insertions(+), 1 deletions(-)
---
diff --git a/rootfs-resize-cmdline.patch b/rootfs-resize-cmdline.patch
new file mode 100644
index 0000000..1d5bdfc
--- /dev/null
+++ b/rootfs-resize-cmdline.patch
@@ -0,0 +1,39 @@
+--- rootfs-resize.orig 2012-07-30 12:25:40.000000000 -0500
++++ rootfs-resize 2012-10-09 22:06:46.742130529 -0500
+@@ -60,23 +60,7 @@
+ exit 0
+ fi
+
+-declare -a kcmdline
+-kcmdline=( $( < /proc/cmdline ) )
+-for arg in "${kcmdline[@]}" ; do
+- if [[ "X${arg:0:5}" == "Xroot=" ]] ; then
+- PDEV=${arg:5}
+- break
+- fi
+-done
+-
+-case $PDEV in
+- LABEL*|UUID*)
+- rootat="/dev/disk/*/${PDEV:6}"
+- rootdev="`readlink $rootat`"
+- cd "`dirname $rootat`/`dirname $rootdev`"
+- PDEV="`pwd`/`basename $rootdev`"
+- ;;
+-esac
++PDEV=`cat /proc/self/mountinfo | grep '/ / ' | sed -n 's at .* \(/dev/.*\) .*@\1 at p'`
+
+ case $PDEV in
+ /dev/sd*)
+@@ -100,8 +84,8 @@
+
+ if [[ -f /.rootfs-repartition ]]; then
+
+- if [[ "$(fdisk -l "$DEV"|grep -c "^/dev/")" -ne 2 ]] ; then
+- echo "$0: Partition count on $DEV is not 2, exiting."
++ if [[ $PNUM -ne $(fdisk -l "$DEV"|grep -c "^/dev/") ]] ; then
++ echo "$0: $DEV is not the last partition, exiting."
+ exit 0
+ fi
+
+
diff --git a/rootfs-resize.spec b/rootfs-resize.spec
index 3fffad2..311778b 100644
--- a/rootfs-resize.spec
+++ b/rootfs-resize.spec
@@ -1,11 +1,12 @@
Name: rootfs-resize
Version: 0.9
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Root partition re-sizing service for SD cards
License: GPLv2+
URL: http://zenit.senecac.on.ca/wiki/index.php/Fedora_ARM_Secondary_Architecture/rootfs-resize
Source0: http://scotland.proximity.on.ca/fedora-arm/%{name}/%{name}-%{version}.tgz
+Patch0: rootfs-resize-cmdline.patch
# Note: This package is intended for use on ARM development boards,
# but may be useful on other systems that run from SD cards.
@@ -25,6 +26,7 @@ systems running from SD cards.
%prep
%setup -q
+%patch0 -p0 -b .kernel-cmdline
%build
echo "Nothing to do for build"
@@ -66,6 +68,9 @@ if [ $1 -ge 1 ] ; then
fi
%changelog
+* Wed Oct 24 2012 Peter Robinson <pbrobinson at fedoraproject.org> 0.9-2
+- Add patch to fix issue when there's not 2 partitions. RHBZ 837111
+
* Tue Oct 2 2012 Chris Tyler <chris at tylers.info> - 0.9-1
- merged raspberrypi-rootfs-resize and rootfs-resize
- various bugfixes
More information about the scm-commits
mailing list