--- apt-mirror-0.4.6.orig/debian/Debian-mirror.list +++ apt-mirror-0.4.6/debian/Debian-mirror.list @@ -0,0 +1,23 @@ +############# config ################## +# +# set base_path /var/spool/apt-mirror +# +# if you change the base path you must create the directories below with write privileges +# +# set mirror_path $base_path/mirror +# set skel_path $base_path/skel +# set var_path $base_path/var +# set cleanscript $var_path/clean.sh +# set defaultarch +# set postmirror_script $var_path/postmirror.sh +# set run_postmirror 0 +set nthreads 20 +set _tilde 0 +# +############# end config ############## + +deb http://ftp.us.debian.org/debian unstable main contrib non-free +deb-src http://ftp.us.debian.org/debian unstable main contrib non-free + +clean http://ftp.us.debian.org/debian + --- apt-mirror-0.4.6.orig/debian/watch +++ apt-mirror-0.4.6/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://sf.net/apt-mirror/apt-mirror_(.*).orig.tar.gz --- apt-mirror-0.4.6.orig/debian/Ubuntu-mirror.list +++ apt-mirror-0.4.6/debian/Ubuntu-mirror.list @@ -0,0 +1,32 @@ +############# config ################## +# +# set base_path /var/spool/apt-mirror +# +# if you change the base path you must create the directories below with write privileges +# +# set mirror_path $base_path/mirror +# set skel_path $base_path/skel +# set var_path $base_path/var +# set cleanscript $var_path/clean.sh +# set defaultarch +# set postmirror_script $var_path/postmirror.sh +set run_postmirror 0 +set nthreads 20 +set _tilde 0 +# +############# end config ############## + +deb http://archive.ubuntu.com/ubuntu karmic main restricted universe multiverse +deb http://archive.ubuntu.com/ubuntu karmic-security main restricted universe multiverse +deb http://archive.ubuntu.com/ubuntu karmic-updates main restricted universe multiverse +#deb http://archive.ubuntu.com/ubuntu karmic-proposed main restricted universe multiverse +#deb http://archive.ubuntu.com/ubuntu karmic-backports main restricted universe multiverse + +deb-src http://archive.ubuntu.com/ubuntu karmic main restricted universe multiverse +deb-src http://archive.ubuntu.com/ubuntu karmic-security main restricted universe multiverse +deb-src http://archive.ubuntu.com/ubuntu karmic-updates main restricted universe multiverse +#deb-src http://archive.ubuntu.com/ubuntu karmic-proposed main restricted universe multiverse +#deb-src http://archive.ubuntu.com/ubuntu karmic-backports main restricted universe multiverse + +clean http://archive.ubuntu.com/ubuntu + --- apt-mirror-0.4.6.orig/debian/postinst +++ apt-mirror-0.4.6/debian/postinst @@ -0,0 +1,40 @@ +#!/bin/sh +set -e + +#DEBHELPER# + +action="$1" +oldversion="$2" + +if [ "$action" != configure ] +then + exit 0 +fi + +setup_aptmirror_user() { + if ! id apt-mirror > /dev/null 2>&1 ; then + adduser --quiet --system --group --no-create-home --home /var/spool/apt-mirror --shell /bin/sh apt-mirror + fi +} + +setup_aptmirror_clean() { + touch /var/spool/apt-mirror/var/clean.sh + touch /var/spool/apt-mirror/var/postmirror.sh + chmod +x /var/spool/apt-mirror/var/clean.sh +} + + +set_aptmirror_owner() { + chown apt-mirror:apt-mirror /var/spool/apt-mirror + chown apt-mirror:apt-mirror /var/spool/apt-mirror/mirror + chown apt-mirror:apt-mirror /var/spool/apt-mirror/skel + chown apt-mirror:apt-mirror /var/spool/apt-mirror/var + chown apt-mirror:apt-mirror /var/spool/apt-mirror/var/clean.sh + chown apt-mirror:apt-mirror /var/spool/apt-mirror/var/postmirror.sh +} + +setup_aptmirror_user +setup_aptmirror_clean +#setup_postmirror_script +set_aptmirror_owner + --- apt-mirror-0.4.6.orig/debian/rules +++ apt-mirror-0.4.6/debian/rules @@ -0,0 +1,16 @@ +#!/usr/bin/make -f + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/rules/simple-patchsys.mk + +builddist := $(shell lsb_release -si) + +install/apt-mirror:: + install -g root -o root -m 755 \ + apt-mirror debian/apt-mirror/usr/bin/apt-mirror + install -g root -o root -m 644 \ + debian/${builddist}-mirror.list debian/apt-mirror/etc/apt/mirror.list + install -d -g root -o root -m 0755 debian/apt-mirror/usr/share/man/man1 + pod2man apt-mirror | gzip -9 -c > debian/apt-mirror/usr/share/man/man1/apt-mirror.1.gz + mkdir -p $(DEB_DESTDIR)usr/share/doc/apt-mirror + cp CHANGELOG $(DEB_DESTDIR)usr/share/doc/apt-mirror/changelog --- apt-mirror-0.4.6.orig/debian/compat +++ apt-mirror-0.4.6/debian/compat @@ -0,0 +1 @@ +5 --- apt-mirror-0.4.6.orig/debian/control +++ apt-mirror-0.4.6/debian/control @@ -0,0 +1,29 @@ +Source: apt-mirror +Section: net +Priority: optional +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Brandon Holtsclaw +Dm-Upload-Allowed: yes +Uploaders: Rudy Godoy +Homepage: http://apt-mirror.sourceforge.net/ +Build-Depends: cdbs, debhelper (>= 5) +Build-Depends-Indep: lsb-release +Standards-Version: 3.8.3 + +Package: apt-mirror +Architecture: all +Depends: wget, perl, perl-modules, adduser, ${misc:Depends} +Description: APT sources mirroring tool + A small and efficient tool that lets you mirror a part of or + the whole Debian GNU/Linux distribution or any other apt sources. + . + Main features: + * It uses a config similar to apts + * It's fully pool comply + * It supports multithreaded downloading + * It supports multiple architectures at the same time + * It can automatically remove unneeded files + * It works well on overloaded channel to internet + * It never produces an inconsistent mirror including while mirroring + * It works on all POSIX complied systems with perl and wget + --- apt-mirror-0.4.6.orig/debian/copyright +++ apt-mirror-0.4.6/debian/copyright @@ -0,0 +1,32 @@ +This package was debianized by Dmitry N. Hramtsov on +Sat, 27 Jul 2002 12:44:33 +0700 +and modified for Debian by Brandon Holtsclaw on +Mon, 10 Jul 2006 12:44:33 -0500. + +It was downloaded from http://apt-mirror.sourceforge.net/ + +Copyright 2005,2006,2007 Dmitry N. Hramstov +Copyright 2007 Brandon Holtsclaw + +Upstream Authors: + Dmitry N. Hramtsov + Brandon Holtsclaw + +License: + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL-2'. --- apt-mirror-0.4.6.orig/debian/changelog +++ apt-mirror-0.4.6/debian/changelog @@ -0,0 +1,173 @@ +apt-mirror (0.4.6-0ubuntu3) karmic; urgency=low + + * Switch to cdbs and add simple-patchsys. + * Add patches again and refresh them: + - debian/patches/01-ubuntu-mirror-bz2.patch (LP: #184063) + - debian/patches/02-fix-invalid-dirhandle.patch (LP: #244613) + * Install upstream changelog. + * Refer to versioned copyright file. + * Bump Debian standards version to 3.8.3, no changes needed. + + -- Benjamin Drung Fri, 16 Oct 2009 16:29:23 +0200 + +apt-mirror (0.4.6-0ubuntu2) karmic; urgency=low + + * Readd dropped changelog entries. + * Reapply changes, which were dropped with 0.4.6-0ubuntu1: + - debian/Ubuntu-mirror.list: fix typo (privlages -> privileges) + - debian/rules: Move binary-arch commands to binary-indep + - debian/control: + - remove homepage from description + - Update Maintainer field + * debian/Debian-mirror.list: fix typo (privlages -> privileges) + * debian/Ubuntu-mirror.list: update distribution to karmic (LP: #378836) + * Remove dpatch (there is no patch to apply) + + -- Benjamin Drung Wed, 20 May 2009 11:41:34 +0200 + +apt-mirror (0.4.6-0ubuntu1) karmic; urgency=low + + * New Upstream Release + * updated debian/*-mirror.list to reflect new upsteam options + * added postmirror.sh creation and configuration options + * added file locking, more than one apt-mirror instance cant run at once + + -- Brandon Holtsclaw Thu, 27 Dec 2007 01:55:18 -0600 + +apt-mirror (0.4.5-1ubuntu2) jaunty; urgency=low + + * Add 02-fix-invalid-dirhandle.dpatch (LP: #244613) + * debian/Ubuntu-mirror.list: + - fix typo (privlages -> privileges) + - update distribution to jaunty + * debian/rules: Move binary-arch commands to binary-indep + * debian/control: + - remove homepage from description + - bump Debian standards version to 3.8.0, no changes needed + + -- Benjamin Drung Sat, 01 Nov 2008 20:41:20 +0100 + +apt-mirror (0.4.5-1ubuntu1) intrepid; urgency=low + + * Add 01-ubuntu-mirror-bz2.patch (LP: #184063) + * Bump Debian standards version to 3.7.3, no changes needed + + -- David Futcher Thu, 27 Mar 2008 14:20:06 +0000 + +apt-mirror (0.4.5-1) unstable; urgency=low + + * new upstream release + * modified watchfile to report the proper version + * removed all patches, applied upstream + * new upstream fixes LP: #172454 + * get-orig-source updated + * Removed DM-Upload-Allowed field from debian/control + * Removed Rudy Godoy from Uploaders field + + -- Brandon Holtsclaw Thu, 30 Nov 2007 17:31:37 -0600 + +apt-mirror (0.4.4+debian-2) unstable; urgency=low + + * added 04_double_tilde patch to not clean files with two + tildes when clean.sh is run + * added debian and ubuntu specific mirror.list files and install them + depending on lsb_release -si at build time + + -- Brandon Holtsclaw Sun, 25 Nov 2007 19:25:15 -0600 + +apt-mirror (0.4.4+debian-1) unstable; urgency=low + + * added 01_cache_stat.dpatch (Closes: #387304) + * updated debian watch (Closes: #449817) + * repacked the upstream tarbal not to include a debian/ dir + * added the DM-Upload-Allowed field to debian control + * broke existing changes from upstream into patches ( dpatch ) + added 02_manpage-updates.dpatch and 03_sizeoutput.dpatch from + previous uploads + + -- Brandon Holtsclaw Mon, 19 Nov 2007 09:09:44 -0600 + +apt-mirror (0.4.4-5) unstable; urgency=low + + * Fixed typos in the Man page (Closes: #413795) and (Closes: #413796) + * apt-mirror no longer cleans out all files with tilde in file name when + clean.sh is run (Closes: #414866) + + -- Brandon Holtsclaw Mon, 23 Apr 2007 03:09:14 -0500 + +apt-mirror (0.4.4-4) unstable; urgency=low + + * Fixed typos in the Package Description and Man page (Closes: #385645) + * Added "set _tilde 0" to default config to allow proper download of + mirrors with a tilde in the url or package name (Closes: #386162) + + -- Brandon Holtsclaw Thu, 7 Sep 2006 21:06:27 -0500 + +apt-mirror (0.4.4-3) unstable; urgency=low + + * Added the GPL preamble to debian/copyright + * Raised debhelper compat to 5 from 3 + * Changed download and clean.sh size calculations to return human readable output ( KiB,MiB,GiB vs bytes ) + * added clean.sh to postinstall to make it +x on install + * Added debian/watch + * Closes RFP Bug 293048 (Closes: #293048) + + -- Brandon Holtsclaw Wed, 09 Aug 2006 06:08:26 -0500 + +apt-mirror (0.4.4-2) unstable; urgency=low + + * Bugfix: default architecture identification on non-debian systems v2 + + -- Dmitry N. Hramtsov Tue, 11 Oct 2005 15:33:27 +0700 + +apt-mirror (0.4.4-1) unstable; urgency=low + + * Bugfix: default architecture identification on non-debian systems + * New architectures added: amd64, hurd-i386, sh + * New configuration options + + -- Dmitry N. Hramtsov Sat, 8 Oct 2005 15:33:27 +0700 + +apt-mirror (0.4.3-2) unstable; urgency=low + + * Minor fixes in cleanup section + + -- Dmitry N. Hramtsov Sat, 20 Jul 2003 13:24:01 +0700 + +apt-mirror (0.4.3-1) unstable; urgency=low + + * Fixes in ports processing + + -- Dmitry N. Hramtsov Sat, 8 Jul 2003 13:35:19 +0700 + +apt-mirror (0.4.3-0) unstable; urgency=low + + * Fixes allows "~" usage in sources URLs + + -- Dmitry N. Hramtsov Sat, 7 Jul 2003 16:27:29 +0700 + +apt-mirror (0.4.2-0) unstable; urgency=low + + * Fixes allows explicitly specify port in sources URLs + + -- Dmitry N. Hramtsov Sat, 5 Jul 2003 16:32:59 +0700 + +apt-mirror (0.4.1-0) unstable; urgency=low + + * Improvements in cleanup code + * Small bugfixes in index parser + + -- Dmitry N. Hramtsov Sun, 29 Jun 2003 19:44:30 +0700 + +apt-mirror (0.3.0-2) unstable; urgency=low + + * Small bugfixes + + -- Dmitry N. Hramtsov Mon, 5 Aug 2002 16:26:30 +0700 + +apt-mirror (0.3.0-1) unstable; urgency=low + + * Initial public release. + + -- Dmitry N. Hramtsov Sat, 27 Jul 2002 12:44:33 +0700 + --- apt-mirror-0.4.6.orig/debian/dirs +++ apt-mirror-0.4.6/debian/dirs @@ -0,0 +1,6 @@ +etc/apt +usr/bin +var/spool/apt-mirror +var/spool/apt-mirror/mirror +var/spool/apt-mirror/skel +var/spool/apt-mirror/var --- apt-mirror-0.4.6.orig/debian/cron.d +++ apt-mirror-0.4.6/debian/cron.d @@ -0,0 +1,4 @@ +# +# Regular cron jobs for the apt-mirror package +# +#0 4 * * * apt-mirror /usr/bin/apt-mirror > /var/spool/apt-mirror/var/cron.log --- apt-mirror-0.4.6.orig/debian/patches/01-ubuntu-mirror-bz2.patch +++ apt-mirror-0.4.6/debian/patches/01-ubuntu-mirror-bz2.patch @@ -0,0 +1,56 @@ +Description: Should also mirror bz2 files even though they are not used +Author: Bradley M. Kuhn +Bug-Ubuntu: https://launchpad.net/bugs/184063 +Last-Update: 2009-10-16 + +diff -pruN a/apt-mirror b/apt-mirror +--- a/apt-mirror 2009-05-01 07:40:20.000000000 +0200 ++++ b/apt-mirror 2009-10-16 15:15:00.446520044 +0200 +@@ -325,9 +325,11 @@ foreach (@config_sources) { + foreach (@components) { + add_url_to_download($url . $_ . "/source/Release"); + add_url_to_download($url . $_ . "/source/Sources.gz"); ++ add_url_to_download($url . $_ . "/source/Sources.bz2"); + } + } else { + add_url_to_download($uri . "/$distribution/Sources.gz"); ++ add_url_to_download($uri . "/$distribution/Sources.bz2"); + } + } + +@@ -339,13 +341,18 @@ foreach (@config_binaries) { + + add_url_to_download($url . "Release"); + add_url_to_download($url . "Release.gpg"); +- add_url_to_download($url . "Contents-" . $arch . ".gz") if get_variable("_contents"); ++ if (get_variable("_contents")) { ++ add_url_to_download($url . "Contents-" . $arch . ".gz"); ++ add_url_to_download($url . "Contents-" . $arch . ".bz2"); ++ } + foreach (@components) { + add_url_to_download($url . $_ . "/binary-" . $arch . "/Release"); + add_url_to_download($url . $_ . "/binary-" . $arch . "/Packages.gz"); ++ add_url_to_download($url . $_ . "/binary-" . $arch . "/Packages.bz2"); + } + } else { + add_url_to_download($uri . "/$distribution/Packages.gz"); ++ add_url_to_download($uri . "/$distribution/Packages.bz2"); + } + } + +@@ -358,6 +365,7 @@ foreach (keys %urls_to_download) { + s[~][%7E]g if get_variable("_tilde"); + $skipclean{$_} = 1; + $skipclean{$_} = 1 if s[\.gz$][]; ++ $skipclean{$_} = 1 if s[\.bz2$][]; + } + + ###################################################################################### +@@ -536,6 +544,7 @@ foreach (@index_urls) { + die("apt-mirror: invalid url in index_urls") unless s[^(\w+)://][]; + copy_file(get_variable("skel_path") . "/" . sanitise_uri("$_"), get_variable("mirror_path") . "/" . sanitise_uri("$_")); + copy_file(get_variable("skel_path") . "/" . sanitise_uri("$_"), get_variable("mirror_path") . "/" . sanitise_uri("$_")) if(s/\.gz$//); ++ copy_file(get_variable("skel_path") . "/" . sanitise_uri("$_"), get_variable("mirror_path") . "/" . sanitise_uri("$_")) if(s/\.bz2$//); + } + + --- apt-mirror-0.4.6.orig/debian/patches/02-fix-invalid-dirhandle.patch +++ apt-mirror-0.4.6/debian/patches/02-fix-invalid-dirhandle.patch @@ -0,0 +1,26 @@ +Description: Fix invalid dirhandle +Author: Benjamin Drung +Bug-Ubuntu: https://launchpad.net/bugs/244613 +Last-Update: 2009-10-16 + +diff -pruN a/apt-mirror b/apt-mirror +--- a/apt-mirror 2009-10-16 15:15:00.446520044 +0200 ++++ b/apt-mirror 2009-10-16 15:52:48.804499647 +0200 +@@ -572,14 +572,14 @@ sub process_directory { + my $dir = shift; + my $is_needed = 0; + return 1 if $skipclean{$dir}; +- opendir(DIR, $dir) or die "apt-mirror: can't opendir $dir: $!"; +- foreach (grep { !/^\.$/ && !/^\.\.$/ } readdir(DIR)) { ++ opendir(my $dir_h, $dir) or die "apt-mirror: can't opendir $dir: $!"; ++ foreach (grep { !/^\.$/ && !/^\.\.$/ } readdir($dir_h)) { + my $item = $dir . "/". $_; + $is_needed |= process_directory($item) if -d $item && ! -l $item; + $is_needed |= process_file($item) if -f $item; + $is_needed |= process_symlink($item) if -l $item; + } +- closedir DIR; ++ closedir $dir_h; + push @rm_dirs, $dir unless $is_needed; + return $is_needed; + }