Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Looking to move on from udev - static /dev vs mdevd?
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4  
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
stefan11111
l33t
l33t


Joined: 29 Jan 2023
Posts: 922
Location: Romania

PostPosted: Fri Mar 03, 2023 9:51 pm    Post subject: Reply with quote

This is the configure part of the ebuild:
Code:
multilib_src_configure() {
    local emesonargs=(
        $(meson_use aqua quartz_backend)
        $(meson_use atk-bridge atk_bridge)
        $(meson_use broadway broadway_backend)
        $(meson_use cloudproviders)
        $(meson_use examples demos)
        $(meson_use examples)
        $(meson_native_use_bool gtk-doc gtk_doc)
        $(meson_native_use_bool introspection)
        $(meson_use sysprof profiler)
        $(meson_use wayland wayland_backend)
        $(meson_use X x11_backend)
        -Dcolord=$(usex colord yes no)
        -Dprint_backends=$(usex cups cups,file,lpr file,lpr)
        -Dxinerama=$(usex xinerama yes no)
        # Include backend immodules into gtk itself, to avoid problems like
        # https://gitlab.gnome.org/GNOME/gnome-shell/issues/109 from a
        # user overridden GTK_IM_MODULE envvar
        -Dbuiltin_immodules=backend
        -Dman=true
        -Dtests=false
        -Dtracker3=false
    )
    meson_src_configure
}

I use gtk+::mv.
Code:
# emerge -pqv gtk+::mv
[ebuild   R   ] x11-libs/gtk+-3.24.36  USE="X -adwaita-icon-theme (-aqua) -atk-bridge -broadway -cloudproviders -colord -cups -examples -gtk-doc -introspection -sysprof -test -vim-syntax -wayland -xinerama" ABI_X86="32 (64) (-x32)"

_________________
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
stefan11111
l33t
l33t


Joined: 29 Jan 2023
Posts: 922
Location: Romania

PostPosted: Fri Mar 03, 2023 9:53 pm    Post subject: Reply with quote

NeddySeagoon wrote:
stefan11111,
The *.start scripts in /etc/local.d are run as root by the local service starting.
Its the last service to be started before the login prompt.

Is there a way to run one such script as another(non-root) user?
_________________
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
NeddySeagoon
Administrator
Administrator


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

PostPosted: Fri Mar 03, 2023 10:09 pm    Post subject: Reply with quote

stefan11111,

Probably but I've never needed to do do that, so I don't know.
_________________
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
ukky
Tux's lil' helper
Tux's lil' helper


Joined: 26 Feb 2023
Posts: 109
Location: Montreal, Canada

PostPosted: Fri Mar 03, 2023 10:25 pm    Post subject: Reply with quote

stefan11111 wrote:
Is there a way to run one such script as another(non-root) user?

You could try su.
Try adding this command to your root_script.start in /etc/local.d:
Code:
su --command /path/to/non_root_script.sh --shell /path/to/shell --login non_root_user_name

sudo also can run programs as different user and/or group.
Back to top
View user's profile Send private message
colo-des
Tux's lil' helper
Tux's lil' helper


Joined: 20 May 2011
Posts: 97

PostPosted: Sat Mar 04, 2023 1:11 am    Post subject: Reply with quote

@stefan11111

From version 3.24.36 they stopped using autotools and started using meson,
so the possible options are listed in the meson_options.txt file in the source.
I haven't started creating 3.24.36 yet, I'm updating packages in BLFS, when
I'm done with the new headers, glibc and libtools I'll get started.

Regards.
Back to top
View user's profile Send private message
stefan11111
l33t
l33t


Joined: 29 Jan 2023
Posts: 922
Location: Romania

PostPosted: Sat Mar 04, 2023 8:15 am    Post subject: Reply with quote

How do you manage packages in your lfs install?
_________________
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
colo-des
Tux's lil' helper
Tux's lil' helper


Joined: 20 May 2011
Posts: 97

PostPosted: Sat Mar 04, 2023 11:30 am    Post subject: Reply with quote

stefan11111 wrote:
How do you manage packages in your lfs install?

I started at the end of august 2022, bought two disks and put together a separate raid1 for LFS, in a few days had LFS 11.2 installed,
then continued with BLFS 11.2 when it arrived at the end of october it had openbox and most of the packages whick normally use.
When the updates began to arrive, everything got complicated because many packages, especially those installed with cmake, meson and ninja,
even though they save a text with a list of what they have installed and where, when uninstalling, not all of them uninstall.
Started thinking about creating binary packages and looking for something that is pure bash scripts and ended up choosing pkgutils
and its frontend prt-get which are native to CRUX.
Started creating the binary packages using pkgutils via chroot from gentoo on the BLFS home using fakeroot, the problem was not simple
to solve because I had to recompile again what I had installed in LFS/BLFS in a temporary folder to get the listing installation with
the tree command and thus be able to uninstall them manually or make sure that the binary package overwrites what is installed creating
the binary package of the same version as the one you had installed manually.
Don't use the CRUX ports, just take them as a guide and create my own based on the LFS/BLFS guidelines and personal choices for remove
dependencies that I don't want.
A few days ago completely finished passing everything installed to binary packages, both those of LFS BLFS and those that are not in
LFS/BLFS to those which I call CLFS, at this moment I have 271 ports working perfectly, and boot with grub and use BLFS without any problems
Still missing a lot of packages, but upgrading now is just updating port versions, building the package and upgrading, that's a lot
simpler than creating the ports from scratch.
To create the packages in the fakeroot environment with the command pkgmk from the pkgutils package in the BLFS home.
Code:
my-user [ ~/adm ]$ cd ports/blfs/mesa

Code:
my-user [ ~/adm/ports/blfs/mesa ]$ ls -la
total 28
drwxrwxr-x   2 my-user my-user 4096 feb 21 17:26 .
drwxrwxr-x 159 my-user my-user 4096 mar  4 03:26 ..
-rw-r--r--   1 my-user my-user 3860 feb 21 17:24 .footprint
-rw-r--r--   1 my-user my-user   53 feb 21 17:26 .md5sum
-rw-r--r--   1 my-user my-user 1805 feb 21 16:59 Pkgfile
-rw-r--r--   1 my-user my-user  418 feb 21 17:35 .signature

Code:
my-user [ ~/adm/ports/blfs/mesa ]$ fakeroot pkgmk -f -is

Then as root to install it with:
Code:
root [ /home/my-user/adm/packages ]# pkgadd -u mesa#22.3.5-1.pkg.tar.gz

To check if any dependencies were broken by updating the package with the revdep command from the CRUX prt-utils package:
Code:
root [ /home/my-user/adm/packages ]# revdep -vvv

Code:
my-user [ ~/adm ]$ pkginfo -l pkgutils |grep usr/bin/
usr/bin/
usr/bin/pkgadd       for install package
usr/bin/pkginfo      for list content of packages
usr/bin/pkgmk        for create package
usr/bin/pkgrm        for remove package
usr/bin/rejmerge     similar to etc-update

Soon I will upload the ports to some git to be able to update my pcs from there and for others who want to embark on the same adventure
Have learned a lot, it was worth LFS/BLFS by hand, but you can't upgrade that way, it's just a guide to get an experience unique, but
nothing serious to continue using without binary packages.

Regards.
Back to top
View user's profile Send private message
stefan11111
l33t
l33t


Joined: 29 Jan 2023
Posts: 922
Location: Romania

PostPosted: Sat Mar 04, 2023 12:17 pm    Post subject: Reply with quote

ukky wrote:
stefan11111 wrote:
Is there a way to run one such script as another(non-root) user?

You could try su.
Try adding this command to your root_script.start in /etc/local.d:
Code:
su --command /path/to/non_root_script.sh --shell /path/to/shell --login non_root_user_name

I implemented the -c option in my su and things worked well.
ukky wrote:
sudo also can run programs as different user and/or group.

I do not use su or sudo and instead have written my own versions of these apps to be more minimal.
_________________
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
stefan11111
l33t
l33t


Joined: 29 Jan 2023
Posts: 922
Location: Romania

PostPosted: Sat Mar 04, 2023 12:19 pm    Post subject: Reply with quote

colo-des wrote:
stefan11111 wrote:
How do you manage packages in your lfs install?

I started at the end of august 2022, bought two disks and put together a separate raid1 for LFS, in a few days had LFS 11.2 installed,
then continued with BLFS 11.2 when it arrived at the end of october it had openbox and most of the packages whick normally use.
When the updates began to arrive, everything got complicated because many packages, especially those installed with cmake, meson and ninja,
even though they save a text with a list of what they have installed and where, when uninstalling, not all of them uninstall.
Started thinking about creating binary packages and looking for something that is pure bash scripts and ended up choosing pkgutils
and its frontend prt-get which are native to CRUX.
Started creating the binary packages using pkgutils via chroot from gentoo on the BLFS home using fakeroot, the problem was not simple
to solve because I had to recompile again what I had installed in LFS/BLFS in a temporary folder to get the listing installation with
the tree command and thus be able to uninstall them manually or make sure that the binary package overwrites what is installed creating
the binary package of the same version as the one you had installed manually.
Don't use the CRUX ports, just take them as a guide and create my own based on the LFS/BLFS guidelines and personal choices for remove
dependencies that I don't want.
A few days ago completely finished passing everything installed to binary packages, both those of LFS BLFS and those that are not in
LFS/BLFS to those which I call CLFS, at this moment I have 271 ports working perfectly, and boot with grub and use BLFS without any problems
Still missing a lot of packages, but upgrading now is just updating port versions, building the package and upgrading, that's a lot
simpler than creating the ports from scratch.
To create the packages in the fakeroot environment with the command pkgmk from the pkgutils package in the BLFS home.
Code:
my-user [ ~/adm ]$ cd ports/blfs/mesa

Code:
my-user [ ~/adm/ports/blfs/mesa ]$ ls -la
total 28
drwxrwxr-x   2 my-user my-user 4096 feb 21 17:26 .
drwxrwxr-x 159 my-user my-user 4096 mar  4 03:26 ..
-rw-r--r--   1 my-user my-user 3860 feb 21 17:24 .footprint
-rw-r--r--   1 my-user my-user   53 feb 21 17:26 .md5sum
-rw-r--r--   1 my-user my-user 1805 feb 21 16:59 Pkgfile
-rw-r--r--   1 my-user my-user  418 feb 21 17:35 .signature

Code:
my-user [ ~/adm/ports/blfs/mesa ]$ fakeroot pkgmk -f -is

Then as root to install it with:
Code:
root [ /home/my-user/adm/packages ]# pkgadd -u mesa#22.3.5-1.pkg.tar.gz

To check if any dependencies were broken by updating the package with the revdep command from the CRUX prt-utils package:
Code:
root [ /home/my-user/adm/packages ]# revdep -vvv

Code:
my-user [ ~/adm ]$ pkginfo -l pkgutils |grep usr/bin/
usr/bin/
usr/bin/pkgadd       for install package
usr/bin/pkginfo      for list content of packages
usr/bin/pkgmk        for create package
usr/bin/pkgrm        for remove package
usr/bin/rejmerge     similar to etc-update

Soon I will upload the ports to some git to be able to update my pcs from there and for others who want to embark on the same adventure
Have learned a lot, it was worth LFS/BLFS by hand, but you can't upgrade that way, it's just a guide to get an experience unique, but
nothing serious to continue using without binary packages.

Regards.

Good luck with this. Is seems like a lot of work to maintain such a install.
What performance and dependency improvements do you see over gentoo?
_________________
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
colo-des
Tux's lil' helper
Tux's lil' helper


Joined: 20 May 2011
Posts: 97

PostPosted: Sat Mar 04, 2023 1:06 pm    Post subject: Reply with quote

stefan11111 wrote:

Good luck with this. Is seems like a lot of work to maintain such a install.
What performance and dependency improvements do you see over gentoo?


First what I've learned by installing following the LFS/BLFS guides, I learned things I haven't seen in 14 years of continuous use on gentoo.
I wanted something that is pure bash such as the CRUX Pkgfile, which are much simpler than the gentoo ebuids, which are already on their EAPI=8 version.
and they keep changing, often creating incompatibilities with home ports in local trees.
If in gentoo python breaks you are marinated and baked with potatoes, on the other hand with the CRUX Pkgfile the interpreter is only bash, you can also
statically compile the pkgutils package (which is what I did), if you break a dependency that uses pkgutils as it is statically compiled it doesn't affect it
it's still working.
Then when I finish installing the ports in /usr/ports/ and configure the CRUX prt-get package to use my ports, everything will be simpler.
since prt-get is a front-end of pkgutils and handles dependencies like emerge handles them... haven't gotten around to using prt-get yet but I'm close.
In short, I see that the ports to the CRUX are pure bash and the simplicity of that means that you can create ports of whatever you want in a while
because it is the same procedure that you would do when compiling it by hand but putting those steps in the Pkgfile.
It's just that it's really KISS, you learn a lot and you totally avoid others deciding the dependencies of your packages, although this can be done
in gentoo it is much more complex and very changeable... at least that's how I see it.

Regards.
Back to top
View user's profile Send private message
ukky
Tux's lil' helper
Tux's lil' helper


Joined: 26 Feb 2023
Posts: 109
Location: Montreal, Canada

PostPosted: Sat Mar 04, 2023 4:05 pm    Post subject: Reply with quote

colo-des wrote:
When the updates began to arrive, everything got complicated because many packages, especially those installed with cmake, meson and ninja,
even though they save a text with a list of what they have installed and where, when uninstalling, not all of them uninstall.

Did you check user-based package management for LFS? You might get some helpful ideas from that system.
I tried this approach for LFS, but I didn't get as far as BLFS, just basic LFS installation.
Sorry if this is off-topic.
Back to top
View user's profile Send private message
colo-des
Tux's lil' helper
Tux's lil' helper


Joined: 20 May 2011
Posts: 97

PostPosted: Sat Mar 04, 2023 9:22 pm    Post subject: Reply with quote

ukky wrote:

Did you check user-based package management for LFS? You might get some helpful ideas from that system.
I tried this approach for LFS, but I didn't get as far as BLFS, just basic LFS installation.
Sorry if this is off-topic.

I have read about this system, but in this way the information is saved in one place and it is in the installed file or folder itself, instead a
binary package inherently stores paths, permissions and owners as if it were a database in each package, so if two versions
of the same binary package are different, in each compressed binary the paths, permissions and proper owners will be saved... that is the reason why
which all package managers use compressed binaries, there is a database on each version of each package that travels with the package itself.
This can be seen even before installing the binary package, by listing its content you will see the paths where they will be installed, with what permissions and with what
owners and will serve as a reference to compare if what has already been installed has changed for xx reasons.
In addition, when the binary package is created at the time of compression, the same date and time is given to each file and folder of the package created, so
they all have the same date and time, which makes for a good visual reference just using ls -l |grep "date time"
Although this talk is off-topic, we are in the Unsupported Software section, I think many readers are interested in reading experiences about LFS/BLFS
because there is little or very little published about the experiences of those who have tried it.

Regards.
Back to top
View user's profile Send private message
stefan11111
l33t
l33t


Joined: 29 Jan 2023
Posts: 922
Location: Romania

PostPosted: Fri Mar 10, 2023 1:04 pm    Post subject: Reply with quote

ukky wrote:

Using dhcpcd hooks might be another option:
Code:
man 8 dhcpcd-run-hooks

This was the solution. I also removed netmount from the default runlevel, as it failed to mount network drives.
_________________
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
stefan11111
l33t
l33t


Joined: 29 Jan 2023
Posts: 922
Location: Romania

PostPosted: Fri Mar 24, 2023 6:57 pm    Post subject: Reply with quote

NeddySeagoon wrote:

Oh and /dev/snd/ gets mangled from time to time. It correlates with updates but I don't know which packages does it yet.

I did some --emptytree updates and the same thing happened to me, even though I have:
Code:
# CONFIG_SND_DYNAMIC_MINORS is not set

Do you have a list of suspects for this problem?
I use this script to create the proper /dev/snd nodes and set permissions when something happens:
Code:
$ cat mknod_snd
mkdir -m 777 /dev/snd
mknod -m 777 /dev/snd/controlC0 c 116 0
mknod -m 777 /dev/snd/pcmC0D0p c 116 16
mknod -m 777 /dev/snd/timer c 116 33
mknod -m 777 /dev/snd/seq c 166 1
mknod -m 777 /dev/snd/controlC2 c 116 64
mknod -m 777 /dev/snd/controlC1 c 116 32
mknod -m 777 /dev/snd/pcmC0D0c c 116 24
mknod -m 777 /dev/snd/hwC1D0 c 116 36
mknod -m 777 /dev/snd/hwC2D0 c 116 68
mknod -m 777 /dev/snd/pcmC1D0c c 116 56
mknod -m 777 /dev/snd/pcmC1D0p c 116 48
mknod -m 777 /dev/snd/pcmC1D1p c 116 49
mknod -m 777 /dev/snd/pcmC1D2c c 116 58
mknod -m 777 /dev/snd/pcmC2D0p c 116 80
mknod -m 777 /dev/snd/pcmC2D3p c 116 83
chown root:audio /dev/snd/*
chown root:audio /dev/snd
chmod -R a+rw /dev/{audio,dsp,midi,mixer,snd}

_________________
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
stefan11111
l33t
l33t


Joined: 29 Jan 2023
Posts: 922
Location: Romania

PostPosted: Wed Jul 19, 2023 8:31 am    Post subject: Re: Looking to move on from udev - static /dev vs mdevd? Reply with quote

svayar wrote:
stefan11111 wrote:
svayar wrote:
I yote pam and dbus without too much trouble

What browser do you use? I've been trying to remove dbus too, but librewolf depends on it even with USE="-dbus".


Firefox, so fairly similar. Itself, it won't pull dbus without the use flag but it pulls in gtk3, which in turn pulls in at-spi2-core, which pulls in dbus (I don't need any accessibility things on my PC, but gnome devs seem hellbent on removing features people use and making mandatory those that are seldom used...). Keep in mind that this is a method I came to with sifting through forum posts and pestering people on discord / irc, I've only used gentoo for 4-5 months so this is likely a suboptimal way to do it.

To start off with, you'll need an overlay that ships a patched gtk package (either mv or pg_overlay). Now you'll be able to emerge gtk without pulling in at-spi2-core as a dependency, *but* if you don't have it installed the build will fail still.
Personally, I added
Code:
app-accessibility/at-spi2-core-2.46.0
to
Code:
/etc/portage/profile/package.provided
this should shut up about firefox itself pulling it in as a dep. In order to be able to build gtk+ you will need to emerge
Code:
=dev-libs/atk-2.38.0
and preferably mask later versions as world updates might become a sticky situation.

Again, not a pretty solution, but until someone smarter posts something less hacky, it will work. :D

See: https://forums.gentoo.org/viewtopic-t-1164263.html
And: https://gitlab.gnome.org/GNOME/gtk/-/issues/5964
Maybe we can get this upstream.
_________________
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
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Goto page Previous  1, 2, 3, 4
Page 4 of 4

 
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