NST v2.x Guidelines: Difference between revisions

From MediaWiki
Jump to navigationJump to search
Line 70: Line 70:
   ./configure
   ./configure
   make all
   make all
IMPORTANT: The make dependencies will only rebuild if the associated pkginfo.xml file is modified. This means if you modify source code for the NST WUI, a ''make all'' under the ''yum'' area will NOT detect the change and may not rebuild the package. To force the building of a package, include ''NAME-remove'' on the command line. For example, to force the building of the ''nstwui'' and ''nst-icons'' packages, use the following:
  make nstwui-remove nst-icons-remove all


=== Rebuilding Repository ===
=== Rebuilding Repository ===

Revision as of 11:20, 24 February 2009

Overview

While looking at the effort involved in moving NST to Fedora 10, we decided that we wanted to spend less time and effort on package maintenance and focus more on WUI development. To accomplish this, we will migrate away from our custom ISO script building techniques (that we started back in 2003) and move to the livecd-creator mechanism that has become a part of the standard Fedora distribution.

Good Things

  • Users will have access to yum package manager and the ability to enhance (or trash) their NST systems to their hearts content.
  • Using livecd-creator will keep us Fedora compatible.
  • Hard drive installation will be through standard Fedora tool.
  • Migration to the next release of Fedora should be much less painful.
  • Much less effort required on our parts for installing the numerous Fedora packages we depend on.
  • Potential for creating our own yum repository (allowing one to update their NST system using a standard yum update invocation).

Bad Things

  • ISO will not fit on CD (will require DVD).
  • Build times may be slower and it may be difficult to test individual package installations without doing a full build.

General Build Guidelines

The building of the NST ISO image will then involve the following steps:

  • The building of a local yum repository for packages which we want to continue building ourselves (or are not found in the Fedora repositories). This will be located under the top level yum directory.
  • The building of the ISO using the standard livecd-creator package. This will involve many custom scripts for "tweaking" the default ISO image created. This will be located under the top level livecd directory.

Local Yum Repository

Building

Initial Build

To build the NST Yum repository on a development machine (from scratch):

  • Checkout the NST source tree.
  • Run the top level ./configure script.
  • Change to the yum directory.
  • Run the ./configure script.
  • Run: make help | less to review what you can build.
  • Run: yum install $(make build-requires) to make sure your development system has the necessary packages for building the yum repository.
  • Run make all to build the repository (the files will appear under the repo sub directory).

The command sequence looks something like the following:

 nstcvs co -d nst .
 cd nst
 ./configure
 cd yum
 ./configure
 make all

NOTE: If the configure stage determines that your system is missing some packages, it should report what packages you need to install.

Subsequent Builds

After the initial build, you can use the following to update:

 ./configure
 make all

IMPORTANT: The make dependencies will only rebuild if the associated pkginfo.xml file is modified. This means if you modify source code for the NST WUI, a make all under the yum area will NOT detect the change and may not rebuild the package. To force the building of a package, include NAME-remove on the command line. For example, to force the building of the nstwui and nst-icons packages, use the following:

 make nstwui-remove nst-icons-remove all

Rebuilding Repository

If you want to rebuild your entire repository, remove the repo sub directory and then build:

 rm -fr repo
 make all

Rebuilding Everything

If you want to re-download all of the source and rebuild your entire repository:

 make nuke
 make all

Single Build

Once the yum area is configured, you can force the building of a single package. For example, if you want to force the build of the nst-config package, run:

make nst-config-remove nst-config

Test Build

If you have a running instance of a NST system, you can force the building of a package and install it on the remote NST system. For example, to force the building of the nst-config and do a test installation on the NST at 192.168.100.10, run:


make HOST=192.168.100.10 nst-config-remove nst-config-probe-install

ISO Build

Make sure you build your yum repository first (if you haven't done so yet):

make -C ../yum all

To then build the ISO image:

./configure
make iso

For a clean build:

make clean
./configure
make iso

For more possibilities use the help target:

make help | less

RPM Tips

  • RPM Reference Documentation
Maximum RPM - This is a good document to refer to in regards to RPMs.


  • HowTo Find RPM "%macro"

To find the secret "%macros", try commands like:

rpmbuild --showrc | grep _ln
rpmbuild --showrc | grep share


  • HowTo Find Available RPM "Groups"
Look at file: "/usr/share/doc/rpm-4.6.0/GROUPS"