Hello list,
I'm a sort-of newbie gentoo user and I just wanted to ask if what I'm thinking is possible or if I'm just being stupid. But either way, I was wondering if it is possible to export a list of all installed software
in emerge and use that to recreate on another gentoo install.
I have a bunch of PCs that are all similarly specced and I wanted to create a minimal install "template" for all of them. If not, would it be possible to pipe-in to emerge from stdin an output of all of the package names that I wanted it to emerge?
I'm really sorry if this might be a stupid question. I'd appreciate any guidance in the matter.
Cheers!
Hello list,
I'm a sort-of newbie gentoo user and I just wanted to ask if what I'm thinking is possible or if I'm just being stupid. But either way, I was wondering if it is possible to export a list of all installed software
in emerge and use that to recreate on another gentoo install.
I have a bunch of PCs that are all similarly specced and I wanted to create a minimal install "template" for all of them. If not, would it be possible to pipe-in to emerge from stdin an output of all of the package names that I wanted it to emerge?
I'm really sorry if this might be a stupid question. I'd appreciate any guidance in the matter.
Cheers!
--
. * +
+ Ang kalayaan ay dili gihatag, ini'y giabot.
* + {gopher,gemini}://kalayaan.xyz *
. C4AE 5D53 46A0 01DF 6E92 CB46 92D7 9FBB AB9F 3E37 .
Ramces Tampo-og Red wrote:
Hello list,
I'm a sort-of newbie gentoo user and I just wanted to ask if
what I'm thinking is possible or if I'm just being stupid. But
either way, I was wondering if it is possible to export a list of
all installed software in emerge and use that to recreate on
another gentoo install.
I have a bunch of PCs that are all similarly specced and I
wanted to create a minimal install "template" for all of them. If
not, would it be possible to pipe-in to emerge from stdin an output
of all of the package names that I wanted it to emerge?
I'm really sorry if this might be a stupid question. I'd
appreciate any guidance in the matter.
Cheers!
There is a file that contains all the packages you have installed. It
is located here:
/var/lib/portage/world
One could copy that file to another system and do a emerge @world to
install the same list of packages. Depending on what all you have installed, it could confuse emerge and not be doable. In the past, I
had a copy of the file and I emerged them a few at a time. It's worth trying by just coping the file tho. It just might work.
On Sat, Feb 26, 2022 at 06:47:12PM +0800, Ramces Tampo-og Red wrote:
Hello list,
I'm a sort-of newbie gentoo user and I just wanted to ask if what I'm
thinking is possible or if I'm just being stupid. But either way, I was
wondering if it is possible to export a list of all installed software
in emerge and use that to recreate on another gentoo install.
I have a bunch of PCs that are all similarly specced and I wanted to
create a minimal install "template" for all of them. If not, would it be
possible to pipe-in to emerge from stdin an output of all of the package
names that I wanted it to emerge?
I'm really sorry if this might be a stupid question. I'd appreciate any
guidance in the matter.
Cheers!
emerge -avbk $(tr '\n' ' ' < /var/lib/portage/world)
If your doing more than one box binhost / binpkg has a far higher return
for alot more effort upfront provided you can live with -mtune=generic.
On 2022-02-26 05:07-0600 Dale <rdalek1967@gmail.com> wrote:
Ramces Tampo-og Red wrote:
Hello list,
I'm a sort-of newbie gentoo user and I just wanted to ask if
what I'm thinking is possible or if I'm just being stupid. But
either way, I was wondering if it is possible to export a list of
all installed software in emerge and use that to recreate on
another gentoo install.
I have a bunch of PCs that are all similarly specced and I
wanted to create a minimal install "template" for all of them. If
not, would it be possible to pipe-in to emerge from stdin an output
of all of the package names that I wanted it to emerge?
I'm really sorry if this might be a stupid question. I'd
appreciate any guidance in the matter.
Cheers!
There is a file that contains all the packages you have installed. It
is located here:
/var/lib/portage/world
One could copy that file to another system and do a emerge @world to
install the same list of packages. Depending on what all you have
installed, it could confuse emerge and not be doable. In the past, I
had a copy of the file and I emerged them a few at a time. It's worth
trying by just coping the file tho. It just might work.
It is safer to copy the world file to /etc/portage/sets/¹ and then
emerge the set. This way portage won't think that the packages are
already installed. So you could copy it to
/etc/portage/sets/minimal-install and install it with emerge -a @minimal-install.
Kind regards, tastytea
¹ <https://wiki.gentoo.org/wiki//etc/portage/sets>
spareproject776 <spareproject776@gmail.com> writes:
On Sat, Feb 26, 2022 at 06:47:12PM +0800, Ramces Tampo-og Red wrote:
Hello list,
I'm a sort-of newbie gentoo user and I just wanted to ask if what I'm >> thinking is possible or if I'm just being stupid. But either way, I was >> wondering if it is possible to export a list of all installed software >> in emerge and use that to recreate on another gentoo install.
I have a bunch of PCs that are all similarly specced and I wanted to >> create a minimal install "template" for all of them. If not, would it be >> possible to pipe-in to emerge from stdin an output of all of the package >> names that I wanted it to emerge?
I'm really sorry if this might be a stupid question. I'd appreciate any >> guidance in the matter.
Cheers!
emerge -avbk $(tr '\n' ' ' < /var/lib/portage/world)
If your doing more than one box binhost / binpkg has a far higher return for alot more effort upfront provided you can live with -mtune=generic.
Thanks! I will check this out.
Ramces Tampo-og Red wrote:
Hello list,
I'm a sort-of newbie gentoo user and I just wanted to ask if what I'm
thinking is possible or if I'm just being stupid. But either way, I was
wondering if it is possible to export a list of all installed software
in emerge and use that to recreate on another gentoo install.
I have a bunch of PCs that are all similarly specced and I wanted to
create a minimal install "template" for all of them. If not, would it be
possible to pipe-in to emerge from stdin an output of all of the package
names that I wanted it to emerge?
I'm really sorry if this might be a stupid question. I'd appreciate any
guidance in the matter.
Cheers!
There is a file that contains all the packages you have installed. It
is located here:
/var/lib/portage/world
One could copy that file to another system and do a emerge @world to
install the same list of packages. Depending on what all you have installed, it could confuse emerge and not be doable. In the past, I
had a copy of the file and I emerged them a few at a time. It's worth trying by just coping the file tho. It just might work.
Since you mention being new to Gentoo, don't forget the --oneshot or -1 option when emerging things that should not be in the world file.
Libraries are one thing that should rarely if ever be in that file.
Once you get your install done and rarely install new packages, you can
add that to the defaults in make.conf. When I first started using
Gentoo, I was bad to forget the -1 option and my world file was a mess.
It can lead to all sorts of problems later on. The only entries in the world file should be packages you install and use directly. It's rare
that anything else should be there.
Happy Gentooing.
Dale
:-) :-)
Ramces Tampo-og Red wrote:
Hello list,
I'm a sort-of newbie gentoo user and I just wanted to ask if what I'm
thinking is possible or if I'm just being stupid. But either way, I was
wondering if it is possible to export a list of all installed software
in emerge and use that to recreate on another gentoo install.
I have a bunch of PCs that are all similarly specced and I wanted to
create a minimal install "template" for all of them. If not, would it be
possible to pipe-in to emerge from stdin an output of all of the package
names that I wanted it to emerge?
I'm really sorry if this might be a stupid question. I'd appreciate any
guidance in the matter.
Cheers!
There is a file that contains all the packages you have installed. It
is located here:
/var/lib/portage/world
One could copy that file to another system and do a emerge @world to
install the same list of packages. Depending on what all you have installed, it could confuse emerge and not be doable. In the past, I
had a copy of the file and I emerged them a few at a time. It's worth trying by just coping the file tho. It just might work.
On Saturday, 26 February 2022 12:07:40 GMT Ramces Tampo-og Red wrote:
spareproject776 <spareproject776@gmail.com> writes:
On Sat, Feb 26, 2022 at 06:47:12PM +0800, Ramces Tampo-og Red wrote:
Hello list,
I'm a sort-of newbie gentoo user and I just wanted to ask if what I'm >> >> thinking is possible or if I'm just being stupid. But either way, I was >> >> wondering if it is possible to export a list of all installed software >> >> in emerge and use that to recreate on another gentoo install.
I have a bunch of PCs that are all similarly specced and I wanted to >> >> create a minimal install "template" for all of them. If not, would it be >> >> possible to pipe-in to emerge from stdin an output of all of the package >> >> names that I wanted it to emerge?
I'm really sorry if this might be a stupid question. I'd appreciate any >> >> guidance in the matter.
Cheers!
emerge -avbk $(tr '\n' ' ' < /var/lib/portage/world)
If your doing more than one box binhost / binpkg has a far higher return >> > for alot more effort upfront provided you can live with -mtune=generic.
Thanks! I will check this out.
This is the page which explains how to build binary packages on one host and then install them on other PCs, without having to re-complile/rebuild them from source:
https://wiki.gentoo.org/wiki/Binary_package_guide
It saves a lot of time, especially if you want to update slower machines.
This is the page which explains how to build binary packages on one host and >> then install them on other PCs, without having to re-complile/rebuild them >> from source:Thanks! I've been thinking of doing something like this too or probably distcc. But yeah, I'll check this out.
https://wiki.gentoo.org/wiki/Binary_package_guide
It saves a lot of time, especially if you want to update slower machines.
On 26/02/2022 13:20, Ramces Tampo-og Red wrote:
This is the page which explains how to build binary packages onThanks! I've been thinking of doing something like this too or
one host and then install them on other PCs, without having to
re-complile/rebuild them from source:
https://wiki.gentoo.org/wiki/Binary_package_guide
It saves a lot of time, especially if you want to update slower
machines.
probably distcc. But yeah, I'll check this out.
Ummm ...
I notice it requires portage 3.0.31.
My system (updated last week) is on 3.0.30. So it's VERY new, I
presume ...
On 26/02/2022 11:07, Dale wrote:
Ramces Tampo-og Red wrote:
Hello list,
I'm a sort-of newbie gentoo user and I just wanted to ask if what I'm >>> thinking is possible or if I'm just being stupid. But either way, I was >>> wondering if it is possible to export a list of all installed software >>> in emerge and use that to recreate on another gentoo install.
I have a bunch of PCs that are all similarly specced and I wanted to >>> create a minimal install "template" for all of them. If not, would it be >>> possible to pipe-in to emerge from stdin an output of all of the package >>> names that I wanted it to emerge?
I'm really sorry if this might be a stupid question. I'd appreciate any >>> guidance in the matter.
Cheers!
There is a file that contains all the packages you have installed. It
is located here:
/var/lib/portage/world
One could copy that file to another system and do a emerge @world to
install the same list of packages. Depending on what all you have
installed, it could confuse emerge and not be doable. In the past, I
had a copy of the file and I emerged them a few at a time. It's worth
trying by just coping the file tho. It just might work.
Someone a while ago gave me a tip along the lines of
emerge < /var/lib/portage/world
I was building a new system and they said this was a good way of getting
the new system to have the same packages as the old one. Mind you, I
think I'd now rather just print off @world and be choosy in what I re-emerge.
Oh - and for quite a while I used the -b -k flags a lot, mostly emerging
on the slower system actually then installing the binary on the fast
one. Sounds odd, but the faster, newer system had a habit of crashing
during an emerge ... Both systems now gone to the Computer Centre in the
Sky :-)
Cheers,
Wol
8
After reading the responses in the thread, this appears to be one way to
do it. Though I think adding it to a set could be a cleaner way? I
haven't tried all of the suggestions yet.
Oh - and for quite a while I used the -b -k flags a lot, mostly emerging
on the slower system actually then installing the binary on the fast
one. Sounds odd, but the faster, newer system had a habit of crashing during an emerge ... Both systems now gone to the Computer Centre in the Sky :-)
That is certainly odd. You would assume that the faster system would be
the one compiling stuff for the slower one. I've been thinking of buying
a couple of old desktops for the sole purpose of being distcc slaves but
I don't know how much that would improve the compile times.
This is the page which explains how to build binary packages on one host and then install them on other PCs, without having to re-complile/rebuild them from source:
https://wiki.gentoo.org/wiki/Binary_package_guide
It saves a lot of time, especially if you want to update slower machines.
Dale <rdalek1967@gmail.com> writes:
Since you mention being new to Gentoo, don't forget the --oneshot or -1Wait. Does this mean doing an emerge --ask foo-libs/lib or do you mean
option when emerging things that should not be in the world file.
Libraries are one thing that should rarely if ever be in that file.
Once you get your install done and rarely install new packages, you can
add that to the defaults in make.conf. When I first started using
Gentoo, I was bad to forget the -1 option and my world file was a mess.
It can lead to all sorts of problems later on. The only entries in the
world file should be packages you install and use directly. It's rare
that anything else should be there.
the stuff that were pulled alongside packages? Since I do think that the packages that I've installed certainly pulled libraries too.
Happy Gentooing.Cheers, you too!
Dale
:-) :-)
Ramces Tampo-og Red wrote:
Dale <rdalek1967@gmail.com> writes:
Since you mention being new to Gentoo, don't forget the --oneshot or -1Wait. Does this mean doing an emerge --ask foo-libs/lib or do you mean
option when emerging things that should not be in the world file.
Libraries are one thing that should rarely if ever be in that file.
Once you get your install done and rarely install new packages, you can
add that to the defaults in make.conf. When I first started using
Gentoo, I was bad to forget the -1 option and my world file was a mess. >>> It can lead to all sorts of problems later on. The only entries in the >>> world file should be packages you install and use directly. It's rare
that anything else should be there.
the stuff that were pulled alongside packages? Since I do think that the
packages that I've installed certainly pulled libraries too.
Happy Gentooing.Cheers, you too!
Dale
:-) :-)
Let's say you run the command emerge firefox because you plan to use it
as a web browser. It is very likely that it will pull in other packages that it needs to work. But, emerge only records firefox in the world
file as that is what you asked for. When firefox updates later, emerge
will find the update and if needed, pull in updates to packages it
depends on that are required. It may have several, it may not but none
of those should be in world. Only things you emerge should go in the
world file.
The way the world file gets things in it that shouldn't be there is when
you run into a issue updating. Let's say you sync and emerge can't find
a clear path to update. What most of us do is update in smaller parts
one or two packages at a time. Sometimes you may have to unmerge a
package and emerge something else to help emerge along. As you are
doing that, you should use -1 for packages that you didn't install
yourself such as Firefox. One package that comes to mind is harfbuzz. There's another that goes with that but I forget the name. If you run
into that, those are packages other things depend on and they shouldn't
be in the world file. So, while getting around that, use the -1
option. In short, things like Firefox, libreoffice, digikam, okular and such are what belongs in world providing your aren't using a meta
package that pulls them in. Things those packages depend on should be managed by emerge itself during normal updates.
Some one else may can explain that better. Sometimes a different view
makes things clearer.
I just wish I knew some of that when I first started. I started running into update problems and someone pointed out I should check my world
file. It was full of stuff that shouldn't be there and some even had versions which prevented updates. It took me a while but I got it
cleaned up and things worked fine. That's when I added -1 to
make.conf. I've had a clean world file ever since.
Tasytea has a good idea on using sets if you prefer that way. I rarely
use sets but a lot of people love them. It does have benefits but it
just isn't for me.
Hope that helps.
Dale
:-) :-)
Dale <rdalek1967@gmail.com> writes:
Tasytea has a good idea on using sets if you prefer that way. I rarelyI am actually very interested with sets. I haven't read enough about it though. But I think I will try it out, it might be a neater way of dealing with packages.
use sets but a lot of people love them. It does have benefits but it
just isn't for me.
Hope that helps.It certainly did!
Dale
:-) :-)
Cheers :-)
On Saturday, 26 February 2022 14:19:15 GMT Ramces Tampo-og Red wrote:
8
After reading the responses in the thread, this appears to be one way to
do it. Though I think adding it to a set could be a cleaner way? I
haven't tried all of the suggestions yet.
In passing, I thought I'd mention that I keep most of my packages in sets: core, base, xorg, plasma, apps and utils. My world file only gets used for temporary or experimental things: it has one entry at the moment.
I did that because of the frequency of reinstalling the system during the worst of plasma's instability.
Oh - and for quite a while I used the -b -k flags a lot, mostly emerging >> > on the slower system actually then installing the binary on the fast
one. Sounds odd, but the faster, newer system had a habit of crashing
during an emerge ... Both systems now gone to the Computer Centre in the >> > Sky :-)
That is certainly odd. You would assume that the faster system would be
the one compiling stuff for the slower one. I've been thinking of buying
a couple of old desktops for the sole purpose of being distcc slaves but
I don't know how much that would improve the compile times.
Counter-intuitive, to say the least, and certainly not the way I do it.
--
Regards,
Peter.
I see. I will be wary of my world file from now on. I'm glad that you mentioned this now since I don't have that much packages installed yet
and I haven't played around with the system enough that there's a chance
that it might break. Knowing this is really handy since it might not be apparent when things that shouldn't be added in the world file are being added to the world file.
On 26/02/2022 22:14, Ramces Tampo-og Red wrote:
I see. I will be wary of my world file from now on. I'm glad that you
mentioned this now since I don't have that much packages installed yet
and I haven't played around with the system enough that there's a chance
that it might break. Knowing this is really handy since it might not be
apparent when things that shouldn't be added in the world file are being
added to the world file.
If you think you might have been guilty of this, just edit your world
file with vim or whatever, delete everything you don't recognise or you recognise as having been done for troubleshooting, and save it. It won't make any difference to your running system. Just be careful not to
delete by accident stuff you really did want (although you could always re-emerge it).
Then try an "emerge --depclean --pretend" and see what would be removed. Last time I did that, I then manually -C'd each package in turn - not
least because I need to update my kernel an d depclean buggers that up
if you're not careful ... always do an emerge, build new kernel,
depclean quickly, in that order, with no sync in the middle! Otherwise
you might end up cursing ...
The other thing is, (and it's probably already been mentioned,) is make
sure you know how to use package.use and package.accept. Don't add
things like ~amd to our global settings, just add them freely for
VERSIONED stuff in those directories. Then as updates come along, all
your changes get left behind as "no longer necessary".
I learnt this the hard way, I enabled ~amd for a package that had no
stable versions, that required a new ~amd version of glibc, that then blocked any attempt to update my system! So there was a trail of
messages on this list as I worked out how to fix the mess :-)
By putting all this stuff in package.accept and package.use, I can keep track, and if the file is old it's probably out of date and ripe for deletion. I can just move it out the way, try an update, and if it blows
up look what's in the file I've moved to see what I need to keep and
what cruft can be deleted.
Cheers,
Wol
Yeah, I was just thinking about that since building a powerful, new
computer around my area is prohibitively expensive. But getting old,
prebuilt computers is ludicrously cheap. I figured that I can get a few
of them for $50-75 and just plug them to an ethernet switch to do the compiling for me.
On Saturday, 26 February 2022 22:47:52 GMT Ramces Tampo-og Red wrote:
Yeah, I was just thinking about that since building a powerful, new
computer around my area is prohibitively expensive. But getting old,
prebuilt computers is ludicrously cheap. I figured that I can get a few
of them for $50-75 and just plug them to an ethernet switch to do the
compiling for me.
Distributed compiling may not be as useful as you think. Not all phases of a
build can be distributed, pre-processing and linking will still take a lot of
time, some packages will not compile over distcc and will fail, any gains in compiling time could be eaten away by network losses, etc. On the other hand
a 'better' PC with more RAM and a faster CPU with more cores could prove transformative in its performance impact, when used as a building server for binary packages to be installed thereafter on slower systems.
I have found older PCs with limited resources eventually reach an EOL as far as their capability to emerge large packages. I have a very old Core 2 Duo Pentium laptop with 4G RAM, which even with MAKEOPTS="-j1" takes forever to build qtwebengine:
genlop -t dev-qt/qtwebengine
Fri Feb 4 20:06:46 2022 >>> dev-qt/qtwebengine-5.15.2_p20211216
merge time: 1 day, 3 hours, 12 minutes and 7 seconds.
Chromium got so slow over the years, I stopped emerging it long ago.
Give distcc a go if you have a spare PC to experiment and want to test % improvements with your setup, but personally I wouldn't invest money on it. Instead I'd save up for a faster machine. YMMV.
On Saturday, 26 February 2022 14:19:15 GMT Ramces Tampo-og Red wrote:
8
After reading the responses in the thread, this appears to be one way to
do it. Though I think adding it to a set could be a cleaner way? I
haven't tried all of the suggestions yet.
In passing, I thought I'd mention that I keep most of my packages in sets: core, base, xorg, plasma, apps and utils. My world file only gets used for temporary or experimental things: it has one entry at the moment.
After reading the responses in the thread, this appears to be one way
to do it. Though I think adding it to a set could be a cleaner way? I haven't tried all of the suggestions yet.
In passing, I thought I'd mention that I keep most of my packages in
sets: core, base, xorg, plasma, apps and utils. My world file only gets
used for temporary or experimental things: it has one entry at the
moment.
On Sat, 26 Feb 2022 16:41:55 +0000, Peter Humphrey wrote:
After reading the responses in the thread, this appears to be one way
to do it. Though I think adding it to a set could be a cleaner way? I haven't tried all of the suggestions yet.
In passing, I thought I'd mention that I keep most of my packages in
sets: core, base, xorg, plasma, apps and utils. My world file only gets used for temporary or experimental things: it has one entry at the
moment.
I use a set for temporary installs, saves polluting the word file. From
time to time I check the set and either remove packages or move them to
world or another set.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 491 |
Nodes: | 16 (2 / 14) |
Uptime: | 127:47:18 |
Calls: | 9,688 |
Calls today: | 4 |
Files: | 13,728 |
Messages: | 6,177,251 |