Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
new rEFInd boot manager ebuild
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
triquetra
n00b
n00b


Joined: 09 Apr 2012
Posts: 46
Location: Kansas, USA

PostPosted: Sun Sep 23, 2012 2:07 am    Post subject: new rEFInd boot manager ebuild Reply with quote

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:

emerge refind:

>>> 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?
Back to top
View user's profile Send private message
khayyam
Advocate
Advocate


Joined: 07 Jun 2012
Posts: 2244

PostPosted: Sun Sep 23, 2012 4:32 am    Post subject: Reply with quote

triquetra ...

odd, as with that very same ebuild ...

Code:
# 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
Back to top
View user's profile Send private message
DaggyStyle
Advocate
Advocate


Joined: 22 Mar 2006
Posts: 4941

PostPosted: Sun Sep 23, 2012 6:33 am    Post subject: Re: new rEFInd boot manager ebuild Reply with quote

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:

emerge refind:

>>> 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
ProjectFootball
Back to top
View user's profile Send private message
Hu
Watchman
Watchman


Joined: 06 Mar 2007
Posts: 9054

PostPosted: Sun Sep 23, 2012 4:00 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
triquetra
n00b
n00b


Joined: 09 Apr 2012
Posts: 46
Location: Kansas, USA

PostPosted: Mon Sep 24, 2012 12:06 am    Post subject: Reply with quote

sudo cat /var/tmp/portage/sys-boot/refind-bin-0.4.5/temp/build.log:

 * 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'
Back to top
View user's profile Send private message
DaggyStyle
Advocate
Advocate


Joined: 22 Mar 2006
Posts: 4941

PostPosted: Mon Sep 24, 2012 6:03 am    Post subject: Reply with quote

triquetra wrote:
sudo cat /var/tmp/portage/sys-boot/refind-bin-0.4.5/temp/build.log:

 * 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
ProjectFootball
Back to top
View user's profile Send private message
khayyam
Advocate
Advocate


Joined: 07 Jun 2012
Posts: 2244

PostPosted: Mon Sep 24, 2012 11:30 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
triquetra
n00b
n00b


Joined: 09 Apr 2012
Posts: 46
Location: Kansas, USA

PostPosted: Mon Sep 24, 2012 2:41 pm    Post subject: Reply with quote

@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?
Back to top
View user's profile Send private message
DaggyStyle
Advocate
Advocate


Joined: 22 Mar 2006
Posts: 4941

PostPosted: Mon Sep 24, 2012 3:21 pm    Post subject: Reply with quote

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
ProjectFootball
Back to top
View user's profile Send private message
khayyam
Advocate
Advocate


Joined: 07 Jun 2012
Posts: 2244

PostPosted: Mon Sep 24, 2012 4:33 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
triquetra
n00b
n00b


Joined: 09 Apr 2012
Posts: 46
Location: Kansas, USA

PostPosted: Thu Sep 27, 2012 2:50 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum