Writing a Spacewalk plugin for Apt-Get
Hello Apt-Get List,
I am writing a complex plugin for apt-get and I would like to ask a few
questions, to verify that I am on right path. I will try to be a brief.
Spacewalk is web based a systems management system by Red Hat. It
allows you (besides many other) to manage systems with their packages,
packages itself and channels of packages. It's primarily rpm based and
works well with yum.
>From debian client perspective (apt-get), following tasks should be
(1) Authenticate when talking to Spacewalk
(2) When downloading a content, use uri correct for Spacewalk
(3) Report installed packages back to the Spacewalk
(4) Use all of authorized channels (Multiple Packages.gz)
To fulfill first and second requirement I have written a new acquire
method for apt and put it to the /usr/lib/apt/methods. You can take a
look at the source code.
Then I have used DPkg::Post-Invoke hook for sending list of installed
packages to the Spacewalk. That was the third requirement, but I am
still having troubles with the last.
Basically, each time the libapt is going to read
/etc/apt/sources.list.d/spacewalk.list, I would like my code to update
the information there. To reflect currently authorized channels. For
- deb spacewalk://fqdn channels: main foobar
+ deb spacewalk://fqdn channels: main bar foo xxx
For this, I would like to introduce a new hook (similar to
DPKg::*-Invoke) to libapt code. And then configure spacewalk-plugin to
benefit from it.
But I would a appreciate any suggestions or comments from apt-get
upstream first. Please, can you see any other option then introducing a
new hook to apt?
Thank you in advance,
Šimon Lukašík, xlukas08
Student 3BIT, FIT VUTBR