[gentoo-user] Re: About using only precompiled pkgs

2017-07-07 Thread Harry Putnam
Rich Freeman  writes:

> I would tell you to search the list archives, but I really struggle to
> get Google to find anything there.

Well said.  Thank you for the script.  They are giving me some ideas.




Re: [gentoo-user] Re: About using only precompiled pkgs

2017-07-06 Thread Rich Freeman
On Thu, Jul 6, 2017 at 8:55 AM, Harry Putnam  wrote:
> Rich Freeman  writes:
>
> "I also have gentoo pre-build binary packages where it can
> overnight..."
>
> Not so much interested in binary... now that I see its really sort of
> a non-starter for someone looking to avoid `emerge world' where
> posssible, but I am interested in how your overnight runs are done,
> the details, as they might apply to getting parts or all of an update
> done unattended. Perhaps parts of your system can be adapted for use
> where emerging all or parts of an update are the goal.

I would tell you to search the list archives, but I really struggle to
get Google to find anything there.

At night I run a script which does an emerge --sync, emails me the
output of emerge -pu world, and then tries to build binary packages of
everything in it.

The next morning I read my email to see what is to be updated, and if
I'm happy I just do the emerge with a -k to use binary packages where
available.

I'll detail the scripts below since searching is not turning out well.

> Can you flesh out some of the details? Especially the `where it can'
> part.  How do you know what can or or can't be done unattended?

The issue is when there are layers of dependencies being built.  If
package A and B need to be updated, and B depends on A at build time,
then portage can only create a binary package for A, unless you want
it to actually install the package.  I'm not building these in some
kind of chroot or container - I'm using --buildpkgonly so it never
gets installed.

I guess another option would be to spin up a container/etc, do all the
building and packaging, and then destroy the container.  Then I'd have
a complete sent of binary packages.  I should think about that, though
I'd probably want it to use a snapshot of my root when doing so and
that could get tricky (since my host isn't intended to be used as a
template).

If you wanted to do a full unintended install there would be no issues
at all, other than the risk that you might walk in and find the
computer not working and have to figure out why.  I prefer to review
my updates before installing them - Gentoo has gotten a LOT better at
this stuff but it isn't Debian stable or RHEL/CentOS.

Here are my scripts.
This does an emerge sync (called from cron):
https://github.com/rich0/rich0-gentoo-scripts/blob/master/emergesync

This does the package builds (called from previous script):
https://github.com/rich0/rich0-gentoo-scripts/blob/master/buildupdates

This package installs the updates (called manually after I review the
emailed proposed changes):
https://github.com/rich0/rich0-gentoo-scripts/blob/master/instupdates

The whole thing could be refactored and cleaned up, since the emerge
parameters are hard-coded in each script.  But, it is good enough for
my purposes.  These are very safe to use since nothing gets installed
unless you ask for it.  It is nice having portage build chromium
overnight and then I just do a 30 second install the next morning.
However, for something like a qt/kde update you're still going to
watch a lot of stuff build.  If all it saves me is kdelibs I'll
consider it a win.

-- 
Rich



[gentoo-user] Re: About using only precompiled pkgs

2017-07-06 Thread Harry Putnam
Rich Freeman  writes:

[...] snipped informative input

> For a single system there isn't much benefit in general, though for
> reinstalls you can certainly save binary packages of everything you do
> build.  I do this for everything I build.  I also have Gentoo
> pre-build binary packages where it can overnight so that I can do
> quick installs during the day after reviewing the list of new packages
> to install.

This is something of a change of subject ... I'd be interested in
hearing more about what you are talking about when you say:

"I also have gentoo pre-build binary packages where it can
overnight..."

Not so much interested in binary... now that I see its really sort of
a non-starter for someone looking to avoid `emerge world' where
posssible, but I am interested in how your overnight runs are done,
the details, as they might apply to getting parts or all of an update
done unattended. Perhaps parts of your system can be adapted for use
where emerging all or parts of an update are the goal.

Can you flesh out some of the details? Especially the `where it can'
part.  How do you know what can or or can't be done unattended?