Hi everyone,

I have been working for some time on functionality to update the sipXecs 
packages from the sipXconfig UI. It has reached a point where I can 
commit this work in progress and start to get feedback from people.

CODE REVIEW REQUEST:

In particular, I need a couple of pairs of eyes to look over some of my 
code. The main code that interacts with the Yum package manager is a 
Python script, and for it to run with root permission it is called by a 
C wrapper program that is setuid root.

My skills with C and Python are not that great compared to my Java 
skills, so I would be grateful if someone knowledgeable could look over 
the files in question and let me know if I'm doing something the "wrong 
way".

The files in question are:

* sipXcommserverLib/bin/sipxpackage-init.in - checks the permissions on 
the sipxpackage wrapper program to make sure it is owned by root
* sipXcommserverLib/src/sipxpackage/sipxpackage.c - the wrapper program
* sipXpbx/bin/sipx-package.py.in - The Python script that talks to Yum.

HOW IT WORKS:

Since the software update functionality only works if you have an RPM 
version of sipXecs installed, testing is currently a bit awkward. If you 
want to test or play with it, the easiest way I've found is to install a 
slightly older RPM distribution alongside your regular development 
environment (installing to a different prefix of course!). You run the 
working copy in your dev. environment, but Yum and RPM will interact 
with the installed RPM version, so you can 'upgrade' it.

Currently, you will see that the update is done synchronously. In the 
interests of getting something working committed sooner, this is a 
temporary measure, as the process can take quite a long time if there 
are a lot of packages to be downloaded.

HOW TO USE:
Go to the System menu and select Software Updates. You then click "Check 
for updates", and it checks for available updates in the background. 
Please note that the "Refresh" button doesn't trigger a new update 
check, it just updates the status as the update check is done 
asynchronously (Eventually, the package downloading will be done similarly).

If there is a newer sipXecs release available, it will show the 
available update and have an "Install updates" button. Clicking this 
button will go to the "waiting" page that says "Server is restarting..." 
You then need to sit and wait while sipXecs stops, the packages are 
downloaded and updated, and sipXecs is started back up. Eventually you 
will be returned to the login page.

Please feel free to play around and give me any feedback, suggestions, 
criticism, etc.

I will be taking a break from package updates for my sanity, to work on 
a conferencing issue, then I will be coming back to this.

Thanks!

// Joe

_______________________________________________
sipx-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-dev
Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev

Reply via email to