In den Pakfire nun auch das neuen Paketformat uebernommen.
authorms <ms@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Wed, 20 Jun 2007 22:48:45 +0000 (22:48 +0000)
committerms <ms@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Wed, 20 Jun 2007 22:48:45 +0000 (22:48 +0000)
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@642 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8

21 files changed:
config/rootfiles/ver_full/pakfire
lfs/pakfire
src/pakfire/lib/functions.pl
src/pakfire/lib/functions.sh [new file with mode: 0644]
src/pakfire/meta
src/pakfire/pakfire
src/paks/alsa/install.sh
src/paks/alsa/uninstall.sh
src/paks/clamav/install.sh
src/paks/clamav/uninstall.sh
src/paks/cups/install.sh
src/paks/cyrus-sasl/install.sh
src/paks/libogg/install.sh
src/paks/libvorbis/install.sh
src/paks/mp3blaster/install.sh
src/paks/mpg123/install.sh
src/paks/openldap/install.sh
src/paks/samba/install.sh
src/paks/tripwire/install.sh
src/paks/vsftpd/install.sh
tools/make_pkg_list.py

index 6c13fe6..a540b09 100644 (file)
@@ -1,6 +1,7 @@
 #opt/pakfire
 opt/pakfire/cache
 #opt/pakfire/db
+opt/pakfire/db/installed
 opt/pakfire/db/lists
 opt/pakfire/db/meta
 opt/pakfire/db/rootfiles
@@ -8,6 +9,7 @@ opt/pakfire/db/rootfiles
 opt/pakfire/etc/pakfire.conf
 #opt/pakfire/lib
 opt/pakfire/lib/functions.pl
+opt/pakfire/lib/functions.sh
 opt/pakfire/logs
 #opt/pakfire/meta
 opt/pakfire/pakfire
index 3dcde8b..e0f267f 100644 (file)
@@ -51,7 +51,7 @@ md5 :
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
        @rm -rf $(DIR_APP)
-       -mkdir -p /opt/pakfire/{cache,db/{meta,lists,rootfiles},etc,lib,logs,tmp}
+       -mkdir -p /opt/pakfire/{cache,db/{meta,lists,rootfiles,installed},etc,lib,logs,tmp}
        cp -fRv $(DIR_SRC)/src/pakfire/* $(DIR_APP)
        mv -vf $(DIR_APP)/pakfire.conf $(DIR_APP)/etc/
        chown root.root $(DIR_APP) -R
index e316207..6e416f9 100644 (file)
@@ -204,7 +204,7 @@ sub dblist {
                if ("$forweb" eq "forweb") {
                        print "<option value=\"$templine[0]\">$templine[0]-$templine[1]-$templine[2]</option>\n";
                } else {
-                       print "Name: $templine[0]\nVersion: $templine[1]\nRelease: $templine[2]\n\n";
+                       print "Name: $templine[0]\nProgVersion: $templine[1]\nRelease: $templine[2]\n\n";
                }
        }
 }
@@ -335,10 +335,10 @@ sub decryptpak {
        
        my $file = getpak("$pak", "noforce");
        
-       my $return = system("gpg -d < $Conf::cachedir/$file | tar xj -C $Conf::tmpdir/");
+       my $return = system("cd $Conf::tmpdir/ && gpg -d < $Conf::cachedir/$file | cpio -i >/dev/null 2>&1");
        
        logger("Decryption process returned the following: $return");
-       if ($return != 1) { exit 1; }
+       if ($return != 0) { exit 1; }
 }
 
 sub getpak {
@@ -385,6 +385,7 @@ sub setuppak {
        decryptpak("$pak");
        
        my $return = system("cd $Conf::tmpdir && ./install.sh >> $Conf::logdir/install-$pak.log 2>&1");
+       $return %= 255;
        if ($return == 0) {
          move("$Conf::tmpdir/ROOTFILES", "$Conf::dbdir/rootfiles/$pak");
          cleanup("tmp");
@@ -499,4 +500,15 @@ sub lock {
        return 0;
 }
 
+sub checkcryptodb {
+       my $myid = "64D96617"; # Our own gpg-key
+       my $trustid = "65D0FD58"; # Id of CaCert
+       my $ret = system("gpg --list-keys | grep -q $myid");
+       unless ( "$ret" eq "0" ) {
+               message("The GnuPG isn't configured corectly. Trying now to fix this.");
+               system("gpg --keyserver wwwkeys.de.pgp.net --always-trust --recv-key $myid");
+               system("gpg --keyserver wwwkeys.de.pgp.net --always-trust --recv-key $trustid");
+       }
+}
+
 1;
diff --git a/src/pakfire/lib/functions.sh b/src/pakfire/lib/functions.sh
new file mode 100644 (file)
index 0000000..3a45962
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+extract_files() {
+       echo "Extracting files..."
+       cd / && cpio -i < /opt/pakfire/tmp/files
+       
+}
index a2a79a3..8b809b2 100644 (file)
@@ -1,6 +1,5 @@
 Name: NAME
-FullName: NAME
-Version: VER
+ProgVersion: VER
 Release: RELEASE
 Size: SIZE
 Dependencies: DEPS
index 5c5dd6b..0deb656 100644 (file)
@@ -5,6 +5,7 @@
        my $interactive = 1;
        
        &Pakfire::logger("### IPFire Pakfire $Conf::version started!");
+       &Pakfire::checkcryptodb;
 
        ### Check if we are running as root
        #
index 26356a4..ae4eb4d 100644 (file)
@@ -1,4 +1,8 @@
-tar xvfj files.tbz2 -C /
+#!/bin/bash
+. /opt/pakfire/lib/functions.sh
+
+extract_files
+
 touch /etc/asound.state
 ln -sf  ../init.d/alsa /etc/rc.d/rc0.d/K35alsa
 ln -sf  ../init.d/alsa /etc/rc.d/rc6.d/K35alsa
index acb436b..19f1891 100644 (file)
@@ -1 +1,3 @@
+#!/bin/bash
+
 rm -rf /etc/rc.d/rc*.d/*alsa
index e3992d3..f2f4be4 100644 (file)
@@ -1,3 +1,6 @@
-tar xvfj files.tbz2 -C /
+#!/bin/bash
+. /opt/pakfire/lib/functions.sh
+
+extract_files
 
 clamavctrl enable
index 650ea36..910f089 100644 (file)
@@ -1 +1,3 @@
+#!/bin/bash
+
 clamavctrl disable
index ace14ba..a47a783 100644 (file)
@@ -1 +1,4 @@
-tar xvfj files.tbz2 -C /
+#!/bin/bash
+. /opt/pakfire/lib/functions.sh
+
+extract_files
index ace14ba..a47a783 100644 (file)
@@ -1 +1,4 @@
-tar xvfj files.tbz2 -C /
+#!/bin/bash
+. /opt/pakfire/lib/functions.sh
+
+extract_files
index ace14ba..a47a783 100644 (file)
@@ -1 +1,4 @@
-tar xvfj files.tbz2 -C /
+#!/bin/bash
+. /opt/pakfire/lib/functions.sh
+
+extract_files
index ace14ba..a47a783 100644 (file)
@@ -1 +1,4 @@
-tar xvfj files.tbz2 -C /
+#!/bin/bash
+. /opt/pakfire/lib/functions.sh
+
+extract_files
index ace14ba..a47a783 100644 (file)
@@ -1 +1,4 @@
-tar xvfj files.tbz2 -C /
+#!/bin/bash
+. /opt/pakfire/lib/functions.sh
+
+extract_files
index ace14ba..a47a783 100644 (file)
@@ -1 +1,4 @@
-tar xvfj files.tbz2 -C /
+#!/bin/bash
+. /opt/pakfire/lib/functions.sh
+
+extract_files
index ace14ba..a47a783 100644 (file)
@@ -1 +1,4 @@
-tar xvfj files.tbz2 -C /
+#!/bin/bash
+. /opt/pakfire/lib/functions.sh
+
+extract_files
index ace14ba..a47a783 100644 (file)
@@ -1 +1,4 @@
-tar xvfj files.tbz2 -C /
+#!/bin/bash
+. /opt/pakfire/lib/functions.sh
+
+extract_files
index ace14ba..a47a783 100644 (file)
@@ -1 +1,4 @@
-tar xvfj files.tbz2 -C /
+#!/bin/bash
+. /opt/pakfire/lib/functions.sh
+
+extract_files
index ace14ba..a47a783 100644 (file)
@@ -1 +1,4 @@
-tar xvfj files.tbz2 -C /
+#!/bin/bash
+. /opt/pakfire/lib/functions.sh
+
+extract_files
index 70553f1..b71bf52 100644 (file)
@@ -35,15 +35,13 @@ for i in os.listdir(dir):
                i = i.rstrip("\n")
                if i.startswith("Name:"):
                        trash,name = i.split(": ")
-               elif i.startswith("Version:"):
+               elif i.startswith("ProgVersion:"):
                        trash,ver = i.split(": ")
                elif i.startswith("Release:"):
                        trash,rel = i.split(": ")
-               elif i.startswith("Size:"):
-                       trash,size = i.split(": ")
                
        src.close()
        
-       dst.write(name+";"+ ver +";"+ rel +";"+ size +";\n")
+       dst.write(name+";"+ ver +";"+ rel +";\n")
 
 dst.close()