Date: Tue, 21 Oct 2014 15:24:02 +0000 (UTC) From: Kris Moore <kmoore@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r371324 - in head/sysutils/grub2-pcbsd: . files Message-ID: <201410211524.s9LFO2vV024513@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kmoore Date: Tue Oct 21 15:24:01 2014 New Revision: 371324 URL: https://svnweb.freebsd.org/changeset/ports/371324 QAT: https://qat.redports.org/buildarchive/r371324/ Log: - Update to latest git pull - 2.02_3 - Add support for GELI passphrase kernel passthrough - Patch grub-install / EFI support to disable trying to use Linux 'efibootmgr' Added: head/sysutils/grub2-pcbsd/files/patch-grub-core_osdep_unix-platform.c (contents, props changed) Modified: head/sysutils/grub2-pcbsd/Makefile head/sysutils/grub2-pcbsd/distinfo head/sysutils/grub2-pcbsd/files/patch-grub-core_disk_geli.c head/sysutils/grub2-pcbsd/files/patch-grub-core_fs_zfs_zfs.c Modified: head/sysutils/grub2-pcbsd/Makefile ============================================================================== --- head/sysutils/grub2-pcbsd/Makefile Tue Oct 21 14:38:58 2014 (r371323) +++ head/sysutils/grub2-pcbsd/Makefile Tue Oct 21 15:24:01 2014 (r371324) @@ -3,11 +3,11 @@ PORTNAME= grub2-pcbsd PORTVERSION= 2.02p -PORTREVISION= 7 +PORTREVISION= 8 CATEGORIES= sysutils MASTER_SITES= http://www.pcbsd.org/~kris/software/ \ ftp://ftp.pcbsd.org/pub/software/ -DISTNAME= grub-2.02_2 +DISTNAME= grub-2.02_3 MAINTAINER= kmoore@FreeBSD.org COMMENT= Multiboot boot loader Modified: head/sysutils/grub2-pcbsd/distinfo ============================================================================== --- head/sysutils/grub2-pcbsd/distinfo Tue Oct 21 14:38:58 2014 (r371323) +++ head/sysutils/grub2-pcbsd/distinfo Tue Oct 21 15:24:01 2014 (r371324) @@ -1,2 +1,2 @@ -SHA256 (grub-2.02_2.tar.xz) = 6cc58fa5629e47a512b416810caf148f3659b039d2080fbd0b6b8c9c82958aab -SIZE (grub-2.02_2.tar.xz) = 4463684 +SHA256 (grub-2.02_3.tar.xz) = 207b1d065f4ef18c77061c047b591a9cd2c946f5c320bdbf0fd48f41e02e4711 +SIZE (grub-2.02_3.tar.xz) = 4466580 Modified: head/sysutils/grub2-pcbsd/files/patch-grub-core_disk_geli.c ============================================================================== --- head/sysutils/grub2-pcbsd/files/patch-grub-core_disk_geli.c Tue Oct 21 14:38:58 2014 (r371323) +++ head/sysutils/grub2-pcbsd/files/patch-grub-core_disk_geli.c Tue Oct 21 15:24:01 2014 (r371324) @@ -1,5 +1,5 @@ --- grub-core/disk/geli.c.orig 2014-05-15 14:00:10.000000000 -0400 -+++ grub-core/disk/geli.c 2014-05-20 14:46:07.604565349 -0400 ++++ grub-core/disk/geli.c 2014-09-26 10:18:53.325111693 -0400 @@ -225,7 +225,7 @@ /* Look for GELI magic sequence. */ @@ -18,3 +18,13 @@ || grub_le_to_cpu32 (header.version) < 1) { grub_dprintf ("geli", "wrong magic %02x\n", header.magic[0]); +@@ -430,6 +430,9 @@ + if (!grub_password_get (passphrase, MAX_PASSPHRASE)) + return grub_error (GRUB_ERR_BAD_ARGUMENT, "Passphrase not supplied"); + ++ /* Set the GELI passphrase to GRUB env, for passing to FreeBSD kernel */ ++ grub_env_set ("gelipassphrase", passphrase); ++ + /* Calculate the PBKDF2 of the user supplied passphrase. */ + if (grub_le_to_cpu32 (header.niter) != 0) + { Modified: head/sysutils/grub2-pcbsd/files/patch-grub-core_fs_zfs_zfs.c ============================================================================== --- head/sysutils/grub2-pcbsd/files/patch-grub-core_fs_zfs_zfs.c Tue Oct 21 14:38:58 2014 (r371323) +++ head/sysutils/grub2-pcbsd/files/patch-grub-core_fs_zfs_zfs.c Tue Oct 21 15:24:01 2014 (r371324) @@ -5,7 +5,7 @@ #define MAX_SUPPORTED_FEATURE_STRLEN 50 static const char *spa_feature_names[] = { - "org.illumos:lz4_compress",NULL -+ "org.illumos:lz4_compress","com.delphix:hole_birth",NULL ++ "org.illumos:lz4_compress","com.delphix:hole_birth","com.delphix:extensible_dataset","com.delphix:embedded_data",NULL }; static int Added: head/sysutils/grub2-pcbsd/files/patch-grub-core_osdep_unix-platform.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/grub2-pcbsd/files/patch-grub-core_osdep_unix-platform.c Tue Oct 21 15:24:01 2014 (r371324) @@ -0,0 +1,100 @@ +--- grub-core/osdep/unix/platform.c.orig 2014-10-21 10:55:38.203922144 -0400 ++++ grub-core/osdep/unix/platform.c 2014-10-21 10:56:54.300915974 -0400 +@@ -81,52 +81,8 @@ + static void + grub_install_remove_efi_entries_by_distributor (const char *efi_distributor) + { +- int fd; +- pid_t pid = grub_util_exec_pipe ((const char * []){ "efibootmgr", NULL }, &fd); +- char *line = NULL; +- size_t len = 0; +- +- if (!pid) +- { +- grub_util_warn (_("Unable to open stream from %s: %s"), +- "efibootmgr", strerror (errno)); +- return; +- } +- +- FILE *fp = fdopen (fd, "r"); +- if (!fp) +- { +- grub_util_warn (_("Unable to open stream from %s: %s"), +- "efibootmgr", strerror (errno)); +- return; +- } +- +- line = xmalloc (80); +- len = 80; +- while (1) +- { +- int ret; +- char *bootnum; +- ret = getline (&line, &len, fp); +- if (ret == -1) +- break; +- if (grub_memcmp (line, "Boot", sizeof ("Boot") - 1) != 0 +- || line[sizeof ("Boot") - 1] < '0' +- || line[sizeof ("Boot") - 1] > '9') +- continue; +- if (!strcasestr (line, efi_distributor)) +- continue; +- bootnum = line + sizeof ("Boot") - 1; +- bootnum[4] = '\0'; +- if (!verbosity) +- grub_util_exec ((const char * []){ "efibootmgr", "-q", +- "-b", bootnum, "-B", NULL }); +- else +- grub_util_exec ((const char * []){ "efibootmgr", +- "-b", bootnum, "-B", NULL }); +- } +- +- free (line); ++ // We don't have efibootmgr on FreeBSD, have to set externally ++ return; + } + + void +@@ -134,40 +90,8 @@ + const char *efifile_path, + const char *efi_distributor) + { +- const char * efidir_disk; +- int efidir_part; +- efidir_disk = grub_util_biosdisk_get_osdev (efidir_grub_dev->disk); +- efidir_part = efidir_grub_dev->disk->partition ? efidir_grub_dev->disk->partition->number + 1 : 1; +- +- if (grub_util_exec_redirect_null ((const char * []){ "efibootmgr", "--version", NULL })) +- { +- /* TRANSLATORS: This message is shown when required executable `%s' +- isn't found. */ +- grub_util_error (_("%s: not found"), "efibootmgr"); +- } +- +- /* On Linux, we need the efivars kernel modules. */ +-#ifdef __linux__ +- grub_util_exec ((const char * []){ "modprobe", "-q", "efivars", NULL }); +-#endif +- /* Delete old entries from the same distributor. */ +- grub_install_remove_efi_entries_by_distributor (efi_distributor); +- +- char *efidir_part_str = xasprintf ("%d", efidir_part); +- +- if (!verbosity) +- grub_util_exec ((const char * []){ "efibootmgr", "-q", +- "-c", "-d", efidir_disk, +- "-p", efidir_part_str, "-w", +- "-L", efi_distributor, "-l", +- efifile_path, NULL }); +- else +- grub_util_exec ((const char * []){ "efibootmgr", +- "-c", "-d", efidir_disk, +- "-p", efidir_part_str, "-w", +- "-L", efi_distributor, "-l", +- efifile_path, NULL }); +- free (efidir_part_str); ++ // We don't have efibootmgr on FreeBSD, have to set externally ++ return; + } + + void
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410211524.s9LFO2vV024513>