]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/commitdiff
Pakfire Update.
authorms <ms@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Sun, 5 Aug 2007 17:15:33 +0000 (17:15 +0000)
committerms <ms@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Sun, 5 Aug 2007 17:15:33 +0000 (17:15 +0000)
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@733 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8

lfs/capi4k-utils
lfs/perl-GD [moved from lfs/GD with 100% similarity]
make.sh
src/initscripts/init.d/beep [new file with mode: 0644]
src/ipp2p/ipt_ipp2p.c
src/pakfire/lib/functions.pl
src/pakfire/pakfire

index 6519bab6588e012e975e71a2e9f205a8223654c7..3e0808cf1961dbbfc35fc6ffe6e6527846548e54 100644 (file)
@@ -28,6 +28,8 @@ include Config
 
 VER        = 2005-07-18
 
+PPPVER = 2.4.4
+
 THISAPP    = capi4k-utils-$(VER)
 DL_FILE    = $(THISAPP).tar.gz
 DL_FROM    = $(URL_IPFIRE)
@@ -81,8 +83,8 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        cd $(DIR_APP)/capi20 && SED=sed ./configure
        cd $(DIR_APP)/capi20 && SED=sed make $(MAKETUNING)
        cd $(DIR_APP)/capi20 && make install
-       PPPVER=2.4.4 && \
-                cd $(DIR_APP)/pppdcapiplugin && PPPVERSIONS="$$PPPVER" make && PPPVERSIONS="$$PPPVER" make install
+       cd $(DIR_APP)/pppdcapiplugin && ln -sf ppp-2.4.3 ppp-$(PPPVER)
+       cd $(DIR_APP)/pppdcapiplugin && PPPVERSIONS="$(PPPVER)" make && PPPVERSIONS="$(PPPVER)" make install
        cd $(DIR_APP)/capiinfo && ./configure
        cd $(DIR_APP)/capiinfo && make $(MAKETUNING)
        cd $(DIR_APP)/capiinfo && make install
similarity index 100%
rename from lfs/GD
rename to lfs/perl-GD
diff --git a/make.sh b/make.sh
index fabbe591b9817b473d8820b5d23efa511194fd45..f1ab85601379b44b28150eea44942986161c0093 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -394,7 +394,7 @@ buildipfire() {
   ipfiremake ethtool
   ipfiremake ez-ipupdate
   ipfiremake fcron
-  ipfiremake GD
+  ipfiremake perl-GD
   ipfiremake GD-Graph
   ipfiremake GD-TextUtil
   ipfiremake gnupg
diff --git a/src/initscripts/init.d/beep b/src/initscripts/init.d/beep
new file mode 100644 (file)
index 0000000..971605f
--- /dev/null
@@ -0,0 +1,46 @@
+#!/bin/sh
+########################################################################
+# Begin $rc_base/init.d/beep
+#
+# Description : Plays a short melody when system goes up or down
+#
+# Authors     : Michael Tremer - mitch@ipfire.org
+#
+# Version     : 01.00
+#
+# Notes       :
+#
+########################################################################
+
+. /etc/sysconfig/rc
+. ${rc_functions}
+
+LENGTH=80
+
+play () {
+
+       beep -l $LENGTH -f $1
+
+}
+
+case "${1}" in
+       start)
+               for i in 440 466 494 523 554 587 622 659 698 740 764 831 880; do
+                       play $i
+               done
+               
+               ;;
+
+       stop)
+               for i in 880 831 764 740 698 659 622 587 554 532 494 466 440; do
+                       play $i
+               done
+               ;;
+
+       *)
+               echo "Usage: ${0} {start|stop}"
+               exit 1
+               ;;
+esac
+
+# End $rc_base/init.d/beep
index 29f6e7a429224252aff1a6ae3acbb1d8d867f871..38869cdfb8b2475fa88ef5a4f3bb04d63d993281 100644 (file)
@@ -831,7 +831,9 @@ checkentry(const char *tablename,
            const struct ipt_ip *ip,
 #endif
           void *matchinfo,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,21)
           unsigned int matchsize,
+#endif
           unsigned int hook_mask)
 {
         /* Must specify -p tcp */
@@ -880,12 +882,20 @@ static struct ipt_match ipp2p_match = {
 static int __init init(void)
 {
     printk(KERN_INFO "IPP2P v%s loading\n", IPP2P_VERSION);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,21)
+    return xt_register_match(&ipp2p_match);
+#else
     return ipt_register_match(&ipp2p_match);
+#endif
 }
        
 static void __exit fini(void)
 {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,21)
+    xt_unregister_match(&ipp2p_match);
+#else
     ipt_unregister_match(&ipp2p_match);
+#endif
     printk(KERN_INFO "IPP2P v%s unloaded\n", IPP2P_VERSION);    
 }
        
index 95d9cf895fe9d430381d86b39bddcc272ea33402..46297ccb3509e1e2f3e94ac737fff10ac8d3002a 100644 (file)
@@ -214,8 +214,19 @@ sub getmirrors {
 
        logger("MIRROR: Trying to get a mirror list.");
        
-       fetchfile("$Conf::version/lists/server-list.db", "$Conf::mainserver");
-       move("$Conf::cachedir/server-list.db", "$Conf::dbdir/lists/server-list.db");
+       if ( -e "$Conf::dbdir/lists/server_list.db" ) {
+               my @stat = stat("$Conf::dbdir/lists/server_list.db");
+               my $time = time();
+               $age = $time - $stat[9];
+       } else {
+               # Force an update.
+               $age = "86401";
+       }
+       
+       if ("$age" gt "86400") {
+               fetchfile("$Conf::version/lists/server-list.db", "$Conf::mainserver");
+               move("$Conf::cachedir/server-list.db", "$Conf::dbdir/lists/server-list.db");
+       }
 }
 
 sub selectmirror {
@@ -346,7 +357,12 @@ sub dblist {
                                        if ("$forweb" eq "forweb") {
                                                print "<option value=\"$name\">Update: $name -- Version: $version -> $templine[1] -- Release: $release -> $templine[2]</option>\n";
                                        } else {
-                                               print "Update: $name\nVersion: $version -> $templine[1]\nRelease: $release -> $templine[2]\n\n";
+                                               my $command = "Update: $name\nVersion: $version -> $templine[1]\nRelease: $release -> $templine[2]\n";
+                                               if ("$Pakfire::enable_colors" eq "1") {
+                                                       print "$color{'lila'}$command$color{'normal'}\n";
+                                               } else {
+                                                       print "$command\n";
+                                               }
                                        }
                                }
                        }
@@ -354,9 +370,13 @@ sub dblist {
                return @updatepaks;
        } else {
                my $line;
+               my $use_color;
                my @templine;
+               my $count;
                foreach $line (sort @db) {
                        next unless ($line =~ /.*;.*;.*;/ );
+                       $use_color = "";
+                       $count++;
                        @templine = split(/\;/,$line);
                        if ("$filter" eq "notinstalled") {
                                next if ( -e "$Conf::dbdir/installed/meta-$templine[0]" );
@@ -366,9 +386,17 @@ sub dblist {
                        if ("$forweb" eq "forweb") {
                                print "<option value=\"$templine[0]\">$templine[0]-$templine[1]-$templine[2]</option>\n";
                        } else {
-                               print "Name: $templine[0]\nProgVersion: $templine[1]\nRelease: $templine[2]\n\n";
+                               if ("$Pakfire::enable_colors" eq "1") {
+                                       if (&isinstalled("$templine[0]")) {
+                                               $use_color = "$color{'red'}" 
+                                       } else {
+                                               $use_color = "$color{'green'}"
+                                       }
+                               }
+                               print "${use_color}Name: $templine[0]\nProgVersion: $templine[1]\nRelease: $templine[2]$color{'normal'}\n\n";
                        }
                }
+               print "$count packages total.\n" unless ("$forweb" eq "forweb");
        }
 }
 
index 7ab6f7395c5f2767fea44e4618922b78f7576cd9..750e6e00b3bc5b3b649ee104061d34f77cf652ae 100644 (file)
                
                my @paks;
                my $pak;
-               
                foreach $pak (@ARGV) {
                        unless ("$pak" =~ "^-") {
                                $return = &Pakfire::isinstalled($pak);
                                        &Pakfire::message("PAKFIRE WARN: $pak is not installed");
                                        next;
                                }
-                       
                                push(@paks, $pak);
-                       
                        }
                }
                
        
        
        } elsif ("$ARGV[0]" eq "update") {
-               my $force = "noforce";
                &Pakfire::makeuuid();
                &Pakfire::senduuid();
                &Pakfire::getmirrors();
-               $force = "force" if ("$ARGV[1]" eq "--force");
-               &Pakfire::dbgetlist("$force");
-               
-       
+               &Pakfire::dbgetlist("force");
+
        } elsif ("$ARGV[0]" eq "upgrade") {
                my @upgradepaks = &Pakfire::dblist("upgrade", "noweb");
                my @temp;
                }
                
        } elsif ("$ARGV[0]" eq "list") {
-               &Pakfire::dblist("all", "noweb");
+               if ("$ARGV[1]" =~ /installed|notinstalled/) {
+                       &Pakfire::dblist("$ARGV[1]", "noweb");
+               } else {
+                       &Pakfire::message("PAKFIRE WARN: Not a known option $ARGV[1]") if ($ARGV[1]); 
+                       &Pakfire::dblist("all", "noweb");
+               }
                
        } elsif ("$ARGV[0]" eq "resolvedeps") {
                foreach (@ARGV) {