mongodb-vl.spec 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472
  1. %global daemon mongod
  2. %bcond_without v8
  3. Name: mongodb
  4. Version: 2.2.0
  5. Release: 1%{?_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. * Wed Oct 24 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 2.2.0-1
  214. - initial build for Vine Linux
  215. * Tue Oct 02 2012 Troy Dawson <tdawson@redhat.com> - 2.2.0-6
  216. - full flag patch to get 32 bit builds to work
  217. * Tue Oct 02 2012 Troy Dawson <tdawson@redhat.com> - 2.2.0-5
  218. - shared libraries patch
  219. - Fix up minor %files issues
  220. * Fri Sep 28 2012 Troy Dawson <tdawson@redhat.com> - 2.2.0-4
  221. - Fix spec files problems
  222. * Fri Sep 28 2012 Troy Dawson <tdawson@redhat.com> - 2.2.0-3
  223. - Updated patch to use system libraries
  224. - Update init script to use a pidfile
  225. * Thu Sep 27 2012 Troy Dawson <tdawson@redhat.com> - 2.2.0-2
  226. - Added patch to use system libraries
  227. * Wed Sep 19 2012 Troy Dawson <tdawson@redhat.com> - 2.2.0-1
  228. - Updated to 2.2.0
  229. - Updated patches that were still needed
  230. - use v8 instead of spider_monkey due to bundled library issues
  231. * Tue Aug 21 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.7-1
  232. - Update to 2.0.7
  233. - Don't patch for boost-filesystem version 3 on EL6
  234. * Mon Aug 13 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.6-3
  235. - Remove EL5 support
  236. - Add patch to use boost-filesystem version 3
  237. * Wed Aug 01 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.6-2
  238. - Don't apply fix-xtime patch on EL5
  239. * Wed Aug 01 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.6-1
  240. - Update to 2.0.6
  241. - Update no-term patch
  242. - Add fix-xtime patch for new boost
  243. * Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.4-2
  244. - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
  245. * Tue Apr 17 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.4-1
  246. - Update to 2.0.4
  247. - Remove oldpython patch (fixed upstream)
  248. - Remove snappy patch (fixed upstream)
  249. * Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.2-10
  250. - Rebuilt for c++ ABI breakage
  251. * Fri Feb 10 2012 Petr Pisar <ppisar@redhat.com> - 2.0.2-9
  252. - Rebuild against PCRE 8.30
  253. * Fri Feb 03 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.2-8
  254. - Disable HTTP interface by default (#752331)
  255. * Fri Feb 03 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.2-7
  256. - Enable journaling by default (#656112)
  257. - Remove BuildRequires on unittest (#755081)
  258. * Fri Feb 03 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.2-6
  259. - Clean up mongodb-src-r2.0.2-js.patch and fix #787246
  260. * Tue Jan 17 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.2-5
  261. - Enable build using external snappy
  262. * Tue Jan 17 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.2-4
  263. - Patch buildsystem for building on older pythons (RHEL5)
  264. * Mon Jan 16 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.2-3
  265. - Merge the 2.0.2 spec file with EPEL
  266. - Merge mongodb-sm-pkgconfig.patch into mongodb-src-r2.0.2-js.patch
  267. * Mon Jan 16 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.2-2
  268. - Add pkg-config enablement patch
  269. * Thu Jan 14 2012 Nathaniel McCallum <nathaniel@natemccallum.com> - 2.0.2-1
  270. - Update to 2.0.2
  271. - Add new files (mongotop and bsondump manpage)
  272. - Update mongodb-src-r1.8.2-js.patch => mongodb-src-r2.0.2-js.patch
  273. - Update mongodb-fix-fork.patch
  274. - Fix pcre linking
  275. * Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.2-11
  276. - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
  277. * Sun Nov 20 2011 Chris Lalancette <clalancette@gmail.com> - 1.8.2-10
  278. - Rebuild for rawhide boost update
  279. * Thu Sep 22 2011 Chris Lalancette <clalance@redhat.com> - 1.8.2-9
  280. - Copy the right source file into place for tmpfiles.d
  281. * Tue Sep 20 2011 Chris Lalancette <clalance@redhat.com> - 1.8.2-8
  282. - Add a tmpfiles.d file to create the /var/run/mongodb subdirectory
  283. * Mon Sep 12 2011 Chris Lalancette <clalance@redhat.com> - 1.8.2-7
  284. - Add a patch to fix the forking to play nice with systemd
  285. - Make the /var/run/mongodb directory owned by mongodb
  286. * Thu Jul 28 2011 Chris Lalancette <clalance@redhat.com> - 1.8.2-6
  287. - BZ 725601 - fix the javascript engine to not hang (thanks to Eduardo Habkost)
  288. * Mon Jul 25 2011 Chris Lalancette <clalance@redhat.com> - 1.8.2-5
  289. - Fixes to post server, preun server, and postun server to use systemd
  290. * Thu Jul 21 2011 Chris Lalancette <clalance@redhat.com> - 1.8.2-4
  291. - Update to use systemd init
  292. * Thu Jul 21 2011 Chris Lalancette <clalance@redhat.com> - 1.8.2-3
  293. - Rebuild for boost ABI break
  294. * Wed Jul 13 2011 Chris Lalancette <clalance@redhat.com> - 1.8.2-2
  295. - Make mongodb-devel require boost-devel (BZ 703184)
  296. * Fri Jul 01 2011 Chris Lalancette <clalance@redhat.com> - 1.8.2-1
  297. - Update to upstream 1.8.2
  298. - Add patch to ignore TERM
  299. * Fri Jul 01 2011 Chris Lalancette <clalance@redhat.com> - 1.8.0-3
  300. - Bump release to build against new boost package
  301. * Sat Mar 19 2011 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.8.0-2
  302. - Make mongod bind only to 127.0.0.1 by default
  303. * Sat Mar 19 2011 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.8.0-1
  304. - Update to 1.8.0
  305. - Remove upstreamed nonce patch
  306. * Wed Feb 16 2011 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.7.5-5
  307. - Add nonce patch
  308. * Sun Feb 13 2011 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.7.5-4
  309. - Manually define to use boost-fs v2
  310. * Sat Feb 12 2011 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.7.5-3
  311. - Disable extra warnings
  312. * Fri Feb 11 2011 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.7.5-2
  313. - Disable compilation errors on warnings
  314. * Fri Feb 11 2011 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.7.5-1
  315. - Update to 1.7.5
  316. - Remove CPPFLAGS override
  317. - Added libmongodb package
  318. * Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.4-4
  319. - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
  320. * Mon Dec 06 2010 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.6.4-3
  321. - Add post/postun ldconfig... oops!
  322. * Mon Dec 06 2010 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.6.4-2
  323. - Enable --sharedclient option, remove static lib
  324. * Sat Dec 04 2010 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.6.4-1
  325. - New upstream release
  326. * Fri Oct 08 2010 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.6.3-4
  327. - Put -fPIC onto both the build and install scons calls
  328. * Fri Oct 08 2010 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.6.3-3
  329. - Define _initddir when it doesn't exist for el5 and others
  330. * Fri Oct 08 2010 Nathaniel McCallum <nathaniel@natemccallum.com> - 1.6.3-2
  331. - Added -fPIC build option which was dropped by accident
  332. * Thu Oct 7 2010 Ionuț C. Arțăriși <mapleoin@fedoraproject.org> - 1.6.3-1
  333. - removed js Requires
  334. - new upstream release
  335. - added more excludearches: sparc s390, s390x and bugzilla pointer
  336. * Tue Sep 7 2010 Ionuț C. Arțăriși <mapleoin@fedoraproject.org> - 1.6.2-2
  337. - added ExcludeArch for ppc
  338. * Fri Sep 3 2010 Ionuț C. Arțăriși <mapleoin@fedoraproject.org> - 1.6.2-1
  339. - new upstream release 1.6.2
  340. - send mongod the USR1 signal when doing logrotate
  341. - use config options when starting the daemon from the initfile
  342. - removed dbpath patch: rely on config
  343. - added pid directory to config file and created the dir in the spec
  344. - made the init script use options from the config file
  345. - changed logpath in mongodb.conf
  346. * Wed Sep 1 2010 Ionuț C. Arțăriși <mapleoin@fedoraproject.org> - 1.6.1-1
  347. - new upstream release 1.6.1
  348. - patched SConstruct to allow setting cppflags
  349. - stopped using sed and chmod macros
  350. * Fri Aug 6 2010 Ionuț C. Arțăriși <mapleoin@fedoraproject.org> - 1.6.0-1
  351. - new upstream release: 1.6.0
  352. - added -server package
  353. - added new license file to %%docs
  354. - fix spurious permissions and EOF encodings on some files
  355. * Tue Jun 15 2010 Ionuț C. Arțăriși <mapleoin@fedoraproject.org> - 1.4.3-2
  356. - added explicit js requirement
  357. - changed some names
  358. * Wed May 26 2010 Ionuț C. Arțăriși <mapleoin@fedoraproject.org> - 1.4.3-1
  359. - updated to 1.4.3
  360. - added zlib license for util/md5
  361. - deleted upstream deb/rpm recipes
  362. - made scons not strip binaries
  363. - made naming more consistent in logfile, lockfiles, init scripts etc.
  364. - included manpages and added corresponding license
  365. - added mongodb.conf to sources
  366. * Fri Oct 2 2009 Ionuț Arțăriși <mapleoin@fedoraproject.org> - 1.0.0-3
  367. - fixed libpath issue for 64bit systems
  368. * Thu Oct 1 2009 Ionuț Arțăriși <mapleoin@fedoraproject.org> - 1.0.0-2
  369. - added virtual -static package
  370. * Mon Aug 31 2009 Ionuț Arțăriși <mapleoin@fedoraproject.org> - 1.0.0-1
  371. - Initial release.