I've been playing with a couple raspberry pi 2's, on which I've installed slackwarearm-current following the guide at http://rpi2.fatdog.eu/. I really like them, much more usable than the older B+ model with another 3 cores and 1GB ram.
To automate the process and approximate a Salix 'core' install (which saves a lot of time in comparison to a full slackware installation), I manually created custom tagfiles which match the core package set as closely as possible (setting those packages listed in the 'core' folder of the iso with the ":ADD" tag, and everything else with ":SKP"). This works fairly well, and the goodies such as salixtools are easy enough to install manually after completion.
Now, I'd like to try approximating a 'basic' install in the same way. However, I've found that manually editing the tagfiles is not something I enjoy doing, as well as the fact that there are quite a few extra packages in 'basic' it would take a lot longer in any case, not forgetting that slackware-current is a moving target, with packages potentially being added/removed over time. So, I spent last night working on some bash commands to help automate the process:
Code: Select all
#Mount a salix iso
mkdir salix64
sudo mount -o loop salix64-xfce-14.1.iso salix64
#List packages in core and basic and write to a file
ls salix64/salix/{basic,core} | grep txz | sort -d > basic-install.txt
#Strip everything but the package names from basic-install.txt
#(there must be an easier way to do this, but it works)
sed -i 's/-[^-]*$//' basic-install.txt
sed -i 's/-[^-]*$//' basic-install.txt
sed -i 's/-[^-]*$//' basic-install.txt
#Retrieve the necessary directories and tagfiles from a mirror
mkdir -p slackwarearm-currrent/slackware
rsync -rav --include=*/ --include=tagfile --exclude=* ftp.arm.slackware.com::slackwarearm/slackwarearm-current/slackware/ slackwarearm-current/slackware/
#Remove all ADD/REC/OPT tags from tagfiles, and add the :SKP
#flag to every line
for i in `find slackwarearm-current/slackware/ -type f`; do
sed -i 's/:[^:]*$/:SKP/' $i ; done
#To make the lines in basic-install.txt match what is now in
#the tagfiles, we add :SKP to every line
sed -i "s/$/:SKP/" basic-install.txt
#Now we can match all lines between the tagfiles and
#basic-install.txt, and set the :ADD flag to those lines
for file in `find slackwarearm-current/slackware/ -type f`; do
for i in `grep -x -f 'basic-install.txt' $file | tr -d ":SKP"`; do
sed -i "s/${i}:[^:]*$/${i}:ADD/" $file;
done;
done
There may be plenty of problems with this approach that I'm not aware of (feel free to share ideas/opinions!), but from what I can see the only problem I have now is if there are entries in basic-install.txt that do not match any entries in the tagfiles, and I haven't found a way to list these entries in an automated fashion via the CLI. Maybe I'm having a mental block from staring at this for so long, or maybe I'm just out of my depth. Well, actually I am

Thanks in advance
