<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>dipplum.com &#187; debmirror</title>
	<atom:link href="http://dipplum.com/tag/debmirror/feed/" rel="self" type="application/rss+xml" />
	<link>http://dipplum.com</link>
	<description>Be  the change you wanna see in the world</description>
	<lastBuildDate>Sat, 12 Nov 2011 07:38:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>debmirror不能镜像当前的Debian Repo</title>
		<link>http://dipplum.com/2009/02/27/debmirror-debian-repo-problem/</link>
		<comments>http://dipplum.com/2009/02/27/debmirror-debian-repo-problem/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 20:24:37 +0000</pubDate>
		<dc:creator>li</dc:creator>
				<category><![CDATA[开源软件]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[debmirror]]></category>

		<guid isPermaLink="false">http://dipplum.com/2009/02/27/debmirror-debian-repo-problem/</guid>
		<description><![CDATA[不知道何时起，Debian的Repository就不包含Packages文件了，只有压缩版本的Packages.bz2和Packages.gz。同样，Sources.gz和Sources.bz2也完全替代了Sources。导致debmirror无法同步现在的Debian Repo。报的错误类似：“…/Packages failed md5sum check”。 修正方法如下： 按照下面的patch修改/usr/bin/debmirror 删除镜像目录下的临时文件目录 rm –r /path_to_local_mirro/.temp --- debmirror 2009-02-27 04:10:57.000000000 +0800 +++ debmirror.orig 2009-02-27 04:12:45.000000000 +0800 @@ -690,14 +690,14 @@ foreach my $dist &#40;@dists&#41; &#123; foreach my $section &#40;@sections&#41; &#123; foreach my $arch &#40;@arches&#41; &#123; - #add_bytes(&#34;dists/$dist/$section/binary-$arch/Packages&#34;); + add_bytes&#40;&#34;dists/$dist/$section/binary-$arch/Packages&#34;&#41;; add_bytes&#40;&#34;dists/$dist/$section/binary-$arch/Packages.gz&#34;&#41;; add_bytes&#40;&#34;dists/$dist/$section/binary-$arch/Packages.bz2&#34;&#41;; add_bytes&#40;&#34;dists/$dist/$section/binary-$arch/Release&#34;&#41;; add_bytes&#40;&#34;dists/$dist/$section/binary-$arch/Packages.diff/Index&#34;&#41; unless &#40;$pdiff_mode eq &#34;none&#34;&#41;; &#125; if &#40;$do_source&#41; [...]]]></description>
			<content:encoded><![CDATA[<p>不知道何时起，Debian的Repository就不包含Packages文件了，只有压缩版本的Packages.bz2和Packages.gz。同样，Sources.gz和Sources.bz2也完全替代了Sources。导致debmirror无法同步现在的Debian Repo。报的错误类似：“…/Packages failed md5sum check”。</p>
<p>修正方法如下：</p>
<ol>
<li>按照下面的patch修改/usr/bin/debmirror</li>
<li>删除镜像目录下的临时文件目录 rm –r /path_to_local_mirro/.temp</li>
</ol>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #339933;">---</span> debmirror   <span style="color: #cc66cc;">2009</span><span style="color: #339933;">-</span>02<span style="color: #339933;">-</span><span style="color: #cc66cc;">27</span> 04<span style="color: #339933;">:</span><span style="color: #cc66cc;">10</span><span style="color: #339933;">:</span><span style="color: #cc66cc;">57.000000000</span> <span style="color: #339933;">+</span>0800
<span style="color: #339933;">+++</span> debmirror<span style="color: #339933;">.</span>orig      <span style="color: #cc66cc;">2009</span><span style="color: #339933;">-</span>02<span style="color: #339933;">-</span><span style="color: #cc66cc;">27</span> 04<span style="color: #339933;">:</span><span style="color: #cc66cc;">12</span><span style="color: #339933;">:</span><span style="color: #cc66cc;">45.000000000</span> <span style="color: #339933;">+</span>0800
<span style="color: #339933;">@@</span> <span style="color: #339933;">-</span><span style="color: #cc66cc;">690</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">14</span> <span style="color: #339933;">+</span><span style="color: #cc66cc;">690</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">14</span> <span style="color: #339933;">@@</span>
 <span style="color: #b1b100;">foreach</span> <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$dist</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">@dists</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   <span style="color: #b1b100;">foreach</span> <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$section</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">@sections</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
     <span style="color: #b1b100;">foreach</span> <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$arch</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">@arches</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #339933;">-</span>      <span style="color: #666666; font-style: italic;">#add_bytes(&quot;dists/$dist/$section/binary-$arch/Packages&quot;);</span>
<span style="color: #339933;">+</span>      add_bytes<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;dists/$dist/$section/binary-$arch/Packages&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
       add_bytes<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;dists/$dist/$section/binary-$arch/Packages.gz&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
       add_bytes<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;dists/$dist/$section/binary-$arch/Packages.bz2&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
       add_bytes<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;dists/$dist/$section/binary-$arch/Release&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
       add_bytes<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;dists/$dist/$section/binary-$arch/Packages.diff/Index&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">unless</span>                                                                               <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$pdiff_mode</span> <span style="color: #b1b100;">eq</span> <span style="color: #ff0000;">&quot;none&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
     <span style="color: #009900;">&#125;</span>
     <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$do_source</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #339933;">-</span>      <span style="color: #666666; font-style: italic;">#add_bytes(&quot;dists/$dist/$section/source/Sources&quot;);</span>
<span style="color: #339933;">+</span>      add_bytes<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;dists/$dist/$section/source/Sources&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
       add_bytes<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;dists/$dist/$section/source/Sources.gz&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
       add_bytes<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;dists/$dist/$section/source/Sources.bz2&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
       add_bytes<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;dists/$dist/$section/source/Release&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">@@</span> <span style="color: #339933;">-</span><span style="color: #cc66cc;">706</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">13</span> <span style="color: #339933;">+</span><span style="color: #cc66cc;">706</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">13</span> <span style="color: #339933;">@@</span>
   <span style="color: #009900;">&#125;</span>
 <span style="color: #009900;">&#125;</span>
 <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">@extra_dirs</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #339933;">-</span>  <span style="color: #666666; font-style: italic;">#add_bytes(&quot;$_/Packages&quot;);</span>
<span style="color: #339933;">+</span>  add_bytes<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;$_/Packages&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   add_bytes<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;$_/Packages.gz&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   add_bytes<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;$_/Packages.bz2&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   add_bytes<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;$_/Release&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   add_bytes<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;$_/Packages.diff/Index&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$do_source</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #339933;">-</span>    <span style="color: #666666; font-style: italic;">#add_bytes(&quot;$_/Sources&quot;);</span>
<span style="color: #339933;">+</span>    add_bytes<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;$_/Sources&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
     add_bytes<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;$_/Sources.gz&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
     add_bytes<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;$_/Sources.bz2&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
     add_bytes<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;$_/Sources.diff/Index&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://dipplum.com/2009/02/27/debmirror-debian-repo-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

