<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=BlackLotus</id>
	<title>Alpine Linux - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=BlackLotus"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/BlackLotus"/>
	<updated>2026-05-05T16:15:30Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Software_management&amp;diff=6098</id>
		<title>Software management</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Software_management&amp;diff=6098"/>
		<updated>2012-01-29T18:29:52Z</updated>

		<summary type="html">&lt;p&gt;BlackLotus: /* MegaCli */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a draft&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to run glibc programs under alpine there are a few ways to do so.You could install glibc additional to uclibc (you would have to do this manualy) or you could do the easy way and use a chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
Because there are different usecases I want to give a slight overview about what&#039;s possible and what is intelligent.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Your options==&lt;br /&gt;
===Using Busybox===&lt;br /&gt;
First the most simple approach for setting up a chroot is using a glibc build of busybox.&amp;lt;br&amp;gt;&lt;br /&gt;
This approach has just a few downsides:&amp;lt;br&amp;gt;&lt;br /&gt;
- You have to link most /bin/ and /usr/bin program against /bin/busybox and some busybox builds break if you don&#039;t configure it right.&amp;lt;br&amp;gt;&lt;br /&gt;
- You have to manually download every library you need for your program manually.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
But if you want a small enviroment for one simple use case this is the solution you want.&lt;br /&gt;
&lt;br /&gt;
===Using a livecd===&lt;br /&gt;
If you prefer any special distri you can always download and extract a livecd and use it as a chroot enviroment.&lt;br /&gt;
&lt;br /&gt;
===Using a stage3 gentoo archive===&lt;br /&gt;
This is the fastest approach and you have the advantage of controlling which package version of which library you will install.&amp;lt;br&amp;gt;&lt;br /&gt;
Drawbacks are as follow:&amp;lt;br&amp;gt;&lt;br /&gt;
- Big build.You have to install a portage tree which uses up a lot of space.(It&#039;s not 100% necessary if you don&#039;t have to install any additional content you don&#039;t need it)&amp;lt;br&amp;gt;&lt;br /&gt;
- On slow mashines not recommended because you have to compile your packages.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using Archlinux or Debian===&lt;br /&gt;
If you want a nice running system you can install Arch or Debian in a chroot.This approach isn&#039;t as easily executed as the other alternatives, but are in my opinion the cleanest and most recommended for the every day user.&lt;br /&gt;
&lt;br /&gt;
==How to do it==&lt;br /&gt;
Like I said this is just a quick draft so here it comes.&lt;br /&gt;
===Using Busybox===&lt;br /&gt;
First we need to download busybox.You can choose any of your favourit distros to download a prebuild version.I for instance would use Archlinux packages from http://www.archlinux.org/packages/community/i686/busybox/.&amp;lt;br&amp;gt;&lt;br /&gt;
 wget http://www.archlinux.org/packages/community/i686/busybox/download/ -O busybox.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/glibc/download/ -O glibc.pkg.tar.xz&lt;br /&gt;
 mkdir -p ~/chroot/usr/bin/ ~/chroot/{dev,proc,root,etc}&lt;br /&gt;
 for i in *.pkg.tar.xz;do&lt;br /&gt;
 bsdtar xfJ $i -C ~/chroot&lt;br /&gt;
 done&lt;br /&gt;
 cp /etc/resolv.conf ~/chroot/etc/&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/sh&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/ln&lt;br /&gt;
 sudo chroot ~/chroot/ /bin/sh&lt;br /&gt;
&lt;br /&gt;
This creates a simple chroot enviroment which we will expand through all commands included in busybox.&lt;br /&gt;
 for i in $(busybox --list);do ln -s /bin/busybox /usr/bin/$i;done&lt;br /&gt;
&lt;br /&gt;
===Using a livecd===&lt;br /&gt;
WIP&lt;br /&gt;
&lt;br /&gt;
===Using a stage3 tar archive===&lt;br /&gt;
Select a mirror from http://www.gentoo.org/main/en/mirrors2.xml , switch to /releases/x86/current-stage3/ and download the latest tar ball (for me stage3-i686-20120124.tar.bz2 ).&lt;br /&gt;
 wget http://de-mirror.org/gentoo/releases/x86/current-stage3/stage3-i686-20120124.tar.bz2&lt;br /&gt;
 mkdir ~/chroot&lt;br /&gt;
 tar xfj stage3-i686-*.tar.bz2 -C ~/chroot&lt;br /&gt;
 sudo chroot ~/chroot&lt;br /&gt;
And voila you got your working gentoo chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
You can now take a look at http://www.gentoo.org/doc/en/?catid=desktop to find out how you can configure and install your system or simply extract/copy the program you need to run in your chroot enviroment and execute it.&lt;br /&gt;
&lt;br /&gt;
===Using Archlinux or Debian===&lt;br /&gt;
WIP&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
===Source Dedicated Server===&lt;br /&gt;
Here is an easy example of how you can run http://www.srcds.com in a simple busybox chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
For this server you will only need the basic chroot and a advanced tar version (the busybox version is not sufficient because of the missing -U command).&amp;lt;br&amp;gt;&lt;br /&gt;
 wget http://www.archlinux.org/packages/community/i686/busybox/download/ -O busybox.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/glibc/download/ -O glibc.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/tar/download/ -O tar.pkg.tar.xz&lt;br /&gt;
 mkdir -p ~/chroot/usr/bin/ ~/chroot/{dev,proc,root,etc}&lt;br /&gt;
 for i in *.pkg.tar.xz;do&lt;br /&gt;
 bsdtar xfJ $i -C ~/chroot&lt;br /&gt;
 done&lt;br /&gt;
 cp /etc/resolv.conf ~/chroot/etc/&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/sh&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/ln&lt;br /&gt;
 sudo chroot ~/chroot/ /bin/sh&lt;br /&gt;
Now that you are in a working chroot you can download the server and install it.You just have to execute the following self explaining commands.&lt;br /&gt;
 mkdir ~/work&lt;br /&gt;
 cd ~/work&lt;br /&gt;
 busybox wget http://www.steampowered.com/download/hldsupdatetool.bin&lt;br /&gt;
 chmod +x hldsupdatetool.bin&lt;br /&gt;
 ln -s /bin/busybox ./uncompress&lt;br /&gt;
 cp /bin/tar . #right now executing programs from $PATH is buggy soon to be fixed (no bug in busybox but in my script)&lt;br /&gt;
 ./hdsupdatetool.bin #you can accept it or not ;)&lt;br /&gt;
 ./steam&lt;br /&gt;
 ./steam&lt;br /&gt;
And you should have a working chroot with srcds installed in it.&amp;lt;br&amp;gt;&lt;br /&gt;
If you think you are clever or elegant you can use the server with a bash script.&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 chroot ~/chroot /root/work/steam $@&lt;br /&gt;
Just save it (in your alpine installation) under /usr/bin/steam do a chmod +x /usr/bin/steam and have phun.&amp;lt;br&amp;gt;&lt;br /&gt;
WARNING:&amp;lt;br&amp;gt;&lt;br /&gt;
This script would let steam run with root priviliges.This is not recommended.&lt;br /&gt;
&lt;br /&gt;
===MegaCli===&lt;br /&gt;
So let&#039;s run MegaCli in a chroot to shall we? ;)&amp;lt;br&amp;gt;&lt;br /&gt;
First we set up a uclibc chroot :)&amp;lt;br&amp;gt;&lt;br /&gt;
MegaCli needs more than just glibc it needs ncurses and the gcc-libs.&lt;br /&gt;
 wget http://www.archlinux.org/packages/community/i686/busybox/download/ -O busybox.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/glibc/download/ -O glibc.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/ncurses/download/ -O ncurses.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/gcc-libs/download/ -O gcc-libs.pkg.tar.xz&lt;br /&gt;
 mkdir -p ~/chroot/usr/bin/ ~/chroot/{dev,proc,root,etc,sys}&lt;br /&gt;
 cp /etc/resolv.conf ~/chroot/etc/&lt;br /&gt;
 for i in *.pkg.tar.xz;do&lt;br /&gt;
 bsdtar xfJ $i -C ~/chroot&lt;br /&gt;
 done&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/sh&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/ln&lt;br /&gt;
&lt;br /&gt;
After this we visit this site http://www.lsi.com/downloads/Public/MegaRAID%20Common%20Files/8.02.16_MegaCLI.zip and download 8.02.16_MegaCLI.zip.&amp;lt;br&amp;gt;&lt;br /&gt;
 mkdir tmp&lt;br /&gt;
 cd tmp&lt;br /&gt;
 unzip ../8.02.16_MegaCLI.zip&lt;br /&gt;
 cd LINUX&lt;br /&gt;
 unzip MegaCliLin.zip&lt;br /&gt;
 #Now comes code stolen from rpm2cpio&lt;br /&gt;
 o=`expr 96 + 8`&lt;br /&gt;
 set `od -j $o -N 8 -t u1 MegaCli-8.02.16-1.i386.rpm`&lt;br /&gt;
 il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`&lt;br /&gt;
 dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`&lt;br /&gt;
 sigsize=`expr 8 + 16 \* $il + $dl`&lt;br /&gt;
 o=`expr $o + $sigsize + \( 8 - \( $sigsize \% 8 \) \) \% 8 + 8`&lt;br /&gt;
 set `od -j $o -N 8 -t u1 MegaCli-8.02.16-1.i386.rpm`&lt;br /&gt;
 il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`&lt;br /&gt;
 dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`&lt;br /&gt;
 hdrsize=`expr 8 + 16 \* $il + $dl`&lt;br /&gt;
 o=`expr $o + $hdrsize`&lt;br /&gt;
 dd if=MegaCli-8.02.16-1.i386.rpm ibs=$o skip=1 2&amp;gt;/dev/null |bsdtar -xf -&lt;br /&gt;
 #wow ...&lt;br /&gt;
 rm opt/MegaRAID/MegaCli/MegaCli64 # who needs 64bit?&lt;br /&gt;
 cp -r opt/ ~/chroot/&lt;br /&gt;
Now we got a working MegaCli client in our chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
Like with srcds we don&#039;t want to operate from inside the chroot so here is a little script that should ease you up. (use at your own risk)&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 user=$(whoami)&lt;br /&gt;
 if [ &amp;quot;$user&amp;quot; != &amp;quot;root&amp;quot; ];then&lt;br /&gt;
 echo &amp;quot;This script needs root access&amp;quot;&lt;br /&gt;
 exit&lt;br /&gt;
 fi&lt;br /&gt;
 mount -t proc proc ~/chroot/proc/&lt;br /&gt;
 mount --bind /dev/ ~/chroot/dev/&lt;br /&gt;
 mount --bind /sys/ ~/chroot/sys/&lt;br /&gt;
 #we may need dev and maybe proc too to use this program&lt;br /&gt;
 chroot ~/chroot /opt/MegaRAID/MegaCli/MegaCli $@&lt;br /&gt;
 umount ~/chroot/proc&lt;br /&gt;
 umount ~/chroot/dev&lt;br /&gt;
 umount ~/chroot/sys&lt;br /&gt;
Save it under /usr/bin/MegaCli .Do a chmod +x /usr/bin/MegaCli and good luck.&lt;br /&gt;
Hf&lt;br /&gt;
PS&lt;br /&gt;
This method takes around 50mb.If you need something smaller you can strip a few files from glibc (not recommended) or work on a squashfs.&amp;lt;br&amp;gt;&lt;br /&gt;
With&lt;br /&gt;
 mksquashfs ~/chroot/ /chroot.sfs -b 65536&lt;br /&gt;
you can create a squashfs that is around 15mb small.When you add an unionfs layer you can even use it with write access or you can bind some dirs to the writeable dirs before you chroot into it.&amp;lt;br&amp;gt;&lt;br /&gt;
I will look into it later on.&amp;lt;br&amp;gt;&lt;br /&gt;
You can save the chroot in another dir than your home dir and you an even install a chroot through a APKBUILD (after someone wrote it).&amp;lt;br&amp;gt;&lt;br /&gt;
Through this you could use many glibc dependend programs through one chroot, but be aware that running programs like this should not be standard but only be used in extreme situations like for _closed source_ tools linked against glibc.&lt;/div&gt;</summary>
		<author><name>BlackLotus</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Software_management&amp;diff=6097</id>
		<title>Software management</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Software_management&amp;diff=6097"/>
		<updated>2012-01-29T18:21:03Z</updated>

		<summary type="html">&lt;p&gt;BlackLotus: /* MegaCli */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a draft&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to run glibc programs under alpine there are a few ways to do so.You could install glibc additional to uclibc (you would have to do this manualy) or you could do the easy way and use a chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
Because there are different usecases I want to give a slight overview about what&#039;s possible and what is intelligent.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Your options==&lt;br /&gt;
===Using Busybox===&lt;br /&gt;
First the most simple approach for setting up a chroot is using a glibc build of busybox.&amp;lt;br&amp;gt;&lt;br /&gt;
This approach has just a few downsides:&amp;lt;br&amp;gt;&lt;br /&gt;
- You have to link most /bin/ and /usr/bin program against /bin/busybox and some busybox builds break if you don&#039;t configure it right.&amp;lt;br&amp;gt;&lt;br /&gt;
- You have to manually download every library you need for your program manually.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
But if you want a small enviroment for one simple use case this is the solution you want.&lt;br /&gt;
&lt;br /&gt;
===Using a livecd===&lt;br /&gt;
If you prefer any special distri you can always download and extract a livecd and use it as a chroot enviroment.&lt;br /&gt;
&lt;br /&gt;
===Using a stage3 gentoo archive===&lt;br /&gt;
This is the fastest approach and you have the advantage of controlling which package version of which library you will install.&amp;lt;br&amp;gt;&lt;br /&gt;
Drawbacks are as follow:&amp;lt;br&amp;gt;&lt;br /&gt;
- Big build.You have to install a portage tree which uses up a lot of space.(It&#039;s not 100% necessary if you don&#039;t have to install any additional content you don&#039;t need it)&amp;lt;br&amp;gt;&lt;br /&gt;
- On slow mashines not recommended because you have to compile your packages.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using Archlinux or Debian===&lt;br /&gt;
If you want a nice running system you can install Arch or Debian in a chroot.This approach isn&#039;t as easily executed as the other alternatives, but are in my opinion the cleanest and most recommended for the every day user.&lt;br /&gt;
&lt;br /&gt;
==How to do it==&lt;br /&gt;
Like I said this is just a quick draft so here it comes.&lt;br /&gt;
===Using Busybox===&lt;br /&gt;
First we need to download busybox.You can choose any of your favourit distros to download a prebuild version.I for instance would use Archlinux packages from http://www.archlinux.org/packages/community/i686/busybox/.&amp;lt;br&amp;gt;&lt;br /&gt;
 wget http://www.archlinux.org/packages/community/i686/busybox/download/ -O busybox.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/glibc/download/ -O glibc.pkg.tar.xz&lt;br /&gt;
 mkdir -p ~/chroot/usr/bin/ ~/chroot/{dev,proc,root,etc}&lt;br /&gt;
 for i in *.pkg.tar.xz;do&lt;br /&gt;
 bsdtar xfJ $i -C ~/chroot&lt;br /&gt;
 done&lt;br /&gt;
 cp /etc/resolv.conf ~/chroot/etc/&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/sh&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/ln&lt;br /&gt;
 sudo chroot ~/chroot/ /bin/sh&lt;br /&gt;
&lt;br /&gt;
This creates a simple chroot enviroment which we will expand through all commands included in busybox.&lt;br /&gt;
 for i in $(busybox --list);do ln -s /bin/busybox /usr/bin/$i;done&lt;br /&gt;
&lt;br /&gt;
===Using a livecd===&lt;br /&gt;
WIP&lt;br /&gt;
&lt;br /&gt;
===Using a stage3 tar archive===&lt;br /&gt;
Select a mirror from http://www.gentoo.org/main/en/mirrors2.xml , switch to /releases/x86/current-stage3/ and download the latest tar ball (for me stage3-i686-20120124.tar.bz2 ).&lt;br /&gt;
 wget http://de-mirror.org/gentoo/releases/x86/current-stage3/stage3-i686-20120124.tar.bz2&lt;br /&gt;
 mkdir ~/chroot&lt;br /&gt;
 tar xfj stage3-i686-*.tar.bz2 -C ~/chroot&lt;br /&gt;
 sudo chroot ~/chroot&lt;br /&gt;
And voila you got your working gentoo chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
You can now take a look at http://www.gentoo.org/doc/en/?catid=desktop to find out how you can configure and install your system or simply extract/copy the program you need to run in your chroot enviroment and execute it.&lt;br /&gt;
&lt;br /&gt;
===Using Archlinux or Debian===&lt;br /&gt;
WIP&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
===Source Dedicated Server===&lt;br /&gt;
Here is an easy example of how you can run http://www.srcds.com in a simple busybox chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
For this server you will only need the basic chroot and a advanced tar version (the busybox version is not sufficient because of the missing -U command).&amp;lt;br&amp;gt;&lt;br /&gt;
 wget http://www.archlinux.org/packages/community/i686/busybox/download/ -O busybox.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/glibc/download/ -O glibc.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/tar/download/ -O tar.pkg.tar.xz&lt;br /&gt;
 mkdir -p ~/chroot/usr/bin/ ~/chroot/{dev,proc,root,etc}&lt;br /&gt;
 for i in *.pkg.tar.xz;do&lt;br /&gt;
 bsdtar xfJ $i -C ~/chroot&lt;br /&gt;
 done&lt;br /&gt;
 cp /etc/resolv.conf ~/chroot/etc/&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/sh&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/ln&lt;br /&gt;
 sudo chroot ~/chroot/ /bin/sh&lt;br /&gt;
Now that you are in a working chroot you can download the server and install it.You just have to execute the following self explaining commands.&lt;br /&gt;
 mkdir ~/work&lt;br /&gt;
 cd ~/work&lt;br /&gt;
 busybox wget http://www.steampowered.com/download/hldsupdatetool.bin&lt;br /&gt;
 chmod +x hldsupdatetool.bin&lt;br /&gt;
 ln -s /bin/busybox ./uncompress&lt;br /&gt;
 cp /bin/tar . #right now executing programs from $PATH is buggy soon to be fixed (no bug in busybox but in my script)&lt;br /&gt;
 ./hdsupdatetool.bin #you can accept it or not ;)&lt;br /&gt;
 ./steam&lt;br /&gt;
 ./steam&lt;br /&gt;
And you should have a working chroot with srcds installed in it.&amp;lt;br&amp;gt;&lt;br /&gt;
If you think you are clever or elegant you can use the server with a bash script.&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 chroot ~/chroot /root/work/steam $@&lt;br /&gt;
Just save it (in your alpine installation) under /usr/bin/steam do a chmod +x /usr/bin/steam and have phun.&amp;lt;br&amp;gt;&lt;br /&gt;
WARNING:&amp;lt;br&amp;gt;&lt;br /&gt;
This script would let steam run with root priviliges.This is not recommended.&lt;br /&gt;
&lt;br /&gt;
===MegaCli===&lt;br /&gt;
So let&#039;s run MegaCli in a chroot to shall we? ;)&amp;lt;br&amp;gt;&lt;br /&gt;
First we set up a uclibc chroot :)&amp;lt;br&amp;gt;&lt;br /&gt;
MegaCli needs more than just glibc it needs ncurses and the gcc-libs.&lt;br /&gt;
 wget http://www.archlinux.org/packages/community/i686/busybox/download/ -O busybox.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/glibc/download/ -O glibc.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/ncurses/download/ -O ncurses.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/gcc-libs/download/ -O gcc-libs.pkg.tar.xz&lt;br /&gt;
 mkdir -p ~/chroot/usr/bin/ ~/chroot/{dev,proc,root,etc,sys}&lt;br /&gt;
 cp /etc/resolv.conf ~/chroot/etc/&lt;br /&gt;
 for i in *.pkg.tar.xz;do&lt;br /&gt;
 bsdtar xfJ $i -C ~/chroot&lt;br /&gt;
 done&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/sh&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/ln&lt;br /&gt;
&lt;br /&gt;
After this we visit this site http://www.lsi.com/downloads/Public/MegaRAID%20Common%20Files/8.02.16_MegaCLI.zip and download 8.02.16_MegaCLI.zip.&amp;lt;br&amp;gt;&lt;br /&gt;
 mkdir tmp&lt;br /&gt;
 cd tmp&lt;br /&gt;
 unzip ../8.02.16_MegaCLI.zip&lt;br /&gt;
 cd LINUX&lt;br /&gt;
 unzip MegaCliLin.zip&lt;br /&gt;
 #Now comes code stolen from rpm2cpio&lt;br /&gt;
 o=`expr 96 + 8`&lt;br /&gt;
 set `od -j $o -N 8 -t u1 MegaCli-8.02.16-1.i386.rpm`&lt;br /&gt;
 il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`&lt;br /&gt;
 dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`&lt;br /&gt;
 sigsize=`expr 8 + 16 \* $il + $dl`&lt;br /&gt;
 o=`expr $o + $sigsize + \( 8 - \( $sigsize \% 8 \) \) \% 8 + 8`&lt;br /&gt;
 set `od -j $o -N 8 -t u1 MegaCli-8.02.16-1.i386.rpm`&lt;br /&gt;
 il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`&lt;br /&gt;
 dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`&lt;br /&gt;
 hdrsize=`expr 8 + 16 \* $il + $dl`&lt;br /&gt;
 o=`expr $o + $hdrsize`&lt;br /&gt;
 dd if=MegaCli-8.02.16-1.i386.rpm ibs=$o skip=1 2&amp;gt;/dev/null |bsdtar -xf -&lt;br /&gt;
 #wow ...&lt;br /&gt;
 rm opt/MegaRAID/MegaCli/MegaCli64 # who needs 64bit?&lt;br /&gt;
 cp -r opt/ ~/chroot/&lt;br /&gt;
Now we got a working MegaCli client in our chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
Like with srcds we don&#039;t want to operate from inside the chroot so here is a little script that should ease you up. (use at your own risk)&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 user=$(whoami)&lt;br /&gt;
 if [ &amp;quot;$user&amp;quot; != &amp;quot;root&amp;quot; ];then&lt;br /&gt;
 echo &amp;quot;This script needs root access&amp;quot;&lt;br /&gt;
 exit&lt;br /&gt;
 fi&lt;br /&gt;
 mount -t proc proc ~/chroot/proc/&lt;br /&gt;
 mount --bind /dev/ ~/chroot/dev/&lt;br /&gt;
 mount --bind /sys/ ~/chroot/sys/&lt;br /&gt;
 #we may need dev and maybe proc too to use this program&lt;br /&gt;
 chroot ~/chroot /opt/MegaRAID/MegaCli/MegaCli $@&lt;br /&gt;
 umount ~/chroot/proc&lt;br /&gt;
 umount ~/chroot/dev&lt;br /&gt;
 umount ~/chroot/sys&lt;br /&gt;
Save it under /usr/bin/MegaCli .Do a chmod +x /usr/bin/MegaCli and good luck.&lt;br /&gt;
Hf&lt;br /&gt;
PS&lt;br /&gt;
This method takes around 50mb.If you need something smaller you can strip a few files from glibc.&amp;lt;br&amp;gt;&lt;br /&gt;
You can save the chroot in another dir than your home dir and you an even install a chroot through a APKBUILD (after someone wrote it) through this you could use many glibc dependend programs through one chroot but be aware that running programs like this should not be standard but only be used in extreme situations like for _closed source_ tools linked against glibc.&lt;/div&gt;</summary>
		<author><name>BlackLotus</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Software_management&amp;diff=6096</id>
		<title>Software management</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Software_management&amp;diff=6096"/>
		<updated>2012-01-29T18:16:39Z</updated>

		<summary type="html">&lt;p&gt;BlackLotus: /* MegaCli */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a draft&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to run glibc programs under alpine there are a few ways to do so.You could install glibc additional to uclibc (you would have to do this manualy) or you could do the easy way and use a chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
Because there are different usecases I want to give a slight overview about what&#039;s possible and what is intelligent.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Your options==&lt;br /&gt;
===Using Busybox===&lt;br /&gt;
First the most simple approach for setting up a chroot is using a glibc build of busybox.&amp;lt;br&amp;gt;&lt;br /&gt;
This approach has just a few downsides:&amp;lt;br&amp;gt;&lt;br /&gt;
- You have to link most /bin/ and /usr/bin program against /bin/busybox and some busybox builds break if you don&#039;t configure it right.&amp;lt;br&amp;gt;&lt;br /&gt;
- You have to manually download every library you need for your program manually.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
But if you want a small enviroment for one simple use case this is the solution you want.&lt;br /&gt;
&lt;br /&gt;
===Using a livecd===&lt;br /&gt;
If you prefer any special distri you can always download and extract a livecd and use it as a chroot enviroment.&lt;br /&gt;
&lt;br /&gt;
===Using a stage3 gentoo archive===&lt;br /&gt;
This is the fastest approach and you have the advantage of controlling which package version of which library you will install.&amp;lt;br&amp;gt;&lt;br /&gt;
Drawbacks are as follow:&amp;lt;br&amp;gt;&lt;br /&gt;
- Big build.You have to install a portage tree which uses up a lot of space.(It&#039;s not 100% necessary if you don&#039;t have to install any additional content you don&#039;t need it)&amp;lt;br&amp;gt;&lt;br /&gt;
- On slow mashines not recommended because you have to compile your packages.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using Archlinux or Debian===&lt;br /&gt;
If you want a nice running system you can install Arch or Debian in a chroot.This approach isn&#039;t as easily executed as the other alternatives, but are in my opinion the cleanest and most recommended for the every day user.&lt;br /&gt;
&lt;br /&gt;
==How to do it==&lt;br /&gt;
Like I said this is just a quick draft so here it comes.&lt;br /&gt;
===Using Busybox===&lt;br /&gt;
First we need to download busybox.You can choose any of your favourit distros to download a prebuild version.I for instance would use Archlinux packages from http://www.archlinux.org/packages/community/i686/busybox/.&amp;lt;br&amp;gt;&lt;br /&gt;
 wget http://www.archlinux.org/packages/community/i686/busybox/download/ -O busybox.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/glibc/download/ -O glibc.pkg.tar.xz&lt;br /&gt;
 mkdir -p ~/chroot/usr/bin/ ~/chroot/{dev,proc,root,etc}&lt;br /&gt;
 for i in *.pkg.tar.xz;do&lt;br /&gt;
 bsdtar xfJ $i -C ~/chroot&lt;br /&gt;
 done&lt;br /&gt;
 cp /etc/resolv.conf ~/chroot/etc/&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/sh&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/ln&lt;br /&gt;
 sudo chroot ~/chroot/ /bin/sh&lt;br /&gt;
&lt;br /&gt;
This creates a simple chroot enviroment which we will expand through all commands included in busybox.&lt;br /&gt;
 for i in $(busybox --list);do ln -s /bin/busybox /usr/bin/$i;done&lt;br /&gt;
&lt;br /&gt;
===Using a livecd===&lt;br /&gt;
WIP&lt;br /&gt;
&lt;br /&gt;
===Using a stage3 tar archive===&lt;br /&gt;
Select a mirror from http://www.gentoo.org/main/en/mirrors2.xml , switch to /releases/x86/current-stage3/ and download the latest tar ball (for me stage3-i686-20120124.tar.bz2 ).&lt;br /&gt;
 wget http://de-mirror.org/gentoo/releases/x86/current-stage3/stage3-i686-20120124.tar.bz2&lt;br /&gt;
 mkdir ~/chroot&lt;br /&gt;
 tar xfj stage3-i686-*.tar.bz2 -C ~/chroot&lt;br /&gt;
 sudo chroot ~/chroot&lt;br /&gt;
And voila you got your working gentoo chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
You can now take a look at http://www.gentoo.org/doc/en/?catid=desktop to find out how you can configure and install your system or simply extract/copy the program you need to run in your chroot enviroment and execute it.&lt;br /&gt;
&lt;br /&gt;
===Using Archlinux or Debian===&lt;br /&gt;
WIP&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
===Source Dedicated Server===&lt;br /&gt;
Here is an easy example of how you can run http://www.srcds.com in a simple busybox chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
For this server you will only need the basic chroot and a advanced tar version (the busybox version is not sufficient because of the missing -U command).&amp;lt;br&amp;gt;&lt;br /&gt;
 wget http://www.archlinux.org/packages/community/i686/busybox/download/ -O busybox.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/glibc/download/ -O glibc.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/tar/download/ -O tar.pkg.tar.xz&lt;br /&gt;
 mkdir -p ~/chroot/usr/bin/ ~/chroot/{dev,proc,root,etc}&lt;br /&gt;
 for i in *.pkg.tar.xz;do&lt;br /&gt;
 bsdtar xfJ $i -C ~/chroot&lt;br /&gt;
 done&lt;br /&gt;
 cp /etc/resolv.conf ~/chroot/etc/&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/sh&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/ln&lt;br /&gt;
 sudo chroot ~/chroot/ /bin/sh&lt;br /&gt;
Now that you are in a working chroot you can download the server and install it.You just have to execute the following self explaining commands.&lt;br /&gt;
 mkdir ~/work&lt;br /&gt;
 cd ~/work&lt;br /&gt;
 busybox wget http://www.steampowered.com/download/hldsupdatetool.bin&lt;br /&gt;
 chmod +x hldsupdatetool.bin&lt;br /&gt;
 ln -s /bin/busybox ./uncompress&lt;br /&gt;
 cp /bin/tar . #right now executing programs from $PATH is buggy soon to be fixed (no bug in busybox but in my script)&lt;br /&gt;
 ./hdsupdatetool.bin #you can accept it or not ;)&lt;br /&gt;
 ./steam&lt;br /&gt;
 ./steam&lt;br /&gt;
And you should have a working chroot with srcds installed in it.&amp;lt;br&amp;gt;&lt;br /&gt;
If you think you are clever or elegant you can use the server with a bash script.&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 chroot ~/chroot /root/work/steam $@&lt;br /&gt;
Just save it (in your alpine installation) under /usr/bin/steam do a chmod +x /usr/bin/steam and have phun.&amp;lt;br&amp;gt;&lt;br /&gt;
WARNING:&amp;lt;br&amp;gt;&lt;br /&gt;
This script would let steam run with root priviliges.This is not recommended.&lt;br /&gt;
&lt;br /&gt;
===MegaCli===&lt;br /&gt;
So let&#039;s run MegaCli in a chroot to shall we? ;)&amp;lt;br&amp;gt;&lt;br /&gt;
First we set up a uclibc chroot :)&amp;lt;br&amp;gt;&lt;br /&gt;
MegaCli needs more than just glibc it needs ncurses and the gcc-libs.&lt;br /&gt;
 wget http://www.archlinux.org/packages/community/i686/busybox/download/ -O busybox.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/glibc/download/ -O glibc.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/ncurses/download/ -O ncurses.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/gcc-libs/download/ -O gcc-libs.pkg.tar.xz&lt;br /&gt;
 mkdir -p ~/chroot/usr/bin/ ~/chroot/{dev,proc,root,etc,sys}&lt;br /&gt;
 cp /etc/resolv.conf ~/chroot/etc/&lt;br /&gt;
 for i in *.pkg.tar.xz;do&lt;br /&gt;
 bsdtar xfJ $i -C ~/chroot&lt;br /&gt;
 done&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/sh&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/ln&lt;br /&gt;
&lt;br /&gt;
After this we visit this site http://www.lsi.com/downloads/Public/MegaRAID%20Common%20Files/8.02.16_MegaCLI.zip and download 8.02.16_MegaCLI.zip.&amp;lt;br&amp;gt;&lt;br /&gt;
 mkdir tmp&lt;br /&gt;
 cd tmp&lt;br /&gt;
 unzip ../8.02.16_MegaCLI.zip&lt;br /&gt;
 cd LINUX&lt;br /&gt;
 unzip MegaCliLin.zip&lt;br /&gt;
 #Now comes code stolen from rpm2cpio&lt;br /&gt;
 o=`expr 96 + 8`&lt;br /&gt;
 set `od -j $o -N 8 -t u1 MegaCli-8.02.16-1.i386.rpm`&lt;br /&gt;
 il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`&lt;br /&gt;
 dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`&lt;br /&gt;
 sigsize=`expr 8 + 16 \* $il + $dl`&lt;br /&gt;
 o=`expr $o + $sigsize + \( 8 - \( $sigsize \% 8 \) \) \% 8 + 8`&lt;br /&gt;
 set `od -j $o -N 8 -t u1 MegaCli-8.02.16-1.i386.rpm`&lt;br /&gt;
 il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`&lt;br /&gt;
 dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`&lt;br /&gt;
 hdrsize=`expr 8 + 16 \* $il + $dl`&lt;br /&gt;
 o=`expr $o + $hdrsize`&lt;br /&gt;
 dd if=MegaCli-8.02.16-1.i386.rpm ibs=$o skip=1 2&amp;gt;/dev/null |bsdtar -xf -&lt;br /&gt;
 #wow ...&lt;br /&gt;
 rm opt/MegaRAID/MegaCli/MegaCli64 # who needs 64bit?&lt;br /&gt;
 cp -r opt/ ~/chroot/&lt;br /&gt;
Now we got a working MegaCli client in our chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
Like with srcds we don&#039;t want to operate from inside the chroot so here is a little script that should ease you up. (use at your own risk)&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 user=$(whoami)&lt;br /&gt;
 if [ &amp;quot;$user&amp;quot; != &amp;quot;root&amp;quot; ];then&lt;br /&gt;
 echo &amp;quot;This script needs root access&amp;quot;&lt;br /&gt;
 exit&lt;br /&gt;
 fi&lt;br /&gt;
 mount -t proc proc ~/chroot/proc/&lt;br /&gt;
 mount --bind /dev/ ~/chroot/dev/&lt;br /&gt;
 mount --bind /sys/ ~/chroot/sys/&lt;br /&gt;
 #we may need dev and maybe proc too to use this program&lt;br /&gt;
 chroot ~/chroot /opt/MegaRAID/MegaCli/MegaCli $@&lt;br /&gt;
 umount ~/chroot/proc&lt;br /&gt;
 umount ~/chroot/dev&lt;br /&gt;
 umount ~/chroot/sys&lt;br /&gt;
Save it under /usr/bin/MegaCli .Do a chmod +x /usr/bin/MegaCli and good luck.&lt;br /&gt;
Hf&lt;/div&gt;</summary>
		<author><name>BlackLotus</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Software_management&amp;diff=6095</id>
		<title>Software management</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Software_management&amp;diff=6095"/>
		<updated>2012-01-29T18:15:28Z</updated>

		<summary type="html">&lt;p&gt;BlackLotus: /* MegaCli */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a draft&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to run glibc programs under alpine there are a few ways to do so.You could install glibc additional to uclibc (you would have to do this manualy) or you could do the easy way and use a chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
Because there are different usecases I want to give a slight overview about what&#039;s possible and what is intelligent.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Your options==&lt;br /&gt;
===Using Busybox===&lt;br /&gt;
First the most simple approach for setting up a chroot is using a glibc build of busybox.&amp;lt;br&amp;gt;&lt;br /&gt;
This approach has just a few downsides:&amp;lt;br&amp;gt;&lt;br /&gt;
- You have to link most /bin/ and /usr/bin program against /bin/busybox and some busybox builds break if you don&#039;t configure it right.&amp;lt;br&amp;gt;&lt;br /&gt;
- You have to manually download every library you need for your program manually.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
But if you want a small enviroment for one simple use case this is the solution you want.&lt;br /&gt;
&lt;br /&gt;
===Using a livecd===&lt;br /&gt;
If you prefer any special distri you can always download and extract a livecd and use it as a chroot enviroment.&lt;br /&gt;
&lt;br /&gt;
===Using a stage3 gentoo archive===&lt;br /&gt;
This is the fastest approach and you have the advantage of controlling which package version of which library you will install.&amp;lt;br&amp;gt;&lt;br /&gt;
Drawbacks are as follow:&amp;lt;br&amp;gt;&lt;br /&gt;
- Big build.You have to install a portage tree which uses up a lot of space.(It&#039;s not 100% necessary if you don&#039;t have to install any additional content you don&#039;t need it)&amp;lt;br&amp;gt;&lt;br /&gt;
- On slow mashines not recommended because you have to compile your packages.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using Archlinux or Debian===&lt;br /&gt;
If you want a nice running system you can install Arch or Debian in a chroot.This approach isn&#039;t as easily executed as the other alternatives, but are in my opinion the cleanest and most recommended for the every day user.&lt;br /&gt;
&lt;br /&gt;
==How to do it==&lt;br /&gt;
Like I said this is just a quick draft so here it comes.&lt;br /&gt;
===Using Busybox===&lt;br /&gt;
First we need to download busybox.You can choose any of your favourit distros to download a prebuild version.I for instance would use Archlinux packages from http://www.archlinux.org/packages/community/i686/busybox/.&amp;lt;br&amp;gt;&lt;br /&gt;
 wget http://www.archlinux.org/packages/community/i686/busybox/download/ -O busybox.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/glibc/download/ -O glibc.pkg.tar.xz&lt;br /&gt;
 mkdir -p ~/chroot/usr/bin/ ~/chroot/{dev,proc,root,etc}&lt;br /&gt;
 for i in *.pkg.tar.xz;do&lt;br /&gt;
 bsdtar xfJ $i -C ~/chroot&lt;br /&gt;
 done&lt;br /&gt;
 cp /etc/resolv.conf ~/chroot/etc/&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/sh&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/ln&lt;br /&gt;
 sudo chroot ~/chroot/ /bin/sh&lt;br /&gt;
&lt;br /&gt;
This creates a simple chroot enviroment which we will expand through all commands included in busybox.&lt;br /&gt;
 for i in $(busybox --list);do ln -s /bin/busybox /usr/bin/$i;done&lt;br /&gt;
&lt;br /&gt;
===Using a livecd===&lt;br /&gt;
WIP&lt;br /&gt;
&lt;br /&gt;
===Using a stage3 tar archive===&lt;br /&gt;
Select a mirror from http://www.gentoo.org/main/en/mirrors2.xml , switch to /releases/x86/current-stage3/ and download the latest tar ball (for me stage3-i686-20120124.tar.bz2 ).&lt;br /&gt;
 wget http://de-mirror.org/gentoo/releases/x86/current-stage3/stage3-i686-20120124.tar.bz2&lt;br /&gt;
 mkdir ~/chroot&lt;br /&gt;
 tar xfj stage3-i686-*.tar.bz2 -C ~/chroot&lt;br /&gt;
 sudo chroot ~/chroot&lt;br /&gt;
And voila you got your working gentoo chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
You can now take a look at http://www.gentoo.org/doc/en/?catid=desktop to find out how you can configure and install your system or simply extract/copy the program you need to run in your chroot enviroment and execute it.&lt;br /&gt;
&lt;br /&gt;
===Using Archlinux or Debian===&lt;br /&gt;
WIP&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
===Source Dedicated Server===&lt;br /&gt;
Here is an easy example of how you can run http://www.srcds.com in a simple busybox chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
For this server you will only need the basic chroot and a advanced tar version (the busybox version is not sufficient because of the missing -U command).&amp;lt;br&amp;gt;&lt;br /&gt;
 wget http://www.archlinux.org/packages/community/i686/busybox/download/ -O busybox.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/glibc/download/ -O glibc.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/tar/download/ -O tar.pkg.tar.xz&lt;br /&gt;
 mkdir -p ~/chroot/usr/bin/ ~/chroot/{dev,proc,root,etc}&lt;br /&gt;
 for i in *.pkg.tar.xz;do&lt;br /&gt;
 bsdtar xfJ $i -C ~/chroot&lt;br /&gt;
 done&lt;br /&gt;
 cp /etc/resolv.conf ~/chroot/etc/&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/sh&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/ln&lt;br /&gt;
 sudo chroot ~/chroot/ /bin/sh&lt;br /&gt;
Now that you are in a working chroot you can download the server and install it.You just have to execute the following self explaining commands.&lt;br /&gt;
 mkdir ~/work&lt;br /&gt;
 cd ~/work&lt;br /&gt;
 busybox wget http://www.steampowered.com/download/hldsupdatetool.bin&lt;br /&gt;
 chmod +x hldsupdatetool.bin&lt;br /&gt;
 ln -s /bin/busybox ./uncompress&lt;br /&gt;
 cp /bin/tar . #right now executing programs from $PATH is buggy soon to be fixed (no bug in busybox but in my script)&lt;br /&gt;
 ./hdsupdatetool.bin #you can accept it or not ;)&lt;br /&gt;
 ./steam&lt;br /&gt;
 ./steam&lt;br /&gt;
And you should have a working chroot with srcds installed in it.&amp;lt;br&amp;gt;&lt;br /&gt;
If you think you are clever or elegant you can use the server with a bash script.&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 chroot ~/chroot /root/work/steam $@&lt;br /&gt;
Just save it (in your alpine installation) under /usr/bin/steam do a chmod +x /usr/bin/steam and have phun.&amp;lt;br&amp;gt;&lt;br /&gt;
WARNING:&amp;lt;br&amp;gt;&lt;br /&gt;
This script would let steam run with root priviliges.This is not recommended.&lt;br /&gt;
&lt;br /&gt;
===MegaCli===&lt;br /&gt;
So let&#039;s run MegaCli in a chroot to shall we? ;)&amp;lt;br&amp;gt;&lt;br /&gt;
First we set up a uclibc chroot :)&amp;lt;br&amp;gt;&lt;br /&gt;
MegaCli needs more than just glibc it needs ncurses and the gcc-libs.&lt;br /&gt;
 wget http://www.archlinux.org/packages/community/i686/busybox/download/ -O busybox.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/glibc/download/ -O glibc.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/ncurses/download/ -O ncurses.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/gcc-libs/download/ -O gcc-libs.pkg.tar.xz&lt;br /&gt;
 mkdir -p ~/chroot/usr/bin/ ~/chroot/{dev,proc,root,etc,sys}&lt;br /&gt;
 cp /etc/resolv.conf ~/chroot/etc/&lt;br /&gt;
 for i in *.pkg.tar.xz;do&lt;br /&gt;
 bsdtar xfJ $i -C ~/chroot&lt;br /&gt;
 done&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/sh&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/ln&lt;br /&gt;
&lt;br /&gt;
After this we visit this site http://www.lsi.com/downloads/Public/MegaRAID%20Common%20Files/8.02.16_MegaCLI.zip and download 8.02.16_MegaCLI.zip.&amp;lt;br&amp;gt;&lt;br /&gt;
 mkdir tmp&lt;br /&gt;
 cd tmp&lt;br /&gt;
 unzip ../8.02.16_MegaCLI.zip&lt;br /&gt;
 cd LINUX&lt;br /&gt;
 unzip MegaCliLin.zip&lt;br /&gt;
 #Now comes code stolen from rpm2cpio&lt;br /&gt;
 o=`expr 96 + 8`&lt;br /&gt;
 set `od -j $o -N 8 -t u1 MegaCli-8.02.16-1.i386.rpm`&lt;br /&gt;
 il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`&lt;br /&gt;
 dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`&lt;br /&gt;
 sigsize=`expr 8 + 16 \* $il + $dl`&lt;br /&gt;
 o=`expr $o + $sigsize + \( 8 - \( $sigsize \% 8 \) \) \% 8 + 8`&lt;br /&gt;
 set `od -j $o -N 8 -t u1 MegaCli-8.02.16-1.i386.rpm`&lt;br /&gt;
 il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`&lt;br /&gt;
 dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`&lt;br /&gt;
 hdrsize=`expr 8 + 16 \* $il + $dl`&lt;br /&gt;
 o=`expr $o + $hdrsize`&lt;br /&gt;
 dd if=MegaCli-8.02.16-1.i386.rpm ibs=$o skip=1 2&amp;gt;/dev/null |bsdtar -xf -&lt;br /&gt;
 #wow ...&lt;br /&gt;
 rm opt/MegaRAID/MegaCli/MegaCli64 # who needs 64bit?&lt;br /&gt;
 cp -r opt/ ~/chroot/&lt;br /&gt;
Now we got a working MegaCli client in our chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
Like with srcds we don&#039;t want to operate from inside the chroot so here is a little script that should ease you up. (use at your own risk)&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 user=whoami&lt;br /&gt;
 if [ &amp;quot;$user&amp;quot; != &amp;quot;root&amp;quot; ];then&lt;br /&gt;
 echo &amp;quot;This script needs root access&amp;quot;&lt;br /&gt;
 exit&lt;br /&gt;
 fi&lt;br /&gt;
 mount -t proc proc ~/chroot/proc/&lt;br /&gt;
 mount --bind /dev/ ~/chroot/dev/&lt;br /&gt;
 mount --bind /sys/ ~/chroot/sys/&lt;br /&gt;
 #we may need dev and maybe proc too to use this program&lt;br /&gt;
 chroot ~/chroot /opt/MegaRAID/MegaCli/MegaCli $@&lt;br /&gt;
 umount ~/chroot/proc&lt;br /&gt;
 umount ~/chroot/dev&lt;br /&gt;
 umount ~/chroot/sys&lt;br /&gt;
Save it under /usr/bin/MegaCli .Do a chmod +x /usr/bin/MegaCli and good luck.&lt;br /&gt;
Hf&lt;/div&gt;</summary>
		<author><name>BlackLotus</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Software_management&amp;diff=6094</id>
		<title>Software management</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Software_management&amp;diff=6094"/>
		<updated>2012-01-29T18:14:12Z</updated>

		<summary type="html">&lt;p&gt;BlackLotus: /* MegaCli */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a draft&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to run glibc programs under alpine there are a few ways to do so.You could install glibc additional to uclibc (you would have to do this manualy) or you could do the easy way and use a chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
Because there are different usecases I want to give a slight overview about what&#039;s possible and what is intelligent.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Your options==&lt;br /&gt;
===Using Busybox===&lt;br /&gt;
First the most simple approach for setting up a chroot is using a glibc build of busybox.&amp;lt;br&amp;gt;&lt;br /&gt;
This approach has just a few downsides:&amp;lt;br&amp;gt;&lt;br /&gt;
- You have to link most /bin/ and /usr/bin program against /bin/busybox and some busybox builds break if you don&#039;t configure it right.&amp;lt;br&amp;gt;&lt;br /&gt;
- You have to manually download every library you need for your program manually.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
But if you want a small enviroment for one simple use case this is the solution you want.&lt;br /&gt;
&lt;br /&gt;
===Using a livecd===&lt;br /&gt;
If you prefer any special distri you can always download and extract a livecd and use it as a chroot enviroment.&lt;br /&gt;
&lt;br /&gt;
===Using a stage3 gentoo archive===&lt;br /&gt;
This is the fastest approach and you have the advantage of controlling which package version of which library you will install.&amp;lt;br&amp;gt;&lt;br /&gt;
Drawbacks are as follow:&amp;lt;br&amp;gt;&lt;br /&gt;
- Big build.You have to install a portage tree which uses up a lot of space.(It&#039;s not 100% necessary if you don&#039;t have to install any additional content you don&#039;t need it)&amp;lt;br&amp;gt;&lt;br /&gt;
- On slow mashines not recommended because you have to compile your packages.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using Archlinux or Debian===&lt;br /&gt;
If you want a nice running system you can install Arch or Debian in a chroot.This approach isn&#039;t as easily executed as the other alternatives, but are in my opinion the cleanest and most recommended for the every day user.&lt;br /&gt;
&lt;br /&gt;
==How to do it==&lt;br /&gt;
Like I said this is just a quick draft so here it comes.&lt;br /&gt;
===Using Busybox===&lt;br /&gt;
First we need to download busybox.You can choose any of your favourit distros to download a prebuild version.I for instance would use Archlinux packages from http://www.archlinux.org/packages/community/i686/busybox/.&amp;lt;br&amp;gt;&lt;br /&gt;
 wget http://www.archlinux.org/packages/community/i686/busybox/download/ -O busybox.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/glibc/download/ -O glibc.pkg.tar.xz&lt;br /&gt;
 mkdir -p ~/chroot/usr/bin/ ~/chroot/{dev,proc,root,etc}&lt;br /&gt;
 for i in *.pkg.tar.xz;do&lt;br /&gt;
 bsdtar xfJ $i -C ~/chroot&lt;br /&gt;
 done&lt;br /&gt;
 cp /etc/resolv.conf ~/chroot/etc/&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/sh&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/ln&lt;br /&gt;
 sudo chroot ~/chroot/ /bin/sh&lt;br /&gt;
&lt;br /&gt;
This creates a simple chroot enviroment which we will expand through all commands included in busybox.&lt;br /&gt;
 for i in $(busybox --list);do ln -s /bin/busybox /usr/bin/$i;done&lt;br /&gt;
&lt;br /&gt;
===Using a livecd===&lt;br /&gt;
WIP&lt;br /&gt;
&lt;br /&gt;
===Using a stage3 tar archive===&lt;br /&gt;
Select a mirror from http://www.gentoo.org/main/en/mirrors2.xml , switch to /releases/x86/current-stage3/ and download the latest tar ball (for me stage3-i686-20120124.tar.bz2 ).&lt;br /&gt;
 wget http://de-mirror.org/gentoo/releases/x86/current-stage3/stage3-i686-20120124.tar.bz2&lt;br /&gt;
 mkdir ~/chroot&lt;br /&gt;
 tar xfj stage3-i686-*.tar.bz2 -C ~/chroot&lt;br /&gt;
 sudo chroot ~/chroot&lt;br /&gt;
And voila you got your working gentoo chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
You can now take a look at http://www.gentoo.org/doc/en/?catid=desktop to find out how you can configure and install your system or simply extract/copy the program you need to run in your chroot enviroment and execute it.&lt;br /&gt;
&lt;br /&gt;
===Using Archlinux or Debian===&lt;br /&gt;
WIP&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
===Source Dedicated Server===&lt;br /&gt;
Here is an easy example of how you can run http://www.srcds.com in a simple busybox chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
For this server you will only need the basic chroot and a advanced tar version (the busybox version is not sufficient because of the missing -U command).&amp;lt;br&amp;gt;&lt;br /&gt;
 wget http://www.archlinux.org/packages/community/i686/busybox/download/ -O busybox.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/glibc/download/ -O glibc.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/tar/download/ -O tar.pkg.tar.xz&lt;br /&gt;
 mkdir -p ~/chroot/usr/bin/ ~/chroot/{dev,proc,root,etc}&lt;br /&gt;
 for i in *.pkg.tar.xz;do&lt;br /&gt;
 bsdtar xfJ $i -C ~/chroot&lt;br /&gt;
 done&lt;br /&gt;
 cp /etc/resolv.conf ~/chroot/etc/&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/sh&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/ln&lt;br /&gt;
 sudo chroot ~/chroot/ /bin/sh&lt;br /&gt;
Now that you are in a working chroot you can download the server and install it.You just have to execute the following self explaining commands.&lt;br /&gt;
 mkdir ~/work&lt;br /&gt;
 cd ~/work&lt;br /&gt;
 busybox wget http://www.steampowered.com/download/hldsupdatetool.bin&lt;br /&gt;
 chmod +x hldsupdatetool.bin&lt;br /&gt;
 ln -s /bin/busybox ./uncompress&lt;br /&gt;
 cp /bin/tar . #right now executing programs from $PATH is buggy soon to be fixed (no bug in busybox but in my script)&lt;br /&gt;
 ./hdsupdatetool.bin #you can accept it or not ;)&lt;br /&gt;
 ./steam&lt;br /&gt;
 ./steam&lt;br /&gt;
And you should have a working chroot with srcds installed in it.&amp;lt;br&amp;gt;&lt;br /&gt;
If you think you are clever or elegant you can use the server with a bash script.&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 chroot ~/chroot /root/work/steam $@&lt;br /&gt;
Just save it (in your alpine installation) under /usr/bin/steam do a chmod +x /usr/bin/steam and have phun.&amp;lt;br&amp;gt;&lt;br /&gt;
WARNING:&amp;lt;br&amp;gt;&lt;br /&gt;
This script would let steam run with root priviliges.This is not recommended.&lt;br /&gt;
&lt;br /&gt;
===MegaCli===&lt;br /&gt;
So let&#039;s run MegaCli in a chroot to shall we? ;)&amp;lt;br&amp;gt;&lt;br /&gt;
First we set up a uclibc chroot :)&amp;lt;br&amp;gt;&lt;br /&gt;
MegaCli needs more than just glibc it needs ncurses and the gcc-libs.&lt;br /&gt;
 wget http://www.archlinux.org/packages/community/i686/busybox/download/ -O busybox.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/glibc/download/ -O glibc.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/ncurses/download/ -O ncurses.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/gcc-libs/download/ -O gcc-libs.pkg.tar.xz&lt;br /&gt;
 mkdir -p ~/chroot/usr/bin/ ~/chroot/{dev,proc,root,etc,sys}&lt;br /&gt;
 cp /etc/resolv.conf ~/chroot/etc/&lt;br /&gt;
 for i in *.pkg.tar.xz;do&lt;br /&gt;
 bsdtar xfJ $i -C ~/chroot&lt;br /&gt;
 done&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/sh&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/ln&lt;br /&gt;
&lt;br /&gt;
After this we visit this site http://www.lsi.com/downloads/Public/MegaRAID%20Common%20Files/8.02.16_MegaCLI.zip and download 8.02.16_MegaCLI.zip.&amp;lt;br&amp;gt;&lt;br /&gt;
 mkdir tmp&lt;br /&gt;
 cd tmp&lt;br /&gt;
 unzip ../8.02.16_MegaCLI.zip&lt;br /&gt;
 cd LINUX&lt;br /&gt;
 unzip MegaCliLin.zip&lt;br /&gt;
 #Now comes code stolen from rpm2cpio&lt;br /&gt;
 o=`expr 96 + 8`&lt;br /&gt;
 set `od -j $o -N 8 -t u1 MegaCli-8.02.16-1.i386.rpm`&lt;br /&gt;
 il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`&lt;br /&gt;
 dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`&lt;br /&gt;
 sigsize=`expr 8 + 16 \* $il + $dl`&lt;br /&gt;
 o=`expr $o + $sigsize + \( 8 - \( $sigsize \% 8 \) \) \% 8 + 8`&lt;br /&gt;
 set `od -j $o -N 8 -t u1 MegaCli-8.02.16-1.i386.rpm`&lt;br /&gt;
 il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`&lt;br /&gt;
 dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`&lt;br /&gt;
 hdrsize=`expr 8 + 16 \* $il + $dl`&lt;br /&gt;
 o=`expr $o + $hdrsize`&lt;br /&gt;
 dd if=$pkg ibs=$o skip=1 2&amp;gt;/dev/null |bsdtar -xf -&lt;br /&gt;
 #wow ...&lt;br /&gt;
 rm opt/MegaRAID/MegaCli/MegaCli64 # who needs 64bit?&lt;br /&gt;
 cp -r opt/ ~/chroot/&lt;br /&gt;
Now we got a working MegaCli client in our chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
Like with srcds we don&#039;t want to operate from inside the chroot so here is a little script that should ease you up. (use at your own risk)&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 user=whoami&lt;br /&gt;
 if [ &amp;quot;$user&amp;quot; != &amp;quot;root&amp;quot; ];then&lt;br /&gt;
 echo &amp;quot;This script needs root access&amp;quot;&lt;br /&gt;
 exit&lt;br /&gt;
 fi&lt;br /&gt;
 mount -t proc proc ~/chroot/proc/&lt;br /&gt;
 mount --bind /dev/ ~/chroot/dev/&lt;br /&gt;
 mount --bind /sys/ ~/chroot/sys/&lt;br /&gt;
 #we may need dev and maybe proc too to use this program&lt;br /&gt;
 chroot ~/chroot /opt/MegaRAID/MegaCli/MegaCli $@&lt;br /&gt;
 umount ~/chroot/proc&lt;br /&gt;
 umount ~/chroot/dev&lt;br /&gt;
 umount ~/chroot/sys&lt;br /&gt;
Save it under /usr/bin/MegaCli .Do a chmod +x /usr/bin/MegaCli and good luck.&lt;br /&gt;
Hf&lt;/div&gt;</summary>
		<author><name>BlackLotus</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Software_management&amp;diff=6093</id>
		<title>Software management</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Software_management&amp;diff=6093"/>
		<updated>2012-01-29T18:01:18Z</updated>

		<summary type="html">&lt;p&gt;BlackLotus: /* MegaCli */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a draft&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to run glibc programs under alpine there are a few ways to do so.You could install glibc additional to uclibc (you would have to do this manualy) or you could do the easy way and use a chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
Because there are different usecases I want to give a slight overview about what&#039;s possible and what is intelligent.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Your options==&lt;br /&gt;
===Using Busybox===&lt;br /&gt;
First the most simple approach for setting up a chroot is using a glibc build of busybox.&amp;lt;br&amp;gt;&lt;br /&gt;
This approach has just a few downsides:&amp;lt;br&amp;gt;&lt;br /&gt;
- You have to link most /bin/ and /usr/bin program against /bin/busybox and some busybox builds break if you don&#039;t configure it right.&amp;lt;br&amp;gt;&lt;br /&gt;
- You have to manually download every library you need for your program manually.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
But if you want a small enviroment for one simple use case this is the solution you want.&lt;br /&gt;
&lt;br /&gt;
===Using a livecd===&lt;br /&gt;
If you prefer any special distri you can always download and extract a livecd and use it as a chroot enviroment.&lt;br /&gt;
&lt;br /&gt;
===Using a stage3 gentoo archive===&lt;br /&gt;
This is the fastest approach and you have the advantage of controlling which package version of which library you will install.&amp;lt;br&amp;gt;&lt;br /&gt;
Drawbacks are as follow:&amp;lt;br&amp;gt;&lt;br /&gt;
- Big build.You have to install a portage tree which uses up a lot of space.(It&#039;s not 100% necessary if you don&#039;t have to install any additional content you don&#039;t need it)&amp;lt;br&amp;gt;&lt;br /&gt;
- On slow mashines not recommended because you have to compile your packages.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using Archlinux or Debian===&lt;br /&gt;
If you want a nice running system you can install Arch or Debian in a chroot.This approach isn&#039;t as easily executed as the other alternatives, but are in my opinion the cleanest and most recommended for the every day user.&lt;br /&gt;
&lt;br /&gt;
==How to do it==&lt;br /&gt;
Like I said this is just a quick draft so here it comes.&lt;br /&gt;
===Using Busybox===&lt;br /&gt;
First we need to download busybox.You can choose any of your favourit distros to download a prebuild version.I for instance would use Archlinux packages from http://www.archlinux.org/packages/community/i686/busybox/.&amp;lt;br&amp;gt;&lt;br /&gt;
 wget http://www.archlinux.org/packages/community/i686/busybox/download/ -O busybox.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/glibc/download/ -O glibc.pkg.tar.xz&lt;br /&gt;
 mkdir -p ~/chroot/usr/bin/ ~/chroot/{dev,proc,root,etc}&lt;br /&gt;
 for i in *.pkg.tar.xz;do&lt;br /&gt;
 bsdtar xfJ $i -C ~/chroot&lt;br /&gt;
 done&lt;br /&gt;
 cp /etc/resolv.conf ~/chroot/etc/&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/sh&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/ln&lt;br /&gt;
 sudo chroot ~/chroot/ /bin/sh&lt;br /&gt;
&lt;br /&gt;
This creates a simple chroot enviroment which we will expand through all commands included in busybox.&lt;br /&gt;
 for i in $(busybox --list);do ln -s /bin/busybox /usr/bin/$i;done&lt;br /&gt;
&lt;br /&gt;
===Using a livecd===&lt;br /&gt;
WIP&lt;br /&gt;
&lt;br /&gt;
===Using a stage3 tar archive===&lt;br /&gt;
Select a mirror from http://www.gentoo.org/main/en/mirrors2.xml , switch to /releases/x86/current-stage3/ and download the latest tar ball (for me stage3-i686-20120124.tar.bz2 ).&lt;br /&gt;
 wget http://de-mirror.org/gentoo/releases/x86/current-stage3/stage3-i686-20120124.tar.bz2&lt;br /&gt;
 mkdir ~/chroot&lt;br /&gt;
 tar xfj stage3-i686-*.tar.bz2 -C ~/chroot&lt;br /&gt;
 sudo chroot ~/chroot&lt;br /&gt;
And voila you got your working gentoo chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
You can now take a look at http://www.gentoo.org/doc/en/?catid=desktop to find out how you can configure and install your system or simply extract/copy the program you need to run in your chroot enviroment and execute it.&lt;br /&gt;
&lt;br /&gt;
===Using Archlinux or Debian===&lt;br /&gt;
WIP&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
===Source Dedicated Server===&lt;br /&gt;
Here is an easy example of how you can run http://www.srcds.com in a simple busybox chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
For this server you will only need the basic chroot and a advanced tar version (the busybox version is not sufficient because of the missing -U command).&amp;lt;br&amp;gt;&lt;br /&gt;
 wget http://www.archlinux.org/packages/community/i686/busybox/download/ -O busybox.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/glibc/download/ -O glibc.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/tar/download/ -O tar.pkg.tar.xz&lt;br /&gt;
 mkdir -p ~/chroot/usr/bin/ ~/chroot/{dev,proc,root,etc}&lt;br /&gt;
 for i in *.pkg.tar.xz;do&lt;br /&gt;
 bsdtar xfJ $i -C ~/chroot&lt;br /&gt;
 done&lt;br /&gt;
 cp /etc/resolv.conf ~/chroot/etc/&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/sh&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/ln&lt;br /&gt;
 sudo chroot ~/chroot/ /bin/sh&lt;br /&gt;
Now that you are in a working chroot you can download the server and install it.You just have to execute the following self explaining commands.&lt;br /&gt;
 mkdir ~/work&lt;br /&gt;
 cd ~/work&lt;br /&gt;
 busybox wget http://www.steampowered.com/download/hldsupdatetool.bin&lt;br /&gt;
 chmod +x hldsupdatetool.bin&lt;br /&gt;
 ln -s /bin/busybox ./uncompress&lt;br /&gt;
 cp /bin/tar . #right now executing programs from $PATH is buggy soon to be fixed (no bug in busybox but in my script)&lt;br /&gt;
 ./hdsupdatetool.bin #you can accept it or not ;)&lt;br /&gt;
 ./steam&lt;br /&gt;
 ./steam&lt;br /&gt;
And you should have a working chroot with srcds installed in it.&amp;lt;br&amp;gt;&lt;br /&gt;
If you think you are clever or elegant you can use the server with a bash script.&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 chroot ~/chroot /root/work/steam $@&lt;br /&gt;
Just save it (in your alpine installation) under /usr/bin/steam do a chmod +x /usr/bin/steam and have phun.&amp;lt;br&amp;gt;&lt;br /&gt;
WARNING:&amp;lt;br&amp;gt;&lt;br /&gt;
This script would let steam run with root priviliges.This is not recommended.&lt;br /&gt;
&lt;br /&gt;
===MegaCli===&lt;br /&gt;
So let&#039;s run MegaCli in a chroot to shall we? ;)&amp;lt;br&amp;gt;&lt;br /&gt;
First we set up a uclibc chroot :)&amp;lt;br&amp;gt;&lt;br /&gt;
MegaCli needs more than just glibc it needs ncurses and the gcc-libs.&lt;br /&gt;
 wget http://www.archlinux.org/packages/community/i686/busybox/download/ -O busybox.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/glibc/download/ -O glibc.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/ncurses/download/ -O ncurses.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/gcc-libs/download/ -O gcc-libs.pkg.tar.xz&lt;br /&gt;
 mkdir -p ~/chroot/usr/bin/ ~/chroot/{dev,proc,root,etc,sys}&lt;br /&gt;
 cp /etc/resolv.conf ~/chroot/etc/&lt;br /&gt;
 for i in *.pkg.tar.xz;do&lt;br /&gt;
 bsdtar xfJ $i -C ~/chroot&lt;br /&gt;
 done&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/sh&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/ln&lt;br /&gt;
&lt;br /&gt;
After this we visit this site http://www.lsi.com/downloads/Public/MegaRAID%20Common%20Files/8.02.16_MegaCLI.zip and download 8.02.16_MegaCLI.zip.&amp;lt;br&amp;gt;&lt;br /&gt;
 mkdir tmp&lt;br /&gt;
 cd tmp&lt;br /&gt;
 unzip ../8.02.16_MegaCLI.zip&lt;br /&gt;
 cd LINUX&lt;br /&gt;
 unzip MegaCliLin.zip&lt;br /&gt;
 #Now comes code stolen from rpm2cpio&lt;br /&gt;
 o=`expr 96 + 8`&lt;br /&gt;
 set `od -j $o -N 8 -t u1 MegaCli-8.02.16-1.i386.rpm`&lt;br /&gt;
 il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`&lt;br /&gt;
 dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`&lt;br /&gt;
 sigsize=`expr 8 + 16 \* $il + $dl`&lt;br /&gt;
 o=`expr $o + $sigsize + \( 8 - \( $sigsize \% 8 \) \) \% 8 + 8`&lt;br /&gt;
 set `od -j $o -N 8 -t u1 $pkg`&lt;br /&gt;
 il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`&lt;br /&gt;
 dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`&lt;br /&gt;
 hdrsize=`expr 8 + 16 \* $il + $dl`&lt;br /&gt;
 o=`expr $o + $hdrsize`&lt;br /&gt;
 dd if=$pkg ibs=$o skip=1 2&amp;gt;/dev/null |bsdtar -xf -&lt;br /&gt;
 #wow ...&lt;br /&gt;
 rm opt/MegaRAID/MegaCli/MegaCli64 # who needs 64bit?&lt;br /&gt;
 cp -r opt/ ~/chroot/&lt;br /&gt;
Now we got a working MegaCli client in our chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
Like with srcds we don&#039;t want to operate from inside the chroot so here is a little script that should ease you up. (use at your own risk)&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 user=whoami&lt;br /&gt;
 if [ &amp;quot;$user&amp;quot; != &amp;quot;root&amp;quot; ];then&lt;br /&gt;
 echo &amp;quot;This script needs root access&amp;quot;&lt;br /&gt;
 exit&lt;br /&gt;
 fi&lt;br /&gt;
 mount -t proc proc ~/chroot/proc/&lt;br /&gt;
 mount --bind /dev/ ~/chroot/dev/&lt;br /&gt;
 mount --bind /sys/ ~/chroot/sys/&lt;br /&gt;
 #we may need dev and maybe proc too to use this program&lt;br /&gt;
 chroot ~/chroot /opt/MegaRAID/MegaCli/MegaCli $@&lt;br /&gt;
 umount ~/chroot/proc&lt;br /&gt;
 umount ~/chroot/dev&lt;br /&gt;
 umount ~/chroot/sys&lt;br /&gt;
Save it under /usr/bin/MegaCli .Do a chmod +x /usr/bin/MegaCli and good luck.&lt;br /&gt;
Hf&lt;/div&gt;</summary>
		<author><name>BlackLotus</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Software_management&amp;diff=6092</id>
		<title>Software management</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Software_management&amp;diff=6092"/>
		<updated>2012-01-29T18:00:13Z</updated>

		<summary type="html">&lt;p&gt;BlackLotus: /* Using Busybox */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a draft&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to run glibc programs under alpine there are a few ways to do so.You could install glibc additional to uclibc (you would have to do this manualy) or you could do the easy way and use a chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
Because there are different usecases I want to give a slight overview about what&#039;s possible and what is intelligent.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Your options==&lt;br /&gt;
===Using Busybox===&lt;br /&gt;
First the most simple approach for setting up a chroot is using a glibc build of busybox.&amp;lt;br&amp;gt;&lt;br /&gt;
This approach has just a few downsides:&amp;lt;br&amp;gt;&lt;br /&gt;
- You have to link most /bin/ and /usr/bin program against /bin/busybox and some busybox builds break if you don&#039;t configure it right.&amp;lt;br&amp;gt;&lt;br /&gt;
- You have to manually download every library you need for your program manually.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
But if you want a small enviroment for one simple use case this is the solution you want.&lt;br /&gt;
&lt;br /&gt;
===Using a livecd===&lt;br /&gt;
If you prefer any special distri you can always download and extract a livecd and use it as a chroot enviroment.&lt;br /&gt;
&lt;br /&gt;
===Using a stage3 gentoo archive===&lt;br /&gt;
This is the fastest approach and you have the advantage of controlling which package version of which library you will install.&amp;lt;br&amp;gt;&lt;br /&gt;
Drawbacks are as follow:&amp;lt;br&amp;gt;&lt;br /&gt;
- Big build.You have to install a portage tree which uses up a lot of space.(It&#039;s not 100% necessary if you don&#039;t have to install any additional content you don&#039;t need it)&amp;lt;br&amp;gt;&lt;br /&gt;
- On slow mashines not recommended because you have to compile your packages.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using Archlinux or Debian===&lt;br /&gt;
If you want a nice running system you can install Arch or Debian in a chroot.This approach isn&#039;t as easily executed as the other alternatives, but are in my opinion the cleanest and most recommended for the every day user.&lt;br /&gt;
&lt;br /&gt;
==How to do it==&lt;br /&gt;
Like I said this is just a quick draft so here it comes.&lt;br /&gt;
===Using Busybox===&lt;br /&gt;
First we need to download busybox.You can choose any of your favourit distros to download a prebuild version.I for instance would use Archlinux packages from http://www.archlinux.org/packages/community/i686/busybox/.&amp;lt;br&amp;gt;&lt;br /&gt;
 wget http://www.archlinux.org/packages/community/i686/busybox/download/ -O busybox.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/glibc/download/ -O glibc.pkg.tar.xz&lt;br /&gt;
 mkdir -p ~/chroot/usr/bin/ ~/chroot/{dev,proc,root,etc}&lt;br /&gt;
 for i in *.pkg.tar.xz;do&lt;br /&gt;
 bsdtar xfJ $i -C ~/chroot&lt;br /&gt;
 done&lt;br /&gt;
 cp /etc/resolv.conf ~/chroot/etc/&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/sh&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/ln&lt;br /&gt;
 sudo chroot ~/chroot/ /bin/sh&lt;br /&gt;
&lt;br /&gt;
This creates a simple chroot enviroment which we will expand through all commands included in busybox.&lt;br /&gt;
 for i in $(busybox --list);do ln -s /bin/busybox /usr/bin/$i;done&lt;br /&gt;
&lt;br /&gt;
===Using a livecd===&lt;br /&gt;
WIP&lt;br /&gt;
&lt;br /&gt;
===Using a stage3 tar archive===&lt;br /&gt;
Select a mirror from http://www.gentoo.org/main/en/mirrors2.xml , switch to /releases/x86/current-stage3/ and download the latest tar ball (for me stage3-i686-20120124.tar.bz2 ).&lt;br /&gt;
 wget http://de-mirror.org/gentoo/releases/x86/current-stage3/stage3-i686-20120124.tar.bz2&lt;br /&gt;
 mkdir ~/chroot&lt;br /&gt;
 tar xfj stage3-i686-*.tar.bz2 -C ~/chroot&lt;br /&gt;
 sudo chroot ~/chroot&lt;br /&gt;
And voila you got your working gentoo chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
You can now take a look at http://www.gentoo.org/doc/en/?catid=desktop to find out how you can configure and install your system or simply extract/copy the program you need to run in your chroot enviroment and execute it.&lt;br /&gt;
&lt;br /&gt;
===Using Archlinux or Debian===&lt;br /&gt;
WIP&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
===Source Dedicated Server===&lt;br /&gt;
Here is an easy example of how you can run http://www.srcds.com in a simple busybox chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
For this server you will only need the basic chroot and a advanced tar version (the busybox version is not sufficient because of the missing -U command).&amp;lt;br&amp;gt;&lt;br /&gt;
 wget http://www.archlinux.org/packages/community/i686/busybox/download/ -O busybox.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/glibc/download/ -O glibc.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/tar/download/ -O tar.pkg.tar.xz&lt;br /&gt;
 mkdir -p ~/chroot/usr/bin/ ~/chroot/{dev,proc,root,etc}&lt;br /&gt;
 for i in *.pkg.tar.xz;do&lt;br /&gt;
 bsdtar xfJ $i -C ~/chroot&lt;br /&gt;
 done&lt;br /&gt;
 cp /etc/resolv.conf ~/chroot/etc/&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/sh&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/ln&lt;br /&gt;
 sudo chroot ~/chroot/ /bin/sh&lt;br /&gt;
Now that you are in a working chroot you can download the server and install it.You just have to execute the following self explaining commands.&lt;br /&gt;
 mkdir ~/work&lt;br /&gt;
 cd ~/work&lt;br /&gt;
 busybox wget http://www.steampowered.com/download/hldsupdatetool.bin&lt;br /&gt;
 chmod +x hldsupdatetool.bin&lt;br /&gt;
 ln -s /bin/busybox ./uncompress&lt;br /&gt;
 cp /bin/tar . #right now executing programs from $PATH is buggy soon to be fixed (no bug in busybox but in my script)&lt;br /&gt;
 ./hdsupdatetool.bin #you can accept it or not ;)&lt;br /&gt;
 ./steam&lt;br /&gt;
 ./steam&lt;br /&gt;
And you should have a working chroot with srcds installed in it.&amp;lt;br&amp;gt;&lt;br /&gt;
If you think you are clever or elegant you can use the server with a bash script.&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 chroot ~/chroot /root/work/steam $@&lt;br /&gt;
Just save it (in your alpine installation) under /usr/bin/steam do a chmod +x /usr/bin/steam and have phun.&amp;lt;br&amp;gt;&lt;br /&gt;
WARNING:&amp;lt;br&amp;gt;&lt;br /&gt;
This script would let steam run with root priviliges.This is not recommended.&lt;br /&gt;
&lt;br /&gt;
===MegaCli===&lt;br /&gt;
So let&#039;s run MegaCli in a chroot to shall we? ;)&amp;lt;br&amp;gt;&lt;br /&gt;
First we set up a uclibc chroot :)&amp;lt;br&amp;gt;&lt;br /&gt;
MegaCli needs more than just glibc it needs ncurses and the gcc-libs.&lt;br /&gt;
 wget http://www.archlinux.org/packages/community/i686/busybox/download/ -O busybox.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/glibc/download/ -O glibc.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/ncurses/download/ -O ncurses.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/gcc-libs/download/ -O gcc-libs.pkg.tar.xz&lt;br /&gt;
 mkdir -p ~/chroot/usr/bin/ ~/chroot/{dev,proc,root,etc,sys}&lt;br /&gt;
 cp /etc/resolv.conf ~/chroot/etc/&lt;br /&gt;
 for i in *.pkg.tar.xz;do&lt;br /&gt;
 bsdtar xfJ $i -C ~/chroot&lt;br /&gt;
 done&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/sh&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/ln&lt;br /&gt;
 sudo chroot ~/chroot/ /bin/sh&lt;br /&gt;
After this we visit this site http://www.lsi.com/downloads/Public/MegaRAID%20Common%20Files/8.02.16_MegaCLI.zip and download 8.02.16_MegaCLI.zip.&amp;lt;br&amp;gt;&lt;br /&gt;
 mkdir tmp&lt;br /&gt;
 cd tmp&lt;br /&gt;
 unzip ../8.02.16_MegaCLI.zip&lt;br /&gt;
 cd LINUX&lt;br /&gt;
 unzip MegaCliLin.zip&lt;br /&gt;
 #Now comes code stolen from rpm2cpio&lt;br /&gt;
 o=`expr 96 + 8`&lt;br /&gt;
 set `od -j $o -N 8 -t u1 MegaCli-8.02.16-1.i386.rpm`&lt;br /&gt;
 il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`&lt;br /&gt;
 dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`&lt;br /&gt;
 sigsize=`expr 8 + 16 \* $il + $dl`&lt;br /&gt;
 o=`expr $o + $sigsize + \( 8 - \( $sigsize \% 8 \) \) \% 8 + 8`&lt;br /&gt;
 set `od -j $o -N 8 -t u1 $pkg`&lt;br /&gt;
 il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`&lt;br /&gt;
 dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`&lt;br /&gt;
 hdrsize=`expr 8 + 16 \* $il + $dl`&lt;br /&gt;
 o=`expr $o + $hdrsize`&lt;br /&gt;
 dd if=$pkg ibs=$o skip=1 2&amp;gt;/dev/null |bsdtar -xf -&lt;br /&gt;
 #wow ...&lt;br /&gt;
 rm opt/MegaRAID/MegaCli/MegaCli64 # who needs 64bit?&lt;br /&gt;
 cp -r opt/ ~/chroot/&lt;br /&gt;
Now we got a working MegaCli client in our chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
Like with srcds we don&#039;t want to operate from inside the chroot so here is a little script that should ease you up. (use at your own risk)&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 user=whoami&lt;br /&gt;
 if [ &amp;quot;$user&amp;quot; != &amp;quot;root&amp;quot; ];then&lt;br /&gt;
 echo &amp;quot;This script needs root access&amp;quot;&lt;br /&gt;
 exit&lt;br /&gt;
 fi&lt;br /&gt;
 mount -t proc proc ~/chroot/proc/&lt;br /&gt;
 mount --bind /dev/ ~/chroot/dev/&lt;br /&gt;
 mount --bind /sys/ ~/chroot/sys/&lt;br /&gt;
 #we may need dev and maybe proc too to use this program&lt;br /&gt;
 chroot ~/chroot /opt/MegaRAID/MegaCli/MegaCli $@&lt;br /&gt;
 umount ~/chroot/proc&lt;br /&gt;
 umount ~/chroot/dev&lt;br /&gt;
 umount ~/chroot/sys&lt;br /&gt;
Save it under /usr/bin/MegaCli .Do a chmod +x /usr/bin/MegaCli and good luck.&lt;br /&gt;
Hf&lt;/div&gt;</summary>
		<author><name>BlackLotus</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Software_management&amp;diff=6091</id>
		<title>Software management</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Software_management&amp;diff=6091"/>
		<updated>2012-01-29T17:59:28Z</updated>

		<summary type="html">&lt;p&gt;BlackLotus: /* Source Dedicated Server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a draft&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to run glibc programs under alpine there are a few ways to do so.You could install glibc additional to uclibc (you would have to do this manualy) or you could do the easy way and use a chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
Because there are different usecases I want to give a slight overview about what&#039;s possible and what is intelligent.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Your options==&lt;br /&gt;
===Using Busybox===&lt;br /&gt;
First the most simple approach for setting up a chroot is using a glibc build of busybox.&amp;lt;br&amp;gt;&lt;br /&gt;
This approach has just a few downsides:&amp;lt;br&amp;gt;&lt;br /&gt;
- You have to link most /bin/ and /usr/bin program against /bin/busybox and some busybox builds break if you don&#039;t configure it right.&amp;lt;br&amp;gt;&lt;br /&gt;
- You have to manually download every library you need for your program manually.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
But if you want a small enviroment for one simple use case this is the solution you want.&lt;br /&gt;
&lt;br /&gt;
===Using a livecd===&lt;br /&gt;
If you prefer any special distri you can always download and extract a livecd and use it as a chroot enviroment.&lt;br /&gt;
&lt;br /&gt;
===Using a stage3 gentoo archive===&lt;br /&gt;
This is the fastest approach and you have the advantage of controlling which package version of which library you will install.&amp;lt;br&amp;gt;&lt;br /&gt;
Drawbacks are as follow:&amp;lt;br&amp;gt;&lt;br /&gt;
- Big build.You have to install a portage tree which uses up a lot of space.(It&#039;s not 100% necessary if you don&#039;t have to install any additional content you don&#039;t need it)&amp;lt;br&amp;gt;&lt;br /&gt;
- On slow mashines not recommended because you have to compile your packages.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using Archlinux or Debian===&lt;br /&gt;
If you want a nice running system you can install Arch or Debian in a chroot.This approach isn&#039;t as easily executed as the other alternatives, but are in my opinion the cleanest and most recommended for the every day user.&lt;br /&gt;
&lt;br /&gt;
==How to do it==&lt;br /&gt;
Like I said this is just a quick draft so here it comes.&lt;br /&gt;
===Using Busybox===&lt;br /&gt;
First we need to download busybox.You can choose any of your favourit distros to download a prebuild version.I for instance would use Archlinux packages from http://www.archlinux.org/packages/community/i686/busybox/.&amp;lt;br&amp;gt;&lt;br /&gt;
 wget http://www.archlinux.org/packages/community/i686/busybox/download/ -O busybox.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/glibc/download/ -O glibc.pkg.tar.xz&lt;br /&gt;
 for i in *.pkg.tar.xz;do&lt;br /&gt;
 bsdtar xfJ $i -C ~/chroot&lt;br /&gt;
 done&lt;br /&gt;
 cp /etc/resolv.conf ~/chroot/etc/&lt;br /&gt;
 mkdir -p ~/chroot/usr/bin/ ~/chroot/{dev,proc,root,etc}&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/sh&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/ln&lt;br /&gt;
 sudo chroot ~/chroot/ /bin/sh&lt;br /&gt;
&lt;br /&gt;
This creates a simple chroot enviroment which we will expand through all commands included in busybox.&lt;br /&gt;
 for i in $(busybox --list);do ln -s /bin/busybox /usr/bin/$i;done&lt;br /&gt;
&lt;br /&gt;
===Using a livecd===&lt;br /&gt;
WIP&lt;br /&gt;
&lt;br /&gt;
===Using a stage3 tar archive===&lt;br /&gt;
Select a mirror from http://www.gentoo.org/main/en/mirrors2.xml , switch to /releases/x86/current-stage3/ and download the latest tar ball (for me stage3-i686-20120124.tar.bz2 ).&lt;br /&gt;
 wget http://de-mirror.org/gentoo/releases/x86/current-stage3/stage3-i686-20120124.tar.bz2&lt;br /&gt;
 mkdir ~/chroot&lt;br /&gt;
 tar xfj stage3-i686-*.tar.bz2 -C ~/chroot&lt;br /&gt;
 sudo chroot ~/chroot&lt;br /&gt;
And voila you got your working gentoo chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
You can now take a look at http://www.gentoo.org/doc/en/?catid=desktop to find out how you can configure and install your system or simply extract/copy the program you need to run in your chroot enviroment and execute it.&lt;br /&gt;
&lt;br /&gt;
===Using Archlinux or Debian===&lt;br /&gt;
WIP&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
===Source Dedicated Server===&lt;br /&gt;
Here is an easy example of how you can run http://www.srcds.com in a simple busybox chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
For this server you will only need the basic chroot and a advanced tar version (the busybox version is not sufficient because of the missing -U command).&amp;lt;br&amp;gt;&lt;br /&gt;
 wget http://www.archlinux.org/packages/community/i686/busybox/download/ -O busybox.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/glibc/download/ -O glibc.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/tar/download/ -O tar.pkg.tar.xz&lt;br /&gt;
 mkdir -p ~/chroot/usr/bin/ ~/chroot/{dev,proc,root,etc}&lt;br /&gt;
 for i in *.pkg.tar.xz;do&lt;br /&gt;
 bsdtar xfJ $i -C ~/chroot&lt;br /&gt;
 done&lt;br /&gt;
 cp /etc/resolv.conf ~/chroot/etc/&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/sh&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/ln&lt;br /&gt;
 sudo chroot ~/chroot/ /bin/sh&lt;br /&gt;
Now that you are in a working chroot you can download the server and install it.You just have to execute the following self explaining commands.&lt;br /&gt;
 mkdir ~/work&lt;br /&gt;
 cd ~/work&lt;br /&gt;
 busybox wget http://www.steampowered.com/download/hldsupdatetool.bin&lt;br /&gt;
 chmod +x hldsupdatetool.bin&lt;br /&gt;
 ln -s /bin/busybox ./uncompress&lt;br /&gt;
 cp /bin/tar . #right now executing programs from $PATH is buggy soon to be fixed (no bug in busybox but in my script)&lt;br /&gt;
 ./hdsupdatetool.bin #you can accept it or not ;)&lt;br /&gt;
 ./steam&lt;br /&gt;
 ./steam&lt;br /&gt;
And you should have a working chroot with srcds installed in it.&amp;lt;br&amp;gt;&lt;br /&gt;
If you think you are clever or elegant you can use the server with a bash script.&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 chroot ~/chroot /root/work/steam $@&lt;br /&gt;
Just save it (in your alpine installation) under /usr/bin/steam do a chmod +x /usr/bin/steam and have phun.&amp;lt;br&amp;gt;&lt;br /&gt;
WARNING:&amp;lt;br&amp;gt;&lt;br /&gt;
This script would let steam run with root priviliges.This is not recommended.&lt;br /&gt;
&lt;br /&gt;
===MegaCli===&lt;br /&gt;
So let&#039;s run MegaCli in a chroot to shall we? ;)&amp;lt;br&amp;gt;&lt;br /&gt;
First we set up a uclibc chroot :)&amp;lt;br&amp;gt;&lt;br /&gt;
MegaCli needs more than just glibc it needs ncurses and the gcc-libs.&lt;br /&gt;
 wget http://www.archlinux.org/packages/community/i686/busybox/download/ -O busybox.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/glibc/download/ -O glibc.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/ncurses/download/ -O ncurses.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/gcc-libs/download/ -O gcc-libs.pkg.tar.xz&lt;br /&gt;
 mkdir -p ~/chroot/usr/bin/ ~/chroot/{dev,proc,root,etc,sys}&lt;br /&gt;
 cp /etc/resolv.conf ~/chroot/etc/&lt;br /&gt;
 for i in *.pkg.tar.xz;do&lt;br /&gt;
 bsdtar xfJ $i -C ~/chroot&lt;br /&gt;
 done&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/sh&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/ln&lt;br /&gt;
 sudo chroot ~/chroot/ /bin/sh&lt;br /&gt;
After this we visit this site http://www.lsi.com/downloads/Public/MegaRAID%20Common%20Files/8.02.16_MegaCLI.zip and download 8.02.16_MegaCLI.zip.&amp;lt;br&amp;gt;&lt;br /&gt;
 mkdir tmp&lt;br /&gt;
 cd tmp&lt;br /&gt;
 unzip ../8.02.16_MegaCLI.zip&lt;br /&gt;
 cd LINUX&lt;br /&gt;
 unzip MegaCliLin.zip&lt;br /&gt;
 #Now comes code stolen from rpm2cpio&lt;br /&gt;
 o=`expr 96 + 8`&lt;br /&gt;
 set `od -j $o -N 8 -t u1 MegaCli-8.02.16-1.i386.rpm`&lt;br /&gt;
 il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`&lt;br /&gt;
 dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`&lt;br /&gt;
 sigsize=`expr 8 + 16 \* $il + $dl`&lt;br /&gt;
 o=`expr $o + $sigsize + \( 8 - \( $sigsize \% 8 \) \) \% 8 + 8`&lt;br /&gt;
 set `od -j $o -N 8 -t u1 $pkg`&lt;br /&gt;
 il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`&lt;br /&gt;
 dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`&lt;br /&gt;
 hdrsize=`expr 8 + 16 \* $il + $dl`&lt;br /&gt;
 o=`expr $o + $hdrsize`&lt;br /&gt;
 dd if=$pkg ibs=$o skip=1 2&amp;gt;/dev/null |bsdtar -xf -&lt;br /&gt;
 #wow ...&lt;br /&gt;
 rm opt/MegaRAID/MegaCli/MegaCli64 # who needs 64bit?&lt;br /&gt;
 cp -r opt/ ~/chroot/&lt;br /&gt;
Now we got a working MegaCli client in our chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
Like with srcds we don&#039;t want to operate from inside the chroot so here is a little script that should ease you up. (use at your own risk)&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 user=whoami&lt;br /&gt;
 if [ &amp;quot;$user&amp;quot; != &amp;quot;root&amp;quot; ];then&lt;br /&gt;
 echo &amp;quot;This script needs root access&amp;quot;&lt;br /&gt;
 exit&lt;br /&gt;
 fi&lt;br /&gt;
 mount -t proc proc ~/chroot/proc/&lt;br /&gt;
 mount --bind /dev/ ~/chroot/dev/&lt;br /&gt;
 mount --bind /sys/ ~/chroot/sys/&lt;br /&gt;
 #we may need dev and maybe proc too to use this program&lt;br /&gt;
 chroot ~/chroot /opt/MegaRAID/MegaCli/MegaCli $@&lt;br /&gt;
 umount ~/chroot/proc&lt;br /&gt;
 umount ~/chroot/dev&lt;br /&gt;
 umount ~/chroot/sys&lt;br /&gt;
Save it under /usr/bin/MegaCli .Do a chmod +x /usr/bin/MegaCli and good luck.&lt;br /&gt;
Hf&lt;/div&gt;</summary>
		<author><name>BlackLotus</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Software_management&amp;diff=6090</id>
		<title>Software management</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Software_management&amp;diff=6090"/>
		<updated>2012-01-29T17:58:57Z</updated>

		<summary type="html">&lt;p&gt;BlackLotus: /* MegaCli */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a draft&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to run glibc programs under alpine there are a few ways to do so.You could install glibc additional to uclibc (you would have to do this manualy) or you could do the easy way and use a chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
Because there are different usecases I want to give a slight overview about what&#039;s possible and what is intelligent.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Your options==&lt;br /&gt;
===Using Busybox===&lt;br /&gt;
First the most simple approach for setting up a chroot is using a glibc build of busybox.&amp;lt;br&amp;gt;&lt;br /&gt;
This approach has just a few downsides:&amp;lt;br&amp;gt;&lt;br /&gt;
- You have to link most /bin/ and /usr/bin program against /bin/busybox and some busybox builds break if you don&#039;t configure it right.&amp;lt;br&amp;gt;&lt;br /&gt;
- You have to manually download every library you need for your program manually.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
But if you want a small enviroment for one simple use case this is the solution you want.&lt;br /&gt;
&lt;br /&gt;
===Using a livecd===&lt;br /&gt;
If you prefer any special distri you can always download and extract a livecd and use it as a chroot enviroment.&lt;br /&gt;
&lt;br /&gt;
===Using a stage3 gentoo archive===&lt;br /&gt;
This is the fastest approach and you have the advantage of controlling which package version of which library you will install.&amp;lt;br&amp;gt;&lt;br /&gt;
Drawbacks are as follow:&amp;lt;br&amp;gt;&lt;br /&gt;
- Big build.You have to install a portage tree which uses up a lot of space.(It&#039;s not 100% necessary if you don&#039;t have to install any additional content you don&#039;t need it)&amp;lt;br&amp;gt;&lt;br /&gt;
- On slow mashines not recommended because you have to compile your packages.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using Archlinux or Debian===&lt;br /&gt;
If you want a nice running system you can install Arch or Debian in a chroot.This approach isn&#039;t as easily executed as the other alternatives, but are in my opinion the cleanest and most recommended for the every day user.&lt;br /&gt;
&lt;br /&gt;
==How to do it==&lt;br /&gt;
Like I said this is just a quick draft so here it comes.&lt;br /&gt;
===Using Busybox===&lt;br /&gt;
First we need to download busybox.You can choose any of your favourit distros to download a prebuild version.I for instance would use Archlinux packages from http://www.archlinux.org/packages/community/i686/busybox/.&amp;lt;br&amp;gt;&lt;br /&gt;
 wget http://www.archlinux.org/packages/community/i686/busybox/download/ -O busybox.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/glibc/download/ -O glibc.pkg.tar.xz&lt;br /&gt;
 for i in *.pkg.tar.xz;do&lt;br /&gt;
 bsdtar xfJ $i -C ~/chroot&lt;br /&gt;
 done&lt;br /&gt;
 cp /etc/resolv.conf ~/chroot/etc/&lt;br /&gt;
 mkdir -p ~/chroot/usr/bin/ ~/chroot/{dev,proc,root,etc}&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/sh&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/ln&lt;br /&gt;
 sudo chroot ~/chroot/ /bin/sh&lt;br /&gt;
&lt;br /&gt;
This creates a simple chroot enviroment which we will expand through all commands included in busybox.&lt;br /&gt;
 for i in $(busybox --list);do ln -s /bin/busybox /usr/bin/$i;done&lt;br /&gt;
&lt;br /&gt;
===Using a livecd===&lt;br /&gt;
WIP&lt;br /&gt;
&lt;br /&gt;
===Using a stage3 tar archive===&lt;br /&gt;
Select a mirror from http://www.gentoo.org/main/en/mirrors2.xml , switch to /releases/x86/current-stage3/ and download the latest tar ball (for me stage3-i686-20120124.tar.bz2 ).&lt;br /&gt;
 wget http://de-mirror.org/gentoo/releases/x86/current-stage3/stage3-i686-20120124.tar.bz2&lt;br /&gt;
 mkdir ~/chroot&lt;br /&gt;
 tar xfj stage3-i686-*.tar.bz2 -C ~/chroot&lt;br /&gt;
 sudo chroot ~/chroot&lt;br /&gt;
And voila you got your working gentoo chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
You can now take a look at http://www.gentoo.org/doc/en/?catid=desktop to find out how you can configure and install your system or simply extract/copy the program you need to run in your chroot enviroment and execute it.&lt;br /&gt;
&lt;br /&gt;
===Using Archlinux or Debian===&lt;br /&gt;
WIP&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
===Source Dedicated Server===&lt;br /&gt;
Here is an easy example of how you can run http://www.srcds.com in a simple busybox chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
For this server you will only need the basic chroot and a advanced tar version (the busybox version is not sufficient because of the missing -U command).&amp;lt;br&amp;gt;&lt;br /&gt;
 wget http://www.archlinux.org/packages/community/i686/busybox/download/ -O busybox.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/glibc/download/ -O glibc.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/tar/download/ -O tar.pkg.tar.xz&lt;br /&gt;
 for i in *.pkg.tar.xz;do&lt;br /&gt;
 bsdtar xfJ $i -C ~/chroot&lt;br /&gt;
 done&lt;br /&gt;
 cp /etc/resolv.conf ~/chroot/etc/&lt;br /&gt;
 mkdir -p ~/chroot/usr/bin/ ~/chroot/{dev,proc,root,etc}&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/sh&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/ln&lt;br /&gt;
 sudo chroot ~/chroot/ /bin/sh&lt;br /&gt;
Now that you are in a working chroot you can download the server and install it.You just have to execute the following self explaining commands.&lt;br /&gt;
 mkdir ~/work&lt;br /&gt;
 cd ~/work&lt;br /&gt;
 busybox wget http://www.steampowered.com/download/hldsupdatetool.bin&lt;br /&gt;
 chmod +x hldsupdatetool.bin&lt;br /&gt;
 ln -s /bin/busybox ./uncompress&lt;br /&gt;
 cp /bin/tar . #right now executing programs from $PATH is buggy soon to be fixed (no bug in busybox but in my script)&lt;br /&gt;
 ./hdsupdatetool.bin #you can accept it or not ;)&lt;br /&gt;
 ./steam&lt;br /&gt;
 ./steam&lt;br /&gt;
And you should have a working chroot with srcds installed in it.&amp;lt;br&amp;gt;&lt;br /&gt;
If you think you are clever or elegant you can use the server with a bash script.&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 chroot ~/chroot /root/work/steam $@&lt;br /&gt;
Just save it (in your alpine installation) under /usr/bin/steam do a chmod +x /usr/bin/steam and have phun.&amp;lt;br&amp;gt;&lt;br /&gt;
WARNING:&amp;lt;br&amp;gt;&lt;br /&gt;
This script would let steam run with root priviliges.This is not recommended.&lt;br /&gt;
&lt;br /&gt;
===MegaCli===&lt;br /&gt;
So let&#039;s run MegaCli in a chroot to shall we? ;)&amp;lt;br&amp;gt;&lt;br /&gt;
First we set up a uclibc chroot :)&amp;lt;br&amp;gt;&lt;br /&gt;
MegaCli needs more than just glibc it needs ncurses and the gcc-libs.&lt;br /&gt;
 wget http://www.archlinux.org/packages/community/i686/busybox/download/ -O busybox.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/glibc/download/ -O glibc.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/ncurses/download/ -O ncurses.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/gcc-libs/download/ -O gcc-libs.pkg.tar.xz&lt;br /&gt;
 mkdir -p ~/chroot/usr/bin/ ~/chroot/{dev,proc,root,etc,sys}&lt;br /&gt;
 cp /etc/resolv.conf ~/chroot/etc/&lt;br /&gt;
 for i in *.pkg.tar.xz;do&lt;br /&gt;
 bsdtar xfJ $i -C ~/chroot&lt;br /&gt;
 done&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/sh&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/ln&lt;br /&gt;
 sudo chroot ~/chroot/ /bin/sh&lt;br /&gt;
After this we visit this site http://www.lsi.com/downloads/Public/MegaRAID%20Common%20Files/8.02.16_MegaCLI.zip and download 8.02.16_MegaCLI.zip.&amp;lt;br&amp;gt;&lt;br /&gt;
 mkdir tmp&lt;br /&gt;
 cd tmp&lt;br /&gt;
 unzip ../8.02.16_MegaCLI.zip&lt;br /&gt;
 cd LINUX&lt;br /&gt;
 unzip MegaCliLin.zip&lt;br /&gt;
 #Now comes code stolen from rpm2cpio&lt;br /&gt;
 o=`expr 96 + 8`&lt;br /&gt;
 set `od -j $o -N 8 -t u1 MegaCli-8.02.16-1.i386.rpm`&lt;br /&gt;
 il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`&lt;br /&gt;
 dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`&lt;br /&gt;
 sigsize=`expr 8 + 16 \* $il + $dl`&lt;br /&gt;
 o=`expr $o + $sigsize + \( 8 - \( $sigsize \% 8 \) \) \% 8 + 8`&lt;br /&gt;
 set `od -j $o -N 8 -t u1 $pkg`&lt;br /&gt;
 il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`&lt;br /&gt;
 dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`&lt;br /&gt;
 hdrsize=`expr 8 + 16 \* $il + $dl`&lt;br /&gt;
 o=`expr $o + $hdrsize`&lt;br /&gt;
 dd if=$pkg ibs=$o skip=1 2&amp;gt;/dev/null |bsdtar -xf -&lt;br /&gt;
 #wow ...&lt;br /&gt;
 rm opt/MegaRAID/MegaCli/MegaCli64 # who needs 64bit?&lt;br /&gt;
 cp -r opt/ ~/chroot/&lt;br /&gt;
Now we got a working MegaCli client in our chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
Like with srcds we don&#039;t want to operate from inside the chroot so here is a little script that should ease you up. (use at your own risk)&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 user=whoami&lt;br /&gt;
 if [ &amp;quot;$user&amp;quot; != &amp;quot;root&amp;quot; ];then&lt;br /&gt;
 echo &amp;quot;This script needs root access&amp;quot;&lt;br /&gt;
 exit&lt;br /&gt;
 fi&lt;br /&gt;
 mount -t proc proc ~/chroot/proc/&lt;br /&gt;
 mount --bind /dev/ ~/chroot/dev/&lt;br /&gt;
 mount --bind /sys/ ~/chroot/sys/&lt;br /&gt;
 #we may need dev and maybe proc too to use this program&lt;br /&gt;
 chroot ~/chroot /opt/MegaRAID/MegaCli/MegaCli $@&lt;br /&gt;
 umount ~/chroot/proc&lt;br /&gt;
 umount ~/chroot/dev&lt;br /&gt;
 umount ~/chroot/sys&lt;br /&gt;
Save it under /usr/bin/MegaCli .Do a chmod +x /usr/bin/MegaCli and good luck.&lt;br /&gt;
Hf&lt;/div&gt;</summary>
		<author><name>BlackLotus</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Software_management&amp;diff=6089</id>
		<title>Software management</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Software_management&amp;diff=6089"/>
		<updated>2012-01-29T17:43:34Z</updated>

		<summary type="html">&lt;p&gt;BlackLotus: /* MegaCli */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a draft&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to run glibc programs under alpine there are a few ways to do so.You could install glibc additional to uclibc (you would have to do this manualy) or you could do the easy way and use a chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
Because there are different usecases I want to give a slight overview about what&#039;s possible and what is intelligent.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Your options==&lt;br /&gt;
===Using Busybox===&lt;br /&gt;
First the most simple approach for setting up a chroot is using a glibc build of busybox.&amp;lt;br&amp;gt;&lt;br /&gt;
This approach has just a few downsides:&amp;lt;br&amp;gt;&lt;br /&gt;
- You have to link most /bin/ and /usr/bin program against /bin/busybox and some busybox builds break if you don&#039;t configure it right.&amp;lt;br&amp;gt;&lt;br /&gt;
- You have to manually download every library you need for your program manually.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
But if you want a small enviroment for one simple use case this is the solution you want.&lt;br /&gt;
&lt;br /&gt;
===Using a livecd===&lt;br /&gt;
If you prefer any special distri you can always download and extract a livecd and use it as a chroot enviroment.&lt;br /&gt;
&lt;br /&gt;
===Using a stage3 gentoo archive===&lt;br /&gt;
This is the fastest approach and you have the advantage of controlling which package version of which library you will install.&amp;lt;br&amp;gt;&lt;br /&gt;
Drawbacks are as follow:&amp;lt;br&amp;gt;&lt;br /&gt;
- Big build.You have to install a portage tree which uses up a lot of space.(It&#039;s not 100% necessary if you don&#039;t have to install any additional content you don&#039;t need it)&amp;lt;br&amp;gt;&lt;br /&gt;
- On slow mashines not recommended because you have to compile your packages.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using Archlinux or Debian===&lt;br /&gt;
If you want a nice running system you can install Arch or Debian in a chroot.This approach isn&#039;t as easily executed as the other alternatives, but are in my opinion the cleanest and most recommended for the every day user.&lt;br /&gt;
&lt;br /&gt;
==How to do it==&lt;br /&gt;
Like I said this is just a quick draft so here it comes.&lt;br /&gt;
===Using Busybox===&lt;br /&gt;
First we need to download busybox.You can choose any of your favourit distros to download a prebuild version.I for instance would use Archlinux packages from http://www.archlinux.org/packages/community/i686/busybox/.&amp;lt;br&amp;gt;&lt;br /&gt;
 wget http://www.archlinux.org/packages/community/i686/busybox/download/ -O busybox.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/glibc/download/ -O glibc.pkg.tar.xz&lt;br /&gt;
 for i in *.pkg.tar.xz;do&lt;br /&gt;
 bsdtar xfJ $i -C ~/chroot&lt;br /&gt;
 done&lt;br /&gt;
 cp /etc/resolv.conf ~/chroot/etc/&lt;br /&gt;
 mkdir -p ~/chroot/usr/bin/ ~/chroot/{dev,proc,root,etc}&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/sh&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/ln&lt;br /&gt;
 sudo chroot ~/chroot/ /bin/sh&lt;br /&gt;
&lt;br /&gt;
This creates a simple chroot enviroment which we will expand through all commands included in busybox.&lt;br /&gt;
 for i in $(busybox --list);do ln -s /bin/busybox /usr/bin/$i;done&lt;br /&gt;
&lt;br /&gt;
===Using a livecd===&lt;br /&gt;
WIP&lt;br /&gt;
&lt;br /&gt;
===Using a stage3 tar archive===&lt;br /&gt;
Select a mirror from http://www.gentoo.org/main/en/mirrors2.xml , switch to /releases/x86/current-stage3/ and download the latest tar ball (for me stage3-i686-20120124.tar.bz2 ).&lt;br /&gt;
 wget http://de-mirror.org/gentoo/releases/x86/current-stage3/stage3-i686-20120124.tar.bz2&lt;br /&gt;
 mkdir ~/chroot&lt;br /&gt;
 tar xfj stage3-i686-*.tar.bz2 -C ~/chroot&lt;br /&gt;
 sudo chroot ~/chroot&lt;br /&gt;
And voila you got your working gentoo chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
You can now take a look at http://www.gentoo.org/doc/en/?catid=desktop to find out how you can configure and install your system or simply extract/copy the program you need to run in your chroot enviroment and execute it.&lt;br /&gt;
&lt;br /&gt;
===Using Archlinux or Debian===&lt;br /&gt;
WIP&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
===Source Dedicated Server===&lt;br /&gt;
Here is an easy example of how you can run http://www.srcds.com in a simple busybox chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
For this server you will only need the basic chroot and a advanced tar version (the busybox version is not sufficient because of the missing -U command).&amp;lt;br&amp;gt;&lt;br /&gt;
 wget http://www.archlinux.org/packages/community/i686/busybox/download/ -O busybox.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/glibc/download/ -O glibc.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/tar/download/ -O tar.pkg.tar.xz&lt;br /&gt;
 for i in *.pkg.tar.xz;do&lt;br /&gt;
 bsdtar xfJ $i -C ~/chroot&lt;br /&gt;
 done&lt;br /&gt;
 cp /etc/resolv.conf ~/chroot/etc/&lt;br /&gt;
 mkdir -p ~/chroot/usr/bin/ ~/chroot/{dev,proc,root,etc}&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/sh&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/ln&lt;br /&gt;
 sudo chroot ~/chroot/ /bin/sh&lt;br /&gt;
Now that you are in a working chroot you can download the server and install it.You just have to execute the following self explaining commands.&lt;br /&gt;
 mkdir ~/work&lt;br /&gt;
 cd ~/work&lt;br /&gt;
 busybox wget http://www.steampowered.com/download/hldsupdatetool.bin&lt;br /&gt;
 chmod +x hldsupdatetool.bin&lt;br /&gt;
 ln -s /bin/busybox ./uncompress&lt;br /&gt;
 cp /bin/tar . #right now executing programs from $PATH is buggy soon to be fixed (no bug in busybox but in my script)&lt;br /&gt;
 ./hdsupdatetool.bin #you can accept it or not ;)&lt;br /&gt;
 ./steam&lt;br /&gt;
 ./steam&lt;br /&gt;
And you should have a working chroot with srcds installed in it.&amp;lt;br&amp;gt;&lt;br /&gt;
If you think you are clever or elegant you can use the server with a bash script.&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 chroot ~/chroot /root/work/steam $@&lt;br /&gt;
Just save it (in your alpine installation) under /usr/bin/steam do a chmod +x /usr/bin/steam and have phun.&amp;lt;br&amp;gt;&lt;br /&gt;
WARNING:&amp;lt;br&amp;gt;&lt;br /&gt;
This script would let steam run with root priviliges.This is not recommended.&lt;br /&gt;
&lt;br /&gt;
===MegaCli===&lt;br /&gt;
So let&#039;s run MegaCli in a chroot to shall we? ;)&amp;lt;br&amp;gt;&lt;br /&gt;
First we set up a uclibc chroot :)&amp;lt;br&amp;gt;&lt;br /&gt;
MegaCli needs more than just glibc it needs ncurses and the gcc-libs.&lt;br /&gt;
 wget http://www.archlinux.org/packages/community/i686/busybox/download/ -O busybox.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/glibc/download/ -O glibc.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/ncurses/download/ -O ncurses.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/gcc-libs/download/ -O gcc-libs.pkg.tar.xz&lt;br /&gt;
 for i in *.pkg.tar.xz;do&lt;br /&gt;
 bsdtar xfJ $i -C ~/chroot&lt;br /&gt;
 done&lt;br /&gt;
 cp /etc/resolv.conf ~/chroot/etc/&lt;br /&gt;
 mkdir -p ~/chroot/usr/bin/ ~/chroot/{dev,proc,root,etc,sys}&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/sh&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/ln&lt;br /&gt;
 sudo chroot ~/chroot/ /bin/sh&lt;br /&gt;
After this we visit this site http://www.lsi.com/downloads/Public/MegaRAID%20Common%20Files/8.02.16_MegaCLI.zip and download 8.02.16_MegaCLI.zip.&amp;lt;br&amp;gt;&lt;br /&gt;
 mkdir tmp&lt;br /&gt;
 cd tmp&lt;br /&gt;
 unzip ../8.02.16_MegaCLI.zip&lt;br /&gt;
 cd LINUX&lt;br /&gt;
 unzip MegaCliLin.zip&lt;br /&gt;
 #Now comes code stolen from rpm2cpio&lt;br /&gt;
 o=`expr 96 + 8`&lt;br /&gt;
 set `od -j $o -N 8 -t u1 MegaCli-8.02.16-1.i386.rpm`&lt;br /&gt;
 il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`&lt;br /&gt;
 dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`&lt;br /&gt;
 sigsize=`expr 8 + 16 \* $il + $dl`&lt;br /&gt;
 o=`expr $o + $sigsize + \( 8 - \( $sigsize \% 8 \) \) \% 8 + 8`&lt;br /&gt;
 set `od -j $o -N 8 -t u1 $pkg`&lt;br /&gt;
 il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`&lt;br /&gt;
 dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`&lt;br /&gt;
 hdrsize=`expr 8 + 16 \* $il + $dl`&lt;br /&gt;
 o=`expr $o + $hdrsize`&lt;br /&gt;
 dd if=$pkg ibs=$o skip=1 2&amp;gt;/dev/null |bsdtar -xf -&lt;br /&gt;
 #wow ...&lt;br /&gt;
 rm opt/MegaRAID/MegaCli/MegaCli64 # who needs 64bit?&lt;br /&gt;
 cp -r opt/ ~/chroot/&lt;br /&gt;
Now we got a working MegaCli client in our chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
Like with srcds we don&#039;t want to operate from inside the chroot so here is a little script that should ease you up. (use at your own risk)&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 user=whoami&lt;br /&gt;
 if [ &amp;quot;$user&amp;quot; != &amp;quot;root&amp;quot; ];then&lt;br /&gt;
 echo &amp;quot;This script needs root access&amp;quot;&lt;br /&gt;
 exit&lt;br /&gt;
 fi&lt;br /&gt;
 mount -t proc proc ~/chroot/proc/&lt;br /&gt;
 mount --bind /dev/ ~/chroot/dev/&lt;br /&gt;
 mount --bind /sys/ ~/chroot/sys/&lt;br /&gt;
 #we may need dev and maybe proc too to use this program&lt;br /&gt;
 chroot ~/chroot /opt/MegaRAID/MegaCli/MegaCli $@&lt;br /&gt;
 umount ~/chroot/proc&lt;br /&gt;
 umount ~/chroot/dev&lt;br /&gt;
 umount ~/chroot/sys&lt;br /&gt;
Save it under /usr/bin/MegaCli .Do a chmod +x /usr/bin/MegaCli and good luck.&lt;br /&gt;
Hf&lt;/div&gt;</summary>
		<author><name>BlackLotus</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Software_management&amp;diff=6088</id>
		<title>Software management</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Software_management&amp;diff=6088"/>
		<updated>2012-01-29T17:35:17Z</updated>

		<summary type="html">&lt;p&gt;BlackLotus: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a draft&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to run glibc programs under alpine there are a few ways to do so.You could install glibc additional to uclibc (you would have to do this manualy) or you could do the easy way and use a chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
Because there are different usecases I want to give a slight overview about what&#039;s possible and what is intelligent.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Your options==&lt;br /&gt;
===Using Busybox===&lt;br /&gt;
First the most simple approach for setting up a chroot is using a glibc build of busybox.&amp;lt;br&amp;gt;&lt;br /&gt;
This approach has just a few downsides:&amp;lt;br&amp;gt;&lt;br /&gt;
- You have to link most /bin/ and /usr/bin program against /bin/busybox and some busybox builds break if you don&#039;t configure it right.&amp;lt;br&amp;gt;&lt;br /&gt;
- You have to manually download every library you need for your program manually.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
But if you want a small enviroment for one simple use case this is the solution you want.&lt;br /&gt;
&lt;br /&gt;
===Using a livecd===&lt;br /&gt;
If you prefer any special distri you can always download and extract a livecd and use it as a chroot enviroment.&lt;br /&gt;
&lt;br /&gt;
===Using a stage3 gentoo archive===&lt;br /&gt;
This is the fastest approach and you have the advantage of controlling which package version of which library you will install.&amp;lt;br&amp;gt;&lt;br /&gt;
Drawbacks are as follow:&amp;lt;br&amp;gt;&lt;br /&gt;
- Big build.You have to install a portage tree which uses up a lot of space.(It&#039;s not 100% necessary if you don&#039;t have to install any additional content you don&#039;t need it)&amp;lt;br&amp;gt;&lt;br /&gt;
- On slow mashines not recommended because you have to compile your packages.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using Archlinux or Debian===&lt;br /&gt;
If you want a nice running system you can install Arch or Debian in a chroot.This approach isn&#039;t as easily executed as the other alternatives, but are in my opinion the cleanest and most recommended for the every day user.&lt;br /&gt;
&lt;br /&gt;
==How to do it==&lt;br /&gt;
Like I said this is just a quick draft so here it comes.&lt;br /&gt;
===Using Busybox===&lt;br /&gt;
First we need to download busybox.You can choose any of your favourit distros to download a prebuild version.I for instance would use Archlinux packages from http://www.archlinux.org/packages/community/i686/busybox/.&amp;lt;br&amp;gt;&lt;br /&gt;
 wget http://www.archlinux.org/packages/community/i686/busybox/download/ -O busybox.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/glibc/download/ -O glibc.pkg.tar.xz&lt;br /&gt;
 for i in *.pkg.tar.xz;do&lt;br /&gt;
 bsdtar xfJ $i -C ~/chroot&lt;br /&gt;
 done&lt;br /&gt;
 cp /etc/resolv.conf ~/chroot/etc/&lt;br /&gt;
 mkdir -p ~/chroot/usr/bin/ ~/chroot/{dev,proc,root,etc}&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/sh&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/ln&lt;br /&gt;
 sudo chroot ~/chroot/ /bin/sh&lt;br /&gt;
&lt;br /&gt;
This creates a simple chroot enviroment which we will expand through all commands included in busybox.&lt;br /&gt;
 for i in $(busybox --list);do ln -s /bin/busybox /usr/bin/$i;done&lt;br /&gt;
&lt;br /&gt;
===Using a livecd===&lt;br /&gt;
WIP&lt;br /&gt;
&lt;br /&gt;
===Using a stage3 tar archive===&lt;br /&gt;
Select a mirror from http://www.gentoo.org/main/en/mirrors2.xml , switch to /releases/x86/current-stage3/ and download the latest tar ball (for me stage3-i686-20120124.tar.bz2 ).&lt;br /&gt;
 wget http://de-mirror.org/gentoo/releases/x86/current-stage3/stage3-i686-20120124.tar.bz2&lt;br /&gt;
 mkdir ~/chroot&lt;br /&gt;
 tar xfj stage3-i686-*.tar.bz2 -C ~/chroot&lt;br /&gt;
 sudo chroot ~/chroot&lt;br /&gt;
And voila you got your working gentoo chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
You can now take a look at http://www.gentoo.org/doc/en/?catid=desktop to find out how you can configure and install your system or simply extract/copy the program you need to run in your chroot enviroment and execute it.&lt;br /&gt;
&lt;br /&gt;
===Using Archlinux or Debian===&lt;br /&gt;
WIP&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
===Source Dedicated Server===&lt;br /&gt;
Here is an easy example of how you can run http://www.srcds.com in a simple busybox chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
For this server you will only need the basic chroot and a advanced tar version (the busybox version is not sufficient because of the missing -U command).&amp;lt;br&amp;gt;&lt;br /&gt;
 wget http://www.archlinux.org/packages/community/i686/busybox/download/ -O busybox.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/glibc/download/ -O glibc.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/tar/download/ -O tar.pkg.tar.xz&lt;br /&gt;
 for i in *.pkg.tar.xz;do&lt;br /&gt;
 bsdtar xfJ $i -C ~/chroot&lt;br /&gt;
 done&lt;br /&gt;
 cp /etc/resolv.conf ~/chroot/etc/&lt;br /&gt;
 mkdir -p ~/chroot/usr/bin/ ~/chroot/{dev,proc,root,etc}&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/sh&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/ln&lt;br /&gt;
 sudo chroot ~/chroot/ /bin/sh&lt;br /&gt;
Now that you are in a working chroot you can download the server and install it.You just have to execute the following self explaining commands.&lt;br /&gt;
 mkdir ~/work&lt;br /&gt;
 cd ~/work&lt;br /&gt;
 busybox wget http://www.steampowered.com/download/hldsupdatetool.bin&lt;br /&gt;
 chmod +x hldsupdatetool.bin&lt;br /&gt;
 ln -s /bin/busybox ./uncompress&lt;br /&gt;
 cp /bin/tar . #right now executing programs from $PATH is buggy soon to be fixed (no bug in busybox but in my script)&lt;br /&gt;
 ./hdsupdatetool.bin #you can accept it or not ;)&lt;br /&gt;
 ./steam&lt;br /&gt;
 ./steam&lt;br /&gt;
And you should have a working chroot with srcds installed in it.&amp;lt;br&amp;gt;&lt;br /&gt;
If you think you are clever or elegant you can use the server with a bash script.&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 chroot ~/chroot /root/work/steam $@&lt;br /&gt;
Just save it (in your alpine installation) under /usr/bin/steam do a chmod +x /usr/bin/steam and have phun.&amp;lt;br&amp;gt;&lt;br /&gt;
WARNING:&amp;lt;br&amp;gt;&lt;br /&gt;
This script would let steam run with root priviliges.This is not recommended.&lt;br /&gt;
&lt;br /&gt;
===MegaCli===&lt;br /&gt;
So let&#039;s run MegaCli in a chroot to shall we? ;)&amp;lt;br&amp;gt;&lt;br /&gt;
First we set up a uclibc chroot :)&amp;lt;br&amp;gt;&lt;br /&gt;
MegaCli needs more than just glibc it needs ncurses and the gcc-libs.&lt;br /&gt;
 wget http://www.archlinux.org/packages/community/i686/busybox/download/ -O busybox.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/glibc/download/ -O glibc.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/ncurses/download/ -O ncurses.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/gcc-libs/download/ -O gcc-libs.pkg.tar.xz&lt;br /&gt;
 for i in *.pkg.tar.xz;do&lt;br /&gt;
 bsdtar xfJ $i -C ~/chroot&lt;br /&gt;
 done&lt;br /&gt;
 cp /etc/resolv.conf ~/chroot/etc/&lt;br /&gt;
 mkdir -p ~/chroot/usr/bin/ ~/chroot/{dev,proc,root,etc}&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/sh&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/ln&lt;br /&gt;
 sudo chroot ~/chroot/ /bin/sh&lt;br /&gt;
After this we visit this site http://www.lsi.com/downloads/Public/MegaRAID%20Common%20Files/8.02.16_MegaCLI.zip and download 8.02.16_MegaCLI.zip.&amp;lt;br&amp;gt;&lt;br /&gt;
 mkdir tmp&lt;br /&gt;
 cd tmp&lt;br /&gt;
 unzip ../8.02.16_MegaCLI.zip&lt;br /&gt;
 cd LINUX&lt;br /&gt;
 unzip MegaCliLin.zip&lt;br /&gt;
 #Now comes code stolen from rpm2cpio&lt;br /&gt;
 o=`expr 96 + 8`&lt;br /&gt;
 set `od -j $o -N 8 -t u1 MegaCli-8.02.16-1.i386.rpm`&lt;br /&gt;
 il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`&lt;br /&gt;
 dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`&lt;br /&gt;
 sigsize=`expr 8 + 16 \* $il + $dl`&lt;br /&gt;
 o=`expr $o + $sigsize + \( 8 - \( $sigsize \% 8 \) \) \% 8 + 8`&lt;br /&gt;
 set `od -j $o -N 8 -t u1 $pkg`&lt;br /&gt;
 il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`&lt;br /&gt;
 dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`&lt;br /&gt;
 hdrsize=`expr 8 + 16 \* $il + $dl`&lt;br /&gt;
 o=`expr $o + $hdrsize`&lt;br /&gt;
 dd if=$pkg ibs=$o skip=1 2&amp;gt;/dev/null |bsdtar -xf -&lt;br /&gt;
 #wow ...&lt;br /&gt;
 rm opt/MegaRAID/MegaCli/MegaCli64 # who needs 64bit?&lt;br /&gt;
 cp -r opt/ ~/chroot/&lt;br /&gt;
Now we got a working MegaCli client in our chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
Like with srcds we don&#039;t want to operate from inside the chroot so here is a little script that should ease you up. (use at your own risk)&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 user=whoami&lt;br /&gt;
 if [ &amp;quot;$user&amp;quot; != &amp;quot;root&amp;quot; ];then&lt;br /&gt;
 echo &amp;quot;This script needs root access&amp;quot;&lt;br /&gt;
 exit&lt;br /&gt;
 fi&lt;br /&gt;
 mount -t proc proc ~/chroot/proc/&lt;br /&gt;
 mount --bind /dev/ ~/chroot/dev&lt;br /&gt;
 #we may need dev and maybe proc too to use this program&lt;br /&gt;
 chroot ~/chroot /opt/MegaRAID/MegaCli/MegaCli $@&lt;br /&gt;
 umount ~/chroot/proc&lt;br /&gt;
 umount ~/chroot/dev&lt;br /&gt;
Save it under /usr/bin/MegaCli .Do a chmod +x /usr/bin/MegaCli and good luck.&lt;br /&gt;
Hf&lt;/div&gt;</summary>
		<author><name>BlackLotus</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Software_management&amp;diff=6087</id>
		<title>Software management</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Software_management&amp;diff=6087"/>
		<updated>2012-01-29T16:52:16Z</updated>

		<summary type="html">&lt;p&gt;BlackLotus: /* Using Busybox */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a draft&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to run glibc programs under alpine there are a few ways to do so.You could install glibc additional to uclibc (you would have to do this manualy) or you could do the easy way and use a chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
Because there are different usecases I want to give a slight overview about what&#039;s possible and what is intelligent.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Your options==&lt;br /&gt;
===Using Busybox===&lt;br /&gt;
First the most simple approach for setting up a chroot is using a glibc build of busybox.&amp;lt;br&amp;gt;&lt;br /&gt;
This approach has just a few downsides:&amp;lt;br&amp;gt;&lt;br /&gt;
- You have to link most /bin/ and /usr/bin program against /bin/busybox and some busybox builds break if you don&#039;t configure it right.&amp;lt;br&amp;gt;&lt;br /&gt;
- You have to manually download every library you need for your program manually.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
But if you want a small enviroment for one simple use case this is the solution you want.&lt;br /&gt;
&lt;br /&gt;
===Using a livecd===&lt;br /&gt;
If you prefer any special distri you can always download and extract a livecd and use it as a chroot enviroment.&lt;br /&gt;
&lt;br /&gt;
===Using a stage3 gentoo archive===&lt;br /&gt;
This is the fastest approach and you have the advantage of controlling which package version of which library you will install.&amp;lt;br&amp;gt;&lt;br /&gt;
Drawbacks are as follow:&amp;lt;br&amp;gt;&lt;br /&gt;
- Big build.You have to install a portage tree which uses up a lot of space.(It&#039;s not 100% necessary if you don&#039;t have to install any additional content you don&#039;t need it)&amp;lt;br&amp;gt;&lt;br /&gt;
- On slow mashines not recommended because you have to compile your packages.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using Archlinux or Debian===&lt;br /&gt;
If you want a nice running system you can install Arch or Debian in a chroot.This approach isn&#039;t as easily executed as the other alternatives, but are in my opinion the cleanest and most recommended for the every day user.&lt;br /&gt;
&lt;br /&gt;
==How to do it==&lt;br /&gt;
Like I said this is just a quick draft so here it comes.&lt;br /&gt;
===Using Busybox===&lt;br /&gt;
First we need to download busybox.You can choose any of your favourit distros to download a prebuild version.I for instance would use Archlinux packages from http://www.archlinux.org/packages/community/i686/busybox/.&amp;lt;br&amp;gt;&lt;br /&gt;
 wget http://www.archlinux.org/packages/community/i686/busybox/download/ -O busybox.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/glibc/download/ -O glibc.pkg.tar.xz&lt;br /&gt;
 for i in *.pkg.tar.xz;do&lt;br /&gt;
 bsdtar xfJ $i -C ~/chroot&lt;br /&gt;
 done&lt;br /&gt;
 cp /etc/resolv.conf ~/chroot/etc/&lt;br /&gt;
 mkdir -p ~/chroot/usr/bin/ ~/chroot/{dev,proc,root,etc}&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/sh&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/ln&lt;br /&gt;
 sudo chroot ~/chroot/ /bin/sh&lt;br /&gt;
&lt;br /&gt;
This creates a simple chroot enviroment which we will expand through all commands included in busybox.&lt;br /&gt;
 for i in $(busybox --list);do ln -s /bin/busybox /usr/bin/$i;done&lt;br /&gt;
&lt;br /&gt;
===Using a livecd===&lt;br /&gt;
WIP&lt;br /&gt;
&lt;br /&gt;
===Using a stage3 tar archive===&lt;br /&gt;
Select a mirror from http://www.gentoo.org/main/en/mirrors2.xml , switch to /releases/x86/current-stage3/ and download the latest tar ball (for me stage3-i686-20120124.tar.bz2 ).&lt;br /&gt;
 wget http://de-mirror.org/gentoo/releases/x86/current-stage3/stage3-i686-20120124.tar.bz2&lt;br /&gt;
 mkdir ~/chroot&lt;br /&gt;
 tar xfj stage3-i686-*.tar.bz2 -C ~/chroot&lt;br /&gt;
 sudo chroot ~/chroot&lt;br /&gt;
And voila you got your working gentoo chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
You can now take a look at http://www.gentoo.org/doc/en/?catid=desktop to find out how you can configure and install your system or simply extract/copy the program you need to run in your chroot enviroment and execute it.&lt;br /&gt;
&lt;br /&gt;
===Using Archlinux or Debian===&lt;br /&gt;
WIP&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
Here will be an example of how to use a chroot.&lt;/div&gt;</summary>
		<author><name>BlackLotus</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Software_management&amp;diff=6086</id>
		<title>Software management</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Software_management&amp;diff=6086"/>
		<updated>2012-01-29T16:47:25Z</updated>

		<summary type="html">&lt;p&gt;BlackLotus: /* Using Busybox */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a draft&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to run glibc programs under alpine there are a few ways to do so.You could install glibc additional to uclibc (you would have to do this manualy) or you could do the easy way and use a chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
Because there are different usecases I want to give a slight overview about what&#039;s possible and what is intelligent.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Your options==&lt;br /&gt;
===Using Busybox===&lt;br /&gt;
First the most simple approach for setting up a chroot is using a glibc build of busybox.&amp;lt;br&amp;gt;&lt;br /&gt;
This approach has just a few downsides:&amp;lt;br&amp;gt;&lt;br /&gt;
- You have to link most /bin/ and /usr/bin program against /bin/busybox and some busybox builds break if you don&#039;t configure it right.&amp;lt;br&amp;gt;&lt;br /&gt;
- You have to manually download every library you need for your program manually.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
But if you want a small enviroment for one simple use case this is the solution you want.&lt;br /&gt;
&lt;br /&gt;
===Using a livecd===&lt;br /&gt;
If you prefer any special distri you can always download and extract a livecd and use it as a chroot enviroment.&lt;br /&gt;
&lt;br /&gt;
===Using a stage3 gentoo archive===&lt;br /&gt;
This is the fastest approach and you have the advantage of controlling which package version of which library you will install.&amp;lt;br&amp;gt;&lt;br /&gt;
Drawbacks are as follow:&amp;lt;br&amp;gt;&lt;br /&gt;
- Big build.You have to install a portage tree which uses up a lot of space.(It&#039;s not 100% necessary if you don&#039;t have to install any additional content you don&#039;t need it)&amp;lt;br&amp;gt;&lt;br /&gt;
- On slow mashines not recommended because you have to compile your packages.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using Archlinux or Debian===&lt;br /&gt;
If you want a nice running system you can install Arch or Debian in a chroot.This approach isn&#039;t as easily executed as the other alternatives, but are in my opinion the cleanest and most recommended for the every day user.&lt;br /&gt;
&lt;br /&gt;
==How to do it==&lt;br /&gt;
Like I said this is just a quick draft so here it comes.&lt;br /&gt;
===Using Busybox===&lt;br /&gt;
First we need to download busybox.You can choose any of your favourit distros to download a prebuild version.I for instance would use Archlinux packages from http://www.archlinux.org/packages/community/i686/busybox/.&amp;lt;br&amp;gt;&lt;br /&gt;
 wget http://www.archlinux.org/packages/community/i686/busybox/download/ -O busybox.pkg.tar.xz&lt;br /&gt;
 wget http://www.archlinux.org/packages/core/i686/glibc/download/ -O glibc.pkg.tar.xz&lt;br /&gt;
 for i in *.pkg.tar.xz;do&lt;br /&gt;
 bsdtar xfJ $i -C ~/chroot&lt;br /&gt;
 done&lt;br /&gt;
 mkdir -p ~/chroot/usr/bin/ ~/chroot/{dev,proc,root,etc}&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/sh&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/ln&lt;br /&gt;
 sudo chroot ~/chroot/ /bin/sh&lt;br /&gt;
&lt;br /&gt;
This creates a simple chroot enviroment which we will expand through all commands included in busybox.&lt;br /&gt;
 for i in $(busybox --list);do ln -s /bin/busybox /usr/bin/$i;done&lt;br /&gt;
&lt;br /&gt;
===Using a livecd===&lt;br /&gt;
WIP&lt;br /&gt;
&lt;br /&gt;
===Using a stage3 tar archive===&lt;br /&gt;
Select a mirror from http://www.gentoo.org/main/en/mirrors2.xml , switch to /releases/x86/current-stage3/ and download the latest tar ball (for me stage3-i686-20120124.tar.bz2 ).&lt;br /&gt;
 wget http://de-mirror.org/gentoo/releases/x86/current-stage3/stage3-i686-20120124.tar.bz2&lt;br /&gt;
 mkdir ~/chroot&lt;br /&gt;
 tar xfj stage3-i686-*.tar.bz2 -C ~/chroot&lt;br /&gt;
 sudo chroot ~/chroot&lt;br /&gt;
And voila you got your working gentoo chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
You can now take a look at http://www.gentoo.org/doc/en/?catid=desktop to find out how you can configure and install your system or simply extract/copy the program you need to run in your chroot enviroment and execute it.&lt;br /&gt;
&lt;br /&gt;
===Using Archlinux or Debian===&lt;br /&gt;
WIP&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
Here will be an example of how to use a chroot.&lt;/div&gt;</summary>
		<author><name>BlackLotus</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Software_management&amp;diff=6085</id>
		<title>Software management</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Software_management&amp;diff=6085"/>
		<updated>2012-01-29T16:03:15Z</updated>

		<summary type="html">&lt;p&gt;BlackLotus: How to set up a 32bit chroot with glibc under Alpine&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a draft&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to run glibc programs under alpine there are a few ways to do so.You could install glibc additional to uclibc (you would have to do this manualy) or you could do the easy way and use a chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
Because there are different usecases I want to give a slight overview about what&#039;s possible and what is intelligent.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Your options==&lt;br /&gt;
===Using Busybox===&lt;br /&gt;
First the most simple approach for setting up a chroot is using a glibc build of busybox.&amp;lt;br&amp;gt;&lt;br /&gt;
This approach has just a few downsides:&amp;lt;br&amp;gt;&lt;br /&gt;
- You have to link most /bin/ and /usr/bin program against /bin/busybox and some busybox builds break if you don&#039;t configure it right.&amp;lt;br&amp;gt;&lt;br /&gt;
- You have to manually download every library you need for your program manually.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
But if you want a small enviroment for one simple use case this is the solution you want.&lt;br /&gt;
&lt;br /&gt;
===Using a livecd===&lt;br /&gt;
If you prefer any special distri you can always download and extract a livecd and use it as a chroot enviroment.&lt;br /&gt;
&lt;br /&gt;
===Using a stage3 gentoo archive===&lt;br /&gt;
This is the fastest approach and you have the advantage of controlling which package version of which library you will install.&amp;lt;br&amp;gt;&lt;br /&gt;
Drawbacks are as follow:&amp;lt;br&amp;gt;&lt;br /&gt;
- Big build.You have to install a portage tree which uses up a lot of space.(It&#039;s not 100% necessary if you don&#039;t have to install any additional content you don&#039;t need it)&amp;lt;br&amp;gt;&lt;br /&gt;
- On slow mashines not recommended because you have to compile your packages.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using Archlinux or Debian===&lt;br /&gt;
If you want a nice running system you can install Arch or Debian in a chroot.This approach isn&#039;t as easily executed as the other alternatives, but are in my opinion the cleanest and most recommended for the every day user.&lt;br /&gt;
&lt;br /&gt;
==How to do it==&lt;br /&gt;
Like I said this is just a quick draft so here it comes.&lt;br /&gt;
===Using Busybox===&lt;br /&gt;
First we need to download busybox.You can choose any of your favourit distros to download a prebuild version.I for instance would use Archlinux packages from http://www.archlinux.org/packages/community/i686/busybox/.&amp;lt;br&amp;gt;&lt;br /&gt;
 wget http://www.archlinux.org/packages/community/i686/busybox/download/ -O busybox.tar.xz&lt;br /&gt;
 mkdir -p ~/chroot/usr/bin/ ~/chroot/{dev,proc,root,etc}&lt;br /&gt;
 bsdtar xfJ busybox.tar.xz -C ~/chroot&lt;br /&gt;
 rm busybox.tar.xz&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/sh&lt;br /&gt;
 ln -s /bin/busybox ~/chroot/bin/ln&lt;br /&gt;
 sudo chroot ~/chroot/ /bin/sh&lt;br /&gt;
&lt;br /&gt;
This creates a simple chroot enviroment which we will expand through all commands included in busybox.&lt;br /&gt;
 for i in $(busybox --list);do ln -s /bin/busybox /usr/bin/$i;done&lt;br /&gt;
&lt;br /&gt;
===Using a livecd===&lt;br /&gt;
WIP&lt;br /&gt;
&lt;br /&gt;
===Using a stage3 tar archive===&lt;br /&gt;
Select a mirror from http://www.gentoo.org/main/en/mirrors2.xml , switch to /releases/x86/current-stage3/ and download the latest tar ball (for me stage3-i686-20120124.tar.bz2 ).&lt;br /&gt;
 wget http://de-mirror.org/gentoo/releases/x86/current-stage3/stage3-i686-20120124.tar.bz2&lt;br /&gt;
 mkdir ~/chroot&lt;br /&gt;
 tar xfj stage3-i686-*.tar.bz2 -C ~/chroot&lt;br /&gt;
 sudo chroot ~/chroot&lt;br /&gt;
And voila you got your working gentoo chroot.&amp;lt;br&amp;gt;&lt;br /&gt;
You can now take a look at http://www.gentoo.org/doc/en/?catid=desktop to find out how you can configure and install your system or simply extract/copy the program you need to run in your chroot enviroment and execute it.&lt;br /&gt;
&lt;br /&gt;
===Using Archlinux or Debian===&lt;br /&gt;
WIP&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
Here will be an example of how to use a chroot.&lt;/div&gt;</summary>
		<author><name>BlackLotus</name></author>
	</entry>
</feed>