xref: /aoo41x/main/solenv/bin/rpm-wrapper (revision e76eebc6)
1cdf0e10cSrcweir#!/bin/bash
2*e76eebc6SAndrew Rist#**************************************************************
3*e76eebc6SAndrew Rist#
4*e76eebc6SAndrew Rist#  Licensed to the Apache Software Foundation (ASF) under one
5*e76eebc6SAndrew Rist#  or more contributor license agreements.  See the NOTICE file
6*e76eebc6SAndrew Rist#  distributed with this work for additional information
7*e76eebc6SAndrew Rist#  regarding copyright ownership.  The ASF licenses this file
8*e76eebc6SAndrew Rist#  to you under the Apache License, Version 2.0 (the
9*e76eebc6SAndrew Rist#  "License"); you may not use this file except in compliance
10*e76eebc6SAndrew Rist#  with the License.  You may obtain a copy of the License at
11*e76eebc6SAndrew Rist#
12*e76eebc6SAndrew Rist#    http://www.apache.org/licenses/LICENSE-2.0
13*e76eebc6SAndrew Rist#
14*e76eebc6SAndrew Rist#  Unless required by applicable law or agreed to in writing,
15*e76eebc6SAndrew Rist#  software distributed under the License is distributed on an
16*e76eebc6SAndrew Rist#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17*e76eebc6SAndrew Rist#  KIND, either express or implied.  See the License for the
18*e76eebc6SAndrew Rist#  specific language governing permissions and limitations
19*e76eebc6SAndrew Rist#  under the License.
20*e76eebc6SAndrew Rist#
21*e76eebc6SAndrew Rist#**************************************************************
22cdf0e10cSrcweir
23cdf0e10cSrcweir# At least on v20z-so3, when /so/env/bt_linux_libc2.11/DEV300/bin/rpm is called
24cdf0e10cSrcweir# and internally looks for a ld-linux.so.2, it picks up
25cdf0e10cSrcweir# /lib/tls/i686/cmov/ld-linux.so.2 and SIGSEGVs.  This is prevented by
26cdf0e10cSrcweir# adding /so/env/bt_linux_libc2.11/DEV300/lib to the LD_LIBRARY_PATH, thus
27cdf0e10cSrcweir# picking up the ld-linux.so.2 from there:
28cdf0e10cSrcweir
29cdf0e10cSrcweirset -e
30cdf0e10cSrcweirif [ "$OUTPATH" = "unxlngi6" ]
31cdf0e10cSrcweirthen
32cdf0e10cSrcweirLD_LIBRARY_PATH=${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}${LIBRARY_PATH?} \
33cdf0e10cSrcweir    ${BUILD_TOOLS?}/rpmbuild "$@"
34cdf0e10cSrcweirelse
35cdf0e10cSrcweirif [ "$OUTPATH" = "unxlngx6" ]
36cdf0e10cSrcweirthen
37cdf0e10cSrcweirLD_LIBRARY_PATH=${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}${LIBRARY_PATH?} \
38cdf0e10cSrcweir    ${BUILD_TOOLS?}/rpmbuild "$@"
39cdf0e10cSrcweirelse
40cdf0e10cSrcweirLD_LIBRARY_PATH=${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}${COMPATH?}/lib \
41cdf0e10cSrcweir    ${BUILD_TOOLS?}/rpm "$@"
42cdf0e10cSrcweirfi
43cdf0e10cSrcweirfi
44