LEVEL2S(8)                                                          LEVEL2S(8)



NAME
       level2s - manipulate level2 packages (viz. build, RPM, msync, test)

SYNOPSIS
       level2s {build|list|missing|msync|restore|sane} [items]
       level2s {rpm|cpan2rpm} [tar-files]
       level2s -h | help
       level2s -V | version

DESCRIPTION
       Level2s  manages a simple level two configuration management structure.
       It builds on level 1 where we keep each file under a  revision  control
       structure  (like  RCS,  or  CVS).  At level 2 we packages related files
       into a "source tar ball" that holds a product at a particular  version.
       The version is usually the revision name of a key member file.

       Using  that source package we may build an RPM (see rpm(1)), or extract
       the aggregated files on another machine to use the master source struc-
       ture  to  build  across  many hosts or a single host (see msrc(8l)), or
       publish the tar archive for source consumers.

       The  source  directories  for  each  level2  product  are  kept   under
       /usr/msrc/  and  are  located  by the existence of the file ITO.spec in
       each source directory.  See msync(8l) for more details about the common
       conventions for each source directory.

ITO.SPEC
       A  standard  RPM  specification  file called ITO.spec marks each level2
       source directory.  It is the RPM spec file and is also  marked-up  with
       mk(1l) lines to provide some meta-information.

       $KeyFile:
              This  marker  must  produce  the  name of the distinguished file
              whose revision control markup provides the version number of the
              package.   When  no  such marked line exists the ITO.spec file's
              revision information is assumed.  See ident(1), and mk(1l).

              For example this marker selects the "README" file  as  the  file
              with the correct revision number.
                   $KeyFile: ${echo:-echo} README $$

       $Level2:
              This  should return the package name, if it is not the last com-
              ponent name of the directory.

       $Level3:
              If this succeeds, it outputs the name of the level3 package that
              includes  this  product (so we don't build a stand-alone package
              for it).

OPTIONS
       In each of the commands below items is either the full path to a level2
       directory,  or  the  name  of  the level2 package built.  When none are
       specified all level2 packages are assumed.

       -h or help
              Output only the standard command-line usage information.

       -V or version
              Output only the standard version information.

       list [items]
              Output the list of directories and some  additional  information
              about  each.   This  table  is  mostly  useful for debugging the
              program itself.

       build [items]
              Construct a level2 package for each requested directory, or  all
              when none are specified.

       missing [items]
              List all the missing tar balls for all the given items.

       msync [items]
              Run msync for each of the given items.

       restore [items]
              Put the contents of the named tar files back into the local mas-
              ter source.  If you add an RCS directory and force a checkin  of
              the  files  at the correct versions you should have exactly what
              the author had tagged when she build the  tar  archives.   Reads
              the  environment variable $MSRC_ROOT for the leading path to the
              local master source cache (which defaults to /usr/msrc).

       sane [items]
              Run an internal sanity check for each of the given items.

       These operations use the tar ball as the specification, rather than the
       master source directory:

       rpm tar-files
              Turn the source tar ball into an RPM via rpmbuild(1).

       cpan2rpm tar-files
              Turn a CPAN tar ball into an RPM using local site policy for the
              location and hxmd's auto.cf for the mmsrc configuration.

NOTES
       The package "Example" is exempt from most operations since it is not  a
       real package or product.

EXAMPLES
       level2s -V
              Output the version of level2s.

       level2s build unixstats
              Build  a  level2  package  for unixstats using the definition of
              unixstats from the master source.

       level2s rpm unixstats-1.0.tgz
              Build an rpm from unixstats-1.0.tgz.  The ITO.spec in the gipped
              tar  archice  is  extracted  into /usr/src/redhat/SPECS then the
              tarball is placed into /usr/src/redhat/SOURCES.  rpmbuild(8) -ba
              runs  against  the  extracted spec file, and binary and rpms are
              built  and  placed  in  /usr/src/redhat/RPMS  and  /usr/src/red-
              hat/SRPMS,  respectively  (or under /root/rpmbuild, depending on
              the  Linxu  distro).   As  a  side-effect  the  binary  rpm  may
              installed, but is not under CentOS.

       level2s cpan2rpm /tmp/My-Favorite-Cpan-Package-1.0_4.tar.gz
              Build  a rpm from My-Favorite-Cpan-Package-1.0_4.tar.gz. A .spec
              file  will  be  auto-magically  generated  from   the   .tar.gz.
              Attempts are made to extract summary and description from embed-
              ded documentation in the  tarball.   If  said  documentation  is
              absent,  building  will  fail.  Source and binary rpms are built
              into the same locations as above.  The binary rpm is  installed.

       level2s list Tee
              Outputs  the  path to the directory, the key file name, the cur-
              rent symbolic version, and the name of the  package  with  colon
              (:) separators:
              /usr/msrc/usr/local/bin/Tee:Tee.m:Two:Tee

       level2s restore efmd-*.tgz
              Reconstruct the master source (as best we can) for efmd(8l) from
              the compressed distribution source tar  archive.   The  revision
              history is lost, since it is not included in the source package.
              And local changes should be kept under the local site policy for
              revision control.

ENVIRONMENT
       $SOURCE
              The  committer  group for the master source structure.  Defaults
              to the name "source".

BUGS
       The program is a little slow to start as it gathers the list of all the
       product directories via find(1) over /usr/msrc/.

AUTHORS
       KS Braunsdorf and Ed Anderson, Non-Player Character's Guild,
       level2s no-spam-allowed-at ksb.npcguild.org

SEE ALSO
       mk(1l),  hxmd(8l), msync(8l), rcsvg(1l), ident(1), msrc(8l), mmsrc(8l),
       tar(1), gzip(1), rpm(1), rpmbuild(8), level3s(8l)



                                     LOCAL                          LEVEL2S(8)

NAME | SYNOPSIS | DESCRIPTION | ITO.SPEC | OPTIONS | NOTES | EXAMPLES | ENVIRONMENT | BUGS | AUTHORS | SEE ALSO