]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
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 6c13fe6f82c79efcf658dd3eecfdb2f30d5f7ecc..a540b09591bc76a5123169737ba8de386529d98c 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 3dcde8b5760a92f7b5f0afff735956418952c251..e0f267ff65d6163ff0e0525085c6f5a56490969f 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 e3162072cd4d13357d9c595437048f1521eae294..6e416f915c65667bd7b7e79e60c855892389cd0c 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 a2a79a3ab3409645b7c9c0b7594b0e1b899cd366..8b809b2b7acff62e20c14f1d24871181b9638e21 100644 (file)
@@ -1,6 +1,5 @@
 Name: NAME
-FullName: NAME
-Version: VER
+ProgVersion: VER
 Release: RELEASE
 Size: SIZE
 Dependencies: DEPS
index 5c5dd6b38ffe0f486733fc20da67ce84e3d634c3..0deb6562c77405039764b222611c7bf069f24ab2 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 26356a498e6cccbc9afec645e6bfa5fe87bfbf55..ae4eb4d65250587f089cc724d9acc6644049a468 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 acb436b73b1d6947f51dae7aec488b6b83393668..19f189195728a646f66e620d0d13f90404994036 100644 (file)
@@ -1 +1,3 @@
+#!/bin/bash
+
 rm -rf /etc/rc.d/rc*.d/*alsa
index e3992d3198622861509b9d3d9ce12fd6254f01da..f2f4be4f4514df0410c7c3a88b19f33eed36d1fa 100644 (file)
@@ -1,3 +1,6 @@
-tar xvfj files.tbz2 -C /
+#!/bin/bash
+. /opt/pakfire/lib/functions.sh
+
+extract_files
 
 clamavctrl enable
index 650ea36ca85b7b0a6b1f83b6107686c4d8cd9c29..910f0892736f2c142334c614222b8da0c40455af 100644 (file)
@@ -1 +1,3 @@
+#!/bin/bash
+
 clamavctrl disable
index ace14baf9c3608b672e13cdeff5a230742498788..a47a7831dc62dba77d122eb1f06347e98cb65ff9 100644 (file)
@@ -1 +1,4 @@
-tar xvfj files.tbz2 -C /
+#!/bin/bash
+. /opt/pakfire/lib/functions.sh
+
+extract_files
index ace14baf9c3608b672e13cdeff5a230742498788..a47a7831dc62dba77d122eb1f06347e98cb65ff9 100644 (file)
@@ -1 +1,4 @@
-tar xvfj files.tbz2 -C /
+#!/bin/bash
+. /opt/pakfire/lib/functions.sh
+
+extract_files
index ace14baf9c3608b672e13cdeff5a230742498788..a47a7831dc62dba77d122eb1f06347e98cb65ff9 100644 (file)
@@ -1 +1,4 @@
-tar xvfj files.tbz2 -C /
+#!/bin/bash
+. /opt/pakfire/lib/functions.sh
+
+extract_files
index ace14baf9c3608b672e13cdeff5a230742498788..a47a7831dc62dba77d122eb1f06347e98cb65ff9 100644 (file)
@@ -1 +1,4 @@
-tar xvfj files.tbz2 -C /
+#!/bin/bash
+. /opt/pakfire/lib/functions.sh
+
+extract_files
index ace14baf9c3608b672e13cdeff5a230742498788..a47a7831dc62dba77d122eb1f06347e98cb65ff9 100644 (file)
@@ -1 +1,4 @@
-tar xvfj files.tbz2 -C /
+#!/bin/bash
+. /opt/pakfire/lib/functions.sh
+
+extract_files
index ace14baf9c3608b672e13cdeff5a230742498788..a47a7831dc62dba77d122eb1f06347e98cb65ff9 100644 (file)
@@ -1 +1,4 @@
-tar xvfj files.tbz2 -C /
+#!/bin/bash
+. /opt/pakfire/lib/functions.sh
+
+extract_files
index ace14baf9c3608b672e13cdeff5a230742498788..a47a7831dc62dba77d122eb1f06347e98cb65ff9 100644 (file)
@@ -1 +1,4 @@
-tar xvfj files.tbz2 -C /
+#!/bin/bash
+. /opt/pakfire/lib/functions.sh
+
+extract_files
index ace14baf9c3608b672e13cdeff5a230742498788..a47a7831dc62dba77d122eb1f06347e98cb65ff9 100644 (file)
@@ -1 +1,4 @@
-tar xvfj files.tbz2 -C /
+#!/bin/bash
+. /opt/pakfire/lib/functions.sh
+
+extract_files
index ace14baf9c3608b672e13cdeff5a230742498788..a47a7831dc62dba77d122eb1f06347e98cb65ff9 100644 (file)
@@ -1 +1,4 @@
-tar xvfj files.tbz2 -C /
+#!/bin/bash
+. /opt/pakfire/lib/functions.sh
+
+extract_files
index ace14baf9c3608b672e13cdeff5a230742498788..a47a7831dc62dba77d122eb1f06347e98cb65ff9 100644 (file)
@@ -1 +1,4 @@
-tar xvfj files.tbz2 -C /
+#!/bin/bash
+. /opt/pakfire/lib/functions.sh
+
+extract_files
index 70553f14db1d7ebed1e0f9cd62b1f1c95d905f78..b71bf5283dd29d587b7f038487c8caea5141cc66 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()