summaryrefslogtreecommitdiffstats
path: root/source/a/efibootmgr
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2018-06-13 05:43:00 +0000
committer Eric Hameleers <alien@slackware.com>2018-06-13 09:44:21 +0200
commitd8095c1e90c817c5c1bd4cbb892be7218946279b (patch)
tree031d60b6fcf278de9783be42a3a77d253a03a1ea /source/a/efibootmgr
parent2c20c6847e0caa3b62f6e5a0506790393c141932 (diff)
downloadcurrent-d8095c1e90c817c5c1bd4cbb892be7218946279b.tar.gz
current-d8095c1e90c817c5c1bd4cbb892be7218946279b.tar.xz
Wed Jun 13 05:43:00 UTC 201820180613054300
a/dcron-4.5-x86_64-7.txz: Rebuilt. Added init script and defaults file. Moved TMPDIR to /run/cron. Thanks to Robby Workman and shasta. a/efibootmgr-16-x86_64-1.txz: Upgraded. a/efivar-36-x86_64-1.txz: Added. a/elilo-3.16-x86_64-7.txz: Rebuilt. a/glibc-solibs-2.27-x86_64-4.txz: Rebuilt. Don't restart init in the install script, let rc.6 handle it. a/haveged-1.9.2-x86_64-1.txz: Added. a/pkgtools-15.0-noarch-18.txz: Rebuilt. setup.services: add support for rc.atd and rc.crond a/sysvinit-scripts-2.1-noarch-10.txz: Rebuilt. rc.6: restart init when shutting down - this prevents it from holding file handles to removed/upgraded versions of the glibc shared libraries which would interfere with shutdown. rc.K: use full path to telinit rc.M: start rc.atd and rc.crond rc.M: don't remove cron tempfiles (moved to /run/cron) rc.S: start rc.haveged ap/at-3.1.20-x86_64-3.txz: Rebuilt. Added init script and defaults file. l/glibc-2.27-x86_64-4.txz: Rebuilt. Don't restart init in the install script, let rc.6 handle it. l/glibc-i18n-2.27-x86_64-4.txz: Rebuilt. l/glibc-profile-2.27-x86_64-4.txz: Rebuilt. l/gnu-efi-3.0.8-x86_64-1.txz: Upgraded.
Diffstat (limited to 'source/a/efibootmgr')
-rw-r--r--source/a/efibootmgr/efibootmgr-0.5.4-Remove-device-path-padding-on-non-Itanium.patch28
-rw-r--r--source/a/efibootmgr/efibootmgr-0.5.4-Work-around-broken-Apple-firmware.patch30
-rw-r--r--source/a/efibootmgr/efibootmgr-0.5.4-fix-disk-minor-number-discovery.patch29
-rw-r--r--source/a/efibootmgr/efibootmgr-0.5.4-support-4k-sectors.patch176
-rwxr-xr-xsource/a/efibootmgr/efibootmgr.SlackBuild32
-rw-r--r--source/a/efibootmgr/slack-desc2
6 files changed, 16 insertions, 281 deletions
diff --git a/source/a/efibootmgr/efibootmgr-0.5.4-Remove-device-path-padding-on-non-Itanium.patch b/source/a/efibootmgr/efibootmgr-0.5.4-Remove-device-path-padding-on-non-Itanium.patch
deleted file mode 100644
index 240aa6968..000000000
--- a/source/a/efibootmgr/efibootmgr-0.5.4-Remove-device-path-padding-on-non-Itanium.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 2d8f962284f40b918c0fc8385e58fcba219ddc12 Mon Sep 17 00:00:00 2001
-From: Fedora Ninjas <pjones@fedoraproject.org>
-Date: Wed, 28 Nov 2012 17:13:24 -0500
-Subject: [PATCH 2/5] Remove device path padding on non-Itanium
-
-This code predates EFI support on any x86 hardware, and it's a strict
-violation of the specification. Windows doesn't do it either.
----
- src/include/efi.h | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/src/include/efi.h b/src/include/efi.h
-index be667ae..c2ac853 100644
---- a/src/include/efi.h
-+++ b/src/include/efi.h
-@@ -294,7 +294,9 @@ typedef struct {
- uint8_t signature[16];
- uint8_t mbr_type;
- uint8_t signature_type;
-+#ifdef __ia64
- uint8_t padding[6]; /* Emperically needed */
-+#endif
- } __attribute__((packed)) HARDDRIVE_DEVICE_PATH;
-
- typedef struct {
---
-1.8.0
-
diff --git a/source/a/efibootmgr/efibootmgr-0.5.4-Work-around-broken-Apple-firmware.patch b/source/a/efibootmgr/efibootmgr-0.5.4-Work-around-broken-Apple-firmware.patch
deleted file mode 100644
index a1d9831d0..000000000
--- a/source/a/efibootmgr/efibootmgr-0.5.4-Work-around-broken-Apple-firmware.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 6edc3ed5479b575f87eb51e335957b05fdd04fe8 Mon Sep 17 00:00:00 2001
-From: Fedora Ninjas <pjones@fedoraproject.org>
-Date: Wed, 28 Nov 2012 16:49:18 -0500
-Subject: [PATCH 1/5] Work around broken Apple firmware
-
-Alex Murray found that Apple's firmware sets an invalid EFI attribute on
-BootCurrent, which newer versions of the kernel then reject. This patch
-from him simply masks off the extraneous bit.
----
- src/lib/efivars_sysfs.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/lib/efivars_sysfs.c b/src/lib/efivars_sysfs.c
-index 182c70f..ea87325 100644
---- a/src/lib/efivars_sysfs.c
-+++ b/src/lib/efivars_sysfs.c
-@@ -55,6 +55,10 @@ sysfs_read_variable(const char *name, efi_variable_t *var)
- return EFI_INVALID_PARAMETER;
- }
- close(fd);
-+ /* latest apple firmware sets high bit which appears invalid
-+ to the linux kernel if we write it back so lets zero it out
-+ if it is set since it would be invalid to set it anyway */
-+ var->Attributes = var->Attributes & ~(1 << 31);
- return var->Status;
- }
-
---
-1.8.0
-
diff --git a/source/a/efibootmgr/efibootmgr-0.5.4-fix-disk-minor-number-discovery.patch b/source/a/efibootmgr/efibootmgr-0.5.4-fix-disk-minor-number-discovery.patch
deleted file mode 100644
index e9b535836..000000000
--- a/source/a/efibootmgr/efibootmgr-0.5.4-fix-disk-minor-number-discovery.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From f9f4ee75ad745637a47bf17ed968101b1ffbcc1d Mon Sep 17 00:00:00 2001
-From: Matt Domsch <Matt_Domsch@dell.com>
-Date: Thu, 23 Jul 2009 14:20:19 -0500
-Subject: [PATCH 4/5] fix disk minor number discovery
-
-Raymund Will noted disk_info_from_fd() incorrectly used logical &&
-instead of bitwise & when obtaining the minor number.
-
-Reported in https://bugzilla.novell.com/show_bug.cgi?id=524529#c1
----
- src/lib/disk.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/lib/disk.c b/src/lib/disk.c
-index ebfe619..8ad590b 100644
---- a/src/lib/disk.c
-+++ b/src/lib/disk.c
-@@ -55,7 +55,7 @@ disk_info_from_fd(int fd,
- return 1;
- }
- major = buf.st_dev >> 8;
-- minor = buf.st_dev && 0xFF;
-+ minor = buf.st_dev & 0xFF;
-
- /* IDE disks can have up to 64 partitions, or 6 bits worth,
- * and have one bit for the disk number.
---
-1.8.0
-
diff --git a/source/a/efibootmgr/efibootmgr-0.5.4-support-4k-sectors.patch b/source/a/efibootmgr/efibootmgr-0.5.4-support-4k-sectors.patch
deleted file mode 100644
index c380c6100..000000000
--- a/source/a/efibootmgr/efibootmgr-0.5.4-support-4k-sectors.patch
+++ /dev/null
@@ -1,176 +0,0 @@
-Return-Path: pjones@redhat.com
-Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO
- zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by
- mail04.corp.redhat.com with LMTP; Wed, 14 Jul 2010 14:25:52 -0400 (EDT)
-Received: from localhost (localhost.localdomain [127.0.0.1])
- by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id B69C19F152
- for <pjones@redhat.com>; Wed, 14 Jul 2010 14:25:52 -0400 (EDT)
-Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1])
- by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
- with ESMTP id jCHcGZehMQ5J for <pjones@redhat.com>;
- Wed, 14 Jul 2010 14:25:52 -0400 (EDT)
-Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21])
- by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id A601C9F14C
- for <pjones@mail.corp.redhat.com>; Wed, 14 Jul 2010 14:25:52 -0400 (EDT)
-Received: from pjones4.install.bos.redhat.com (pjones4.install.bos.redhat.com [10.16.52.154])
- by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o6EIPpGh017771;
- Wed, 14 Jul 2010 14:25:52 -0400
-From: Peter Jones <pjones@redhat.com>
-To: Matt Domsch <Matt_Domsch@dell.com>
-Cc: Peter Jones <pjones@redhat.com>, Stuart Hayes <stuart_hayes@dell.com>
-Subject: [efibootmgr patch] Handle sector_size != 512.
-Date: Wed, 14 Jul 2010 14:26:49 -0400
-Message-Id: <1279132009-26635-1-git-send-email-pjones@redhat.com>
-In-Reply-To: <1279121617-17961-1-git-send-email-pjones@redhat.com>
-References: <1279121617-17961-1-git-send-email-pjones@redhat.com>
-X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21
-
-Disks can have 4kB sectors now, so don't just bail out when that's the
-case.
----
- src/include/disk.h | 3 +++
- src/lib/disk.c | 43 +++++++++++++++++++++++++++++++++----------
- src/lib/gpt.c | 30 ++++++++++++++----------------
- 3 files changed, 50 insertions(+), 26 deletions(-)
-
-diff --git a/src/include/disk.h b/src/include/disk.h
-index eb93d10..8aa37d7 100644
---- a/src/include/disk.h
-+++ b/src/include/disk.h
-@@ -65,6 +65,9 @@ enum _interface_type {interface_type_unknown,
- ata, atapi, scsi, usb,
- i1394, fibre, i2o, md};
-
-+
-+unsigned int lcm(unsigned int x, unsigned int y);
-+
- int disk_get_pci(int fd,
- unsigned char *bus,
- unsigned char *device,
-diff --git a/src/lib/disk.c b/src/lib/disk.c
-index 883864f..9c3a878 100644
---- a/src/lib/disk.c
-+++ b/src/lib/disk.c
-@@ -420,6 +420,27 @@ get_sector_size(int filedes)
- return sector_size;
- }
-
-+/************************************************************
-+ * lcm
-+ * Requires:
-+ * - numbers of which to find the lowest common multiple
-+ * Modifies: nothing
-+ * Returns:
-+ * lowest common multiple of x and y
-+ ************************************************************/
-+unsigned int
-+lcm(unsigned int x, unsigned int y)
-+{
-+ unsigned int m = x, n = y, o;
-+
-+ while ((o = m % n)) {
-+ m = n;
-+ n = o;
-+ }
-+
-+ return (x / n) * y;
-+}
-+
- /**
- * disk_get_partition_info()
- * @fd - open file descriptor to disk
-@@ -442,26 +463,27 @@ disk_get_partition_info (int fd,
- uint8_t *mbr_type, uint8_t *signature_type)
- {
- legacy_mbr *mbr;
-- void *mbr_unaligned;
-+ void *mbr_sector;
-+ size_t mbr_size;
- off_t offset;
- int this_bytes_read = 0;
- int gpt_invalid=0, mbr_invalid=0;
- int rc=0;
- int sector_size = get_sector_size(fd);
-
-- if (sizeof(*mbr) != sector_size)
-- return 1;
-- mbr_unaligned = malloc(sizeof(*mbr)+sector_size-1);
-- mbr = (legacy_mbr *)
-- (((unsigned long)mbr_unaligned + sector_size - 1) &
-- ~(unsigned long)(sector_size-1));
-- memset(mbr, 0, sizeof(*mbr));
-+
-+ mbr_size = lcm(sizeof(*mbr), sector_size);
-+ if ((rc = posix_memalign(&mbr_sector, sector_size, mbr_size)) != 0)
-+ goto error;
-+ memset(mbr_sector, '\0', mbr_size);
-+
- offset = lseek(fd, 0, SEEK_SET);
-- this_bytes_read = read(fd, mbr, sizeof(*mbr));
-+ this_bytes_read = read(fd, mbr_sector, mbr_size);
- if (this_bytes_read < sizeof(*mbr)) {
- rc=1;
- goto error_free_mbr;
- }
-+ mbr = (legacy_mbr *)mbr_sector;
- gpt_invalid = gpt_disk_get_partition_info(fd, num,
- start, size,
- signature,
-@@ -479,7 +501,8 @@ disk_get_partition_info (int fd,
- }
- }
- error_free_mbr:
-- free(mbr_unaligned);
-+ free(mbr_sector);
-+ error:
- return rc;
- }
-
-diff --git a/src/lib/gpt.c b/src/lib/gpt.c
-index d90ddaf..83e7a94 100644
---- a/src/lib/gpt.c
-+++ b/src/lib/gpt.c
-@@ -215,26 +215,24 @@ read_lastoddsector(int fd, uint64_t lba, void *buffer, size_t count)
- static ssize_t
- read_lba(int fd, uint64_t lba, void *buffer, size_t bytes)
- {
-- int sector_size = get_sector_size(fd);
-- off_t offset = lba * sector_size;
-+ int sector_size = get_sector_size(fd);
-+ off_t offset = lba * sector_size;
- ssize_t bytesread;
-- void *aligned;
-- void *unaligned;
--
-- if (bytes % sector_size)
-- return EINVAL;
-+ void *iobuf;
-+ size_t iobuf_size;
-+ int rc;
-
-- unaligned = malloc(bytes+sector_size-1);
-- aligned = (void *)
-- (((unsigned long)unaligned + sector_size - 1) &
-- ~(unsigned long)(sector_size-1));
-- memset(aligned, 0, bytes);
-+ iobuf_size = lcm(bytes, sector_size);
-+ rc = posix_memalign(&iobuf, sector_size, iobuf_size);
-+ if (rc)
-+ return rc;
-+ memset(iobuf, 0, bytes);
-
-
-- lseek(fd, offset, SEEK_SET);
-- bytesread = read(fd, aligned, bytes);
-- memcpy(buffer, aligned, bytesread);
-- free(unaligned);
-+ lseek(fd, offset, SEEK_SET);
-+ bytesread = read(fd, iobuf, iobuf_size);
-+ memcpy(buffer, iobuf, bytes);
-+ free(iobuf);
-
- /* Kludge. This is necessary to read/write the last
- block of an odd-sized disk, until Linux 2.5.x kernel fixes.
---
-1.7.1.1
-
diff --git a/source/a/efibootmgr/efibootmgr.SlackBuild b/source/a/efibootmgr/efibootmgr.SlackBuild
index cdcbcb2b4..e91b25fd9 100755
--- a/source/a/efibootmgr/efibootmgr.SlackBuild
+++ b/source/a/efibootmgr/efibootmgr.SlackBuild
@@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=efibootmgr
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -79,11 +79,6 @@ rm -rf $PKGNAM-$VERSION
tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
cd $PKGNAM-$VERSION
-zcat $CWD/efibootmgr-0.5.4-Remove-device-path-padding-on-non-Itanium.patch.gz | patch -p1 --verbose || exit 1
-zcat $CWD/efibootmgr-0.5.4-Work-around-broken-Apple-firmware.patch.gz | patch -p1 --verbose || exit 1
-zcat $CWD/efibootmgr-0.5.4-fix-disk-minor-number-discovery.patch.gz | patch -p1 --verbose || exit 1
-zcat $CWD/efibootmgr-0.5.4-support-4k-sectors.patch.gz | patch -p1 --verbose || exit 1
-
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -91,17 +86,13 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# Build:
-export EXTRA_CFLAGS="$SLKCFLAGS -fgnu89-inline"
-make || exit 1
+# Set default EFI System Partition directory:
+export EFIDIR=/boot/efi
-# Install:
-mkdir -p $PKG/usr/sbin
-cp src/efibootmgr/efibootmgr $PKG/usr/sbin
-chown root:root $PKG/usr/sbin/efibootmgr
-chmod 755 $PKG/usr/sbin/efibootmgr
-mkdir -p $PKG/usr/man/man8
-cat src/man/man8/efibootmgr.8 | gzip -9c > $PKG/usr/man/man8/efibootmgr.8.gz
+# Build:
+export EXTRA_CFLAGS="$SLKCFLAGS"
+make mandir=/usr/man || exit 1
+make install mandir=/usr/man DESTDIR=$PKG || exit 1
# Strip binaries:
( cd $PKG
@@ -109,10 +100,17 @@ cat src/man/man8/efibootmgr.8 | gzip -9c > $PKG/usr/man/man8/efibootmgr.8.gz
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
)
+# Compress manual pages:
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do
+ ln -s $( readlink $i ).gz $i.gz
+ rm $i
+done
+
# Add a documentation directory:
mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
cp -a \
- AUTHORS COPYING* INSTALL README* doc/* \
+ AUTHORS COPYING* INSTALL README* TODO* \
$PKG/usr/doc/${PKGNAM}-$VERSION
mkdir -p $PKG/install
diff --git a/source/a/efibootmgr/slack-desc b/source/a/efibootmgr/slack-desc
index dee525ac5..094d3b75d 100644
--- a/source/a/efibootmgr/slack-desc
+++ b/source/a/efibootmgr/slack-desc
@@ -13,7 +13,7 @@ efibootmgr: Extensible Firmware Interface (EFI) Boot Manager. This application
efibootmgr: can create and destroy boot entries, change the boot order, change
efibootmgr: the next running boot option, and more.
efibootmgr:
-efibootmgr: Homepage: http://linux.dell.com/efibootmgr
+efibootmgr: Homepage: https://github.com/rhboot/efibootmgr
efibootmgr:
efibootmgr:
efibootmgr: