Skip to content

Commit

Permalink
AQUILONAQD-1228/MAKEFILE-FOR-RHEL7-BUILD
Browse files Browse the repository at this point in the history
* graphviz package is not compatible for RHEL7, even with the latest
version. The scrips using these modules will not be executed on RHEL7
and will run RHEL6 based on the Makefile updates.
* If a client config file is specified on command line, that should
overide AQHOST env or default options.
* If the incoming readonly command has AQHOST /AQPORT set, the aqhost
not to be overriden.
  • Loading branch information
Karthik Kamurthy authored and Karthik Kamurthy committed Jun 10, 2022
1 parent 4eb2bee commit d91c1a9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ MPR := $(shell echo $(PWD) | awk -F/ '{print $$(NF-3), $$(NF-2), $$(NF-1)}')
META = $(word 1,$(MPR))
PROJ = $(word 2,$(MPR))
REL = $(word 3,$(MPR))
NON_AQ6_HOST := $(findstring 6., $(shell egrep '\s6\.[0-9]+' /etc/redhat-release))

ifneq (aquilon,$(META))
META = aquilon
Expand Down Expand Up @@ -121,8 +122,10 @@ install: remove_stale $(INSTALLFILES) install-doc
ln -sf aqd "$(COMMON)/sbin/aqd_readonly"
$(COMMON)/sbin/aqd --help >/dev/null
./tools/gen_completion.py --outputdir="$(COMMON)/etc" --templatedir="./etc/templates" --all
./tools/graph_schema.py --outputdir="$(COMMON)/doc"
./tools/build_schema_htdocs.py --outputdir="$(COMMON)/doc/schema"
if ! [ -z "${strip $(NON_AQ6_HOST)}" ]; then \
./tools/graph_schema.py --outputdir="$(COMMON)/doc"; \
./tools/build_schema_htdocs.py --outputdir="$(COMMON)/doc/schema"; \
fi

.PHONY: install-doc
install-doc:
Expand Down Expand Up @@ -189,4 +192,3 @@ thaw:
create:
vms create release ${META} ${PROJ} ${REL} -- -nobuildvolume
vms create install ${META} ${PROJ} ${REL} common

6 changes: 3 additions & 3 deletions bin/aq.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ def get_default_opts(auth_option, conf_file=None, readonly=None,
if globalOptions.get('aqconf'):
globalOptions.update(get_default_opts(globalOptions.get('auth'),
globalOptions.get('aqconf'),
readonly=is_readonly(command)))
readonly=is_readonly(command))[0])

# Default for /ms/dist
if re.match(r"/ms(/.(global|local)/[^/]+)?/dist/", BINDIR):
Expand All @@ -390,8 +390,8 @@ def get_default_opts(auth_option, conf_file=None, readonly=None,
default_aqhost = socket.gethostname()
default_aqservice = get_username()

if override_allowed:
host = defaultOpts.get('aqhost') or os.environ.get('AQHOST', None)
if override_allowed and not globalOptions.get('aqconf'):
host = os.environ.get('AQHOST', None) or defaultOpts.get('aqhost')
else:
host = globalOptions.get('aqhost') or os.environ.get('AQHOST', None) or \
defaultOpts.get('aqhost') or default_aqhost
Expand Down

0 comments on commit d91c1a9

Please sign in to comment.