[Lunar-commits] r17881 - in lunar/branches/stable: . bin etc/lunar/mirrors sbin usr/share/man/man1 usr/share/man/man8 var/lib/lunar/compilers var/lib/lunar/functions var/lib/lunar/menu var/lib/lunar/plugins

Auke Kok sofar at lunar-linux.org
Mon Jan 2 05:45:27 UTC 2006


Author: sofar
Date: 2006-01-02 05:45:26 +0000 (Mon, 02 Jan 2006)
New Revision: 17881

Added:
   lunar/branches/stable/var/lib/lunar/menu/license.menu
Modified:
   lunar/branches/stable/bin/lvu
   lunar/branches/stable/etc/lunar/mirrors/GNU
   lunar/branches/stable/install
   lunar/branches/stable/sbin/lin
   lunar/branches/stable/sbin/lunar
   lunar/branches/stable/usr/share/man/man1/lvu.1
   lunar/branches/stable/usr/share/man/man8/lfirsttime.8
   lunar/branches/stable/var/lib/lunar/compilers/ld
   lunar/branches/stable/var/lib/lunar/functions/download.lunar
   lunar/branches/stable/var/lib/lunar/functions/modules.lunar
   lunar/branches/stable/var/lib/lunar/functions/optimize.lunar
   lunar/branches/stable/var/lib/lunar/menu/optimize.menu
   lunar/branches/stable/var/lib/lunar/plugins/download-generic.plugin
Log:
Full sync with theedge!

Modified: lunar/branches/stable/bin/lvu
===================================================================
--- lunar/branches/stable/bin/lvu	2006-01-02 04:23:44 UTC (rev 17880)
+++ lunar/branches/stable/bin/lvu	2006-01-02 05:45:26 UTC (rev 17881)
@@ -34,7 +34,7 @@
 cat << EOF
 LVU -- Lunar View utility (for viewing just about everything in Lunar-Linux)
 
-Usage:		lvu [general options] [command [command parameters]]
+Usage:      lvu [general options] [command [command parameters]]
 
 GENERAL OPTIONS:
 
@@ -61,6 +61,7 @@
                                dependencies
 held                       display held modules
 exiled                     display exiled modules
+expired                    display a list of modules which need an update
 info        module         display terse summary information about module
 
 search      "phrase"       searches all modules long descriptions for phrase.
@@ -752,7 +753,7 @@
 	  message "no local copy of \"$MODULE\" exists"
 	  exit 1
     fi
-	ZSECTION=$(echo $SECTION | sed 's/zlocal\///g')
+	ZSECTION=$(echo $SECTION | sed 's/zlocal/\//g')
     diff -Nurb $MOONBASE/$NZSECTION/$MODULE $MOONBASE/zlocal/$ZSECTION/$MODULE --exclude ".svn" --exclude "CVS" | sed "s|^\([+-][+-][+-] \)$MOONBASE/[^/]*/|\1|g" | grep -v "^diff " | sed "s|$ZSECTION\/||g"
   fi
 }
@@ -1004,6 +1005,12 @@
     exiled)
       grep ":exiled:" $MODULE_STATUS | cut -d: -f1
       ;;
+
+    expired)
+      for MODULE in $(list_expired_modules); do
+        echo "$MODULE ($(installed_version $MODULE) -> $(run_details $MODULE > /dev/null ; echo $VERSION))"
+      done
+      ;;
 		
     sum)
       if [ -n "$2" ] ; then

Modified: lunar/branches/stable/etc/lunar/mirrors/GNU
===================================================================
--- lunar/branches/stable/etc/lunar/mirrors/GNU	2006-01-02 04:23:44 UTC (rev 17880)
+++ lunar/branches/stable/etc/lunar/mirrors/GNU	2006-01-02 05:45:26 UTC (rev 17881)
@@ -2,7 +2,7 @@
 "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/
+Illinois	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/

Modified: lunar/branches/stable/install
===================================================================
--- lunar/branches/stable/install	2006-01-02 04:23:44 UTC (rev 17880)
+++ lunar/branches/stable/install	2006-01-02 05:45:26 UTC (rev 17881)
@@ -12,6 +12,9 @@
    ROOT=$1
 fi
 
+mkdir -p $ROOT/var/log/lunar/{install,compile,md5sum,queue}
+mkdir -p $ROOT/var/{cache,lib,spool,state}/lunar
+
 cp -a bin  $ROOT
 cp -a etc  $ROOT
 cp -a lib  $ROOT

Modified: lunar/branches/stable/sbin/lin
===================================================================
--- lunar/branches/stable/sbin/lin	2006-01-02 04:23:44 UTC (rev 17880)
+++ lunar/branches/stable/sbin/lin	2006-01-02 05:45:26 UTC (rev 17881)
@@ -125,7 +125,7 @@
       # no strange stuff should happen here anymore
       for MODULE in $MODULES ; do
         if ! module_installed $MODULE || [ ! -n "$PROBE" ] || ( [ -n "$PROBE" ] && [ "$PROBE_EXPIRED" == "on" ] && module_is_expired $MODULE ) ; then
-          if ! module_held $MODULE && ! module_exiled $MODULE ; then
+          if ! module_held $MODULE && ! module_exiled $MODULE && module_license_accepted $MODULE ; then
             linING="/var/lock/installing.$MODULE"
             verbose_msg "starting lin \"$MODULE\""
             if ! ( SINGLE_MODULE=1 main $MODULE ) ; then
@@ -139,7 +139,17 @@
               fi
             fi
           else
-            verbose_msg "Skipping compile and install for held/exiled module \"$MODULE\""
+            # split up error messages
+            if module_held $MODULE; then
+              verbose_msg "Skipping compile and install for held module \"$MODULE\""
+            elif module_exiled $MODULE; then
+              verbose_msg "Skipping compile and install for exiled module \"$MODULE\""
+            else
+              message "${MESSAGE_COLOR}The license of this module is incompatible with the list of"
+              message "allowed and/or rejected licenses. Please adjust the ACCEPTED_LICENSES or"
+              message "REJECTED_LICENSES variables to include or not include the specific"
+              message "license of this module.${DEFAULT_COLOR}"
+            fi
           fi
         fi
       done

Modified: lunar/branches/stable/sbin/lunar
===================================================================
--- lunar/branches/stable/sbin/lunar	2006-01-02 04:23:44 UTC (rev 17880)
+++ lunar/branches/stable/sbin/lunar	2006-01-02 05:45:26 UTC (rev 17881)
@@ -296,7 +296,6 @@
 
 
 hold_pkgs()  {
-   CHECKLIST=`make_hold_checklist`
   HOLD_TITLE="Select modules to hold or unhold"
    HOLD_HELP="[X]=held  [ ]=installed"
 
@@ -307,26 +306,10 @@
                         --checklist            \
                         "$HOLD_HELP"           \
                         0 0 10                 \
-                        $CHECKLIST`
+                        $(make_hold_checklist)`
   then
-    rm  -f  $MODULE_STATUS
-
-    for  LINE  in  `cat  $MODULE_STATUS_BACKUP`;  do
-        MODULE=`echo  "$LINE"  |  cut  -d : -f1`
-         DATE=`echo  "$LINE"  |  cut  -d : -f2`
-       STATUS=`echo  "$LINE"  |  cut  -d : -f3`
-      VERSION=`echo  "$LINE"  |  cut  -d : -f4`
-
-      if    echo  -e  "$OUTLIST"  |  grep  -q  "^$MODULE\$";  then
-        STATUS="held";
-      else
-        STATUS=${STATUS/held/installed}
-      fi
-
-      echo  "$MODULE:$DATE:$STATUS:$VERSION"  >>  $MODULE_STATUS
-    done
-
-    cp  $MODULE_STATUS  $MODULE_STATUS_BACKUP
+    unhold_modules $(cut -d: -f1 < $MODULE_STATUS)
+    hold_modules $OUTLIST
   fi
 
 }
@@ -651,6 +634,8 @@
     I_HELP="Select the test that lunar fix, and AUTOFIX execute"
     D_HELP="Options for downloads"
     L_HELP="Select default lunar module"
+    A_HELP="Select accepted licenses"
+    R_HELP="Select rejected licenses"
 
     COMMAND=`$DIALOG  --title "Option Menu"                    \
                       --item-help                              \
@@ -666,7 +651,9 @@
                       "F"  "Feature Menu"           "$F_HELP"  \
                       "I"  "Integrity Checking"     "$I_HELP"  \
                       "M"  "Software Mirrors"       "$M_HELP"  \
-                      "O"  "Optimize Architecture"  "$O_HELP"`
+                      "O"  "Optimize Architecture"  "$O_HELP"  \
+		      "A"  "Accepted licenses"      "$A_HELP"  \
+		      "R"  "Rejected licenses"      "$R_HELP"`
 
   do
     case  $COMMAND in
@@ -678,6 +665,8 @@
       M)  mirror_menu            ;;
       O)  . /var/lib/lunar/menu/optimize.menu && optimize_menu          ;;
       L)  set_default_module     ;;
+      A)  set_accepted_licenses  ;;
+      R)  set_rejected_licenses  ;;
     esac
   done
 }

Modified: lunar/branches/stable/usr/share/man/man1/lvu.1
===================================================================
--- lunar/branches/stable/usr/share/man/man1/lvu.1	2006-01-02 04:23:44 UTC (rev 17880)
+++ lunar/branches/stable/usr/share/man/man1/lvu.1	2006-01-02 05:45:26 UTC (rev 17881)
@@ -33,7 +33,7 @@
 installed [module]
 .PP
 .B lvu
-held|exiled
+held|exiled|expired
 .PP
 .B lvu
 section [section]
@@ -149,6 +149,10 @@
 .IP
 display exiled modules
 .PP
+.B expired
+.IP
+display a list of modules which will be updated by a `lunar renew`
+.PP
 .B sum
 <module>
 .IP 

Modified: lunar/branches/stable/usr/share/man/man8/lfirsttime.8
===================================================================
--- lunar/branches/stable/usr/share/man/man8/lfirsttime.8	2006-01-02 04:23:44 UTC (rev 17880)
+++ lunar/branches/stable/usr/share/man/man8/lfirsttime.8	2006-01-02 05:45:26 UTC (rev 17881)
@@ -139,7 +139,7 @@
 .IX Header "DO NOT PANIC!"
 These are the suggested tasks you should accomplish immediately after the first boot of a newly installed Lunar box.
 .PP
-All of the lunar related commands mentioned below either feature a whole manpage or at least a very useful helpscreen. If you need immediant assistance regarding any of those commands, issue:
+All of the lunar related commands mentioned below either feature a whole manpage or at least a very useful helpscreen. If you need immediate assistance regarding any of those commands, issue:
 .PP
 \&\fBman 'command'\fR or \fB'command' \-\-help\fR
 .PP
@@ -150,7 +150,7 @@
 \&\fBPlease remember that the Lunar Install/Rescue \s-1ISO\s0 is not a full featured system.\fR
 .SH "NETWORK SETTINGS"
 .IX Header "NETWORK SETTINGS"
-This step is crucial to your future success with \fBLunar Linux\fR. If you haven't set up your network card yet try it with \fBlnet\fR. Remember, you need to know about your current network card's driver and have the kernel built the appropriate modules for it.
+This step is crucial to your future success with \fBLunar Linux\fR. If you haven't set up your network card yet try it with \fBlnet\fR. Remember, you need to know about your current network card's driver and have the kernel build the appropriate modules for it.
 .Sh "Check your network settings"
 .IX Subsection "Check your network settings"
 Once you've set up your network card correctly, try to ping out.
@@ -173,7 +173,7 @@
 If your \s-1NIC\s0 module is there but your interface is not up, reconfigure the interface with \fBlnet\fR and test again.  If your \s-1NIC\s0 module is still not listed in the output of \fBlsmod\fR, the chances are you have misconfigured the kernel or misconfigured your network.  To check the kernel modules, try \fBls \-l /lib/modules/`uname \-r`/kernel/drivers/net\fR to see the network modules available with the current kernel. If the your \s-1NIC\s0's kernel module doesn't show up you probably have to reconfigure and recompile your current kernel to include the appropriate module(s).
 .Sh "lnet or manual configuration"
 .IX Subsection "lnet or manual configuration"
-Your network setting can be configured completely using \fBlnet\fR; just make sure you set up your interface correctly as needed. If you encouter problems after having configured your network with \fBlnet\fR you probably want to adjust the configuration manually.
+Your network setting can be configured completely using \fBlnet\fR; just make sure you set up your interface correctly as needed. If you encounter problems after having configured your network with \fBlnet\fR you probably want to adjust the configuration manually.
 .PP
 The network configuration file for your Lunar installation may be found in \fB/etc/config.d/network/'interface'\fR (f.e. 'eth0' \-> /etc/config.d/network/eth0). Any time you adjust your interface's configuration manually or through \fBlnet\fR you will have to restart the network to make use of any changes that have been done in the meantime. The init script used to start/stop/restart network is \fB/etc/init.d/network\fR.
 .PP
@@ -189,9 +189,9 @@
 .PP
 \&\fBlunar\fR or \fBtheedge\fR
 .PP
-\&\fBlunar\fR is the stable branch of the lunar \fBcoretools\fR. It's ment to run with  stable production environments. \fBtheedge\fR is the unstable branch. It might occasionally contain bugs, however it's generally used to test out new features and bugfixes before they're migrated to the stable branch. If you'd like to help out with the lunar development or you discovered a bug in \fBlunar\fR you might want to give \fBtheedge\fR a try.
+\&\fBlunar\fR is the stable branch of the lunar \fBcoretools\fR. It's meant to run with stable production environments. \fBtheedge\fR is the unstable branch. It might occasionally contain bugs, however it's generally used to test out new features and bugfixes before they're migrated to the stable branch. If you'd like to help out with the lunar development or you discovered a bug in \fBlunar\fR you might want to give \fBtheedge\fR a try.
 .PP
-Since the \s-1ISO\s0 ships with \fBtheedge\fR preinstalled you \fBhave to\fR update \fBtheedge\fR before you do anything else .. even if you're planning to use \fBlunar\fR lateron!
+Since the \s-1ISO\s0 ships with \fBtheedge\fR preinstalled you \fBhave to\fR update \fBtheedge\fR before you do anything else -- even if you're planning to use \fBlunar\fR later on!
 .PP
 Execute: \fBlin theedge\fR
 .PP
@@ -200,7 +200,7 @@
 Execute: \fBlin lunar\fR
 .Sh "Core Components"
 .IX Subsection "Core Components"
-A very brief explaination of the most important coretool components. For further information regarding the referenced parts please refer to their manpages (i.e. man <part>):
+A very brief explanation of the most important coretool components. For further information regarding the referenced parts please refer to their manpages (i.e. man <part>):
 .IP "\fBlin\fR; usage: lin <module>" 4
 .IX Item "lin; usage: lin <module>"
 Install a package/module.
@@ -223,12 +223,12 @@
 \&\fBLunar Linux\fR can easily be customized and is highly configurable. For changing the options that affect your system you may use the menu driven \fBlunar\fR configuration utility. It's based upon ncurses which means you can even run it in the console of your choice. You need to become root to use it.
 .IP "\fBOptimizations\fR" 4
 .IX Item "Optimizations"
-Set the right optimizations for your computer. Beware that changing your optimizations to the wrongly values might actually break your whole installations so be really carefull about what you're chosing. The \s-1ISO\s0 has been built with a minimum of available optimizations to ensure the highest amount of flexibility. To see wether or not your processor supports a certain feature try a \fBcat /proc/cpu\fR. It usually shows the available settings that suit your machine.
+Set the right optimizations for your computer. Be aware that changing your optimizations to the wrong values might actually break your whole installation so be really careful about what you're choosing. The \s-1ISO\s0 has been built with a minimum of available optimizations to ensure the highest amount of flexibility. To see whether or not your processor supports a certain feature try a \fBcat /proc/cpu\fR. It usually shows the available settings that suit your machine.
 .IP "\fBIntegrity checking\fR" 4
 .IX Item "Integrity checking"
 Lunar is performing a range of security checks on tarballs and installed packages to prevent faulty tarballs and possible intruders from taking over your system. It also ensures that none of your currently installed packages is broken.
 .Sp
-You may select the amount of checks from the \fBIntegrity checking\fR submenu at the \fBOptions\fR menu. It's generally recommeneded to at least chose \fB\s-1FIND_CHECK\s0\fR and \fB\s-1LDD_CHECK\s0\fR.
+You may select the amount of checks from the \fBIntegrity checking\fR submenu at the \fBOptions\fR menu. It's generally recommended to at least chose \fB\s-1FIND_CHECK\s0\fR and \fB\s-1LDD_CHECK\s0\fR.
 .IP "\fBFeature menu\fR" 4
 .IX Item "Feature menu"
 As mentioned before, Lunar is highly configurable. Thus you have a whole menu to select its features from. It's strongly advised to at least take a look at it and get used to them. Explanations are usually displayed as soon as you select an item.
@@ -239,7 +239,7 @@
 .IX Header "GENERAL UPDATES"
 Right now you're set to update your whole system. Before you do that make sure you have the most recent \fBcoretools\fR and \fBmoonbase\fR installed.
 .PP
-The next step can be omitted .. however, it is highly recommened that you rebuild the following modules in the right order to ensure that your system is working right.
+The next step can be omitted -- however, it is highly recommended that you rebuild the following modules in the right order to ensure that your system is working right.
 .PP
 Here we go:
 .PP
@@ -258,7 +258,7 @@
 .PP
 Once it is done it is going to present you with a summary about how many module where successfully updated and which of them failed. \fBlvu\fR ('lvu activity') is going to show you which of them failed and usually why. \fBlvu\fR ('lvu compile <module>') is also going to show you the compilation's logfile which should clearly point you to the error that led to the failure of the module's compilation.
 .PP
-The first thing to do would be to 're'lin' (i.e. execute \fBlin \-c\fR once more. It is always advised to use the \-c and the \-r switch incase a module fails to compile) all the failed modules by hand. If you think you will not be able to resolve the matter on your own you can still file a bugreport at the \fBLunar Linux bugtracker\fR http://bugs.lunar\-linux.org or report the error to the \fBLunar Linux mailinglist\fR. However, you will have to subscribe to the list at http://foo\-projects.org/mailman/listinfo/lunar before being able to post any mail to it.
+The first thing to do would be to 're'lin' (i.e. execute \fBlin \-c\fR once more. It is always advised to use the \-c and the \-r switch in case a module fails to compile) all the failed modules by hand. If you think you will not be able to resolve the matter on your own you can still file a bugreport at the \fBLunar Linux bugtracker\fR http://bugs.lunar\-linux.org or report the error to the \fBLunar Linux mailinglist\fR. However, you will have to subscribe to the list at http://foo\-projects.org/mailman/listinfo/lunar before being able to post any mail to it.
 .PP
 Once the update has been completed successfully you may go ahead and customize your installation to suit your own needs. Well done!
 .SH "HINTS"
@@ -268,7 +268,7 @@
 All of the coretools are able to do tab\-completion. Say, you want to install the module 'xfce4\-panel' just go ahead and type 'lin xfce4\-p<\s-1TAB\s0>' and lin is going to append the rest of the module's name to the command. Once there are too few characters to resolve the name into one single module you just need to hit \s-1TAB\s0 twice to get a list of all the modules starting with the characters you just typed i.e. 'lin xfce<\s-1TAB\s0><\s-1TAB\s0>' is going to give you a list of all modules starting with 'xfce'.
 .IP "\fBLeftovers\fR" 4
 .IX Item "Leftovers"
-Incase of a compilation failure the sources of the failed module are left in \f(CW$BUILD_DIRECTORY\fR (usually /usr/src/). Moreover, I few tracking files lunar creates to monitor the running installation process might be left in /tmp. Make sure you tidy up these two locations from time to time.
+In case of a compilation failure the sources of the failed module are left in \f(CW$BUILD_DIRECTORY\fR (usually /usr/src/). Moreover, a few tracking files lunar creates to monitor the running installation process might be left in /tmp. Make sure you tidy up these two locations from time to time.
 .Sp
 \&\fB\s-1CAUTION:\s0\fR Directories like 'linux\-2.x' are kernel source directories and _must_ be left intact. Otherwise your system is going to break! Only delete them if you're absolutely sure that they don't belong to your currently running kernel.
 .IP "\fBRunning coretools processes\fR" 4
@@ -283,10 +283,10 @@
 irc://irc.freenode.net/#lunar
 .SH "NOTES"
 .IX Header "NOTES"
-This is by far not a complete coverage of what should be done with a ready-to-go Lunar system. Please consult the documentations at the Lunar website for more information.
+This is merely an introduction to what should be done to get a ready-to-go Lunar system. Please consult the documentation at the Lunar website for more information.
 .SH "SEE ALSO"
 .IX Header "SEE ALSO"
-Documenations at the Lunar Linux website at http://lunar\-linux.org
+Documentation at the Lunar Linux website at http://lunar\-linux.org
 .PP
 \&\fIlunar\fR\|(8), \fImoonbase\fR\|(1), \fIlin\fR\|(8), \fIlvu\fR\|(1), \fIlget\fR\|(8), \fIlrm\fR\|(8), \fIlnet\fR\|(8)
 .SH "DISCLAIMER"

Modified: lunar/branches/stable/var/lib/lunar/compilers/ld
===================================================================
--- lunar/branches/stable/var/lib/lunar/compilers/ld	2006-01-02 04:23:44 UTC (rev 17880)
+++ lunar/branches/stable/var/lib/lunar/compilers/ld	2006-01-02 05:45:26 UTC (rev 17881)
@@ -1,5 +1,5 @@
 #!/bin/bash
- 
+
 if [ -n "$LUNAR_DEBUG" ] ; then
   echo "++ ${LD_PATH:-/usr/bin}/ld \"$@\"" >&2
 fi

Modified: lunar/branches/stable/var/lib/lunar/functions/download.lunar
===================================================================
--- lunar/branches/stable/var/lib/lunar/functions/download.lunar	2006-01-02 04:23:44 UTC (rev 17880)
+++ lunar/branches/stable/var/lib/lunar/functions/download.lunar	2006-01-02 05:45:26 UTC (rev 17881)
@@ -53,9 +53,17 @@
 	local MAX_SOURCES SRC ALL_URLS URLS URL MLIST ALT REST HIT
 	debug_msg "download_module ($@)"
 	if ! run_details $1 ; then
-		exit 1
+		return 1
 	fi
 
+	if ! module_license_accepted $1 ; then
+		message "${MESSAGE_COLOR}The license of this module is incompatible with the list of"
+		message "allowed and/or rejected licenses. Please adjust the ACCEPTED_LICENSES or"
+		message "REJECTED_LICENSES variables to include or not include the specific"
+		message "license of this module.${DEFAULT_COLOR}"
+		return 1
+	fi
+
 	MAX_SOURCES=${MAX_SOURCES:=100}
 
 	# loop over all sources
@@ -84,7 +92,7 @@
 			if [ -n "$1" ]; then
 				if ! echo " $ALL_URLS " | grep -q " $1 "; then
 					# make sure the URL has ONE "/" at the end
-					ALL_URLS="$ALL_URLS $(echo "$1/" | sed "s:\([^:]/\)/*:\1:g")"
+					ALL_URLS="$ALL_URLS $(echo "$1/" | sed "s:[/][/]$:/:g")"
 				fi
 			fi
 		}

Modified: lunar/branches/stable/var/lib/lunar/functions/modules.lunar
===================================================================
--- lunar/branches/stable/var/lib/lunar/functions/modules.lunar	2006-01-02 04:23:44 UTC (rev 17880)
+++ lunar/branches/stable/var/lib/lunar/functions/modules.lunar	2006-01-02 05:45:26 UTC (rev 17881)
@@ -284,6 +284,67 @@
 }
 
 
+module_license_accepted() {
+  #
+  # This code handles acceptance or rejection of certain licenses.
+  #
+  # valid licenses currently are:
+  # osi == gpl gpl2 lgpl gfdl bsd mpl cc apache artistic qpl
+  
+  debug_msg "module_license_accepted ($@)"
+
+  local L LICENSE IS_OSI
+  LICENSE=$(run_details $1 > /dev/null ; echo $LICENSE)
+  # assume it's osi if it's empty
+  if [ -z "$LICENSE" ]; then
+    debug_msg "assuming LICENSE=\"osi\""
+    LICENSE="osi"
+  fi
+  
+  # check for osi license
+  case $LICENSE in
+    gpl|gpl2|lgpl|gfdl|bsd|mpl|cc|apache|artistic|qpl|osi)
+      IS_OSI=yes
+    ;;
+  esac
+
+  # check if $MODULE's $LICENSE is accepted or not, works as follows:
+  # if ACCEPTED_LICENSES is set, LICENSE *must* be listed, else if
+  # REJECTED_LICESES is set, must _NOT_ be listed
+  # * accept "osi" will accept all osi licenses
+  # * accept "all" will accept anything
+  if [ -n "$ACCEPTED_LICENSES" ]; then
+    for L in $ACCEPTED_LICENSES; do
+      if [ "$L" == "osi" -a "$IS_OSI" == "yes" ] || [ "$L" == "all" ] || [ "$LICENSE" == "$L" ] ; then
+        # explicitly accepted license!
+	debug_msg "module_license_accepted: \"$LICENSE\" is explicitly accepted"
+        return 0
+      fi
+    done
+    # it was not explicitly accepted
+    error_message "${MODULE_COLOR}$1${DEFAULT_COLOR}: ${PROBLEM_COLOR}License \"$LICENSE\" is not explicitly accepted${DEFAULT_COLOR}"
+    return 1
+  elif [ -n "$REJECTED_LICENSES" ]; then
+    for L in $REJECTED_LICENSES; do
+      if [ "$LICENSE" == "$L" ]; then
+        # explicitly rejected license!
+	error_message "${MODULE_COLOR}$1${DEFAULT_COLOR}: ${PROBLEM_COLOR}License \"$LICENSE\" is explicitly rejected${DEFAULT_COLOR}"
+	return 1
+      fi
+    done
+    # implicitly not rejected
+    debug_msg "module_license_accepted: \"$LICENSE\" is not rejected"
+    return 0
+  else ## if [ -z "${ACCEPTED_LICENSES}${REJECTED_LICESES}" ]; then
+    # so now we have a problem - the user didn't set their prefs
+    if [ "$IS_OSI" != "yes" ] ; then
+      error_message "${MODULE_COLOR}$1${DEFAULT_COLOR}: ${PROBLEM_COLOR}License \"$LICENSE\" cannot be accepted by default${DEFAULT_COLOR}"
+      return 1
+    fi
+  fi
+}
+
+
 # function : module_exiled
 # usage    : module_exiled $MODULE
 # purpose  : check if $MODULE is exiled

Modified: lunar/branches/stable/var/lib/lunar/functions/optimize.lunar
===================================================================
--- lunar/branches/stable/var/lib/lunar/functions/optimize.lunar	2006-01-02 04:23:44 UTC (rev 17880)
+++ lunar/branches/stable/var/lib/lunar/functions/optimize.lunar	2006-01-02 05:45:26 UTC (rev 17881)
@@ -104,6 +104,8 @@
          CPU="powerpc"
       elif [[ $PLATFORM == "SPARC" ]];   then
          CPU="ultrasparc"
+      elif [[ $PLATFORM == "x86_64" ]];  then
+         CPU="x86_64"
       else
          CPU="I386"
       fi
@@ -460,6 +462,10 @@
                      CXXFLAGS="$CXXFLAGS -mcpu=ultrasparc"
                      BUILD="sparc-linux"
                      ;;
+      x86_64)        CFLAGS="$CFLAGS"
+                     CXXFLAGS="$CXXFLAGS"
+                     BUILD="x86_64-pc-linux-gnu"
+                     ;;
    esac
 }
 
@@ -582,6 +588,11 @@
                   CXXFLAGS="$CXXFLAGS -msse2"
                fi
 	       ;;
+      SSE3)    if [[ $GCCVER == "3" ]];  then
+                  CFLAGS="$CFLAGS -msse3"
+                  CXXFLAGS="$CXXFLAGS -msse3"
+               fi
+	       ;;	       	       
       dnow)   if [[ $GCCVER == "3" ]];  then
                   CFLAGS="$CFLAGS -m3dnow"
                   CXXFLAGS="$CXXFLAGS -m3dnow"

Added: lunar/branches/stable/var/lib/lunar/menu/license.menu
===================================================================
--- lunar/branches/stable/var/lib/lunar/menu/license.menu	2006-01-02 04:23:44 UTC (rev 17880)
+++ lunar/branches/stable/var/lib/lunar/menu/license.menu	2006-01-02 05:45:26 UTC (rev 17881)
@@ -0,0 +1,71 @@
+############################################################
+#                                                          #
+# This code is written for Lunar Linux, see                #
+# http://lunar-linux.org                                   #
+#                                                          #
+############################################################
+#                                                          #
+# $MENUS/license                                           #
+# includes menu for setting the accepted/rejected licenses #
+#                                                          #
+# 20051105                                                 #
+#                                                          #
+############################################################
+#                                                          #
+# Copyrighted Auke Kok 2005 under GPLv2                    #
+#                                                          #
+############################################################
+
+set_accepted_licenses()
+{
+
+    PROMPT="Please select acceptable licenses
+
+Lunar by default only accepts osi-approved licenses. You will
+need to tell lunar to explicitly accept or reject licenses if
+you wish to change this behaviour.
+
+You have several ways of doing so:
+ o Enter \"all\" in this field to except every license.
+ o Enter \"osi\" to accept any known osi approved license.
+ o Or enter any specific license name in here to accept it.
+ o Enter licenses in the REJECTED_LICENSES and leave this
+   field empty to reject only those licenses.
+  
+Currently known osi licenses: gpl gpl2 lgpl gfdl bsd mpl cc apache
+artistic qpl."
+
+    ACCEPTED_LICENSES=`$DIALOG --title "Select accepted licenses" \
+        --ok-label "Commit" --inputbox                            \
+	"$PROMPT" 0 0 "$ACCEPTED_LICENSES"`
+
+    set_local_config ACCEPTED_LICENSES "$ACCEPTED_LICENSES"
+
+}
+
+set_rejected_licenses()
+{
+
+    PROMPT="Please select rejected licenses
+
+Lunar by default only accepts osi-approved licenses. You will
+need to tell lunar to explicitly accept or reject licenses if
+you wish to change this behaviour.
+
+You have several ways of doing so:
+ o use the ACCEPTED_LICENSES field to accept only specific licenses
+ o enter any license name in here to reject it - however \"osi\"
+   or \"all\" does not work in this field - you must use the exact
+   name.
+
+Remember that if you leave ACCEPTED_LICENSES empty, all licenses will
+be accepted that do not match the REJECTED_LICENSES list."
+
+    REJECTED_LICENSES=`$DIALOG --title "Select rejected licenses" \
+        --ok-label "Commit" --inputbox                            \
+	"$PROMPT" 0 0 "$REJECTED_LICENSES"`
+
+    set_local_config REJECTED_LICENSES "$REJECTED_LICENSES"
+
+}
+

Modified: lunar/branches/stable/var/lib/lunar/menu/optimize.menu
===================================================================
--- lunar/branches/stable/var/lib/lunar/menu/optimize.menu	2006-01-02 04:23:44 UTC (rev 17880)
+++ lunar/branches/stable/var/lib/lunar/menu/optimize.menu	2006-01-02 05:45:26 UTC (rev 17881)
@@ -39,6 +39,7 @@
      Alpha_HELP="Compaq Alpha hardware"
      PowerPC_HELP="IBM and Apple hardware (Power and PowerPC)"
      SPARC_HELP="SUN Hardware"
+     x86_64_HELP="Both AMD64 and Intel EM64T machines"
      ;;
 
    # Help for the basic optimizations.
@@ -72,6 +73,7 @@
          Athlon4_HELP="AMD Athlon 4 processors"
          AthlonXP_HELP="AMD Athlon XP processors"
          AthlonMP_HELP="AMD Athlon MP processors"
+	  Athlon64_HELP="AMD Athlon 64 processors"
          ;;
        Alpha)
          ev4_HELP="Alpha EV4 (21064)"
@@ -127,6 +129,9 @@
          v9_HELP="V9 SPARC"
          ultrasparc_HELP="ULTRASPARC"
          ;;
+       x86_64)
+         x86_64_HELP="x86_64"
+         ;;
      esac
      ;;
 
@@ -154,7 +159,7 @@
    xtra)
      # do NOT change the next line unless you too smart
      CPUINFO=$(echo "`grep flags /proc/cpuinfo` ")
-     for EXT in mmx sse sse2 3dnow altivec ; do
+     for EXT in mmx sse sse2 pni 3dnow altivec ; do
        if echo $CPUINFO | grep -q " $EXT " ; then
          FLAGS="$FLAGS $EXT"
        fi
@@ -164,6 +169,7 @@
      MMX_HELP="Multi-Media instruction code eXtensions"
      SSE_HELP="Streaming SIMD (Single Instruction, Multiple Data) Extensions"
      SSE2_HELP="Streaming SIMD (Single Instruction, Multiple Data) Extensions v2"
+     SSE3_HELP="Streaming SIMD (Single Instruction, Multiple Data) Extensions v3"
      dnow_HELP="3dnow"
      Altivec_HELP="Enables Altivec"
      unset CPUINFO EXT FLAGS
@@ -230,7 +236,8 @@
       OPTIONS=( "x86"     "Intel, AMD, and clones"  $( [ "$PLATFORM" == "x86" ] && echo "on" || echo "off" )      "$x86_HELP"
                 "Alpha"   "Compaq Alpha"            $( [ "$PLATFORM" == "Alpha" ] && echo "on" || echo "off" )    "$Alpha_HELP"
                 "PowerPC" "PowerPC"                 $( [ "$PLATFORM" == "PowerPC" ] && echo "on" || echo "off" )  "$PowerPC_HELP"
-                "SPARC"   "Sun SPARC"               $( [ "$PLATFORM" == "SPARC" ] && echo "on" || echo "off" )    "$SPARC_HELP" )
+                "SPARC"   "Sun SPARC"               $( [ "$PLATFORM" == "SPARC" ] && echo "on" || echo "off" )    "$SPARC_HELP"
+                "x86_64"   "AMD64/EM64T"            $( [ "$PLATFORM" == "x86_64" ] && echo "on" || echo "off" )    "$x86_64_HELP" )
       ;;
     bopt)
       OPTIONS=( "None"     "-O0"   $( [ "$BOPT" == "None" ] && echo "on" || echo "off" )    "$None_HELP"
@@ -257,7 +264,8 @@
                    "AthlonTBird" "AthlonTBird"  $( [ "$CPU" == "AthlonTBird" ] && echo "on" || echo "off" ) "$AthlonTBird_HELP"
                    "Athlon4"     "Athlon4"      $( [ "$CPU" == "Athlon4" ] && echo "on" || echo "off" )     "$Athlon4_HELP"
                    "AthlonXP"    "AthlonXP"     $( [ "$CPU" == "AthlonXP" ] && echo "on" || echo "off" )    "$AthlonXP_HELP"
-                   "AthlonMP"    "AthlonMP"     $( [ "$CPU" == "AthlonMP" ] && echo "on" || echo "off" )    "$AthlonMP_HELP" )
+                   "AthlonMP"    "AthlonMP"     $( [ "$CPU" == "AthlonMP" ] && echo "on" || echo "off" )    "$AthlonMP_HELP"
+		    "Athlon64"    "Athlon64"     $( [ "$CPU" == "Athlon64" ] && echo "on" || echo "off" )    "$Athlon64_HELP" )
          ;;
 
        Alpha)
@@ -315,6 +323,9 @@
                    "v9"           "v9"           $( [ "$CPU" == "v9" ] && echo "on" || echo "off" )           "$v9_HELP"
                    "ultrasparc"   "ultrasparc"   $( [ "$CPU" == "ultrasparc" ] && echo "on" || echo "off" )   "$ultrasparc_HELP" )
          ;;
+       x86_64)
+         OPTIONS=( "x86_64"       "x86_64"        $( [ "$CPU" == "x86_64" ] && echo "on" || echo "off" ) "$x86_64_HELP" )
+         ;; 
      esac
      ;;
    spd)
@@ -346,6 +357,9 @@
 	 if grep -qw sse2 /proc/cpuinfo ; then
            OPTIONS=( ${OPTIONS[@]} "SSE2"    "SSE2"    $( echo ${XTRA[@]} | grep -q "SSE2" && echo "on" || echo "off" )     "$SSE2_HELP" )
 	 fi
+	 if grep -qw pni /proc/cpuinfo ; then
+           OPTIONS=( ${OPTIONS[@]} "SSE3"    "SSE3"    $( echo ${XTRA[@]} | grep -q "SSE3" && echo "on" || echo "off" )     "$SSE3_HELP" )
+	 fi	 
 	 if grep -qw 3dnow /proc/cpuinfo ; then
            OPTIONS=( ${OPTIONS[@]} "dnow"    "3dnow"   $( echo ${XTRA[@]} | grep -q "dnow" && echo "on" || echo "off" )     "$dnow_HELP" )
 	 fi

Modified: lunar/branches/stable/var/lib/lunar/plugins/download-generic.plugin
===================================================================
--- lunar/branches/stable/var/lib/lunar/plugins/download-generic.plugin	2006-01-02 04:23:44 UTC (rev 17880)
+++ lunar/branches/stable/var/lib/lunar/plugins/download-generic.plugin	2006-01-02 05:45:26 UTC (rev 17881)
@@ -46,7 +46,7 @@
     WGET_RATE="--limit-rate=${DOWNLOAD_RATE}"
   fi
 
-  WGET_RETRIES="--tries=${WGET_NUM_RETRY:=5}"
+  WGET_RETRIES="--tries=${NUM_RETRY:=5}"
 
   [ -n "$http_proxy" ] && export http_proxy=$http_proxy
   [ -n  "$ftp_proxy" ] && export  ftp_proxy=$ftp_proxy



More information about the Lunar-commits mailing list