Child pages
  • Distro Importer Notes
Skip to end of metadata
Go to start of metadata
                           Distribution import hacks

Cluster file

The importer is driven by a cluster file containing a list of packages to
import from SVR4 format, and, optionally, a meta-package.

I named mine ossnap_cluster, because I arbitrarily chose os-snap as the
publisher prefix, I don't define a meta-package

I generated the ossnap_cluster file somewhat like this (in src/util/distro-import):
  grep -Erl 'consolidation.*(sfw|gnome)' 13[3-9] 14* | cut -d/ -f2- | \
      sort -u | nawk '/^i386/ {printf "$(i386_ONLY)include %s\n", $0; next;} {printf "include %s\n", $0;}' >! ossnap_bygrep.text 

Which covers SFW and JDS (gnome matches both gnome and gnome_l10n).  This list
will need editing by hand, both to remove references to JDS packages that you
couldn't build, and because of the somewhat brute force nature in which it
forms the list.  Expect your first import run to fail while you fix these
things up.

I start with the 133 directory because every bundled package except SUNWcs
and SUNWcsd was renamed in build 133, so we shouldn't need to reach back that
far, this also avoids several bugs with JDS.

The result is the ossnap_cluster file to which the Makefile refers, for
instance 144/ossnap_cluster.

You should verify this file by diffing it against the slim_cluster and
redist_cluster files for the matching building, and seeing if the packages
missing from your list seem correct. 

The workspace contains an ossnap_cluster file which I used for build 144,
which may be a useful starting point.

Running the importer

I adjusted distro-import/Makefile to point to local copies of all of my
repositories, using file:// URIs.  You will need to adjust this to match your
system, I recommend using file:// URIs if you can.

You need to change the following variables

  - WOS_PKGS  
    should point to a directory containing your SVR4 SFW and JDS packages

  - REPO
    URI of the destination IPS repository, created using your final publisher 

       pkgsend -s /path/to/repo create-repository --set-property publisher.prefix=foo

    where foo is your chose prefix.  This prefix must match the one used in
    the set-publisher step, later.


    The IPS repositories resulting from builds of the respective
    consolidations, used as a reference by the importer when seeking
    dependencies, and building incorporations.


    The reference repository containing all the bits which you aren't

    You can use here, or a local mirror of b134

With all of the above satisfied you should be able to run:

  make <buildnumber>/ossnap_import

Where <buildnumber> is the number of the build you created the ossnap_cluster
file for.

The difference between the ossnap_import, and redist_import targets (beyond
the cluster file used) is the use of the -A flag to have the importer publish
every version of renamed and obsolete packages.

Fixing your publisher prefix

in src/util/publish is a Makefile and collection of tools to fix up the
publisher name of your package repository.

A altered set-publisher.transform to use 'os-snap', the publisher prefix I've
been using.  You must change this to match the prefix you used when creating
your repository, above.

The Makefile in this direction contains references to all the same
repositories as in the step above, you must alter these references in the same
way (they have the same names).

The 'publish_setpublisher' target here is the target which fixes the publisher
name.  HOWEVER, when building a repository that can be installed over build
134, which does not contain any of the intervening builds, this target is
insufficient, you must also publish any packages renamed and obsoleted in
those intermediate builds, so this target must be simulated by hand.

I hacked to not require the -b flag, so it can re-publish the
packages from every build it sees

You should run:

  export PYTHONPATH=$(hg root)/proto/root_i386/usr/lib/python2.6/vendor-packages
  export PATH=$(hg root)/proto/root_i386/usr/bin:$PATH
  ./ -d $(hg root)/proto/set-publisher -p $REPO $ON_REPO $INSTALL_REPO $X_REPO $IPS_REPO

Where the REPO variables are URIs to the respective repositories.
This will import all the necessary obsoletions and renames.

Updating to other builds

The ossnap_cluster file is per-build, and needs to be kept up to date with
changes made in each build.  The way in which you should do this is.

  - Merge with pkg-gate from the appropriate build
  - hg cp NNN/ossnap_cluster XXX/ossnap_cluster
    where NNN is the old build ID, and XXX the new
  - Make changes to ossnap_cluster matching those comay makes to the redist
    and slim clusters.

A command similar to:
  diff -u <(grep '^include' 144/{redist,slim}_cluster | cut -d: -f2- | sort -u) \
      <(grep '^include' 146/{redist,slim}_cluster | cut -d: -f2- | sort -u)

Will show the changes made by comay between a given pair of builds (in this
case, 144 and 146).  Changes affecting your packages should be duplicated in
the copy of the ossnap_cluster file which you made, if not present already.

You could also completely regenerate ossnap_cluster, as we discussed
initially, and then compare the result to the clusters comay used for the
given build.

Previous Instructions

This process converts a Solaris Nevada build and additional unbundled packages into IPS packages and populates a repository.
Distro import build source

Arguments provided in environment (defaults are in Makefile):

WOS_PKGS: pointer to the Nevada packages in product layout. Usually pointing to wosimgpath/bldXY/Solaris_11/Product.

NONWOS_PKGS: pointer to additional packages that are not part of standard Nevada release. These include unbundled products such as developer tools, replacements for encumbered Nevada packages, etc.

REPO: internal repository to which IPS packages will be imported
Nevada build-specific subdir

SUNWfixes.prototype: input for creating build-specific SUNWfixes packages, which resolves install issues related to the elimination of postinstall and specific class action scripts.

various files used in SUNWfixes package (e.g. /etc/hba.conf)
Import instructions for SVR4 Packages

common subdir: contains input scripts for IPS pkgsend for packages common to SPARC and x86 Pic/INFO.jpg needs verification .

i386 subdir: contains input files for IPS pkgsend for special cases. Example: SUNWxvm imports 3 separate SUNWxvm* packages into a single IPS. Used by when acting on redist_cluster file.

redist_cluster: file containing import instructions for the redistributable pkgs used by Uses files in the above subdirs.

all.i386.bld#: used when importing all packages, and not using redist_cluster Pic/INFO.jpg needs verification.

  • No labels