Symantec WISE LINUX PACKAGE EDITOR 8.0 Reference

Category
Software
Type
Reference

This manual is also suitable for

Wise Linux Package Editor Reference
Linux Package Editor Reference 2
Wise Linux Package Editor
The software described in this book is furnished under a license agreement and may be used only in accordance with the terms of the
agreement.
Documentation version 8.0
Legal Notice
Copyright © 2009 Symantec Corporation. All rights reserved.
Symantec, the Symantec Logo, and Altiris are trademarks or registered trademarks of Symantec Corporation or its affiliates in the U.S. and
other countries. Other names may be trademarks of their respective owners.
The product described in this document is distributed under licenses restricting its use, copying, distribution, and decompilation/reverse
engineering. No part of this document may be reproduced in any form by any means without prior written authorization of Symantec
Corporation and its licensors, if any.
THE DOCUMENTATION IS PROVIDED “AS IS” AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
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 DOCUMENTATION IS SUBJECT TO CHANGE WITHOUT NOTICE.
The Licensed Software and Documentation are deemed to be commercial computer software as defined in FAR 12.212 and subject to
restricted rights as defined in FAR Section 52.227-19 “Commercial Computer Software - Restricted Rights” and DFARS 227.7202, “Rights in
Commercial Computer Software or Commercial Computer Software Documentation”, as applicable, and any successor regulations. Any use,
modification, reproduction release, performance, display or disclosure of the Licensed Software and Documentation by the U.S. Government
shall be solely in accordance with the terms of this Agreement.
Symantec Corporation
350 Ellis Street
Mountain View, CA 94043
http://www.symantec.com
Linux Package Editor Reference 3
Technical Support
Symantec Technical Support maintains support centers globally. Technical Support’s
primary role is to respond to specific queries about product features and functionality.
The Technical Support group also creates content for our online Knowledge Base. The
Technical Support group works collaboratively with the other functional areas within
Symantec to answer your questions in a timely fashion. For example, the Technical
Support group works with Product Engineering and Symantec Security Response to
provide alerting services and virus definition updates.
Symantec’s maintenance offerings include the following:
z A range of support options that give you the flexibility to select the right amount of
service for any size organization
z Telephone and Web-based support that provides rapid response and up-to-the-
minute information
z Upgrade assurance that 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/
Before contacting Technical Support, make sure you have satisfied the system
requirements that are listed in your product documentation. Also, you should be at the
computer on which the problem occurred, in case it is necessary to replicate the
problem.
When you contact Technical Support, please have the following information available:
z Product release level
z Hardware information
z Available memory, disk space, and NIC information
z Operating system
z Version and patch level
z Network topology
z Router, gateway, and IP address information
z Problem description:
Error messages and log files
Troubleshooting that was performed before contacting Symantec
Recent software configuration changes and network changes
Linux Package Editor Reference 4
Licensing and registration
If your Symantec product requires registration or a license key, access our technical
support Web page at the following URL:
www.symantec.com/techsupp/
Customer service
Customer service information is available at the following URL:
www.symantec.com/techsupp/
Customer Service is available to assist with the following types of issues:
z Questions regarding product licensing or serialization
z Product registration updates, such as address or name changes
z General product information (features, language availability, local dealers)
z Latest information about product updates and upgrades
z Information about upgrade assurance and maintenance contracts
z Information about the Symantec Buying Programs
z Advice about Symantec’s technical support options
z Nontechnical presales questions
z Issues 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 knowledge, expertise, and global
insight, which enable you to manage your business risks proactively.
Enterprise services that are available include the following:
Asia-Pacific and Japan [email protected]
Europe, Middle-East, and Africa [email protected]
North America and Latin America [email protected]
Symantec Early
Warning Solutions
These solutions provide early warning of cyber attacks,
comprehensive threat analysis, and countermeasures to prevent
attacks before they occur.
Managed Security
Services
These services remove the burden of managing and monitoring
security devices and events, ensuring rapid response to real
threats.
Linux Package Editor Reference 5
To access more information about Enterprise services, please visit our Web site at the
following URL:
www.symantec.com
Select your country or language from the site index.
Consulting
Services
Symantec Consulting Services provide on-site technical
expertise 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 training,
security education, security certification, and awareness
communication programs.
Linux Package Editor Reference 6
Contents
Technical Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Chapter 1: Introduction to Linux Package Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
About Linux Package Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
About RPM. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
About the Shell File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Starting Linux Package Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Conventions for Naming Linux Shell Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Product Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Chapter 2: Setting Up Linux Package Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Requirements for setting up Linux Package Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Setting Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Linux Environment Settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Setting Up an SSH Linux Proxy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Editing the Default User, Group, Package, and Package Group Lists . . . . . . . . . . . . . . . . . . . . 14
Browsing the Linux File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Chapter 3: Managing Linux Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Building a Linux Installation 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 File Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Completing the File Details Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Adding Files to a Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Importing From a Linux Archive File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
About Dependency Relationships . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Adding Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Handling Circular Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Adding Capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Adding Conflicts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Adding Obsolete Packages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Adding Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Adding Platforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Configuring the Installation Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Setting Compiler Variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Specifying Build Settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Linux Package Editor Reference 7
Chapter 5: Using Script Editor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
The Script Editor Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Viewing Script Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Adding an Action to a Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Editing Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Finding and Replacing Text in a Script. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Chapter 6: Script Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
About script actions in Linux Package Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Add Text to INSTALL.LOG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Add User or Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Call Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Change File Attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Check File or Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Check HTTP Connection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Check 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 Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Insert Line Into Text File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Manage a Service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Post to HTTP Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Read/Update Text File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Remark. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Rename File/Directory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Search File for Text. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Set Variable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Start/Stop Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
While Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Linux Package Editor Reference 8
Chapter 1
Introduction to Linux Package Editor
This chapter includes the following topics:
z About Linux Package Editor on page 8
z Starting Linux Package Editor on page 10
z Conventions for Naming Linux Shell Variables on page 10
z Product Documentation on page 11
About Linux Package Editor
Many system administrators in a primarily Windows environment must also support
Linux computers, typically servers. Supporting installations on Linux computers presents
some of the same consistency, standardization, and customization challenges as on
Windows computers.
Linux Package Editor lets you use a Windows computer to create packages that install
software on Linux computers. Using an interface that is similar to that in other Wise
installation development products, you can easily create Linux packages without having
an in-depth knowledge of Linux commands.
With Linux Package Editor, you can either import an RPM file or Linux archive file, 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 project, Linux Package
Editor creates the RPM file and embeds it into a shell file (.SH), which acts as a
“wrapper” to the RPM and contains any additional scripts that you have written.
The functionality of Linux packages is provided by standard Linux commands. Many
resources for learning about Linux commands are available on the Internet.
Linux Package Editor is a tool in the Professional Edition of Wise Package Studio.
Linux Package Editor supports the following versions of Red Hat Linux:
z Red Hat Enterprise Linux 2.1
z Red Hat Enterprise Linux 3
z Red Hat Enterprise Linux 4
z Red Hat Linux 7.2, 7.3, 8.0, 9.0
About RPM
Red Hat Package Manager (RPM) is a command line-driven package management
system capable of installing, uninstalling, verifying, querying, and updating computer
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.
Linux Package Editor Reference 10
Introduction to Linux Package Editor
Starting Linux Package Editor
The first time you open Linux Package Editor, no project is open, so you cannot edit any
pages. Once you create one or more new projects, Linux Package Editor always opens
the last opened project at startup.
To start Linux Package Editor
1. In Wise Package Studio, do one of the following:
On the Projects tab, click the Run link to the right of the task or tool associated
with Linux Package Editor.
On the Tools tab, double-click Linux Package Editor.
The Enter the New Linux Project Name dialog box appears.
2. Enter a project name, following standard Windows file and folder naming
conventions.
3. Click OK.
The project is created in the project folder, which is defined 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 contain alphanumeric or underscore characters.
z Cannot contain special characters or embedded spaces.
z Are case-sensitive.
z Cannot be a reserved word. A reserved word is one that is already understood by
Bash. For a list of reserved words, see the Linux or Bash documentation.
Using a Variable
Place a $ before the variable name. Example:
rm -f $INSTALL_LOG_NAME
Assigning a Value to a Variable
Use the format variable_name=value. Do not include spaces before or after the = sign.
Example:
INSTALLDIR=/
For information about shell variables, see the Linux documentation.
Linux Package Editor Reference 11
Introduction to Linux Package Editor
Product Documentation
This documentation assumes that you are proficient in the use of the Windows operating
system. If you need help using the operating system, consult its user documentation.
Use the following sources of information to learn about this product.
Online Help
The online help contains detailed technical information and step-by-step instructions for
performing common tasks.
Access help in the following ways:
z To display context-sensitive help for the 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 instructions.
You can access a .PDF version of the Getting Started Guide from the Windows Start
menu.
Release Notes
The product release notes cover new features, enhancements, bug fixes, and known
issues for the current version of this product. To access the release notes, select Release
Notes from the Symantec program group on the Windows Start menu.
Linux Package Editor Reference 12
Chapter 2
Setting Up Linux Package Editor
This chapter includes the following topics:
z Requirements for setting up Linux Package Editor on page 12
z Setting Options on page 12
z Linux Environment Settings on page 13
z Browsing the Linux File System on page 15
Requirements for setting up Linux Package Editor
Before you use Linux Package Editor to create RPM packages:
z Set global options.
See Setting Options.
z (Optional.) Set up a Linux proxy so you can check the syntax of a package’s shell
script with the Linux computer’s interpreter.
See Setting Up an SSH Linux Proxy on page 13.
z Edit default lists that appear throughout the Linux Package Editor.
See Editing the Default User, Group, Package, and Package Group Lists on page 14.
z Customize the display of the Linux file system throughout the Linux Package Editor
to match 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 Projects\LinuxProjectFolder subdirectory of the Wise Package Studio share
point directory.
z Text Editor
Specify a text editor executable file. (Example: notepad.exe.) This determines the
text editor that is used to open the session log file, as well as any file in the
installation that you right-click on the Files page.
z Add extended debug messages in the log file
Mark this to add highly technical debug entries to the session log
(WiseForLinux.log), which records all activity that occurs in Linux Package Editor
during the current session. These entries are provided for technical support
diagnostic purposes; they do not appear when you view the session log.
Linux Package Editor Reference 13
Setting Up Linux Package Editor
The session log is different from the RPM log file, which logs events during RPM
installation.
See Viewing the Session Log and Warnings on page 17.
Linux Environment Settings
The Linux Environment Settings dialog box, which you access by selecting Tools menu >
Linux Environment Settings, lets you:
z Set up a Linux proxy computer.
See Setting Up an SSH Linux Proxy.
z Edit default lists that appear throughout the Linux Package Editor.
See Editing the Default User, Group, Package, and Package Group Lists on page 14.
z Customize the display of the Linux file system throughout the Linux Package Editor
to match your Linux environment.
See Browsing the Linux File System on page 15.
Setting Up an SSH Linux Proxy
Setting up a Linux proxy on your Windows computer lets you 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 installation
directory for the SSH client tool in the PATH environment variable. To access
this dialog box:
Select Start > Control Panel> System.
Click the Advanced tab.
Click the Environment Variables button.
c. Use the SSH client tool to connect to the Linux computer.
2. In Linux Package Editor, select Tools menu > Linux Environment Settings.
The Linux Environment Settings dialog box appears.
3. Complete the top portion of the dialog box:
Mark Enable proxy machine for script and package validation.
Machine Address or Name
Enter the name or address of the Linux computer on your network. The format
should be linux.company.com or 0.0.0.0.
Linux Package Editor Reference 14
Setting Up Linux Package Editor
Username
Enter the user name that you use to log on to the Linux computer.
SSH Password
Enter an SSH password here and then re-enter it in Verify Password.
4. Click Test to test the connection.
A message indicates whether the connection was successful.
5. Click OK on the Linux Environment Settings dialog box.
See also:
Checking the Syntax of a Script on page 19
Editing the Default User, Group, Package, and Package Group Lists
In several areas of Linux Package Editor, you can select from lists of Linux users, groups,
packages, and package groups. (Example: On the File Details dialog box, you can set
the File Owner and File Group.) The defaults for these lists were obtained from a
standard Red Hat Linux system, and are visible on the Linux Environment Settings
dialog box. You can customize these lists to match your Linux environment by adding
individual items or importing a 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 the Linux computer.
2. Select Tools menu > Linux Environment Settings.
3. Click Add Item.
The Edit Linux Configuration Item dialog box appears.
4. Complete the dialog box and click OK:
Name
Enter the name of the item to add.
ID
Enter the name of the Linux user or group to add. This field is not applicable if
you select the Package or Package Group option below.
User, Group, Package, Package Group
Select the type of item to add.
5. Click OK.
The item you added appears in the appropriate list box on the Linux Environment
Settings dialog box. Initially, the item appears at the end of the list, but you can
click the column heading to re-sort the list.
To import users, groups, or package groups
When you import a file, it overwrites the existing list.
Linux Package Editor Reference 15
Setting Up Linux Package Editor
1. Obtain a text file containing users, groups, or package groups from a Linux
computer and place the file in a directory that your development computer can
access. (The user file is named passwd.)
2. Select Tools menu > Linux Environment Settings.
3. Click Import File and select a type of file to import from the button menu.
4. On the Select Linux File dialog box, find and open a Linux user, group, or package
group file.
Browsing the Linux File System
In several areas of Linux Package Editor, you can open the Browse Linux File System
dialog box and select a directory from a typical Linux file system. The file system that is
displayed was obtained from a standard Red Hat Linux system. You can customize the
display to match your Linux environment.
Installation 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 System Dialog Box
z To select a directory for the current project, select it from the directory tree or enter
its name in the Selected File or Directory field.
z To add a directory, select a parent directory in the list box, click Add Directory, and
enter the new directory name. The new directory is added at the end of the
directory tree, but the tree will be re-sorted the next time you display the Browse
Linux File System dialog box.
z To delete a directory, select it and click Delete Directory.
z To toggle between using a single or double-click to select items in the list box, mark
or clear Single-click to Select.
Linux Package Editor Reference 16
Chapter 3
Managing Linux Packages
This chapter includes the following topics:
z Building a Linux Installation Package on page 16
z Viewing the Session Log and Warnings on page 17
z Testing With Preflight Packages on page 18
z Checking the Syntax of a Script on page 19
z Linux Package Editor Reports on page 19
z Building a Linux Archive File on page 20
Building a Linux Installation Package
The Linux project file (.LPR) compiles to a shell file (.SH), which acts as a “wrapper” to
the RPM and provides additional functionality.
See About the Shell File on page 9.
Requirements for Building a Package
The project must contain the following information:
z General Information page: Name 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.rpm.
To build a Linux package
1. Click Build, or select Tools menu > Build Installation Package.
The Build Installation Package dialog box appears.
2. Complete the dialog box:
Select Platform
Select a platform from this list, which contains the platforms that are specified
in Installation Expert > Platforms page. Files that have the platform you select
here will be included in the package that is built. You specify a platform for each
file on the File Details dialog box.
See Completing the File Details Dialog on page 28.
Linux Package Editor Reference 17
Managing Linux Packages
File Name
Specify the path and file name of the package file to be built. The default is the
project name with the extension .sh. If you override the default, be sure to
include the extension or a build error will occur.
Compiler Variables
Any compiler variables that are specified on the Compiler Variables page appear
in this list. Double-click a compiler variable to change it for this build only.
See Setting Compiler Variables on page 40.
Build a Preflight Package
Mark this to build a special version of the package that runs the logic and
checks conditions of the installation but does not install any files on the Linux
computer.
See Testing With Preflight Packages on page 18.
3. Click OK.
If the build was successful, a message confirms that the package was created.
Otherwise an error message appears, telling you to check the log 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 current session. Therefore, it contains entries for both the current
project and any other projects you opened during the current session. Entries are
categorized as log entries, messages, and warnings.
To view the session log, select File menu > View Session Log File.
Warnings
Warnings are a subset of the session log. When warnings exist, the text on the Warnings
button is red.
To view warnings, click the Warnings button at the lower right of the Linux Package
Editor window.
The Warnings dialog box contains entries for both the current project and any other
projects you opened during the current session. To clear the Warnings dialog box, click
Clear Warnings.
See also:
Setting Options on page 12
Linux Package Editor Reference 18
Managing Linux Packages
Testing With Preflight Packages
The preflight capability in Linux Package Editor helps you determine whether a package
will succeed or fail by testing it in your production environment before deployment.
Preflight packages can perform environmental checks without actually distributing the
package payload to the Linux computers.
A preflight package:
z Runs the RPM in test mode (--test). This performs all the checks that RPM normally
performs during installation, but it does not install the package. It checks the Linux
computer’s environment for what is needed to run the package (specific Red Hat
commands, Wget, and so on) and for what is needed to install the package software
(dependencies, conflicts, and so on).
z Runs the preflight script, if included. You can write this script to perform additional
environment checks. Examples: Get additional system information, find files.
z Writes a log file on the Linux computer and posts the log file to the 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.0 or later is required; 5.0 is
recommended.
To run a preflight test
1. (Optional.) Add a preflight script to the package.
a. In Script Editor, select Preflight from the Install Event drop-down list.
b. Create the script to perform the desired environmental checks.
See Using Script Editor on page 42.
2. Build the preflight package.
a. Click Build.
b. On the Build Installation Package dialog box, mark the Build a Preflight
Package check box, complete the rest of the dialog box, and click OK.
The preflight RPM is built without files.
3. Use your normal deployment method to distribute the RPM and run it on one or
more destination computers.
4. When you finish testing, go to the Reports view and select Preflight Reports.
The page lists dated reports for each preflight test that has been run. Select the
report to view.
Linux Package Editor Reference 19
Managing Linux Packages
Checking the Syntax of a Script
If a Linux computer is accessible to the Windows computer on which you create Linux
packages, you can check the syntax of the scripts in a Linux package from within Linux
Package Editor.
z Perl scripts (.pl) are checked with the Perl syntax checker.
z Bourne shell scripts (.sh) are checked using the -n Bash command. This includes
shell scripts that are created by WiseScripts (.wsl) that you add to a package.
To check a call script’s syntax
1. Set up and connect to a Linux proxy computer.
See Setting Up an SSH Linux Proxy on page 13.
2. In Linux Package Editor, go to Script Editor and click the tab of the script to check.
3. Click the Check button at the lower right of the window. If the Check button does
not appear, verify your Linux proxy connection.
The script is checked and a message indicates whether the script’s syntax is correct.
See also:
Call Script on page 48
Linux Package Editor 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 default log file name, it contains the computer name, so
you can easily find the log file you want.
If your IIS server is not set up correctly, the reports page displays a “page cannot be
found” error message.
To view Linux Package Editor reports
1. Select View menu > Reports, or click Reports at the lower left of the window.
2. In the left pane, select the type of report to view.
Project Configurations
report
Displays a summary of the configuration options that
are set in Installation Expert for each project in the
project folder
The project folder is defined in Tools menu > Options.
Installation Reports Displays the installation log file for each installation that
has been run
Preflight Reports Displays the preflight log file for each preflight test that
has been run
Linux Package Editor Reference 20
Managing Linux Packages
3. Click the link for the specific report to view.
To refresh a report, click in the report pane and click on the toolbar.
Building a Linux Archive File
You might want to store a group of files in one file for easier backups and transfers.
Example: You can create an archive file based on one package and then import it to
another package.
Use the Build Linux Archive File feature to create a Linux archive file, compressed
archive file, or RPM file from the contents of the current package.
z An archive file is a collection of files and directories that are stored in one file. The
archive file is not compressed—it uses the same amount of disk space as all the
individual files and directories combined. You can create archive files in .cpio or .tar
formats.
z A compressed file is an archive file because it is a collection of files and directories
that are stored in one file. However, the compressed file stores them in a way that
uses less disk space than all the individual files and directories combined. You can
create compressed files in these formats: .gz and .tgz, which is a compressed tar
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, ownership and mode (permission) settings.
This lets you store and recreate a file system exactly as it was when you archived it.
Requirements
Because the archive, compressed, and RPM files that you create will contain files from
the current package, the Build Linux Archive File command is available only if the
package contains at least one file.
To build an archive, compressed, or RPM file
1. Select Tools > Build Linux Archive File.
The Build Linux Archive File dialog box appears.
2. Select the platform that this archive file or RPM package runs on. This drop-down
list is populated with the platforms that are defined in Installation Expert >
Platforms page.
3. In Filename, specify the path and name of the file to create. This defaults to an
.RPM file in the default path. The following file types are available: .cpio, .gz, .tar,
.tgz, .rpm.
The naming convention for .RPM files is name-version-release.architecture.rpm.
Example: rootfiles-7.2-1.i386.rpm
4. Click Save.
See also:
  • Page 1 1
  • Page 2 2
  • Page 3 3
  • Page 4 4
  • Page 5 5
  • Page 6 6
  • Page 7 7
  • Page 8 8
  • Page 9 9
  • Page 10 10
  • Page 11 11
  • Page 12 12
  • Page 13 13
  • Page 14 14
  • Page 15 15
  • Page 16 16
  • Page 17 17
  • Page 18 18
  • Page 19 19
  • Page 20 20
  • Page 21 21
  • Page 22 22
  • Page 23 23
  • Page 24 24
  • Page 25 25
  • Page 26 26
  • Page 27 27
  • Page 28 28
  • Page 29 29
  • Page 30 30
  • Page 31 31
  • Page 32 32
  • Page 33 33
  • Page 34 34
  • Page 35 35
  • Page 36 36
  • Page 37 37
  • Page 38 38
  • Page 39 39
  • Page 40 40
  • Page 41 41
  • Page 42 42
  • Page 43 43
  • Page 44 44
  • Page 45 45
  • Page 46 46
  • Page 47 47
  • Page 48 48
  • Page 49 49
  • Page 50 50
  • Page 51 51
  • Page 52 52
  • Page 53 53
  • Page 54 54
  • Page 55 55
  • Page 56 56
  • Page 57 57
  • Page 58 58
  • Page 59 59
  • Page 60 60
  • Page 61 61
  • Page 62 62
  • Page 63 63
  • Page 64 64
  • Page 65 65
  • Page 66 66
  • Page 67 67
  • Page 68 68
  • Page 69 69

Symantec WISE LINUX PACKAGE EDITOR 8.0 Reference

Category
Software
Type
Reference
This manual is also suitable for

Ask a question and I''ll find the answer in the document

Finding information in a document is now easier with AI