* This reverts commit a561daa4e340482c4ca4903a4267ff074e67
* Adding the initrd reduce change that got reverted
Conflicts:
installer/installer.py
| ... | ... |
@@ -1,17 +1,17 @@ |
| 1 | 1 |
{
|
| 2 | 2 |
"packages":["glibc", "zlib", "filesystem", |
| 3 |
- "binutils", "gmp", "mpfr", "libgcc", "libstdc++", |
|
| 4 |
- "sed", "bzip2", "pkg-config", "readline", "ncurses", "bash", |
|
| 5 |
- "cracklib", "cracklib-dicts", "cracklib-python", "shadow", "procps-ng", |
|
| 6 |
- "coreutils", "iana-etc", "grep", "bc", "libtool", |
|
| 7 |
- "inetutils", "findutils", |
|
| 8 |
- "xz", "grub2", "iproute2", "kmod", |
|
| 3 |
+ "libgcc", "libstdc++", |
|
| 4 |
+ "sed", "pkg-config", "readline", "ncurses", "bash", |
|
| 5 |
+ "cracklib", "cracklib-dicts", "cracklib-python", "shadow", |
|
| 6 |
+ "coreutils", "grep", |
|
| 7 |
+ "findutils", |
|
| 8 |
+ "xz", "grub2", "kmod", |
|
| 9 | 9 |
"util-linux", "e2fsprogs", |
| 10 |
- "libffi", "expat", |
|
| 10 |
+ "expat", |
|
| 11 | 11 |
"linux", "cpio", |
| 12 | 12 |
"Linux-PAM", "attr", "libcap", "systemd", "dbus", |
| 13 | 13 |
"elfutils-libelf", "sqlite-autoconf", "nspr", "nss", "popt", "lua", "rpm", |
| 14 |
- "gptfdisk", "tar", "gzip", "openssl", "python2", "python2-libs", "python-requests", |
|
| 14 |
+ "gptfdisk", "gzip", "openssl", "python2", "python2-libs", "python-requests", |
|
| 15 | 15 |
"pcre", |
| 16 | 16 |
"libgsystem", "ostree","device-mapper","device-mapper-libs","libsepol","libselinux", |
| 17 | 17 |
"db", "libsolv", "hawkey", "python-hawkey"] |
| ... | ... |
@@ -269,9 +269,11 @@ class Installer(object): |
| 269 | 269 |
#Setup the disk |
| 270 | 270 |
process = subprocess.Popen([self.chroot_command, '-w', self.photon_root, self.finalize_command, '-w', self.photon_root], stdout=self.output) |
| 271 | 271 |
retval = process.wait() |
| 272 |
+ initrd_dir = 'boot' |
|
| 273 |
+ initrd_file_name = 'initrd.img-no-kmods' |
|
| 272 | 274 |
if self.iso_installer: |
| 273 | 275 |
# just copy the initramfs /boot -> /photon_mnt/boot |
| 274 |
- shutil.copy('boot/initrd.img-no-kmods', self.photon_root + '/boot/')
|
|
| 276 |
+ shutil.copy(os.path.join(initrd_dir, initrd_file_name), self.photon_root + '/boot/') |
|
| 275 | 277 |
# remove the installer directory |
| 276 | 278 |
process = subprocess.Popen(['rm', '-rf', os.path.join(self.photon_root, "installer")], stdout=self.output) |
| 277 | 279 |
retval = process.wait() |
| ... | ... |
@@ -285,7 +287,9 @@ class Installer(object): |
| 285 | 285 |
if len(version_array) > 2: |
| 286 | 286 |
version_string = version_array[1] |
| 287 | 287 |
|
| 288 |
- process = subprocess.Popen([self.chroot_command, '-w', self.photon_root, './mkinitramfs', '-n', 'boot/initrd.img-no-kmods', '-k', version_string], stdout=self.output) |
|
| 288 |
+ if 'initrd_dir' in self.install_config: |
|
| 289 |
+ initrd_dir = self.install_config['initrd_dir'] |
|
| 290 |
+ process = subprocess.Popen([self.chroot_command, '-w', self.photon_root, './mkinitramfs', '-n', os.path.join(initrd_dir, initrd_file_name), '-k', version_string], stdout=self.output) |
|
| 289 | 291 |
retval = process.wait() |
| 290 | 292 |
|
| 291 | 293 |
|
| ... | ... |
@@ -106,9 +106,17 @@ createrepo --database ${WORKINGDIR}/RPMS
|
| 106 | 106 |
|
| 107 | 107 |
rm -rf ${BUILDROOT}/LOGS
|
| 108 | 108 |
|
| 109 |
+# Cleaning up |
|
| 109 | 110 |
#Remove our rpm database as it fills up the ramdisk |
| 110 | 111 |
rm -rf ${BUILDROOT}/home/*
|
| 111 | 112 |
rm -rf ${BUILDROOT}/var/lib/rpm
|
| 113 |
+ |
|
| 114 |
+# Remove the boot directory |
|
| 115 |
+rm -rf ${BUILDROOT}/boot
|
|
| 116 |
+ |
|
| 117 |
+#Remove the include files. |
|
| 118 |
+rm -rf ${BUILDROOT}/usr/include
|
|
| 119 |
+ |
|
| 112 | 120 |
# TODO: mbassiouny, Find a clean way to do that |
| 113 | 121 |
for i in `ls ${BUILDROOT}/usr/share/`; do
|
| 114 | 122 |
if [ $i != 'terminfo' -a $i != 'cracklib' -a $i != 'grub' ]; then |