rpmconf and new feature to configure application

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux