Hi all.
Unfortunately I cannot be physically present for the weekend but I
have some questions, challenges and maybe even proposals
regarding way of packaging, delivering and installing switchedon sw content.
I was building the transparent proxying & dansguardian setup for web
content filtering purposes and needed a way to pack it together.
It consist of following different things:
a) rpms: squid, dansguardian, libpcreposix0. Out of these dansguardian
is not found from standard SuSe repositories and none of them is
installed automatically with the standard distro setup.
b) customized configuration files for squid & dansguardian that needs
to be copied into place AFTER installing squid & dansguardian
respectively
c) tar.gz arcive containing blacklisted sites/urls. that need to be
copied into place after dansguardia is installed.
=> As a summary: Standard unmodified rpm's & customized content.
=> Need to automate all the steps from rpm-installation to service
startup & configuration.
I decided to do it as follows:
0. Deliver all needed content as tar.gz archive - containing (rpms,
customized copies of config files)
1. Create a local zypper repository (/opt/switchedon) with those 3
needed rpm's (I prefer zypper over yum in SuSe)
2. Install dansguardian with zypper and let zypper install dependency
packages automatically
3. Copy customized versions of squid & dansguardiang config files from
/opt/switchedon to respecitive correct places
4. Start & enable needed services
The way how I automated steps 1 - 4 was with my poor mans installation
framework. (framework is attached)
Framework is based on tasklist-file that contains all commands to be
executed. Framework executes then 1-by-1 and
keeps track of which commands are succesfully executed. If failure is
encountered the execution of tasklist can be
redone and it automatically skips the already succesful steps -
effectively continuing from the failed step.
So in practise I need to do:
0. mkdir /opt/switchedon (if not already present)
1. extract installation framework to /opt/switchedon (if not already present)
2. Extract the delivered stuff into /opt/switchedon
3. Execute switchedon_installer.sh -t setup_dansguardian
4. collect the profit ;)
Based on this my initial proposal for way of delivering SW to
switchedon would be.
1. Use & deliver only official RPMs - no modifications to then (no
custom %pre or %post scripts)
2. rpms and conf files etc content delivered as tar.gz archives
3. tar.gz archives extracted to one directory that is turned into
zypper repository
4. %post scripts implemented as swichedon_installer tasklists that
contain all things from rpm-installation to starting of services.
Then installing certain feature is as simple as:
- copy sw to system
- execute correct tasklist with switchedon installer.
I believe this was really messy description regarding my way of doing
things - and by no means this is the
way the things need to be done. This is just one proposal and opening
of discussion.
I'm happy to share more about the switchedon_installer.sh.