Skip to content

Commit

Permalink
Get postgres version from .env in Traffic Ops spec file
Browse files Browse the repository at this point in the history
  • Loading branch information
zrhoffman committed Sep 27, 2024
1 parent ab8d0ae commit 7ff96e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion traffic_ops/build/build_rpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,9 @@ initBuildArea() {
cp "$TO_DIR"/build/traffic_ops.spec "$RPMBUILD"/SPECS/. || \
{ echo "Could not copy spec files: $?"; return 1; }

source "${TC_DIR}/.env"
PLUGINS="$(grep -l 'AddPlugin(' "${TO_DIR}/traffic_ops_golang/plugin/"*.go | grep -v 'func AddPlugin(' | xargs -I '{}' basename {} '.go')"
export PLUGINS
export POSTGRES_VERSION PLUGINS

echo "The build area has been initialized."
}
Expand Down
3 changes: 2 additions & 1 deletion traffic_ops/build/traffic_ops.spec
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
%define TRAFFIC_OPS_LOG_DIR /var/log/traffic_ops
%define TRAFFIC_OPS_ROOT_CERTIFICATES_DIR /var/log/traffic_ops
%define debug_package %{nil}
%define postgres_version %{getenv:POSTGRES_VERSION}

Summary: Traffic Ops
Name: traffic_ops
Expand All @@ -36,7 +37,7 @@ AutoReqProv: no
Requires: cpanminus, expat-devel, libcurl, libpcap-devel, mkisofs, tar
Requires: openssl-devel, perl, perl-core, perl-DBD-Pg, perl-DBI, perl-Digest-SHA1
Requires: libidn-devel, libcurl-devel, libcap
Requires: postgresql13 >= 13.2
Requires: postgresql13 >= %{postgres_version}
Requires: perl-JSON, perl-libwww-perl, perl-Test-CPAN-Meta, perl-WWW-Curl, perl-TermReadKey, perl-Crypt-ScryptKDF
Requires: python3
Requires(pre): /usr/sbin/useradd, /usr/bin/getent
Expand Down

0 comments on commit 7ff96e4

Please sign in to comment.