Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UUCP locking step fail in archlinuxARM #1189

Open
Ouack23 opened this issue Jan 19, 2017 · 7 comments · May be fixed by #1770
Open

UUCP locking step fail in archlinuxARM #1189

Ouack23 opened this issue Jan 19, 2017 · 7 comments · May be fixed by #1770

Comments

@Ouack23
Copy link

Ouack23 commented Jan 19, 2017

Hi,
I've got some problems running ola on my raspberry pi B2, with ArchlinuxARM and an Enttec DMX USB Pro.
I have the latest version of everything.
Basically ola is telling that it does not have the permission to access / modify /var/lock/LCK..ttyUSB0

I have explained everything on the archlinux ARM forum, and posted a message in ola's google mailing list too

In #960, i see that you added uucp locking. I got the message that the permission required is not checked, but in fact there is no LCK..ttyUSB0 file in /var/lock/ ... So I don't know who to tell this to, you the ola dev team or the archlinux ARM team for driver oriented solution maybe ?

Please see my archlinux ARM post for full logs and infos.
Thank you for reading.

@Ouack23 Ouack23 changed the title UUCP locking fail in archlinuxARM UUCP locking step fail in archlinuxARM Jan 19, 2017
@peternewman
Copy link
Member

See the discussion here, essentially Arch Linux seems to have some odd file permissions. Fix those and hopefully it will start working.
https://groups.google.com/forum/#!topic/open-lighting/GYt4Ne3qQzM

@Ouack23
Copy link
Author

Ouack23 commented Jan 20, 2017

OK that solved it, indeed !

I just had to copy /usr/lib/tmpfiles.d/legacy.conf into /etc/tmpfiles.d/ and edit it to set lock files to be owned by root, group uucp, perms 775 (instead of user root, group root and perm 755).

I think I would be able to write a proper doc for using this device (and others) for archlinux (udev rule, uucp lock files, ola compilation and configuration, ...). Could you add it to the main site / somewhere else ? I think it could be very useful to archlinux ARM users.

Who do I have to send it to ?

Thanks a lot for this,
Peace.

@peternewman
Copy link
Member

I think you mean 777, unless your user is in the root group too?

We've already got (a number) of docs on compiling OLA, so it would be more helpful to add any differences to those. Likewise we've got a page on device config (udev etc), we probably need to add the notes about UUCP on Arch to that page.

@Ouack23
Copy link
Author

Ouack23 commented Jan 20, 2017

Nop', root:uucp / 775 is good if you are in the uucp group. root:root / 777 works too.

Considering the fact that you have to create a udev rule to mount /dev/ttyUSB0 with the uucp group, you're already supposed to be part of it, so I chose the uucp solution.

Ok, do you want me to think of something for the page that you could just copy / paste ? Or you just prefer to let the OLA team doing so ?

@peternewman
Copy link
Member

Sorry, I missed the uucp group bit.

Yes if you can write something that would be great. Here are the pages we've got that I think are relevant:
https://www.openlighting.org/ola/linuxinstall/
https://wiki.openlighting.org/index.php/OLA_Device_Specific_Configuration

@Ouack23
Copy link
Author

Ouack23 commented Jan 23, 2017

I have exams atm but i promise, I won't let down archlinux OLA users, as I had so much difficulties with this !! Give me one week or so :)

@Ouack23
Copy link
Author

Ouack23 commented Feb 7, 2017

Linux Install

Archlinux

Just install it from the AUR packages, with yaourt or packer :
sudo pacman -S packer
packer -S ola-git without sudo
OR
sudo pacman -S yaourt
yaourt -S ola-git without sudo

And then follow instructions for dependencies and compilation.

Archlinux ARM

You can install it from the AUR too (see Archlinux section), but an extra step is required. Yaourt is more difficult to install on Arch ARM, so we'll use packer package manager for AUR access.
sudo pacman -S packer
packer -S ola-git without sudo

Edit PKGBUILD to add "armv7h" or whatever your architecture is in the line arch= :
If you don't know your architecture name, enter the following command to get it :
uname -m

For example, for armv7h :
Old :
arch=('i686' 'x86_64')
New :
arch=('i686' 'x86_64' 'armv7h')

And then follow instructions for dependencies and compilation.

Device specific configuration

Enttec USB/DMX Pro on Archlinux ARM

To access the Enttec USB/DMX Pro in OLA on Archlinux ARM, you have to add a udev rule to mount the device with correct permissions :
sudo nano /etc/udev/rules.d/enttec.rules
Add :

SUBSYSTEM=="usb*", ACTION=="add|change", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", GROUP="uucp", MODE="0666"

(found on D-Light linux instructions)
Save and quit nano with ctrl + O, Enter and ctrl + X.

Then you have to ensure your /run/lock directory is mounted with permission such as root:lock / 775.
This is managed by the systemd-tmpfiles service.
Do :
sudo cp /usr/lib/tmpfiles.d/legacy.conf /etc/tmpfiles.d/
sudo nano /etc/tmpfiles.d/legacy.conf
And edit it to match the following content :

d /run/lock 0775 root lock -
L /var/lock - - - - ../run/lock
d /run/lock/subsys 0755 root root -
d /run/lock/lockdev 0775 root lock -
r! /forcefsck
r! /fastboot
r! /forcequotacheck

Then add yourself to both uucp and lock groups :
sudo usermod -aG uucp [USERNAME]
sudo usermod -aG lock [USERNAME]

Ensure your systemd-tmpfiles service is running by doing :
sudo systemctl enable systemd-tmpfiles-setup

Then reboot and use the OLA usbserial module to detect your Enttec USB/DMX Pro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants