supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
* re: Incompatibilities between runit and s6?
@ 2018-01-10 23:23 Avery Payne
  2018-01-11 14:14 ` Charlie Brady
  0 siblings, 1 reply; 30+ messages in thread
From: Avery Payne @ 2018-01-10 23:23 UTC (permalink / raw)
  To: Supervision Mailing List

[-- Attachment #1: Type: text/plain, Size: 372 bytes --]

I am guessing the differences will be subtle, and most of the general
behavior you desire will remain the same.  You may be able to get a way
with a "sed 's/sv\ /s6-sv\ /' <old-script-name >new-script-name" on some of
your scripts; give it a try, what could it hurt?

Also, for those systems not running CentOS, what are you currently using
for init + service management?

^ permalink raw reply	[flat|nested] 30+ messages in thread

* re: Incompatibilities between runit and s6?
  2018-01-10 23:23 Incompatibilities between runit and s6? Avery Payne
@ 2018-01-11 14:14 ` Charlie Brady
  2018-01-13 18:03   ` Compatibilities between runit and s6 (re: Incompatibilities between runit and s6?) Charlie Brady
  0 siblings, 1 reply; 30+ messages in thread
From: Charlie Brady @ 2018-01-11 14:14 UTC (permalink / raw)
  To: Avery Payne; +Cc: Supervision Mailing List


On Wed, 10 Jan 2018, Avery Payne wrote:

> I am guessing the differences will be subtle, and most of the general
> behavior you desire will remain the same.  You may be able to get a way
> with a "sed 's/sv\ /s6-sv\ /' <old-script-name >new-script-name" on some of
> your scripts; give it a try, what could it hurt?

That would fail because, eg, 'sv t xxx' needs to become 's6-svc -t xxx'.  

> Also, for those systems not running CentOS, what are you currently using
> for init + service management?

That's actually a null set, except for some old embedded systems running 
busybox init+runit.


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Compatibilities between runit and s6 (re: Incompatibilities between runit and s6?)
  2018-01-11 14:14 ` Charlie Brady
@ 2018-01-13 18:03   ` Charlie Brady
  2018-01-13 18:55     ` Laurent Bercot
  2018-01-14 11:36     ` Jonathan de Boyne Pollard
  0 siblings, 2 replies; 30+ messages in thread
From: Charlie Brady @ 2018-01-13 18:03 UTC (permalink / raw)
  To: Supervision Mailing List


On Thu, 11 Jan 2018, Charlie Brady wrote:

> On Wed, 10 Jan 2018, Avery Payne wrote:
> 
> > I am guessing the differences will be subtle, and most of the general
> > behavior you desire will remain the same.  You may be able to get a way
> > with a "sed 's/sv\ /s6-sv\ /' <old-script-name >new-script-name" on some of
> > your scripts; give it a try, what could it hurt?
> 
> That would fail because, eg, 'sv t xxx' needs to become 's6-svc -t xxx'.  

I've started thinking that I wouldn't need to abandon use of 'sv'. With 
both runit and s6 installed, and a supervision tree of s6-svscan and 
s6-supervise processes, I suspect that 'sv t ...' would still work. 'sv 
status ...' on the other hand might not. I would need to study the control 
fifo protocol and status file layout to be sure.

Again, has anyone else considered these things and can offer an opinion? 
Are the differences documented anywhere? There is a certain level of 
compatibility between daemontools and runit, and I presume the same exists 
for s6. The devil is in the detils.




^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Compatibilities between runit and s6 (re: Incompatibilities between runit and s6?)
  2018-01-13 18:03   ` Compatibilities between runit and s6 (re: Incompatibilities between runit and s6?) Charlie Brady
@ 2018-01-13 18:55     ` Laurent Bercot
  2018-01-14 11:36     ` Jonathan de Boyne Pollard
  1 sibling, 0 replies; 30+ messages in thread
From: Laurent Bercot @ 2018-01-13 18:55 UTC (permalink / raw)
  To: Supervision Mailing List


>I've started thinking that I wouldn't need to abandon use of 'sv'. With
>both runit and s6 installed, and a supervision tree of s6-svscan and
>s6-supervise processes, I suspect that 'sv t ...' would still work. 'sv
>status ...' on the other hand might not. I would need to study the 
>control
>fifo protocol and status file layout to be sure.

  sv status will not work, because the status file has a different
format in s6 and in runit.
  sv t and others? It may work; it may not. If you try this, it's on
you: the interface between s6-svc and s6-supervise is not public and
is not guaranteed stable. Generally speaking, using the tools of one
supervision suite on another one isn't something I think is worth
spending effort on.

--
  Laurent



^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Compatibilities between runit and s6 (re: Incompatibilities between runit and s6?)
  2018-01-13 18:03   ` Compatibilities between runit and s6 (re: Incompatibilities between runit and s6?) Charlie Brady
  2018-01-13 18:55     ` Laurent Bercot
@ 2018-01-14 11:36     ` Jonathan de Boyne Pollard
  2018-01-14 21:08       ` Charlie Brady
  1 sibling, 1 reply; 30+ messages in thread
From: Jonathan de Boyne Pollard @ 2018-01-14 11:36 UTC (permalink / raw)
  To: Supervision

[-- Attachment #1: Type: text/plain, Size: 765 bytes --]

Charlie Brady:

> There is a certain level of compatibility between daemontools and 
> runit, and I presume the same exists for s6. The devil is in the detils.
>
The |service-manager| manual page from version 1.37 or later of the nosh 
toolset contains  a full breakdown of the control/status API in a 
|supervise/| directory, including the daemontools-encore extensions and 
the nosh service-manager's own extensions.  I am hoping to get version 
1.37 released within the next week.  In the meantime, I have pushed the 
new manual page to the on-line copy of the /nosh Guide/ 
<http://jdebp.info./Softwares/nosh/>.  You can find the HTML-form manual 
page for |service-manager| hyperlinked from several pages in the 
/Guide/, including the _new Interfaces_ page.


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Compatibilities between runit and s6 (re: Incompatibilities between runit and s6?)
  2018-01-14 11:36     ` Jonathan de Boyne Pollard
@ 2018-01-14 21:08       ` Charlie Brady
  2018-01-14 21:54         ` Jonathan de Boyne Pollard
  0 siblings, 1 reply; 30+ messages in thread
From: Charlie Brady @ 2018-01-14 21:08 UTC (permalink / raw)
  To: Jonathan de Boyne Pollard; +Cc: Supervision


Thanks Jonathan.

Do you know whether anyone has documented how to build on a non-Debian 
linux? An rpm spec file would be ideal, but just simple non-Debian centric 
build instructions would be better than nothing.

On Sun, 14 Jan 2018, Jonathan de Boyne Pollard wrote:

> Charlie Brady:
> 
> > There is a certain level of compatibility between daemontools and runit, and
> > I presume the same exists for s6. The devil is in the detils.
> >
> The |service-manager| manual page from version 1.37 or later of the nosh
> toolset contains  a full breakdown of the control/status API in a 
> |supervise/| directory, including the daemontools-encore extensions and 
> the nosh service-manager's own extensions.  I am hoping to get version 1.37
> released within the next week.  In the meantime, I have pushed the new manual
> page to the on-line copy of the /nosh Guide/
> <http://jdebp.info./Softwares/nosh/>.  You can find the HTML-form manual page
> for |service-manager| hyperlinked from several pages in the /Guide/, including
> the _new Interfaces_ page.
> 
> 


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Compatibilities between runit and s6 (re: Incompatibilities between runit and s6?)
  2018-01-14 21:08       ` Charlie Brady
@ 2018-01-14 21:54         ` Jonathan de Boyne Pollard
  2018-01-15 12:53           ` Thomas Caravia
  0 siblings, 1 reply; 30+ messages in thread
From: Jonathan de Boyne Pollard @ 2018-01-14 21:54 UTC (permalink / raw)
  To: Supervision

[-- Attachment #1: Type: text/plain, Size: 2080 bytes --]

Jonathan de Boyne Pollard:

> The |service-manager| manual page from version 1.37 or later of the 
> nosh toolset contains  a full breakdown of the control/status API in a 
> |supervise/| directory, including the daemontools-encore extensions 
> and the nosh service-manager's own extensions.  I am hoping to get 
> version 1.37 released within the next week.  In the meantime, I have 
> pushed the new manual page to the on-line copy of the /nosh Guide/ 
> <http://jdebp.info./Softwares/nosh/>.  You can find the HTML-form 
> manual page for |service-manager| hyperlinked from several pages in 
> the /Guide/, including the _new Interfaces_ page.
>
Charlie Brady:

> Do you know whether anyone has documented how to build on a non-Debian 
> linux? An rpm spec file would be ideal, but just simple non-Debian 
> centric build instructions would be better than nothing.
>
Yes.  I have.  The slashpackage-style build instructions, which are of 
course /not/ Debian-specific nor even /Linux-/specific, are actually 
right there on the source package WWW page.

The only thing that is Debian-specific is the step that gets one from a 
/built/ slashpackage-style package to Debian binary packages.  This is 
in the supplied |package/debian/rules| command.  But even that is not 
actually Debian-specific, as there is a similar |package/bsd/rules| 
command that does the same thing on the BSDs.

Thomas Caravia constructed the Archnosh PKGBUILD the same way. It does 
the slashpackage-style build, then takes the built slashpackage-style 
package and parcels it out into a set of Arch binary packages, with a 
light dusting of patches to a handful of service bundles.  It even 
mostly re-uses the Debian maintenance scripts.

(On that note, Thomas: You may enjoy the start that I have made in 1.37 
to a _Packages and Ports_ chapter in the /nosh Guide/.  Yes, I currenly 
plan for the |.p|/|.func| system to get at least a short mention.)

I was only expecting you to read the manual for doco on the common 
control/status API that you were interested in, not build the software.  (-:


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Compatibilities between runit and s6 (re: Incompatibilities between runit and s6?)
  2018-01-14 21:54         ` Jonathan de Boyne Pollard
@ 2018-01-15 12:53           ` Thomas Caravia
  2018-01-15 13:33             ` Laurent Bercot
                               ` (3 more replies)
  0 siblings, 4 replies; 30+ messages in thread
From: Thomas Caravia @ 2018-01-15 12:53 UTC (permalink / raw)
  To: Supervision; +Cc: Jonathan de Boyne Pollard

Hello,

> > Do you know whether anyone has documented how to build on a non-Debian 
> > linux? An rpm spec file would be ideal, but just simple non-Debian 
> > centric build instructions would be better than nothing.
> 
> Thomas Caravia constructed the Archnosh PKGBUILD the same way. It does 
> the slashpackage-style build, then takes the built slashpackage-style 
> package and parcels it out into a set of Arch binary packages, with a 
> light dusting of patches to a handful of service bundles.  It even 
> mostly re-uses the Debian maintenance scripts.

I'm not familiar with rpm but my packaging is just this:

1) package/compile: you'll need "redo" to build

2) package/stage: you can tweak this script to fit your distribution's
filesystem hierarchy

3) use the resulting package trees for your packaging: in my case
one-for-one copying

4) include install/upgrade/remove scripts from package/debian for the
packages that need them

Service bundle patches account for differences in paths or usernames
with Archlinux, when I find them.

> (On that note, Thomas: You may enjoy the start that I have made in 1.37 
> to a _Packages and Ports_ chapter in the /nosh Guide/.  Yes, I currenly 
> plan for the |.p|/|.func| system to get at least a short mention.)

It did not go unnoticed!

Regards,
Thomas


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Compatibilities between runit and s6 (re: Incompatibilities between runit and s6?)
  2018-01-15 12:53           ` Thomas Caravia
@ 2018-01-15 13:33             ` Laurent Bercot
  2018-01-16  0:33             ` Charlie Brady
                               ` (2 subsequent siblings)
  3 siblings, 0 replies; 30+ messages in thread
From: Laurent Bercot @ 2018-01-15 13:33 UTC (permalink / raw)
  To: Supervision


  Note that s6 has been using a configure/make/sudo make install
building scheme since 2014, and supports FHS as well as slashpackage,
so it can be easily packaged for any distribution. :P

--
  Laurent



^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Compatibilities between runit and s6 (re: Incompatibilities between runit and s6?)
  2018-01-15 12:53           ` Thomas Caravia
  2018-01-15 13:33             ` Laurent Bercot
@ 2018-01-16  0:33             ` Charlie Brady
  2018-01-16  0:44               ` nosh build problems (Re: Compatibilities between runit and s6 (re: ) Charlie Brady
  2018-01-16  8:10               ` Compatibilities between runit and s6 (re: Incompatibilities between runit and s6?) Jonathan de Boyne Pollard
  2018-01-16  8:06             ` Jonathan de Boyne Pollard
       [not found]             ` <89cffa18-a72a-ed98-031c-c72fc00ad5aa@ntlworld.com>
  3 siblings, 2 replies; 30+ messages in thread
From: Charlie Brady @ 2018-01-16  0:33 UTC (permalink / raw)
  To: Thomas Caravia; +Cc: Supervision


On Mon, 15 Jan 2018, Thomas Caravia wrote:

> I'm not familiar with rpm but my packaging is just this:
> 
> 1) package/compile: you'll need "redo" to build

Sorry, doesn't work for me:

bash-4.2$ package/compile 
redo: ERROR: all: Cannot find .do file to use.
bash-4.2$ sh -ex package/compile
+ '[' '!' -d package ']'
+ '[' '!' -d source ']'
+ ./package/prepare
+ ./package/make
redo: ERROR: all: Cannot find .do file to use.
bash-4.2$ 

The redo build works, but isn't perfect either:

bash-4.2$ package/compile
./package/tools: line 17: type: clang++: not found
redo.cpp: In function void read_db_line(std::istream&, Information&, 
std::string&):
redo.cpp:394:14: warning: unused variable c [-Wunused-variable]
  switch (int c = s.get()) {
              ^
popt.cpp: In member function virtual void popt::table_definition::help():
popt.cpp:147:13: warning: unused variable short_name [-Wunused-variable]
    if (char short_name = n->query_short_name()) l += 2;
             ^
popt.cpp:149:14: warning: unused variable short_name [-Wunused-variable]
     if (char short_name = n->query_short_name()) l += 1;
              ^
popt.cpp:162:14: warning: unused variable short_name [-Wunused-variable]
     if (char short_name = n->query_short_name()) t += "|";
              ^
bash-4.2$ 

Build platform is Fedora linux.


^ permalink raw reply	[flat|nested] 30+ messages in thread

* nosh build problems (Re: Compatibilities between runit and s6 (re: )
  2018-01-16  0:33             ` Charlie Brady
@ 2018-01-16  0:44               ` Charlie Brady
  2018-01-16 16:09                 ` Charlie Brady
  2018-01-16  8:10               ` Compatibilities between runit and s6 (re: Incompatibilities between runit and s6?) Jonathan de Boyne Pollard
  1 sibling, 1 reply; 30+ messages in thread
From: Charlie Brady @ 2018-01-16  0:44 UTC (permalink / raw)
  To: Jonathan de Boyne Pollard; +Cc: Supervision


On Mon, 15 Jan 2018, Charlie Brady wrote:

> > 1) package/compile: you'll need "redo" to build
> 
> Sorry, doesn't work for me:
> 
> bash-4.2$ package/compile 
> redo: ERROR: all: Cannot find .do file to use.
> bash-4.2$ sh -ex package/compile
> + '[' '!' -d package ']'
> + '[' '!' -d source ']'
> + ./package/prepare
> + ./package/make
> redo: ERROR: all: Cannot find .do file to use.
> bash-4.2$ 

Here's some more detail on the build failure:

bash-4.2$ sh -ex package/make
+ test '!' -d package
+ test '!' -d source
+ test '!' -d build
+ expr '' : --jobs
+ expr '' : --jobs
+ case "`uname`" in
++ uname
++ fgrep -c processor /proc/cpuinfo
+ cpus=2
+ exec redo --directory build --jobs 2 -- all
redo: ERROR: all: Cannot find .do file to use.
bash-4.2$ ls build/
bash-4.2$


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Compatibilities between runit and s6 (re: Incompatibilities between runit and s6?)
  2018-01-15 12:53           ` Thomas Caravia
  2018-01-15 13:33             ` Laurent Bercot
  2018-01-16  0:33             ` Charlie Brady
@ 2018-01-16  8:06             ` Jonathan de Boyne Pollard
  2018-01-16 14:52               ` multiplexd
       [not found]             ` <89cffa18-a72a-ed98-031c-c72fc00ad5aa@ntlworld.com>
  3 siblings, 1 reply; 30+ messages in thread
From: Jonathan de Boyne Pollard @ 2018-01-16  8:06 UTC (permalink / raw)
  To: Supervision

Thomas Caravia:

> I'm not familiar with rpm but my packaging is just this:
>
You have prompted me to fill in a long-standing dangling hyperlink.

* http://jdebp.eu./FGA/slashpackage.html



^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Compatibilities between runit and s6 (re: Incompatibilities between runit and s6?)
  2018-01-16  0:33             ` Charlie Brady
  2018-01-16  0:44               ` nosh build problems (Re: Compatibilities between runit and s6 (re: ) Charlie Brady
@ 2018-01-16  8:10               ` Jonathan de Boyne Pollard
  2018-01-16 15:59                 ` Charlie Brady
  1 sibling, 1 reply; 30+ messages in thread
From: Jonathan de Boyne Pollard @ 2018-01-16  8:10 UTC (permalink / raw)
  To: Supervision

[-- Attachment #1: Type: text/plain, Size: 689 bytes --]

Charlie Brady:

> Sorry, doesn't work for me:
>
You need a POSIX-conformant system with all of the POSIX utilities, 
including |pax| 
<http://pubs.opengroup.org/onlinepubs/9699919799/utilities/pax.html>.  
The Debian |package/debian/control| file automatically ensures this on 
Debian, with its |Build-Depends:| information.  The BSDs have these 
tools /as standard/ in the base operating system, out of the box.  
Thomas Caravia both notes this in the Archnosh doco (in the section 
headed "Dependencies") and declares it as a |makedepends| in the 
|PKGBUILD| itself so that it is automatically ensured on Arch.  You are 
going to have to do this yourself on your operating system, too.


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Compatibilities between runit and s6 (re: Incompatibilities between runit and s6?)
  2018-01-16  8:06             ` Jonathan de Boyne Pollard
@ 2018-01-16 14:52               ` multiplexd
  0 siblings, 0 replies; 30+ messages in thread
From: multiplexd @ 2018-01-16 14:52 UTC (permalink / raw)
  To: supervision

On Tue, Jan 16, 2018 at 08:06:09AM +0000, Jonathan de Boyne Pollard wrote:
> You have prompted me to fill in a long-standing dangling hyperlink.
> 
> * http://jdebp.eu./FGA/slashpackage.html
> 

Ah, good to hear! I've been waiting for that page to be written for a 
while :).



^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Compatibilities between runit and s6 (re: Incompatibilities between runit and s6?)
       [not found]             ` <89cffa18-a72a-ed98-031c-c72fc00ad5aa@ntlworld.com>
@ 2018-01-16 15:44               ` Laurent Bercot
  0 siblings, 0 replies; 30+ messages in thread
From: Laurent Bercot @ 2018-01-16 15:44 UTC (permalink / raw)
  To: Supervision

>You have prompted me to fill in a long-standing dangling hyperlink.
>
>* http://jdebp.eu./FGA/slashpackage.html

  If I may add my two cents: I think you're mixing two very different
things in this page.

  There is the slashpackage convention for installed packages, i.e.
visibility of executables in /package/category/name/command/name
and the like. I find it useful; and my software *still follows* that
convention, if compiled with --enable-slashpackage.

  And there is the internal structure for building packages, which is
package/compile, package/run, etc. I liked its simplicity at first,
but with experience, I found that it wasn't ideal.

  The primary issue is that it's inherently not cross-compile-friendly.
Having a pre-written compilation script makes it difficult to separate
gathering information about the target and actually building for the
target; whereas a configure/make system can frontload the data
gathering operation. (And in my case I frontload it all in the
skalibs package, so when the annoying part of finding correct sysdeps
for the target has been done once, all the rest of the software
cross-compiles effortlessly.)

  A secondary issue is that system administrators and distribution
packagers, i.e. the intended users of the build system, just could
not stop complaining about it, to the point that complaints about the
build system were for some time the majority of the mailing-list's
traffic. No matter whether their reasons were good or bad, if the
intended users of an interface don't like the interface, then it's
probably a good idea to change the interface. Since switching to
configure/make, the popularity of s6 has skyrocketed; I don't think
it's entirely accidental.

  So yes, the internal package/compile build system is something I
stepped away from. But IMO that's not at all the important part of
the "slashpackage convention", one does not imply the other; and
I wish you would emphasize that.

--
  Laurent



^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Compatibilities between runit and s6 (re: Incompatibilities between runit and s6?)
  2018-01-16  8:10               ` Compatibilities between runit and s6 (re: Incompatibilities between runit and s6?) Jonathan de Boyne Pollard
@ 2018-01-16 15:59                 ` Charlie Brady
  2018-01-16 21:51                   ` Jonathan de Boyne Pollard
  0 siblings, 1 reply; 30+ messages in thread
From: Charlie Brady @ 2018-01-16 15:59 UTC (permalink / raw)
  To: Jonathan de Boyne Pollard; +Cc: Supervision


On Tue, 16 Jan 2018, Jonathan de Boyne Pollard wrote:

> Charlie Brady:
> 
> > Sorry, doesn't work for me:
> >
> You need a POSIX-conformant system with all of the POSIX utilities, including
> |pax| <http://pubs.opengroup.org/onlinepubs/9699919799/utilities/pax.html>.

OK, so this statement is incomplete:

"It requires redo to build, and builds with the g++ and clang++ 
compilers".

Perhaps you should use "or" there, rather than "and". Both compilers 
aren't required, IIUC.

And the build doesn't fail gracefully. There is no indication that the 
build failed for lack of "pax".


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: nosh build problems (Re: Compatibilities between runit and s6 (re: )
  2018-01-16  0:44               ` nosh build problems (Re: Compatibilities between runit and s6 (re: ) Charlie Brady
@ 2018-01-16 16:09                 ` Charlie Brady
  2018-01-16 20:51                   ` Jonathan de Boyne Pollard
  2018-02-18 21:16                   ` nosh build problems (Re: Compatibilities between runit and s6 (re: ) Guillermo
  0 siblings, 2 replies; 30+ messages in thread
From: Charlie Brady @ 2018-01-16 16:09 UTC (permalink / raw)
  To: Jonathan de Boyne Pollard; +Cc: Supervision


OK, with pax installed, but gets a lot further.

Now seeing these many times:

/usr/include/curses.h:843:31: error:   initializing argument 1 of 'char* 
tigetstr(char*)' [-fpermissive]

service-status.cpp:148:21: error: invalid conversion from 'const char*' to 
'char*' [-fpermissive]
   s = tigetstr(setaf);

and this:

service-status.cpp:276:111: warning: enumeral and non-enumeral type in 
conditional expression [enabled by default]
   const char state(b >= ENCORE_STATUS_BLOCK_SIZE ? 
status[ENCORE_STATUS_OFFSET] : p ? encore_status_running : 
encore_status_stopped);

 This is on CentOS7 build platform.



^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: nosh build problems (Re: Compatibilities between runit and s6 (re: )
  2018-01-16 16:09                 ` Charlie Brady
@ 2018-01-16 20:51                   ` Jonathan de Boyne Pollard
  2018-01-17  1:26                     ` Guillermo
  2018-01-17 15:25                     ` Charlie Brady
  2018-02-18 21:16                   ` nosh build problems (Re: Compatibilities between runit and s6 (re: ) Guillermo
  1 sibling, 2 replies; 30+ messages in thread
From: Jonathan de Boyne Pollard @ 2018-01-16 20:51 UTC (permalink / raw)
  To: Supervision; +Cc: Charlie Brady

[-- Attachment #1: Type: text/plain, Size: 758 bytes --]

Charlie Brady:

> /usr/include/curses.h:843:31: error:   initializing argument 1 of 'char*
> tigetstr(char*)' [-fpermissive]
>
> service-status.cpp:148:21: error: invalid conversion from 'const char*' to
> 'char*' [-fpermissive]
>     s = tigetstr(setaf);

This is a problem that I thought was confined to OpenBSD, and its 
not-|const|-correct ncurses library.  Certainly this has never been a 
problem on Debian nor on FreeBSD, and M. Caravia did not report any lack 
of |const|-correctness on Arch Linux.  What does line 843 of your 
|/usr/include/curses.h| actually say?  Because that's not the location 
of that function declaration in that header in either Dickey ncurses or 
Acton pdcurses as far as I can see.  So what curses are you actually using?


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Compatibilities between runit and s6 (re: Incompatibilities between runit and s6?)
  2018-01-16 15:59                 ` Charlie Brady
@ 2018-01-16 21:51                   ` Jonathan de Boyne Pollard
  0 siblings, 0 replies; 30+ messages in thread
From: Jonathan de Boyne Pollard @ 2018-01-16 21:51 UTC (permalink / raw)
  To: Supervision; +Cc: Charlie Brady

[-- Attachment #1: Type: text/plain, Size: 979 bytes --]

Charlie Brady:

> OK, so this statement is incomplete:
>
It also does not tell you that you need other POSIX-standard commands 
such as |mv| and |ln|.   But you need them, too.  I draw the line at 
listing every command, that POSIX-conformant systems have had to have 
for two decades and that are also listed in the Linux Standard Base 
<https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Common/LSB-Common/rcommands.html>, 
that is required.  That would be ridiculous.  I also don't mention 
things that /operating system doco/ says are fundamental for building 
packages, like build-essential 
<https://www.debian.org/doc/manuals/maint-guide/start.en.html#needprogs> 
and base-devel 
<https://wiki.archlinux.org/index.php/Creating_Packages#Prerequisite_software>. 
Pointing out that you need |redo|, on the other hand, is pointing out 
something that is not POSIX, not in the LSB, and not in the operating 
system doco.  On those grounds, I should add that you need |xmlto|.


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: nosh build problems (Re: Compatibilities between runit and s6 (re: )
  2018-01-16 20:51                   ` Jonathan de Boyne Pollard
@ 2018-01-17  1:26                     ` Guillermo
  2018-01-17  7:35                       ` Jonathan de Boyne Pollard
  2018-01-17 15:25                     ` Charlie Brady
  1 sibling, 1 reply; 30+ messages in thread
From: Guillermo @ 2018-01-17  1:26 UTC (permalink / raw)
  To: Supervision

2018-01-16 17:51 GMT-03:00 Jonathan de Boyne Pollard:
>
> Charlie Brady:
>
>> /usr/include/curses.h:843:31: error:   initializing argument 1 of 'char*
>> tigetstr(char*)' [-fpermissive]
>>
>> service-status.cpp:148:21: error: invalid conversion from 'const char*' to
>> 'char*' [-fpermissive]
>>     s = tigetstr(setaf);
>
> This is a problem that I thought was confined to OpenBSD, and its
> not-|const|-correct ncurses library.  Certainly this has never been a
> problem on Debian nor on FreeBSD, and M. Caravia did not report any lack of
> |const|-correctness on Arch Linux.

Neither has been a problem on Gentoo. However...

>  What does line 843 of your
> |/usr/include/curses.h| actually say?  Because that's not the location of
> that function declaration in that header in either Dickey ncurses or Acton
> pdcurses as far as I can see.  So what curses are you actually using?

Dickey ncurses' 'configure' script has options --enable-const and
--disable-const. When ncurses is built with --disable-const,
tigetstr()'s parameter has type char *, when built with
--enable-const, it has type const char *. When neither is specified,
default is --disable-const for ncurses 5, and --enable-const for
ncurses 6.

On my computer:

$ grep -E '(define NCURSES_CONST|tigetstr)' /usr/include/curses.h
#define NCURSES_CONST const
extern NCURSES_EXPORT(char *) tigetstr (NCURSES_CONST char *);  /*
implemented */

I can't check what is the case for CentOS, asuming it ships Dickey
ncurses, but I could bet...

G.


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: nosh build problems (Re: Compatibilities between runit and s6 (re: )
  2018-01-17  1:26                     ` Guillermo
@ 2018-01-17  7:35                       ` Jonathan de Boyne Pollard
  0 siblings, 0 replies; 30+ messages in thread
From: Jonathan de Boyne Pollard @ 2018-01-17  7:35 UTC (permalink / raw)
  To: Supervision

[-- Attachment #1: Type: text/plain, Size: 920 bytes --]

Guillermo:

> Jonathan de Boyne Pollard:
>
>> What does line 843 of your |/usr/include/curses.h| actually say? 
>> Because that's not the location of that function declaration in that 
>> header in either Dickey ncurses or Acton pdcurses as far as I can 
>> see. So what curses are you actually using?
>>
> Dickey ncurses' |configure| script has options |--enable-const| and 
> |--disable-const|. [...]
>
I am aware.  It doesn't shift that declaration onto line 843 of that 
header. It was quite a few lines further down a few years ago 
<https://github.com/ThomasDickey/ncurses-snapshots/blame/5246b41942b2734b012b118903ca869b1a1fae2f/include/curses.h.in#L854>, 
and is even further down nowadays.  So either this is a significantly 
older Dickey ncurses, older even than what is in Debian 8 
<https://anonscm.debian.org/cgit/collab-maint/ncurses.git/tree/include/curses.h.in?h=jessie#n854>, 
or it is something else.


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: nosh build problems (Re: Compatibilities between runit and s6 (re: )
  2018-01-16 20:51                   ` Jonathan de Boyne Pollard
  2018-01-17  1:26                     ` Guillermo
@ 2018-01-17 15:25                     ` Charlie Brady
  2018-01-18 11:58                       ` Guillermo
  1 sibling, 1 reply; 30+ messages in thread
From: Charlie Brady @ 2018-01-17 15:25 UTC (permalink / raw)
  To: Jonathan de Boyne Pollard; +Cc: Supervision


On Tue, 16 Jan 2018, Jonathan de Boyne Pollard wrote:

> This is a problem that I thought was confined to OpenBSD, and its
> not-|const|-correct ncurses library.  Certainly this has never been a problem
> on Debian nor on FreeBSD, and M. Caravia did not report any lack of
> |const|-correctness on Arch Linux.  What does line 843 of your 
> |/usr/include/curses.h| actually say?  Because that's not the location 
> of that function declaration in that header in either Dickey ncurses or Acton
> pdcurses as far as I can see.  So what curses are you actually using?

CentOS 7 is not an obscure distribution.

bash-4.2$ sed -n 843p /usr/include/curses.h
extern NCURSES_EXPORT(char *) tigetstr (NCURSES_CONST char *);          /* 
implemented */
bash-4.2$ rpm -qf /usr/include/curses.h
ncurses-devel-5.9-14.20130511.el7_4.x86_64
bash-4.2$ 


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: nosh build problems (Re: Compatibilities between runit and s6 (re: )
  2018-01-17 15:25                     ` Charlie Brady
@ 2018-01-18 11:58                       ` Guillermo
  2018-01-18 14:25                         ` nosh build problems (Re: Compatibilities between runit and s6 Charlie Brady
  0 siblings, 1 reply; 30+ messages in thread
From: Guillermo @ 2018-01-18 11:58 UTC (permalink / raw)
  To: Supervision

2018-01-17 12:25 GMT-03:00 Charlie Brady:
>
> bash-4.2$ sed -n 843p /usr/include/curses.h
> extern NCURSES_EXPORT(char *) tigetstr (NCURSES_CONST char *);          /*
> implemented */
> bash-4.2$ rpm -qf /usr/include/curses.h
> ncurses-devel-5.9-14.20130511.el7_4.x86_64

And

$ grep 'define NCURSES_CONST' /usr/include/curses.h

probably says:

#define NCURSES_CONST /*nothing*/

Correct?

G.


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: nosh build problems (Re: Compatibilities between runit and s6
  2018-01-18 11:58                       ` Guillermo
@ 2018-01-18 14:25                         ` Charlie Brady
  0 siblings, 0 replies; 30+ messages in thread
From: Charlie Brady @ 2018-01-18 14:25 UTC (permalink / raw)
  To: Guillermo; +Cc: Supervision


On Thu, 18 Jan 2018, Guillermo wrote:

> And
> 
> $ grep 'define NCURSES_CONST' /usr/include/curses.h
> 
> probably says:
> 
> #define NCURSES_CONST /*nothing*/
> 
> Correct?

Correct.

bash-4.2$ grep 'define NCURSES_CONST' /usr/include/curses.h
#define NCURSES_CONST /*nothing*/
bash-4.2$ 


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: nosh build problems (Re: Compatibilities between runit and s6 (re: )
  2018-01-16 16:09                 ` Charlie Brady
  2018-01-16 20:51                   ` Jonathan de Boyne Pollard
@ 2018-02-18 21:16                   ` Guillermo
  1 sibling, 0 replies; 30+ messages in thread
From: Guillermo @ 2018-02-18 21:16 UTC (permalink / raw)
  To: Supervision

2018-01-16 13:09 GMT-03:00 Charlie Brady:
>
> Now seeing these many times:
>
> /usr/include/curses.h:843:31: error:   initializing argument 1 of 'char*
> tigetstr(char*)' [-fpermissive]
>
> service-status.cpp:148:21: error: invalid conversion from 'const char*' to
> 'char*' [-fpermissive]
>    s = tigetstr(setaf);
> [...]
>  This is on CentOS7 build platform.

This should be fixed in nosh 1.37. So, unless there were other
compiler errors (warnings are nonfatal), nosh binaries should now
build on CentOS too.

G.


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Incompatibilities between runit and s6?
  2018-01-11 14:19   ` Charlie Brady
@ 2018-01-15 12:31     ` Laurent Bercot
  0 siblings, 0 replies; 30+ messages in thread
From: Laurent Bercot @ 2018-01-15 12:31 UTC (permalink / raw)
  To: supervision

>Thanks. I would rather you write one small unit file then me needing to
>write ten or fifteen of them.

  Done.
  https://skarnet.org/software/s6/s6-svscan-not-1.html#systemd

  I did not follow Jonathan's suggestion to use a .path unit file,
because the other examples on this page assume that the scandir
is already present at boot time, and there's no need to burden
the poor system with one more inotify watch. :)

--
  Laurent



^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Incompatibilities between runit and s6?
  2018-01-10 19:49 ` Laurent Bercot
  2018-01-11 14:19   ` Charlie Brady
@ 2018-01-13  3:48   ` Jonathan de Boyne Pollard
  1 sibling, 0 replies; 30+ messages in thread
From: Jonathan de Boyne Pollard @ 2018-01-13  3:48 UTC (permalink / raw)
  To: Supervision

Laurent Bercot:

> Also, admittedly, I simply did not want to read the systemd unit file 
> documentation to understand how to start a s6 supervision tree from 
> systemd. I will do the effort and come up with a small unit file 
> suitable for this.
>

* https://lists.debian.org/debian-user/2014/09/msg01715.html

* http://jdebp.info./FGA/inittab-is-history.html

* https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=752075#82



^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Incompatibilities between runit and s6?
  2018-01-10 19:49 ` Laurent Bercot
@ 2018-01-11 14:19   ` Charlie Brady
  2018-01-15 12:31     ` Laurent Bercot
  2018-01-13  3:48   ` Jonathan de Boyne Pollard
  1 sibling, 1 reply; 30+ messages in thread
From: Charlie Brady @ 2018-01-11 14:19 UTC (permalink / raw)
  To: Laurent Bercot; +Cc: supervision


On Wed, 10 Jan 2018, Laurent Bercot wrote:

> >If you are a systemd user, chances are you do not need s6.
> >
> >Really? So all the criticism of systemd is bunkum?
> 
>  :) I need to update this page.
>  What this means is that systemd does provide a supervision
> infrastructure, so for people stuck with systemd, it's okay to use what
> their system provides, and s6 is redundant there. This does not mean
> that all my systemd criticism is invalid.
> 
>  Also, admittedly, I simply did not want to read the systemd unit file
> documentation to understand how to start a s6 supervision tree from
> systemd. I will do the effort and come up with a small unit file
> suitable for this.

Thanks. I would rather you write one small unit file then me needing to 
write ten or fifteen of them.

I agree with you about the systemd unit file documentation. That's exactly 
why I still need runit or s6. Well, one of the reasons.


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: Incompatibilities between runit and s6?
  2018-01-10 15:57 Incompatibilities between runit and s6? Charlie Brady
@ 2018-01-10 19:49 ` Laurent Bercot
  2018-01-11 14:19   ` Charlie Brady
  2018-01-13  3:48   ` Jonathan de Boyne Pollard
  0 siblings, 2 replies; 30+ messages in thread
From: Laurent Bercot @ 2018-01-10 19:49 UTC (permalink / raw)
  To: supervision

>Has anyone tabulated technical differences between runit and s6? I'm
>considering migrating some systems which use runit to supervise some of
>their services (systemd the others - they're CentOS based). I am 
>wondering
>whether I can write a wrapper caled "sv" which calls s6-svc with the
>appropriate argument rewriting, to avoid needing to find and modify 
>many
>scripts. Has anyone written such an 'sv' command already?

  I'm not aware of such a command, but s6-svc supports everything sv
does, so writing such a script should not be hard. The only difficulty
is if the service uses a ./check file, which "sv start" supports
natively but s6-svc does not, so the wrapper would need to perform
the ./check polling itself; but the best thing to do in this case
is to rewrite the run script to use s6-notifyoncheck, so the check
automatically uses the s6 readiness notification framework.


>If you are a systemd user, chances are you do not need s6.
>
>Really? So all the criticism of systemd is bunkum?

  :) I need to update this page.
  What this means is that systemd does provide a supervision
infrastructure, so for people stuck with systemd, it's okay to use what
their system provides, and s6 is redundant there. This does not mean
that all my systemd criticism is invalid.

  Also, admittedly, I simply did not want to read the systemd unit file
documentation to understand how to start a s6 supervision tree from
systemd. I will do the effort and come up with a small unit file
suitable for this.

--
  Laurent



^ permalink raw reply	[flat|nested] 30+ messages in thread

* Incompatibilities between runit and s6?
@ 2018-01-10 15:57 Charlie Brady
  2018-01-10 19:49 ` Laurent Bercot
  0 siblings, 1 reply; 30+ messages in thread
From: Charlie Brady @ 2018-01-10 15:57 UTC (permalink / raw)
  To: supervision


Has anyone tabulated technical differences between runit and s6? I'm 
considering migrating some systems which use runit to supervise some of 
their services (systemd the others - they're CentOS based). I am wondering 
whether I can write a wrapper caled "sv" which calls s6-svc with the 
appropriate argument rewriting, to avoid needing to find and modify many 
scripts. Has anyone written such an 'sv' command already?

I'm disappointed that the documentation is so dismissive of using s6 
process supervision on a system which uses systemd as init.

https://skarnet.org/software/s6/s6-svscan-not-1.html

 If you are a systemd user, chances are you do not need s6.

Really? So all the criticism of systemd is bunkum?

https://skarnet.org/software/s6/systemd.html

 If you are interested in using s6, I encourage you to also stop using systemd.

Not practical.


^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2018-02-18 21:16 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-10 23:23 Incompatibilities between runit and s6? Avery Payne
2018-01-11 14:14 ` Charlie Brady
2018-01-13 18:03   ` Compatibilities between runit and s6 (re: Incompatibilities between runit and s6?) Charlie Brady
2018-01-13 18:55     ` Laurent Bercot
2018-01-14 11:36     ` Jonathan de Boyne Pollard
2018-01-14 21:08       ` Charlie Brady
2018-01-14 21:54         ` Jonathan de Boyne Pollard
2018-01-15 12:53           ` Thomas Caravia
2018-01-15 13:33             ` Laurent Bercot
2018-01-16  0:33             ` Charlie Brady
2018-01-16  0:44               ` nosh build problems (Re: Compatibilities between runit and s6 (re: ) Charlie Brady
2018-01-16 16:09                 ` Charlie Brady
2018-01-16 20:51                   ` Jonathan de Boyne Pollard
2018-01-17  1:26                     ` Guillermo
2018-01-17  7:35                       ` Jonathan de Boyne Pollard
2018-01-17 15:25                     ` Charlie Brady
2018-01-18 11:58                       ` Guillermo
2018-01-18 14:25                         ` nosh build problems (Re: Compatibilities between runit and s6 Charlie Brady
2018-02-18 21:16                   ` nosh build problems (Re: Compatibilities between runit and s6 (re: ) Guillermo
2018-01-16  8:10               ` Compatibilities between runit and s6 (re: Incompatibilities between runit and s6?) Jonathan de Boyne Pollard
2018-01-16 15:59                 ` Charlie Brady
2018-01-16 21:51                   ` Jonathan de Boyne Pollard
2018-01-16  8:06             ` Jonathan de Boyne Pollard
2018-01-16 14:52               ` multiplexd
     [not found]             ` <89cffa18-a72a-ed98-031c-c72fc00ad5aa@ntlworld.com>
2018-01-16 15:44               ` Laurent Bercot
  -- strict thread matches above, loose matches on Subject: below --
2018-01-10 15:57 Incompatibilities between runit and s6? Charlie Brady
2018-01-10 19:49 ` Laurent Bercot
2018-01-11 14:19   ` Charlie Brady
2018-01-15 12:31     ` Laurent Bercot
2018-01-13  3:48   ` Jonathan de Boyne Pollard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).