You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by mi...@apache.org on 2021/06/09 14:52:39 UTC

[trafficcontrol] branch master updated: Use -p flag with `rpm -q` on the trafficserver RPM file (#5925)

This is an automated email from the ASF dual-hosted git repository.

mitchell852 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git


The following commit(s) were added to refs/heads/master by this push:
     new d73f98f  Use -p flag with `rpm -q` on the trafficserver RPM file (#5925)
d73f98f is described below

commit d73f98f093ebf24e2704317924339b99f8158f64
Author: Zach Hoffman <zr...@apache.org>
AuthorDate: Wed Jun 9 08:52:24 2021 -0600

    Use -p flag with `rpm -q` on the trafficserver RPM file (#5925)
    
    * Print commands run for this RUN instruction
    
    * Use -p flag with `rpm -q` on the trafficserver RPM file
---
 infrastructure/cdn-in-a-box/cache/Dockerfile | 4 ++--
 infrastructure/cdn-in-a-box/cache/run.sh     | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/infrastructure/cdn-in-a-box/cache/Dockerfile b/infrastructure/cdn-in-a-box/cache/Dockerfile
index c267fed..8df5e9b 100644
--- a/infrastructure/cdn-in-a-box/cache/Dockerfile
+++ b/infrastructure/cdn-in-a-box/cache/Dockerfile
@@ -86,9 +86,9 @@ RUN set -o errexit -o nounset -o xtrace; \
     dnf remove -y gcc-c++ glibc-devel autoconf automake libtool && \
     rm -f /astats_over_http.c /Makefile.am
 
-RUN set -o errexit -o nounset -o pipefail && \
+RUN set -o errexit -o nounset -o pipefail -o xtrace && \
     # The ssl directory needs to exist or the first sslkey file will be skipped on badass
-    etc_trafficserver="$(rpm -ql trafficserver.rpm | grep '/etc/trafficserver$')"; \
+    etc_trafficserver="$(rpm -qpl trafficserver.rpm | grep '/etc/trafficserver$')"; \
     if [[ ! -e "${etc_trafficserver}/ssl" ]]; then \
         echo 'Creating ssl directory...'; \
         mkdir "${etc_trafficserver}/ssl"; \
diff --git a/infrastructure/cdn-in-a-box/cache/run.sh b/infrastructure/cdn-in-a-box/cache/run.sh
index 7aeff74..c5f2d41 100755
--- a/infrastructure/cdn-in-a-box/cache/run.sh
+++ b/infrastructure/cdn-in-a-box/cache/run.sh
@@ -42,8 +42,8 @@ set_trafficserver_parameters() {
 		mid) ats_profile=/traffic_ops_data/profiles/020-ATS_MID_TIER_CACHE.json;;
 	esac
 	local trafficserver_version
-	trafficserver_version="$(rpm -qp --qf '%{version}-%{release}.%{arch}\n' /trafficserver.rpm)"
-	logfile_dir="$(rpm -ql /trafficserver.rpm | grep '/var/log/trafficserver$')"
+	trafficserver_version="$(rpm -q --qf '%{version}-%{release}.%{arch}\n' trafficserver)"
+	logfile_dir="$(rpm -ql trafficserver | grep '/var/log/trafficserver$')"
 
 	until [[ -s "$ats_profile" ]]; do
 		echo "Waiting for ${ats_profile} to exist..."