[Asterisk-code-review] CI: New way to determnine libdir (...asterisk[13])

George Joseph asteriskteam at digium.com
Tue Jun 25 09:07:49 CDT 2019


George Joseph has submitted this change and it was merged. ( https://gerrit.asterisk.org/c/asterisk/+/11482 )

Change subject: CI:  New way to determnine libdir
......................................................................

CI:  New way to determnine libdir

We were using the presence of /usr/lib64 to determine where
shared libraries should be installed.  This only existed on
Redhat based systems and was safe.  If it existed, use it,
otherwise use /usr/lib.

Unfortunately, Ubuntu 19 decided to create a /usr/lib64 BUT
NOT INCLUDE IT IN THE DEFAULT ld.so.conf.  So if anything is
installed there, it won't work.

The new method, just looks for $ID in /etc/os-release and if it's
centos or fedora, uses /usr/lib64 and if ubuntu, uses /usr/lib.

NOTE:  This applies only to the CI scripts.  Normal asterisk
build and install is not affected.

Change-Id: Iad66374b550fd89349bedbbf2b93f8edd195a7c3
---
M tests/CI/buildAsterisk.sh
A tests/CI/findLibdir.sh
2 files changed, 15 insertions(+), 1 deletion(-)

Approvals:
  Joshua Colp: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved; Approved for Submit



diff --git a/tests/CI/buildAsterisk.sh b/tests/CI/buildAsterisk.sh
index b8c301b..f5980e8 100755
--- a/tests/CI/buildAsterisk.sh
+++ b/tests/CI/buildAsterisk.sh
@@ -89,7 +89,7 @@
 
 MAKE=`which make`
 PKGCONFIG=`which pkg-config`
-[ -d /usr/lib64 ] && _libdir=/usr/lib64
+_libdir=`${CIDIR}/findLibdir.sh`
 
 common_config_args="--prefix=/usr ${_libdir:+--libdir=${_libdir}} --sysconfdir=/etc --with-pjproject-bundled"
 $PKGCONFIG 'jansson' || common_config_args+=" --with-jansson-bundled"
diff --git a/tests/CI/findLibdir.sh b/tests/CI/findLibdir.sh
new file mode 100755
index 0000000..ed25ba3
--- /dev/null
+++ b/tests/CI/findLibdir.sh
@@ -0,0 +1,14 @@
+#!/usr/bin/env bash
+
+source /etc/os-release
+
+case $ID in
+	centos)
+		echo /usr/lib64
+		;;
+	fedora)
+		echo /usr/lib64
+		;;
+	ubuntu)
+		echo /usr/lib
+esac

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/11482
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: Iad66374b550fd89349bedbbf2b93f8edd195a7c3
Gerrit-Change-Number: 11482
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190625/d8c41b6f/attachment-0001.html>


More information about the asterisk-code-review mailing list