fix permissions of ghc-doc-index and only run when root

cronjob no longer checks /etc/sysconfig/ghc-doc-index
This commit is contained in:
Jens Petersen 2012-11-21 16:55:59 +09:00
parent b94bbde71c
commit be3e3d6503
3 changed files with 16 additions and 11 deletions

5
ghc-doc-index Normal file → Executable file
View File

@ -10,6 +10,11 @@ if [ -f $LOCKFILE ]; then
exit 0 exit 0
fi fi
if [ "$(id -u)" != "0" ]; then
echo Need to be root!
exit 1
fi
trap "{ rm -f $LOCKFILE ; exit 255; }" EXIT trap "{ rm -f $LOCKFILE ; exit 255; }" EXIT
touch $LOCKFILE touch $LOCKFILE

View File

@ -1,13 +1,9 @@
#! /bin/bash #! /bin/bash
# updates the library documentation index after updates
if [ -e /etc/sysconfig/ghc-doc-index ]; then # This can be disabled by uninstalling ghc-doc-index
. /etc/sysconfig/ghc-doc-index # or adding ghc-doc-index to "./jobs-deny".
fi
if [ "$CRON" = "no" ]; then /usr/bin/ghc-doc-index
exit 0
fi
/usr/bin/ghc-doc-index >/dev/null
exit 0 exit 0

View File

@ -29,7 +29,7 @@ Version: 7.4.2
# - release can only be reset if all library versions get bumped simultaneously # - release can only be reset if all library versions get bumped simultaneously
# (eg for a major release) # (eg for a major release)
# - minor release numbers should be incremented monotonically # - minor release numbers should be incremented monotonically
Release: 8%{?dist} Release: 9%{?dist}
Summary: Glasgow Haskell Compiler Summary: Glasgow Haskell Compiler
# fedora ghc has been bootstrapped on # fedora ghc has been bootstrapped on
# %{ix86} x86_64 ppc alpha sparcv9 ppc64 armv7hl armv5tel s390 s390x # %{ix86} x86_64 ppc alpha sparcv9 ppc64 armv7hl armv5tel s390 s390x
@ -309,9 +309,9 @@ done
%if %{undefined without_haddock} %if %{undefined without_haddock}
mkdir -p %{buildroot}%{_sysconfdir}/cron.hourly mkdir -p %{buildroot}%{_sysconfdir}/cron.hourly
install -p --mode=755 %SOURCE3 %{buildroot}%{_sysconfdir}/cron.hourly/ghc-doc-index install -p --mode=0755 %SOURCE3 %{buildroot}%{_sysconfdir}/cron.hourly/ghc-doc-index
mkdir -p %{buildroot}%{_localstatedir}/lib/ghc mkdir -p %{buildroot}%{_localstatedir}/lib/ghc
install -p -m 0644 %SOURCE4 %{buildroot}%{_bindir}/ghc-doc-index install -p --mode=0755 %SOURCE4 %{buildroot}%{_bindir}/ghc-doc-index
%endif %endif
%check %check
@ -434,6 +434,10 @@ fi
%files libraries %files libraries
%changelog %changelog
* Wed Nov 21 2012 Jens Petersen <petersen@redhat.com> - 7.4.2-9
- fix permissions of ghc-doc-index and only run when root
- ghc-doc-index cronjob no longer looks at /etc/sysconfig/ghc-doc-index
* Sat Nov 17 2012 Jens Petersen <petersen@redhat.com> - 7.4.2-8 * Sat Nov 17 2012 Jens Petersen <petersen@redhat.com> - 7.4.2-8
- production 7.4.2 build - production 7.4.2 build
http://www.haskell.org/ghc/docs/7.4.2/html/users_guide/release-7-4-2.html http://www.haskell.org/ghc/docs/7.4.2/html/users_guide/release-7-4-2.html