[eclipse] Don't use tmpfs for run-reconciler file.
swagiaal
swagiaal at fedoraproject.org
Thu Jan 19 18:59:26 UTC 2012
commit 42e97c9d9cb19bc772dfde843b2b761ee09fbb0d
Author: Sami Wagiaalla <swagiaal at redhat.com>
Date: Tue Dec 20 14:06:27 2011 -0500
Don't use tmpfs for run-reconciler file.
* Tue Dec 20 2011 Sami Wagiaalla <swagiaal at redhat.com> 1:3.7.1-10
- Use rpm-state/eclipse for run-reconciler file instead of /var/run.
- Delete eclipse-tmpfiles.conf.
eclipse-reconciler.sh | 6 ++++--
eclipse-tmpfiles.conf | 1 -
eclipse.spec | 30 ++++++++++++++----------------
macros.eclipse | 4 ++--
4 files changed, 20 insertions(+), 21 deletions(-)
---
diff --git a/eclipse-reconciler.sh b/eclipse-reconciler.sh
index af76908..c1a51ca 100755
--- a/eclipse-reconciler.sh
+++ b/eclipse-reconciler.sh
@@ -9,6 +9,8 @@
# A list of the files of directory that are to be backed up
config_files=("artifacts.xml" "eclipse.ini" "p2" "configuration")
+run_reconciler=/var/lib/rpm-state/eclipse/run-reconciler
+
# If the reconciler was run with the -clean options rerun the initializer.
if [[ "$@" == *-clean* ]]
then
@@ -16,7 +18,7 @@ then
exit 0;
fi
-if [ ! -e /var/run/eclipse/run-reconciler ] && [[ "$@" != *-Dosgi.checkConfiguration=true* ]]
+if [ ! -e $run_reconciler ] && [[ "$@" != *-Dosgi.checkConfiguration=true* ]]
then
echo "run-reconciler file not present. No need to run the reconciler"
exit 0
@@ -33,7 +35,7 @@ else
fi
echo "Removing run-reconciler file"
-rm -f /var/run/eclipse/run-reconciler
+rm -f $run_reconciler
# if we are running the reconciler with -Dosgi.checkConfiguration=true
# probably doing an upgrade remove time stamp file(s).
diff --git a/eclipse.spec b/eclipse.spec
index 4185251..3dba591 100644
--- a/eclipse.spec
+++ b/eclipse.spec
@@ -17,14 +17,13 @@ Epoch: 1
Summary: An open, extensible IDE
Name: eclipse
Version: %{eclipse_majmin}.%{eclipse_micro}
-Release: 14%{?dist}
+Release: 15%{?dist}
License: EPL
Group: Text Editors/Integrated Development Environments (IDE)
URL: http://www.eclipse.org/
Source0: %{download_url}eclipse-build-%{eb_sha1}.tar.xz
Source1: %{download_url}eclipse-3.7.1-src.tar.bz2
Source2: eclipse-reconciler.sh
-Source3: %{name}-tmpfiles.conf
Source4: macros.%{name}
Source5: http://repo1.maven.org/maven2/org/eclipse/osgi/org.eclipse.osgi/3.6.0.v20100517/org.eclipse.osgi-3.6.0.v20100517.pom
# Fetched from http://repo1.maven.org/maven2/org/eclipse/osgi/org.eclipse.osgi.services/3.2.100.v20100503/org.eclipse.osgi.services-3.2.100.v20100503.pom
@@ -306,13 +305,9 @@ PDEBUILDVERSION=$(ls $RPM_BUILD_ROOT%{_libdir}/%{name}/dropins/sdk/plugins \
sed -i "s/@PDEBUILDVERSION@/$PDEBUILDVERSION/g" \
$RPM_BUILD_ROOT%{_libdir}/%{name}/buildscripts/pdebuild
-# Install tmpfs file
-mkdir -p %{buildroot}%{_sysconfdir}/tmpfiles.d/
-install -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/tmpfiles.d/%{name}.conf
-
-# Install tmpfs dir
-mkdir -p %{buildroot}%{_localstatedir}/run/
-install -d -m 0710 %{buildroot}%{_localstatedir}/run/%{name}/
+# Install temporary directory file
+mkdir -p %{buildroot}%{_localstatedir}/lib/rpm-state/%{name}
+install -d -m 0710 %{buildroot}%{_localstatedir}/run/%{name}
# Install eclipse macros file
mkdir $RPM_BUILD_ROOT%{_sysconfdir}/rpm/
@@ -377,10 +372,10 @@ fi
# this point, and there is no need to.
%post jdt
-touch /var/run/eclipse/run-reconciler
+touch /var/lib/rpm-state/eclipse/run-reconciler
%postun jdt
-touch /var/run/eclipse/run-reconciler
+touch /var/lib/rpm-state/eclipse/run-reconciler
if [ $1 == 0 ]; then
eclipse-reconciler.sh > /dev/null
@@ -390,10 +385,10 @@ fi
eclipse-reconciler.sh > /dev/null
%post pde
-touch /var/run/eclipse/run-reconciler
+touch /var/lib/rpm-state/eclipse/run-reconciler
%postun pde
-touch /var/run/eclipse/run-reconciler
+touch /var/lib/rpm-state/eclipse/run-reconciler
if [ $1 == 0 ]; then
eclipse-reconciler.sh > /dev/null
@@ -485,8 +480,8 @@ rm -rf %{_bindir}/efj/
%{_libdir}/%{name}/about_files
%endif
%{_sysconfdir}/rpm/macros.%{name}
-%dir %{_localstatedir}/run/%{name}/
-%config(noreplace) %{_sysconfdir}/tmpfiles.d/%{name}.conf
+%dir %{_localstatedir}/lib/rpm-state
+%dir %{_localstatedir}/lib/rpm-state/%{name}
%{_datadir}/applications/*
%{_datadir}/pixmaps/*
%{_datadir}/icons/*/*/apps/*
@@ -646,7 +641,10 @@ rm -rf %{_bindir}/efj/
%{_libdir}/%{name}/buildscripts
%{_libdir}/%{name}/dropins/sdk
-%changelog
+%changelog* Tue Jan 19 2012 Sami Wagiaalla <swagiaal at redhat.com> 1:3.7.1-15
+- Use rpm-state/eclipse for run-reconciler file instead of /var/run.
+- Delete eclipse-tmpfiles.conf.
+
* Mon Jan 19 2012 Sami Wagiaalla <swagiaal at redhat.com> 1:3.7.1-14
- Remove _eclipse_pkg macro.
- Use mktemp for creating a backup directory in eclipse-reconciler.sh
diff --git a/macros.eclipse b/macros.eclipse
index f685337..ccb2563 100644
--- a/macros.eclipse
+++ b/macros.eclipse
@@ -2,10 +2,10 @@
#
%_eclipse_pkg_post \
-touch /var/run/eclipse/run-reconciler
+touch /var/lib/rpm-state/eclipse/run-reconciler
%_eclipse_pkg_postun \
-touch /var/run/eclipse/run-reconciler \
+touch /var/lib/rpm-state/eclipse/run-reconciler \
\
if [ $1 == 0 ]; then \
eclipse-reconciler.sh > /dev/null \
More information about the scm-commits
mailing list