Share

Industrial Linux

Project News for Industrial Linux

  • IL "pkg" packaging system available



    I uploaded the packaging system I use to build the Industrial Linux (IL) tarballs with. Even if you're not interested in the IL distro itself, you may be interested in leaving the complex world of .rpm and .deb behind in favor of tarballs. It's available at:

    http://sourceforge.net/projects/industriallinux/

    From the pkg-USAGE file:

    pkg - The Industrial Linux packaging system

    ##
    ## Copyright 2000, 2001 Scott Thomason
    ##
    ## This file is part of the Industrial Linux "pkg" system.
    ##
    ## The Industrial Linux "pkg" system is free software; you can redistribute
    ## it and/or modify it under the terms of the GNU General Public License as
    ## published by the Free Software Foundation; either version 2 of the License,
    ## or (at your option) any later version.
    ##
    ## The Industrial Linux "pkg" system is distributed in the hope that it will
    ## be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
    ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
    ## Public License for more details.
    ##
    ## You should have received a copy of the GNU General Public License along
    ## with the Industrial Linux "pkg" system (in the file COPYING); if not, write
    ## to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    ##

    PURPOSE
    =======
    I built this to speed up the (re-) building of Industrial Linux. It's easy to use.
    It's kind of like old-fashioned mainframe JCL. You define a job with a series
    of steps. I call them "build specs". pkg allows you to specify a build
    spec to execute, and optionally allows you to re-start at a given point, or
    even execute just a range of steps from the middle of the build spec.

    In addition to speeding up the re-execution of builds, pkg also creates
    a tarball of the installed files. It does this by taking a snapshot of your
    system before the step, another snapshot after the step, and builds a
    tarball from the differences.

    ENVIRONMENT
    ===========
    You control the way pkg uses directories by setting environment variables.
    Typically, packages are installed under the directory indicated by $PBLD.
    Source code, working directories, and other files used to build the packages
    are located in $PBLD/$PSRC. "File watching" is accomplished by monitoring
    new files that are created by a package step under $PBLD, less anything
    appearing in $PBLD/$PSRC. For example, I build Industrial Linux under directory
    /bld on my system. I keep all the packages under /bld/src. So, PBLD=/bld and
    PSRC=/bld/src ensures that only the files installed are put into the tarball package.

    You must set $PBLD and $PSRC for pkg to work properly. Several other environment
    variables are also used to control pkg, but they assume reasonable default
    values if you don't specify them:

    $TAR: "$PBLD/$PSRC/tarballs"
    $PATCH: "$PBLD/$PSRC/patches"
    $SPEC: The basename of the build spec file.
    $STEP: The step number being executed.
    $TARBALL: The name of the tarball that will be extracted.
    $TARDIR: The name of the resulting directory after extracting from $TARBALL.
    Setting this is usefull when the tarball filename is different
    from the extracted directory name.
    $PKG: The name of the package being built. Normally coincides with
    the package's tarball filename, less the ".tar.bz2" suffix.

    EXECUTION
    =========
    You invoke pkg like this: ./pkg <bldspec> [<fromstep> [<thrustep>]]
    <bldspec> is a file containg, er, "build specs" as described below. You can
    optionally specify a starting step number, and if you wish the build to
    stop before the last step, an ending step number.

    pkg is rather verbose about what's going on, just like "make" is. It
    tells you what commands are executing. If a command doesn't execute
    successfully, pkg complains bitterly and stops on the spot. This is nice,
    because otherwise you would have to code scripts like:

    command1 && \
    command2 && \
    command3

    SPECIFICATIONS
    ==============
    Take a look at some of the bldscript files from the Industrial Linux build
    to see how they work. It's pretty obvious, but here's bit to get you started:

    <step>:<package>:{
    <commands>
    }

    <step> is a number representing the sequence in which that step should be
    executed. <package>, by default found as "$PBLD/$PSRC/$TAR/$PKG.tar.bz2",
    is the un-tarred source directory. <commands> are, well, commands. Except when
    they're not: pkg is like a shell, and so processes some commands internally:

    cd : Changes to the specified directory for subsequent commands
    export: Defines environment variables for that step
    unset : Un-defines an environment variable
    option: Special instructions to the pkg shell

    Earlier I mentioned that pkg would complain and stop if a command failed.
    I bent the truth. You can tell pkg to forge ahead even if the command
    failed by prefixing the command with '! '.

    Steps 0000 and 9999 are special. They are always executed, if present, at the
    beginning and end of the build, respectively. This is most useful for
    defining environment variables like CFLAGS and making them stick for all
    subsequent build steps.

    SPECIAL OPTIONS
    ===============
    pkg allows some special "option" directives:

    nopkg : Don't build a tarball package
    addpkg : Append to a tarball package
    keepproc : Keep /proc files in the tarball package
    keepdir : Keep empty directories in the tarball package
    keepenv : Make any exported variables "stick" for subsequent steps
    nokeepenv : Stop making exported variables "stick" in parent environment
    chroot=/dir: Enter a chroot'ed environment at /dir
    source=url : Place a comment in the package's "packing list" file that
    indicates where the source tarball may be found.

    2001-08-01 05:17:49 UTC by scotthom

  • Industrial Linux alpha version 0.0.1 available

    After many stops (and a few starts), I've released an *alpha* version
    of Industrial Linux. It doesn't have any of the cool security stuff in
    it yet; at this point I'm just looking to see if it installs properly
    on other people's systems. If some of you with a spare partition or
    two wouldn't mind, I'd sure appreciate it if you could try installing
    it and tell me what problems you run into.

    You can get the tarball from the download section of:

    http://sourceforge.net/projects/industriallinux/

    I think this URL will take you right to the downloadable files:

    http://sourceforge.net/project/showfiles.php?group_id=15470&release_id=46074

    There's a file called INSTALL that explains how to, um, install it.
    You can download the INSTALL file from those links.

    If you download bootfloppy.img, you can copy that to a formatted
    diskette using this command:

    dd if=bootfloppy.img of=/dev/fd0

    This is a refreshingly small release, occupying under 200M.

    Again, I would sure appreciate a few testers!

    To my knowledge (and I keep a pretty close watch), the packages
    included are the most current stable release, with two exceptions: I
    forgot to upgrade Perl to 5.6.1 (ack!), and I'm sticking with gcc
    2.95.3 until the next stable gcc and glibc come out. The packages
    included in this release are:

    autoconf-2.52 automake-1.4-p5 bash-2.05 bin86-0.16.0 binutils-2.11.2
    bison-1.28 bzip2-1.0.1 cracklib-2.7 cvs-1.11.1p1 devfsd-v1.3.11
    diffutils-2.7 e2fsprogs-1.22 file-3.36 fileutils-4.1 findutils-4.1
    flex-2.5.4a gawk-3.1.0 gcc-2.95.3 gettext-0.10.39 glibc-2.2.3
    grep-2.4.2 groff-1.17.1 gzip-1.2.4a hdparm-4.1 kbd-1.06 less-358
    libtool-1.4 lilo-21.7.5 linux-2.4.7-ac3 lsof_4.57 lynx-2.8.3 m4-1.4
    make-3.79.1 man-1.5i2 man-pages-1.39 modutils-2.4.6 ncurses-5.2
    net-tools-1.60 netkit-base-0.17 openssh-2.9p2 openssl-0.9.6b
    patch-2.5.4 perl-5.6.0 procinfo-18 procps-2.0.7 psmisc-19 sed-3.02
    sh-utils-2.0 shadow-20001016 snarf-7.0 sysklogd-1.4.1 sysvinit-2.80
    tar-1.13 texinfo-4.0 textutils-2.0 util-linux-2.11h vim-5.8-src
    which-2.12 zlib-1.1.3

    The components of each package are included in /usr/doc/installed.

    Tonight (after I'm done with my day job!), I'll be publishing other
    components: the packager (pkg) (which creates simple tarballs and
    includes a install file watcher), the build steps, and the source
    tarballs and various patch files.

    If I haven't mentioned it already...thanks in advance to testers!
    ---scott

    2001-07-31 13:14:14 UTC by scotthom