Hi everybody,
As a long-time Linux user I was thrilled to find MATE such a great
reincarnation of the GNOME 2 interface. However, there was one little piece
missing for me: because MATE is distribution-agnostic, it lacks an applet
to notify about software updates. To fill the gap, I decided to put
together a small one.
Because there are at least two popular update services (yum, apt), I
decided to give the applet the ability to obtain information about updates
from various sources (ether via pull or via push mechanism). Available
back-ends are detected at compile time and, if several are present, the
most preferred is chosen.
For yum based distributions (RHEL, CentOS, Fedora, Scientific etc.) most
preferred is yum-updatesd, because it uses D-Bus to notify about pending
updates (and that's what D-Bus was create for). Oddly enough, recent
versions of Fedora do not install yum-updatesd by default, leaving the user
(and the developer) without a suitable notification mechanism (it is still
in the repository, though, and may be set as required prerequisite in RPM).
For that particular case, a second back-end is supported with lower
priority, the yum binary itself. When invoked with the “check-udpate”
command line parameter, it sets its exit code according to whether there
are pending updates or not, and also prints the list of updates to stdout
one per line, giving us an opportunity, albeit ugly, to do our job.
For apt based distributions (Debina, Ubuntu, Mint etc.) the situations is
even worse. The only back-end available is the apt-check script from the
update-notifier package. When called, it prints to stdout the number of
pending updates, which we can then report to the user. The caveat here is
that apt-check does not check against repositories – it only reads the
local database, which some other process needs to update.
Initially I looked at also supporting apt binary as back-end, because it
can check remote repositories and report to stdout the available updates,
giving us a chance to count them. However, apt seems to be poorly designed:
calling “apt-get update” requires root privileges and while the simulation
mode (-s) does not, it also does not print available updates. So, to use
apt we'll either have to make it setuid or (slightly better), provide a
suid wrapper with hard-coded “apt-get update” command.
I'm also considering writing a new back-end against libapt which will
probably be a better approach, but will require some time (I'm not very
familiar with apt's internals).
Also, if there are other protocols (aside of yum and apt) you feel such an
applet should support, please, point me to them.
The applet it is intended mostly for MATE packagers, but, as it support
autoconf, it should not be hard for the average user to install it by
himself. Any recommendations you might have are very welcome. The code is
available here: svn://svn.online.bg/mate-applet-softupd/TRUNK
With my best regards,
Assen Totin
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Matede-velopment mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matede-velopment