Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

new rEFInd boot manager ebuild

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
11 posts • Page 1 of 1
Author
Message
triquetra
Tux's lil' helper
Tux's lil' helper
Posts: 93
Joined: Mon Apr 09, 2012 3:22 am
Location: Kansas, USA

new rEFInd boot manager ebuild

  • Quote

Post by triquetra » Sun Sep 23, 2012 2:07 am

I'm attempting to create an e-build for the rEFInd boot manager. It can be compiled with gnu-efi 3.0l or later or Tianocore EDK2. I have a source ebuild prepared, but I cannot seem to compile a compatible gnu-efi, and I don't really want to install EDK2 because it seems very heavy simply to install this boot manager.

So, I've made a binary ebuild, but I've hit an error I cannot figure out. After successfully creating the manifest, and attempting to emerge the refind binary, I get the following error:

Code: Select all

>>> Verifying ebuild manifests
>>> Emerging (1 of 1) sys-boot/refind-bin-0.4.5 from x-portage
>>> Failed to emerge sys-boot/refind-bin-0.4.5
>>> Jobs: 0 of 1 complete, 1 failed                 Load avg: 0.46, 0.39, 0.40

 * Messages for package sys-boot/refind-bin-0.4.5:

 * ERROR: sys-boot/refind-bin-0.4.5 failed (unpack phase):
 *   failure unpacking refind-bin-0.4.5.zip
 * 
 * Call stack:
 *          ebuild.sh, line   85:  Called src_unpack
 *        environment, line 2096:  Called _eapi0_src_unpack
 *   phase-helpers.sh, line  530:  Called unpack 'refind-bin-0.4.5.zip'
 *   phase-helpers.sh, line  306:  Called die
 * The specific snippet of code:
 *   				( set +x ; while true ; do echo n || break ; done ) | \
 *   				unzip -qo "${srcdir}${x}" || die "$myfail"
 * 
 * If you need support, post the output of `emerge --info '=sys-boot/refind-bin-0.4.5'`,
 * the complete build log and the output of `emerge -pqv '=sys-boot/refind-bin-0.4.5'`.
 * This ebuild is from an overlay named 'x-portage': '/usr/local/portage/'
 * The complete build log is located at '/var/tmp/portage/sys-boot/refind-bin-0.4.5/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-boot/refind-bin-0.4.5/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-boot/refind-bin-0.4.5/work'
 * S: '/var/tmp/portage/sys-boot/refind-bin-0.4.5/work/refind-bin-0.4.5'
I am able to download and unzip the binary archive, so it appears that my computer has the required programs to unpack this, but portage can't seem to figure it out. Any ideas about how to fix this?
Top
khayyam
Watchman
Watchman
User avatar
Posts: 6227
Joined: Thu Jun 07, 2012 2:45 am
Location: Room 101

  • Quote

Post by khayyam » Sun Sep 23, 2012 4:32 am

triquetra ...

odd, as with that very same ebuild ...

Code: Select all

# ebuild refind-bin-0.4.5.ebuild unpack
 * refind-bin-0.4.5.zip SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ]
 * checking ebuild checksums ;-) ... [ ok ]
[...]
>>> Unpacking source...
>>> Unpacking refind-bin-0.4.5.zip to /var/tmp/portage/sys-boot/refind-bin-0.4.5/work
>>> Source unpacked in /var/tmp/portage/sys-boot/refind-bin-0.4.5/work
best ... khay
Top
DaggyStyle
Watchman
Watchman
User avatar
Posts: 5969
Joined: Wed Mar 22, 2006 6:57 am

Re: new rEFInd boot manager ebuild

  • Quote

Post by DaggyStyle » Sun Sep 23, 2012 6:33 am

triquetra wrote:I'm attempting to create an e-build for the rEFInd boot manager. It can be compiled with gnu-efi 3.0l or later or Tianocore EDK2. I have a source ebuild prepared, but I cannot seem to compile a compatible gnu-efi, and I don't really want to install EDK2 because it seems very heavy simply to install this boot manager.

So, I've made a binary ebuild, but I've hit an error I cannot figure out. After successfully creating the manifest, and attempting to emerge the refind binary, I get the following error:

Code: Select all

>>> Verifying ebuild manifests
>>> Emerging (1 of 1) sys-boot/refind-bin-0.4.5 from x-portage
>>> Failed to emerge sys-boot/refind-bin-0.4.5
>>> Jobs: 0 of 1 complete, 1 failed                 Load avg: 0.46, 0.39, 0.40

 * Messages for package sys-boot/refind-bin-0.4.5:

 * ERROR: sys-boot/refind-bin-0.4.5 failed (unpack phase):
 *   failure unpacking refind-bin-0.4.5.zip
 * 
 * Call stack:
 *          ebuild.sh, line   85:  Called src_unpack
 *        environment, line 2096:  Called _eapi0_src_unpack
 *   phase-helpers.sh, line  530:  Called unpack 'refind-bin-0.4.5.zip'
 *   phase-helpers.sh, line  306:  Called die
 * The specific snippet of code:
 *   				( set +x ; while true ; do echo n || break ; done ) | \
 *   				unzip -qo "${srcdir}${x}" || die "$myfail"
 * 
 * If you need support, post the output of `emerge --info '=sys-boot/refind-bin-0.4.5'`,
 * the complete build log and the output of `emerge -pqv '=sys-boot/refind-bin-0.4.5'`.
 * This ebuild is from an overlay named 'x-portage': '/usr/local/portage/'
 * The complete build log is located at '/var/tmp/portage/sys-boot/refind-bin-0.4.5/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-boot/refind-bin-0.4.5/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-boot/refind-bin-0.4.5/work'
 * S: '/var/tmp/portage/sys-boot/refind-bin-0.4.5/work/refind-bin-0.4.5'
I am able to download and unzip the binary archive, so it appears that my computer has the required programs to unpack this, but portage can't seem to figure it out. Any ideas about how to fix this?
not without the content of /var/tmp/portage/sys-boot/refind-bin-0.4.5/temp/build.log.
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Top
Hu
Administrator
Administrator
Posts: 24556
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Sun Sep 23, 2012 4:00 pm

Depending on exactly what is wrong, you may need to temporarily duplicate that unzip stanza into your ebuild and remove the quiet option from the call to unzip.
Top
triquetra
Tux's lil' helper
Tux's lil' helper
Posts: 93
Joined: Mon Apr 09, 2012 3:22 am
Location: Kansas, USA

  • Quote

Post by triquetra » Mon Sep 24, 2012 12:06 am

Code: Select all

 * Package:    sys-boot/refind-bin-0.4.5
 * Repository: x-portage
 * USE:        amd64 elibc_glibc kernel_linux multilib userland_GNU
 * FEATURES:   sandbox
>>> Unpacking source...
>>> Unpacking refind-bin-0.4.5.zip to /var/tmp/portage/sys-boot/refind-bin-0.4.5/work
[/var/tmp/portage/sys-boot/refind-bin-0.4.5/distdir/refind-bin-0.4.5.zip]
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of /var/tmp/portage/sys-boot/refind-bin-0.4.5/distdir/refind-bin-0.4.5.zip or
        /var/tmp/portage/sys-boot/refind-bin-0.4.5/distdir/refind-bin-0.4.5.zip.zip, and cannot find /var/tmp/portage/sys-boot/refind-bin-0.4.5/distdir/refind-bin-0.4.5.zip.ZIP, period.
 * ERROR: sys-boot/refind-bin-0.4.5 failed (unpack phase):
 *   failure unpacking refind-bin-0.4.5.zip
 * 
 * Call stack:
 *          ebuild.sh, line   85:  Called src_unpack
 *        environment, line 2096:  Called _eapi0_src_unpack
 *   phase-helpers.sh, line  530:  Called unpack 'refind-bin-0.4.5.zip'
 *   phase-helpers.sh, line  306:  Called die
 * The specific snippet of code:
 *   				( set +x ; while true ; do echo n || break ; done ) | \
 *   				unzip -qo "${srcdir}${x}" || die "$myfail"
 * 
 * If you need support, post the output of `emerge --info '=sys-boot/refind-bin-0.4.5'`,
 * the complete build log and the output of `emerge -pqv '=sys-boot/refind-bin-0.4.5'`.
 * This ebuild is from an overlay named 'x-portage': '/usr/local/portage/'
 * The complete build log is located at '/var/tmp/portage/sys-boot/refind-bin-0.4.5/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-boot/refind-bin-0.4.5/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-boot/refind-bin-0.4.5/work'
 * S: '/var/tmp/portage/sys-boot/refind-bin-0.4.5/work/refind-bin-0.4.5'
Top
DaggyStyle
Watchman
Watchman
User avatar
Posts: 5969
Joined: Wed Mar 22, 2006 6:57 am

  • Quote

Post by DaggyStyle » Mon Sep 24, 2012 6:03 am

triquetra wrote:

Code: Select all

 * Package:    sys-boot/refind-bin-0.4.5
 * Repository: x-portage
 * USE:        amd64 elibc_glibc kernel_linux multilib userland_GNU
 * FEATURES:   sandbox
>>> Unpacking source...
>>> Unpacking refind-bin-0.4.5.zip to /var/tmp/portage/sys-boot/refind-bin-0.4.5/work
[/var/tmp/portage/sys-boot/refind-bin-0.4.5/distdir/refind-bin-0.4.5.zip]
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of /var/tmp/portage/sys-boot/refind-bin-0.4.5/distdir/refind-bin-0.4.5.zip or
        /var/tmp/portage/sys-boot/refind-bin-0.4.5/distdir/refind-bin-0.4.5.zip.zip, and cannot find /var/tmp/portage/sys-boot/refind-bin-0.4.5/distdir/refind-bin-0.4.5.zip.ZIP, period.
 * ERROR: sys-boot/refind-bin-0.4.5 failed (unpack phase):
 *   failure unpacking refind-bin-0.4.5.zip
 * 
 * Call stack:
 *          ebuild.sh, line   85:  Called src_unpack
 *        environment, line 2096:  Called _eapi0_src_unpack
 *   phase-helpers.sh, line  530:  Called unpack 'refind-bin-0.4.5.zip'
 *   phase-helpers.sh, line  306:  Called die
 * The specific snippet of code:
 *   				( set +x ; while true ; do echo n || break ; done ) | \
 *   				unzip -qo "${srcdir}${x}" || die "$myfail"
 * 
 * If you need support, post the output of `emerge --info '=sys-boot/refind-bin-0.4.5'`,
 * the complete build log and the output of `emerge -pqv '=sys-boot/refind-bin-0.4.5'`.
 * This ebuild is from an overlay named 'x-portage': '/usr/local/portage/'
 * The complete build log is located at '/var/tmp/portage/sys-boot/refind-bin-0.4.5/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-boot/refind-bin-0.4.5/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-boot/refind-bin-0.4.5/work'
 * S: '/var/tmp/portage/sys-boot/refind-bin-0.4.5/work/refind-bin-0.4.5'
can you do the process manually? (meaning unzip and compile)
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Top
khayyam
Watchman
Watchman
User avatar
Posts: 6227
Joined: Thu Jun 07, 2012 2:45 am
Location: Room 101

  • Quote

Post by khayyam » Mon Sep 24, 2012 11:30 am

DaggyStyle wrote:can you do the process manually? (meaning unzip and compile)
DaggyStyle ... please read the thread before posting. See my post above where the .zip is checksum'd and unpacked, and then read the very first post, where it should be clear that there is nothing to compile.

best ... khay
Top
triquetra
Tux's lil' helper
Tux's lil' helper
Posts: 93
Joined: Mon Apr 09, 2012 3:22 am
Location: Kansas, USA

  • Quote

Post by triquetra » Mon Sep 24, 2012 2:41 pm

@DaggyStyle: Yes, I am able to manually download and unzip the archive, but there is nothing to compile since this is a binary distribution.

@khayyam: Since it seems you are able to use this ebuild to download and unpack the zip file, I presume the error is specific to my system, though I'm not sure what it could be. Any ideas?
Top
DaggyStyle
Watchman
Watchman
User avatar
Posts: 5969
Joined: Wed Mar 22, 2006 6:57 am

  • Quote

Post by DaggyStyle » Mon Sep 24, 2012 3:21 pm

khayyam wrote:
DaggyStyle wrote:can you do the process manually? (meaning unzip and compile)
DaggyStyle ... please read the thread before posting. See my post above where the .zip is checksum'd and unpacked, and then read the very first post, where it should be clear that there is nothing to compile.

best ... khay
failed to notice the bin suffix, my bad.
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Top
khayyam
Watchman
Watchman
User avatar
Posts: 6227
Joined: Thu Jun 07, 2012 2:45 am
Location: Room 101

  • Quote

Post by khayyam » Mon Sep 24, 2012 4:33 pm

triquetra wrote:@khayyam: Since it seems you are able to use this ebuild to download and unpack the zip file, I presume the error is specific to my system, though I'm not sure what it could be. Any ideas?
triquetra ... I'm not exactly sure, the command in the eutils.eclass is " unzip -p", and unzip is provided by app-arch/unzip (in my case 6.0-r1) so perhaps this is not installed your end?

best ... khay

p.s. re the ebuild itself there are may things that really need attention, ie if you DEPEND="sys-boot/efibootmgr" then a "which efibootmgr 2> /dev/null" is wasted. Similarly, packages should not be doing anything to NVRAM (efivars), this is entriely out of the scope of a package, at most it should ewarn in postinst(), also, I don't think a package should mount, or load modules.
Top
triquetra
Tux's lil' helper
Tux's lil' helper
Posts: 93
Joined: Mon Apr 09, 2012 3:22 am
Location: Kansas, USA

  • Quote

Post by triquetra » Thu Sep 27, 2012 2:50 pm

After performing an "emerge -uDN world" the "End-of-central-directory signature not found" errors went away. I then got "Filesize does not match recorded size" errors. I deleted the distfile and the manifest, rebuilt the manifest, and the download and unpack phase seems to be working now.

I really appreciate the constructive criticism of the ebuild, khayyam, but I don't have time to look into those things at the moment. In the next couple days I'll revisit the ebuild with your criticisms in mind and see what I can do to correct them.
Top
Post Reply

11 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Authors
Gentoo is a trademark of the Gentoo Foundation, Inc. and of Förderverein Gentoo e.V.
The contents of this document, unless otherwise expressly stated, are licensed under the CC-BY-SA-4.0 license.
The Gentoo Name and Logo Usage Guidelines apply.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy