[mongodb/f16] Add a mongodb.conf file to /usr/lib/tmpfiles.d

Chris Lalancette clalance at fedoraproject.org
Tue Sep 20 16:40:06 UTC 2011


commit 4f2f578e0a0f155315e0fde5d3c0b806d76e8dbc
Author: Chris Lalancette <clalance at redhat.com>
Date:   Tue Sep 20 12:39:46 2011 -0400

    Add a mongodb.conf file to /usr/lib/tmpfiles.d
    
    Signed-off-by: Chris Lalancette <clalance at redhat.com>

 mongodb-tmpfile |    3 +++
 mongodb.spec    |    8 +++++++-
 2 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/mongodb-tmpfile b/mongodb-tmpfile
new file mode 100644
index 0000000..634b44e
--- /dev/null
+++ b/mongodb-tmpfile
@@ -0,0 +1,3 @@
+# make sure the mongodb dir is owned by mongodb so the process running as
+# mongodb can write the pid there
+d /run/mongodb 0755 mongodb root -
diff --git a/mongodb.spec b/mongodb.spec
index 07eab57..4e032a6 100644
--- a/mongodb.spec
+++ b/mongodb.spec
@@ -1,7 +1,7 @@
 %global         daemon mongod
 Name:           mongodb
 Version:        1.8.2
-Release:        7%{?dist}
+Release:        8%{?dist}
 Summary:        High-performance, schema-free document-oriented database
 Group:          Applications/Databases
 License:        AGPLv3 and zlib and ASL 2.0
@@ -15,6 +15,7 @@ Source1:        %{daemon}.service
 Source2:        %{daemon}.sysconf
 Source3:        %{name}.logrotate
 Source4:        %{name}.conf
+Source5:        %{name}-tmpfile
 Patch1:         mongodb-no-term.patch
 Patch2:         mongodb-src-r1.8.2-js.patch
 Patch3:         mongodb-fix-fork.patch
@@ -132,6 +133,7 @@ install -p -D -m 644 %{SOURCE1} %{buildroot}/lib/systemd/system/%{daemon}.servic
 install -p -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/%{daemon}
 install -p -D -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
 install -p -D -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/mongodb.conf
+install -p -D -m 644 %{SOURCE4} %{buildroot}%{_libdir}/../lib/tmpfiles.d/mongodb.conf
 
 mkdir -p %{buildroot}%{_mandir}/man1
 cp -p debian/*.1 %{buildroot}%{_mandir}/man1/
@@ -202,11 +204,15 @@ fi
 %config(noreplace) %{_sysconfdir}/mongodb.conf
 %config(noreplace) %{_sysconfdir}/sysconfig/%{daemon}
 /lib/systemd/system/*.service
+%{_libdir}/../lib/tmpfiles.d/mongodb.conf
 
 %files devel
 %{_includedir}/mongo
 
 %changelog
+* Tue Sep 20 2011 Chris Lalancette <clalance at redhat.com> - 1.8.2-8
+- Add a tmpfiles.d file to create the /var/run/mongodb subdirectory
+
 * Mon Sep 12 2011 Chris Lalancette <clalance at redhat.com> - 1.8.2-7
 - Add a patch to fix the forking to play nice with systemd
 - Make the /var/run/mongodb directory owned by mongodb


More information about the scm-commits mailing list