really start at 1mb

- compress qcow2 by default
- make sure we dont destroy our newly created vfat partition
This commit is contained in:
Dennis Gilmore 2013-05-23 21:15:05 -05:00
parent 189834048b
commit 08b2ce39d3
6 changed files with 10 additions and 119 deletions

1
.gitignore vendored
View File

@ -6,3 +6,4 @@ appliance-tools-004.5.tar.bz2
/appliance-tools-006.3.tar.bz2
/appliance-tools-006.4.tar.bz2
/appliance-tools-006.5.tar.bz2
/appliance-tools-006.6.tar.bz2

View File

@ -1,45 +0,0 @@
From cdbd090ceeaec09820f5fa78946fe7adcb7a2256 Mon Sep 17 00:00:00 2001
From: Dennis Gilmore <dennis@ausil.us>
Date: Tue, 13 Mar 2012 12:22:39 -0500
Subject: [PATCH] Lets always write out a Legacy grub config file since its
all ec2 supports and its presence doesnt hurt
Signed-off-by: Dennis Gilmore <dennis@ausil.us>
---
appcreate/appliance.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/appcreate/appliance.py b/appcreate/appliance.py
index f9fc784..d896d34 100644
--- a/appcreate/appliance.py
+++ b/appcreate/appliance.py
@@ -258,6 +258,8 @@ class ApplianceImageCreator(ImageCreator):
grub += " initrd %s/%s-%s.img\n" % (prefix, initrd, v)
logging.debug("Writing grub config %s/boot/grub/grub.conf" % self._instroot)
+ if not os.path.isdir(self._instroot + "/boot/grub/"):
+ os.mkdir(self._instroot + "/boot/grub/")
cfg = open(self._instroot + "/boot/grub/grub.conf", "w")
cfg.write(grub)
cfg.close()
@@ -359,6 +361,9 @@ class ApplianceImageCreator(ImageCreator):
logging.debug("Grub2 configuration file generated.")
def _create_bootconfig(self):
+ # For EC2 lets always make a grub Legacy config file
+ logging.debug("Writing GRUB Legacy config.")
+ self._create_grub_config()
if self.grub == 'grub2':
# We have GRUB2 package installed
# Most probably this is Fedora 16+
@@ -369,7 +374,6 @@ class ApplianceImageCreator(ImageCreator):
# We have GRUB Legacy installed
logging.debug("Found GRUB Legacy package.")
self._create_grub_devices()
- self._create_grub_config()
self._copy_grub_files()
self._install_grub()
else:
--
1.7.9.3

View File

@ -1,28 +0,0 @@
From a0feeeb6630ecc08c407255e15fa9dfbf00e1c44 Mon Sep 17 00:00:00 2001
From: Dennis Gilmore <dennis@ausil.us>
Date: Sun, 12 May 2013 15:58:48 -0500
Subject: [PATCH] couple of typo fixes in extlinux support from mattdm
---
appcreate/appliance.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/appcreate/appliance.py b/appcreate/appliance.py
index 54ac376..dbc66d7 100644
--- a/appcreate/appliance.py
+++ b/appcreate/appliance.py
@@ -307,9 +307,9 @@ class ApplianceImageCreator(ImageCreator):
extlinux += "ui menu.c32\n"
extlinux += "menu autoboot Welcome to %s. Automatic boot in # second{,s}. Press a key for options.\n" % (self.name)
extlinux += "menu title %s Boot Options.\n" % (self.name)
- extlinux += "menu hiddenmenu\n"
+ extlinux += "menu hidden\n"
extlinux += "timeout 1\n"
- extlinux += "totaltimeout 60\n\n"
+ extlinux += "totaltimeout 600"
versions = []
kernels = self._get_kernel_versions()
--
1.8.2.1

View File

@ -1,40 +0,0 @@
From 3ed30fbcad47518c9ffbc66dfb4967ad2ab6a390 Mon Sep 17 00:00:00 2001
From: Dennis Gilmore <dennis@ausil.us>
Date: Wed, 22 May 2013 00:04:10 -0500
Subject: [PATCH] start at 1mb leaving the first mb free read the uuid earlier
on /boot/uboot for some reason reading after toggling partition settings
fails.
---
appcreate/partitionedfs.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/appcreate/partitionedfs.py b/appcreate/partitionedfs.py
index 0271dc5..9401d0f 100644
--- a/appcreate/partitionedfs.py
+++ b/appcreate/partitionedfs.py
@@ -92,7 +92,7 @@ class PartitionedMount(Mount):
logging.debug("Assigned %s to %s%d at %d at size %d" % (p['mountpoint'], p['disk'], p['num'], p['start'], p['size']))
# XXX we should probably work in cylinder units to keep fdisk happier..
- start = 0
+ start = 1
logging.debug("Creating partitions")
for p in self.partitions:
d = self.disks[p['disk']]
@@ -254,11 +254,11 @@ class PartitionedMount(Mount):
if mp == '/boot/uboot':
subprocess.call(["/sbin/mkfs.vfat", "-F", "32", "-n", "_/boot/uboot", p['device']])
subprocess.call(["/bin/mkdir", "-p", "%s%s" % (self.mountdir, p['mountpoint'])])
+ p['UUID'] = self.__getuuid(p['device'])
# mark the partition bootable
subprocess.call(["/sbin/parted", "-s", self.disks[p['disk']]['disk'].device, "set", str(p['num']), "boot", "on"])
# make sure that the partition type is correct
subprocess.call(["/sbin/sfdisk", "--change-id", self.disks[p['disk']]['disk'].device, str(p['num']), "c",])
- p['UUID'] = self.__getuuid(p['device'])
continue
if mp == 'biosboot':
--
1.8.2.1

View File

@ -4,8 +4,8 @@
Summary: Tools for building Appliances
Name: appliance-tools
Version: 006.5
Release: 2%{?dist}
Version: 006.6
Release: 1%{?dist}
License: GPLv2
Group: System Environment/Base
URL: http://thincrust.org/
@ -13,10 +13,9 @@ URL: http://thincrust.org/
# following commands to generate the tarball:
# git clone git://git.fedorahosted.org/appliance-tools
# cd appliance-tools
# git checkout appliance-tools-006.2
# git checkout appliance-tools-006.6
# make dist
Source0: appliance-tools-%{version}.tar.bz2
Patch0: 0001-start-at-1mb-leaving-the-first-mb-free.patch
Requires: livecd-tools >= 020 curl rsync kpartx
Requires: zlib
Requires: qemu-img
@ -41,7 +40,6 @@ Tool that helps remove unwanted files from the appliance image.
%prep
%setup -q
%patch0 -p1
%build
make
@ -74,6 +72,11 @@ rm -rf $RPM_BUILD_ROOT
%{_bindir}/image-minimizer
%changelog
* Thu May 23 2013 Dennis Gilmore <dennis@ausil.us> - 006.6-1
- really start at 1mb
- compress qcow2 by default
- make sure we dont destroy our newly created vfat partition
* Wed May 22 2013 Dennis Gilmore <dennis@ausil.us> - 006.5-2
- add patch to read vfat uuid earlier
- leave first mb free

View File

@ -1 +1 @@
4382b7507a6a7941f12adecab79543e9 appliance-tools-006.5.tar.bz2
233d381192a54b5725fa208e2e4c257e appliance-tools-006.6.tar.bz2