Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1611655 - Split alternatives out into it's own subpackage
Summary: Split alternatives out into it's own subpackage
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: chkconfig
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Peter Robinson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: IoT
TreeView+ depends on / blocked
 
Reported: 2018-08-02 14:50 UTC by Peter Robinson
Modified: 2019-03-29 19:18 UTC (History)
3 users (show)

Fixed In Version: chkconfig-1.11-4.fc30
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-03-29 19:18:55 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Peter Robinson 2018-08-02 14:50:20 UTC
Similar to now ntsysv is a separate package split alternatives out into it's own package. It's useful as a standalone package/utility without chkconfig.

diff --git a/chkconfig.spec b/chkconfig.spec
index c79f7bb..b401b66 100644
--- a/chkconfig.spec
+++ b/chkconfig.spec
@@ -26,6 +26,15 @@ manipulating the numerous symbolic links in /etc/rc.d). Unless you
 specify a runlevel or runlevels on the command line (see the man
 page), ntsysv configures the current runlevel (5 if you're using X).
 
+%package -n alternatives
+Summary: A tool to maintain symbolic links determining default commands
+
+%description -n alternatives
+alternatives creates, removes, maintains and displays information about the
+symbolic links comprising the alternatives system. It is possible for several
+programs fulfilling the same or similar functions to be installed on a single
+system at the same time.
+
 %prep
 %setup -q
 
@@ -50,26 +59,29 @@ mkdir -p $RPM_BUILD_ROOT/etc/chkconfig.d
 
 %files -f %{name}.lang
 %license COPYING
-%dir /etc/alternatives
 /sbin/chkconfig
-%{_sbindir}/update-alternatives
-%{_sbindir}/alternatives
 /etc/chkconfig.d
 /etc/init.d
 /etc/rc.d
 /etc/rc.d/init.d
 /etc/rc[0-6].d
 /etc/rc.d/rc[0-6].d
-%dir /var/lib/alternatives
 %{_mandir}/*/chkconfig*
-%{_mandir}/*/update-alternatives*
-%{_mandir}/*/alternatives*
 %{_prefix}/lib/systemd/systemd-sysv-install
 
 %files -n ntsysv
 %{_sbindir}/ntsysv
 %{_mandir}/*/ntsysv.8*
 
+%files -n alternatives
+%license COPYING
+%dir /etc/alternatives
+%{_sbindir}/update-alternatives
+%{_sbindir}/alternatives
+%{_mandir}/*/update-alternatives*
+%{_mandir}/*/alternatives*
+%dir /var/lib/alternatives
+
 %changelog
 * Fri Jul 13 2018 Lukas Slebodnik <lslebodn> - 1.10-6
 - Add gcc to Buildroot

Comment 1 Lukáš Nykrýn 2018-08-02 15:33:36 UTC
This request makes sense, but it would require more work than just a simple spec change. I quickly peeked into packages requiring chkconfig and after few seconds I found an example of a package that would break after that change. Atlas uses alternatives in scriptlets but requires chkconfig.

If anyone is willing to go through the fedora packages and fix the dependecies, I would be open to split the package, but to be honest, I have more important things on my plate then this.

Comment 2 Peter Robinson 2018-08-02 16:13:07 UTC
I'm well aware of the requirements outside of the spec change (I've only been using Fedora/RHL/RHEL for 22 years).

I just wanted to verify I wasn't going to get yelled at if I started the process.

Comment 3 Peter Robinson 2018-08-02 16:17:38 UTC
For reference there's:
172 packages with a dep on chkconfig (a lot of subpackages/dupes in that output)
81 that need /usr/sbin/alternatives
48 that need /usr/sbin/update-alternatives

With a lot of overlap in the 3

Comment 4 Lukáš Nykrýn 2018-08-02 16:57:07 UTC
> I just wanted to verify I wasn't going to get yelled at if I started the
> process.

Nope, I promise I won't yell. This change make sense. Someone just need to go through the packages that only have chckofig dependency and call alternatives in the spec file. That is probably easy to script. But then report and fix the broken ones, which could be harder.

In my dreams I have a new alternatives implementation with new cool features like setting alternatives per services... And such project would live outside the chkonfig repo, so it would be a separate package anyway.

Comment 5 Peter Robinson 2018-08-02 17:58:10 UTC
> In my dreams I have a new alternatives implementation with new cool features
> like setting alternatives per services... And such project would live
> outside the chkonfig repo, so it would be a separate package anyway.

That would be easier to do even once we have the alternatives in a separate sub package as we can just kill the subpackage and have a new one called the same

Comment 6 Jan Kurik 2018-08-14 08:39:29 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle.
Changing version to '29'.

Comment 7 Peter Robinson 2018-10-06 10:41:47 UTC
(In reply to Lukáš Nykrýn from comment #4)
> > I just wanted to verify I wasn't going to get yelled at if I started the
> > process.
> 
> Nope, I promise I won't yell. This change make sense. Someone just need to
> go through the packages that only have chckofig dependency and call
> alternatives in the spec file. That is probably easy to script. But then
> report and fix the broken ones, which could be harder.

So thinking this through some more I think the easiest way to do this is to add a "Provides: alternatives" to the current chkconfig package, go through the list of packages that requires chkconfig and where they just need alternatives update the requires and then once that is done we can split out the alternatives functionality. Are you OK with this approach?

Comment 8 Lukáš Nykrýn 2018-10-08 10:49:10 UTC
I would rather follow the guidelines here and fix packages to require the binary.

https://fedoraproject.org/wiki/Packaging:Alternatives

Comment 9 Peter Robinson 2018-10-08 10:54:58 UTC
(In reply to Lukáš Nykrýn from comment #8)
> I would rather follow the guidelines here and fix packages to require the
> binary.
> 
> https://fedoraproject.org/wiki/Packaging:Alternatives

Except there's plans to kill off binary provides/requires (see a number of threads of devel@ recently which means everything would have to be done twice and that becomes a problem, I don't have the time. The above is still within guidelines.

Comment 10 Lukáš Nykrýn 2018-10-08 11:22:30 UTC
Ok, I will the Provide to upstream and rawhide.

Comment 12 Lukáš Nykrýn 2018-10-08 11:35:15 UTC
chkconfig-1.11-2.fc30

Comment 13 Peter Robinson 2019-03-14 15:39:58 UTC
I believe I've fixed up all the alternatives packages in F-30+ (I actually did it some time ago). I've pushed this to rawhide so we can check to see if I've missed any but I believe it's now alll good.

Comment 14 Lukáš Nykrýn 2019-03-15 11:06:17 UTC
Just a small update here, one of my colleagues is currently working on ripping of the alternatives even from upstream chkconfig. The reason is that alternatives will probably need some bigger rewrite (they don't work at all on rpm ostree based systems).

Comment 15 Peter Robinson 2019-03-15 11:19:44 UTC
(In reply to Lukáš Nykrýn from comment #14)
> Just a small update here, one of my colleagues is currently working on
> ripping of the alternatives even from upstream chkconfig. The reason is that
> alternatives will probably need some bigger rewrite (they don't work at all
> on rpm ostree based systems).

Is there a timeframe for this? A new stand alone alternatives package can easily obsolete it once it's ready to go.

Comment 16 Lukáš Nykrýn 2019-03-15 11:31:12 UTC
Let's say a month, and if it is not done till then, please feel free to shout at me :-)

Comment 17 Peter Robinson 2019-03-15 12:56:52 UTC
(In reply to Lukáš Nykrýn from comment #16)
> Let's say a month, and if it is not done till then, please feel free to
> shout at me :-)

there will be no need to shout, take the time required to get it right. The work I did to fix package deps and related bits is needed both ways, this sorts out a problem for me in the interim while the rest of it settles out. Multi step process, we'll get there :)

Comment 18 Peter Robinson 2019-03-21 07:49:13 UTC
For reference the split has been mostly smooth. The only real issue was the livecds still depend on initscripts/chkconfig to setup live users and the like, and chkconfig was only being pulled in for Workstation via java. The livecd issue has been worked around by explicitly pulling in chkconfig but there's a long running RFE to convert it to something else. Java has also been fixed.

https://bugzilla.redhat.com/show_bug.cgi?id=739446
https://pagure.io/fedora-kickstarts/pull-request/502#

Comment 19 Fedora Update System 2019-03-21 07:57:21 UTC
chkconfig-1.11-4.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-80660ccea1

Comment 20 Fedora Update System 2019-03-21 19:12:33 UTC
chkconfig-1.11-4.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-80660ccea1

Comment 21 Fedora Update System 2019-03-29 19:18:55 UTC
chkconfig-1.11-4.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.