diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e1dff995433a373c8e6c9fa24d2f0bc1caafe5d..dda53a347d2bea3c854ca946a74657335f926b18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Add information about realtime option to usage * Cleaned up the output of `make vars` and `make devvars` * Merged together `configure/E3` and `configure/MODULES` +* Removed `siteLibs` and `siteApps` directories ## [3.4.1] diff --git a/SPECIAL_MODE.md b/SPECIAL_MODE.md index dcc82787b9ca1809dc2433cf35db6c2f4715bc82..7fe22b925755c959f39110f6635c02610cfbaa5d 100644 --- a/SPECIAL_MODE.md +++ b/SPECIAL_MODE.md @@ -32,71 +32,5 @@ Here we set the `LD_BIND_NOW=1` before we are going into actually IOC applicatio iocsh.bash -rt ``` -## ESS Site System Application Mode -ESS is planing to deploy its through site-wide NFS shared directories. Due to long-term maintenance issues and minimal footprints on e3 application, we also introduce the SAMode (System Application Mode). It only is valid for the site-wide deployment system, not for any local installation. - -Technically, e3 uses `E3_SITEAPPS_PATH` to install any system specific applications. Without any modification, the default path is defined as follows: -``` -E3_SITEAPPS_PATH= /epics/base-3.15.6/require/3.1.0/siteApps -``` - -However, for the system or subsystem deployment procedure, we will replace them system or subsystem specific shared folders, for example, such as -* ICS : `/siteApps/ics` -* Accelerator : `/siteApps/acc` -* Conventional Facility : `/siteApps/cf` -* Target : `/siteApps/tgt` -* Experiments : `/siteApps/exp` and `/siteApps/exp{1..16}` - -These parameter is define in each `configure/CONFIG_SITE_SYSTEMAPPS` as `E3_MODULES_PATH:=` and can be overridden via `configure/CONFIG_SITE_SYSTEMAPPS.local` also during the static (configure, build, and install) procedure. - -When an IOC is running, each IOC should know where they are belong into through `IOCID`, and will set `SITE_SYSTEMAPPS_PATH` before doing `source setE3Env.bash` and `iocsh.bash` or run `iocsh.bash` directly. - -* Static -``` -$ e3-myexample (master)$ echo "E3_MODULES_PATH=/siteApps/icsApps" > configure/CONFIG_SITE_SYSTEMAPPS.local -$ e3-myexample (master)$ make init -$ e3-myexample (master)$ make build -$ e3-myexample (master)$ sudo make install -$ e3-myexample (master)$ make existent -/siteApps/icsApps/myexample -└── master - ├── db - ├── dbd - ├── include - └── lib -``` -* Running -``` -export SITE_SYSTEMAPPS_PATH=/siteApps/icsApps/ -source setE3Env.bash -echo $EPICS_DRIVER_PATH -/home/jhlee/e3-test/base-3.15.6/require/3.1.0/siteMods:/home/jhlee/e3-test/base-3.15.6/require/3.1.0/siteApps:/siteApps/icsApps/ -iocsh.bash -r myexample,master -.... -require myexample,master -Module myexample version master found in /siteApps/icsApps//myexample/master/ -Module myexample depends on sequencer 2.2.6 -Module sequencer version 2.2.6 found in /home/jhlee/e3-test/base-3.15.6/require/3.1.0/siteMods/sequencer/2.2.6/ -Loading library /home/jhlee/e3-test/base-3.15.6/require/3.1.0/siteMods/sequencer/2.2.6/lib/linux-x86_64/libsequencer.so -Loaded sequencer version 2.2.6 -sequencer has no dbd file -Loading module info records for sequencer -Loading library /siteApps/icsApps//myexample/master/lib/linux-x86_64/libmyexample.so -Loaded myexample version master -Loading dbd file /siteApps/icsApps//myexample/master/dbd/myexample.dbd -Calling function myexample_registerRecordDeviceDriver -Loading module info records for myexample -# Set the IOC Prompt String One -epicsEnvSet IOCSH_PS1 "c72f6a5.kaffee.31345 > " - -``` - -For the deployment system, we have to define each `E3_MODULES_PATH` differently within system specific application, it will be done with the global `CONFIG_SITE_SYSTEMAPPS.local`. And each ioc should know `SITE_SYSTEMAPPS_PATH` in order to match `E3_MODULES_PATH` before it starts. - -* `IOCID` defines a system group -* Before the systemd service, the additional systemd service check "mountable" path, which will be used in `SITE_SYSTEMAPPS_PATH`, and do `export $SITE_SYSTEMAPPS_PATH` globally. - - - ## References [1] Original paragraph from Red Hat Enterprise Linux for Real Time 7 Tuning Guide. 2018-04-30 / CC BY-SA 3.0 https://creativecommons.org/licenses/by-sa/3.0/ diff --git a/configure/E3/CONFIG b/configure/E3/CONFIG index d8dac693e96d7a17b63a328c31736be6a36da429..bd6ac2a15e12bc7871d36f4fa28018f67fdf993b 100644 --- a/configure/E3/CONFIG +++ b/configure/E3/CONFIG @@ -3,7 +3,7 @@ # Update the module version (for numeric versions) with a build number of 0 if none is specified E3_MODULE_VERSION:=$(E3_MODULE_VERSION)$(shell [[ "$(E3_MODULE_VERSION)" =~ ^[0-9]+\.[0-9]+\.[0-9]+$$ ]] && echo +0) -E3_MODULES_PATH?=$(E3_REQUIRE_LOCATION)/siteMods +E3_MODULES_PATH?=$(E3_SITEMODS_PATH) include $(EPICS_BASE)/configure/CONFIG_BASE_VERSION include $(REQUIRE_CONFIG)/CONFIG_REQUIRE diff --git a/configure/E3/CONFIG_E3_MAKEFILE b/configure/E3/CONFIG_E3_MAKEFILE index f3d6ba4b6dc5230b20519468f7d7bf27325ed657..d06e0976696ed182e5df8621ecbda1b75821ffee 100644 --- a/configure/E3/CONFIG_E3_MAKEFILE +++ b/configure/E3/CONFIG_E3_MAKEFILE @@ -9,8 +9,6 @@ E3_REQUIRE_MAKEFILE_INPUT_OPTIONS += EPICS_MODULES="$(E3_MODULES_PATH)" E3_REQUIRE_MAKEFILE_INPUT_OPTIONS += EPICS_LOCATION="$(EPICS_BASE)" E3_REQUIRE_MAKEFILE_INPUT_OPTIONS += BUILDCLASSES="Linux" E3_REQUIRE_MAKEFILE_INPUT_OPTIONS += E3_SITEMODS_PATH="$(E3_SITEMODS_PATH)" -E3_REQUIRE_MAKEFILE_INPUT_OPTIONS += E3_SITEAPPS_PATH="$(E3_SITEAPPS_PATH)" -E3_REQUIRE_MAKEFILE_INPUT_OPTIONS += E3_SITELIBS_PATH="$(E3_SITELIBS_PATH)" ifeq ($(shell git status > /dev/null 2>&1; echo $$?),0) GIT_REMOTE_NAME := $(shell git remote | head -n 1) diff --git a/configure/E3/CONFIG_E3_PATH b/configure/E3/CONFIG_E3_PATH index 43e724ec3742ad84de80b6225c4ee2e1fa0bafba..e438b162b49580b87f56b5c2e76e1a1ad12a71f2 100644 --- a/configure/E3/CONFIG_E3_PATH +++ b/configure/E3/CONFIG_E3_PATH @@ -1,8 +1,6 @@ E3_SITEMODS_PATH:=$(E3_REQUIRE_LOCATION)/siteMods -E3_SITELIBS_PATH:=$(E3_REQUIRE_LOCATION)/siteLibs -E3_SITEAPPS_PATH:=$(E3_REQUIRE_LOCATION)/siteApps E3_MODULES_INSTALL_LOCATION:=$(E3_MODULES_PATH)/$(E3_MODULE_NAME)/$(E3_MODULE_VERSION) diff --git a/configure/E3/CONFIG_EXPORT b/configure/E3/CONFIG_EXPORT index 6d5b66093de4e210d1c539f72b5e2ea155d3a2f9..c3cfd358889fa1cac42808f1e055904eeccc5382 100644 --- a/configure/E3/CONFIG_EXPORT +++ b/configure/E3/CONFIG_EXPORT @@ -10,8 +10,6 @@ EXPORT_VARS+=MSI EXPORT_VARS+=E3_MODULE_NAME EXPORT_VARS+=E3_MODULE_VERSION EXPORT_VARS+=E3_SITEMODS_PATH -EXPORT_VARS+=E3_SITEAPPS_PATH -EXPORT_VARS+=E3_SITELIBS_PATH EXPORT_VARS+=$(filter E3_REQUIRE_%,$(.VARIABLES)) EXPORT_VARS+=QUIET diff --git a/configure/E3/RULES_CHECKS b/configure/E3/RULES_CHECKS index 184c57c872b8f18a47aba36a45d73e1dcebe9a80..2460767ea4e4a92e6129a1d8cab0c1eae97a5e0e 100644 --- a/configure/E3/RULES_CHECKS +++ b/configure/E3/RULES_CHECKS @@ -11,7 +11,7 @@ ifneq ($(shell echo $(E3_MODULE_NAME) | grep -q '^[a-z_][a-z0-9_]*$$' ; echo $$? $(error E3_MODULE_NAME '$(E3_MODULE_NAME)' is not valid. It should consist only of lowercase letters, numbers, and underscores.) endif -# Check that a module is including RULES_SITEMODS instead of RULES_SITEAPPS or manually including RULES_E3 +# Check that a module is including RULES_SITEMODS instead of manually including RULES_E3 .PHONY: sitemods_check sitemods_check: ifeq ($(filter RULES_SITEMODS,$(notdir $(MAKEFILE_LIST))),) diff --git a/configure/module/RULES_REQUIRE b/configure/module/RULES_REQUIRE index 5b56c10929357e453129358409ad43af3fd635fb..1b10dad6285d38b7c7137e4988865472bdbedd1e 100644 --- a/configure/module/RULES_REQUIRE +++ b/configure/module/RULES_REQUIRE @@ -37,9 +37,7 @@ e3-require-path: e3-site-path: - $(QUIET) install -d -m 755 $(E3_SITELIBS_PATH) $(QUIET) install -d -m 755 $(E3_SITEMODS_PATH) - $(QUIET) install -d -m 755 $(E3_SITEAPPS_PATH) .PHONY: epics epics: diff --git a/require-ess/tools/driver.makefile b/require-ess/tools/driver.makefile index bc82e97dae0ef7d38305db553f492b550d17f649..6c97297647703d9e0ef2809403930ca8aa8c6b15 100644 --- a/require-ess/tools/driver.makefile +++ b/require-ess/tools/driver.makefile @@ -72,7 +72,6 @@ EPICS_LOCATION = ##---## In E3, we extract BASE_VERSION from EPICS_LOCATION E3_EPICS_VERSION:=$(patsubst base-%,%,$(notdir $(EPICS_LOCATION))) E3_SITEMODS_PATH = -E3_SITEAPPS_PATH = BUILD_EPICS_VERSIONS = $(E3_EPICS_VERSION) ##---## @@ -520,7 +519,6 @@ define ADD_INCLUDES_TEMPLATE INSTALL_INCLUDES += $$(patsubst %,-I${2}/$(1)/%/include,$$(call FETCH_BUILD_NUMBER,$(2),$(1))) endef $(foreach m,$(filter-out $(PRJ),$(notdir $(wildcard ${E3_SITEMODS_PATH}/*))),$(eval $(call ADD_INCLUDES_TEMPLATE,$m,$(E3_SITEMODS_PATH)))) -$(foreach m,$(filter-out $(PRJ),$(notdir $(wildcard ${E3_SITEAPPS_PATH}/*))),$(eval $(call ADD_INCLUDES_TEMPLATE,$m,$(E3_SITEAPPS_PATH)))) $(foreach m,$(filter-out $(PRJ),$(notdir $(wildcard ${EPICS_MODULES}/*))) ,$(eval $(call ADD_INCLUDES_TEMPLATE,$m,$(EPICS_MODULES)))) BASERULES=${EPICS_BASE}/configure/RULES @@ -913,7 +911,6 @@ ${METAFILE}: define DEP_PARSER s%$(E3_SITEMODS_PATH)/*\([^/]*\)/\([^/]*\)/.*%\1 \2%p; \ -s%$(E3_SITEAPPS_PATH)/*\([^/]*\)/\([^/]*\)/.*%\1 \2%p; \ s%$(EPICS_MODULES)/*\([^/]*\)/\([^/]*\)/.*%\1 \2%p endef diff --git a/require-ess/tools/setE3Env.bash b/require-ess/tools/setE3Env.bash index 51ab1ac6a2fb0cdb2270ab0f3189d970abb8f0e4..6663a44005f462559844749df6e2fdf5fa92d6eb 100644 --- a/require-ess/tools/setE3Env.bash +++ b/require-ess/tools/setE3Env.bash @@ -150,8 +150,6 @@ if [ -n "$EPICS_BASE" ]; then unset E3_REQUIRE_DB unset E3_SITEMODS_PATH - unset E3_SITELIBS_PATH - unset E3_SITEAPPS_PATH unset EPICS_DRIVER_PATH @@ -189,14 +187,8 @@ E3_REQUIRE_DB=${E3_REQUIRE_LOCATION}/db E3_REQUIRE_DBD=${E3_REQUIRE_LOCATION}/dbd E3_SITEMODS_PATH=${E3_REQUIRE_LOCATION}/siteMods -E3_SITELIBS_PATH=${E3_REQUIRE_LOCATION}/siteLibs -E3_SITEAPPS_PATH=${E3_REQUIRE_LOCATION}/siteApps -if [ -n "${SITE_SYSTEMAPPS_PATH}" ]; then - EPICS_DRIVER_PATH=${E3_SITEMODS_PATH}:${E3_SITEAPPS_PATH}:${SITE_SYSTEMAPPS_PATH} -else - EPICS_DRIVER_PATH=${E3_SITEMODS_PATH}:${E3_SITEAPPS_PATH} -fi +EPICS_DRIVER_PATH=${E3_SITEMODS_PATH} export EPICS_BASE export E3_REQUIRE_NAME @@ -212,8 +204,6 @@ export E3_REQUIRE_DB export E3_REQUIRE_DBD export E3_SITEMODS_PATH -export E3_SITELIBS_PATH -export E3_SITEAPPS_PATH export EPICS_DRIVER_PATH diff --git a/tests/test_e3.py b/tests/test_e3.py index ed73f4376f1eb50c60502954cea7768724976575..d1cfa8b8448b74fde628987f41d334b7a675aaa1 100644 --- a/tests/test_e3.py +++ b/tests/test_e3.py @@ -20,18 +20,21 @@ def test_sitelibs(wrapper): f.write( """ TOP:=$(CURDIR) -include $(REQUIRE_CONFIG)/CONFIG include $(REQUIRE_CONFIG)/RULES_E3 +include $(REQUIRE_CONFIG)/RULES_CELL include $(REQUIRE_CONFIG)/DEFINES_FT include $(REQUIRE_CONFIG)/RULES_PATCH -include $(REQUIRE_CONFIG)/RULES_E3_SITELIBS +include $(REQUIRE_CONFIG)/RULES_TEST -include $(REQUIRE_CONFIG)/RULES_VLIBS +include $(REQUIRE_CONFIG)/RULES_DKMS include $(REQUIRE_CONFIG)/RULES_VARS + +include $(REQUIRE_CONFIG)/RULES_DEV """ ) - rc, _, _ = run_make(wrapper, "build") + rc, _, errs = run_make(wrapper, "build") assert rc == 2 + assert "RULES_E3 should only be loaded from RULES_SITEMODS" in errs.decode("utf-8") def test_incorrect_module_name(wrapper):