- update TODO Entropy/entropyConstants: - say goodbye to etpRSSMessages - other cosmetical fixes Entropy/EquoInterface: - close LogFile instance's file on instance delete - wipe os.system() calls - rewrite get_meant_packages() to use SOUNDEX features of SQLITE3 - replace old and slow filterSatisfiedDependencies with get_unsatisfied_dependencies, which is faster and more reliable (added NEEDED check by default) - improve speed of generate_dependency_tree - improve speed of get_required_packages - fix get_world_update_cache_hash() - improve speed of retrieveInstallQueue - make __unpack_package reporting the right error on uncompressTarBz2 if this crashes - remove Python 2.4/2.5 workarounds since they are not needed anymore, being entropyTools.uncompressTarBz2 fixed forever (handling UTF-8 filenames correctly) - adjust __move_image_to_system for the changes above - __move_image_to_system, if an error is caught on shutil.move, do not crash but report it to user instead Entropy/TriggerInterface: - replace os.system() with subprocess.call() - remove unused nspluginwrapper trigger Entropy/ErrorReportInterface: - add locale output - get the full content of ps auxf, not just the first 80 chars - update handler accordingly (handlers/) Entropy/LogFile: - close log file on object deletion Entropy: - import subprocess by default Entropy/EntropyDatabaseInterface: - remove etpRSSMessages and use a ServerInterface variable instead - add new method getVersioningData, useful to speed up other Entropy areas - improving speed of other functions adding more one-liners conditionals - add new method retrieveNeededRaw, useful to speed up other Entropy areas - improve speed of retrieveDependenciesList, everything can be done at SQL level - new method searchSimilarPackages that uses SOUNDEX to retrieve similar package/atom names - improve speed of listAllCategories - shrink databaseStructureUpdates - remove old and dusted method - improve speed of doDatabaseImport - improve speed of database_checksum - group multiple .cursor.execute using .cursor.executescript - improve speed of __filterSlotTagUse Entropy/entropyTools: - improve speed and reliability of uncompressTarBz2 git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2818 cd1c1023-2f26-0410-ae45-c471fc1f0318
65 lines
2.4 KiB
PHP
65 lines
2.4 KiB
PHP
<?php
|
|
|
|
function insert_attachment($data,$boundary,$filename,$id) {
|
|
|
|
$mymessage = "\n\n--".$boundary."\n";
|
|
$mymessage .= "Content-Type: application/octet-stream; name=\"".$filename."\"\n";
|
|
$mymessage .= "Content-Transfer-Encoding: base64\n";
|
|
$mymessage .= "X-Attachment-Id: ".$id."\n";
|
|
$mymessage .= "Content-Disposition: attachment; filename=\"".$filename."\"\n\n";
|
|
$mymessage .= chunk_split(base64_encode($data));
|
|
$mymessage .= "\n\n";
|
|
return $mymessage;
|
|
|
|
}
|
|
|
|
$arch = $_POST['arch'];
|
|
$ip = $_SERVER['REMOTE_ADDR'];
|
|
$version = $_POST['version'];
|
|
$system_version = $_POST['system_version'];
|
|
$name = $_POST['name'];
|
|
$email = $_POST['email'];
|
|
$description = $_POST['description'];
|
|
$mail = "lxnay@sabayonlinux.org";
|
|
$subject = "Entropy Error Reporting Handler";
|
|
$random_hash = md5(date('r', time()));
|
|
|
|
$headers = "MIME-Version: 1.0\n";
|
|
$boundary = "PHP-mixed-".$random_hash;
|
|
$headers .= "Content-Type: multipart/mixed; boundary=\"".$boundary."\"\n";
|
|
if ($email) {
|
|
$headers .= "From: ".$email."\nReply-To: ".$email."\n\n";
|
|
} else {
|
|
$headers .= "From: www-data@sabayonlinux.org\nReply-To: www-data@sabayonlinux.org\n\n";
|
|
}
|
|
|
|
$message = "--".$boundary."\n";
|
|
$message .= "Content-Type: text/plain; charset=\"iso-8859-1\"\n";
|
|
$message .= "Content-Transfer-Encoding: 7bit\n\n";
|
|
|
|
$message .= "Hello, this is an Entropy error report.\n\n";
|
|
$message .= $_POST['stacktrace'];
|
|
$message .= "Architecture: " . $arch . "\n";
|
|
$message .= "Arguments: " . $_POST['arguments'] . "\n";
|
|
$message .= "UID: " . $_POST['uid'] . "\n";
|
|
$message .= 'Name: ' . $name . "\n";
|
|
$message .= 'E-mail: ' . $email . "\n";
|
|
$message .= 'Description: ' . $description . "\n";
|
|
$message .= 'Version: ' . $version . "\n";
|
|
$message .= 'System Version: ' . $system_version . "\n";
|
|
$message .= 'IP: ' . $ip . "\n";
|
|
$message .= 'Date: ' . date("G:i d/F/Y") . "\n";
|
|
|
|
$message .= insert_attachment($_POST['errordata'],$boundary,'errordata.txt',0.1);
|
|
$message .= insert_attachment($_POST['processes'],$boundary,'processes.txt',0.2);
|
|
$message .= insert_attachment($_POST['lspci'],$boundary,'lspci.txt',0.3);
|
|
$message .= insert_attachment($_POST['dmesg'],$boundary,'dmesg.txt',0.4);
|
|
$message .= insert_attachment($_POST['locale'],$boundary,'locale.txt',0.5);
|
|
|
|
$message .= "--".$boundary."--\n";
|
|
|
|
if ($_POST['stacktrace'] && $_POST['arch'] && $ip) {
|
|
$rc = mail($mail, $subject, $message, $headers);
|
|
print_r($rc);
|
|
}
|
|
?>
|