Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
README | 2010-03-04 | 17.6 kB | |
upix-template-3.7.9-scripts-upx_1.tar.gz.md5 | 2010-03-04 | 86 Bytes | |
upix-template-3.7.9-scripts-upx_1.tar.gz | 2010-03-04 | 25.6 kB | |
Totals: 3 Items | 43.3 kB | 0 |
Upix - Get to the source! Version 3.7.9 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 can be built and installed to any location and later optionally symlinked/hardlinked (or copied) in place for compliance with the FHS and LSB if neccessary. An application consists of a single directory - "AppDir" with installed files (As in Gobolinux and Rox). The AppDir also contains build scripts and source files for the program. An application can be compiled in a Gobolinux fashion (and run directly from the AppDir). 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 as a simple tar.gz archive. Flexibility: --------------- The root file system can be made to contain mostly symlinks 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 - 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: #!/bin/sh # See common.sh for default values and more info. # Application specific options APP_UPX=mc VERSION_UPX=4.6.1 DESCR_UPX= RUN_UPX= URL_MAIN_FILE_UPX=http://www.ibiblio.org/pub/Linux/utils/file/managers/mc/mc-4.6.1.tar.gz DEPS_UPX= TERMINAL_UPX=true ICON_UPX=false MENU_UPX=true CATEGORY_UPX= # Build options BUILD_UPX= BUILD_TYPE_UPX=gnu SOURCE_TYPE_UPX= GOBO_UPX=false CONFIGURE_OPTIONS_UPX= ARCH_UPX= EXTRA_BUILD_DIR_UPX= APP_PREFIX_UPX= # Other options MODE_UPX= DEBUG_UPX=false APP_DIR_UPX= # Empty means relocatable 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. Important dependencies can be included as complete script packages with or without source. 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 appRun.sh in the application directory: ------------------------------------------- Fetch source, compile and copy compiled files to the system directory in the AppDir: ./appRun.sh -b Install (possibly optional) symlinks or files to the root filesystem: sudo ./appRun.sh -i Run the app: ./appRun.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 ./appRun.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 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 Everything else same as above.. Create your own Upix application from a template application. ---------------------------- 1. Create for example /upix/apps/utils if you want to store your applications there. Create a main application directory and make it read-write (with restricted deletion flag set) for all users. sudo -p mkdir /upix/apps/utils sudo chmod a+rwt /upix/apps/utils Could of course be ~/upix/apps/utils (or whatever with or without the restricted deletion flag, your system - your choice!). 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: ./appRun.sh -b 5. Install (possibly optional) symlinks or files to the root filesystem: sudo ./appRun.sh -i 6. Run the app: ./appRun.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 ./appRun.sh -u Advanced usage: ---------------------------- ---------------------------- Converts a Slackware package into a Upix AppDir. ------------------------------------------------ Should usually be run as a regular user. Some packages needs root.. Example usage by using a template appdir: cd /upix/apps/upix-template-3.7.4 Convert package using default values in common.sh: ./appRun.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: ./appRun.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: ./appRun.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). Should be run as a regular user. Example usage: cd myprog-0.63 ./appRun.sh -n scripts Changing some values from default: SELF_EXTRACT=true ./appRun.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 appRun.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: ./appRun.sh -n scripts Create the package tar-16.1-raw-upx_1.tar.gz: ./appRun.sh -n raw Create the package tar-16.1-i486-upx_1.tar.gz (assuming ARCH_UPX=i486 in common.sh): ./appRun.sh -n distrib Create the package tar-16.1-source-upx_1.tar.gz: ./appRun.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 ./appRun.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: ./appRun.sh -b Package it as a Slackware package (must be run as root): sudo ./appRun.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/ drwxr-xr-x 2 root root 152 2009-01-07 15:21 logs/ 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. All application directories should be owned by a normal user. All parent application directories (apps etc.) should be owned by root for greater security and safety. Can be set to read/write for any user and with the restricted deletion flag set (a user can not delete another user's files). E.g. chmod a+rwxt /upix/apps 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/ drwxr-xr-x 8 user1 users 448 2009-02-01 11:27 upix-template-3.7.2pre2/ An application directory contains: Source archives (source) Installed files (system) Build and install scripts (scripts). A build directory (build). appRun.sh (The user interface) user1@localhost:/upix/apps/mc-4.6.1$ ls -l total 61 -rw-r--r-- 1 root root 8438 2009-04-30 12:38 ChangeLog -rw-r--r-- 1 root root 18875 2009-04-30 12:38 README -rwxr-xr-x 1 root root 1980 2009-04-30 12:38 appRun.sh* drwxr-xr-x 3 root root 72 2009-05-01 11:51 build/ -rw-r--r-- 1 root root 365 2009-05-01 11:52 mc-4.6.1-run.desktop lrwxrwxrwx 1 root root 17 2009-04-30 12:38 recipe.txt -> scripts/recipe.sh drwxr-xr-x 2 root root 984 2009-04-30 12:38 scripts/ drwxr-xr-x 2 root root 80 2009-04-30 12:38 source/ drwxr-xr-x 3 root root 72 2009-05-01 11:52 system/ 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. user1@localhost:/upix/apps/mc-4.6.1$ ls -lR scripts/ scripts/: totalt 132 -rwxr-xr-x 1 root root 395 2009-09-19 09:41 app_build.sh* -rwxr-xr-x 1 root root 437 2009-09-19 09:41 app_clean.sh* -rwxr-xr-x 1 root root 659 2009-09-19 09:41 app_install.sh* -rwxr-xr-x 1 root root 644 2009-09-19 09:41 app_uninstall.sh* -rwxr-xr-x 1 root root 343 2009-09-19 09:41 batch_newpkg.sh* -rwxr-xr-x 1 root root 4600 2009-09-19 09:41 build_sw_pkg.sh* -rwxr-xr-x 1 root root 1159 2009-09-19 09:41 check_vars.sh* -rwxr-xr-x 1 root root 6521 2009-09-19 09:41 common.sh* -rwxr-xr-x 1 root root 2658 2009-09-19 09:41 compile.sh* -rwxr-xr-x 1 root root 2942 2009-09-19 09:41 conv_deb_rpm.sh* -rwxr-xr-x 1 root root 2658 2009-09-19 09:41 conv_tgz.sh* -rwxr-xr-x 1 root root 1506 2009-09-19 09:41 create_desktop.sh* -rwxr-xr-x 1 root root 217 2009-09-19 09:41 debug.sh* -rwxr-xr-x 1 root root 3156 2009-09-19 09:41 delete_dirs_and_delete_symlinks_files.sh* -rwxr-xr-x 1 root root 1097 2009-09-19 09:41 delete_symlinks_dirs_and_files.sh* -rwxr-xr-x 1 root root 757 2009-09-19 09:41 desktop_install.sh* -rwxr-xr-x 1 root root 762 2009-09-19 09:41 desktop_uninstall.sh* -rwxr-xr-x 1 root root 2173 2009-09-19 09:41 disrpm.sh* -rwxr-xr-x 1 root root 1424 2009-09-19 09:41 install_symlinks.sh* -rwxr-xr-x 1 root root 2858 2009-09-19 09:41 local_install.sh* -rwxr-xr-x 1 root root 3451 2009-09-19 09:41 newpkg.sh* -rwxr-xr-x 1 root root 3102 2009-09-19 09:41 newprog.sh* -rwxr-xr-x 1 root root 336 2009-09-19 09:41 post_install.sh* -rwxr-xr-x 1 root root 2068 2009-09-19 09:41 prepare.sh* -rw-r--r-- 1 root root 634 2009-09-19 09:41 recipe.sh -rwxr-xr-x 1 root root 4442 2009-09-19 09:41 symlink_dirs_and_files.sh* -rwxr-xr-x 1 root root 7298 2009-09-19 09:41 symlink_files_and_make_dirs.sh* -rwxr-xr-x 1 root root 2855 2009-09-19 09:41 test.sh* -rwxr-xr-x 1 root root 1615 2009-09-19 09:41 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 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 logs --------- Contains logfiles generated by install_symlinks.sh (and indirectly by app_install.sh), lists the symlinks, directories or files which have been installed to the root system. ---------------------------- user1@localhost:/upix/apps/mc-4.6.1$ ls -l /upix/logs/ total 8 -rw-r--r-- 1 root root 90 2009-05-01 10:27 mc-4.6.1-dirs.log.gz -rw-r--r-- 1 root root 738 2009-05-01 10:27 mc-4.6.1-links-files.log.gz 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