Changes to 'refs/tags/livecd-tools-15.8'
by Brian C. Lane
Tag 'livecd-tools-15.8' created by Brian C. Lane <bcl(a)redhat.com> at 2011-08-30 18:19 +0000
Tag as livecd-tools-15.8
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQEVAwUATl0pohF+jBaO/jp/AQLRYAf+MQS5B1nOShcQDBMJpNb4XM8gul55GfBX
84/i2j747IDNaV3FlgK650GnsZ5W7UXk6242k08ogmPre0H3nWAXTyWrP2Om7IOb
vWPaa98S4gALLY6EvVGnT5OVcnm2wwSXfVK3B8QzMHLK6zUCVp2AxS6+W/FPC1dA
tOunPcMgR25hoawbbS0yEf3w4LcPaG1mbUsRGvI4RM22SRulomKPg7ABjiZ5cbsD
ExQlWQMj6Yw2YIMF+AAr4r2PCfVXo9bt6ZAKOuYA2sWZuO6pJ9tiFPft53bbMEcN
cnlh45d9wRE9mAAP+rClj9Hc5RwCGmXv3rOP+LkHo5DkvIBHSrJ8FA==
=JOMu
-----END PGP SIGNATURE-----
Changes since livecd-tools-15.7:
Brian C. Lane (5):
Turn on the legacy_boot flag for EFI (#680563)
Use rsync to copy if available
Use copyFile on the iso
Ensure previous filesystems are wiped when formatting (#712553)
Version 15.8
Martin Langhoff (1):
Add initial support for ARM architectures
---
Makefile | 2 +-
imgcreate/live.py | 3 +++
tools/livecd-iso-to-disk.sh | 11 ++++++++++-
3 files changed, 14 insertions(+), 2 deletions(-)
---
12 years, 6 months
Branch 'f15-branch' - 6 commits - imgcreate/live.py Makefile tools/livecd-iso-to-disk.sh
by Brian C. Lane
Makefile | 2 +-
imgcreate/live.py | 3 +++
tools/livecd-iso-to-disk.sh | 11 ++++++++++-
3 files changed, 14 insertions(+), 2 deletions(-)
New commits:
commit 1c06844e36d239fbc0a0ebf25c7ecf04d7d79023
Author: Brian C. Lane <bcl(a)redhat.com>
Date: Tue Aug 30 11:19:08 2011 -0700
Version 15.8
diff --git a/Makefile b/Makefile
index 9832301..83d9127 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
-VERSION = 15.7
+VERSION = 15.8
INSTALL = /usr/bin/install -c
INSTALL_PROGRAM = ${INSTALL}
commit e740901b9e42459d036de762a73845395d610e05
Author: Brian C. Lane <bcl(a)redhat.com>
Date: Mon Aug 8 15:18:06 2011 -0700
Ensure previous filesystems are wiped when formatting (#712553)
Add wipefs step before partitioning the device. This will remove any
previous filesystem signatures as well as iso9660's signature which
has been known to cause problems.
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index 0966e3a..6b71a09 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -413,6 +413,7 @@ createGPTLayout() {
echo "Press Enter to continue or ctrl-c to abort"
read
umount ${device}* &> /dev/null
+ wipefs -a ${device}
/sbin/parted --script $device mklabel gpt
partinfo=$(LC_ALL=C /sbin/parted --script -m $device "unit b print" |grep ^$device:)
size=$(echo $partinfo |cut -d : -f 2 |sed -e 's/B$//')
@@ -436,6 +437,7 @@ createMSDOSLayout() {
echo "Press Enter to continue or ctrl-c to abort"
read
umount ${device}* &> /dev/null
+ wipefs -a ${device}
/sbin/parted --script $device mklabel msdos
partinfo=$(LC_ALL=C /sbin/parted --script -m $device "unit b print" |grep ^$device:)
size=$(echo $partinfo |cut -d : -f 2 |sed -e 's/B$//')
@@ -463,6 +465,7 @@ createEXTFSLayout() {
echo "Press Enter to continue or ctrl-c to abort"
read
umount ${device}* &> /dev/null
+ wipefs -a ${device}
/sbin/parted --script $device mklabel msdos
partinfo=$(LC_ALL=C /sbin/parted --script -m $device "unit b print" |grep ^$device:)
size=$(echo $partinfo |cut -d : -f 2 |sed -e 's/B$//')
commit 4af6fd368c548c9ae3ee9197c4fe337d1ca5bf58
Author: Brian C. Lane <bcl(a)redhat.com>
Date: Tue Aug 23 17:17:21 2011 -0700
Use copyFile on the iso
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index ddd1863..0966e3a 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -1005,7 +1005,7 @@ if [ \( "$srctype" = "installer" -o "$srctype" = "netinst" \) ]; then
copyFile $SRCMNT/images/install.img $TGTMNT/images/install.img || exitclean
fi
if [ "$srctype" = "installer" -a -z "$skipcopy" ]; then
- cp $SRC $TGTMNT/
+ copyFile $SRC $TGTMNT/
fi
sync
fi
commit 7d028b28877f07b555ddbd3fce4b300659a4c594
Author: Brian C. Lane <bcl(a)redhat.com>
Date: Tue Aug 23 15:01:59 2011 -0700
Use rsync to copy if available
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index 8adade6..ddd1863 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -622,6 +622,10 @@ cp_p() {
}
copyFile() {
+ if [ -x /usr/bin/rsync ]; then
+ rsync -P "$1" "$2"
+ return
+ fi
if [ -x /usr/bin/gvfs-copy ]; then
gvfs-copy -p "$1" "$2"
return
commit 7c99195abd98c69fd53a5f21cc35880baa64175d
Author: Brian C. Lane <bcl(a)redhat.com>
Date: Mon Aug 8 16:21:09 2011 -0700
Turn on the legacy_boot flag for EFI (#680563)
This allows gptmbr to be able to boot on both EFI and BIOS.
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index b7cee72..8adade6 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -334,6 +334,8 @@ resetMBR() {
echo "Could not find gptmbr.bin (syslinux)"
exitclean
fi
+ # Make it bootable on EFI and BIOS
+ parted -s $device set $partnum legacy_boot on
else
if [ -f /usr/lib/syslinux/mbr.bin ]; then
cat /usr/lib/syslinux/mbr.bin > $device
commit d1373cc1a7d14de319b8e7097539c25f1d2a921c
Author: Martin Langhoff <martin.langhoff(a)gmail.com>
Date: Tue Jul 19 23:59:59 2011 -0400
Add initial support for ARM architectures
This allows us to get basic ARM builds going. It doesn't take care of
booting facilities, but those vary widely in the ARM world.
For the time being, setup for booting should be done in %post .
diff --git a/imgcreate/live.py b/imgcreate/live.py
index 10d5cec..e640c67 100755
--- a/imgcreate/live.py
+++ b/imgcreate/live.py
@@ -896,5 +896,8 @@ elif arch in ("ppc",):
LiveImageCreator = ppcLiveImageCreator
elif arch in ("ppc64",):
LiveImageCreator = ppc64LiveImageCreator
+elif arch.startswith('arm'):
+ LiveImageCreator = LiveImageCreatorBase
+
else:
raise CreatorError("Architecture not supported!")
12 years, 6 months
Changes to 'refs/tags/livecd-tools-14.3'
by Brian C. Lane
Tag 'livecd-tools-14.3' created by Brian C. Lane <bcl(a)redhat.com> at 2011-08-30 17:53 +0000
Tag as livecd-tools-14.3
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQEVAwUATl0jrxF+jBaO/jp/AQJM7wf/UW3039Lxs2F/jRQrFAa9HHF8rATq0yqN
0Tqg2OGpe+CBkF/HMg+BOMbenXXUc49+LnOKeml90nWiQDoCirLcZSI3jUG+9e7j
F8FFH8OoLvAirjDOb+7pJvUWTLLFfl0+5sA5hnGjG+8oWnoZdnujWCEVXK6FJTTA
7Zq/6yMwJMCn8D2h2s0MadCaPixWRnyFIU19rIgG8+yMZ9Fluo5tmLaSEgj9CTL9
4wPSJ117ZFN6IYGQHI5anUNJWu2N90+g6Rfeqo69mJg3d5UfpO2Nhn4vynxJKY96
wN7zUxFfRG2adRTOhZIxpmN5hda/MEIAYA8sZPoB3pHcTgbLgeJknQ==
=GL8d
-----END PGP SIGNATURE-----
Changes since livecd-tools-14.2:
Brian C. Lane (5):
gptmbr can be written directly to the mbr
Use rsync to copy if available
Use copyFile on the iso
Ensure previous filesystems are wiped when formatting (#712553)
Version 14.3
Martin Langhoff (1):
Add initial support for ARM architectures
---
Makefile | 2 +-
imgcreate/live.py | 3 +++
tools/livecd-iso-to-disk.sh | 15 ++++++++++-----
3 files changed, 14 insertions(+), 6 deletions(-)
---
12 years, 6 months
Branch 'f14-branch' - 5 commits - imgcreate/live.py Makefile tools/livecd-iso-to-disk.sh
by Brian C. Lane
Makefile | 2 +-
imgcreate/live.py | 3 +++
tools/livecd-iso-to-disk.sh | 9 ++++++++-
3 files changed, 12 insertions(+), 2 deletions(-)
New commits:
commit b4f016f4c7d6b687806ce014cd10fcdfc255b7e7
Author: Brian C. Lane <bcl(a)redhat.com>
Date: Tue Aug 30 10:53:34 2011 -0700
Version 14.3
diff --git a/Makefile b/Makefile
index de4dd5e..e6f67eb 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
-VERSION = 14.2
+VERSION = 14.3
INSTALL = /usr/bin/install -c
INSTALL_PROGRAM = ${INSTALL}
commit 038cb52daadd2f69f1a00aaa7e0f7e1bce0a4a74
Author: Brian C. Lane <bcl(a)redhat.com>
Date: Mon Aug 8 15:18:06 2011 -0700
Ensure previous filesystems are wiped when formatting (#712553)
Add wipefs step before partitioning the device. This will remove any
previous filesystem signatures as well as iso9660's signature which
has been known to cause problems.
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index 111dec3..16302c1 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -171,6 +171,7 @@ createGPTLayout() {
echo "Press Enter to continue or ctrl-c to abort"
read
umount ${device}* &> /dev/null
+ wipefs -a ${device}
/sbin/parted --script $device mklabel gpt
partinfo=$(LC_ALL=C /sbin/parted --script -m $device "unit b print" |grep ^$device:)
size=$(echo $partinfo |cut -d : -f 2 |sed -e 's/B$//')
@@ -194,6 +195,7 @@ createMSDOSLayout() {
echo "Press Enter to continue or ctrl-c to abort"
read
umount ${device}* &> /dev/null
+ wipefs -a ${device}
/sbin/parted --script $device mklabel msdos
partinfo=$(LC_ALL=C /sbin/parted --script -m $device "unit b print" |grep ^$device:)
size=$(echo $partinfo |cut -d : -f 2 |sed -e 's/B$//')
@@ -221,6 +223,7 @@ createEXTFSLayout() {
echo "Press Enter to continue or ctrl-c to abort"
read
umount ${device}* &> /dev/null
+ wipefs -a ${device}
/sbin/parted --script $device mklabel msdos
partinfo=$(LC_ALL=C /sbin/parted --script -m $device "unit b print" |grep ^$device:)
size=$(echo $partinfo |cut -d : -f 2 |sed -e 's/B$//')
commit 45c9b1ae299688eaf00944258f4e38e5fc2a87ed
Author: Brian C. Lane <bcl(a)redhat.com>
Date: Tue Aug 23 17:17:21 2011 -0700
Use copyFile on the iso
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index 37e73ba..111dec3 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -729,7 +729,7 @@ if [ \( "$isotype" = "installer" -o "$isotype" = "netinst" \) ]; then
copyFile $CDMNT/images/install.img $USBMNT/images/install.img || exitclean
fi
if [ "$isotype" = "installer" -a -z "$skipcopy" ]; then
- cp $ISO $USBMNT/
+ copyFile $ISO $USBMNT/
fi
sync
fi
commit 8605046b9a0590e3a111c52d404217b158c601ae
Author: Brian C. Lane <bcl(a)redhat.com>
Date: Tue Aug 23 15:01:59 2011 -0700
Use rsync to copy if available
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index fe49fd4..37e73ba 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -379,6 +379,10 @@ cp_p() {
}
copyFile() {
+ if [ -x /usr/bin/rsync ]; then
+ rsync -P "$1" "$2"
+ return
+ fi
if [ -x /usr/bin/gvfs-copy ]; then
gvfs-copy -p "$1" "$2"
return
commit ee93fcaee008a22d5a09ca50952e8a982da77bdd
Author: Martin Langhoff <martin.langhoff(a)gmail.com>
Date: Tue Jul 19 23:59:59 2011 -0400
Add initial support for ARM architectures
This allows us to get basic ARM builds going. It doesn't take care of
booting facilities, but those vary widely in the ARM world.
For the time being, setup for booting should be done in %post .
diff --git a/imgcreate/live.py b/imgcreate/live.py
index 0905dcc..dbc5f9a 100644
--- a/imgcreate/live.py
+++ b/imgcreate/live.py
@@ -885,5 +885,8 @@ elif arch in ("ppc",):
LiveImageCreator = ppcLiveImageCreator
elif arch in ("ppc64",):
LiveImageCreator = ppc64LiveImageCreator
+elif arch.startswith('arm'):
+ LiveImageCreator = LiveImageCreatorBase
+
else:
raise CreatorError("Architecture not supported!")
12 years, 6 months
Trying to boot F15 live CD on Dell E6520
by wbsec.flive@new.rr.com
I have a Dell Latitude E6520 and tried to boot to a live CD of Fedora 15. The boot up was going fine until midway through and it dropped to a debugging shell with this message.
ehci_hcd 0000:00:1a.0: dma_pool_free ehci_qh, f62b5060/fffff060 (bad dma)
I also tried Fedora 14 live CD and Ubuntu 10.10 with similar results.
12 years, 6 months
Branch 'f16-branch' - 12 commits - imgcreate/creator.py imgcreate/kickstart.py imgcreate/live.py Makefile tools/livecd-iso-to-disk.sh tools/livecd-iso-to-pxeboot.sh
by Brian C. Lane
Makefile | 2 -
imgcreate/creator.py | 70 ++++++++++++-----------------------------
imgcreate/kickstart.py | 3 +
imgcreate/live.py | 3 +
tools/livecd-iso-to-disk.sh | 44 ++++++++++++++++---------
tools/livecd-iso-to-pxeboot.sh | 20 ++++++++---
6 files changed, 70 insertions(+), 72 deletions(-)
New commits:
commit b218b8a5187500d6bcce64d81c8b96aad56e16c2
Author: Brian C. Lane <bcl(a)redhat.com>
Date: Fri Aug 26 13:30:04 2011 -0700
Version 16.4
diff --git a/Makefile b/Makefile
index 98d73f2..7cc3d23 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
-VERSION = 16.3
+VERSION = 16.4
INSTALL = /usr/bin/install -c
INSTALL_PROGRAM = ${INSTALL}
commit 04b59479cb9f3e1e4769168694762bb3335a84ee
Author: Brian C. Lane <bcl(a)redhat.com>
Date: Tue Aug 23 17:17:21 2011 -0700
Use copyFile on the iso
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index d6adeeb..43c825e 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -1055,7 +1055,7 @@ if [ \( "$srctype" = "installer" -o "$srctype" = "netinst" \) ]; then
done
fi
if [ "$srctype" = "installer" -a -z "$skipcopy" ]; then
- cp "$SRC" $TGTMNT/
+ copyFile "$SRC" $TGTMNT/
fi
sync
fi
commit b4edb0e6b1f64d3c1448a852d624f636b7241558
Author: Brian C. Lane <bcl(a)redhat.com>
Date: Tue Aug 23 15:01:59 2011 -0700
Use rsync to copy if available
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index b35255c..d6adeeb 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -640,6 +640,10 @@ cp_p() {
}
copyFile() {
+ if [ -x /usr/bin/rsync ]; then
+ rsync -P "$1" "$2"
+ return
+ fi
if [ -x /usr/bin/gvfs-copy ]; then
gvfs-copy -p "$1" "$2"
return
commit deb258aa8b74fc75112fd40d64ac7e7e4ed95f08
Author: Bruno Wolff III <bruno(a)wolff.to>
Date: Thu Aug 11 15:55:59 2011 -0700
Quote $SRC so iso's with spaces will work (#694915)
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index 209f858..b35255c 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -856,9 +856,9 @@ fi
# FIXME: would be better if we had better mountpoints
SRCMNT=$(mktemp -d /media/srctmp.XXXXXX)
-if [ -b $SRC ]; then
+if [ -b "$SRC" ]; then
mount -o ro "$SRC" $SRCMNT || exitclean
-elif [ -f $SRC ]; then
+elif [ -f "$SRC" ]; then
mount -o loop,ro "$SRC" $SRCMNT || exitclean
else
echo "$SRC is not a file or block device."
@@ -969,7 +969,7 @@ fi
# Verify available space for DVD installer
if [ "$srctype" = "installer" ]; then
if [ -z "$skipcopy" ]; then
- srcsize=$(du -s -B 1M $SRC | awk {'print $1;'})
+ srcsize=$(du -s -B 1M "$SRC" | awk {'print $1;'})
else
srcsize=0
fi
@@ -984,8 +984,8 @@ if [ "$srctype" = "installer" ]; then
if [ -e $TGTMNT/$imgpath ]; then
tbd=$(du -s -B 1M $TGTMNT/$imgpath | awk {'print $1;'})
fi
- if [ -e $TGTMNT/$(basename $SRC) ]; then
- tbd=$(($tbd + $(du -s -B 1M $TGTMNT/$(basename $SRC) | awk {'print $1;'})))
+ if [ -e $TGTMNT/$(basename "$SRC") ]; then
+ tbd=$(($tbd + $(du -s -B 1M $TGTMNT/$(basename "$SRC") | awk {'print $1;'})))
fi
echo "Size of DVD image: $srcsize"
echo "Size of $imgpath: $installimgsize"
@@ -1051,7 +1051,7 @@ if [ \( "$srctype" = "installer" -o "$srctype" = "netinst" \) ]; then
done
fi
if [ "$srctype" = "installer" -a -z "$skipcopy" ]; then
- cp $SRC $TGTMNT/
+ cp "$SRC" $TGTMNT/
fi
sync
fi
@@ -1094,20 +1094,20 @@ if [ -n "$efi" ]; then
exitclean
else
# dump the eltorito image with dumpet, output is $SRC.1
- dumpet -i $SRC -d
+ dumpet -i "$SRC" -d
EFIMNT=$(mktemp -d /media/srctmp.XXXXXX)
- mount -o loop $SRC.1 $EFIMNT
+ mount -o loop "$SRC".1 $EFIMNT
if [ -f $EFIMNT$EFI_BOOT/+(BOOT|boot)?*.efi ]; then
cp $EFIMNT$EFI_BOOT/+(BOOT|boot)?*.efi $TGTMNT$EFI_BOOT
else
echo "No BOOT*.efi found in eltorito image. EFI will not boot"
umount $EFIMNT
- rm $SRC.1
+ rm "$SRC".1
exitclean
fi
umount $EFIMNT
- rm $SRC.1
+ rm "$SRC".1
fi
fi
fi
commit 5a89d6518a49ef15f2610d46d478a9528f9da275
Author: Daniel Walsh <dwalsh(a)redhat.com>
Date: Thu Aug 11 10:35:34 2011 -0700
Handle move to /sys/fs/selinux (#728576)
selinux mountpoint has moved, read the mountpont from
/proc/mountinfo or fall back to /sys/fs/selinux
diff --git a/imgcreate/creator.py b/imgcreate/creator.py
index 675dcf6..0492c81 100644
--- a/imgcreate/creator.py
+++ b/imgcreate/creator.py
@@ -83,6 +83,15 @@ class ImageCreator(object):
self.__sanity_check()
+ # get selinuxfs mountpoint
+ self.__selinux_mountpoint = "/sys/fs/selinux"
+ with open("/proc/self/mountinfo", "r") as f:
+ for line in f.readlines():
+ fields = line.split()
+ if fields[-2] == "selinuxfs":
+ self.__selinux_mountpoint = fields[4]
+ break
+
def __del__(self):
self.cleanup()
@@ -435,63 +444,25 @@ class ImageCreator(object):
os.symlink(src, self._instroot + dest)
os.umask(origumask)
- def __getbooleans(self):
- booleans = []
- if not kickstart.selinux_enabled(self.ks) or not os.path.exists("/selinux/enforce"):
- return booleans
- for i in selinux.security_get_boolean_names()[1]:
- on = selinux.security_get_boolean_active(i)
- booleans.append(("/booleans/%s" % i, "%d %d" % (on, on)))
- return booleans
-
def __create_selinuxfs(self):
- # if selinux exists on the host we need to lie to the chroot
- if os.path.exists("/selinux/enforce"):
- selinux_dir = self._instroot + "/selinux"
-
- # enforce=0 tells the chroot selinux is not enforcing
- # policyvers=999 tell the chroot to make the highest version of policy it can
-
- files = [('/enforce', '0'),
- ('/policyvers', '999'),
- ('/commit_pending_bools', ''),
- ('/mls', str(selinux.is_selinux_mls_enabled()))]
-
- for (file, value) in files + self.__getbooleans():
- fd = os.open(selinux_dir + file, os.O_WRONLY | os.O_TRUNC | os.O_CREAT)
- os.write(fd, value)
- os.close(fd)
+ arglist = ["/bin/mount", "--bind", "/dev/null", self._instroot + self.__selinux_mountpoint + "/load"]
+ subprocess.call(arglist, close_fds = True)
- # we steal mls from the host system for now, might be best to always set it to 1????
- # make /load -> /dev/null so chroot policy loads don't hurt anything
- os.mknod(selinux_dir + "/load", 0666 | stat.S_IFCHR, os.makedev(1, 3))
-
- # selinux is on in the kickstart, so clean up as best we can to start
if kickstart.selinux_enabled(self.ks):
# label the fs like it is a root before the bind mounting
arglist = ["/sbin/setfiles", "-F", "-r", self._instroot, selinux.selinux_file_context_path(), self._instroot]
subprocess.call(arglist, close_fds = True)
# these dumb things don't get magically fixed, so make the user generic
- for f in ("/proc", "/sys", "/selinux"):
+ # if selinux exists on the host we need to lie to the chroot
+ if selinux.is_selinux_enabled():
+ for f in ("/proc", "/sys"):
arglist = ["/usr/bin/chcon", "-u", "system_u", self._instroot + f]
subprocess.call(arglist, close_fds = True)
def __destroy_selinuxfs(self):
# if the system was running selinux clean up our lies
- if os.path.exists("/selinux/enforce"):
- for root, dirs, files in os.walk(self._instroot + "/selinux"):
- for name in files:
- try:
- os.remove(os.path.join(root, name))
- except OSError:
- pass
- for name in dirs:
- if os.path.join(root, name) == self._instroot + "/selinux":
- continue
- try:
- os.rmdir(os.path.join(root, name))
- except OSError:
- pass
+ arglist = ["/bin/umount", self._instroot + self.__selinux_mountpoint + "/load"]
+ subprocess.call(arglist, close_fds = True)
def mount(self, base_on = None, cachedir = None):
"""Setup the target filesystem in preparation for an install.
@@ -518,7 +489,7 @@ class ImageCreator(object):
self._mount_instroot(base_on)
- for d in ("/dev/pts", "/etc", "/boot", "/var/log", "/var/cache/yum", "/sys", "/proc", "/selinux/booleans"):
+ for d in ("/dev/pts", "/etc", "/boot", "/var/log", "/var/cache/yum", "/sys", "/proc"):
makedirs(self._instroot + d)
cachesrc = cachedir or (self.__builddir + "/yum-cache")
@@ -527,13 +498,14 @@ class ImageCreator(object):
# bind mount system directories into _instroot
for (f, dest) in [("/sys", None), ("/proc", None),
("/dev/pts", None), ("/dev/shm", None),
+ (self.__selinux_mountpoint, self.__selinux_mountpoint),
(cachesrc, "/var/cache/yum")]:
self.__bindmounts.append(BindChrootMount(f, self._instroot, dest))
- self.__create_selinuxfs()
-
self._do_bindmounts()
+ self.__create_selinuxfs()
+
self.__create_minimal_dev()
os.symlink("/proc/self/mounts", self._instroot + "/etc/mtab")
@@ -619,7 +591,7 @@ class ImageCreator(object):
# we need /usr/sbin/lokkit
def __can_handle_selinux(self, ayum):
file = "/usr/sbin/lokkit"
- if not kickstart.selinux_enabled(self.ks) and os.path.exists("/selinux/enforce") and not ayum.installHasFile(file):
+ if not kickstart.selinux_enabled(self.ks) and selinux.is_selinux_enabled() and not ayum.installHasFile(file):
raise CreatorError("Unable to disable SELinux because the installed package set did not include the file %s" % (file))
def install(self, repo_urls = {}):
diff --git a/imgcreate/kickstart.py b/imgcreate/kickstart.py
index 33859d6..345c638 100644
--- a/imgcreate/kickstart.py
+++ b/imgcreate/kickstart.py
@@ -23,6 +23,7 @@ import subprocess
import time
import logging
import urlgrabber
+import selinux
try:
import system_config_keyboard.keyboard as keyboard
@@ -420,7 +421,7 @@ class SelinuxConfig(KickstartConfig):
if not os.path.exists(self.path("/sbin/setfiles")):
return
- self.call(["/sbin/setfiles", "-e", "/proc", "-e", "/sys", "-e", "/dev", "-e", "/selinux", "/etc/selinux/targeted/contexts/files/file_contexts", "/"])
+ self.call(["/sbin/setfiles", "-p", "-e", "/proc", "-e", "/sys", "-e", "/dev", selinux.selinux_file_context_path(), "/"])
def apply(self, ksselinux):
if os.path.exists(self.path("/usr/sbin/lokkit")):
commit a624a4668ca950126d6503d561d7e9cefdabf485
Author: Brian C. Lane <bcl(a)redhat.com>
Date: Mon Aug 8 16:21:09 2011 -0700
Turn on the legacy_boot flag for EFI (#680563)
This allows gptmbr to be able to boot on both EFI and BIOS.
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index ff326a5..209f858 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -341,6 +341,8 @@ resetMBR() {
echo "Could not find gptmbr.bin (syslinux)"
exitclean
fi
+ # Make it bootable on EFI and BIOS
+ parted -s $device set $partnum legacy_boot on
else
if [ -f /usr/lib/syslinux/mbr.bin ]; then
cat /usr/lib/syslinux/mbr.bin > $device
commit 1b9e30c0bc295b4f61b07e739a5bb9851546fb71
Author: Brian C. Lane <bcl(a)redhat.com>
Date: Mon Aug 8 16:20:20 2011 -0700
Don't ask about replacing MBR when formatting
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index 46e4abb..ff326a5 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -365,9 +365,11 @@ checkMBR() {
mbrword=$(hexdump -n 2 $bs |head -n 1|awk {'print $2;'})
rm -f $bs
if [ "$mbrword" = "0000" ]; then
- echo "MBR appears to be blank."
- echo "Press Enter to replace the MBR and continue or ctrl-c to abort"
- read
+ if [ -z "$format" ]; then
+ echo "MBR appears to be blank."
+ echo "Press Enter to replace the MBR and continue or ctrl-c to abort"
+ read
+ fi
resetMBR $1
fi
commit a162dd4c0e8745ea37185742e9cd2e86565e1227
Author: Brian C. Lane <bcl(a)redhat.com>
Date: Mon Aug 8 15:27:24 2011 -0700
Make MBR replacement message more clear
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index 077e74f..46e4abb 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -366,8 +366,7 @@ checkMBR() {
rm -f $bs
if [ "$mbrword" = "0000" ]; then
echo "MBR appears to be blank."
- echo "Do you want to replace the MBR on this device?"
- echo "Press Enter to continue or ctrl-c to abort"
+ echo "Press Enter to replace the MBR and continue or ctrl-c to abort"
read
resetMBR $1
fi
commit 8e3e899aafcea71f9ba4452a33cd5dbae945abff
Author: Brian C. Lane <bcl(a)redhat.com>
Date: Mon Aug 8 15:18:06 2011 -0700
Ensure previous filesystems are wiped when formatting (#712553)
Add wipefs step before partitioning the device. This will remove any
previous filesystem signatures as well as iso9660's signature which
has been known to cause problems.
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index d5c3f65..077e74f 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -418,6 +418,7 @@ createGPTLayout() {
echo "Press Enter to continue or ctrl-c to abort"
read
umount ${device}* &> /dev/null || :
+ wipefs -a ${device}
/sbin/parted --script $device mklabel gpt
partinfo=$(LC_ALL=C /sbin/parted --script -m $device "unit b print" |grep ^$device:)
size=$(echo $partinfo |cut -d : -f 2 |sed -e 's/B$//')
@@ -441,6 +442,7 @@ createMSDOSLayout() {
echo "Press Enter to continue or ctrl-c to abort"
read
umount ${device}* &> /dev/null || :
+ wipefs -a ${device}
/sbin/parted --script $device mklabel msdos
partinfo=$(LC_ALL=C /sbin/parted --script -m $device "unit b print" |grep ^$device:)
size=$(echo $partinfo |cut -d : -f 2 |sed -e 's/B$//')
@@ -468,6 +470,7 @@ createEXTFSLayout() {
echo "Press Enter to continue or ctrl-c to abort"
read
umount ${device}* &> /dev/null || :
+ wipefs -a ${device}
/sbin/parted --script $device mklabel msdos
partinfo=$(LC_ALL=C /sbin/parted --script -m $device "unit b print" |grep ^$device:)
size=$(echo $partinfo |cut -d : -f 2 |sed -e 's/B$//')
commit 75ce25e494ccb74b4bc19c807d1d789194e40f87
Author: Brian C. Lane <bcl(a)redhat.com>
Date: Thu Jul 28 15:08:21 2011 -0700
Modify pxeboot script to work with F16
diff --git a/tools/livecd-iso-to-pxeboot.sh b/tools/livecd-iso-to-pxeboot.sh
index 45a1ffe..83881d4 100755
--- a/tools/livecd-iso-to-pxeboot.sh
+++ b/tools/livecd-iso-to-pxeboot.sh
@@ -66,8 +66,6 @@ if [ -d tftpboot ]; then
exit 1
fi
-mkdir tftpboot
-
# Mount the ISO.
# FIXME: would be better if we had better mountpoints
CDMNT=$(mktemp -d /media/cdtmp.XXXXXX)
@@ -76,11 +74,21 @@ mount -o loop "$ISO" $CDMNT || exitclean
trap exitclean SIGINT SIGTERM
# Does it look like an ISO?
-if [ ! -d $CDMNT/isolinux -o ! -f $CDMNT/isolinux/initrd0.img ]; then
+if [[ ( ! -d $CDMNT/isolinux ) || ( ! -f $CDMNT/isolinux/initrd0.img && ! -f $CDMNT/isolinux/initrd.img ) ]]; then
echo "The ISO image doesn't look like a LiveCD ISO image to me."
exitclean
fi
+if [[ -f $CDMNT/isolinux/initrd0.img ]]; then
+ INITRD=initrd0.img
+ VMLINUZ=vmlinuz0
+else
+ INITRD=initrd.img
+ VMLINUZ=vmlinuz
+fi
+
+mkdir tftpboot
+
# Create a cpio archive of just the ISO and append it to the
# initrd image. The Linux kernel will do the right thing,
# aggregating both cpio archives (initrd + ISO) into a single
@@ -89,10 +97,10 @@ ISOBASENAME=`basename "$ISO"`
ISODIRNAME=`dirname "$ISO"`
( cd "$ISODIRNAME" && echo "$ISOBASENAME" | cpio -H newc --quiet -L -o ) |
gzip -9 |
- cat $CDMNT/isolinux/initrd0.img - > tftpboot/initrd0.img
+ cat $CDMNT/isolinux/$INITRD - > tftpboot/$INITRD
# Kernel image.
-cp $CDMNT/isolinux/vmlinuz0 tftpboot/vmlinuz0
+cp $CDMNT/isolinux/$VMLINUZ tftpboot/$VMLINUZ
# pxelinux bootloader.
if [ -f /usr/share/syslinux/pxelinux.0 ]; then
@@ -115,7 +123,7 @@ DEFAULT pxeboot
TIMEOUT 20
PROMPT 0
LABEL pxeboot
- KERNEL vmlinuz0
+ KERNEL $VMLINUZ
APPEND rootflags=loop $APPEND
ONERROR LOCALBOOT 0
EOF
commit 3f82de5e4bffe2655127f6d1a9032c64605f002b
Author: Martin Langhoff <martin.langhoff(a)gmail.com>
Date: Tue Jul 19 23:59:59 2011 -0400
Add initial support for ARM architectures
This allows us to get basic ARM builds going. It doesn't take care of
booting facilities, but those vary widely in the ARM world.
For the time being, setup for booting should be done in %post .
diff --git a/imgcreate/live.py b/imgcreate/live.py
index 655eb16..6ad9c5b 100755
--- a/imgcreate/live.py
+++ b/imgcreate/live.py
@@ -916,5 +916,8 @@ elif arch in ("ppc",):
LiveImageCreator = ppcLiveImageCreator
elif arch in ("ppc64",):
LiveImageCreator = ppc64LiveImageCreator
+elif arch.startswith('arm'):
+ LiveImageCreator = LiveImageCreatorBase
+
else:
raise CreatorError("Architecture not supported!")
commit 3c985ba4735dbf6e75b7e518413b0d02881b3d11
Author: Brian C. Lane <bcl(a)redhat.com>
Date: Thu May 5 16:56:36 2011 -0700
Copy updates and product image files
In order to properly support copying RHEL images to USB we need to
include any updates.img or product.img files that are present on the
original iso.
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index 5261aab..d5c3f65 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -1038,7 +1038,11 @@ if [ \( "$srctype" = "installer" -o "$srctype" = "netinst" \) ]; then
echo "Copying DVD image to target device."
mkdir -p $TGTMNT/images/
if [ "$imgtype" = "install" ]; then
- copyFile $SRCMNT/images/install.img $TGTMNT/images/install.img || exitclean
+ for img in install.img updates.img product.img; do
+ if [ -e $SRCMNT/images/$img ]; then
+ copyFile $SRCMNT/images/$img $TGTMNT/images/$img || exitclean
+ fi
+ done
fi
if [ "$srctype" = "installer" -a -z "$skipcopy" ]; then
cp $SRC $TGTMNT/
12 years, 6 months
Changes to 'refs/tags/livecd-tools-17.0'
by Brian C. Lane
Tag 'livecd-tools-17.0' created by Brian C. Lane <bcl(a)redhat.com> at 2011-08-11 23:22 +0000
Tag as livecd-tools-17.0
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQEVAwUATkRkNBF+jBaO/jp/AQLY1gf/dDujH5QyUCqDIPspO1925MCCqwODKctC
+EuAPoBr8AWkX/TOyqV+8QN8dSJlesYs9pYye5Y1l9pvnaOvIbLXCCdDxe2zjWq3
hWJrTBgUWRBfhEIHvt/9rSgoxbIG0U9xEUl6VS0hsCMddtI5hqENycTkXqOghYuC
a9y6sdERIBJ/RP851EuwXVVyU4kbDB44nNRm2J2WmO9FrFctruyRLH4VrpcCu1cd
nmm2W2sLap8Ss6EI0gGLt39iiOlUZHKbhTtQhtR4wf1xXc27kgBR9rk8KXifI1mV
lGiwOayIvSwO7GWlVhrSplVmuMhPDMlK6DwJXoxygrQ8ceRAyGy5MA==
=JS9x
-----END PGP SIGNATURE-----
Changes since livecd-tools-16.3:
Brian C. Lane (7):
Copy updates and product image files
Modify pxeboot script to work with F16
Ensure previous filesystems are wiped when formatting (#712553)
Make MBR replacement message more clear
Don't ask about replacing MBR when formatting
Turn on the legacy_boot flag for EFI (#680563)
master is now v17.X
Bruno Wolff III (1):
Quote $SRC so iso's with spaces will work (#694915)
Daniel Walsh (1):
Handle move to /sys/fs/selinux (#728576)
Martin Langhoff (1):
Add initial support for ARM architectures
---
Makefile | 2 -
imgcreate/creator.py | 70 ++++++++++++-----------------------------
imgcreate/kickstart.py | 3 +
imgcreate/live.py | 3 +
tools/livecd-iso-to-disk.sh | 40 ++++++++++++++---------
tools/livecd-iso-to-pxeboot.sh | 20 ++++++++---
6 files changed, 66 insertions(+), 72 deletions(-)
---
12 years, 6 months
Changes to 'refs/tags/livecd-tools-16.3'
by Brian C. Lane
Tag 'livecd-tools-16.3' created by Brian C. Lane <bcl(a)redhat.com> at 2011-03-31 23:37 +0000
Tag as livecd-tools-16.3
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQEVAwUATZUQVxF+jBaO/jp/AQLw1Qf8Dfn3TCFp+ZnvF/24e07WRCbkt5P737VW
I1gESAIUfOVB1r14xps241LcPd/WJDRLUdnDNk4k/xaUPSMP3OJJ6/vkOLy1P+go
HnG+sz6y4U0WWdGqzIuDqJZqDc+eHUO5nb3ZC6D7nSCwkYDV+day1SnBxrHVtoof
gI/IJSJuHGG7yd+AOMOayaTUTqTQF4q84ahDfll28aWY5xZwg3IK/nLzUq85ZlV5
sIvZvxLG98mTxISXe9YT7DiJEARm+15L9vozcNF0yDwUljqf8uBJMp6qezQnBi6o
5QztGOMSZHl4IlSotPy7Dv9cbHzBWBUGfjLuYKBQm0HvnrsOvDqN/g==
=IJ7O
-----END PGP SIGNATURE-----
Changes since livecd-tools-16.1:
Brian C. Lane (18):
gptmbr can be written directly to the mbr
Add error checks to home.img creation
Fall back to to msdos format if no extlinux
Version 16.2
Support /EFI/BOOT or /EFI/boot (#688258)
Add EFI support to netboot (#688258)
Add repo to DVD EFI install config file (#688258)
Add extracting BOOTX64.efi from iso (#688258)
Symlink image-creator instead of hardlink (#689167)
Fix overzealous boot->BOOT change
symlink /etc/mtab to /proc/self/mounts (#688277)
Fix image-creator symlink so that it is relative
Fix logic for syslinux check
Check for spaces in fs label when using overlay (#597599)
fix typo
Images go into $SYSLINUXPATH
Don't fail on missing splash image
Copy old initrd/xen files to isolinux when using base-on (#690940)
Frederick Grose (5):
livecd-iso-to-disk Detect more disk space issues
Create an ext4 filesystem by default for home.img
Fix pipefailure in checkSyslinuxVersion (#689329)
Fix return code failure (#689360)
liveimage-mount installed LiveOS with overlay
Jan Kratochvil (1):
Fixup livedir support (#679023)
Lubomir Rintel (2):
Mailing list address changed
livecd-iso-to-disk: Catch all failures
---
HACKING | 4
Makefile | 4
imgcreate/creator.py | 7 -
imgcreate/live.py | 28 ++++
tools/livecd-iso-to-disk.sh | 228 ++++++++++++++++++++++++++-------------
tools/liveimage-mount | 256 ++++++++++++++++++++++++++++++++++++++------
6 files changed, 407 insertions(+), 120 deletions(-)
---
12 years, 6 months
Changes to 'refs/tags/livecd-tools-15.7'
by Brian C. Lane
Tag 'livecd-tools-15.7' created by Brian C. Lane <bcl(a)redhat.com> at 2011-05-06 18:04 +0000
Tag as livecd-tools-15.7
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQEVAwUATcQ4IhF+jBaO/jp/AQLEUQf8CeJKmVO+0WJUqIkQ5bE/wAq6snanVrMG
yUSlfSFgrIuFaKI+6z3OB36sRLoBM4UTarC67lfvmA9EIEU/E+JgFhfVBq8FahJG
Vamhlje8e7a9z/59ZnBsChirXK4s/h0Ou4zTDrrrbWcHpQb2/KiOA9BF4x2IlvG0
v28ncJdi606FtgIbJwaBqNMmpSEu07h03nAdSQ8zlTgRfq3pOR1Uk48Ak3kaLFQo
tV9EkmEGLP2z4Do6TrB99VE0EMMxs7jEZAdKL+CIGjMHHtMRo5jOMtML8L6xO+fo
cdXeLE5CRRY+T7wyQzaDZwbJSeGpgcLc245P1JKHxKMgYtttROFJ+A==
=6GqT
-----END PGP SIGNATURE-----
Changes since livecd-tools-15.6:
Brian C. Lane (2):
symlink /etc/mtab to /proc/self/mounts (#688277)
Version 15.7
---
Makefile | 2 +-
imgcreate/creator.py | 7 +------
2 files changed, 2 insertions(+), 7 deletions(-)
---
12 years, 6 months
Changes to 'refs/tags/livecd-tools-13.4'
by Brian C. Lane
Tag 'livecd-tools-13.4' created by Brian C. Lane <bcl(a)redhat.com> at 2011-08-24 00:29 +0000
Tag as livecd-tools-13.4
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQEVAwUATlRF7RF+jBaO/jp/AQIb4gf+OCcFF984345kc+AE+SzZq6wfWg1uKYZy
EmrvD1IUiE3zWuM/LYDK6tGEiOrTVQU8+2zNkMkSwrUzYtbVCSCRWYeBY+DKOCj2
BU2zQKYGX2nSPUvjsU/0cgUGFdnHo9zbLy4n73Lw5KBlvzJ2EqBphIgVCMoZ0n9w
ZDL3ZfXRDV+IV1wA9sHKGSu58ZL0AqxUTyfgCKScZMv+ib9NFSyWVL+5A8eTci4H
fDbDmhy2iJVKF1QsGvwd9bQjfH5F4S82NV3RXJ1kx1+Ngd5hp9rwFUhgvEjrtLFo
qcKjqtAPnadnEG/vY5HRRTsa0W2Ziz3zo9cLByqSzXgUr2fiu44D8g==
=eSrc
-----END PGP SIGNATURE-----
Changes since livecd-tools-13.3:
Brian C. Lane (9):
Copy updates and product image files
Turn on the legacy_boot flag for EFI (#680563)
Ensure previous filesystems are wiped when formatting (#712553)
gptmbr can be written directly to the mbr
Support /EFI/BOOT or /EFI/boot (#688258)
Use rsync to copy if available
Add EFI support to netboot and DVD iso
Use copyFile on the iso
Version 13.4
---
Makefile | 2 -
tools/livecd-iso-to-disk.sh | 71 ++++++++++++++++++++++++++++++++------------
2 files changed, 53 insertions(+), 20 deletions(-)
---
12 years, 6 months