Skip to content

Commit

Permalink
Verify runtime_dependencies when running 'otp_build patch_app'
Browse files Browse the repository at this point in the history
  • Loading branch information
rickard-green committed Mar 20, 2014
1 parent 0453d4e commit e310677
Show file tree
Hide file tree
Showing 17 changed files with 706 additions and 142 deletions.
8 changes: 4 additions & 4 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -397,9 +397,9 @@ endif
ERL_TOP=$(ERL_TOP) PATH=$(INST_PATH_PREFIX)"$${PATH}" \
$(MAKE) BUILD_ALL=1 TESTROOT="$(RELEASE_ROOT)" release
ifeq ($(RELEASE_ROOT),)
$(INSTALL_DATA) "$(ERL_TOP)/OTP_VERSION" "$(OTP_DEFAULT_RELEASE_PATH)"
$(INSTALL_DATA) "$(ERL_TOP)/OTP_VERSION" "$(OTP_DEFAULT_RELEASE_PATH)/releases/@OTP_REL@"
else
$(INSTALL_DATA) "$(ERL_TOP)/OTP_VERSION" "$(RELEASE_ROOT)"
$(INSTALL_DATA) "$(ERL_TOP)/OTP_VERSION" "$(RELEASE_ROOT)/releases/@OTP_REL@"
endif

# ---------------------------------------------------------------
Expand Down Expand Up @@ -1038,9 +1038,9 @@ install.Install:

install.otp_version:
ifeq ($(ERLANG_LIBDIR),)
$(INSTALL_DATA) "$(ERL_TOP)/OTP_VERSION" "$(OTP_DEFAULT_RELEASE_PATH)"
$(INSTALL_DATA) "$(ERL_TOP)/OTP_VERSION" "$(OTP_DEFAULT_RELEASE_PATH)/releases/@OTP_REL@"
else
$(INSTALL_DATA) "$(ERL_TOP)/OTP_VERSION" "$(ERLANG_LIBDIR)"
$(INSTALL_DATA) "$(ERL_TOP)/OTP_VERSION" "$(ERLANG_LIBDIR)/releases/@OTP_REL@"
endif

#
Expand Down
5 changes: 5 additions & 0 deletions erts/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ debug opt clean:
( cd $$d && $(MAKE) $@ FLAVOR=$(FLAVOR) ) || exit $$? ; \
fi ; \
done
(cd preloaded/src && $(MAKE) ../ebin/erts.app)

# ----------------------------------------------------------------------
# These are "convenience targets", provided as shortcuts for developers
Expand Down Expand Up @@ -135,6 +136,10 @@ release:
( cd $$d && $(MAKE) $@ ) || exit $$? ; \
fi ; \
done
( $(MAKE) -f "$(ERL_TOP)/make/otp_released_app.mk" \
APP_PWD="$(ERL_TOP)/erts" APP_VSN=VSN APP=erts \
TESTROOT="$(TESTROOT)" update) \
|| exit $$?

.PHONY: release_docs
release_docs:
Expand Down
4 changes: 2 additions & 2 deletions erts/doc/src/erlang.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6121,8 +6121,8 @@ ok
<c>erlang:system_info()</c> argument giving the exact OTP
version. This since the exact OTP version in the general case
is hard to determine. For more information see
<seealso marker="doc/installation_guide:otp_version">the
documentation of the OTP version in the installation
<seealso marker="doc/system_principles:versions">the
documentation of versions in the system principles
guide</seealso>.</p>
</item>
<tag><marker id="system_info_port_parallelism"><c>port_parallelism</c></marker></tag>
Expand Down
1 change: 0 additions & 1 deletion erts/etc/win32/nsis/erlang.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ SectionIn 1 RO
skip_silent_mode:

SetOutPath "$INSTDIR"
File "${TESTROOT}\OTP_VERSION"
File "${TESTROOT}\Install.ini"
File "${TESTROOT}\Install.exe"
File /r "${TESTROOT}\releases"
Expand Down
1 change: 0 additions & 1 deletion erts/etc/win32/nsis/erlang20.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ Section "Development" SecErlangDev
SectionIn 1 RO

SetOutPath "$INSTDIR"
File "${TESTROOT}\OTP_VERSION"
File "${TESTROOT}\Install.ini"
File "${TESTROOT}\Install.exe"
SetOutPath "$INSTDIR\releases"
Expand Down
21 changes: 17 additions & 4 deletions lib/kernel/doc/src/app.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ RTDeps [ApplicationVersion] []
<c>description</c>, <c>vsn</c>, <c>modules</c>, <c>registered</c>
and <c>applications</c>. The other keys are ignored by
<c>systools</c>.</p>
<warning><p>The <c>RTDeps</c> type was introduced in OTP 17.0 and
might be subject to changes during the OTP 17 release.</p></warning>
<taglist>
<tag><c>description</c></tag>
<item>
Expand Down Expand Up @@ -188,10 +190,10 @@ RTDeps [ApplicationVersion] []
start phases must be a subset of the set of phases defined
for the primary application. Refer to <em>OTP Design Principles</em> for more information.</p>
</item>
<tag><c>runtime_dependencies</c></tag>
<item>A list of application versions that the application
<tag><marker id="runtime_dependencies"><c>runtime_dependencies</c></marker></tag>
<item><p>A list of application versions that the application
depends on. An example of such an application version is
"kernel-3.0". Application versions specified as runtime
<c>"kernel-3.0"</c>. Application versions specified as runtime
dependencies are minimum requirements. That is, a larger
application version than the one specified in the
dependency satisfies the requirement. For information on
Expand All @@ -202,7 +204,18 @@ RTDeps [ApplicationVersion] []
specifies a source code version. An additional indirect
requirement is that installed binary application of
the specified version has been built so that it is
compatible with the rest of the system.
compatible with the rest of the system.</p>
<p>Some dependencies might only be required in specific runtime
scenarios. In the case such optional dependencies exist, these are
specified and documented in the corresponding "App" documentation
of the specific application.</p>
<warning><p>The <c>runtime_dependencies</c> key was introduced in
OTP 17.0. The type of its value might be subject to changes during
the OTP 17 release.</p></warning>
<warning><p>All runtime dependencies specified in OTP applications
during the OTP 17 release might not be completely correct. This
is actively worked on. Declared runtime dependencies in OTP
applications are expected to be correct in OTP 18.</p></warning>
</item>
</taglist>
</section>
Expand Down
43 changes: 43 additions & 0 deletions make/otp_released_app.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#
# %CopyrightBegin%
#
# Copyright Ericsson AB 2014. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved online at http://www.erlang.org/.
#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
#
# %CopyrightEnd%

include $(ERL_TOP)/make/target.mk
include $(ERL_TOP)/make/$(TARGET)/otp.mk
include $(APP_PWD)/vsn.mk
include $(ERL_TOP)/make/otp_default_release_path.mk

RELEASED_APP_VSN=$(APP)-$($(APP_VSN))
ifeq ($(TESTROOT),)
REL_DIR=$(OTP_DEFAULT_RELEASE_PATH)/releases/$(SYSTEM_VSN)
else
REL_DIR=$(TESTROOT)/releases/$(SYSTEM_VSN)
endif
INST_APP_VSNS=$(REL_DIR)/installed_application_versions

.PHONY: update

update:
test -d "$(REL_DIR)" || mkdir -p "$(REL_DIR)" ; \
if test ! -f "$(INST_APP_VSNS)" ; then \
echo "$(RELEASED_APP_VSN)" > "$(INST_APP_VSNS)" || exit 1; \
else \
if test x = x`grep $(RELEASED_APP_VSN) "$(INST_APP_VSNS)"` ; then \
echo $(RELEASED_APP_VSN) >> "$(INST_APP_VSNS)" || exit 1; \
fi ; \
fi

9 changes: 9 additions & 0 deletions make/otp_subdir.mk
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,14 @@ opt debug release docs release_docs tests release_tests clean depend valgrind st
fi ; \
done ; \
if test -f vsn.mk; then \
if test release = $@ && test ! -f SKIP; then \
app=`basename $$app_pwd` ; \
app_vsn=`echo $$app | sed "y|abcdefghijklmnopqrstuvwxyz|ABCDEFGHIJKLMNOPQRSTUVWXYZ|"` ; \
app_vsn=$${app_vsn}_VSN ; \
( $(MAKE) -f "$(ERL_TOP)/make/otp_released_app.mk" \
APP_PWD="$$app_pwd" APP_VSN=$$app_vsn APP=$$app \
TESTROOT="$(TESTROOT)" update) \
|| exit $$? ; \
fi ; \
echo "=== Leaving application" `basename $$app_pwd` ; \
fi
Loading

0 comments on commit e310677

Please sign in to comment.