Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
SOLVED!!! Question about package.provided
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
dpshak
Apprentice
Apprentice


Joined: 05 May 2005
Posts: 184
Location: Wisconsin

PostPosted: Sun Oct 16, 2022 5:19 am    Post subject: SOLVED!!! Question about package.provided Reply with quote

Hi all,

My question is about 'package.provided.'
Here is the back story: Most of my computers are built around some version of Intel Core processors. Some of them are WOEFULLY out of date! To the point that trying to do a world update is a trip through circular dependency hell! Rather than spending the time to rebuild them from scratch, I hit on the idea of building a 'generic' system; one with the most common apps, used across all of the various computers in the house, in a Virtualbox virtual machine. Then I would copy the /(root) directory and the /boot directory to a USB stick, and copy the contents of the USB stick to the /boot and /(root) directories of the woefully out-of-date computer. In essence, a 'live' stage 4 install. It was my intent to test this on a non mission critical machine. So I set about building 'Gentoo_CurrentAMD64' in Virtualbox. Following the wiki on running Gentoo as a Guest, I ran into a hiccup! Installing 'app-emulation/virtualbox-guest-additions' is required to run Gentoo as a guest. So, on the 'Gentoo_CurrentAMD64, I issue:
Quote:
emerge virtualbox-guest-additions
and this is the result:
Code:
Calculating dependencies 
 * IMPORTANT: 13 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.

... done!

>>> Verifying ebuild manifests

>>> Emerging (1 of 3) sys-devel/bin86-0.16.21-r1::gentoo
 * Fetching files in the background.
 * To view fetch progress, run in another terminal:
 * tail -f /var/log/emerge-fetch.log
>>> Downloading 'http://v3.sk/~lkundrak/dev86/bin86-0.16.21.tar.gz'
--2022-10-15 23:48:27--  http://v3.sk/~lkundrak/dev86/bin86-0.16.21.tar.gz
Resolving v3.sk... 68.183.70.209
Connecting to v3.sk|68.183.70.209|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://v3.sk/~lkundrak/dev86/bin86-0.16.21.tar.gz [following]
--2022-10-15 23:48:27--  https://v3.sk/~lkundrak/dev86/bin86-0.16.21.tar.gz
Connecting to v3.sk|68.183.70.209|:443... connected.
OpenSSL: error:1408F10B:SSL routines:ssl3_get_record:wrong version number
Unable to establish SSL connection.
!!! Couldn't download 'bin86-0.16.21.tar.gz'. Aborting.
 * Fetch failed for 'sys-devel/bin86-0.16.21-r1', Log file:
 *  '/var/tmp/portage/sys-devel/bin86-0.16.21-r1/temp/build.log'

>>> Failed to emerge sys-devel/bin86-0.16.21-r1, Log file:

>>>  '/var/tmp/portage/sys-devel/bin86-0.16.21-r1/temp/build.log'


Apparently there is no maintainer for this package. Wandering around the interwebz suggests that the
Quote:
sys-devel/bin86-0.16.21-r1
package is unique to Gentoo. Now, my 'host' machine has that package installed and this brings about my question. Can I copy the binaries, created by sys-devel/bin86-0.16.21-r1 (/usr/bin/as86, /usr/bin/ld86, and /usr/bin/objdump86), from the host to the guest, and add
Quote:
sys-devel//bin86-0.16.21-r1
to
Quote:
/etc/portage/profile/package.provided
emerge 'virtualbox-guest-additions' and have this work like I would expect it to?

Last edited by dpshak on Sun Oct 16, 2022 10:48 pm; edited 1 time in total
Back to top
View user's profile Send private message
arnvidr
l33t
l33t


Joined: 19 Aug 2004
Posts: 629
Location: Oslo, Norway

PostPosted: Sun Oct 16, 2022 10:37 am    Post subject: Reply with quote

Seems easier to copy the bin86-0.16.21.tar.gz file, if you have it, to your distfiles dir. Or download it through other means (through a browser or something) and put it there. Then the package should build as expected.
_________________
Noone wrote:
anything
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3882

PostPosted: Sun Oct 16, 2022 10:41 am    Post subject: Reply with quote

Code:

sys-devel/bin86-0.16.21-r1

installs just fine.
Plz pick another mirror and run emerge --sync first.
There is the error you get
Code:

Connecting to v3.sk|68.183.70.209|:443... connected.
OpenSSL: error:1408F10B:SSL routines:ssl3_get_record:wrong version number
Unable to establish SSL connection.

The maintainer thing has nothing to do with your failing to install it.
_________________
:)
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9559
Location: beyond the rim

PostPosted: Sun Oct 16, 2022 3:11 pm    Post subject: Reply with quote

Generally speaking, package.provided should only be used when you really need to install a package by some means other than portage while using to to satisfy dependencies. Which is almost never the case.

In this case it seems you simply have a download problem, so it is definitely not needed. Just obtain the source tarball by some other means (manual download, copy from your existing system, use a different mirror, use a different download tool, ...) or alternatively use quickpkg to create a binary package for sys-devel/bin86 that you can the install in your VM.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21918

PostPosted: Sun Oct 16, 2022 3:46 pm    Post subject: Re: Question about package.provided Reply with quote

dpshak wrote:
Then I would copy the /(root) directory and the /boot directory to a USB stick, and copy the contents of the USB stick to the /boot and /(root) directories of the woefully out-of-date computer.
When you do this, be sure to set aside or wipe out the filesystem on the target before you begin, so that you do not end up with files from the old install sitting around that were never overwritten because they are obsolete. If you choose the wipe out option, ensure you have a backup of any configuration files you may want to review later.

Alternately, consider building binpkgs on your new system and letting Portage install those on the outdated machine. This is more trouble and may expose you to some circular dependency issues, but it should be less bad because you only face runtime, rather than runtime and buildtime, dependencies. I have such a system, which due to its intended service (and lack of direct Internet access) often goes without updates for long periods. However, it almost never builds for itself, but instead consumes up-to-date binpkgs built by my primary system. I do not track how often I get circular dependencies on it, but anecdotally it seems rare and easily solved. The binpkg approach has the advantage that you do not need to discard anything from the target.
dpshak wrote:
Installing 'app-emulation/virtualbox-guest-additions' is required to run Gentoo as a guest.
Is this actually required, or just convenient? I have a Gentoo guest in qemu that works fine, and there appears to be no qemu counterpart to that virtualbox package.
dpshak wrote:
Code:
 * IMPORTANT: 13 news items need reading for repository 'gentoo'.
You should read your news. It is usually important.
dpshak wrote:
Can I copy the binaries, created by sys-devel/bin86-0.16.21-r1 (/usr/bin/as86, /usr/bin/ld86, and /usr/bin/objdump86), from the host to the guest, and add
Quote:
sys-devel//bin86-0.16.21-r1
to
Quote:
/etc/portage/profile/package.provided
emerge 'virtualbox-guest-additions' and have this work like I would expect it to?
Even if it worked, it would just create a mess for later. Your goal is to clean up messes, so creating a new one seems counterproductive. I second the suggestions of the other posters to avoid package.provided in favor of either a distfiles or binpkg approach.
Back to top
View user's profile Send private message
dpshak
Apprentice
Apprentice


Joined: 05 May 2005
Posts: 184
Location: Wisconsin

PostPosted: Sun Oct 16, 2022 9:55 pm    Post subject: Reply with quote

arnvidr wrote:
Seems easier to copy the bin86-0.16.21.tar.gz file, if you have it, to your distfiles dir. Or download it through other means (through a browser or something) and put it there. Then the package should build as expected.


Thank you! That was the correct answer!
Or, at least, pointed me in the right direction!

Knowing that the source had to be SOMEWHERE on the host machine, I had done a search ('locate bin86') and nothing came up. After reading your answer, it dawned on me that I had added '/var/cache' to 'PRUNEPATHS' on the host machine... 8O :? :oops:

So I used 'scp' to copy 'bin86-0.16.21.tar.gz' from the host to the guest, and installed it on the guest.

Thanks again!
Back to top
View user's profile Send private message
dpshak
Apprentice
Apprentice


Joined: 05 May 2005
Posts: 184
Location: Wisconsin

PostPosted: Sun Oct 16, 2022 10:10 pm    Post subject: Reply with quote

alamahant wrote:
Code:

sys-devel/bin86-0.16.21-r1

installs just fine.
Plz pick another mirror and run emerge --sync first.
There is the error you get
Code:

Connecting to v3.sk|68.183.70.209|:443... connected.
OpenSSL: error:1408F10B:SSL routines:ssl3_get_record:wrong version number
Unable to establish SSL connection.

The maintainer thing has nothing to do with your failing to install it.


Despite the number of years I've been running Gentoo; I'm not an expert in Portage, or ebuilds; so I'm curious as to how changing to a different mirror would solve the download problem??? When I look at the ebuild:
Code:
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI="8"

inherit toolchain-funcs

DESCRIPTION="Assembler and loader used to create kernel bootsector"
HOMEPAGE="http://v3.sk/~lkundrak/dev86/"
SRC_URI="http://v3.sk/~lkundrak/dev86/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ~arm ~arm64 ~ppc ~ppc64 x86"

PATCHES="${FILESDIR}"/${PN}-0.16.21-amd64-build.patch

src_prepare() {
   use elibc_musl && CPPFLAGS="${CPPFLAGS} -U__linux__"
   sed -i \
      -e '/^PREFIX/s|=.*|=$(DESTDIR)/usr|' \
      -e '/^MANDIR/s|)/man/man1|)/share/man/man1|' \
      -e '/^INSTALL_OPTS/s|-s||' \
      -e "/^CFLAGS/s|=.*|=${CFLAGS} -D_POSIX_SOURCE ${CPPFLAGS}|" \
      -e "/^LDFLAGS/s|=.*|=${LDFLAGS}|" \
      Makefile || die
   tc-export CC
   default
}

src_install() {
   dodir /usr/bin /usr/share/man/man1
   default
}
the package download location (the address that's failing) in the ebuild
Quote:
SRC_URI="http://v3.sk/~lkundrak/dev86/${P}.tar.gz"
is not going to change, regardless of the mirror that I use...

Am I missing something?
Back to top
View user's profile Send private message
dpshak
Apprentice
Apprentice


Joined: 05 May 2005
Posts: 184
Location: Wisconsin

PostPosted: Sun Oct 16, 2022 10:46 pm    Post subject: Re: Question about package.provided Reply with quote

Hu wrote:
dpshak wrote:
Then I would copy the /(root) directory and the /boot directory to a USB stick, and copy the contents of the USB stick to the /boot and /(root) directories of the woefully out-of-date computer.
When you do this, be sure to set aside or wipe out the filesystem on the target before you begin, so that you do not end up with files from the old install sitting around that were never overwritten because they are obsolete. If you choose the wipe out option, ensure you have a backup of any configuration files you may want to review later.

Alternately, consider building binpkgs on your new system and letting Portage install those on the outdated machine. This is more trouble and may expose you to some circular dependency issues, but it should be less bad because you only face runtime, rather than runtime and buildtime, dependencies. I have such a system, which due to its intended service (and lack of direct Internet access) often goes without updates for long periods. However, it almost never builds for itself, but instead consumes up-to-date binpkgs built by my primary system. I do not track how often I get circular dependencies on it, but anecdotally it seems rare and easily solved. The binpkg approach has the advantage that you do not need to discard anything from the target.
dpshak wrote:
Installing 'app-emulation/virtualbox-guest-additions' is required to run Gentoo as a guest.
Is this actually required, or just convenient? I have a Gentoo guest in qemu that works fine, and there appears to be no qemu counterpart to that virtualbox package.
dpshak wrote:
Code:
 * IMPORTANT: 13 news items need reading for repository 'gentoo'.
You should read your news. It is usually important.
dpshak wrote:
Can I copy the binaries, created by sys-devel/bin86-0.16.21-r1 (/usr/bin/as86, /usr/bin/ld86, and /usr/bin/objdump86), from the host to the guest, and add
Quote:
sys-devel//bin86-0.16.21-r1
to
Quote:
/etc/portage/profile/package.provided
emerge 'virtualbox-guest-additions' and have this work like I would expect it to?
Even if it worked, it would just create a mess for later. Your goal is to clean up messes, so creating a new one seems counterproductive. I second the suggestions of the other posters to avoid package.provided in favor of either a distfiles or binpkg approach.


Let me see if I can address all of this:
1) My intention was to use 'parted' to nuke the /boot and /(root) partitions, and then copy the files from the USB stick to the new partitions. '/home/*' resides on a separate partition and yes, the '/home/*' files are backed up...just in case!
2) I've never used 'binpkgs.' I will look into that! Thank you.
3) I'm going to say the 'virtualbox-guest-additions' is required. This is my 3rd, or 4th attempt at building this VM. I've had various issues along the way, most of which I've solved with this latest attempt. X11, and GUI apps, are where the most recent VM failed - X wouldn't start. So I RTFM (the wiki) and it said I needed that package to run Gentoo as a guest in Virtualbox.
4) As far as the news goes: yes! I've read them all and have applied them as required. Keep in mind, this is a new VM. The oldest news item is from 2018 (Migration required for OpenSSH with LDAP) and the newest is from 2022 (Python 3.10 to become default on 2022-07-01).
5) Thanks to arnvidr I figured out a better way to solve my problem!
Back to top
View user's profile Send private message
dpshak
Apprentice
Apprentice


Joined: 05 May 2005
Posts: 184
Location: Wisconsin

PostPosted: Sun Oct 16, 2022 10:47 pm    Post subject: Reply with quote

Thanks to all that replied! :D

I have fixed the immediate problem (emerging bin86) and am on to the next step...
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