User Tools

Site Tools


developer_documentation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
developer_documentation [2015/09/04 12:01]
nworbnhoj [Building] add "apt-get install textinfo" to prerequisites
developer_documentation [2022/04/24 11:50] (current)
lantis
Line 45: Line 45:
  
 You can browse the repository online here, or clone from one of the URLs below. There is both a local copy of the repository and a Github mirror: You can browse the repository online here, or clone from one of the URLs below. There is both a local copy of the repository and a Github mirror:
-<shell>+<code>
 apt-get install git apt-get install git
-git clone git://gargoyle-router.com/gargoyle.git +git clone git@github.com:ericpaulbishop/gargoyle.git 
-</shell>+</code>
  
-<shell+SSH 
-git clone http://gargoyle-router.com/git/gargoyle.git  +<code
-git clone git://gargoyle-router.com/gargoyle.git  +git clone git@github.com:ericpaulbishop/gargoyle.git 
-git clone http://github.com/ericpaulbishop/gargoyle.git  +</code> 
-git clone git://github.com/ericpaulbishop/gargoyle.git +HTTPS 
-</shell>+<code> 
 +git clone https://github.com/ericpaulbishop/gargoyle.git 
 +</code>
  
  
 If you want to build an older branch or tag, use the "git checkout" to switch to it after cloning the repository.  e.g. to switch to the 1.2 branch: If you want to build an older branch or tag, use the "git checkout" to switch to it after cloning the repository.  e.g. to switch to the 1.2 branch:
  
-<shell>+<code>
 git checkout 1.2 git checkout 1.2
-</shell>+</code>
  
 Anyone who still prefers working with subversion can make use of the subversion support provided by the github mirror: Anyone who still prefers working with subversion can make use of the subversion support provided by the github mirror:
-<shell>+<code>
 svn checkout http://svn.github.com/ericpaulbishop/gargoyle.git svn checkout http://svn.github.com/ericpaulbishop/gargoyle.git
-</shell+</code
-<shell>+<code>
 cd gargoyle cd gargoyle
-</shell+</code
-<shell>+<code>
 make make
-</shell>+</code>
  
 You'll notice there are two scripts in the build directory: //full-build.sh// and //rebuild.sh// You'll notice there are two scripts in the build directory: //full-build.sh// and //rebuild.sh//
Line 79: Line 81:
 If you run make without the FULL_BUILD=true flag, and you've previously done a build, it will only rebuild the packages and not the underlying version of OpenWrt. This speeds up testing small changes in the packages dramatically. However, to do a complete build from scratch you really need to run the make command with "FULL_BUILD=true" set: If you run make without the FULL_BUILD=true flag, and you've previously done a build, it will only rebuild the packages and not the underlying version of OpenWrt. This speeds up testing small changes in the packages dramatically. However, to do a complete build from scratch you really need to run the make command with "FULL_BUILD=true" set:
  
-<shell>+<code>
 make FULL_BUILD=true make FULL_BUILD=true
-</shell>+</code>
  
 Or to build (for example) just the ar71xx architecture: Or to build (for example) just the ar71xx architecture:
  
-<shell>+<code>
 make FULL_BUILD=true ar71xx make FULL_BUILD=true ar71xx
-</shell>+</code>
  
  
 Allow building of only one profile for a given architecture by running e.g. "make ar71xx.usb_large" to build usb_large profile instead of all ar71xx profiles Allow building of only one profile for a given architecture by running e.g. "make ar71xx.usb_large" to build usb_large profile instead of all ar71xx profiles
-<shell>+<code>
 make ar71xx.usb_large make ar71xx.usb_large
-</shell>+</code>
  
 ar71xx profiles ar71xx profiles
Line 110: Line 112:
 Building Gargoyle for the first time for even one supported platform can take several hours of churning on your computer.  In addition you can expect each platform to require about 1.6GB of disk space so keep this in mind when deciding how many platforms you will build on your first attempt.  Finally, be aware that only the components unique to Gargoyle are stored in the Gargoyle svn.  Therefore, in order to build gargoyle, the build process must first download many additional components.  If you do not have an internet connection, the build will fail.  If it is a slow connection, the build will take a very,very long time.   Building Gargoyle for the first time for even one supported platform can take several hours of churning on your computer.  In addition you can expect each platform to require about 1.6GB of disk space so keep this in mind when deciding how many platforms you will build on your first attempt.  Finally, be aware that only the components unique to Gargoyle are stored in the Gargoyle svn.  Therefore, in order to build gargoyle, the build process must first download many additional components.  If you do not have an internet connection, the build will fail.  If it is a slow connection, the build will take a very,very long time.  
  
-Before you can build Gargoyle, you will require the appropriate tools to [[http://wiki.openwrt.org/doc/howto/buildroot.exigence|build OpenWRT]]. +Before you can build Gargoyle, you will require the appropriate tools to [[https://openwrt.org/docs/guide-developer/toolchain/install-buildsystem|build OpenWRT]]. 
  
  
 To install these (list edited to add the additional things missing on Ubuntu Server 10.10), use the following on a 32 bit system: To install these (list edited to add the additional things missing on Ubuntu Server 10.10), use the following on a 32 bit system:
  
-<shell+<code
-sudo apt-get install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch unzip zlib1g-dev subversion flex uglifyjs textinfo +sudo apt-get install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch unzip zlib1g-dev subversion flex uglifyjs texinfo 
-</shell>+</code>
  
 Or for a 64 bit system: Or for a 64 bit system:
  
-<shell+<code
-sudo apt-get install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs git-core gcc-multilib p7zip p7zip-full msmtp libssl-dev textinfo +sudo apt-get install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs git-core gcc-multilib p7zip p7zip-full msmtp libssl-dev texinfo 
-</shell>+</code> 
 + 
 +===== Ubuntu 18.04 ===== 
 +Enable universe repository 
 +<code> 
 +sudo add-apt-repository universe 
 +</code> 
 +<code> 
 +sudo add-apt-repository multiverse 
 +</code> 
 + 
 +===== NPM ===== 
 + 
 + 
 +**NOTE:** To save build time, consider also installing npm, which will also install nodejs as a dependency. It is recommended that you install nodejs v6.13.1 (or equivalent) and npm v3.10.10 (or equivalent). See below 
 + 
 +For more details on building OpenWrt, you can see their wiki page [[https://openwrt.org/docs/guide-developer/toolchain/use-buildsystem|here]]. 
 + 
 +===== Building =====
  
-For more details on building OpenWRT, you can see their wiki page [[http://wiki.openwrt.org/doc/howto/build|here]]. 
  
 Simply entering: Simply entering:
  
-<shell>+<code>
 make make
-</shell>+</code>
  
 will result in all targets being built. If you prefer to build a single target (in this example ar71xx, though you could substitute brcm47xx or another valid target), enter: will result in all targets being built. If you prefer to build a single target (in this example ar71xx, though you could substitute brcm47xx or another valid target), enter:
  
-<shell>+<code>
 make ar71xx make ar71xx
-</shell>+</code>
  
 The makefile calls the full-build-backfire.sh script found in the same directory.  This script controls the overall build process.  In addition to the makefile and the build script you will find these subdirectories in the Gargoyle root build directory: The makefile calls the full-build-backfire.sh script found in the same directory.  This script controls the overall build process.  In addition to the makefile and the build script you will find these subdirectories in the Gargoyle root build directory:
Line 175: Line 194:
  
 **images/<target>** The image output directory.  Once all the output packages are built we can make images.  These are the .bin and .trx files often used to flash routers.  There will be a complete set of images for each target you build. **images/<target>** The image output directory.  Once all the output packages are built we can make images.  These are the .bin and .trx files often used to flash routers.  There will be a complete set of images for each target you build.
 +
 +===== Make Custom =====
 +
  
 It is also possible to build Gargoyle using a custom build configuration.  The process of building OpenWRT involves a configuration step in which packages are either included or excluded from the build image.  Due to a lack of memory space on most routers it is not possible to included every package.  The architecture of OpenWRT allows most packages not included in the original build image to be installed later if they are needed and space is available.  So the general philosophy is to build with the least code practical in order to support routers with the least available memory.  If you wish to create your own image with a different set of packages in the base image you should run make custom. It is also possible to build Gargoyle using a custom build configuration.  The process of building OpenWRT involves a configuration step in which packages are either included or excluded from the build image.  Due to a lack of memory space on most routers it is not possible to included every package.  The architecture of OpenWRT allows most packages not included in the original build image to be installed later if they are needed and space is available.  So the general philosophy is to build with the least code practical in order to support routers with the least available memory.  If you wish to create your own image with a different set of packages in the base image you should run make custom.
-<shell>+<code>
 make custom make custom
-</shell>+</code> 
 + 
  
 You will then be given access to the OpenWrt menuconfig screen and can select the packages you want to include in your base image. You will then be given access to the OpenWrt menuconfig screen and can select the packages you want to include in your base image.
 +
 +Example
 +
 +  -  make custom
 +  -  Select "Qualcomm Atheros IPQ40XX" target
 +  -  Select all Gargoyle packages and dependencies from the Administration menu (hint, there is more to be found than what is just shown initially, you may need to enable other dependencies first)
 +  -  Exit and save config, then quit the build
 +  -  Grab .config file from custom-src/.config and save it as targets/ipq40xx...../config. Add the other files as required to create a valid target
 +  -  make clean
 +  -  make FULL_BUILD=true ipq40xx
 +
 +  An example
 +  To enable plugin_gargoyle-minidlna, you first need to enable BUILD_PATENTED
 +  To enable plugin_gargoyle-email-notifications, you first need to enable msmtp. 
 +
 +If you press “/“ while navigating the menu and then search for “gargoyle”, you can view each gargoyle package and what its dependencies are.
 +
 +**<fs 110%>[[Make Custom Dependencies|Make Custom Dependencies]]</fs>**
 +
 +"/" search "gargoyle-minidlna"
 +
 +  x Symbol: DEFAULT_libffmpeg-mini [=DEFAULT_libffmpeg-mini]                                                                                                                                                     x
 +  x Type  : unknown                                                                                                                                                                                              x
 +  x                                                                                                                                                                                                              x
 +  x                                                                                                                                                                                                              x
 +  x Symbol: PACKAGE_libffmpeg-mini [=y]                                                                                                                                                                          x
 +  x Type  : tristate                                                                                                                                                                                             x
 +  x Prompt: libffmpeg-miniries (mini)          .............. FFmpeg libraries (mini)                                                                                                                            x
 +  x   Location:                                                                                                                                                                                                  x
 +  x (1) -> Libraries                                                                                                                                                                                             x
 +  x   Defined at tmp/.config-package.in:28080                                                                                                                                                                    x
 +  x   Depends on: BUILD_PATENTED [=y]                                                                                                                                                                            x
 +  x   Selects: PACKAGE_libssp [=n] && PACKAGE_libc [=y] && PACKAGE_libpthread [=y] && PACKAGE_zlib [=y] && PACKAGE_libbz2 [=y] && PACKAGE_librt [=y] && PACKAGE_libpthread [=y]  
 +
 +
 +
 +
 +==== Installing Nodejs 6.13.1 and NPM 3.10.10 on Ubuntu ====
 +
 +
 +For compatibility reasons, it is recommended to use these versions of NodeJS and NPM. To do so:
 +<code bash>
 +curl -sL https://deb.nodesource.com/setup_6.x -o nodesource_setup.sh
 +sudo bash nodesource_setup.sh
 +sudo apt-get install nodejs
 +nodejs -v
 +npm -v
 +</code>
 +
 +The contents of nodesource_setup.sh are preserved below for posterity:
 +<code bash>
 +#!/bin/bash
 +
 +# Discussion, issues and change requests at:
 +#   https://github.com/nodesource/distributions
 +#
 +# Script to install the NodeSource Node.js v6.x LTS Boron repo onto a
 +# Debian or Ubuntu system.
 +#
 +# Run as root or insert `sudo -E` before `bash`:
 +#
 +# curl -sL https://deb.nodesource.com/setup_6.x | bash -
 +#   or
 +# wget -qO- https://deb.nodesource.com/setup_6.x | bash -
 +#
 +
 +export DEBIAN_FRONTEND=noninteractive
 +SCRSUFFIX="_6.x"
 +NODENAME="Node.js v6.x LTS Boron"
 +NODEREPO="node_6.x"
 +NODEPKG="nodejs"
 +
 +print_status() {
 +    echo
 +    echo "## $1"
 +    echo
 +}
 +
 +if test -t 1; then # if terminal
 +    ncolors=$(which tput > /dev/null && tput colors) # supports color
 +    if test -n "$ncolors" && test $ncolors -ge 8; then
 +        termcols=$(tput cols)
 +        bold="$(tput bold)"
 +        underline="$(tput smul)"
 +        standout="$(tput smso)"
 +        normal="$(tput sgr0)"
 +        black="$(tput setaf 0)"
 +        red="$(tput setaf 1)"
 +        green="$(tput setaf 2)"
 +        yellow="$(tput setaf 3)"
 +        blue="$(tput setaf 4)"
 +        magenta="$(tput setaf 5)"
 +        cyan="$(tput setaf 6)"
 +        white="$(tput setaf 7)"
 +    fi
 +fi
 +
 +print_bold() {
 +    title="$1"
 +    text="$2"
 +
 +    echo
 +    echo "${red}================================================================================${normal}"
 +    echo "${red}================================================================================${normal}"
 +    echo
 +    echo -e "  ${bold}${yellow}${title}${normal}"
 +    echo
 +    echo -en "  ${text}"
 +    echo
 +    echo "${red}================================================================================${normal}"
 +    echo "${red}================================================================================${normal}"
 +}
 +
 +bail() {
 +    echo 'Error executing command, exiting'
 +    exit 1
 +}
 +
 +exec_cmd_nobail() {
 +    echo "+ $1"
 +    bash -c "$1"
 +}
 +
 +exec_cmd() {
 +    exec_cmd_nobail "$1" || bail
 +}
 +
 +node_deprecation_warning() {
 +    if [[ "X${NODENAME}" == "Xio.js v1.x" ||
 +          "X${NODENAME}" == "Xio.js v2.x" ||
 +          "X${NODENAME}" == "Xio.js v3.x" ||
 +          "X${NODENAME}" == "XNode.js v5.x" ]]; then
 +
 +        print_bold \
 +                           DEPRECATION WARNING                            " "\
 +${bold}${NODENAME} is no longer actively supported!${normal}
 +
 +  ${bold}You will not receive security or critical stability updates${normal} for this version.
 +
 +  You should migrate to a supported version of Node.js as soon as possible.
 +  Use the installation script that corresponds to the version of Node.js you
 +  wish to install. e.g.
 +
 +   * ${green}https://deb.nodesource.com/setup_4.x — Node.js v4 LTS \"Argon\"${normal} (recommended)
 +   * ${green}https://deb.nodesource.com/setup_6.x — Node.js v6 Current${normal}
 +
 +  Please see ${bold}https://github.com/nodejs/LTS/${normal} for details about which version
 +  may be appropriate for you.
 +
 +  The ${bold}NodeSource${normal} Node.js Linux distributions GitHub repository contains
 +  information about which versions of Node.js and which Linux distributions
 +  are supported and how to use the install scripts.
 +    ${bold}https://github.com/nodesource/distributions${normal}
 +"
 +        echo
 +        echo "Continuing in 10 seconds ..."
 +        echo
 +        sleep 10
 +
 +    elif [ "X${NODENAME}" == "XNode.js v0.10" ]; then
 +
 +        print_bold \
 +                    NODE.JS v0.10 DEPRECATION WARNING                      " "\
 +Node.js v0.10 will cease to be actively supported in ${bold}October 2016${normal}.
 +
 +  This means you will not continue to receive security or critical stability
 +  updates for this version of Node.js beyond that time.
 +
 +  You should begin migration to a newer version of Node.js as soon as
 +  possible. Use the installation script that corresponds to the version of
 +  Node.js you wish to install. e.g.
 +
 +   * ${green}https://deb.nodesource.com/setup_4.x — Node.js v4 LTS \"Argon\"${normal} (recommended)
 +   * ${green}https://deb.nodesource.com/setup_6.x — Node.js v6 Current${normal}
 +
 +  Please see ${bold}https://github.com/nodejs/LTS/${normal} for details about which version
 +  may be appropriate for you.
 +
 +  The ${bold}NodeSource${normal} Node.js Linux distributions GitHub repository contains
 +  information about which versions of Node.js and which Linux distributions
 +  are supported and how to use the install scripts.
 +    ${bold}https://github.com/nodesource/distributions${normal}
 +"
 +
 +        echo
 +        echo "Continuing in 5 seconds ..."
 +        echo
 +        sleep 5
 +
 +    elif [ "X${NODENAME}" == "XNode.js v0.12" ]; then
 +
 +        print_bold \
 +                    NODE.JS v0.12 DEPRECATION WARNING                      " "\
 +Node.js v0.12 will cease to be actively supported ${bold}at the end of 2016${normal}.
 +
 +  This means you will not continue to receive security or critical stability
 +  updates for this version of Node.js beyond that time.
 +
 +  You should begin migration to a newer version of Node.js as soon as
 +  possible. Use the installation script that corresponds to the version of
 +  Node.js you wish to install. e.g.
 +
 +   * ${green}https://deb.nodesource.com/setup_4.x — Node.js v4 LTS \"Argon\"${normal} (recommended)
 +   * ${green}https://deb.nodesource.com/setup_6.x — Node.js v6 Current${normal}
 +
 +  Please see ${bold}https://github.com/nodejs/LTS/${normal} for details about which version
 +  may be appropriate for you.
 +
 +  The ${bold}NodeSource${normal} Node.js Linux distributions GitHub repository contains
 +  information about which versions of Node.js and which Linux distributions
 +  are supported and how to use the install scripts.
 +    ${bold}https://github.com/nodesource/distributions${normal}
 +"
 +
 +        echo
 +        echo "Continuing in 3 seconds ..."
 +        echo
 +        sleep 3
 +
 +    fi
 +}
 +
 +script_deprecation_warning() {
 +    if [ "X${SCRSUFFIX}" == "X" ]; then
 +        print_bold \
 +                        SCRIPT DEPRECATION WARNING                         " "\
 +This script, located at ${bold}https://deb.nodesource.com/setup${normal}, used to
 +  install Node.js v0.10, is being deprecated and will eventually be made
 +  inactive.
 +
 +  You should use the script that corresponds to the version of Node.js you
 +  wish to install. e.g.
 +
 +   * ${green}https://deb.nodesource.com/setup_4.x — Node.js v4 LTS \"Argon\"${normal} (recommended)
 +   * ${green}https://deb.nodesource.com/setup_6.x — Node.js v6 Current${normal}
 +
 +  Please see ${bold}https://github.com/nodejs/LTS/${normal} for details about which version
 +  may be appropriate for you.
 +
 +  The ${bold}NodeSource${normal} Node.js Linux distributions GitHub repository contains
 +  information about which versions of Node.js and which Linux distributions
 +  are supported and how to use the install scripts.
 +    ${bold}https://github.com/nodesource/distributions${normal}
 +"
 +
 +        echo
 +        echo "Continuing in 10 seconds (press Ctrl-C to abort) ..."
 +        echo
 +        sleep 10
 +    fi
 +}
 +
 +setup() {
 +
 +script_deprecation_warning
 +
 +print_status "Installing the NodeSource ${NODENAME} repo..."
 +
 +if $(uname -m | grep -Eq ^armv6); then
 +    print_status "You appear to be running on ARMv6 hardware. Unfortunately this is not currently supported by the NodeSource Linux distributions. Please use the 'linux-armv6l' binary tarballs available directly from nodejs.org for Node.js v4 and later."
 +    exit 1
 +fi
 +
 +PRE_INSTALL_PKGS=""
 +
 +# Check that HTTPS transport is available to APT
 +# (Check snaked from: https://get.docker.io/ubuntu/)
 +
 +if [ ! -e /usr/lib/apt/methods/https ]; then
 +    PRE_INSTALL_PKGS="${PRE_INSTALL_PKGS} apt-transport-https"
 +fi
 +
 +if [ ! -x /usr/bin/lsb_release ]; then
 +    PRE_INSTALL_PKGS="${PRE_INSTALL_PKGS} lsb-release"
 +fi
 +
 +if [ ! -x /usr/bin/curl ] && [ ! -x /usr/bin/wget ]; then
 +    PRE_INSTALL_PKGS="${PRE_INSTALL_PKGS} curl"
 +fi
 +
 +# Populating Cache
 +print_status "Populating apt-get cache..."
 +exec_cmd 'apt-get update'
 +
 +if [ "X${PRE_INSTALL_PKGS}" != "X" ]; then
 +    print_status "Installing packages required for setup:${PRE_INSTALL_PKGS}..."
 +    # This next command needs to be redirected to /dev/null or the script will bork
 +    # in some environments
 +    exec_cmd "apt-get install -y${PRE_INSTALL_PKGS} > /dev/null 2>&1"
 +fi
 +
 +IS_PRERELEASE=$(lsb_release -d | grep 'Ubuntu .*development' >& /dev/null; echo $?)
 +if [[ $IS_PRERELEASE -eq 0 ]]; then
 +    print_status "Your distribution, identified as \"$(lsb_release -d -s)\", is a pre-release version of Ubuntu. NodeSource does not maintain official support for Ubuntu versions until they are formally released. You can try using the manual installation instructions available at https://github.com/nodesource/distributions and use the latest supported Ubuntu version name as the distribution identifier, although this is not guaranteed to work."
 +    exit 1
 +fi
 +
 +DISTRO=$(lsb_release -c -s)
 +
 +check_alt() {
 +    if [ "X${DISTRO}" == "X${2}" ]; then
 +        echo
 +        echo "## You seem to be using ${1} version ${DISTRO}."
 +        echo "## This maps to ${3} \"${4}\"... Adjusting for you..."
 +        DISTRO="${4}"
 +    fi
 +}
 +
 +check_alt "Kali"          "sana"     "Debian" "jessie"
 +check_alt "Kali"          "kali-rolling" "Debian" "jessie"
 +check_alt "Sparky Linux"  "Nibiru"   "Debian" "buster"
 +check_alt "Linux Mint"    "maya"     "Ubuntu" "precise"
 +check_alt "Linux Mint"    "qiana"    "Ubuntu" "trusty"
 +check_alt "Linux Mint"    "rafaela"  "Ubuntu" "trusty"
 +check_alt "Linux Mint"    "rebecca"  "Ubuntu" "trusty"
 +check_alt "Linux Mint"    "rosa"     "Ubuntu" "trusty"
 +check_alt "Linux Mint"    "sarah"    "Ubuntu" "xenial"
 +check_alt "Linux Mint"    "serena"   "Ubuntu" "xenial"
 +check_alt "Linux Mint"    "sonya"    "Ubuntu" "xenial"
 +check_alt "Linux Mint"    "sylvia"   "Ubuntu" "xenial"
 +check_alt "LMDE"          "betsy"    "Debian" "jessie"
 +check_alt "elementaryOS"  "luna"     "Ubuntu" "precise"
 +check_alt "elementaryOS"  "freya"    "Ubuntu" "trusty"
 +check_alt "elementaryOS"  "loki"     "Ubuntu" "xenial"
 +check_alt "Trisquel"      "toutatis" "Ubuntu" "precise"
 +check_alt "Trisquel"      "belenos"  "Ubuntu" "trusty"
 +check_alt "Trisquel"      "flidas"   "Ubuntu" "xenial"
 +check_alt "BOSS"          "anokha"   "Debian" "wheezy"
 +check_alt "bunsenlabs"    "bunsen-hydrogen" "Debian" "jessie"
 +check_alt "Tanglu"        "chromodoris" "Debian" "jessie"
 +check_alt "Devuan"        "ceres"    "Debian" "sid"
 +check_alt "PureOS"        "green"    "Debian" "sid"
 +
 +if [ "X${DISTRO}" == "Xdebian" ]; then
 +  print_status "Unknown Debian-based distribution, checking /etc/debian_version..."
 +  NEWDISTRO=$([ -e /etc/debian_version ] && cut -d/ -f1 < /etc/debian_version)
 +  if [ "X${NEWDISTRO}" == "X" ]; then
 +    print_status "Could not determine distribution from /etc/debian_version..."
 +  else
 +    DISTRO=$NEWDISTRO
 +    print_status "Found \"${DISTRO}\" in /etc/debian_version..."
 +  fi
 +fi
 +
 +print_status "Confirming \"${DISTRO}\" is supported..."
 +
 +if [ -x /usr/bin/curl ]; then
 +    exec_cmd_nobail "curl -sLf -o /dev/null 'https://deb.nodesource.com/${NODEREPO}/dists/${DISTRO}/Release'"
 +    RC=$?
 +else
 +    exec_cmd_nobail "wget -qO /dev/null -o /dev/null 'https://deb.nodesource.com/${NODEREPO}/dists/${DISTRO}/Release'"
 +    RC=$?
 +fi
 +
 +if [[ $RC != 0 ]]; then
 +    print_status "Your distribution, identified as \"${DISTRO}\", is not currently supported, please contact NodeSource at https://github.com/nodesource/distributions/issues if you think this is incorrect or would like your distribution to be considered for support"
 +    exit 1
 +fi
 +
 +if [ -f "/etc/apt/sources.list.d/chris-lea-node_js-$DISTRO.list" ]; then
 +    print_status 'Removing Launchpad PPA Repository for NodeJS...'
 +
 +    exec_cmd_nobail 'add-apt-repository -y -r ppa:chris-lea/node.js'
 +    exec_cmd "rm -f /etc/apt/sources.list.d/chris-lea-node_js-${DISTRO}.list"
 +fi
 +
 +print_status 'Adding the NodeSource signing key to your keyring...'
 +
 +if [ -x /usr/bin/curl ]; then
 +    exec_cmd 'curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -'
 +else
 +    exec_cmd 'wget -qO- https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -'
 +fi
 +
 +print_status "Creating apt sources list file for the NodeSource ${NODENAME} repo..."
 +
 +exec_cmd "echo 'deb https://deb.nodesource.com/${NODEREPO} ${DISTRO} main' > /etc/apt/sources.list.d/nodesource.list"
 +exec_cmd "echo 'deb-src https://deb.nodesource.com/${NODEREPO} ${DISTRO} main' >> /etc/apt/sources.list.d/nodesource.list"
 +
 +print_status 'Running `apt-get update` for you...'
 +
 +exec_cmd 'apt-get update'
 +
 +node_deprecation_warning
 +
 +print_status "Run \`apt-get install ${NODEPKG}\` (as root) to install ${NODENAME} and npm"
 +
 +}
 +
 +## Defer setup until we have the complete script
 +setup
 +</code>
 +The same steps may work on other OSes
 +===== Building Older Versions of Gargoyle =====
 +
 +Due to changes in upstream infrastructure, some of the older Gargoyle tagged revisions no longer build out of the box.
 +The latest commits on each branch back to 1.6 have all been fixed to build as of November 2020
developer_documentation.1441368084.txt.gz · Last modified: 2015/09/04 12:01 by nworbnhoj