In den Pakfire nun auch das neuen Paketformat uebernommen.

git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@642 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
ms
2007-06-20 22:48:45 +00:00
parent 9c1c1c57ea
commit cde0e11690
21 changed files with 82 additions and 22 deletions

View 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

View 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

View 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;

View File

@@ -0,0 +1,7 @@
#!/bin/bash
extract_files() {
echo "Extracting files..."
cd / && cpio -i < /opt/pakfire/tmp/files
}

View File

@@ -1,6 +1,5 @@
Name: NAME
FullName: NAME
Version: VER
ProgVersion: VER
Release: RELEASE
Size: SIZE
Dependencies: DEPS

View File

@@ -5,6 +5,7 @@
my $interactive = 1;
&Pakfire::logger("### IPFire Pakfire $Conf::version started!");
&Pakfire::checkcryptodb;
### Check if we are running as root
#

View 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

View File

@@ -1 +1,3 @@
#!/bin/bash
rm -rf /etc/rc.d/rc*.d/*alsa

View File

@@ -1,3 +1,6 @@
tar xvfj files.tbz2 -C /
#!/bin/bash
. /opt/pakfire/lib/functions.sh
extract_files
clamavctrl enable

View File

@@ -1 +1,3 @@
#!/bin/bash
clamavctrl disable

View File

@@ -1 +1,4 @@
tar xvfj files.tbz2 -C /
#!/bin/bash
. /opt/pakfire/lib/functions.sh
extract_files

View File

@@ -1 +1,4 @@
tar xvfj files.tbz2 -C /
#!/bin/bash
. /opt/pakfire/lib/functions.sh
extract_files

View File

@@ -1 +1,4 @@
tar xvfj files.tbz2 -C /
#!/bin/bash
. /opt/pakfire/lib/functions.sh
extract_files

View File

@@ -1 +1,4 @@
tar xvfj files.tbz2 -C /
#!/bin/bash
. /opt/pakfire/lib/functions.sh
extract_files

View File

@@ -1 +1,4 @@
tar xvfj files.tbz2 -C /
#!/bin/bash
. /opt/pakfire/lib/functions.sh
extract_files

View File

@@ -1 +1,4 @@
tar xvfj files.tbz2 -C /
#!/bin/bash
. /opt/pakfire/lib/functions.sh
extract_files

View File

@@ -1 +1,4 @@
tar xvfj files.tbz2 -C /
#!/bin/bash
. /opt/pakfire/lib/functions.sh
extract_files

View File

@@ -1 +1,4 @@
tar xvfj files.tbz2 -C /
#!/bin/bash
. /opt/pakfire/lib/functions.sh
extract_files

View File

@@ -1 +1,4 @@
tar xvfj files.tbz2 -C /
#!/bin/bash
. /opt/pakfire/lib/functions.sh
extract_files

View File

@@ -1 +1,4 @@
tar xvfj files.tbz2 -C /
#!/bin/bash
. /opt/pakfire/lib/functions.sh
extract_files

View 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()