Your message dated Thu, 18 Aug 2005 16:56:11 -0400
with message-id <[EMAIL PROTECTED]>
and subject line Bug#313188: approx: does not support Packages.bz2 files
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 12 Jun 2005 11:27:04 +0000
>From [EMAIL PROTECTED] Sun Jun 12 04:27:04 2005
Return-path: <[EMAIL PROTECTED]>
Received: from vsmtp12.tin.it [212.216.176.206] 
        by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
        id 1DhQcK-0006ie-00; Sun, 12 Jun 2005 04:27:04 -0700
Received: from stanchina.net (82.50.42.53) by vsmtp12.tin.it (7.0.027)
        id 429D6B5600426805 for [EMAIL PROTECTED]; Sun, 12 Jun 2005 13:26:32 
+0200
Message-ID: <[EMAIL PROTECTED]> (added by [EMAIL PROTECTED])
Received: from [192.168.0.2] (forza [::ffff:192.168.0.2])
  by stanchina.net with esmtp; Sun, 12 Jun 2005 13:26:30 +0200
  id 000361FF.42AC1BE6.00004797
Content-Type: multipart/mixed; boundary="===============1933441458=="
MIME-Version: 1.0
From: Flavio Stanchina <[EMAIL PROTECTED]>
To: Debian Bug Tracking System <[EMAIL PROTECTED]>
Subject: approx: does not support Packages.bz2 files
X-Mailer: reportbug 3.8
Date: Sun, 12 Jun 2005 13:27:14 +0200
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-7.3 required=4.0 tests=BAYES_00,HAS_PACKAGE,
        MSGID_FROM_MTA_HEADER autolearn=no 
        version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 

This is a multi-part MIME message sent by reportbug.

--===============1933441458==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Package: approx
Version: 1.15
Severity: normal
Tags: patch

I'm using "secure" apt 0.6, which AFAICS prefers Packages.bz2 files to
the usual Packages.gz files. gc_approx doesn't know about .bz2 files and
thus might completely purge the repository.

This is somewhat related to #310399 -- I think it would indeed be a good
idea to use only the latest Packages(|.gz|.bz2) found in a directory.

Also, while looking at this, I found that approx doesn't know about
Release.gpg files; instead, it looked for Release.gz files which AFAIK
never existed.

A crude patch is attached.


-- System Information:
Debian Release: 3.1
[I'm not writing this from the system I'm running approx on, so I
removed the dependency information. In case it matters, that system is
running sarge plus apt 0.6.]

--===============1933441458==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="approx-bz2.diff"

--- ./approx.ml 2005/06/12 10:31:36     1.1
+++ ./approx.ml 2005/06/12 10:35:09
@@ -91,6 +91,9 @@
   if Filename.check_suffix file_name ".gz" then
     [ "Content-Type", "application/x-gzip";
       "Content-Encoding", "x-gzip" ]
+  else if Filename.check_suffix file_name ".bz2" then
+    [ "Content-Type", "application/x-bzip2";
+      "Content-Encoding", "x-bzip2" ]
   else
     [ "Content-Type", "text/plain" ]
 
--- ./debian/changelog  2005/06/12 10:40:39     1.1
+++ ./debian/changelog  2005/06/12 11:12:09
@@ -1,3 +1,10 @@
+approx (1.15.1) unstable; urgency=low
+
+  * Add support for bzip2'd Packages/Release/Sources files.
+  * gc_approx: Keep "Release.gpg", not "Release.gz" which doesn't exist.
+
+ -- Flavio Stanchina <[EMAIL PROTECTED]>  Sun, 12 Jun 2005 13:01:47 +0200
+
 approx (1.15) unstable; urgency=low
 
   * Build byte-code version on architectures with no ocamlopt
--- ./debian/control    2005/06/12 10:43:02     1.1
+++ ./debian/control    2005/06/12 10:43:42
@@ -9,6 +9,7 @@
 Package: approx
 Architecture: any
 Depends: ${shlibs:Depends}, wget
+Recommends: bzip2
 Description: caching proxy server for Debian archive files
  Approx is an HTTP-based Debian archive server.
  It fetches packages from remote repositories on demand,
--- ./gc_approx.ml      2005/06/12 10:31:36     1.1
+++ ./gc_approx.ml      2005/06/12 11:01:19
@@ -55,7 +55,7 @@
 let find_roots () =
   let find file =
     match Filename.basename file with
-    | "Packages" | "Packages.gz" -> roots := file :: !roots
+    | "Packages" | "Packages.gz" | "Packages.bz2" -> roots := file :: !roots
     | _ -> ()
   in
   Config.iter (fun dir _ -> treewalk find (cache_dir ^/ dir))
@@ -90,9 +90,9 @@
 
 let is_candidate file =
   match Filename.basename file with
-    | "Packages" | "Packages.gz"
-    | "Release" | "Release.gz"
-    | "Sources" | "Sources.gz" ->
+    | "Release"  | "Release.gpg"
+    | "Packages" | "Packages.gz" | "Packages.bz2"
+    | "Sources"  | "Sources.gz"  | "Sources.bz2" ->
        let dist, _ = split_cache_pathname file in
        (try ignore (Config.get dist); false
         with Not_found -> true (* not part of a known distribution *))
--- ./package.ml        2005/06/12 10:31:36     1.1
+++ ./package.ml        2005/06/12 10:38:52
@@ -63,10 +63,24 @@
   Sys.remove tmp;
   chan
 
+let decompress2 file =
+  let tmp = tmp_file () in
+  let cmd = Printf.sprintf "/usr/bin/bunzip2 --stdout %s > %s" file tmp in
+  if Sys.command cmd <> 0 then
+    begin
+      Sys.remove tmp;
+      failwith "decompress2"
+    end;
+  let chan = open_in tmp in
+  Sys.remove tmp;
+  chan
+
 let with_open_file file proc =
   let chan =
     if Filename.check_suffix file ".gz" then
       decompress file
+    else if Filename.check_suffix file ".bz2" then
+      decompress2 file
     else
       open_in file
   in

--===============1933441458==--

---------------------------------------
Received: (at 313188-done) by bugs.debian.org; 18 Aug 2005 20:57:00 +0000
>From [EMAIL PROTECTED] Thu Aug 18 13:57:00 2005
Return-path: <[EMAIL PROTECTED]>
Received: from ux9.sp.cs.cmu.edu [128.2.220.166] 
        by spohr.debian.org with smtp (Exim 3.36 1 (Debian))
        id 1E5rRc-0003eA-00; Thu, 18 Aug 2005 13:57:00 -0700
Received: from c-24-3-154-200.hsd1.pa.comcast.net ([24.3.154.200])
          by ux9.sp.cs.cmu.edu id aa20686; 18 Aug 2005 16:56 EDT
Received: from ecc by stratocaster.home with local (Exim 4.52)
        id 1E5rQp-0001PC-Dx; Thu, 18 Aug 2005 16:56:11 -0400
Date: Thu, 18 Aug 2005 16:56:11 -0400
To: Flavio Stanchina <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
Subject: Re: Bug#313188: approx: does not support Packages.bz2 files
Message-ID: <[EMAIL PROTECTED]>
Mail-Followup-To: Flavio Stanchina <[EMAIL PROTECTED]>,
        [EMAIL PROTECTED]
References: <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <[EMAIL PROTECTED]>
User-Agent: Mutt/1.5.9i
From: Eric Cooper <[EMAIL PROTECTED]>
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
        autolearn=no version=2.60-bugs.debian.org_2005_01_02

Should be fixed in most recent version, along with support for secure APT.

-- 
Eric Cooper             e c c @ c m u . e d u


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to