IPS repository - Part I

How to clone dev IPS repository on local disk - for Sun employees only!


System Requirements

1.  OpenSolaris

and at least 14GB disk space. 

2.  Required packages (optional - only if you want a new pkd.depotd service)

  • SUNWipkg
  • SUNWgnome-common-devel
  • sunstudioexpress
  • SUNWmercurial
  • SUNWpython-setuptools - see bug 5462

You can use the Package Manager tool to install the required packages.
Alternately, use IPS commands such as the following to install these packages:

$ pfexec pkg install sunstudioexpress

2.  pkg-gate source tree (optional - only if you want a new pkd.depotd service)

$ cd ~ 
$ hg clone ssh://anon@hg.opensolaris.org/hg/pkg/gate pkg-gate


Configure NTP service

It's good to have synchronized time. See bug 237

$ pfexec rdate time.czech.sun.com

$ pfexec vi /etc/inet/ntp.conf

Add these lines:

server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org
server time.czech.sun.com

Enable and restart NTP service

$ pfexec svcadm enable svc:/network/ntp:default
$ pfexec svcadm restart svc:/network/ntp:default

Create new pool or file system. (I create a new file system osol-dev/active located in /rpool in this example)
$ pfexec zfs create rpool/osol-dev
$ pfexec zfs create rpool/osol-dev/active

For system performance, you will probably want to mount the filesystem that contains your repository with "noatime", so that file accesses do not cause directory metadata updates. If using ZFS, the command is:

$ pfexec zfs set atime=off rpool/osol-dev/active

 

Building pkg-gate (optional)

You need to build pkg-gate only if you want a new pkd.depotd service. 

$ cd pkg-gate/src
$ make
$ make packages
$ cd ../packages/i386/

and install all packages.

$ pfexec pkgadd -d .

Then import the SMF service manifest:

$ pfexec svccfg import /var/svc/manifest/application/pkg-server.xml

 

Start dev IPS repository on port 11000

% pfexec zfs create storage/ips/osol-testing
% pfexec svccfg -s pkg/server:osol-testing addpg pkg application
% pfexec svccfg -s pkg/server:osol-testing addpg start method
% pfexec svccfg -s pkg/server:osol-testing setprop pkg/port=20000
% pfexec svccfg -s pkg/server:osol-testing setprop pkg/inst_root=/storage/ips/osol-testing/active
(active is just the symbolic link)

% pfexec svccfg -s pkg/server:osol-testing setprop pkg/threads=60 ips% pfexec svccfg -s pkg/server:osol-testing setprop pkg/socket_timeout=100
% pfexec svccfg -s pkg/server:osol-testing setprop pkg/writable_root=/storage/ips/osol-testing/scratchdir
% pfexec svccfg -s pkg/server:osol-testing setprop pkg/log_access=/storage/ips/osol-testing/log_access
% pfexec svccfg -s pkg/server:osol-testing setprop pkg/log_errors=/storage/ips/osol-testing/log_errors
% pfexec svccfg -s pkg/server:osol-testing setprop pkg/proxy_base=http://ips.czech/testing
% pfexec svccfg -s pkg/server:osol-testing setprop pkg/cfg_file=/storage/ips/osol-testing/cfg_cache
% pfexec svccfg -s pkg/server:osol-testing setprop pkg/sort_file_max_size=none

$ pfexec svcadm refresh pkg/server:dev
$ pfexec svcadm enable pkg/server:dev

Check if the service is running, type in Firefox: http://localhost:11000

For more information see documentation pages

Clone dev repository from ipkg.sfbay with rsync

 The instruction can be found here

Note: This process takes a long time!

Reindex cloned OSOL1108 dev REPO

The supported way to forcefully reindex is to kill any pkg.depot using that directory, remove the index directory, and restart the pkg.depot process.

$ pfexec svcadm restart /application/pkg/server:dev

Wait after your repository is reindexed and catalog file have size of original

$ tail -f /var/svc/log/application-pkg-server:dev.log
  [04/Nov/2008:09:46:45] ENGINE Listening for SIGTERM.
  [04/Nov/2008:09:46:45] ENGINE Listening for SIGUSR1.
  [04/Nov/2008:09:46:45] ENGINE Bus STARTING
  [04/Nov/2008:09:46:45] ENGINE Started monitor thread '_TimeoutMonitor'.
  [04/Nov/2008:09:46:46] ENGINE Serving on 0.0.0.0:8112
  [04/Nov/2008:09:46:46] ENGINE Bus STARTED
  [04/Nov/2008:09:46:51] INDEX Search Available
  [04/Nov/2008:09:46:56] INDEX Updating search indexes
  [04/Nov/2008:09:50:15] INDEX Search indexes updated and available.

You can clone any others repositories (release, contrib, pending) in the same way.

Repositories are located in: 

/tank/osol-release/active/
/tank/contrib/active/
/tank/osol-pending/repo-rsync/

For staying current you can use a cron job.

How to clone IPS repository on local disk - for users -> coming in Part II

Thanks to Rudolf (dot) Kutina (at) sun( dot) com

Comments:

This is a very informative article..I have made my effort in explaing that It is Time to

Globalize Time too..The link is given below..

http://authorshive.com/2010/12/02/it-is-time-to-globalize-time/

Posted by Talha Jamshaid on December 02, 2010 at 12:33 AM CET #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Solaris l10n & i18n, locales, keyboards, fonts and related topics.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today