Mon, 28 Jan 2013 17:37:18 +0100
Correct socket error reporting improvement with IPv6 portable code,
after helpful recommendation by Saúl Ibarra Corretgé on OSips devlist.
michael@13 | 1 | ## |
michael@13 | 2 | ## openpkg -- OpenPKG Tool Chain |
michael@428 | 3 | ## Copyright (c) 2000-2012 OpenPKG GmbH <http://openpkg.com/> |
michael@13 | 4 | ## |
michael@428 | 5 | ## This software is property of the OpenPKG GmbH, DE MUC HRB 160208. |
michael@428 | 6 | ## All rights reserved. Licenses which grant limited permission to use, |
michael@428 | 7 | ## copy, modify and distribute this software are available from the |
michael@428 | 8 | ## OpenPKG GmbH. |
michael@13 | 9 | ## |
michael@428 | 10 | ## THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED |
michael@13 | 11 | ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
michael@13 | 12 | ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
michael@13 | 13 | ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
michael@13 | 14 | ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
michael@13 | 15 | ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
michael@13 | 16 | ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
michael@13 | 17 | ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
michael@13 | 18 | ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
michael@13 | 19 | ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
michael@13 | 20 | ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
michael@13 | 21 | ## SUCH DAMAGE. |
michael@13 | 22 | ## |
michael@13 | 23 | ## openpkg.pod: Minimum Execution Frontend (Language: Perl POD) |
michael@13 | 24 | ## |
michael@13 | 25 | |
michael@13 | 26 | =pod |
michael@13 | 27 | |
michael@13 | 28 | =head1 NAME |
michael@13 | 29 | |
michael@428 | 30 | B<OpenPKG> -- Cross-Platform Unix Software Packaging |
michael@13 | 31 | |
michael@13 | 32 | =head1 SYNOPSIS |
michael@13 | 33 | |
michael@13 | 34 | $ B<openpkg> [I<opt> ...] I<cmd> [I<cmd_opt> ...] [I<cmd_arg> ...] |
michael@13 | 35 | |
michael@13 | 36 | $ B<openpkg> B<man> I<cmd> |
michael@13 | 37 | |
michael@428 | 38 | =head1 DESCRIPTION |
michael@13 | 39 | |
michael@13 | 40 | OpenPKG is the world leading instrument for deployment and maintenance |
michael@13 | 41 | of Open Source software when administration crosses Unix platform |
michael@13 | 42 | boundaries. The OpenPKG project is a collaboration effort with the |
michael@13 | 43 | goal of creating and maintaining portable and easy to install software |
michael@13 | 44 | packages for use on the major Unix server platforms. |
michael@13 | 45 | |
michael@13 | 46 | The unique OpenPKG architecture leverages proven technologies like |
michael@13 | 47 | Red Hat Package Manager (RPM) to establish a unified administration |
michael@13 | 48 | environment, independent of the underlying operating system. OpenPKG |
michael@13 | 49 | is completely self-contained and does not even need a preinstallation |
michael@13 | 50 | of RPM. Instead, RPM is provided as an OpenPKG RPM package itself plus |
michael@13 | 51 | a tricky bootstrapping procedure in order to allow one to create from |
michael@13 | 52 | scratch the initial state of the whole OpenPKG software packaging |
michael@13 | 53 | system. |
michael@13 | 54 | |
michael@428 | 55 | =head1 TUTORIAL |
michael@428 | 56 | |
michael@428 | 57 | =over 3 |
michael@428 | 58 | |
michael@428 | 59 | =item B<1. System Preparation (optional)> |
michael@428 | 60 | |
michael@428 | 61 | Before you start, the Unix system optionally should be prepared. Here |
michael@428 | 62 | especially the necessary disk space requirements of OpenPKG have to be |
michael@428 | 63 | taken into account. |
michael@428 | 64 | |
michael@428 | 65 | # optionally direct /openpkg to at least 150MB free disk space: |
michael@428 | 66 | $ mkdir /storage/openpkg |
michael@428 | 67 | $ ln -s /storage/openpkg /openpkg |
michael@428 | 68 | |
michael@428 | 69 | # optionally direct temp-directory to at least 250MB free disk space: |
michael@428 | 70 | $ TMPDIR=/var/tmp |
michael@428 | 71 | $ export TMPDIR |
michael@428 | 72 | |
michael@428 | 73 | # switch to temporary directory: |
michael@428 | 74 | $ cd $TMPDIR |
michael@428 | 75 | |
michael@428 | 76 | =item B<2. Instance Bootstrapping> |
michael@428 | 77 | |
michael@428 | 78 | The next step is to bootstrap the OpenPKG instance. Here we are using |
michael@428 | 79 | the standard /openpkg filesystem prefix. An arbitrary prefix can be |
michael@428 | 80 | used as long as at least the "Bootstrap From Source" approach is used. |
michael@428 | 81 | |
michael@428 | 82 | # download bootstrap source shell package: |
michael@428 | 83 | $ wget http://openpkg.org/go/download/openpkg.src.sh |
michael@428 | 84 | |
michael@428 | 85 | # build bootstrap binary shell package from source shell package: |
michael@428 | 86 | $ sh openpkg.src.sh \ |
michael@428 | 87 | --prefix=/openpkg --tag=openpkg \ |
michael@428 | 88 | --user=openpkg --group=openpkg \ |
michael@428 | 89 | --tag=openpkg |
michael@428 | 90 | |
michael@428 | 91 | # install bootstrap binary script package: |
michael@428 | 92 | $ sh openpkg-*-*.*-openpkg.sh |
michael@428 | 93 | |
michael@428 | 94 | =item B<3. Software Deployment> |
michael@428 | 95 | |
michael@428 | 96 | Now you can install arbitrary OpenPKG software packages by either using |
michael@428 | 97 | the lower-level OpenPKG RPM command or the higher-level OpenPKG tool |
michael@428 | 98 | chain build command. As a simple illustration example the GNU Bash |
michael@428 | 99 | package of OpenPKG is installed. |
michael@428 | 100 | |
michael@428 | 101 | # build and install GNU Bash: |
michael@428 | 102 | $ /openpkg/bin/openpkg build bash | sh |
michael@428 | 103 | |
michael@428 | 104 | =item B<4. Software Usage> |
michael@428 | 105 | |
michael@428 | 106 | Finally, you can use the deployed software. Either through explicit |
michael@428 | 107 | paths (reasonable if leveraging OpenPKG's multiple-instance feature) or |
michael@428 | 108 | implicitly by merging the OpenPKG instance into the local environment. |
michael@428 | 109 | |
michael@428 | 110 | # explicit usage: |
michael@428 | 111 | $ /openpkg/bin/bash --version |
michael@428 | 112 | |
michael@428 | 113 | # implicit usage (alternatively) |
michael@428 | 114 | $ eval `/openpkg/bin/openpkg rc --eval all env` |
michael@428 | 115 | $ bash --version |
michael@428 | 116 | |
michael@428 | 117 | =item B<5. Go Ahead!> |
michael@428 | 118 | |
michael@428 | 119 | Want to know more now? Please read the manual pages of at least the |
michael@428 | 120 | deployment commands and then proceed by searching and deploying even |
michael@428 | 121 | more software into your OpenPKG instance. |
michael@428 | 122 | |
michael@428 | 123 | # read manual pages: |
michael@428 | 124 | $ /openpkg/bin/openpkg man search |
michael@428 | 125 | $ /openpkg/bin/openpkg man build |
michael@428 | 126 | |
michael@428 | 127 | # search for a package |
michael@428 | 128 | $ /openpkg/bin/openpkg search [-v] <regex> |
michael@428 | 129 | |
michael@428 | 130 | # deploy even more packages |
michael@428 | 131 | $ /openpkg/bin/openpkg build \ |
michael@428 | 132 | [-D[<package1>::]with_<name>] \ |
michael@428 | 133 | [-D[<package2>::]with_<name>] \ |
michael@428 | 134 | <package1> <package2> ... | sh |
michael@428 | 135 | |
michael@428 | 136 | For instance, to install and start an Apache HTTP server with SSL/TLS |
michael@428 | 137 | support you can use: |
michael@428 | 138 | |
michael@428 | 139 | $ /openpkg/bin/openpkg search -v apache | more |
michael@428 | 140 | $ /openpkg/bin/openpkg build -D with_mod_ssl=yes apache | sh |
michael@428 | 141 | $ /openpkg/bin/openpkg rc apache start |
michael@428 | 142 | |
michael@428 | 143 | =item B<6. Cleanup> |
michael@428 | 144 | |
michael@428 | 145 | OpenPKG has not convinced you? Well, it's a pity, but no problem. You |
michael@428 | 146 | can easily get rid of anything you installed at once (both the OpenPKG |
michael@428 | 147 | instance and any of its OpenPKG packages) with the following simple |
michael@428 | 148 | command: |
michael@428 | 149 | |
michael@428 | 150 | $ /openpkg/bin/openpkg rc all stop |
michael@428 | 151 | $ /openpkg/bin/openpkg rpm -e `/openpkg/bin/openpkg rpm -qa` |
michael@428 | 152 | |
michael@428 | 153 | =back |
michael@428 | 154 | |
michael@428 | 155 | =head1 SEE ALSO |
michael@428 | 156 | |
michael@428 | 157 | OpenPKG local documentation can be viewed the command "B<openpkg man> |
michael@428 | 158 | I<cmd>", where I<cmd> is one of the following commands: |
michael@428 | 159 | |
michael@428 | 160 | index OpenPKG package indexing |
michael@428 | 161 | search OpenPKG package searching |
michael@428 | 162 | mirror OpenPKG package mirroring |
michael@428 | 163 | build OpenPKG package building and installing |
michael@428 | 164 | rc OpenPKG run-command facility |
michael@428 | 165 | lsync OpenPKG local area synchronization |
michael@428 | 166 | |
michael@428 | 167 | stack OpenPKG software stack generation |
michael@428 | 168 | makeproxy OpenPKG proxy package generation |
michael@428 | 169 | dev OpenPKG development tool |
michael@428 | 170 | |
michael@428 | 171 | rpm RPM package manager |
michael@428 | 172 | rpm2cpio RPM payload utility |
michael@428 | 173 | rpm-config RPM C API utility |
michael@428 | 174 | rpmtool OpenPKG RPM packaging helper tool |
michael@428 | 175 | |
michael@428 | 176 | license OpenPKG license management |
michael@428 | 177 | release OpenPKG release information |
michael@428 | 178 | register OpenPKG registry client (obsolete) |
michael@428 | 179 | |
michael@428 | 180 | sea Shell Execution Archive tool |
michael@428 | 181 | uuid Universal Unique Identifiers tool |
michael@428 | 182 | |
michael@428 | 183 | Additionally, OpenPKG can be found under the following locations on the |
michael@428 | 184 | Internet: |
michael@428 | 185 | |
michael@428 | 186 | http://openpkg.org/ OpenPKG Project (Distribution) |
michael@428 | 187 | http://openpkg.com/ OpenPKG GmbH (Framework, Support) |
michael@428 | 188 | http://openpkg.net/ OpenPKG Foundation e.V. (Packages) |
michael@428 | 189 | |
michael@13 | 190 | =cut |
michael@13 | 191 |