Re: apt and publicfile's httpd

[email protected] Wed, 27 Oct 2004 12:12:27 -0500
Newsgroups gmane.comp.djb.publicfile
Message-ID <[email protected]>
While in the message below I reported success, I have a weird file
corruption problem during HTTP download from a publicfile httpd
server.  Of course, it is entirely possible that the corruption is
done by the apt-get client---but I do not see how to figure it out.

When I try to use apt-get from my home box (different from the one
where a successful download happened) to get the qmail srpm,
apparently the srpm gets corrupted during the HTTP transfer!

Here is what I see

# apt-get source qmail
Reading Package Lists... Done
Building Dependency Tree... Done
Need to get 343kB of source archives.
Get:1 http://djbware.csi.hu apt/djbware qmail 1.03-111patch_14_15 (srpm) [343kB]
Failed to fetch http://djbware.csi.hu/apt/./SRPMS.djbware/qmail-1.03-111patch_14_15.src.rpm  MD5Sum mismatch
E: Failed to fetch some archives.

and indeed, the downloaded srpm has

# md5sum qmail-1.03-111patch_14_15.src.rpm.FAILED
3f13e0b60bf25eacf0f73529296240ee  qmail-1.03-111patch_14_15.src.rpm.FAILED

while the original file on the server has

# md5sum qmail-1.03-111patch_14_15.src.rpm
e78a4e6c8fd93b150f3084b0f937ce10  qmail-1.03-111patch_14_15.src.rpm

The sizes of the files are the same

# ls -l qmail-1.03-111patch_14_15.src.rpm*
-rw-r--r--  1 root root 342885 Oct 27 10:18 qmail-1.03-111patch_14_15.src.rpm
-rw-r--r--  1 root root 342885 Oct 22 13:47 qmail-1.03-111patch_14_15.src.rpm.FAILED

but cmp indeed reports a difference

# cmp qmail-1.03-111patch_14_15.src.rpm.FAILED qmail-1.03-111patch_14_15.src.rpm
qmail-1.03-111patch_14_15.src.rpm.FAILED qmail-1.03-111patch_14_15.src.rpm differ: byte 95233, line 345

Investigating, I see

# od -t a -j 95232 -N 10 qmail-1.03-111patch_14_15.src.rpm.FAILED
0272000  us nak  us   j   * bel   Q sub   9   N
0272012

# od -t a -j 95232 -N 10 qmail-1.03-111patch_14_15.src.rpm
0272000  cr  us nak  us   j   * bel   Q sub   9
0272012

So it seems missing cr's cause the corruption of the file.

I remark that I am using the same apt-get on the box which
successfully downloads the qmail srpm.  Also, I have no problem
downloading any other srpms (like ucspi-tcp).  Also, there is no
corruption when I try to download using other http clients.

I have uploaded some of the files to the web:

http://www.csi.hu/mw/qmail-1.03-111patch_14_15.src.rpm
http://www.csi.hu/mw/qmail-1.03-111patch_14_15.src.rpm.FAILED
http://www.csi.hu/mw/apt.strace

The last file is the strace output of 

# strace -o apt.strace apt-get source qmail

The "bad" qmail srpm is in

http://djbware.csi.hu/SRPMS/

and for apt-get, one needs to specify, in sources.list,

rpm-src http://djbware.csi.hu apt djbware

Thx for any help,

Mate

On Tue, Oct 26, 2004 at 04:15:12PM -0500, [email protected] wrote:
> On Tue, Oct 26, 2004 at 04:03:36PM -0400, Paul Jarc wrote:
> > [email protected] wrote:
> > > Failed to fetch http://djbware.csi.hu/apt/./SRPMS.djbware/qmail-1.03-111patch_14_15.src.rpm  404 file does not exist
> > ...
> > > @40000000417ea57e2c030184 141.225.8.55 read ./djbware.csi.hu/apt/:/SRPMS.djbware/qmail-1.03-111patch_14_15.src.rpm: open failed: file does not exist
> > >
> > > What  is that : in the last path?
> > 
> > publicfile translates "." to ":" at the beginning of a path
> > component.  "ln -s . :" works.
> 
> It indeed does; with
> 
> # ls -l
> total 8
> lrwxrwxrwx  1 root root    1 Oct 26 16:03 : -> ./
> drwxr-xr-x  2 root root 4096 Oct 25 13:35 base/
> -rw-r--r--  1 root root  498 Oct 25 13:35 index.html
> lrwxrwxrwx  1 root root    7 Oct 26 14:44 RPMS.djbware -> ../RPMS/
> lrwxrwxrwx  1 root root    8 Oct 26 14:44 SRPMS.djbware -> ../SRPMS/
> 
> I get
> 
> # apt-get source qmail
> Reading Package Lists... Done
> Building Dependency Tree... Done
> Need to get 343kB of source archives.
> Get:1 http://djbware.csi.hu apt/djbware qmail 1.03-111patch_14_15 (srpm) [343kB]
> Fetched 343kB in 0s (6407kB/s)
>    1:qmail                  ########################################### [100%]
> 
> Am I supposed to do this in every directory for httpd?  Can you
> explain what is going on?
> 
> Thx,
> 
> Mate
> 
> -- 
> ---
> Mate Wierdl | Dept. of Math. Sciences | University of Memphis  
> Please avoid sending me Word or PowerPoint attachments.
> See http://www.fsf.org/philosophy/no-word-attachments.html

-- 
---
Mate Wierdl | Dept. of Math. Sciences | University of Memphis  
Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html