How To : Build JDS (GNOME) on OpenSolaris

The second release of OpenSolaris is now officially available 2008.11, and it is a vast improvement over the first release 2008.05. A lot of new hardware drivers have been integrated helping things like audio to just work out of the box.

As OpenSolaris is being targeted at developers it makes sense that you should be able to build the Desktop on OpenSolaris with relative ease. Initially I thought it was going to be difficult but it's actually not, once you follow the following steps.

Bear in mind this is probably not the complete set of steps required and is a work in progess list :), So if you encounter something that I've missed let me know and I will update this blog entry.

1. Install Sun Studio compiler

This can be installed via the ss-dev package.

   $ pfexec pkg install ss-dev

2. Install Required Packages.

Install GNOME development tools package SUNWgnome-common-devel :

   $ pfexec pkg install SUNWgnome-common-devel

Install Perl XML::Parser package SUNWperl-xml-parser :

   $ pfexec pkg install SUNWperl-xml-parser

Install GNU gettext package SUNWgnu-gettext for po procesing :

   $ pfexec pkg install SUNWgnu-gettext

Install GNOME xml documentation packages SUNWgnome-xml\* :

   $ pfexec pkg install SUNWgnome-xml-root
   $ pfexec pkg install SUNWgnome-xml
   $ pfexec pkg install SUNWgnome-xml-share
   $ pfexec pkg install SUNWdoxygen

3. Install docbook catalog.

Once you've installed all the xml stylesheets, you still need to manually update the docbook catalog, this is to ensure xsltproc knows that DTD's are installed locally and it won't try to access the net for DTD's :

   $ pfexec /usr/share/sgml/docbook/docbook-catalog-install.sh

4. Install JDS CBE (Common Build Environment) 1.7+.

Download the CBE from :

   http://dlc.sun.com/osol/jds/downloadds/cbe/test/

Ensure you select the correct architecture. Once downloaded, extract the contents from the tarball.

To install run cbe-install. This needs to be run by a user with Primary Administrator privileges. Users wishing to run and CBE once installed successfully should have at least Software Installation privileges. Privilages are easy enough to add, by either manually editing the /etc/user_attr file or using usermod(1) with the -P CLI option.

NOTE : cbe-install will build and install SVR4 packages.

5. install latest pkgbuild to get IPS support.

CBE 1.7+ includes a version of pkgbuild which at the moment does not generate IPS packages. If you just want to compile packages and generate SVR4 packages then there is no need to perform this step.

Download latest pkgbuild from here :

   http://pkgbuild.sourceforge.net/download.php

Which at time of writing is version 1.3.98. Remove the CBE installed version :

   $ pfexec pkgrm SFpkgbuild

Use the installed CBE to build the downloaded latest pkgbuild package

   $ cd pkgbuild-1.3.98
   $ ./configure --prefix=/opt/dtbld/
   $ make
   $ pfexec make install

6. ACLOCAL

When building some packages you may encounter ACLOCAL build failure messages.

This is caused by aclocal being unable to locate CBE m4 files installed under /opt/dtbld/share/aclocal. By default it looks in /usr/share/aclocal, it also needs to look in /opt/dtbld/share/aclocal.

To fix this ensure the file /usr/share/aclocal/dirlist exists and contains the following :

 
   /usr/sfw/share/aclocal
   /opt/dtbld/share/aclocal

7. JDS Source and spec-files.

In order to build JDS packages you need to download the spec-files that are used by pkgbuild. You can get the latest set of JDS sources from the SVN repository with anonymous access :

   $ svn co svn+ssh://anon@svn.opensolaris.org/svn/jds/spec-files/trunk spec-files-trunk

This will check the trunk version of spec-files into the local directory spec-files-trunk.

Bear in mind trunk is the latest development branch of JDS and some components my not build as they are being currently developed. The GNOME version on !OpenSolaris 2008.11 is 2.24, and the spec-files and JDS sources for this version can be downloaded with anonymous access as follows :

   $ svn co svn+ssh://anon@svn.opensolaris.org/svn/jds/spec-files/branches/gnome-2-24 spec-files-2-24

This will check out the gnome-2-24 branch of spec-files into the local directory spec-files-2-24.

Before you can use _pkgtool_ to build JDS components, you need to ensure manpage tarballs and po-sun tarballs are created. To do this :

   $ cd spec-files-2-24/manpages
   $ make
   $ cd ../po-sun
   $ make

8. Building JDS packages.

You are now ready to build packages for JDS packages using pkgtool. Before using pkgtool or pkgbuild you need to ensure you have the correct environment conifgured, pkgtool comes with two convenience scripts for this very purpose. For csh shell users :

   $ source /opt/dtbld/bin/env.csh

For non csh shell users :

   $ . /opt/dtbld/bin/env.sh

Now pkgtool will be on your path and you can build your spec file :

   $ cd spec-files-2-24
   $ pkgtool --download build-only SUNWblah.spec

At the moment I would recommend using the flag --with-indiana-branding. But this will likely go away in the future.

9. Generating IPS Packages

This will of course build SVR4 packages, if you want to play with IPS you need to use the --ips CLI option for pkgtool. This will build local SVR4 packages, and generate IPS packages from these and by default will populate your local package repository, http://localhost:80/

Before doing this you will of course need to enable your local repository via the smf service pkg/server as follows :

   $ pfexec svcadm enable pkg/server

This will put your local IPS server online http://localhost:80/.

Now you can build your IPS package and have pkgtool populate the local server :

   $ pkgtool --download --ips build-only SUNWblah.spec

10. Installing Your IPS Packages

To actually install and test your local IPS repository and the packages that you have built. Firstly you need to add your local server as an authority :

   $ pfexec pkg set-authority -e -O http://localhost:80/ MyLocalRepo

This will create an authority called MyLocalRepo and enable it. To see what authorities exist :

   $ pkg authority
   AUTHORITY                           URL
   MyLocalRepo                         http://localhost:80/
   opensolaris.org (preferred)         http://pkg.opensolaris.org/dev/

You can see what packages exist in your local repository via Package Manager GUI application or the following command will also list them :

   $ pkg list -a | grep "MyLocalRepo"
or
   $ pkg list -av SUNWblah

If you don't see your package name listed you may need to refresh and indexes :

   $ pfexec pkg refresh --full
   $ pfexec pkg rebuild-index

Before proceeding and installing packages from your local repository it is recommended to take a snapshot of where you are currently at. This will give you the option to rollback to a given point if something goes wrong, ZFS rocks !. Use beadm to create a boot environment snapshot before you install from your local repository :

  $ beadm create -a opensolaris-snap-1

This will create a boot environment snapshot which you can boot from and will return you to a point before you installed anything from your local repo. See beadm man page for more information.

Before installing your packages, if it is already installed on your system but from another authority, probably best to uninstall it first :

   $ pfexec pkg uninstall SUNWblah

To install a package from your local repository you can use the Package Manager GUI application or the following command :

   $ pfexec pkg install pkg://MyLocalRepo/SUNWblah

Summary

So in 8 easy steps you are building desktop packages, in 10 steps you building IPS packages!!

These steps are relatively simple to follow, especially if you are already familiar with using the JDS CBE.

There are plans on making this process really seamless, and provide a meta IPS package, which when installed will simply pull down and install all the required packages in one swoop... it's a work in progress...

Happy building !!!

Comments:

This URL does not work:

http://dlc.sun.com/osol/jds/downloadds/cbe/test/ => Not Found

Posted by Chris Gerhard on December 17, 2008 at 06:24 AM GMT #

Apologies typo in the link... I've corrected the main blog entry to read :
http://dlc.sun.com/osol/jds/downloads/cbe/test/

thanks for letting me know.

Matt

Posted by Matthew Keenan on December 17, 2008 at 07:08 AM GMT #

i'm surprised you can run cbe-install with "Software Installation privileges" only, because it doesn't work on my machine (os2008.11, snv_101b_rc2). I have to replace "Software Installation" by "Primary Administrator". The guess is that pkg is absent from /etc/security/exec_attr

Posted by gerard henry on January 16, 2009 at 06:55 AM GMT #

I need to reword that, "Software Installation" privilage is required by the user who is
going to be using the CBE itself. "Primary Administrator" is required when installing the CBE
itself. thanks for the comment.

Posted by Matthew Keenan on January 19, 2009 at 05:11 AM GMT #

If I enable my local repository like this:
$ pfexec svcadm enable pkg/server
the command does not give me any feedback.

Then I add my local repository as an authority:
$ pfexec pkg set-authority -e -O http://localhost:80/ MyLocalRepo

and get the following output:

pkg: The URL 'http://localhost:80/' does not appear to point to a valid pkg server.
Please check the server's address and client's network configuration.

Could it be that apache which is running on port 80 is interfering?

Posted by Alex on February 11, 2009 at 04:01 AM GMT #

Hey,
Great post!
Is it possible to combine steps for all required pkgs to be installed into one line?:

pfexec pkg install ss-dev SUNWgnome-common-devel SUNWperl-xml-parser SUNWgnome-xml-root SUNWgnome-xml SUNWgnome-xml-share

It's just my laziness - easier to copy & paste. pkg(1) is smart enough to install only those pkgs that are not on the system :)

Posted by Michal Pryc on February 17, 2009 at 08:18 AM GMT #

Alex, I'm not a IPS server expert. Is the IPS service enabled and online ?

$ pfexec svcs pkg/server

This should show the service in an online state. If not then you need to investigate as
to why it's not coming online, and yes apache could be causing it..

Posted by Matt Keenan on February 17, 2009 at 08:32 AM GMT #

hey matt,
thanks for the great instructions.

fyi. i ran into a few random errors with this setup when trying it within
a zone on opensolaris snv_110. here are some of the issues i hit.

before running cbe-install i had to do:
pkg install SUNWcar SUNWkvm

when running cbe-install i get some errors and i don't know if it's ok
to ignore them or not:
---8<---
Installation of <CBEyasm> was successful.
Building CBEenv
INFO: Copying %use'd or %include'd spec files to SPECS directory
INFO: Processing spec files
pkgparam: ERROR: unable to locate parameter information for "SUNWcar"
pkgparam: ERROR: unable to locate parameter information for "SUNWkvm"
INFO: Installing package CBEenv

Summary:

package | status | details
---------------------------------+-------------+-------------------------------
CBEenv | INSTALLED |
---8<---

i discovered that before running pkgbuild i need to add /opt/dtbld/bin
to my path.

finally, i'd like to do a full jds build, not just a single package, so
i specified \*.spec to pkgbuild, but that failed with lots of complaints
about missing "required package"s.

Posted by edward pilatowicz on March 25, 2009 at 03:00 PM GMT #

SUNWdoxygen cannot be installed in os2008.11!
pfexec pkg install SUNWdoxygen
Creating Plan \\
pkg: pkg: the following package(s) violated constraints:
Package pkg:/SUNWcsl@0.5.11,5.11-0.110 conflicts with constraint in installed pkg:/entire:
Pkg SUNWcsl: Optional min_version: 0.5.11,5.11-0.101 max version: 0.5.11,5.11-0.101 defined by: pkg:/entire

is it mandatory?

Posted by gerard on March 31, 2009 at 12:08 AM IST #

Gerard,

SUNWdoxygen is not mandatory, it's used when making a distribution for documentation, I'm
kind of surprised it's conflicting with entire on 2008.11 as that's what I have it installed
on :), what version of 2008.11 have you got ? did you change the authority or add some new repos at any time ?

I am pointing to the latest dev repo :
$ pkg authority
PUBLISHER TYPE STATUS URI
opensolaris.org (preferred) origin online http://pkg.opensolaris.org/dev

Updating from this repo will get you to the latest release of OpenSolaris, and what will be released as 2009.06, so update at your own risk, I'd recommend creating a new BE(Boot environment) with beadm and booting into that BE, and updating it before you change the repo etc, this way you have something to back up to :)

Posted by Matt Keenan on March 31, 2009 at 02:42 AM IST #

Ed,

Thanks for trying this out, to be honest I'm very surprised of the CBE dependency on
architecture packages, I really don't know the internals of the CBE enough to comment,
I've asked the author to place a comment here if he gets the time :)

As for building all of JDS, this can be done via use of pkgtool from within your SVN co'd
local repository.

$ svn co svn+ssh://anon@svn.opensolaris.org/svn/jds/spec-files/trunk spec-files-trunk
$ cd spec-files-trunk
$ pkgtool --download build-only \*.spec

You can see the order in which they will be built with :

$ pkgtool build-order \*.spec

Posted by Matt Keenan on March 31, 2009 at 02:48 AM IST #

Matt - nice blog, I see Michal has even put together a p5i file for you to add the packages and skip the first two steps :)

http://blogs.sun.com/migi/resource/build_jds.p5i

http://blogs.sun.com/migi/entry/simplicity_is_the_ultimate_sophistication

Posted by John Rice on April 01, 2009 at 04:34 AM IST #

Matt,

can you point to a good guide on writing specs for OpenSolaris?
thank you
Stephen

Posted by Stephen CB on April 06, 2009 at 06:00 PM IST #

Thank you for putting up these instructions. I have two issues with them:
1. pfexec pkg install SUNWdoxygen does not work as there is no package with this name in the opensolaris repository 2008.11
2. pkgtool command does not work. Compilation and installation appeared to work correctly. It appears that it is not in the path for some reason. Do I need to change the path to fix this?
Any help would we greatly appreciated

Posted by Lance Wilson on April 10, 2009 at 09:57 PM IST #

Lance,

1. As mentioned in a previous comment, SUNWdoxygen is not mandatory, although I'm surprised it
does not exist in the repo, it definitely exist in the /dev repo.

2. you need to set your environment up to run pkgtool correctly, there are two convenience
scripts provided to do this, I've updated step 8 to include instructions, well spotted :)

cheers

Matt

Posted by Matt Keenan on April 14, 2009 at 04:31 AM IST #

Hii gerrard nice entry, i follow your guide but i got error when installing SUNWdoxygen.

[martin@opensolarisbox:~]# pkg authority
AUTHORITY URL
Development (preferred) http://pkg.opensolaris.org/dev/
[martin@opensolarisbox:~]# pkg install SUNWdoxygen
Creating Plan -
pkg: the following package(s) violated constraints:
Package pkg:/SUNWlibms@0.5.11,5.11-0.111 conflicts with constraint in installed pkg:/entire:
Pkg SUNWlibms: Optional min_version: 0.5.11,5.11-0.101 max version: 0.5.11,5.11-0.101 defined by: pkg:/entire
[martin@opensolarisbox:~]#

Iam using OpenSolaris 2008.11 and how can i installing SUNWdoxygen ?? Because if im try to change repo to dev i got this error ?? ~_~"

Posted by Martinus Ady H on April 23, 2009 at 01:53 PM IST #

In OS indiana b111a I have the same error as edouard

Building CBEenv
INFO: Copying %use'd or %include'd spec files to SPECS directory
INFO: Processing spec files
pkgparam: ERROR: unable to locate parameter information for "SUNWcar"
pkgparam: ERROR: unable to locate parameter information for "SUNWkvm"
INFO: Installing package CBEenv

and curiuos things:
jdsbld@soarus:~$ pkgparam SUNWcar
pkgparam: ERROR: unable to locate parameter information for "SUNWcar"
jdsbld@soarus:~$ pkginfo SUNWcar
ERROR: information for "SUNWcar" was not found
jdsbld@soarus:~$ pkginfo SUNWcsr
system SUNWcsr Core Solaris, (Root)
jdsbld@soarus:~$ pkg list SUNWcar
NAME (PUBLISHER) VERSION STATE UFIX
SUNWcar 0.5.11-0.111 installed ----
jdsbld@soarus:~$ pkg list SUNWcsr
pkg: no packages matching 'SUNWcsr' installed

Posted by Gilles Dauphin on April 26, 2009 at 02:58 PM IST #

for those of you trying to run a pkg/server where you already have something else (apache?) on port 80 you can change the pkg server port like so :-

bash-3.2$ svccfg -s pkg/server setprop pkg/port = "10000"
bash-3.2$

then svcadm restart pkg/server and it will be up an running on port 10000

bash-3.2$ pkg set-publisher -O http://localhost:1000/ MyLocalRepo

Posted by repudi8or on May 04, 2009 at 09:48 PM IST #

Help me out please. While installing CBE, i have set the Primary Administrator profile.
Here is the output of "profiles" command:

All
Primary Administrator
File System Management
SMB Management
VSCAN Management
SMBFS Management
Software Installation
ZFS File System Management
Console User
Suspend To RAM
Suspend To Disk
Brightness
CPU Power Management
Network Autoconf
Network Wifi Info
Basic Solaris User

But the installation fails every time. Here is the log file that is generated:

Fri Jun 5 18:12:14 IST 2009: Using "pkg" packaging system
Fri Jun 5 18:12:14 IST 2009: Checking for required packages...
Fri Jun 5 18:12:17 IST 2009: SUNWgpch is installed
Fri Jun 5 18:12:20 IST 2009: SUNWhea is installed
Fri Jun 5 18:12:22 IST 2009: SUNWsfwhea is installed
Fri Jun 5 18:12:25 IST 2009: SUNWwget is installed
Fri Jun 5 18:12:28 IST 2009: SUNWgtar is installed
Fri Jun 5 18:12:31 IST 2009: SUNWxcu4 is installed
Fri Jun 5 18:12:33 IST 2009: SUNWsprot is installed
Fri Jun 5 18:12:36 IST 2009: SUNWxwinc is installed
Fri Jun 5 18:12:39 IST 2009: SUNWxorg-headers is installed
Fri Jun 5 18:12:42 IST 2009: SUNWbtool is installed
Fri Jun 5 18:12:44 IST 2009: SUNWlibm is installed
Fri Jun 5 18:12:44 IST 2009: All required packages are installed.
Fri Jun 5 18:12:45 IST 2009: Running on SunOS opensolaris 5.11 snv_111b i86pc i386 i86pc Solaris
Fri Jun 5 18:12:45 IST 2009: My directory is /export/home/pulkit/desktop-cbe-1.7.0-rc1
Fri Jun 5 18:12:45 IST 2009: Unsetting ORBIT_SOCKETDIR (="/var/tmp/orbit-pulkit")
Fri Jun 5 18:12:45 IST 2009: Unsetting GTK_RC_FILES (="/etc/gtk/gtkrc:/export/home/pulkit/.gtkrc-1.2-gnome2")
Fri Jun 5 18:12:45 IST 2009: Unsetting WINDOWID (="62914615")
Fri Jun 5 18:12:45 IST 2009: Unsetting DTSTARTIMS (="False")
Fri Jun 5 18:12:45 IST 2009: Unsetting _AST_FEATURES (="UNIVERSE - att")
Fri Jun 5 18:12:45 IST 2009: Unsetting http_proxy (="http://192.168.36.204:8080/")
Fri Jun 5 18:12:45 IST 2009: Unsetting USER (="pulkit")
Fri Jun 5 18:12:45 IST 2009: Unsetting GNOME_KEYRING_SOCKET (="/var/tmp/keyring-NrO0il/socket")
Fri Jun 5 18:12:45 IST 2009: Unsetting USERNAME (="pulkit")
Fri Jun 5 18:12:45 IST 2009: Unsetting SESSION_MANAGER (="local/opensolaris:/tmp/.ICE-unix/565")
Fri Jun 5 18:12:45 IST 2009: Unsetting A__z (=""\*SHLVL")
Fri Jun 5 18:12:45 IST 2009: Unsetting DESKTOP_SESSION (="gnome")
Fri Jun 5 18:12:45 IST 2009: Unsetting LC_MESSAGES (="en_US.UTF-8")
Fri Jun 5 18:12:45 IST 2009: Unsetting GDM_XSERVER_LOCATION (="local")
Fri Jun 5 18:12:45 IST 2009: Unsetting GNOME_KEYRING_PID (="595")
Fri Jun 5 18:12:45 IST 2009: Unsetting LANG (="en_US.UTF-8")
Fri Jun 5 18:12:45 IST 2009: Unsetting GDM_LANG (="en_US.UTF-8")
Fri Jun 5 18:12:45 IST 2009: Unsetting GDMSESSION (="gnome")
Fri Jun 5 18:12:45 IST 2009: Unsetting SESSIONTYPE (="1")
Fri Jun 5 18:12:45 IST 2009: Unsetting no_proxy (="localhost,127.0.0.0/8")
Fri Jun 5 18:12:45 IST 2009: Unsetting GNOME_DESKTOP_SESSION_ID (="this-is-deprecated")
Fri Jun 5 18:12:45 IST 2009: Unsetting G_FILENAME_ENCODING (="@locale,UTF-8")
Fri Jun 5 18:12:45 IST 2009: Unsetting XDG_DATA_DIRS (="/usr/local/share/:/usr/share/:/usr/share/gdm/")
Fri Jun 5 18:12:45 IST 2009: Unsetting DBUS_SESSION_BUS_ADDRESS (="unix:path=/tmp/dbus-3DleCzaFSS,guid=ded9a627a4a220db9c2acd484a291031")
Fri Jun 5 18:12:45 IST 2009: Unsetting GTK_IM_MODULE (="iiim")
Fri Jun 5 18:12:45 IST 2009: Unsetting G_BROKEN_FILENAMES (="yes")
Fri Jun 5 18:12:45 IST 2009: Unsetting XAUTHORITY (="/export/home/pulkit/.Xauthority")
Fri Jun 5 18:12:45 IST 2009: Unsetting COLORTERM (="gnome-terminal")
Fri Jun 5 18:12:45 IST 2009: the user already has a .pkgbuildmacros file or ~/packages dir
Fri Jun 5 18:12:45 IST 2009: Locating compilers...
Fri Jun 5 18:12:45 IST 2009: running mkdir -p /tmp/cbe-install-ayGc/env
Fri Jun 5 18:12:45 IST 2009: \*\*\* command output follows \*\*\*
Fri Jun 5 18:12:45 IST 2009: \*\*\* command output ends \*\*\*
Fri Jun 5 18:12:45 IST 2009: /opt/SUNWspro/bin/cc is Sun Studio 12 release Mars
Fri Jun 5 18:12:45 IST 2009: creating env file for compiler /opt/SUNWspro/bin/cc (Sun Studio 12)
Fri Jun 5 18:12:45 IST 2009: running mkdir -p /tmp/cbe-install-ayGc/env
Fri Jun 5 18:12:45 IST 2009: \*\*\* command output follows \*\*\*
Fri Jun 5 18:12:45 IST 2009: \*\*\* command output ends \*\*\*
Fri Jun 5 18:12:45 IST 2009: /usr/bin/cc is Sun Studio 12 release Mars
Fri Jun 5 18:12:45 IST 2009: creating env file for compiler /usr/bin/cc (Sun Studio 12)
Fri Jun 5 18:12:45 IST 2009:
Fri Jun 5 18:12:45 IST 2009: The following compilers were found on your system:
Fri Jun 5 18:12:45 IST 2009: 1 - Sun Studio 12 5.9 (Mars) in /opt/SUNWspro/bin
Fri Jun 5 18:12:45 IST 2009: 2 - Sun Studio 12 5.9 (Mars) in /usr/bin
Fri Jun 5 18:12:46 IST 2009: Question: Would you like to configure more compilers for use with the Desktop CBE?
Fri Jun 5 18:12:47 IST 2009: Answer:
Fri Jun 5 18:12:47 IST 2009:
Fri Jun 5 18:12:47 IST 2009: The following compilers were found on your system:
Fri Jun 5 18:12:47 IST 2009: 1 - Sun Studio 12 5.9 (Mars) in /opt/SUNWspro/bin
Fri Jun 5 18:12:47 IST 2009: 2 - Sun Studio 12 5.9 (Mars) in /usr/bin
Fri Jun 5 18:12:47 IST 2009: Question: Please select the default compiler
Fri Jun 5 18:12:49 IST 2009: Answer:
Fri Jun 5 18:12:49 IST 2009: Default environment: ss12.1 (CC=/usr/bin/cc, CXX=/usr/bin/CC)
Fri Jun 5 18:12:49 IST 2009:
Fri Jun 5 18:12:49 IST 2009: The Desktop CBE includes tools for building GNOME, KDE and/or SFE packages
Fri Jun 5 18:12:49 IST 2009: It also includes some optional tools. Please select the tools you wish
Fri Jun 5 18:12:49 IST 2009: to install.
Fri Jun 5 18:12:49 IST 2009:
Fri Jun 5 18:12:49 IST 2009: Question: Would you like install the tools for GNOME?
Fri Jun 5 18:12:50 IST 2009: Answer:
Fri Jun 5 18:12:50 IST 2009: Question: Would you like install the tools for KDE?
Fri Jun 5 18:12:51 IST 2009: Answer:
Fri Jun 5 18:12:51 IST 2009: Question: Would you like install the tools for SFE?
Fri Jun 5 18:12:52 IST 2009: Answer:
Fri Jun 5 18:12:52 IST 2009:
Fri Jun 5 18:12:52 IST 2009: The following tools are optional: rsync cvs
Fri Jun 5 18:12:52 IST 2009: Question: Would you like install the optional tools?
Fri Jun 5 18:12:54 IST 2009: Answer:
Fri Jun 5 18:12:55 IST 2009: Package SFpkgbuild is already installed.
Fri Jun 5 18:12:55 IST 2009: Question: Would you like uninstall it?
Fri Jun 5 18:12:57 IST 2009: Answer: no
Fri Jun 5 18:12:57 IST 2009: User chose not to uninstall SFpkgbuild
Fri Jun 5 18:12:57 IST 2009: Question: Would you like skip to the next package?
("no" means the installer will try to build and install a duplicate package)
Fri Jun 5 18:13:00 IST 2009: Answer:
Fri Jun 5 18:13:00 IST 2009: User chose to skip package SFpkgbuild
Fri Jun 5 18:13:00 IST 2009: Question: Always skip packages that are already installed?
Fri Jun 5 18:13:02 IST 2009: Answer:
Fri Jun 5 18:13:02 IST 2009: always_skip_existing = yes
Fri Jun 5 18:13:03 IST 2009: Skipping package CBEant -- already installed
Fri Jun 5 18:13:04 IST 2009: Skipping package CBEautoconf -- already installed
Fri Jun 5 18:13:04 IST 2009: Skipping package CBEautomake -- already installed
Fri Jun 5 18:13:04 IST 2009: Skipping package CBEbison -- already installed
Fri Jun 5 18:13:04 IST 2009: Skipping package CBEcmake -- already installed
Fri Jun 5 18:13:05 IST 2009: Looking for package SUNWgnu-coreutils
Fri Jun 5 18:13:07 IST 2009: SUNWgnu-coreutils is installed
Fri Jun 5 18:13:07 IST 2009: ... already installed
Fri Jun 5 18:13:08 IST 2009: Skipping package CBEcvs -- already installed
Fri Jun 5 18:13:08 IST 2009: Looking for package SUNWgnu-diffutils
Fri Jun 5 18:13:11 IST 2009: SUNWgnu-diffutils is installed
Fri Jun 5 18:13:11 IST 2009: ... already installed
Fri Jun 5 18:13:11 IST 2009: Skipping package CBEflex -- already installed
Fri Jun 5 18:13:11 IST 2009: Skipping package CBEgettext -- already installed
Fri Jun 5 18:13:11 IST 2009: Skipping package CBEgawk -- already installed
Fri Jun 5 18:13:11 IST 2009: Skipping package CBEsed -- already installed
Fri Jun 5 18:13:12 IST 2009: Skipping package CBElibtool -- already installed
Fri Jun 5 18:13:12 IST 2009: Skipping package CBEm4 -- already installed
Fri Jun 5 18:13:12 IST 2009: Skipping package CBEmake -- already installed
Fri Jun 5 18:13:12 IST 2009: Skipping package CBErsync -- already installed
Fri Jun 5 18:13:13 IST 2009: Skipping package CBEsvn -- already installed
Fri Jun 5 18:13:13 IST 2009: Skipping package CBEyasm -- already installed
Fri Jun 5 18:13:13 IST 2009: Creating env.sh
Fri Jun 5 18:13:13 IST 2009: running mkdir -p //opt/dtbld/packages/SOURCES
Fri Jun 5 18:13:13 IST 2009: \*\*\* command output follows \*\*\*
Fri Jun 5 18:13:13 IST 2009: \*\*\* command output ends \*\*\*
Fri Jun 5 18:13:13 IST 2009: running bash -c sed -e "s%@CBE_PREFIX@%/opt/dtbld%" -e "s%@JDS_PREFIX@%%" -e "s%@CC32@%/%" -e "s%@CXX32@%/%" -e "s%@CC64@%/%" -e "s%@CXX64@%/%" -e "s%@CBE_VERSION@%1.7.0-rc1%" -e "s%@BUILD_INFO@%built on 2009-06-05 by pulkit@opensolaris%" /export/home/pulkit/desktop-cbe-1.7.0-rc1/ext-sources/env.sh > //opt/dtbld/packages/SOURCES/env.sh
Fri Jun 5 18:13:13 IST 2009: \*\*\* command output follows \*\*\*
bash: //opt/dtbld/packages/SOURCES/env.sh: Permission denied
Fri Jun 5 18:13:13 IST 2009: \*\*\* command output ends \*\*\*
Fri Jun 5 18:13:13 IST 2009: CBE setup FAILED
Fri Jun 5 18:13:13 IST 2009: Installation log saved in /tmp/desktop-cbe-install-2009-06-05-18:12.log

Posted by Pulkit on June 05, 2009 at 06:49 AM IST #

From reading your log output, looks like you already have a CBE installed.

When installing select NO to always skip existing, this way old
versions of packages should get removed via the cbe install script.

Also check your $HOME/.pkgbuildmacros file, looks like you haven't
specified %_topdir macro correctly.

Try either ensuring this is set to a value other than /opt/dtblb or
removing it, the default should be $HOME.

Posted by Matthew Keenan on June 05, 2009 at 08:05 AM IST #

Hi Matt,

the value in .pkgbuildmacros was set to /opt/dtbld/packages
i deleted that line and tried installing CBE again. But its another problem now :(

pkgparam: ERROR: unable to locate parameter information for "SUNWcar"
pkgparam: ERROR: unable to locate parameter information for "SUNWkvm"
INFO: Installing package CBEenv
ERROR: pkgadd: ERROR: You must be "root" for pkgadd to execute properly.

Summary:

package | status | details
---------------------------------+-------------+-------------------------------
CBEenv | FAILED | pkgadd: ERROR: You must be "root" for pkgadd to execute properly.
CBE setup FAILED

i tried installing CBE with root. But then it says that i need to install it with a Primary administrator profile. I have set these profiles for root:
All
Primary Administrator
File System Management
SMB Management
VSCAN Management
SMBFS Management
Software Installation
Console User
Suspend To RAM
Suspend To Disk
Brightness
CPU Power Management
Network Autoconf
Network Wifi Info
Basic Solaris User

Please help!

Posted by Pulkit on June 06, 2009 at 08:10 AM IST #

- How are you enabling profiles ?, via users-admin ? if yes, then I vaguely remember there being
a bug there around doing this, in that it doesnt' save them correctly. (not sure if fixed or
not).

Check /etc/user_attr file for your normal user, you just need "Software Installation" as a
minimum to be able to install packages. Very strange that root is failing to add packages are
you sure you are su'ing to root ?

On my OSOL box I have the following set for my build user :

mattman::::profiles=Primary Administrator,Software Installation;roles=root

And this works fine for me.

Posted by Matt Keenan on June 08, 2009 at 08:18 AM IST #

I am modifying the usr_attr file to enable profiles.

When I su to root, the CBE Installation doesn't start saying that I need a Primary Administrator profile. I also this very strange expecially after I added Primary Administrator to root.

I am using OpenSolaris 2009.06.

Posted by Pulkit on June 09, 2009 at 08:09 PM IST #

It's best to install as non-root, using a user with the Primary Administrator profile.

Posted by Laca on June 14, 2009 at 11:00 PM IST #

hi mattman nice blog entry, all the steps are working like a charm for me with a little modification.Now i want to know that what are the necessary steps,if some one wants to build his on ips package.For example i want to port Cake Php for opensolaris.
Thanks.

Posted by vikas on June 15, 2009 at 10:27 PM IST #

I am trying to build audacity 1.3.7 for OpenSolaris and write the spec file.
When i run ./configure it says error:libsndfile must be enabled
When i try updating libsndfile it says

pkg: the following package(s) violated constraints:
Package pkg:/SUNWcsl@0.5.11,5.11-0.111 conflicts with constraint in installed pkg:/entire:
Pkg SUNWcsl: Optional min_version: 0.5.11,5.11-0.101 max version: 0.5.11,5.11-0.101 defined by: pkg:/entire

Can you point out where the problem could be

Posted by Varrun Ramani on June 16, 2009 at 09:22 AM IST #

Vikas :
Not really sure what you are asking here. To build and publish (Local Repo) follow steps
9 and 10 above.

Porting of Cake php, or any other module, and using pkgbuild to do this, is just a matter
of writing a spec file for the module and then using pkgtool/pkgbuild to build thus module.

Another cool means of testing your spec files is by using jucr.opensolaris.org. Here you can
submit spec files, source tarballs, patches etc, and it will do the building for you. It is also the best means of getting your ported package into the Contrib repository so that all on
OpenSolaris can benefit from your porting work.

Varrun :
You are hitting an IPS specific issue, which I don't have the answer to. You could try posting a query to pkg-discuss@opensolaris.org alias, where all IPS/pkg issues are discussed.

Posted by Matt Keenan on June 16, 2009 at 09:31 AM IST #

Varrun,
Currently you can not update one package which belongs to entire incorporation (sorry for tech language).

If you want to update this particular package you will need to update whole system which is very safe operation as it creates new BE.

Posted by Michal Pryc on June 16, 2009 at 09:50 AM IST #

Matt,
Thanks a lot for the info.
I understand that you cannot update a package belonging to an entire corporation, but is there no other way i can get the package for my system which has a lower version.
Please correct me if i am wrong, but by corporation, do u mean by the 5.11-0.111 in SUNWcsl@0.5.11,5.11-0.111.
What is the process of updating the entire system to a higher corporation?

Posted by Varrun Ramani on June 16, 2009 at 10:21 AM IST #

while installing ss-dev one of my friend got an error of assertion failure, is it because of older build? he is using 2008.05, and error log is

Creating Plan \\Traceback (most recent call last):
File "/usr/bin/pkg", line 1734, in ?
ret = main_func()
File "/usr/bin/pkg", line 1698, in main_func
return install(img, pargs)
File "/usr/bin/pkg", line 601, in install
filters = filters, verbose = verbose, noexecute = noexecute)
File "/usr/lib/python2.4/vendor-packages/pkg/client/image.py", line 1704, in make_install_plan
ip.evaluate()
File "/usr/lib/python2.4/vendor-packages/pkg/client/imageplan.py", line 354, in evaluate
self.evaluate_fmri(f)
File "/usr/lib/python2.4/vendor-packages/pkg/client/imageplan.py", line 283, in evaluate_fmri
self.evaluate_fmri(cf)
File "/usr/lib/python2.4/vendor-packages/pkg/client/imageplan.py", line 283, in evaluate_fmri
self.evaluate_fmri(cf)
File "/usr/lib/python2.4/vendor-packages/pkg/client/imageplan.py", line 283, in evaluate_fmri
self.evaluate_fmri(cf)
File "/usr/lib/python2.4/vendor-packages/pkg/client/imageplan.py", line 283, in evaluate_fmri
self.evaluate_fmri(cf)
File "/usr/lib/python2.4/vendor-packages/pkg/client/imageplan.py", line 283, in evaluate_fmri
self.evaluate_fmri(cf)
File "/usr/lib/python2.4/vendor-packages/pkg/client/imageplan.py", line 206, in evaluate_fmri
m = self.image.get_manifest(pfmri)
File "/usr/lib/python2.4/vendor-packages/pkg/client/image.py", line 554, in get_manifest
m = self._fetch_manifest_with_retries(fmri)
File "/usr/lib/python2.4/vendor-packages/pkg/client/image.py", line 472, in _fetch_manifest_with_retries
m = self._fetch_manifest(fmri)
File "/usr/lib/python2.4/vendor-packages/pkg/client/image.py", line 498, in _fetch_manifest
m.set_content(mcontent)
File "/usr/lib/python2.4/vendor-packages/pkg/manifest.py", line 243, in set_content
action = actions.fromstr(l)
File "/usr/lib/python2.4/vendor-packages/pkg/actions/__init__.py", line 122, in fromstr
return fromlist(type, nlist, hash)
File "/usr/lib/python2.4/vendor-packages/pkg/actions/__init__.py", line 162, in fromlist
action = types[type](\*\*attrs)
File "/usr/lib/python2.4/vendor-packages/pkg/actions/attribute.py", line 55, in __init__
assert len(attrs) == 2
AssertionError
pkg:
can you help

Posted by sum-it on July 03, 2009 at 11:10 AM IST #

Yeah I am using the same version and I got this error too its a compatibility error the latest version of sun studio is not designed for 2008.05 try typing $pfexec pkg install ss-dev@version

Also take a look at following links for further info they look familiar to your error
http://defect.opensolaris.org/bz/show_bug.cgi?id=1133

http://www.mail-archive.com/opensolaris-discuss@opensolaris.org/msg41608.html

Posted by Kriti on July 13, 2009 at 01:56 PM IST #

In fact that error log is yours and I am on 2009.06 which is working perfectly with ss-dev.
That post was to gather some information regarding your eror :).

Posted by Sum-it on July 13, 2009 at 04:37 PM IST #

hi matto av

thanks for all the help. but i too got the same error as one of the others.both ss-dev and SUNWdoxygen is failing to install due to constraints with package entire. what could be done to avoid this and go about with normal installation. Also the cbe environment installed normally, but when trying out the pkgtool --download --ips SUNWflac.spec command to test the environment, the pkg build tool keeps failing. How could this be corrected?

Thanks

Posted by Ankush Agarwal on August 03, 2009 at 02:39 AM IST #

Getting errors installed ss-dev or doxygen or any other package because of entire. This generally
happens because a newer version of "entire" exists which you have not updated to, and the version
of ss-dev in the repo is part of the new entire's manifest, and will only install if the new
entire is o your system.

The pkg "entire" is only a metapackage and it's manifest includes a long list of packages with
specific versions that it depends on. Kind of like an umbrella package.

Two means of solving this issue :
- Update to latest version of entire by doing a pkg image-update. When doing an update
here's what generally do :

Refresh the pkg catalog :
$ pfexec pkg refresh --full

Update ipkg if an update exists :
$ pfexec pkg install SUNWipkg

Complete image-update :
$ pfexec pkg image-update

This will create a new Boot Environment (BE) for you to boot into, and then
you should re-try installing ss-dev or whatever package was failing.

or

- Remove/uninstall pkg entire then install ss-dev, going down this route may disable
the ability to pkg image-update going forward so it's not entirely recommended.

As for pkgtool failures, I can't really help there unless I know what the exact failures are :)
may be linked to the fact that you have not installed all packages :)

Posted by Matt Keenan on September 10, 2009 at 04:56 AM IST #

I have received several similar emails like this one.

Posted by links of london jewellery on November 22, 2009 at 11:11 PM GMT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Install engineer at Oracle who is passionate about Music, Sport and has a soft spot for Solaris

Search

Archives
« April 2014
MonTueWedThuFriSatSun
 
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