This is SMART Notebook software and SMART Product Drivers shipped as RPM package files. 

PREPARATIONS:
=============
On some platforms you must install perl-Mail-Sendmail, (providing perl(Mail::Sendmail) )

You also need 
- rpmbuild (in package rpm or in rpm-build)
- rpm2cpio (probably in rpm)
- cpio
- expect

If you want to put the packages in a web repository, you also need the Python script createrepo.

You need to have GPG configured, with a secret key generated and set as the default-key in ~/.gnupg/gpg.conf.

You must import the public key to RPM to check the released packages. 
To import the key, execute as root: 
rpm --import swbuild.asc

To check a package file, execute: 
rpm --checksig smart-whatever.i686.rpm
The output line must end in "gpg OK".

You must import the public key to gpg and sign it to use a zypper repository. 
To import it, use:
gpg --import swbuild.asc

To sign this key, use:
gpg --sign-key 7DD63D3B
The SMART key will be signed with your default key.

You must place the public key in /etc/pki/rpm-gpg to use a yum repository.

You need a file named ~/.rpmmacros, which must include the following:
%_topdir <some topdir>
%_signature gpg
%_gpg_path /home/<accountname>/.gnupg
%_gpg_name <key id>

Where:
<accountname> is the user name you use to run the customization. You don't need to be root to customize.
<some topdir> is a directory to where your account can write, or which you will make. Use an absolute path. The customize script will parse the .rpmmacros file and extract that path. That is where the new package files will be built before being moved back to the cwd.
<key id> is the description string of the key you will use to sign the customized packages, as displayed by "gpg  --list-secret-keys".

Examples:
%_topdir /home/swbuild/rpmbuild
%_signature gpg
%_gpg_path /home/swbuild/.gnupg
%_gpg_name SMART Technology (Build and Install Group)

THE SHORT STORY:
================

This archive contains rpm installation packages for SMART Notebook Software and SMART Product Drivers, and a customization template file.

To prepare the packages for use, you will have to go through the following steps, which are explained in detail in THE LONG STORY below:

- provide the prerequisites detailed above;
- verify the integrity of the files you received;
- obtain a product key, either online from SMART or from your vendor channel;
- select a master signing key to use for signing the relevant data with gpg (these three steps can happen in any order)
- create a file containing the passphrase for your signing key; the script will use this and you will not be prompted for a passphrase
- edit the customization template file to insert your product key, to select the content galleries you wish, etc
- execute the automated procedure which merges the customization information into the packages
- optionally place the customized packages in a web repository and configure client machines


THE LONG STORY:
===============

In order to activate your software for a silent unattended network deployment and also in order to customize the installation, you must edit the customization file named "customization" before you install the software. 

The installation data is shipped as a package set; instructions are provided for making a web repository accessible with yum or zypper, and configuring client machines.

0. Prerequisites:
+++++++++++++++++

Ensure the packages rpm, cpio, expect, createrepo are installed. You will also need gpg, and things like sed, cut and tr.

Installing a Package Set
++++++++++++++++++++++++

You will receive an archive named SMART_software_rpm_files.tar.gz containing the following:

1.1 RPM package files named:

smart-common-<version>.i686.rpm
smart-hwr-<version>.i686.rpm
smart-languagesetup-<version>.i686.rpm
smart-activation-<version>.i686.rpm
smart-gallerysetup-<version>.i686.rpm
smart-notebook-<version>.i686.rpm
smart-product-drivers-<version>.i686.rpm
nwfermi-<version>.i386.rpm

1.2 A file named swbuild.asc containing the public key we use as the archive signing key.
    Our key ID is 7DD63D3B and the fingerprint is
    2907 DB4C CC5D 44D8 3694  5F8A BB8D 4237 7DD6 3D3B

    A customization file named "customization"

    A script named customize.sh

1.3 This README file

1.4 In order to verify the integrity of the packages, keeping all these files in the current working directory, do this:
1.4.1: import the key from swbuild.asc to gpg and find the fingerprint;
1.4.2: confirm the fingerprint with SMART or your vendor channel;
1.4.3: sign the key with your own ultimately trusted key;
1.4.4: import the key to rpm with "rpm --import swbuild.asc"
1.4.5: execute the command "rpm --checksig <p>" for every package file, where <p> denotes the package file. The output for each command should end in "gpg OK".

1.5 Once the packages are verified, you will first edit the customization file. It contains script variables which are explained by the comments that precede them. For a remote silent mass deployment it is necessary to insert the product key obtained from SMART or your vendor channel. You may also wish to select which gallery components you wish to make available

1.5.1 Before executing the customization, you will create a file called "passphrase", containing one line, as follows:
_passphrase="the passphrase which protects the key you use for signing packages"
If you use an empty passphrase, the line will be  _passphrase=""

1.6 When the customization file is modified appropriately, you will execute "./customize.sh" which will modify all the .rpm package files by inserting the contents of the customization file into the maintainer scripts of each package. At this point the RPM package files are remade and they are signed with the key specified in .rpmmacros.

1.7 Once the packages have been customized, they can be installed with "rpm -i" or inserted into your particular deployment framework.

2. Customization
++++++++++++++++

You can customize the installation as follows:
- provide the SMART Notebook product key for automatic activation
- install SMART Notebook Software or SMART Product Drivers or both
- disable the autostart of SMART Board Service and SMART Board Tools
- customize the installation of Gallery Essentials:
	- select individual gallery categories
	- install the gallery from predownloaded source
	- install the gallery in a customized location
	- register a previously installed gallery, for example, a gallery on a shared network
	- register team content
	- select your own source URL for downloading gallery content

2.1 The last feature, setting up gallery content on your own web server as a download source, was added upon request and is documented in the following paragraphs.
We will assume that your web site is  http://myweb.company.com and that the document root of your server is /var/www and the gallery data will be in /var/www/efe, accessed as http://myweb.company.com/efe.

2.1.1. To get the gallery data in the right place it must be downloaded from SMART (at least initially). Here is how to do it simply:
2.1.1.1. Make the directory to receive the data (/var/www/efe).
2.1.1.2. Install the packages in the default location with their default gallery source URL (which is currently http://downloads01.smarttech.com/software/efe/)
2.1.1.3. Download the data to its intended location with the following command:
	 "/opt/SMART Technologies/Gallery Setup/bin/GallerySetup" \
		--downloadall \
		--destination    /var/www/efe \
		--configuration  "/opt/SMART Technologies/Gallery Setup/share/SMARTEssentials.gallerycollection"
2.1.1.4. When this is done, point a browser at your web server and check that you see a long list of files ending in .gallery or in .zip

2.1.2. To make use of your new download source you will customize the packages accordingly. In the customization file, edit the following line as follows, making sure it is not commented:

		export CONTENT_LOCAL_URL=http://myweb.company.com/efe

	Then add your other customizations, execute customize.sh and install the customized packages. While "Setting up smart-notebook", a message like the following will indicate your web server connection is checked:

		Checking connection to: http://myweb.company.com/efe
		Check succeeded

	and then you will see the selected gallery components being downloaded and installed.

2.1.3. To revert to the original download source which came built into the software, simply comment out the CONTENT_LOCAL_URL line and run customize.sh again.

3. Dependencies
+++++++++++++++

The two main packages are smart-product-drivers and smart-notebook; the other five are their dependencies.

smart-notebook_<version>.i686.rpm:
	Main SMART Notebook package.
	Dependencies:
		smart-common
		smart-hwr
		smart-languagesetup
		smart-activation
		smart-gallerysetup

smart-product-drivers_<version>.i686.rpm:
	Main SMART Product Drivers package.
	Dependencies:
		smart-common
		smart-hwr
		smart-languagesetup

nwfermi-<version>.i386.rpm
	SB480 Drivers package.

4. Installation
+++++++++++++++

For package sets you can use "rpm -i", for example:

	rpm -i smart-common_10.2.286.0-1.i686.rpm

For repositories accessed over a network you can use "yum install", or "zypper install", for example:

	yum install smart-common

Note that whenever changes are made to the online archive, "yum update" or "zypper refresh" should be run on the target machines.
Also note that yum and zypper install dependencies, so that running, for example:

	yum install smart-product-drivers smart-notebook nwfermi

will actually install all packages

The following environment variables can be set in order to follow what the installation does (they are intended for use with rpm):

4.1 Logging: setting RPM_MAINTAINER_LOG to some value, and also	RPM_MAINTAINER_LOGPATH to the desired path, will cause the maintainer scripts in the packages to log the installation and uninstallation events to a file named smart_rpm_install.log under the specified path.

4.2 Tracing: setting RPM_DEBUG_SCRIPTS to some value before installing or uninstalling will cause the package scripts to be executed with "set -x" with the usual screen output.

4.3 Bypassing package scripts: If the scripts fail so severely that they will let you neither completely install nor uninstall, they can be bypassed. Bypassing while purging enables one to remove the package, thus:
		env RPM_MAINTAINER_NOSCRIPTS=1  rpm --nodeps -e smart-common
NOTE: normally this should not be needed, as rpm itself has the "--noscripts" flag.	


5. Web repositories
+++++++++++++++++++

Rather than installing packages locally with rpm commands, you may opt to keep the same packages in a web server and install them using one of the client tools such as yum or up2date (Fedora/RedHat) or zypper or Yast (SUSE).

5.1 Making a repository.

To make a repository, do the following:
5.1.1 Create a directory to contain your repository and place all the package files in it; cd to it and execute "createrepo .". A subdirectory named "repodata" will appear.
5.1.2 Then cd to repodata and check that the files filelists.xml.gz  other.xml.gz  primary.xml.gz  and repomd.xml have been created.
5.1.3 Sign the repomd.xml with "gpg --clearsign repomd.xml". This will create the file repomd.xml.asc.
5.1.4 Export the public key paired with the secret key you have used for signing (that would be your default key ID specified in .gnupg/gpg.conf) with "gpg --armor --export <key-ID>" > repomd.xml.key

Now your repository directory can be copied into the document tree of any web server.
We will assume the directory is "myrepo" and you placed it under "rpm" in a web server called "mywww". The URL of the repository is now "http://mywww/rpm/myrepo".

5.2 Configuring a Yum client machine.

5.2.1 To install packages from the newly made repository via yum, create a file named "mysource.repo" looking like this:

[SMART Technologies ULC]
name=SMART Technologies Software
baseurl=http://mywww/rpm/myrepo
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/archivekey.asc

Place it under /etc/yum.repos.d.

5.2.2 Export the public key used for signing, as before, into the file /etc/pki/rpm-gpg/archivekey.asc.
5.2.3 Execute yum update.
You should see your new repository being accessed, along with previous ones, while yum updates the cached lists it keeps on the client machine.

5.2.4 You should now be able to execute:
	yum install smart-notebook smart-product-drivers 
and you should be told that all packages will be installed.

5.3 Configuring a Zypper client machine.

5.3.1 To install packages from the newly made repository via zypper, create a file named "mysource.repo" looking like this:

[SMART Technologies U.L.C.]
name=SMART Technologies Software
enabled=1
autorefresh=1
baseurl=http://mywww/rpm/myrepo
path=/
type=rpm-md
keeppackages=0

Place it under /etc/zypp/repos.d.

5.3.2 Retrieve the public key used for signing, with "wget http://mywww/rpm/myrepo/repodata/repomd.xml.key". Import it with "gpg --import", find out its ID with "gpg --list-keys" and sign it with your default key, with "gpg --sign-key <key-ID>".
5.3.3 Execute zypper refresh.
You should see your new repository being accessed, along with previous ones, while zypper updates the cached lists it keeps on the client machine.

5.3.4 You should now be able to execute:
	zypper install smart-notebook smart-product-drivers 
and you should be told that all packages will be installed.

6. Uninstallation
+++++++++++++++++

The software is installed into /opt/SMART Technologies. Other files will be placed in /etc/xdg, /etc/udev/rules.d, /usr/share (doc, man/man1, icons/hicolor, pixmaps/hicolor, applnk, mimelnk/application),  /usr/local/share/applications and $HOME/.config

Most files are removed by the usual package removal process.

The following files are left behind after uninstallation:

6.1 global configuration files:

/etc/xdg/SMART Technologies/*.conf
/etc/xdg/SMART Technologies.conf

6.2 activation data:

/opt/SMART Technologies/common/data/.mp.1.1.dat
/opt/SMART Technologies/common/data/.vp.1.1.dat

6.3
Mime xml files wherever they are installed.

6.4
Files created in the current user's home under $HOME/.config

