source: projects/specs/trunk/m/mongodb/mongodb-vl.spec @ 11404

Revision 11404, 15.7 KB checked in by ara_t, 6 years ago (diff)

mongodb: rebuild with libboost-1.66.0

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