Re: [RDD] Help RN just won't work

2020-10-27 Thread Fred Gleason
On Oct 26, 2020, at 00:18, Tim Camp  wrote:

> Any ideas why the rml would work so differently between the distros?
> I know that "printf" has some variations between distros and versions but I 
> wouldn't think that has any bearing 
> since the scripts run from the terminal on both.

Ok, I’ve just committed a change to Git ‘master’ that changes the ‘Run Script’ 
[‘RN’] RML so that:

1) It no longer uses runuser(1)

2) It invokes all scripts via the system shell (‘/usr/sh’).

With these changes in place, I’ve verified that commands containing shell 
redirectors, (‘|’, ‘>’, etc) now work correctly.

Cheers!


|-|
| Frederick F. Gleason, Jr. | Chief Developer |
|   | Paravel Systems |
|-|
| A room without books is like a body without a soul. |
| |
| -- Cicero   |
|-|___
Rivendell-dev mailing list
Rivendell-dev@lists.rivendellaudio.org
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev


Re: [RDD] Help RN just won't work

2020-10-26 Thread Lorne Tyndale
Tim,

I suspect the difference is the fix that is in issue #604

https://github.com/ElvishArtisan/rivendell/pull/604

From what I can tell, the CentOS build/release doesn't yet have this
modification as it was built before this update was put into the code.

The CentOS 3.4.1 package was released on July 21.

Issue 604 was merged into the codebase July 29.

This fix should be in the next official release/build.

Lorne Tyndale


> 
> 
> Greetings,
> 
> One more caveat to add to my mystery.
> 
> I compiled 3.4.1 from git hub source on Ubuntu 18.04 and my scripts work
> with RN macro.
> 
> So does this obviously mean something is being treated differently on
> Centos 7.
> They run on Centos from the terminal. But not with the RN macro from
> rivendell.
> 
> I had pretty much made up my mind to move to Centos so that the future
> would be easier regarding updates and the like,
> but console integration is major so I have to figure this out before making
> my decision.
> 
> Any ideas why the rml would work so differently between the distros?
> I know that "printf" has some variations between distros and versions but I
> wouldn't think that has any bearing
> since the scripts run from the terminal on both.
> 
> Tim Camp
> WZEW-FM
> 
> 
> 
> 
> On Sat, Oct 24, 2020 at 6:45 PM Tim Camp  wrote:
> 
> > OK
> > RN sh -c usr/bin/6M! does not work
> > RN sh -c "/usr/bin/6M"! doesn't work  someone had suggested that after
> > -c the command had to be in quotes
> > RN sh -c 6M! does not work
> >  All of the above commands work from terminal both as rd or as root
> > no luck from rmlsend
> >
> > Tim Camp
> > WZEW-FM
> >
> >
> >
> >
> > On Sat, Oct 24, 2020 at 6:10 PM Fred Gleason 
> > wrote:
> >
> >> On Oct 24, 2020, at 18:56, Tim Camp  wrote:
> >>
> >> The Scripts that we mostly run are simple, we avoid echo because of
> >> its various problems across distros because of escape character troubles.
> >> an example of our usage
> >> RN 6M!
> >> 6M is a script to mute channel six on the console
> >> scripts are, where string is the command to the audio console.
> >> that script contains
> >>
> >> #!/usr/bin/env bash
> >> printf "/ch/06/mix/on\00\00\00,i\00\00\00\00\00\00" >
> >> /dev/udp/consoleip/port  (you can see why echo when have trouble with
> >> that)
> >>
> >>
> >> Ah. Bangpath trouble...
> >>
> >> This has a similar problem to your earlier example that used STDOUT
> >> redirection. The first line ("#!/usr/bin/env bash”) is actually an
> >> instruction *to the shell* to treat this as a shell script. But, since it’s
> >> being directly invoked as an executable, the shell never gets to see it,
> >> and the kernel’s exec() call barfs on it. Run it like this: ‘RN sh -c 6M!’
> >> and it should work. (You’ll probably need to provide the full path to the
> >> ‘6M’ script.)
> >>
> >> Since this seems to be a common problem, perhaps we should alter the ‘Run
> >> Script’ [‘RN’] so that it automatically executes everything as ‘sh -c
> >> 

Re: [RDD] Help RN just won't work

2020-10-24 Thread David Klann
n 10/24/20 11:44 AM, Fred Gleason wrote:
> On Oct 24, 2020, at 12:05, Tim Camp  > wrote:
> 
>> RMLSend touch does indeed work, file is created.
>> our scripts do not
>> another simple command such as RN echo "something" > file! does not.
> 
> Likely it's the STDOUT redirection that’s the problem. Those redirection 
> operators (‘<‘, ‘>’, ‘|’, etc) are part of bash(1), not echo(1).
> 
> Try something like ‘RN sh -c echo something > file!’ (You may have to 
> escape the strings following the echo; I don’t have Rivendell loaded up 
> at the moment to test here).

Knowing a bit about shell quoting, I suggest the following if Fred's 
suggestion above does not work for you Tim:

 RN /bin/sh -c "echo something > /tmp/your-filename-here"

My understanding of the "-c" option to most shells (from reading `man 
bash`, etc.) is that they expect a complete command as a single, quoted 
argument, especially if you want the invoking shell (/bin/sh in this 
case) to perform the redirection.

Hoping your mystery is getting closer to being solved!

   ~David

___
Rivendell-dev mailing list
Rivendell-dev@lists.rivendellaudio.org
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev


Re: [RDD] Help RN just won't work

2020-10-24 Thread Fred Gleason
On Oct 24, 2020, at 12:05, Tim Camp  wrote:

> RMLSend touch does indeed work, file is created.
> our scripts do not
> another simple command such as RN echo "something" > file! does not.

Likely it's the STDOUT redirection that’s the problem. Those redirection 
operators (‘<‘, ‘>’, ‘|’, etc) are part of bash(1), not echo(1).

Try something like ‘RN sh -c echo something > file!’ (You may have to escape 
the strings following the echo; I don’t have Rivendell loaded up at the moment 
to test here).

Cheers!


|-|
| Frederick F. Gleason, Jr. | Chief Developer |
|   | Paravel Systems |
|-|
| A room without books is like a body without a soul. |
| |
| -- Cicero   |
|-|___
Rivendell-dev mailing list
Rivendell-dev@lists.rivendellaudio.org
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev


Re: [RDD] Help RN just won't work

2020-10-24 Thread Tim Camp
Greetings Fred,
Thanks for your input and time.

RMLSend touch does indeed work, file is created.
our scripts do not
another simple command such as RN echo "something" > file! does not.

So where would you suggest going from here?
As here works.

Tim Camp
WZEW-FM


On Sat, Oct 24, 2020 at 8:57 AM Fred Gleason 
wrote:

> Ok, let’s try a fully worked-out example of a very ‘minimalist’ example,
> and see if we can scale up from there.
>
> The default ‘/etc/rd.conf’ shipped with Rivendell 3.4.1 has an
> ‘[Identity]’ section that looks like this:
>
> *** snip snip ***
> [Identity]
> AudioOwner=rivendell
> AudioGroup=rivendell
>
> PypadOwner=pypad
> PypadGroup=pypad
>
> RnRmlOwner=rivendell
> RnRmlGroup=rivendell
> *** snip snip ***
>
> That’s designed to replicate a 2.x setup (Principle of Least
> Astonishment), but for this exercise let’s change the user for RN so it’s
> same one that’s running the base Rivendell modules:
>
> *** snip snip ***
> [Identity]
> AudioOwner=rivendell
> AudioGroup=rivendell
>
> PypadOwner=pypad
> PypadGroup=pypad
>
> RnRmlOwner=rd
> RnRmlGroup=rd
> *** snip snip ***
>
> We’ve changed ‘rd.conf’, so restart the ‘rivendell’ service to pick up the
> changes. As ‘root’:
>
> systemctl restart rivendell
>
> Now, start up a ‘Terminal’, and do:
>
> ls -l /home/rd/here
>
> You should get: 'ls: cannot access /home/rd/here: No such file or
> directory’.
>
> Now, fire up ‘RMLSend’, from the Applications->Rivendell->Utilities menu.
> In the ‘Sent To:’ field enter ‘localhost’, and in the ‘Command:’ field
> enter ‘RN touch /home/rd/here!’. Touch the ‘Send Command’ button.
>
> Now, go back to the terminal and repeat:
>
> ls -l /home/rd/here
>
> Now, you should get back something like: '-rw-r--r--. 1 rd rd 0 Oct 24
> 09:26 /home/rd/here’.
>
> You’ve just created an empty file called ‘here’, in the ‘/home/rd’
> directory. A very basic starting point, but it will let us establish that
> the fundamental system in Rivendell is working. Once we have that, we can
> start working to determine why your specific scripts won’t run.
>
> Cheers!
>
>
> |-|
> | Frederick F. Gleason, Jr. | Chief Developer |
> |   | Paravel Systems |
> |-|
> | A room without books is like a body without a soul. |
> | |
> | -- Cicero   |
> |-|
>
>
> ___
> Rivendell-dev mailing list
> Rivendell-dev@lists.rivendellaudio.org
> http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev
>


-- 
Tim Camp
Director of Operations/Programming
Dot Com Plus L.L.C.
dba WZEW-FM WNSP-FM
Mobile, Al.
___
Rivendell-dev mailing list
Rivendell-dev@lists.rivendellaudio.org
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev


Re: [RDD] Help RN just won't work

2020-10-24 Thread Brian McGlynn
Hi Tim,

What user are running Rivendell as?  If you run as non-root, (as we do),
you'll need to update the code.  The next version of Rivendeil will have
the updated code.

https://github.com/ElvishArtisan/rivendell/pull/604


Brian


*--*
*Brian P. McGlynn*

ᐧ

On Fri, Oct 23, 2020 at 2:49 PM Tim Camp  wrote:

> Greetings,
>
> New install on CentOS 7 of Rivendell 3.4.1
>
> This is day number two of trying every possible thing I can think of as to
> why this doesn't work.
>
> Things I have tried.
>
> 1. various settings for RNRmlOwner
> rd rivendell
> root root
> rd users
> rd rd
>
> 2. paths
> RN with full path
> RN without full path
> changing $PATH
>
> 3. Running env
> running the scripts with sh
> running in bash
>
> Am I missing something?
>
> These scripts contain commands to control our consoles
> which turn on channels, route audio, mute channels, etc
> The scripts send data via udp to the console using /dev/udp
> I have not had a problem with then in version 2.*
> The scripts run fine in terminal as any user.
>
> Thanks for any thoughts or help on this.
>
> Tim Camp
> WZEW-FM
> Mobile, Al.
>
>
>
> ___
> Rivendell-dev mailing list
> Rivendell-dev@lists.rivendellaudio.org
> http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev
>
___
Rivendell-dev mailing list
Rivendell-dev@lists.rivendellaudio.org
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev


Re: [RDD] Help RN just won't work

2020-10-24 Thread Fred Gleason
Ok, let’s try a fully worked-out example of a very ‘minimalist’ example, and 
see if we can scale up from there.

The default ‘/etc/rd.conf’ shipped with Rivendell 3.4.1 has an ‘[Identity]’ 
section that looks like this:

*** snip snip ***
[Identity]
AudioOwner=rivendell
AudioGroup=rivendell

PypadOwner=pypad
PypadGroup=pypad

RnRmlOwner=rivendell
RnRmlGroup=rivendell
*** snip snip ***

That’s designed to replicate a 2.x setup (Principle of Least Astonishment), but 
for this exercise let’s change the user for RN so it’s same one that’s running 
the base Rivendell modules:

*** snip snip ***
[Identity]
AudioOwner=rivendell
AudioGroup=rivendell

PypadOwner=pypad
PypadGroup=pypad

RnRmlOwner=rd
RnRmlGroup=rd
*** snip snip ***

We’ve changed ‘rd.conf’, so restart the ‘rivendell’ service to pick up the 
changes. As ‘root’:

systemctl restart rivendell

Now, start up a ‘Terminal’, and do:

ls -l /home/rd/here

You should get: 'ls: cannot access /home/rd/here: No such file or directory’.

Now, fire up ‘RMLSend’, from the Applications->Rivendell->Utilities menu. In 
the ‘Sent To:’ field enter ‘localhost’, and in the ‘Command:’ field enter ‘RN 
touch /home/rd/here!’. Touch the ‘Send Command’ button.

Now, go back to the terminal and repeat:

ls -l /home/rd/here

Now, you should get back something like: '-rw-r--r--. 1 rd rd 0 Oct 24 09:26 
/home/rd/here’. 

You’ve just created an empty file called ‘here’, in the ‘/home/rd’ directory. A 
very basic starting point, but it will let us establish that the fundamental 
system in Rivendell is working. Once we have that, we can start working to 
determine why your specific scripts won’t run.

Cheers!


|-|
| Frederick F. Gleason, Jr. | Chief Developer |
|   | Paravel Systems |
|-|
| A room without books is like a body without a soul. |
| |
| -- Cicero   |
|-|


___
Rivendell-dev mailing list
Rivendell-dev@lists.rivendellaudio.org
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev


Re: [RDD] Help RN just won't work

2020-10-23 Thread Tim Camp
Greetings,
Correction, retraction
Ok so, the runuser command runs out of ripcd with is running under root so
it should work just fine.

But RN still not working.

Tim


On Fri, Oct 23, 2020, 11:57 PM Tim Camp  wrote:

> Greetings,
>
> Thanks for those who emailed me with suggestions, however this is still a
> no go.
>
> I would like to point out that as of version 3 this is a different thing
> than it was in version 2.
>
> According to the rivendell operations guide
> **
> 13.8.37. Run Shell Command [RN]
> Module ripcd(8)
> Mnemonic RN
> Run a shell command.
> RN cmd!
> Run the shell command cmd.
>
> Note
>
> *The command is actually executed as:runuser -u user -g group cmd*
> where user and group are the values specified by the "RnRmlOwner=" and
> "RnRmlGroup="
> directives in the "[Identity]" section of rd.conf(5). See the runuser(1)
> man page for details
> concerning handling of the process environment.
> *
>
> The bold entry I have noted would seem to be important because if you
> specify
> RnRmlOwner=anyuser (except root)  and   RnRmlGroup=anygroup
> for example
>
> then the command runuser will fail because according to "man runuser"
> -g, --group=group
>   specify  the primary group,
>
> *this option is allowed for root user  only*
>
> so according to the documentation the only user you could specify that
> would work is root.
> This works in a terminal
>
> In Rivendell, Guess what? That doesn't work either.
>
> According to man runuser default path is /usr/local/bin thats where my
> scripts are
> the default env is /bin/bash or /bin/sh or /usr/bin/bash I'm all good with
> that
>
> My scripts run from the command line perfectly
>
> in a terminal "runuser -u root -g root cmd" runs perfection
> so the verdict is it should work except it doesn't
>
> Tim Camp
> WZEW-FM
>
>
>
>
>
> On Fri, Oct 23, 2020 at 1:49 PM Tim Camp  wrote:
>
>> Greetings,
>>
>> New install on CentOS 7 of Rivendell 3.4.1
>>
>> This is day number two of trying every possible thing I can think of as
>> to why this doesn't work.
>>
>> Things I have tried.
>>
>> 1. various settings for RNRmlOwner
>> rd rivendell
>> root root
>> rd users
>> rd rd
>>
>> 2. paths
>> RN with full path
>> RN without full path
>> changing $PATH
>>
>> 3. Running env
>> running the scripts with sh
>> running in bash
>>
>> Am I missing something?
>>
>> These scripts contain commands to control our consoles
>> which turn on channels, route audio, mute channels, etc
>> The scripts send data via udp to the console using /dev/udp
>> I have not had a problem with then in version 2.*
>> The scripts run fine in terminal as any user.
>>
>> Thanks for any thoughts or help on this.
>>
>> Tim Camp
>> WZEW-FM
>> Mobile, Al.
>>
>>
>>
>>
___
Rivendell-dev mailing list
Rivendell-dev@lists.rivendellaudio.org
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev


Re: [RDD] Help RN just won't work

2020-10-23 Thread Tim Camp
Greetings,

Thanks for those who emailed me with suggestions, however this is still a
no go.

I would like to point out that as of version 3 this is a different thing
than it was in version 2.

According to the rivendell operations guide
**
13.8.37. Run Shell Command [RN]
Module ripcd(8)
Mnemonic RN
Run a shell command.
RN cmd!
Run the shell command cmd.

Note

*The command is actually executed as:runuser -u user -g group cmd*
where user and group are the values specified by the "RnRmlOwner=" and
"RnRmlGroup="
directives in the "[Identity]" section of rd.conf(5). See the runuser(1)
man page for details
concerning handling of the process environment.
*

The bold entry I have noted would seem to be important because if you
specify
RnRmlOwner=anyuser (except root)  and   RnRmlGroup=anygroup
for example

then the command runuser will fail because according to "man runuser"
-g, --group=group
  specify  the primary group,

*this option is allowed for root user  only*

so according to the documentation the only user you could specify that
would work is root.
This works in a terminal

In Rivendell, Guess what? That doesn't work either.

According to man runuser default path is /usr/local/bin thats where my
scripts are
the default env is /bin/bash or /bin/sh or /usr/bin/bash I'm all good with
that

My scripts run from the command line perfectly

in a terminal "runuser -u root -g root cmd" runs perfection
so the verdict is it should work except it doesn't

Tim Camp
WZEW-FM





On Fri, Oct 23, 2020 at 1:49 PM Tim Camp  wrote:

> Greetings,
>
> New install on CentOS 7 of Rivendell 3.4.1
>
> This is day number two of trying every possible thing I can think of as to
> why this doesn't work.
>
> Things I have tried.
>
> 1. various settings for RNRmlOwner
> rd rivendell
> root root
> rd users
> rd rd
>
> 2. paths
> RN with full path
> RN without full path
> changing $PATH
>
> 3. Running env
> running the scripts with sh
> running in bash
>
> Am I missing something?
>
> These scripts contain commands to control our consoles
> which turn on channels, route audio, mute channels, etc
> The scripts send data via udp to the console using /dev/udp
> I have not had a problem with then in version 2.*
> The scripts run fine in terminal as any user.
>
> Thanks for any thoughts or help on this.
>
> Tim Camp
> WZEW-FM
> Mobile, Al.
>
>
>
>
___
Rivendell-dev mailing list
Rivendell-dev@lists.rivendellaudio.org
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev


Re: [RDD] Help RN just won't work

2020-10-23 Thread Lorne Tyndale
Tim,

Two things.  First, double check the following settings in the
[Identity] section of your /etc/rd.conf file

RnRmlOwner=
RnRmlGroup=

That is supposed to tell the system what user/group to run the RML's as.

If that doesn't work, I realize this goes against some of the suggested
Linux / Rivendell security conventions, but for testing purposes have
you tried changing the user that the Rivendell daemons run as by
systemd?

As root, edit the file:

/lib/systemd/system/rivendell.service

Then in the [Service] section add a line:

User=

where  is the logged in user that runs RDAirplay and other
Rivendell apps.

Also make sure the User= part is a capital U with the "ser" lower case. 
I made the mistake once of having it all lower case and it didn't work.

This should cause your daemons to run as the same user as your logged in
user.  Again not necessarily the best thing to do for security purposes,
but it might help you troubleshoot the issue.  Of course if you make
changes to your systemd  configuration file then you'll need to restart
the Rivendell services.  As root:

systemctl stop rivendell
systemctl start rivendell

Lorne Tyndale



>  Original Message 
> Subject: [RDD] Help RN just won't work
> From: Tim Camp 
> Date: Fri, October 23, 2020 2:49 pm
> To: User discussion about the Rivendell Radio Automation System
> 
> 
> 
> Greetings,
> 
> New install on CentOS 7 of Rivendell 3.4.1
> 
> This is day number two of trying every possible thing I can think of as to
> why this doesn't work.
> 
> Things I have tried.
> 
> 1. various settings for RNRmlOwner
> rd rivendell
> root root
> rd users
> rd rd
> 
> 2. paths
> RN with full path
> RN without full path
> changing $PATH
> 
> 3. Running env
> running the scripts with sh
> running in bash
> 
> Am I missing something?
> 
> These scripts contain commands to control our consoles
> which turn on channels, route audio, mute channels, etc
> The scripts send data via udp to the console using /dev/udp
> I have not had a problem with then in version 2.*
> The scripts run fine in terminal as any user.
> 
> Thanks for any thoughts or help on this.
> 
> Tim Camp
> WZEW-FM
> Mobile, Al.___
> Rivendell-dev mailing list
> Rivendell-dev@lists.rivendellaudio.org
> http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev
___
Rivendell-dev mailing list
Rivendell-dev@lists.rivendellaudio.org
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev


Re: [RDD] Help RN just won't work

2020-10-23 Thread Kit Haskins
I don't have a /dev/udp in either my Ubuntu (20.04) nor Centos 6.8 (old box)



While what I'm going to suggest fixed another problem with permissions, I'll 
toss it out here, knowing there are many smarter people reading this thread:



I had issues with access to the serial ports /dev/ttyUSBx ...   I added the 
"dialout" group to the rduser.   Which resolved my issues.   As I don't have a 
"/dev/udp" to study under a microscope, I can blindly suggest 



ll /dev/udp 

see what group it is affiliated with and 



usermod -a -G groupname username


If /dev/udp is some executable binary and if you feel brave enough to set the 
sticky bit



chmod 4755 /dev/udp 





I'm also still running 2.19.3 here ...    





I have been reading your progress on the migration to 3.4.x and switching from 
Ubuntu to CentOS 7, I appreciate your notes and comments as you progress thru 
the challenge.   If you continue to beat up on it, eventually it just might 
work :-)



---

Thru the Ethernet, past the Gateway, off the modem pool, nothing but NET .

mailto:k...@ka0wuc.org




 On Fri, 23 Oct 2020 12:49:32 -0600 Tim Camp  wrote 


Greetings,


New install on CentOS 7 of Rivendell 3.4.1



This is day number two of trying every possible thing I can think of as to why 
this doesn't work.



Things I have tried.



1. various settings for RNRmlOwner

rd rivendell

root root

rd users

rd rd



2. paths

RN with full path

RN without full path

changing $PATH



3. Running env

running the scripts with sh

running in bash



Am I missing something?



These scripts contain commands to control our consoles

which turn on channels, route audio, mute channels, etc

The scripts send data via udp to the console using /dev/udp

I have not had a problem with then in version 2.*

The scripts run fine in terminal as any user.



Thanks for any thoughts or help on this.



Tim Camp

WZEW-FM

Mobile, Al.








___
Rivendell-dev mailing list 
mailto:Rivendell-dev@lists.rivendellaudio.org 
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev___
Rivendell-dev mailing list
Rivendell-dev@lists.rivendellaudio.org
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev