Name: faf Version: 0.4 Release: 1%{?dist} Summary: Bug analysis framework for Fedora Group: Development/Libraries License: GPLv3+ URL: http://fedorahosted.org/faf Source0: https://fedorahosted.org/released/faf/faf-%{version}.tar.xz # faf-cache Requires: MySQL-python BuildRequires: MySQL-python mysql-server # faf-btserver Requires: btparser >= 0:0.17, btparser-python >= 0:0.17 BuildRequires: btparser >= 0:0.17, btparser-python >= 0:0.17 # faf-chroot Requires: rpm-build # faf-debuginfo-analyze-build Requires: elfutils # faf-dwarf-files BuildRequires: elfutils-devel # faf-koji-pull-rpms, faf-chroot Requires: rpm-python yum BuildRequires: rpm-python yum # Manpages BuildRequires: asciidoc xmlto # Python files BuildRequires: python2-devel # make check BuildRequires: pylint # libsolv Requires: python-solv BuildRequires: python-solv # hub, worker, client (make check) BuildRequires: kobo-worker kobo-django kobo-client Django %description Faf is a programmable platform for analysis of packages, packaging issues, bug reports and other artifacts produced within Fedora operating system development. %package hub Summary: Kobo hub for %{name} tasks Group: System Environment/Libraries Requires: %{name} = %{version} Requires: httpd Requires: kobo-client Requires: kobo-django Requires: kobo-hub Requires: mod_wsgi BuildArch: noarch %description hub Kobo hub for %{name} tasks %package worker Summary: Kobo worker for %{name} tasks Group: System Environment/Libraries Requires: %{name} = %{version} Requires: kobo-client Requires: kobo-worker BuildArch: noarch %description worker Kobo worker for %{name} tasks %package client Summary: Kobo client for %{name} tasks Group: System Environment/Libraries Requires: %{name} = %{version} Requires: kobo-client BuildArch: noarch %description client Kobo client for %{name} tasks %prep %setup -q %build %configure make %{?_smp_mflags} %install make install DESTDIR=%{buildroot} install -d -m 2775 %{buildroot}%{_localstatedir}/lib/faf mkdir -p %{buildroot}%{python_sitelib}/pyfaf/hub/tasks mkdir -p %{buildroot}%{_localstatedir}/spool/faf mkdir -p %{buildroot}%{_localstatedir}/spool/faf/hub mkdir -p %{buildroot}%{_localstatedir}/spool/faf/hub/tasks mkdir -p %{buildroot}%{_localstatedir}/spool/faf/hub/upload mkdir -p %{buildroot}%{_localstatedir}/spool/faf/worker mkdir -p %{buildroot}%{_localstatedir}/log/faf/build %check make check %pre # http://fedoraproject.org/wiki/Packaging:UsersAndGroups getent group faf >/dev/null || groupadd --system faf getent passwd faf >/dev/null || useradd --system -g faf -d /etc/faf -s /sbin/nologin -c "Helper user for faf (analysis framework for Fedora) tools" faf exit 0 %post %define crontab_entry_1 "#0 0,12 * * * faf-bugzilla-pull-bugs --abrt-only --with-comments --with-attachments -v >> /var/log/faf/bugzilla-cron.log 2>&1" %define crontab_entry_2 "#0 3 * * 6 (faf-koji-pull-tags fedora -v && faf-koji-pull-builds --only-missing fedora dist-rawhide -v && faf-koji-pull-rpms --only-missing fedora -v) >> /var/log/faf/koji-cron.log 2>&1" if [ "$1" = 1 ] then # add disabled crontab entries ( crontab -u faf -l 2> /dev/null; echo %{crontab_entry_1}; echo %{crontab_entry_2} ) | crontab -u faf - 2> /dev/null fi %post hub if [ "$1" = 1 ] then # "\041" = "!" - exclude it to be safely used as sed separator # "\042" = '"' - exclude RANDOM_STR=`tr -c -d '[\043-\176]' < /dev/urandom | head -c 50` sed -i -e "s!@RANDOM_STRING@!$RANDOM_STR!g" %{python_sitelib}/pyfaf/hub/settings.py LOGFILE=%{_localstatedir}/log/%{name}/syncdb_output.log date >> $LOGFILE faf-hub syncdb --noinput >> $LOGFILE 2>&1 fi %preun if [ "$1" = 0 ] then # comment out all crontab entries ( crontab -u faf -l 2> /dev/null | sed "s,^\([^#].*\)$,#\1,g" ) | crontab -u faf - 2> /dev/null fi %files %dir %{_sysconfdir}/faf %config(noreplace) %{_sysconfdir}/faf/config %config(noreplace) %{_sysconfdir}/httpd/conf.d/faf.conf %dir %attr(0775, faf, faf) %{_localstatedir}/spool/faf %dir %attr(0775, faf, faf) %{_localstatedir}/log/faf %dir %attr(0775, faf, faf) %{_localstatedir}/log/faf/build %dir %attr(2775, root, faf) %{_localstatedir}/lib/faf %dir %{_datadir}/faf %dir %{_datadir}/faf/wrappers %{_bindir}/faf-abrt-backtraces %{_bindir}/faf-abrt-check-reports %{_bindir}/faf-abrt-dup-bugs %{_bindir}/faf-abrt-dup-improvements %{_bindir}/faf-bugzilla %{_bindir}/faf-bugzilla-pull-attachments %{_bindir}/faf-bugzilla-pull-bugs %{_bindir}/faf-bugzilla-pull-comments %{_bindir}/faf-bugzilla-pull-users %{_bindir}/faf-btserver-cgi %{_bindir}/faf-btserver-cluster %{_bindir}/faf-btserver-commit-actions-bugzilla %{_bindir}/faf-btserver-create-optimized-backtraces %{_bindir}/faf-btserver-distance %{_bindir}/faf-btserver-func-stats %{_bindir}/faf-btserver-prepare-actions %{_bindir}/faf-btserver-print-actions %{_bindir}/faf-cache %{_bindir}/faf-chroot %attr(04750,root,faf) %{_bindir}/faf-chroot-helper %{_bindir}/faf-config %{_bindir}/faf-debuginfo-analyze-build %{_bindir}/faf-debuginfo-analyze-builds %{_bindir}/faf-debuginfo-build-debugsources %{_bindir}/faf-debuginfo-report-bugzilla %{_bindir}/faf-debuginfo-report-log %{_bindir}/faf-dwarf-files %{_bindir}/faf-fedora-pkgdb %{_bindir}/faf-fedora-pkgdb-pull-collections %{_bindir}/faf-fedora-pkgdb-pull-packages %{_bindir}/faf-funfin-analyze-binary %{_bindir}/faf-funfin-analyze-build %{_bindir}/faf-funfin-analyze-builds %{_bindir}/faf-funfin-report %{_bindir}/faf-koji %{_bindir}/faf-koji-pull-builds %{_bindir}/faf-koji-pull-rpms %{_bindir}/faf-koji-pull-tags %{_bindir}/faf-llvm-build %{_bindir}/faf-refreshrepo %{_bindir}/faf-stats-abrt-bugs-closed %{_bindir}/faf-stats-abrt-bugs-opened %{_bindir}/faf-stats-abrt-bugs-remaining-opened %{_bindir}/faf-stats-abrt-crashes %{_bindir}/faf-stats-abrt-development %{_bindir}/faf-stats-abrt-users %{_mandir}/man1/faf-*.1.gz %{_datadir}/faf/*.html %{_datadir}/faf/wrappers/* %dir %{python_sitelib}/pyfaf %{python_sitelib}/pyfaf/argparse.py* %{python_sitelib}/pyfaf/btserver.py* %{python_sitelib}/pyfaf/bugzilla.py* %{python_sitelib}/pyfaf/config.py* %{python_sitelib}/pyfaf/__init__.py* %{python_sitelib}/pyfaf/koji.py* %{python_sitelib}/pyfaf/libsolv.py* %{python_sitelib}/pyfaf/run.py* %{python_sitelib}/pyfaf/support.py* %{python_sitelib}/pyfaf/terminal.py* %{python_sitelib}/pyfaf/cache %files hub %config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}-hub.conf %{python_sitelib}/pyfaf/hub %{_bindir}/faf-hub %dir %attr(0770, faf, apache) %{_localstatedir}/spool/faf/hub %dir %attr(0770, faf, apache) %{_localstatedir}/spool/faf/hub/tasks %dir %attr(0770, faf, apache) %{_localstatedir}/spool/faf/hub/upload %files worker %config(noreplace) %{_sysconfdir}/%{name}/worker.conf %{python_sitelib}/pyfaf/worker %{_bindir}/faf-worker %dir %attr(0770, faf, apache) %{_localstatedir}/spool/faf/worker %files client %config(noreplace) %{_sysconfdir}/%{name}/client.conf %{python_sitelib}/pyfaf/client %{_bindir}/faf-client %changelog * Mon Mar 19 2012 Karel Klíč - 0.4-1 - Initial spec file