dom0-cleanup.spec 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. #
  2. # The Qubes OS Project, http://www.qubes-os.org
  3. #
  4. # Copyright (C) 2010 Joanna Rutkowska <joanna@invisiblethingslab.com>
  5. #
  6. # This program is free software; you can redistribute it and/or
  7. # modify it under the terms of the GNU General Public License
  8. # as published by the Free Software Foundation; either version 2
  9. # of the License, or (at your option) any later version.
  10. #
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program; if not, write to the Free Software
  18. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  19. #
  20. #
  21. Name: qubes-dom0-cleanup
  22. Version: 0.2.2
  23. Release: 1
  24. Summary: Additional tools that cleans up some unnecessary stuff in Qubes's Dom0
  25. Group: Qubes
  26. Vendor: Invisible Things Lab
  27. License: GPL
  28. URL: http://www.qubes-os.org
  29. Requires: qubes-core-dom0
  30. %define _builddir %(pwd)/dom0
  31. %description
  32. Additional tools that cleans up some unnecessary stuff in Qubes's Dom0
  33. %install
  34. mkdir -p $RPM_BUILD_ROOT/usr/lib/qubes
  35. cp aux-tools/check_and_remove_appmenu.sh $RPM_BUILD_ROOT/usr/lib/qubes
  36. cp aux-tools/remove_dom0_appmenus.sh $RPM_BUILD_ROOT/usr/lib/qubes
  37. %post
  38. echo "--> Turning off unnecessary services..."
  39. # FIXME: perhaps there is more elegant way to do this?
  40. for f in /etc/init.d/*
  41. do
  42. srv=`basename $f`
  43. [ $srv = 'functions' ] && continue
  44. [ $srv = 'killall' ] && continue
  45. [ $srv = 'halt' ] && continue
  46. chkconfig $srv off
  47. done
  48. #echo "--> Enabling essential services..."
  49. chkconfig abrtd on
  50. chkconfig haldaemon on
  51. chkconfig messagebus on
  52. chkconfig xenstored on
  53. chkconfig xend on
  54. chkconfig xenconsoled on
  55. chkconfig qubes_core on || echo "WARNING: Cannot enable service qubes_core!"
  56. chkconfig qubes_netvm on || echo "WARNING: Cannot enable service qubes_core!"
  57. /usr/lib/qubes/remove_dom0_appmenus.sh
  58. %clean
  59. rm -rf $RPM_BUILD_ROOT
  60. %postun
  61. mv /var/lib/qubes/backup/removed-apps/* /usr/share/applications
  62. xdg-desktop-menu forceupdate
  63. %files
  64. /usr/lib/qubes/check_and_remove_appmenu.sh
  65. /usr/lib/qubes/remove_dom0_appmenus.sh