Module Basics

(Difference between revisions)
Jump to: navigation, search
m (The DETAILS script)
m (massive tweaks!)
Line 1: Line 1:
 
__TOC__
 
__TOC__
  
 +
In ''lunar'' parlance, software packages are called [[modules]]. The collection of all modules is the [[moonbase]], which is simply a directory (usually <code>/var/lib/lunar/moonbase</code>) containing ''sections'' (i.e. directories) which in turn contain the [[module]] directories.
  
In ''lunar'' parlance, software packages are called [[modules]]. The collection of all modules is the [[moonbase]], which is simply a directory (usually /var/lib/lunar/moonbase) containing ''sections'' (i.e. directories) which in turn contain the [[module]] directories.
+
A module is simply a directory containing the scripts necessary to build a software package, and optionally configuration files which may be needed in <code>/etc</code>. Some modules require only a [[DETAILS]] file, however this is only the case for a few of the modules in the entire moonbase. In each case, after [[DETAILS]], [[DEPENDS]], and [[CONFIGURE]], where a module can use lunar's default internal function(s), there is no need for a module-specific script.
  
A module is simply a directory containing the scripts necessary to build a software package, and optionally configuration files which may be needed in /etc. Some modules require only a [[DETAILS]] file, however this is only the case for a few of the modules in the entire moonbase. In each case (after [[DETAILS]], [[DEPENDS]] and [[CONFIGURE]]) where a module can use lunar's default internal function(s), there is no need for a module-specific script.
+
* [[DETAILS]] sets version, source URL(s) and other critical data
 
+
* [[CONFLICTS]] specifies modules which must (will) be removed by module
* DETAILS sets version, source URL(s) and other critical data
+
* [[CONFIGURE]] interactive script where build options can be set
* CONFLICTS specifies modules which must(will) be removed by module
+
* [[DEPENDS]] specifies required and optional packages
* CONFIGURE interactive script where build options can be set
+
* [[PRE_REMOVE]] used by [[lrm]]; actions which must preceed removal
* DEPENDS specifies required and optional packages
+
* [[PRE_BUILD]] most often used for patching, unpacking addional source tarballs
* PRE_REMOVE used by 'lrm'; actions which must preceed removal
+
* [[BUILD]] runs necessary variations on: configure; make; make install
* PRE_BUILD most often used for patching, unpacking addional source tarballs
+
* [[POST_BUILD]] install configuration scripts and data.
* BUILD runs necessary variations on: configure; make; make install
+
* [[POST_INSTALL]] messages, notes more cleanups, configuration fixes
* POST_BUILD install configuration scripts and data.
+
* [[POST_REMOVE]] used by [[lrm]]; actions which must follow removal
* POST_INSTALL messages, notes more cleanups, configuration fixes
+
* POST_REMOVE used by 'lrm'; actions which must follow removal
+
  
 
   
 
   
 
== Package Build and Install Scripts ==
 
== Package Build and Install Scripts ==
  
The following scripts are used by 'lin' (or indirectly by 'lunar') when building modules.
+
The following scripts are used by [[lin]] or indirectly by [[lunar]] when building modules.
  
  
 
=== The DETAILS script ===
 
=== The DETAILS script ===
  
Every module is required to have at least a DETAILS file. A minimal DETALS may appear as follows : (<code>/var/lib/lunar/moonbase/editors/emacs/DETAILS</code>)
+
Every module is required to have at least a [[DETAILS]] file. A minimal [[DETALS]] may appear as follows: (<code>/var/lib/lunar/moonbase/editors/emacs/DETAILS</code>)
  
 
           MODULE=emacs
 
           MODULE=emacs
Line 57: Line 56:
 
           UPDATED=20020529                                    # Date of latest change.
 
           UPDATED=20020529                                    # Date of latest change.
 
                                                               # Force update by setting this
 
                                                               # Force update by setting this
    # The remaining lines are used for input to the 'lvu what' command
+
    # and are best copied from the source-maintainer's own description.
+
# The remaining lines are used for input to the 'lvu what' command
 +
# and are best copied from the source-maintainer's own description.
 +
 
             SHORT="Emacs is the extensible, self-documenting real-time display editor."
 
             SHORT="Emacs is the extensible, self-documenting real-time display editor."
 
  cat << EOF
 
  cat << EOF
Line 67: Line 68:
 
=== The DEPENDS script ===
 
=== The DEPENDS script ===
  
The DEPENDS script is essential to configuration management, and is the key to the overall operation of lunar. Dependencies should be exactly specified, preferably not assuming the presence of any other modules, while knowing the sub-dependencies of the modules which are added and not adding those explictly where not needed.
+
The [[DEPENDS]] script is essential to configuration management, and is the key to the overall operation of lunar. Dependencies should be exactly specified, preferably not assuming the presence of any other modules, while knowing the sub-dependencies of the modules which are added and not adding those explictly where not needed.
  
 
'''Warning''' - Getting this right is difficult. Because the state of installed packages may vary widely, it's important to have a good understanding of what might be or not be installed on a target system.
 
'''Warning''' - Getting this right is difficult. Because the state of installed packages may vary widely, it's important to have a good understanding of what might be or not be installed on a target system.
  
'''Note''' - By convention Lunar does not include the X Window System (xfree86) in any dependency. There are two reasons for this choice. First we expect that users must understand that to use a graphical application locally, the X Window System must be installed. Second, due to the sligtly unusual definition of client and server used by X11, it is often in fact possible to build graphical applications and tools for remote display, without the server components locally installed. At some future date we may elect to provide a client-only installation of xfree86.
+
'''Note''' - By convention Lunar does not include the X Window System, xfree86 or XOrg, in any dependency. There are two reasons for this choice. First we expect that users must understand that to use a graphical application locally, the X Window System must be installed. Second, due to the sligtly unusual definition of client and server used by X11, it is often in fact possible to build graphical applications and tools for remote display, without the server components locally installed. At some future date we may elect to provide a client-only installation of xfree86.
  
DEPENDS may include both required and optional dependencies. The ''depends()'' function statement simply determines one required package. The optional_depends function is a little more complex. It consists of the required package, necessary --options to give to ./configure (for yes and no respectively, and an explanatory comment telling the user the purpose of the option being presented. A typical DEPENDS file might appear as follows : (/var/lib/lunar/moonbase/devel/subversion/DEPENDS)
+
[[DEPENDS]] may include both required and optional dependencies. The '''depends()''' function statement simply determines one required package. The optional_depends function is a little more complex. It consists of the required package, necessary --options to give to <code>./configure</code> for yes and no respectively, and an explanatory comment telling the user the purpose of the option being presented. A typical [[DEPENDS]] file might appear as follows: (<code>/var/lib/lunar/moonbase/devel/subversion/DEPENDS</code>)
  
 
  depends zlib    &&
 
  depends zlib    &&
Line 81: Line 82:
 
  #                  |            |            |                  |
 
  #                  |            |            |                  |
 
  #    optional package      if "Y"      if "N"      explanatory comment
 
  #    optional package      if "Y"      if "N"      explanatory comment
  #                       { ./configure strings }
+
  #                       { ./configure strings }
 
   
 
   
  
 
=== The CONFLICTS script ===
 
=== The CONFLICTS script ===
  
This script is simply used to specify modules which will be removed when a given module is installed. An example would be : (/var/lib/lunar/moonbase/editors/elvis/CONFLICTS)
+
This script is simply used to specify modules which will be removed when a given module is installed. An example would be: (<code>/var/lib/lunar/moonbase/editors/elvis/CONFLICTS</code>)
  
 
  conflicts vim
 
  conflicts vim
Line 93: Line 94:
 
=== The CONFIGURE script ===
 
=== The CONFIGURE script ===
  
The CONFIGURE script is used to collect interactive input from the user on optional parameters for the software build. use the 'query' function and provide a default answer to each question. The results of the answers are then used to store configuration variables needed in configuration state files. An a simple example might be : (/var/lib/lunar/moonbase/crypto/gnupg/CONFIGURE)
+
The [[CONFIGURE]] script is used to collect interactive input from the user on optional parameters for the software build. use the '''query''' function and provide a default answer to each question. The results of the answers are then used to store configuration variables needed in configuration state files. An a simple example might be: (<code>/var/lib/lunar/moonbase/crypto/gnupg/CONFIGURE</code>)
  
 
  if ! grep -q CONFIGURED $MODULE_CONFIG ; then
 
  if ! grep -q CONFIGURED $MODULE_CONFIG ; then
Line 102: Line 103:
 
  fi
 
  fi
  
Another way is using ''mquery'' like the lilo module does:
+
Another way is using '''mquery''' like the lilo module does:
  
 
  mquery RUN_LILO "Run LILO automatically upon LILO upgrades?" y
 
  mquery RUN_LILO "Run LILO automatically upon LILO upgrades?" y
Line 109: Line 110:
 
=== The PRE_BUILD script ===
 
=== The PRE_BUILD script ===
  
PRE_BUILD is used where special processing is needed before undertaking the actual build steps. Typical requirements include unpacking multiple sources, creating necessary system or source-tree direcotries and applying source patches. And example would be : (/var/lib/lunar/moonbase/doc-tools/html2db/PRE_BUILD)
+
[[PRE_BUILD]] is used where special processing is needed before undertaking the actual build steps. Typical requirements include unpacking multiple sources, creating necessary system or source-tree direcotries and applying source patches. And example would be: (<code>/var/lib/lunar/moonbase/doc-tools/html2db/PRE_BUILD</code>)
  
 
  mk_source_dir $SOURCE_DIRECTORY  &&
 
  mk_source_dir $SOURCE_DIRECTORY  &&
Line 122: Line 123:
 
=== The BUILD script ===
 
=== The BUILD script ===
  
BUILD is used where the ''default_build()'' function does not work for a given software package. For reference the commands run by default are:
+
[[BUILD]] is used where the '''default_build()''' function does not work for a given software package. For reference the commands run by default are:
  
Function default_build():
+
Function '''default_build()''' calls '''default_config''' which executes:
calls default_config which executes:
+
  
 
   ./configure  --build=$BUILD            \
 
   ./configure  --build=$BUILD            \
Line 135: Line 135:
 
                 $OPTS
 
                 $OPTS
  
Next, default_build(): calls default_make which executes:
+
Next, '''default_build()''' calls '''default_make''' which executes:
  
 
   make &&
 
   make &&
 
   make install
 
   make install
  
Where this build configuration does not work, the BUILD script is used to provide the needed steps. about 75% of modules need a BUILD script. Two examples include : (/var/lib/lunar/moonbase/archive/gzip/BUILD)
+
Where this build configuration does not work, the [[BUILD]] script is used to provide the needed steps. About 75% of modules need a [[BUILD]] script. Two examples include: (<code>/var/lib/lunar/moonbase/archive/gzip/BUILD</code>)
  
 
  (
 
  (
Line 153: Line 153:
 
  ) > $C_FIFO 2>&1
 
  ) > $C_FIFO 2>&1
  
and : (/var/lib/lunar/moonbase/editors/ex/BUILD)
+
and: (<code>/var/lib/lunar/moonbase/editors/ex/BUILD</code>)
  
 
  (
 
  (
Line 169: Line 169:
  
  
'''Note''' - BUILD scripts must execute inside a () (subshell invocation) construct and output is always directed to a named pipe (aka FIFO). Therefor all BUILD files take the follwing form:
+
'''Note''' - [[BUILD]] scripts must execute inside a (), called a subshell invocation, construct and output is always directed to a named pipe (aka FIFO). Therefor all [[BUILD]] files take the follwing form:
  
 
  (
 
  (
   command(s)
+
   # commands are put here
 
  ) > $C_FIFO 2>&1    # $C_FIFO holds the name of a fifo in /tmp used for 'voyeur'
 
  ) > $C_FIFO 2>&1    # $C_FIFO holds the name of a fifo in /tmp used for 'voyeur'
  
Line 179: Line 179:
 
=== The POST_BUILD script ===
 
=== The POST_BUILD script ===
  
POST_BUILD runs in place of the default_post_build routine which is used to install minor documentation and transfer/enable initialization scripts and similar system data, mostly into /etc. An example script would be : (/var/lib/lunar/moonbase/net/samba/POST_BUILD)
+
[[POST_BUILD]] runs in place of the '''default_post_build''' routine which is used to install minor documentation and transfer/enable initialization scripts and similar system data, mostly into <code>/etc</code>. An example script would be: (<code>/var/lib/lunar/moonbase/net/samba/POST_BUILD</code>)
  
 
  if [ ! -d /etc/samba/private ]; then
 
  if [ ! -d /etc/samba/private ]; then
Line 189: Line 189:
 
=== The POST_INSTALL script ===
 
=== The POST_INSTALL script ===
  
POST_INSTALL has no equivalent functions, and is run to handle post-installation work in a general manner. An example is : (/var/lib/lunar/moonbase/compilers/gcc/POST_INSTALL)
+
[[POST_INSTALL]] has no equivalent functions, and is run to handle post-installation work in a general manner. An example is: (<code>/var/lib/lunar/moonbase/compilers/gcc/POST_INSTALL</code>)
  
 
  cd /usr/lib/gcc-lib/$BUILD/$VERSION                      &&
 
  cd /usr/lib/gcc-lib/$BUILD/$VERSION                      &&
Line 202: Line 202:
 
== Package Removal Scripts ==
 
== Package Removal Scripts ==
  
Module removal is handled by 'lrm(8)'. Because installation is monitored (and backup tarballs are created using) installwatch, most of package removal is handled automatically using the logs created by installwatch. However we provide for additional actions to be taken through the PRE_REMOVE and POST_REMOVE scripts.
+
Module removal is handled by [[lrm]]. Because installation is monitored and backup tarballs are created using installwatch, most of package removal is handled automatically using the logs created by installwatch. However we provide for additional actions to be taken through the [[PRE_REMOVE]] and [[POST_REMOVE]] scripts.
  
  
 
=== The PRE_REMOVE script ===
 
=== The PRE_REMOVE script ===
  
PRE_REMOVE is needed to execute any tasks needed prior to the main task of removing all files installed by the module. An example would be : (/var/lib/lunar/moonbase/mail/docbook-3.1/PRE_REMOVE)
+
[[PRE_REMOVE]] is needed to execute any tasks needed prior to the main task of removing all files installed by the module. An example would be: (<code>/var/lib/lunar/moonbase/mail/docbook-3.1/PRE_REMOVE</code>)
  
 
  CENTRALIZED=/etc/sgml/catalog
 
  CENTRALIZED=/etc/sgml/catalog
Line 216: Line 216:
 
=== The POST_REMOVE Script ===
 
=== The POST_REMOVE Script ===
  
POST_REMOVE may be used to remove data not tracked by installwatch and to correctly adjust remaining configuration files and data. Examples would include : (/var/lib/lunar/moonbase/devel/binutils/POST_REMOVE)
+
[[POST_REMOVE]] may be used to remove data not tracked by installwatch and to correctly adjust remaining configuration files and data. Examples would include: (<code>/var/lib/lunar/moonbase/devel/binutils/POST_REMOVE</code>)
  
 
  install-info  --delete as        --info-dir /usr/info
 
  install-info  --delete as        --info-dir /usr/info
Line 226: Line 226:
 
  install-info  --delete ld        --info-dir /usr/info
 
  install-info  --delete ld        --info-dir /usr/info
  
or : (/var/lib/lunar/moonbase/compilers/php/POST_REMOVE)
+
or: (<code>/var/lib/lunar/moonbase/compilers/php/POST_REMOVE</code>)
  
 
  if    module_installed  apache;  then
 
  if    module_installed  apache;  then

Revision as of 20:47, 12 August 2005

Contents


In lunar parlance, software packages are called modules. The collection of all modules is the moonbase, which is simply a directory (usually /var/lib/lunar/moonbase) containing sections (i.e. directories) which in turn contain the module directories.

A module is simply a directory containing the scripts necessary to build a software package, and optionally configuration files which may be needed in /etc. Some modules require only a DETAILS file, however this is only the case for a few of the modules in the entire moonbase. In each case, after DETAILS, DEPENDS, and CONFIGURE, where a module can use lunar's default internal function(s), there is no need for a module-specific script.

  • DETAILS sets version, source URL(s) and other critical data
  • CONFLICTS specifies modules which must (will) be removed by module
  • CONFIGURE interactive script where build options can be set
  • DEPENDS specifies required and optional packages
  • PRE_REMOVE used by lrm; actions which must preceed removal
  • PRE_BUILD most often used for patching, unpacking addional source tarballs
  • BUILD runs necessary variations on: configure; make; make install
  • POST_BUILD install configuration scripts and data.
  • POST_INSTALL messages, notes more cleanups, configuration fixes
  • POST_REMOVE used by lrm; actions which must follow removal


Package Build and Install Scripts

The following scripts are used by lin or indirectly by lunar when building modules.


The DETAILS script

Every module is required to have at least a DETAILS file. A minimal DETALS may appear as follows: (/var/lib/lunar/moonbase/editors/emacs/DETAILS)

          MODULE=emacs
         VERSION=21.3
          SOURCE=$MODULE-$VERSION.tar.gz
SOURCE_DIRECTORY=$BUILD_DIRECTORY/$MODULE-$VERSION
      SOURCE_URL=$GNU_URL/$MODULE/$SOURCE
      SOURCE_URL=ftp://ftp.gnu.org/pub/gnu/$MODULE/$SOURCE
      SOURCE_VFY=md5:a0bab457cbf5b4f8eb99d1d0a3ada420
        WEB_SITE=http://www.gnu.org/software/emacs
         ENTERED=20010922
         UPDATED=20020529
           SHORT="Emacs is the extensible, self-documenting real-time display editor."
cat << EOF
Emacs is the extensible, customizable, self-documenting real-time
display editor. 
EOF

With comments, default values:

          MODULE=emacs                                       # Module name, yes it's redundant
         VERSION=21.3                                        # Version, changes *often*
          SOURCE=$MODULE-$VERSION.tar.gz                     # Source filename
SOURCE_DIRECTORY=$BUILD_DIRECTORY/$MODULE-$VERSION           # Where source unpacks
                                                             # ($BUILD_DIRECTORY=/usr/src)
   SOURCE_URL[0]=$GNU_URL/$MODULE/$SOURCE                    # Download URL
   SOURCE_URL[1]=ftp://ftp.gnu.org/pub/gnu/$MODULE/$SOURCE   # Alternate URL(s)
      SOURCE_VFY=md5:a0bab457cbf5b4f8eb99d1d0a3ada420        # Sets md5 hash or pgp/gpg sig url
        WEB_SITE=http://www.gnu.org/software/emacs           # where to learn more
         ENTERED=20010922                                    # First appearance in moonbase
         UPDATED=20020529                                    # Date of latest change.
                                                             # Force update by setting this

# The remaining lines are used for input to the 'lvu what' command
# and are best copied from the source-maintainer's own description.

           SHORT="Emacs is the extensible, self-documenting real-time display editor."
cat << EOF
Emacs is the extensible, customizable, self-documenting real-time
display editor. 
EOF

The DEPENDS script

The DEPENDS script is essential to configuration management, and is the key to the overall operation of lunar. Dependencies should be exactly specified, preferably not assuming the presence of any other modules, while knowing the sub-dependencies of the modules which are added and not adding those explictly where not needed.

Warning - Getting this right is difficult. Because the state of installed packages may vary widely, it's important to have a good understanding of what might be or not be installed on a target system.

Note - By convention Lunar does not include the X Window System, xfree86 or XOrg, in any dependency. There are two reasons for this choice. First we expect that users must understand that to use a graphical application locally, the X Window System must be installed. Second, due to the sligtly unusual definition of client and server used by X11, it is often in fact possible to build graphical applications and tools for remote display, without the server components locally installed. At some future date we may elect to provide a client-only installation of xfree86.

DEPENDS may include both required and optional dependencies. The depends() function statement simply determines one required package. The optional_depends function is a little more complex. It consists of the required package, necessary --options to give to ./configure for yes and no respectively, and an explanatory comment telling the user the purpose of the option being presented. A typical DEPENDS file might appear as follows: (/var/lib/lunar/moonbase/devel/subversion/DEPENDS)

depends zlib    &&
depends openssl &&
optional_depends "db4" "--with-berkeley-db"  ""   "for creating local repositories"
#                  ^            ^            ^                  ^
#                  |            |            |                  |
#     optional package       if "Y"       if "N"       explanatory comment
#                        { ./configure strings }

The CONFLICTS script

This script is simply used to specify modules which will be removed when a given module is installed. An example would be: (/var/lib/lunar/moonbase/editors/elvis/CONFLICTS)

conflicts vim


The CONFIGURE script

The CONFIGURE script is used to collect interactive input from the user on optional parameters for the software build. use the query function and provide a default answer to each question. The results of the answers are then used to store configuration variables needed in configuration state files. An a simple example might be: (/var/lib/lunar/moonbase/crypto/gnupg/CONFIGURE)

if ! grep -q CONFIGURED $MODULE_CONFIG ; then
  if query "Enable experimental external HKP keyserver interface? " n ; then
    OPTS="$OPTS --enable-external-hkp"
  fi
  echo 'CONFIGURED="y"' >> $MODULE_CONFIG
fi

Another way is using mquery like the lilo module does:

mquery RUN_LILO "Run LILO automatically upon LILO upgrades?" y


The PRE_BUILD script

PRE_BUILD is used where special processing is needed before undertaking the actual build steps. Typical requirements include unpacking multiple sources, creating necessary system or source-tree direcotries and applying source patches. And example would be: (/var/lib/lunar/moonbase/doc-tools/html2db/PRE_BUILD)

mk_source_dir $SOURCE_DIRECTORY  &&
unpack $SOURCE                   &&
cd $MODULE
unpack $SOURCE2
cd tidy
patch_it $SOURCE_CACHE/$SOURCE3 0
cd /usr/src/$MODULE


The BUILD script

BUILD is used where the default_build() function does not work for a given software package. For reference the commands run by default are:

Function default_build() calls default_config which executes:

  ./configure  --build=$BUILD            \
               --prefix=/usr             \
               --sysconfdir=/etc         \
               --localstatedir=/var      \
               --infodir=/usr/share/info \
               --mandir=/usr/share/man   \
               $OPTS

Next, default_build() calls default_make which executes:

  make &&
  make install

Where this build configuration does not work, the BUILD script is used to provide the needed steps. About 75% of modules need a BUILD script. Two examples include: (/var/lib/lunar/moonbase/archive/gzip/BUILD)

(
 ./configure --build=$BUILD            \
             --prefix=/usr             \
             --bindir=/bin             \
             --infodir=/usr/share/info \
             --mandir=/usr/share/man   &&
 make &&
 prepare_install &&
 make bindir=/bin install
) > $C_FIFO 2>&1

and: (/var/lib/lunar/moonbase/editors/ex/BUILD)

(
  cd $SOURCE_DIRECTORY                    &&
  sedit 's/usr.local/usr/' Makefile       &&
  sedit 's/= man/= share\/man/' Makefile  &&
  sedit 's/ucb/bin/' Makefile             &&
  sedit 's/= termlib/= ncurses/' Makefile &&
  make                                    &&
  prepare_install                         &&
  make install
) > $C_FIFO 2>&1

The first example is a build which needs non-standard 'configure' and 'make install' commands. The second is a build which does not use gnu auto-tools' 'configure' script.


Note - BUILD scripts must execute inside a (), called a subshell invocation, construct and output is always directed to a named pipe (aka FIFO). Therefor all BUILD files take the follwing form:

(
  # commands are put here
) > $C_FIFO 2>&1     # $C_FIFO holds the name of a fifo in /tmp used for 'voyeur'


The POST_BUILD script

POST_BUILD runs in place of the default_post_build routine which is used to install minor documentation and transfer/enable initialization scripts and similar system data, mostly into /etc. An example script would be: (/var/lib/lunar/moonbase/net/samba/POST_BUILD)

if [ ! -d /etc/samba/private ]; then
  mkdir -p /etc/samba/private
  chmod 700 /etc/samba/private
fi


The POST_INSTALL script

POST_INSTALL has no equivalent functions, and is run to handle post-installation work in a general manner. An example is: (/var/lib/lunar/moonbase/compilers/gcc/POST_INSTALL)

cd /usr/lib/gcc-lib/$BUILD/$VERSION                      &&
ln    -sf /usr/bin/cpp cpp                               &&
cd /lib/                                                 &&
ln    -sf /usr/bin/cpp cpp                               && 
if [ ! -e /usr/bin/cc ] ; then
  ln -s gcc /usr/bin/cc
fi


Package Removal Scripts

Module removal is handled by lrm. Because installation is monitored and backup tarballs are created using installwatch, most of package removal is handled automatically using the logs created by installwatch. However we provide for additional actions to be taken through the PRE_REMOVE and POST_REMOVE scripts.


The PRE_REMOVE script

PRE_REMOVE is needed to execute any tasks needed prior to the main task of removing all files installed by the module. An example would be: (/var/lib/lunar/moonbase/mail/docbook-3.1/PRE_REMOVE)

CENTRALIZED=/etc/sgml/catalog
DOCBOOK_INSTALL_DIR=/usr/share/sgml/docbook/$VERSION
install-catalog -r $CENTRALIZED $DOCBOOK_INSTALL_DIR/catalog


The POST_REMOVE Script

POST_REMOVE may be used to remove data not tracked by installwatch and to correctly adjust remaining configuration files and data. Examples would include: (/var/lib/lunar/moonbase/devel/binutils/POST_REMOVE)

install-info  --delete as         --info-dir /usr/info
install-info  --delete bfd        --info-dir /usr/info
install-info  --delete binutils   --info-dir /usr/info
install-info  --delete configure  --info-dir /usr/info
install-info  --delete gasp       --info-dir /usr/info
install-info  --delete gprof      --info-dir /usr/info
install-info  --delete ld         --info-dir /usr/info

or: (/var/lib/lunar/moonbase/compilers/php/POST_REMOVE)

if    module_installed  apache;  then
  cp        /etc/httpd/httpd.conf       /tmp/httpd.conf
  grep  -v  "LoadModule php4_module"    /tmp/httpd.conf  |
  grep  -v  "AddModule mod_php4.c"   >  /etc/httpd/httpd.conf
  rm    -f  /tmp/httpd.conf
elif  module_installed  apache_mod_ssl;  then
  cp        /etc/httpsd/httpd.conf      /tmp/httpd.conf
  grep  -v  "LoadModule php4_module"    /tmp/httpd.conf  |
  grep  -v  "AddModule mod_php4.c"   >  /etc/httpsd/httpd.conf
  rm    -f  /tmp/httpd.conf
fi
Personal tools
Namespaces
Variants
Actions
Wiki Navigation
Project Sites
Toolbox