[gentoo-user] dbus not starting, reboot to be avoided

2020-09-24 Thread Stefan G. Weichinger


I have a gentoo server with a failed /dev/sda. OS is on RAID1 with a
working /dev/sdb below.

I want to avoid rebooting because I mistrust the GRUB from a former SUSE
installation (in parallel) right now.

For some reason dbus isn't running.

I can't get a correct systemctl behavior right now.

Tried to start the dbus daemon with the line from the service file, but
it doesn't find or create the socket file in /run/dbus

I assume I could create it with mknod, could someone point me at a
working command?

Tried dbus 1.12.16, 1.12.18, unmerged, re-emerged etc

Thanks for some help here.




Re: [gentoo-user] dbus not starting, reboot to be avoided

2020-09-24 Thread Stefan G. Weichinger
Am 24.09.20 um 11:01 schrieb Stefan G. Weichinger:
> 
> I have a gentoo server with a failed /dev/sda. OS is on RAID1 with a
> working /dev/sdb below.
> 
> I want to avoid rebooting because I mistrust the GRUB from a former SUSE
> installation (in parallel) right now.
> 
> For some reason dbus isn't running.
> 
> I can't get a correct systemctl behavior right now.
> 
> Tried to start the dbus daemon with the line from the service file, but
> it doesn't find or create the socket file in /run/dbus
> 
> I assume I could create it with mknod, could someone point me at a
> working command?



Managed to recreate that file:

# ls -la /run/dbus/
insgesamt 0
srwxrwxrwx  1 root root   0 24. Sep 12:19 system_bus_socket

/usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile
--systemd-activation --syslog-only

(as in dbus.service) fails with

dbus-daemon[26507]: Failed to start message bus: No socket received.




Re: [gentoo-user] dbus not starting, reboot to be avoided

2020-09-24 Thread Stefan G. Weichinger


Reboot lead to some problems, now the flaky disk is removed.

Fixed some things in maintenance mode, did filesystem checks, now the
server boots OK and dbus also runs magically.




Re: [gentoo-user] SELinux policy problem

2020-09-24 Thread Dan Egli

No one has any ideas? I was hoping SOMEONE could help within 12 hours

On 9/23/2020 11:36 PM, Dan Egli wrote:
Maybe I just need a day or two off, but I'm having an issue and the 
Wiki page doesn't seem to help me.



I'm installing a new system. It's the same one I was having Grub 
issues on. Now that those issues are resolved, I am adding the extra 
packages on the list.  One (or several really) of those packages is 
SELinux and it's policies. I've found all the policies I want to add, 
but when I emerge them I ALWAYS get an error about not being able to 
resolve typesetattribute. For example, from the policy for clamav:



With the exception of the base-policy package, EVERY SELinux policy 
said that. I've looked and what I see online doesn't seem to make 
sense to me. Then again, I AM brand new to SELinux. Anyone got any 
tips as to making sure they emerge okay?











Re: [gentoo-user] SELinux policy problem

2020-09-24 Thread Dan Egli

On 9/23/2020 11:36 PM, Dan Egli wrote:
Maybe I just need a day or two off, but I'm having an issue and the 
Wiki page doesn't seem to help me.



I'm installing a new system. It's the same one I was having Grub 
issues on. Now that those issues are resolved, I am adding the extra 
packages on the list.  One (or several really) of those packages is 
SELinux and it's policies. I've found all the policies I want to add, 
but when I emerge them I ALWAYS get an error about not being able to 
resolve typesetattribute. For example, from the policy for clamav:



With the exception of the base-policy package, EVERY SELinux policy 
said that. I've looked and what I see online doesn't seem to make 
sense to me. Then again, I AM brand new to SELinux. Anyone got any 
tips as to making sure they emerge okay?



Odd, I just noticed the line didn't appear. Let's try this again. Here's 
the message I get from selinux-clamav:



Failed to resolve typeattributeset statement at 
/var/lib/selinux/targeted/tmp/modules/400/clamav/cil:41



Anyone got tips on this?






Re: [gentoo-user] SELinux policy problem

2020-09-24 Thread Michael
On Thursday, 24 September 2020 19:06:11 BST Dan Egli wrote:
> On 9/23/2020 11:36 PM, Dan Egli wrote:
> > Maybe I just need a day or two off, but I'm having an issue and the
> > Wiki page doesn't seem to help me.
> > 
> > 
> > I'm installing a new system. It's the same one I was having Grub
> > issues on. Now that those issues are resolved, I am adding the extra
> > packages on the list.  One (or several really) of those packages is
> > SELinux and it's policies. I've found all the policies I want to add,
> > but when I emerge them I ALWAYS get an error about not being able to
> > resolve typesetattribute. For example, from the policy for clamav:
> > 
> > 
> > With the exception of the base-policy package, EVERY SELinux policy
> > said that. I've looked and what I see online doesn't seem to make
> > sense to me. Then again, I AM brand new to SELinux. Anyone got any
> > tips as to making sure they emerge okay?
> 
> Odd, I just noticed the line didn't appear. Let's try this again. Here's
> the message I get from selinux-clamav:
> 
> 
> Failed to resolve typeattributeset statement at
> /var/lib/selinux/targeted/tmp/modules/400/clamav/cil:41
> 
> 
> Anyone got tips on this?

I haven't implemented selinux for some years now to be able to advise.  Did 
you have a look at this post in case it gives you a pointer?

https://forums.gentoo.org/viewtopic-t-1036790-start-0.html

Also see this part of the wiki for creating an empty policy module if you need 
to:

https://wiki.gentoo.org/wiki/SELinux/FAQ#How_to_I_load_an_entire_policy_set.3F


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


Re: [gentoo-user] USB problem/questions (not Gentoo specific)

2020-09-24 Thread Sid Spry
On Tue, Sep 22, 2020, at 7:11 PM, Jack wrote:
> I've got a Ryzen 5 2600 in an MSI B350 Tomahawk motherboard.  The specs  
> imply that the CPU produces four USB 3.0 ports and the chipset produces  
> 6 USB 2.0 and four USB 3.1 (although the last four are not available  
> with this motherboard.
> 

Even high end motherboards tend to only bring out 1 or 2 root hubs. That the
chip supports 4 root hubs does not mean all of them were used. Typically there
are two groups of USB3 and one or two groups of USB2.

Sometimes it's just one USB3 root hub and they attach all of the USB2 ports to
it, making everything run at USB2 speeds.

With USB2, hubs are required to have a translation unit that speeds USB1
packets up to USB2 speeds. Even with these translators you can incur delays
waiting for slower USB1 devices to respond as they will take ~4x longer, and
then the buffered data is sped up when it is put on the bus.

With USB3 there is no such requirement. This would be fine as the USB2 is
on separate wires but most USB3 silicon seems to be implemented in such a
way that USB2 transactions slow down the USB3 transactions. In some cases
this is visible with `lsusb -t`: putting a USB2 device on a USB3 bus will
downgrade all devices to USB2 speeds (showing USB3 devices that were
5000M as 480M), and even if it is not visible, you may see transfers take ~10x
as long.

I found all of this out when benchmarking flash drives. My motherboard was
wired such that every important USB3 port shared the keyboard and mouse
ports. If you plug a USB1.1/USB2 keyboard and mouse in, everything else
slows down.

USB3.1 I think explicitly addresses this issue saying that USB3 should always
run at USB3 speeds, but vendors still seem to be churning out broken
motherboards.

> lsusb shows
> Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
> Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> 
> lsusb -t shows
> /:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
> /:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
> /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 1M
> /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/10p, 480M
> 

I am pretty sure the pairs of ports are linked. This seems to be a new
development, and I'm not really sure what it means yet.

> Bus 01 shows 10p because there is a 4 port external hub connected, so  
> that should be the 6 USB 2.0 ports - two rear ports, and two two port  
> headers (JUSB1 and JUSB2)
> Bus 02 is (I assume) advertised by the B350 chipset, but I don't expect  
> it to show up on any physical ports or headers
> Bus 03 is a mystery, as I have no idea where the extra USB 2.0 ports  
> are coming from
> Bus 04 should be the USB 3.0 generated by the CPU, and I assume should  
> be what feeds the JUSB3 and JUSB4 USB3 headers
> 
> The rear IO panel has 2 USB 2.0 ports, and if I plug anything into  
> them, they show up as ports 8 and 9 on bus 1.
> The front of the case has two USB3 ports, which show up on the bus 1,  
> ports 1 and 2 if the connector is in JUSB4 on the mobo, or ports 3 and  
> 4 if using JUSB3.
> The three Type-A USB3 connectors on the back show up on bus 3, ports 1,  
> 2, and 4, with port 3 presumably being the Type-C connector.  I don't  
> have anything to test in the Type-C port.
> 
> I'd be really surprised if the back IO panel on the mobo is miswired,  
> but why are the supposed USB3 ports all showing up as USB2?  I have one  
> webcam capable of USB3, but it's only connecting at 480M (per lsusb -v)  
> but it's plug shows the standard USB logo, not the superspeed version.
> 

Your motherboard technically isn't miswired per the USB spec. But it is
miswired in the sense de facto none of your ports may support USB3.

You'd have to do more testing yourself to ensure your system is broken
in the same way mine is, but it is definitely possible. If you get a response
from the manufacturers please let me know what it was.

I have a cheap Intel embedded system with this same problem, and a
B350 system from ASRock with suspicious USB3 behavior that I haven't
been able to investigate well.

Cheers.

P.S.: Another funny one I have is a B350 motherboard having enough
VFIO groups to do GPU passthrough, but arranged explicitly so you
can't compartmentalize devices. Everything except the NVMe port is
in one giant group.

Sounds like false advertising to me.



[gentoo-user] Shared libraries lack a SONAME

2020-09-24 Thread urpion
  Hi! I'm trying to install a library, lsp-dsp-lib-0.5.9, but I fail at
  install phase.


  >>> Install media-libs/lsp-dsp-lib-0.5.9 into 
/home/tmp/portage/media-libs/lsp-dsp-lib-0.5.9/image
make -j4 -l1 DESTDIR=/home/tmp/portage/media-libs/lsp-dsp-lib-0.5.9/image 
install
make lsp-common-lib.o
  ld   [lsp-dsp-lib] lsp-dsp-lib.o
  g++  [lsp-dsp-lib] liblsp-dsp-lib-0.5.9.so
  ar   [lsp-dsp-lib] liblsp-dsp-lib-0.5.9.a
Installing lsp-dsp-lib
install 
/home/tmp/portage/media-libs/lsp-dsp-lib-0.5.9/work/lsp-dsp-lib/.build/lsp-dsp-lib/liblsp-dsp-lib-0.5.9.so
 -t /home/tmp/portage/media-libs/lsp-dsp-lib-0.5.9/image/usr/lib
cp 
/home/tmp/portage/media-libs/lsp-dsp-lib-0.5.9/work/lsp-dsp-lib/.build/lsp-dsp-lib/liblsp-dsp-lib-0.5.9.a
 -t /home/tmp/portage/media-libs/lsp-dsp-lib-0.5.9/image/usr/lib
Install OK
>>> Completed installing media-libs/lsp-dsp-lib-0.5.9 into 
>>> /home/tmp/portage/media-libs/lsp-dsp-lib-0.5.9/image

 * Final size of build directory: 14760 KiB (14.4 MiB)
 * Final size of installed tree:   2120 KiB ( 2.0 MiB)


# Copyright 2020 Gentoo Authors
 * QA Notice: The following shared libraries lack a SONAME
 * /usr/lib/liblsp-dsp-lib-0.5.9.so

Files matching a file type that is not allowed:
   usr/lib/liblsp-dsp-lib-0.5.9.so


  I read "Scanelf: Missing Shared Object Name (SONAME)"
Which says "To fix this issue, make sure the shared library
is linked with the proper -Wl,-soname,... flag."
https://dev.gentoo.org/~zmedico/portage/doc/ch07s04.html

and this forum post about LDFAGS
https://forums.gentoo.org/viewtopic.php?t=6
Which defines an ebuild variable LDFLAGS

  So I added to my ebuild:
LDFAGS="-Wl,-soname,liblsp-dsp-lib-0.5.9.so"
then tried:
LDFAGS="-Wl,-soname,liblsp-dsp-lib.so"
But no go. The docs say I need the actual ABI name.
Is this the right approach? What is the actual ABI name?
Any insight is apreciated
Thank you all.



Re: [gentoo-user] Shared libraries lack a SONAME

2020-09-24 Thread urpion
On Fri, Sep 25, 2020 at 03:39:20PM +1000, urp...@gmx.com wrote:
>   Hi! I'm trying to install a library, lsp-dsp-lib-0.5.9, but I fail at
>   install phase.
>
>
>   >>> Install media-libs/lsp-dsp-lib-0.5.9 into 
> /home/tmp/portage/media-libs/lsp-dsp-lib-0.5.9/image
> make -j4 -l1 DESTDIR=/home/tmp/portage/media-libs/lsp-dsp-lib-0.5.9/image 
> install
> make lsp-common-lib.o
>   ld   [lsp-dsp-lib] lsp-dsp-lib.o
>   g++  [lsp-dsp-lib] liblsp-dsp-lib-0.5.9.so
>   ar   [lsp-dsp-lib] liblsp-dsp-lib-0.5.9.a
> Installing lsp-dsp-lib
> install 
> /home/tmp/portage/media-libs/lsp-dsp-lib-0.5.9/work/lsp-dsp-lib/.build/lsp-dsp-lib/liblsp-dsp-lib-0.5.9.so
>  -t /home/tmp/portage/media-libs/lsp-dsp-lib-0.5.9/image/usr/lib
> cp 
> /home/tmp/portage/media-libs/lsp-dsp-lib-0.5.9/work/lsp-dsp-lib/.build/lsp-dsp-lib/liblsp-dsp-lib-0.5.9.a
>  -t /home/tmp/portage/media-libs/lsp-dsp-lib-0.5.9/image/usr/lib
> Install OK
> >>> Completed installing media-libs/lsp-dsp-lib-0.5.9 into 
> >>> /home/tmp/portage/media-libs/lsp-dsp-lib-0.5.9/image
>
>  * Final size of build directory: 14760 KiB (14.4 MiB)
>  * Final size of installed tree:   2120 KiB ( 2.0 MiB)
>
>
> # Copyright 2020 Gentoo Authors
>  * QA Notice: The following shared libraries lack a SONAME
>  * /usr/lib/liblsp-dsp-lib-0.5.9.so
>
> Files matching a file type that is not allowed:
>usr/lib/liblsp-dsp-lib-0.5.9.so
>
>
>   I read "Scanelf: Missing Shared Object Name (SONAME)"
> Which says "To fix this issue, make sure the shared library
> is linked with the proper -Wl,-soname,... flag."
> https://dev.gentoo.org/~zmedico/portage/doc/ch07s04.html
>
> and this forum post about LDFAGS
> https://forums.gentoo.org/viewtopic.php?t=6
> Which defines an ebuild variable LDFLAGS
>
>   So I added to my ebuild:
> LDFAGS="-Wl,-soname,liblsp-dsp-lib-0.5.9.so"
> then tried:
> LDFAGS="-Wl,-soname,liblsp-dsp-lib.so"
> But no go. The docs say I need the actual ABI name.
> Is this the right approach? What is the actual ABI name?
> Any insight is apreciated
> Thank you all.
>
  Whoops! Sorry about the typo.
I have tried these:
LDFLAGS="-Wl,-soname,liblsp-dsp-lib-0.5.9.so"
LDFLAGS="-Wl,-soname,liblsp-dsp-lib.so"
LDFLAGS="-Wl,-soname,liblsp-dsp-lib.so.0"