public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] newsitem: OpenRC runscript transition (draft 2)
@ 2016-08-22 19:03 William Hubbs
  2016-08-22 19:52 ` Pacho Ramos
  2016-08-22 19:53 ` Ulrich Mueller
  0 siblings, 2 replies; 5+ messages in thread
From: William Hubbs @ 2016-08-22 19:03 UTC (permalink / raw)
  To: gentoo development; +Cc: pr


[-- Attachment #1.1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #1.2: 2016-08-25-openrc-runscript-transition.en.txt --]
[-- Type: text/plain, Size: 874 bytes --]

Title: OpenRC runscript transition
Author: William Hubbs <williamh@gentoo.org>
Content-Type: text/plain
Posted: 2016-08-25
Revision: 1
News-Item-Format: 1.0
Display-If-Installed: <sys-apps/openrc-0.22

Starting with OpenRC 0.21.3, service script authors should use
#!/sbin/openrc-run instead of #!/sbin/runscript to start their scripts.

The following warning will be displayed for each service on your system
which is not updated:

 * <scriptpath> uses runscript, please convert to openrc-run.

This warning is not fatal; your system will boot normally.

To silence most of the warnings, you should run the following command as root:

# emerge --oneshot -av $(grep -l "#!/sbin/runscript" /etc/init.d/*)

If you have any service scripts after running this command that generate
this warning, please file bugs against the packages that own these
scripts, not against OpenRC.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

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

* Re: [gentoo-dev] newsitem: OpenRC runscript transition (draft 2)
  2016-08-22 19:03 [gentoo-dev] newsitem: OpenRC runscript transition (draft 2) William Hubbs
@ 2016-08-22 19:52 ` Pacho Ramos
  2016-08-22 19:53 ` Ulrich Mueller
  1 sibling, 0 replies; 5+ messages in thread
From: Pacho Ramos @ 2016-08-22 19:52 UTC (permalink / raw)
  To: gentoo-dev; +Cc: pr

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

Oops, I saw your second draft later :S

El lun, 22-08-2016 a las 14:03 -0500, William Hubbs escribió:
> 
> [...]
> If you have any service scripts after running this command that
> generate
> this warning, please file bugs against the packages that own these
> scripts, not against OpenRC.

How risk is the change from #!/sbin/runscript to #!/sbin/openrc-run?
Can it be done "blindly" simply changing from one to another? In that
case it seems not so many packages are pending and, maybe, we could fix
them instead of telling people to report bugs once they find the
obsolete init.d files (and then wait for each package to get that
fixed... and re-emerge that version)

$ grep -r "/sbin/runscript" */*/files/*
app-admin/prelude-manager/files/prelude-manager.initd:#!/sbin/runscript
app-emulation/lxc/files/lxc.initd.4:#!/sbin/runscript
app-emulation/lxd/files/lxd-2.0.1.initd:#!/sbin/runscript
app-misc/lirc/files/irexec-initd:#!/sbin/runscript
net-analyzer/prelude-correlator/files/prelude-
correlator.initd:#!/sbin/runscript
net-analyzer/prelude-lml/files/prelude-lml.initd:#!/sbin/runscript
www-apps/grafana-bin/files/grafana.initd:#!/sbin/runscript
www-apps/grafana-bin/files/grafana.initd.2:#!/sbin/runscript

There are only a few we could fix just now if we can simply replace the
line 

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

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

* Re: [gentoo-dev] newsitem: OpenRC runscript transition (draft 2)
  2016-08-22 19:03 [gentoo-dev] newsitem: OpenRC runscript transition (draft 2) William Hubbs
  2016-08-22 19:52 ` Pacho Ramos
@ 2016-08-22 19:53 ` Ulrich Mueller
  2016-08-22 21:45   ` William Hubbs
  1 sibling, 1 reply; 5+ messages in thread
From: Ulrich Mueller @ 2016-08-22 19:53 UTC (permalink / raw)
  To: gentoo-dev; +Cc: pr

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

>>>>> On Mon, 22 Aug 2016, William Hubbs wrote:

> Display-If-Installed: <sys-apps/openrc-0.22

Why the condition on the version number?

> # emerge --oneshot -av $(grep -l "#!/sbin/runscript" /etc/init.d/*)

Hm, I think you'll want single quotes there, otherwise the exclamation
mark could trigger bash history expansion. Alternatively, grep for
/sbin/runscript without the shebang (with the additional advantage
that it would also catch cases with whitespace after the #!).

Ulrich

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

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

* Re: [gentoo-dev] newsitem: OpenRC runscript transition (draft 2)
  2016-08-22 19:53 ` Ulrich Mueller
@ 2016-08-22 21:45   ` William Hubbs
  2016-08-23  0:56     ` [gentoo-dev] " Jonathan Callen
  0 siblings, 1 reply; 5+ messages in thread
From: William Hubbs @ 2016-08-22 21:45 UTC (permalink / raw)
  To: gentoo-dev

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

On Mon, Aug 22, 2016 at 09:53:48PM +0200, Ulrich Mueller wrote:
> >>>>> On Mon, 22 Aug 2016, William Hubbs wrote:
> 
> > Display-If-Installed: <sys-apps/openrc-0.22
> 
> Why the condition on the version number?

I suppose I could change this to just sys-apps/openrc

> 
> > # emerge --oneshot -av $(grep -l "#!/sbin/runscript" /etc/init.d/*)
> 
> Hm, I think you'll want single quotes there, otherwise the exclamation
> mark could trigger bash history expansion. Alternatively, grep for
> /sbin/runscript without the shebang (with the additional advantage
> that it would also catch cases with whitespace after the #!).

Is '#! /sbin/runscript' a valid shebang line? I didn't think you could
have whitespace after the '#!'.

William

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

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

* [gentoo-dev] Re: newsitem: OpenRC runscript transition (draft 2)
  2016-08-22 21:45   ` William Hubbs
@ 2016-08-23  0:56     ` Jonathan Callen
  0 siblings, 0 replies; 5+ messages in thread
From: Jonathan Callen @ 2016-08-23  0:56 UTC (permalink / raw)
  To: gentoo-dev


[-- Attachment #1.1: Type: text/plain, Size: 1017 bytes --]

On 08/22/2016 05:45 PM, William Hubbs wrote:
> On Mon, Aug 22, 2016 at 09:53:48PM +0200, Ulrich Mueller wrote:
>>>>>>> On Mon, 22 Aug 2016, William Hubbs wrote:
>>
>>> Display-If-Installed: <sys-apps/openrc-0.22
>>
>> Why the condition on the version number?
> 
> I suppose I could change this to just sys-apps/openrc
> 
>>
>>> # emerge --oneshot -av $(grep -l "#!/sbin/runscript" /etc/init.d/*)
>>
>> Hm, I think you'll want single quotes there, otherwise the exclamation
>> mark could trigger bash history expansion. Alternatively, grep for
>> /sbin/runscript without the shebang (with the additional advantage
>> that it would also catch cases with whitespace after the #!).
> 
> Is '#! /sbin/runscript' a valid shebang line? I didn't think you could
> have whitespace after the '#!'.
> 
> William
> 

Yes, it is.  I just checked my /usr/bin, and found over 100 scripts that
all begin with the string "#! /", including many scripts from autoconf,
among others.

-- 
Jonathan Callen


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 847 bytes --]

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

end of thread, other threads:[~2016-08-23  0:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-22 19:03 [gentoo-dev] newsitem: OpenRC runscript transition (draft 2) William Hubbs
2016-08-22 19:52 ` Pacho Ramos
2016-08-22 19:53 ` Ulrich Mueller
2016-08-22 21:45   ` William Hubbs
2016-08-23  0:56     ` [gentoo-dev] " Jonathan Callen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox