OpenSolaris
Collectives
Discussions
Documentation
Download
Source Browser
Free CD
Log-in
|
en
Project pkg
:
Developer information
Top Menu
Show
:
Comments
Attachments
History
Information
Print
:
Print
Print preview
Export as PDF
Export as RTF
Export as HTML
Export as XAR
Wiki code for
Developer information
Hide Line numbers
1: == Info for developers 2: 3: === Common issues 4: 5: * //Using {{code}}localhost{{/code}} as a repository doesn’t mix well with {{code}}http_proxy{{/code}} environment settings.// Your proxy will probably get confused about who you meant by {{code}}localhost{{/code}}. There’s code to handle this case on a few paths, but not all paths. For now, turn off your proxy setting before invoking the {{code}}pkg{{/code}} commands. 6: * //I don’t know Python~--how best to learn?// The current developers are all relatively new to Python, but are old hands at C/Make/shell and so on. For programmers already familiar with Unix programming, Stephen recommends David Beazley’s //Python Essential Reference (3rd Edition)//. Danek has had as much success just using online resources, such as [[{{code}}docs.python.org{{/code}}>>http://docs.python.org]]. (The bundled Python we’re using is presently 2.4.4.) 7: * //The elf module won’t compile.// The current targets assume that you have either a DevPro C compiler or GCC in your path. If you don’t, you’ll see something like 8: 9: {{{ 10: $ make 11: ... 12: ERROR: no C compiler not found; update your PATH or set the CC env variable 13: error: command ’/usr/lib/python2.4/pycc’ failed with exit status 1 14: *** Error code 1 15: make: Fatal error: Command failed for target `all’ 16: }}} 17: 18: You’ll need to install a compiler: you can use either "pfexec pkg install ss-dev", to install SunStudio Express, or "pfexec pkg install gcc-dev", to install the GCC toolchain. 19: * //What does "ImportError: No module named setuptools" mean?// You don’t have the SUNWpython-setuptools package installed. From build 122 onwards, there is a package called developer/opensolaris/pkg5 which you can install to get all the dependencies required to build the pkg(5) workspace, except for the compilers. 20: 21: === Running a development server, smf(5)-style 22: 23: One convenient way to run the server is, after pulling down a child, is to use the {{code}}link{{/code}} Makefile target to connect your repository’s bits into the system. That is, 24: 25: {{{ 26: 27: $ cd path/to/child 28: $ cd src 29: $ su 30: Password: 31: # make link 32: # svccfg import pkg-server.xml 33: 34: }}} 35: 36: Then, anytime you want to reload the server (because you edited module source, say), you only have to issue 37: 38: {{{ 39: 40: # ./bump-server.ksh 41: 42: }}} 43: 44: (You can do this as non-{{code}}root{{/code}}, if you’ve given yourself the "Service Management" profile in {{code}}/etc/user_attr{{/code}}.) 45: 46: === Running the client and server from the workspace proto area 47: 48: Developers may find it easier to run the client and server from their location in the workspace proto area. 49: 50: ==== Server 51: 52: {{{ 53: 54: $ WS=<path to root of workspace> 55: $ PYTHONPATH=$WS/proto/root_`uname -p`/usr/lib/python2.4/vendor-packages/; export PYTHONPATH 56: $ PKG_REPO=<path to repo> $WS/proto/root_`uname -p`/usr/lib/pkg.depotd 57: 58: }}} 59: 60: ==== Client 61: 62: {{{ 63: 64: $ WS=<path to workspace root> 65: $ PYTHONPATH=$WS/proto/root_`uname -p`/usr/lib/python2.4/vendor-packages/; export PYTHONPATH 66: $ PATH=$WS/proto/root_`uname -p`/usr/bin:$PATH; export PATH 67: $ PKG_IMAGE=<path to image root>; export PKG_IMAGE 68: $ pkg image-create -F -a authname=http://<server address>:10000 $PKG_IMAGE 69: $ pkg refresh 70: $ pkg install <package> 71: 72: }}} 73: 74: === Bug Management 75: 76: Bugs should be filed on [[defect.opensolaris.org>>http://defect.opensolaris.org/bz/]], under classification "Development", product "pkg". 77: 78: When you grab a bug to work on it, please assign yourself to the bug. If you decide to stop working on it, reset the assignee to the default. When assigning a priority to a bug, please follow the guidelines linked to from the Priority field label. 79: 80: Although bugzilla should constrain the state transition to some extent, if we constrain it too much, you have to go through a number of state transitions to get to where you want to go. If there are problems with the state transitions (like they’re proving to be super inconvenient), raise the issue on pkg-discuss. 81: 82: Generally, when you figure out why the buggy behavior is as it is, explain it and change the state to CAUSEKNOWN. When you figure out how to fix it, explain the fix and change the state to FIXUNDERSTOOD. When you actually start fixing the bug, change the state to FIXINPROGRESS. Once you’ve gotten all your testing done, reviews completed, etc, and pushed a changeset containing the fix to the main repository, add a comment like "Fixed in changeset <changesetid>." (where <changesetid> is either the short or long hex changeset id), and change the state to FIXINSOURCE. 83: 84: Unless you’re a project leader, don’t change the state to anything more resolved than that, unless you’re closing it off as a duplicate, saying you won’t fix it, or can’t reproduce, etc. Don’t mark it as RESOLVED/FIXED or CLOSED/FIXED or FIXINBUILD. These are all "gatekeeper" states, at least for now. 85: 86: If you want a simple bug to work on to get started, look for the keyword "[[bite-size>>http://defect.opensolaris.org/bz/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=INCOMPLETE&bug_status=ACCEPTED&bug_status=CAUSEKNOWN&bug_status=FIXUNDERSTOOD&bug_status=FIXINPROGRESS&bug_status=REOPENED&keywords=bite-size&keywords_type=allwords&product=pkg&query_format=advanced&title=pkg(5)%20%22bite-size%22%20bugs]]". Conversely, if you find a bug that looks like it should be pretty easy to solve, then set the keyword "bite-size". Another good query for starter bugs is on the whiteboard keyword "[[needstestcase>>http://defect.opensolaris.org/bz/buglist.cgi?status_whiteboard_type=allwordssubstr&query_format=advanced&status_whiteboard=needstestcase&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=INCOMPLETE&bug_status=ACCEPTED&bug_status=CAUSEKNOWN&bug_status=FIXUNDERSTOOD&bug_status=FIXINPROGRESS&bug_status=REOPENED&product=pkg&title=pkg(5)%20%22needstestcase%22%20bugs]]". 87: 88: === Pushing to the (Source) Repository 89: 90: You’ll need to affiliate to the pkg project and ask for commit rights before you’ll be able to push changesets yourself. Before you’ll be allowed to do that, you’ll need to have produced three successful, non-trivial changesets. Until you have commit rights, you’ll want to make your changeset available either as the output of "hg export ~--git" or (if there are binary files or copies / additions / deletions) "hg bundle". Ask on pkg-discuss for someone to pick up your change, and send your patch or bundle to the person who takes it, or point them at it. 91: 92: Changeset comments should be of the form 93: 94: {{{ 95: 96: <bugid> <synopsis> 97: 98: }}} 99: 100: Multiple lines are allowed for multiple bugs. Note that each bug should be all on one line, and there should be exactly one space between the bugid and the synopsis ~-- no extraneous punctuation is allowed. The synopsis should be exactly as it is in the bug tracking system. Correct spelling of the synopsis is highly encouraged. 101: 102: === DTrace, profiling, and other means of measuring {{code}}pkg{{/code}}(5) performance 103: 104: * [[Dan blogged about using DTrace with {{code}}pkg{{/code}}(5)>>http://blogs.sun.com/dp/entry/finding_bugs_in_python_code]]. 105: 106: === Extracting self-signed certificates from remote servers 107: 108: In some cases, remote servers have SSL certificates that aren’t trusted by the client. If this is because the server has a self-signed certificate, it’s easiest to download the cert from the remote host. (In other cases, the client may be missing one or more CA certificates if a server fails to verify). The following script uses openssl’s s_client to connect to a remote host and extract its certificate. 109: 110: ==== Code 111: 112: {{{ 113: 114: #!/usr/bin/python 115: # 116: # CDDL HEADER START 117: # 118: # The contents of this file are subject to the terms of the Common Development 119: # and Distribution License (the "License"). You can obtain a copy of the 120: # license at usr/src/OPENSOLARIS.LICENSE or 121: # http://www.opensolaris.org/os/licensing. When distributing Covered Code, 122: # include this comment block in each file and include the License file at 123: # usr/src/OPENSOLARIS.LICENSE. 124: # 125: # CDDL HEADER END 126: # 127: 128: # 129: # Copyright 2009 Sun Microsystems, Inc. All rights reserved. 130: # Use is subject to license terms. 131: # 132: 133: import getopt 134: import subprocess 135: import sys 136: 137: def main(): 138: 139: dir = None 140: openssl = "/usr/bin/openssl" 141: outfile = None 142: server = None 143: 144: opts, pargs = getopt.getopt(sys.argv[1:], "o:") 145: 146: for opt, arg in opts: 147: if opt == "-o": 148: outfile = arg 149: 150: if not outfile: 151: print >> sys.stderr, "Usage: ss_certs -o " 152: sys.exit(1) 153: 154: server = pargs[0] 155: 156: try: 157: outf = file(outfile, "wb") 158: except EnvironmentError, e: 159: print >> sys.stderr, "Unable to open %s: %s" % (outfile, e) 160: sys.exit(1) 161: 162: cmd = [openssl, "s_client", "-connect", server] 163: p = subprocess.Popen(cmd, stdin=subprocess.PIPE, 164: stdout=subprocess.PIPE, stderr=subprocess.PIPE) 165: 166: stdout, stderr = p.communicate("QUIT\n") 167: 168: writecert = False 169: 170: for l in stdout.splitlines(): 171: if l.startswith("~-----BEGIN CERTIFICATE"): 172: writecert = True 173: outf.write(l + "\n") 174: elif l.startswith("~-----END CERTIFICATE") and writecert: 175: writecert = False 176: outf.write(l + "\n") 177: break 178: elif writecert: 179: outf.write(l + "\n") 180: 181: outf.close() 182: 183: if __name__ == ’__main__’: 184: main() 185: 186: }}} 187: 188: ==== Usage 189: 190: Although unnecessary, one could extract the certificate from pkg.sun.com by using the following example. 191: 192: {{{ 193: 194: $ ss_cert.py -o test.pem pkg.sun.com:443/opensolaris/extra 195: 196: }}} 197: 198: The s_client command to openssl prints out all kinds of details about the certificate and the connection to the client. The script scrapes out the certificate portion of the transaction and saves that to the file specified in the -o option. For this particular tool, the host is specified without a URI and must include the correct ssl port. (443 for https)
Search
Collectives
Community Group
Academic and Research
Accessibility
Advocacy
Appliances
Approachability
Architecture Process and Tools
BrandZ
Chinese Users
Community Advisory Board
Databases
Desktop
Device Drivers
Distribution
Documentation
DTrace
Emerging Platforms
Fault Management
Games on OpenSolaris
HA Clusters
HPC Developer
Installation and Packaging
Internationalization and Localization
Laptop
Logical Domains
Modular Debugger (MDB)
Networking
NFS
Observability
OpenSolaris Governing Board (OGB)
OpenSolaris Printing
OS/Net (ON)
Performance
Power Management
PowerPC
Security
Service Management Facility (smf(5))
Software Porters
Solaris Volume Manager
Storage
Systems Administration Community Group
Testing
Tools Home
Unix File Systems (UFS)
Website Community
X Window System
Xen
ZFS
Zones
Project
ADSL Modem Enhancement
ARC Process Definition
ARM Platform Port
Automatic Data Migration
BIND Update
Bluetooth Stack & Drivers
Brocade FC HBA - Initiator
Brocade FC HBA - Target
Brussels - unified network link configuration
Caiman, Solaris Install Revisited
Celeste
Český portál
Chime Visualization Tool for DTrace
CIFS client for Solaris
CIFS Server
Clearview: Network Interface Coherence
Cluster Agent: Informix Dynamic Server
Cluster Agent: OpenSolaris Container
Cluster Agent: OpenSolaris xVM
Cluster Agent: Oracle E-Business Suite
Cluster agent: PostgreSQL
Cluster Agent: Samba
Cluster Agent: Tomcat
CMT
Coarse Data Flow Parallelism
Colorado: Open HA Cluster on OpenSolaris
Command Assistant
Common Array Manager
Companion - /opt/sfw: Free and Open Source software
COMSTAR: Common Multiprotocol SCSI Target
Content
Contest
CPU Observability
Credentials Process Groups
Crossbow: Network Virtualization and Resource Control
Crypto KMS Agent Toolkit
Cryptographic Framework
Data Migration Manager
Data Tethers
Deutsches Portal
Device Detection Tool
Device Driver Utility
Device Manager
Device Mapper
Direct Rendering Infrastructure & 3D drivers
DTrace Guide
Duckwater: Simplified name services management
Easy Tools
Emancipation
Emulex Fibre Channel Device Driver
Emulex Advanced Ethernet Device Driver
Enable/Enhance Solaris support for Intel Platform
Enhance the support of USB webcams
Enhanced SMF Profiles
Enhancements for AMD-based Platforms
Erlang DTrace Integration
Ethernet bridge module for Solaris
Evaluate Conary
Events Registry
Ext3 file system support
F/OSS Package Base
Facilitation
Fibre Channel over Ethernet
Fine Grained Access Policy (FGAP)
Fingerprint Authentication
Flexible Mandatory Access Control
Forensic Tools
Fully Open X Project
Fuse on Solaris
gcore
Generic Machine Check Architecture Improvements
Google SOC
HA-JBoss
HA-MySQL
Hadoop Live CD
Hitachi
HoneyComb Fixed Content Storage
HPC Stack
Image Packaging System
Improved Performance MIB
Indiana
Innovation Awards
Input Method
Intel Graphics
Internet Key Exchange, version 2
Interrupt Resource Management
IP Datapath Refactoring
IP over Infiniband
IPsec Tunnel Reform
iSCSI Extensions for Remote DMA (iSER)
iSNS Server
JeOS - Just enough Operating System
JKstat - a java binding for libkstat
Journaled File System (JFS)
K Desktop Environment
Kerberos
Kernel Sockets
Kernel SSL Enhancements
Key Management Framework
Korn Shell 93 integration/migration project
Labeled IPsec
LatencyTOP
Layer 2 Filtering
LDoms Manager
Lending
libMicro - portable microbenchmarks
Link Layer Discovery
Live Media: Technologies for distributions running from CD and other media
Locale Data
lofi compression and cryptography support
lx64 brand
Media Management System
Mega_sas
Mexico
MilaX minimal Live Distribution
MIPS Platform Port
Mozilla DTrace
MRSL.NONsharedDevice
Multi-lingual Glossary
Multi-pathing software (MPxIO)
Multiple disk sector size support
Multiple DOI
Muskoka: An open repository for OpenSolaris technical content
Navigator
Nemo: A Framework for High-Performance Networking
Network Auto-Magic
Network Data Management Protocol
Network MIBs
Network Storage
Network Time Protocol (NTP)
Nevada Globalization
New Design of 4over6 Mechanism Based on OpenSolaris
NFS RDMA transport update and performance analysis
NFS Server in non-Global Zones
NFS version 4.1 pNFS
NFSv4 namespace extensions
Nightingale: Port Songbird to OpenSolaris
NPort ID Virtualization (NPIV)
NUMA
Object Storage Device (OSD) support for Solaris
OHACGE Script Based Plug-in
ON/Nevada (ONNV) Project
Open Development Infrastructure
Open HA Cluster Utilities
Open Sound System
OpenGrok
OpenPegasus CIM Server
OpenRTI
OpenSolaris Busybox
OpenSolaris Desktop
OpenSolaris Hispano
OpenSolaris Security Audit
OpenSolaris support for the QEMU processor emulator: host and guest
PEF: Packet Event Framework
Performance Wrappers
Pkgfactory
Polski Portal
Portail Francophone
Portal Brasil
Portals
Power Management Usability Interfaces
Presto: Automatic Printing Configuration
Printable Many Page Solaris Manuals
Promise SuperTrak RAID HBA Driver
QLogic Converged Network Adapter GLDv3 NIC Driver
Quagga Routing Protocol Suite Integration
RAID Configuration Utility
RBridge (IETF TRILL) support
RDMA Offload Framework
Reno: Login Process Enhancements for Interop
Resource Management
s10brand
SAM/QFS
SCM Migration Project
SCSI RDMA Protocol
SDcard Drivers
Sensor Abstraction Layer
Session Initiation Protocol
SFW
Shell: bourne shell, korn shell, C shell, etc.
Sierra: Intel WiFi Chipsets Support
Simple Panels
SM-HBA Based SAS HBA Management
SMF Documentation
Solaris iSCSI Target
Solaris PowerPC Port
SourceJuicer
Sparks: name service switch/nscd enhancements
Squashfs
Star integration/migration project
Starfish
Starter Kit
Storage Power Management
Sun Security Toolkit
Sun StorageTek Availability Suite
Support for OpenFabrics User Verbs / API on OpenSolaris OS
Support gcc4/GCCfss in Solaris
Suspend/Resume
SVR4 Packaging
Systemz
Tamarack: Removable Media Enhancements in Solaris
Tesla: OpenSolaris Enhanced Power Management
Test Development
Tickless Kernel Architecture
TIPC
Trademarks
Trusted networking interface policy database for Trusted Extensions
Trusted Platform Module support
Use Case
Validated Execution Project
Virtual Console
Virtual Network Machines
Visual Panels
Visualization for HPC
Volo
VRRP: Virtual Router Redundancy Protocol Implementation
VSCAN service
Web Stack
Website
Winchester: Schema mapping and ID mapping for AD Interoperability
Wireless USB Support
Wireless Wide Area Network
X Consolidation
x86 Generic FMA Topology Enumerator
Xen Gate
Xfce: A lightweight desktop environment
ZFS Boot and Install
ZFS on disk encryption support
Zone Manager
Zone Statistics
Русский портал
البوابة العربية
भारतीय पोर्टल
中国门户
日本ポータル
한국 포탈
User Group
Adelaide
Argentina
Arizona
Atlanta
Baltimore-Washington
Bangalore
Bangkok
Bangladesh
Beijing
Bélem
Berlin
Bhimavaram
Bloomington
Campus Ambassadors
Capital Region
Cardiff
Charlotte
Chengdu
Chennai
Chihuahua
Chile
Cleveland
Colombia
Columbus
Connecticut
Cracow
Czech
Dallas/Ft. Worth
Danish
Delaware
Edinburgh
Egypt
Finland
Florida
Front Range
FuZhou
Great Lakes
Greece
Hangzhou
Hawaii
HeFei
Houston
Hyderabad
Indonesia
Irish
Israel
Italian
Jinan
Kabul
Kansas City
Latvia
London
Madurai
Manchester
Mato Grosso
Melbourne
Minas Gerais
Minnesota
Montreal
Moscow
Mumbai
Munich
NEA
Netherlands
New England
New York City
New Zealand
NIT Hamirpur
Noroeste
Oklahoma City
Osnabrück
Peru
Philadelphia
Piaski
Pittsburgh
Porto Alegre
Puget Sound
Pune
Queensland
Research Triangle Park
Romania
Russia
San Antonio
San Diego
San Francisco
São Paulo
Scottish
Serbia
Shanghai
Shenzhen
Silicon Valley
Singapore
Slovak
South African
Southern Connecticut
St. Louis
Sweden
Switzerland
Sydney
Szczecin
Taiwan
Tecum
Thames Valley
Tokyo
Toronto
Trondheim
Tulsa
Turkey
Ukraine
University of Melbourne
Vale do Paraíba
Vancouver
Venezuela
Welsh - Cymru
Wisconsin
Xi'an
Subsites
Code Reviews
Code Repositories
Package Search
Bugster
Bugzilla
Test Machines
Planet
Mailing Lists
Elections & Polls
ARC Case Logs
Source Juicer
Package Factory
User Authentication
Project pkg Pages
FAQ
Mirroring repositories
Adding Packages to IPS
Developer information
Best Practices
Integration Notes
Documentation
Getting Started with IPS for 2008.05
Getting Started with IPS for 2008.11
Repositories
Files
Testing
Test Plan