mongodb-vl.spec 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475
  1. %global daemon mongod
  2. %bcond_without v8
  3. Name: mongodb
  4. Version: 2.2.0
  5. Release: 2%{?_dist_release}
  6. Summary: High-performance, schema-free document-oriented database
  7. Summary(ja): 高性能なスキーマ不要のドキュメント指向データベース
  8. Group: Applications/Databases
  9. License: AGPLv3 and zlib and ASL 2.0
  10. # util/md5 is under the zlib license
  11. # manpages and bson are under ASL 2.0
  12. # everything else is AGPLv3
  13. URL: http://www.mongodb.org
  14. Source0: http://fastdl.mongodb.org/src/%{name}-src-r%{version}.tar.gz
  15. Source1: %{name}.init
  16. Source2: %{name}.logrotate
  17. Source3: %{name}.conf
  18. Source4: %{daemon}.sysconf
  19. Source5: %{name}-tmpfile
  20. Source6: %{daemon}.service
  21. Patch1: mongodb-2.2.0-no-term.patch
  22. ##Patch 4 - not really needed because of v8
  23. ##Patch 4 - https://github.com/mongodb/mongo/pull/160
  24. Patch4: mongodb-2.2.0-js.patch
  25. ##Patch 5 - https://jira.mongodb.org/browse/SERVER-6686
  26. Patch5: mongodb-2.2.0-fix-xtime.patch
  27. ##Patch 6 - https://jira.mongodb.org/browse/SERVER-4314
  28. Patch6: mongodb-2.2.0-boost-filesystem3.patch
  29. ##Patch 7 - make it possible to use system libraries
  30. Patch7: mongodb-2.2.0-use-system-version.patch
  31. ##Patch 8 - make it possible to build shared libraries
  32. Patch8: mongodb-2.2.0-shared-library.patch
  33. ##Patch 9 - https://jira.mongodb.org/browse/SERVER-5575
  34. Patch9: mongodb-2.2.0-full-flag.patch
  35. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  36. BuildRequires: python-devel
  37. BuildRequires: scons
  38. BuildRequires: libboost-devel
  39. BuildRequires: libboost-thread
  40. BuildRequires: libboost-program-options
  41. BuildRequires: libboost-filesystem
  42. BuildRequires: libboost-iostreams
  43. BuildRequires: pcre-devel
  44. %if %{with v8}
  45. BuildRequires: v8-devel
  46. %else
  47. BuildRequires: js-devel
  48. %endif
  49. BuildRequires: readline-devel
  50. BuildRequires: libpcap-devel
  51. BuildRequires: snappy-devel
  52. BuildRequires: gperftools-devel
  53. Requires(post): chkconfig
  54. Requires(preun): chkconfig
  55. Requires(pre): shadow-utils
  56. Requires(postun): initscripts
  57. Requires: lib%{name} = %{version}-%{release}
  58. # Mongodb must run on a little-endian CPU (see bug #630898)
  59. ExcludeArch: ppc ppc64 %{sparc} s390 s390x
  60. %description
  61. Mongo (from "humongous") is a high-performance, open source, schema-free
  62. document-oriented database. MongoDB is written in C++ and offers the following
  63. features:
  64. * Collection oriented storage: easy storage of object/JSON-style data
  65. * Dynamic queries
  66. * Full index support, including on inner objects and embedded arrays
  67. * Query profiling
  68. * Replication and fail-over support
  69. * Efficient storage of binary data including large objects (e.g. photos
  70. and videos)
  71. * Auto-sharding for cloud-level scalability (currently in early alpha)
  72. * Commercial Support Available
  73. A key goal of MongoDB is to bridge the gap between key/value stores (which are
  74. fast and highly scalable) and traditional RDBMS systems (which are deep in
  75. functionality).
  76. %package -n lib%{name}
  77. Summary: MongoDB shared libraries
  78. Summary(ja): MongoDB shared libraries
  79. Group: Development/Libraries
  80. %description -n lib%{name}
  81. This package provides the shared library for the MongoDB client.
  82. %package devel
  83. Summary: MongoDB header files
  84. Summary(ja): MongoDB header files
  85. Group: Development/Libraries
  86. Requires: lib%{name} = %{version}-%{release}
  87. Requires: libboost-devel
  88. %description devel
  89. This package provides the header files and C++ driver for MongoDB. MongoDB is
  90. a high-performance, open source, schema-free document-oriented database.
  91. %package server
  92. Summary: MongoDB server, sharding server and support scripts
  93. Summary(ja): MongoDB server, sharding server and support scripts
  94. Group: Applications/Databases
  95. Requires: %{name} = %{version}-%{release}
  96. %description server
  97. This package provides the mongo server software, mongo sharding server
  98. software, default configuration files, and init scripts.
  99. %prep
  100. %setup -q -n mongodb-src-r%{version}
  101. %patch1 -p1
  102. %patch4 -p1
  103. %patch5 -p1
  104. %patch6 -p1
  105. %patch7 -p1
  106. %patch8 -p1
  107. %ifarch %ix86
  108. %patch9 -p1
  109. %endif
  110. # spurious permissions
  111. chmod -x README
  112. # wrong end-of-file encoding
  113. sed -i 's/\r//' README
  114. %build
  115. scons %{?_smp_mflags} --sharedclient \
  116. --use-system-all \
  117. --prefix=%{buildroot}%{_prefix} \
  118. --extrapath=%{_prefix} \
  119. %if %{with v8}
  120. --usev8
  121. %endif
  122. %install
  123. rm -rf %{buildroot}
  124. scons install \
  125. --sharedclient \
  126. --use-system-all \
  127. --prefix=%{buildroot}%{_prefix} \
  128. --extrapath=%{_prefix} \
  129. %if %{with v8}
  130. --usev8 \
  131. %endif
  132. --nostrip \
  133. --full
  134. rm -f %{buildroot}%{_libdir}/libmongoclient.a
  135. rm -f %{buildroot}/usr/lib/libmongoclient.a
  136. mkdir -p %{buildroot}%{_var}/lib/%{name}
  137. mkdir -p %{buildroot}%{_localstatedir}/log/%{name}
  138. mkdir -p %{buildroot}%{_localstatedir}/run/%{name}
  139. mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
  140. install -p -D -m 755 %{SOURCE1} %{buildroot}%{_initddir}/%{daemon}
  141. install -p -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
  142. install -p -D -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/mongodb.conf
  143. install -p -D -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/%{daemon}
  144. mkdir -p %{buildroot}%{_mandir}/man1
  145. cp -p debian/*.1 %{buildroot}%{_mandir}/man1/
  146. mkdir -p %{buildroot}%{_localstatedir}/run/%{name}
  147. %clean
  148. rm -rf %{buildroot}
  149. %post -p /sbin/ldconfig
  150. %postun -p /sbin/ldconfig
  151. %pre server
  152. getent group %{name} >/dev/null || groupadd -r %{name}
  153. getent passwd %{name} >/dev/null || \
  154. useradd -r -g %{name} -d %{_var}/lib/%{name} -s /sbin/nologin \
  155. -c "MongoDB Database Server" %{name}
  156. exit 0
  157. %post server
  158. /sbin/chkconfig --add %{daemon}
  159. %preun server
  160. if [ $1 = 0 ] ; then
  161. /sbin/service stop >/dev/null 2>&1
  162. /sbin/chkconfig --del %{daemon}
  163. fi
  164. %postun server
  165. if [ "$1" -ge "1" ] ; then
  166. /sbin/service %{daemon} condrestart >/dev/null 2>&1 || :
  167. fi
  168. %files
  169. %defattr(-,root,root,-)
  170. %{_bindir}/bsondump
  171. %{_bindir}/mongo
  172. %{_bindir}/mongodump
  173. %{_bindir}/mongoexport
  174. %{_bindir}/mongofiles
  175. %{_bindir}/mongoimport
  176. %{_bindir}/mongooplog
  177. %{_bindir}/mongoperf
  178. %{_bindir}/mongorestore
  179. %{_bindir}/mongostat
  180. %{_bindir}/mongosniff
  181. %{_bindir}/mongotop
  182. %{_mandir}/man1/mongo.1*
  183. %{_mandir}/man1/mongod.1*
  184. %{_mandir}/man1/mongodump.1*
  185. %{_mandir}/man1/mongoexport.1*
  186. %{_mandir}/man1/mongofiles.1*
  187. %{_mandir}/man1/mongoimport.1*
  188. %{_mandir}/man1/mongosniff.1*
  189. %{_mandir}/man1/mongostat.1*
  190. %{_mandir}/man1/mongorestore.1*
  191. %{_mandir}/man1/bsondump.1*
  192. %files -n lib%{name}
  193. %defattr(-,root,root,-)
  194. %doc README GNU-AGPL-3.0.txt APACHE-2.0.txt
  195. %{_libdir}/libmongoclient.so
  196. %files server
  197. %defattr(-,root,root,-)
  198. %{_bindir}/mongod
  199. %{_bindir}/mongos
  200. %{_mandir}/man1/mongod.1*
  201. %{_mandir}/man1/mongos.1*
  202. %dir %attr(0755, %{name}, root) %{_localstatedir}/log/%{name}
  203. %dir %attr(0755, %{name}, root) %{_localstatedir}/run/%{name}
  204. %dir %attr(0755, %{name}, root) %{_localstatedir}/lib/%{name}
  205. %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
  206. %config(noreplace) %{_sysconfdir}/mongodb.conf
  207. %config(noreplace) %{_sysconfdir}/sysconfig/%{daemon}
  208. %{_initddir}/%{daemon}
  209. %files devel
  210. %defattr(-,root,root,-)
  211. %{_includedir}
  212. %changelog
  213. * Mon Dec 09 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.2.0-2
  214. - rebuild with libboost-1.54.0
  215. * Wed Oct 24 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 2.2.0-1
  216. - initial build for Vine Linux
  217. * Tue Oct 02 2012 Troy Dawson <tdawson@redhat.com> - 2.2.0-6
  218. - full flag patch to get 32 bit builds to work
  219. * Tue Oct 02 2012 Troy Dawson <tdawson@redhat.com> - 2.2.0-5
  220. - shared libraries patch
  221. - Fix up minor %files issues
  222. * Fri Sep 28 2012 Troy Dawson <tdawson@redhat.com> - 2.2.0-4
  223. - Fix spec files problems
  224. * Fri Sep 28 2012 Troy Dawson <tdawson@redhat.com> - 2.2.0-3
  225. - Updated patch to use system libraries
  226. - Update init script to use a pidfile
  227. * Thu Sep 27 2012 Troy Dawson <tdawson@redhat.com> - 2.2.0-2
  228. - Added patch to use system libraries
  229. * Wed Sep 19 2012 Troy Dawson <tdawson@redhat.com> - 2.2.0-1
  230. - Updated to 2.2.0
  231. - Updated patches that were still needed
  232. - use v8 instead of spider_monkey due to bundled library issues
  233. * Tue Aug 21 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.7-1
  234. - Update to 2.0.7
  235. - Don't patch for boost-filesystem version 3 on EL6
  236. * Mon Aug 13 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.6-3
  237. - Remove EL5 support
  238. - Add patch to use boost-filesystem version 3
  239. * Wed Aug 01 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.6-2
  240. - Don't apply fix-xtime patch on EL5
  241. * Wed Aug 01 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.6-1
  242. - Update to 2.0.6
  243. - Update no-term patch
  244. - Add fix-xtime patch for new boost
  245. * Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.4-2
  246. - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
  247. * Tue Apr 17 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.4-1
  248. - Update to 2.0.4
  249. - Remove oldpython patch (fixed upstream)
  250. - Remove snappy patch (fixed upstream)
  251. * Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.2-10
  252. - Rebuilt for c++ ABI breakage
  253. * Fri Feb 10 2012 Petr Pisar <ppisar@redhat.com> - 2.0.2-9
  254. - Rebuild against PCRE 8.30
  255. * Fri Feb 03 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.2-8
  256. - Disable HTTP interface by default (#752331)
  257. * Fri Feb 03 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.2-7
  258. - Enable journaling by default (#656112)
  259. - Remove BuildRequires on unittest (#755081)
  260. * Fri Feb 03 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.2-6
  261. - Clean up mongodb-src-r2.0.2-js.patch and fix #787246
  262. * Tue Jan 17 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.2-5
  263. - Enable build using external snappy
  264. * Tue Jan 17 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.2-4
  265. - Patch buildsystem for building on older pythons (RHEL5)
  266. * Mon Jan 16 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.2-3
  267. - Merge the 2.0.2 spec file with EPEL
  268. - Merge mongodb-sm-pkgconfig.patch into mongodb-src-r2.0.2-js.patch
  269. * Mon Jan 16 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.2-2
  270. - Add pkg-config enablement patch
  271. * Sat Jan 14 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.2-1
  272. - Update to 2.0.2
  273. - Add new files (mongotop and bsondump manpage)
  274. - Update mongodb-src-r1.8.2-js.patch => mongodb-src-r2.0.2-js.patch
  275. - Update mongodb-fix-fork.patch
  276. - Fix pcre linking
  277. * Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.2-11
  278. - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
  279. * Sun Nov 20 2011 Chris Lalancette <clalancette@gmail.com> - 1.8.2-10
  280. - Rebuild for rawhide boost update
  281. * Thu Sep 22 2011 Chris Lalancette <clalance@redhat.com> - 1.8.2-9
  282. - Copy the right source file into place for tmpfiles.d
  283. * Tue Sep 20 2011 Chris Lalancette <clalance@redhat.com> - 1.8.2-8
  284. - Add a tmpfiles.d file to create the /var/run/mongodb subdirectory
  285. * Mon Sep 12 2011 Chris Lalancette <clalance@redhat.com> - 1.8.2-7
  286. - Add a patch to fix the forking to play nice with systemd
  287. - Make the /var/run/mongodb directory owned by mongodb
  288. * Thu Jul 28 2011 Chris Lalancette <clalance@redhat.com> - 1.8.2-6
  289. - BZ 725601 - fix the javascript engine to not hang (thanks to Eduardo Habkost)
  290. * Mon Jul 25 2011 Chris Lalancette <clalance@redhat.com> - 1.8.2-5
  291. - Fixes to post server, preun server, and postun server to use systemd
  292. * Thu Jul 21 2011 Chris Lalancette <clalance@redhat.com> - 1.8.2-4
  293. - Update to use systemd init
  294. * Thu Jul 21 2011 Chris Lalancette <clalance@redhat.com> - 1.8.2-3
  295. - Rebuild for boost ABI break
  296. * Wed Jul 13 2011 Chris Lalancette <clalance@redhat.com> - 1.8.2-2
  297. - Make mongodb-devel require boost-devel (BZ 703184)
  298. * Fri Jul 01 2011 Chris Lalancette <clalance@redhat.com> - 1.8.2-1
  299. - Update to upstream 1.8.2
  300. - Add patch to ignore TERM
  301. * Fri Jul 01 2011 Chris Lalancette <clalance@redhat.com> - 1.8.0-3
  302. - Bump release to build against new boost package
  303. * Sat Mar 19 2011 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.8.0-2
  304. - Make mongod bind only to 127.0.0.1 by default
  305. * Sat Mar 19 2011 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.8.0-1
  306. - Update to 1.8.0
  307. - Remove upstreamed nonce patch
  308. * Wed Feb 16 2011 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.7.5-5
  309. - Add nonce patch
  310. * Sun Feb 13 2011 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.7.5-4
  311. - Manually define to use boost-fs v2
  312. * Sat Feb 12 2011 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.7.5-3
  313. - Disable extra warnings
  314. * Fri Feb 11 2011 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.7.5-2
  315. - Disable compilation errors on warnings
  316. * Fri Feb 11 2011 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.7.5-1
  317. - Update to 1.7.5
  318. - Remove CPPFLAGS override
  319. - Added libmongodb package
  320. * Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.4-4
  321. - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
  322. * Mon Dec 06 2010 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.6.4-3
  323. - Add post/postun ldconfig... oops!
  324. * Mon Dec 06 2010 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.6.4-2
  325. - Enable --sharedclient option, remove static lib
  326. * Sat Dec 04 2010 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.6.4-1
  327. - New upstream release
  328. * Fri Oct 08 2010 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.6.3-4
  329. - Put -fPIC onto both the build and install scons calls
  330. * Fri Oct 08 2010 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.6.3-3
  331. - Define _initddir when it doesn't exist for el5 and others
  332. * Fri Oct 08 2010 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.6.3-2
  333. - Added -fPIC build option which was dropped by accident
  334. * Thu Oct 7 2010 Ionuț C. Arțăriși <mapleoin@fedoraproject.org> - 1.6.3-1
  335. - removed js Requires
  336. - new upstream release
  337. - added more excludearches: sparc s390, s390x and bugzilla pointer
  338. * Tue Sep 7 2010 Ionuț C. Arțăriși <mapleoin@fedoraproject.org> - 1.6.2-2
  339. - added ExcludeArch for ppc
  340. * Fri Sep 3 2010 Ionuț C. Arțăriși <mapleoin@fedoraproject.org> - 1.6.2-1
  341. - new upstream release 1.6.2
  342. - send mongod the USR1 signal when doing logrotate
  343. - use config options when starting the daemon from the initfile
  344. - removed dbpath patch: rely on config
  345. - added pid directory to config file and created the dir in the spec
  346. - made the init script use options from the config file
  347. - changed logpath in mongodb.conf
  348. * Wed Sep 1 2010 Ionuț C. Arțăriși <mapleoin@fedoraproject.org> - 1.6.1-1
  349. - new upstream release 1.6.1
  350. - patched SConstruct to allow setting cppflags
  351. - stopped using sed and chmod macros
  352. * Fri Aug 6 2010 Ionuț C. Arțăriși <mapleoin@fedoraproject.org> - 1.6.0-1
  353. - new upstream release: 1.6.0
  354. - added -server package
  355. - added new license file to %%docs
  356. - fix spurious permissions and EOF encodings on some files
  357. * Tue Jun 15 2010 Ionuț C. Arțăriși <mapleoin@fedoraproject.org> - 1.4.3-2
  358. - added explicit js requirement
  359. - changed some names
  360. * Wed May 26 2010 Ionuț C. Arțăriși <mapleoin@fedoraproject.org> - 1.4.3-1
  361. - updated to 1.4.3
  362. - added zlib license for util/md5
  363. - deleted upstream deb/rpm recipes
  364. - made scons not strip binaries
  365. - made naming more consistent in logfile, lockfiles, init scripts etc.
  366. - included manpages and added corresponding license
  367. - added mongodb.conf to sources
  368. * Fri Oct 2 2009 Ionuț Arțăriși <mapleoin@fedoraproject.org> - 1.0.0-3
  369. - fixed libpath issue for 64bit systems
  370. * Thu Oct 1 2009 Ionuț Arțăriși <mapleoin@fedoraproject.org> - 1.0.0-2
  371. - added virtual -static package
  372. * Mon Aug 31 2009 Ionuț Arțăriși <mapleoin@fedoraproject.org> - 1.0.0-1
  373. - Initial release.