Skip to content

Setup import casper packages

Chris Lasell edited this page Mar 19, 2016 · 1 revision

Importing existing Casper packages into d3

Now that you've added a package that wasn't in the JSS, let's import one that's already there.

Importing is just like adding, except you must provide the --import option, or else d3admin thinks you're just doing a normal add. The can be the id number or display-name of any package in the JSS that isn't already in d3.

As with adding a fresh package, you can use walkthru mode, or provide everything on the command-line. Heres walkthru:

% d3admin add  tranmogrifier --import tranmogrifier12.3 --walkthru
VERSION
Enter a version for this package.
All spaces will be converted to underscores.
Version: 12.3

REVISION
Enter a Package revision for this package.
This is an integer representing a new packaging of
an existing version of a given basename.
Revision: 1

[Screen clear]
------------------------------------
Editing unsaved d3 package 'tranmogrifier-12.3-1'
JSS Package id: 3070
JSS Package name: tranmogrifier12.3.pkg
Installer filename: tranmogrifier12.3.pkg
------------------------------------
Current Settings => New Settings

1) Version: 12.3
2) Revision: 1
3) JSS Package Name: aesubmit-1-1.pkg
4) Dist. Point Filename: aesubmit-1-1.pkg
5) Category: pkg-application
6) Limited to OS's: none
7) Limited to CPU type: x86
8) Needs Reboot: false
9) Uninstallable: true
10) Uninstalls older installs: false
11) Installation prohibited by processes matching: none
12) Auto installed for groups: phylo-macs
13) Excluded for groups: servers,kiddie-pool
14) Pre-install script: none
15) Post-install script: none
16) Pre-uninstall script: none
17) Post-uninstall script: none
18) Expration: none
19) Expration Path: none
20) Description: 
----
This is the Transmogrifier tool used by the phylogenics
department.
----
Which to change? (1-20, x=done, ^c=cancel): x

*****************************************
Ahoy there! You are about to:
Import tranmogrifier-12.3-1, JSS id 3070, into d3
*****************************************
with these non-default settings...
Auto installed for groups: phylo-macs
Excluded for groups: servers,kiddie-pool

Are you SURE? (y/n): y
Done: the package has been imported to d3.

Do that same thing with a single command-line like this:

% d3admin add  tranmogrifier \
  --import tranmogrifier12.3 \
  --auto-groups phylo-macs \
  --excluded-groups servers,kiddie-pool  

(split into multi-lines for readability)

Something to watch out for!

Be careful when choosing a basename, version, and revision for imported packages.

d3's idea of 'older' and 'newer' packages (which is used for determining a package's status) is based on its JSS id number. Higher numbered packages are always newer, since they were always added to Casper later. So within a basename, while only one package can be live at a time, any newer package is 'pilot' and any older one is 'skipped' or 'deprecated'

Automation?

If you've added packages to Casper with some systematic naming scheme, it might be easy enough to automate the import of your packages using d3admin's command-line mode.