Skip to content

Commit 3afe9f5

Browse files
committed
import v15.7.0.9267
1 parent c1e7137 commit 3afe9f5

File tree

2,005 files changed

+64541
-115255
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,005 files changed

+64541
-115255
lines changed

3rdparty/centos6/boost-154.spec

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ BuildRequires: python-devel
9090
BuildRequires: libicu-devel
9191
BuildRequires: chrpath
9292
BuildRequires: python-libs
93+
BuildRequires: devtoolset-3
9394
#BuildRequires: openmpi-libs
9495

9596
%description
@@ -306,13 +307,13 @@ web page (http://www.boost.org/doc/libs/1_40_0).
306307
%patch13 -p1
307308

308309
%build
309-
./bootstrap.sh --prefix=/usr
310-
./bjam --without-mpi %{?_smp_mflags}
310+
scl enable devtoolset-3 "/bin/bash -c 'cd %{_builddir}/%{srcdir} ; ./bootstrap.sh --prefix=/usr'"
311+
scl enable devtoolset-3 "/bin/bash -c 'cd %{_builddir}/%{srcdir} ; ./bjam --without-mpi %{?_smp_mflags} cxxflags=-std=c++14'"
311312

312313
%install
313314
rm -rf $RPM_BUILD_ROOT
314315
cd %{_builddir}/%{srcdir}/
315-
./bjam --prefix=$RPM_BUILD_ROOT/usr install
316+
scl enable devtoolset-3 "/bin/bash -c 'cd %{_builddir}/%{srcdir} ; ./bjam --prefix=$RPM_BUILD_ROOT/usr install cxxflags=-std=c++14'"
316317
mkdir -p "$RPM_BUILD_ROOT/%{scidb_path}"
317318
mv "$RPM_BUILD_ROOT/usr/lib" "$RPM_BUILD_ROOT/%{scidb_path}"
318319
mv "$RPM_BUILD_ROOT/usr/include" "$RPM_BUILD_ROOT/%{scidb_path}"

3rdparty/centos6/build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ baseurl="http://downloads.paradigm4.com/centos6.3/3rdparty_sources"
3939

4040
# original URLs stored in ${base_url}/original.txt
4141
sources="
42+
cityhash-1.1.1.tar.gz
4243
mpich2-1.2.1.tar.gz
4344
boost_1_54_0.tar.bz2
4445
libpqxx-3.1.tar.gz

3rdparty/centos6/cityhash.spec

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
%define scidb_cityhash scidb-SCIDB_VERSION_MAJOR.SCIDB_VERSION_MINOR-cityhash
2+
%define scidb_path /opt/scidb/SCIDB_VERSION_MAJOR.SCIDB_VERSION_MINOR/3rdparty/cityhash
3+
%define short_name cityhash
4+
5+
Summary: Fast hash functions for strings
6+
Name: %{scidb_cityhash}
7+
Version: 1.1.1
8+
Release: 1
9+
License: MIT
10+
Group: Libraries
11+
URL: http://code.google.com/p/cityhash
12+
Source0: http://downloads.paradigm4.com/centos6.3/3rdparty_sources/%{short_name}-%{version}.tar.gz
13+
BuildRequires: libstdc++-devel
14+
15+
%define _unpackaged_files_terminate_build 0
16+
17+
%description
18+
CityHash provides hash functions for strings. The functions mix the
19+
input bits thoroughly but are not suitable for cryptography.
20+
21+
%prep
22+
%setup -q -n %{short_name}-%{version}
23+
24+
%global _prefix %{scidb_path}
25+
%global _datarootdir %{scidb_path}/share
26+
%global _datadir %{scidb_path}/share
27+
%global _mandir %{_datadir}/man
28+
%global _bindir %{_prefix}/bin
29+
%global _libdir %{_prefix}/lib
30+
%global _includedir %{_prefix}/include/%{short_name}
31+
32+
%build
33+
%configure \
34+
--prefix=%{_prefix} \
35+
--sysconfdir=%{_sysconfdir}/%{short_name} \
36+
--includedir=%{_includedir} \
37+
--bindir=%{_bindir} \
38+
--libdir=%{_libdir} \
39+
--datarootdir=%{_datarootdir} \
40+
--datadir=%{_datadir} \
41+
--mandir=%{_mandir} \
42+
--docdir=%{_datadir}/doc \
43+
--htmldir=%{_datadir}/doc \
44+
CFLAGS="-g -O3" \
45+
CXXFLAGS="-g -O3"
46+
%{__make}
47+
48+
%install
49+
rm -rf %{buildroot}
50+
%{__make} DESTDIR=%{buildroot} install
51+
52+
%clean
53+
rm -rf %{buildroot}
54+
55+
%post -p /sbin/ldconfig
56+
%postun -p /sbin/ldconfig
57+
58+
%files
59+
%defattr(644,root,root,755)
60+
%doc NEWS README
61+
%{_includedir}/city.h
62+
%{_libdir}/libcityhash.so
63+
%{_libdir}/libcityhash.so.0
64+
%{_libdir}/libcityhash.la
65+
%{_libdir}/libcityhash.a
66+
%attr(755,root,root) %{_libdir}/libcityhash.so.*.*.*

3rdparty/centos6/mpich2.spec

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Source0: http://downloads.paradigm4.com/centos6.3/3rdparty_sources/mpich2-%{vers
1313
BuildRequires: libXt-devel, libuuid-devel
1414
BuildRequires: java-devel-openjdk, gcc-gfortran
1515
BuildRequires: emacs-common, perl, python
16+
BuildRequires: devtoolset-3
1617
Requires: python
1718

1819
%define _unpackaged_files_terminate_build 0
@@ -124,7 +125,7 @@ Contains documentations, examples and manpages for mpich2
124125
MPICH2LIB_F90FLAGS="%{?opt_fc_fflags}" \
125126
MPICH2LIB_FFLAGS="%{?opt_f77_fflags}"
126127

127-
make VERBOSE=1
128+
scl enable devtoolset-3 "/bin/bash -c 'cd %{_builddir}/%{srcdir} ; make VERBOSE=1'"
128129

129130
%install
130131
rm -rf %{buildroot}

3rdparty/control

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Package: scidb-VERSION-ant
2+
Version: 0
3+
Architecture: all
4+
Maintainer: SciDB support list <[email protected]>
5+
Description: Apache Ant used for building JDBC

3rdparty/scidb-ant.spec

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Name: scidb-VERSION-ant
2+
Summary: Apache Ant used for building JDBC
3+
Version: 0
4+
Release: 1
5+
License: GPLv3
6+
Group: System Environment/Base
7+
URL: http://downloads.paradigm4.com
8+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
9+
BuildArch: noarch
10+
11+
%description
12+
Apache Ant used for building JDBC
13+
14+
%prep
15+
16+
%build
17+
18+
%install
19+
rm -rf %{buildroot}
20+
install -dm 755 %{buildroot}/opt/scidb/VERSION/3rdparty
21+
tar -xpf %{_sourcedir}/*.bz2 -C %{buildroot}/opt/scidb/VERSION/3rdparty
22+
23+
%clean
24+
25+
%files
26+
%defattr(-,root,root,-)
27+
%attr(-,root,root) /opt/scidb/VERSION/3rdparty/*
28+
29+
%changelog
30+
* Thu Apr 30 2015 SciDB support list <[email protected]>
31+
- Initial build.

3rdparty/scidb_ant_package.py

Lines changed: 228 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,228 @@
1+
#!/usr/bin/python
2+
#
3+
# BEGIN_COPYRIGHT
4+
#
5+
# Copyright (C) 2015 SciDB, Inc.
6+
# All Rights Reserved.
7+
#
8+
# This file is part of the Paradigm4 Enterprise SciDB distribution kit
9+
# and may only be used with a valid Paradigm4 contract and in accord
10+
# with the terms and conditions specified by that contract.
11+
#
12+
# END_COPYRIGHT
13+
#
14+
"""
15+
This script produces a package, either debian or rpm,
16+
that will install the latest ANT into /opt/scidb/VERSION/3rdparty
17+
"""
18+
import argparse
19+
import atexit
20+
import os
21+
import platform
22+
import re
23+
import shutil
24+
import subprocess
25+
import sys
26+
import tempfile
27+
28+
# GLOBALS
29+
_args = None # Parsed arguments.
30+
_MYDIR = None # Directory this script is in.
31+
_OS = None # The OS we are running on.
32+
_PGM = None # This script's name (basename).
33+
_TMPDIR = None # Temporary directory used as packaging directory.
34+
35+
# CONSTANTS
36+
_OS_CENTOS = "CentOS"
37+
_OS_UBUNTU = "Ubuntu"
38+
39+
_ANT_TARBALL = "https://downloads.paradigm4.com/centos6.3/3rdparty_binaries/apache-ant-1.9.4-bin.tar.bz2"
40+
_ANT_TARFILE = "apache-ant-1.9.4-bin.tar.bz2"
41+
42+
# UTILITY ROUTINES
43+
def create_tempdir():
44+
global _TMPDIR
45+
46+
_TMPDIR = tempfile.mkdtemp()
47+
atexit.register(remove_tempdir)
48+
49+
50+
def remove_tempdir():
51+
if not _args.verbose:
52+
shutil.rmtree(_TMPDIR)
53+
54+
55+
class AppError(Exception):
56+
pass
57+
58+
59+
def printDebug(string, force=False):
60+
if _args.verbose or force:
61+
print >> sys.stderr, "DEBUG(%s): %s" % (_PGM, string)
62+
63+
def replaceVERSION(inFile, outFile):
64+
# Rewrite the inFile file to the outFile file substituting the scidb version for the string VERSION
65+
with open(inFile, "r") as source:
66+
contents = source.read()
67+
with open(outFile, "w") as output:
68+
output.write(contents.replace('VERSION',_args.version))
69+
printDebug("Rewrote %s" % outFile)
70+
71+
72+
def prepare_package(OS, OSversion):
73+
"""Prepare the packaging directory."""
74+
if OS == _OS_CENTOS:
75+
SOURCES_dir=os.path.join(_TMPDIR, "SOURCES")
76+
SPECS_dir=os.path.join(_TMPDIR, "SPECS")
77+
# Create SOURCES directory
78+
if not os.path.exists(SOURCES_dir):
79+
try:
80+
os.makedirs(SOURCES_dir)
81+
except:
82+
raise AppError("Unable to create SOURCES directory '%s'." % SOURCES_dir)
83+
printDebug("Created %s" % SOURCES_dir)
84+
# Create SPECS directory
85+
if not os.path.exists(SPECS_dir):
86+
try:
87+
os.makedirs(SPECS_dir)
88+
except:
89+
raise AppError("Unable to create SPECS directory '%s'." % SPECS_dir)
90+
printDebug("Created %s" % SPECS_dir)
91+
# Rewrite specs file, substituting scidb version for string VERSION
92+
replaceVERSION(os.path.join(_MYDIR, "scidb-ant.spec"), os.path.join(SPECS_dir, "scidb-ant.spec"))
93+
# Copy into SOURCES _ANT_TARBALL
94+
cmdline = ["wget",
95+
"--directory-prefix=" + SOURCES_dir,
96+
_ANT_TARBALL]
97+
printDebug(cmdline)
98+
subprocess.call(cmdline)
99+
elif OS == _OS_UBUNTU:
100+
package_dir=os.path.join(_TMPDIR, "scidb-" + _args.version + "-ant")
101+
DEBIAN_dir=os.path.join(package_dir, "DEBIAN")
102+
OPT_THIRD_dir=os.path.join(package_dir, "opt", "scidb", _args.version, "3rdparty")
103+
# Create DEBIAN directory
104+
if not os.path.exists(DEBIAN_dir):
105+
try:
106+
os.makedirs(DEBIAN_dir)
107+
except:
108+
raise AppError("Unable to create DEBIAN directory '%s'." % DEBIAN_dir)
109+
printDebug("Created %s" % DEBIAN_dir)
110+
# Create OPT THIRD directory
111+
if not os.path.exists(OPT_THIRD_dir):
112+
try:
113+
os.makedirs(OPT_THIRD_dir)
114+
except:
115+
raise AppError("Unable to create OPT_THIRD directory '%s'." % OPT_THIRD_dir)
116+
printDebug("Created %s" % OPT_THIRD_dir)
117+
# Rewrite control file, substituting scidb _args.version
118+
replaceVERSION(os.path.join(_MYDIR, "control"), os.path.join(DEBIAN_dir, "control"))
119+
# Copy into THIRD _ANT_TARBALL
120+
cmdline = ["wget",
121+
"--directory-prefix=" + _TMPDIR,
122+
_ANT_TARBALL]
123+
printDebug(cmdline)
124+
subprocess.call(cmdline)
125+
cmdline = ["tar", "-xpf",
126+
os.path.join(_TMPDIR, _ANT_TARFILE),
127+
"-C", OPT_THIRD_dir]
128+
printDebug(cmdline)
129+
subprocess.call(cmdline)
130+
131+
def create_package(OS):
132+
"""Call the package creation method particular to the OS"""
133+
if OS == _OS_CENTOS:
134+
cmdline = ["rpmbuild",
135+
"--quiet",
136+
"--define", "_topdir " + _TMPDIR,
137+
"-bb", os.path.join(_TMPDIR, "SPECS", "scidb-ant.spec")]
138+
if _args.verbose:
139+
cmdline.remove("--quiet")
140+
printDebug(cmdline)
141+
subprocess.call(cmdline)
142+
elif OS == _OS_UBUNTU:
143+
cmdline = ["dpkg-deb",
144+
"--build",
145+
os.path.join(_TMPDIR, "scidb-" + _args.version + "-ant")]
146+
printDebug(cmdline)
147+
with open("/dev/null", "w") as null:
148+
subprocess.call(cmdline,stdout=null,stderr=null)
149+
150+
151+
def copyout_results(OS):
152+
"""Copy out the resulting package to the results directory."""
153+
if OS == _OS_CENTOS:
154+
shutil.copy(
155+
os.path.join(_TMPDIR, "RPMS", "noarch", "scidb-" + _args.version + "-ant-0-1.noarch.rpm"),
156+
_args.results_dir)
157+
elif OS == _OS_UBUNTU:
158+
shutil.copy(
159+
os.path.join(_TMPDIR, "scidb-" + _args.version + "-ant.deb"),
160+
os.path.join(_args.results_dir, "scidb-" + _args.version + "-ant.deb"))
161+
162+
163+
def main(argv=None):
164+
global _args
165+
global _MYDIR
166+
global _OS
167+
global _PGM
168+
169+
if argv is None:
170+
argv = sys.argv
171+
172+
_PGM = os.path.basename(argv[0])
173+
_MYDIR = os.path.dirname(os.path.realpath(argv[0]))
174+
175+
# Where are we (what OS).
176+
_OS, OSversion, OScodename = platform.linux_distribution()
177+
178+
# Argument processing
179+
if _OS == _OS_CENTOS:
180+
parser = argparse.ArgumentParser(
181+
description='Produce an rpm package for Apache Ant that is used for building JDBC',
182+
epilog='Type "pydoc %s" for more information.' % _PGM)
183+
elif _OS == _OS_UBUNTU:
184+
parser = argparse.ArgumentParser(
185+
description='Produce a debian package for Apache Ant that is used for building JDBC',
186+
epilog='Type "pydoc %s" for more information.' % _PGM)
187+
else:
188+
raise AppError("Unsupported Platform.")
189+
parser.add_argument('version', help='The SciDB Version you are building.')
190+
parser.add_argument('results_dir', help='Directory to put the package in.')
191+
parser.add_argument('-v','--verbose', action='store_true', help="display verbose output")
192+
_args = parser.parse_args(argv[1:])
193+
194+
printDebug("OS=%s, OSversion=%s, OScodename=%s" % (_OS,OSversion,OScodename))
195+
printDebug("version=%s, results_dir=%s" % (_args.version,_args.results_dir))
196+
197+
# Argument Checks
198+
if re.match("^\d{2}?\.\d{1,2}?$", _args.version) is None:
199+
raise AppError("Version '%s' is not valid." % _args.version)
200+
if not os.path.exists(_args.results_dir):
201+
try:
202+
os.makedirs(_args.results_dir)
203+
except:
204+
raise AppError("Unable to create results directory '%s'." % _args.results_dir)
205+
if not os.access(_args.results_dir, os.W_OK):
206+
raise AppError("Unable to write to results directory '%s'." % _args.results_dir)
207+
# User ID Check
208+
if os.geteuid() != 0:
209+
raise AppError("Script must be run with root privileges.")
210+
211+
create_tempdir()
212+
printDebug("TMPDIR=%s" % _TMPDIR)
213+
214+
prepare_package(_OS, OSversion)
215+
216+
create_package(_OS)
217+
218+
copyout_results(_OS)
219+
220+
return 0
221+
222+
223+
if __name__ == '__main__':
224+
try:
225+
sys.exit(main())
226+
except AppError as e:
227+
print >>sys.stderr, "ERROR(%s): %s" % (_PGM, e)
228+
sys.exit(2)

0 commit comments

Comments
 (0)