public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] newsitem: openrc runscript transition (draft 3)
@ 2016-08-22 22:57 William Hubbs
  2016-08-24  7:32 ` Kent Fredric
  0 siblings, 1 reply; 10+ messages in thread
From: William Hubbs @ 2016-08-22 22:57 UTC (permalink / raw)
  To: gentoo development; +Cc: pr


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

I thought about dropping the version number from the
display-if-installed line, but that doesn't make sense because it means
that everyone, including all new installs of OpenRC after this version,
would have to read the newsitem.

William


[-- Attachment #1.2: 2016-08-25-openrc-runscript-transition.en.txt --]
[-- Type: text/plain, Size: 872 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] 10+ messages in thread

* Re: [gentoo-dev] newsitem: openrc runscript transition (draft 3)
  2016-08-22 22:57 [gentoo-dev] newsitem: openrc runscript transition (draft 3) William Hubbs
@ 2016-08-24  7:32 ` Kent Fredric
  2016-08-24 12:08   ` Jason Zaman
                     ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Kent Fredric @ 2016-08-24  7:32 UTC (permalink / raw)
  To: gentoo-dev

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

On Mon, 22 Aug 2016 17:57:43 -0500
William Hubbs <williamh@gentoo.org> wrote:

> I thought about dropping the version number from the
> display-if-installed line, but that doesn't make sense because it means
> that everyone, including all new installs of OpenRC after this version,
> would have to read the newsitem.
> 
> William
> 

That concern is in the wrong priority.

"Your system might break" is more important than "ugh, annoying news items"

Viewing the news item once per clean install is still less of a "Problem" than 
"everyone with an old system syncs, doesn't get any warning, upgrades openrc to
a version which breaks this, and they brick their boot" 


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

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

* Re: [gentoo-dev] newsitem: openrc runscript transition (draft 3)
  2016-08-24  7:32 ` Kent Fredric
@ 2016-08-24 12:08   ` Jason Zaman
  2016-08-24 13:58   ` [gentoo-dev] " Duncan
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: Jason Zaman @ 2016-08-24 12:08 UTC (permalink / raw)
  To: gentoo-dev

On Wed, Aug 24, 2016 at 07:32:05PM +1200, Kent Fredric wrote:
> On Mon, 22 Aug 2016 17:57:43 -0500
> William Hubbs <williamh@gentoo.org> wrote:
> 
> > I thought about dropping the version number from the
> > display-if-installed line, but that doesn't make sense because it means
> > that everyone, including all new installs of OpenRC after this version,
> > would have to read the newsitem.
> > 
> > William
> > 
> 
> That concern is in the wrong priority.
> 
> "Your system might break" is more important than "ugh, annoying news items"
> 
> Viewing the news item once per clean install is still less of a "Problem" than 
I remember some time back there was talk about marking some news items
as read in new stage3's. That basically removes this annoyance
completely. I don't know how that ended up tho, maybe we should re-visit
it?

-- Jason



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

* [gentoo-dev] Re: newsitem: openrc runscript transition (draft 3)
  2016-08-24  7:32 ` Kent Fredric
  2016-08-24 12:08   ` Jason Zaman
@ 2016-08-24 13:58   ` Duncan
  2016-08-24 14:59   ` [gentoo-dev] " waltdnes
  2016-08-24 17:07   ` William Hubbs
  3 siblings, 0 replies; 10+ messages in thread
From: Duncan @ 2016-08-24 13:58 UTC (permalink / raw)
  To: gentoo-dev

Kent Fredric posted on Wed, 24 Aug 2016 19:32:05 +1200 as excerpted:

> On Mon, 22 Aug 2016 17:57:43 -0500 William Hubbs <williamh@gentoo.org>
> wrote:
> 
>> I thought about dropping the version number from the
>> display-if-installed line, but that doesn't make sense because it means
>> that everyone, including all new installs of OpenRC after this version,
>> would have to read the newsitem.
>> 
>> William
>> 
>> 
> That concern is in the wrong priority.
> 
> "Your system might break" is more important than "ugh, annoying news
> items"
> 
> Viewing the news item once per clean install is still less of a
> "Problem" than "everyone with an old system syncs, doesn't get any
> warning, upgrades openrc to a version which breaks this, and they brick
> their boot"

If it was a bricking concern, yes, but this isn't about bricking (at 
least not within the scope of the current news item, and I'd expect 
another one before runscript is actually removed), it's about warnings 
that are for the user, harmless but irritating.

So the priority could arguably be different.  Note that I'm not actually 
saying it is (I haven't actually decided), only that unlike the possible 
bricking case, it arguably could be, because the possible bricking 
argument you used for justification doesn't apply.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman



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

* Re: [gentoo-dev] newsitem: openrc runscript transition (draft 3)
  2016-08-24  7:32 ` Kent Fredric
  2016-08-24 12:08   ` Jason Zaman
  2016-08-24 13:58   ` [gentoo-dev] " Duncan
@ 2016-08-24 14:59   ` waltdnes
  2016-08-24 15:17     ` Kent Fredric
  2016-08-24 17:07   ` William Hubbs
  3 siblings, 1 reply; 10+ messages in thread
From: waltdnes @ 2016-08-24 14:59 UTC (permalink / raw)
  To: gentoo-dev

On Wed, Aug 24, 2016 at 07:32:05PM +1200, Kent Fredric wrote
> On Mon, 22 Aug 2016 17:57:43 -0500
> William Hubbs <williamh@gentoo.org> wrote:
> 
> > I thought about dropping the version number from the
> > display-if-installed line, but that doesn't make sense because it means
> > that everyone, including all new installs of OpenRC after this version,
> > would have to read the newsitem.
> > 
> > William
> > 
> 
> That concern is in the wrong priority.
> 
> "Your system might break" is more important than "ugh, annoying
> news items"
> 
> Viewing the news item once per clean install is still less of a
> "Problem" than "everyone with an old system syncs, doesn't get any
> warning, upgrades openrc to a version which breaks this, and they
> brick their boot"

  These things get left in forever.  I once filed a bug report
https://bugs.gentoo.org/show_bug.cgi?id=569056 because the warning that
English word lists in vim had been removed was still present *TWO YEARS*
after the fact.

  How flexible is the ewarn option?  Can printing the warning be made
conditional?  I suggest warning only if there are any hits on...

grep -l '^#!/sbin/runscript' /etc/init.d/*

  Note the single-quote around the expression.  Otherwise "#" can be a
special character for grep.  Furthermore, "grep -l" output can be used
to tell the enduser which specific scripts are non-compliant.

-- 
Walter Dnes <waltdnes@waltdnes.org>
I don't run "desktop environments"; I run useful applications


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

* Re: [gentoo-dev] newsitem: openrc runscript transition (draft 3)
  2016-08-24 14:59   ` [gentoo-dev] " waltdnes
@ 2016-08-24 15:17     ` Kent Fredric
  0 siblings, 0 replies; 10+ messages in thread
From: Kent Fredric @ 2016-08-24 15:17 UTC (permalink / raw)
  To: gentoo-dev

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

On Wed, 24 Aug 2016 10:59:21 -0400
waltdnes@waltdnes.org wrote:


>   These things get left in forever.  I once filed a bug report
> https://bugs.gentoo.org/show_bug.cgi?id=569056 because the warning that
> English word lists in vim had been removed was still present *TWO YEARS*
> after the fact.
> 
>   How flexible is the ewarn option?  Can printing the warning be made
> conditional?  I suggest warning only if there are any hits on...
> 
> grep -l '^#!/sbin/runscript' /etc/init.d/*
> 
>   Note the single-quote around the expression.  Otherwise "#" can be a
> special character for grep.  Furthermore, "grep -l" output can be used
> to tell the enduser which specific scripts are non-compliant.

There's a few other options we can use here as well ... 

1. GLEP 65, but I'm still not entirely sure how all this works.

https://wiki.gentoo.org/wiki/GLEP:65

2. pkg_postinst

3. pkg_info

https://devmanual.gentoo.org/ebuild-writing/functions/pkg_info/index.html

With #3 that means 

emerge --info sys-devel/openrc 

Could fire up a quick grep and tell users which specific things need fixing still.

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

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

* Re: [gentoo-dev] newsitem: openrc runscript transition (draft 3)
  2016-08-24  7:32 ` Kent Fredric
                     ` (2 preceding siblings ...)
  2016-08-24 14:59   ` [gentoo-dev] " waltdnes
@ 2016-08-24 17:07   ` William Hubbs
  2016-08-24 17:41     ` Thomas Deutschmann
  3 siblings, 1 reply; 10+ messages in thread
From: William Hubbs @ 2016-08-24 17:07 UTC (permalink / raw)
  To: gentoo-dev

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

On Wed, Aug 24, 2016 at 07:32:05PM +1200, Kent Fredric wrote:
> On Mon, 22 Aug 2016 17:57:43 -0500
> William Hubbs <williamh@gentoo.org> wrote:
> 
> > I thought about dropping the version number from the
> > display-if-installed line, but that doesn't make sense because it means
> > that everyone, including all new installs of OpenRC after this version,
> > would have to read the newsitem.
> > 
> > William
> > 
> 
> That concern is in the wrong priority.
> 
> "Your system might break" is more important than "ugh, annoying news items"
> 
> Viewing the news item once per clean install is still less of a "Problem" than 
> "everyone with an old system syncs, doesn't get any warning, upgrades openrc to
> a version which breaks this, and they brick their boot" 

This will not break anyone's boot. It just tells you a fast way to get
rid of some annoying messages. This is more an informational newsitem
than a warning because people will complain about the messages.

I do not plan to drop runscript at this point, that will happen when
openrc-1.0 is released, which will be a while yet.

William


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

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

* Re: [gentoo-dev] newsitem: openrc runscript transition (draft 3)
  2016-08-24 17:07   ` William Hubbs
@ 2016-08-24 17:41     ` Thomas Deutschmann
  2016-08-24 21:59       ` William Hubbs
  0 siblings, 1 reply; 10+ messages in thread
From: Thomas Deutschmann @ 2016-08-24 17:41 UTC (permalink / raw)
  To: gentoo-dev


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

On 2016-08-24 19:07, William Hubbs wrote:
> I do not plan to drop runscript at this point, that will happen when
> openrc-1.0 is released, which will be a while yet.

...and that's the reason why I don't think this needs a newsitem.
There's _no_ problem and no _immediate_ user interaction is required.

I would only adjust the current warning from

>  * /etc/init.d/test uses runscript, please convert to openrc-run.

to

> * /etc/init.d/test uses runscript and must be converted to openrc-run
> * For more details see /usr/share/doc/openrc-*/openrc-migration*

In "/usr/share/doc/openrc-*/openrc-migration*" we describe _why_ this
was changed and tell them that all files in FILESDIR were already
migrated so chances are high that

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

will replace most runscripts with migrated scripts.

If the user has already done that he/she should check which packages
owns the runscript (qfile /etc/init.d/foo) and should file a bug against
that package.

Finally add a note for package owner (don't forget user's repositories!)
and tell them what they need to do (which line must be changed, show
example before and after the migration).


And as additional help sys-apps/openrc ebuild should start scanning for
"/sbin/runscript" usage in pkg_postinst and show an ewarn with text
pointing to the same file.

Done.


...once an openrc version without "/sbin/runscript" will be released we
will have to release a newsitem before because _then_ we really require
user interaction and must force people to take notice.


PS: And don't forget to fix the warning from /sbin/runscript to honor
"--quiet". If this bug wouldn't exist we wouldn't talk about a newsitem
at the moment ;-)


-- 
Regards,
Thomas



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

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

* Re: [gentoo-dev] newsitem: openrc runscript transition (draft 3)
  2016-08-24 17:41     ` Thomas Deutschmann
@ 2016-08-24 21:59       ` William Hubbs
  2016-08-24 22:51         ` Thomas Deutschmann
  0 siblings, 1 reply; 10+ messages in thread
From: William Hubbs @ 2016-08-24 21:59 UTC (permalink / raw)
  To: gentoo-dev

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

On Wed, Aug 24, 2016 at 07:41:42PM +0200, Thomas Deutschmann wrote:
> On 2016-08-24 19:07, William Hubbs wrote:
> > I do not plan to drop runscript at this point, that will happen when
> > openrc-1.0 is released, which will be a while yet.
> 
> ...and that's the reason why I don't think this needs a newsitem.
> There's _no_ problem and no _immediate_ user interaction is required.
> 
> I would only adjust the current warning from
> 
> >  * /etc/init.d/test uses runscript, please convert to openrc-run.
> 
> to
> 
> > * /etc/init.d/test uses runscript and must be converted to openrc-run
> > * For more details see /usr/share/doc/openrc-*/openrc-migration*

Since OpenRC is used outside of Gentoo, a warning like this would have
to be:

* /etc/init.d/test uses runscript and must be converted to openrc-run
* For more details see the OpenRC NEWS file

because we don't know where or if the file will be installed by
downstreams.

> In "/usr/share/doc/openrc-*/openrc-migration*" we describe _why_ this
> was changed and tell them that all files in FILESDIR were already
> migrated so chances are high that
> 
>   # emerge --oneshot -av $(grep -l '/sbin/runscript' /etc/init.d/*)
> 
> will replace most runscripts with migrated scripts.
> 
> If the user has already done that he/she should check which packages
> owns the runscript (qfile /etc/init.d/foo) and should file a bug against
> that package.

We can't really put anything distro-specific in the news file, because we
don't know how distros will handle it.

> Finally add a note for package owner (don't forget user's repositories!)
> and tell them what they need to do (which line must be changed, show
> example before and after the migration).
 
 Something like this could go into the upstream NEWS file easily enough.

> And as additional help sys-apps/openrc ebuild should start scanning for
> "/sbin/runscript" usage in pkg_postinst and show an ewarn with text

I wouldn't say that the OpenRC ebuild should be concerned about this,
but I believe there is a check in repoman for it.

> 
> ...once an openrc version without "/sbin/runscript" will be released we
> will have to release a newsitem before because _then_ we really require
> user interaction and must force people to take notice.
 
 Probably so. In theory, there won't be too much to worry about at that
 point; I plan to delay a while before I do that.

> PS: And don't forget to fix the warning from /sbin/runscript to honor
> "--quiet". If this bug wouldn't exist we wouldn't talk about a newsitem
> at the moment ;-)
 
 heh, I think we still would be talking about a newsitem because the
 messages still appear during bootup, but yes I'll look at this.

 William

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

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

* Re: [gentoo-dev] newsitem: openrc runscript transition (draft 3)
  2016-08-24 21:59       ` William Hubbs
@ 2016-08-24 22:51         ` Thomas Deutschmann
  0 siblings, 0 replies; 10+ messages in thread
From: Thomas Deutschmann @ 2016-08-24 22:51 UTC (permalink / raw)
  To: gentoo-dev


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

On 2016-08-24 23:59, William Hubbs wrote:
> Since OpenRC is used outside of Gentoo, a warning like this would have
> to be:
> 
> * /etc/init.d/test uses runscript and must be converted to openrc-run
> * For more details see the OpenRC NEWS file
> 
> because we don't know where or if the file will be installed by
> downstreams.

Yes, this will be the message in OpenRC's SRC. However you could patch
that message for Gentoo in the ebuild.


>> In "/usr/share/doc/openrc-*/openrc-migration*" we describe _why_ this
>> was changed and tell them that all files in FILESDIR were already
>> migrated so chances are high that
>>
>>   # emerge --oneshot -av $(grep -l '/sbin/runscript' /etc/init.d/*)
>>
>> will replace most runscripts with migrated scripts.
>>
>> If the user has already done that he/she should check which packages
>> owns the runscript (qfile /etc/init.d/foo) and should file a bug against
>> that package.
> 
> We can't really put anything distro-specific in the news file, because we
> don't know how distros will handle it.

...now with the patched message you can promote our own file. And this
file can get installed from $FILESDIR for example.

You are using GitHub for OpenRC upstream, right? So create a guide in
project's Wiki (or add it to the docs folder in the src) which will
explain the changes. This guide can have a section to explain what to do
on Debian, one for Gentoo... but this is all upstream.

My point is, that for Gentoo downstream, you can patch/customize like we
do for all the other packages to work with Gentoo.


>> And as additional help sys-apps/openrc ebuild should start scanning for
>> "/sbin/runscript" usage in pkg_postinst and show an ewarn with text
> 
> I wouldn't say that the OpenRC ebuild should be concerned about this,
> but I believe there is a check in repoman for it.

I agree. However I see that more like a service for Gentoo users. Users
don't run repoman. And don't forget that the user could have _custom_
runscripts or additional packages from other sources which repoman will
never see... so it is nice to have a friendly reminder (the problem is,
that if an user acts _now_ and fixes all currently installed runscripts
he/she could face the problem in future again if he/she installs a new
package after that which wasn't updated yet... that's why I would add
such a scan).


...and we don't need to believe to catch all the runscripts in the world
even if openrc-1.0.0 will be released in 100y. Some user will finally
notice with the newsitem prior openrc-1.0.0 release which will tell them
that /sbin/runscript was finally removed... but there _will_ be users
after that which will get hit. And they will complain "you" broke their
system despite all the effort to prevent such situations. ;-)


-- 
Regards,
Thomas



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

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

end of thread, other threads:[~2016-08-24 22:52 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-22 22:57 [gentoo-dev] newsitem: openrc runscript transition (draft 3) William Hubbs
2016-08-24  7:32 ` Kent Fredric
2016-08-24 12:08   ` Jason Zaman
2016-08-24 13:58   ` [gentoo-dev] " Duncan
2016-08-24 14:59   ` [gentoo-dev] " waltdnes
2016-08-24 15:17     ` Kent Fredric
2016-08-24 17:07   ` William Hubbs
2016-08-24 17:41     ` Thomas Deutschmann
2016-08-24 21:59       ` William Hubbs
2016-08-24 22:51         ` Thomas Deutschmann

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