]> git.pld-linux.org Git - packages/thunderbird.git/commitdiff
- create compreg.dat, xpti.dat on install
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 23 Sep 2010 10:30:11 +0000 (10:30 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- remove similar files from profile on upgrades (needed especially major upgrade 3.0 -> 3.1) to fix "silent" start failure
- rel 2

Changed files:
    icedove.sh -> 1.9
    icedove.spec -> 1.103

icedove.sh
icedove.spec

index 2c02dec3693bc9b2fd71743a3ff0cc7cb33ce9dc..f7f4ef6005ef8448088abff1568865cbfd525583 100644 (file)
@@ -11,11 +11,12 @@ if [ ! -d $HOME/.icedove ] && [ -d $HOME/.thunderbird ]; then
 fi
 
 # compreg.dat and/or chrome.rdf will screw things up if it's from an
-# older version.  http://bugs.gentoo.org/show_bug.cgi?id=63999
+# older version. http://bugs.gentoo.org/show_bug.cgi?id=63999
 for f in ~/.icedove/*/{compreg.dat,chrome.rdf,XUL.mfasl}; do
-       if [[ -f ${f} && ${f} -ot "$0" ]]; then
-               echo "Removing ${f} leftover from older Icedove"
-               rm -f "${f}"
+       [ -f "$f" ] || continue
+       if [ "$f" -ot "$0" ] || [ "$f" -ot "$LIBDIR/components/compreg.dat" ]; then
+               echo "Removing $f leftover from older Icedove"
+               rm -f "$f"
        fi
 done
 
index caea23bc5cae8101989e13371d31b8921341b2a6..876711dabdefe6a53d6b55170b3e83ee920cd053 100644 (file)
@@ -33,7 +33,7 @@ Summary:      Icedove - email client
 Summary(pl.UTF-8):     Icedove - klient poczty
 Name:          icedove
 Version:       3.1.3
-Release:       1
+Release:       2
 License:       MPL 1.1 or GPL v2+ or LGPL v2.1+
 Group:         X11/Applications/Networking
 Source0:       http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/%{version}/source/thunderbird-%{version}.source.tar.bz2
@@ -377,9 +377,21 @@ ln -s %{name} $RPM_BUILD_ROOT%{_bindir}/mozilla-thunderbird
 cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
 cp -a %{topdir}/mozilla/icedove/branding/content/icon64.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
 
-# files created by regxpcom -register
+# files created by regxpcom -register in post
 touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/compreg.dat
 touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/xpti.dat
+cat << 'EOF' > $RPM_BUILD_ROOT%{_libdir}/%{name}/register
+#!/bin/sh
+umask 022
+# make temporary HOME, as it attempts to touch files in $HOME/.mozilla
+# dangerous if you run this with sudo with keep_env += HOME
+# also TMPDIR could be pointing to sudo user's homedir so we reset that too.
+t=$(mktemp -d)
+rm -f %{_libdir}/%{name}/components/{compreg,xpti}.dat
+TMPDIR= TMP= HOME=$t %{_libdir}/%{name}/icedove -register
+rm -rf $t
+EOF
+chmod a+rx $RPM_BUILD_ROOT%{_libdir}/%{name}/register
 
 %if %{with enigmail}
 ext_dir=$RPM_BUILD_ROOT%{_libdir}/%{name}/extensions/\{847b3a00-7ab1-11d4-8f02-006008948af5\}
@@ -425,6 +437,9 @@ for d in chrome defaults greprefs icons isp modules res; do
 done
 exit 0
 
+%post
+%{_libdir}/%{name}/register || :
+
 %files
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/icedove
@@ -444,6 +459,7 @@ exit 0
 %attr(755,root,root) %{_libdir}/%{name}/*-bin
 %attr(755,root,root) %{_libdir}/%{name}/mozilla-xremote-client
 %attr(755,root,root) %{_libdir}/%{name}/icedove
+%attr(755,root,root) %{_libdir}/%{name}/register
 
 # symlinks
 %{_libdir}/%{name}/chrome
This page took 2.77034 seconds and 4 git commands to generate.