Apply apt-0.5.15cnc5-alt-gpg-homedir.patch

Added in commit e97a90d:
0.5.15lorg2-alt3

- Resolved a few issues introduced after cnc6.
This commit is contained in:
Gleb Fotengauer-Malinovskiy 2014-05-16 21:04:21 +04:00
parent 7be75b2c02
commit 0c1ecbb7bc
2 changed files with 5 additions and 40 deletions

View File

@ -1,34 +0,0 @@
diff -uprk.orig apt-0.5.15cnc5.orig/methods/gpg.cc apt-0.5.15cnc5/methods/gpg.cc
--- apt-0.5.15cnc5.orig/methods/gpg.cc 2003-12-23 23:24:04 +0300
+++ apt-0.5.15cnc5/methods/gpg.cc 2004-01-16 15:23:02 +0300
@@ -196,7 +196,7 @@ char *getFileSigner(const char *file, co
else if (pid == 0)
{
string path = _config->Find("Dir::Bin::gpg", "/usr/bin/gpg");
- string pubring = "";
+ string homedir = "";
const char *argv[16];
int argc = 0;
@@ -207,17 +207,16 @@ char *getFileSigner(const char *file, co
dup2(fd[1], STDERR_FILENO);
unsetenv("LANG");
+ unsetenv("LANGUAGE");
unsetenv("LC_ALL");
unsetenv("LC_MESSAGES");
+ unsetenv("LC_CTYPE");
argv[argc++] = "gpg";
argv[argc++] = "--batch";
argv[argc++] = "--no-secmem-warning";
- pubring = _config->Find("APT::GPG::Pubring");
- if (pubring.empty() == false)
- {
- argv[argc++] = "--keyring"; argv[argc++] = pubring.c_str();
- }
+ homedir = _config->Find("APT::GPG::Homedir", "/usr/lib/alt-gpgkeys");
+ argv[argc++] = "--homedir"; argv[argc++] = homedir.c_str();
argv[argc++] = "--status-fd"; argv[argc++] = "2";
if (outfile != NULL)

View File

@ -196,7 +196,7 @@ char *getFileSigner(const char *file, const char *sigfile,
else if (pid == 0)
{
string path = _config->Find("Dir::Bin::gpg", "/usr/bin/gpg");
string pubring = "";
string homedir = "";
const char *argv[16];
int argc = 0;
@ -207,17 +207,16 @@ char *getFileSigner(const char *file, const char *sigfile,
dup2(fd[1], STDERR_FILENO);
unsetenv("LANG");
unsetenv("LANGUAGE");
unsetenv("LC_ALL");
unsetenv("LC_MESSAGES");
unsetenv("LC_CTYPE");
argv[argc++] = "gpg";
argv[argc++] = "--batch";
argv[argc++] = "--no-secmem-warning";
pubring = _config->Find("APT::GPG::Pubring");
if (pubring.empty() == false)
{
argv[argc++] = "--keyring"; argv[argc++] = pubring.c_str();
}
homedir = _config->Find("APT::GPG::Homedir", "/usr/lib/alt-gpgkeys");
argv[argc++] = "--homedir"; argv[argc++] = homedir.c_str();
argv[argc++] = "--status-fd"; argv[argc++] = "2";
if (outfile != NULL)