[yast-devel] Gloves - RFC chrooting and new calls for agents
Hi, automatic chrooting for config agents stop working. Reason is that now there is no layer between glove library and agents and it is called directly, so it cannot be hooked with global options ( I plan also add default env changer for scripts ). So question is how to change it. There is need to add some place where such global changes can be done. I think that it can be done in base class, but to affect child it is not possible to use same name ( otherwise inheritance take effect ). Inspired by ActiveModel I think that we can have different method to call and different method where it is in fact implemented. So proposal is to have methods read/write that is called from glove, but in config agent implementation will be in methods load/save(or store?). Jiri Suchomel argument, that methods should be similar to avoid confusion like read_implementation/write_implementation or similar method. Just to compare another approach could be some kind of block settings, so all agents contain in read/write method something like general_options(options) do #implementation end Josef -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
So proposal is to have methods read/write that is called from glove, but in config agent implementation will be in methods load/save(or store?). ... do you mean a sort of own API for accessing system?
Michal Filka -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
On Tue, 14 Aug 2012 10:12:46 +0200 Michal Filka <mfilka@suse.cz> wrote:
So proposal is to have methods read/write that is called from glove, but in config agent implementation will be in methods load/save(or store?). ... do you mean a sort of own API for accessing system?
Michal Filka
I mean that I need layer between gloves and config agent. So you call e.g. Sysconfig.read("/etc/sysconfig/display_manager",:__chroot => "/tmp/chroot") ConfigAgent::Agent have method read, that check for global parameters like __chroot and call inside e.g. Chrooted.run (path) do load(*args) end Josef -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
Dne 14.8.2012 10:18, Josef Reidinger napsal(a):
On Tue, 14 Aug 2012 10:12:46 +0200 Michal Filka<mfilka@suse.cz> wrote:
So proposal is to have methods read/write that is called from glove, but in config agent implementation will be in methods load/save(or store?). ... do you mean a sort of own API for accessing system?
Michal Filka
I mean that I need layer between gloves and config agent.
So you call e.g. Sysconfig.read("/etc/sysconfig/display_manager",:__chroot => "/tmp/chroot")
ConfigAgent::Agent have method read, that check for global parameters like __chroot and call inside e.g. Chrooted.run (path) do load(*args) end
What about another approach? Instead of running the agents in chroot, having then run where the rest of the system and the agents just using modified file paths? Why? Currently even if you install a minimal system, you still need to install YaST, because of the SCR agents. With this changes, it would not be needed any more. Jiri -- Regards, Jiri Srain Project Manager --------------------------------------------------------------------- SUSE LINUX, s.r.o. e-mail: jsrain@suse.com Lihovarska 1060/12 tel: +420 284 084 659 190 00 Praha 9 fax: +420 284 084 001 Czech Republic http://www.suse.com -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
On Tue, 14 Aug 2012 11:02:49 +0200 Jiri Srain <jsrain@suse.cz> wrote:
Dne 14.8.2012 10:18, Josef Reidinger napsal(a):
On Tue, 14 Aug 2012 10:12:46 +0200 Michal Filka<mfilka@suse.cz> wrote:
So proposal is to have methods read/write that is called from glove, but in config agent implementation will be in methods load/save(or store?). ... do you mean a sort of own API for accessing system?
Michal Filka
I mean that I need layer between gloves and config agent.
So you call e.g. Sysconfig.read("/etc/sysconfig/display_manager",:__chroot => "/tmp/chroot")
ConfigAgent::Agent have method read, that check for global parameters like __chroot and call inside e.g. Chrooted.run (path) do load(*args) end
What about another approach? Instead of running the agents in chroot, having then run where the rest of the system and the agents just using modified file paths?
it is not possible for scripts, so I want generic solution for files and also for scripts.
Why? Currently even if you install a minimal system, you still need to install YaST, because of the SCR agents. With this changes, it would not be needed any more.
It looks like confusion here. It works slightly different. Agents code run outside of chroot only you chroot to target chroot to do actions. One annoying side-effect is need of augeas lenses to allow its usage, but I plan to link it there automatic if it is not there and remove it after usage. So we have no requirements for chroot and nothing need to be installed. Also agents is separate packages, so you need not to use gloves to have agents. Josef
Jiri
-- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
participants (3)
-
Jiri Srain
-
Josef Reidinger
-
Michal Filka