You are not logged in.

#1 2010-05-10 17:15:28

Tomi
Member
Registered: 2008-09-06
Posts: 9

HAI (Home Arch Install) - install packages without root account

HAI, or Home Arch Install, can "install" and run Arch Linux programs from your normal user account. (Even if you don't run Arch Linux at all - see the config file.)

HAI's design is heavily inspired by Zero Install, but it uses Arch Linux packages instead of a new package format. This means you can make use of Arch's extensive package database, right now.

HAI follows the KISS and worse-is-better philosophies. HAI is implemented as a set of specialized bash scripts, with under 500 lines of code in total, so it's not that hard to read, understand and extend.

HAI doesn't really install the packages it downloads - it uses fakechroot and unionfs-fuse to fool the program you run into thinking it's installed in /usr.

Quick start guide:

1. Download HAI from http://www.smnd.sk/tomi/hai/hai-1.1.tar.gz . (The address might eventually change, so please don't link to it directly.)
2. HAI doesn't need system-wide installation. Just unpack it somewhere.
3. Put this in your ~/.bashrc file: "alias hai=~/your/directory/with/hai". This allows you to run hai without typing the path.
4. Run "./bootstrap" from HAI's directory. This downloads dependencies HAI itself needs. (You need FUSE already installed, though.)
5. Try it:

hai bwm-ng
hai frozen-bubble
hai pysolfc pysolfc-cardsets -- pysol
hai inkscape -- inkscape somefile.svg
# in general: hai (what packages to install) -- (what program to run)

HAI comes with a README.txt file. You really should read it, it's short and if you've read this far, you already know most of it.

I've been working on HAI for two months and it's finally reached a state bug-free and elegant enough that it satisfies my prefectionism. I developed HAI to scratch my own itch, but please tell me if you try HAI, or perhaps even find it useful! I'd also like to know about any bugs you experience or feature requests you might have. If you find something in the documentation that could use clarifying, tell me as well.

(Update 2010-05-11: hai-1.1 fixes a bug when downloading from AUR and switches from tar to bsdtar, because tar acts up when downloading xz-compressed packages. For now, bsdtar has to be installed on the local system.)

Last edited by Tomi (2010-05-11 10:35:44)

Offline

#2 2010-05-10 19:05:17

Busata
Member
From: Belgium
Registered: 2010-04-04
Posts: 28
Website

Re: HAI (Home Arch Install) - install packages without root account

hai2u2! nice work, will suggest this to non arch believers :-)

Offline

#3 2010-05-19 12:55:46

SanskritFritz
Member
From: Budapest, Hungary
Registered: 2009-01-08
Posts: 1,633
Website

Re: HAI (Home Arch Install) - install packages without root account

Nice work, I'll definitely try this. It has a very nice GoboLinux feeling smile


zʇıɹɟʇıɹʞsuɐs AUR || Cycling in Budapest with a helmet camera || Revised log levels proposal: "FYI" "WTF" and "OMG" (John Barnette)

Offline

#4 2010-05-19 17:12:45

tavianator
Member
From: Waterloo, ON, Canada
Registered: 2007-08-21
Posts: 858
Website

Re: HAI (Home Arch Install) - install packages without root account

Tried it on a fedora install, and got this:

/tmp/ccGIp2is.o: In function `main':
vercmp.c:(.text+0x27b): undefined reference to `alpm_pkg_vercmp'
collect2: ld returned 1 exit status

Also, it would be nice if it didn't rely on rsync for fakechroot (my work firewall blocks rsync).  Other than that though, I really like it!

Offline

#5 2010-05-19 17:39:44

Tomi
Member
Registered: 2008-09-06
Posts: 9

Re: HAI (Home Arch Install) - install packages without root account

You noticed that correctly - GoboLinux was one of HAI's major inspirations, along with klik and 0install :-) The final design is closest to 0install, though.

If you try HAI and like it, please spread the word! It is the first project I completed and released as open source, so I'm very anxious to get people's reactions.

Also, tell me if anything breaks - not all programs tolerate being in fakechroot. (Which is something I'm currently trying to fix, as much as possible. For such a mature program, fakechroot has a lot of bugs, its handling of symlinks in particular.)

Offline

#6 2010-05-19 17:51:23

tavianator
Member
From: Waterloo, ON, Canada
Registered: 2007-08-21
Posts: 858
Website

Re: HAI (Home Arch Install) - install packages without root account

Fixed it: the definition of alpm_pkg_vercmp() is in lib/libalpm/version.c, not lib/libalpm/package.c.  The file `bootstrap' wgets the wrong path.

Last edited by tavianator (2010-05-19 17:51:31)

Offline

#7 2010-05-19 17:54:45

Tomi
Member
Registered: 2008-09-06
Posts: 9

Re: HAI (Home Arch Install) - install packages without root account

Oops, didn't notice your reply, tavianator. Thanks for the bug reports!

vercmp: That's what I get for assuming libalpm won't change its internal layout... it was working at the time of HAI's release. Thanks for the fix.

rsync: I use it to get the fakechroot PKGBUILD. I could download the whole ABS tree through http, but most of the time it would be a waste... I'll try to think of a compromise.

Using HAI on distros other than Arch isn't very streamlined, though this is something I hope to improve. The SYSTEM_CHECK in the config file needs changing. (It's a program that checks if a package is already installed on the machine.) This line should work (it was tested on Mandriva, which uses rpm too):

SYSTEM_CHECK='local sysver; sysver=`rpm -qa | grep "^\(\|lib\)$requestname" | sort | grep -o "[^-]*-[^-]*$" | grep -o "^[^-]*"` || true; [ "$sysver" ] && version-ok "$sysver" && true'

Update on rsync: The PKGBUILD is in http://repos.archlinux.org/wsvn/package … dl&isdir=1 too, but that link can easily change if Arch switched from websvn to someting else. I'd appreciate a second opinion whether to use rsync or this link.

Last edited by Tomi (2010-05-19 18:21:10)

Offline

#8 2012-05-27 23:58:27

wolf.ram
Member
Registered: 2012-04-15
Posts: 6

Re: HAI (Home Arch Install) - install packages without root account

doesn't work

details: installs packages, but exec fails

Last edited by wolf.ram (2012-05-28 01:31:45)

Offline

#9 2012-05-28 00:10:09

bohoomil
Member
Registered: 2010-09-04
Posts: 2,376
Website

Re: HAI (Home Arch Install) - install packages without root account

Please, check since when the app hasn't been updated...


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

#10 2012-06-19 16:34:39

Barthalion
Developer
From: Poland
Registered: 2010-02-26
Posts: 109

Re: HAI (Home Arch Install) - install packages without root account

I've made one small correction and ugly hack in the code - it should work now*. You can find it here.

* I can't promise: for example gedit or gnac doesn't work. (aka. FIXME)

Last edited by Barthalion (2012-06-19 16:38:51)


Arch Linux - rolling release distro, which users want to downgrade to the previous version

Offline

#11 2012-06-20 17:55:07

wolf.ram
Member
Registered: 2012-04-15
Posts: 6

Re: HAI (Home Arch Install) - install packages without root account

Worked once after package installation --- program started. But when I tried to start program again, with command `hai -- <name>', I got exec error.

Offline

#12 2012-06-20 20:03:54

Barthalion
Developer
From: Poland
Registered: 2010-02-26
Posts: 109

Re: HAI (Home Arch Install) - install packages without root account

Could you tell package name and exact error message?


Arch Linux - rolling release distro, which users want to downgrade to the previous version

Offline

#13 2012-06-20 20:26:13

wolf.ram
Member
Registered: 2012-04-15
Posts: 6

Re: HAI (Home Arch Install) - install packages without root account

Oh, I'm sorry. I guess there is some misunderstanding in command syntax `hai <package_to_install> -- <command_to_run>'
I've thought I should write `hai package_name' to install package and `hai -- command' to exec command. The latter doesn't work, but the former start program if package is installed.
Try skype.
hai -- skype tells `-: line 0: exec: skype: not found'

Last edited by wolf.ram (2012-06-20 20:26:53)

Offline

#14 2012-06-21 04:25:20

Barthalion
Developer
From: Poland
Registered: 2010-02-26
Posts: 109

Re: HAI (Home Arch Install) - install packages without root account

Well, this is how Tomi wrote the script and it's quite logical for me. I can take a look if you want.


Arch Linux - rolling release distro, which users want to downgrade to the previous version

Offline

#15 2012-06-21 04:43:06

roentgen
Member
Registered: 2011-03-15
Posts: 91

Re: HAI (Home Arch Install) - install packages without root account

HAI follows the [...] worse-is-better philosophies

Where did that come from?

Offline

#16 2012-06-21 18:15:12

Barthalion
Developer
From: Poland
Registered: 2010-02-26
Posts: 109

Re: HAI (Home Arch Install) - install packages without root account

I'm not sure if I understand your question correctly, but you can read more about Worse is better on Wikipedia.


Arch Linux - rolling release distro, which users want to downgrade to the previous version

Offline

#17 2012-06-21 18:24:11

Wilco
Member
Registered: 2008-11-09
Posts: 434

Re: HAI (Home Arch Install) - install packages without root account

If it's for a desktop you can just as well run everything as root. But this is a nice option too, maybe I'll try it.

Offline

Board footer

Powered by FluxBB