[koji/el6] add patch to check for /dev/loopX before making them

Dennis Gilmore ausil at fedoraproject.org
Fri Aug 31 21:41:05 UTC 2012


commit 30cd24a44e5616a1507c38f0d7cba4373f358bfe
Author: Dennis Gilmore <dennis at ausil.us>
Date:   Fri Aug 31 16:40:49 2012 -0500

    add patch to check for /dev/loopX before making them

 ...-we-dont-already-have-a-dev-loopX-in-the-.patch |   26 ++++++++++++++++++++
 koji.spec                                          |    7 ++++-
 2 files changed, 32 insertions(+), 1 deletions(-)
---
diff --git a/0001-ensure-that-we-dont-already-have-a-dev-loopX-in-the-.patch b/0001-ensure-that-we-dont-already-have-a-dev-loopX-in-the-.patch
new file mode 100644
index 0000000..42b5786
--- /dev/null
+++ b/0001-ensure-that-we-dont-already-have-a-dev-loopX-in-the-.patch
@@ -0,0 +1,26 @@
+From 73aa43765175b4577b01682bc756f273ea19d82f Mon Sep 17 00:00:00 2001
+From: Dennis Gilmore <dennis at ausil.us>
+Date: Fri, 31 Aug 2012 16:38:20 -0500
+Subject: [PATCH] ensure that we dont already have a /dev/loopX in the chroot
+ before making one
+
+---
+ builder/kojid | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/builder/kojid b/builder/kojid
+index 58720b4..24fbecc 100755
+--- a/builder/kojid
++++ b/builder/kojid
+@@ -1771,7 +1771,7 @@ class ImageTask(BaseTaskHandler):
+         broot.init()
+ 
+         # Create the loopback devices we need
+-        cmd = 'for i in $(seq 0 7); do mknod /dev/loop$i b 7 $i; done'
++        cmd = 'for i in $(seq 0 7); do [ ! -e /dev/loop$i ] && (mknod /dev/loop$i b 7 $i); done'
+         rv = broot.mock(['--chroot', cmd])
+         if rv:
+             broot.expire()
+-- 
+1.7.11.4
+
diff --git a/koji.spec b/koji.spec
index 551b0b7..acb2b5c 100644
--- a/koji.spec
+++ b/koji.spec
@@ -2,7 +2,7 @@
 
 Name: koji
 Version: 1.7.0
-Release: 4%{?dist}
+Release: 5%{?dist}
 License: LGPLv2 and GPLv2+
 # koji.ssl libs (from plague) are GPLv2+
 Summary: Build system tools
@@ -13,6 +13,7 @@ Source0: https://fedorahosted.org/released/koji/koji-%{version}.tar.bz2
 Source1: README.epel
 Patch1: 0022-only-try-to-make-dev-urandom-if-it-doesnt-already-ex.patch
 Patch2: 0003-in-taginfo-command-avoid-passing-recently-added-even.patch
+Patch3: 0001-ensure-that-we-dont-already-have-a-dev-loopX-in-the-.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch: noarch
@@ -131,6 +132,7 @@ cp %{SOURCE1} README.epel
 %patch0 -p1 -b .orig
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %build
 
@@ -235,6 +237,9 @@ if [ $1 = 0 ]; then
 fi
 
 %changelog
+* Sat Sep 01 2012 Dennis Gilmore <dennis at ausil.us> - 1.7.0-5
+- add patch to check for /dev/loopX before making them
+
 * Fri Aug 31 2012 Dennis Gilmore <dennis at ausil.us> - 1.7.0-4
 - add patch to only make /dev/urandom if it doesnt exist
 - add upstream patch for taginfo fixes with older servers


More information about the scm-commits mailing list