Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EQMacEmu (Quarm) Separation, Setup & Requirements #33

Open
wants to merge 51 commits into
base: master
Choose a base branch
from

Conversation

chazix
Copy link

@chazix chazix commented Nov 3, 2023

  • to-do: migrate my github specific links to official quarm links

chazix added 30 commits October 29, 2023 02:23
…sting (update, update-source, m); alias reconfiguration to point to correct -DCURL_LIBRARY -DCURL_INCLUDE_DIR (cm)
…elative path for -DCURL_LIBRARY, -DCURL_INCLUDE_DIR
…s (libcurl4-openssl-dev), to prevent having to build the entire image with requirements; removing -DCURL_LIBRARY, -DCURL_INCLUDE_DIR
…uild (since we're not re-creating the image)
Comment on lines 94 to 124
init-eqemu-config-peq: ##@init eqemu config for PEQ
@cat ~/server/eqemu_config.json \
| jq '.server.database.password = "${EQEMU_DB_PASSWORD}"' \
| jq '.server.world.key = "$(shell cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w $${1:-32} | head -n 1)"' \
| jq '.server.zones.ports.high = "${PORT_RANGE_HIGH}"' \
| jq '.server.world.address = "${IP_ADDRESS}"' \
| tee ~/server/eqemu_config.json

init-eqemu-config-quarm: ##@init eqemu config for Quarm
@cat ~/server/eqemu_config.json \
| jq '.server.qsdatabase.host = "$(shell ~/assets/scripts/init/get-config-var.sh '.server.database.host')"' \
| jq '.server.qsdatabase.db = "$(shell ~/assets/scripts/init/get-config-var.sh '.server.database.db')"' \
| jq '.server.qsdatabase.username = "$(shell ~/assets/scripts/init/get-config-var.sh '.server.database.username')"' \
| jq '.server.qsdatabase.password = "$(shell ~/assets/scripts/init/get-config-var.sh '.server.database.password')"' \
| jq '.server.database.password = "${EQEMU_DB_PASSWORD}"' \
| jq '.server.world.key = "$(shell cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w $${1:-32} | head -n 1)"' \
| jq '.server.world.loginserver1.host = "${IP_ADDRESS}"' \
| jq '.server.zones.ports.high = "${PORT_RANGE_HIGH}"' \
| jq '.server.world.address = "${REMOTE_IP_ADDRESS}"' \
| jq '.server.world.localaddress = "${IP_ADDRESS}"' \
| jq '.server.chatserver.host = "${IP_ADDRESS}"' \
| tee ~/server/eqemu_config.json

init-eqemu-config: ##@init Bootstraps eqemu config
@./assets/scripts/banner.pl "Initializing EQEmu Config"
@make pull-docker-config
@cat ~/server/eqemu_config.json \
| jq '.server.database.password = "${EQEMU_DB_PASSWORD}"' \
| jq '.server.world.key = "$(shell cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w $${1:-32} | head -n 1)"' \
| jq '.server.zones.ports.high = "${PORT_RANGE_HIGH}"' \
| jq '.server.world.address = "${IP_ADDRESS}"' \
| tee ~/server/eqemu_config.json
ifeq ("$(PLATFORM_TARGET)", "peq")
@make init-eqemu-config-peq
else ifeq ("$(PLATFORM_TARGET)", "quarm")
@make init-eqemu-config-quarm
endif
Copy link
Author

@chazix chazix Nov 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm encountering some sort of race condition issue here. Where some of the variables, particularly .server.qsdatabase.password is not getting written to the eqemu_config.json

I verified all the environment variables are as expected. If I run make init-eqemu-config-quarm manually, it emplaces correctly.

If you can take a look that would be great, or a suggestion. Issue appears to be:

  • running make init-eqemu-config reproduces
  • commands executing in parallel
  • pulling config occurs before or after the jq commands
  • jq commands not executing in order

chazix added 13 commits November 5, 2023 01:58
…IP_ADDRESS (this will use IP_ADDRESS if no remote specified); potential fix for .server.qsdatabase.{host|db|username|password} data setting race condition
…stent eqemu_config.json on my end; need to restore .server.directories.maps after spire:occulus-update
…counter situations where it doesn't pull even tho it appears it is
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant