background image

Linux Package Editor Reference

9

Introduction to Linux Package Editor

 

software packages. A package consists of an archive of files along with information 
about the package, including name, version, and description.

Information about all installed packages and the files that they create or change is 
stored in the RPM database on the Linux computer. RPM contains a powerful set of query 
capabilities to obtain information about packages, such as the files that make up a 
package, what files are installed, and which files are configuration or documentation 
files.

An RPM file is a package file that contains software that will be installed using RPM.

About the Shell File

The Linux project file (.LPR) compiles to a shell file (.SH), which acts as a “wrapper” to 
the RPM and provides additional functionality.

Following is a representation of the compiled shell file. 

Warning
Only create the shell file by using the Build Installation Package command. Editing the 
shell file manually will cause the installation to fail.

See also:

Building a Linux Installation Package

 on page 16

About the $WISEFOLDER Directory

 on page 26

Initialization section

Extracts the RPM file
Extracts the contents of $WISEFOLDER

Pre-RPM script

RPM command

rpm -U with additional command-line options that 
are defined in the package

Results handling information for:

installation log (used for reporting)

Binary RPM file ...

This is visible in the shell file, but as indecipherable 
binary code.

At run time, the RPM is extracted from the shell 
file.

Summary of Contents for WISE LINUX PACKAGE EDITOR 8.0

Page 1: ...Wise Linux Package Editor Reference ...

Page 2: ...ARRANTIES INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE OR NON INFRINGEMENT ARE DISCLAIMED EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY INVALID SYMANTEC CORPORATION SHALL NOT BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL DAMAGES IN CONNECTION WITH THE FURNISHING PERFORMANCE OR USE OF THIS DOCUMENTATION THE INFORMATION CONTAINED IN THIS DOCUMENT...

Page 3: ...delivers automatic software upgrade protection z Advanced features including Account Management Services For information about Symantec s Maintenance Programs you can visit our Web site at the following URL www symantec com techsupp Contacting Technical Support Customers with a current maintenance agreement may access Technical Support information at the following URL www symantec com techsupp Bef...

Page 4: ...that are related to CD ROMs or manuals Maintenance agreement resources If you want to contact Symantec regarding an existing maintenance agreement please contact the maintenance agreement administration team for your region as follows Additional enterprise services Symantec offers a comprehensive set of services that allow you to maximize your investment in Symantec products and to develop your kn...

Page 5: ...pertise from Symantec and its trusted partners Symantec Consulting Services offer a variety of prepackaged and customizable options that include assessment design implementation monitoring and management capabilities Each is focused on establishing and maintaining the integrity and availability of your IT resources Educational Services Educational Services provide a full array of technical trainin...

Page 6: ...tallation Package 16 Viewing the Session Log and Warnings 17 Testing With Preflight Packages 18 Checking the Syntax of a Script 19 Linux Package Editor Reports 19 Building a Linux Archive File 20 Chapter 4 Creating Linux Packages 22 About Installation Expert in Linux Package Editor 22 The Installation Expert Window 22 General Information 24 Defining the Version 24 Files Page 25 About Directory and...

Page 7: ...heck Process 51 Check RPM Database 51 Compiler Variable Actions 52 Copy File s 53 Create Directory 54 Delete File or Directory 54 Delete Line From Text File 54 Delete User or Group 55 Else Statement 55 ElseIf Statement 55 End If 56 End While 56 Execute Program 56 Execute Shell Command 56 Exit Installation 57 Find File 57 Get System Information 57 Get Temporary Filename 58 Halt Compile 59 If Statem...

Page 8: ...ile or build an RPM from binary application files Then you can edit the installation and add scripts to provide additional functionality during the RPM installation Linux Package Editor does not build or use a spec file or a source RPM which typically are used to create RPM packages Instead you specify source files and installation actions in a Linux project file LPR When you compile the Linux pro...

Page 9: ...out the Shell File The Linux project file LPR compiles to a shell file SH which acts as a wrapper to the RPM and provides additional functionality Following is a representation of the compiled shell file Warning Only create the shell file by using the Build Installation Package command Editing the shell file manually will cause the installation to fail See also Building a Linux Installation Packag...

Page 10: ...efined in Tools menu Options It has the extension LPR 4 Edit the new installation in Installation Expert See The Installation Expert Window on page 22 Conventions for Naming Linux Shell Variables You can use variables in several areas of Linux Package Editor When you do follow standard conventions for naming Linux shell variables Variable names z Must begin with a letter or an underscore _ z Must ...

Page 11: ... active window or dialog box press F1 z To select a help topic from a table of contents index or search select Help menu Help Topics Reference Manual All the material in the online help is also available in a PDF format reference manual which you can access by selecting Help menu Reference Manual Getting Started Guide The Getting Started Guide contains system requirements and installation instruct...

Page 12: ...tch your Linux environment See Browsing the Linux File System on page 15 Setting Options You can set global options that apply to all packages that you create with Linux Package Editor Set the following options on the Options dialog box which you access by selecting Tools menu Options z Project Directory Specify the default directory in which to store new installation projects This defaults to the...

Page 13: ...check the syntax of a package s shell script with the Linux computer s interpreter and obtain archive files from the Linux computer Requirements z A Windows SSH client z The Linux computer must run SSH To set up a Linux proxy 1 Set up SSH on your Windows and Linux computers a Install a third party SSH client tool on the Windows computer b On the Environment Variables dialog box in Windows add the ...

Page 14: ...list of items from a Linux computer Changes that you make on the Linux Environment Settings dialog box are global which means that they appear in all projects that you subsequently open To add a user group package or package group 1 Check a Linux computer for the details of the user group package or package group that you will add You need the correct name and the ID if applicable as it appears on...

Page 15: ...llation directories that you add on the Files page are not visible in the Browse Linux File system dialog box To access the Browse Linux File System dialog box Do either of the following z Click the Browse button at any entry field that requires a Linux directory path z Select Tools menu Linux Environment Settings and click Edit Linux File System Tasks You Can Perform on the Browse Linux File Syst...

Page 16: ...field z General Information page Summary field z Version page Version field z Version page Release field z Platforms page at least one platform must be added z Files page at least one file must be added The name version release and platform are combined to form the RPM name Example If Name is SampleApp Version is 1 2 Release is 3 and the platform is i386 then the RPM name is SampleApp 1 2 3 i386 r...

Page 17: ... file for details To check the log file click the Warnings button at the lower right of the Linux Package Editor window Viewing the Session Log and Warnings When you experience problems with a package you can view the session log and the warnings to determine the cause of the problems Session Log The session log WiseForLinux log records all activity that occurs in Linux Package Editor during the c...

Page 18: ...e URL that is specified in Installation Expert Installation Log page The Linux computer must have access to that URL You can view this log in the Reports view Because preflight packages do not contain any files to be installed and are smaller than normal packages distributing preflight packages for testing purposes minimizes bandwidth usage Requirements Microsoft Internet Information Server IIS 4 ...

Page 19: ...ditor Reports Use the following reports to obtain information about your packages and installations The Installation Reports and Preflight Reports are obtained from the installation logs that are posted to the URL that is specified in Installation Expert Installation Log page If the installation has not been run or if the log file has not been posted the reports page is empty If you are using the ...

Page 20: ... format z An RPM file is a package file that contains software that will be installed using RPM You can use this feature to create an RPM without the shell wrapper However the RPM will not have the pre installation and call script capabilities of the shell wrapper The archive and compression formats preserve the information that is associated with the files directory structure file contents owners...

Page 21: ...Linux Package Editor Reference 21 Managing Linux Packages Importing From a Linux Archive File on page 30 ...

Page 22: ...ut Installation Expert in Linux Package Editor Installation Expert lets you create and edit RPM packages and provides an easy to use task oriented user interface to perform the most common installation tasks Each page of Installation Expert lets you configure a specific aspect of the package In Installation Expert the pages are organized into logical groups and listed in the order in which you usu...

Page 23: ...ly the pages that are pertinent to your particular package in any order If required information is missing an error message appears during the build process z Use on the toolbar to navigate from page to page or click the page name in the list of pages z To display help for the current page press F1 View Navigation Click these tabs to change views Build and Troubleshoot Use the Build and Warning bu...

Page 24: ...nsible for distributing the packaged software z URL Enter a URL that points to additional information about the packaged software This might be the URL to documentation on your company s web site or to the vendor s web site z Copyright Enter copyright or license information that applies to the software being packaged Example Copyright 2006 Sample Company All rights reserved If your software is mad...

Page 25: ...ry time you change and rebuild the package This information becomes part of the package label z Serial Epoch Optional The serial number helps RPM to determine version number ordering in cases where RPM might not be able to interpret the version number This can happen when the version number contains an alpha character or when the version numbering scheme has changed between releases Enter a unique...

Page 26: ...ectory on the Linux computer Everything in this directory is extracted when the shell file is run therefore any files that must be present before the RPM is run should be placed in this directory when the package is created Examples z Call scripts these are placed here for you when you add them to the script z Circular dependency files See Handling Circular Dependencies on page 33 You define the v...

Page 27: ...e directory from the Linux computer You cannot delete a predefined directory Delete File Remove a file from the installation This does not delete the file from the Linux computer Details View and edit details about a file including the file category and permissions See also About Directory and File Settings Completing the File Details Dialog on page 28 Adding Files to a Package on page 30 Importin...

Page 28: ...considered application files z Configuration file During installations upgrades and uninstalls RPM performs additional processing for configuration files to prevent the loss of changes that might be made to those files by the system administrator z Documentation file RPM keeps track of documentation files in its database Be sure to verify that each file in the package is assigned to the correct ca...

Page 29: ...osition indicates a directory Normal File Normal files are indicated by a in the first position of the file attributes Symbolic Link File A symbolic link file is a special type of file that contains a path to another file Instead of accessing the data in the symbolic link file the operating system accesses the data in the file named in the symbolic link This is similar to a shortcut in Windows You...

Page 30: ...ng With the Files Page on page 26 To add files to a package 1 In Linux Package Editor select Installation Expert Files page 2 If the directory where the file is to be added is not listed in the lower left list box a Select the directory under which the new directory should be created b Click New Folder enter a name and click OK The directory you specify will be created on the Linux computer if it ...

Page 31: ...ive File on page 20 About Dependency Relationships Every RPM package provides capabilities A capability is a text string representing a function that the package claims it provides In most cases a capability names a file or package but a capability also can be any arbitrary text string Capability information for installed packages is stored in the RPM database When you install or uninstall a packa...

Page 32: ...ossible packages individually It can be installed when any one of the dependency packages is installed Example Your package is a mail program that requires the functionality of a local delivery agent Several local delivery agents are available and your package can work with any of them The developers of the local delivery agent packages specify a capability of lda which is a virtual package If you...

Page 33: ...ependency is required before installation PostInstall The dependency is required after installation PreUninstall The dependency is required before uninstallation PostUninstall The dependency is required after uninstallation Verification The dependency is required when verification rpm V is run This is not commonly used The following options do not apply to this page and are not available Trigger I...

Page 34: ...ilable to the rpm command so that it can be installed at the same time as the Application A files See also Adding Dependencies on page 32 Adding Files to a Package on page 30 Specifying Build Settings on page 41 About the WISEFOLDER Directory on page 26 Adding Capabilities On the Capabilities page you specify the capabilities that this RPM package provides Specify as many capabilities as you think...

Page 35: ...Uninstall Verification Trigger Install Trigger Uninstall Trigger Post Uninstall Trigger Script Name See also About Dependency Relationships on page 31 Adding Conflicts On the Conflicts page you specify the RPM packages that conflict with the current package In order for the current package to run properly these conflicting packages cannot be installed on the Linux computer To add a conflict In Lin...

Page 36: ...at the current package makes obsolete This typically is used when the name or version of a package changes To add an obsolete package In Linux Package Editor select Installation Expert Obsoletes page click Add and complete the Define Obsolete Package dialog box z Package Name Enter or select a package that the current package makes obsolete This can be a package name or a file name If you leave th...

Page 37: ...igger and the script to run when the event occurs A trigger can occur when your package or another package is installed or uninstalled A trigger script might change some configuration of your package or it might send a notification email To add a trigger In Linux Package Editor select Installation Expert Triggers page click Add and complete the Define Trigger Package dialog box z Package Name Ente...

Page 38: ...talled z Trigger Script Name Select a script to run when the trigger event occurs This drop down list contains any trigger scripts that you have added to this package To create a new script click New The New Script dialog box appears To add a trigger script Complete the New Script dialog box 1 In New Script Name enter a name for the script 2 Select the script type WiseScript wsl This is a shell sc...

Page 39: ... Architecture Select an architecture Currently only i386 is supported This information becomes part of the package label z Operating System Select an operating system Currently only Linux is supported See also Completing the File Details Dialog on page 28 Configuring the Installation Log When a package runs on a Linux computer it can create an installation log On the Installation Log page you spec...

Page 40: ...trol the amount of information that is recorded in the installation log You can set different levels of detail during different phases of package development Example During the package debugging phase you might have the installation log write a marker for each command being executed but when you finish debugging you turn that option off z Write a marker for each command being executed z Send the s...

Page 41: ...Expert Build Settings and complete the page z Wise Management Directory on the Linux Computer Specify the directory on the Linux computer to serve as a working directory for Linux Package Editor packages A separate subdirectory is created for each Linux Package Editor project with the project name as the subdirectory name The value of WISEFOLDER the Wise Management Directory the project specific s...

Page 42: ...Script Editor supports a point and click method of scripting Scripts provide additional package functionality they are not required However most packages have at least a post install script to re load the shared libraries command ldconfig The Script Editor window contains tools for developing and editing scripts To access Script Editor click Script Editor at the bottom of the Linux Package Editor ...

Page 43: ... installation script a tab for the call script appears next to the tab for the current installation script Script Line Numbering z To show or hide script line numbers select View menu Line Numbers z Connection lines connect the beginning and end of an If block or a loop To show or hide connection lines select View menu Connection Lines Viewing Script Code Most of the script actions in Script Edito...

Page 44: ...ou typed is the current item in the list When the action you want is the current item in the list press Enter When you add an action a dialog box appears that lets you set the parameters for the action unless it does not require parameters Some actions come in pairs Example When you add an If action you must also add an End action at the end of the condition block Script Editor indents actions ins...

Page 45: ...y comment out certain script lines to help with the debug process Commented out lines remain in the script but are skipped when the script is executed 1 Select one or more lines 2 Select Edit menu Comment The commented out lines appear in green and begin with To reactivate commented out lines select the lines and select Edit menu Comment Finding and Replacing Text in a Script To find and replace t...

Page 46: ...hell Command Exit Installation Find File Get System Information Get Temporary Filename Halt Compile If Statement Insert Line Into Text File Manage a Service Post to HTTP Server Read Update Text File Remark Rename File Directory Search File for Text Set Variable Start Stop Process While Statement About script actions in Linux Package Editor The Linux Package Editor contains script actions that let ...

Page 47: ...cation scripts Those scripts cannot determine the log name because of the date and time in the file name This is not a problem if you use a specific log file name To complete the dialog box z Enter Log Text Enter the text to be added to the log file You can enter a variable preceded by and adhering to standard conventions for naming Linux shell variables See also Configuring the Installation Log o...

Page 48: ...events this user from logging in Use the nologin shell for accounts that are disabled or that only need FTP POP3 or SMTP mail server access z Home Directory If this is a system user or if you are defining a user for the application itself mark None To use the default home directory home user_name mark Default To specify a directory other than the default mark Directory and enter the directory name...

Page 49: ...dialog box Global Script Mark this to call an existing or new global script To call an existing script select it from the drop down list To call a new script click New and specify the script s name and type on the New Script dialog box Local Script Mark this to call an existing or new local script To call an existing script select it from the drop down list To call a new script click New and speci...

Page 50: ... ID Bit If this is an executable file mark this to set the file to run with the same privileges as the file group specified above z Owner Enter or select the owner of this file or directory z Group Enter or select the group that owns this file or directory Check File or Directory This action checks a file or directory on the Linux computer to see if it exists or if its size is non zero When the ac...

Page 51: ...ocess This action determines whether a specific process is running on the Linux computer When the action is run the number of instances of the specified process is placed in the RETURNCODE variable Note In rare instances two different processes might have the same name Both processes would be reported as instances of the same process To complete the dialog box z Process Name to Check Enter a Linux...

Page 52: ...t tags in Options below z Variable Enter or select the name of the variable in which to place the results of the query When you define the variable you do not have to precede it with a Otherwise follow standard conventions for naming Linux shell variables z Options This is available only when the following options are marked If you marked the Verify package option above enter one or more valid com...

Page 53: ...ox and change the value to Y The Add Text to INSTALL LOG action within the Compiler Variable If block is added to the final script The debug information you requested then appears in the installation log To create a compiler variable If block 1 Add a Compiler Variable If action and complete the dialog box Variable Select a compiler variable from the first drop down list and a comparison method fro...

Page 54: ...ry This action removes files or directories from the Linux computer When the action is run the results are placed in the RETURNCODE variable To complete the dialog box z File Dir Path Specify the path of the file or directory to delete Delete Line From Text File This action deletes lines from a text file on the Linux computer Example You can delete a user from the password file passwd When the act...

Page 55: ... of a section of instructions to be executed when the condition specified in the matching If Statement is false It takes no parameters and selecting it from the Actions list inserts it directly into the script with no further dialog boxes or prompts See also If Statement on page 59 ElseIf Statement This action is used inside an If block to check for another condition It marks the beginning of a bl...

Page 56: ...th to the program to run including the program file name Variables are allowed If you enter the program name only then enter the program s location in the Default Directory field below z Arguments Enter any arguments to apply to the program when it runs z Default Directory Specify the directory that should be current when the program runs The installation performs a Change Directory command cd bef...

Page 57: ...ter the file name only not a full path Wildcard characters are allowed z Variable Name Enter a variable in which to put the path of the file if it is found If the file is not found this variable stores the Default Value specified below z Default Value Enter a value to put into the variable if the file is not found To use an If statement that tests the variable leave this blank so it evaluates to f...

Page 58: ...e Memory The amount of physical RAM Installed Memory The amount of physical memory OS The computer s operating system Linux Package Editor supports Linux only z Pathname Use this field only for operations that retrieve information on files or directories Specify the full path of the file or directory to retrieve information from Get Temporary Filename This action generates a unique temporary name ...

Page 59: ...econd drop down list The Value Enter the value to be used in the comparison This is case sensitive unless you selected a comparison method that ignores case If you enter variable names include before the variable You cannot use compiler variables 2 Below the If Statement add one or more actions to perform if the variable has the specified value 3 Optional Add an Else or several ElseIf actions Foll...

Page 60: ...t the active command not the commented line z Insert Action Select the action to be taken when a line is found z Match Criteria Select how the line is matched with the text in Search for Text z Case Insensitive Mark this to make the match case insensitive z Make Backup File Mark this to make a copy of the text file before editing it A number is appended to the end of the file name for the backup c...

Page 61: ... dialog box z Destination URL Enter the URL of the CGI program or ASP page that accepts posted data z Text to Post Enter one or more lines in the following format field data where field is the name of the field as it is expected by the CGI program and data is the data to be sent in that field If a line does not appear to contain a field name followed by it is assumed to be a continuation of the pr...

Page 62: ...ample text 001 text 002 and so on Remark This action adds comments or blank lines to the script Remarks are green and prefaced by Rem To complete the dialog box z Enter Remark Enter the comment To add a blank line leave this field blank Rename File Directory This action renames or moves a file or directory on the Linux computer This can be an existing file or directory or a file or directory that ...

Page 63: ...nd Logical expressions are run through the Linux Bash test command To complete the dialog box z Set Variable Specify a variable adhering to standard conventions for naming Linux shell variables z String Expression Mark this to set the variable to part of a string that is stored in another variable Define the string in the String Function Variable Name and Argument fields z String Function Select o...

Page 64: ... the string Example If the string is 12345 and you specify 2 as the starting point this returns 2345 Concat Joins the string in Variable Name and the literal text or variable value in Argument Instr Determines if a substring is present within an original string In Argument enter the substring Before Returns the portion of a string before a specified substring In Argument enter the substring Exampl...

Page 65: ...art or stop the process While Statement This action begins a While loop An EndWhile action must end the loop As long as the condition that is specified in the While Statement dialog box is true the script lines inside the loop execute repeatedly If the condition is not true then the While loop is exited and the next script line is executed To create a While loop 1 Add a While Statement and complet...

Page 66: ...Linux Package Editor Reference 66 Script Actions See also End While on page 56 ...

Page 67: ...Compiler Variable End 52 Compiler Variable If 52 Compiler Variables page 40 compressed file 20 configuration file 28 conflicts about 32 adding 35 connection lines in script 43 Copy File s 53 CPIO file 20 Create Directory 54 D debug options 40 Delete File or Directory 54 Delete Line From Text File 54 Delete User or Group 55 dependencies about 31 adding 32 circular 33 directory creating on Linux com...

Page 68: ...ckage file 9 package group editing list 14 page See Installation Expert Linux page groups Linux 23 Perl script editing 49 permissions changing 50 setting 29 platform Linux adding 39 Post to HTTP Server 61 preferences See options preflight about 18 how to run 18 package 18 Preflight Reports 19 process checking 51 starting stopping 65 program executing on Linux computer 56 Project Configurations 19 ...

Page 69: ... getting 57 system requirements Wise product Refer to Getting Started Guide T TAR file 20 temporary file name getting 58 text finding in script 45 reading from file 61 updating in file 61 text file deleting line 54 editing 59 TGZ file 20 tmp directory 58 trigger adding 37 event 38 script 38 U URL check 51 user adding 47 deleting 55 editing list 14 V variable assigning value 10 name conventions 10 ...

Reviews: