-
Notifications
You must be signed in to change notification settings - Fork 2
/
MonetDB.spec
5158 lines (4431 loc) · 234 KB
/
MonetDB.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
%global name MonetDB
%global version 11.33.11
%{!?buildno: %global buildno %(date +%Y%m%d)}
# Use bcond_with to add a --with option; i.e., "without" is default.
# Use bcond_without to add a --without option; i.e., "with" is default.
# The --with OPTION and --without OPTION arguments can be passed on
# the commandline of both rpmbuild and mock.
# On 64 bit architectures we build "hugeint" packages.
%if "%{?_lib}" == "lib64"
%bcond_without hugeint
%endif
%global release %{buildno}%{?dist}
# This package contains monetdbd which is a (long running) daemon, so
# we need to harden:
%global _hardened_build 1
# On RedHat Enterprise Linux and derivatives, if the Extra Packages
# for Enterprise Linux (EPEL) repository is available, you can enable
# its use by providing rpmbuild or mock with the "--with epel" option.
# If the EPEL repository is availabe, or if building for Fedora, most
# optional sub packages can be built. We indicate that here by
# setting the macro fedpkgs to 1. If the EPEL repository is not
# available and we are not building for Fedora, we set fedpkgs to 0.
%if %{?rhel:1}%{!?rhel:0}
# RedHat Enterprise Linux (or CentOS or Scientific Linux)
%bcond_with epel
%if %{with epel}
# EPEL is enabled through the command line
%global fedpkgs 1
%else
# EPEL is not enabled
%global fedpkgs 0
%endif
%else
# Not RHEL (so presumably Fedora)
%global fedpkgs 1
%endif
# On Fedora, the geos library is available, and so we can require it
# and build the geom modules. On RedHat Enterprise Linux and
# derivatives (CentOS, Scientific Linux), the geos library is not
# available. However, the geos library is available in the Extra
# Packages for Enterprise Linux (EPEL). However, On RHEL 6, the geos
# library is too old for us, so we need an extra check for an
# up-to-date version of RHEL.
%if %{fedpkgs}
%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7
# By default create the MonetDB-geom-MonetDB5 package on Fedora and RHEL 7
%bcond_without geos
%endif
%endif
# On Fedora, the liblas library is available, and so we can require it
# and build the lidar modules. On RedHat Enterprise Linux and
# derivatives (CentOS, Scientific Linux), the liblas library is only
# available if EPEL is enabled, and then only on version 7.
%if %{fedpkgs}
%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7
# By default create the MonetDB-lidar package on Fedora and RHEL 7
%bcond_without lidar
%endif
%endif
%if %{?rhel:0}%{!?rhel:1}
# By default create the MonetDB-bam-MonetDB5 package.
# Note that the samtools-devel RPM is not available on RedHat
# Enterprise Linux and derivatives, even with EPEL availabe.
# (Actually, at the moment of writing, samtools-devel is available in
# EPEL for RHEL 6, but not for RHEL 7. We don't make the distinction
# here and just not build the MonetDB-bam-MonetDB5 RPM.)
%bcond_without samtools
%endif
# By default use PCRE for the implementation of the SQL LIKE and ILIKE
# operators. Otherwise the POSIX regex functions are used.
%bcond_without pcre
%if %{fedpkgs}
# By default, create the MonetDB-R package.
%bcond_without rintegration
%endif
# On Fedora and RHEL 7, create the MonetDB-python2 package.
# On RHEL 6, numpy is too old.
%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7
%bcond_without py2integration
%endif
%if %{?rhel:0}%{!?rhel:1}
# On RHEL 6, Python 3 is too old, and on RHEL 7, the default Python 3
# is too old (in both cases 3.4).
%bcond_without py3integration
%endif
%if %{fedpkgs}
# By default, create the MonetDB-cfitsio package.
%bcond_without fits
%endif
%{!?__python2: %global __python2 %__python}
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
Name: %{name}
Version: %{version}
Release: %{release}
Summary: MonetDB - Monet Database Management System
Vendor: MonetDB BV <[email protected]>
Group: Applications/Databases
License: MPLv2.0
URL: https://www.monetdb.org/
BugURL: https://bugs.monetdb.org/
Source: https://www.monetdb.org/downloads/sources/Apr2019-SP1/%{name}-%{version}.tar.bz2
# we need systemd for the _unitdir macro to exist
# we need checkpolicy and selinux-policy-devel for the SELinux policy
%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7
# RHEL >= 7, and all current Fedora
BuildRequires: systemd
BuildRequires: checkpolicy
BuildRequires: selinux-policy-devel
BuildRequires: hardlink
%endif
BuildRequires: gcc
BuildRequires: bison
%if %{?rhel:1}%{!?rhel:0}
BuildRequires: bzip2-devel
%else
BuildRequires: pkgconfig(bzip2)
%endif
%if %{with fits}
BuildRequires: pkgconfig(cfitsio)
%endif
%if %{with geos}
BuildRequires: geos-devel >= 3.4.0
%endif
%if %{with lidar}
BuildRequires: liblas-devel >= 1.8.0
BuildRequires: pkgconfig(gdal)
%endif
%if %{?rhel:1}%{!?rhel:0}
# On RHEL, use the atomic_ops package for atomic operation.
# On Fedora, we use <stdatomic.h> from C11.
%if 0%{?rhel} >= 7
BuildRequires: pkgconfig(atomic_ops)
%else
# primitive RHEL 6
BuildRequires: libatomic_ops-devel
%endif
%endif
BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(liblzma)
# BuildRequires: libmicrohttpd-devel
BuildRequires: libuuid-devel
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(openssl)
%if %{with pcre}
BuildRequires: pkgconfig(libpcre) >= 4.5
%endif
BuildRequires: readline-devel
BuildRequires: unixODBC-devel
# BuildRequires: uriparser-devel
BuildRequires: pkgconfig(zlib)
%if %{with samtools}
BuildRequires: samtools-devel
%endif
%if %{with py2integration}
BuildRequires: python-devel
%if %{?rhel:1}%{!?rhel:0}
# RedHat Enterprise Linux calls it simply numpy
BuildRequires: numpy
%else
%if (0%{?fedora} >= 24)
BuildRequires: python2-numpy
%else
# Fedora <= 23 doesn't have python2-numpy
BuildRequires: numpy
%endif
%endif
%endif
%if %{with py3integration}
BuildRequires: python3-devel >= 3.5
BuildRequires: python3-numpy
%endif
%if %{with rintegration}
BuildRequires: R-core-devel
%endif
%if (0%{?fedora} >= 22)
Recommends: %{name}-SQL-server5%{?_isa} = %{version}-%{release}
Recommends: MonetDB5-server%{?_isa} = %{version}-%{release}
Suggests: %{name}-client%{?_isa} = %{version}-%{release}
%endif
%description
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL front end.
This package contains the core components of MonetDB in the form of a
single shared library. If you want to use MonetDB, you will certainly
need this package, but you will also need at least the MonetDB5-server
package, and most likely also %{name}-SQL-server5, as well as one or
more client packages.
%files
%license COPYING
%defattr(-,root,root)
%{_libdir}/libbat.so.*
%package devel
Summary: MonetDB development files
Group: Applications/Databases
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: %{name}-stream-devel%{?_isa} = %{version}-%{release}
%if %{?rhel:1}%{!?rhel:0}
# RHEL
%if 0%{?rhel} >= 7
Requires: pkgconfig(atomic_ops)
%else
# primitive RHEL 6
Requires: libatomic_ops-devel
%endif
%endif
%description devel
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL front end.
This package contains files needed to develop extensions to the core
functionality of MonetDB.
%files devel
%defattr(-,root,root)
%dir %{_includedir}/monetdb
%{_includedir}/monetdb/gdk*.h
%{_includedir}/monetdb/monet*.h
%{_libdir}/libbat.so
%{_libdir}/pkgconfig/monetdb-gdk.pc
%package stream
Summary: MonetDB stream library
Group: Applications/Databases
%description stream
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL front end.
This package contains a shared library (libstream) which is needed by
various other components.
%files stream
%license COPYING
%defattr(-,root,root)
%{_libdir}/libstream.so.*
%package stream-devel
Summary: MonetDB stream library
Group: Applications/Databases
Requires: %{name}-stream%{?_isa} = %{version}-%{release}
Requires: bzip2-devel
Requires: libcurl-devel
Requires: zlib-devel
%description stream-devel
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL front end.
This package contains the files to develop with the %{name}-stream
library.
%files stream-devel
%defattr(-,root,root)
%dir %{_includedir}/monetdb
%{_libdir}/libstream.so
%{_includedir}/monetdb/stream.h
%{_includedir}/monetdb/stream_socket.h
%{_libdir}/pkgconfig/monetdb-stream.pc
%package client
Summary: MonetDB - Monet Database Management System Client Programs
Group: Applications/Databases
%if (0%{?fedora} >= 22)
Recommends: %{name}-SQL-server5%{?_isa} = %{version}-%{release}
%endif
%description client
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL front end.
This package contains mclient, the main client program to communicate
with the MonetDB database server, and msqldump, a program to dump the
SQL database so that it can be loaded back later. If you want to use
MonetDB, you will very likely need this package.
%files client
%license COPYING
%defattr(-,root,root)
%{_bindir}/mclient
%{_bindir}/msqldump
%{_libdir}/libmapi.so.*
%doc %{_mandir}/man1/mclient.1.gz
%doc %{_mandir}/man1/msqldump.1.gz
%package client-tools
Summary: MonetDB - Monet Database Management System Client Programs
Group: Applications/Databases
Requires: %{name}-client%{?_isa} = %{version}-%{release}
%if (0%{?fedora} >= 22)
# tomograph executes these two:
Recommends: /usr/bin/gs
Recommends: /usr/bin/gnuplot
%endif
%description client-tools
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL front end.
This package contains stethoscope, tomograph, and tachograph. These
tools can be used to monitor the MonetDB database server.
%files client-tools
%defattr(-,root,root)
%{_bindir}/stethoscope
%{_bindir}/tachograph
%{_bindir}/tomograph
%dir %{_datadir}/doc/MonetDB-client-tools
%docdir %{_datadir}/doc/MonetDB-client-tools
%{_datadir}/doc/MonetDB-client-tools/*
%package client-devel
Summary: MonetDB - Monet Database Management System Client Programs
Group: Applications/Databases
Requires: %{name}-client%{?_isa} = %{version}-%{release}
Requires: %{name}-stream-devel%{?_isa} = %{version}-%{release}
Requires: openssl-devel
%description client-devel
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL front end.
This package contains the files needed to develop with the
%{name}-client package.
%files client-devel
%defattr(-,root,root)
%dir %{_includedir}/monetdb
%{_libdir}/libmapi.so
%{_includedir}/monetdb/mapi.h
%{_libdir}/pkgconfig/monetdb-mapi.pc
%package client-odbc
Summary: MonetDB ODBC driver
Group: Applications/Databases
Requires: %{name}-client%{?_isa} = %{version}-%{release}
Requires(post): unixODBC
Requires(postun): unixODBC
%description client-odbc
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL front end.
This package contains the MonetDB ODBC driver.
%post client-odbc
# install driver if first install of package or if driver not installed yet
if [ "$1" -eq 1 ] || ! odbcinst -d -q -n MonetDB >& /dev/null; then
odbcinst -i -d -r <<EOF
[MonetDB]
Description = ODBC for MonetDB
Driver = %{_exec_prefix}/lib/libMonetODBC.so
Setup = %{_exec_prefix}/lib/libMonetODBCs.so
Driver64 = %{_exec_prefix}/lib64/libMonetODBC.so
Setup64 = %{_exec_prefix}/lib64/libMonetODBCs.so
EOF
fi
%postun client-odbc
if [ "$1" -eq 0 ]; then
odbcinst -u -d -n MonetDB
fi
%files client-odbc
%license COPYING
%defattr(-,root,root)
%{_libdir}/libMonetODBC.so
%{_libdir}/libMonetODBCs.so
%package client-tests
Summary: MonetDB Client tests package
Group: Applications/Databases
Requires: MonetDB5-server%{?_isa} = %{version}-%{release}
Requires: %{name}-client%{?_isa} = %{version}-%{release}
Requires: %{name}-client-odbc%{?_isa} = %{version}-%{release}
%if (0%{?fedora} >= 22)
Recommends: perl-DBD-monetdb >= 1.0
Recommends: php-monetdb >= 1.0
%endif
Requires: %{name}-SQL-server5%{?_isa} = %{version}-%{release}
Requires: python-pymonetdb >= 1.0.6
%description client-tests
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL front end.
This package contains the sample MAPI programs used for testing other
MonetDB packages. You probably don't need this, unless you are a
developer.
%files client-tests
%defattr(-,root,root)
%{_bindir}/arraytest
%{_bindir}/odbcsample1
%{_bindir}/sample0
%{_bindir}/sample1
%{_bindir}/sample4
%{_bindir}/smack00
%{_bindir}/smack01
%{_bindir}/shutdowntest
%{_bindir}/testgetinfo
%{_bindir}/testStmtAttr
%{_bindir}/malsample.pl
%{_bindir}/sqlsample.php
%{_bindir}/sqlsample.pl
%if %{with geos}
%package geom-MonetDB5
Summary: MonetDB5 SQL GIS support module
Group: Applications/Databases
Requires: MonetDB5-server%{?_isa} = %{version}-%{release}
%description geom-MonetDB5
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL front end.
This package contains the GIS (Geographic Information System)
extensions for %{name}-SQL-server5.
%files geom-MonetDB5
%defattr(-,root,root)
%{_libdir}/monetdb5/autoload/*_geom.mal
%{_libdir}/monetdb5/createdb/*_geom.sql
%{_libdir}/monetdb5/geom.mal
%{_libdir}/monetdb5/lib_geom.so
%endif
%if %{with lidar}
%package lidar
Summary: MonetDB5 SQL support for working with LiDAR data
Group: Applications/Databases
Requires: MonetDB5-server%{?_isa} = %{version}-%{release}
%description lidar
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL front end.
This package contains support for reading and writing LiDAR data.
%files lidar
%defattr(-,root,root)
%{_libdir}/monetdb5/autoload/*_lidar.mal
%{_libdir}/monetdb5/createdb/*_lidar.sql
%{_libdir}/monetdb5/lidar.mal
%{_libdir}/monetdb5/lib_lidar.so
%endif
%if %{with samtools}
%package bam-MonetDB5
Summary: MonetDB5 SQL interface to the bam library
Group: Applications/Databases
Requires: MonetDB5-server%{?_isa} = %{version}-%{release}
%description bam-MonetDB5
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL front end.
This package contains the interface to load and query BAM (binary
version of Sequence Alignment/Map) data.
%files bam-MonetDB5
%defattr(-,root,root)
%{_libdir}/monetdb5/autoload/*_bam.mal
%{_libdir}/monetdb5/createdb/*_bam.sql
%{_libdir}/monetdb5/bam.mal
%{_libdir}/monetdb5/lib_bam.so
%endif
%if %{with rintegration}
%package R
Summary: Integration of MonetDB and R, allowing use of R from within SQL
Group: Applications/Databases
Requires: MonetDB-SQL-server5%{?_isa} = %{version}-%{release}
%description R
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL front end.
This package contains the interface to use the R language from within
SQL queries.
NOTE: INSTALLING THIS PACKAGE OPENS UP SECURITY ISSUES. If you don't
know how this package affects the security of your system, do not
install it.
%files R
%defattr(-,root,root)
%{_libdir}/monetdb5/rapi.*
%{_libdir}/monetdb5/autoload/*_rapi.mal
%{_libdir}/monetdb5/lib_rapi.so
%endif
%if %{with py2integration}
%package python2
Summary: Integration of MonetDB and Python, allowing use of Python from within SQL
Group: Applications/Databases
Requires: MonetDB-SQL-server5%{?_isa} = %{version}-%{release}
%description python2
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL front end.
This package contains the interface to use the Python language from
within SQL queries. This package is for Python 2.
NOTE: INSTALLING THIS PACKAGE OPENS UP SECURITY ISSUES. If you don't
know how this package affects the security of your system, do not
install it.
%files python2
%defattr(-,root,root)
%{_libdir}/monetdb5/pyapi.*
%{_libdir}/monetdb5/autoload/*_pyapi.mal
%{_libdir}/monetdb5/lib_pyapi.so
%endif
%if %{with py3integration}
%package python3
Summary: Integration of MonetDB and Python, allowing use of Python from within SQL
Group: Applications/Databases
Requires: MonetDB-SQL-server5%{?_isa} = %{version}-%{release}
%description python3
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL front end.
This package contains the interface to use the Python language from
within SQL queries. This package is for Python 3.
NOTE: INSTALLING THIS PACKAGE OPENS UP SECURITY ISSUES. If you don't
know how this package affects the security of your system, do not
install it.
%files python3
%defattr(-,root,root)
%{_libdir}/monetdb5/pyapi3.*
%{_libdir}/monetdb5/autoload/*_pyapi3.mal
%{_libdir}/monetdb5/lib_pyapi3.so
%endif
%if %{with fits}
%package cfitsio
Summary: MonetDB: Add on module that provides support for FITS files
Group: Applications/Databases
Requires: MonetDB-SQL-server5%{?_isa} = %{version}-%{release}
%description cfitsio
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL front end.
This package contains a module for accessing data in the FITS file
format.
%files cfitsio
%defattr(-,root,root)
%{_libdir}/monetdb5/fits.mal
%{_libdir}/monetdb5/autoload/*_fits.mal
%{_libdir}/monetdb5/createdb/*_fits.sql
%{_libdir}/monetdb5/lib_fits.so
%endif
%package -n MonetDB5-server
Summary: MonetDB - Monet Database Management System
Group: Applications/Databases
Requires(pre): shadow-utils
Requires: %{name}-client%{?_isa} = %{version}-%{release}
%if (0%{?fedora} >= 22)
Recommends: %{name}-SQL-server5%{?_isa} = %{version}-%{release}
%if %{with hugeint}
Recommends: MonetDB5-server-hugeint%{?_isa} = %{version}-%{release}
%endif
Suggests: %{name}-client%{?_isa} = %{version}-%{release}
%endif
# versions up to 1.0.5 don't accept the queryid field in the result set
Conflicts: python-pymonetdb < 1.0.6
%description -n MonetDB5-server
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL front end.
This package contains the MonetDB server component. You need this
package if you want to use the MonetDB database system. If you want
to use the SQL front end, you also need %{name}-SQL-server5.
%pre -n MonetDB5-server
getent group monetdb >/dev/null || groupadd -r monetdb
getent passwd monetdb >/dev/null || \
useradd -r -g monetdb -d %{_localstatedir}/MonetDB -s /sbin/nologin \
-c "MonetDB Server" monetdb
exit 0
%files -n MonetDB5-server
%defattr(-,root,root)
%attr(750,monetdb,monetdb) %dir %{_localstatedir}/MonetDB
%attr(2770,monetdb,monetdb) %dir %{_localstatedir}/monetdb5
%attr(2770,monetdb,monetdb) %dir %{_localstatedir}/monetdb5/dbfarm
%{_bindir}/mserver5
%{_libdir}/libmonetdb5.so.*
%dir %{_libdir}/monetdb5
%dir %{_libdir}/monetdb5/autoload
%if %{with fits}
%exclude %{_libdir}/monetdb5/fits.mal
%exclude %{_libdir}/monetdb5/autoload/*_fits.mal
%exclude %{_libdir}/monetdb5/createdb/*_fits.sql
%endif
%if %{with geos}
%exclude %{_libdir}/monetdb5/geom.mal
%endif
%if %{with lidar}
%exclude %{_libdir}/monetdb5/lidar.mal
%endif
%if %{with py2integration}
%exclude %{_libdir}/monetdb5/pyapi.mal
%endif
%if %{with py3integration}
%exclude %{_libdir}/monetdb5/pyapi3.mal
%endif
%if %{with rintegration}
%exclude %{_libdir}/monetdb5/rapi.mal
%endif
%exclude %{_libdir}/monetdb5/sql*.mal
%if %{with hugeint}
%exclude %{_libdir}/monetdb5/*_hge.mal
%exclude %{_libdir}/monetdb5/autoload/*_hge.mal
%endif
%{_libdir}/monetdb5/*.mal
%if %{with geos}
%exclude %{_libdir}/monetdb5/autoload/*_geom.mal
%endif
%if %{with lidar}
%exclude %{_libdir}/monetdb5/autoload/*_lidar.mal
%endif
%if %{with py2integration}
%exclude %{_libdir}/monetdb5/autoload/*_pyapi.mal
%endif
%if %{with py3integration}
%exclude %{_libdir}/monetdb5/autoload/*_pyapi3.mal
%endif
%if %{with rintegration}
%exclude %{_libdir}/monetdb5/autoload/*_rapi.mal
%endif
%exclude %{_libdir}/monetdb5/autoload/??_sql*.mal
%{_libdir}/monetdb5/autoload/*.mal
%if %{with samtools}
%exclude %{_libdir}/monetdb5/bam.mal
%exclude %{_libdir}/monetdb5/autoload/*_bam.mal
%endif
%{_libdir}/monetdb5/lib_capi.so
%{_libdir}/monetdb5/lib_generator.so
%{_libdir}/monetdb5/lib_opt_sql_append.so
%{_libdir}/monetdb5/lib_udf.so
%doc %{_mandir}/man1/mserver5.1.gz
%dir %{_datadir}/doc/MonetDB
%docdir %{_datadir}/doc/MonetDB
%{_datadir}/doc/MonetDB/*
%if %{with hugeint}
%package -n MonetDB5-server-hugeint
Summary: MonetDB - 128-bit integer support for MonetDB5-server
Group: Applications/Databases
Requires: MonetDB5-server%{?_isa}
%description -n MonetDB5-server-hugeint
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL front end.
This package provides HUGEINT (128-bit integer) support for the
MonetDB5-server component.
%files -n MonetDB5-server-hugeint
%exclude %{_libdir}/monetdb5/sql*_hge.mal
%{_libdir}/monetdb5/*_hge.mal
%exclude %{_libdir}/monetdb5/autoload/??_sql_hge.mal
%{_libdir}/monetdb5/autoload/*_hge.mal
%endif
%package -n MonetDB5-server-devel
Summary: MonetDB development files
Group: Applications/Databases
Requires: MonetDB5-server%{?_isa} = %{version}-%{release}
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
%description -n MonetDB5-server-devel
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL front end.
This package contains files needed to develop extensions that can be
used from the MAL level.
%files -n MonetDB5-server-devel
%defattr(-,root,root)
%dir %{_includedir}/monetdb
%{_includedir}/monetdb/mal*.h
%{_libdir}/libmonetdb5.so
%{_libdir}/pkgconfig/monetdb5.pc
%package SQL-server5
Summary: MonetDB5 SQL server modules
Group: Applications/Databases
Requires(pre): MonetDB5-server%{?_isa} = %{version}-%{release}
%if (0%{?fedora} >= 22)
%if %{with hugeint}
Recommends: %{name}-SQL-server5-hugeint%{?_isa} = %{version}-%{release}
%endif
Suggests: %{name}-client%{?_isa} = %{version}-%{release}
%endif
%description SQL-server5
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL front end.
This package contains the SQL front end for MonetDB. If you want to
use SQL with MonetDB, you will need to install this package.
%files SQL-server5
%defattr(-,root,root)
%{_bindir}/monetdb
%{_bindir}/monetdbd
%dir %attr(775,monetdb,monetdb) %{_localstatedir}/log/monetdb
%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7
# RHEL >= 7, and all current Fedora
%dir %attr(775,monetdb,monetdb) /run/monetdb
%{_tmpfilesdir}/monetdbd.conf
%{_unitdir}/monetdbd.service
%else
# RedHat Enterprise Linux < 7
%dir %attr(775,monetdb,monetdb) %{_localstatedir}/run/monetdb
%exclude %{_sysconfdir}/tmpfiles.d/monetdbd.conf
# no _unitdir macro
%exclude %{_prefix}/lib/systemd/system/monetdbd.service
%endif
%config(noreplace) %attr(664,monetdb,monetdb) %{_localstatedir}/monetdb5/dbfarm/.merovingian_properties
%config(noreplace) %attr(644,root,root) %{_sysconfdir}/logrotate.d/monetdbd
%{_libdir}/monetdb5/autoload/??_sql.mal
%{_libdir}/monetdb5/lib_sql.so
%dir %{_libdir}/monetdb5/createdb
%if %{with geos}
%exclude %{_libdir}/monetdb5/createdb/*_geom.sql
%endif
%if %{with lidar}
%exclude %{_libdir}/monetdb5/createdb/*_lidar.sql
%endif
%if %{with samtools}
%exclude %{_libdir}/monetdb5/createdb/*_bam.sql
%endif
%{_libdir}/monetdb5/createdb/*.sql
%{_libdir}/monetdb5/sql*.mal
%if %{with hugeint}
%exclude %{_libdir}/monetdb5/createdb/*_hge.sql
%exclude %{_libdir}/monetdb5/sql*_hge.mal
%endif
%doc %{_mandir}/man1/monetdb.1.gz
%doc %{_mandir}/man1/monetdbd.1.gz
%dir %{_datadir}/doc/MonetDB-SQL
%docdir %{_datadir}/doc/MonetDB-SQL
%{_datadir}/doc/MonetDB-SQL/*
%if %{with hugeint}
%package SQL-server5-hugeint
Summary: MonetDB5 128 bit integer (hugeint) support for SQL
Group: Applications/Databases
Requires: MonetDB5-server-hugeint%{?_isa} = %{version}-%{release}
Requires: MonetDB-SQL-server5%{?_isa} = %{version}-%{release}
%description SQL-server5-hugeint
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL front end.
This package provides HUGEINT (128-bit integer) support for the SQL
front end of MonetDB.
%files SQL-server5-hugeint
%defattr(-,root,root)
%{_libdir}/monetdb5/autoload/??_sql_hge.mal
%{_libdir}/monetdb5/createdb/*_hge.sql
%{_libdir}/monetdb5/sql*_hge.mal
%endif
%package testing
Summary: MonetDB - Monet Database Management System
Group: Applications/Databases
%description testing
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL front end.
This package contains the programs and files needed for testing the
MonetDB packages. You probably don't need this, unless you are a
developer. If you do want to test, install %{name}-testing-python.
%files testing
%license COPYING
%defattr(-,root,root)
%{_bindir}/Mdiff
%{_bindir}/Mlog
%package testing-python
Summary: MonetDB - Monet Database Management System
Group: Applications/Databases
Requires: %{name}-testing = %{version}-%{release}
Requires: %{name}-client-tests = %{version}-%{release}
Requires: python
BuildArch: noarch
%description testing-python
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL front end.
This package contains the Python programs and files needed for testing
the MonetDB packages. You probably don't need this, unless you are a
developer, but if you do want to test, this is the package you need.
%files testing-python
%defattr(-,root,root)
%{_bindir}/Mapprove.py
%{_bindir}/Mtest.py
%dir %{python2_sitelib}/MonetDBtesting
%{python2_sitelib}/MonetDBtesting/*
%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7
%package selinux
Summary: SELinux policy files for MonetDB
Group: Applications/Databases
%if "%{?_selinux_policy_version}" != ""
Requires: selinux-policy >= %{?_selinux_policy_version}
%endif
Requires(post): MonetDB5-server%{?_isa} = %{version}-%{release}
Requires(postun): MonetDB5-server%{?_isa} = %{version}-%{release}
Requires(post): %{name}-SQL-server5%{?_isa} = %{version}-%{release}
Requires(postun): %{name}-SQL-server5%{?_isa} = %{version}-%{release}
Requires(post): /usr/sbin/semodule, /sbin/restorecon, /sbin/fixfiles
Requires(postun): /usr/sbin/semodule, /sbin/restorecon, /sbin/fixfiles
BuildArch: noarch
%global selinux_types %(%{__awk} '/^#[[:space:]]*SELINUXTYPE=/,/^[^#]/ { if ($3 == "-") printf "%s ", $2 }' /etc/selinux/config 2>/dev/null)
%global selinux_variants %([ -z "%{selinux_types}" ] && echo mls targeted || echo %{selinux_types})
%description selinux
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL front end.
This package contains the SELinux policy for running MonetDB under
control of systemd. There is one tunable parameter, mserver5_can_read_home,
which can be set using "setsebool -P mserver5_can_read_home=true" to allow
an mserver5 process started by monetdbd under the control of systemd to
read files in users' home directories.
%post selinux
for selinuxvariant in %{selinux_variants}
do
/usr/sbin/semodule -s ${selinuxvariant} -i \
%{_datadir}/selinux/${selinuxvariant}/monetdb.pp &> /dev/null || :
done
# use %{_localstatedir}/run/monetdb here for EPEL 6; on other systems,
# %{_localstatedir}/run is a symlink to /run
/sbin/restorecon -R %{_localstatedir}/monetdb5 %{_localstatedir}/log/monetdb %{_localstatedir}/run/monetdb %{_bindir}/monetdbd %{_bindir}/mserver5 %{_unitdir}/monetdbd.service &> /dev/null || :
/usr/bin/systemctl try-restart monetdbd.service
%postun selinux
if [ $1 -eq 0 ] ; then
active=`/usr/bin/systemctl is-active monetdbd.service`
if [ $active = active ]; then
/usr/bin/systemctl stop monetdbd.service
fi
for selinuxvariant in %{selinux_variants}
do
/usr/sbin/semodule -s ${selinuxvariant} -r monetdb &> /dev/null || :
done
# use %{_localstatedir}/run/monetdb here for EPEL 6; on other systems,
# %{_localstatedir}/run is a symlink to /run
/sbin/restorecon -R %{_localstatedir}/monetdb5 %{_localstatedir}/log/monetdb %{_localstatedir}/run/monetdb %{_bindir}/monetdbd %{_bindir}/mserver5 %{_unitdir}/monetdbd.service &> /dev/null || :
if [ $active = active ]; then
/usr/bin/systemctl start monetdbd.service
fi
fi
%files selinux
%defattr(-,root,root,0755)
%doc buildtools/selinux/*
%{_datadir}/selinux/*/monetdb.pp
%endif
%prep
%setup -q
%build
# There is a bug in GCC version 4.8 on AArch64 architectures
# that causes it to report an internal error when compiling
# testing/difflib.c. The work around is to not use -fstack-protector-strong.
# The bug exhibits itself on CentOS 7 on AArch64.
# Everywhere else, add -Wno-format-truncation to the compiler options
# to reduce the number of warnings during compilation.
%ifarch aarch64
if gcc -v 2>&1 | grep -q 'gcc version 4\.'; then
CFLAGS="${CFLAGS:-$(echo %optflags | sed 's/-fstack-protector-strong//')}"
else
CFLAGS="${CFLAGS:-%optflags -Wno-format-truncation}"
fi
%else
CFLAGS="${CFLAGS:-%optflags -Wno-format-truncation}"
%endif
export CFLAGS
# do not use --enable-optimize or --disable-optimize: we don't want
# any changes to optimization flags
%{configure} \
--enable-assert=no \
--enable-console=yes \
--enable-debug=yes \
--enable-developer=no \
--enable-embedded=no \
--enable-embedded-r=no \
--enable-fits=%{?with_fits:yes}%{!?with_fits:no} \
--enable-gdk=yes \
--enable-geom=%{?with_geos:yes}%{!?with_geos:no} \
--enable-int128=%{?with_hugeint:yes}%{!?with_hugeint:no} \
--enable-lidar=%{?with_lidar:yes}%{!?with_lidar:no} \
--enable-mapi=yes \
--enable-monetdb5=yes \
--enable-netcdf=no \
--enable-odbc=yes \
--enable-py2integration=%{?with_py2integration:yes}%{!?with_py2integration:no} \
--enable-py3integration=%{?with_py3integration:yes}%{!?with_py3integration:no} \
--enable-rintegration=%{?with_rintegration:yes}%{!?with_rintegration:no} \
--enable-sanitizer=no \
--enable-shp=no \
--enable-sql=yes \
--enable-static-analysis=no \
--enable-strict=no \
--enable-testing=yes \