I would like to tell you guys that im working on a package manager that
you might be interested in.

It is very similar to apkg (the Nathan Angelacos modified one) and is
actually originally designed to be a replacement for apkg.

I call it apk-tools.

It is inspired by apkg and BSD packages. It is supposed to have the
simplicity of apkg (basicly a tar.gz package with some extra metadata),
run on RAM based mini linux, shell based (im using busybox), doing
backups for local configs, but at the same time has almost the same
power as bsd's packages with recursion, http repositories, pre/post
install scripts etc etc.

The metadata is very similar apkg, vith some files in /var/lib/apkdb.
The difference is that files are compressed into
a /var/lib/apkdb/package-version.meta.tar.gz format. I chosed to
compress it since I have heard of problems with too big meta data on
apkg systems.

the tools are similar to pkg_add with friends in bsd:
apk_add
apk_delete
apk_info

Here is an example how they are used:

~ # apk_info -h
apk_info 0.0.1_unstable_beta3
Usage: apk_info [ -a | -h ] | [-L | -c ] PACKAGE
  -a     List all installed packages
  -h     Display this help
  -L     List contents of PACKAGE
  -c     Check sha1 sums of package

Lets see whats installed.

~ # apk_info
openssh-4.0_p1
openssl-0.9.7e
zlib-1.2.2

Lets add a package file.

~ # mount /media/cdrom/
~ # apk_add /media/cdrom/pkgs/dnrd-2.19.apk
~ # apk_info
dnrd-2.19
openssh-4.0_p1
openssl-0.9.7e
zlib-1.2.2

Lets see the contents of installed package.

~ # apk_info -L dnrd
.
./var
./var/lib
./var/lib/apkdb
./var/lib/apkdb/dnrd-2.19.control
./var/lib/apkdb/dnrd-2.19.backuplist
./usr
./usr/sbin
./usr/sbin/dnrd
./etc

Lets check the sha1sums.

~ # apk_info -c dnrd
./var/lib/apkdb/dnrd-2.19.control: OK
./var/lib/apkdb/dnrd-2.19.backuplist: OK
./usr/sbin/dnrd: OK

Lets try to modify some files.

~ # echo "distortion" > /usr/sbin/dnrd
~ # apk_info -c dnrd
./var/lib/apkdb/dnrd-2.19.control: OK
./var/lib/apkdb/dnrd-2.19.backuplist: OK
./usr/sbin/dnrd: FAILED
sha1sum: WARNING: 1 of 3 computed checksums did NOT match

Remove package.

~ # apk_delete dnrd-2.19

Lets use a cdrom repository.

~ # umount /media/cdrom
~ # export APK_PATH=cdrom:/pkgs

Note that the -r is used.

~ # apk_add -rv netcat
Installing netcat-110-r7
~ # apk_info
netcat-110-r7
openssh-4.0_p1
openssl-0.9.7e
zlib-1.2.2

Lets use a http repository.

~ # export APK_PATH=http://192.168.65.250/alpine/apk

and let us install a bunch of packages.

~ # apk_add -rv dnrd haserl libpcap tcpdump
Downloading http://192.168.65.250/alpine/apk/Packages.sha1.gz
Connecting to 192.168.65.250[192.168.65.250]:80
Packages.sha1.gz     100% |*****************************| 11220
00:00 ETA
Downloading http://192.168.65.250/alpine/apk/dnrd-2.19.apk
Connecting to 192.168.65.250[192.168.65.250]:80
dnrd-2.19.apk        100% |*****************************| 22850
00:00 ETA
dnrd-2.19.apk: OK
Downloading http://192.168.65.250/alpine/apk/haserl-0.7.3.apk
Connecting to 192.168.65.250[192.168.65.250]:80
haserl-0.7.3.apk     100% |*****************************| 19823
00:00 ETA
haserl-0.7.3.apk: OK
Downloading http://192.168.65.250/alpine/apk/libpcap-0.8.3-r1.apk
Connecting to 192.168.65.250[192.168.65.250]:80
libpcap-0.8.3-r1.apk 100% |*****************************| 61345
00:00 ETA
libpcap-0.8.3-r1.apk: OK
Downloading http://192.168.65.250/alpine/apk/tcpdump-3.8.3-r1.apk
Connecting to 192.168.65.250[192.168.65.250]:80
tcpdump-3.8.3-r1.apk 100% |*****************************|   173 KB
00:00 ETA
tcpdump-3.8.3-r1.apk: OK
Installing dnrd-2.19
Installing haserl-0.7.3
Installing libpcap-0.8.3-r1
Installing tcpdump-3.8.3-r1

I have manually changed a package on http server so we can test sha som
on packages. Also note that the package "database", Packages.sha1.gz is
not downloaded this time. The cached version is used. This file is
simply a compressed sha1sum list.

~ # apk_add -rv ipsec-tools
Downloading http://192.168.65.250/alpine/apk/ipsec-tools-0.4.apk
Connecting to 192.168.65.250[192.168.65.250]:80
ipsec-tools-0.4.apk  100% |*****************************|     5
00:00 ETA
ipsec-tools-0.4.apk: FAILED
sha1sum: WARNING: 1 of 1 computed checksums did NOT match
Checksum failed for ipsec-tools!

Let me know if you are interested. I don't have any official hosting
site nor cvs, so I'd need to upload what I got so far somehwere if you
are interested to take a look at it.

Next thing to do is test the ftp:/ module and write a ssh:/, rsync:/ and
file:/ module for repositries on other protocols. Those modules are easy
to write so there is nothing that prevents a nfs:/ whatever:/ module.

The -r option is supposed to fetch dependencies but that need some work
still.

I have also an apk_backup utility on my todolist for backing up local
configs.

--
Natanael Copa




-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20

_______________________________________________
leaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/leaf-devel

Reply via email to