Hi guys,
I would appreciate your feedback as well.

-------- Original Message --------
Subject: rpmconf and new feature to configure application
Date: Thu, 25 Jul 2013 14:42:25 +0200
From: Miroslav Suchý <msu...@redhat.com>
Reply-To: Development discussions related to Fedora <de...@lists.fedoraproject.org> Organization: Red Hat, Registered Address: Red Hat Czech s.r.o., Purkynova 99/71, 612 45 Brno, Czech Republic, Registered in Brno under identification number CZ27690016 To: Development discussions related to Fedora <de...@lists.fedoraproject.org>

Hi,
I just built into rawhide new rpmconf(8) which has new feature - to
configure application.

Background:
After each "yum upgrade/install" you should resolve .rpmnew/.rpmsave
files. Rpmconf(8) will help you with that. But it will not help you with
initial configuration. Especially with installation of layered
applications. In such cases installing rpm packages is not enough. You
must then configure whole application. And the command is different for
each application. It is:
   spacewalk-setup for Spacewalk
   katello-configure for Katello
   sh setup-broker.sh for OpenShift Broker
and something else for projects I even do not know.
And sometimes you need to run upgrade script, sometimes you need to
re-run installation script.

Idea:
If you put all this upgrade/installation scripts on one pile (i.e.
Fedora distribution) it is mess. But if rpmconf can handle
rpmnew/rpmsave files, can it help even here?
If each project/package will provide idempotent installation/upgrade
script, then rpmconf can just run each time rpmconf is executed.

So I put in rpmconf this code (little bit simplified here):
         if [ -x /usr/share/rpmconf/$PACKAGE ]; then
                 /usr/share/rpmconf/$PACKAGE
         fi

File /usr/share/rpmconf/$PACKAGE can be interactive or not. Obviously it
should not ask question which has been answered in past. But do whatever
you want and need. Only real condition is that it must be idempotent.

While I have ideas for more complicated solutions, I decided to keep it
simple and stupid. At least for start.

If you want to use this feature, just put in your spec file:

Requires: rpmconf-base
...
%files
%{_datadir}/rpmconf/%{name}

where %{_datadir}/rpmconf/%{name} is that idempotent executable.

I am open to your feedback and suggestions. And if I stabilize it during
F20 and somebody find it useful, then I may propose it as F21 feature.

--
Miroslav Suchy
Red Hat, Software Engineer
--
devel mailing list
de...@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to