Robin Bowes wrote: > So, in summary, the RPM should do this: > > If SELinux is enabled { > semanage fcontext -a -t mysqld_db_t "/var/cache/squeezecenter" > chcon -t mysql_db_t /var/cache/squeezecenter > } > > Plus, the tcp port binding needs sorting out - I'll work on that.
OK, here's the real deal! On install, the RPM should do the following (before starting up the server): if selinuxenabled; then semanage port -a -t mysqld_port_t -p tcp 9092 semanage fcontext -a -t mysqld_db_t "/var/cache/squeezecenter(/.*)?" restorecon -R /var/cache/squeezecenter fi On uninstall, it should do the following (after stopping the server): if selinuxenabled; then semanage port -d -t mysqld_port_t -p tcp 9092 semanage fcontext -d -t mysqld_db_t "/var/cache/squeezecenter(/.*)?" restorecon -R /var/cache/squeezecenter fi "/var/cache/squeezecenter" should be replaced by whatever directory we end up putting the mysql DB into. Now, there may be other issues that crop up as the server tries to write to various locations (playlists? favourites?) but I'm not sure. I guess we need to fix those as and when they crop up. I've gone ahead and added the necessary code to the spec file in the %post and %preun sections. See r14243. I've also added some script foo that pulls the mysql port and cachedir from the prefs file but I'm not sure that is the right thing to do so I've left it disabled for now. I've not done a build since I'm not clear on the process (does it build from svn? does it need a tarball? etc. etc.). Talking of which, I have a Makefile that will allow an RPM build direct from svn. I must look into making it work with squeezecenter... Cheers, R. _______________________________________________ beta mailing list beta@lists.slimdevices.com http://lists.slimdevices.com/lists/listinfo/beta