Chapter 1. Installation

Dno can be installed by downloading and unpacking a release tarball or by cloning from github.

Unless you want to hack on dno itself, installing from a tarball is the recommended option.

1.1. Compatibility

Dno is expected to run on any Unix-like operating system: Linux, BSD, MacOSX.

It is built using GNU autotools, so any OS supported by autotools should work. It is unlikely that Windows(Tm) will ever be supported.

1.2. Dependencies

Dno requires bash, make, sed and gawk in order to run.

For building and installing dno, gcc is also required.

To build documentation: pandoc, xsltproc and the docbook xslt stylesheets (v4) are required. Tarball-based installations provide pre-built documentation so do not need these.

If you want to modify dno, you should also install autotools.

1.3. Installing From A Tarball

1.3.1. Download

Releases can be found in the github project releases directory: https://github.com/marcmunro/dno/tree/main/releases.

You can download a tarball by clicking on it and then finding and clicking on the "download raw file" button.

1.3.2. Unpack

To unpack the tarball (this will create a new directory called dno):

~$ tar xvzf dno_VERSION.tgz
	

Note: the v option above gives verbose feedback. Use this to get a warm fuzzy feeling when you unpack the tarball.

1.3.3. Configure

Move to the new dno directory and run ./configure:

~$ cd dno
dno$ ./configure
checking for sed... yes
checking for gawk... yes
checking for dialog... no
checking for whiptail... /usr/bin/whiptail
checking Checking terminal-based menu command... /usr/bin/whiptail
checking for pandoc... no
configure: WARNING: pandoc not found.  Man pages cannot be created
checking for xsltproc... no
configure: WARNING: xsltproc not found.  User guide cannot be created
checking for xmllint... no
configure: WARNING: xmllint not found.  User guide cannot be created
checking for DocBook stylesheet... no
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking Checking arduino installation dir... /usr/share/arduino
checking for /usr/share/arduino/hardware/arduino/avr/boards.txt... yes
configure: creating ./config.status
config.status: creating Makefile.global
config.status: creating bin/dno_commands_for
config.status: creating bin/dno_bpp
config.status: creating bin/dno_dirinfo
config.status: creating bin/dno_menu
config.status: creating bin/dno
config.status: creating man/BOARD_INFO.md
config.status: creating man/BOARD_OPTIONS.md
config.status: creating man/BOARD_TYPE.md
config.status: creating man/dno.md
config.status: creating man/dno_bpp.md
config.status: creating man/dno_checksize.md
config.status: creating man/dno_commands_for.md
config.status: creating man/dno_dirinfo.md
config.status: creating man/dno_menu.md
config.status: creating man/dno_requote.md
dno$ 
	

This determines where dno should be installed, among other things. Note that this step will fail if you don't have the basic pre-requisites (gawk, sed, etc) installed. If it fails, install the programs it is asking for, and run it again.

1.3.4. Make

Now we build the dno_requote command and prepare the dno man pages for installation using make:

dno$ make
  CC, LD [dno_requote]
    Using distributed version of man/dno_bpp.1
    Using distributed version of man/dno_checksize.1
    Using distributed version of man/dno_commands_for.1
    Using distributed version of man/dno_dirinfo.1
    Using distributed version of man/dno.1
    Using distributed version of man/dno_menu.1
    Using distributed version of man/dno_requote.1
    Using distributed version of man/BOARD_INFO.5
    Using distributed version of man/BOARD_OPTIONS.5
    Using distributed version of man/BOARD_TYPE.5
    Using distributed version of docs
dno$ 
      

If you happen to already have the tools installed that are needed for creating dno documentation, this step will build the documentation from source rather than using the distributed versions. Either way, you will now be ready to install.

1.3.5. Make Install

Installation needs to be done as root. You can use sudo if you must [1], or become root using su and run make install:

dno$ su
Password: 
dno# make install
Installing dno executables in /usr/local/bin
Install dno man pages in /usr/local/share/man
dno# exit
dno$
	  

That's it. You are done.

Note that if you install a new Arduino IDE after this, you should repeat the above installation steps. This will ensure that dno can find the newly installed Arduino tools.

1.4. Installing By Cloning From Github

1.4.1. Pre-requisites

The steps for this are much the same as for installing from the tarball, but all build tools must be installed. This means that in addition to gawk, sed and gcc, the following must also be present:

  • pandoc;

  • xmllint;

    This can often be found in a package called libxml2-utils.

  • xsltproc;

  • docbook5 stylesheets.

    You may find these in a package called docbook-xsl-ns.

1.4.2. Clone From Github

When you run the following clone operation a new directory will be created under your current directory:

~$ git clone https://github.com/marcmunro/dno.git
Cloning into 'dno'...
remote: Enumerating objects: 278, done.
remote: Counting objects: 100% (58/58), done.
remote: Compressing objects: 100% (43/43), done.
remote: Total 278 (delta 23), reused 42 (delta 15), pack-reused 220 (from 1)
Receiving objects: 100% (278/278), 30.90 MiB | 4.29 MiB/s, done.
Resolving deltas: 100% (157/157), done.
~$ 
	

1.4.3. Configure

Move to the new dno directory and run ./configure. Be sure to check the output for any indication that our pre-requisites are not installed.

1.4.4. Make

Run make. This should build everything, including documentation and man pages from scratch:

dno$ make
  PANDOC man/dno_bpp.1
  PANDOC man/dno_checksize.1
  PANDOC man/dno_commands_for.1
  PANDOC man/dno_dirinfo.1
  PANDOC man/dno.1
  PANDOC man/dno_menu.1
  PANDOC man/dno_requote.1
  PANDOC man/BOARD_INFO.5
  PANDOC man/BOARD_OPTIONS.5
  PANDOC man/BOARD_TYPE.5
  PANDOC docs/parts/BOARD_INFO.xml
  PANDOC docs/parts/BOARD_OPTIONS.xml
  PANDOC docs/parts/BOARD_TYPE.xml
  PANDOC docs/parts/dno_bpp.xml
  PANDOC docs/parts/dno_checksize.xml
  PANDOC docs/parts/dno_commands_for.xml
  PANDOC docs/parts/dno_dirinfo.xml
  PANDOC docs/parts/dno.xml
  PANDOC docs/parts/dno_menu.xml
  PANDOC docs/parts/dno_requote.xml
  XMLLINT docs/full_doc.xml
Creating importer for system base stylesheet for docs...
  /usr/bin/xsltproc <docbook sources>.xml --> html/index.html
Computing chunks...
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Writing pr01.html for preface(introduction)
Writing ch01.html for chapter
Writing ch02.html for chapter
Writing ch03.html for chapter
Writing ch04.html for chapter
Writing ch05.html for chapter
Writing ch06.html for chapter
Writing ch07.html for chapter
Writing ch08.html for chapter
Writing ch09.html for chapter
Writing ch10.html for chapter
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Writing ch11.html for chapter
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Writing apa.html for appendix
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Writing apb.html for appendix
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Writing apc.html for appendix
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Writing apd.html for appendix
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Writing ape.html for appendix
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Writing apf.html for appendix
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Writing apg.html for appendix
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Writing aph.html for appendix
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Writing api.html for appendix
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Unexpected appendix.autolabel value: ; using default.
Writing apj.html for appendix(gpl)
Writing index.html for book
Writing dno.css for book
dno$ 
	

1.4.5. Make Install

Installation needs to be done as root. Run make install.



[1] The big problem with sudo is that it is generally configured to allow an unprivileged user to do anything that root can do without the need for any password other than your own. What this means is that your user password becomes the single means of authentication for all administrative tasks. If you think this is unduly alarmist try typing

~$ sudo su -	      
	    

Now you have a root shell. You can do absolutely anything at this point, with virtually no audit trail, and you should be very concerned. Sudo was designed to allow non-root users to perform specific privileged tasks. In this mode of use it makes a lot of sense and poses little risk. Having sudo allow anything should be regarded as poor security practice.