Skip to content

Commit

Permalink
Allow installing specific NDN releases through installer
Browse files Browse the repository at this point in the history
Adds a flag allowing sets of NDN software release versions to
be installed via source without manually specifying
commits or tags.

Change-Id: Ia19fa9de3ac77172f705a4d475331dc9b40e9376
  • Loading branch information
awlane committed Oct 11, 2024
1 parent b5c893d commit 022b2bf
Show file tree
Hide file tree
Showing 4 changed files with 123 additions and 1 deletion.
26 changes: 26 additions & 0 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -182,3 +182,29 @@ You can use these steps to run the sample pingall experiment:
4. Issue the command:
``grep -c timeout /tmp/minindn/*/ping-data/*.txt``. Each file should
report a count of 0.


Release Versions
----------------

We provide a set of shortcuts to install major release versions of NDN
dependencies from source.

You can install the most recent release using:

::

./install.sh --source --release=current

You can also select a specified release using:

::

./install.sh --source --release=[chosen version]


Currently, the compatible versions include:

- ``2024-08``: ndn-cxx 0.9.0, NFD 24.07, NLSR 24.08, PSync 0.5.0,
ndn-tools 24.07, and compatible versions of ndn-traffic-generator
and infoedit.
6 changes: 5 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ fi
PREFER_FROM=ppa
PPA_PKGS=()

ARGS=$(getopt -o 'hy' -l 'help,dir:,jobs:,no-wifi,ppa,source,cxx:,dummy-keychain,nfd:,psync:,nlsr:,tools:,traffic:,infoedit:,mininet:,mnwifi:,dl-only,ignore-existing' -- "$@")
ARGS=$(getopt -o 'hy' -l 'help,dir:,jobs:,no-wifi,ppa,source,release:,cxx:,dummy-keychain,nfd:,psync:,nlsr:,tools:,traffic:,infoedit:,mininet:,mnwifi:,dl-only,ignore-existing' -- "$@")
eval set -- "$ARGS"
while true; do
case $1 in
Expand All @@ -83,6 +83,7 @@ while true; do
--no-wifi) NO_WIFI=1; shift;;
--ppa) PREFER_FROM=ppa; shift;;
--source) PREFER_FROM=source; shift;;
--release) RELEASE_VERSION=$2; source util/releases/current_release.sh; NO_PPA=1; shift 2;;
--cxx) CXX_VERSION=$2; NO_PPA=1; shift 2;;
--dummy-keychain) CXX_DUMMY_KEYCHAIN=1; NO_PPA=1; shift;;
--nfd) NFD_VERSION=$2; NO_PPA=1; shift 2;;
Expand Down Expand Up @@ -130,6 +131,9 @@ Install preference options:
Install all packages from source code.
Source code version options:
--release=[RELEASE]
Use specified major release. To install the most recent, use 'current'. A list of
other possible values is located in the installation docs.
--cxx=[VERSION]
Set ndn-cxx version.
--dummy-keychain
Expand Down
34 changes: 34 additions & 0 deletions util/releases/2024-08.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# -*- Mode:bash; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
#
# Copyright (C) 2015-2024, The University of Memphis,
# Arizona Board of Regents,
# Regents of the University of California.
#
# This file is part of Mini-NDN.
# See AUTHORS.md for a complete list of Mini-NDN authors and contributors.
#
# Mini-NDN is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Mini-NDN is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Mini-NDN, e.g., in COPYING.md file.
# If not, see <http://www.gnu.org/licenses/>.

# THIS FILE IS MEANT TO PROVIDE A QUICK SHORTCUT TO INSTALLING RELEASES OF NDN DEPENDENCIES
# RELEASED IN JULY AND AUGUST OF 2024. REPOSITORIES WHICH HAVE NOT RECEIVED A MAJOR RELEASE
# ARE INSTEAD GIVEN FIXED COMMITS.

CXX_RELEASE="ndn-cxx-0.9.0"
NFD_RELEASE="NFD-24.07"
PSYNC_RELEASE="0.5.0"
NLSR_RELEASE="NLSR-24.08"
TOOLS_RELEASE="ndn-tools-24.07"
TRAFFIC_RELEASE="9bec15ac63ae2ac225c4e514daa9fc1366889d62"
INFOEDIT_RELEASE="cecfe583f5d2df974f5cbd50996f91b9d321be99"
58 changes: 58 additions & 0 deletions util/releases/current_release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# -*- Mode:bash; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
#
# Copyright (C) 2015-2024, The University of Memphis,
# Arizona Board of Regents,
# Regents of the University of California.
#
# This file is part of Mini-NDN.
# See AUTHORS.md for a complete list of Mini-NDN authors and contributors.
#
# Mini-NDN is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Mini-NDN is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Mini-NDN, e.g., in COPYING.md file.
# If not, see <http://www.gnu.org/licenses/>.

RELEASE_FILE="util/releases/$RELEASE_VERSION.sh"


if [[ $RELEASE_VERSION == current ]]; then
# THIS SHOULD BE UPDATED ON MAJOR RELEASES
RELEASE_FILE="util/releases/2024-08.sh"
fi

if [[ ! -e $RELEASE_FILE ]]; then
cat <<EOT
No valid release version passed as argument. Please check
documentation and your command for typos.
Valid versions:
- current
- 2024-08
Exiting...
EOT
exit 1
fi

source "$RELEASE_FILE"

# This prevents issues when manually overriden versions
# are specified before the release by checking if these
# vars are already set.

: ${CXX_VERSION:=${CXX_RELEASE}}
: ${NFD_VERSION:=${NFD_RELEASE}}
: ${PSYNC_VERSION:=${PSYNC_RELEASE}}
: ${NLSR_VERSION:=${NLSR_RELEASE}}
: ${TOOLS_VERSION:=${TOOLS_RELEASE}}
: ${TRAFFIC_VERSION:=${TRAFFIC_RELEASE}}
: ${INFOEDIT_VERSION:=${INFOEDIT_RELEASE}}

0 comments on commit 022b2bf

Please sign in to comment.