sm0svx / svxlink

Advanced repeater system software with EchoLink support for Linux including a GUI, Qtel - the Qt EchoLink client
http://svxlink.org/
Other
435 stars 173 forks source link

Invalid user during 'make install' #108

Closed sv1 closed 9 years ago

sv1 commented 10 years ago

On a new installation 'make install' fails with the message:

................ -- Setting owner of /usr/local/var/spool/svxlink/qso_recorder to svxlink.daemon... /bin/chown: invalid user: `svxlink.daemon'

probably because the user/group doesn' t exits!!

73 de sv1ljj Apostolos

pe1chl commented 10 years ago

Yes, you need to add the user svxlink yourself. And also the group daemon when your system does not provide it already.

sm0svx commented 9 years ago

Also note, you are using the old buildsystem which is mostly unmaintained and will soon be removed. The new way to compile SvxLink is by using CMake. Have a look at the build instructions.

The new buildsystem does not set users or permissions at all. It is really designed to be run as part of a process to create binary packages and not to be used as an installer. It is of course entirely possible to install SvxLink using a "make install" but expect there to be some additional manual steps to make the system behave as you wish.

sv1 commented 9 years ago

On Σαβ, 2014-10-25 at 00:58 -0700, Tobias Blomberg wrote:

Also note, you are using the old buildsystem which is mostly unmaintained and will soon be removed. The new way to compile SvxLink is by using CMake. Have a look at the build instructions.

I am actually using cmake!!! With the build instructions above, final step is "make install"

The new buildsystem does not set users or permissions at all. It is really designed to be run as part of a process to create binary packages and not to be used as an installer. It is of course entirely possible to install SvxLink using a "make install" but expect there to be some additional manual steps to make the system behave as you wish.

— Reply to this email directly or view it on GitHub.Web Bug from https://github.com/notifications/beacon/AFRSQ9pLNmaVy_vdP0gONznab7vTcuOvks5nG0-2gaJpZM4Cq9oC.gif

{"@context":"http://schema.org","@type":"EmailMessage","description":"View this Issue on GitHub","action":{"@type":"ViewAction","url":"https://github.com/sm0svx/svxlink/issues/108#issuecomment-60475176","name":"View Issue"}}

sm0svx commented 9 years ago

Ooops, sorry. Yes, you are right. The new buildsystem also set user/group information. Anyway, @pe1chl is correct. You need to add the needed user/group manually if they do not exist.

f5vmr commented 9 years ago

I have made a new installation on a second new out of the box rPI (B+), installed with Wheezy and upgrades, and followed the new instructions. However I have to report certain observations.

  1. There is no defined list of packages that are required to be installed BEFORE we attempt the installation, such as Tcl and TK. This caused me to restart after going through the fault list and installing each missing package as it was encountered, and starting again from the beginning.
  2. It would be helpful to have known about the requirement to have SVXLINK and Daemon as users, as I too encountered the permissions problem.
  3. "make doc" failed probably due to permissions, but I suspect that you may have already covered this. I was unable to circumvent this in the build, so there are no 'man' files inbuilt. Svxlink works without this part of the build, unless you tell me it is essential.

In other news, I successfully upgraded the first build in an rPI (B) that is in use and installed in F5ZGM on R2 in the Limousin. I operate this build as ROOT so user issues are not a problem. There are some audio throughput issues, but not insurmountable, and I have to address some timing issues and echolink's failure to connect. The latter I think is a network issue as Echolink worked perfect at home before the site install. Many Thanks Tobias and team, from myself Chris F5VMR, and the team at F8KFZ.

pe1chl commented 9 years ago

It is strange, because I am sure that when I first installed svxlink some time ago there was a detailed list of packages that had to be installed first, and now on the Wiki https://github.com/sm0svx/svxlink/wiki/InstallationInstructions there is only a sketchy list. I don't know where I have found that detailed list and if it is still there. For your information, when preparing our Wheezy systems for use in the repeater network we install the following packages first. However, this does not include compilation of the graphic stuff for qtel, and it includes some packages that we need for other reasons than compiling svxlink.

apt-get -y install build-essential checkinstall automake autogen screen
apt-get -y install debhelper hardening-wrapper dh-apparmor
apt-get -y install libedit-dev libcap2-dev libssl-dev libncurses5-dev
apt-get -y install autotools-dev dpkg-dev libasound2-dev libasprintf-dev
apt-get -y install libbsd-dev libc6-dev libcap-dev libc-dev-bin libedit-dev
apt-get -y install libgcrypt11-dev libgettextpo-dev libgpg-error-dev
apt-get -y install libgsm1-dev libncurses5-dev libopts25-dev libopus-dev
apt-get -y install libpopt-dev libsigc++-1.2-dev libsigc++-2.0-dev libspeex-dev
apt-get -y install libssl-dev libstdc++-4.8-dev libstdc++6-4.6-dev libtinfo-dev
apt-get -y install linux-libc-dev manpages-dev python-dbus-dev tcl-dev
apt-get -y install zlib1g-dev alsa-utils vorbis-tools libsamplerate0-dev

It would certainly be better when the requirement for a user is mentioned in the instructions. We do the following:

addgroup --gid 496 svxlink
adduser --disabled-password --uid 496 --gid 496 svxlink

Those fixed user ids are a carry-over from the past, you could use different ones or automatically determined ones when you don't have a large collection of servers where you want the same user ID. "make doc" requires the groff package. Beware, this pulls in a lot of other packages! When you don't require doc on the system (because you installed it locally on your PC) you can omit it and save 70MB of disk space and maybe some updating later.

To run as non-root (user svxlink), don't use the method in the original examples, i.e. don't add a file in /etc/udev/rules.d/ that chmods the devices to allow world-writing. Instead, add the user svxlink to the audio and dialout groups. (you can just edit /etc/group and add ,svxlink to the end of those lines where probably already a user pi exists)

f5vmr commented 9 years ago

Thanks Rob - Very helpful.

sm0svx commented 9 years ago

The list of required libraries is sketchy since it should apply to all possible distributions. However, from the installation page there are links to distribution specific instructions, like for Wheezy:

https://github.com/sm0svx/svxlink/wiki/InstallSrcDebian

I just added a bit of text that describes that the svxlink.daemon user/group have to exist before installing SvxLink. It is also sketchy since it should apply to all possible distributions. More specific instructions could be added to the distribution specific description but surely I cannot be expected to update the instructions for all distributions. All GitHub members are free to edit the Wiki.

As @pe1chl say, Groff is needed to build the man-pages. There is no way around this. It should be something in the error printout telling you this like:

CMake Error at cmake/Modules/FindGROFF.cmake:9 (MESSAGE):
  Unable to find 'groff' program

One could discuss if building the manual pages should be required though. Maybe it would be a good idea to make it optional so that building SvxLink without having groff installed is possible.