head 1.32;
access;
symbols
INITIAL:1.1.1.1 VENDOR:1.1.1;
locks; strict;
comment @# @;
1.32
date 2005.10.19.09.20.04; author openpkg; state Exp;
branches;
next 1.31;
1.31
date 2005.06.22.08.37.54; author thl; state Exp;
branches;
next 1.30;
1.30
date 2005.02.24.16.03.19; author rse; state Exp;
branches;
next 1.29;
1.29
date 2005.02.24.15.55.52; author rse; state Exp;
branches;
next 1.28;
1.28
date 2004.10.20.08.06.07; author thl; state Exp;
branches;
next 1.27;
1.27
date 2004.07.20.07.59.16; author thl; state Exp;
branches;
next 1.26;
1.26
date 2004.04.15.18.09.41; author rse; state Exp;
branches;
next 1.25;
1.25
date 2004.02.27.14.59.50; author thl; state Exp;
branches;
next 1.24;
1.24
date 2004.02.25.15.39.00; author thl; state Exp;
branches;
next 1.23;
1.23
date 2004.02.25.09.26.00; author thl; state Exp;
branches;
next 1.22;
1.22
date 2004.02.23.17.37.34; author cs; state Exp;
branches;
next 1.21;
1.21
date 2003.08.07.14.46.09; author thl; state Exp;
branches;
next 1.20;
1.20
date 2003.08.04.07.32.36; author thl; state Exp;
branches;
next 1.19;
1.19
date 2003.08.01.20.08.18; author thl; state Exp;
branches;
next 1.18;
1.18
date 2003.01.22.13.12.54; author rse; state Exp;
branches;
next 1.17;
1.17
date 2003.01.21.12.57.31; author ms; state Exp;
branches;
next 1.16;
1.16
date 2003.01.15.11.12.26; author ms; state Exp;
branches;
next 1.15;
1.15
date 2002.10.04.15.42.12; author ms; state Exp;
branches;
next 1.14;
1.14
date 2002.08.28.14.51.24; author thl; state Exp;
branches;
next 1.13;
1.13
date 2001.12.14.13.50.31; author rse; state Exp;
branches;
next 1.12;
1.12
date 2001.12.06.10.16.11; author rse; state Exp;
branches;
next 1.11;
1.11
date 2001.12.06.08.15.34; author rse; state Exp;
branches;
next 1.10;
1.10
date 2001.12.05.15.28.10; author rse; state Exp;
branches;
next 1.9;
1.9
date 2001.12.05.10.50.18; author rse; state Exp;
branches;
next 1.8;
1.8
date 2001.11.30.16.48.26; author rse; state Exp;
branches;
next 1.7;
1.7
date 2001.11.29.19.51.07; author rse; state Exp;
branches;
next 1.6;
1.6
date 2001.11.29.19.48.17; author rse; state Exp;
branches;
next 1.5;
1.5
date 2001.11.27.15.18.13; author rse; state Exp;
branches;
next 1.4;
1.4
date 2001.11.27.13.32.46; author rse; state Exp;
branches;
next 1.3;
1.3
date 2001.11.27.12.18.34; author rse; state Exp;
branches;
next 1.2;
1.2
date 2001.11.22.15.57.49; author rse; state Exp;
branches;
next 1.1;
1.1
date 2001.08.28.12.57.50; author rse; state Exp;
branches
1.1.1.1;
next ;
1.1.1.1
date 2001.08.28.12.57.50; author rse; state Exp;
branches;
next ;
desc
@@
1.32
log
@update website for OpenPKG 2.5
@
text
@
#use "page.inc" page=tutorial
While we strongly recommend using source packages whenever possible, the absence of development tools and mass rollouts are reasons which enforce the use of binaries. Let's make a quick'n'dirty but mostly useful check:
$ which gcc cc || echo "bad luck, no development tools"The matrix below tells you about all four combinations of bootstrapping or regular installing/upgrading a package from source or binary. For the tutorial, please select the bootstrap method you prefer or require. Then come back and continue below.
source packages class complete release CORE+BASE+PLUS security udpates CORE+BASE binary packages (arch-os) class amd64-freebsd5.4 CORE+BASE ix86-debian3.1 CORE+BASE ix86-fedora4 CORE+BASE ix86-freebsd5.4 CORE+BASE ix86-freebsd6.0 CORE+BASE ix86-netbsd2.0.2 CORE+BASE ix86-rhel4 CORE+BASE ix86-solaris10 CORE+BASE ix86-solaris9 CORE+BASE ix86-suse10.0 CORE+BASE sparc64-solaris10 CORE+BASE sparc64-solaris9 CORE+BASE ia64-freebsd5.4 CORE ix86-freebsd7.0 CORE ix86-gentoo1.12.0 CORE ix86-mandriva10.2 CORE ix86-freebsd4.11 CORE ix86-suse9.3 CORE sparc64-solaris8 CORE
The portable nature enables additional platforms to leverage portions of OpenPKG technology on other Unix platforms. Some unofficial binaries for such platforms can be found on ZfOS.
$ mkdir /storage/with/250MB/free $ ln -s /storage/with/250MB/free /openpkg
$ TMPDIR= /var/tmp/with/250MB/free $ export TMPDIR
Showcase (animated gif)
$ eval `/openpkg/bin/openpkg rc --eval all env`Enter these command examples to understand what 'eval' did for you.
$ set | grep /openpkg/ $ which rpm $ man rpm
Should an upgrade of the actual OpenPKG itself be desired, this is not carried out by bootstrapping again. Rather, install the next OpenPKG version just as any other package. Go back to the matrix to see the upgrade options again.
$ cd $TMPDIR $ ftp ftp.openpkg.org Connected to ftp.openpkg.org. 220 ftp.openpkg.org OpenPKG Anonymous FTP Server ready. Name (ftp.openpkg.org): anonymous 331 Anonymous login ok, send your email address as your password. Password: you@@example.com 230- [...] Welcome to OpenPKG.org! [...] 230 Anonymous access granted, restrictions apply. ftp> bin 200 Type set to I. ftp> cd release/Back to the matrix./SRC ftp> get openpkg-.0- ftp> bye 221 Goodbye..0.src.sh Choose the prefix, tag, user and group of your choice. You can omit all but prefix. Unprivileged users must choose their login and primary group which is their default anyway.
$ sh openpkg-
.0- $ su \# cd $TMPDIR \# sh openpkg-.0.src.sh \\ --prefix=/openpkg --tag=openpkg --user=openpkg --group=openpkg .0- \# exit $.0.arch-os-openpkg.sh
Should an upgrade of the actual OpenPKG itself be desired, this is not carried out by bootstrapping again. Rather, install the next OpenPKG version just as any other package. Go back to the matrix to see the upgrade options again.
$ cd $TMPDIR $ ftp ftp.openpkg.org Connected to ftp.openpkg.org. 220 ftp.openpkg.org OpenPKG Anonymous FTP Server ready. Name (ftp.openpkg.org): anonymous 331 Anonymous login ok, send your email address as your password. Password: you@@example.com 230- [...] Welcome to OpenPKG.org! [...] 230 Anonymous access granted, restrictions apply. ftp> bin 200 Type set to I. ftp> cd release/Back to the matrix./BIN ftp> get arch-os/openpkg-.0- ftp> bye 221 Goodbye. $ su \# cd $TMPDIR \# sh openpkg-.0.arch-os-openpkg.sh .0- \# exit $.0.arch-os-openpkg.sh
$ /openpkg/bin/openpkg rpm --rebuild \\ ftp://ftp.openpkg.org/release//SRC/foo-X.Y- $ su \# /openpkg/bin/openpkg rpm -Uvh \\ /openpkg/RPM/PKG/foo-X.Y-.0.src.rpm .0.arch-os-openpkg.rpm
ftp://ftp.openpkg.org/release//SRC/bash- - .0.src.rpm
/openpkg/RPM/PKG/ ... ... bash-Back to the matrix.- ... bash-.0.hppa-hpux11.11 - ... bash-.0.ix86-debian3.0 - ... bash-.0.ix86-debian3.1 - ... bash-.0.ix86-fedora2 - ... bash-.0.ix86-freebsd4.10 - ... bash-.0.ix86-freebsd5.3 - ... bash-.0.ix86-gentoo1.5.3 - ... bash-.0.ix86-mandrake10.0 - ... bash-.0.ix86-netbsd1.6.2 - ... bash-.0.ix86-rhel3 - ... bash-.0.ix86-solaris10 - ... bash-.0.ix86-solaris9 - ... bash-.0.ix86-suse9.2 - ... bash-.0.ix86-suse9 - ... bash-.0.sparc64-solaris10 - ... bash-.0.sparc64-solaris2.6 - ... bash-.0.sparc64-solaris8 - .0.sparc64-solaris9
$ su \# /openpkg/bin/openpkg rpm -Uvh \\ ftp://ftp.openpkg.org/release//BIN/platform/foo-X.Y- .0.arch-os-openpkg.rpm
ftp://ftp.openpkg.org/release/Back to the matrix. @ 1.31 log @uprev tutorial @ text @d3 1 a3 1/BIN/ ... ... hppa-hpux11.11/bash-- ... ix86-debian3.0/bash-.0.hppa-hpux11.11 - ... ix86-debian3.1/bash-.0.ix86-debian3.0 - ... ix86-fedora3/bash-.0.ix86-debian3.1 - ... ix86-freebsd4.11/bash-.0.ix86-fedora3 - ... ix86-freebsd5.3/bash-.0.ix86-freebsd4.11 - ... ix86-gentoo1.6.9/bash-.0.ix86-freebsd5.3 - ... ix86-mandrake10.2/bash-.0.ix86-gentoo1.6.9 - ... ix86-netbsd2.0/bash-.0.ix86-mandrake10.1 - ... ix86-rhel3/bash-.0.ix86-netbsd2.0 - ... ix86-solaris10/bash-.0.ix86-rhel3 - ... ix86-solaris9/bash-.0.ix86-solaris10 - ... ix86-suse9.2/bash-.0.ix86-solaris9 - ... ix86-suse9.1/bash-.0.ix86-suse9.2 - ... sparc64-solaris10/bash-.0.ix86-suse9.1 - ... sparc64-solaris8/bash-.0.sparc64-solaris10 - ... sparc64-solaris9/bash-.0.sparc64-solaris8 - .0.sparc64-solaris9
arch-os | platform | uname -m -r -s |
ix86-freebsd4.8 | FreeBSD 4.8 | FreeBSD 4.8-STABLE i386 |
ix86-freebsd5.1 | FreeBSD 5.1 | FreeBSD 5.1-CURRENT i386 |
ix86-linux2.2 | Debian GNU/Linux 2.2 | Linux 2.2.22 i686 |
ix86-linux2.4 | Debian GNU/Linux 3.0 | Linux 2.4.21 i686 |
ix86-linux2.4 | RedHat Linux 9 | Linux 2.4.20-18.9 i686 |
ix86-linux2.4 | SuSE Linux 8.2 | Linux 2.4.20-4GB i686 |
sparc64-solaris2.8 | Sun Solaris 8 | SunOS 5.8 sun4u |
sparc64-solaris2.9 | Sun Solaris 9 | SunOS 5.9 sun4u |
ix86-solaris9 | Sun Solaris 9/x86 | SunOS 5.9 i86pc |
alpha-freebsd5.1 | FreeBSD 5.1 [*] | FreeBSD 5.1-CURRENT alpha |
sparc64-solaris2.6 | Sun Solaris 2.6 [*] | SunOS 5.6 sun4u |
ix86-freebsd4.7 | FreeBSD 4.7 | FreeBSD 4.7-STABLE i386 |
ix86-freebsd5.0 | FreeBSD 5.0 | FreeBSD 5.0-RELEASE i386 |
ix86-linux2.2 | Debian GNU/Linux 2.2 | Linux 2.2.22 i686 |
ix86-linux2.4 | Debian GNU/Linux 3.0 | Linux 2.4.19 i686 |
$ cd /tmp $ ftp ftp.openpkg.org Connected to ftp.openpkg.org. 220 ftp.openpkg.org OpenPKG Anonymous FTP Server ready. Name (ftp.openpkg.org): anonymous 331 Anonymous login ok, send your complete email address as your password. Password: you@@example.com 230- [...] Welcome to OpenPKG.org! [...] 230 Anonymous access granted, restrictions apply. ftp> bin 200 Type set to I.
Do you need binaries and have a vanilla machine without any previous instance of OpenPKG? Then do this:
ftp> cd release/1.0/BIN ftp> get openpkg-1.0.0-1.0.0.arch-os-cw.sh ftp> get bash-2.05a-1.0.0-arch-os-cw.rpm
Do you need binaries, already bootstrapped your machine and want to upgrade OpenPKG? Then do this:
ftp> cd release/1.0/BIN ftp> get openpkg-1.0.0-1.0.0-arch-os-cw.rpm ftp> get bash-2.05a-1.0.0-arch-os-cw.rpm
Do you want source and have a vanilla machine without any previous instance of OpenPKG? Do this:
ftp> cd release/1.0/SRC ftp> get openpkg-1.0.0-1.0.0.src.sh ftp> get bash-2.05a-1.0.0.src.rpm
Do you want source, already bootstrapped your machine and want to upgrade OpenPKG? Do this:
ftp> cd release/1.0/SRC ftp> get openpkg-1.0.0-1.0.0.src.rpm ftp> get bash-2.05a-1.0.0.src.rpm
ftp> bye 221 Goodbye.If you preferred source we have to prepare the arch-os-cw bootstrap script and build the bootstrap RPM package. This guide assumes that you create your new cool world below /cw using the to-be-created user "cw" and group "cw" and thus stick with that default. OpenPKG does not force you to do that.
$ sh openpkg-1.0.0-1.0.0.src.sh --prefix=/cw --user=cw --group=cwRemember the binary download options above? We now have essentially the same files available. Upgraders do not have the arch-os-cw bootstrap script. They don't need it anyway as the already bootstrapped.
$ ls openpkg* openpkg-1.0.0-1.0.0.arch-os-cw.rpm openpkg-1.0.0-1.0.0.arch-os-cw.sh openpkg-1.0.0-1.0.0.src.rpmIf you're upgrading from source you have to build the binary now.
$ /cw/bin/rpm --rebuild openpkg-1.0.0-1.0.0.src.rpmNow the remaining tasks do real installation work and require root privileges.
$ su \#Unless you're upgrading execute the bootstrap script now.
\# sh openpkg-1.0.0-1.0.0.arch-os-cw.shNow to upgrade you just have to install OpenPKG as a OpenPKG package. This was already part of the previous bootstrap script so if you did it you don't have to do the OpenPKG upgrade installation. Otherwise execute the upgrade command.
\# /cw/bin/rpm -Uvh openpkg-1.0.0-1.0.0.arch-os-cw.rpmrelease root priviledges. d62 1 a62 1 and --nodeps and add (one of) them to the command line listed above. d64 8 a71 9
\# exit $READY! No matter if you build from source or binary, had a vanilla system or did an upgrade, the downloaded version of OpenPKG is installed, up and running. Think how short this instructions would have been if we'd coverd just one of all those cases. d75 2 a76 2 So now head for the bash installation. We already downloaded the bash RPM package before. a77 15 If you preferred source ...
$ /cw/bin/rpm --rebuild bash-2.05a-1.0.0.src.rpmNow you have the binary, either just built or download previously. Install it. If you build the binary it is located in /cw/RPM/PKG. Use the correct path in the command listed below.
$ su \# /cw/bin/rpm -Uvh /cw/RPM/PKG/bash-2.05a-arch-os-cw.rpm \# exitDONE! d103 74 a176 1 see Package Repository @ 1.8 log @cleanups @ text @d46 1 a46 1 $ which gcc cc || echo "you don't have a compiler, so must use binaries" d71 1 a71 4
Do you need binaries and have a vanilla machine without any previous instance of OpenPKG? Then do this: d75 1 d78 1 a78 4
Do you need binaries, already bootstrapped your machine and want to upgrade OpenPKG? Then do this: d84 2 a85 1 Do you want source and have a vanilla machine without any previous instance of OpenPKG? Do this: d91 2 a92 1 Do you want source, already bootstrapped your machine and want to upgrade OpenPKG? Do this: d95 1 a95 1 ftp> get openpkg-1.0.0-1.0.0.rpm d98 2 d112 1 a112 1 Remember the binary download options above? We're now have essentially the d147 10 d191 19 d211 1 @ 1.7 log @fixed URLs @ text @d6 9 a14 7 This tutorial guides you on your way into the cool world of OpenPKG showing you how to bootstrap OpenPKG and install bash as an example package. For more details about the commands being used here see the Quick Reference or refer to the OpenPKG Handbook to dive deeper or take off and have a look at the Slideset for a birds' eye view. d18 1 a18 1 Ensure your system is running one of the supported platforms: d24 1 a24 2
So, on non-C&W machines one would usually use perhaps /sw (for "software") instead, of course. It is just important that the path does not conflict with an area where the operating system vendor already placed files (like /opt under Solaris, /usr/local under FreeBSD, etc). Additionally the software packages are designed to also work for underpriviledged situations where no root (uid 0) access exists. Then the root directory is usually a sub-directory of a regular user's home directory, like /home/foo/sw.
Additionally, there is a /cw/local area in analogon to /usr/local, which obviously contains machine-local stuff, i.e., software packages which are only interesting for the local machine and which were installed manually. So, this area is intentionally not managed by RPM. Nevertheless it also slightly resembles the layout of /usr, that is /cw/local contains the sub-directories bin, etc, include, info, lib, libexec, man and sbin. The directories libexec, share and var are intentionally missing there for reasons explained later.
This is the required prerequisite...
If this is the case, perform the following steps:
$ sh openpkg-0.9-N.src.sh --prefix=/cw [--user=cw] [--group=cw]\The user and group you specify are the uid/gid which will own the hierarchy. If left out, the current uid/gid of the caller is used.
Keep in mind that until now access to the real target directory /cw was still NOT required. Nothing was actually touched on the system, only three other files were rolled as the result:
So, to finally create the /cw hierarchy and link it into the system (by creating the owner uid/gid, by activating ts irc scripts and its cron jobs), execute (as root if you used --user/--group options before):
$ sh openpkg-0.9-N.arch-os-id.sh
This is the situation..
If this is the case, perform the following steps:
$ sh openpkg-0.9-N.arch-os-id.sh
After installing the RPM binary bootstrap package, the /cw filesystem hierarchy looks exactly like this:
+-Basenames |-Conflictname |-Group +-README |-Name | +-DB/------|-Packages | |-PKG/ |-Providename |-RPM/----|-SRC/ |-Requirename | +-TMP/ +-Triggername | |-bin/----+-rpm | +-rpm2cpio |-sbin/---+-lsync | +-rpmtool | | +-rc |-etc/----|-rc.env +-pubring.gpg | |-rc.d/ |-rpmdev.mk | +-rpm/-----|-rpmmacros | +-rpmrc | | +-find-provides | |-find-requires | |-macros | |-rpm | |-rpmb | |-rpmdb |-lib/----+-rpm/-----|-rpme | |-rpmi | +-man1/ |-rpmk | |-man2/ |-rpmpopt-4.0 | |-man3/ |-rpmq /cw/-| |-man4/ |-rpmt | |-man5/ |-rpmu |-man/----|-man6/ +-rpmv | |-man7/ | +-man8/----+-lsync.8 | |-rpm.8 |-include/ |-rpm2cpio.8 |-info/ +-rpmtool.8 |-libexec/ |-share/ |-var/ | +-README | |-PKG/ | |-bin/ +-man1/ +-local/--|-sbin/ |-man2/ |-etc/ |-man3/ |-include/ |-man4/ |-info/ |-man5/ |-lib/ |-man6/ +-man/-----|-man7/ +-man8/As you can see, it's the directory structure described above plus the first package (RPM) already installed. Additionally you can see that under /cw/RPM/ an RPM-specific area exists. There is the RPM database, that is, the whole filesystem hierarchy is self-contained because it contains its own database and packaging tool.
$ rpm -qa
(q)uery list of (a)ll installed packages
$ rpm -qi foo
(q)uery (i)nformation about package "foo"
$ rpm -qvl foo
(q)uery (v)erbose file (l)ist of package "foo"
$ rpm -qpi /path/to/foo-X.X-X.XXX-XXXX-XX.rpm
(q)uery (p)package file for (i)nformation
$ rpm -qpvl /path/to/foo-X.X-X.XXX-XXXX-XX.rpm
(q)uery (p)package file for (v)erbose file (l)ist
$ rpm -Uvh /path/to/foo-X.X-X.XXX-XXXX.rpm
smart (u)pgrade while (v)erbosely showing (h)ash characters
$ rpm -V foo
(v)erify integrity of package "foo"
$ rpm -e foo
(e)erase package "foo"
For more details on the really sophisticated RPM command and its numerious functions, please consult the book Maximum RPM, which we also provide online for your convinience.
Notice that the /path/to/foo-X.X-X.XXX-XXXX.rpm in the above commands can even be a fully-qualified URL with the FTP and HTTP schemes. So, with RPM you even can directly install or upgrade a package from the package repository by prefixing the filename listed there with http://www.openpkg.org/pkg/. For instance to easily upgrade the RPM installation, just run
rpm -Uvh http://www.openpkg.org/pkg/rpm-4.0-X.XXX-XXXXX.rpm
(replace the X characters with the latest release number and the architecture and operation system id) #
# ... @ 1.1 log @Initial revision @ text @d12 1 a12 1 href="doc/maximum-rpm/index.html">Maximum RPM, which we also provide @ 1.1.1.1 log @Import www.openpkg.org website @ text @@