Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
First Kernel Config isn't booting
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon May 29, 2023 9:04 pm    Post subject: Reply with quote

4761,

You should use --oneshot whenever yo emerge something that you do not explicitly require.
That is, for fixing things.

The world file is for things that you want to keep on your system, for whatever reason. The @system set is automatically included in @world.

Portage will manage all the dependencies. Adding dependencies is world pollution. Portage will try to keep them installed, needed or not.
One day, portage will refuse an update with a message like There are no ebuilds for foo/bar. It will be right too. foor/bar will have been removed. You don't require it but you have told portage, possibly accidentally, to keep it,
_________________
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
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5428
Location: Bavaria

PostPosted: Mon May 29, 2023 10:09 pm    Post subject: Reply with quote

4761,

@sam is a Gentoo developer ... so you can trust him 8)

... and you must have no fear with parameter -1 (oneshot) ... if you really would need a package in your /var/lib/portage/world you can always do later an "emerge -n PKGNAME" (--noreplace). This will add the package to the world file without emerging it again. (From "man emerge": "This option can be used to update the world file without rebuilding the packages")
Back to top
View user's profile Send private message
stefan11111
l33t
l33t


Joined: 29 Jan 2023
Posts: 954
Location: Romania

PostPosted: Mon May 29, 2023 11:04 pm    Post subject: Reply with quote

pietinger wrote:

If you really would need a package in your /var/lib/portage/world you can always do later an "emerge -n PKGNAME" (--noreplace). This will add the package to the world file without emerging it again. (From "man emerge": "This option can be used to update the world file without rebuilding the packages")

Why not just use a text editor?
_________________
My overlay: https://github.com/stefan11111/stefan_overlay
INSTALL_MASK="/etc/systemd /lib/systemd /usr/lib/systemd /usr/lib/modules-load.d *udev* /usr/lib/tmpfiles.d *tmpfiles* /var/lib/dbus /usr/bin/gdbus /lib/udev"
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5428
Location: Bavaria

PostPosted: Mon May 29, 2023 11:54 pm    Post subject: Reply with quote

stefan11111 wrote:
Why not just use a text editor?

Because it is not recommended to edit your world file.





( SCNR: :lol: )
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1828
Location: South America

PostPosted: Tue May 30, 2023 9:41 am    Post subject: Reply with quote

pietinger wrote:
stefan11111 wrote:
Why not just use a text editor?

Because it is not recommended to edit your world file.

And it is not recommended because /var/lib/portage/world is an implementation detail. One day Portage authors could theoretically decide that the contents of the @selected set will be stored in a completely different format and filesystem location, and, as long as emerge --noreplace, emerge --oneshot and emerge --deselect continue to work as documented, they can send user complaints about that change to the trash bin.

How likely is such a change of implementation details is another thing, but still...
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
stefan11111
l33t
l33t


Joined: 29 Jan 2023
Posts: 954
Location: Romania

PostPosted: Tue May 30, 2023 9:56 am    Post subject: Reply with quote

GDH-gentoo wrote:
pietinger wrote:
stefan11111 wrote:
Why not just use a text editor?

Because it is not recommended to edit your world file.

And it is not recommended because /var/lib/portage/world is an implementation detail. One day Portage authors could theoretically decide that the contents of the @selected set will be stored in a completely different format and filesystem location, and, as long as emerge --noreplace, emerge --oneshot and emerge --deselect continue to work as documented, they can send user complaints about that change to the trash bin.

How likely is such a change of implementation details is another thing, but still...

How do you check your world file for unneeded programs then?
GDH-gentoo wrote:
they can send user complaints about that change to the trash bin

What's stopping them from doing that with all complaints?
_________________
My overlay: https://github.com/stefan11111/stefan_overlay
INSTALL_MASK="/etc/systemd /lib/systemd /usr/lib/systemd /usr/lib/modules-load.d *udev* /usr/lib/tmpfiles.d *tmpfiles* /var/lib/dbus /usr/bin/gdbus /lib/udev"
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1828
Location: South America

PostPosted: Tue May 30, 2023 10:30 am    Post subject: Reply with quote

stefan11111 wrote:
How do you check your world file for unneeded programs then?

What I use:
Code:
$ emerge --pretend --depclean --verbose | grep @selected

There should be a better user interface for that, though, because output format isn't guaranteed either.

stefan11111 wrote:
What's stopping them from doing that with all complaints?

The perceived validity of each complaint. Technically, nothing, but people are rarely on the unreasonable extreme.
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
stefan11111
l33t
l33t


Joined: 29 Jan 2023
Posts: 954
Location: Romania

PostPosted: Tue May 30, 2023 10:57 am    Post subject: Reply with quote

GDH-gentoo wrote:
stefan11111 wrote:
How do you check your world file for unneeded programs then?

What I use:
Code:
$ emerge --pretend --depclean --verbose | grep @selected

There should be a better user interface for that, though, because output format isn't guaranteed either.

Seems like achieving the same thing, but with extra steps.
Does this have any advantages over nano /var/lib/portage/world ?
_________________
My overlay: https://github.com/stefan11111/stefan_overlay
INSTALL_MASK="/etc/systemd /lib/systemd /usr/lib/systemd /usr/lib/modules-load.d *udev* /usr/lib/tmpfiles.d *tmpfiles* /var/lib/dbus /usr/bin/gdbus /lib/udev"
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1828
Location: South America

PostPosted: Tue May 30, 2023 11:34 am    Post subject: Reply with quote

stefan11111 wrote:
Does this have any advantages over nano /var/lib/portage/world ?

Re-read previous posts about /var/lib/portage/world.
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
stefan11111
l33t
l33t


Joined: 29 Jan 2023
Posts: 954
Location: Romania

PostPosted: Tue May 30, 2023 11:49 am    Post subject: Reply with quote

GDH-gentoo wrote:
stefan11111 wrote:
Does this have any advantages over nano /var/lib/portage/world ?

Re-read previous posts about /var/lib/portage/world.

You mean the fact that it's location may change?
If the file keeps it's name, I can use mlocate to find it.
And such a change will probably be announced.
_________________
My overlay: https://github.com/stefan11111/stefan_overlay
INSTALL_MASK="/etc/systemd /lib/systemd /usr/lib/systemd /usr/lib/modules-load.d *udev* /usr/lib/tmpfiles.d *tmpfiles* /var/lib/dbus /usr/bin/gdbus /lib/udev"
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1828
Location: South America

PostPosted: Tue May 30, 2023 1:15 pm    Post subject: Reply with quote

stefan11111 wrote:
You mean the fact that it's location may change?

Any aspect in which the contained information might be represented. Including, but not limited to, name, location and format of contents. The @selected set is a Portage concept. The world file, an implementation detail. Is the difference clear?

stefan11111 wrote:
And such a change will probably be announced.

Changes to implementation details, not necessarily, that is the point. Changes to public interfaces (e. g. the emerge command), yes.
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
4761
n00b
n00b


Joined: 08 Mar 2023
Posts: 54

PostPosted: Tue May 30, 2023 6:58 pm    Post subject: Reply with quote

Hey there,
sorry for switching topic again. I'm still following @pietingers guide and am at the point where I'd create a seperate home partition.
At this point I have a 512MiB, while the rest is assigned to /.
Is there an easy way to resize my root partition and make a seperate /home partition? And if so, what would be the way to do it and what is an appropriate root-to-/home-ratio in terms of disk space?
Thank you :)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue May 30, 2023 7:56 pm    Post subject: Reply with quote

4761,

It all depends what you want to do. If this is your throw away VM, just make a note for later or add another viirtual disk for /home.
Its also possible to grow the virtual disk.

Root needs about 20G for a command line install. Less if you don't mind dropping distfiles.
For a desktop install with all the bells and whistles, 40G to 60G will cover it.

/home is your user data. How much of that do you have now?
Make /home at least twice that big, because user data accumulates and it takes time and effort to clean it out, then you wish you still had things that got cleaned.

Shrinking a partition is risky, you may need to reach for your backups.
_________________
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
4761
n00b
n00b


Joined: 08 Mar 2023
Posts: 54

PostPosted: Tue May 30, 2023 8:22 pm    Post subject: Reply with quote

Thank you for clarifying! :)
I will give this more though when installing it on a real device.
While I have followed @pietinger's guide very closely, I did notice that I wouldn't mind missing out on a couple of security features.
Do you personally think that a seperate home partition is necessary/worth it, or would a single / partition do the job for the average Joe like me. :D
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5428
Location: Bavaria

PostPosted: Tue May 30, 2023 8:26 pm    Post subject: Reply with quote

4761 wrote:
Do you personally think that a seperate home partition is necessary/worth it, or would a single / partition do the job for the average Joe like me. :D

May I answer ... ? ... Yes, you dont need a seperate home partition ... if you are the only user (or only family / trusted users) on your system. I would suggest it for a server if you have many users.

It is recommend in my guide because 1. it is for paranoid people ;-) and 2. it is also recommended in our Wiki security handbook ... 8) ... and I cannot go below this.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue May 30, 2023 8:51 pm    Post subject: Reply with quote

4761,

I would recommend a separate /home. Not for security, for ease of control and backups.
I would recommend Logical Volume Manager too and use logical volumes rather than partitions.

Adding free space to a logical volume, the resizing the filesystem does not even require a reboot.
Shrinking a filesystem is usually an offline activity as the content have no me moved around.
Shrinking the LV to move the space elsewhere is an online activity but the filesystem must be shrunk first.

Maybe Logical Volume Manager is just a distraction just now.
_________________
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
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Goto page Previous  1, 2
Page 2 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