Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 517042 - dev-util/catalyst - targets/support/rc-update.sh has incorrect and obsolete rc-update calls
Summary: dev-util/catalyst - targets/support/rc-update.sh has incorrect and obsolete r...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: Catalyst (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Catalyst Developers
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2014-07-13 18:36 UTC by Ben Kohler
Modified: 2017-10-18 16:02 UTC (History)
6 users (show)

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


Attachments
rc-update-fixes.patch (rc-update-fixes.patch,804 bytes, patch)
2014-07-13 18:36 UTC, Ben Kohler
Details | Diff
rc-update-fixes-r1.patch (rc-update-fixes-r1.patch,766 bytes, patch)
2014-07-31 22:54 UTC, Ben Kohler
Details | Diff
rc-update-fixes-r2.patch (0001-rc-update.sh-fix-rc-update-calls-to-work-inside-chro.patch,1.27 KB, patch)
2017-10-12 16:37 UTC, Ben Kohler
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Kohler gentoo-dev 2014-07-13 18:36:40 UTC
Created attachment 380684 [details, diff]
rc-update-fixes.patch

This file rc-update.sh contains some calls to rc-update like "rc-update del netmount" which do not work properly within catalyst/chroot.  Since rc-update cannot determine the current runlevel, the command fails.  Furthermore, rc-update.sh tries to remove iptables & serial which would never be in a runlevel anyway unless they were explicitly added there.  I've attached a patch fixing both issues, and removing some confusing/incorrect comments.
Comment 1 Ben Kohler gentoo-dev 2014-07-31 22:54:49 UTC
Created attachment 381974 [details, diff]
rc-update-fixes-r1.patch

Actually by FIXING these commands to actually do soemthing, "rc-update del keymaps default" now makes the official installcd-stage2-minimal build error out when the keymaps removal is handled again with "livecd/rcdel: keymaps|boot" in the spec file.

All this chunk of code should really be doing is removing netmount from default, and adding autoconfig to default.  The rest is no-op cruft that's just been ignored for years.  Adjusted patch attached.
Comment 2 Rick Farina (Zero_Chaos) gentoo-dev 2014-11-18 22:20:02 UTC
this should definately be done in the specs not in the catalyst code. anyone object to accepting Ben's patches?
Comment 3 Brian Dolbec (RETIRED) gentoo-dev 2014-12-08 00:41:29 UTC
Rick, please make a feature request bug to move this to the spec.  The code here can just be generic to process anything from the spec.
Comment 4 Ben Kohler gentoo-dev 2017-02-02 18:11:26 UTC
Please don't let a major feature change or overhaul prevent the fixing of an obvious and easy to fix bug.

If you want to move the rc-update calls somewhere else one day, great... but the existing calls here are wrong and can be fixed quickly
Comment 5 Ben Kohler gentoo-dev 2017-10-12 16:37:56 UTC
Created attachment 498444 [details, diff]
rc-update-fixes-r2.patch

This patch instead adds --all to the relevant rc-update calls so that they actually work regardless of the (detected) current runlevel.
Comment 6 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2017-10-12 19:42:12 UTC
Merged to 2.X & master.