mongodb-vl.spec 16 KB

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