mssql-server.sh 1.13 KB
Newer Older
1 2
#!/bin/sh -x

Vitaly Lipatov's avatar
Vitaly Lipatov committed
3
# It will be run with two args: buildroot spec
4 5
BUILDROOT="$1"
SPEC="$2"
6
PRODUCTDIR=/opt/mssql
7

8 9
PREINSTALL_PACKAGES="libnuma libsss_nss_idmap bzip2 cyrus-sasl2 libcom_err libkrb5 libldap libsasl2-plugin-gssapi python3 su glibc-utils liblzma"

10 11
. $(dirname $0)/common.sh

12
# we need libssl/libcrypto-devel due libssl.so/libcrypto.so using (ALT bug 35559)
13
REQUIRES="python3 pbzip2 bzip2 gdb libnuma libkrb5 libsss_nss_idmap cyrus-sasl2 libsasl2-plugin-gssapi procps"
14

15 16 17 18
# ALT's su does not support -p last 20 years
subst "s|su -p |su |" $BUILDROOT/opt/mssql/lib/mssql-conf/invokesqlservr.sh

subst "1iAutoProv:no\nAutoReq:yes,nopython,nopython3\n# Converted from original package requires\nRequires:$REQUIRES\n" $SPEC
19 20 21

# fix typo
subst "s|Руѝѝкий|Русский|" $BUILDROOT/opt/mssql/lib/mssql-conf/mssqlconfhelper.py
22 23 24

# Set correct path to sysctl
subst 's|sysctl|/sbin/sysctl|' $BUILDROOT/opt/mssql/bin/crash-support-functions.sh
25
subst 's|/usr/bin/basename|/bin/basename|' $BUILDROOT/opt/mssql/bin/*.sh
26

27
if epm assure patchelf ; then
28
for i in $BUILDROOT/opt/mssql/lib/libunwind-x86_64.so.8 ; do
29
    a= patchelf --set-rpath '$ORIGIN/' $i
30
done
31
fi