Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
getbinpkg and package.env
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
tomsky
n00b
n00b


Joined: 19 Apr 2016
Posts: 11

PostPosted: Sat Mar 31, 2018 4:13 pm    Post subject: getbinpkg and package.env Reply with quote

I'm trying to set certain packages to use FEATURES="getbinpkg" only.

So, I set /etc/portage/package.env like so for gcc:

sys-devel/gcc getbinpkg.conf

And

/etc/portage/env/getbinpkg.conf as:

PORTAGE_BINHOST="..."
FEATURES="getbinpkg"

("..." comments out the actual binhost url I'm using)

However, when emerging gcc, it doesn't try to emerge it as a binary package (if I use the values of those two settings in make.conf globally, it does.)

Have I set something wrong?
Back to top
View user's profile Send private message
sebB
l33t
l33t


Joined: 02 Mar 2011
Posts: 806
Location: S.O. France

PostPosted: Mon Apr 02, 2018 8:36 pm    Post subject: Reply with quote

Can you post your make.conf?

To make a test replace your /etc/portage/env/getbinpkg.conf with
PORTAGE_TMPDIR="/home/youruser//tmp"

If gcc build in /home/youruser//tmp, something is wrong in your getbinpkg.conf
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54577
Location: 56N 3W

PostPosted: Mon Apr 02, 2018 9:50 pm    Post subject: Reply with quote

tomsky,

You can leave PORTAGE_BINHOST= in make.conf.
FEATURES= works in package.env and in env
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
tomsky
n00b
n00b


Joined: 19 Apr 2016
Posts: 11

PostPosted: Wed Apr 04, 2018 10:27 am    Post subject: Reply with quote

I placed the PORTAGE_BINHOST setting back in make.conf, and added a custom setting for PORTAGE_TMPDIR in /etc/portage/env/getbinpkg.conf

The new TMPDIR was indeed picked up when I tried to build gcc (so the configuration seems correct - I also ran strace to sanity check the expected files were being read).

However, the FEATURES="getbinpkg" setting in /etc/portage/env/getbinpkg.conf still has no effect (unless it is put in make.conf)
Back to top
View user's profile Send private message
tomsky
n00b
n00b


Joined: 19 Apr 2016
Posts: 11

PostPosted: Wed Apr 04, 2018 10:31 am    Post subject: Reply with quote

Here's make.conf by the way (I've commented out the settings for GENTOO_MIRRORS and PORTAGE_BINHOST)

Code:
CFLAGS="-march=native -O2"
CXXFLAGS="${CFLAGS}"
CHOST="x86_64-pc-linux-gnu"
USE="-X"
CPU_FLAGS_X86="mmx mmxext popcnt sse sse2 sse3"
PORTDIR="/usr/portage"
DISTDIR="${PORTDIR}/distfiles"
PKGDIR="${PORTDIR}/packages"
MAKEOPTS="-j8"

GENTOO_MIRRORS="..."
PORTAGE_BINHOST="..."


[Moderator edit: added [code] tags to preserve output layout. -Hu]
Back to top
View user's profile Send private message
cord
Guru
Guru


Joined: 28 Apr 2007
Posts: 346

PostPosted: Sat Dec 22, 2018 5:22 pm    Post subject: Reply with quote

Did you solve this?

I have similar one. I need binary for large packages that can't build on client (2GiB RAM). Just like topicstarter I create /etc/portage/env/binary which contains
Code:
EMERGE_DEFAULT_OPTS="--getbinpkgonly"

The /etc/portage/package.env contains
Code:
dev-qt/qtwebengine binary

But there's no attempts to download binary...
If I add USE="-alsa", for example, to /etc/portage/env/binary it picked up USE. So, not all make.conf options are supported in /etc/portage/env/binary :?:
Back to top
View user's profile Send private message
freifunk_connewitz
Apprentice
Apprentice


Joined: 08 Feb 2006
Posts: 236

PostPosted: Mon Nov 30, 2020 6:20 pm    Post subject: Reply with quote

I'm unearthing this old thread because I have the same problem.

On a laptop which has a pretty similar hardware as my desktop I want some bigger packets to be emerged as binary packets that the desktop has built. For huge packages like libreoffice, I told the binary host (the desktop) via package.env to use the same CPU FLAGS and USE variables that the client (laptop) has. Built package, copied over to var/cache/binpkgs on the client, rebuilt index (emaint binhost --fix) and tried to emerge.

When I do it manually, it works, like this:
Code:
emerge -k libreoffice


But when I want to do it via package.env, the change is ignored by emerge, it tries to build the package from sources:
Quote:
/etc/portage/package.env:
app-office/libreoffice binpkg

Quote:
/etc/portage/env/binpkg:
FEATURES="getbinpkg"

Also the other variant doesnt work:
Quote:
etc/portage/env/binpkg:
EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} --getbinpkgonly"


Is this a bug in the package environment setting or am I (are we) missing something?

My emerge --info of the client:
Quote:
/etc/portage/env # emerge --info
Portage 3.0.9 (python 3.7.9-final-0, default/linux/amd64/17.1/desktop/plasma, gcc-9.3.0, glibc-2.32-r2, 5.4.60-gentoo x86_64)
=================================================================
System uname: Linux-5.4.60-gentoo-x86_64-Intel-R-_Core-TM-_i5-8265U_CPU_@_1.60GHz-with-gentoo-2.7
KiB Mem: 16064700 total, 12021156 free
KiB Swap: 10485756 total, 10485756 free
Timestamp of repository gentoo: Mon, 30 Nov 2020 16:00:01 +0000
Head commit of repository gentoo: b84c936a10d98389a576368db4351fc0e9cd8134
Head commit of repository sakaki-tools: 571e34870d665e98677caecbd56cf0d399ee4b3c

sh bash 5.0_p18
ld GNU ld (Gentoo 2.34 p6) 2.34.0
app-shells/bash: 5.0_p18::gentoo
dev-java/java-config: 2.3.1::gentoo
dev-lang/perl: 5.30.3::gentoo
dev-lang/python: 2.7.18-r4::gentoo, 3.7.9::gentoo, 3.8.6::gentoo, 3.9.0::gentoo
dev-util/cmake: 3.17.4-r1::gentoo
sys-apps/baselayout: 2.7::gentoo
sys-apps/openrc: 0.42.1::gentoo
sys-apps/sandbox: 2.20::gentoo
sys-devel/autoconf: 2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake: 1.16.2-r1::gentoo
sys-devel/binutils: 2.34-r2::gentoo
sys-devel/gcc: 9.3.0-r1::gentoo
sys-devel/gcc-config: 2.3.2-r1::gentoo
sys-devel/libtool: 2.4.6-r6::gentoo
sys-devel/make: 4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.4-r1::gentoo (virtual/os-headers)
sys-libs/glibc: 2.32-r2::gentoo
Repositories:

gentoo
location: /var/db/repos/gentoo
sync-type: rsync
sync-uri: rsync://rsync.gentoo.org/gentoo-portage
priority: -1000
sync-rsync-extra-opts:
sync-rsync-verify-jobs: 1
sync-rsync-verify-max-age: 24
sync-rsync-verify-metamanifest: yes

sakaki-tools
location: /var/db/repos/sakaki-tools
sync-type: git
sync-uri: https://github.com/sakaki-/sakaki-tools.git
masters: gentoo
priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE CC-Sampling-Plus-1.0"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=skylake -mabm --param l1-cache-line-size=64 --param l1-cache-size=32 --param l2-cache-size=6144 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=skylake -mabm --param l1-cache-line-size=64 --param l1-cache-size=32 --param l2-cache-size=6144 -O2 -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-march=skylake -mabm --param l1-cache-line-size=64 --param l1-cache-size=32 --param l2-cache-size=6144 -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms split-elog strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=skylake -mabm --param l1-cache-line-size=64 --param l1-cache-size=32 --param l2-cache-size=6144 -O2 -pipe"
GENTOO_MIRRORS="ftp://mirror.netcologne.de/gentoo/ rsync://mirror.netcologne.de/gentoo/ ftp://gentoo.imj.fr/pub/gentoo/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo"
LANG="de_DE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de en"
MAKEOPTS="-j9 -l8"
PKGDIR="/var/cache/binpkgs"
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 --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi activities aes aim alsa amd64 amr berkdb bidi bluetooth branding bzip2 cairo cdda cdr cli crypt cups dbus declarative dri dts dvd dvdr elogind emboss encode exif fam flac fortran ftp gdbm gif gimp gphoto2 gpm gtk gui iconv icu idea imap ipv6 jabber jpeg jpeg2k kde kipi kwallet lcms libglvnd libnotify libtirpc mad mjpeg mng mp3 mp4 mpeg mtp multilib ncurses nls nptl offensive ogg opengl openmp opus pam pango pcre pdf phonon plasma png policykit ppds qml qt5 quicktime readline sdl seccomp semantic-desktop sox spell split-usr ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb v4l vcd vorbis widgets win32codecs wxwidgets x264 xattr xcb xine xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" L10N="de en en-GB" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2 php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python2_7 python3_7" RUBY_TARGETS="ruby25 ruby26" 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: CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Back to top
View user's profile Send private message
Orvas
n00b
n00b


Joined: 03 Oct 2011
Posts: 14

PostPosted: Sat Sep 14, 2024 9:28 pm    Post subject: Reply with quote

Hello,

I have exactly the same problem, FEATURES="getbinpkg" for a specific package in package.env seems to be ignored. I am sure that the files are processed, because changes in USE work. At the moment I don't have any idea how to solve this issues. Can anyone help here?

Thanks!
Orvas
Back to top
View user's profile Send private message
flexibeast
Guru
Guru


Joined: 04 Apr 2022
Posts: 440
Location: Naarm/Melbourne, Australia

PostPosted: Sun Sep 15, 2024 1:13 am    Post subject: Reply with quote

This is an open issue - refer to bug #463964.
Back to top
View user's profile Send private message
Orvas
n00b
n00b


Joined: 03 Oct 2011
Posts: 14

PostPosted: Sun Sep 15, 2024 9:58 am    Post subject: Reply with quote

Hello flexibeast,

thanks for the info. I have tried the binhost a few days ago, because some big packages like firefox, thunderbird, qtwebengine or libreoffice take several hours to build. In the past I have used the special -bin packages, but for example libreoffice-bin is only available in an old version, whereas libreoffice as a binary package is up to date.

Considering the linked bug, is it possible to configure the system to only use binary packages for some specific packages?

Thanks!
Orvas
Back to top
View user's profile Send private message
flexibeast
Guru
Guru


Joined: 04 Apr 2022
Posts: 440
Location: Naarm/Melbourne, Australia

PostPosted: Sun Sep 15, 2024 11:27 am    Post subject: Reply with quote

Orvas wrote:
Considering the linked bug, is it possible to configure the system to only use binary packages for some specific packages?

Not that i'm aware of; the "Gentoo Binary Host Quickstart" page on the wiki currently says:
Quote:
There is currently no way to specify that the binary version of a particular package should be preferred to the source version. The functionality is planned, but there is no specific timeline for implementation at this stage.
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2405

PostPosted: Sun Sep 15, 2024 1:44 pm    Post subject: Reply with quote

The only way to selectively install bindery packages I can think of currently is to terminate when that package build is starting up and fire emerge for it specifically with -g switch, eventually continue with the other packages of three are any left.

The feature you're looking for will eventually come, as develops seem to find the need for it too, but it's uncertain when. I've seen good will from them, but have in mind they are pretty overloaded with issues of more urgent or important matter. I guess if you know how to do it, they may at least look at your patches and who knows, they may even merge them :)

Best Regards,
Georgi


Last edited by logrusx on Mon Sep 16, 2024 2:51 am; edited 1 time in total
Back to top
View user's profile Send private message
eschwartz
Developer
Developer


Joined: 29 Oct 2023
Posts: 214

PostPosted: Sun Sep 15, 2024 5:34 pm    Post subject: Reply with quote

Orvas wrote:
Hello flexibeast,

thanks for the info. I have tried the binhost a few days ago, because some big packages like firefox, thunderbird, qtwebengine or libreoffice take several hours to build. In the past I have used the special -bin packages, but for example libreoffice-bin is only available in an old version, whereas libreoffice as a binary package is up to date.

Considering the linked bug, is it possible to configure the system to only use binary packages for some specific packages?


As a matter of curiosity -- what are your reservations about using the binhost by default for any packages which are available on the binhost?
Back to top
View user's profile Send private message
Orvas
n00b
n00b


Joined: 03 Oct 2011
Posts: 14

PostPosted: Sat Sep 28, 2024 10:50 am    Post subject: Reply with quote

Alright, it is not a really big issue, but it would be a nice feature to have the possibility to choose per package which version to use. Of course, I could select the binhost as the default option, but in general I really like the focus on source code and the optimized compilation. Thank you all for the help and have a nice weekend!
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20484

PostPosted: Sat Sep 28, 2024 3:37 pm    Post subject: Reply with quote

I don't see thunderbird available for the binhost I checked.

One workaround might be to first fetch the binary:
Code:
$ emerge -vgKOfp libreoffice

Local copy of remote index is up-to-date and will be used.

These are the packages that would be fetched, in order:


https://distfiles.gentoo.org/releases/amd64/binpackages/23.0/x86-64/app-office/libreoffice/libreoffice-24.2.6.2-4.gpkg.tar
-O is --nodeps, "Merges specified packages without merging any dependencies."

The downside is that I think you would have to "enable" the binhost configuration before fetching the binaries you want, and then "disable" the config before actually installing them to avoid other binaries you don't want.

I think that would then use your fetched "local" copy of the binary.

Unfortunately I don't see the binhost listed in the outoput of "eselect repository list", so I think you would have to script the enable / disable part.

I'm not on profile 23 yet, so I haven't been able to test the process completely.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
eschwartz
Developer
Developer


Joined: 29 Oct 2023
Posts: 214

PostPosted: Sun Sep 29, 2024 2:54 am    Post subject: Reply with quote

Orvas wrote:
Alright, it is not a really big issue, but it would be a nice feature to have the possibility to choose per package which version to use. Of course, I could select the binhost as the default option, but in general I really like the focus on source code and the optimized compilation. Thank you all for the help and have a nice weekend!


The binhost has some reasonably optimized compilation in the form of two CFLAGS variants: the baseline x86-64 builds and the optimized x86-64-v3 builds. It is most of the advantage of -march=native but not all of it. This is fine for my use at least -- I care more about Gentoo's powerful USE flag functionality than its ability to tune CFLAGS. But fair enough if that's what you care about.

pjp wrote:
I don't see thunderbird available for the binhost I checked.


Hmm, you are right. It's not in the world file for the binhost builders. Might make sense to add it!

pjp wrote:
One workaround might be to first fetch the binary:
Code:
$ emerge -vgKOfp libreoffice

Local copy of remote index is up-to-date and will be used.

These are the packages that would be fetched, in order:


https://distfiles.gentoo.org/releases/amd64/binpackages/23.0/x86-64/app-office/libreoffice/libreoffice-24.2.6.2-4.gpkg.tar
-O is --nodeps, "Merges specified packages without merging any dependencies."

The downside is that I think you would have to "enable" the binhost configuration before fetching the binaries you want, and then "disable" the config before actually installing them to avoid other binaries you don't want.

I think that would then use your fetched "local" copy of the binary.

Unfortunately I don't see the binhost listed in the outoput of "eselect repository list", so I think you would have to script the enable / disable part.

I'm not on profile 23 yet, so I haven't been able to test the process completely.


emerge --usepkg will use built binaries in /var/cache/binpkgs

emerge --getbinpkg will fetch remote packages from the configured binhost and unless you use the "location" config setting in the brand new ~arch version of portage, add it to the database in /var/cache/binpkgs.

If you don't add --getbinpkg to the default emerge options then it's trivial to toggle this without needing a script, just only pass --getbinpkg when downloading libreoffice. Once it is downloaded, I suppose EMERGE_DEFAULT_OPTS="--usepkg" is enough to ensure it is always loaded from that.

Crucially, it is --getbinpkg that enables the binhost configuration. Without --getbinpkg, the binhost configuration is just an ini file that is ignored and does nothing.
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2405

PostPosted: Sun Sep 29, 2024 3:39 am    Post subject: Reply with quote

eschwartz wrote:

pjp wrote:
I don't see thunderbird available for the binhost I checked.


Hmm, you are right. It's not in the world file for the binhost builders. Might make sense to add it!


There's thunderbird-bin. I've been using it for quite a long time.

pjp wrote:

One workaround might be to first fetch the binary:
Code:
$ emerge -vgKOfp libreoffice

Local copy of remote index is up-to-date and will be used.

These are the packages that would be fetched, in order:


https://distfiles.gentoo.org/releases/amd64/binpackages/23.0/x86-64/app-office/libreoffice/libreoffice-24.2.6.2-4.gpkg.tar
-O is --nodeps, "Merges specified packages without merging any dependencies."



This query needs -1/--oneshot, otherwise it'll cause world pollution. Also --nodeps should not be used in the actual command. It'll most probably will pull in a version that does not satisfy your use preferences.

pjp wrote:

Unfortunately I don't see the binhost listed in the outoput of "eselect repository list"


This is not how it works. The binhost is a supplement to the repository*, not a repository by itself. It only contains binary packages, not ebuilds. You enable it by passing --getbinpkg as eschwartz has already mentioned. It's disabled by default unless you enable it in FEATURES or EMERGE_DEFAULT_OPTS.

*any repository? Because I don't see a way it differentiates between repositories.

Best Regards,
Georgi


Last edited by logrusx on Sun Sep 29, 2024 8:48 am; edited 3 times in total
Back to top
View user's profile Send private message
eschwartz
Developer
Developer


Joined: 29 Oct 2023
Posts: 214

PostPosted: Sun Sep 29, 2024 3:46 am    Post subject: Reply with quote

logrusx wrote:

There's thunderbird-bin. I've been using it for quite a long time.


Sure, but then the binhost goes out of its way to provide libreoffice and firefox builds which are also available as -bin packages... :)


logrusx wrote:

*any repository? Because I don't see a way it differentiates between repositories.

Best Regards,
Georgi


The "Packages" index format has a key which is currently identical for every binhost package entry:

Code:
REPO: gentoo
Back to top
View user's profile Send private message
mega_flow
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jun 2016
Posts: 95
Location: Belgium

PostPosted: Sun Sep 29, 2024 4:39 am    Post subject: Reply with quote

I have also found that if I use sudo or su, portage responds differently. With the binpkgs.
it ignores my home server when I use sudo but not with su
_________________
default/linux/amd64/23.0/no-multilib/gnome/systemd gnome:46
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2405

PostPosted: Sun Sep 29, 2024 4:53 am    Post subject: Reply with quote

mega_flow wrote:
I have also found that if I use sudo or su, portage responds differently. With the binpkgs.
it ignores my home server when I use sudo but not with su


That's a separate issue. You're not running it in a clean environment. With su you need to add a dash for a clean environment. I don't know for sudo.

Best Regards,
Georgi
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2405

PostPosted: Sun Sep 29, 2024 9:41 am    Post subject: Reply with quote

I just came up with an idea based on pgp's post above: emerge -gFpv <package(s)>. This will only fetch the binary package(s). Then continue the update with --usepkg. It'll use whatever binary packages that are compatible from the cache. Do not use -O as it'll not respect your use preferences and will most probably pick the binary package for the simplest case (perhaps the default flags for the package). Of course you may need to adjust your use preferences to ensure a binary package can satisfy them.

Best Regards,
Georgi
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20484

PostPosted: Sun Sep 29, 2024 2:59 pm    Post subject: Reply with quote

logrusx wrote:
This is not how it works. The binhost is a supplement to the repository*, not a repository by itself. It only contains binary packages, not ebuilds. You enable it by passing --getbinpkg as eschwartz has already mentioned. It's disabled by default unless you enable it in FEATURES or EMERGE_DEFAULT_OPTS.
Sure, and I didn't make that connection to how it should be used. However, both the ebuild repository and binary repository are configured in /etc/portage/repos.conf, and eselect repository can manage those files. I tried to see if there was a way for eselect to manage the enable and disable of a local configuration. Disabling works (accidentally it seems), but not enabling.

I only update my binary client with -gK to force binary updates. That was the only method I could find that consistently worked when I first first switched to using only binaries for my laptop. It isn't clear to me how portage resolved determining from where it would try to get and use binary packages when a binary repository is configured for use.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2405

PostPosted: Sun Sep 29, 2024 3:05 pm    Post subject: Reply with quote

pjp wrote:
logrusx wrote:
This is not how it works. The binhost is a supplement to the repository*, not a repository by itself. It only contains binary packages, not ebuilds. You enable it by passing --getbinpkg as eschwartz has already mentioned. It's disabled by default unless you enable it in FEATURES or EMERGE_DEFAULT_OPTS.
Sure, and I didn't make that connection to how it should be used. However, both the ebuild repository and binary repository are configured in /etc/portage/repos.conf, and eselect repository can manage those files. I tried to see if there was a way for eselect to manage the enable and disable of a local configuration. Disabling works (accidentally it seems), but not enabling.


I don't get what you're saying. Eselect does not enable or disable binary repositories. You configure them and instruct portage to use them on the command line or in make.conf.

pjp wrote:
It isn't clear to me how portage resolved determining from where it would try to get and use binary packages when a binary repository is configured for use.


eschwartz wrote:

logrusx wrote:

*any repository? Because I don't see a way it differentiates between repositories.

Best Regards,
Georgi


The "Packages" index format has a key which is currently identical for every binhost package entry:

Code:
REPO: gentoo


If you have your own repo or you want to create a binhost for an overlay, you should be able to change that key. Portage will first determine from which repo the package should be emerged and then will look up if there are binary packages with the corresponding key.


EDIT: I saw your other replay quoting eschwarz which kind of makes my explanations redundant. Now I got what you wanted to say above.

Best Regards,
Georgi.


Last edited by logrusx on Sun Sep 29, 2024 3:10 pm; edited 2 times in total
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20484

PostPosted: Sun Sep 29, 2024 3:06 pm    Post subject: Reply with quote

eschwartz wrote:
emerge --usepkg will use built binaries in /var/cache/binpkgs

emerge --getbinpkg will fetch remote packages from the configured binhost and unless you use the "location" config setting in the brand new ~arch version of portage, add it to the database in /var/cache/binpkgs.

If you don't add --getbinpkg to the default emerge options then it's trivial to toggle this without needing a script, just only pass --getbinpkg when downloading libreoffice. Once it is downloaded, I suppose EMERGE_DEFAULT_OPTS="--usepkg" is enough to ensure it is always loaded from that.

Crucially, it is --getbinpkg that enables the binhost configuration. Without --getbinpkg, the binhost configuration is just an ini file that is ignored and does nothing.
Thank you for clarifying. That makes it a lot easier to use as a workaround.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20484

PostPosted: Sun Sep 29, 2024 3:15 pm    Post subject: Reply with quote

logrusx wrote:
I don't get what you're saying. Eselect does not enable or disable binary repositories. You configure them and instruct portage to use them on the command line or in make.conf.
I didn't choose the naming. They are both referred to as a repo. If you put a configuration in repos.conf/ eselect will disable it, but it is obviously an "accident" that it works. In my case, it identified it as "45", so when trying to re-enable it, it enabled the actual repo assigned to that number.
_________________
Quis separabit? Quo animo?
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
Goto page 1, 2  Next
Page 1 of 2

 
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