Package: fai-server
Version: 3.2.14
Severity: normal
Tags: patch

Hi,

fai-mirror uses /etc/apt/ of the host system and overwrites the path to
sources.list only. This will cause fai-mirror to e.g. use the host
system's apt_preferences(5) file which can lead to problems e.g. when
pinning testing/unstable to -1 on the host [1] but creating a testing/
unstable mirror.

The attached patch sets apt's Dir::Etc option to $aptcache/etc/apt which
fixes this issue and allows to specify custom apt configurations to be
used with fai-mirror. As a side-note: this would also allow to create
different mirrors with different configurations each.

Cheers,
Sebastian

[1] This e.g. happens if you have testing/unstable in the sources.list
    but disabled to be able to manually install new versions of arch:all
    packages (which are usually not allowed in backports.org).

-- 
Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/

Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety.         -- Benjamin Franklin

From e0e0e11f7ca0fd084c49d72c31ce213f0a1c9f57 Mon Sep 17 00:00:00 2001
From: Sebastian Harl <[EMAIL PROTECTED]>
Date: Fri, 7 Nov 2008 14:20:08 +0100
Subject: [PATCH] fai-mirror: Set Dir::Etc to $aptcache/etc/apt/.

---
 bin/fai-mirror |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/bin/fai-mirror b/bin/fai-mirror
index 187d504..29656b6 100755
--- a/bin/fai-mirror
+++ b/bin/fai-mirror
@@ -136,7 +136,7 @@ initialize() {
       -o Dir::Cache=$aptcache/var/cache/apt \
       -o Dir::State=$aptcache/var/cache/apt \
       -o Dir::Cache::Archives=$archivedir \
-      -o Dir::Etc::sourcelist=$aptcache/etc/apt/sources.list \
+      -o Dir::Etc=$aptcache/etc/apt/ \
       -o Dir::State::Lists=$aptcache/var/lib/apt/lists/"
 
     # not needed
-- 
1.6.0.3.523.g304d0

Attachment: signature.asc
Description: Digital signature

Reply via email to