diff --git a/abrt-1.0.8-debuginfoinstall-latest-yum.patch b/abrt-1.0.8-debuginfoinstall-latest-yum.patch new file mode 100644 index 0000000..c68620e --- /dev/null +++ b/abrt-1.0.8-debuginfoinstall-latest-yum.patch @@ -0,0 +1,22 @@ +commit 87cc9488bd08a5f17318ddd70cbfcdb4182f8b16 +Author: Jiri Moskovcak +Date: Thu Mar 11 23:50:47 2010 +0100 + + minor fix in abrt-debuginfo-install to make it work with yum >= 3.2.26 + + - yum repolist has different output, so it needs to bu run + with additional parameter 'all' + +diff --git a/src/Daemon/abrt-debuginfo-install b/src/Daemon/abrt-debuginfo-install +index 0d9401b..521d42a 100755 +--- a/src/Daemon/abrt-debuginfo-install ++++ b/src/Daemon/abrt-debuginfo-install +@@ -303,7 +303,7 @@ $debug && echo "build_ids:$build_ids" + # When we look for debuginfo we need only -debuginfo* repos, we can disable the rest + # and thus make it faster. + yum_repo_opts="'--disablerepo=*'" +-for enabled_repo in `yum repolist | grep 'enabled:' | cut -f1 -d' ' | grep -v -- '-debuginfo'`; do ++for enabled_repo in `yum repolist all | grep 'enabled:' | cut -f1 -d' ' | grep -v -- '-debuginfo'`; do + yum_repo_opts="$yum_repo_opts '--enablerepo=${enabled_repo}-debuginfo*'" + done + diff --git a/abrt-1.0.8-oops.patch b/abrt-1.0.8-oops.patch new file mode 100644 index 0000000..e038d0a --- /dev/null +++ b/abrt-1.0.8-oops.patch @@ -0,0 +1,29 @@ +commit cbec527eea140de7c2001c08c321f6afeff2a5e1 +Author: Denys Vlasenko +Date: Wed Mar 3 14:03:00 2010 +0100 + + fix bz#570081 (self.is_oops is not defined) + + Signed-off-by: Denys Vlasenko + +diff --git a/src/Gui/CCReporterDialog.py b/src/Gui/CCReporterDialog.py +index bc4a1e0..989f7cb 100644 +--- a/src/Gui/CCReporterDialog.py ++++ b/src/Gui/CCReporterDialog.py +@@ -214,6 +214,7 @@ class ReporterDialog(): + self.editable = [] + self.old_comment = COMMENT_HINT_TEXT + self.old_how_to_reproduce = HOW_TO_HINT_TEXT ++ self.is_oops = False + for item in self.report: + try: + log2("report[%s]:%s/%s/%s", item, self.report[item][0], self.report[item][1], self.report[item][2][0:20]) +@@ -306,7 +307,7 @@ class ReporterDialog(): + text = buff.get_text(buff.get_start_iter(), buff.get_end_iter()) + if self.old_how_to_reproduce != text: + self.report[FILENAME_REPRODUCE] = [CD_TXT, 'y', text] +- #handle backtrace ++ # handle backtrace + tev_backtrace = self.builder.get_object("tvBacktrace") + buff = tev_backtrace.get_buffer() + text = buff.get_text(buff.get_start_iter(), buff.get_end_iter()) diff --git a/abrt-1.0.8-use-only-enabledrepos.patch b/abrt-1.0.8-use-only-enabledrepos.patch new file mode 100644 index 0000000..3497fe9 --- /dev/null +++ b/abrt-1.0.8-use-only-enabledrepos.patch @@ -0,0 +1,60 @@ +commit 4432b7407e6afbbb5e91ad24455556d0e679a4f9 +Author: Denys Vlasenko +Date: Thu Mar 4 20:37:10 2010 +0100 + + abrt-debuginfo-install: use -debuginfo repos which match enabled "usual" repos + + Signed-off-by: Denys Vlasenko + +diff --git a/src/Daemon/abrt-debuginfo-install b/src/Daemon/abrt-debuginfo-install +index 1b6af74..0d9401b 100755 +--- a/src/Daemon/abrt-debuginfo-install ++++ b/src/Daemon/abrt-debuginfo-install +@@ -145,14 +145,12 @@ print_package_names() { + else + echo "`count_words $missing_debuginfo_files` missing debuginfos, getting package list from repositories" >&2 + fi +- # when we look for debuginfo we need only -debuginfo* repos, so we can disable the rest and thus make it faster +- # also we want only fedora repositories, because abrt won't work for other packages anyway + # --showduplicates: do not just show the latest package + # (tried to use -R2 to abort on stuck yum lock but -R is not about that) +- local cmd="yum $yumopts '--disablerepo=*' '--enablerepo=fedora-debuginfo*' '--enablerepo=updates-debuginfo*' --showduplicates --quiet provides $missing_debuginfo_files" ++ local cmd="yum $yumopts $yum_repo_opts --showduplicates --quiet provides $missing_debuginfo_files" + echo "$cmd" >"yum_provides.$1.OUT" + $debug && echo "Running: $cmd" >&2 +- # eval is needed to strip away ''s; cant remove them above and just use ++ # eval is needed to strip away ''s in $yum_repo_opts; cant remove them and just use + # unquoted $cmd, that would perform globbing on '*' + local yum_provides_OUT="`eval $cmd 2>&1`" + local err=$? +@@ -199,9 +197,10 @@ download_packages() { + for pkg in $packages; do + echo "Download $i/$num_packages: $pkg" + echo "Download $i/$num_packages: $pkg" >>yumdownloader.OUT +- # We can't handle packages from non Fedora repos, so we look and download only +- # from Fedora repos which makes it faster +- yumdownloader --disablerepo="*" --enablerepo="fedora-debuginfo*" --enablerepo="updates-debuginfo*" --quiet $pkg >>yumdownloader.OUT 2>&1 ++ cmd="yumdownloader $yum_repo_opts --quiet $pkg" ++ $debug && echo "Running: $cmd" >&2 ++ # eval is needed to strip away ''s in $yum_repo_opts ++ eval $cmd >>yumdownloader.OUT 2>&1 + err=$? + echo "exitcode:$err" >>yumdownloader.OUT + echo >>yumdownloader.OUT +@@ -299,6 +298,16 @@ build_ids=`printf "%s\n" "$eu_unstrip_OUT" \ + done | sort | uniq | xargs` + $debug && echo "build_ids:$build_ids" + ++ ++# Prepare list of repos to use. ++# When we look for debuginfo we need only -debuginfo* repos, we can disable the rest ++# and thus make it faster. ++yum_repo_opts="'--disablerepo=*'" ++for enabled_repo in `yum repolist | grep 'enabled:' | cut -f1 -d' ' | grep -v -- '-debuginfo'`; do ++ yum_repo_opts="$yum_repo_opts '--enablerepo=${enabled_repo}-debuginfo*'" ++done ++ ++ + # We try to not run yum without -C unless absolutely necessary. + # Therefore we loop. yum is run by print_package_names function, + # on first iteration it is run with -C, on second - without, diff --git a/abrt.init b/abrt.init index f1dc410..0701fe2 100644 --- a/abrt.init +++ b/abrt.init @@ -11,24 +11,32 @@ # Default-Stop: 0 1 2 6 # Default-Start: 3 5 # Short-Description: start and stop abrt daemon -# Description: Listen and dispatch crash events +# Description: Listen to and dispatch crash events ### END INIT INFO # Source function library. . /etc/rc.d/init.d/functions - +ABRT_BIN="/usr/sbin/abrtd" +LOCK="/var/lock/subsys/abrtd" +OLD_LOCK="/var/lock/subsys/abrt" RETVAL=0 # +# Set these variables if you are behind proxy +# +#export http_proxy= +#export https_proxy= + +# # See how we were called. # check() { # Check that we're a privileged user - [ `id -u` = 0 ] || exit 4 + [ "`id -u`" = 0 ] || exit 4 # Check if abrt is executable - test -x /usr/sbin/abrtd || exit 5 + test -x $ABRT_BIN || exit 5 } start() { @@ -36,11 +44,11 @@ start() { check # Check if it is already running - if [ ! -f /var/lock/subsys/abrt ]; then + if [ ! -f $LOCK ] && [ ! -f $OLD_LOCK ]; then echo -n $"Starting abrt daemon: " - daemon /usr/sbin/abrtd + daemon $ABRT_BIN RETVAL=$? - [ $RETVAL -eq 0 ] && touch /var/lock/subsys/abrt + [ $RETVAL -eq 0 ] && touch $LOCK echo fi return $RETVAL @@ -51,9 +59,10 @@ stop() { check echo -n $"Stopping abrt daemon: " - killproc /usr/sbin/abrtd + killproc $ABRT_BIN RETVAL=$? - [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/abrt + [ $RETVAL -eq 0 ] && rm -f $LOCK + [ $RETVAL -eq 0 ] && rm -f $OLD_LOCK echo return $RETVAL } @@ -86,8 +95,12 @@ restart) restart ;; condrestart) - if [ -f /var/lock/subsys/abrt ]; then - restart + if [ -f $LOCK ]; then + restart + fi + # update from older version + if [ -f $OLD_LOCK ]; then + restart fi ;; status) diff --git a/abrt.spec b/abrt.spec index 92c8311..99b47b6 100644 --- a/abrt.spec +++ b/abrt.spec @@ -4,12 +4,16 @@ Summary: Automatic bug detection and reporting tool Name: abrt Version: 1.0.8 -Release: 1%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: Applications/System URL: https://fedorahosted.org/abrt/ -Source: http://jmoskovc.fedorapeople.org/%{name}-%{version}.tar.gz +Source: https://fedorahosted.org/released/%{name}/%{name}-%{version}.tar.gz Source1: abrt.init +Patch1: remove_R2.patch +Patch2: abrt-1.0.8-oops.patch +Patch3: abrt-1.0.8-use-only-enabledrepos.patch +Patch4: abrt-1.0.8-debuginfoinstall-latest-yum.patch BuildRequires: dbus-devel BuildRequires: gtk2-devel BuildRequires: curl-devel @@ -216,6 +220,10 @@ Virtual package to make easy default installation on desktop environments. %prep %setup -q +%patch1 -b .~remove_R2 -p1 +%patch2 -b .~oops -p1 +%patch3 -b .~only-enabled -p1 +%patch4 -b .~latest-yum -p1 %build %configure @@ -409,6 +417,17 @@ fi %defattr(-,root,root,-) %changelog +* Sat Mar 13 2010 Jiri Moskovcak 1.0.8-3 +- fixed kerneloops reporting rhbz#570081 +- fixed Source url +- fixed debuginfo-install to work on F13 + - improved debuginfo-install (vda.linux@googlemail.com) + - fix debuginfo-install to work with yum >= 3.2.26 (jmoskovc@redhat.com) + +* Wed Mar 3 2010 Denys Vlasenko 1.0.8-2 +- fix initscript even more (npajkovs@redhat.com) +- remove -R2 from yum command line + * Mon Feb 22 2010 Jiri Moskovcak 1.0.8-1 - fix initscript (npajkovs@redhat.com) - Kerneloops: make hashing more likely to produce same hash on different oopses (vda.linux@googlemail.com) diff --git a/remove_R2.patch b/remove_R2.patch new file mode 100644 index 0000000..baf415b --- /dev/null +++ b/remove_R2.patch @@ -0,0 +1,28 @@ +commit 9d109b568bbbdee069bb5dfcbca3c259a74e98a8 +Author: Denys Vlasenko +Date: Wed Mar 3 11:45:33 2010 +0100 + + abrt-debuginfo-install: remove -R2 from yum! it's not "anti-yum-lock" option! + + Signed-off-by: Denys Vlasenko + +diff --git a/src/Daemon/abrt-debuginfo-install b/src/Daemon/abrt-debuginfo-install +index 3bb9c41..1b6af74 100755 +--- a/src/Daemon/abrt-debuginfo-install ++++ b/src/Daemon/abrt-debuginfo-install +@@ -146,11 +148,12 @@ print_package_names() { + # when we look for debuginfo we need only -debuginfo* repos, so we can disable the rest and thus make it faster + # also we want only fedora repositories, because abrt won't work for other packages anyway + # --showduplicates: do not just show the latest package +- # -R2: wait two minutes max (hopefully this prevents infinite hang on yum lock) +- local cmd="yum $yumopts '--disablerepo=*' '--enablerepo=fedora-debuginfo*' '--enablerepo=updates-debuginfo*' --showduplicates -R2 --quiet provides $missing_debuginfo_files" ++ # (tried to use -R2 to abort on stuck yum lock but -R is not about that) ++ local cmd="yum $yumopts '--disablerepo=*' '--enablerepo=fedora-debuginfo*' '--enablerepo=updates-debuginfo*' --showduplicates --quiet provides $missing_debuginfo_files" + echo "$cmd" >"yum_provides.$1.OUT" ++ $debug && echo "Running: $cmd" >&2 + # eval is needed to strip away ''s; cant remove them above and just use +- # $cmd, that would perform globbing on '*' ++ # unquoted $cmd, that would perform globbing on '*' + local yum_provides_OUT="`eval $cmd 2>&1`" + local err=$? + printf "%s\nyum exitcode:%s\n" "$yum_provides_OUT" $err >>"yum_provides.$1.OUT"