summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2008-11-16 19:06:21 +0100
committerDieter Plaetinck <dieter@plaetinck.be>2008-11-16 19:06:21 +0100
commitaef60a91f36974b2b054cd6f6296615a2553bf4c (patch)
tree5e38e127482fdf1de41924ec25668ad14407d85f
parentd8b38a0768f6e71dec55d4d70d4dca74327a7420 (diff)
updated HOWTO for install using packages, got rid of patch-install-cd script + renamed fifa into aif everywhere
-rw-r--r--HOWTO46
-rw-r--r--README20
-rw-r--r--TODO8
-rwxr-xr-xdevstats.sh2
-rwxr-xr-xsrc/aif.sh (renamed from src/fifa.sh)22
-rw-r--r--src/core/libs/lib-blockdevices-filesystems.sh4
-rw-r--r--src/core/libs/lib-misc.sh6
-rw-r--r--src/core/libs/lib-software.sh4
-rw-r--r--src/core/libs/lib-ui-interactive.sh14
-rw-r--r--src/core/libs/lib-ui.sh2
-rw-r--r--src/core/procedures/base2
-rw-r--r--src/core/procedures/interactive2
-rwxr-xr-xsrc/patch-install-cd.sh21
-rw-r--r--src/runtime/whatsthis.txt2
-rw-r--r--unofficial/whatsthis.txt7
15 files changed, 84 insertions, 78 deletions
diff --git a/HOWTO b/HOWTO
index 0da2d71..b577dab 100644
--- a/HOWTO
+++ b/HOWTO
@@ -1,12 +1,44 @@
-### for unmodified install cd: (TODO: someday, have an iso that has the scripts already) ###
+### This howto explains how to install aif on an installcd that does not have the aif package installed yet ###
+### You can also use this if you want to use another version than what's available on the installcd) ###
+### TODO: someday, have an iso that comes with aif by default) ###
-You can copy-paste the code below when logged in to the install cd
+1) Boot from the installcd
+2) Open 2 shells, one as user root, one as regular user (arch)
+
+3) Decide on a version. See http://aur.archlinux.org/packages.php?K=aif for available packages
+- aif: recommended: latest 'stable' package
+- aif-git: latest from git: very bleeding edge. Might not work as expected!
+I assume you'll pick aif.
+
+4) Copy paste the code below.
+
+# root shell:
/arch/setup. # fake ftp install so it lets you run the network configure script
# when network works, quit installer
-pacman -Sy git # You need about 192MB ram for this! 128MB is not enough.
-git clone git://github.com/Dieterbe/fifa.git /home/arch/tmp
-/home/arch/tmp/src/patch-install-cd.sh # for an 'official' fifa installation
-/home/arch/tmp/src/patch-install-cd.sh unoffocial # for a fifa installation including Dieter's custom, unofficial modules
-/arch/fifa.sh <procedurename> #you can skip networking. See readme on howto specify procedures
+pacman -Sy git fakeroot # You need about 192MB ram for this! 128MB is not enough.
+
+# arch shell
+wget http://aur.archlinux.org/packages/aif/aif.tar.gz
+tar -xzf
+cd aif
+makepkg
+
+# root shell:
+pacman -U /home/arch/aif/aif*.pkg.tar.gz
+
+
+4) Fire it up! (as root)
+
+/arch/aif <procedurename> #you can skip networking. See readme on howto specify procedures
+
+
+
+
+
+
+
+
+
+
diff --git a/README b/README
index e3c7a09..9d8b3d2 100644
--- a/README
+++ b/README
@@ -1,11 +1,11 @@
-FIFA is a Flexible Installer Framework for Arch linux.
+AIF is the Arch Linux Installation Framework..
--- Alpha software. Use at own risk!! ---
Licensce: GPL3. See COPYING.
Author: Dieter Plaetinck
-Homepage: http://github.com/Dieterbe/fifa
+Homepage: http://github.com/Dieterbe/aif
** Goals **
@@ -23,13 +23,13 @@ together to come up with the procedure of your liking.
** File locations (on the install CD): **
-Basically fifa.sh is put in /arch (together with the default installer scripts), while all other fifa-related files belong in /home/arch/fifa
+Basically aif.sh is put in /arch (together with the default installer scripts), while all other aif-related files belong in /home/arch/aif
-* fifa.sh -> /arch/fifa.sh
-* docs -> /home/arch/fifa/docs/
-* core module -> /home/arch/fifa/core
-* user modules -> /home/arch/fifa/user/<module name> (put your own modules here)
-* runtime files -> /home/arch/fifa/runtime (package list etc go here)
+* aif.sh -> /arch/aif
+* docs -> /home/arch/aif/docs/
+* core module -> /home/arch/aif/core
+* user modules -> /home/arch/aif/user/<module name> (put your own modules here)
+* runtime files -> /home/arch/aif/runtime (package list etc go here)
A module can have 2 directories: libs, and procedures.
@@ -54,7 +54,7 @@ Notes:
- don't edit the base procedure (or any other core item), rather make your own. It's easy!
- you're not supposed to define new phases. just override them. logic goes in workers/libariers
-Modules are the building blocks in fifa. They can contain libraries (for
+Modules are the building blocks in aif. They can contain libraries (for
user interfaces, backend logic, etc) and procedures (how an installation
process should go).
The core module comes by default and contains everything 99% of the users
@@ -65,7 +65,7 @@ their names in line with what core has (lib-ui.sh, lib-network.sh etc).
Do not put stuff in the core module yourself! If it's good stuff, it might
be merged into core someday... Also, don't name your custom module 'core' (it will be
ignored anyway). Don't call it http either, because you can specify
-'http://some/path/to/a/procedure', fifa will download that procedure and
+'http://some/path/to/a/procedure', aif will download that procedure and
execute it (and the module will be 'http')
Note that if you load a module and a library has the same function names as
diff --git a/TODO b/TODO
index 43ac54c..b101547 100644
--- a/TODO
+++ b/TODO
@@ -1,9 +1,5 @@
See also the FIXME's and TODO's in the code.
-rename all refs to fifa into aif.
-HOWTO: there are 2 methods now. stable packages and from git, check if
-livecd has makepkg, then we can probably deprecate patch-install-cd.sh
-
ALPHA PHASE: get some people to test and suggest ideas, while fixing bugs and refactoring
General:
* setup bugtracker/roadmap thingie
@@ -36,7 +32,7 @@ not mounted under /mnt
* on boot after fresh install sometimes filesystem creation date is newer then current date -> fsck. sometimes even forced reboot. (i've had this witch /arch/setup too)
* /home doesn't get made separately in automatic installer. it's not formatted in sfdisk or _mkfs'd. is this only in virtualbox or elsewhere too?
-BETA PHASE: try to get fifa on the (beta) installcd as an experimental, alternative installer.
+BETA PHASE: try to get aif on the (beta) installcd as an experimental, alternative installer.
* involve broader community
* fix everything
* if dhcpd already runs for $reason, the installer will try again @ configure network and
@@ -54,7 +50,7 @@ PRODUCTION PHASE: be the primary installer. deprecate /arch/setup and /arch/qui
* core/interactive: when auto-setting up hard disk. show with a bit more detail what is happening (not 'partitioning <disk>' but partitioning, and each FS)
* core/interactive: do pacman -Sy in the background during early phases, to
lessen the wait period before selecting packages
-* write bash completion thing for fifa modules/procedures
+* write bash completion thing for aif modules/procedures
SOMEDAY/MAYBE/RANDOM THOUGHTS:
diff --git a/devstats.sh b/devstats.sh
index 4b6f9f8..8461244 100755
--- a/devstats.sh
+++ b/devstats.sh
@@ -2,5 +2,5 @@ echo "This script doesn't do much, but this could be interesting..."
echo 'Amount of lines:'
echo -n "/arch/setup: " && wget -q -O - 'http://projects.archlinux.org/?p=installer.git;a=blob_plain;f=setup;hb=HEAD' | wc -l
echo -n "/arch/quickinst: " && wget -q -O - 'http://projects.archlinux.org/?p=installer.git;a=blob_plain;f=quickinst;hb=HEAD' | wc -l
-echo "Fifa:"
+echo "Aif:"
find `dirname $0`/src -type f | grep -v whatsthis | xargs wc -l \ No newline at end of file
diff --git a/src/fifa.sh b/src/aif.sh
index d5de3fd..1e23708 100755
--- a/src/fifa.sh
+++ b/src/aif.sh
@@ -1,9 +1,9 @@
#!/bin/bash
###### Set some default variables or get them from the setup script ######
-TITLE="Flexible Installer Framework for Arch linux"
+TITLE="Arch Linux Installation Framework"
LOG="/dev/tty7"
-LOGFILE=/home/arch/fifa/runtime/fifa.log #TODO: maybe we could use a flag to en/disable logging to a file.
+LOGFILE=/home/arch/aif/runtime/aif.log #TODO: maybe we could use a flag to en/disable logging to a file.
###### Miscalleaneous functions ######
@@ -15,8 +15,8 @@ usage ()
If the procedurename starts with 'http://' it will be wget'ed. Otherwise it's assumed to be a procedure in the VFS tree
If the procedurename is prefixed with '<modulename>/' it will be loaded from user module <modulename>. See README\n
Available procedures on the filesystem:
-`find /home/arch/fifa/core/procedures -type f`\n
-`find /home/arch/fifa/user/*/procedures -type f 2>/dev/null`"
+`find /home/arch/aif/core/procedures -type f`\n
+`find /home/arch/aif/user/*/procedures -type f 2>/dev/null`"
echo -e "$msg"
}
@@ -59,8 +59,8 @@ load_module ()
{
[ -z "$1" ] && die_error "load_module needs a module argument"
log "Loading module $1 ..."
- path=/home/arch/fifa/user/"$1"
- [ "$1" = core ] && path=/home/arch/fifa/core
+ path=/home/arch/aif/user/"$1"
+ [ "$1" = core ] && path=/home/arch/aif/core
for submodule in lib #procedure don't load procedures automatically!
do
@@ -89,12 +89,12 @@ load_procedure()
if [ "$1" = 'http:' ]
then
log "Loading procedure $2 ..."
- procedure=/home/arch/fifa/runtime/procedure-downloaded-`basename $2`
+ procedure=/home/arch/aif/runtime/procedure-downloaded-`basename $2`
wget "$2" -q -O $procedure >/dev/null || die_error "Could not download procedure $2"
else
log "Loading procedure $1/procedures/$2 ..."
- procedure=/home/arch/fifa/user/"$1"/procedures/"$2"
- [ "$1" = core ] && procedure=/home/arch/fifa/core/procedures/"$2"
+ procedure=/home/arch/aif/user/"$1"/procedures/"$2"
+ [ "$1" = core ] && procedure=/home/arch/aif/core/procedures/"$2"
fi
[ -f "$procedure" ] && source "$procedure" || die_error "Something went wrong while sourcing procedure $procedure"
}
@@ -107,8 +107,8 @@ load_lib ()
[ -z "$1" ] && die_error "load_library needs a module als \$1 and library as \$2"
[ -z "$2" ] && die_error "load_library needs a library as \$2"
log "Loading library $1/libs/$2 ..."
- lib=/home/arch/fifa/user/"$1"/libs/"$2"
- [ "$1" = core ] && lib=/home/arch/fifa/core/libs/"$2"
+ lib=/home/arch/aif/user/"$1"/libs/"$2"
+ [ "$1" = core ] && lib=/home/arch/aif/core/libs/"$2"
source $lib || die_error "Something went wrong while sourcing library $lib"
}
diff --git a/src/core/libs/lib-blockdevices-filesystems.sh b/src/core/libs/lib-blockdevices-filesystems.sh
index 7c3e17d..ef3bb36 100644
--- a/src/core/libs/lib-blockdevices-filesystems.sh
+++ b/src/core/libs/lib-blockdevices-filesystems.sh
@@ -1,7 +1,7 @@
#!/bin/sh
-TMP_DEV_MAP=/home/arch/fifa/runtime/dev.map
-TMP_FSTAB=/home/arch/fifa/runtime/.fstab
+TMP_DEV_MAP=/home/arch/aif/runtime/dev.map
+TMP_FSTAB=/home/arch/aif/runtime/.fstab
# procedural code from quickinst functionized and fixed.
# there were functions like this in the setup script too, with some subtle differences. see below
diff --git a/src/core/libs/lib-misc.sh b/src/core/libs/lib-misc.sh
index b85e151..f4ae997 100644
--- a/src/core/libs/lib-misc.sh
+++ b/src/core/libs/lib-misc.sh
@@ -14,7 +14,7 @@ run_background ()
debug "run_background called. identifier: $1, command: $2, logfile: $3"
( \
- touch /home/arch/fifa/runtime/$1-running
+ touch /home/arch/aif/runtime/$1-running
debug "run_background starting $1: $2 >>$3 2>&1"
[ -f $3 ] && echo -e "\n\n\n" >>$3
echo "STARTING $1 . Executing $2 >>$3 2>&1\n" >> $3;
@@ -23,7 +23,7 @@ run_background ()
read $var_exit <<< $? #TODO: bash complains about 'not a valid identifier' or something iirc -> maybe fixed now..
debug "run_background done with $1: exitcode (\$$1_exitcode): "${!var_exit}" .Logfile $3" #TODO ${!var_exit} doesn't show anything --> maybe fixed now
echo >> $3
- rm -f /home/arch/fifa/runtime/$1-running
+ rm -f /home/arch/aif/runtime/$1-running
) &
sleep 2
@@ -36,7 +36,7 @@ wait_for ()
{
[ -z "$1" ] && die_error "wait_for needs an identifier to known on which command to wait!"
- while [ -f /home/arch/fifa/runtime/$1-running ]
+ while [ -f /home/arch/aif/runtime/$1-running ]
do
#TODO: follow_progress dialog mode = nonblocking (so check and sleep is good), cli mode (tail -f )= blocking? (so check is probably not needed as it will be done)
sleep 1
diff --git a/src/core/libs/lib-software.sh b/src/core/libs/lib-software.sh
index b9f0fb7..1785e85 100644
--- a/src/core/libs/lib-software.sh
+++ b/src/core/libs/lib-software.sh
@@ -1,7 +1,7 @@
#!/bin/sh
-TMP_MKINITCPIO_LOG=/home/arch/fifa/runtime/mkinitcpio.log
-TMP_PACMAN_LOG=/home/arch/fifa/runtime/pacman.log
+TMP_MKINITCPIO_LOG=/home/arch/aif/runtime/mkinitcpio.log
+TMP_PACMAN_LOG=/home/arch/aif/runtime/pacman.log
# run_mkinitcpio() taken from setup. adapted a lot
# runs mkinitcpio on the target system, displays output
diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh
index b42b5b5..e0c536c 100644
--- a/src/core/libs/lib-ui-interactive.sh
+++ b/src/core/libs/lib-ui-interactive.sh
@@ -227,7 +227,7 @@ interactive_autoprepare()
interactive_mountpoints() {
while [ "$PARTFINISH" != "DONE" ]; do
: >$TMP_FSTAB
- : >/home/arch/fifa/runtime/.parts #TODO: use a variable instead of a file, we don't need to use a file for this
+ : >/home/arch/aif/runtime/.parts #TODO: use a variable instead of a file, we don't need to use a file for this
# Determine which filesystems are available
FSOPTS="ext2 ext2 ext3 ext3"
@@ -245,7 +245,7 @@ interactive_mountpoints() {
if [ "$PART" != "NONE" ]; then
DOMKFS="no"
ask_yesno "Would you like to create a filesystem on $PART?\n\n(This will overwrite existing data!)" && DOMKFS="yes"
- echo "$PART:swap:swap:$DOMKFS" >>/home/arch/fifa/runtime/.parts
+ echo "$PART:swap:swap:$DOMKFS" >>/home/arch/aif/runtime/.parts
fi
_dia_DIALOG --menu "Select the partition to mount as /" 21 50 13 $PARTS 2>$ANSWER || return 1
@@ -257,7 +257,7 @@ interactive_mountpoints() {
FSTYPE=$(cat $ANSWER)
DOMKFS="no"
ask_yesno "Would you like to create a filesystem on $PART?\n\n(This will overwrite existing data!)" && DOMKFS="yes"
- echo "$PART:$FSTYPE:/:$DOMKFS" >>/home/arch/fifa/runtime/.parts
+ echo "$PART:$FSTYPE:/:$DOMKFS" >>/home/arch/aif/runtime/.parts
#
# Additional partitions
@@ -273,23 +273,23 @@ interactive_mountpoints() {
while [ "${MP}" = "" ]; do
_dia_DIALOG --inputbox "Enter the mountpoint for $PART" 8 65 "/boot" 2>$ANSWER || return 1
MP=$(cat $ANSWER)
- if grep ":$MP:" /home/arch/fifa/runtime/.parts; then
+ if grep ":$MP:" /home/arch/aif/runtime/.parts; then
notify "ERROR: You have defined 2 identical mountpoints! Please select another mountpoint."
MP=""
fi
done
DOMKFS="no"
ask_yesno "Would you like to create a filesystem on $PART?\n\n(This will overwrite existing data!)" && DOMKFS="yes"
- echo "$PART:$FSTYPE:$MP:$DOMKFS" >>/home/arch/fifa/runtime/.parts
+ echo "$PART:$FSTYPE:$MP:$DOMKFS" >>/home/arch/aif/runtime/.parts
_dia_DIALOG --menu "Select any additional partitions to mount under your new root" 21 50 13 $PARTS DONE _ 2>$ANSWER || return 1
PART=$(cat $ANSWER)
done
- ask_yesno "Would you like to create and mount the filesytems like this?\n\nSyntax\n------\nDEVICE:TYPE:MOUNTPOINT:FORMAT\n\n$(for i in $(cat /home/arch/fifa/runtime/.parts); do echo "$i\n";done)" && PARTFINISH="DONE"
+ ask_yesno "Would you like to create and mount the filesytems like this?\n\nSyntax\n------\nDEVICE:TYPE:MOUNTPOINT:FORMAT\n\n$(for i in $(cat /home/arch/aif/runtime/.parts); do echo "$i\n";done)" && PARTFINISH="DONE"
done
target_umountall
- fix_filesystems /home/arch/fifa/runtime/.parts && notify "Partitions were successfully mounted." && return 0
+ fix_filesystems /home/arch/aif/runtime/.parts && notify "Partitions were successfully mounted." && return 0
show_warning "Failure while doing filesystems" "Something went wrong. Check your logs"
return 1
diff --git a/src/core/libs/lib-ui.sh b/src/core/libs/lib-ui.sh
index 40b5046..d8f3f8f 100644
--- a/src/core/libs/lib-ui.sh
+++ b/src/core/libs/lib-ui.sh
@@ -3,7 +3,7 @@
# Taken from setup. we store dialog output in a file. TODO: can't we do this with variables?
-ANSWER="/home/arch/fifa/runtime/.dialog-answer"
+ANSWER="/home/arch/aif/runtime/.dialog-answer"
DIA_MENU_TEXT="Use the UP and DOWN arrows to navigate menus. Use TAB to switch between buttons and ENTER to select."
diff --git a/src/core/procedures/base b/src/core/procedures/base
index eab8c0e..7af1452 100644
--- a/src/core/procedures/base
+++ b/src/core/procedures/base
@@ -3,7 +3,7 @@
var_DEFAULTFS="/boot:32:ext2:+ swap:256:swap /:7500:ext3 /home:*:ext3"
var_TARGET_DIR="/mnt" # When overriding this, do _not_ add a trailing /. It's not needed and maybe you could even break something
var_RUNTIME_PACKAGES=
-var_PKG_FILE=/home/arch/fifa/runtime/package-list
+var_PKG_FILE=/home/arch/aif/runtime/package-list
var_UI_TYPE="cli" # set to cli or dia for dialog
###### Phases ( can be overridden by more specific procedures) ######
diff --git a/src/core/procedures/interactive b/src/core/procedures/interactive
index f83283e..a430662 100644
--- a/src/core/procedures/interactive
+++ b/src/core/procedures/interactive
@@ -2,7 +2,7 @@
depend_procedure core base # esp for auto_{network,locale,fstab} workers
-# This is a port of the original /arch/setup script. It doesn't use fifa phases but uses it's own menu-based flow (phase) control
+# This is a port of the original /arch/setup script. It doesn't use aif phases but uses it's own menu-based flow (phase) control
var_TARGET_DIR="/mnt"
diff --git a/src/patch-install-cd.sh b/src/patch-install-cd.sh
deleted file mode 100755
index 849c0fa..0000000
--- a/src/patch-install-cd.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-echo "Installing fifa into the installcd vfs ..."
-SRC_DIR=`dirname $0` # the src directory in the git clone
-GIT_DIR=`dirname $SRC_DIR` # the git clone dir itself
-mkdir -p /home/arch/fifa/docs
-cp -ax $SRC_DIR/fifa.sh /arch/fifa.sh
-
-cp -ax $SRC_DIR/core /home/arch/fifa/
-cp -ax $SRC_DIR/user /home/arch/fifa/
-cp -ax $SRC_DIR/runtime /home/arch/fifa/
-cp -ax $GIT_DIR/HOWTO /home/arch/fifa/docs/
-cp -ax $GIT_DIR/README /home/arch/fifa/docs/
-
-
-if [ "$1" = unofficial ]
-then
- echo "Installing dieter's unofficial modules for fifa ..."
- cp -ax $GIT_DIR/unofficial/modules/* /home/arch/fifa/user/
-fi
-
-echo Done
diff --git a/src/runtime/whatsthis.txt b/src/runtime/whatsthis.txt
index 4cfdb32..5a22a0e 100644
--- a/src/runtime/whatsthis.txt
+++ b/src/runtime/whatsthis.txt
@@ -1 +1 @@
-fifa will put files it uses during runtime here. (no source code goes here) \ No newline at end of file
+aif will put files it uses during runtime here. (no source code goes here) \ No newline at end of file
diff --git a/unofficial/whatsthis.txt b/unofficial/whatsthis.txt
index 3c95b4e..ab984e3 100644
--- a/unofficial/whatsthis.txt
+++ b/unofficial/whatsthis.txt
@@ -1,6 +1,5 @@
-This directory contains unofficial additions (modules) to/for fifa that I (Dieter)
+This directory contains unofficial additions (modules) to/for AIF that I (Dieter)
am writing.
-They are _not_ intended to be part of the "official" fifa. it's just in the same repo for
-my own convenience. Too install them on the installcd, run patch-install-cd
-with argument 'unofficial'
+They are _not_ intended to be part of the "official" aif. it's just in the same repo for
+my own convenience. TODO: new way to easily install them?