[Lunar-commits] <lunar> Full state merge theedge -> lunar (20040430). Includes: - aliases fixes - plugin system - lvu fixes - removal of versioned modules - adjustment of protected files for crontab - optimization additions - mirror system updates, download code changes
Auke Kok
sofar at lunar-linux.org
Mon Jul 2 04:43:01 CEST 2012
commit 3c43f920918704145f0f0d3a409021c12032bc92
Author: Auke Kok <sofar at lunar-linux.org>
Date: Sat Apr 30 14:49:25 2005 +0000
Full state merge theedge -> lunar (20040430). Includes:
- aliases fixes
- plugin system
- lvu fixes
- removal of versioned modules
- adjustment of protected files for crontab
- optimization additions
- mirror system updates, download code changes
---
bin/lvu | 156 +++-
etc/lunar/config | 36 +-
etc/lunar/mirrors/GNOME | 32 +-
etc/lunar/mirrors/GNU | 212 +++---
etc/lunar/mirrors/KDE | 162 ++---
etc/lunar/mirrors/KERNEL | 962 ++++++++++++-------------
etc/lunar/mirrors/LRESORT | 11 +-
etc/lunar/mirrors/SFORGE | 36 +-
etc/lunar/mirrors/XFREE86 | 84 +--
sbin/lget | 12 -
sbin/lin | 31 +-
sbin/lrm | 4 +
sbin/lsh | 2 +-
usr/share/man/man8/lin.8 | 5 -
usr/share/man/man8/lrm.8 | 10 +-
var/lib/lunar/functions/aliases.lunar | 11 +-
var/lib/lunar/functions/build.lunar | 9 +-
var/lib/lunar/functions/check.lunar | 302 +-------
var/lib/lunar/functions/depends.lunar | 56 +-
var/lib/lunar/functions/download.lunar | 572 ++++-----------
var/lib/lunar/functions/edit.lunar | 7 -
var/lib/lunar/functions/kernel.lunar | 216 +-----
var/lib/lunar/functions/locking.lunar | 61 +-
var/lib/lunar/functions/logging.lunar | 10 +-
var/lib/lunar/functions/main.lunar | 11 +-
var/lib/lunar/functions/messages.lunar | 28 +-
var/lib/lunar/functions/misc.lunar | 2 +-
var/lib/lunar/functions/modules.lunar | 34 +-
var/lib/lunar/functions/moonbase.lunar | 20 +-
var/lib/lunar/functions/optimize.lunar | 2 +
var/lib/lunar/functions/plugins.lunar | 103 +++
var/lib/lunar/functions/recovery.lunar | 9 +-
var/lib/lunar/functions/sizes.lunar | 5 +-
var/lib/lunar/functions/sources.lunar | 131 +---
var/lib/lunar/functions/temp.lunar | 3 +-
var/lib/lunar/functions/tracking.lunar | 23 +-
var/lib/lunar/menu/optimize.menu | 4 +-
var/lib/lunar/plugins/check-find.plugin | 54 ++
var/lib/lunar/plugins/check-ldd.plugin | 50 ++
var/lib/lunar/plugins/check-md5sum.plugin | 55 ++
var/lib/lunar/plugins/check-symlinks.plugin | 56 ++
var/lib/lunar/plugins/download-file.plugin | 24 +
var/lib/lunar/plugins/download-generic.plugin | 75 ++
var/lib/lunar/plugins/unpack-generic.plugin | 48 ++
var/lib/lunar/plugins/verify-md5.plugin | 32 +
var/lib/lunar/plugins/verify-sha1.plugin | 32 +
var/lib/lunar/protected | 6 -
var/lib/lunar/sustained | 4 -
48 files changed, 1816 insertions(+), 1994 deletions(-)
diff --git a/bin/lvu b/bin/lvu
index 07c79ca..31cb263 100755
--- a/bin/lvu
+++ b/bin/lvu
@@ -78,6 +78,7 @@ sources [module] display source files for a module
urls [module] display all URLs for a module
maintainer module display maintainer for a module
version module display version of module in moonbase
+submit module try to submit a module to the lunar ML
sum [module] display checksums
md5sum [module] display md5sums
@@ -89,7 +90,7 @@ section [section] display moonbase sections
moonbase display text listing of the moonbase
html display html listing of the moonbase
updatelog display summary log of previous lunar update
-activity display main log file
+activity [module] display main log file
newer 20030801 display available modules newer than Aug 01, 2003
older 20030101 display modules installed before Jan 01, 2003
@@ -111,18 +112,8 @@ EOF
export_snapshot() {
- SOURCE_DIRECTORY=$BUILD_DIRECTORY/snapshot
- mk_source_dir $SOURCE_DIRECTORY
- cp -a /etc $SOURCE_DIRECTORY
- cp -a $CONFIG_CACHE $SOURCE_DIRECTORY
-
- cat $MODULE_STATUS >> /usr/src/snapshot/packages
-
- SNAPSHOT="/root/snapshot-$HOSTNAME-$(date -u +%Y%m%d).tar.bz2"
-
- cd $BUILD_DIRECTORY
- tar -c snapshot | bzip2 -9 > $SNAPSHOT
- rm_source_dir $SOURCE_DIRECTORY
+ SNAPSHOT=snapshot-$HOSTNAME-$(date -u +%Y%m%d)
+ tar cjfP "/root/$SNAPSHOT.tar.bz2" $CONFIG_CACHE $MODULE_STATUS
message "${MESSAGE_COLOR}Snapshot ${DEFAULT_COLOR}${FILE_COLOR}$SNAPSHOT${DEFAULT_COLOR}${MESSAGE_COLOR} created.${DEFAULT_COLOR}"
}
@@ -133,10 +124,13 @@ import_snapshot() {
if [ -f "$1" ] ; then
( mk_source_dir $SOURCE_DIRECTORY )
- bzcat $SNAPSHOT | tar -x -C $BUILD_DIRECTORY
+ tar xj -C $SOURCE_DIRECTORY -f $SNAPSHOT 2> /dev/null
cd $SOURCE_DIRECTORY
+
+ message "${MESSAGE_COLOR}Restoring lunar configuration${DEFAULT_COLOR}"
+ cp -a etc/lunar /etc
- for LINE in $(cat packages) ; do
+ for LINE in $(cat .$MODULE_STATUS) ; do
LIST="$LIST $(echo $LINE | cut -d: -f1)"
done
verbose_msg "Sorting update queue"
@@ -156,12 +150,8 @@ import_snapshot() {
QUEUE=$(cat $TMP_QUEUE)
temp_destroy $TMP_QUEUE
- message "${MESSAGE_COLOR}Restoring system configuration${DEFAULT_COLOR}"
- cp -ai local /etc/lunar
- cp -ai etc /
-
if [ -n "$QUEUE" ] ; then
- lin -c $QUEUE
+ lin -p $QUEUE
fi
cd /
@@ -473,13 +463,13 @@ function show_tree() {
# local definitions
function depends() {
debug_msg "depends ($@)"
- DEP=$(unalias $1)
+ DEP=$(NEVER_ASK=1 unalias $1)
echo "+$DEP"
}
optional_depends() {
debug_msg "optional_depends ($@)"
- DEP=$(unalias $1)
+ DEP=$(NEVER_ASK=1 unalias $1)
echo "-$DEP"
}
@@ -568,7 +558,7 @@ function show_tree() {
echo "$DEP" >> $TMP_SEEN
CUR=${DEP:0:1}
# note the FLAG= thingy here
- FLAG= show_tree ${DEP:1}
+ FLAG= show_tree ${DEP:1} 2> /dev/null
fi
done
# don't try this at home:
@@ -644,9 +634,8 @@ show_eert() {
show_urls() { (
# function overrides:
- call_wget() { echo $1 ; return 0 ; }
- get_cvs() { return 0 ; }
- get_svn() { return 0 ; }
+ plugin_call() { return 0 ; }
+ download_url() { echo $1$2 ; return 1 ; }
connect() { return 0 ; }
SILENT=on
@@ -661,7 +650,7 @@ show_urls() { (
fi
for MODULE in $MODULES ; do
- download_module $MODULE
+ download_module $MODULE | uniq
done
) }
@@ -718,7 +707,7 @@ show_info() {
fi
echo ""
- ACTIVITY="`view_file $ACTIVITY_LOG | grep "$1"`"
+ ACTIVITY=$(view_file $ACTIVITY_LOG | awk "(\$3 == \"$1\")")
if [ `echo "$ACTIVITY" | wc -l` -gt 10 ]; then
ACTIVITY="`echo "$ACTIVITY" | tail -n10`"
@@ -734,6 +723,86 @@ show_info() {
fi
}
+
+submit_module() {
+ # this code tries to send the module back to the mailinglist
+ # as good as it gets
+ if [ -z "$1" ]; then
+ message "submit requires a single module name."
+ exit 1
+ fi
+ if [ ! -x /usr/sbin/sendmail ]; then
+ message "submit requires /usr/sbin/sendmail from (postfix, exim, sendmail)"
+ exit 1
+ fi
+ if ! run_details "$1" ; then
+ message "submit requires an existing module"
+ exit 1
+ else
+ if ! echo $SECTION | grep -q '^zlocal' ; then
+ message "submit requires the module to be in section 'zlocal'"
+ exit 1
+ else
+ TMP_MSG=$(temp_create "submission")
+ (
+ echo '# MODULE SUBMISSION TEMPLATE'
+ echo '# --------------------------'
+ echo '# '
+ echo '# (all lines starting with # will be deleted before sending)'
+ echo '# Please fill in the fields as complete as possible to help'
+ echo '# developers track the status of your module'
+ echo '# '
+ echo '# PLEASE DO NOT CHANGE THE FOLLOWING FIELDS:'
+ echo 'To: lunar at lunar-linux.org'
+ echo 'Date:' $(date)
+ echo 'Subject: Module submission -' $MODULE
+ echo '# '
+ echo '# YOUR E_MAIL ADDRESS MUST BE VALID:'
+ echo 'From: '
+ echo '#Reply-To:'
+ echo '#Cc: '
+ echo '# PLEASE DO NOT ADD WHITESPACE ABOVE THIS LINE'
+ echo ''
+ echo '# '
+ echo '# Please fill in some of the following information if applicable:'
+ echo '# '
+ echo 'module name :' $MODULE
+ echo 'suggested section : '
+ echo 'update (y/n) : n'
+ echo 'bugfix (y/n) : n'
+ echo 'security (y/n) : n'
+ echo ''
+ echo '# '
+ echo '# Add additional information, hints, comments below here,'
+ echo '# if you entered "y" in one of the fields above, please explain!'
+ echo '# '
+ echo ''
+ echo '# YOUR NAME HERE'
+ echo ''
+ echo '# '
+ echo '# Below is your module. Please do not change the format'
+ echo '# '
+ cd $SCRIPT_DIRECTORY
+ for FILE in $(find . -type f | grep -v 'CVS/' | sed 's/\.\///g'); do
+ echo "==================== BEGIN $FILE ===================="
+ cat $FILE
+ echo "===================== END $FILE ====================="
+ echo ""
+ done
+ ) > $TMP_MSG
+ edit_file $TMP_MSG
+ cat $TMP_MSG | grep -v '^#'
+ if query "Submit this module now?" y; then
+ RECIPIENT=$(grep -m 1 '^To: ' $TMP_MSG | sed 's/^To: //')
+ cat $TMP_MSG | grep -v '^#' | sendmail $RECIPIENT
+ temp_destroy $TMP_MSG
+ else
+ message "Submission aborted. your submission was saved as $TMP_MSG"
+ fi
+ fi
+ fi
+}
+
main() {
case $1 in
html)
@@ -761,8 +830,12 @@ main() {
;;
from)
- cd $INSTALL_LOGS
- grep $2 *
+ for MODULE in $(list_installed); do
+ VERSION=$(installed_version $MODULE)
+ if grep -q "$2" $INSTALL_LOGS/$MODULE-$VERSION ; then
+ echo "$MODULE $VERSION"
+ fi
+ done
;;
newer)
@@ -795,7 +868,11 @@ main() {
activity)
if [ -e $ACTIVITY_LOG ]; then
- view_file $ACTIVITY_LOG
+ if [ -z "$2" ]; then
+ view_file $ACTIVITY_LOG
+ else
+ view_file $ACTIVITY_LOG | awk "(\$3 == \"$2\")"
+ fi
else
echo "No update log available."
fi
@@ -829,9 +906,8 @@ main() {
;;
md5sum)
- mod_v_safe_edit $2
if [ -n "$2" ] ; then
- if ! md5sum_files "$INSTALL_LOGS/$MOD_V_SNAME-$(installed_version $2)" ; then
+ if ! md5sum_files "$INSTALL_LOGS/$2-$(installed_version $2)" ; then
md5sum_files "$INSTALL_LOGS/*"
fi
fi
@@ -996,22 +1072,20 @@ main() {
;;
compile)
- mod_v_safe_edit $2
run_details $2 ;
- if [ -f $COMPILE_LOGS/$MOD_V_SNAME-$(lvu version $2).bz2 ] ; then
- view_file $COMPILE_LOGS/$MOD_V_SNAME-$(lvu version $2).bz2
+ if [ -f $COMPILE_LOGS/$2-$(lvu version $2).bz2 ] ; then
+ view_file $COMPILE_LOGS/$2-$(lvu version $2).bz2
else
VERSION=$(installed_version $2)
- view_file $COMPILE_LOGS/$MOD_V_SNAME-$(installed_version $2).bz2 \
+ view_file $COMPILE_LOGS/$2-$(installed_version $2).bz2 \
"Compile log for $2 does not exist"
fi
#fi
;;
install)
- mod_v_safe_edit $2
if run_details $2 ; then
- view_file $INSTALL_LOGS/$MOD_V_SNAME-$(installed_version $2) \
+ view_file $INSTALL_LOGS/$2-$(installed_version $2) \
"Install log for $2 does not exist"
fi
;;
@@ -1094,6 +1168,10 @@ main() {
fi
;;
+ submit)
+ submit_module $2
+ ;;
+
*)
help
;;
diff --git a/etc/lunar/config b/etc/lunar/config
index 3ebd82e..ef32c92 100755
--- a/etc/lunar/config
+++ b/etc/lunar/config
@@ -23,12 +23,11 @@ export DIALOGRC=/etc/lunar/dialogrc
MENUS=/var/lib/lunar/menu
SUSTAINED=/var/lib/lunar/sustained
ALIASES=/var/lib/lunar/aliases
+ PLUGIN_DIR=/var/lib/lunar/plugins
SOUND_DIRECTORY=/var/lib/lunar/sound
SOUND_THEME=startrek
- BOOST_LOCK=/var/lock/boost
-
ACTIVITY_LOG=/var/log/lunar/activity
INSTALL_LOGS=/var/log/lunar/install
COMPILE_LOGS=/var/log/lunar/compile
@@ -74,21 +73,21 @@ export DIALOGRC=/etc/lunar/dialogrc
MD5SUM_CHECK=${MD5SUM_CHECK:=on}
SYM_CHECK=${SYM_CHECK:=off}
- GNU_URL=ftp://ftp.gnu.org/pub/gnu
- KDE_URL=ftp://ftp.kde.org/pub/kde
- GNOME_URL=ftp://ftp.gnome.org/pub/GNOME
- KERNEL_URL=ftp://ftp.kernel.org
- SFORGE_URL=http://unc.dl.sourceforge.net/sourceforge
- XFREE86_URL=ftp://ftp.xfree86.org/pub/XFree86
- LRESORT_URL=http://lunar-linux.org/lunar/cache
-
- MOONBASE_URL[0]=http://lunar-linux.org/lunar/moonbase.tar.bz2
- MOONBASE_URL[1]=http://tx-us.lunar-linux.org/lunar/moonbase.tar.bz2
- MOONBASE_URL[2]=http://de.lunar-linux.org/lunar/moonbase.tar.bz2
- MOONBASE_URL[3]=http://dk.lunar-linux.org/lunar/moonbase.tar.bz2
- MOONBASE_URL[4]=http://nl.lunar-linux.org/lunar/moonbase.tar.bz2
+ GNU_URL=ftp://ftp.gnu.org/pub/gnu/
+ KDE_URL=ftp://ftp.kde.org/pub/kde/
+ GNOME_URL=ftp://ftp.gnome.org/pub/GNOME/
+ KERNEL_URL=ftp://ftp.kernel.org/
+ SFORGE_URL=http://unc.dl.sourceforge.net/sourceforge/
+ XFREE86_URL=ftp://ftp.xfree86.org/pub/XFree86/
+ LRESORT_URL=http://lunar-linux.org/lunar/cache/
+
+ MOONBASE_URL[0]=http://lunar-linux.org/lunar/
+ MOONBASE_URL[1]=http://tx-us.lunar-linux.org/lunar/
+ MOONBASE_URL[2]=http://gbg-se.lunar-linux.org/lunar/
+ MOONBASE_URL[3]=http://de.lunar-linux.org/lunar/
+ MOONBASE_URL[4]=http://nl.lunar-linux.org/lunar/
- PATCH_URL=http://lunar-linux.org/lunar/patches
+ PATCH_URL=http://lunar-linux.org/lunar/patches/
TRACKED="/bin /boot /etc /lib /sbin /usr /var /opt/lunar"
@@ -136,3 +135,8 @@ fi
sound $SOUND
color $COLOR
+
+for LUNAR_PLUGIN in $PLUGIN_DIR/*.plugin; do
+ . $LUNAR_PLUGIN
+done
+
diff --git a/etc/lunar/mirrors/GNOME b/etc/lunar/mirrors/GNOME
index 841214d..887c292 100644
--- a/etc/lunar/mirrors/GNOME
+++ b/etc/lunar/mirrors/GNOME
@@ -1,17 +1,17 @@
Custom Mirror Custom
-Master Site FTP ftp://ftp.gnome.org/pub/GNOME
-Master Site HTTP http://ftp.gnome.org/pub/GNOME
-Australia http://mirror.aarnet.edu.au/pub/GNOME
-Australia http://planetmirror.com/pub/GNOME
-Belgium http://ftp.belnet.be/mirror/ftp.gnome.org
-France ftp://fr.rpmfind.net/linux/gnome.org
-France ftp://fr2.rpmfind.net/linux/gnome.org
-Italy http://ftp.unina.it/pub/linux/GNOME
-Norway ftp://ftp.no.gnome.org/pub/GNOME
-Spain ftp://ftp.dit.upm.es/pub/GNOME
-Sweden ftp://ftp.dataplus.se/pub/GNOME
-Sweden ftp://ftp.acc.umu.se/pub/GNOME
-United Kingdom http://ftp.linux.org.uk/mirrors/ftp.gnome.org
-US ftp://ftp.cse.buffalo.edu/pub/Gnome
-US or Canada http://archive.progeny.com/GNOME
-US or Canada http://ftp.rpmfind.net/linux/gnome.org
+Master Site FTP ftp://ftp.gnome.org/pub/GNOME/
+Master Site HTTP http://ftp.gnome.org/pub/GNOME/
+Australia http://mirror.aarnet.edu.au/pub/GNOME/
+Australia http://planetmirror.com/pub/GNOME/
+Belgium http://ftp.belnet.be/mirror/ftp.gnome.org/
+France ftp://fr.rpmfind.net/linux/gnome.org/
+France ftp://fr2.rpmfind.net/linux/gnome.org/
+Italy http://ftp.unina.it/pub/linux/GNOME/
+Norway ftp://ftp.no.gnome.org/pub/GNOME/
+Spain ftp://ftp.dit.upm.es/pub/GNOME/
+Sweden ftp://ftp.dataplus.se/pub/GNOME/
+Sweden ftp://ftp.acc.umu.se/pub/GNOME/
+United Kingdom http://ftp.linux.org.uk/mirrors/ftp.gnome.org/
+US ftp://ftp.cse.buffalo.edu/pub/Gnome/
+US or Canada http://archive.progeny.com/GNOME/
+US or Canada http://ftp.rpmfind.net/linux/gnome.org/
diff --git a/etc/lunar/mirrors/GNU b/etc/lunar/mirrors/GNU
index ff75c66..3232556 100644
--- a/etc/lunar/mirrors/GNU
+++ b/etc/lunar/mirrors/GNU
@@ -1,107 +1,107 @@
-"Master Site" ftp://ftp.gnu.org/pub/gnu
+"Master Site" ftp://ftp.gnu.org/pub/gnu/
"Custom Mirror" Custom
-California ftp://gatekeeper.dec.com/pub/GNU
-California ftp://ftp.keystealth.org/pub/gnu
-Illionis ftp://uiarchive.cso.uiuc.edu/pub/ftp/ftp.gnu.org/gnu
-Indiana ftp://ftp.in-span.net/pub/mirrors/ftp.gnu.org
-Kentucky ftp://gnu.ms.uky.edu/pub/mirrors/gnu
-Maryland ftp://ftp.digex.net/pub/gnu
-Massachusetts ftp://aeneas.mit.edu/pub/gnu
-Missouri ftp://wuarchive.wustl.edu/systems/gnu
-New York ftp://ftp.cs.columbia.edu/archives/gnu/prep
-New York ftp://ftp.stealth.net/pub/mirrors/ftp.gnu.org
-North Carolina http://metalab.unc.edu/pub/gnu
-Pennsylvania ftp://boron.club.cc.cmu.edu/gnu
-Tennessee ftp://sunsite.utk.edu/pub/gnu/ftp
-Tennessee ftp://thales.memphis.edu/pub/gnu
-Wisconsin ftp://ftp.twtelecom.net/pub/GNU
-South Africa ftp://ftp.sun.ac.za/gnu
-Brazil ftp://ftp.unicamp.br/pub/gnu
-Brazil ftp://master.softaplic.com.br/pub/gnu
-Brazil ftp://ftp.matrix.com.br/pub/gnu
-Canada ftp://ftp.cs.ubc.ca/mirror2/gnu
-Chile ftp://ftp.inf.utfsm.cl/pub/gnu
-Costa Rica ftp://sunsite.ulatina.ac.cr/Mirrors/GNU
-Mexico ftp://www.gnu.unam.mx/pub/gnu/software
-Mexico ftp://gnu.cem.itesm.mx/pub/mirrors/gnu.org
-Australia ftp://ftp.progsoc.uts.edu.au/pub/gnu
-Australia ftp://mirror.aarnet.edu.au/pub/gnu
-Australia ftp://gnu.mirror.pacific.net.au/gnu
-China ftp://ftp.sea9.com/pub/gnu
-China ftp://ftp.cs.cuhk.edu.hk/pub/gnu
-China ftp://sunsite.ust.hk/pub/gnu
-China ftp://ftp.shellhung.org/pub/gnu
-India ftp://ftp.kernel.org.in/gnu.org/ftp
-Indonesia ftp://sapi.vlsm.org/gnu
-Indonesia http://sapi.vlsm.org/gnu
-Japan ftp://tron.um.u-tokyo.ac.jp/pub/GNU/prep
-Japan ftp://core.ring.gr.jp/pub/GNU
-Japan ftp://ftp.ring.gr.jp/pub/GNU
-Japan ftp://mirrors.hbi.co.jp/gnu
-Japan ftp://ftp.ayamura.org/pub/gnu
-Korea ftp://ftpmirror.hanyang.ac.kr/GNU
-Korea ftp://ftp.linux.sarang.net/mirror/gnu/gnu
-Korea ftp://ftp.xgate.co.kr/pub/mirror/gnu
-Saudi Arabia ftp://ftp.isu.net.sa/pub/mirrors/ftp.gnu.org/gnu
-Taiwan ftp://coda.nctu.edu.tw/UNIX/gnu
-Taiwan ftp://ftp1.sinica.edu.tw/pub3/GNU/gnu
-Taiwan ftp://ftp.nctu.edu.tw/UNIX/gnu
-Austria ftp://ftp.gnu.vbs.at
-Austria ftp://ftp.univie.ac.at/packages/gnu
-Austria ftp://gd.tuwien.ac.at/gnu/gnusrc
-Austria http://gd.tuwien.ac.at/gnu/gnusrc
-Czeck Republic ftp://ftp.fi.muni.cz/pub/gnu
-Denmark ftp://ftp.denet.dk/mirrors/ftp.gnu.org/pub/gnu
-Denmark ftp://ftp.dkuug.dk/pub/gnu
-Denmark ftp://sunsite.dk/mirrors/gnu
-Denmark http://mirrors.sunsite.dk/gnu
-Finland ftp://ftp.funet.fi/pub/gnu/prep
-France ftp://ftp.irisa.fr/pub/gnu
-France ftp://ftp.medasys-digital-systems.fr/pub/gnu
-Germany ftp.cs.tu-berlin.de/pub/gnu
-Germany ftp://ftp.informatik.rwth-aachen.de/pub/gnu
-Germany ftp.leo.org/pub/comp/os/unix/gnu
-Germany ftp.de.uu.net/pub/gnu
-Germany ftp.freenet.de/pub/ftp.gnu.org/gnu
-Germany ftp.cs.uni-bonn.de/pub/gnu
-Germany ftp-stud.fht-esslingen.de/pub/Mirrors/ftp.gnu.org
-Germany http://ftp-stud.fht-esslingen.de/pub/Mirrors/ftp.gnu.org
-Greece ftp.forthnet.gr/pub/gnu
-Greece ftp.ntua.gr/pub/gnu
-Greece ftp.duth.gr/pub/gnu
-Greece ftp.aua.gr/pub/mirrors/GNU
-Greece ftp.physics.auth.gr/pub/gnu
-Ireland ftp://ftp.esat.net/pub/gnu
-Italy ftp://ftp.oasi.gpa.it/pub/gnu
-Netherlands ftp://ftp.nluug.nl/pub/gnu
-Netherlands ftp://ftp.mirror.nl/pub/mirror/gnu
-Netherlands ftp://ftp.nl.uu.net/pub/gnu
-Norway ftp://ftp.ntnu.no/pub/gnu
-Norway ftp://ftp.gnu.no
-Norway ftp://sunsite.uio.no/pub/gnu
-Poland ftp://ftp.task.gda.pl/pub/gnu
-Poland ftp://sunsite.icm.edu.pl/pub/gnu
-Portugal ftp://ftp.ci.uminho.pt/pub/mirrors/gnu
-Portugal http://ciumix.ci.uminho.pt/mirrors/gnu
-Portugal ftp://ftp.ist.ut1.pt/pub/gnu
-Portugal ftp://mirrors.netvisao.pt/gnu
-Romania ftp://archive.logicnet.ro/mirrors/ftp.gnu.org/gnu
-Romania ftp://ftp.timisoara.roedu.net/mirrors/ftp.gnu.org
-Russia ftp://ftp.chg.ru/pub/gnu
-Slovenia ftp://ftp.arnes.si/gnu
-Spain ftp://ftp.etsimo.uniovi.es/pub/gnu
-Spain ftp://ftp.rediris.es/pub/gnu
-Sweden ftp://ftp.isy.liu.se/pub/gnu
-Sweden ftp://ftp.staken.kth.se/pub/gnu
-Sweden ftp://ftp.luth.se/pub/unix/gnu
-Sweden ftp://ftp.sunet.se/pub/gnu
-Sweden ftp://ftp.ch1.chalmers.se/pub/gnu
-Switzerland ftp://ftp.eunet.ch/mirrors4/gnu
-Switzerland ftp://sunsite.cnlab-switch.ch/mirrors/gnu
-Turkey ftp://ftp.baskent.edu.tr/gnu/ftp
-Turkey ftp://ftp.ulak.net.tr/pub/gnu
-United Kingdom ftp://ftp.mcc.ac.uk/pub/gnu
-United Kingdom ftp://ftp.mirror.ac.uk/sites/ftp.gnu.org/pub/gnu
-United Kingdom ftp://ftp.warwick.ac.uk/pub/gnu
-United Kingdom ftp://sunsite.org.uk/gnu
-United Kingdom ftp://ftp.hands.com/ftp.gnu.org
+California ftp://gatekeeper.dec.com/pub/GNU/
+California ftp://ftp.keystealth.org/pub/gnu/
+Illionis ftp://uiarchive.cso.uiuc.edu/pub/ftp/ftp.gnu.org/gnu/
+Indiana ftp://ftp.in-span.net/pub/mirrors/ftp.gnu.org/
+Kentucky ftp://gnu.ms.uky.edu/pub/mirrors/gnu/
+Maryland ftp://ftp.digex.net/pub/gnu/
+Massachusetts ftp://aeneas.mit.edu/pub/gnu/
+Missouri ftp://wuarchive.wustl.edu/systems/gnu/
+New York ftp://ftp.cs.columbia.edu/archives/gnu/prep/
+New York ftp://ftp.stealth.net/pub/mirrors/ftp.gnu.org/
+North Carolina http://metalab.unc.edu/pub/gnu/
+Pennsylvania ftp://boron.club.cc.cmu.edu/gnu/
+Tennessee ftp://sunsite.utk.edu/pub/gnu/ftp/
+Tennessee ftp://thales.memphis.edu/pub/gnu/
+Wisconsin ftp://ftp.twtelecom.net/pub/GNU/
+South Africa ftp://ftp.sun.ac.za/gnu/
+Brazil ftp://ftp.unicamp.br/pub/gnu/
+Brazil ftp://master.softaplic.com.br/pub/gnu/
+Brazil ftp://ftp.matrix.com.br/pub/gnu/
+Canada ftp://ftp.cs.ubc.ca/mirror2/gnu/
+Chile ftp://ftp.inf.utfsm.cl/pub/gnu/
+Costa Rica ftp://sunsite.ulatina.ac.cr/Mirrors/GNU/
+Mexico ftp://www.gnu.unam.mx/pub/gnu/software/
+Mexico ftp://gnu.cem.itesm.mx/pub/mirrors/gnu.org/
+Australia ftp://ftp.progsoc.uts.edu.au/pub/gnu/
+Australia ftp://mirror.aarnet.edu.au/pub/gnu/
+Australia ftp://gnu.mirror.pacific.net.au/gnu/
+China ftp://ftp.sea9.com/pub/gnu/
+China ftp://ftp.cs.cuhk.edu.hk/pub/gnu/
+China ftp://sunsite.ust.hk/pub/gnu/
+China ftp://ftp.shellhung.org/pub/gnu/
+India ftp://ftp.kernel.org.in/gnu.org/ftp/
+Indonesia ftp://sapi.vlsm.org/gnu/
+Indonesia http://sapi.vlsm.org/gnu/
+Japan ftp://tron.um.u-tokyo.ac.jp/pub/GNU/prep/
+Japan ftp://core.ring.gr.jp/pub/GNU/
+Japan ftp://ftp.ring.gr.jp/pub/GNU/
+Japan ftp://mirrors.hbi.co.jp/gnu/
+Japan ftp://ftp.ayamura.org/pub/gnu/
+Korea ftp://ftpmirror.hanyang.ac.kr/GNU/
+Korea ftp://ftp.linux.sarang.net/mirror/gnu/gnu/
+Korea ftp://ftp.xgate.co.kr/pub/mirror/gnu/
+Saudi Arabia ftp://ftp.isu.net.sa/pub/mirrors/ftp.gnu.org/gnu/
+Taiwan ftp://coda.nctu.edu.tw/UNIX/gnu/
+Taiwan ftp://ftp1.sinica.edu.tw/pub3/GNU/gnu/
+Taiwan ftp://ftp.nctu.edu.tw/UNIX/gnu/
+Austria ftp://ftp.gnu.vbs.at/
+Austria ftp://ftp.univie.ac.at/packages/gnu/
+Austria ftp://gd.tuwien.ac.at/gnu/gnusrc/
+Austria http://gd.tuwien.ac.at/gnu/gnusrc/
+Czeck Republic ftp://ftp.fi.muni.cz/pub/gnu/
+Denmark ftp://ftp.denet.dk/mirrors/ftp.gnu.org/pub/gnu/
+Denmark ftp://ftp.dkuug.dk/pub/gnu/
+Denmark ftp://sunsite.dk/mirrors/gnu/
+Denmark http://mirrors.sunsite.dk/gnu/
+Finland ftp://ftp.funet.fi/pub/gnu/prep/
+France ftp://ftp.irisa.fr/pub/gnu/
+France ftp://ftp.medasys-digital-systems.fr/pub/gnu/
+Germany ftp.cs.tu-berlin.de/pub/gnu/
+Germany ftp://ftp.informatik.rwth-aachen.de/pub/gnu/
+Germany ftp.leo.org/pub/comp/os/unix/gnu/
+Germany ftp.de.uu.net/pub/gnu/
+Germany ftp.freenet.de/pub/ftp.gnu.org/gnu/
+Germany ftp.cs.uni-bonn.de/pub/gnu/
+Germany ftp-stud.fht-esslingen.de/pub/Mirrors/ftp.gnu.org/
+Germany http://ftp-stud.fht-esslingen.de/pub/Mirrors/ftp.gnu.org/
+Greece ftp.forthnet.gr/pub/gnu/
+Greece ftp.ntua.gr/pub/gnu/
+Greece ftp.duth.gr/pub/gnu/
+Greece ftp.aua.gr/pub/mirrors/GNU/
+Greece ftp.physics.auth.gr/pub/gnu/
+Ireland ftp://ftp.esat.net/pub/gnu/
+Italy ftp://ftp.oasi.gpa.it/pub/gnu/
+Netherlands ftp://ftp.nluug.nl/pub/gnu/
+Netherlands ftp://ftp.mirror.nl/pub/mirror/gnu/
+Netherlands ftp://ftp.nl.uu.net/pub/gnu/
+Norway ftp://ftp.ntnu.no/pub/gnu/
+Norway ftp://ftp.gnu.no/
+Norway ftp://sunsite.uio.no/pub/gnu/
+Poland ftp://ftp.task.gda.pl/pub/gnu/
+Poland ftp://sunsite.icm.edu.pl/pub/gnu/
+Portugal ftp://ftp.ci.uminho.pt/pub/mirrors/gnu/
+Portugal http://ciumix.ci.uminho.pt/mirrors/gnu/
+Portugal ftp://ftp.ist.ut1.pt/pub/gnu/
+Portugal ftp://mirrors.netvisao.pt/gnu/
+Romania ftp://archive.logicnet.ro/mirrors/ftp.gnu.org/gnu/
+Romania ftp://ftp.timisoara.roedu.net/mirrors/ftp.gnu.org/
+Russia ftp://ftp.chg.ru/pub/gnu/
+Slovenia ftp://ftp.arnes.si/gnu/
+Spain ftp://ftp.etsimo.uniovi.es/pub/gnu/
+Spain ftp://ftp.rediris.es/pub/gnu/
+Sweden ftp://ftp.isy.liu.se/pub/gnu/
+Sweden ftp://ftp.staken.kth.se/pub/gnu/
+Sweden ftp://ftp.luth.se/pub/unix/gnu/
+Sweden ftp://ftp.sunet.se/pub/gnu/
+Sweden ftp://ftp.ch1.chalmers.se/pub/gnu/
+Switzerland ftp://ftp.eunet.ch/mirrors4/gnu/
+Switzerland ftp://sunsite.cnlab-switch.ch/mirrors/gnu/
+Turkey ftp://ftp.baskent.edu.tr/gnu/ftp/
+Turkey ftp://ftp.ulak.net.tr/pub/gnu/
+United Kingdom ftp://ftp.mcc.ac.uk/pub/gnu/
+United Kingdom ftp://ftp.mirror.ac.uk/sites/ftp.gnu.org/pub/gnu/
+United Kingdom ftp://ftp.warwick.ac.uk/pub/gnu/
+United Kingdom ftp://sunsite.org.uk/gnu/
+United Kingdom ftp://ftp.hands.com/ftp.gnu.org/
diff --git a/etc/lunar/mirrors/KDE b/etc/lunar/mirrors/KDE
index 355d300..e554980 100644
--- a/etc/lunar/mirrors/KDE
+++ b/etc/lunar/mirrors/KDE
@@ -1,82 +1,82 @@
-"Master Site" ftp://ftp.kde.org/pub/kde
+"Master Site" ftp://ftp.kde.org/pub/kde/
"Custom Mirror" Custom
-USA ftp://download.sourceforge.net/pub/mirrors/kde
-USA http://download.sourceforge.net/mirrors/kde
-USA ftp://kde.us.themoes.org/pub/kde
-USA http://kde.us.themos.org/pub/kde
-USA ftp://ftp.us.kde.org/pub/kde
-USA http://ftp.us.kde.org/pub/kde
-USA ftp://csociety-ftp.ecn.purdue.edu/pub/kde
-USA http://csociety-ftp.ecn.purdue.edu/pub/kde
-United Kingdom ftp://kde.uk.themoes.org/pub/kde
-United Kingdom http://kde.uk.themoes.org/pub/kde
-United Kingdom ftp://ftp.mirror.ac.uk/sites/ftp.kde.org/pub/kde
-United Kingdom http://ftp.mirror.ac.uk/sites/ftp.kde.org/pub/kde
-Australia ftp://ftp.au.kde.org/pub/kde
-Australia http://ftp.au.kde.org/pub/kde
-Austria ftp://ftp.at.kde.org/hci/kde
-Austria http://ftp.at.kde.org/hci/kde
-Czech Republic ftp://ftp.fi.muni.cz/pub/kde
-Czech Republic http://ftp.fi.muni.cz/pub/kde
-Czech Republic ftp://sunsite.mff.cuni.cz/MIRRORS/ftp.kde.org/pub/kde
-Czech Republic http://sunsite.mff.cuni.cz/MIRRORS/ftp.kde.org/pub/kde
-Germany ftp://ftp.de.kde.org/pub/kde
-Germany http://ftp.de.kde.org/pub/kde
-Germany ftp://ftp.fh-heilbronn.de/pub/mirrors/kde
-Germany ftp://ftp.fu-berlin.de/pub/unix/X11/gui/kde
-Germany ftp://ftp.gwdg.de/pub/x11/kde
-Germany http://ftp.gwdg.de/pub/x11/kde
-Germany ftp://ftp.tu-chemnitz.de/pub/X11/kde
-Germany http://cgi.tu-chemnitz.de/ftp-home/pub/X11/kde
-Germany ftp://ftp.rz.uni-wuerzburg.de/pub/unix/kde
-Germany ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/ftp.kde.org/pub/kde
-Germany http://ftp-stud.fht-esslingen.de/pub/Mirrors/ftp.kde.org/pub/kde
-Germany ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/kde
-Netherlands ftp://ftp.eu.uu.net/pub/kde
-Poland ftp://ftp.tuniv.szczecin.pl/pub/kde
-Poland htp://ftp.tuniv.szczecin.pl/pub/kde
-Poland ftp://ftp.task.gda.pl/pub/unix/kde
-Poland http://ftp.task.gda.pl/pub/unix/kde
-Poland ftp://sunsite.icm.edu.pl/pub/unix/kde
-Switzerland ftp://sunsite.cnlab-switch.ch/mirror/kde
-Denmark ftp://sunsite.dk/mirrors/kde
-Denmark http://mirrors.sunsite.dk/kde
-Sweden ftp://ftp.se.kde.org/pub/kde
-Sweden http://ftp.se.kde.org/pub/kde
-Sweden ftp://ftp.dataplus.se/pub/linux/kde
-Greece ftp://ftp.duth.gr/pub/kde
-Greece http://ftp.duth.gr/pub/kde
-Yugoslavia ftp://ftp.kde.org.yu/mirrors/ftp.kde.org
-Yugoslavia ftp://ftp.kde.org.yu/mirrors/ftp.kde.org/pub/kde
-Belgium ftp://ftp.belnet.be/pub/mirror/ftp.kde.org/pub/kde
-Belgium http://ftp.belnet.be/pub/mirror/ftp.kde.org/pub/kde
-Belgium ftp://ftp.easynet.be/kde
-Belgium http://ftp.easynet.be/kde
-France ftp://ftp.lip6.fr/pub/X11/kde
-France http:://www-ftp.lip6.fr/pub/X11/kde
-Ireland ftp://ftp.esat.net/mirrors/ftp.kde.org/pub/kde
-Ireland http://ftp.esat.net/mirrors/ftp.kde.org/pub/kde
-Portugal ftp://ftp.dei.uc.pt/pub/kde
-Portugal http://ftp.dei.uc.pt/pub/kde
-Portugal ftp://ftp.eq.uc.pt/pub/software/unix/KDE
-Portugal http://ftp.eq.uc.pt/software/unix/KDE
-United Kingdom ftp://ftp.net.lut.ac.uk/kde
-United Kingdom http://ftp.net.lut.ac.uk/kde
-United Kingdom ftp://sunsite.doc.ic.ac.uk/Mirrors/ftp.kde.org/pub/kde
-Bulgaria ftp://ftp.digsys.bg/pub/kde
-Romania ftp://ftp.lbi.ro/pub/Linux/KDE
-Romania ftp://ftp.tuiasi.ro/pub/mirrors/ftp.kde.org/pub/kde
-Russia ftp://ftp.chg.ru/pub/X11/kde
-Hong Kong ftp://ftp.dll.com.hk/pub/mirrors/KDE
-Japan ftp://mirror.nucba.ac.jp/mirror/KDE
-Japan http://mirror.nucba.ac.jp/mirror/KDE
-Republic of Korea ftp://linux.sarang.net/mirror/desktop/kde
-Singapore ftp://kde.lugs.org.sg/pub/kde.org
-South Africa ftp://ftp.sun.ac.za/sites/ftp.kde.org/pub/kde
-South Africa http://ftp.sun.ac.za/sites/ftp.kde.org/pub/kde
-USA ftp://ftp.rutgers.edu/pub/kde
-USA http://ftp.rutgers.edu/pub/kde
-USA ftp://mirror.chpc.utah.edu/pub/kde
-Brazil ftp://ftp.matrix.com.br/pub/kde
-Brazil http://ftp.matrix.com.br/pub/kde
-Costa Rica ftp://ftp.ucr.ac.cr/pub/Unix/linux/kde
+USA ftp://download.sourceforge.net/pub/mirrors/kde/
+USA http://download.sourceforge.net/mirrors/kde/
+USA ftp://kde.us.themoes.org/pub/kde/
+USA http://kde.us.themos.org/pub/kde/
+USA ftp://ftp.us.kde.org/pub/kde/
+USA http://ftp.us.kde.org/pub/kde/
+USA ftp://csociety-ftp.ecn.purdue.edu/pub/kde/
+USA http://csociety-ftp.ecn.purdue.edu/pub/kde/
+United Kingdom ftp://kde.uk.themoes.org/pub/kde/
+United Kingdom http://kde.uk.themoes.org/pub/kde/
+United Kingdom ftp://ftp.mirror.ac.uk/sites/ftp.kde.org/pub/kde/
+United Kingdom http://ftp.mirror.ac.uk/sites/ftp.kde.org/pub/kde/
+Australia ftp://ftp.au.kde.org/pub/kde/
+Australia http://ftp.au.kde.org/pub/kde/
+Austria ftp://ftp.at.kde.org/hci/kde/
+Austria http://ftp.at.kde.org/hci/kde/
+Czech Republic ftp://ftp.fi.muni.cz/pub/kde/
+Czech Republic http://ftp.fi.muni.cz/pub/kde/
+Czech Republic ftp://sunsite.mff.cuni.cz/MIRRORS/ftp.kde.org/pub/kde/
+Czech Republic http://sunsite.mff.cuni.cz/MIRRORS/ftp.kde.org/pub/kde/
+Germany ftp://ftp.de.kde.org/pub/kde/
+Germany http://ftp.de.kde.org/pub/kde/
+Germany ftp://ftp.fh-heilbronn.de/pub/mirrors/kde/
+Germany ftp://ftp.fu-berlin.de/pub/unix/X11/gui/kde/
+Germany ftp://ftp.gwdg.de/pub/x11/kde/
+Germany http://ftp.gwdg.de/pub/x11/kde/
+Germany ftp://ftp.tu-chemnitz.de/pub/X11/kde/
+Germany http://cgi.tu-chemnitz.de/ftp-home/pub/X11/kde/
+Germany ftp://ftp.rz.uni-wuerzburg.de/pub/unix/kde/
+Germany ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/ftp.kde.org/pub/kde/
+Germany http://ftp-stud.fht-esslingen.de/pub/Mirrors/ftp.kde.org/pub/kde/
+Germany ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/kde/
+Netherlands ftp://ftp.eu.uu.net/pub/kde/
+Poland ftp://ftp.tuniv.szczecin.pl/pub/kde/
+Poland htp://ftp.tuniv.szczecin.pl/pub/kde/
+Poland ftp://ftp.task.gda.pl/pub/unix/kde/
+Poland http://ftp.task.gda.pl/pub/unix/kde/
+Poland ftp://sunsite.icm.edu.pl/pub/unix/kde/
+Switzerland ftp://sunsite.cnlab-switch.ch/mirror/kde/
+Denmark ftp://sunsite.dk/mirrors/kde/
+Denmark http://mirrors.sunsite.dk/kde/
+Sweden ftp://ftp.se.kde.org/pub/kde/
+Sweden http://ftp.se.kde.org/pub/kde/
+Sweden ftp://ftp.dataplus.se/pub/linux/kde/
+Greece ftp://ftp.duth.gr/pub/kde/
+Greece http://ftp.duth.gr/pub/kde/
+Yugoslavia ftp://ftp.kde.org.yu/mirrors/ftp.kde.org/
+Yugoslavia ftp://ftp.kde.org.yu/mirrors/ftp.kde.org/pub/kde/
+Belgium ftp://ftp.belnet.be/pub/mirror/ftp.kde.org/pub/kde/
+Belgium http://ftp.belnet.be/pub/mirror/ftp.kde.org/pub/kde/
+Belgium ftp://ftp.easynet.be/kde/
+Belgium http://ftp.easynet.be/kde/
+France ftp://ftp.lip6.fr/pub/X11/kde/
+France http:://www-ftp.lip6.fr/pub/X11/kde/
+Ireland ftp://ftp.esat.net/mirrors/ftp.kde.org/pub/kde/
+Ireland http://ftp.esat.net/mirrors/ftp.kde.org/pub/kde/
+Portugal ftp://ftp.dei.uc.pt/pub/kde/
+Portugal http://ftp.dei.uc.pt/pub/kde/
+Portugal ftp://ftp.eq.uc.pt/pub/software/unix/KDE/
+Portugal http://ftp.eq.uc.pt/software/unix/KDE/
+United Kingdom ftp://ftp.net.lut.ac.uk/kde/
+United Kingdom http://ftp.net.lut.ac.uk/kde/
+United Kingdom ftp://sunsite.doc.ic.ac.uk/Mirrors/ftp.kde.org/pub/kde/
+Bulgaria ftp://ftp.digsys.bg/pub/kde/
+Romania ftp://ftp.lbi.ro/pub/Linux/KDE/
+Romania ftp://ftp.tuiasi.ro/pub/mirrors/ftp.kde.org/pub/kde/
+Russia ftp://ftp.chg.ru/pub/X11/kde/
+Hong Kong ftp://ftp.dll.com.hk/pub/mirrors/KDE/
+Japan ftp://mirror.nucba.ac.jp/mirror/KDE/
+Japan http://mirror.nucba.ac.jp/mirror/KDE/
+Republic of Korea ftp://linux.sarang.net/mirror/desktop/kde/
+Singapore ftp://kde.lugs.org.sg/pub/kde.org/
+South Africa ftp://ftp.sun.ac.za/sites/ftp.kde.org/pub/kde/
+South Africa http://ftp.sun.ac.za/sites/ftp.kde.org/pub/kde/
+USA ftp://ftp.rutgers.edu/pub/kde/
+USA http://ftp.rutgers.edu/pub/kde/
+USA ftp://mirror.chpc.utah.edu/pub/kde/
+Brazil ftp://ftp.matrix.com.br/pub/kde/
+Brazil http://ftp.matrix.com.br/pub/kde/
+Costa Rica ftp://ftp.ucr.ac.cr/pub/Unix/linux/kde/
diff --git a/etc/lunar/mirrors/KERNEL b/etc/lunar/mirrors/KERNEL
index 720423f..a939dbd 100644
--- a/etc/lunar/mirrors/KERNEL
+++ b/etc/lunar/mirrors/KERNEL
@@ -1,482 +1,482 @@
-"Master Site" ftp://ftp.kernel.org
+"Master Site" ftp://ftp.kernel.org/
"Custom Mirror" Custom
-Albania http://www.al.kernel.org
-Albania ftp://ftp.al.kernel.org
-Algeria http://www.dz.kernel.org
-Algeria ftp://ftp.dz.kernel.org
-American Samoa http://www.as.kernel.org
-American Samoa ftp://ftp.as.kernel.org
-Andorra http://www.ad.kernel.org
-Andorra ftp://ftp.ad.kernel.org
-Angola http://www.ai.kernel.org
-Angola ftp://ftp.ai.kernel.org
-Anguilla http://www.ai.kernel.org
-Anguilla ftp://ftp.ai.kernel.org
-Antarctica http://www.aq.kernel.org
-Antarctica ftp://ftp.aq.kernel.org
-Antigua and Barbuda http://www.ag.kernel.org
-Antigua and Barbuda ftp://ftp.ag.kernel.org
-Argentina http://www.ag.kernel.org
-Argentina ftp://ftp.ag.kernel.org
-Armenia http://www.am.kernel.org
-Armenia ftp://ftp.am.kernel.org
-Aruba http://www.aw.kernel.org
-Aruba ftp://ftp.aw.kernel.org
-Ascension Island http://www.ac.kernel.org
-Ascension Island ftp://ftp.ac.kernel.org
-Australia http://www.au.kernel.org
-Australia ftp://ftp.au.kernel.org
-Austria http://www.at.kernel.org
-Austria ftp://ftp.at.kernel.org
-Azerbaijan http://www.az.kernel.org
-Azerbaijan ftp://ftp.az.kernel.org
-Aland http://www.av.kernel.org
-Aland ftp://ftp.av.kernel.org
-Bahamas http://www.bs.kernel.org
-Bahamas ftp://ftp.bs.kernel.org
-Bahrain http://www.bh.kernel.org
-Bahrain ftp://ftp.bh.kernel.org
-Bangladesh http://www.bd.kernel.org
-Bangladesh ftp://ftp.bd.kernel.org
-Barbados http://www.bb.kernel.org
-Barbados ftp://ftp.bb.kernel.org
-Belarus http://www.by.kernel.org
-Belarus ftp://ftp.by.kernel.org
-Belgium http://www.be.kernel.org
-Belgium ftp://ftp.be.kernel.org
-Belize http://www.bz.kernel.org
-Belize ftp://ftp.bz.kernel.org
-Benin http://www.bj.kernel.org
-Benin ftp://ftp.bj.kernel.org
-Bermuda http://www.vm.kernel.org
-Bermuda ftp://ftp.bm.kernel.org
-Bhuta'n http://www.bt.kernel.org
-Bhuta'n ftp://ftp.bt.kernel.org
-Bolivia http://www.bo.kernel.org
-Bolivia ftp://ftp.bo.kernel.org
-Bosnia and Herzegowina http://www.ba.kernel.org
-Bosnia and Herzegowina ftp://ftp.ba.kernel.org
-Botswana http://www.bw.kernel.org
-Botswana ftp://ftp.bw.kernel.org
-Bouvet Island http://www.bv.kernel.org
-Bouvet Island ftp://ftp.bv.kernel.org
-Brazil http://www.br.kernel.org
-Brazil ftp://ftp.br.kernel.org
-British Indian Ocean Territory http://www.io.kernel.org
-British Indian Ocean Territory ftp://ftp.io.kernel.org
-Brunei Darussalam http://www.bn.kernel.org
-Brunei Darussalam ftp://ftp.bn.kernel.org
-Bulgaria http://www.bg.kernel.org
-Bulgaria ftp://ftp.bg.kernel.org
-Burkina Faso http://www.bf.kernel.org
-Burkina Faso ftp://ftp.bf.kernel.org
-Burundi http://www.bi.kernel.org
-Burundi ftp://ftp.bi.kernel.org
-Cambodia http://www.kh.kernel.org
-Cambodia ftp://ftp.kh.kernel.org
-Cameroon http://www.cm.kernel.org
-Cameroon ftp://ftp.cm.kernel.org
-Canada http://www.ca.kernel.org
-Canada ftp://ftp.ca.kernel.org
-Canary Islands http://www.ic.kernel.org
-Canary Islands ftp://ftp.ic.kernel.org
-Cape Verde http://www.cv.kernel.org
-Cape Verde ftp://ftp.cv.kernel.org
-Cayman Islands http://www.ky.kernel.org
-Cayman Islands ftp://ftp.ky.kernel.org
-Central African Republic http://www.cf.kernel.org
-Central African Republic ftp://ftp.cf.kernel.org
-Ceuta, Melilla http://www.ea.kernel.org
-Ceuta, Melilla ftp://ftp.ea.kernel.org
-Chad http://www.td.kernel.org
-Chad ftp://ftp.td.kernel.org
-Chile http://www.cl.kernel.org
-Chile ftp://ftp.cl.kernel.org
-China http://www.cn.kernel.org
-China ftp://ftp.cn.kernel.org
-Christmas Island http://www.cx.kernel.org
-Christmas Island ftp://ftp.cx.kernel.org
-Clipperton Island http://www.cp.kernel.org
-Clipperton Island ftp://ftp.cp.kernel.org
-Cocos (Keeling) Islands http://www.cc.kernel.org
-Cocos (Keeling) Islands ftp://ftp.cc.kernel.org
-Colombia http://www.co.kernel.org
-Colombia ftp://ftp.co.kernel.org
-Comoros http://www.km.kernel.org
-Comoros ftp://ftp.km.kernel.org
-Congo, Republic of http://www.cg.kernel.org
-Congo, Republic of ftp://ftp.cg.kernel.org
-Congo, Democratic Republic of The http://www.cd.kernel.org
-Congo, Democratic Republic of The ftp://ftp.cd.kernel.org
-Cook Islands http://www.ck.kernel.org
-Cook Islands ftp://ftp.ck.kernel.org
-Costa Rica http://www.cr.kernel.org
-Costa Rica ftp://ftp.cr.kernel.org
-Co^te D'Ivoire http://www.ci.kernel.org
-Co^te D'Ivoire ftp://ftp.ci.kernel.org
-Croatia http://www.hr.kernel.org
-Croatia ftp://ftp.hr.kernel.org
-Cyprus http://www.cy.kernel.org
-Cyprus ftp://ftp.cy.kernel.org
-Czech Republic http://www.cz.kernel.org
-Czech Republic ftp://ftp.cz.kernel.org
-Denmark http://www.dk.kernel.org
-Denmark ftp://ftp.dk.kernel.org
-Diego Garcia http://www.dg.kernel.org
-Diego Garcia ftp://ftp.dg.kernel.org
-Djibouti http://www.dj.kernel.org
-Djibouti ftp://ftp.dj.kernel.org
-Dominica http://www.dm.kernel.org
-Dominica ftp://ftp.dm.kernel.org
-Dominican Republic http://www.do.kernel.org
-Dominican Republic ftp://ftp.do.kernel.org
-East Timor http://www.tp.kernel.org
-East Timor ftp://ftp.tp.kernel.org
-Ecuador http://www.ec.kernel.org
-Ecuador ftp://ftp.ec.kernel.org
-Egypt http://www.eg.kernel.org
-Egypt ftp://ftp.eg.kernel.org
-El Salvador http://www.sv.kernel.org
-El Salvador ftp://ftp.sv.kernel.org
-Equatorial Guinea http://www.gq.kernel.org
-Equatorial Guinea ftp://ftp.gq.kernel.org
-Eritrea http://www.er.kernel.org
-Eritrea ftp://ftp.er.kernel.org
-Estonia http://www.ee.kernel.org
-Estonia ftp://ftp.ee.kernel.org
-Ethiopia http://www.et.kernel.org
-Ethiopia ftp://ftp.et.kernel.org
-Falkland Islands (Malvinas) http://www.fk.kernel.org
-Falkland Islands (Malvinas) ftp://ftp.fk.kernel.org
-Faroe Islands http://www.fo.kernel.org
-Faroe Islands ftp://ftp.fo.kernel.org
-Fiji http://www.fj.kernel.org
-Fiji ftp://ftp.fj.kernel.org
-Finland http://www.fi.kernel.org
-Finland ftp://ftp.fi.kernel.org
-France http://www.fr.kernel.org
-France ftp://ftp.fr.kernel.org
-French Guiana http://www.gf.kernel.org
-French Guiana ftp://ftp.gf.kernel.org
-French Polynesia http://www.pf.kernel.org
-French Polynesia ftp://ftp.pf.kernel.org
-French Southern Territories http://www.tf.kernel.org
-French Southern Territories ftp://ftp.tf.kernel.org
-Gabon http://www.ga.kernel.org
-Gabon ftp://ftp.ga.kernel.org
-Gambia http://www.gm.kernel.org
-Gambia ftp://ftp.gm.kernel.org
-Georgia http://www.ge.kernel.org
-Georgia ftp://ftp.ge.kernel.org
-Germany http://www.de.kernel.org
-Germany ftp://ftp.de.kernel.org
-Ghana http://www.gh.kernel.org
-Ghana ftp://ftp.gh.kernel.org
-Gibraltar http://www.gi.kernel.org
-Gibraltar ftp://ftp.gi.kernel.org
-Greece http://www.gr.kernel.org
-Greece ftp://ftp.gr.kernel.org
-Greenland http://www.gl.kernel.org
-Greenland ftp://ftp.gl.kernel.org
-Grenada http://www.gd.kernel.org
-Grenada ftp://ftp.gd.kernel.org
-Guadeloupe http://www.gp.kernel.org
-Guadeloupe ftp://ftp.gp.kernel.org
-Guam http://www.gu.kernel.org
-Guam ftp://ftp.gu.kernel.org
-Guatemala http://www.gt.kernel.org
-Guatemala ftp://ftp.gt.kernel.org
-Guernsey http://www.gg.kernel.org
-Guernsey ftp://ftp.gg.kernel.org
-Guinea http://www.gn.kernel.org
-Guinea ftp://ftp.gn.kernel.org
-Guinea-Bissau http://www.gw.kernel.org
-Guinea-Bissau ftp://ftp.gw.kernel.org
-Guyana http://www.gy.kernel.org
-Guyana ftp://ftp.gy.kernel.org
-Haiti http://www.ht.kernel.org
-Haiti ftp://ftp.ht.kernel.org
-Heard and Mc Donald Islands http://www.hm.kernel.org
-Heard and Mc Donald Islands ftp://ftp.hm.kernel.org
-Honduras http://www.hn.kernel.org
-Honduras ftp://ftp.hn.kernel.org
-Hong Kong http://www.hk.kernel.org
-Hong Kong ftp://ftp.hk.kernel.org
-Hungary http://www.hu.kernel.org
-Hungary ftp://ftp.hu.kernel.org
-Iceland http://www.is.kernel.org
-Iceland ftp://ftp.is.kernel.org
-India http://www.in.kernel.org
-India ftp://ftp.in.kernel.org
-Indonesia http://www.id.kernel.org
-Indonesia ftp://ftp.id.kernel.org
-Ireland http://www.ie.kernel.org
-Ireland ftp://ftp.ie.kernel.org
-Isle of Man http://www.im.kernel.org
-Isle of Man ftp://ftp.im.kernel.org
-Israel http://www.il.kernel.org
-Israel ftp://ftp.il.kernel.org
-Italy http://www.it.kernel.org
-Italy ftp://ftp.it.kernel.org
-Jamaica http://www.jm.kernel.org
-Jamaica ftp://ftp.jm.kernel.org
-Japan http://www.jp.kernel.org
-Japan ftp://ftp.jp.kernel.org
-Jersey http://www.je.kernel.org
-Jersey ftp://ftp.je.kernel.org
-Jordan http://www.jo.kernel.org
-Jordan ftp://ftp.jo.kernel.org
-Kazakhstan http://www.kz.kernel.org
-Kazakhstan ftp://ftp.kz.kernel.org
-Kenya http://www.ke.kernel.org
-Kenya ftp://ftp.ke.kernel.org
-Kiribati http://www.ki.kernel.org
-Kiribati ftp://ftp.ki.kernel.org
-Korea, South http://www.kr.kernel.org
-Korea, South ftp://ftp.kr.kernel.org
-Kuwait http://www.kw.kernel.org
-Kuwait ftp://ftp.kw.kernel.org
-Kyrgyzstan http://www.kg.kernel.org
-Kyrgyzstan ftp://ftp.kg.kernel.org
-Laos http://www.la.kernel.org
-Laos ftp://ftp.la.kernel.org
-Latvia http://www.lv.kernel.org
-Latvia ftp://ftp.lv.kernel.org
-Lebanon http://www.lb.kernel.org
-Lebanon ftp://ftp.lb.kernel.org
-Lesotho http://www.ls.kernel.org
-Lesotho ftp://ftp.ls.kernel.org
-Liberia http://www.lr.kernel.org
-Liberia ftp://ftp.lr.kernel.org
-Liechtenstein http://www.li.kernel.org
-Liechtenstein ftp://ftp.li.kernel.org
-Lithuania http://www.lt.kernel.org
-Lithuania ftp://ftp.lt.kernel.org
-Luxembourg http://www.lu.kernel.org
-Luxembourg ftp://ftp.lu.kernel.org
-Macau http://www.mo.kernel.org
-Macau ftp://ftp.mo.kernel.org
-Macedonia http://www.mk.kernel.org
-Macedonia ftp://ftp.mk.kernel.org
-Madagascar http://www.mg.kernel.org
-Madagascar ftp://ftp.mg.kernel.org
-Malawi http://www.mw.kernel.org
-Malawi ftp://ftp.mw.kernel.org
-Malaysia http://www.my.kernel.org
-Malaysia ftp://ftp.my.kernel.org
-Maldives http://www.mv.kernel.org
-Maldives ftp://ftp.mv.kernel.org
-Mali http://www.ml.kernel.org
-Mali ftp://ftp.ml.kernel.org
-Malta http://www.mt.kernel.org
-Malta ftp://ftp.mt.kernel.org
-Marshall Islands http://www.mh.kernel.org
-Marshall Islands ftp://ftp.mh.kernel.org
-Martinique http://www.mq.kernel.org
-Martinique ftp://ftp.mq.kernel.org
-Mauritania http://www.mr.kernel.org
-Mauritania ftp://ftp.mr.kernel.org
-Mauritius http://www.mu.kernel.org
-Mauritius ftp://ftp.mu.kernel.org
-Mayotte http://www.yt.kernel.org
-Mayotte ftp://ftp.yt.kernel.org
-Mexico http://www.mx.kernel.org
-Mexico ftp://ftp.mx.kernel.org
-Micronesia, Federated States of http://www.fm.kernel.org
-Micronesia, Federated States of ftp://ftp.fm.kernel.org
-Moldova http://www.md.kernel.org
-Moldova ftp://ftp.md.kernel.org
-Monaco http://www.mc.kernel.org
-Monaco ftp://ftp.mc.kernel.org
-Mongolia http://www.mn.kernel.org
-Mongolia ftp://ftp.mn.kernel.org
-Montserrat http://www.ms.kernel.org
-Montserrat ftp://ftp.ms.kernel.org
-Morocco http://www.ma.kernel.org
-Morocco ftp://ftp.ma.kernel.org
-Mozambique http://www.mz.kernel.org
-Mozambique ftp://ftp.mz.kernel.org
-Myanmar (Burma) http://www.mm.kernel.org
-Myanmar (Burma) ftp://ftp.mm.kernel.org
-Namibia http://www.na.kernel.org
-Namibia ftp://ftp.na.kernel.org
-Nauru http://www.nr.kernel.org
-Nauru ftp://ftp.nr.kernel.org
-Nepal http://www.np.kernel.org
-Nepal ftp://ftp.np.kernel.org
-Netherlands http://www.nl.kernel.org
-Netherlands ftp://ftp.nl.kernel.org
-Netherlands Antilles http://www.an.kernel.org
-Netherlands Antilles ftp://ftp.an.kernel.org
-New Caledonia http://www.nc.kernel.org
-New Caledonia ftp://ftp.nc.kernel.org
-New Zealand http://www.nz.kernel.org
-New Zealand ftp://ftp.nz.kernel.org
-Nicaragua http://www.ni.kernel.org
-Nicaragua ftp://ftp.ni.kernel.org
-Niger http://www.ne.kernel.org
-Niger ftp://ftp.ne.kernel.org
-Nigeria http://www.ng.kernel.org
-Nigeria ftp://ftp.ng.kernel.org
-Niue http://www.nu.kernel.org
-Niue ftp://ftp.nu.kernel.org
-Norfolk Island http://www.nf.kernel.org
-Norfolk Island ftp://ftp.nf.kernel.org
-Northern Mariana Islands http://www.mp.kernel.org
-Northern Mariana Islands ftp://ftp.mp.kernel.org
-Norway http://www.no.kernel.org
-Norway ftp://ftp.no.kernel.org
-Oman http://www.om.kernel.org
-Oman ftp://ftp.om.kernel.org
-Pakistan http://www.pk.kernel.org
-Pakistan ftp://ftp.pk.kernel.org
-Palau http://www.pw.kernel.org
-Palau ftp://ftp.pw.kernel.org
-Palestinian Territory http://www.ps.kernel.org
-Palestinian Territory ftp://ftp.ps.kernel.org
-Panama' http://www.pa.kernel.org
-Panama' ftp://ftp.pa.kernel.org
-Papua New Guinea http://www.py.kernel.org
-Papua New Guinea ftp://ftp.py.kernel.org
-Paraguay http://www.py.kernel.org
-Paraguay ftp://ftp.py.kernel.org
-Peru' http://www.pe.kernel.org
-Peru' ftp://ftp.pe.kernel.org
-Philippines http://www.ph.kernel.org
-Philippines ftp://ftp.ph.kernel.org
-Pitcairn Islands http://www.pn.kernel.org
-Pitcairn Islands ftp://ftp.pn.kernel.org
-Poland http://www.pl.kernel.org
-Poland ftp://ftp.pl.kernel.org
-Portugal http://www.pt.kernel.org
-Portugal ftp://ftp.pt.kernel.org
-Puerto Rico http://www.pr.kernel.org
-Puerto Rico ftp://ftp.pr.kernel.org
-Qatar http://www.qa.kernel.org
-Qatar ftp://ftp.qa.kernel.org
-Re'union http://www.re.kernel.org
-Re'union ftp://ftp.re.kernel.org
-Romania http://www.ro.kernel.org
-Romania ftp://ftp.ro.kernel.org
-Russian Federation http://www.ru.kernel.org
-Russian Federation ftp://ftp.ru.kernel.org
-Rwanda http://www.rw.kernel.org
-Rwanda ftp://ftp.rw.kernel.org
-Saint Helena http://www.sh.kernel.org
-Saint Helena ftp://ftp.sh.kernel.org
-Saint Kitts and Nevis http://www.kn.kernel.org
-Saint Kitts and Nevis ftp://ftp.kn.kernel.org
-Saint Lucia http://www.lc.kernel.org
-Saint Lucia ftp://ftp.lc.kernel.org
-Saint Pierre and Miquelon http://www.pm.kernel.org
-Saint Pierre and Miquelon ftp://ftp.pm.kernel.org
-Saint Vincent and The Grenadines http://www.vc.kernel.org
-Saint Vincent and The Grenadines ftp://ftp.vc.kernel.org
-Samoa http://www.ws.kernel.org
-Samoa ftp://ftp.ws.kernel.org
-San Marino http://www.sm.kernel.org
-San Marino ftp://ftp.sm.kernel.org
-Sa~o Tome' and Pri'ncipe http://www.st.kernel.org
-Sa~o Tome' and Pri'ncipe ftp://ftp.st.kernel.org
-Saudi Arabia http://www.sa.kernel.org
-Saudi Arabia ftp://ftp.sa.kernel.org
-Senegal http://www.sn.kernel.org
-Senegal ftp://ftp.sn.kernel.org
-Seychelles http://www.sc.kernel.org
-Seychelles ftp://ftp.sc.kernel.org
-Sierra Leone http://www.sl.kernel.org
-Sierra Leone ftp://ftp.sl.kernel.org
-Singapore http://www.sg.kernel.org
-Singapore ftp://ftp.sg.kernel.org
-Slovakia http://www.sk.kernel.org
-Slovakia ftp://ftp.sk.kernel.org
-Slovenia http://www.si.kernel.org
-Slovenia ftp://ftp.si.kernel.org
-Solomon Islands http://www.sb.kernel.org
-Solomon Islands ftp://ftp.sb.kernel.org
-Somalia http://www.so.kernel.org
-Somalia ftp://ftp.so.kernel.org
-South Africa http://www.za.kernel.org
-South Africa ftp://ftp.za.kernel.org
-South Georgia and The South Sandwich Islands http://www.gs.kernel.org
-South Georgia and The South Sandwich Islands ftp://ftp.gs.kernel.org
-Spain http://www.es.kernel.org
-Spain ftp://ftp.es.kernel.org
-Sri Lanka http://www.lk.kernel.org
-Sri Lanka ftp://ftp.lk.kernel.org
-Suriname http://www.sr.kernel.org
-Suriname ftp://ftp.sr.kernel.org
-Svalbard and Jan Mayen Islands http://www.sj.kernel.org
-Svalbard and Jan Mayen Islands ftp://ftp.sj.kernel.org
-Swaziland http://www.sz.kernel.org
-Swaziland ftp://ftp.sz.kernel.org
-Sweden http://www.se.kernel.org
-Sweden ftp://ftp.se.kernel.org
-Switzerland http://www.ch.kernel.org
-Switzerland ftp://ftp.ch.kernel.org
-Taiwan http://www.tw.kernel.org
-Taiwan ftp://ftp.tw.kernel.org
-Tajikistan http://www.tj.kernel.org
-Tajikistan ftp://ftp.tj.kernel.org
-Tanzania http://www.tz.kernel.org
-Tanzania ftp://ftp.tz.kernel.org
-Thailand http://www.th.kernel.org
-Thailand ftp://ftp.th.kernel.org
-Togo http://www.tg.kernel.org
-Togo ftp://ftp.tg.kernel.org
-Tokelau http://www.tk.kernel.org
-Tokelau ftp://ftp.tk.kernel.org
-Tonga http://www.to.kernel.org
-Tonga ftp://ftp.to.kernel.org
-Trinidad and Tobago http://www.ta.kernel.org
-Trinidad and Tobago ftp://ftp.ta.kernel.org
-Tunisia http://www.tn.kernel.org
-Tunisia ftp://ftp.tn.kernel.org
-Turkey http://www.tr.kernel.org
-Turkey ftp://ftp.tr.kernel.org
-Turkmenistan http://www.tm.kernel.org
-Turkmenistan ftp://ftp.tm.kernel.org
-Turks and Caicos Islands http://www.tc.kernel.org
-Turks and Caicos Islands ftp://ftp.tc.kernel.org
-Tuvalu http://www.tv.kernel.org
-Tuvalu ftp://ftp.tv.kernel.org
-Uganda http://www.ug.kernel.org
-Uganda ftp://ftp.ug.kernel.org
-Ukraine http://www.ua.kernel.org
-Ukraine ftp://ftp.ua.kernel.org
-United Arab Emirates http://www.ae.kernel.org
-United Arab Emirates ftp://ftp.ae.kernel.org
-United Kingdom http://www.uk.kernel.org
-United Kingdom ftp://ftp.uk.kernel.org
-United States http://www.us.kernel.org
-United States ftp://ftp.us.kernel.org
-United States Minor Outlying Islands http://www.um.kernel.org
-United States Minor Outlying Islands ftp://ftp.um.kernel.org
-Uruguay http://www.uy.kernel.org
-Uruguay ftp://ftp.uy.kernel.org
-Uzbekistan http://www.uz.kernel.org
-Uzbekistan ftp://ftp.uz.kernel.org
-Vanuatu http://www.vu.kernel.org
-Vanuatu ftp://ftp.vu.kernel.org
-Vatican City (Holy See) http://www.va.kernel.org
-Vatican City (Holy See) ftp://ftp.va.kernel.org
-Venezuela http://www.ve.kernel.org
-Venezuela ftp://ftp.ve.kernel.org
-Vietnam http://www.vn.kernel.org
-Vietnam ftp://ftp.vn.kernel.org
-Virgin Islands (British) http://www.vg.kernel.org
-Virgin Islands (British) ftp://ftp.vg.kernel.org
-Virgin Islands (U.S.) http://www.vi.kernel.org
-Virgin Islands (U.S.) ftp://ftp.vi.kernel.org
-Wallis and Futuna Islands http://www.wf.kernel.org
-Wallis and Futuna Islands ftp://ftp.wf.kernel.org
-Western Sahara http://www.eh.kernel.org
-Western Sahara ftp://ftp.eh.kernel.org
-Yemen http://www.ye.kernel.org
-Yemen ftp://ftp.ye.kernel.org
-Yugoslavia http://www.yu.kernel.org
-Yugoslavia ftp://ftp.yu.kernel.org
-Zambia http://www.zm.kernel.org
-Zambia ftp://ftp.zm.kernel.org
-Zimbabwe http://www.zw.kernel.org
-Zimbabwe ftp://ftp.zw.kernel.org
+Albania http://www.al.kernel.org/
+Albania ftp://ftp.al.kernel.org/
+Algeria http://www.dz.kernel.org/
+Algeria ftp://ftp.dz.kernel.org/
+American Samoa http://www.as.kernel.org/
+American Samoa ftp://ftp.as.kernel.org/
+Andorra http://www.ad.kernel.org/
+Andorra ftp://ftp.ad.kernel.org/
+Angola http://www.ai.kernel.org/
+Angola ftp://ftp.ai.kernel.org/
+Anguilla http://www.ai.kernel.org/
+Anguilla ftp://ftp.ai.kernel.org/
+Antarctica http://www.aq.kernel.org/
+Antarctica ftp://ftp.aq.kernel.org/
+Antigua and Barbuda http://www.ag.kernel.org/
+Antigua and Barbuda ftp://ftp.ag.kernel.org/
+Argentina http://www.ag.kernel.org/
+Argentina ftp://ftp.ag.kernel.org/
+Armenia http://www.am.kernel.org/
+Armenia ftp://ftp.am.kernel.org/
+Aruba http://www.aw.kernel.org/
+Aruba ftp://ftp.aw.kernel.org/
+Ascension Island http://www.ac.kernel.org/
+Ascension Island ftp://ftp.ac.kernel.org/
+Australia http://www.au.kernel.org/
+Australia ftp://ftp.au.kernel.org/
+Austria http://www.at.kernel.org/
+Austria ftp://ftp.at.kernel.org/
+Azerbaijan http://www.az.kernel.org/
+Azerbaijan ftp://ftp.az.kernel.org/
+Aland http://www.av.kernel.org/
+Aland ftp://ftp.av.kernel.org/
+Bahamas http://www.bs.kernel.org/
+Bahamas ftp://ftp.bs.kernel.org/
+Bahrain http://www.bh.kernel.org/
+Bahrain ftp://ftp.bh.kernel.org/
+Bangladesh http://www.bd.kernel.org/
+Bangladesh ftp://ftp.bd.kernel.org/
+Barbados http://www.bb.kernel.org/
+Barbados ftp://ftp.bb.kernel.org/
+Belarus http://www.by.kernel.org/
+Belarus ftp://ftp.by.kernel.org/
+Belgium http://www.be.kernel.org/
+Belgium ftp://ftp.be.kernel.org/
+Belize http://www.bz.kernel.org/
+Belize ftp://ftp.bz.kernel.org/
+Benin http://www.bj.kernel.org/
+Benin ftp://ftp.bj.kernel.org/
+Bermuda http://www.vm.kernel.org/
+Bermuda ftp://ftp.bm.kernel.org/
+Bhuta'n http://www.bt.kernel.org/
+Bhuta'n ftp://ftp.bt.kernel.org/
+Bolivia http://www.bo.kernel.org/
+Bolivia ftp://ftp.bo.kernel.org/
+Bosnia and Herzegowina http://www.ba.kernel.org/
+Bosnia and Herzegowina ftp://ftp.ba.kernel.org/
+Botswana http://www.bw.kernel.org/
+Botswana ftp://ftp.bw.kernel.org/
+Bouvet Island http://www.bv.kernel.org/
+Bouvet Island ftp://ftp.bv.kernel.org/
+Brazil http://www.br.kernel.org/
+Brazil ftp://ftp.br.kernel.org/
+British Indian Ocean Territory http://www.io.kernel.org/
+British Indian Ocean Territory ftp://ftp.io.kernel.org/
+Brunei Darussalam http://www.bn.kernel.org/
+Brunei Darussalam ftp://ftp.bn.kernel.org/
+Bulgaria http://www.bg.kernel.org/
+Bulgaria ftp://ftp.bg.kernel.org/
+Burkina Faso http://www.bf.kernel.org/
+Burkina Faso ftp://ftp.bf.kernel.org/
+Burundi http://www.bi.kernel.org/
+Burundi ftp://ftp.bi.kernel.org/
+Cambodia http://www.kh.kernel.org/
+Cambodia ftp://ftp.kh.kernel.org/
+Cameroon http://www.cm.kernel.org/
+Cameroon ftp://ftp.cm.kernel.org/
+Canada http://www.ca.kernel.org/
+Canada ftp://ftp.ca.kernel.org/
+Canary Islands http://www.ic.kernel.org/
+Canary Islands ftp://ftp.ic.kernel.org/
+Cape Verde http://www.cv.kernel.org/
+Cape Verde ftp://ftp.cv.kernel.org/
+Cayman Islands http://www.ky.kernel.org/
+Cayman Islands ftp://ftp.ky.kernel.org/
+Central African Republic http://www.cf.kernel.org/
+Central African Republic ftp://ftp.cf.kernel.org/
+Ceuta, Melilla http://www.ea.kernel.org/
+Ceuta, Melilla ftp://ftp.ea.kernel.org/
+Chad http://www.td.kernel.org/
+Chad ftp://ftp.td.kernel.org/
+Chile http://www.cl.kernel.org/
+Chile ftp://ftp.cl.kernel.org/
+China http://www.cn.kernel.org/
+China ftp://ftp.cn.kernel.org/
+Christmas Island http://www.cx.kernel.org/
+Christmas Island ftp://ftp.cx.kernel.org/
+Clipperton Island http://www.cp.kernel.org/
+Clipperton Island ftp://ftp.cp.kernel.org/
+Cocos (Keeling) Islands http://www.cc.kernel.org/
+Cocos (Keeling) Islands ftp://ftp.cc.kernel.org/
+Colombia http://www.co.kernel.org/
+Colombia ftp://ftp.co.kernel.org/
+Comoros http://www.km.kernel.org/
+Comoros ftp://ftp.km.kernel.org/
+Congo, Republic of http://www.cg.kernel.org/
+Congo, Republic of ftp://ftp.cg.kernel.org/
+Congo, Democratic Republic of The http://www.cd.kernel.org/
+Congo, Democratic Republic of The ftp://ftp.cd.kernel.org/
+Cook Islands http://www.ck.kernel.org/
+Cook Islands ftp://ftp.ck.kernel.org/
+Costa Rica http://www.cr.kernel.org/
+Costa Rica ftp://ftp.cr.kernel.org/
+Co^te D'Ivoire http://www.ci.kernel.org/
+Co^te D'Ivoire ftp://ftp.ci.kernel.org/
+Croatia http://www.hr.kernel.org/
+Croatia ftp://ftp.hr.kernel.org/
+Cyprus http://www.cy.kernel.org/
+Cyprus ftp://ftp.cy.kernel.org/
+Czech Republic http://www.cz.kernel.org/
+Czech Republic ftp://ftp.cz.kernel.org/
+Denmark http://www.dk.kernel.org/
+Denmark ftp://ftp.dk.kernel.org/
+Diego Garcia http://www.dg.kernel.org/
+Diego Garcia ftp://ftp.dg.kernel.org/
+Djibouti http://www.dj.kernel.org/
+Djibouti ftp://ftp.dj.kernel.org/
+Dominica http://www.dm.kernel.org/
+Dominica ftp://ftp.dm.kernel.org/
+Dominican Republic http://www.do.kernel.org/
+Dominican Republic ftp://ftp.do.kernel.org/
+East Timor http://www.tp.kernel.org/
+East Timor ftp://ftp.tp.kernel.org/
+Ecuador http://www.ec.kernel.org/
+Ecuador ftp://ftp.ec.kernel.org/
+Egypt http://www.eg.kernel.org/
+Egypt ftp://ftp.eg.kernel.org/
+El Salvador http://www.sv.kernel.org/
+El Salvador ftp://ftp.sv.kernel.org/
+Equatorial Guinea http://www.gq.kernel.org/
+Equatorial Guinea ftp://ftp.gq.kernel.org/
+Eritrea http://www.er.kernel.org/
+Eritrea ftp://ftp.er.kernel.org/
+Estonia http://www.ee.kernel.org/
+Estonia ftp://ftp.ee.kernel.org/
+Ethiopia http://www.et.kernel.org/
+Ethiopia ftp://ftp.et.kernel.org/
+Falkland Islands (Malvinas) http://www.fk.kernel.org/
+Falkland Islands (Malvinas) ftp://ftp.fk.kernel.org/
+Faroe Islands http://www.fo.kernel.org/
+Faroe Islands ftp://ftp.fo.kernel.org/
+Fiji http://www.fj.kernel.org/
+Fiji ftp://ftp.fj.kernel.org/
+Finland http://www.fi.kernel.org/
+Finland ftp://ftp.fi.kernel.org/
+France http://www.fr.kernel.org/
+France ftp://ftp.fr.kernel.org/
+French Guiana http://www.gf.kernel.org/
+French Guiana ftp://ftp.gf.kernel.org/
+French Polynesia http://www.pf.kernel.org/
+French Polynesia ftp://ftp.pf.kernel.org/
+French Southern Territories http://www.tf.kernel.org/
+French Southern Territories ftp://ftp.tf.kernel.org/
+Gabon http://www.ga.kernel.org/
+Gabon ftp://ftp.ga.kernel.org/
+Gambia http://www.gm.kernel.org/
+Gambia ftp://ftp.gm.kernel.org/
+Georgia http://www.ge.kernel.org/
+Georgia ftp://ftp.ge.kernel.org/
+Germany http://www.de.kernel.org/
+Germany ftp://ftp.de.kernel.org/
+Ghana http://www.gh.kernel.org/
+Ghana ftp://ftp.gh.kernel.org/
+Gibraltar http://www.gi.kernel.org/
+Gibraltar ftp://ftp.gi.kernel.org/
+Greece http://www.gr.kernel.org/
+Greece ftp://ftp.gr.kernel.org/
+Greenland http://www.gl.kernel.org/
+Greenland ftp://ftp.gl.kernel.org/
+Grenada http://www.gd.kernel.org/
+Grenada ftp://ftp.gd.kernel.org/
+Guadeloupe http://www.gp.kernel.org/
+Guadeloupe ftp://ftp.gp.kernel.org/
+Guam http://www.gu.kernel.org/
+Guam ftp://ftp.gu.kernel.org/
+Guatemala http://www.gt.kernel.org/
+Guatemala ftp://ftp.gt.kernel.org/
+Guernsey http://www.gg.kernel.org/
+Guernsey ftp://ftp.gg.kernel.org/
+Guinea http://www.gn.kernel.org/
+Guinea ftp://ftp.gn.kernel.org/
+Guinea-Bissau http://www.gw.kernel.org/
+Guinea-Bissau ftp://ftp.gw.kernel.org/
+Guyana http://www.gy.kernel.org/
+Guyana ftp://ftp.gy.kernel.org/
+Haiti http://www.ht.kernel.org/
+Haiti ftp://ftp.ht.kernel.org/
+Heard and Mc Donald Islands http://www.hm.kernel.org/
+Heard and Mc Donald Islands ftp://ftp.hm.kernel.org/
+Honduras http://www.hn.kernel.org/
+Honduras ftp://ftp.hn.kernel.org/
+Hong Kong http://www.hk.kernel.org/
+Hong Kong ftp://ftp.hk.kernel.org/
+Hungary http://www.hu.kernel.org/
+Hungary ftp://ftp.hu.kernel.org/
+Iceland http://www.is.kernel.org/
+Iceland ftp://ftp.is.kernel.org/
+India http://www.in.kernel.org/
+India ftp://ftp.in.kernel.org/
+Indonesia http://www.id.kernel.org/
+Indonesia ftp://ftp.id.kernel.org/
+Ireland http://www.ie.kernel.org/
+Ireland ftp://ftp.ie.kernel.org/
+Isle of Man http://www.im.kernel.org/
+Isle of Man ftp://ftp.im.kernel.org/
+Israel http://www.il.kernel.org/
+Israel ftp://ftp.il.kernel.org/
+Italy http://www.it.kernel.org/
+Italy ftp://ftp.it.kernel.org/
+Jamaica http://www.jm.kernel.org/
+Jamaica ftp://ftp.jm.kernel.org/
+Japan http://www.jp.kernel.org/
+Japan ftp://ftp.jp.kernel.org/
+Jersey http://www.je.kernel.org/
+Jersey ftp://ftp.je.kernel.org/
+Jordan http://www.jo.kernel.org/
+Jordan ftp://ftp.jo.kernel.org/
+Kazakhstan http://www.kz.kernel.org/
+Kazakhstan ftp://ftp.kz.kernel.org/
+Kenya http://www.ke.kernel.org/
+Kenya ftp://ftp.ke.kernel.org/
+Kiribati http://www.ki.kernel.org/
+Kiribati ftp://ftp.ki.kernel.org/
+Korea, South http://www.kr.kernel.org/
+Korea, South ftp://ftp.kr.kernel.org/
+Kuwait http://www.kw.kernel.org/
+Kuwait ftp://ftp.kw.kernel.org/
+Kyrgyzstan http://www.kg.kernel.org/
+Kyrgyzstan ftp://ftp.kg.kernel.org/
+Laos http://www.la.kernel.org/
+Laos ftp://ftp.la.kernel.org/
+Latvia http://www.lv.kernel.org/
+Latvia ftp://ftp.lv.kernel.org/
+Lebanon http://www.lb.kernel.org/
+Lebanon ftp://ftp.lb.kernel.org/
+Lesotho http://www.ls.kernel.org/
+Lesotho ftp://ftp.ls.kernel.org/
+Liberia http://www.lr.kernel.org/
+Liberia ftp://ftp.lr.kernel.org/
+Liechtenstein http://www.li.kernel.org/
+Liechtenstein ftp://ftp.li.kernel.org/
+Lithuania http://www.lt.kernel.org/
+Lithuania ftp://ftp.lt.kernel.org/
+Luxembourg http://www.lu.kernel.org/
+Luxembourg ftp://ftp.lu.kernel.org/
+Macau http://www.mo.kernel.org/
+Macau ftp://ftp.mo.kernel.org/
+Macedonia http://www.mk.kernel.org/
+Macedonia ftp://ftp.mk.kernel.org/
+Madagascar http://www.mg.kernel.org/
+Madagascar ftp://ftp.mg.kernel.org/
+Malawi http://www.mw.kernel.org/
+Malawi ftp://ftp.mw.kernel.org/
+Malaysia http://www.my.kernel.org/
+Malaysia ftp://ftp.my.kernel.org/
+Maldives http://www.mv.kernel.org/
+Maldives ftp://ftp.mv.kernel.org/
+Mali http://www.ml.kernel.org/
+Mali ftp://ftp.ml.kernel.org/
+Malta http://www.mt.kernel.org/
+Malta ftp://ftp.mt.kernel.org/
+Marshall Islands http://www.mh.kernel.org/
+Marshall Islands ftp://ftp.mh.kernel.org/
+Martinique http://www.mq.kernel.org/
+Martinique ftp://ftp.mq.kernel.org/
+Mauritania http://www.mr.kernel.org/
+Mauritania ftp://ftp.mr.kernel.org/
+Mauritius http://www.mu.kernel.org/
+Mauritius ftp://ftp.mu.kernel.org/
+Mayotte http://www.yt.kernel.org/
+Mayotte ftp://ftp.yt.kernel.org/
+Mexico http://www.mx.kernel.org/
+Mexico ftp://ftp.mx.kernel.org/
+Micronesia, Federated States of http://www.fm.kernel.org/
+Micronesia, Federated States of ftp://ftp.fm.kernel.org/
+Moldova http://www.md.kernel.org/
+Moldova ftp://ftp.md.kernel.org/
+Monaco http://www.mc.kernel.org/
+Monaco ftp://ftp.mc.kernel.org/
+Mongolia http://www.mn.kernel.org/
+Mongolia ftp://ftp.mn.kernel.org/
+Montserrat http://www.ms.kernel.org/
+Montserrat ftp://ftp.ms.kernel.org/
+Morocco http://www.ma.kernel.org/
+Morocco ftp://ftp.ma.kernel.org/
+Mozambique http://www.mz.kernel.org/
+Mozambique ftp://ftp.mz.kernel.org/
+Myanmar (Burma) http://www.mm.kernel.org/
+Myanmar (Burma) ftp://ftp.mm.kernel.org/
+Namibia http://www.na.kernel.org/
+Namibia ftp://ftp.na.kernel.org/
+Nauru http://www.nr.kernel.org/
+Nauru ftp://ftp.nr.kernel.org/
+Nepal http://www.np.kernel.org/
+Nepal ftp://ftp.np.kernel.org/
+Netherlands http://www.nl.kernel.org/
+Netherlands ftp://ftp.nl.kernel.org/
+Netherlands Antilles http://www.an.kernel.org/
+Netherlands Antilles ftp://ftp.an.kernel.org/
+New Caledonia http://www.nc.kernel.org/
+New Caledonia ftp://ftp.nc.kernel.org/
+New Zealand http://www.nz.kernel.org/
+New Zealand ftp://ftp.nz.kernel.org/
+Nicaragua http://www.ni.kernel.org/
+Nicaragua ftp://ftp.ni.kernel.org/
+Niger http://www.ne.kernel.org/
+Niger ftp://ftp.ne.kernel.org/
+Nigeria http://www.ng.kernel.org/
+Nigeria ftp://ftp.ng.kernel.org/
+Niue http://www.nu.kernel.org/
+Niue ftp://ftp.nu.kernel.org/
+Norfolk Island http://www.nf.kernel.org/
+Norfolk Island ftp://ftp.nf.kernel.org/
+Northern Mariana Islands http://www.mp.kernel.org/
+Northern Mariana Islands ftp://ftp.mp.kernel.org/
+Norway http://www.no.kernel.org/
+Norway ftp://ftp.no.kernel.org/
+Oman http://www.om.kernel.org/
+Oman ftp://ftp.om.kernel.org/
+Pakistan http://www.pk.kernel.org/
+Pakistan ftp://ftp.pk.kernel.org/
+Palau http://www.pw.kernel.org/
+Palau ftp://ftp.pw.kernel.org/
+Palestinian Territory http://www.ps.kernel.org/
+Palestinian Territory ftp://ftp.ps.kernel.org/
+Panama' http://www.pa.kernel.org/
+Panama' ftp://ftp.pa.kernel.org/
+Papua New Guinea http://www.py.kernel.org/
+Papua New Guinea ftp://ftp.py.kernel.org/
+Paraguay http://www.py.kernel.org/
+Paraguay ftp://ftp.py.kernel.org/
+Peru' http://www.pe.kernel.org/
+Peru' ftp://ftp.pe.kernel.org/
+Philippines http://www.ph.kernel.org/
+Philippines ftp://ftp.ph.kernel.org/
+Pitcairn Islands http://www.pn.kernel.org/
+Pitcairn Islands ftp://ftp.pn.kernel.org/
+Poland http://www.pl.kernel.org/
+Poland ftp://ftp.pl.kernel.org/
+Portugal http://www.pt.kernel.org/
+Portugal ftp://ftp.pt.kernel.org/
+Puerto Rico http://www.pr.kernel.org/
+Puerto Rico ftp://ftp.pr.kernel.org/
+Qatar http://www.qa.kernel.org/
+Qatar ftp://ftp.qa.kernel.org/
+Re'union http://www.re.kernel.org/
+Re'union ftp://ftp.re.kernel.org/
+Romania http://www.ro.kernel.org/
+Romania ftp://ftp.ro.kernel.org/
+Russian Federation http://www.ru.kernel.org/
+Russian Federation ftp://ftp.ru.kernel.org/
+Rwanda http://www.rw.kernel.org/
+Rwanda ftp://ftp.rw.kernel.org/
+Saint Helena http://www.sh.kernel.org/
+Saint Helena ftp://ftp.sh.kernel.org/
+Saint Kitts and Nevis http://www.kn.kernel.org/
+Saint Kitts and Nevis ftp://ftp.kn.kernel.org/
+Saint Lucia http://www.lc.kernel.org/
+Saint Lucia ftp://ftp.lc.kernel.org/
+Saint Pierre and Miquelon http://www.pm.kernel.org/
+Saint Pierre and Miquelon ftp://ftp.pm.kernel.org/
+Saint Vincent and The Grenadines http://www.vc.kernel.org/
+Saint Vincent and The Grenadines ftp://ftp.vc.kernel.org/
+Samoa http://www.ws.kernel.org/
+Samoa ftp://ftp.ws.kernel.org/
+San Marino http://www.sm.kernel.org/
+San Marino ftp://ftp.sm.kernel.org/
+Sa~o Tome' and Pri'ncipe http://www.st.kernel.org/
+Sa~o Tome' and Pri'ncipe ftp://ftp.st.kernel.org/
+Saudi Arabia http://www.sa.kernel.org/
+Saudi Arabia ftp://ftp.sa.kernel.org/
+Senegal http://www.sn.kernel.org/
+Senegal ftp://ftp.sn.kernel.org/
+Seychelles http://www.sc.kernel.org/
+Seychelles ftp://ftp.sc.kernel.org/
+Sierra Leone http://www.sl.kernel.org/
+Sierra Leone ftp://ftp.sl.kernel.org/
+Singapore http://www.sg.kernel.org/
+Singapore ftp://ftp.sg.kernel.org/
+Slovakia http://www.sk.kernel.org/
+Slovakia ftp://ftp.sk.kernel.org/
+Slovenia http://www.si.kernel.org/
+Slovenia ftp://ftp.si.kernel.org/
+Solomon Islands http://www.sb.kernel.org/
+Solomon Islands ftp://ftp.sb.kernel.org/
+Somalia http://www.so.kernel.org/
+Somalia ftp://ftp.so.kernel.org/
+South Africa http://www.za.kernel.org/
+South Africa ftp://ftp.za.kernel.org/
+South Georgia and The South Sandwich Islands http://www.gs.kernel.org/
+South Georgia and The South Sandwich Islands ftp://ftp.gs.kernel.org/
+Spain http://www.es.kernel.org/
+Spain ftp://ftp.es.kernel.org/
+Sri Lanka http://www.lk.kernel.org/
+Sri Lanka ftp://ftp.lk.kernel.org/
+Suriname http://www.sr.kernel.org/
+Suriname ftp://ftp.sr.kernel.org/
+Svalbard and Jan Mayen Islands http://www.sj.kernel.org/
+Svalbard and Jan Mayen Islands ftp://ftp.sj.kernel.org/
+Swaziland http://www.sz.kernel.org/
+Swaziland ftp://ftp.sz.kernel.org/
+Sweden http://www.se.kernel.org/
+Sweden ftp://ftp.se.kernel.org/
+Switzerland http://www.ch.kernel.org/
+Switzerland ftp://ftp.ch.kernel.org/
+Taiwan http://www.tw.kernel.org/
+Taiwan ftp://ftp.tw.kernel.org/
+Tajikistan http://www.tj.kernel.org/
+Tajikistan ftp://ftp.tj.kernel.org/
+Tanzania http://www.tz.kernel.org/
+Tanzania ftp://ftp.tz.kernel.org/
+Thailand http://www.th.kernel.org/
+Thailand ftp://ftp.th.kernel.org/
+Togo http://www.tg.kernel.org/
+Togo ftp://ftp.tg.kernel.org/
+Tokelau http://www.tk.kernel.org/
+Tokelau ftp://ftp.tk.kernel.org/
+Tonga http://www.to.kernel.org/
+Tonga ftp://ftp.to.kernel.org/
+Trinidad and Tobago http://www.ta.kernel.org/
+Trinidad and Tobago ftp://ftp.ta.kernel.org/
+Tunisia http://www.tn.kernel.org/
+Tunisia ftp://ftp.tn.kernel.org/
+Turkey http://www.tr.kernel.org/
+Turkey ftp://ftp.tr.kernel.org/
+Turkmenistan http://www.tm.kernel.org/
+Turkmenistan ftp://ftp.tm.kernel.org/
+Turks and Caicos Islands http://www.tc.kernel.org/
+Turks and Caicos Islands ftp://ftp.tc.kernel.org/
+Tuvalu http://www.tv.kernel.org/
+Tuvalu ftp://ftp.tv.kernel.org/
+Uganda http://www.ug.kernel.org/
+Uganda ftp://ftp.ug.kernel.org/
+Ukraine http://www.ua.kernel.org/
+Ukraine ftp://ftp.ua.kernel.org/
+United Arab Emirates http://www.ae.kernel.org/
+United Arab Emirates ftp://ftp.ae.kernel.org/
+United Kingdom http://www.uk.kernel.org/
+United Kingdom ftp://ftp.uk.kernel.org/
+United States http://www.us.kernel.org/
+United States ftp://ftp.us.kernel.org/
+United States Minor Outlying Islands http://www.um.kernel.org/
+United States Minor Outlying Islands ftp://ftp.um.kernel.org/
+Uruguay http://www.uy.kernel.org/
+Uruguay ftp://ftp.uy.kernel.org/
+Uzbekistan http://www.uz.kernel.org/
+Uzbekistan ftp://ftp.uz.kernel.org/
+Vanuatu http://www.vu.kernel.org/
+Vanuatu ftp://ftp.vu.kernel.org/
+Vatican City (Holy See) http://www.va.kernel.org/
+Vatican City (Holy See) ftp://ftp.va.kernel.org/
+Venezuela http://www.ve.kernel.org/
+Venezuela ftp://ftp.ve.kernel.org/
+Vietnam http://www.vn.kernel.org/
+Vietnam ftp://ftp.vn.kernel.org/
+Virgin Islands (British) http://www.vg.kernel.org/
+Virgin Islands (British) ftp://ftp.vg.kernel.org/
+Virgin Islands (U.S.) http://www.vi.kernel.org/
+Virgin Islands (U.S.) ftp://ftp.vi.kernel.org/
+Wallis and Futuna Islands http://www.wf.kernel.org/
+Wallis and Futuna Islands ftp://ftp.wf.kernel.org/
+Western Sahara http://www.eh.kernel.org/
+Western Sahara ftp://ftp.eh.kernel.org/
+Yemen http://www.ye.kernel.org/
+Yemen ftp://ftp.ye.kernel.org/
+Yugoslavia http://www.yu.kernel.org/
+Yugoslavia ftp://ftp.yu.kernel.org/
+Zambia http://www.zm.kernel.org/
+Zambia ftp://ftp.zm.kernel.org/
+Zimbabwe http://www.zw.kernel.org/
+Zimbabwe ftp://ftp.zw.kernel.org/
diff --git a/etc/lunar/mirrors/LRESORT b/etc/lunar/mirrors/LRESORT
index b463ced..ce72eb5 100644
--- a/etc/lunar/mirrors/LRESORT
+++ b/etc/lunar/mirrors/LRESORT
@@ -1,7 +1,6 @@
Custom Custom
-Master site - US http://lunar-linux.org/lunar/cache
-Mirror site - TX-US http://tx-us.lunar-linux.org/lunar/cache
-Mirror site - SE http://se.lunar-linux.org/lunar/cache
-Mirror site - DE http://de.lunar-linux.org/lunar/cache
-Mirror site - DK http://dk.lunar-linux.org/files/cache
-Mirror site - NL http://nl.lunar-linux.org/lunar/cache
+Mirror site - TX-US http://tx-us.lunar-linux.org/lunar/cache/
+Mirror site - SE http://gbg-se.lunar-linux.org/lunar/cache/
+Mirror site - DE http://de.lunar-linux.org/lunar/cache/
+Master site - NL http://lunar-linux.org/lunar/cache/
+Mirror site - NL http://nl.lunar-linux.org/lunar/cache/
diff --git a/etc/lunar/mirrors/SFORGE b/etc/lunar/mirrors/SFORGE
index 4a2130c..7c3b0fc 100644
--- a/etc/lunar/mirrors/SFORGE
+++ b/etc/lunar/mirrors/SFORGE
@@ -1,14 +1,22 @@
-United States http://easynews.dl.sourceforge.net/sourceforge
-Australia http://flow.dl.sourceforge.net/sourceforge
-Belgium http://belnet.dl.sourceforge.net/sourceforge
-Chechia http://cesnet.dl.sourceforge.net/sourceforge
-Ireland http://heanet.dl.sourceforge.net/sourceforge
-Switzerland http://switch.dl.sourceforge.net/sourceforge
-United States http://aleron.dl.sourceforge.net/sourceforge
-United States http://telia.dl.sourceforge.net/sourceforge
-United States http://twtelecom.dl.sourceforge.net/sourceforge
-United States http://unc.dl.sourceforge.net/sourceforge
-United States http://umn.dl.sourceforge.net/sourceforge
-United States http://west.dl.sourceforge.net/sourceforge
-Australia http://optusnet.dl.sourceforge.net/sourceforge
-Germany http://mesh.dl.sourceforge.net/sourceforge
+easynews (US) http://easynews.dl.sourceforge.net/sourceforge/
+voxel (US) http://voxel.dl.sourceforge.net/sourceforge/
+jaist (JP) http://jaist.dl.sourceforge.net/sourceforge/
+optusnet (AU) http://optusnet.dl.sourceforge.net/sourceforge/
+heanet (IE) http://heanet.dl.sourceforge.net/sourceforge/
+puzzle (CH) http://puzzle.dl.sourceforge.net/sourceforge/
+ovh (FR) http://ovh.dl.sourceforge.net/sourceforge/
+nchc (TW) http://nvhv.dl.sourceforge.net/sourceforge/
+kent (UK) http://kent.dl.sourceforge.net/sourceforge/
+cogent (US) http://cogent.dl.sourceforge.net/sourceforge/
+citkit (RU) http://citkit.dl.sourceforge.net/sourceforge/
+mesh (DE) http://mesh.dl.sourceforge.net/sourceforge/
+switch (CH) http://switch.dl.sourceforge.net/sourceforge/
+belnet (BE) http://belnet.dl.sourceforge.net/sourceforge/
+flow (AU) http://flow.dl.sourceforge.net/sourceforge/
+cesnet (CZ) http://cesnet.dl.sourceforge.net/sourceforge/
+United States http://aleron.dl.sourceforge.net/sourceforge/
+United States http://telia.dl.sourceforge.net/sourceforge/
+United States http://twtelecom.dl.sourceforge.net/sourceforge/
+United States http://unc.dl.sourceforge.net/sourceforge/
+United States http://umn.dl.sourceforge.net/sourceforge/
+United States http://west.dl.sourceforge.net/sourceforge/
diff --git a/etc/lunar/mirrors/XFREE86 b/etc/lunar/mirrors/XFREE86
index ac83e70..9cad545 100644
--- a/etc/lunar/mirrors/XFREE86
+++ b/etc/lunar/mirrors/XFREE86
@@ -1,43 +1,43 @@
-"Master Site" ftp://ftp.xfree86.org/pub/XFree86
+"Master Site" ftp://ftp.xfree86.org/pub/XFree86/
"Custom Mirror" Custom
-Korea ftp://ftp.kreonet.re.kr/pub/Linux/xfree86
-Japan ftp://ftp.netlab.is.tsukuba.ac.jp/pub/XFree86
-Japan ftp://ftp.iij.ad.jp/pub/X/XFree86
-Japan ftp://kddlabs.co.jp/X/XFree86
-Australia and New Zeland http://www.planetmirror.com/pub/XFree86
-Australia and New Zeland ftp://ftp.planetmirror.com/pub/XFree86
-Australia and New Zeland ftp://mirror.aarnet.edu.au/pub/XFree86
-Australia and New Zeland ftp://x.physics.usyd.edu.au/pub/XFree86
-Costa Rica ftp://xfree.ulatina.ac.cr
-Austria ftp://gd.tuwien.Ac.at/hci/X11/XFree86
-Czech Republic ftp://ftp.fee.vutbr.cz/pub/XFree86
-Denmark ftp://mirror.inet.tele.dk/mirrors/ftp.xfree86.org/pub/XFree86
-Finland ftp://ftp.funet.fi/pub/X11/XFree86
-France ftp://ftp.free.fr/pub/XFree86
-France ftp://ftp.lip6.fr/pub/X11/XFree86
-France ftp://ftp.ovh.net/mirrors
-Germany ftp://ftp.cs.tu-berlin.de/pub/X/XFree86
-Germany ftp://ftp.gwdg.de/pub/xfree86/XFree86
-Germany ftp://ftp.mpi-sb.mpg.de/pub/X/mirror/ftp.xfree86.org/XFree86
-Germany ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/ftp.xfree86.org
-Germany ftp://ftp.uni-erlangen.de/pub/Linux/MIRROR.xfree86
-Germany ftp://ftp.uni-stuttgart.de/pub/X11/Xfree86
-Germany http://ftp-stud.fht-esslingen.de/pub/Mirrors/ftp.xfree86.org/XFree86
-Italy ftp://ftp.unina.it/pub/XFree86
-Ireland ftp://ftp.esat.net/pub/X11/XFree86
-Netherlands ftp://ftp.nl.uu.net/pub/XFree86
-Netherlands ftp://dl.xs4all.nl/pub2/mirror/XFree
-Norway ftp://sunsite.uio.no/pub/XFree86
-Poland ftp://ftp.task.gda.pl/pub/XFree86
-Spain ftp://ftp.cica.es/pub/XFree86
-Spain ftp://ftp.cica.es/mirrors/XFree86
-United Kingdom ftp://sunsite.doc.ic.ac.uk/packages/XFree86
-United States ftp://ftp.calderasystems.com/pub/mirrors/xfree86
-United States ftp://carroll.cac.psu.edu/pub/XFree86
-United States ftp://ftp.cs.umn.edu/pub/XFree86
-United States ftp://download.sourceforge.net/pub/mirrors/XFree86
-United States ftp://ftp.freesoftware.com/pub/XFree86
-United States ftp://ftp.infomagic.com/pub/mirrors/XFree86
-United States ftp://mirror.sftw.com/pub/XFree86
-United States ftp://phyppro1.phy.bnl.gov/pub/XFree86
-United States ftp://ftp.rge.com/pub/X/XFree86
+Korea ftp://ftp.kreonet.re.kr/pub/Linux/xfree86/
+Japan ftp://ftp.netlab.is.tsukuba.ac.jp/pub/XFree86/
+Japan ftp://ftp.iij.ad.jp/pub/X/XFree86/
+Japan ftp://kddlabs.co.jp/X/XFree86/
+Australia and New Zeland http://www.planetmirror.com/pub/XFree86/
+Australia and New Zeland ftp://ftp.planetmirror.com/pub/XFree86/
+Australia and New Zeland ftp://mirror.aarnet.edu.au/pub/XFree86/
+Australia and New Zeland ftp://x.physics.usyd.edu.au/pub/XFree86/
+Costa Rica ftp://xfree.ulatina.ac.cr/
+Austria ftp://gd.tuwien.Ac.at/hci/X11/XFree86/
+Czech Republic ftp://ftp.fee.vutbr.cz/pub/XFree86/
+Denmark ftp://mirror.inet.tele.dk/mirrors/ftp.xfree86.org/pub/XFree86/
+Finland ftp://ftp.funet.fi/pub/X11/XFree86/
+France ftp://ftp.free.fr/pub/XFree86/
+France ftp://ftp.lip6.fr/pub/X11/XFree86/
+France ftp://ftp.ovh.net/mirrors/
+Germany ftp://ftp.cs.tu-berlin.de/pub/X/XFree86/
+Germany ftp://ftp.gwdg.de/pub/xfree86/XFree86/
+Germany ftp://ftp.mpi-sb.mpg.de/pub/X/mirror/ftp.xfree86.org/XFree86/
+Germany ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/ftp.xfree86.org/
+Germany ftp://ftp.uni-erlangen.de/pub/Linux/MIRROR.xfree86/
+Germany ftp://ftp.uni-stuttgart.de/pub/X11/Xfree86/
+Germany http://ftp-stud.fht-esslingen.de/pub/Mirrors/ftp.xfree86.org/XFree86/
+Italy ftp://ftp.unina.it/pub/XFree86/
+Ireland ftp://ftp.esat.net/pub/X11/XFree86/
+Netherlands ftp://ftp.nl.uu.net/pub/XFree86/
+Netherlands ftp://dl.xs4all.nl/pub2/mirror/XFree/
+Norway ftp://sunsite.uio.no/pub/XFree86/
+Poland ftp://ftp.task.gda.pl/pub/XFree86/
+Spain ftp://ftp.cica.es/pub/XFree86/
+Spain ftp://ftp.cica.es/mirrors/XFree86/
+United Kingdom ftp://sunsite.doc.ic.ac.uk/packages/XFree86/
+United States ftp://ftp.calderasystems.com/pub/mirrors/xfree86/
+United States ftp://carroll.cac.psu.edu/pub/XFree86/
+United States ftp://ftp.cs.umn.edu/pub/XFree86/
+United States ftp://download.sourceforge.net/pub/mirrors/XFree86/
+United States ftp://ftp.freesoftware.com/pub/XFree86/
+United States ftp://ftp.infomagic.com/pub/mirrors/XFree86/
+United States ftp://mirror.sftw.com/pub/XFree86/
+United States ftp://phyppro1.phy.bnl.gov/pub/XFree86/
+United States ftp://ftp.rge.com/pub/X/XFree86/
diff --git a/sbin/lget b/sbin/lget
index e329516..d4f604e 100755
--- a/sbin/lget
+++ b/sbin/lget
@@ -56,17 +56,6 @@ main() {
cd $TMPDIR
MODULES="$@"
-
- if [ -n "$MOD_VERSION" ] ; then
- if [ $(echo $MODULES | wc -w) -gt 1 ] ; then
- message "${MESSAGE_COLOR} -V|--Version only allowed for single-module install!${DEFAULT_COLOR}"
- exit 1
- else
- MODULES="$MODULES/$MOD_VERSION"
- message "module = $MODULES"
- fi
- fi
-
if [ -z "$MODULES" ] ; then
verbose_msg "downloading entire moonbase"
MODULES=$(list_moonbase | sort)
@@ -114,7 +103,6 @@ else
-h|--help ) help ; exit 1 ;;
-u|--url ) export BASE_URL="$2" ; shift 2 ;;
-v|--verbose ) export VERBOSE="on" ; shift ;;
- -V|--Version ) export MOD_VERSION=$2 ; shift 2 ;;
--) shift ; break ;;
*) help ; exit ;;
esac
diff --git a/sbin/lin b/sbin/lin
index a3f818e..7c944a4 100755
--- a/sbin/lin
+++ b/sbin/lin
@@ -51,7 +51,6 @@ Optional Parameters:
-R | --resurrect Force to be unpacked from /var/cache/lunar
-s | --silent Decreases the level of message output
-v | --verbose Increases the level of message output
--V | --Version Select specific Version of module to install
-w | --want version Try to install a different version that is
not in moonbase
EOF
@@ -63,11 +62,9 @@ main() {
debug_msg "main ($@)"
MODULES="$@"
- verbose_msg "mod_v=\"$MOD_VERSION\" mod=\"$MODULES\""
-
if echo $MODULES | grep -qw moonbase ; then
# just update moonbase, no other modules
- if ! get_moonbase ; then
+ if ! lget moonbase ; then
exit 1
fi
# remove moonbase rofm MODULES and continue
@@ -86,11 +83,6 @@ main() {
# and single modules (plain install)
if [ -z "$SINGLE_MODULE" ] ; then
- if [ -n "$MOD_VERSION" ] ; then
- message "${MESSAGE_COLOR} -V|--Version only allowed for single-module install!${DEFAULT_COLOR}"
- exit 1
- fi
-
if [ -z "$TEMP_DOWNLOAD_PIDS" ] ; then
export TEMP_DOWNLOAD_PIDS=$(temp_create "download-pids")
export TEMP_PREPAREDDEPS=$(temp_create "prepared-depends")
@@ -136,7 +128,7 @@ main() {
if ! module_held $MODULE ; then
linING="/var/lock/installing.$MODULE"
verbose_msg "starting lin \"$MODULE\""
- if ! SINGLE_MODULE=1 lin $COMPILE $PROBE $SILENT $MODULE ; then
+ if ! ( SINGLE_MODULE=1 main $MODULE ) ; then
if [ -e "$TMP_LIN_FAIL" ] ; then
echo "$MODULE" >> $TMP_LIN_FAIL
fi
@@ -162,24 +154,6 @@ main() {
MODULE=$MODULES
unset RECONFIGURE
- if [ -n "$MOD_VERSION" ] ; then
- if echo $MODULE | grep -q '/' ; then
- if [ -d ${MOONBASE}/*/${MODULE} ] ; then
- unset MOD_VERSION
- else
- message "${PROBLEM_COLOR}No Moonbase module: ${FILE_COLOR}$MODULE${MESSAGE_COLOR} with \"$MODULE\" form, bailing!${DEFAULT_COLOR}"
- return 1
- fi
- else
- if [ -d ${MOONBASE}/*/${MODULE}/${MOD_VERSION} ] ; then
- MODULE="${MODULE}/${MOD_VERSION}"
- else
- debug_msg "${MESSAGE_COLOR}$MODULES Passing ${FILE_COLOR}$MOD_VERSION${MESSAGE_COLOR} to module for processing${DEFAULT_COLOR}"
- fi
- message "Module=\"$MODULE\""
- fi
- fi
-
run_details $MODULE &&
run_depends $MODULE &&
satisfy_depends $MODULE
@@ -249,7 +223,6 @@ else
-R|--resurrect ) export RESURRECT="$1" ; shift ;;
-s|--silent ) export SILENT="$1" ; shift ;;
-v|--verbose ) export VERBOSE="on" ; shift ;;
- -V|--Version ) export MOD_VERSION=$2 ; shift 2 ;;
-w|--want ) export WANT_VERSION=$2 ; shift 2 ;;
--) shift ; break ;;
*) help ; break ;;
diff --git a/sbin/lrm b/sbin/lrm
index fdb4f5d..5420f5b 100755
--- a/sbin/lrm
+++ b/sbin/lrm
@@ -148,6 +148,10 @@ lrm_module() {
run_module_file $MODULE PRE_REMOVE
fi
+ if [ "$MODULE" != "moonbase" ]; then
+ update_plugin $MODULE remove
+ fi
+
# init.d scripts stop before rm phase, but only if ! upgrading
if [ "$KEEPCONFIG" != "on" -a "$UPGRADE" != "on" ] ; then
# pre-read these variables!
diff --git a/sbin/lsh b/sbin/lsh
index 695e03e..cee5269 100755
--- a/sbin/lsh
+++ b/sbin/lsh
@@ -13,7 +13,7 @@ if (( $# > 0 )) ; then
else
export PS1="\[\033[0;31m\][lunar] \u@\h \w \\$ \[\033[0m\]"
message "\n ${PROBLEM_COLOR}Warning:${DEFAULT_COLOR}${MESSAGE_COLOR}" \
- "lsh is potential hazardous to your system.${DEFAULT_COLOR}\n"
+ "lsh is potentially hazardous to your system.${DEFAULT_COLOR}\n"
bash --rcfile /etc/lunar/config
fi
diff --git a/usr/share/man/man8/lin.8 b/usr/share/man/man8/lin.8
index 908227b..c0d89e1 100644
--- a/usr/share/man/man8/lin.8
+++ b/usr/share/man/man8/lin.8
@@ -49,11 +49,6 @@ Decreases the level of message output.
.TP
.B "\-v, \-\-verbose"
Increases the level of message output.
-.TP
-.B "\-V, \-\-Version version
-Specify a (non-standard) module version for installation.
-.B Note:
-versions must begin with a numeral ([0-9]).
.SH "FILES"
All files can be edited by hand, but its easier to edit them with
.B lunar.
diff --git a/usr/share/man/man8/lrm.8 b/usr/share/man/man8/lrm.8
index ca7da96..30debe3 100644
--- a/usr/share/man/man8/lrm.8
+++ b/usr/share/man/man8/lrm.8
@@ -5,11 +5,15 @@ lrm \- removes Lunar software modules
.B lrm
[options] [module1] ... [module2] ...
.PP
-.B lrm -h|--help
+.B lrm
+-h|--help
.PP
-.B lrm -d|--debug|-k|--keepconfig|-n|--nosustain|-p|--purge|-u|--upgrade|-v|--verbose <module(s)>
+.B lrm
+-d|--debug|-k|--keepconfig|-n|--nosustain|-p|--purge|-u|--upgrade|
+-v|--verbose <module(s)>
.PP
-.B lrm -D|--downgrade <module> <version>
+.B lrm
+-D|--downgrade <module> <version>
.PP
.SH COPYRIGHT
.if n lrm(8) is Copyright (C) 2002-2003 Terry Chan with portions copyrighted by previous authors 2001-2002
diff --git a/var/lib/lunar/functions/aliases.lunar b/var/lib/lunar/functions/aliases.lunar
index c4eaa82..e8c521f 100644
--- a/var/lib/lunar/functions/aliases.lunar
+++ b/var/lib/lunar/functions/aliases.lunar
@@ -23,11 +23,6 @@ unalias() {
return
fi
done
- # shortcut out when not installed and running lvu
- if [ "$(basename $0)" == "lvu" ] ; then
- echo $1
- return
- fi
# shortcut out: in the satisfy_depends stage we should NOT ask this again
if [ -z "$DEPS_ONLY" ] ; then
# first we check if this dependency is already existant in the exact
@@ -60,6 +55,12 @@ unalias() {
done
fi
+ # shortcut out when explicitly instructed so
+ if [ -n "$NEVER_ASK" ] ; then
+ echo $1
+ return
+ fi
+
# propose one and let the user pick it from a list:
debug_msg "unalias: starting selection loop"
error_message "${MODULE_COLOR}$MODULE${DEFAULT_COLOR}${MESSAGE_COLOR} depends on ${DEFAULT_COLOR}${QUERY_COLOR}\"${1:1}\"${DEFAULT_COLOR}${MESSAGE_COLOR} which is an alias${DEFAULT_COLOR}"
diff --git a/var/lib/lunar/functions/build.lunar b/var/lib/lunar/functions/build.lunar
index 3370f92..223250c 100644
--- a/var/lib/lunar/functions/build.lunar
+++ b/var/lib/lunar/functions/build.lunar
@@ -261,6 +261,7 @@ default_post_build() {
} | tee -a $C_LOG
install_initd
+ update_plugin $MODULE install
devoke_installwatch
ldconfig
@@ -307,11 +308,10 @@ prepare_module_config() {
# run the CONFIGURE script
run_configure() {
- mod_v_safe_edit $MODULE
debug_msg "run_configure ($@)"
if [ -n "$RECONFIGURE" ]; then
- verbose_msg "Reconfiguring \"$MOD_V_SNAME\""
- rm -f $DEPENDS_CONFIG/$MOD_V_SNAME
+ verbose_msg "Reconfiguring \"$MODULE\""
+ rm -f $DEPENDS_CONFIG/$MODULE
remove_depends $MODULE
fi
@@ -386,9 +386,8 @@ run_post_install() {
if [ ! -e /var/state/lunar/module_history ]; then
mkdir /var/state/lunar/module_history
fi
- mod_v_safe_edit $MODULE &&
SCRIPT_DATE=$(date -u +%Y%m%d) &&
- MH_NAME=$MOD_V_SNAME-$VERSION-$SCRIPT_DATE.tar.bz2 &&
+ MH_NAME=$MODULE-$VERSION-$SCRIPT_DATE.tar.bz2 &&
cd $MOONBASE/$SECTION &&
tar -cjf /var/state/lunar/module_history/$MH_NAME $MODULE
)
diff --git a/var/lib/lunar/functions/check.lunar b/var/lib/lunar/functions/check.lunar
index 86136e3..f2ed4a0 100644
--- a/var/lib/lunar/functions/check.lunar
+++ b/var/lib/lunar/functions/check.lunar
@@ -1,232 +1,23 @@
#!/bin/bash
-# #
-# check/lunar - checking functions #
-# #
-############################################################
-# cast is part of the sorcery spell management utility #
-# Copyright 2001 by Kyle Sallee #
############################################################
# #
-# this WAS the cast script of a source based Linux distro, #
-# calls Sorcerer GNU/Linux, or SGL. SGL is no longer #
-# available with GPL license. Since this script was taken #
-# before licensing scheme change, no legal problems I #
-# guess. #
-# #
-# the code is re-written for Lunar. The previous Copyright #
-# notices are kept; just in case some code is left :=) #
-# Kagan Kongar <kongar at tsrsb.org.tr>, 20020519 #
+# check/lunar - module santy checking functions #
# #
############################################################
# #
-# Parts Copyrighted Jason Johnston 2002 under GPLv2 #
-# Parts Copyrighted Kagan Kongar 2002 under GPLv2 #
+# Copyright 2005 Auke Kok under GPLv2 #
# #
############################################################
-ldd_check() {
- debug_msg "ldd_check ($@)"
- if [ "$LDD_CHECK" == "off" ] ; then
- return
- fi
- MODULE=$1
- VERSION=`installed_version $MODULE`
- I_LOG=$INSTALL_LOGS/$MODULE-$VERSION
- LDD_STATUS=0
-
- if [ -e "$I_LOG" ]; then
- IFS_OLD="$IFS"
- export IFS="
-"
-
- LOG=`cat $I_LOG |
- grep "/bin/\|/games/\|/lib/\|/sbin/" |
- grep -v "/doc/\|/fonts/\|/include/\|/locale/\|/man/\|/modules/\|/var/"`
-
- for FILE in $LOG; do
- if [ -f "$FILE" ] &&
- [ ! -h "$FILE" ] &&
- file -b "$FILE" |
- grep -q "ELF" &&
- ldd "$FILE" 2>&1 |
- grep -q "not found"
- then
- ( export IFS="$IFS_OLD"
- message "${FILE_COLOR}${FILE}" \
- "${DEFAULT_COLOR}of" \
- "${MODULE_COLOR}${MODULE}" \
- "${PROBLEM_COLOR}is broken." \
- "${DEFAULT_COLOR}"
- ldd "$FILE" 2>&1 | grep "not found"
- )
- LDD_STATUS=1
- fi
- done
- fi
- return $LDD_STATUS
-}
-
-
-find_check() {
- debug_msg "find_check ($@)"
- if [ "$FIND_CHECK" == "off" ] ||
- [ "$1" == "xfree86" ] ||
- [ "$1" == "xfree86-custom" ]; then
- return
- fi
- MODULE=$1
- VERSION=`installed_version $MODULE`
- I_LOG=$INSTALL_LOGS/$MODULE-$VERSION
- FIND_STATUS=0
-
- if [ -e "$I_LOG" ]; then
- IFS_OLD="$IFS"
- export IFS="
-"
-
- LOG=`cat $I_LOG |
- grep "/bin/\|/games/\|/include/\|/lib/\|/sbin/" |
- grep -v "/doc/\|/etc/\|/fonts/\|/man/\|/var/"`
-
- for ITEM in $LOG ; do
- if [ -e "$ITEM" ]; then
- true
- else
- ( export IFS="$IFS_OLD"
- message "${FILE_COLOR}${ITEM}" \
- "${DEFAULT_COLOR}of" \
- "${MODULE_COLOR}${MODULE}" \
- "${PROBLEM_COLOR}is missing." \
- "${DEFAULT_COLOR}"
- )
- FIND_STATUS=1
- fi
- done
- else
- ( export IFS="$IFS_OLD"
- message "${MODULE_COLOR}${MODULE} " \
- "${PROBLEM_COLOR}is missing an install log." \
- "${DEFAULT_COLOR}"
- )
- FIND_STATUS=1
- fi
- return $FIND_STATUS
-}
-
-
-remove_line() {
- debug_msg "remove_line ($@)"
- F_TMP=$(temp_create "${MODULE}.remove-line")
- cp $I_LOG $F_TMP
- grep -v $ITEM $F_TMP > $I_LOG
- temp_destroy $F_TMP
-
- message "Symbolic link: ${SYMLINK_COLOR}${ITEM}${DEFAULT_COLOR}" \
- "is owned by ${MODULE_COLOR}${MODULE}${DEFAULT_COLOR}"
- message "Target of symbolic link is ${FILE_COLOR}${TARGET}${DEFAULT_COLOR}"
- message "${FILE_COLOR}${TARGET}${DEFAULT_COLOR} is owned by $(grep "^$TARGET$" $INSTALL_LOGS/* | cut -d: -f1)"
- message "Removed: ${SYMLINK_COLOR}${ITEM}${DEFAULT_COLOR} from ${I_LOG}"
-}
-
-
-sym_check() {
- debug_msg "sym_check ($@)"
- if [ "$SYM_CHECK" == "off" ]; then
- return
- fi
- MODULE=$1
- VERSION=`installed_version $MODULE`
- I_LOG=$INSTALL_LOGS/$MODULE-$VERSION
-
- if [ -e "$I_LOG" ]; then
- IFS_OLD="$IFS"
- export IFS="
-"
-
- LOG=`cat $I_LOG`
-
- for ITEM in $LOG ; do
- if [ -h "$ITEM" ] &&
- [ -f "$ITEM" ]
- then
- TARGET=$( basename $( ls -la "$ITEM" |
- cut -d '>' -f2 |
- cut -c 2-
- )
- )
- if ! grep -q "$TARGET" $I_LOG
- then ( export IFS="$IFS_OLD"; remove_line )
- fi
- fi
- done
- fi
-}
-
-
-md5sum_check() {
- debug_msg "md5sum_check ($@)"
- if [ "$MD5SUM_CHECK" == "off" ]; then
- return
- fi
-
- MODULE=$1
- VERSION=`installed_version $MODULE`
- MD5_LOG="$MD5SUM_LOGS/$MODULE-$VERSION"
-
- MD5SUM_STATUS=0
-
- if [ -e "$MD5_LOG" ]; then
- IFS_OLD="$IFS"
- export IFS="
-"
-
- OUTPUT=`cat $MD5_LOG |
- grep "/bin/\|/games/\|/include/\|/lib/\|/sbin/" |
- grep -v "/doc/\|/etc/\|/fonts/\|/man/\|/var/" |
- md5sum --check 2>/dev/null |
- grep -v ": OK" |
- cut -d : -f1`
-
- if [ -n "$OUTPUT" ]; then
- for FILE in $OUTPUT; do
- if [ -f "$FILE" ] &&
- [ ! -h "$FILE" ] &&
- file -b "$FILE" |
- egrep -q "executable|shared object|current ar archive"
- then
- MD5SUM=`md5sum $FILE`
- if ! grep -q "$MD5SUM" $MD5SUM_LOGS/*; then
- ( export IFS="$IFS_OLD"
- message "${FILE_COLOR}${FILE}" \
- "${DEFAULT_COLOR}of" \
- "${MODULE_COLOR}${MODULE}" \
- "${PROBLEM_COLOR}has wrong md5sum." \
- "${DEFAULT_COLOR}"
- )
- MD5SUM_STATUS=1
- fi
- fi
- done
- fi
- else
- ( export IFS="$IFS_OLD"
- message "${MODULE_COLOR}${MODULE} " \
- "${PROBLEM_COLOR}is missing a md5sum log." \
- "${DEFAULT_COLOR}"
- )
- MD5SUM_STATUS=1
- fi
- return $MD5SUM_STATUS
-}
-
-
run_checks() {
debug_msg "run_checks ($@)"
- sym_check $1
- find_check $1 &&
- ldd_check $1 &&
- md5sum_check $1
+ verbose_msg "Running sanity checks for module \"$1\""
+ plugin_call MODULE_CHECK $1
+ if [ $? == 2 ]; then
+ return 0
+ fi
+ return 1
}
@@ -276,16 +67,15 @@ rework_module() {
# here starts the real work:
MODULE=$1
- mod_v_safe_edit $1
# remove whatever depends was residing in the depends state file and
# append the new output:
- lock_file $DEPENDS_STATUS &&
- lock_file $DEPENDS_STATUS_BACKUP &&
- grep -v "^$MOD_V_SNAME:" $DEPENDS_STATUS_BACKUP > $DEPENDS_STATUS &&
- run_depends $MOD_V_SNAME >> $DEPENDS_STATUS &&
- cat $DEPENDS_STATUS > $DEPENDS_STATUS_BACKUP &&
- unlock_file $DEPENDS_STATUS &&
+ lock_file $DEPENDS_STATUS_BACKUP &&
+ lock_file $DEPENDS_STATUS &&
+ grep -v "^$MODULE:" $DEPENDS_STATUS_BACKUP > $DEPENDS_STATUS &&
+ run_depends $MODULE >> $DEPENDS_STATUS &&
+ cat $DEPENDS_STATUS > $DEPENDS_STATUS_BACKUP &&
+ unlock_file $DEPENDS_STATUS &&
unlock_file $DEPENDS_STATUS_BACKUP
}
@@ -314,23 +104,10 @@ run_fix() {
MODULES=$(list_installed | grep -v moonbase)
fi
- if [ -z "$EXPORT_LD_PATH" ] ; then
- verbose_msg "Saving LD_LIBRARY_PATH=\"$LD_LIBRARY_PATH\""
- export EXPORT_LD_PATH=$(find /usr/lib -type d ! -empty)
- fi
- if [ "$LDD_CHECK" == "on" ] ; then
- LD_LIBRARY_PATH_OLD="$LD_LIBRARY_PATH"
- export_ld $EXPORT_LD_PATH
- fi
-
- until [ "$FIXED" == "yes" ] || [ "$HOPELESS" == "yes" ] ; do
- FIXED="yes"
- HOPELESS="no"
-
- for MODULE in $MODULES ; do
- # ENV separation required here!
- (
- run_details $MODULE &&
+ for MODULE in $MODULES ; do
+ # ENV separation required here!
+ (
+ run_details $MODULE &&
fix_depends $MODULE &&
# if we were called with --fixdepends then we may skip the rest
@@ -338,46 +115,25 @@ run_fix() {
continue
fi
- if module_installed $MODULE &&
- [ "$MODULE" != "lunar" ] &&
- [ "$MODULE" != "j2sdk" ] &&
- ! module_held $MODULE &&
- ! echo $PASSED | grep -qw "$MODULE"; then
+ if module_installed $MODULE && ! module_held $MODULE ; then
- if run_checks $MODULE || [ -n "$NOFIX" ] ; then
- PASSED="$PASSED $MODULE"
- else
- FIXED="no"
- satisfy_depends &&
- unset FIX &&
- satisfy_depends &&
-
- if [ "$LDD_CHECK" == "on" ] ; then
- export LD_LIBRARY_PATH="$LD_LIBRARY_PATH_OLD"
- export_ld $EXPORT_LD_PATH
+ if ! run_checks $MODULE ; then
+ if [ -n "$NOFIX" ] ; then
+ continue
fi
+ satisfy_depends &&
+ FIX= satisfy_depends &&
- if run_checks $MODULE || [ -n "$NOFIX" ] ; then
-
- PASSED="$PASSED $MODULE"
- if [ "$LDD_CHECK" == "on" ] ; then
- export LD_LIBRARY_PATH="$LD_LIBRARY_PATH_OLD"
- export_ld $EXPORT_LD_PATH
- fi
-
- else
- unset FIX
- if ! lin --compile $MODULE ; then
- HOPELESS="yes"
+ if ! run_checks $MODULE ; then
+ if ! FIX= lin --compile $MODULE ; then
+ continue
elif ! run_checks $MODULE ; then
- HOPELESS="yes"
+ continue
fi
- export FIX="--fix"
fi
fi
fi
- )
- done
+ )
done
}
diff --git a/var/lib/lunar/functions/depends.lunar b/var/lib/lunar/functions/depends.lunar
index 8abad14..e6f7572 100644
--- a/var/lib/lunar/functions/depends.lunar
+++ b/var/lib/lunar/functions/depends.lunar
@@ -67,7 +67,16 @@ sort_by_dependency() {
done
# tsort the existing dep relations in all of moonbase
- cat $DEPENDS_CACHE | awk -F: '{print $1" "$2}' | while read A B ; do echo $A $(unalias $B) ; done | tsort 2> /dev/null | tac > $TMP_ALL
+ TMP_TSRT=$(temp_create "dependency.sort")
+ for LINE in $(cat $DEPENDS_CACHE); do
+ A=$(echo $LINE | cut -d: -f1)
+ B=$(echo $LINE | cut -d: -f2)
+ B=$(MODULE=$A NEVER_ASK=1 DEPS_ONLY= unalias $B)
+ echo "$A $B" >> $TMP_TSRT
+ done
+ tsort $TMP_TSRT 2> /dev/null | tac > $TMP_ALL
+ temp_destroy $TMP_TSRT
+
# append all modules that do not have a DEPENDS file at all at the end
# note that this is logically WRONG, but it actually will help with
# unincluded depends, and therefore is *better* behaviour
@@ -92,14 +101,6 @@ is_depends() {
}
-# dont use until agreed on dev mailinglist
-#is_depended() {
-# debug_msg "is_depended ($@)"
-# # Is $1 a previously selected dependency of any module.
-# return $(grep -q "^$1:$2:on:" $DEPENDS_STATUS)
-#}
-
-
in_depends() {
debug_msg "in_depends ($@)"
# Was $2 presented as a depenency for module $1
@@ -126,26 +127,26 @@ remove_depends() {
cp $DEPENDS_STATUS $DEPENDS_STATUS_BACKUP
- unlock_file $DEPENDS_STATUS_BACKUP &&
- unlock_file $DEPENDS_STATUS
+ unlock_file $DEPENDS_STATUS &&
+ unlock_file $DEPENDS_STATUS_BACKUP
}
add_depends() {
debug_msg "add_depends ($@)"
if ! grep -q "^$1:$2:$3:$4:$5:$6$" $DEPENDS_STATUS ; then
- if grep -q "^$1:$2:" $DEPENDS_STATUS ; then
- remove_depends "$1" "$2"
- fi
-
- verbose_msg "adding \"$4\" depends for \"$1\" on \"$2\" ($3)"
-
lock_file $DEPENDS_STATUS_BACKUP &&
lock_file $DEPENDS_STATUS &&
- echo "$1:$2:$3:$4:$5:$6" >> $DEPENDS_STATUS &&
- cat $DEPENDS_STATUS > $DEPENDS_STATUS_BACKUP &&
- unlock_file $DEPENDS_STATUS_BACKUP &&
- unlock_file $DEPENDS_STATUS
+ if grep -q "^$1:$2:" $DEPENDS_STATUS ; then
+ grep -v "^$1:$2:" $DEPENDS_STATUS_BACKUP > $DEPENDS_STATUS
+ else
+ verbose_msg "adding \"$4\" depends for \"$1\" on \"$2\" ($3)"
+ fi
+
+ echo "$1:$2:$3:$4:$5:$6" >> $DEPENDS_STATUS &&
+ cat $DEPENDS_STATUS > $DEPENDS_STATUS_BACKUP &&
+ unlock_file $DEPENDS_STATUS &&
+ unlock_file $DEPENDS_STATUS_BACKUP
fi
}
@@ -220,7 +221,6 @@ run_depends() {
fi
}
- prepare_depends_status
grep -q "^"$MODULE"\$" $TEMP_PREPAREDDEPS 2>/dev/null && return 0
if [ -s "$SCRIPT_DIRECTORY/DEPENDS" ] ; then
if [ -n "$SINGLE_MODULE" ] ; then
@@ -304,7 +304,7 @@ conflicts() {
lrm $DEP
else
message "${PROBLEM_COLOR}ERROR: Cannot continue installing conflicting modules, exiting!${DEFAULT_COLOR}"
- return 1
+ exit 1
fi
fi
@@ -318,14 +318,6 @@ run_conflicts() {
}
-# create the dependency files if they do not exist
-prepare_depends_status() {
- debug_msg "prepare_depends_status ($@)"
- [ -f $DEPENDS_STATUS ] || touch $DEPENDS_STATUS
- [ -f $DEPENDS_STATUS_BACKUP ] || touch $DEPENDS_STATUS_BACKUP
-}
-
-
build_module_depends() {
(
debug_msg "build_module_depends ($@)"
@@ -398,7 +390,7 @@ create_depends_cache() {
# fast method for re-creating the depends.cache, might take long though
for DEPFILE in $DEPFILES ; do
- MODULE=$(echo $DEPFILE | sed -e "s:$MOONBASE/::g" -e "s:/DEPENDS::g" | cut -d/ -f2-) . $DEPFILE
+ MODULE=$(echo $DEPFILE | sed -e "s:$MOONBASE/::g" -e "s:/DEPENDS::g" -e 's/.*\/\([^\/]*\)$/\1/') . $DEPFILE
done > $TMP_DEP_CACHE &&
install -m644 $TMP_DEP_CACHE $DEPENDS_CACHE
diff --git a/var/lib/lunar/functions/download.lunar b/var/lib/lunar/functions/download.lunar
index 910bbd2..7e6d288 100644
--- a/var/lib/lunar/functions/download.lunar
+++ b/var/lib/lunar/functions/download.lunar
@@ -4,460 +4,192 @@
# download.lunar - get sources from the net #
# #
############################################################
-# leach is part of the sorcery spell management utility #
-# Copyright 2001 by Kyle Sallee #
-############################################################
-# #
-# this WAS the leach script of a source based Linux distro,#
-# calls Sorcerer GNU/Linux, or SGL. SGL is no longer #
-# available with GPL license. Since this script was taken #
-# before licensing scheme change, no legal problems I #
-# guess. #
-# #
-# the code is re-written for Lunar. The previous Copyright #
-# notices are kept; just in case some code is left :=) #
-# Kagan Kongar <kongar at tsrsb.org.tr>, 20020519 #
# #
-# This secondly was lget mostly, and has been moved into #
-# a separate lunar functions file handling all the generic #
-# downloading functionality for lunar #
+# Copyrigh Auke Kok / Lunar-Linux 2005 under GPLv2 #
# #
############################################################
-# #
-# Parts Copyrighted Jason Johnston 2002 under GPLv2 #
-# #
-# Parts Copyrighted Kagan Kongar 2002 under GPLv2 #
-# #
-# Parts Copyrighted Auke Kok 2002 under GPLv2 #
-# #
-############################################################
-
-
-get_cpan() {
- debug_msg "skipping cpan downloads for $@"
-}
-
-
-get_svn() {
- debug_msg "get_svn ($@)"
- if ! module_installed subversion ; then
- message "${PROBLEM_COLOR}! Cannot fetch SVN sources without \"subversion\" installed${DEFAULT_COLOR}"
- exit 1
- fi
-
- SVN_URL=$(echo $1 | cut -d: -f1-2)
- SVN_DIR=$(echo $1 | cut -d: -f3)
-
- message "${MESSAGE_COLOR}Downloading SVN module for" \
- "module ${MODULE_COLOR}${MODULE}${DEFAULT_COLOR}"
-
- mk_source_dir $TMPDIR/$MODULE-$VERSION
- cd $TMPDIR/$MODULE-$VERSION
-
- if [ -f "$2" ] ; then
- verbose_msg "Extracting local SVN copy"
- # unpacking in last component dir of $SVN_DIR
- CD=$(pwd -P)
- if ! tar xjf $2 ; then
- message "${PROBLEM_COLOR}Warning: bad local SVN copy, checking out fresh SVN copy${DEFAULT_COLOR}"
-
- rm_source_dir $TMPDIR/$MODULE-$VERSION
- mk_source_dir $TMPDIR/$MODULE-$VERSION
- fi
- cd $CD
- fi
- NUM_RETRY=${NUM_RETRY:-5}
- if [ "$NUM_RETRY" -eq 0 ]; then
- NUM_RETRY=1000
- fi
-
- for (( TRY=1 ; $TRY<$NUM_RETRY+1 ; TRY++ )) ; do
- if [ -d "${SVN_DIR}/.svn" ] ; then
- cd ${SVN_DIR}
- verbose_msg "[${TRY}] svn up"
- svn up && GOT_SVN="yes"
- cd ${CD}
- else
- verbose_msg "[${TRY}] svn co $SVN_URL $SVN_DIR"
- svn co $SVN_URL $SVN_DIR && GOT_SVN="yes"
- fi
-
- if [ "$?" == "0" ] ; then
- break
- fi
-
- sleep 2
- done
-
- if [ "$GOT_SVN" == "yes" ] ; then
- message "${MESSAGE_COLOR}Creating ${FILE_COLOR}$2${DEFAULT_COLOR}"
- # pack in last component dir of $SVN_DIR
- tar cjf $2 $SVN_DIR
- else
- activity_log "lget" "$MODULE" "$VERSION" "failed" "Could not get $1"
- fi
-
- cd $TMPDIR
- rm_source_dir $TMPDIR/$MODULE-$VERSION
+lget_lock() {
+ debug_msg "lget_lock ($@)"
+ echo $$ > /var/lock/lgetting.$MODULE
}
-get_cvs() {
- debug_msg "get_cvs ($@)"
- if ! module_installed cvs ; then
- message "${PROBLEM_COLOR}! Cannot fetch CVS sources without \"cvs\" installed!${DEFAULT_COLOR}"
- exit 1
- fi
-
- [ -f ~/.cvspass ] || touch ~/.cvspass
- CVSURL=$(echo $1 | sed "s:^cvs\://::")
- CVSARGS=$(echo $CVSURL | cut -d@ -f1)
- CVSSERVER=$(echo $CVSURL | cut -d@ -f2 | cut -d: -f1)
- CVSSPATH=$(echo $CVSURL | cut -d@ -f2 | cut -d: -f2)
- CVSMODULE=$(echo $CVSURL | cut -d@ -f2 | cut -d: -f3)
- CVSRELEASE=$(echo $CVSURL | cut -d@ -f2 | cut -d: -f4)
- CVSOPTIONS=$(echo $CVSURL | cut -d@ -f2 | cut -d: -f5)
-
- if [ ! -z "$CVSRELEASE" ]; then
- CVSRELEASE="-r $CVSRELEASE"
- fi
-
- CVSROOT="$CVSARGS@$CVSSERVER:$CVSSPATH"
-
- message "${MESSAGE_COLOR}Downloading CVS module" \
- "${FILE_COLOR}${CVSMODULE}${DEFAULT_COLOR}${MESSAGE_COLOR}" \
- "for module ${MODULE_COLOR}${MODULE}${DEFAULT_COLOR}"
-
- mk_source_dir $TMPDIR/$MODULE-$VERSION
- cd $TMPDIR/$MODULE-$VERSION
-
- if [ -f "$2" ] ; then
- verbose_msg "Extracting local CVS copy"
- # unpacking in last component dir of $CVSMODULE
- CD=$(pwd -P)
- debug_msg "get_cvs: PWD=$PWD mkdir -p $(dirname $CVSMODULE)"
- mkdir -p $(dirname $CVSMODULE)
- cd $(dirname $CVSMODULE)
- debug_msg "get_cvs: PWD=$PWD tar xjf $2"
- if ! tar xjf $2 ; then
- message "${PROBLEM_COLOR}Warning: bad local CVS copy, checking out fresh CVS copy${DEFAULT_COLOR}"
-
- rm_source_dir $TMPDIR/$MODULE-$VERSION
- mk_source_dir $TMPDIR/$MODULE-$VERSION
- cd $TMPDIR/$MODULE-$VERSION
- else
- cd $TMPDIR/$MODULE-$VERSION/$CVSMODULE
- fi
- fi
-
- verbose_msg "CVSROOT=\"$CVSROOT\""
-
- NUM_RETRY=${NUM_RETRY:-5}
- if [ "$NUM_RETRY" -eq 0 ]; then
- NUM_RETRY=1000
- fi
-
- for (( TRY=1 ; $TRY<$NUM_RETRY+1 ; TRY++ )) ; do
- if [ -d CVS ] ; then
- verbose_msg "[${TRY}] cvs -qz3 up -PAd $CVSOPTIONS $CVSRELEASE"
- cvs -qz3 up -PAd $CVSOPTIONS $CVSRELEASE && GOT_CVS="yes"
- else
- verbose_msg "[${TRY}] cvs -qz3 co $CVSOPTIONS $CVSRELEASE $CVSMODULE"
- CVSROOT=$CVSROOT cvs -qz3 co $CVSOPTIONS $CVSRELEASE $CVSMODULE && GOT_CVS="yes"
- fi
-
- if [ "$?" == "0" ] ; then
- break
- fi
-
- sleep 2
- done
-
- if [ "$GOT_CVS" == "yes" ] ; then
- message "${MESSAGE_COLOR}Creating ${FILE_COLOR}${2}${DEFAULT_COLOR}"
- # pack in last component dir of $CVSMODULE
- cd $TMPDIR/$MODULE-$VERSION/$(dirname $CVSMODULE)
- tar cjf $2 $(basename $CVSMODULE)
- cd $CD
- else
- activity_log "lget" "$MODULE" "$VERSION" "failed" "Could not get $CVSMODULE"
- fi
-
- cd $TMPDIR
- rm_source_dir $TMPDIR/$MODULE-$VERSION
-
-}
-
-
-call_wget() {
- debug_msg "call_wget ($@)"
-
- # this is what the download will be stored as initially:
- TMP_FILE=$TMPDIR/$(basename $2)
-
- if [ "$FTP_ACTIVE" == "off" -o "$FTP_PASSIVE" == "on" ] ; then
- WGET_FTP_CONNECTION="--passive-ftp"
- fi
-
- if [ "$CONTINUE" == "off" ] ; then
- erase $TMP_FILE
- else
- WGET_PARTIAL="--continue"
- fi
-
- if [ "$USE_CACHE" == "off" ] ; then
- WGET_CACHE="--cache=off"
- else
- WGET_CACHE="--cache=on"
- fi
-
- if [ -n "$DOWNLOAD_RATE" ] ; then
- WGET_RATE="--limit-rate=${DOWNLOAD_RATE}"
- fi
-
- WGET_RETRIES="--tries=${WGET_NUM_RETRY:=5}"
-
- [ -n "$http_proxy" ] && export http_proxy=$http_proxy
- [ -n "$ftp_proxy" ] && export ftp_proxy=$ftp_proxy
- [ -n "$no_proxy" ] && export no_proxy=$no_proxy
-
- verbose_msg "calling \"wget $WGET_CACHE $WGET_RATE $WGET_FTP_CONNECTION $WGET_RETRIES $WGET_PARTIAL $1 --output-document $TMP_FILE\""
- if erase $TMP_FILE && wget $WGET_CACHE $WGET_RATE $WGET_FTP_CONNECTION $WGET_RETRIES $WGET_PARTIAL "$1" --output-document "$TMP_FILE" ; then
- # looks like it worked
- if testpack $TMP_FILE ; then
- install -m644 $TMP_FILE $(dirname $2)/$(basename $TMP_FILE)
- rm $TMP_FILE
- verbose_msg "download of \"$1\" successful"
- else
- rm -f $TMP_FILE
- fi
- else
- activity_log "lget" "$MODULE" "$VERSION" "failed" "broken URL: $1"
- return 1
- fi
-}
-
-
-# function: get_url
-# usage : get_url URL DESTINATION
-#
-# if left blank, destination defaults to $SOURCE_CACHE/$(filename URL)
-# if specified, the remainder will be copied to $DESTINATION
-#
-get_url() {
-(
- cd $TMPDIR
- debug_msg "get_url ($@)"
- if [ -n "$1" ] ; then
- if [ "${1:0:6}" == "cvs://" ] ; then
- # cvs urls
- CVS_THRESHOLD=${CVS_THRESHOLD:-10}
- if (( "$CVS_THRESHOLD" > 0 )) ; then
- if [ ! -f "$2" ] ; then
- get_cvs $1 $2
- elif [ "$(find $2 -amin +$CVS_THRESHOLD)" == "$2" ] ; then
- get_cvs $1 $2
- else
- verbose_msg "Skipping cvs update (less than $CVS_THRESHOLD mins old)"
- fi
- else
- get_cvs $1 $2
- fi
- elif [ "${1:0:6}" == "svn://" ] ; then
- # svn urls
- SVN_THRESHOLD=${SVN_THRESHOLD:-10}
- if (( "SVN_THRESHOLD" > 0 )) ; then
- if [ ! -f "$2" ] ; then
- get_svn $1 $2
- elif [ "$(find $2 -amin +$SVN_THRESHOLD)" == "$2" ] ; then
- get_svn $1 $2
+lget_locked() {
+ debug_msg "lget_locked ($@)"
+ if [ -f "/var/lock/lgetting.$MODULE" ] &&
+ ps `cat /var/lock/lgetting.$MODULE` | grep -q "lget" ; then
+ true
else
- verbose_msg "Skipping svn update (less than $SVN_THRESHOLD mins old)"
+ false
fi
- else
- get_svn $1 $2
- fi
- elif [ "${1:0:7}" == "cpan://" ] ; then
- # skip CPAN modules here...
- URL="$CPAN_URL/${1:7}"
- FILE=$(basename $URL)
- get_url $URL $2
-
- # adding this since wget is a bitch and will not fetch this... sigh
- # this will copy file to $2... so you may use it as you like
- elif [ -n "$BASE_URL" -a "${BASE_URL:0:7}" == "file://" ] ; then
- cp $(echo $BASE_URL | sed 's/file:\/\///') $2
- elif [ "${1:0:7}" == "file://" ] ; then
- cp $(echo $1 | sed 's/file:\/\///') $2
-
- else
- # ordinary URL's handled by call_wget
- connect &&
- if [ -n "$BASE_URL" ] ; then
- # base url set means we don't touch the other possibilities:
- call_wget $BASE_URL/$(basename $2) $2
- else
- if [ -n "$FRESORT_URL" ] ; then
- # try fresort first
- if ! call_wget $FRESORT_URL/$(basename $2) $2 ; then
- # normal url second
- if ! call_wget $1 $2 ; then
- # and failover
- call_wget $LRESORT_URL/$(basename $2) $2
- fi
- fi
- elif ! call_wget $1 $2 ; then
- # just try the normal url
- if [ -n "$LRESORT_URL" ] ; then
- # and the failover url
- call_wget $LRESORT_URL/$(basename $2) $2
- fi
- fi
- fi
- fi
- fi
-)
}
-lget_lock() {
- debug_msg "lget_lock ($@)"
- mod_v_safe_edit $1
- echo $$ > /var/lock/lgetting.$MOD_V_SNAME
+lget_unlock() {
+ debug_msg "lget_unlock ($@)"
+ rm -f /var/lock/lgetting.$MODULE &> /dev/null
}
-lget_locked() {
- debug_msg "lget_locked ($@)"
- mod_v_safe_edit $1
- if [ -f "/var/lock/lgetting.$MOD_V_SNAME" ] &&
- ps `cat /var/lock/lgetting.$MOD_V_SNAME` | grep -q "lget" ; then
- true
- else
- false
- fi
+download_url() {
+ debug_msg "download_url($@)"
+ verbose_msg "trying to download \"$URL\""
+ connect &&
+ plugin_call SOURCE_DOWNLOAD $1 $2 $3
+ RETVAL=$?
+ if [ $RETVAL == 2 ]; then
+ message "${PROBLEM_COLOR}Warning:${QUERY_COLOR} I don't know how to download \"$1\"${DEFAULT_COLOR}"
+ fi
+ return $RETVAL
}
-lget_unlock() {
- debug_msg "lget_unlock ($@)"
- mod_v_safe_edit $1
- rm -f /var/lock/lgetting.$MOD_V_SNAME &> /dev/null
-}
-
download_module() {
(
- debug_msg "download_module ($@)"
- if ! run_details $1 ; then
- exit 1
- fi
-
- MAX_SOURCES=${MAX_SOURCES:=100}
-
- # loop over all sources
- for (( N = 0 ; N < MAX_SOURCES ; N++ )) ; do
- # get the URL part
- eval SRC=\$$(echo SOURCE$N | sed s/SOURCE0/SOURCE/ )
- eval URLS=\${$(echo SOURCE${N}_URL | sed s/SOURCE0/SOURCE/ )[@]}
-
- # continue (to next) if empty once, break if empty tiwce
- if [ -z "$SRC" ] ; then
- if [ -z "$SECOND" ] ; then
- SECOND="yes"
- continue
- else
- break
- fi
- fi
-
- # silly that this exists:
- if [ "$CLEAR_CACHE" == "on" ] ; then
- verbose_msg "clearing source cache copy of \"$SRC\""
- rm -f $SOURCE_CACHE/$SRC 2>/dev/null
- fi
-
- # add source part if needed
- for URL in $URLS ; do
- if [ "${URL:((${#URL}-1)):1}" == "/" ] ; then
- URL=${URL}${SRC}
- fi
-
- # quit if we did get it
- if [ -f "$SOURCE_CACHE/$SRC" ] ; then
- if [ "${URL:0:6}" == "cvs://" ] ; then
- verbose_msg "trying to download \"$URL\""
- get_url $URL $SOURCE_CACHE/$SRC && break
- elif [ "${URL:0:6}" == "svn://" ] ; then
- verbose_msg "trying to download \"$URL\""
- get_url $URL $SOURCE_CACHE/$SRC && break
- elif [ "${URL:0:6}" == "cpan://" ] ; then
- verbose_msg "trying to download \"$URL\""
- get_url $URL $SOURCE_CACHE/$SRC && break
- else
- verbose_msg "Skipping download of \"$SRC\" for module \"$MODULE\" (in cache)"
- continue 2
+ debug_msg "download_module ($@)"
+ if ! run_details $1 ; then
+ exit 1
fi
- else
- message "${MESSAGE_COLOR}Downloading source file" \
- "${FILE_COLOR}${SRC}${DEFAULT_COLOR}" \
- "${MESSAGE_COLOR}for module" \
- "${MODULE_COLOR}${MODULE}${DEFAULT_COLOR}"
- verbose_msg "trying to download \"$URL\""
- get_url $URL $SOURCE_CACHE/$SRC && break
- fi
-
- done
- done
- return 0
+ MAX_SOURCES=${MAX_SOURCES:=100}
+
+ # loop over all sources
+ for (( N = 0 ; N < MAX_SOURCES ; N++ )) ; do
+ # get the URL part
+ eval SRC=\$$(echo SOURCE$N | sed s/SOURCE0/SOURCE/ )
+ eval URLS=\${$(echo SOURCE${N}_URL | sed s/SOURCE0/SOURCE/ )[@]}
+
+ # continue (to next) if empty once, break if empty tiwce
+ if [ -z "$SRC" ] ; then
+ if [ -z "$SECOND" ] ; then
+ SECOND="yes"
+ continue
+ else
+ break
+ fi
+ fi
+
+ # silly that this exists:
+ if [ "$CLEAR_CACHE" == "on" ] ; then
+ verbose_msg "clearing source cache copy of \"$SRC\""
+ rm -f $SOURCE_CACHE/$SRC 2>/dev/null
+ fi
+
+ add_url() {
+ if [ -n "$1" ]; then
+ if ! echo " $ALL_URLS " | grep -q " $1 "; then
+ ALL_URLS="$ALL_URLS $1"
+ fi
+ fi
+ }
+
+ if plugin_call SOURCE_NEEDREFRESH ${URLS[0]} $SRC $SOURCE_CACHE || [ ! -f $SOURCE_CACHE/$SRC ] ; then
+ # check for cache?
+ message "${MESSAGE_COLOR}Downloading source file" \
+ "${FILE_COLOR}$SRC${DEFAULT_COLOR}" \
+ "${MESSAGE_COLOR}for module" \
+ "${MODULE_COLOR}${MODULE}${DEFAULT_COLOR}"
+
+ if [ -n "$BASE_URL" ] ; then
+ # in case -u was passed:
+ ALL_URLS=$BASE_URL
+ else
+ # compose a list of URLS
+ ALL_URLS=
+ add_url $FRESORT_URL
+ for URL in $URLS ; do
+ add_url $URL
+ if [ "$EXHAUSTIVE" == "on" ]; then
+ # scan for hits agains known clusters of mirrors
+ for MLIST in $MIRRORS/*; do
+ for ALT in $(sed 's/.*\t\([^\t]*\)$/\1/g' $MLIST); do
+ if [ "${URL:0:${#ALT}}" == "$ALT" ] ; then
+ # compose the list of valid mirrors
+ REST=${URL:${#ALT}}
+ for HIT in $(sed 's/.*\t\([^\t]*\)$/\1/g' $MLIST); do
+ add_url ${HIT}${REST}
+ done
+ fi
+ done
+ done
+ fi
+ done
+ add_url $LRESORT_URL
+ fi
+
+ for URL in $ALL_URLS; do
+ # and download
+ if download_url $URL $SRC $SOURCE_CACHE ; then
+ break
+ fi
+ done
+ else
+ # break out of the loop if the cache has it:
+ verbose_msg "Skipping download of \"$SRC\" (in cache)"
+ continue
+ fi
+ done
)
}
testpack () {
- debug_msg "testpack ($@)"
- if [ -f "$1" ]; then
- FILENAME=$1
- else
- FILENAME=$SOURCE_CACHE/$1
- fi
- if [ -f "$FILENAME" ] ; then
- COMPRESSOR=$(file -b $FILENAME | cut -d ' ' -f1)
- case $COMPRESSOR in
- bzip2) bzip2 -tf $FILENAME >/dev/null 2>&1 ;;
- gzip) gzip -tf $FILENAME >/dev/null 2>&1 ;;
- compress*) gzip -tf $FILENAME >/dev/null 2>&1 ;;
- Zip) unzip -tq $FILENAME >/dev/null 2>&1 ;;
- RPM) rpmunpack <$FILENAME | gzip -t >/dev/null 2>&1 ;;
- *) true ;;
- esac
- fi
+ debug_msg "testpack ($@)"
+ if [ -f "$1" ]; then
+ FILENAME=$1
+ else
+ FILENAME=$SOURCE_CACHE/$1
+ fi
+ if [ -f "$FILENAME" ] ; then
+ COMPRESSOR=$(file -b $FILENAME | cut -d ' ' -f1)
+ case $COMPRESSOR in
+ bzip2)
+ bzip2 -tf $FILENAME > /dev/null 2>&1
+ ;;
+ gzip)
+ gzip -tf $FILENAME > /dev/null 2>&1
+ ;;
+ compress*)
+ gzip -tf $FILENAME > /dev/null 2>&1
+ ;;
+ Zip)
+ unzip -tq $FILENAME > /dev/null 2>&1
+ ;;
+ RPM)
+ rpmunpack < $FILENAME | gzip -t > /dev/null 2>&1
+ ;;
+ *)
+ true
+ ;;
+ esac
+ fi
}
show_downloading()
{
- debug_msg "show_downloading ($@)"
- DOWNLOAD_PID=$(grep ^$MODULE: $TEMP_DOWNLOAD_PIDS | cut -d: -f2)
- if [ -n "$DOWNLOAD_PID" ]; then
- DOWNLOAD_LOG=$(grep ^$MODULE: $TEMP_DOWNLOAD_PIDS | cut -d: -f3)
- if [ ! -d "/proc/$DOWNLOAD_PID" -a -f "$DOWNLOAD_LOG" ]; then
- cat $DOWNLOAD_LOG
- else
- tail -s 0.0 -n 200 --follow=name --pid=$DOWNLOAD_PID $DOWNLOAD_LOG
- sleep 1
- fi
- rm $DOWNLOAD_LOG
- elif lget_locked $MODULE; then
- message "${MESSAGE_COLOR}Please wait while downloading of ${DEFAULT_COLOR}${MODULE_COLOR}$MODULE${DEFAULT_COLOR}${MESSAGE_COLOR} progresses${DEFAULT_COLOR}"
- while lget_locked $MODULE; do
- echo -n "."
- sleep 5
- done
- fi
+ debug_msg "show_downloading ($@)"
+ DOWNLOAD_PID=$(grep ^$MODULE: $TEMP_DOWNLOAD_PIDS | cut -d: -f2)
+ if [ -n "$DOWNLOAD_PID" ]; then
+ DOWNLOAD_LOG=$(grep ^$MODULE: $TEMP_DOWNLOAD_PIDS | cut -d: -f3)
+ if [ ! -d "/proc/$DOWNLOAD_PID" -a -f "$DOWNLOAD_LOG" ]; then
+ cat $DOWNLOAD_LOG
+ rm -f $DOWNLOAD_LOG
+ elif [ -f "$DOWNLOAD_LOG" ]; then
+ tail -s 0.0 -n 200 --follow=name --pid=$DOWNLOAD_PID $DOWNLOAD_LOG
+ sleep 1
+ rm -f $DOWNLOAD_LOG
+ fi
+ elif lget_locked $MODULE; then
+ message "${MESSAGE_COLOR}Please wait while downloading of ${DEFAULT_COLOR}${MODULE_COLOR}$MODULE${DEFAULT_COLOR}${MESSAGE_COLOR} progresses${DEFAULT_COLOR}"
+ while lget_locked $MODULE; do
+ echo -n "."
+ sleep 5
+ done
+ fi
}
diff --git a/var/lib/lunar/functions/edit.lunar b/var/lib/lunar/functions/edit.lunar
index 914c9f9..26789e3 100644
--- a/var/lib/lunar/functions/edit.lunar
+++ b/var/lib/lunar/functions/edit.lunar
@@ -86,10 +86,3 @@ edit_file() {
}
-# function : mod_v_safe_edit
-# usage : mod_v_safe_edit $VARIABLE
-# purpose : creates a 'safe' value in variable "$MOD_V_SNAME"
-mod_v_safe_edit() {
- MOD_V_SNAME=$(echo $1 | sed 's:/:.:g')
- return 0
-}
diff --git a/var/lib/lunar/functions/kernel.lunar b/var/lib/lunar/functions/kernel.lunar
index 8e60ba0..7c1e548 100644
--- a/var/lib/lunar/functions/kernel.lunar
+++ b/var/lib/lunar/functions/kernel.lunar
@@ -1,9 +1,4 @@
#!/bin/bash
-# #
-# subroutines - Lunar subroutines #
-# #
-# Copyright Kyle Sallee 2000, 2001 #
-# #
############################################################
# #
# kernel.lunar functions for managing kernel installation #
@@ -12,199 +7,52 @@
############################################################
# #
# Parts Copyright Terry Chan 2002 GPLv2 #
-# Parts Copyrighted Niki Guldbrand 2003 under GPLv2 #
+# Parts Copyright Niki Guldbrand 2003 GPLv2 #
# Parts Copyright FW Systems llc 2003 GPLv2 #
+# Parts Copyright Auke Kok 2005 GPLv2 #
# #
############################################################
-#
-# Description : This function makes backups of the kernels and the kernel
-# module dirs.
-# Name : backup_mods_krnl
+
+# Description : This function makes backups of the kernels and modules
# Arg 1 : Filename of the kernel to backup (With or witout full path)
# With the format $VERSION_$EXTRAVERSION
-backup_mods_krnl()
-{
- debug_msg "backup_mods_krnl ($@)"
-
- devoke_installwatch
-
- BKUP_KRNL=$1
-
- if [ -f /boot/${BKUP_KRNL}.old ]; then
- verbose_msg "moving old kernel backup"
- mv -f /boot/${BKUP_KRNL}.old /boot/${BKUP_KRNL}.old_2
- fi
-
- if [ -f /boot/${BKUP_KRNL} ]; then
- verbose_msg "copying ${BKUP_KRNL}"
- cp -p /boot/${BKUP_KRNL} /boot/${BKUP_KRNL}.old
- fi
-
- if [ -d /lib/modules/${BKUP_KRNL} ]; then
- rm -rf /lib/modules/${BKUP_KRNL}.old
- cp -a /lib/modules/${BKUP_KRNL} /lib/modules/${BKUP_KRNL}.old
- fi
-
- invoke_installwatch
-
+backup_mods_krnl() {
+ debug_msg "backup_mods_krnl ($@)"
+
+ devoke_installwatch
+
+ if [ -f /boot/$1.old ]; then
+ verbose_msg "moving old kernel backup"
+ mv -f /boot/$1.old /boot/$1.old_2
+ fi
+ if [ -f /boot/$1 ]; then
+ verbose_msg "copying $1"
+ cp -p /boot/$1 /boot/$1.old
+ fi
+ if [ -d /lib/modules/$1 ]; then
+ rm -rf /lib/modules/$1.old
+ cp -a /lib/modules/$1 /lib/modules/$1.old
+ fi
+
+ invoke_installwatch
}
-# function update_lilo
-# Description: creates /etc/lilo.conf stanzas
-# usage: update_lilo bootimagename menuname
-update_lilo() {
- debug_msg "update_lilo ($@)"
-
- IMAGE_NAME=$1
- BOOT_LABEL=$2
-
- if ! ( grep -q "$IMAGE_NAME" /etc/lilo.conf && grep -q "$IMAGE_NAME.old" /etc/lilo.conf ) ; then
- IFS_OLD=$IFS
- export IFS="
-"
- rm -rf /etc/lilo.conf.new
- cp /etc/lilo.conf /etc/lilo.conf.old
-
- (( IMAGE_COUNT=0 ))
- for LINE in $(cat /etc/lilo.conf) ; do
- if echo $LINE | grep -q "image" || echo $LINE | grep -q "other" ; then
- echo >> /etc/lilo.conf.new
- if (( IMAGE_COUNT == 0 )) ; then
- if ! grep -q "$IMAGE_NAME" /etc/lilo.conf ; then
- printf "\nimage = %s\n label = %s\n read-only\n\n" "/boot/$IMAGE_NAME" "$BOOT_LABEL" >> /etc/lilo.conf.new
- fi
- if [ -f "/boot/$IMAGE_NAME.old" ] && ! grep -q "$IMAGE_NAME.old" /etc/lilo.conf ; then
- printf "\nimage = %s\n label = %s\n read-only\n\n" "/boot/$IMAGE_NAME.old" "$BOOT_LABEL.old" >> /etc/lilo.conf.new
- fi
- fi
- (( IMAGE_COUNT++ ))
- fi
- if (( IMAGE_COUNT == 14 )) ; then
- break
- fi
- echo $LINE >> /etc/lilo.conf.new
- done
-
- if (( IMAGE_COUNT == 0 )) ; then
- echo >> /etc/lilo.conf.new
- if ! grep -q "$IMAGE_NAME" /etc/lilo.conf ; then
- printf "\nimage = %s\n label = %s\n read-only\n\n" "/boot/$IMAGE_NAME" "$BOOT_LABEL" >> /etc/lilo.conf.new
- fi
- if [ -f /boot/"$IMAGE_NAME.old" ] && ! grep -q "$IMAGE_NAME.old" /etc/lilo.conf ; then
- printf "\nimage = %s\n label = %s\n read-only\n\n" "/boot/$IMAGE_NAME.old" "$BOOT_LABEL.old" >> /etc/lilo.conf.new
- fi
- fi
-
- cp /etc/lilo.conf.new /etc/lilo.conf
- export IFS=$IFS_OLD
- fi
-
- case $CONFIG_LILO in
- y|Y|j|J) edit_file /etc/lilo.conf ;;
- esac
-
- /sbin/lilo
- sleep 4
-
+update_bootloader() {
+ plugin_call KERNEL_UPDATEBOOTLOADER $1 $2
}
-# function update_grub
-# Description: creates /etc/lilo.conf stanzas
-# usage: update_grub bootimagename menuname
-#
-
-update_grub() {
- debug_msg "update_grub ($@)"
-
- IMAGE_NAME=$1
- BOOT_LABEL=$2
-
- . $DEPENDS_CONFIG/grub
-
- GRUB_IMAGE_ENTRY="
-title $BOOT_LABEL
-kernel $GRUB_BOOT/$IMAGE_NAME
-root $GRUB_ROOT
-"
-
- GRUB_OLD_IMAGE_ENTRY="
-title $BOOT_LABEL.old
-kernel $GRUB_BOOT/$IMAGE_NAME.old
-root $GRUB_ROOT
-"
-
- if ! ( grep -q "$IMAGE_NAME" /boot/grub/menu.lst && grep -q "$IMAGE_NAME.old" /boot/grub/menu.lst ) ; then
- IFS_OLD=$IFS
- export IFS="
-"
-
- rm -rf /boot/grub/menu.lst.new
- cp /boot/grub/menu.lst /boot/grub/menu.lst.old
-
- (( IMAGE_COUNT=0 ))
- for LINE in $(cat /boot/grub/menu.lst) ; do
- if echo $LINE | grep -q "title" ; then
- # To create a separating line between entries
- echo "" >> /boot/grub/menu.lst.new
-
- if (( IMAGE_COUNT == 0 )) ; then
- if ! grep -q "$IMAGE_NAME" /boot/grub/menu.lst ; then
- echo -e "$GRUB_IMAGE_ENTRY" >> /boot/grub/menu.lst.new
- fi
- if [ -f /boot/"$IMAGE_NAME.old" ] && ! grep -q "$IMAGE_NAME.old" /boot/grub/menu.lst ; then
- echo -e "$GRUB_OLD_IMAGE_ENTRY" >> /boot/grub/menu.lst.new
- fi
- fi
- (( IMAGE_COUNT++ ))
- fi
- if (( IMAGE_COUNT == 14 )) ; then
- break
- fi
- echo $LINE >> /boot/grub/menu.lst.new
- done
-
- if (( IMAGE_COUNT == 0 )) ; then
- if ! grep -q "$IMAGE_NAME" /boot/grub/menu.lst ; then
- echo -e "$GRUB_IMAGE_ENTRY" >> /boot/grub/menu.lst.new
- fi
- if [ -f /boot/"$IMAGE_NAME.old" ] && ! grep -q "$IMAGE_NAME.old" /boot/grub/menu.lst ; then
- echo -e "$GRUB_OLD_IMAGE_ENTRY" >> /boot/grub/menu.lst.new
- fi
- fi
-
- cp /boot/grub/menu.lst.new /boot/grub/menu.lst
- export IFS=$IFS_OLD
- fi
-
- case $CONFIG_GRUB in
- y|Y) edit_file /boot/grub/menu.lst ;;
- esac
-
-cat << EOF
-* * * * * * * * * * * * * * * * * * * * * * * *
-* *
-* W A R N I N G *
-* *
-* Do not forget to install grub to your MBR *
-* if you haven't done so before rebooting *
-* *
-* * * * * * * * * * * * * * * * * * * * * * * *
-EOF
+# dummy caller:
+update_lilo() {
+ update_bootloader $1 $2
}
-# function update_aboot
-# Description: creates /boot/aboot.conf lines
-# usage: update_aboot bootimagename menuname
-#
-
-# This function is a work in progress. Please treat it as such.
-# -Aaron Watry 1/6/2004
+# dummy stub:
+update_grub() {
+ :
+}
-update_aboot() {
- echo "Updating aboot"
-}
diff --git a/var/lib/lunar/functions/locking.lunar b/var/lib/lunar/functions/locking.lunar
index 2926f8b..cfe2fb6 100644
--- a/var/lib/lunar/functions/locking.lunar
+++ b/var/lib/lunar/functions/locking.lunar
@@ -29,38 +29,47 @@ function lock_file() {
TEMPFILE="$1.$$"
LOCKFILE="$1.lock"
- echo $$ > $TEMPFILE 2>/dev/null ||
- {
- message "${PROBLEM_COLOR}You don't have permission to access" \
- "$TEMPFILE ${DEFAULT_COLOR}"
- exit 1
- }
- ln $TEMPFILE $LOCKFILE 2>/dev/null &&
- {
- rm -f $TEMPFILE
- return 0
- }
- [ -f "$LOCKFILE" ] || return 1
+ # test permission
+ if ! echo $$ > $TEMPFILE 2>/dev/null; then
+ message "${PROBLEM_COLOR}You don't have permission to access" \
+ "$TEMPFILE ${DEFAULT_COLOR}"
+ exit 1
+ fi
+
+ # file exists?
+ if [ ! -f "$1" ]; then
+ touch "$1"
+ fi
+
+ # set lockfile
+ if ln $TEMPFILE $LOCKFILE 2>/dev/null ; then
+ rm -f $TEMPFILE
+ return 0
+ # failed due to other lock?
+ elif [ ! -f "$LOCKFILE" ]; then
+ return 1
+ fi
+ # stale lock?
STALE_PID=`< $LOCKFILE`
- [ "$STALE_PID" -gt "0" ] || return 1
- kill -0 $STALE_PID 2>/dev/null &&
- {
- rm -f $TEMPFILE
- return 1
- }
+ if [ "$STALE_PID" -le "0" ]; then
+ return 1
+ fi
+ if kill -0 $STALE_PID 2>/dev/null; then
+ rm -f $TEMPFILE
+ return 1
+ fi
+ # yes, stale
rm -f $LOCKFILE 2>/dev/null &&
- echo "Removed stale lock file of process $STALE_PID"
- ln $TEMPFILE $LOCKFILE 2>/dev/null &&
- {
- rm -f $TEMPFILE
- return 0
- }
+ echo "Removed stale lock file of process $STALE_PID"
+ if ln $TEMPFILE $LOCKFILE 2>/dev/null; then
+ rm -f $TEMPFILE
+ return 0
+ fi
rm -f $TEMPFILE
return 1
}
- while ! file_lock $1
- do
+ while ! file_lock $1; do
message "${MESSAGE_COLOR}Waiting to lock the file $1${DEFAULT_COLOR}"
sleep 1
done
diff --git a/var/lib/lunar/functions/logging.lunar b/var/lib/lunar/functions/logging.lunar
index b2c4f52..a9bb1e7 100644
--- a/var/lib/lunar/functions/logging.lunar
+++ b/var/lib/lunar/functions/logging.lunar
@@ -12,9 +12,8 @@
start_logging () {
debug_msg "start_logging ($@)"
- mod_v_safe_edit $MODULE
- export C_LOG=$(temp_create "${MOD_V_SNAME}.compile-log")
- export C_FIFO=$(temp_create "${MOD_V_SNAME}.compile-fifo")
+ export C_LOG=$(temp_create "${MODULE}.compile-log")
+ export C_FIFO=$(temp_create "${MODULE}.compile-fifo")
# just remaking this as FIFO
rm -f $C_FIFO
@@ -26,13 +25,12 @@ start_logging () {
stop_logging() {
debug_msg "stop_logging ($@)"
- mod_v_safe_edit $MODULE
echo "++ Mark Compile stop : \"$MODULE\" \"$VERSION\" \"$(date -u)\"" >> $C_LOG
message "${MESSAGE_COLOR}Creating" \
- "${FILE_COLOR}$COMPILE_LOGS/$MOD_V_SNAME-$VERSION.bz2" \
+ "${FILE_COLOR}$COMPILE_LOGS/$MODULE-$VERSION.bz2" \
"${DEFAULT_COLOR}"
- bzip2 -9f < $C_LOG > $COMPILE_LOGS/$MOD_V_SNAME-$VERSION.bz2
+ bzip2 -9f < $C_LOG > $COMPILE_LOGS/$MODULE-$VERSION.bz2
temp_destroy $C_LOG
temp_destroy $C_FIFO
}
diff --git a/var/lib/lunar/functions/main.lunar b/var/lib/lunar/functions/main.lunar
index 3084084..016db06 100644
--- a/var/lib/lunar/functions/main.lunar
+++ b/var/lib/lunar/functions/main.lunar
@@ -249,8 +249,7 @@ lin_module() {
export INSTALLWATCHFILE=$(temp_create "$MODULE.installwatch")
# lock the module for installation, check for moonbase call
- mod_v_safe_edit $MODULE
- linING="/var/lock/installing.$MOD_V_SNAME"
+ linING="/var/lock/installing.$MODULE"
if [ "$MODULE" == "moonbase" ] ; then
if ! current_locked && ! solo_locked ; then
echo $$ > $linING &&
@@ -307,7 +306,7 @@ lin_module() {
sound FAILURE
message "${PROBLEM_COLOR}! Problem detected during ${FILE_COLOR}$LIN_ERROR${DEFAULT_COLOR}"
rm -f $linING
- report $COMPILE_LOGS/$MOD_V_SNAME-$VERSION.bz2 "compile log" $MODULE $VERSION
+ report $COMPILE_LOGS/$MODULE-$VERSION.bz2 "compile log" $MODULE $VERSION
activity_log "lin" "$MODULE" "$VERSION" "failed" "Due to build errors during $LIN_ERROR"
return 1
fi
@@ -328,13 +327,13 @@ lin_module() {
sound FAILURE
message "${PROBLEM_COLOR}! Problem detected during ${FILE_COLOR}$LIN_ERROR${DEFAULT_COLOR}"
rm -f $linING
- report $COMPILE_LOGS/$MOD_V_SNAME-$VERSION.bz2 "compile log" $MODULE $VERSION
+ report $COMPILE_LOGS/$MODULE-$VERSION.bz2 "compile log" $MODULE $VERSION
activity_log "lin" "$MODULE" "$VERSION" "failed" "Due to build errors during $LIN_ERROR"
return 1
fi
rm_source_dir &&
- report $INSTALL_LOGS/$MOD_V_SNAME-$VERSION "install log" $MODULE $VERSION &&
+ report $INSTALL_LOGS/$MODULE-$VERSION "install log" $MODULE $VERSION &&
rm -f $linING &&
sound SUCCESS &&
activity_log "lin" "$MODULE" "$VERSION" "success"
@@ -343,7 +342,7 @@ lin_module() {
sound FAILURE
message "${PROBLEM_COLOR}! Problem detected${DEFAULT_COLOR}"
rm -f $linING
- report $COMPILE_LOGS/$MOD_V_SNAME-$VERSION.bz2 "compile log" $MODULE $VERSION
+ report $COMPILE_LOGS/$MODULE-$VERSION.bz2 "compile log" $MODULE $VERSION
activity_log "lin" "$MODULE" "$VERSION" "failed" "Due to build errors during or after $LIN_ERROR"
return 1
fi
diff --git a/var/lib/lunar/functions/messages.lunar b/var/lib/lunar/functions/messages.lunar
index 9283902..ec16163 100644
--- a/var/lib/lunar/functions/messages.lunar
+++ b/var/lib/lunar/functions/messages.lunar
@@ -52,19 +52,41 @@ verbose_msg() {
debug_msg() {
if [ -n "$LUNAR_DEBUG" ] ; then
- echo "++ $@" > /dev/stderr
if [ "$LUNAR_DEBUG" -ge "2" ] ; then
+ PLUSSES="+++++++++++++++++++++++++*"
+ echo -n "${PLUSSES:0:${#FUNCNAME[@]}} " >&2
+ unset PLUSSES
+ fi
+ if [ "$LUNAR_DEBUG" -ge "4" ] ; then
+ echo -n "$(basename $0)[$$]: " >&2
+ fi
+ if [ "$LUNAR_DEBUG" -ge "3" ] ; then
+ echo -n "$(basename ${BASH_SOURCE[1]}):${BASH_LINENO[1]}: " >&2
+ fi
+ if [ "$LUNAR_DEBUG" -ge "2" ] ; then
+ if [ "${FUNCNAME[1]}" != "$1" ]; then
+ echo "$@" >&2
+ else
+ echo "${FUNCNAME[1]} ($@)" >&2
+ fi
+ else
+ echo "++ $@" >&2
+ fi
+ if [ "$LUNAR_DEBUG" -ge "5" ] ; then
echo "++ $@" >> $TMPDIR/lp_debuglog.$$
if [ -f $TMPDIR/l_debug_var.$$ ] ; then
mv $TMPDIR/l_debug_var.$$ $TMPDIR/l_debug_var.$$.old
- fi
+ else
+ return
+ fi
set | grep '^[A-Z]' | sed 's/^/VAR /' > $TMPDIR/l_debug_var.$$
diff -U0 $TMPDIR/l_debug_var.$$.old $TMPDIR/l_debug_var.$$ | \
- grep -v "^@@" | grep "VAR" | tee -a $TMPDIR/lp_debuglog.$$ > /dev/stderr
+ grep -v "^@@" | grep "VAR" | tee -a $TMPDIR/lp_debuglog.$$ >&2
fi
fi
}
+
# function : xterm_msg
# usage : xterm_msg MESSAGE
# purpose : To display a short message in the title bar of a X terminal
diff --git a/var/lib/lunar/functions/misc.lunar b/var/lib/lunar/functions/misc.lunar
index 5ada1b0..04c2a93 100644
--- a/var/lib/lunar/functions/misc.lunar
+++ b/var/lib/lunar/functions/misc.lunar
@@ -83,7 +83,7 @@ exists() {
debug_msg "exists ($@)"
while read ITEM ; do
if [ -e "$ITEM" ] ; then
- echo $ITEM
+ echo "$ITEM"
fi
done
}
diff --git a/var/lib/lunar/functions/modules.lunar b/var/lib/lunar/functions/modules.lunar
index c9b7155..b7b0127 100644
--- a/var/lib/lunar/functions/modules.lunar
+++ b/var/lib/lunar/functions/modules.lunar
@@ -103,15 +103,19 @@ create_module_index() {
# short way out:
debug_msg "Quick generating \$MODULE_INDEX..."
grep "/DETAILS$" $INSTALL_LOGS/moonbase-$(installed_version moonbase) | \
- sed -e 's:/DETAILS$::' -e 's:/var/lib/lunar/moonbase/::' -e 's|/|:|' | \
- awk -F: '{print $2":"$1}' > $TMP_INDEX
+ sed -e 's:/var/lib/lunar/moonbase/::' -e 's:/DETAILS::g' \
+ -e 's/\/\([^/]*\)$/:\1/' -e 's/\(.*\):\(.*\)/\2:\1/g' > $TMP_INDEX
# we search zlocal locally to make sure they get found:
- find $MOONBASE/zlocal -type f -name DETAILS | sed "s:$MOONBASE/::g" | sed 's|/|:|' | sed 's:/DETAILS::g' | awk -F: '{print $2":"$1}' >> $TMP_INDEX
+ find $MOONBASE/zlocal -type f -name DETAILS | \
+ sed -e "s:$MOONBASE/::g" -e 's:/DETAILS::g' \
+ -e 's/\/\([^/]*\)$/:\1/' -e 's/\(.*\):\(.*\)/\2:\1/g' >> $TMP_INDEX
else
# this *really* is the fastest way to do it, no guarantees, we
# do have to make sure MOONBASE is coherent and tidy though
debug_msg "Regenerating \$MODULE_INDEX manually..."
- find $MOONBASE -type f -name DETAILS | sed "s:$MOONBASE/::g" | sed 's|/|:|' | sed 's:/DETAILS::g' | awk -F: '{print $2":"$1}' > $TMP_INDEX
+ find $MOONBASE -type f -name DETAILS | \
+ sed -e "s:$MOONBASE/::g" -e 's:/DETAILS::g' \
+ -e 's/\/\([^/]*\)$/:\1/' -e 's/\(.*\):\(.*\)/\2:\1/g' > $TMP_INDEX
fi
# this should be safe enough:
@@ -128,6 +132,7 @@ create_module_index() {
# usage : check_module_index
# purpose : checks if the index is up-to-date regarding to moonbase
function check_module_index() {
+(
debug_msg "check_module_index ($@)"
if [ ! -e $MODULE_INDEX -o ! -e $DEPENDS_CACHE -o -n "$(find $MOONBASE -type f -name "DETAILS" -cnewer $MODULE_INDEX)" ] ; then
create_module_index
@@ -136,6 +141,7 @@ function check_module_index() {
else
return 1
fi
+)
}
@@ -162,7 +168,11 @@ find_section() {
fi
fi
- check_module_index
+ if ! check_module_index ; then
+ # shave some time off not trying the rest of the code below since that
+ # is useless
+ return 1
+ fi
SECTION=$(grep ^$1: $MODULE_INDEX 2>/dev/null | head -n 1 | cut -d: -f2)
if [ -n "$SECTION" ] ; then
@@ -221,8 +231,7 @@ run_details() {
temp_destroy $TMP_DETAILS
fi
SOURCE_DIRECTORY=${SOURCE_DIRECTORY:-$BUILD_DIRECTORY/$1-$VERSION}
- mod_v_safe_edit $1
- MODULE_CONFIG=${MODULE_CONFIG:-$DEPENDS_CONFIG/$MOD_V_SNAME}
+ MODULE_CONFIG=${MODULE_CONFIG:-$DEPENDS_CONFIG/$MODULE}
MODULE_PREFIX=${MODULE_PREFIX:-$DEFAULT_PREFIX}
return 0
@@ -400,13 +409,7 @@ remove_module() {
unlock_file $MODULE_STATUS_BACKUP &&
if [ -n "$EXILE" ] ; then
- lock_file $MODULE_STATUS_BACKUP &&
- lock_file $MODULE_STATUS &&
- echo "$1::exiled:0.0" >> $MODULE_STATUS &&
- cat $MODULE_STATUS > $MODULE_STATUS_BACKUP &&
- unlock_file $MODULE_STATUS &&
- unlock_file $MODULE_STATUS_BACKUP &&
-
+ exile_modules "$1" &&
lock_file $DEPENDS_STATUS_BACKUP &&
lock_file $DEPENDS_STATUS &&
grep -v ":$1:" $DEPENDS_STATUS_BACKUP > $DEPENDS_STATUS &&
@@ -431,8 +434,7 @@ add_module() {
verbose_msg "updating lunar state files after module installation"
lock_file $MODULE_STATUS_BACKUP &&
lock_file $MODULE_STATUS &&
- # the next statement MUST be allowed to fail if statfiles are empty:
- grep -v "^$1:" $MODULE_STATUS_BACKUP > $MODULE_STATUS 2>/dev/null
+ grep -v "^$1:" $MODULE_STATUS_BACKUP > $MODULE_STATUS 2>/dev/null &&
echo "$1:$(date -u +%Y%m%d):$2:$3:$4" >> $MODULE_STATUS &&
cp $MODULE_STATUS $MODULE_STATUS_BACKUP &&
unlock_file $MODULE_STATUS &&
diff --git a/var/lib/lunar/functions/moonbase.lunar b/var/lib/lunar/functions/moonbase.lunar
index b898c3c..b380bd6 100644
--- a/var/lib/lunar/functions/moonbase.lunar
+++ b/var/lib/lunar/functions/moonbase.lunar
@@ -24,14 +24,14 @@ get_moonbase () {
debug_msg " run_details ($@)"
MODULE=moonbase
VERSION=`date -u +%Y%m%d.%H`
- SOURCE=$(basename $MOONBASE_URL)
- SOURCE_URL=${MOONBASE_URL[@]}
+ SOURCE=$MODULE.tar.bz2
+ SOURCE_URL=$MOONBASE_URL
PARTIAL=off
CLEAR_CACHE=on
}
# make sure we set these values up front to be sure
- run_details
+ run_details moonbase
rm -f $TMPDIR/$SOURCE
if [ ! -d "$SYSTEM_MOONBASE" ] ; then
@@ -43,16 +43,17 @@ get_moonbase () {
fi
push_uniq_id
-
if download_module $MODULE ; then
- echo -e "${MESSAGE_COLOR}Preparing to install ${FILE_COLOR}${SOURCE}" \
+ message "${MESSAGE_COLOR}Preparing to install ${FILE_COLOR}${SOURCE}" \
"${DEFAULT_COLOR}${MESSAGE_COLOR}...${DEFAULT_COLOR}" &&
mv $SYSTEM_MOONBASE/zlocal/ /var/lib/lunar/.zlocal-backup &&
rm -rf $SYSTEM_MOONBASE &&
+ TMP_MODULE_INDEX=$(temp_create "temp.module.index") &&
+ cp $MODULE_INDEX $TMP_MODULE_INDEX &&
lrm moonbase &&
mkdir $SYSTEM_MOONBASE &&
mv /var/lib/lunar/.zlocal-backup $SYSTEM_MOONBASE/zlocal &&
- echo -e "${MESSAGE_COLOR}Extracting ${FILE_COLOR}${SOURCE}" \
+ message "${MESSAGE_COLOR}Extracting ${FILE_COLOR}${SOURCE}" \
"${DEFAULT_COLOR}${MESSAGE_COLOR}...${DEFAULT_COLOR}" &&
bzcat $SOURCE_CACHE/$SOURCE | tar xv -C /var/lib/lunar | \
sed "s:^:/var/lib/lunar/:g" > $INSTALL_LOGS/$MODULE-$VERSION &&
@@ -61,7 +62,7 @@ get_moonbase () {
if [ "$OUTCOME" == "success" ] ; then
echo "$MD5SUM_LOGS/$MODULE-$VERSION" >> $INSTALL_LOGS/$MODULE-$VERSION
- echo -e "${MESSAGE_COLOR}Created ${FILE_COLOR}$INSTALL_LOGS/$MODULE-$VERSION" \
+ message "${MESSAGE_COLOR}Created ${FILE_COLOR}$INSTALL_LOGS/$MODULE-$VERSION" \
"${DEFAULT_COLOR}${MESSAGE_COLOR}${DEFAULT_COLOR}"
# create an md5sum log
@@ -72,8 +73,11 @@ get_moonbase () {
add_module $MODULE installed $VERSION $(du -hs $SYSTEM_MOONBASE | cut -f1)
# get ready to regenerate the module index cache file
- check_module_index
+ create_module_index
+ create_depends_cache
+ update_plugins
display_moonbase_changes
+ temp_destroy $TMP_MODULE_INDEX
fi
else
OUTCOME=failed
diff --git a/var/lib/lunar/functions/optimize.lunar b/var/lib/lunar/functions/optimize.lunar
index dc47e14..110e8ff 100644
--- a/var/lib/lunar/functions/optimize.lunar
+++ b/var/lib/lunar/functions/optimize.lunar
@@ -675,6 +675,8 @@ optimize_ld() {
;;
Optimize) LDFLAGS="$LDFLAGS -Wl,-O1"
;;
+ Reduce) LDFLAGS="$LDFLAGS -Wl,--as-needed"
+ ;;
# The Debug option breaks some modules (eg: tar and gzip, just to mention a
# few), so this option should either be removed, or remain "deactivated"
# untill this has been resolved but the hatch is that we don't know how many
diff --git a/var/lib/lunar/functions/plugins.lunar b/var/lib/lunar/functions/plugins.lunar
new file mode 100644
index 0000000..831d06e
--- /dev/null
+++ b/var/lib/lunar/functions/plugins.lunar
@@ -0,0 +1,103 @@
+#!/bin/bash
+############################################################
+# #
+# plugins.lunar - Lunar plugin code #
+# #
+############################################################
+# #
+# Copyright 2005 by Auke Kok under GPLv2 #
+# #
+############################################################
+
+#
+# plugin handler return status convention:
+#
+# when a handler is called, it should use the following return codes
+#
+# 0 - OK AND HALT, do not process other plugins
+# 1 - FAIL, stop executing plugins and report an error
+# 2 - OK AND CONTINUE or CONTINUE, run other plugins
+#
+
+plugin_register() {
+ # first arg: plugin type
+ # second arg: function hook name
+ # Defined plugin types:
+ # 1 - SOURCE_DOWNLOAD - download some source code
+ # 2 - SOURCE_NEEDREFRESH - source exists but needs refresh
+ # 3 - SOURCE_VERIFY - perform intergity verification on a file
+ # 4 - SOURCE_UNPACK - unpack a certain file to $(PWD)
+ # 5 - MODULE_CHECK - perform integrity checking on installed modules
+ # 6 - KERNEL_UPDATEBOOTLOADER - automate bootloader maintenance
+ LUNAR_PLUGINS=(${LUNAR_PLUGINS[@]} "$1:$2")
+ ((LUNAR_PLUGIN_COUNT++))
+ debug_msg "Registered plugin #$LUNAR_PLUGIN_COUNT, $1 -> $2()"
+}
+
+
+plugin_call() {
+ debug_msg "plugin_call($@)"
+ # scan available plugins for plugin_type $1 and pass args to it
+ REQUESTED_TYPE=$1
+ shift
+ for ((COUNT=0; COUNT < $LUNAR_PLUGIN_COUNT; COUNT++)); do
+ THIS_TYPE=$(echo ${LUNAR_PLUGINS[$COUNT]} | cut -d: -f1)
+ THIS_HANDLER=$(echo ${LUNAR_PLUGINS[$COUNT]} | cut -d: -f2-)
+ if [ "$REQUESTED_TYPE" == "$THIS_TYPE" ]; then
+ # we have identified a valid plugin for this type
+ $THIS_HANDLER $@
+ RETVAL=$?
+ if [ $RETVAL -eq 2 ]; then
+ continue
+ else
+ return $RETVAL
+ fi
+ fi
+ done
+ debug_msg "Finished running all plugins for type \"$1\""
+ return 2
+}
+
+
+update_plugin() {
+ debug_msg "update_plugin($@)"
+ # update plugins of all modules or a specific one
+ #
+ # $1 - module name
+ # $2 - forced removal of plugin
+ #
+ # scan module for plugins, and add/delete them as needed
+ if SECTION=$(find_section $1); then
+ if [ -d $MOONBASE/$SECTION/$1/plugin.d ]; then
+ if [ "$2" == "install" ] ; then
+ for PLUGIN in $MOONBASE/$SECTION/$1/plugin.d/*.plugin; do
+ debug_msg "Installed \"$(basename $PLUGIN)\""
+ install -m644 $PLUGIN $PLUGIN_DIR/
+ done
+ elif [ "$2" == "remove" ] || ! module_installed $1 ; then
+ for PLUGIN in $MOONBASE/$SECTION/$1/plugin.d/*.plugin; do
+ debug_msg "Removed \"$(basename $PLUGIN)\""
+ rm -f $PLUGIN_DIR/$(basename $PLUGIN)
+ done
+ else
+ for PLUGIN in $MOONBASE/$SECTION/$1/plugin.d/*.plugin; do
+ debug_msg "Installed \"$(basename $PLUGIN)\""
+ install -m644 $PLUGIN $PLUGIN_DIR/
+ done
+ fi
+ fi
+ fi
+}
+
+
+update_plugins() {
+ debug_msg "update_plugins($@)"
+ # rework all plugins
+ verbose_msg "Updating plugins"
+ for MODULE in $(list_moonbase); do
+ update_plugin $MODULE
+ done
+}
+
+
+
diff --git a/var/lib/lunar/functions/recovery.lunar b/var/lib/lunar/functions/recovery.lunar
index 6a460a8..9a9f961 100644
--- a/var/lib/lunar/functions/recovery.lunar
+++ b/var/lib/lunar/functions/recovery.lunar
@@ -51,16 +51,17 @@ rebuild_status_files() {
VERSION=$(echo $MODULE_NAME | cut -d "-" -f "$COUNTS"-)
SIZE=$(find_module_size $REAL_NAME $VERSION)
DATE=$(ls -l $INSTALL_LOGS/$REAL_NAME-$VERSION --time-style=+%Y%m%d | awk '{print $6}')
+ remove_module "$REAL_NAME" &&
+ # adjusted add_module code that echos the DATE field ;^)
lock_file $MODULE_STATUS &&
lock_file $MODULE_STATUS_BACKUP &&
- # adjusted add_module code that echos the DATE field ;^)
- grep -v "^$REAL_NAME:" $MODULE_STATUS_BACKUP >$MODULE_STATUS 2>/dev/null &&
echo "$REAL_NAME:$DATE:installed:$VERSION:$SIZE" >>$MODULE_STATUS &&
cat $MODULE_STATUS >$MODULE_STATUS_BACKUP &&
unlock_file $MODULE_STATUS_BACKUP &&
- unlock_file $MODULE_STATUS
+ unlock_file $MODULE_STATUS &&
+
message "Added: $REAL_NAME-$VERSION ($SIZE) ($DATE)"
- break;
+ break
fi
((COUNTS--))
done
diff --git a/var/lib/lunar/functions/sizes.lunar b/var/lib/lunar/functions/sizes.lunar
index 1343092..997c547 100644
--- a/var/lib/lunar/functions/sizes.lunar
+++ b/var/lib/lunar/functions/sizes.lunar
@@ -21,7 +21,6 @@
# purpose : finds the installed size of module in KB
find_module_size() {
#this functions checks the modules file if there is already size entry
- mod_v_safe_edit $1
module_size()
{
unset SIZE
@@ -41,14 +40,14 @@ find_module_size() {
module_size $1 $VERSION && return
# no :( lets dig through logs
- [ -e "$INSTALL_LOGS/$MOD_V_SNAME-$VERSION" ] &&
+ [ -e "$INSTALL_LOGS/$MODULE-$VERSION" ] &&
while read LINE
do
[ -f "$LINE" ] &&
SIZE0=`du "$LINE" |
cut -f 1-1` &&
SIZE=$((SIZE0+SIZE))
- done <$INSTALL_LOGS/$MOD_V_SNAME-$VERSION &&
+ done <$INSTALL_LOGS/$MODULE-$VERSION &&
echo ${SIZE}KB ||
message "${PROBLEM_COLOR}Install log for $1 is not found${DEFAULT_COLOR}"
}
diff --git a/var/lib/lunar/functions/sources.lunar b/var/lib/lunar/functions/sources.lunar
index 78c7928..19f9be9 100644
--- a/var/lib/lunar/functions/sources.lunar
+++ b/var/lib/lunar/functions/sources.lunar
@@ -34,9 +34,8 @@ verify_source() {
# function : sources
-# usage : sources <module_name> {MD5|VFY|
-# purpose : displays the filenames and md5sums or VFY part of sources
-# for a given module
+# usage : sources <module_name>
+# purpose : displays the sources needed for a given module
sources() {
(
debug_msg "sources ($@)"
@@ -51,21 +50,11 @@ sources() {
TEMP=${TEMP/SOURCE0/SOURCE}
eval SRC1=\$${TEMP}
- if [ "$2" == "MD5" ] ; then
- eval SRC_MD5=\$${TEMP}_MD5
- if [ -z "$SRC_MD5" ] ; then
- SRC_MD5=0
- fi
- fi
-
eval SRC2=\$SOURCE$((CNT+1))
eval SRC3=\$SOURCE$((CNT+2))
if [ -n "$SRC1" ] ; then
echo $SRC1
- if [ "$2" == "MD5" ] ; then
- echo $SRC_MD5
- fi
fi
#if two consequtive empty sources, then break
@@ -77,34 +66,6 @@ sources() {
}
-# function : md5_verify_source
-# usage : md5_verify_source filename md5
-# purpose : md5 verifies a filename
-md5_verify_source() {
- debug_msg "md5_verify_source ($@)"
- TMP_MD5=$(md5sum $SOURCE_CACHE/$1 | cut -d " " -f 1-1)
- if [ "$2" != "$TMP_MD5" ] ; then
- verbose_msg "offending md5sum: $TMP_MD5"
- verbose_msg "should be md5sum: $2"
- return 1
- fi
-}
-
-
-# function : sha1_verify_source
-# usage : sha1_verify_source filename sha1
-# purpose : sha1 verifies a filename
-sha1_verify_source() {
- debug_msg "sha1_verify_source ($@)"
- TMP_SHA1=$(sha1sum $SOURCE_CACHE/$1 | cut -d " " -f 1-1)
- if [ "$2" != "$TMP_SHA1" ] ; then
- verbose_msg "offending sha1sum: $TMP_SHA1"
- verbose_msg "should be sha1sum: $2"
- return 1
- fi
-}
-
-
erase() {
debug_msg "erase ($@)"
if [ "$PARTIAL" == "off" ]; then
@@ -119,17 +80,7 @@ unpack() {
FILENAME=$SOURCE_CACHE/$1
verbose_msg "Unpacking \"$FILENAME\" in \"$(pwd)\""
-
- case $(file -b $FILENAME | cut -d' ' -f1) in
- bzip2) tar jxf $FILENAME --no-same-owner --no-same-permissions ;;
- gzip) tar zxf $FILENAME --no-same-owner --no-same-permissions ;;
- compress*) tar zxf $FILENAME --no-same-owner --no-same-permissions ;;
- tar) tar xf $FILENAME --no-same-owner --no-same-permissions ;;
- Zip) unzip -q $FILENAME ;;
- RPM) rpmunpack < $FILENAME | gzip -d \
- | cpio -idm ;;
- *) false ;;
- esac
+ plugin_call SOURCE_UNPACK $SOURCE_CACHE/$1
if [ "$?" != 0 ] ; then
message "${PROBLEM_COLOR}! Error while unpacking ${FILE_COLOR}$SOURCE_CACHE/$1${DEFAULT_COLOR}${PROBLEM_COLOR}${DEFAULT_COLOR}"
@@ -138,49 +89,6 @@ unpack() {
}
-# usage : gpg_verify_src $SRC $GPG-SIG-URL $GPG-PUBLIC-KEYS-URL
-gpg_verify_source() {
- debug_msg "gpg_verify_source($@)"
- if [ ! -x /usr/bin/gpg ] ; then
- message "${PROBLEM_COLOR}! Cannot verify sources without ${MODULE_COLOR}gpg${DEFAULT_COLOR}${PROBLEM_COLOR} installed${DEFAULT_COLOR}"
- return 1
- fi
-
- # do we need to download a keyset?
- if [ -n "$3" ] ; then
- TMP_GPG_KEYS=$(temp_create "gpg-pubkeys")
- verbose_msg "Downloading pub keys from \"$3\""
- # TODO calling wget is a hack... we should accept file: urls too
- if wget $3 -O $TMP_GPG_KEYS -q ; then
- GNUPGHOME=/var/state/lunar/ gpg --import $TMP_GPG_KEYS
- fi
- fi
-
- # try to get the required key
- TMP_GPG_SIG=$(temp_create "gpg-signature")
- verbose_msg "Downloading signature \"$2\""
- # TODO calling wget is a hack... we should accept file: urls too
- if wget $2 -O $TMP_GPG_SIG -q ; then
- verbose_msg "Verifying signature of \"$SOURCE_CACHE/$1\""
- verbose_msg "GNUPGHOME=/var/state/lunar/ gpg --verify $TMP_GPG_SIG $SOURCE_CACHE/$1"
- if ! GNUPGHOME=/var/state/lunar/ gpg --verify $TMP_GPG_SIG $SOURCE_CACHE/$1 ; then
- verbose_msg "gpg exited with \"$?\""
- temp_destroy $TMP_GPG_SIG
- temp_destroy $TMP_GPG_KEYS
- return 1
- fi
- temp_destroy $TMP_GPG_SIG
- temp_destroy $TMP_GPG_KEYS
- else
- message "cannot download key!"
- temp_destroy $TMP_GPG_SIG
- temp_destroy $TMP_GPG_KEYS
- return 1
- fi
-
-}
-
-
# usage: verify_all_sources $MODULE
# check all sources regarding verification method
verify_all_sources() {
@@ -206,7 +114,6 @@ verify_all_sources() {
if ! verify_source $SRC1 ; then
return 1
fi
-
eval VFYS=\${${TEMP}_VFY[@]}
# cumulate result:
@@ -215,40 +122,28 @@ verify_all_sources() {
# we need to check ALL args for validity... if one fails we should not
# trust the source
for VFY in $VFYS ; do
- if [ "${VFY:0:4}" == "md5:" ] ; then
- if ! md5_verify_source $SRC1 $(echo $VFY | cut -d: -f2) ; then
- message "${PROBLEM_COLOR}! md5sum check failed for ${DEFAULT_COLOR}${FILE_COLOR}$SRC1${DEFAULT_COLOR}"
- RESULT=1
- fi
- elif [ "${VFY:0:5}" == "sha1:" ] ; then
- if ! sha1_verify_source $SRC1 $(echo $VFY | cut -d: -f2) ; then
- message "${PROBLEM_COLOR}! sha1sum check failed for ${DEFAULT_COLOR}${FILE_COLOR}$SRC1${DEFAULT_COLOR}"
- RESULT=1
- fi
- elif [ "${VFY:0:4}" == "gpg:" ] ; then
- if ! gpg_verify_source $SRC1 $(echo $VFY | cut -d: -f2- | cut -f1) $(echo $VFY | cut d: -f2- | cut -f2) $(echo $VFY | cut -d: -f2- | cut -f3) ; then
- message "${PROBLEM_COLOR}! gpg signature check failed for ${DEFAULT_COLOR}${FILE_COLOR}$SRC1${DEFAULT_COLOR}"
- RESULT=1
- fi
- fi
+ plugin_call SOURCE_VERIFY $SRC1 $VFY
+ if [ $? == 1 ]; then
+ RESULT=1
+ fi
+ done
# so what if?
if [ "$RESULT" == "1" ] ; then
# remove?
- MODULE=$1
- message "${MESSAGE_COLOR}You should remove ${DEFAULT_COLOR}${FILE_COLOR}$SRC1${DEFAULT_COLOR}${MESSAGE_COLOR} !${DEFAULT_COLOR}"
+ MODULE=$1
+ message "${MESSAGE_COLOR}You should remove ${DEFAULT_COLOR}${FILE_COLOR}$SRC1${DEFAULT_COLOR}${MESSAGE_COLOR} !${DEFAULT_COLOR}"
- if query "Remove \"$SOURCE_CACHE/$SRC1\" ? " y ; then
+ if query "Remove \"$SOURCE_CACHE/$SRC1\" ? " y ; then
rm -f $SOURCE_CACHE/$SRC1
- fi
+ fi
fi
- done
fi
# our fallthrough as usual:
eval SRC2=\$SOURCE$((C+1));
eval SRC3=\$SOURCE$((C+2));
[ -z "$SRC2" ] && [ -z "$SRC3" ] && break
- done
+ done
# result?
if [ -n "$RESULT" ] ; then
diff --git a/var/lib/lunar/functions/temp.lunar b/var/lib/lunar/functions/temp.lunar
index fa1d0a0..53cceeb 100644
--- a/var/lib/lunar/functions/temp.lunar
+++ b/var/lib/lunar/functions/temp.lunar
@@ -19,8 +19,7 @@
temp_create() {
debug_msg "temp_create ($@)"
- mod_v_safe_edit $1
- TMPFILE=$MOD_V_SNAME
+ TMPFILE=$MODULE
if TMPFILE=$(mktemp -p "$TMPDIR" -t lunar.`basename $0`.$$.$TMPFILE.XXXXXXXXXX ) ; then
echo $TMPFILE
else
diff --git a/var/lib/lunar/functions/tracking.lunar b/var/lib/lunar/functions/tracking.lunar
index 828b453..9199038 100644
--- a/var/lib/lunar/functions/tracking.lunar
+++ b/var/lib/lunar/functions/tracking.lunar
@@ -63,10 +63,9 @@ parse_iw() {
create_install_log() {
debug_msg "create_install_log ($@)"
- mod_v_safe_edit $MODULE
TMP_INST_LOG=$(temp_create "install-log")
- INST_LOG="$INSTALL_LOGS/$MOD_V_SNAME-$VERSION"
+ INST_LOG="$INSTALL_LOGS/$MODULE-$VERSION"
rm -f $INST_LOG &> /dev/null
message "${MESSAGE_COLOR}Creating ${FILE_COLOR}${INST_LOG}${DEFAULT_COLOR}"
@@ -74,9 +73,9 @@ create_install_log() {
export IFS="$TAB_ENTER_IFS"
parse_iw | sort | uniq | filter "$LOCAL_EXCLUDED" | exists > $TMP_INST_LOG
- echo "$INSTALL_LOGS/$MOD_V_SNAME-$VERSION" >> $TMP_INST_LOG
- echo "$COMPILE_LOGS/$MOD_V_SNAME-$VERSION.bz2" >> $TMP_INST_LOG
- echo "$MD5SUM_LOGS/$MOD_V_SNAME-$VERSION" >> $TMP_INST_LOG
+ echo "$INSTALL_LOGS/$MODULE-$VERSION" >> $TMP_INST_LOG
+ echo "$COMPILE_LOGS/$MODULE-$VERSION.bz2" >> $TMP_INST_LOG
+ echo "$MD5SUM_LOGS/$MODULE-$VERSION" >> $TMP_INST_LOG
MISOWNED_SYMLINKS=$(syms_not_owned $TMP_INST_LOG
echo -n "/dev/null")
@@ -93,28 +92,26 @@ create_install_log() {
create_md5sum_log() {
debug_msg "create_md5sum_log ($@)"
- mod_v_safe_edit $MODULE
- rm -f $MD5SUM_LOGS/$MOD_V_SNAME-$VERSION &> /dev/null
+ rm -f $MD5SUM_LOGS/$MODULE-$VERSION &> /dev/null
- message "${MESSAGE_COLOR}Creating ${FILE_COLOR}$MD5SUM_LOGS/$MOD_V_SNAME-$VERSION${DEFAULT_COLOR}"
+ message "${MESSAGE_COLOR}Creating ${FILE_COLOR}$MD5SUM_LOGS/$MODULE-$VERSION${DEFAULT_COLOR}"
- files < $INSTALL_LOGS/$MOD_V_SNAME-$VERSION | while read FILE ; do
- md5sum $FILE >> $MD5SUM_LOGS/$MOD_V_SNAME-$VERSION
+ files < $INSTALL_LOGS/$MODULE-$VERSION | while read FILE ; do
+ md5sum $FILE >> $MD5SUM_LOGS/$MODULE-$VERSION
done
}
create_install_cache() {
debug_msg "create_install_cache($@)"
- mod_v_safe_edit $MODULE
if [ "$ARCHIVE" == "off" ] ; then
return
fi
- message "${MESSAGE_COLOR}Creating ${FILE_COLOR}$INSTALL_CACHE/$MOD_V_SNAME-$VERSION-$BUILD.tar.bz2${DEFAULT_COLOR}"
- tar cPjf "$INSTALL_CACHE/$MOD_V_SNAME-$VERSION-$BUILD.tar.bz2" --no-recursion -T $INSTALL_LOGS/$MOD_V_SNAME-$VERSION
+ message "${MESSAGE_COLOR}Creating ${FILE_COLOR}$INSTALL_CACHE/$MODULE-$VERSION-$BUILD.tar.bz2${DEFAULT_COLOR}"
+ tar cPjf "$INSTALL_CACHE/$MODULE-$VERSION-$BUILD.tar.bz2" --no-recursion -T $INSTALL_LOGS/$MODULE-$VERSION
}
diff --git a/var/lib/lunar/menu/optimize.menu b/var/lib/lunar/menu/optimize.menu
index 6b8408d..671e166 100644
--- a/var/lib/lunar/menu/optimize.menu
+++ b/var/lib/lunar/menu/optimize.menu
@@ -211,6 +211,7 @@ help() {
MENU="Linker options"
Strip_HELP="Strip all symbols"
Optimize_HELP="Optimize hash tables during linking"
+ Reduce_HELP="Reduce the amount of linked libraries if possible"
Combreloc_HELP="Combreloc"
# Debug_HELP="Strip debug symbols only"
;;
@@ -370,8 +371,9 @@ ccc_warn() {
ldf_options() {
OPTIONS=( "Strip" "-s" $( echo ${LDF[@]} | grep -q "Strip" && echo "on" || echo "off" ) "$Strip_HELP"
-# "Debug" "-S" $( echo ${LDF[@]} | grep -q "Debug" && echo "on" || echo "off" ) "$Debug_HELP"
"Optimize" "-Wl,-O1" $( echo ${LDF[@]} | grep -q "Optimize" && echo "on" || echo "off" ) "$Optimize_HELP"
+ "Reduce" "-Wl,--as-needed" $( echo ${LDF[@]} | grep -q "Reduce" && echo "on" || echo "off" ) "$Reduce_HELP"
+# "Debug" "-S" $( echo ${LDF[@]} | grep -q "Debug" && echo "on" || echo "off" ) "$Debug_HELP"
"Combreloc" "-z combreloc" $( echo ${LDF[@]} | grep -q "Combreloc" && echo "on" || echo "off" ) "$Combreloc_HELP" )
}
diff --git a/var/lib/lunar/plugins/check-find.plugin b/var/lib/lunar/plugins/check-find.plugin
new file mode 100644
index 0000000..c451299
--- /dev/null
+++ b/var/lib/lunar/plugins/check-find.plugin
@@ -0,0 +1,54 @@
+#!/bin/bash
+#############################################################
+# #
+# check-find.plugin - plugin that performs file presence #
+# checking of installed modules #
+# #
+#############################################################
+# #
+# Copyright 2005 by Auke Kok under GPLv2 #
+# #
+#############################################################
+
+
+plugin_module_check_find() {
+ if [ "$FIND_CHECK" == "off" ] ; then
+ return 2
+ fi
+ debug_msg "plugin_module_check_find ($@)"
+
+ MODULE=$1
+ VERSION=$(installed_version $MODULE)
+ I_LOG=$INSTALL_LOGS/$MODULE-$VERSION
+ FIND_STATUS=2
+
+ if [ -e "$I_LOG" ]; then
+ IFS_OLD="$IFS"
+ export IFS="
+"
+
+ LOG=$(cat $I_LOG | grep "/bin/\|/games/\|/include/\|/lib/\|/sbin/" | grep -v "/doc/\|/etc/\|/fonts/\|/man/\|/var/")
+
+ for ITEM in $LOG ; do
+ if [ ! -e "$ITEM" ]; then
+ (
+ export IFS="$IFS_OLD"
+ message "${FILE_COLOR}${ITEM}${DEFAULT_COLOR} of ${MODULE_COLOR}${MODULE}${PROBLEM_COLOR} is missing.${DEFAULT_COLOR}"
+ )
+ FIND_STATUS=1
+ fi
+ done
+ else
+ (
+ export IFS="$IFS_OLD"
+ message "${MODULE_COLOR}${MODULE}${PROBLEM_COLOR} is missing an install log.${DEFAULT_COLOR}"
+ )
+ FIND_STATUS=1
+ fi
+ return $FIND_STATUS
+}
+
+
+plugin_register MODULE_CHECK plugin_module_check_find
+
+
diff --git a/var/lib/lunar/plugins/check-ldd.plugin b/var/lib/lunar/plugins/check-ldd.plugin
new file mode 100644
index 0000000..359529a
--- /dev/null
+++ b/var/lib/lunar/plugins/check-ldd.plugin
@@ -0,0 +1,50 @@
+#!/bin/bash
+#############################################################
+# #
+# check-ldd.plugin - plugin that performs ldd checking #
+# #
+#############################################################
+# #
+# Copyright 2005 by Auke Kok under GPLv2 #
+# #
+#############################################################
+
+
+plugin_module_check_ldd() {
+ if [ "$LDD_CHECK" == "off" ]; then
+ return 2
+ fi
+ debug_msg "plugin_module_check_ldd ($@)"
+
+ MODULE=$1
+ VERSION=$(installed_version $MODULE)
+ I_LOG=$INSTALL_LOGS/$MODULE-$VERSION
+ LDD_STATUS=2
+
+ if [ -e "$I_LOG" ]; then
+ IFS_OLD="$IFS"
+ export IFS="
+"
+
+ # fast-construct per-module LD path including all /lib/ like directories
+ NEW_LD=$(cat $I_LOG | grep "/lib/" | files | sed 's/\(.*\)\/\([^\/]*\)$/\1/g' | uniq | tr '\n' ':')
+ LOG=$(cat $I_LOG | grep "/bin/\|/games/\|/lib/\|/sbin/\|/libexec/" | grep -v "/doc/\|/fonts/\|/include/\|/locale/\|/man/\|/modules/\|/var/")
+
+ for FILE in $LOG; do
+ if [ -f "$FILE" ] && [ ! -h "$FILE" ] && file -b "$FILE" | grep -q "ELF" && LD_LIBRARY_PATH=$NEW_LD ldd "$FILE" 2>&1 | grep -q "not found" ; then
+ (
+ export IFS="$IFS_OLD"
+ message "${FILE_COLOR}${FILE}${DEFAULT_COLOR} of ${MODULE_COLOR}${MODULE} ${PROBLEM_COLOR}is broken. ${DEFAULT_COLOR}"
+ LD_LIBRARY_PATH=$NEW_LD ldd "$FILE" 2>&1 | grep "not found"
+ )
+ LDD_STATUS=1
+ fi
+ done
+ fi
+ return $LDD_STATUS
+}
+
+
+plugin_register MODULE_CHECK plugin_module_check_ldd
+
+
diff --git a/var/lib/lunar/plugins/check-md5sum.plugin b/var/lib/lunar/plugins/check-md5sum.plugin
new file mode 100644
index 0000000..15734e1
--- /dev/null
+++ b/var/lib/lunar/plugins/check-md5sum.plugin
@@ -0,0 +1,55 @@
+#!/bin/bash
+#############################################################
+# #
+# check-md5sum.plugin - plugin that performs integrity #
+# checking of installed modules #
+# #
+#############################################################
+# #
+# Copyright 2005 by Auke Kok under GPLv2 #
+# #
+#############################################################
+
+
+plugin_module_check_md5sum() {
+ # return CONTINUE if we're disabled
+ if [ "$MD5SUM_CHECK" == "off" ]; then
+ return 2
+ fi
+ debug_msg "plugin_module_check_md5sum ($@)"
+
+ MODULE=$1
+ VERSION=$(installed_version $MODULE)
+ MD5_LOG="$MD5SUM_LOGS/$MODULE-$VERSION"
+ # by default, do not return OK but CONTINUE
+ MD5SUM_STATUS=2
+
+ if [ -e "$MD5_LOG" ]; then
+ IFS_OLD="$IFS"
+ export IFS="
+"
+
+ cat $MD5_LOG | grep "/bin/\|/games/\|/include/\|/lib/\|/sbin/" |
+ grep -v "/doc/\|/etc/\|/fonts/\|/man/\|/var/" |
+ while read LINE ; do
+ if ! echo $LINE | md5sum --check --status ; then
+ if [ -f "$FILE" ] && [ ! -h "$FILE" ] && file -b "$FILE" |
+ egrep -q "executable|shared object|current ar archive" ; then
+ MD5SUM=$(md5sum "$FILE")
+ if ! grep -q "$LINE" $MD5SUM_LOGS/*; then
+ message "${FILE_COLOR}$FILE${DEFAULT_COLOR} of ${MODULE_COLOR}$MODULE${PROBLEM_COLOR} has wrong md5sum.${DEFAULT_COLOR}"
+ MD5SUM_STATUS=1
+ fi
+ fi
+ fi
+ done
+ else
+ message "${MODULE_COLOR}$MODULE${PROBLEM_COLOR}is missing a md5sum log.${DEFAULT_COLOR}"
+ fi
+ return $MD5SUM_STATUS
+}
+
+
+plugin_register MODULE_CHECK plugin_module_check_md5sum
+
+
diff --git a/var/lib/lunar/plugins/check-symlinks.plugin b/var/lib/lunar/plugins/check-symlinks.plugin
new file mode 100644
index 0000000..ea31314
--- /dev/null
+++ b/var/lib/lunar/plugins/check-symlinks.plugin
@@ -0,0 +1,56 @@
+#!/bin/bash
+#############################################################
+# #
+# check-symlinks.plugin - plugin that performs symlink #
+# checking of installed modules #
+# #
+#############################################################
+# #
+# Copyright 2005 by Auke Kok under GPLv2 #
+# #
+#############################################################
+
+
+plugin_module_check_symlinks() {
+ # return CONTINUE if we're disabled
+ if [ "$SYM_CHECK" == "off" ]; then
+ return 2
+ fi
+ debug_msg "plugin_module_check_symlinks ($@)"
+
+ MODULE=$1
+ VERSION=$(installed_version $MODULE)
+ I_LOG=$INSTALL_LOGS/$MODULE-$VERSION
+
+ if [ -e "$I_LOG" ]; then
+ IFS_OLD="$IFS"
+ export IFS="
+"
+
+ cat $I_LOG | while read ITEM ; do
+ if [ -h "$ITEM" ] && [ -f "$ITEM" ] ; then
+ TARGET=$( basename $( ls -la "$ITEM" | cut -d '>' -f2 | cut -c 2- ) )
+ if ! grep -q "$TARGET" $I_LOG ; then
+ (
+ export IFS="$IFS_OLD"
+ F_TMP=$(temp_create "$MODULE.remove-line")
+ cp $I_LOG $F_TMP
+ grep -v $ITEM $F_TMP > $I_LOG
+ temp_destroy $F_TMP
+ message "Symbolic link: ${SYMLINK_COLOR}${ITEM}${DEFAULT_COLOR} is owned by ${MODULE_COLOR}${MODULE}${DEFAULT_COLOR}"
+ message "Target of symbolic link is ${FILE_COLOR}${TARGET}${DEFAULT_COLOR}"
+ message "${FILE_COLOR}${TARGET}${DEFAULT_COLOR} is owned by $(grep "^$TARGET$" $INSTALL_LOGS/* | cut -d: -f1)"
+ message "Removed: ${SYMLINK_COLOR}${ITEM}${DEFAULT_COLOR} from ${I_LOG}"
+ )
+ fi
+ fi
+ done
+ fi
+ # always return CONTINUE
+ return 2
+}
+
+
+plugin_register MODULE_CHECK plugin_module_check_symlinks
+
+
diff --git a/var/lib/lunar/plugins/download-file.plugin b/var/lib/lunar/plugins/download-file.plugin
new file mode 100644
index 0000000..4a7a4d6
--- /dev/null
+++ b/var/lib/lunar/plugins/download-file.plugin
@@ -0,0 +1,24 @@
+#!/bin/bash
+#############################################################
+# #
+# download-file.plugin - plugin that downloads file:// urls #
+# #
+#############################################################
+# #
+# Copyright 2005 by Auke Kok under GPLv2 #
+# #
+#############################################################
+
+
+plugin_source_download_file() {
+ # check if we can handle this type of URL:
+ if [ ${1:0:7} != "file://" ]; then
+ return 2
+ fi
+ debug_msg "plugin_source_download_file ($@)"
+
+ cp "${1:7}$2" $3
+}
+
+
+plugin_register SOURCE_DOWNLOAD plugin_source_download_file
diff --git a/var/lib/lunar/plugins/download-generic.plugin b/var/lib/lunar/plugins/download-generic.plugin
new file mode 100644
index 0000000..4c71e46
--- /dev/null
+++ b/var/lib/lunar/plugins/download-generic.plugin
@@ -0,0 +1,75 @@
+#!/bin/bash
+############################################################
+# #
+# download-generic.plugin - download http/ftp urls #
+# #
+############################################################
+# #
+# Copyright 2005 by Auke Kok under GPLv2 #
+# #
+############################################################
+
+
+plugin_source_download_generic() {
+ # check if we can handle this type of URL:
+ if [ ${1:0:7} != "http://" -a ${1:0:8} != "https://" -a ${1:0:6} != "ftp://" ]; then
+ return 2
+ fi
+ debug_msg "plugin_source_download_generic ($@)"
+
+ URL=$1
+ # add trailing '/'
+ if [ "${URL:((${#URL}-1)):1}" != "/" ] ; then
+ URL="${URL}/"
+ fi
+
+ # this is what the download will be stored as initially:
+ TMP_FILE=$TMPDIR/$2
+
+ if [ "$FTP_ACTIVE" == "off" -o "$FTP_PASSIVE" == "on" ] ; then
+ WGET_FTP_CONNECTION="--passive-ftp"
+ fi
+
+ if [ "$CONTINUE" == "off" ] ; then
+ erase $TMP_FILE
+ else
+ WGET_PARTIAL="--continue"
+ fi
+
+ if [ "$USE_CACHE" == "off" ] ; then
+ WGET_CACHE="--cache=off"
+ else
+ WGET_CACHE="--cache=on"
+ fi
+
+ if [ -n "$DOWNLOAD_RATE" ] ; then
+ WGET_RATE="--limit-rate=${DOWNLOAD_RATE}"
+ fi
+
+ WGET_RETRIES="--tries=${WGET_NUM_RETRY:=5}"
+
+ [ -n "$http_proxy" ] && export http_proxy=$http_proxy
+ [ -n "$ftp_proxy" ] && export ftp_proxy=$ftp_proxy
+ [ -n "$no_proxy" ] && export no_proxy=$no_proxy
+
+ verbose_msg "calling \"wget $WGET_CACHE $WGET_RATE $WGET_FTP_CONNECTION $WGET_RETRIES $WGET_PARTIAL \"$URL$2\" --output-document $TMP_FILE\""
+ if erase $TMP_FILE && wget $WGET_CACHE $WGET_RATE $WGET_FTP_CONNECTION $WGET_RETRIES $WGET_PARTIAL "$URL$2" --output-document "$TMP_FILE" ; then
+ # looks like it worked
+ if testpack $TMP_FILE ; then
+ if [ "$TMP_FILE" != "$3/$2" ]; then
+ install -m644 $TMP_FILE "$3/$2"
+ rm $TMP_FILE
+ fi
+ verbose_msg "download of \"$2\" successful"
+ else
+ rm -f $TMP_FILE
+ return 1
+ fi
+ else
+ activity_log "lget" "$MODULE" "$VERSION" "failed" "broken URL: \"$URL$2\""
+ return 1
+ fi
+}
+
+
+plugin_register SOURCE_DOWNLOAD plugin_source_download_generic
diff --git a/var/lib/lunar/plugins/unpack-generic.plugin b/var/lib/lunar/plugins/unpack-generic.plugin
new file mode 100644
index 0000000..d3b3543
--- /dev/null
+++ b/var/lib/lunar/plugins/unpack-generic.plugin
@@ -0,0 +1,48 @@
+#!/bin/bash
+#############################################################
+# #
+# unpack-generic.plugin - generic plugin that unpacks #
+# sources #
+# #
+#############################################################
+# #
+# Copyright 2005 by Auke Kok under GPLv2 #
+# #
+#############################################################
+
+
+plugin_unpack_generic() {
+ case $1 in
+ *.tar.bz2|*.tbz2)
+ debug_msg "Unpacking tar.bz2 file \"$1\""
+ tar jxf $1 --no-same-owner --no-same-permissions || return 1
+ ;;
+ *.tar.gz|*.tgz|*.tar.Z)
+ debug_msg "Unpacking tar.gz file \"$1\""
+ tar zxf $1 --no-same-owner --no-same-permissions || return 1
+ ;;
+ *.bz2)
+ debug_msg "Unpacking bz2 file \"$1\""
+ cp $1 . || return 1
+ bunzip2 $1 || return 1
+ ;;
+ *.gz)
+ debug_msg "Unpacking gz file \"$1\""
+ cp $1 . || return 1
+ gunzip $1 || return 1
+ ;;
+ *.tar)
+ debug_msg "Unpacking tar file \"$1\""
+ tar xf $1 --no-same-owner --no-same-permissions || return 1
+ ;;
+ *)
+ # fallback: we don't know what to do!
+ return 2
+ ;;
+ esac
+ # return success!
+ return 0
+}
+
+
+plugin_register SOURCE_UNPACK plugin_unpack_generic
diff --git a/var/lib/lunar/plugins/verify-md5.plugin b/var/lib/lunar/plugins/verify-md5.plugin
new file mode 100644
index 0000000..5aefe93
--- /dev/null
+++ b/var/lib/lunar/plugins/verify-md5.plugin
@@ -0,0 +1,32 @@
+#!/bin/bash
+#############################################################
+# #
+# verify-md5.plugin - plugin that performs md5check #
+# #
+#############################################################
+# #
+# Copyright 2005 by Auke Kok under GPLv2 #
+# #
+#############################################################
+
+
+plugin_source_verify_md5() {
+ # check if we can handle this type of VFY:
+ if [ "${2:0:4}" != "md5:" ] ; then
+ return 2
+ fi
+ debug_msg "plugin_source_verify_md5 ($@)"
+ TMP_MD5=$(md5sum $SOURCE_CACHE/$1 | cut -d " " -f 1-1)
+ if [ "${2:4}" != "$TMP_MD5" ] ; then
+ message "${PROBLEM_COLOR}! md5sum check failed for ${DEFAULT_COLOR}${FILE_COLOR}$1${DEFAULT_COLOR}"
+ verbose_msg "offending md5sum: $TMP_MD5"
+ verbose_msg "should be md5sum: ${2:4}"
+ return 1
+ else
+ # always return 'continue' plugin value
+ return 2
+ fi
+}
+
+
+plugin_register SOURCE_VERIFY plugin_source_verify_md5
diff --git a/var/lib/lunar/plugins/verify-sha1.plugin b/var/lib/lunar/plugins/verify-sha1.plugin
new file mode 100644
index 0000000..a66b14a
--- /dev/null
+++ b/var/lib/lunar/plugins/verify-sha1.plugin
@@ -0,0 +1,32 @@
+#!/bin/bash
+#############################################################
+# #
+# verify-sha1.plugin - plugin that performs sha1check #
+# #
+#############################################################
+# #
+# Copyright 2005 by Auke Kok under GPLv2 #
+# #
+#############################################################
+
+
+plugin_source_verify_sha1() {
+ # check if we can handle this type of VFY:
+ if [ "${2:0:5}" != "sha1:" ] ; then
+ return 2
+ fi
+ debug_msg "plugin_source_verify_sha1 ($@)"
+ TMP_MD5=$(sha1sum $SOURCE_CACHE/$1 | cut -d " " -f 1-1)
+ if [ "${2:5}" != "$TMP_MD5" ] ; then
+ message "${PROBLEM_COLOR}! sha1sum check failed for ${DEFAULT_COLOR}${FILE_COLOR}$1${DEFAULT_COLOR}"
+ verbose_msg "offending sha1sum: $TMP_MD5"
+ verbose_msg "should be sha1sum: ${2:5}"
+ return 1
+ else
+ # always return 'continue' plugin value
+ return 2
+ fi
+}
+
+
+plugin_register SOURCE_VERIFY plugin_source_verify_sha1
diff --git a/var/lib/lunar/protected b/var/lib/lunar/protected
index 6bebd0c..250a9de 100644
--- a/var/lib/lunar/protected
+++ b/var/lib/lunar/protected
@@ -19,17 +19,11 @@
^/etc/bonobo-activation/
^/etc/config.d/ospmd.conf
^/etc/courier/
-^/etc/cron.daily/
-^/etc/cron.hourly/
-^/etc/cron.monthly/
-^/etc/crontab
-^/etc/cron.weekly/
^/etc/cups/
^/etc/dhcpd.conf
^/etc/exim.conf
^/etc/exports
^/etc/fstab
-^/etc/ftpusers
^/etc/group
^/etc/group-
^/etc/grsec/
diff --git a/var/lib/lunar/sustained b/var/lib/lunar/sustained
index a9df54d..9f39be3 100644
--- a/var/lib/lunar/sustained
+++ b/var/lib/lunar/sustained
@@ -2,7 +2,6 @@ bash
binutils
bzip2
coreutils
-cpio
cracklib
dialog
e2fsprogs
@@ -15,7 +14,6 @@ grep
gzip
installwatch
less
-lilo
lunar
mailx
make
@@ -25,12 +23,10 @@ ncurses
net-tools
patch
readline
-rpmunpack
sed
shadow
tar
theedge
-unzip
util-linux
util-linux-crypto
wget
More information about the Lunar-commits
mailing list