This repository has been archived by the owner on Dec 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 53
/
MonetDB.spec
5692 lines (4892 loc) · 265 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.40.0
%{!?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 compile with 128 bit integer support.
%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 not available, you can
# disable its use by providing rpmbuild or mock with the "--without
# 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_without 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
%if %{?rhel:1}%{!?rhel:0} && 0%{?rhel} < 7
# RedHat Enterprise Linux < 7
# There is no macro _rundir, and no directory /run, instead use /var/run.
%global _rundir %{_localstatedir}/run
%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
# By default use PCRE for the implementation of the SQL LIKE and ILIKE
# operators. Otherwise the POSIX regex functions are used.
%bcond_without pcre
# By default, include C integration
%bcond_without cintegration
%if %{fedpkgs}
# By default, create the MonetDB-R package.
%bcond_without rintegration
%endif
%if 0%{?rhel} >= 7 || 0%{?fedora} > 0
# On RHEL 6, Python 3 is too old. On RHEL 7, Python 3 was too old
# when RHEL 7 was released, but now it is ok.
%bcond_without py3integration
%endif
%if %{fedpkgs}
# By default, create the MonetDB-cfitsio package.
%bcond_without fits
%endif
%{!?__python3: %global __python3 /usr/bin/python3}
%{!?python3_sitelib: %global python3_sitelib %(%{__python3} -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/Oct2020-SP1/%{name}-%{version}.tar.bz2
# The Fedora packaging document says we need systemd-rpm-macros for
# the _unitdir and _tmpfilesdir macros to exist; however on RHEL 7
# that doesn't exist and we need systemd, so instead we just require
# the macro file that contains the definitions.
# 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: /usr/lib/rpm/macros.d/macros.systemd
BuildRequires: checkpolicy
BuildRequires: selinux-policy-devel
BuildRequires: hardlink
%endif
BuildRequires: cmake3 >= 3.12
BuildRequires: gcc
BuildRequires: bison
BuildRequires: /usr/bin/python3
%if %{?rhel:1}%{!?rhel:0}
# RH 7 (and for readline also 8)
BuildRequires: bzip2-devel
BuildRequires: unixODBC-devel
BuildRequires: readline-devel
%else
BuildRequires: pkgconfig(bzip2)
BuildRequires: pkgconfig(odbc)
BuildRequires: pkgconfig(readline)
%endif
%if %{with fits}
BuildRequires: pkgconfig(cfitsio)
%endif
%if %{with geos}
BuildRequires: geos-devel >= 3.4.0
%endif
BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(liblzma)
BuildRequires: pkgconfig(uuid)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(openssl)
%if %{with pcre}
BuildRequires: pkgconfig(libpcre) >= 4.5
%endif
BuildRequires: pkgconfig(zlib)
%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} > 7
# not on RHEL 7
BuildRequires: pkgconfig(liblz4) >= 1.8
%global LZ4 ON
%else
%global LZ4 OFF
%endif
%if %{with py3integration}
BuildRequires: pkgconfig(python3) >= 3.5
BuildRequires: python3-numpy
%endif
%if %{with rintegration}
BuildRequires: pkgconfig(libR)
%if (0%{?fedora} == 32)
# work around a packaging bug on Fedora 32 (18 Nov 2020)
# problem is things like:
# file /etc/texlive/web2c/updmap.cfg conflicts between attempted installs of texlive-tetex-7:20190410-12.fc32.noarch and texlive-texlive-scripts-7:20200327-16.fc32.noarch
# texlive-tetex is obsoleted by texlive-obsolete
BuildRequires: texlive-obsolete
%endif
%endif
# optional packages:
# BuildRequires: pkgconfig(cmocka) # -DWITH_CMOCKA=ON
# BuildRequires: pkgconfig(gdal) # -DSHP=ON
# BuildRequires: pkgconfig(netcdf) # -DNETCDF=ON
# BuildRequires: pkgconfig(proj) # -DWITH_PROJ=ON
# BuildRequires: pkgconfig(snappy) # -DWITH_SNAPPY=ON
# BuildRequires: pkgconfig(valgrind) # -DWITH_VALGRIND=ON
%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}
%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/matomic.h
%{_includedir}/monetdb/mstring.h
%exclude %{_includedir}/monetdb/monetdbe.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}
Recommends: MonetDB5-server%{?_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-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: MonetDB5-server%{?_isa} = %{version}-%{release}
Requires: python3-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}/shutdowntest
%{_bindir}/smack00
%{_bindir}/smack01
%{_bindir}/streamcat
%{_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 MonetDB5-server.
%files geom-MonetDB5
%defattr(-,root,root)
%{_libdir}/monetdb5/lib_geom.so
%endif
%if %{with rintegration}
%package R
Summary: Integration of MonetDB and R, allowing use of R from within SQL
Group: Applications/Databases
Requires: MonetDB5-server%{?_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.R
%{_libdir}/monetdb5/lib_rapi.so
%endif
%if %{with py3integration}
%package python3
Summary: Integration of MonetDB and Python, allowing use of Python from within SQL
Group: Applications/Databases
Requires: MonetDB5-server%{?_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/lib_pyapi3.so
%endif
%if %{with fits}
%package cfitsio
Summary: MonetDB: Add on module that provides support for FITS files
Group: Applications/Databases
Requires: MonetDB5-server%{?_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/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}
Obsoletes: MonetDB5-server-hugeint < 11.38.0
%if %{with hugeint}
Provides: MonetDB5-server-hugeint%{?_isa} = %{version}-%{release}
%endif
%if (0%{?fedora} >= 22)
Recommends: %{name}-SQL-server5%{?_isa} = %{version}-%{release}
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
%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7
Requires(pre): systemd
%endif
%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 monetdb and monetdbd programs to manage your databases
(recommended), you also need %{name}-SQL-server5.
%pre -n MonetDB5-server
%{?sysusers_create_package:echo 'u monetdb - "MonetDB Server" /var/lib/monetdb' | systemd-sysusers --replace=%_sysusersdir/monetdb.conf -}
getent group monetdb >/dev/null || groupadd --system monetdb
if getent passwd monetdb >/dev/null; then
case $(getent passwd monetdb | cut -d: -f6) in
%{_localstatedir}/MonetDB) # old value
# change home directory, but not using usermod
# usermod requires there to not be any running processes owned by the user
EDITOR='sed -i "/^monetdb:/s|:%{_localstatedir}/MonetDB:|:%{_localstatedir}/lib/monetdb:|"'
unset VISUAL
export EDITOR
/sbin/vipw > /dev/null
;;
esac
else
useradd --system --gid monetdb --home-dir %{_localstatedir}/lib/monetdb \
--shell /sbin/nologin --comment "MonetDB Server" monetdb
fi
exit 0
%files -n MonetDB5-server
%defattr(-,root,root)
%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7
%{_sysusersdir}/monetdb.conf
%endif
%attr(2750,monetdb,monetdb) %dir %{_localstatedir}/lib/monetdb
%attr(2770,monetdb,monetdb) %dir %{_localstatedir}/monetdb5
%attr(2770,monetdb,monetdb) %dir %{_localstatedir}/monetdb5/dbfarm
%{_bindir}/mserver5
%exclude %{_bindir}/stethoscope
%{_libdir}/libmonetdb5.so.*
%{_libdir}/libmonetdbsql.so*
%dir %{_libdir}/monetdb5
%if %{with cintegration}
%{_libdir}/monetdb5/lib_capi.so
%endif
%{_libdir}/monetdb5/lib_generator.so
%{_libdir}/monetdb5/lib_udf.so
%doc %{_mandir}/man1/mserver5.1.gz
%dir %{_datadir}/doc/MonetDB
%docdir %{_datadir}/doc/MonetDB
%{_datadir}/doc/MonetDB/*
%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)
%{_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}
Obsoletes: %{name}-SQL-server5-hugeint < 11.38.0
%if %{with hugeint}
Provides: %{name}-SQL-server5-hugeint%{?_isa} = %{version}-%{release}
%endif
%if (0%{?fedora} >= 22)
Suggests: %{name}-client%{?_isa} = %{version}-%{release}
%endif
%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7
%{?systemd_requires}
%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 monetdb and monetdbd programs and the systemd
configuration.
%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7
%post SQL-server5
%systemd_post monetdbd.service
%preun SQL-server5
%systemd_preun monetdbd.service
%postun SQL-server5
%systemd_postun_with_restart monetdbd.service
%endif
%files SQL-server5
%defattr(-,root,root)
%{_bindir}/monetdb
%{_bindir}/monetdbd
%dir %attr(775,monetdb,monetdb) %{_localstatedir}/log/monetdb
%dir %attr(775,monetdb,monetdb) %{_rundir}/monetdb
%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7
# RHEL >= 7, and all current Fedora
%{_tmpfilesdir}/monetdbd.conf
%{_unitdir}/monetdbd.service
%else
# RedHat Enterprise Linux < 7
%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
%verify(not mtime) %attr(664,monetdb,monetdb) %{_localstatedir}/monetdb5/dbfarm/.merovingian_lock
%config(noreplace) %attr(644,root,root) %{_sysconfdir}/logrotate.d/monetdbd
%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/*
%package embedded
Summary: MonetDB as an embedded library
Group: Applications/Databases
%description embedded
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 library to turn MonetDB into an embeddable
library. Also see %{name}-embedded-devel to use this in a program.
%files embedded
%{_libdir}/libmonetdbe.so.*
%package embedded-devel
Summary: MonetDB as an embedded library development files
Group: Applications/Databases
Requires: %{name}-embedded%{?_isa} = %{version}-%{release}
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
%description embedded-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 library and include files to create a
program that uses MonetDB as an embeddable library.
%files embedded-devel
%defattr(-,root,root)
%{_libdir}/libmonetdbe.so
%{_includedir}/monetdb/monetdbe.h
%{_libdir}/pkgconfig/monetdbe.pc
%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: /usr/bin/python3
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 %{python3_sitelib}/MonetDBtesting
%{python3_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 /var/run/monetdb since that's what it says in the monetdb.fc file
# it says that because /run/monetdb for some reason doesn't work
/sbin/restorecon -R %{_localstatedir}/monetdb5 %{_localstatedir}/log/monetdb /var/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
/sbin/restorecon -R %{_localstatedir}/monetdb5 %{_localstatedir}/log/monetdb %{_rundir}/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)
%docdir %{_datadir}/doc/MonetDB-selinux
%{_datadir}/doc/MonetDB-selinux/*
%{_datadir}/selinux/*/monetdb.pp
%endif
%prep
%setup -q
%build
%if (0%{?fedora} >= 33)
# on Fedora 33 we get a crash of the compiler when using -flto, so disable it
CFLAGS="${CFLAGS:-%optflags} -fno-lto"
export CFLAGS
%endif
%cmake3 \
-DRELEASE_VERSION=ON \
-DASSERT=OFF \
-DCINTEGRATION=%{?with_cintegration:ON}%{!?with_cintegration:OFF} \
-DFITS=%{?with_fits:ON}%{!?with_fits:OFF} \
-DGEOM=%{?with_geos:ON}%{!?with_geos:OFF} \
-DINT128=%{?with_hugeint:ON}%{!?with_hugeint:OFF} \
-DNETCDF=OFF \
-DODBC=ON \
-DPY3INTEGRATION=%{?with_py3integration:ON}%{!?with_py3integration:OFF} \
-DRINTEGRATION=%{?with_rintegration:ON}%{!?with_rintegration:OFF} \
-DSANITIZER=OFF \
-DSHP=OFF \
-DSTRICT=OFF \
-DTESTING=ON \
-DWITH_BZ2=ON \
-DWITH_CMOCKA=OFF \
-DWITH_CRYPTO=ON \
-DWITH_CURL=ON \
-DWITH_LZ4=%{LZ4} \
-DWITH_LZMA=ON \
-DWITH_PCRE=ON \
-DWITH_PROJ=OFF \
-DWITH_READLINE=ON \
-DWITH_SNAPPY=OFF \
-DWITH_UUID=ON \
-DWITH_VALGRIND=OFF \
-DWITH_XML2=ON \
-DWITH_ZLIB=ON
%cmake3_build
%install
mkdir -p "%{buildroot}/usr"
for d in etc var; do mkdir "%{buildroot}/$d"; ln -s ../$d "%{buildroot}/usr/$d"; done
%cmake3_install
rm "%{buildroot}/usr/var" "%{buildroot}/usr/etc"
# move file to correct location
%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7
mkdir -p %{buildroot}%{_tmpfilesdir} %{buildroot}%{_sysusersdir}
mv %{buildroot}%{_sysconfdir}/tmpfiles.d/monetdbd.conf %{buildroot}%{_tmpfilesdir}
cat > %{buildroot}%{_sysusersdir}/monetdb.conf << EOF
u monetdb - "MonetDB Server" /var/lib/monetdb
EOF
rmdir %{buildroot}%{_sysconfdir}/tmpfiles.d
%endif
install -d -m 0750 %{buildroot}%{_localstatedir}/lib/monetdb
install -d -m 0770 %{buildroot}%{_localstatedir}/monetdb5/dbfarm
install -d -m 0775 %{buildroot}%{_localstatedir}/log/monetdb
install -d -m 0775 %{buildroot}%{_rundir}/monetdb
# remove unwanted stuff
# .la files
rm -f %{buildroot}%{_libdir}/*.la
rm -f %{buildroot}%{_libdir}/monetdb5/*.la
rm -f %{buildroot}%{_libdir}/monetdb5/lib_opt_sql_append.so
rm -f %{buildroot}%{_libdir}/monetdb5/run_*.mal
rm -f %{buildroot}%{_libdir}/monetdb5/lib_run_*.so
rm -f %{buildroot}%{_libdir}/monetdb5/microbenchmark.mal
rm -f %{buildroot}%{_libdir}/monetdb5/lib_microbenchmark*.so
rm -f %{buildroot}%{_bindir}/monetdb_mtest.sh
rm -rf %{buildroot}%{_datadir}/monetdb # /cmake
%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7
if [ -x /usr/sbin/hardlink ]; then
/usr/sbin/hardlink -cv %{buildroot}%{_datadir}/selinux
else
# Fedora 31
/usr/bin/hardlink -cv %{buildroot}%{_datadir}/selinux
fi
%endif
%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7
# fix up some paths (/var/run -> /run)
# needed because CMAKE_INSTALL_RUNSTATEDIR refers to /var/run
sed -i 's|/var/run|/run|' \
%{buildroot}%{_tmpfilesdir}/monetdbd.conf \
%{buildroot}%{_localstatedir}/monetdb5/dbfarm/.merovingian_properties \
%{buildroot}%{_unitdir}/monetdbd.service
%endif
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%changelog
* Wed Nov 18 2020 Sjoerd Mullender <[email protected]> - 11.39.7-20201118
- Rebuilt.
- BZ#6890: Add support of xz/lzma (de)compression on MS Windows
- BZ#6891: Add support of lz4 (de)compression on MS Windows
- BZ#6971: Parsing table returning function on remote server fails
- BZ#6981: Oct2020: PREPARE DDL statement silently fails
- BZ#6983: monetdb allows to use non-existing optimizer pipe
- BZ#6998: MAL profiler buffer limitations
- BZ#7001: crossproduct generated for a simple (semi-)join
- BZ#7003: Segfault on large chain of constant decimal multiplication
- BZ#7005: Dropping a STREAM TABLE does not remove the associated column
info from sys._columns
- BZ#7010: deallocate <id> results in all prepared statements being
deallocated (not error-related)
- BZ#7011: uuid() called only once when used in projection list
* Tue Oct 13 2020 Sjoerd Mullender <[email protected]> - 11.39.5-20201013
- Rebuilt.
* Mon Oct 12 2020 Sjoerd Mullender <[email protected]> - 11.39.5-20201013
- clients: mclient and msqldump now also look in $XDG_CONFIG_HOME for the monetdb
configuration file.
* Fri Oct 09 2020 Sjoerd Mullender <[email protected]> - 11.39.3-20201009
- Rebuilt.
* Tue Oct 06 2020 Sjoerd Mullender <[email protected]> - 11.39.1-20201006
- Rebuilt.
- BZ#3553: All schema access to ubiquitous functions
- BZ#3815: Incorrect results when expression contains implicit
float/integer conversions
- BZ#6415: Date arithmetic types are inconsistent
- BZ#6814: provide native implementations for scalar functions
sys.degrees(rad) and sys.radians(deg)
- BZ#6843: function sys.getcontent(url) always returns "Feature not
supported"
- BZ#6857: remove not implemented aggregate function json.output(js json)
- BZ#6870: Missing bulk operators
- BZ#6910: SQLancer query: 'bat.append' undefined
- BZ#6930: SQLancer crash on join with coalesce
- BZ#6931: Allow EDITOR to be used for the current command in mclient
- BZ#6935: Wrong result when dividing interval by literal float
- BZ#6937: Lost the microsecond precisions
- BZ#6938: Segmentation fault in MalOptimizer
- BZ#6939: Error in optimizer multiplex when selecting
profiler.getlimit() or wlc.clock() or wlc.tick() or wlr.clock()
or wlr.tick()
- BZ#6941: SELECT queries on remote table fail when using LIKE in WHERE
conditions
- BZ#6943: JSON parser is too permissive
- BZ#6948: msqldump with Empty BLOBs cannot be imported
- BZ#6949: Loosing timing precision
- BZ#6950: redundant/replicated code line in gdk/gdk_hash.c
- BZ#6951: Use a different naming scheme for MAL blocks
- BZ#6954: FILTER functions no longer find their implementation
- BZ#6955: ROUND(DECIMAL, PRECISION) gives incorrect result with
non-scalar precision parameter
- BZ#6960: implementation of log(arg1,arg2) function is not compliant
with the SQL standard, arguments are switched
- BZ#6962: "SELECT * FROM ids LIMIT 1" produces: exp_bin: !ERROR: Could
not find %173.id
- BZ#6964: Table returning function: Cannot access column descriptor
- BZ#6965: Crash when using distinct on the result of a table returning
function
- BZ#6974: Oct2020-branch cannot attach and load FITS files
- BZ#6976: Oct2020: default dbfarm cannot be started
- BZ#6978: Oct2020: d shows empty result in schema created by include
sql script
- BZ#6979: timestamp add integer
- BZ#6980: Oct2020: wrong mel definition for str.epilogue
* Mon Aug 31 2020 Pedro Ferreira <[email protected]> - 11.39.1-20201006
- sql: Made general logarithm function log(x,base) compliant with the SQL
standard, by swapping the input parameters.
Instead of log(x,base), now is log(base,x).
* Thu Aug 20 2020 Sjoerd Mullender <[email protected]> - 11.39.1-20201006
- monetdb5: The settings for specifying how mserver5 should listen to "The
Internet" have been overhauled. See the manual for details. In
brief, mapi_autosense, mapi_ipv6 and mapi_open are gone. If
mapi_listenaddr equals "localhost" or "all", we listen to both IPv4
and IPv6 (if available), if "127.0.0.1" or "0.0.0.0", we listen to
IPv4 only, if "::1" or "::" we listen to IPv6 only. The first of
each pair is loopback interface only, the second is all interfaces.
If mapi_listenaddr is "none", then no IP port is opened, you need to
use a UNIX domain socket. If mapi_port is 0, we let the operating
system choose a free port (like mapi_autosense). Default behavior
has not changed.
* Mon Aug 10 2020 Ying Zhang <[email protected]> - 11.39.1-20201006
- MonetDB: Finished a first version of the new monitoring function
user_statistics(), which is only intended for the DBAs.
For each database user who has logged in during the current mserver5
session, it returns
"username": login name of the database user,
"querycount": the number of queries this user has executed since his/her
first login,
"totalticks": the total execution time (in microsecond) of the queries ran
by this user,
"maxquery": the query with the longest execution time (if two queries have
the same execution time, the newer overwrites the older),
"maxticks": the execution time of the 'maxquery' (in microsecond),
"started": the start timestamp of the 'maxquery',
"finished": the finish timestamp of the 'maxquery'.
* Thu Jul 23 2020 Pedro Ferreira <[email protected]> - 11.39.1-20201006
- sql: Removed compatibility between interval types and other numeric types in
favor for a more strict SQL standard compliance. This means operations
between temporal types and other numeric types such as INT and
DECIMAL are no longer possible, instead use interval types.
e.g. SELECT date '2020-01-01' + 1; now gives the error. Instead do:
SELECT date '2020-01-01' + interval '1' day; if 1 was meant to be a
day interval.
Setting an interval variable such as the session's current timezone
with a number e.g. SET current_timezone = 1; is no longer possible.
Instead do SET current_timezone = interval '1' hour;
Casting between interval and other numeric types is no longer possible
as well, because they are not compatible.
- sql: Because of incompatibilities this change may create, if a user intends