[PATCH] mkefiboot: Copy Mac bootloader, rather than linking it

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The Mac firmware needs special-casing for hardlinked bootloaders, and
it's kind of awkward to handle that in python. Just copy them for now
instead.
---
 src/pylorax/imgutils.py |    2 ++
 src/sbin/mkefiboot      |    4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/pylorax/imgutils.py b/src/pylorax/imgutils.py
index fa84234..2b760d3 100644
--- a/src/pylorax/imgutils.py
+++ b/src/pylorax/imgutils.py
@@ -147,6 +147,8 @@ def estimate_size(rootdir, graft={}, fstype=None, blocksize=4096, overhead=128):
     getsize = lambda f: os.lstat(f).st_size
     if fstype == "btrfs":
         overhead = 64*1024 # don't worry, it's all sparse
+    if fstype == "hfsplus":
+        overhead = 200 # hack to deal with two bootloader copies
     if fstype in ("vfat", "msdos"):
         blocksize = 2048
         getsize = lambda f: os.stat(f).st_size # no symlinks, count as copies
diff --git a/src/sbin/mkefiboot b/src/sbin/mkefiboot
index fd27663..e8eaf98 100755
--- a/src/sbin/mkefiboot
+++ b/src/sbin/mkefiboot
@@ -70,8 +70,8 @@ def macmunge(imgfile, product):
 </dict>
 </plist>
 ''' % (product,))
-            os.link(loader, os.path.join(sysdir,'boot.efi'))
-            os.link(config, os.path.join(sysdir,'boot.conf'))
+            shutil.copy(loader, os.path.join(sysdir,'boot.efi'))
+            shutil.copy(config, os.path.join(sysdir,'boot.conf'))
     # format data properly (big-endian UInt32)
     nodedata = struct.pack(">i", blessnode)
     dirdata = struct.pack(">i", dirnode)
-- 
1.7.10

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux