Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 557248 - sys-boot/efibootmgr-0.12: -@ (--append-binary-args) seems to be broken
Summary: sys-boot/efibootmgr-0.12: -@ (--append-binary-args) seems to be broken
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Mike Gilbert
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2015-08-10 18:05 UTC by rod.k
Modified: 2021-01-18 20:35 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rod.k 2015-08-10 18:05:13 UTC
I use a bash script to add items to the efi menu using the following code:

# echo "foo" | iconv -f ascii -t ucs2 | efibootmgr -q -c -d /dev/sda -p 1 -L linux-4.2-rc6 -l "\efi\boot\\linux-4.2-rc6.efi" -@ -

It always worked great before, but now I get the following errors:

efibootmgr: get_extra_args: No such file or directory
efibootmgr: Could not set variable: No such file or directory
efibootmgr: Could not prepare boot variable: No such file or directory



Reproducible: Always

Steps to Reproduce:
1.echo "foo" | iconv -f ascii -t ucs2 | efibootmgr -q -c -d /dev/sda -p 1 -L linux-4.2-rc6 -l "\efi\boot\\linux-4.2-rc6.efi" -@ -
2.
3.
Actual Results:  
efibootmgr: get_extra_args: No such file or directory
efibootmgr: Could not set variable: No such file or directory
efibootmgr: Could not prepare boot variable: No such file or directory


Expected Results:  
add the entry the the efi menu

# emerge --info
Portage 2.2.20 (python 3.4.1-final-0, default/linux/amd64/13.0/desktop/kde, gcc-4.9.3, glibc-2.20-r2, 4.2.0-rc6 x86_64)
=================================================================
System uname: Linux-4.2.0-rc6-x86_64-Intel-R-_Core-TM-_i7-2600K_CPU_@_3.40GHz-with-gentoo-2.2
KiB Mem:    16154348 total,  13748700 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Mon, 10 Aug 2015 15:15:01 +0000
sh bash 4.3_p33-r2
ld GNU ld (Gentoo 2.24 p1.4) 2.24
ccache version 3.1.9 [enabled]
app-shells/bash:          4.3_p33-r2::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.9-r1::gentoo, 3.4.1::gentoo
dev-util/ccache:          3.1.9-r4::gentoo
dev-util/cmake:           3.2.2::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.17::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.13.4::gentoo, 1.15::gentoo
sys-devel/binutils:       2.24-r3::gentoo
sys-devel/gcc:            4.9.3::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.20-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.us.gentoo.org/gentoo-portage
    priority: -1000

local_mods
    location: /usr/local/portage/local_mods
    masters: gentoo
    priority: 0

Installed sets: @mykde-4
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -fomit-frame-pointer -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=native -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS=" --quiet-build --with-bdeps=y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync metadata-transfer news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS=" http://gentoo.osuosl.org/ "
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/usr/portage/distfiles/build_tmp"
USE="X a52 aac acl acpi alsa amd64 branding bzip2 cairo cdr cli consolekit cracklib crypt cups cxx dbus declarative dhclient dri dri3 drm dts dv dvdr egl emboss exif fam firefox flac gbm gdbm gif glamor gles gles2 gles3 gpm gptfdisk graphite gudev hwdb iconv infinality introspection jpeg kde kipi kmod lcms less libkms libnotify lm_sensors lzma mad mjpeg mmx mmxext mng modules mozilla mp3 mp4 mpeg multilib ncurses nptl nsplugin ogg openexr opengl openmp pam pango pcre pdf phonon plasma png policykit ppds pulseaudio python3 qt3support qt4 quicktime readline real sctp sdl session sna speex sqlite sse sse2 ssl startup-notification svg sync-plugin-portage threads tiff truetype udev udisks unicode usb vaapi vorbis vpx webm win32codecs wma wxwidgets xcb xcomposite xml xscreensaver xv xvid zlib" ABI_X86="64" ALSA_CARDS="hda-intel" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_US" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="intel i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 rod.k 2015-08-10 21:00:55 UTC
Further testing shows that the problem seems to be related to reading from stdin.
If I break the above command into two commands using a tempfile, it works as before:

# echo "foo" | iconv -f ascii -t ucs2 > tempfile
# efibootmgr -q -c -d /dev/sda -p 1 -L linux-4.2-rc6 -l "\efi\boot\\linux-4.2-rc6.efi" -@ tempfile
Comment 2 Alex Xu (Hello71) 2015-08-16 00:50:14 UTC
try /dev/stdin.
Comment 3 rod.k 2015-08-16 03:05:41 UTC
(In reply to Alex Xu (Hello71) from comment #2)
> try /dev/stdin.

I'm not sure what you mean.

I tried replacing "-@ -" with "-@ /dev/stdin" and it adds the entry to the efi menu without error, but the extra args from stdin don't get appended.
Comment 4 Mike Gilbert gentoo-dev 2015-08-16 16:29:44 UTC
Please report this upstream.

https://github.com/rhinstaller/efibootmgr/issues
Comment 5 rod.k 2015-08-16 18:52:23 UTC
(In reply to Mike Gilbert from comment #4)
> Please report this upstream.
> 
> https://github.com/rhinstaller/efibootmgr/issues

done
Comment 6 Ian Delaney (RETIRED) gentoo-dev 2015-08-19 03:01:20 UTC
commit 65763ed080b0171742c0e79b0972c3511dfbe6ee
Author: Ian Delaney <idella4@gentoo.org>
Date:   Wed Aug 19 10:06:59 2015 +0800

    app-emulation/aqemu: revbump; add sec. patch
    
    submitted by René Rhéaume via sec. bug #521026

The revbumpd == aqemu-0.8.2-r3.ebuild.
The package builds and installs form the ebuild. It's too soon to expect upstream to have merged the patch.
Comment 7 Ian Delaney (RETIRED) gentoo-dev 2015-08-19 03:36:51 UTC
CANCEL Comment 6 wrong bug disregard 'noise'
Comment 8 Larry the Git Cow gentoo-dev 2021-01-18 20:35:10 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9f6631180eab5e24be3e8a2b09c06d226ff7e1ac

commit 9f6631180eab5e24be3e8a2b09c06d226ff7e1ac
Author:     Theo Anderson <telans@posteo.de>
AuthorDate: 2021-01-18 20:28:02 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2021-01-18 20:34:01 +0000

    sys-boot/efibootmgr: EAPI 7, version bump
    
    Closes: https://bugs.gentoo.org/587094
    Closes: https://bugs.gentoo.org/673536
    Closes: https://bugs.gentoo.org/557248
    Package-Manager: Portage-3.0.13, Repoman-3.0.2
    Signed-off-by: Theo Anderson <telans@posteo.de>
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>
    Closes: https://github.com/gentoo/gentoo/pull/19098

 sys-boot/efibootmgr/Manifest                       |  1 +
 sys-boot/efibootmgr/efibootmgr-17.ebuild           | 39 ++++++++++
 .../efibootmgr/files/efibootmgr-17-clang.patch     | 82 ++++++++++++++++++++++
 .../efibootmgr-17-fix-efivar-37-conflict.patch     | 14 ++++
 4 files changed, 136 insertions(+)