forked from MonetDB/MonetDB
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMonetDB.spec
1531 lines (1295 loc) · 64.1 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
# SPDX-License-Identifier: MPL-2.0
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright 1997 - July 2008 CWI, August 2008 - 2023 MonetDB B.V.
%global name MonetDB
%global version 11.46.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
# 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).
%if %{fedpkgs}
# By default create the MonetDB-geom-MonetDB5 package on Fedora and RHEL 7
%bcond_without geos
%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
# By default, include Python 3 integration.
%bcond_without py3integration
%if %{fedpkgs}
# By default, create the MonetDB-cfitsio package.
%bcond_without fits
%endif
Name: %{name}
Version: %{version}
Release: %{release}
Summary: Monet Database Management System
Vendor: MonetDB BV <info@monetdb.org>
Group: Applications/Databases
License: MPL-2.0
URL: https://www.monetdb.org/
BugURL: https://github.com/MonetDB/MonetDB/issues
Source: https://www.monetdb.org/downloads/sources/Sep2022-SP2/%{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.
BuildRequires: /usr/lib/rpm/macros.d/macros.systemd
BuildRequires: checkpolicy
BuildRequires: selinux-policy-devel
BuildRequires: hardlink
BuildRequires: cmake3 >= 3.12
BuildRequires: gcc
BuildRequires: bison
BuildRequires: python3-devel
%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(libxml-2.0)
%if %{with pcre}
BuildRequires: pkgconfig(libpcre) >= 4.5
%endif
BuildRequires: pkgconfig(zlib)
BuildRequires: pkgconfig(liblz4) >= 1.8
%if %{with py3integration}
BuildRequires: pkgconfig(python3) >= 3.5
# cannot use python3dist(numpy) because of CentOS 7
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.
%ldconfig_scriptlets
%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/copybinary.h
%{_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}
%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): %{_bindir}/odbcinst
Requires(postun): %{_bindir}/odbcinst
%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}
%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} > 7
Recommends: python3dist(lz4)
Recommends: python3dist(scipy)
%endif
%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}/ODBCStmtAttr
%{_bindir}/ODBCgetInfo
%{_bindir}/ODBCmetadata
%{_bindir}/arraytest
%{_bindir}/bincopydata
%{_bindir}/odbcsample1
%{_bindir}/sample0
%{_bindir}/sample1
%{_bindir}/sample4
%{_bindir}/shutdowntest
%{_bindir}/smack00
%{_bindir}/smack01
%{_bindir}/streamcat
%{_bindir}/testcondvar
%{_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
Requires(pre): systemd
%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)
%{_sysusersdir}/monetdb.conf
%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
%{_libdir}/libmonetdb5.so.*
%{_libdir}/libmonetdbsql.so*
%dir %{_libdir}/monetdb5
%if %{with cintegration}
%{_libdir}/monetdb5/lib_capi.so
%endif
%{_libdir}/monetdb5/lib_generator.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
%{_includedir}/monetdb/mel.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
%{?systemd_requires}
%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.
%post SQL-server5
%systemd_post monetdbd.service
%preun SQL-server5
%systemd_preun monetdbd.service
%postun SQL-server5
%systemd_postun_with_restart monetdbd.service
%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
# RHEL >= 7, and all current Fedora
%{_tmpfilesdir}/monetdbd.conf
%{_unitdir}/monetdbd.service
%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 SQL-server5-devel
Summary: MonetDB5 SQL server modules
Group: Applications/Databases
Requires: %{name}-SQL-server5%{?_isa} = %{version}-%{release}
Requires: MonetDB5-server-devel%{?_isa} = %{version}-%{release}
%description SQL-server5-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 SQL extensions.
%files SQL-server5-devel
%defattr(-,root,root)
%{_includedir}/monetdb/exception_buffer.h
%{_includedir}/monetdb/opt_backend.h
%{_includedir}/monetdb/rel_*.h
%{_includedir}/monetdb/sql*.h
%{_includedir}/monetdb/store_*.h
%package embedded
Summary: MonetDB as an embedded library
Group: Applications/Databases
Requires: MonetDB5-server%{?_isa} = %{version}-%{release}
%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 known as MonetDBe. 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 embedded-tests
Summary: MonetDBe tests package
Group: Applications/Databases
Requires: %{name}-embedded%{?_isa} = %{version}-%{release}
%description embedded-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 some test programs using the %{name}-embedded
package. You probably don't need this, unless you are a developer.
%files embedded-tests
%defattr(-,root,root)
%{_bindir}/example_proxy
%package testing-python
Summary: MonetDB - Monet Database Management System
Group: Applications/Databases
Requires: %{name}-client-tests = %{version}-%{release}
Requires: python3dist(pymonetdb) >= 1.0.6
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}/Mconvert.py
%{_bindir}/Mtest.py
%{_bindir}/Mz.py
%{_bindir}/mktest.py
%{_bindir}/sqllogictest.py
%dir %{python3_sitelib}/MonetDBtesting
%{python3_sitelib}/MonetDBtesting/*
%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
%prep
%setup -q
%build
%cmake3 \
-DCMAKE_INSTALL_RUNSTATEDIR=/run \
-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_CURL=ON \
-DWITH_LZ4=ON \
-DWITH_LZMA=ON \
-DWITH_PCRE=ON \
-DWITH_PROJ=OFF \
-DWITH_READLINE=ON \
-DWITH_SNAPPY=OFF \
-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
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
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/lib_microbenchmark*.so
rm -f %{buildroot}%{_libdir}/monetdb5/lib_udf*.so
rm -f %{buildroot}%{_bindir}/monetdb_mtest.sh
rm -rf %{buildroot}%{_datadir}/monetdb # /cmake
if [ -x /usr/sbin/hardlink ]; then
/usr/sbin/hardlink -cv %{buildroot}%{_datadir}/selinux
else
# Fedora 31
/usr/bin/hardlink -cv %{buildroot}%{_datadir}/selinux
fi
# update shebang lines for Python scripts
%if %{?py3_shebang_fix:1}%{!?py3_shebang_fix:0}
# Fedora has py3_shebang_fix macro
%{py3_shebang_fix} %{buildroot}%{_bindir}/*.py
%else
# EPEL does not, but we can use the script directly
/usr/bin/pathfix.py -pni "%{__python3} -s" %{buildroot}%{_bindir}/*.py
%endif
%changelog
* Tue Jan 24 2023 Sjoerd Mullender <sjoerd@acm.org> - 11.45.13-20230124
- Rebuilt.
- GH#7343: GDKmmap requesting 0 virtual memory
- GH#7347: A bug where an exception occurs even though it is a query with
normal syntax (Merge Table)
* Mon Jan 23 2023 Sjoerd Mullender <sjoerd@acm.org> - 11.45.13-20230124
- sql: Fixed a regression where when there are multiple concurrent
transactions, the dependencies weren't checked properly.
* Mon Jan 16 2023 Sjoerd Mullender <sjoerd@acm.org> - 11.45.13-20230124
- gdk: Fixed a race condition that could lead to a bat being added to the SQL
catalog but nog being made persistent, causing a subsequent restart
of the system to fail (and crash).
* Wed Jan 4 2023 Sjoerd Mullender <sjoerd@acm.org> - 11.45.13-20230124
- odbc: A crash in the ODBC driver was fixed when certain unsupported functions
where used in a {fn ...} escape.
* Wed Dec 21 2022 Sjoerd Mullender <sjoerd@acm.org> - 11.45.13-20230124
- odbc: Prepare of a query where the sum of the number of parameters (question
marks in the query) and the number of output columns is larger than
100 could fail with an unexpected error. This has been fixed.
* Fri Dec 16 2022 Sjoerd Mullender <sjoerd@acm.org> - 11.45.13-20230124
- sql: Added some error checking to prevent crashes. Errors would mainly
occur under memory pressure.
* Wed Dec 14 2022 Sjoerd Mullender <sjoerd@acm.org> - 11.45.13-20230124
- gdk: Fixed a race condition where a hash could have been created on a
bat using the old bat count while in another thread the bat count
got updated. This would make the hash be based on too small a size,
causing failures later on.
* Wed Dec 14 2022 Sjoerd Mullender <sjoerd@acm.org> - 11.45.13-20230124
- sql: Fixed cleanup after a failed allocation where the data being cleaned
up was unitialized but still used as pointers to memory that also had
to be freed.
* Thu Dec 8 2022 Sjoerd Mullender <sjoerd@acm.org> - 11.45.13-20230124
- gdk: When extending a bat failed, the capacity had been updated already and
was therefore too large. This could then later cause a crash. This has
been fixed by only updating the capacity if the extend succeeded.
* Wed Dec 7 2022 Sjoerd Mullender <sjoerd@acm.org> - 11.45.13-20230124
- sql: Fixed a double cleanup after a failed allocation in COPY INTO. The
double cleanup could cause a crash due to a race condition it enabled.
* Mon Dec 05 2022 Sjoerd Mullender <sjoerd@acm.org> - 11.45.11-20221205
- Rebuilt.
- GH#7342: column which datatype is double couldn't group or aggregation
in version 11.45.7
* Mon Nov 28 2022 Sjoerd Mullender <sjoerd@acm.org> - 11.45.9-20221128
- Rebuilt.
- GH#7330: Creating temporary table fails after reconnect
- GH#7333: DLLs fail to load on Windows with accented characters in path
- GH#7336: Selecting from a literal-value table returns wrong values
- GH#7339: MonetDB corrupted state after SIGKILL
* Wed Nov 9 2022 Sjoerd Mullender <sjoerd@acm.org> - 11.45.9-20221128
- clients: Also dump the new options of CREATE USER.
* Wed Nov 9 2022 Sjoerd Mullender <sjoerd@acm.org> - 11.45.9-20221128
- gdk: On Windows, use the wide-character interface of system calls when
dealing with the environment (i.e. file names and getenv()).
- gdk: Memory leaks have been fixed.
- gdk: Improved maintenance of the estimated number of distinct values in BATs.
The estimate helps in deciding which low-level algorithm to use.
* Wed Nov 9 2022 Sjoerd Mullender <sjoerd@acm.org> - 11.45.9-20221128
- monetdb5: Fixed a crash when the server runs out of client contexts (i.e. more
concurrent clients than the server is configured to handle).
- monetdb5: A race condition in the SHA hash code was fixed which resulted in
occasional failed connection attempts when they occurred concurrently.
* Wed Nov 9 2022 Sjoerd Mullender <sjoerd@acm.org> - 11.45.9-20221128
- sql: Improved the handling of the "idle" value in the sys.sessions function
and view.
* Wed Oct 19 2022 Sjoerd Mullender <sjoerd@acm.org> - 11.45.9-20221128
- monetdb5: Fix a bug where the MAL optimizer would use the starttime of the
previous query to determine whether a query timeout occurred.
* Thu Oct 13 2022 Martin van Dinther <martin.van.dinther@monetdbsolutions.com> - 11.45.9-20221128
- odbc: Fixed issue with generated raw strings prefix when ODBC driver is used
against a server older than Jun2020 (11.37).
* Wed Oct 12 2022 Sjoerd Mullender <sjoerd@acm.org> - 11.45.9-20221128
- merovingian: Stop logging references to monetdbd's logfile in said logfile.
* Mon Oct 10 2022 Sjoerd Mullender <sjoerd@acm.org> - 11.45.9-20221128
- gdk: Offset heaps (.tailN files) were growing too fast and unnecessarily
under certain conditions. This has been fixed. Also, when such too
large files are now loaded into the system, it is recognized they are
too large and they are truncated to a more reasonable size.
* Fri Sep 23 2022 Sjoerd Mullender <sjoerd@acm.org> - 11.45.7-20220923
- Rebuilt.
* Thu Sep 22 2022 Sjoerd Mullender <sjoerd@acm.org> - 11.45.5-20220922
- Rebuilt.
* Wed Sep 21 2022 Sjoerd Mullender <sjoerd@acm.org> - 11.45.3-20220921
- Rebuilt.
* Wed Sep 21 2022 Sjoerd Mullender <sjoerd@acm.org> - 11.45.3-20220921
- clients: Dumping of function GRANTs was improved by adding the types of the
function (and procedure) arguments.
* Wed Sep 21 2022 Sjoerd Mullender <sjoerd@acm.org> - 11.45.3-20220921
- sql: The function sys.tracelog is now executable by anyone. The function
(and view of the same name) returns the tracing information of a query
that was prepended with the TRACE keyword.
* Mon Sep 19 2022 Sjoerd Mullender <sjoerd@acm.org> - 11.45.3-20220921
- gdk: Fixed a bug in ORDER BY with both NULLS LAST and LIMIT when the ordering
was on an interger or integer-like column and NULL values are present.
* Mon Sep 19 2022 Sjoerd Mullender <sjoerd@acm.org> - 11.45.3-20220921
- sql: Fixed a bug in COPY BINARY INTO where the input wasn't checked
thoroughly enough.
* Tue Sep 13 2022 Sjoerd Mullender <sjoerd@acm.org> - 11.45.3-20220921
- gdk: The median_avg and quantile_avg returned bogus results in the
non-grouped case (i.e. something like SELECT sys.median_avg(i) FROM t).
* Tue Sep 13 2022 Sjoerd Mullender <sjoerd@acm.org> - 11.45.1-20220913
- Rebuilt.
- GH#6982: Wrong constraint name in error message of constraint violation
- GH#7209: Configuration option for merovingian.log
- GH#7225: Invalid memory access when extending a BAT during appends
- GH#7227: Date calculations, bug or feature
- GH#7273: Concurrent reads and writes causes "BATproject2: does not match
always" error
- GH#7282: call sys.dump_table_data(); fails
- GH#7285: C-UDFs: aggr_group.count has wrong value (number of input rows
instead of number of groups).
- GH#7296: Implictly cast a timestamp string to DATE when appropriate
- GH#7297: Parsing partial dates behaves unpredictable