From 4e179693d94803d4b6495d35b252d92ed09048c9 Mon Sep 17 00:00:00 2001 From: Matthew Garrett Date: Feb 28 2012 19:35:09 +0000 Subject: add support for volume labels --- diff --git a/mactel-boot.spec b/mactel-boot.spec index 998d1c6..7fd2981 100644 --- a/mactel-boot.spec +++ b/mactel-boot.spec @@ -1,6 +1,6 @@ Name: mactel-boot Version: 0.9 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Intel Mac boot files Group: System Environment/Base @@ -29,6 +29,11 @@ install -D -m 644 SystemVersion.plist $RPM_BUILD_ROOT/boot/efi/System/Library/Co echo "This file is required for booting" >$RPM_BUILD_ROOT/boot/efi/mach_kernel touch $RPM_BUILD_ROOT/boot/efi/System/Library/CoreServices/boot.efi touch $RPM_BUILD_ROOT/boot/efi/.VolumeIcon.icns +mkdir -p $RPM_BUILD_ROOT/boot/efi/EFI/redhat/grub2-efi +touch $RPM_BUILD_ROOT/boot/efi/EFI/redhat/grub2-efi/.disk_label +touch $RPM_BUILD_ROOT/boot/efi/EFI/redhat/.disk_label +touch $RPM_BUILD_ROOT/boot/efi/.disk_label +touch $RPM_BUILD_ROOT/boot/efi/System/Library/CoreServices/.disk_label %clean rm -rf $RPM_BUILD_ROOT @@ -43,7 +48,10 @@ rm -rf $RPM_BUILD_ROOT /usr/sbin/hfs-bless %attr(0755, root, root) %ghost /boot/efi/System/Library/CoreServices/boot.efi %attr(0644, root, root) %ghost /boot/efi/.VolumeIcon.icns - +%attr(0644, root, root) %ghost /boot/efi/.disk_label +%attr(0644, root, root) %ghost /boot/efi/EFI/redhat/.disk_label +%attr(0644, root, root) %ghost /boot/efi/EFI/redhat/grub2-efi/.disk_label +%attr(0644, root, root) %ghost /boot/efi/System/Library/CoreServices/.disk_label %triggerin -- grub-efi if [ x`df -T /boot/efi | tail -n +2 | awk '{print $2}'` = x"hfsplus" ]; then hfs-bless /boot/efi/System/Library/CoreServices/boot.efi @@ -54,20 +62,31 @@ if [ x`df -T /boot/efi | tail -n +2 | awk '{print $2}'` = x"hfsplus" ]; then hfs-bless /boot/efi/System/Library/CoreServices/boot.efi fi +%define volabel() (if [ -f /usr/share/pixmaps/bootloader/fedora.vol ]; then \ + cp /usr/share/pixmaps/bootloader/fedora.vol %1/.disk_label; \ + fi) + %post if [ x`df -T /boot/efi | tail -n +2 | awk '{print $2}'` = x"hfsplus" ]; then if [ -f /boot/efi/EFI/redhat/grub2-efi/grub.efi ]; then ln -sf ../../../EFI/redhat/grub2-efi/grub.efi /boot/efi/System/Library/CoreServices/boot.efi; + %volabel /boot/efi/EFI/redhat/grub2-efi/ elif [ -f /boot/efi/EFI/redhat/grub.efi ]; then ln -sf ../../../EFI/redhat/grub.efi /boot/efi/System/Library/CoreServices/boot.efi; + %volabel /boot/efi/EFI/redhat/ fi if [ -f /usr/share/pixmaps/bootloader/fedora.icns ]; then cp /usr/share/pixmaps/bootloader/fedora.icns /boot/efi/.VolumeIcon.icns fi + + %volabel /boot/efi/ fi %changelog +* Tue Feb 28 2012 Matthew Garrett - 0.9-2 +- add support for volume labels + * Tue Feb 07 2012 Matthew Garrett - 0.9-1 - new upstream, uses kernel ioctl rather than editing the fs by hand