Re: [gentoo-user] Systemd query ...

2023-05-16 Thread David M. Fellows
>Le lun. 15 mai 2023 à 11:58, Wols Lists  a écrit :
>
>> Nothing to do with but sparked by the Apache problem ...
>>
>> One of the emails mentioned that the "ExecStop" section didn't appear to
>> be working ... That's caused me considerable grief in a systemd config
>> file I've written ...
>>
>> Basically, somebody else added an ExecStop section - and all hell broke
>> loose. It seemed to be firing on boot :-( And the service in question -
>> ScarletDME - seemed to be killing processes at random, like DoveCot ...
>>
>> Okay, accidentally killing processes it shouldn't is probably down the
>> fork/exec code in ScarletDME, I haven't dug into it to know, but systemd
>> should not be triggering the stop in the first place. Has anybody else
>> encountered anything like this?
>>
>> Sorry I'm not likely to respond quickly to say "solved", as I need to
>> get "in the mood" to get back to debugging, but if anybody has any hints
>> and tips, they'd be appreciated, and it might shed some light on that
>> Apache problem :-)
>>
>> Cheers,
>> Wol
>>
>>
>Hi Wol,
>
>It was very difficult to get Apache working with systemd Gentoo.
>No apache2.service found with apache installation.
>so i looked at the Linux Mint OS to copy the apache2.service.
>These commands
>
>ExecStart=/usr/sbin/apachectl start
>ExecStop=/usr/sbin/apachectl graceful-stop
>ExecReload=/usr/sbin/apachectl graceful
>
>did not work at all...
>BUT,
>By manually launching /usr/bin/apache2ctl, it  worked.
>

On my gentoo system apache is installed in
/usr/sbin as apache2 and apache2ctl
 ^
It also installs /lib/systemd/system/apache2.service which references the
above files in a "gentoo-ish" way.

The Linux Mint service file you list above refers to apache without the "2".

Perhaps this shedd some light on your problem.

DaveF

>So i wrote a little simple bash script /usr/bin/op_apache
>
>#!/bin/bash
>
>case ${1} in
>"start")
>apache2ctl
>;;
>"stop")
>killall apache2
>;;
>"restart")
>killall apache2
>sleep 1
>apache2ctl
>;;
>esac
>
>And in apache2.service, i put :
>
>ExecStart=/usr/bin/op_apache start
>ExecStop=/usr/bin/op_apache stop
>ExecReload=/usr/sbin/op_apache restart
>
>Now it works fine, but what a headache !
>
>Cheers,
>
>--
>Jacques
>



Re: [gentoo-user] Mouse pain

2023-05-16 Thread William Kenworthy



On 16/5/23 23:52, Michael wrote:

On Tuesday, 16 May 2023 01:03:31 BST Wol wrote:

On 15/05/2023 18:25, Michael wrote:

Check the attached screenshots, relevant to this laptop.  There's pointer
speed and scrolling speed for the USB mouse I have attached.  I use
libinput for years now and as far as I recall I have not changed the
default settings. I think different mouse models would generate different
inputs and would offer more settings.  Mine is a simple wired optical
mouse.

I'm not at that system at the moment but ... where on your screenshot is
the double click speed? Where is the "configure middle button"? etc etc.

You've got the basics, just like me ...

Cheers,
Wol

According to libinput this is what's available for my USB mouse:

# libinput list-devices
[snip ...]

Device:   PIXART USB OPTICAL MOUSE
Kernel:   /dev/input/event6
Group:5
Seat: seat0, default
Capabilities: pointer
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock:n/a
Left-handed:  disabled
Nat.scrolling:disabled
Middle emulation: disabled
Calibration:  n/a
Scroll methods:   button
Click methods:none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   flat *adaptive custom
Rotation: 0.0

It's a very basic three button mouse.  In Plasma-Wayland I get more options
shown in the SystemSettings GUI, than when in Plasma on Xorg.  I don't know if
tweaking '/etc/X11/xorg.conf.d/40-libinput.conf' will allow you to configure
your mouse as you want to.  Settings configured in this file which work in
Xorg do not necessarily work with Wayland.



Here is mine:

Device:   Logitech M310
Kernel:   /dev/input/event11
Group:    3
Seat: seat0, default
Capabilities: pointer
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock:    n/a
Left-handed:  disabled
Nat.scrolling:    disabled
Middle emulation: disabled
Calibration:  n/a
Scroll methods:   button
Click methods:    none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   flat *adaptive
Rotation: n/a

In XFCE4 most of the settings appear part of the desktop/window manager.

BillK





Re: [gentoo-user] Systemd query ...

2023-05-16 Thread Rich Freeman
On Tue, May 16, 2023 at 3:32 PM Jacques Montier  wrote:
>
> After install, apache2.service not found...

Have you done something to mask service file installs/etc?

The unit file is in the gentoo repo:
www-servers/apache/files/apache2.4-hardened.service

-- 
Rich



Re: [gentoo-user] Systemd query ...

2023-05-16 Thread Jacques Montier
Le mar. 16 mai 2023, 20:58, Neil Bothwick  a écrit :

> On Tue, 16 May 2023 20:03:36 +0200, Jacques Montier wrote:
>
> > It was very difficult to get Apache working with systemd Gentoo.
> > No apache2.service found with apache installation.
>
> Really?
>
> % qfile apache2.service
> www-servers/apache: /lib/systemd/system/apache2.service
>
> Yes.
>
After install, apache2.service not found...

>
>
> > so i looked at the Linux Mint OS to copy the apache2.service.
> > These commands
> >
> > ExecStart=/usr/sbin/apachectl start
> > ExecStop=/usr/sbin/apachectl graceful-stop
> > ExecReload=/usr/sbin/apachectl graceful
> >
> > did not work at all...
>
> % systemctl cat apache2.service
> # /lib/systemd/system/apache2.service
> [Unit]
> Description=The Apache HTTP Server
> After=network.target remote-fs.target nss-lookup.target
>
> [Service]
> EnvironmentFile=/etc/conf.d/apache2
> ExecStart=/usr/sbin/apache2 $APACHE2_OPTS -DFOREGROUND
> ExecReload=/usr/sbin/apache2 $APACHE2_OPTS -k graceful
> ExecStop=/usr/sbin/apache2 $APACHE2_OPTS -k graceful-stop
> # We want systemd to give httpd some time to finish gracefully, but still
> want # it to kill httpd after TimeoutStopSec if something went wrong
> during the # graceful stop. Normally, Systemd sends SIGTERM signal right
> after the # ExecStop, which would kill httpd. We are sending useless
> SIGCONT here to give # httpd time to finish.
> KillSignal=SIGCONT
> PrivateTmp=true
> #Hardening
> CapabilityBoundingSet=CAP_CHOWN CAP_SETGID CAP_SETUID CAP_DAC_OVERRIDE
> CAP_KILL CAP_NET_BIND_SERVICE CAP_IPC_LOCK
> SecureBits=noroot-locked
> ProtectSystem=full
> PrivateDevices=true
> MemoryDenyWriteExecute=true
>
> [Install]
> WantedBy=multi-user.target
>
>
> --
> Neil Bothwick
>
> K: (n., adj.) a binary thousand, which isn't a decimal thousand or even
> really a binary thousand (which is eight), but is the binary number
> closest to a decimal thousand. This has proven so completely confusing
> that it has become a standard.
>


Thanks Neil, i'll have a try.

--
Jacques

>


Re: [gentoo-user] Systemd query ...

2023-05-16 Thread Neil Bothwick
On Tue, 16 May 2023 20:03:36 +0200, Jacques Montier wrote:

> It was very difficult to get Apache working with systemd Gentoo.
> No apache2.service found with apache installation.

Really?

% qfile apache2.service
www-servers/apache: /lib/systemd/system/apache2.service

> so i looked at the Linux Mint OS to copy the apache2.service.
> These commands
> 
> ExecStart=/usr/sbin/apachectl start
> ExecStop=/usr/sbin/apachectl graceful-stop
> ExecReload=/usr/sbin/apachectl graceful
> 
> did not work at all...

% systemctl cat apache2.service 
# /lib/systemd/system/apache2.service
[Unit]
Description=The Apache HTTP Server
After=network.target remote-fs.target nss-lookup.target

[Service]
EnvironmentFile=/etc/conf.d/apache2
ExecStart=/usr/sbin/apache2 $APACHE2_OPTS -DFOREGROUND
ExecReload=/usr/sbin/apache2 $APACHE2_OPTS -k graceful
ExecStop=/usr/sbin/apache2 $APACHE2_OPTS -k graceful-stop
# We want systemd to give httpd some time to finish gracefully, but still
want # it to kill httpd after TimeoutStopSec if something went wrong
during the # graceful stop. Normally, Systemd sends SIGTERM signal right
after the # ExecStop, which would kill httpd. We are sending useless
SIGCONT here to give # httpd time to finish.
KillSignal=SIGCONT
PrivateTmp=true
#Hardening
CapabilityBoundingSet=CAP_CHOWN CAP_SETGID CAP_SETUID CAP_DAC_OVERRIDE CAP_KILL 
CAP_NET_BIND_SERVICE CAP_IPC_LOCK
SecureBits=noroot-locked
ProtectSystem=full
PrivateDevices=true
MemoryDenyWriteExecute=true

[Install]
WantedBy=multi-user.target


-- 
Neil Bothwick

K: (n., adj.) a binary thousand, which isn't a decimal thousand or even
really a binary thousand (which is eight), but is the binary number
closest to a decimal thousand. This has proven so completely confusing
that it has become a standard.


pgpuqHNUVm4hR.pgp
Description: OpenPGP digital signature


Re: [gentoo-user] Systemd query ...

2023-05-16 Thread Jacques Montier
Le lun. 15 mai 2023 à 11:58, Wols Lists  a écrit :

> Nothing to do with but sparked by the Apache problem ...
>
> One of the emails mentioned that the "ExecStop" section didn't appear to
> be working ... That's caused me considerable grief in a systemd config
> file I've written ...
>
> Basically, somebody else added an ExecStop section - and all hell broke
> loose. It seemed to be firing on boot :-( And the service in question -
> ScarletDME - seemed to be killing processes at random, like DoveCot ...
>
> Okay, accidentally killing processes it shouldn't is probably down the
> fork/exec code in ScarletDME, I haven't dug into it to know, but systemd
> should not be triggering the stop in the first place. Has anybody else
> encountered anything like this?
>
> Sorry I'm not likely to respond quickly to say "solved", as I need to
> get "in the mood" to get back to debugging, but if anybody has any hints
> and tips, they'd be appreciated, and it might shed some light on that
> Apache problem :-)
>
> Cheers,
> Wol
>
>
Hi Wol,

It was very difficult to get Apache working with systemd Gentoo.
No apache2.service found with apache installation.
so i looked at the Linux Mint OS to copy the apache2.service.
These commands

ExecStart=/usr/sbin/apachectl start
ExecStop=/usr/sbin/apachectl graceful-stop
ExecReload=/usr/sbin/apachectl graceful

did not work at all...
BUT,
By manually launching /usr/bin/apache2ctl, it  worked.

So i wrote a little simple bash script /usr/bin/op_apache

#!/bin/bash

case ${1} in
"start")
apache2ctl
;;
"stop")
killall apache2
;;
"restart")
killall apache2
sleep 1
apache2ctl
;;
esac

And in apache2.service, i put :

ExecStart=/usr/bin/op_apache start
ExecStop=/usr/bin/op_apache stop
ExecReload=/usr/sbin/op_apache restart

Now it works fine, but what a headache !

Cheers,

--
Jacques


Re: [gentoo-user] Mouse pain

2023-05-16 Thread Michael
On Tuesday, 16 May 2023 01:03:31 BST Wol wrote:
> On 15/05/2023 18:25, Michael wrote:
> > Check the attached screenshots, relevant to this laptop.  There's pointer
> > speed and scrolling speed for the USB mouse I have attached.  I use
> > libinput for years now and as far as I recall I have not changed the
> > default settings. I think different mouse models would generate different
> > inputs and would offer more settings.  Mine is a simple wired optical
> > mouse.
> 
> I'm not at that system at the moment but ... where on your screenshot is
> the double click speed? Where is the "configure middle button"? etc etc.
> 
> You've got the basics, just like me ...
> 
> Cheers,
> Wol

According to libinput this is what's available for my USB mouse:

# libinput list-devices
[snip ...]

Device:   PIXART USB OPTICAL MOUSE
Kernel:   /dev/input/event6
Group:5
Seat: seat0, default
Capabilities: pointer 
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock:n/a
Left-handed:  disabled
Nat.scrolling:disabled
Middle emulation: disabled
Calibration:  n/a
Scroll methods:   button
Click methods:none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   flat *adaptive custom
Rotation: 0.0

It's a very basic three button mouse.  In Plasma-Wayland I get more options 
shown in the SystemSettings GUI, than when in Plasma on Xorg.  I don't know if 
tweaking '/etc/X11/xorg.conf.d/40-libinput.conf' will allow you to configure 
your mouse as you want to.  Settings configured in this file which work in 
Xorg do not necessarily work with Wayland.

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Re: [SOLVED] Feature "split-log" in Portage variable "FEATURES"

2023-05-16 Thread Dr Rainer Woitok
Dale,

On Monday, 2023-05-15 12:58:43 -0500, you wrote:

> ...
> Would this make using tab completion easier too?  I ask because when I
> want to cat a error log file, tab completion gets difficult pretty
> quick.

At least the first part --  selecting the  category directory  -- should
become easier,  because the possible completion suggestions only involve
matching categories rather than all installed matching packages.

Sincerely,
  Rainer



[gentoo-user] Re: Activating BMQ CPU Scheduler

2023-05-16 Thread Nikos Chantziaras

On 06/05/2023 17:45, Holger Hoffstätte wrote:

Unfortunately it seems that a recent change in the mainline kernel
introduced a bit of an incompatibility, which is why the BMQ/PDS patch
now turns it off. We're trying to get that incompatibility fixed.

Anyway: glad you're up and running now!


I had two lockups in one week, so I reverted back to CFQ. It happened 
while I wasn't using the machine. I came back to find it unresponsive, 
except the mouse cursor still moves. But you can't do anything other 
than move the mouse. Not even SysRq works. Usually I can do the SysRq+ 
REISSUB key sequence to reboot machines that stopped responding, but it 
doesn't do anything in this case. The log contains nothing, meaning 
logging has locked up too.