Closed darcato closed 5 years ago
The utils scripts are python, so to install them after creating the executable, you have to do the usual
$ python setup.py build
# python setup.py install
to build and (as root) install the package.
The branch has been merged, but still needs to be fixed, and the documentation added and/or updated.
I'm sorry. Since you were asking for the merge, I has assumed you had built and tested the pull request.
Ok, @darcato: Can you please re-try the master branch now? With help from @kingspride, I think I have all major issues with the systemd scripts fixed now, and would really appreciate feedback. Same appeal goes to @kingspride - could you please check if the stuff (still) works for you as expected?
i will check it today :) glad I could help!
Yes, thanks, I will try as soon as possible!
seems to work. :) cloned into a fresh directory, compiled and installed ootb. I then removed my test service, recreated it with the new tools, everything ok and in the right place. prattach works too.
So, I tried again in ubuntu 18.04. I run the same commands as on my first post to build and install from source, then I also run the python install commands as suggested. I was able to add a service with manage-procs and to attach to it using prattach. So, good work guys!
Probably some more info on the documentation on how the two commands work would be useful. Also, is it possible to integrate the installation of the python files with the main make install
command?
Lastly, I noticed that prattach is using socat
when the service is created with default parameters, probably it has to be listed as a dependency right? The default message from prattach was not very clear to understand that I needed socat to be installed.
Thanks @kingspride and @darcato!
prattach
is using telnet
for attaching to a procServ that is bound to a TCP port and socat
for attaching to a procServ that is bound to a UNIX domain socket. So, effectively, the dependency is to telnet
or socat
or both, depending on how you are using procServ.
This definitely needs to go into the README.
I will try to get the python build and install covered by the autotools generated make
run. Good idea. This is not obvious, but should be possible.
With these fixes I will release an -rc2 and announce it on Tech-Talk for a round of broader tests in the EPICS world.
maybe it would be a nice idea to integrate prattach into mange-procs? like manage-procs attach <proc-name>
?
this would be my first guess on how to connect to a service when I created it with manage-procs.
also start and stop functions in manage-procs might be an idea, even though they could just call systemctl start oder stop. because I think it would be convenient to control procServ services entirely with manage-procs 😄
Hmmm... interesting. @mdavidsaver, what do you think about those ideas?
I will not link build and install of the procServUtils with the main autotools build. This is more complex than expected, creates dependencies to Python, systemd, telnet, socat, would need to be filtered-out on all targets that don't use systemd (Solaris, Windows, MacOS), and more than a few installations would not even want to use them.
A lot of added complexity to save typing a single line during build.
if [ "$(id -u)" -ne "0" ]
then
echo "root required, try sudo" >&2
exit 1
fi
make
./configure --disable-doc
make
./setup.py build
./setup.py install
should do it?
I had it working. technically this is not an issue.
What happens on Windows? MacOS, Solaris? What happens if Python is not installed? What if the user does not want to install the procServUtils?
would need to be filtered-out on all targets that don't use systemd
Maybe a case for ./configure --with-python=/usr/bin/pythonX --enable-systemd
? With the default being disable (not auto-detect). Though this would just be calling out to /usr/bin/pythonX setup.py install --prefix=...
.
like
manage-procs attach <proc-name>
?
Seems reasonable. I probably should have thought twice before further cluttering $PATH
.
my comment with the script was meant to accompany the source code, not as a general installer. so that people in a hurry who know that they have the dependencies, just can run it and not have to copy and paste or type those things by themselves. like, a little helper for @darcato :stuck_out_tongue:
Ok, I think I nailed it down. Will ship -rc2 later today.
Think I covered everything mentioned in this issue. Closing.
Hello, I am trying to test the new systemd integration. I am running ubuntu 18.04.
What I did:
This procedure installed only the procServ executable on my system, while the
manage-procs
was built but not installed. Basically all the new files listed indebian/procserv-systemd.install
are not installed.Is this the recommended way to install from source? Should I build the deb package?