Welcome to
Fr édéric Schoenahl 's Homepage

Back home

Image
Solaris 10 post-installation issues

Preparing a Solaris 10 installation for compiling programs with gcc

Problems with reading IDE cdrom drive on Ultrasparc

Setting up a subversion server on Solaris 10

All below information is related to an installation of Solaris 2.10 on a Sun Ultrasparc workstation, this should also be working for all US series.

System headers errors (signal.h inclusion usually)

Getting compilation errors about signal.h, siginfo.h undefined typedefs (cpid_t) or anything concerning system headers? The following should have been done after installing solaris 10 (login as root):

Check what your GCC version is:

#  gcc -dumpversion

Then change to that directory

#  cd /usr/local/lib/gcc-lib/\
sparc-sun-solaris2.10/`gcc -dumpversion`/install-tools/

Prepend the following line at the top of mkheaders.conf :

SHELL=/bin/sh

and then run :

#  ./mkheaders

It takes a one or more minutes, be patient! After this, the headers will match you kernel build and compilation should succeed.

^ Back to top



The IDE drive is not usable with Solaris 10 on Ultrasparc stations

Getting problems to read data from a standard IDE drive with your brand new Solaris 10 installation?: this may be due to the fact that smserver is not running by default. Get it up with :

#  svcadm enable smserver

^ Back to top



How to set up a Subversion repository on Solaris 10?

[Nota : updated 7/I/2006] Subversion aka SVN is a powerful revision control system for document, ANSI (java, C, txt sources) and binary data, with feature that kill the traditional CVS. I use it interfaced by TortoiseSVN on Windows and simple command line on other platforms (Solaris &eamp; Linux).

In our research institution, we want to use a central repository in the Intranet for all of us, I follow that procedure to set it up (login as root) :

0. Prerequisites

The svn, svnadmin, svnserver executables are compiled and installed in exported pathes (you are able to call them from the command line) - and you are administrator of the workstation. Preferabily, they are located in the /usr/local subdirectory

1. Copy file "subversion.xml" to

/var/svc/manifest/network/subversion.xml

2. Modify and copy method file "subversion" to

/lib/svc/method/subversion

In particular, you must change the path indicated

/staff/shared/intraweb/subversion 

with the root of your projects central repository. And check that the subversion path matches.

3. Import method using Solaris administration tools :

# svccfg import /var/svc/manifest/network/subversion.xml
# svcs -a | grep subversion
  maintenance 10:20:30 svc:/network/subversion:default

Note that "maintenance" can be replaced by "disabled" in the output.

4. Start service :

# svcadm enable subversion
# svcs subversion
  STATE    STIME    FMRI
  online   01:23:45 svc:/network/subversion:default

Standard start|restart|stop init5-like procedures are done with :

# svcadm [restart|start|stop] subversion

Want to setup a new project called ${project}? use

# svnadmin create --fs-type fsfs ${repository}/${project}

Note that we use the fsfs database type. This is to make easy migration from i.e. Windows platforms to Unix-like ones, because the standard db3-4 repository format is not handled likewise on the different systems.

5. Grant access to remote users : edit

 ${repository}/${project}/conf/svnserv.conf 

You can refer onto the existing material to set up your configuration. On a secure intranet, simply set up rights by uncommenting the following lines :

[general]
anon-access = write

This is the minimal configuration, no password is asked to checkout the subversion directory contents. Do not forget to restart the service :

# svcadm restart subversion

Now how to access your projects? by using the following syntaxic convention :

$ svn checkout svn://${hostname}/${project}

FAQ

  • * How to run the server with specific rights?
  • [Renaud Waldura] : modify the XML file cited above, see that diff :
    *** subversion.xml.orig   Fri Dec  2 11:11:09 2005
    --- /var/svc/manifest/network/subversion.xml    Thu Dec  1 13:06:38 2005
    ***************
    *** 29,36 ****
             type=' method '
             name=' start '
             exec=' / lib / svc / method / subversion start '
    !         timeout_seconds=' 60 ' />
    !
         <exec_method
             type=' method '
             name=' stop '
    --- 29,40 ----
             type=' method '
             name=' start '
             exec=' / lib / svc / method / subversion start '
    !         timeout_seconds=' 60 '>
    !         <method_context>
    !               <method_credential user=' svn ' />
    !         </method_context>
    !     </exec_method>
    !
         <exec_method
             type=' method '
             name=' stop '
    
  • * What to do if services do not start (at boot)?
  • [Frédéric Schoenahl] : After a workstation boot, check the service status with
    # svcs -x
    
    in order to display the service status. An error message is displayed as e.g.
    svc:/network/subversion:default (Subversion server)
     State: maintenance since Thu Feb 09 14:19:21 2006
    Reason: Method failed.
       See: http://sun.com/msg/SMF-8000-8Q
       See: svnserve(5)
    Impact: This service is not running.
    
    In this case, you should verify the two scripts given above, if they are right, and then delete the current entry :
    # svccfg delete svc:/network/subversion:default
    
    reimport
    # svccfg import /var/svc/manifest/network/subversion.xml
    
    and recheck
    # svcs -a | grep subversion
      maintenance 10:20:30 svc:/network/subversion:default
    
  • * How to grant access to limited number of users ?
  • [Frédéric Schoenahl] : Edit svnserv.conf in all new created repositories to catch an access file :
    ###  SVNSERV.CONF ####
    [general]
    anon-access = none
    auth-access = write
    password-db = /path/to/a/secured/access/file.dat
    
    which refers to a file.dat edited as follow :
    [users]
    fred = chocolate
    johnny = cacao
    
    designed for two users, johnny and fred, with their related passwords. Don't forget to correctly set-up the POSIX rights of this file to only be seeable/editable by the user! otherwise anybody can access these passwords!

And further information about the subversion command line are to be found here, for a short reference :

  • svn checkout PATH retrieves contents of the latest release project to current directory
  • svn commit stores current version to repository (called from inside project directory)
  • svn add FILE adds a file to project
  • svn del removes a file to project, it will be requested to use the --force flag to confirm that action
  • svn move FROM TO moves a file/folder from one location to another, or renames it
  • svn log -rN:M generates a log file comprising changes from revision N to revision M
  • svn COMMAND help gets help about that command

REFERENCES :

Similar page in japanese

Subversion book and user guide

^ Back to top



< Bring me back home!

email adress (you need graphics)