Upix, a software management and packaging system with concepts borrowed from Stow, GoboLinux and Slackware. Slackbuild, Package, AppDir and Package Manager all in one. The applications are installed/uninstalled by scripts which are distributed *together* with the program. No external package management is needed. Simple scripts which only need small modifications for different applications. The scripts can be totally rewritten and customized for a specific application. Lesser risk for incompatibilities 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. The filesystem is the package manager (as in GoboLinux). All files are stored in /upix/apps (or any other custom location). An application consists of a single directory. Easy to redistribute and maintain as a simple tar.gz archive or self-extracting shell script. The /usr directory contains symlinks to the programs in /upix/apps/ (As in Stow). This means that the root filesystem can be kept very small since it mostly contains symlinks. /upix/apps can be mounted or symlinked from another filesystem. All applications should be available regardless of the distribution. Any differences between distributions should be hidden by the scripts. Flexible to distribute - can be binary only, source only, scripts only or a combination. Source based packages, optional to include binary files. Different versions (or builds) of the same application can coexist. Dependency check is done when building the application, since if a dependency is missing the application can not be built. Important dependencies can be included as complete packages or only scripts. Structure Main program directory /upix/apps Owned by root, read/write for any user but with the restricted deletion flag set (a user can not delete another user's files). chmod a+rwxt /upix/apps drwxrwxrwt 4 root root 104 2008-08-08 13:12 apps/ An application directory contains source archives (source), installed files(system), log files (log), build and install scripts (script) and a build directory (build). user1@darkstar:~$ cd /upix/apps/ user1@darkstar:/upix/apps$ ll totalt 1 drwxrwxrwt 19 root root 600 2008-08-13 09:07 ./ drwxr-xr-x 5 root root 120 2008-08-06 11:13 ../ drwxr-xr-x 6 user1 users 176 2008-08-10 19:10 a2ps-4.14/ drwxr-xr-x 6 user1 users 176 2008-08-10 20:22 asunder-1.0.2/ drwxr-xr-x 6 user1 users 176 2008-08-10 21:06 atari800-2.0.3/ drwxr-xr-x 6 user1 users 176 2008-08-10 21:15 audacity-1.3.5/ drwxr-xr-x 7 user1 users 200 2008-08-12 13:18 ffmpeg-export-2008-07-31/ drwxr-xr-x 6 user1 users 176 2008-08-08 15:05 gparted-0.3.6/ drwxr-xr-x 6 user1 users 176 2008-08-08 15:22 gslapt-0.3.19/ drwxr-xr-x 7 user1 users 200 2008-08-12 14:14 kaffeine-0.8.7/ drwxr-xr-x 7 user1 users 200 2008-08-11 09:27 mc-4.6.1/ drwxr-xr-x 6 user1 users 176 2008-08-11 09:22 mc-4.6.1-old/ drwxr-xr-x 7 user1 users 200 2008-08-11 09:21 slackware-12.1/ drwxr-xr-x 6 user1 users 176 2008-08-08 15:01 slapt-get-0.9.12e/ drwxr-xr-x 6 user1 users 176 2008-08-06 11:15 template-2.0/ drwxr-xr-x 7 user1 users 200 2008-08-11 09:16 template-2.1/ drwxr-xr-x 6 user1 users 176 2008-08-10 19:38 vdr-1.6.0/ drwxr-xr-x 7 user1 users 200 2008-08-13 09:29 wxWidgets-2.6.4/ drwxr-xr-x 7 user1 users 200 2008-08-12 13:38 xine-lib-1.1.14/ user1@darkstar:/upix/apps$ ls wxWidgets-2.6.4/ 3.0 build/ system/ log/ script/ source/ user1@darkstar:/upix/apps/wxWidgets-2.6.4$ ls scripts/ addprog.sh* desktop_install.sh* post_install.sh* build.sh* desktop_uninstall.sh* prepare.sh* common.sh* install.sh* README.txt create_desktop.sh* newpkg.sh* remove_symlinks.sh* create_symlinks.sh* newprog.sh* data/ user1@darkstar:/upix/apps/wxWidgets-2.6.4$ ls source/ wxWidgets-2.6.4.tar.gz user1@darkstar:/upix/apps/wxWidgets-2.6.4$ ls system/usr/ bin/ include/ lib/ share/ user1@darkstar:/upix/apps/mc-4.6.1$ ls build/mc-4.6.1/ ABOUT-NLS config.log INSTALL.FAST mc.spec slang/ acinclude.m4 config.status* intl/ mc.spec.in src/ aclocal.m4 configure* lib/ NEWS stamp-h1 AUTHORS configure.ac m4/ pkginfo syntax/ build-glib1.sh* COPYING MAINTAINERS pkginfo.in TODO build-glib2.sh* doc/ Makefile po/ vfs/ ChangeLog edit/ Makefile.am prototype config/ FAQ Makefile.in prototype.in config.h HACKING mc.qpg README config.h.in INSTALL mc.qpg.in README.QNX Changelog: 2008-09-11 Version 3.4 Renamed create_symlinks.sh to symlink_files_only.sh which creates symlinks for regular files only. Added symlink_all.sh which creates symlinks to both directories and files. Less symlinks are needed. 2008-09-09 Version 3.3 Bugfix in create_symlinks.sh - Could not handle filenames containing spaces. Added batch functionality to conv_tgz.sh. 2008-09-03 Version 3.2 Project name changed from Gnuppix to Upix It is now possible to convert Slackware packages to upix apps! Download: Latest: Tar archive template-3.4-scripts.tar.gz Self-extracting archive template-3.4-scripts.sh Old: Tar archive template-3.3-scripts.tar.gz Self-extracting archive template-3.3-scripts.sh Happy hacking! :) Magnus Uppman magnus_uppman@hotmail.com Usage: common.sh: Common data for all scripts and specific variables for the program Some variables are also stored in script/data. prepare.sh: Fetch the source (to "source") and unpack it (to "build") Retrieves the source from the internet and applies any patches. Clears the "build" dir first. Should be run as a regular user. build.sh: Compile the source Should be run as a regular user. install.sh: Install the compiled files to "system" Should be run as a regular user. Copies compiled files to the "system" directory. Clears the "system" dir first. symlink_all.sh: Create symlinks from / to all files or directories in "system" Should be run as root. symlink_files_only.sh: Create symlinks from / to all files in "system", directories are created. Should be run as root. Can be used with LINK_TARGET_GPX to create symlinks on another system. remove_symlinks.sh: Remove the symlinks Should be run as root. Can be used with LINK_TARGET_GPX to remove symlinks from another system. conv_tgz.sh: Convert a binary Slackware package to a Upix application Should be run as a regular user. Example usage: conv_tgz.sh /mnt/sda4/zenwalk-pkgs/contrib/gtkglext-1.2.0-i486-48.1.tgz newprog.sh: Create a new application directory from the template Should be run as a regular user. Example usage: APP_GPX=mc VERSION_GPX=4.6.1 MAIN_FILE_GPX=mc-4.6.1.tar.gz URL_MAIN_FILE_GPX=http://www.ibiblio.org/pub/Linux/utils/file/managers/mc/mc-4.6.1.tar.gz newprog.sh create_desktop.sh: Create a .desktop file Should be run as a regular user. desktop_install.sh: Install menu and desktop icon Can be run as root (system wide installation) or as a user (local installation) desktop_uninstall.sh: Remove menu and desktop icon Can be run as root (system wide uninstallation) or as a user (local uninstallation) post_install.sh: Update system configuration if neccessary Should be run as root. newpkg.sh: Create a package in ~/repo Should be run as a regular user. Example usage: SELF_EXTRACT=true PKG_TYPE=distrib newpkg.sh Use the template for a program (e.g. myprog, version 0.63): First download the template (see above): Create /upix/apps if needed: sudo -p mkdir /upix/apps sudo chmod a+rwt /upix/apps As a regular user: cd /upix/apps Extract with tar: tar --extract --verbose --gunzip --file template-VERSION-scripts.tar.gz Or if self-extracting archive: sh template-VERSION-scripts.sh Secondly, create the dir structure for your application by copying the template: Use newprog.sh cd /upix/apps/template-VERSION/script APP_GPX=mc VERSION_GPX=4.6.1 MAIN_FILE_GPX=mc-4.6.1.tar.gz URL_MAIN_FILE_GPX=http://www.ibiblio.org/pub/Linux/utils/file/managers/mc/mc-4.6.1.tar.gz newprog.sh Manually cd /upix/apps cp -r template-VERSION myprog-0.63 Edit common.sh (and data/APP_GPX etc.) for configuring the build and other stuff. If not a standard GNU build, also edit build.sh, install.sh and possibly prepare.sh. If not possible to use make install: Unpack the sources to 'system' and set BUILD_DIR_GPX accordingly. Logs Generated by symlink_all.sh or symlink_files_only, contains the files which have been symlinked. /upix/apps/tar-16.1/log/tar-16.1-links.log.gz All logs can be stored in a "system" application. See "Base system as a upix application" Create software "package" with newpkg.sh Parameters to newpkg.sh are given as shell variables. PKG_TYPE defines the package contents. The default value is 'scripts'. PKG_TYPE=raw All files, should only be for personal use and not be distributed. The name of the resulting package will be the program name and version. E.g. lbreakout2-2.6beta-7.tar.gz. PKG_TYPE=distrib Scripts, source archives, and files in 'system'. The name of the resulting package will be the program name and version followed by $GPX_ARCH (default value taken from common.sh). E.g. lbreakout2-2.6beta-7-i486.tar.gz. PKG_TYPE=scripts Scripts only. The name of the resulting package will be the program name and version followed by -scripts. E.g. lbreakout2-2.6beta-7-scripts.tar.gz PKG_TYPE=source Buildscript and source archive(s). The name of the resulting package will be the program name and version followed by -src. E.g. lbreakout2-2.6beta-7-src.tar.gz Example usage: cd /upix/apps/tar-16.1/script Create the package ~/repo/tar-16.1-scripts.tar.gz: newpkg.sh Create the package ~/repo/tar-16.1.tar.gz: PKG_TYPE=raw newpkg.sh Create the package ~/repo/tar-16.1-i486.tar.gz (assuming ARCH_GPX=i486 in common.sh): PKG_TYPE=distrib newpkg.sh Create the package ~/repo/tar-16.1-src.tar.gz: PKG_TYPE=source newpkg.sh Create the self-extracting package ~/repo/tar-16.1-i486.sh (assuming ARCH_GPX=i486 in common.sh): SELF_EXTRACT=true PKG_TYPE=distrib newpkg.sh Manually create a "package" With everything: cd /upix/apps tar -cvfz lbreakout2-2.6beta-7.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/* rm /tmp/lbreakout2-2.6beta-7/log/lbreakout2-2.6beta-7.links.log.gz cd /tmp tar -cvfz lbreakout2-2.6beta-7-scripts.tar.gz lbreakout2-2.6beta-7 Install software "package" cd /upix/apps tar -xvfz lbreakout2-2.6beta-7-src.tar.gz or if "raw" package tar -xvfz lbreakout2-2.6beta-7.tar.gz Install self-extracting software "package" sh lbreakout2-2.6beta-7-i486.sh or ./lbreakout2-2.6beta-7-i486.sh Special tricks Use the "system" dir from another /upix/apps archive Preserves disk space. Only the links are stored in the base system. Assume other archive /mnt/hd/upix/apps ln -s /mnt/hd/upix/apps/lbreakout2-2.6beta-7/system /upix/apps/lbreakout2-2.6beta-7/system cd /upix/apps/lbreakout2-2.6beta-7/script ./symlink_all.sh A minimal Slackware installation converted to a Upix application 1. Do a minimal Slackware installation (packages in a). 2. Create a tar.gz backup of the installation. Below is the installation in /dev/hda6. mount /dev/hda6 /mnt/hd cd /mnt/hd tar cvfps ~/sw12.1-base.tar . Compress it gzip ~/sw12.1-base.tar 3. Unpack and make it a Upix app. cp -r /upix/apps/template-3.4 /upix/apps/slackware-12.1 tar xvfzps ~/sw12.1-base.tar.gz -C /upix/apps/slackware-12.1/system 4. Update variables in /upix/apps/slackware-12.1/script/data APP_GPX should contain slackware VERSION_GPX should contain 12.1 5. Copy the Slackware Upix application to the target partition. Below is the target in /dev/hda5. umount /mnt/hd mount /dev/hda5 /mnt/hd mkdir -p /mnt/hd/upix/apps mkdir -p /mnt/hd/upix/logs cp -r /upix/apps/slackware-12.1/ /mnt/hd/upix/apps/ 6. Install symlinks Create symbolic links from /mnt/hd to /upix/apps/slackware-12.1/system ln -s /upix/apps/slackware-12.1/system/{bin,dev,lib,mnt,proc,sbin,sys,usr,boot,etc,home,media,opt,root,srv,tmp,var} /mnt/hd 7. Update and rerun Lilo Add to /etc/lilo.conf: # Linux bootable partition config begins image = /mnt/hd/upix/apps/slackware-12.1/system/boot/vmlinuz append = "root=/dev/hda5" label = SW12.1-hda5 read-only Run lilo: lilo -v 8. Reboot!