pkg.installer - addon to free space on your floppy disk [INACTIVE]

Here we discuss compilation and how to build an addon for BFW.

pkg.installer - addon to free space on your floppy disk

Mensagempor tarsius » Dom Jan 07, 2007 5:53 pm

BrazilFW Linux pkg.Installer for On-line/ On-Demand package installation

download from here: http://www.brazilfw.com.br/users/tarsiu ... kginst.tgz

This package is for HDD installations and for Floppy installations... it works the same way with both versions....

CAUTION: this package DOESN'T ALLOW YOU to install packages that make use of databases such as rrdstats or those who has their own config file which is not coyote.conf, for these last ones an addon called PKGBACKUP ( http://www.brazilfw.com.br/users/tarsiu ... backup.tgz ) could be used if those packages save their config somewhere in /etc/config directory...
basically pkgbackup saves EVERYFILE on /etc/config although sometimes it doesn't work either...)

Here there is a list of INCOMPATIBLE packages:
-rrdstats
-rrdtools
-l7-qos

(THIS doesn't mean you can't use them together... you CAN install them using the traditional method AND ALSO have pkg.installer for other packages...)

Version 0.4 of this Manual
Version 1.2 of pkg.installer

1.0- Description
1.1- Files Included
1.2- Features
2.0- Installation
2.1- Configuration
3.0- Usage
3.1- Boot-time
3.2- Runtime
3.3- Webadmin
4.0- FAQ


1.0- Description

This package allows you to download and install addons during runtime.
It also allows you to download and install addons during boot-time,
so that you can erase every package from the floppy and install
them into BFW during boot-time or runtime, freeing some space on the
floppy disk.


1.1- Files Included

/bin/pkg.installer: contains the script itself
/etc/rc.d/pkgs/rc.pkginst: script to launch the main script at
boot-time
/etc/coyote/pkg-all: list of available packages through different
servers

NOTE: you MAY find DIFFERENT packages versions on different
servers!!!!

/var/lib/lrpkg/pkginst.list: the list of files of this package
/var/lib/lrpkg/pkginst.version: the version of the installed
pkg.installer
/var/lib/lrpkg/pkginst.help: this help file
/var/lib/lrpkg/pkginst.configs: configuration parameters list


1.2- Features

- Supports downloading from different servers, reducing the chance of
not being able to download a package
- Ability to load packages during runtime
- Ability to load packages during boottime
- As long as you have memory available you can load more than 1.44 MB in packages
- Easy Webadmin control

2.0- Installation

Erase every package file from your floppy (EXCEPT dhcpd.tgz,
root.tgz, etc.rgz and modules.tgz), then download this file:

http://www.brazilfw.com.br/users/tarsiu ... kginst.tgz

and copy it into the floppy disk, boot your BFW and go to item 3.1
on this manual.

2.1- Configuration
Configuration parameters are kept in:
/etc/coyote/coyote.conf

Here is the list of parameters and their descriptions:

PKGINST_SOURCES
default value:"http://www.brazilfw.com.br/downloads/addons http://cablemodem.fibertel.com.ar/brazilfw/addons http://www.tarsius.com.ar/addons"
(WITH QUOTES)
This is the list of sources of the packages, feel free to change it
if you need to

PKGINST_SAVELOG
default value:yes
Change it to "no" if you don't want to save the log

PKGINST_RUN_AT_BOOT
default value:yes
If set to "yes" pkg.installer will run at boot and load selected
packages in PKGINST_PKG_LST

PKGINST_LOG
default value:/var/log/pkginst.log
This file contains a log of pkg.installer actions when PKGINST_SAVELOG
is set to "yes"

PKGINST_PKG_LST
default value:"webadmin"
(WITH QUOTES)
This parameter keeps the list of packages to be downloaded during boot
or when pkg.installer is called without parameters. You can add
the packages you want to download here...BUT REMEMBER, if you delete
webadmin.tgz from floppy you must have it here.. otherwise webadmin
won't be availible...
Here's an example:

PKGINST_PKG_LST="libpthread,webadmin,sslwrap,upnp"

ALWAYS PUT LIBRARIES FIRST otherwise some addons may not work...

This example will install pthread library, with webadmin, upnp support
and sslwrap to access webadmin from the internet


3.0- Usage

There are two ways to use this script:
3.1- Boot-time
Write down the names of the packages you want to install
during boot-time onto PKGINST_PKG_LST parameter, change
PKGINST_RUN_AT_BOOT to yes and backup the floppy. If you
don't know how to do this open webadmin, go to "Configuration
Files > BrazilFW Main Configuration File" and type those
parameters as it is explained in "2.1 Configuration" section,
then backup and then reboot

There's a full list of availible packages webadmin > install
new addons > Available Packages

DON'T FORGET TO BACKUP UP YOUR CONFIG BEFORE RESTARTING

WARNING: you must ALWAYS put LIBRARIES FIRST, otherwise some
add-ons may not work properly.


3.2- Runtime
Open a SSH Client and type "pkg.installer" to install all the
packages listed in PKGINST_PKG_LST parameter
If you would like to install a certain package type:
pkg.installer thepackagename.tgz
and that will install the package "thepackagename", you
can also do something like this:
pkg.installer package1 package2.tgz package3
(as you can see .tgz extension can be ommited)
and so on...

DON'T FORGET TO BACKUP UP YOUR CONFIG BEFORE RESTARTING

WARNING: you must ALWAYS put LIBRARIES FIRST, otherwise some
add-ons may not work properly.

3.3- Webadmin
I Think webadmin control itself explains everything quite
good, the only "weird" thing is the option:
Install "Selected Packages"
This option installs the packages that you selected to be
installed during boot-time... that's what "Selected
Packages" means....

4.0- FAQ

4.1- Configuration is lost everytime you restart BFW?
No, it doesn't. Add-ons save their config into
/etc/coyote/coyote.conf and this file is saved each time
you do a backup.

4.2- If I download an addon of more than 1.44 MB, my floppy disk
would crash?
No! it won't, since packages are NOT saved into the floppy
disk, even when they have been downloaded and installed.
Only their config is saved and a few text files won't
fill the floppy disk.

4.3- Where does pkg.installer install the packages?
It installs them into the Virtual Disk created using
RAM memory during the boot process, just as BFW does when
it boots...
Yes, the more memory you have, the more packages you can
install...

4.4- Does pkg.installer work with any connection?
I don't know that yet, I was hoping you could tell me :P.
It should work but I don't know if BFW gives enough time
between enabling the internet connection and launching
this script.
Cablemodem connections work fine since they are always
online.

4.5- Can I add a different server to PKGINST_SOURCES list?
Yes, you can... just keep in mind what "2.1 Configuration"
section says about this parameter...(I mean, the "quotes"
thing, but only if you're editing coyote.conf directly)
The best way to do this is through webadmin

4.6- Pkg.Installer configuration is lost everytime I update
Pkg.Installer?
No, it doesn't because it's saved into coyote.conf file
which is BFW main configuration file.
Editado pela última vez por tarsius em Seg Fev 19, 2007 1:26 am, em um total de 8 vezes.
tarsius
 

Mensagempor nachazo » Dom Jan 07, 2007 7:57 pm

Did you see claudio?

We can use a flopy with lot of add-ons!!!

thanks tarsius!
nachazo
 

Mensagempor Claudio » Dom Jan 07, 2007 9:55 pm

Good ideia. Very nice!!!!

:aplause: :aplause: :aplause: :aplause:
Não dou suporte via mensagem privada e e-mail.
Por favor, não insista.
Avatar do usuário
Claudio
BFW Founder
BFW Beneméritos
 
Mensagens: 7553
Registrado em: Qui Ago 25, 2005 9:10 am
Localização: Vitória - ES - Brasil
BrazilFW Box:

Mensagempor Juanillo » Ter Jan 09, 2007 4:33 pm

And if you have many BFW, then you must update the addons only in one site !!!

:aplause: :aplause: :aplause: :aplause:
Juanillo
 

Mensagempor tarsius » Qua Jan 10, 2007 2:20 am

exactly... im improving it... now i have a better version (better code)... as soon as i finish some things i'll upload the new version and i'll let you know through here....

i have also started the "bfw updater" ... i haven't tried it since i wrote the script and before i could back it up the light went off and i lost everything .... but don't worry.. i'll have it soon :D...

i don't know why nobody tried to do something like this before :S...
tarsius
 

Mensagempor nachazo » Qua Jan 10, 2007 1:36 pm

I´m working in a auto updater for hard disk intalations... With special updates... Like Midnight commander, htop, nmap, and other kind of tools...

Regards.
nachazo
 

Mensagempor tarsius » Qua Jan 10, 2007 8:05 pm

but... why hard disk!?!? :P... ok.. i'll keep doing this for floppy version... read you PMs...
tarsius
 

Mensagempor eric520 » Ter Jan 16, 2007 2:21 am

Good ideal for Floppy BFW. dancing
How about If some package(*.tgz) need to write back parameter or RSA key?

If the following idea workable.

1.put the package(*.tgz) to my local FTP server.
2.when Booting ,Floppy BFW use FTP client(ftp.tgz) to download all package form local FTP server.
3.When backup ,Floppy BFW use FTP client writeback all package(loading from FTP) to local FTP server.
eric520
 

Mensagempor tarsius » Ter Jan 16, 2007 1:12 pm

mmm if the parameter is written on /etc/coyote then it is saved by my package... this is a new feature, the file on my server doesn't have it yet.... but the idea is that everything on /etc/coyote is backup...

about RSA key.. i don't know :S... i know little about RSA...

your idea is very much like SLAX's config save feature.... but who is gonna pay for that space? ... and, i think it represents quite a high load if eevery BFW uses a single FTP.... it's better on the floppy...
tarsius
 

Mensagempor eric520 » Qua Jan 17, 2007 12:03 pm

Not every package put in FTP server the same with your design dhcpd.tgz,
root.tgz, etc.rgz and modules.tgz stall put in Floppy.
The FTP server shall put in loacl network ,I think not so much loading to the FTP server .
I am studying your package now. try to do my idea.
eric520
 

Mensagempor pump » Qua Jan 17, 2007 12:15 pm

Wow, it's very useful. But the localftp idea I think it's more stable as if you have some problem with accessing that page you can't boot your brazil.
Other idea could be adding 2 or 3 mirrors of the packages, hosted on diferent places.

By the way, how did you allow dir listing on your fibertel host account? I was trying to do that yesterday when I opened my account for ledstatus but I couldn't.
pump
 

Mensagempor tarsius » Qua Jan 17, 2007 1:00 pm

eric520,
yes but... everyone must have a local ftp! which is not very likely.... the idea of a ftp server instead http server is viable...

pump,
the 2 or 3 mirrors thing too... i think it's easy, i have some ideas....


pump,
my fibertel host account doesn't have dir listing... i have 10 MB on a fibertel host (which is not my computer) and i can't do anything with it but adding or removing files.... (so far you already know this :P) so what i did was a "fake" dir listing page so that everyone could see what's in it....

sorry for the "delay' on the development... i have many ideas yet but i went on holidays for the weekend and i didn't do anything else... now i'm back to go on with this :D....

... thanks for the ideas!
tarsius
 

Mensagempor Claudio » Qua Jan 17, 2007 1:03 pm

I think to store configurations to any ftp server is not a good ideia.

It's not recommended to store configurations inside the .tgz file. This makes the system harder to upgrade. Add-ons should store their configurations inside coyote.conf file or creating files in a:\config folder. However this depends on each add-on author.

Probably, this is my fault, because i've never had time to write a good set of rules about how to build add-ons.

Some add-ons has build-in databases (ex: rrd, ifacc/ifacc) they need to be rewritten to store their data on the hd partition. This kind of add-on are not likely be used with pkg.installer.
Não dou suporte via mensagem privada e e-mail.
Por favor, não insista.
Avatar do usuário
Claudio
BFW Founder
BFW Beneméritos
 
Mensagens: 7553
Registrado em: Qui Ago 25, 2005 9:10 am
Localização: Vitória - ES - Brasil
BrazilFW Box:

Mensagempor pump » Qua Jan 17, 2007 2:01 pm

tarsius escreveu:pump,
the 2 or 3 mirrors thing too... i think it's easy, i have some ideas....


pump,
my fibertel host account doesn't have dir listing... i have 10 MB on a fibertel host (which is not my computer) and i can't do anything with it but adding or removing files.... (so far you already know this :P) so what i did was a "fake" dir listing page so that everyone could see what's in it....

Yes, I have 20mb (they came with the 2.5/256 plan) but I could't find how to make that. Now I'll do a small page to show the file. Thanks.


The mirror stuff I think would be useful, and maybe you are running an apache on the network that you can use it as a "local mirror".
pump
 

Mensagempor tarsius » Dom Jan 21, 2007 3:13 am

Hey hey... new version came out! :D... read the first post to see it....

oh.. i forgot to do the changelog... mmm... i'll do it later... but basically:

- Config is saved in coyote.conf file instead of 3 different files
- a lot of fixes and improvements
tarsius
 

Mensagempor tarsius » Qua Jan 24, 2007 2:50 am

new version.. 1.0 came out....

changelog:
-code cleaned
-WEBADMIN!!!
tarsius
 

Mensagempor tarsius » Ter Fev 13, 2007 10:43 pm

new version 1.2

changelog:
-log improved
-webadmin improved, now it has a better interface

by now this is all I wanted to do with this package... (unless someone finds a bug somewhere)
if it is useful then someone can upload it to downloads section...
tarsius
 

Mensagempor Leandro » Qua Mar 07, 2007 3:53 pm

Hi tarsius,

I'm using a pkg.intaller 1.4 end i cant instaler squid, the others addons install no problem.

Here a sources list:

http://www.brazilfw.com.br/users/tarsius/addons
http://www.brazilfw.com.br/downloads/addons
http://www.brazilfw.com.br/downloads/addons/test
http://www.jornadas2006.com.ar/brazilfw/addons


Here a list of addons:

libncurses,libpcap,libpthread,iptraf,ipupdate,scp,squid,upnp,webadmin,webputty

Sorry my bad english, but a think you undertend


Here is the log:

Código: Selecionar todos
--STARTING PKG.INSTALLER 1.4---
Download Additional Packages...
Downloading squid from http://www.brazilfw.com.br/users/tarsius/addons...wget: server returned error 404: HTTP/1.1 404 Not Found
ERROR, Retrying from different source
Downloading squid from http://www.brazilfw.com.br/downloads/addons...wget: server returned error 404: HTTP/1.1 404 Not Found
ERROR, Retrying from different source
Downloading squid from http://www.brazilfw.com.br/downloads/addons/test...wget: server returned error 404: HTTP/1.1 404 Not Found
ERROR, Retrying from different source
Downloading squid from http://www.jornadas2006.com.ar/brazilfw/addons...wget: server returned error 404: HTTP/1.0 404 Not Found
ERROR, Retrying from different source
ls: *.tgz: No such file or directory
No File was downloaded, maybe your connection is down,
or maybe you havent't selected any package, or maybe
your server list if blank.
Leandro
 

Mensagempor tarsius » Qua Mar 07, 2007 4:11 pm

first, you should erase the source "http://www.jornadas2006.com.ar/brazilfw/addons " cause it's no longer online

now, back to your problem, the thing is that the script can't find squid.tgz on any server... and he's right!! cause squid is on testing directory of bfw downloads... you should change this on sources:

Código: Selecionar todos
http://www.brazilfw.com.br/downloads/addons/test

into this:
Código: Selecionar todos
http://www.brazilfw.com.br/downloads/test/


now it should work...
tarsius
 

Mensagempor Leandro » Qua Mar 07, 2007 5:04 pm

Man, really sorry, this is a stupid question.

this is a fault attention.
Leandro
 

Mensagempor tarsius » Qua Mar 07, 2007 6:03 pm

don't worry, it has happend to me many times (i've changed the code of this package so many times that i got lost between what i have done and what i was planning to do :P)

pd: thanks for the feedback!
tarsius
 


Voltar para Add-On Factory

Quem está online

Usuários navegando neste fórum: Nenhum usuário registrado e 6 visitantes