Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
README.upix | 2013-06-11 | 16.5 kB | |
ChangeLog.upix | 2013-06-11 | 15.0 kB | |
upix-template-3.9.3-scripts-upx_1.tar.gz.md5 | 2013-06-11 | 86 Bytes | |
upix-template-3.9.3-scripts-upx_1.tar.gz | 2013-06-11 | 38.9 kB | |
Totals: 4 Items | 70.5 kB | 0 |
Upix - The universal package installer for Linux! Version 3.9.3 Copyright 2011-2013 Magnus Uppman <magnus.uppman@gmail.com> License: GPLv3 or later Project page: https://sourceforge.net/projects/upix/ ---------------------------- Introduction: ------------- Upix is a source software management and packaging system. It is also a great tool (IMHO) 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. 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 ---------------------------- 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. The applications are installed/uninstalled by scripts which are distributed together 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. No automatic dependency check (dependency hell anyone? Not today, thanks). The variable DEPS_UPX can optionally contain a list of dependencies for the application. Flexibility: --------------- The root file system can be made to contain mostly links to files in e.g. /apps/games and /apps/utils. This means that the root filesystem can be kept relatively small. The main application directories e.g. /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. Different versions (or builds) of the same application can coexist. 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 (this one builds GNU Midnight Commander): anv1@localhost:/upix/apps/mc-4.6.1$ cat recipe.sh #!/bin/sh # See common.sh for default values and more info. # Application specific 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 RUN_UPX= DEPS_UPX= TERMINAL_UPX=true CATEGORY_UPX= # Build options BUILD_UPX= BUILD_TYPE_UPX=gnu SOURCE_TYPE_UPX= EXTRA_CONFIGURE_OPTIONS_UPX= ARCH_UPX= EXTRA_BUILD_DIR_UPX= APP_PREFIX_UPX= # Other options MODE_UPX=copy_files DEBUG_UPX=false OVERWRITE_UPX= # Linux kernel specific options LOCAL_VERSION_UPX= 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 the desktop file mc.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 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 the desktop file myprog.desktop. Or the traditional way if symlinks or files exists in the root filesystem: /usr/bin/myprog 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. 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). A directory for bundled appdirs (bundle). Information about the Upix package system (upix). setup.sh (The main user interface) run.sh (Runs the application) recipe.sh (Application data) PROGRAM-VERSION.info (A dump of all variables when compile.sh was run) anv1@localhost:/upix/apps/mc-4.6.1$ ll totalt 60 drwxr-xr-x 9 root root 4096 2011-10-03 11:34 ./ drwxrwxrwx 51 root root 12288 2011-10-03 11:35 ../ drwxr-xr-x 3 root root 4096 2011-10-03 11:33 build/ drwxr-xr-x 2 root root 4096 2011-10-03 11:33 bundle/ -rw-r--r-- 1 root root 1012 2011-10-03 11:34 mc-4.6.1.info -rw-r--r-- 1 root root 398 2011-10-03 11:34 mc.desktop lrwxrwxrwx 1 root root 17 2011-10-03 11:33 recipe.sh -> scripts/recipe.sh -rwxr-xr-x 1 root root 607 2011-10-03 11:33 run.sh* drwxr-xr-x 3 root root 4096 2011-10-03 11:33 scripts/ -rwxr-xr-x 1 root root 1480 2011-10-03 11:33 setup.sh* drwxr-xr-x 2 root root 4096 2011-10-03 11:33 source/ drwxr-xr-x 3 root root 4096 2011-10-03 11:34 system/ drwxr-xr-x 2 root root 4096 2011-10-03 11:33 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. anv1@localhost:/gnuppix/system/upix-template-3.9.1$ ls -lR scripts/ scripts/: totalt 124 -rwxrwxrwx 1 anv1 users 609 okt 3 12:14 app_build.sh* -rwxrwxrwx 1 anv1 users 538 okt 3 12:14 app_clean.sh* -rwxrwxrwx 1 anv1 users 901 okt 3 12:11 app_install.sh* -rwxrwxrwx 1 anv1 users 863 okt 3 12:11 app_uninstall.sh* -rwxrwxrwx 1 anv1 users 334 okt 3 12:14 batch_newpkg.sh* -rwxrwxrwx 1 anv1 users 457 okt 3 12:14 build_bundle.sh* -rwxrwxrwx 1 anv1 users 4065 okt 3 12:14 build_sw_pkg.sh* -rwxrwxrwx 1 anv1 users 1216 feb 5 17:42 check_vars.sh* -rwxrwxrwx 1 anv1 users 7306 feb 5 17:42 common.sh* -rwxrwxrwx 1 anv1 users 2246 okt 3 12:14 compile.sh* -rwxrwxrwx 1 anv1 users 2665 okt 3 12:14 conv_tgz.sh* -rwxrwxrwx 1 anv1 users 1701 okt 3 12:14 create_desktop.sh* -rwxrwxrwx 1 anv1 users 207 okt 3 12:14 debug.sh* -rwxrwxrwx 1 anv1 users 3249 feb 5 21:44 delete_dirs_and_delete_symlinks_files.sh* -rwxr-xr-x 1 anv1 users 596 okt 3 12:14 desktop_install.sh* -rwxr-xr-x 1 anv1 users 602 okt 3 12:14 desktop_uninstall.sh* -rwxr-xr-x 1 anv1 users 402 okt 3 12:14 install_bundle.sh* -rwxrwxrwx 1 anv1 users 1278 feb 5 17:42 install_symlinks.sh* -rwxrwxrwx 1 anv1 users 3437 okt 3 12:14 local_install.sh* -rwxrwxrwx 1 anv1 users 3519 feb 5 22:13 newpkg.sh* -rwxrwxrwx 1 anv1 users 2735 feb 5 22:12 newprog.sh* -rwxrwxrwx 1 anv1 users 326 okt 3 12:14 post_install.sh* -rwxr-xr-x 1 anv1 users 324 okt 3 12:14 pre_install.sh* -rwxrwxrwx 1 anv1 users 2712 okt 3 12:14 prepare.sh* -rwxrwxrwx 1 anv1 users 571 feb 5 21:18 recipe.sh* -rwxrwxrwx 1 anv1 users 7732 feb 5 22:02 symlink_files_and_make_dirs.sh* -rwxrwxrwx 1 anv1 users 2753 feb 5 22:29 test.sh* -rwxr-xr-x 1 anv1 users 366 okt 3 12:14 uninstall_bundle.sh* -rwxrwxrwx 1 anv1 users 1440 feb 5 17:44 uninstall_symlinks.sh* 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 buildscripts (a temporary directory is used when creating the package: /tmp/lbreakout2-2.6beta-7): cd /upix/apps rm -rf /tmp/lbreakout2-2.6beta-7 cp -a /upix/apps/lbreakout2-2.6beta-7 /tmp/lbreakout2-2.6beta-7 rm -rf /tmp/lbreakout2-2.6beta-7/system/* rm -rf /tmp/lbreakout2-2.6beta-7/source/* rm -rf /tmp/lbreakout2-2.6beta-7/build/* rm -rf /tmp/lbreakout2-2.6beta-7/bundle/* rm -f /tmp/lbreakout2-2.6beta-7/build/*.info rm -f /tmp/lbreakout2-2.6beta-7/build/*.desktop cd /tmp tar -cvfz lbreakout2-2.6beta-7-scripts_upx_1.tar.gz lbreakout2-2.6beta-7