View previous topic :: View next topic |
Author |
Message |
hjkl Apprentice
Joined: 22 Apr 2021 Posts: 198 Location: Somewhere in Europe
|
Posted: Sat Jun 19, 2021 11:54 am Post subject: Binhost for your laptop via SSH/rsync? |
|
|
Hi,
I just read https://wiki.gentoo.org/wiki/Binary_package_guide and I don't entirely understand how I would transfer all the binaries to my laptop (preferably via SSH or rsync), make portage recognize those binaries and install ONLY the binaries.
All this only via the local network (not setting up your PC to be a server or anything like that)
I'd also be interested in making another Gentoo system on my system that i'd chroot into just to make the binaries for that laptop and only for making those binaries.
Cheers! _________________ Having problems compiling since 2021 |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54242 Location: 56N 3W
|
Posted: Sat Jun 19, 2021 1:40 pm Post subject: |
|
|
fullbyte,
means install the binary or fail. That's the easy bit.
Let me recommend NFS for sharing the binary packages. I know you said you didn't want a server but it saves copying the binaries and other things around the place.
ssh and rsync work too.
There is one thing to be careful of. You make your binary packages against one version of the ::gentoo repo.
Its a really good idea to use that on the host that will install the binaries too, so you need to make the repo and its matching binaries available to the laptop.
Its /etc/portage on the laptop and the build location need to by kept in sync. emerge -K will check the USE flags the binaries are built with.
Building in a chroot may be tricky. It depends on the build CPU and the target CPU.
If the target CPU instruction set is a subset of the build CPU instruction set, its easy.
If the target has instructions that the build host does not, it gets a bit harder. You must not attempt to execute those instructions on the build host.
Now we have to split what get built on the build host in the chroot ond what must execute there.
e.g. if you build gcc in the chroot but can't run it there, that's a problem. If you build KDE there but can't run it, you will probably never know.
That's only intended to be food for thought. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
hjkl Apprentice
Joined: 22 Apr 2021 Posts: 198 Location: Somewhere in Europe
|
Posted: Sat Jun 19, 2021 3:23 pm Post subject: |
|
|
NeddySeagoon wrote: | fullbyte,
means install the binary or fail. That's the easy bit.
Let me recommend NFS for sharing the binary packages. I know you said you didn't want a server but it saves copying the binaries and other things around the place.
ssh and rsync work too.
There is one thing to be careful of. You make your binary packages against one version of the ::gentoo repo.
Its a really good idea to use that on the host that will install the binaries too, so you need to make the repo and its matching binaries available to the laptop.
Its /etc/portage on the laptop and the build location need to by kept in sync. emerge -K will check the USE flags the binaries are built with.
Building in a chroot may be tricky. It depends on the build CPU and the target CPU.
If the target CPU instruction set is a subset of the build CPU instruction set, its easy.
If the target has instructions that the build host does not, it gets a bit harder. You must not attempt to execute those instructions on the build host.
Now we have to split what get built on the build host in the chroot ond what must execute there.
e.g. if you build gcc in the chroot but can't run it there, that's a problem. If you build KDE there but can't run it, you will probably never know.
That's only intended to be food for thought. |
This sounds really complicated.
But thanks, i'll try it. _________________ Having problems compiling since 2021 |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21635
|
Posted: Sat Jun 19, 2021 4:04 pm Post subject: |
|
|
When using --usepkgonly, Portage needs to see the tbz2 files as "local" files, meaning you could use tar to inspect them, cat to print them to terminal, etc. They can be truly local, stored on the same drive (and copied there via sftp / rsync) or pseudo-local, stored remotely and made available locally via an NFS mount or CIFS mount.
Separately, Portage has the --getbinpkgonly feature, which is more suitable for when you want to run an HTTP server on the machine that stores the files, and have Portage explicitly retrieve the tbz2 files over the network. In that case, Portage knows it is downloading files from a remote server, and you don't need a network mount of the tbz2 directory.
If you go with the --usepkgonly route, then it is your responsibility to make the tbz2 files visible "locally" to the consuming Portage. In the simplest case, where every tbz2 file built on the server is suitable for consumption on the client, you can use rsync to copy the server's $PKGDIR to the client's $PKGDIR. This is a bit wasteful if the client is not a full clone, but it is not wrong. Regarding waste, your build server will build packages that are build-time-only dependencies, which the client does not need to install. Your build server might also be building packages for your use, that the client does not need. For example, if you only play games on the server, and use the client only for text processing, there is no need to copy all the gaming-related packages to the client, but a simple rsync will copy them. Portage won't install them without need though, so the waste is not significant. |
|
Back to top |
|
|
hjkl Apprentice
Joined: 22 Apr 2021 Posts: 198 Location: Somewhere in Europe
|
Posted: Sat Jun 19, 2021 8:20 pm Post subject: |
|
|
Hu wrote: | When using --usepkgonly, Portage needs to see the tbz2 files as "local" files, meaning you could use tar to inspect them, cat to print them to terminal, etc. They can be truly local, stored on the same drive (and copied there via sftp / rsync) or pseudo-local, stored remotely and made available locally via an NFS mount or CIFS mount.
Separately, Portage has the --getbinpkgonly feature, which is more suitable for when you want to run an HTTP server on the machine that stores the files, and have Portage explicitly retrieve the tbz2 files over the network. In that case, Portage knows it is downloading files from a remote server, and you don't need a network mount of the tbz2 directory.
If you go with the --usepkgonly route, then it is your responsibility to make the tbz2 files visible "locally" to the consuming Portage. In the simplest case, where every tbz2 file built on the server is suitable for consumption on the client, you can use rsync to copy the server's $PKGDIR to the client's $PKGDIR. This is a bit wasteful if the client is not a full clone, but it is not wrong. Regarding waste, your build server will build packages that are build-time-only dependencies, which the client does not need to install. Your build server might also be building packages for your use, that the client does not need. For example, if you only play games on the server, and use the client only for text processing, there is no need to copy all the gaming-related packages to the client, but a simple rsync will copy them. Portage won't install them without need though, so the waste is not significant. |
This sounds really really complicated.
Sorry, im dumb. _________________ Having problems compiling since 2021 |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
Posted: Sat Jun 19, 2021 8:33 pm Post subject: Re: Binhost for your laptop via SSH/rsync? |
|
|
fullbyte wrote: | I'd also be interested in making another Gentoo system on my system that i'd chroot into just to make the binaries for that laptop and only for making those binaries.
Cheers! |
You can chroot into your laptop (over NFS) and emerge practically not using your laptop resources at all, just another way to maintain Gentoo on weaker hardware. _________________ My Gentoo installation notes.
Please learn how to denote units correctly! |
|
Back to top |
|
|
|
|
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
|
|