--- rpms/smolt/sme7/smolt.spec 2007/07/01 22:01:32 1.2 +++ rpms/smolt/sme7/smolt.spec 2010/03/04 00:49:44 1.7 @@ -1,55 +1,56 @@ Name: smolt -Summary: Fedora hardware profiler -Version: 0.9.8.1 -Release: 4%{?dist} -License: GPL -Group: Applications/Internet -URL: http://hosted.fedoraproject.org/projects/smolt - -# Note: This is a link to the gzip, you can't download it directly -# This will get fixed as soon as hosted can create attachments directly -Source: https://hosted.fedoraproject.org/projects/smolt/attachment/wiki/WikiStart/%{name}-%{version}.tar.gz -Patch0: smolt-0.9.8.1-sme.patch -Patch1: smolt-0.9.8.1-sme.patch2 -Patch2: smolt-0.9.8.1-sme.patch3 +Summary: SME Server hardware profiler +Version: 1.4.3 +Release: 2%{?dist} +License: GPLv2+ +Group: Applications/Internet +URL: http://fedorahosted.org/smolt +Source: https://fedorahosted.org/releases/s/m/%{name}/%{name}-%{version}.tar.gz +Patch1: smolt-1.4.3-el4.patch +Patch2: smolt-1.4.3-sme.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Requires: dbus-python, python-urlgrabber, gawk, python-paste, hal, python-ctypes BuildArch: noarch -Requires: dbus-python BuildRequires: gettext -BuildRequires: /usr/bin/msgfmt.py BuildRequires: desktop-file-utils +Requires(pre): %{_sbindir}/groupadd +Requires(pre): %{_sbindir}/useradd Requires(post): /sbin/chkconfig Requires(preun): /sbin/chkconfig Requires(preun): /sbin/service Requires(postun): /sbin/service +Requires: python-simplejson %description -The Fedora hardware profiler is a server-client system that does a hardware -scan against a machine and sends the results to a public Fedora Project +The SME Server hardware profiler is a server-client system that does a hardware +scan against a machine and sends the results to a public SME Server Project turbogears server. The sends are anonymous and should not contain any private information other than the physical hardware information and basic OS info. This package contains the client %package server -Summary: Fedora hardware profiler server +Summary: SME Server hardware profiler server Group: Applications/Internet Requires: smolt = %{version}-%{release} -Requires: TurboGears +Requires: python-genshi +Requires: python-crypto +Requires: TurboGears mx +Requires: python-turboflot %description server -The Fedora hardware profiler is a server-client system that does a hardware -scan against a machine and sends the results to a public Fedora Project +The SME Server hardware profiler is a server-client system that does a hardware +scan against a machine and sends the results to a public SME Server Project turbogears server. The sends are anonymous and should not contain any private information other than the physical hardware information and basic OS info. This package contains the server portion %package firstboot -Summary: Fedora hardware profile firstboot +Summary: SME Server hardware profile firstboot Group: Applications/Internet Requires: smolt = %{version}-%{release} @@ -58,9 +59,10 @@ This provides firstboot integration for separate package so firstboot isn't a requisite to use smolt. %package gui -Summary: Fedora hardware profiler gui +Summary: SME Server hardware profiler gui Group: Applications/Internet Requires: smolt = %{version}-%{release} +Requires: PyQt4 %description gui Provides smolt's gui functionality. Not included in the default package to @@ -68,7 +70,6 @@ ensure that deps are kept small. %prep %setup -q -%patch0 -p1 %patch1 -p1 %patch2 -p1 @@ -78,67 +79,76 @@ make %install %{__rm} -rf %{buildroot} +cd client +DESTDIR=%{buildroot} make install +cd .. %{__install} -d -m 0755 smoon/ %{buildroot}/%{_datadir}/%{name}/smoon/ +%{__mkdir} -p %{buildroot}/%{_mandir}/man1/ %{__cp} -adv smoon/* %{buildroot}/%{_datadir}/%{name}/smoon/ +%{__cp} client/scan.py %{buildroot}/%{_datadir}/%{name}/client/ +%{__cp} client/gate.py %{buildroot}/%{_datadir}/%{name}/client/ +%{__cp} client/os_detect.py %{buildroot}/%{_datadir}/%{name}/client/ +%{__cp} client/fs_util.py %{buildroot}/%{_datadir}/%{name}/client/ +%{__cp} client/man/* %{buildroot}/%{_mandir}/man1/ %{__mkdir} -p %{buildroot}/%{_sysconfdir}/sysconfig/ -%{__mkdir} -p %{buildroot}/%{_sysconfdir}/cron.d/ -%{__mkdir} -p %{buildroot}/%{_bindir} %{__mkdir} -p %{buildroot}/%{_datadir}/firstboot/modules/ %{__mkdir} -p %{buildroot}/%{_initrddir} -%{__mkdir} -p %{buildroot}/%{_datadir}/locale/ + %{__mv} client/smoltFirstBoot.py %{buildroot}/%{_datadir}/firstboot/modules/smolt.py %{__mv} client/smolt-init %{buildroot}/%{_initrddir}/smolt -%{__mv} client/smolt.cron.monthly %{buildroot}/%{_sysconfdir}/cron.d/smolt -%{__cp} -adv client/po/* %{buildroot}/%{_datadir}/locale/ - -find %{buildroot} -name \*.po\* -exec rm {} \; touch %{buildroot}/%{_sysconfdir}/sysconfig/hw-uuid -%{__install} -d -m 0755 client/ %{buildroot}/%{_datadir}/%{name}/client/ -%{__install} -d -m 0755 client/icons/ %{buildroot}/%{_datadir}/%{name}/client/icons/ -%{__cp} -adv client/*.py %{buildroot}/%{_datadir}/%{name}/client/ - # Icons %{__mkdir} -p %{buildroot}/%{_datadir}/icons/hicolor/16x16/apps/ %{__mkdir} -p %{buildroot}/%{_datadir}/icons/hicolor/22x22/apps/ %{__mkdir} -p %{buildroot}/%{_datadir}/icons/hicolor/24x24/apps/ %{__mkdir} -p %{buildroot}/%{_datadir}/icons/hicolor/32x32/apps/ + %{__mkdir} -p %{buildroot}/%{_datadir}/firstboot/pixmaps/ +%{__mkdir} -p %{buildroot}/%{_datadir}/firstboot/themes/default/ + %{__mv} client/icons/smolt-icon-16.png %{buildroot}/%{_datadir}/icons/hicolor/16x16/apps/smolt.png %{__mv} client/icons/smolt-icon-22.png %{buildroot}/%{_datadir}/icons/hicolor/22x22/apps/smolt.png %{__mv} client/icons/smolt-icon-24.png %{buildroot}/%{_datadir}/icons/hicolor/24x24/apps/smolt.png %{__mv} client/icons/smolt-icon-32.png %{buildroot}/%{_datadir}/icons/hicolor/32x32/apps/smolt.png %{__cp} -adv client/icons/* %{buildroot}/%{_datadir}/%{name}/client/icons/ -%{__cp} -adv client/icons/smolt-icon-48.png %{buildroot}/%{_datadir}/firstboot/pixmaps/smolt.png +%{__cp} -adv client/icons/smolt-icon-48.png %{buildroot}/%{_datadir}/firstboot/themes/default/smolt.png -%{__mkdir} -p %{buildroot}/%{_datadir}/%{name}/doc -%{__install} -p -m 0644 doc/PrivacyPolicy %{buildroot}/%{_datadir}/%{name}/doc +%{__rm} -f %{buildroot}/%{_bindir}/smoltSendProfile %{buildroot}/%{_bindir}/smoltDeleteProfile %{buildroot}/%{_bindir}/smoltGui +%{__rm} -f %{buildroot}/%{_datadir}/%{name}/client/config.py ln -s %{_datadir}/%{name}/client/sendProfile.py %{buildroot}/%{_bindir}/smoltSendProfile ln -s %{_datadir}/%{name}/client/deleteProfile.py %{buildroot}/%{_bindir}/smoltDeleteProfile ln -s %{_datadir}/%{name}/client/smoltGui.py %{buildroot}/%{_bindir}/smoltGui +ln -s %{_sysconfdir}/%{name}/config.py %{buildroot}/%{_datadir}/%{name}/client/config.py -%{__chmod} +x %{buildroot}/%{_datadir}/%{name}/client/*Profile.py -%{__chmod} +x %{buildroot}/%{_datadir}/%{name}/client/smoltGui.py -%{__chmod} +x %{buildroot}/%{_initrddir}/smolt desktop-file-install --vendor='fedora' --dir=%{buildroot}/%{_datadir}/applications client/smolt.desktop - +%{__rm} -f %{buildroot}/%{_datadir}/applications/smolt.desktop %find_lang %{name} +# Cleanup from the Makefile (will be cleaned up when it is finalized) +%{__rm} -f %{buildroot}/etc/init.d/smolt +%{__rm} -f %{buildroot}/etc/smolt/hw-uuid + %clean rm -rf %{buildroot} +%pre +%{_sbindir}/groupadd -r %{name} &>/dev/null || : +%{_sbindir}/useradd -r -s /sbin/nologin -d %{_datadir}/%{name} -M \ + -c 'Smolt' -g %{name} %{name} &>/dev/null || : + %post /sbin/chkconfig --add smolt -if ! [ -f %{_sysconfdir}/sysconfig/hw-uuid ] -then - /bin/cat /proc/sys/kernel/random/uuid > %{_sysconfdir}/sysconfig/hw-uuid - /bin/chmod 0644 %{_sysconfdir}/sysconfig/hw-uuid - /bin/chown root:root %{_sysconfdir}/sysconfig/hw-uuid -fi + +#Randomize checkin times. +TMPFILE=$(/bin/mktemp /tmp/smolt.XXXXX) +/bin/awk '{ srand(); if($2 == 1 && $3 == 1) print $1,int((rand() * 100) % 22 + 1),int((rand() * 100) % 27 + 1),substr($0,index($0,$4)); else print $0}' /etc/cron.d/smolt > $TMPFILE +/bin/cp $TMPFILE /etc/cron.d/smolt +/bin/rm -f $TMPFILE %preun if [ $1 = 0 ]; then @@ -146,15 +156,42 @@ if [ $1 = 0 ]; then /sbin/chkconfig --del smolt fi +%post server +#Fail, will fix later +for f in delete.html deviceclass.html device.html devices.html error.html \ + link.html login.html master.html myHosts.html notLoaded.html \ + pub_uuid.html raw.html report_device_ratings.html \ + report_host_ratings.html report_recent.html report_search_devices.html\ + report_search.html report_search_profiles.html report_view_device.html\ + report_view_devices.html report_view.html report_view_profile.html \ + report_view_profiles.html showall.html show.html stats.html token.html\ + welcome.html +do + touch %{_datadir}/%{name}/smoon/hardware/static/stats/$f +done + +%post gui +touch --no-create %{_datadir}/icons/hicolor || : +%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : + +%postun gui +touch --no-create %{_datadir}/icons/hicolor || : +%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : + %files -f %{name}.lang %defattr(-,root,root,-) %doc README GPL doc/* %dir %{_datadir}/%{name} +%dir %{_sysconfdir}/%{name}/ %{_datadir}/%{name}/client +#%ghost %{_datadir}/%{name}/client/scan.pyc +#%ghost %{_datadir}/%{name}/client/scan.pyo %{_datadir}/%{name}/doc %{_bindir}/smoltSendProfile %{_bindir}/smoltDeleteProfile +%config(noreplace) /%{_sysconfdir}/%{name}/config* %{_sysconfdir}/cron.d/%{name} +%{_mandir}/man1/*gz %{_initrddir}/%{name} %ghost %config(noreplace) %{_sysconfdir}/sysconfig/hw-uuid @@ -165,7 +202,7 @@ fi %files firstboot %defattr(-,root,root,-) %{_datadir}/firstboot/modules/smolt.py* -%{_datadir}/firstboot/pixmaps/smolt.png +%{_datadir}/firstboot/themes/default/smolt.png %files gui %defattr(-,root,root,-) @@ -174,14 +211,145 @@ fi %{_bindir}/smoltGui %changelog -* Sun Jul 1 2007 Shad L. Lords - 0.9.8.1-4 -- Specify full paths so commands will run. +* Mon Feb 3 2010 Shad L. Lords 1.4.2-2.sme +- Apply patches so smolt will run under el4 +- Apply sme specific patches + +* Mon Jan 25 2010 Mike McGrath 1.4.2-1 +- Upstream released new version +- Added hal requires + +* Tue Oct 13 2009 Mike McGrath 1.4-4 +- Fixing firstboot for F-12 + +* Mon Sep 21 2009 Mike McGrath 1.4-2 +- Patched issue with translations (already upstream) + +* Mon Sep 14 2009 Mike McGrath 1.4-1 +- Upstream released new version + +* Thu Sep 10 2009 Mike McGrath - 1.3.2-2 +- Added requires for PyQt4 on smolt gui + +* Thu Sep 03 2009 Mike McGrath - 1.3.2-1 +- Upstream released new version +- Changed some link and copy info + +* Sun Jul 26 2009 Fedora Release Engineering - 1.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Thu Jul 02 2009 Mike McGrath - 1.3-1 +- Added touch for generated stats +- Upstream released new version + +* Tue Apr 14 2009 Mike McGrath - 1.2-4.2 +- Removed fake attack + +* Fri Mar 13 2009 Mike McGrath - 1.2-4.1 +- Fixed some formatting in the spec file +- Added note to %post + +* Wed Feb 25 2009 Fedora Release Engineering - 1.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Wed Jan 21 2009 Mike McGrath - 1.2-3 +- Added os_detect.py as it is now required. + +* Mon Dec 01 2008 Ignacio Vazquez-Abrams - 1.2-2 +- Rebuild for Python 2.6 + +* Sun Nov 30 2008 Mike McGrath 1.2-1 +- Upstream released new version -* Thu Jun 7 2007 Shad L. Lords - 0.9.8.1-3 -- More patches for both el4 and sme. +* Fri Nov 21 2008 Mike McGrath 1.1.1.1-10 +- Fix for bug 472101 -* Wed Jun 6 2007 Shad L. Lords - 0.9.8.1-2 -- Patch to work with el4 and point at sme smolt server. +* Wed Nov 12 2008 Mike McGrath 1.1.1.1-9 +- Fix for bug 470829 + +* Tue Nov 11 2008 Mike McGrath 1.1.1.1-8 +- Added patch for fixed scanner + +* Wed Oct 1 2008 Mike McGrath 1.1.1.1-7 +- Fix for 439496 + +* Sun Sep 7 2008 Mike McGrath 1.1.1.1-6 +- Added turboflot to server, removed from firstboot + +* Thu Sep 4 2008 Tom "spot" Callaway 1.1.1.1-5 +- fix license tag + +* Thu Apr 03 2008 Mike McGrath - 1.1.1.1-4 +- One revert for rawhide + +* Sat Mar 08 2008 Mike McGrath - 1.1.1.1-3 +- Fixing firstboot again for 437708, 437765 + +* Sat Mar 08 2008 Mike McGrath - 1.1.1.1-2 +- Fix firstboot for 437708, 437765 + +* Sat Mar 08 2008 Mike McGrath - 1.1.1.1-1 +- Upstream released new version + +* Wed Mar 05 2008 Mike McGrath - 1.1.1-1 +- Upstream released new version +- Manfiles added +- Source location updated + +* Wed Feb 27 2008 Jeffrey C. Ollie - 1.1-3 +- Copy instead of move cron file so that selinux contexts are set + properly. (BZ#435050) + +* Wed Feb 27 2008 Jeffrey C. Ollie - 1.1-2 +- Create smolt user. (BZ#435136) + +* Fri Feb 01 2008 Mike McGrath 1.0-5 +- Added a req for mx on smoon + +* Thu Jan 08 2008 Mike McGrath 1.0-4 +- Fixed firstboot + +* Thu Jan 08 2008 Mike McGrath 1.0-3 +- Added python-urlgrabber as a requires - 427969 + +* Thu Nov 22 2007 Mike McGrath 1.0-2 +- Installed scanner - #395901 + +* Tue Nov 20 2007 Mike McGrath 1.0-1 +- Upstream released new version + +* Tue Oct 25 2007 Mike McGrath 0.9.9.2-1 +- Upstream released new version + +* Tue Oct 23 2007 Mike McGrath 0.9.9.1-4 +- Upstream released new version + +* Thu Oct 18 2007 Mike McGrath 0.9.9-2 +- Fixed /etc/smolt/ ownership issue + +* Tue Oct 16 2007 Mike McGrath 0.9.9-1 +- Upstream released new version + +* Fri Sep 28 2007 Mike McGrath 0.9.8.4-8 +- Fixed Selinux + +* Thu Sep 27 2007 Mike McGrath 0.9.8.4-6 +- Added translations + +* Fri Sep 21 2007 Mike McGrath 0.9.8.4-5 +- Fixed firstboot issues + +* Mon Aug 13 2007 Mike McGrath 0.9.8.4-4 +- Rebuild to clean up 'config.py' compilations + +* Mon Aug 13 2007 Mike McGrath 0.9.8.4-1 +- Upstream released new version (major changes) +- New config file +- New Makefile +- Added deps + +* Fri Jun 22 2007 Mike McGrath 0.9.8.3 +- Upstream released new version * Thu May 24 2007 Mike McGrath - 0.9.8.1 - Upstream released new version