Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bugzilla DB migration completed. Please report issues to Infra team via email via infra@gentoo.org or IRC
Bug 573846 - sys-apps/openrc: "runscript is deprecated; please use openrc-run instead."
Summary: sys-apps/openrc: "runscript is deprecated; please use openrc-run instead."
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords: Tracker
Depends on: 605274 581926 581928 581930 581934 581940 581944 581950 605354 611082
Blocks:
  Show dependency tree
 
Reported: 2016-02-04 17:19 UTC by Jan Chren (rindeal)
Modified: 2017-05-13 16:52 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
affected packages (affected_packages.txt,12.74 KB, text/plain)
2016-05-06 06:20 UTC, Austin English (RETIRED)
Details
affected files (affected_files.txt,43.39 KB, text/plain)
2016-05-06 06:21 UTC, Austin English (RETIRED)
Details
proposed patch (proposed_patch_condensed.txt,409.70 KB, patch)
2016-05-06 06:22 UTC, Austin English (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Chren (rindeal) 2016-02-04 17:19:36 UTC
Since OpenRC 0.13.x one can expect a lot of messages in rc.log that look like this:

```
runscript is deprecated; please use openrc-run instead.
```

This is because of this - https://bugs.gentoo.org/show_bug.cgi?id=494220 .

Currently there are at least 794 packages affected. Command used to get this list is:

```
comm -13 <( find /usr/portage -type f -not -name "*eclass*" | xargs awk 'FNR==1&&/^#!\/sbin\/openrc-run/{match(FILENAME, "/usr/portage/([^/]*/[^/]*)/", a); print a[1];}' | sort -u ) <( find /usr/portage -type f -not -name "*eclass*" | xargs awk 'FNR==1&&/^#!\/sbin\/runscript/{match(FILENAME, "/usr/portage/([^/]*/[^/]*)/", a); print a[1];}' | sort -u ) | wc -l
```

I haven't found any bug dedicated to this problem so I'm creating one now.
Comment 1 Tomáš Mózes 2016-02-05 07:27:44 UTC
Hi Rindeal, thanks for reporting. However it would be better to report each package separately so the maintainers can take care of it.
Comment 2 Jan Chren (rindeal) 2016-02-08 01:12:36 UTC
Hi Tomas, the change happened >2 years ago and since then only ~20 packages migrated to openrc-run, while another ~800 did not. With this tempo we'll all be dead sooner then all packages migrate. This is a global issue and as such needs a global change across whole tree rather then atomic changes by package maintainers.
Comment 3 William Hubbs gentoo-dev 2016-02-10 23:16:37 UTC
I would guess that the lack of movement on this has to do with the
message only showing up in verbose mode, so you don't see it unless you
go looking for it.

I had it showing initially but received complaints about it being
spammy.

I don't plan to drop runscript until I can figure out a way to get the
messages to show so that people make the move and don't complain about
them.
Comment 4 Jan Chren (rindeal) 2016-02-11 15:24:36 UTC
Well, as you can see, unless you enforce it, nothing happens. Gentoo has some consortium or committee or something like that, which decides what to do with things of this scope. So maybe we could gather them to have a vote?

When Gentoo migrates, you can restore the message to always show up. Then, after a few months, remove runscipt completely and you should be done with this thing.
Comment 5 William Hubbs gentoo-dev 2016-02-16 16:21:33 UTC
Well, my plan is to start nagging people again with the .21 release  and
at the same time either migrate packages myself or see if we can get
folks to do the migration. It is a harmless change that could, on its
own, go straight to stable at this point since openrc-run is part of
stable openrc.
Comment 6 William Hubbs gentoo-dev 2016-02-16 16:24:51 UTC
I've added the tracker keyword here, but I'm not sure yet if we are
going to open individual bugs for all the packages involved. When OpenRC
0.21 comes out, I'll figure out that process.
Comment 7 Jan Chren (rindeal) 2016-02-16 22:23:15 UTC
Ok, looking forward to it. If you'll need some help afterwards, feel free to ask.
Comment 8 Juan Simón 2016-03-19 13:00:04 UTC
sshd init script still uses 'runscript'
Comment 9 William Hubbs gentoo-dev 2016-04-25 16:49:40 UTC
This bug is now a tracker. If you find packages that still use
runscript, file bugs against those packages and make them block this bug.
Comment 10 Austin English (RETIRED) gentoo-dev 2016-04-25 17:28:11 UTC
(In reply to William Hubbs from comment #5)
> Well, my plan is to start nagging people again with the .21 release  and
> at the same time either migrate packages myself or see if we can get
> folks to do the migration. It is a harmless change that could, on its
> own, go straight to stable at this point since openrc-run is part of
> stable openrc.

I'm happy to help with this. I ran some numbers:

# of affected files:
austin@austin2:~/src/gentoo$ git grep '#!/sbin/runscript' | wc -l
1262

# of affected packages:
austin@austin2:~/src/gentoo$ git grep '#!/sbin/runscript' | cut -d / -f1-2 | sort -u | wc -l
800

I'll take a stab at updating the unmaintained packages.

(In reply to William Hubbs from comment #9)
> This bug is now a tracker. If you find packages that still use
> runscript, file bugs against those packages and make them block this bug.

Should this be confirmed/in_progress then?
Comment 11 Jan Chren (rindeal) 2016-04-26 17:32:17 UTC
Those numbers are highly motivational. Like:

One eternity later...: "Oh look, only 254 packages remaining!"
Comment 12 Thomas Deutschmann gentoo-dev Security 2016-05-03 22:24:49 UTC
Don't have ebuilds migrated to openrc-run have to block <sys-apps/openrc-0.18.4? Remember that people could have openrc-{0.13.11,0.16.4,0.17} which should not support openrc-run.
Comment 13 Austin English (RETIRED) gentoo-dev 2016-05-04 01:05:50 UTC
(In reply to Jan Chren (rindeal) from comment #11)
> Those numbers are highly motivational. Like:
> 
> One eternity later...: "Oh look, only 254 packages remaining!"

I've cleaned up most of the maintainer-needed packages, things have improved a bit:

austin@austin2:~/src/gentoo$ git grep '#!/sbin/runscript' | wc -l
1103

austin@austin2:~/src/gentoo$ git grep '#!/sbin/runscript' | cut -d / -f1-2 | sort -u | wc -l
683

I don't really want to have to file a ton of bugs, to get this fixed. Will start a thread on gentoo-dev@ soonish.
Comment 14 William Hubbs gentoo-dev 2016-05-04 17:43:39 UTC
(In reply to Thomas Deutschmann from comment #12)
> Don't have ebuilds migrated to openrc-run have to block
> <sys-apps/openrc-0.18.4? Remember that people could have
> openrc-{0.13.11,0.16.4,0.17} which should not support openrc-run.

OpenRC-0.16.4 does support openrc-run, and it was stabilized on Gentoo well before the git conversion happened, so we don't need to worry about blocking older versions of OpenRC. If people are running older versions than this they should upgrade.
Comment 15 Austin English (RETIRED) gentoo-dev 2016-05-06 06:02:03 UTC
(In reply to Jan Chren (rindeal) from comment #11)
> Those numbers are highly motivational. Like:
> 
> One eternity later...: "Oh look, only 254 packages remaining!"

http://article.gmane.org/gmane.linux.gentoo.devel/100815


I'll take care of it in two weeks.
Comment 16 Jeroen Roovers gentoo-dev 2016-05-06 06:10:48 UTC
(In reply to Austin English from comment #15)
> (In reply to Jan Chren (rindeal) from comment #11)
> > Those numbers are highly motivational. Like:
> > 
> > One eternity later...: "Oh look, only 254 packages remaining!"
> 
> http://article.gmane.org/gmane.linux.gentoo.devel/100815
> 
> 
> I'll take care of it in two weeks.

It's not even clear what the task is. Everybody's supposed to run the command themselves, perhaps with various results? Why don't you attach the list of suspect packages right here?
Comment 17 Jeroen Roovers gentoo-dev 2016-05-06 06:11:30 UTC
Also, since you've been breaking packages left and right, maybe you want some guidance here from experienced developers?
Comment 18 Austin English (RETIRED) gentoo-dev 2016-05-06 06:20:50 UTC
Created attachment 433348 [details]
affected packages
Comment 19 Austin English (RETIRED) gentoo-dev 2016-05-06 06:21:11 UTC
Created attachment 433350 [details]
affected files
Comment 20 Austin English (RETIRED) gentoo-dev 2016-05-06 06:22:20 UTC
Created attachment 433352 [details, diff]
proposed patch

This would be committed one patch per category/package.
Comment 21 Jan Chren (rindeal) 2016-05-06 11:05:47 UTC
I've created a mapping of maintainers->packages, which may come handy for some. https://gist.github.com/rindeal/1ee42c6b8bb4cd7daf683eea8d6f3af0
Comment 22 Austin English (RETIRED) gentoo-dev 2016-05-06 15:37:28 UTC
(In reply to Jan Chren (rindeal) from comment #21)
> I've created a mapping of maintainers->packages, which may come handy for
> some. https://gist.github.com/rindeal/1ee42c6b8bb4cd7daf683eea8d6f3af0

Thanks Jan
Comment 23 William Hubbs gentoo-dev 2016-05-06 18:34:27 UTC
As one of Austin's mentors, I feel that I need to respond.

(In reply to Jeroen Roovers from comment #16)
> (In reply to Austin English from comment #15)
> > (In reply to Jan Chren (rindeal) from comment #11)
> > > Those numbers are highly motivational. Like:
> > > 
> > > One eternity later...: "Oh look, only 254 packages remaining!"
> > 
> > http://article.gmane.org/gmane.linux.gentoo.devel/100815
> > 
> > 
> > I'll take care of it in two weeks.
> 
> It's not even clear what the task is. Everybody's supposed to run the
> command themselves, perhaps with various results? Why don't you attach the
> list of suspect packages right here?

The task is actually very clear.

#!/sbin/runscript

should be changed to

#!/sbin/openrc-run

in service scripts.

This was also mentioned by him on the -dev list.

(In reply to Jeroen Roovers from comment #17)
> Also, since you've been breaking packages left and right, maybe you want
> some guidance here from experienced developers?

Six packages out of well over 100 were broken and fixed again within 24 hours. That does not count as "breaking packages left and right".

Stop trolling.
Comment 24 Jeroen Roovers gentoo-dev 2016-05-07 10:38:11 UTC
(In reply to William Hubbs from comment #23)
> Stop trolling.

That doesn't mean what you think it means?
Comment 25 Austin English (RETIRED) gentoo-dev 2016-05-18 07:25:30 UTC
All init scripts in the tree have been transitioned to #!/sbin/openrc-run.

Last commit was https://github.com/gentoo/gentoo/commit/fc1d0dfe80203fa9c2b0e1cd6ecbcae244ddb4e0
Comment 26 Jeroen Roovers gentoo-dev 2016-05-19 00:03:02 UTC
(In reply to Austin English from comment #25)
> All init scripts in the tree have been transitioned to #!/sbin/openrc-run.

So that's part of the work done and you're not even tracking blocking bugs yet or bundled init.d scripts.
Comment 27 Austin English (RETIRED) gentoo-dev 2016-05-19 04:42:50 UTC
(In reply to Jeroen Roovers from comment #26)
> (In reply to Austin English from comment #25)
> > All init scripts in the tree have been transitioned to #!/sbin/openrc-run.
> 
> So that's part of the work done and you're not even tracking blocking bugs
> yet or bundled init.d scripts.

A) All blocking bugs were fixed in the codebase when I marked this bug as fixed (and the bugs themselves now are as well).

B) I'm not sure what you mean by bundled init.d scripts. You may mean bundled in upstream releases, in which case, it's not exactly something Gentoo can fix..
Comment 28 William Hubbs gentoo-dev 2016-06-24 15:33:58 UTC
I am closing this since I do not know of any other work that needs to be
done. Please feel free to re-open if I have missed something.
Comment 29 Gil Kloepfer 2016-08-16 13:20:03 UTC
Actually, what would have been helpful to end-users of Gentoo would have been a Gentoo news item (eselect news ...) indicating this was coming, so it wasn't a complete surprise to those of us who aren't active Gentoo developers.

The issue with package maintainers not migrating their init scripts is understandable, but putting loads of messages in front of end-users to address the issue is poor form from a QA perspective.

Now, to convert my own personal ebuilds, now that I know about this... :-)
Comment 30 Attila Stehr 2017-05-03 16:18:48 UTC
still using runscript
$> grep '^#!/sbin/runscript' /etc/init.d/*

# sys-process/atop
/etc/init.d/atop:#!/sbin/runscript
/etc/init.d/atopacct:#!/sbin/runscript

# sys-libs/gpm
/etc/init.d/gpm:#!/sbin/runscript
# app-admin/metalog
/etc/init.d/metalog:#!/sbin/runscript
# net-misc/rsync
/etc/init.d/rsyncd:#!/sbin/runscript

# sys-fs/zfs
/etc/init.d/zfs-import:#!/sbin/runscript
/etc/init.d/zfs-mount:#!/sbin/runscript
/etc/init.d/zfs-share:#!/sbin/runscript
/etc/init.d/zfs-zed:#!/sbin/runscript
---
My last emerge -vuUND @world was 2017-05-01
I'm using the ~amd64 ebuilds.
Comment 31 dwfreed 2017-05-13 16:52:31 UTC
(In reply to Attila Stehr from comment #30)

None of the packages in tree were revbumped when their initscripts were fixed, so if you haven't rebuilt the packages since the change, you'd still have the old initscript.  Portage will rebuild a package given a filename owned by that package, so something like this would work:

emerge -1 $(grep -l '^#!/sbin/runscript')

If any remain afterward, please file a new bug for them.