Download Latest Version upix-template-3.9.4.tar.gz (32.7 kB)
Email in envelope

Get an email when there's a new version of Upix - The universal package installer

Name Modified Size InfoDownloads / Week
Parent folder
README.upix 2010-10-07 17.0 kB
ChangeLog.upix 2010-10-07 11.9 kB
upix-template-3.8.3-scripts-upx_1.tar.gz 2010-10-07 25.0 kB
upix-template-3.8.3-scripts-upx_1.tar.gz.md5 2010-10-07 86 Bytes
Totals: 4 Items   53.9 kB 0
Upix - Universal package manager for *nix systems!
Version 3.8.3

Author: Magnus Uppman
<magnus_uppman@hotmail.com>

License: GPLv2 or later

----------------------------

Introduction:
-------------

Upix is a source software management and packaging system. It is also a great (IMHO) tool for creating Slackware packages.
The concepts are borrowed from Rox (0install), Stow, Slackware's SlackBuilds and Gobolinux.

Programs are built and installed to any location and symlinked/hardlinked (or copied) in place for compliance with the FHS and LSB if neccessary. 
A program can also be compiled in a Gobolinux fashion and run directly from the AppDir without the need for any links.

An application (program) consists of a single directory - "AppDir" with all files (As in Gobolinux and Rox).
The AppDir also contains scripts and source files.

Easy to find out where a file belongs and what it is.
The example below shows the executable file mc in GNU Midnight Commander:

/upix/apps/mc-4.6.1/system/usr/bin/mc

Project page:
https://sourceforge.net/projects/upix/

----------------------------

Purpose:
-----------

This project aims to help with flexible and scalable software installations.

Build scripts, binary/source package, "AppDir" and package manager all in one.

Advantages over similar solutions:
-------------------------------------

An application directory can be copied directly to another system without having to do any installation at all! 

The applications are installed/uninstalled by scripts which are distributed with the program.
No external package manager is needed.

Simple scripts which only need small modifications for different applications.
The scripts can be totally rewritten and customized for a specific application.

Reduced risk for incompatibilities (if a new version of upix comes along) since the scripts are distributed together with the application. 
An application which has been installed with a set of scripts is always guaranteed to be compatible with the same set of scripts.

All programs are stored in any location of your choice. E.g. ~/apps/multimedia.

Easy to distribute and maintain programs as simple tar.gz archives.

Flexibility:
---------------

The root file system can be made to contain mostly links to files in e.g. /upix/apps/multimedia and /upix/apps/utils.
This means that the root filesystem can be kept relatively small.

The main application directories e.g. /upix/apps/utils can be mounted or symlinked from another file system.
Easy to move applications around between different systems or within the same system.

Applications can be made distribution independent in that any differences between the distributions can be hidden by the scripts.

Flexible to distribute programs - can be binary only, source only, scripts only or a combination.

Source based package management:
-------------------------------

Source based packages, optional to include binary files.

All information needed to build the application is stored in the package. Can also contain examples of configuration files and HowTo's.

A recipe file (recipe.sh) with application specific data is used for easy configuration. 
Most values can be left empty, they are replaced with defaults stored in another file (common.sh).

Typical recipe (recipe.sh):

#!/bin/sh
# See common.sh for default values and more info.

# Application specific options 
# Mandatory options
APP_UPX=mc
VERSION_UPX=4.6.1
DESCR_UPX=""
URL_MAIN_FILE_UPX=http://www.ibiblio.org/pub/Linux/utils/file/managers/mc/mc-4.6.1.tar.gz
APP_DIR_UPX=  # Empty means relocatable. This option must not be commented out.
# Non mandatory options
# RUN_UPX=
# DEPS_UPX=""
# TERMINAL_UPX=
# ICON_UPX=
# MENU_UPX=
# CATEGORY_UPX=

# Build options
# BUILD_UPX=
# BUILD_TYPE_UPX=
# SOURCE_TYPE_UPX=
# GOBO_UPX=
# CONFIGURE_OPTIONS_UPX=""
# ARCH_UPX=
# EXTRA_BUILD_DIR_UPX=
# APP_PREFIX_UPX=

# Other options
 MODE_UPX=symlink_all
# DEBUG_UPX=
# OVERWRITE_UPX=
# SW_VERSION=
# 
# # Linux kernel specific options
# LOCAL_VERSION_UPX=


Different versions (or builds) of the same application can coexist. The version which has been installed (with symlinks or copied files) is active. Several versions can be active simultaneously if compiled in a Gobolinux fashion.

No automatic dependency check (dependency hell anyone? Not today, thanks). The variable DEPS_UPX can optionally contain a list of dependencies for the application.

Basic usage:
----------------------------
----------------------------

Install Upix software package, e.g mc-4.6.1-scripts-upx_1.tar.gz
----------------------------

Unpack the AppDir:

tar xzvf mc-4.6.1-scripts-upx_1.tar.gz
cd mc-4.6.1

Use the helper scripts "setup.sh" and "run.sh" in the topdir of the application directory:
-------------------------------------------
Fetch source, compile and copy the compiled files to the system directory in the AppDir:

./setup.sh -b

Install symlinks or files to the root filesystem:

sudo ./setup.sh -i

Run the app:

./run.sh

You can also run the app by clicking on mc-4.6.1-run.desktop!

Or the traditional way if symlinks or files exists in the root filesystem:
/usr/bin/mc

Uninstall symlinks or files from the root filesystem:

sudo ./setup.sh -u

Run the scripts directly from the "scripts" directory:
------------------------------------------------------

cd mc-4.6.1/scripts

Fetch, unpack and possibly patch the source:
./prepare.sh

Compile:
./compile.sh

Copy the compiled files to the system directory in the AppDir:
./local_install.sh

Set special permissions:
./set_permissions.sh

Install symlinks or files to the root filesystem:
sudo ./install_symlinks.sh

Do post installation system configuration:
sudo ./post_install.sh

Uninstall symlinks or files from the root filesystem:
sudo ./uninstall_symlinks.sh

Add desktop icon and menu entry:
./desktop_install.sh

Remove desktop icon and menu entry:
./desktop_uninstall.sh

Install self-extracting package:
--------------------------------
Run the builtin self-extracting script:
sh mc-4.6.1-scripts-upx_1.sh

Create your own Upix application from the template application.
-----------------------------------------
1. Create for example /upix/apps/utils if you want to store your applications there.

mkdir -p /upix/apps/utils

2. Download the latest application directory (AppDir) template and unpack it.

cp upix-template-VERSION-scripts-upx_1.tar.gz /upix/apps/utils
cd /upix/apps/utils

Extract with tar:

tar -xzvf upix-template-VERSION-scripts-upx_1.tar.gz

Or if self-extracting archive:

sh upix-template-VERSION-scripts-upx_1.sh

3. Create the AppDir for your application by copying the upix-template. (e.g. myprog, version 0.63)

cp -r upix-template-VERSION myprog-0.63

Edit the file recipe.sh 

See comments in common.sh for possible values and details for the recipe. 

4. Fetch source, compile and copy compiled files to the system directory in the AppDir:

./setup.sh -b

5. Install (possibly optional) symlinks or files to the root filesystem:

sudo ./setup.sh -i

6. Run the app:

./run.sh

You can also run the app by clicking on mc-4.6.1-run.desktop!

Or the traditional way if symlinks or files exists in the root filesystem:
/usr/bin/mc

Uninstall (possibly optional) symlinks or files from the root filesystem.

sudo ./setup.sh -u


Advanced usage:
----------------------------
----------------------------

Converts a Slackware package into a Upix AppDir.
------------------------------------------------
Should usually be run as a regular user. Some packages might need root access.

Example usage by using a template appdir:
cd /upix/apps/upix-template-3.7.4

Convert package using default values in common.sh:
./setup.sh -x /mnt/sda4/zenwalk-pkgs/contrib/gtkglext-1.2.0-i486-48.1.tgz

Convert package and change the parent dir (for the new AppDir) to ~/upix/apps/usb-apps:
./setup.sh -x /mnt/sda4/zenwalk-pkgs/contrib/gtkglext-1.2.0-i486-48.1.tgz -o ~/upix/apps/usb-apps

Batch functionality, convert all packages in a given directory:
./setup.sh -x /mnt/cdrom/games

Automatically copy the upix-template and creates a new application directory.
-------------------------------------------------------------------------------
Should be run as a regular user.

Example usage:

cd /upix/apps/upix-template-3.7.4/scripts

Create the new AppDir mc-4.61:
NEW_APP_UPX=mc NEW_VERSION_UPX=4.6.1 NEW_MAIN_FILE_UPX=mc-4.6.1.tar.gz NEW_URL_MAIN_FILE_UPX=http://www.ibiblio.org/pub/Linux/utils/file/managers/mc/mc-4.6.1.tar.gz ./newprog.sh

Create a .desktop file which can be used to run the application.
-----------------------------------------------------------------
Should be run as a regular user.

Example usage:
cd myprog-0.63/scripts
./create_desktop.sh

Create Upix software "package".
-------------------------
Packages are created in the directory specified by the variable REPO. (default set to value in CREATE_APPS_DIR_UPX).
Must be run as root.

Example usage:

cd myprog-0.63
./setup.sh -n scripts

Changing some values from default:
SELF_EXTRACT=true ./setup.sh -n scripts

More details...

"-n type" defines the package contents.

Possible values for the type variable:

raw
All files. The name of the resulting package will be the program name and version followed by -$PKG_TYPE-$BUILD_UPX. E.g. lbreakout2-2.6beta-7-raw-upx_1.tar.gz.

distrib
Scripts, source archives, and files in "system". 
The name of the resulting package will be the program name and version followed by -$ARCH_UPX-$BUILD_UPX (value taken from common.sh). E.g. lbreakout2-2.6beta-7-i486-upx_1.tar.gz.

scripts
Scripts only. The name of the resulting package will be the program name and version followed by -$PKG_TYPE-$BUILD_UPX. E.g. lbreakout2-2.6beta-7-scripts-upx_1.tar.gz

source
Buildscript and source archive(s). The name of the resulting package will be the program name and version followed by -$PKG_TYPE-$BUILD_UPX. E.g. lbreakout2-2.6beta-7-source-upx_1.tar.gz

Additional parameters to setup.sh can be given as shell variables.

Example usage:

cd /upix/apps/tar-16.1

Create the package tar-16.1-scripts-upx_1.tar.gz:

./setup.sh -n scripts

Create the package tar-16.1-raw-upx_1.tar.gz:

./setup.sh -n raw

Create the package tar-16.1-i486-upx_1.tar.gz (assuming ARCH_UPX=i486 in common.sh):

./setup.sh -n distrib

Create the package tar-16.1-source-upx_1.tar.gz:

./setup.sh -n source

Create the self-extracting package tar-16.1-i486-upx_1.sh (assuming ARCH_UPX=i486 in common.sh):

SELF_EXTRACT=true ./setup.sh -n distrib

Create Slackware package of the AppDir
--------------------------------------

Packages are created in the directory specified by the variable REPO_SW. (default set to value in CREATE_APPS_DIR_UPX).
The AppDir will be packaged as a source-only Upix package and included into the Slackware package. 
The files in the system directory will be included in the package and installed to the root file system when the package is installed.

AppDirs with GOBO_UPX=true will be packaged as a raw Upix package before it goes into the Slackware package. 
Nothing in the system directory will be included.

Example usage:

cd /upix/apps/tar-16.1

Build the program:
./setup.sh -b

Package it as a Slackware package (must be run as root):
sudo ./setup.sh -s


Structure
----------------------------
----------------------------

Upix system directory
-----------------------
Can for example be /upix or ~/upix if you don't have root access.

user1@upixlive:/upix/apps/upix-template-3.7.2$ ls -l /upix/
total 2
drwxrwxrwt 12 root root 1896 2009-02-02 09:03 apps/


Application directory(ies). Each holds one application.
----------------------------

Can for example be /upix/multimedia/kaffeine-0.8.7 or ~/upix/multimedia/kaffeine-0.8.7 if you don't have root access.

user1@upixlive:/upix/apps$ ls -l /upix/apps/
drwxr-xr-x 8 user1 users      480 2009-02-01 22:59 mc-4.6.1/
drwxr-xr-x 8 user1 users      480 2009-01-28 13:29 upix-template-3.7.1/
drwxr-xr-x 8 user1 users      448 2009-02-01 11:25 upix-template-3.7.2/

An application directory contains:

Source archives (source)
Installed files (system)
Build and install scripts (scripts). 
A build directory (build).
Information about the Upix package system (upix).
setup.sh (The main user interface)
run.sh (Runs the application)
recipe.sh (Application data)

anv1@localhost:/upix/upix-template-3.8.3$ ll
totalt 36
drwxr-xr-x 7 anv1 users 4096 2010-10-07 10:32 ./
drwxrwxrwx 6 root root  4096 2010-10-07 10:20 ../
drwxr-xr-x 2 anv1 users 4096 2010-10-07 10:32 build/
lrwxrwxrwx 1 anv1 users   17 2010-08-20 11:08 recipe.sh -> scripts/recipe.sh*
-rwxr-xr-x 1 anv1 users  742 2010-10-02 09:28 run.sh*
drwxr-xr-x 3 anv1 users 4096 2010-10-02 14:32 scripts/
-rwxrwxrwx 1 anv1 users 2053 2010-10-07 10:06 setup.sh*
drwxr-xr-x 2 anv1 users 4096 2010-10-07 10:37 source/
drwxr-xr-x 2 anv1 users 4096 2010-04-01 11:06 system/
drwxr-xr-x 2 anv1 users 4096 2010-10-02 09:22 upix/


The scripts directory
-------------------
Contains the main scripts.
All scripts should be run from the scripts directory, exceptions are the app_*.sh scripts which can be run from any directory and even from a file GUI manager.

The scripts/old directory can be used to store backups of the orginal scripts.

anv1@localhost:/upix/upix-template-3.8.3$ ls -lR scripts/
scripts/:
totalt 140
-rwxrwxrwx 1 anv1 users  614 2010-10-02 14:39 app_build.sh*
-rwxrwxrwx 1 anv1 users  548 2010-03-02 09:52 app_clean.sh*
-rwxrwxrwx 1 anv1 users  860 2010-10-02 14:32 app_install.sh*
-rwxrwxrwx 1 anv1 users  847 2010-10-02 14:35 app_uninstall.sh*
-rwxrwxrwx 1 anv1 users  345 2010-08-30 14:31 batch_newpkg.sh*
-rwxrwxrwx 1 root root   363 2010-10-07 10:07 build_bundle.sh*
-rwxrwxrwx 1 anv1 users 4434 2010-08-30 14:31 build_sw_pkg.sh*
-rwxrwxrwx 1 anv1 users 1271 2010-08-30 14:31 check_vars.sh*
-rwxrwxrwx 1 anv1 users 6915 2010-10-07 10:34 common.sh*
-rwxrwxrwx 1 anv1 users 2761 2010-08-30 14:31 compile.sh*
-rwxrwxrwx 1 anv1 users 2676 2010-08-30 14:31 conv_tgz.sh*
-rwxrwxrwx 1 anv1 users 1588 2010-08-30 14:31 create_desktop.sh*
-rwxrwxrwx 1 anv1 users  217 2010-03-01 07:00 debug.sh*
-rwxrwxrwx 1 anv1 users 2864 2010-08-30 14:31 delete_dirs_and_delete_symlinks_files.sh*
-rwxrwxrwx 1 anv1 users 1121 2010-08-30 14:31 delete_symlinks_dirs_and_files.sh*
-rwxrwxrwx 1 anv1 users  759 2010-08-30 14:31 desktop_install.sh*
-rwxrwxrwx 1 anv1 users  764 2010-08-30 14:31 desktop_uninstall.sh*
-rwxrwxrwx 1 anv1 users 1426 2010-08-30 14:31 install_symlinks.sh*
-rwxrwxrwx 1 anv1 users 3059 2010-08-30 14:31 local_install.sh*
-rwxrwxrwx 1 anv1 users 3575 2010-10-07 10:17 newpkg.sh*
-rwxrwxrwx 1 anv1 users 2894 2010-08-30 14:31 newprog.sh*
drwxrwxrwx 2 anv1 users 4096 2010-08-25 20:51 old/
-rwxrwxrwx 1 anv1 users  336 2010-08-30 14:31 post_install.sh*
-rwxrwxrwx 1 anv1 users 2464 2010-08-30 14:31 prepare.sh*
-rwxrwxrwx 1 anv1 users  669 2010-10-07 10:36 recipe.sh*
-rwxr-xr-x 1 anv1 users  377 2010-10-07 10:15 set_permissions.sh*
-rwxrwxrwx 1 anv1 users 4604 2010-08-30 14:31 symlink_dirs_and_files.sh*
-rwxrwxrwx 1 anv1 users 7509 2010-08-30 14:31 symlink_files_and_make_dirs.sh*
-rwxrwxrwx 1 anv1 users 2831 2010-10-07 10:36 test.sh*
-rwxr-xr-x 1 root root   157 2010-10-02 13:37 uninstall_bundle.sh*
-rwxrwxrwx 1 anv1 users 1630 2010-08-30 14:31 uninstall_symlinks.sh*

scripts/old:
totalt 0


source
--------
Contains source archives and other files, for example configuration files and patches.
----------------------------

user1@darkstar:~/upix/apps/mc-4.6.1$ ls ~/upix/apps/wicd-1.5.5/source/
rc.local*  wicd-1.5.5.tar.gz  wicd-r571-fix-varlogwicd-error.patch


system
---------
Contains installed (binary) files.

----------------------------
ls /upix/apps/mc-4.6.1/system/

usr/

ls /upix/apps/mc-4.6.1/system/usr

bin/  lib/  man/  sbin/  share/


build
---------
Build directory
---------------------------

ls /upix/apps/mc-4.6.1/build/mc-4.6.1/
ABOUT-NLS  FAQ           MAINTAINERS  NEWS        acinclude.m4     config/      config.status*  edit/  mc.qpg      pkginfo     prototype.in  syntax/
AUTHORS    HACKING       Makefile     README      aclocal.m4       config.h     configure*      intl/  mc.qpg.in   pkginfo.in  slang/        vfs/
COPYING    INSTALL       Makefile.am  README.QNX  build-glib1.sh*  config.h.in  configure.ac    lib/   mc.spec     po/         src/
ChangeLog  INSTALL.FAST  Makefile.in  TODO        build-glib2.sh*  config.log   doc/            m4/    mc.spec.in  prototype   stamp-h1


Special tricks
----------------------------
----------------------------

Manually create a "package"
----------------------------
With everything:

cd /upix/apps

tar -cvfz lbreakout2-2.6beta-7-raw-upx_1.tar.gz lbreakout2-2.6beta-7

With only buildscript:

cd /upix/apps

rm -r /tmp/lbreakout2-2.6beta-7

cp -r /upix/apps/lbreakout2-2.6beta-7 /tmp/lbreakout2-2.6beta-7

rm -r /tmp/lbreakout2-2.6beta-7/system/*

rm -r /tmp/lbreakout2-2.6beta-7/source/*

rm -r /tmp/lbreakout2-2.6beta-7/build/*

cd /tmp

tar -cvfz lbreakout2-2.6beta-7-scripts_upx_1.tar.gz lbreakout2-2.6beta-7



Source: README.upix, updated 2010-10-07