* Added support for EXTRANONFREE. Hope it works :-)
This commit is contained in:
parent
8c62adea7e
commit
5d4ff3914e
6
CONF.sh
6
CONF.sh
|
@ -43,9 +43,13 @@ export OUT=/rack/debian-cd
|
||||||
# This cannot reside on an NFS mount.
|
# This cannot reside on an NFS mount.
|
||||||
export APTTMP=/ftp/tmp/apt
|
export APTTMP=/ftp/tmp/apt
|
||||||
|
|
||||||
# Do I want to have NONFREE
|
# Do I want to have NONFREE merged in the CD set
|
||||||
# export NONFREE=1
|
# export NONFREE=1
|
||||||
|
|
||||||
|
# Do I want to have NONFREE on a separate CD (the last CD of the CD set)
|
||||||
|
# WARNING: Don't use NONFREE and EXTRANONFREE at the same time !
|
||||||
|
# export EXTRANONFREE=1
|
||||||
|
|
||||||
# If you have a $MIRROR/dists/$CODENAME/local/binary-$ARCH dir with
|
# If you have a $MIRROR/dists/$CODENAME/local/binary-$ARCH dir with
|
||||||
# local packages that you want to put on the CD set then
|
# local packages that you want to put on the CD set then
|
||||||
# uncomment the following line
|
# uncomment the following line
|
||||||
|
|
6
Makefile
6
Makefile
|
@ -113,6 +113,12 @@ endif
|
||||||
ifndef OUT
|
ifndef OUT
|
||||||
ok=false
|
ok=false
|
||||||
endif
|
endif
|
||||||
|
# Never use NONFREE and EXTRANONFREE at the same time
|
||||||
|
ifdef NONFREE
|
||||||
|
ifdef EXTRANONFREE
|
||||||
|
ok=false
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@echo "Please refer to the README file for more information"
|
@echo "Please refer to the README file for more information"
|
||||||
|
|
4
README
4
README
|
@ -102,6 +102,10 @@ The process of building a CD is decomposed as follow :
|
||||||
if you have one)
|
if you have one)
|
||||||
- if NONFREE is set, then packages from non-free will be allowed
|
- if NONFREE is set, then packages from non-free will be allowed
|
||||||
(NONFREE must be exported to all sub-shells)
|
(NONFREE must be exported to all sub-shells)
|
||||||
|
- if EXTRANONFREE is set, then non-free packages will be included
|
||||||
|
on an extra CD (the last CD in fact). Don't use NONFREE and
|
||||||
|
EXTRANONFREE at the same time !
|
||||||
|
(EXTRANONFREE must be exported to all sub-shells)
|
||||||
- if COMPLETE is set, all packages that are not listed in the
|
- if COMPLETE is set, all packages that are not listed in the
|
||||||
selected task file will be included at the end
|
selected task file will be included at the end
|
||||||
- if SIZELIMIT is set, it will be used as the maximum size that
|
- if SIZELIMIT is set, it will be used as the maximum size that
|
||||||
|
|
|
@ -38,9 +38,13 @@ export OUT=/home/ftp/debian-cd
|
||||||
# This cannot reside on an NFS mount.
|
# This cannot reside on an NFS mount.
|
||||||
export APTTMP=/home/ftp/tmp/apt
|
export APTTMP=/home/ftp/tmp/apt
|
||||||
|
|
||||||
# Do I want to have NONFREE
|
# Do I want to have NONFREE merged in the CD set
|
||||||
# export NONFREE=1
|
# export NONFREE=1
|
||||||
|
|
||||||
|
# Do I want to have NONFREE on a separate CD (the last CD of the CD set)
|
||||||
|
# WARNING: Don't use NONFREE and EXTRANONFREE at the same time !
|
||||||
|
# export EXTRANONFREE=1
|
||||||
|
|
||||||
# If you have a $MIRROR/dists/$CODENAME/local/binary-$ARCH dir with
|
# If you have a $MIRROR/dists/$CODENAME/local/binary-$ARCH dir with
|
||||||
# local packages that you want to put on the CD set then
|
# local packages that you want to put on the CD set then
|
||||||
# uncomment the following line
|
# uncomment the following line
|
||||||
|
|
|
@ -6,6 +6,9 @@ debian-cd (2.2.1) frozen unstable; urgency=low
|
||||||
* Update for m68k, they should at least build now.
|
* Update for m68k, they should at least build now.
|
||||||
* Include upgrade-{i386,sparc,alpha,m68k} dir when available.
|
* Include upgrade-{i386,sparc,alpha,m68k} dir when available.
|
||||||
* Updated README.html.in (new version provided by Anne Bezemer).
|
* Updated README.html.in (new version provided by Anne Bezemer).
|
||||||
|
* Added EXTRANONFREE support. It allows to generate an extra non-free CD.
|
||||||
|
The first CDs are totally free and the last(s) CD(s) contains
|
||||||
|
only non-free and possibly some files from contrib.
|
||||||
|
|
||||||
-- Raphael Hertzog <hertzog@debian.org> Sat, 20 May 2000 23:42:58 +0200
|
-- Raphael Hertzog <hertzog@debian.org> Sat, 20 May 2000 23:42:58 +0200
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,12 @@ SECTIONS="admin base comm devel doc editors electronics games graphics \
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# There's no difference between NONFREE and EXTRANONFREE for this script
|
||||||
|
if [ -n "$EXTRANONFREE" ]
|
||||||
|
then
|
||||||
|
NONFREE=1
|
||||||
|
fi
|
||||||
|
|
||||||
cd $1
|
cd $1
|
||||||
|
|
||||||
ln -sf . debian
|
ln -sf . debian
|
||||||
|
|
|
@ -27,7 +27,7 @@ options=" -o Dir::State::status=$APTTMP/$CODENAME-$ARCH/status \
|
||||||
-o Dir::Etc=$APTTMP/$CODENAME-$ARCH/apt/ \
|
-o Dir::Etc=$APTTMP/$CODENAME-$ARCH/apt/ \
|
||||||
-o APT::Architecture=$ARCH "
|
-o APT::Architecture=$ARCH "
|
||||||
|
|
||||||
if [ -n "$NONFREE" ]; then
|
if [ -n "$NONFREE" -o -n "$EXTRANONFREE" ]; then
|
||||||
sections="main contrib non-free"
|
sections="main contrib non-free"
|
||||||
else
|
else
|
||||||
sections="main contrib"
|
sections="main contrib"
|
||||||
|
|
|
@ -14,7 +14,8 @@ use strict;
|
||||||
my $deflimit = $ENV{'SRCSIZELIMIT'} || $ENV{'SIZELIMIT'} || shift || 629145600;
|
my $deflimit = $ENV{'SRCSIZELIMIT'} || $ENV{'SIZELIMIT'} || shift || 629145600;
|
||||||
my $limit = $ENV{'SRCSIZELIMIT1'} || $deflimit;
|
my $limit = $ENV{'SRCSIZELIMIT1'} || $deflimit;
|
||||||
|
|
||||||
my $nonfree = $ENV{'NONFREE'};
|
my $nonfree = $ENV{'NONFREE'} || 0;
|
||||||
|
my $extranonfree = $ENV{'EXTRANONFREE'} || 0;
|
||||||
my $nonus = $ENV{'NONUS'} || 0;
|
my $nonus = $ENV{'NONUS'} || 0;
|
||||||
my $complete = $ENV{'COMPLETE'} || 0;
|
my $complete = $ENV{'COMPLETE'} || 0;
|
||||||
my $local = $ENV{'LOCAL'} || 0;
|
my $local = $ENV{'LOCAL'} || 0;
|
||||||
|
@ -42,6 +43,7 @@ sub msg {
|
||||||
my %bin2src;
|
my %bin2src;
|
||||||
my %sources;
|
my %sources;
|
||||||
my %included;
|
my %included;
|
||||||
|
my %excluded;
|
||||||
|
|
||||||
# Get the information from the good Sources.gz files
|
# Get the information from the good Sources.gz files
|
||||||
my @SOURCES = ("$mirror/dists/$codename/main/source/Sources.gz",
|
my @SOURCES = ("$mirror/dists/$codename/main/source/Sources.gz",
|
||||||
|
@ -52,7 +54,7 @@ if ($nonus and ($codename ne "slink")) {
|
||||||
"$nonus/dists/$codename/non-US/main/source/Sources.gz",
|
"$nonus/dists/$codename/non-US/main/source/Sources.gz",
|
||||||
"$nonus/dists/$codename/non-US/contrib/source/Sources.gz";
|
"$nonus/dists/$codename/non-US/contrib/source/Sources.gz";
|
||||||
}
|
}
|
||||||
if ($nonfree) {
|
if ($nonfree or $extranonfree) {
|
||||||
push @SOURCES, "$mirror/dists/$codename/non-free/source/Sources.gz";
|
push @SOURCES, "$mirror/dists/$codename/non-free/source/Sources.gz";
|
||||||
if ($nonus and ($codename ne "slink")) {
|
if ($nonus and ($codename ne "slink")) {
|
||||||
push @SOURCES,
|
push @SOURCES,
|
||||||
|
@ -88,6 +90,19 @@ while (defined($_ = <SOURCES>)) {
|
||||||
(m/^$re: (.*?)\s*$/m and $sources{$p}{$re} = $1)
|
(m/^$re: (.*?)\s*$/m and $sources{$p}{$re} = $1)
|
||||||
|| msg(1, "Header field '$re' missing for source '$p'\n");
|
|| msg(1, "Header field '$re' missing for source '$p'\n");
|
||||||
}
|
}
|
||||||
|
# Avoid a perl warning for sources packages without section header
|
||||||
|
if (! exists $sources{$p}{"Section"})
|
||||||
|
{
|
||||||
|
$sources{$p}{"Section"} = "No section";
|
||||||
|
}
|
||||||
|
# Generate the list of non-free source packages to exclude
|
||||||
|
if ((! $nonfree) and ($sources{$p}{"Section"} =~ /non-free/))
|
||||||
|
{
|
||||||
|
$excluded{$p} = "nonfree";
|
||||||
|
} else {
|
||||||
|
$excluded{$p} = 0;
|
||||||
|
}
|
||||||
|
# Match between source & binary packages
|
||||||
foreach $bin (split (/,\s+/, $sources{$p}{"Binary"})) {
|
foreach $bin (split (/,\s+/, $sources{$p}{"Binary"})) {
|
||||||
$bin2src{$bin} = $p;
|
$bin2src{$bin} = $p;
|
||||||
}
|
}
|
||||||
|
@ -135,6 +150,7 @@ foreach $p (@list) {
|
||||||
msg(0, "ERROR: Source `$src' does not exist ... (ignored)\n");
|
msg(0, "ERROR: Source `$src' does not exist ... (ignored)\n");
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
next if $excluded{$src};
|
||||||
next if $included{$src};
|
next if $included{$src};
|
||||||
add_src ($src);
|
add_src ($src);
|
||||||
}
|
}
|
||||||
|
@ -143,11 +159,38 @@ if ($complete) {
|
||||||
msg(0, "Now we'll add the sources not yet included ...\n");
|
msg(0, "Now we'll add the sources not yet included ...\n");
|
||||||
foreach $p (sort { ($sources{$a}{"Section"} cmp $sources{$b}{"Section"})
|
foreach $p (sort { ($sources{$a}{"Section"} cmp $sources{$b}{"Section"})
|
||||||
|| ($a cmp $b) }
|
|| ($a cmp $b) }
|
||||||
grep { not $included{$_} } keys %sources)
|
grep { not ($included{$_} or $excluded{$_}) } keys %sources)
|
||||||
{
|
{
|
||||||
add_src ($p);
|
add_src ($p);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
msg(0, "CD $cd will only be filled with $cd_size bytes ...\n");
|
||||||
|
|
||||||
|
# Now generate the extra non-free CD
|
||||||
|
if ($extranonfree and (! $nonfree))
|
||||||
|
{
|
||||||
|
my ($p, @toinclude);
|
||||||
|
|
||||||
|
# Finally accept non-free packages
|
||||||
|
foreach $p (grep { $excluded{$p} eq "nonfree" } (keys %sources))
|
||||||
|
{
|
||||||
|
$excluded{$p} = 0;
|
||||||
|
push @toinclude, $p;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Start a new CD
|
||||||
|
$cd++;
|
||||||
|
$cd_size = 0;
|
||||||
|
$limit = $ENV{"SRCSIZELIMIT$cd"} || $deflimit;
|
||||||
|
msg(0, "Limit for non-free source CD $cd is $limit.\n");
|
||||||
|
|
||||||
|
# Include non-free source packages
|
||||||
|
foreach $p (@toinclude)
|
||||||
|
{
|
||||||
|
add_src ($p);
|
||||||
|
}
|
||||||
|
|
||||||
|
msg(0, "CD $cd will only be filled with $cd_size bytes ...\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
# Now write the lists down
|
# Now write the lists down
|
||||||
|
|
|
@ -15,6 +15,7 @@ my $deflimit = $ENV{'SIZELIMIT'} || shift || 639631360;
|
||||||
my $limit = $ENV{'SIZELIMIT1'} || $deflimit;
|
my $limit = $ENV{'SIZELIMIT1'} || $deflimit;
|
||||||
|
|
||||||
my $nonfree = $ENV{'NONFREE'} || 0;
|
my $nonfree = $ENV{'NONFREE'} || 0;
|
||||||
|
my $extranonfree = $ENV{'EXTRANONFREE'} || 0;
|
||||||
my $nonus = $ENV{'NONUS'} || 0;
|
my $nonus = $ENV{'NONUS'} || 0;
|
||||||
my $local = $ENV{'LOCAL'} || 0;
|
my $local = $ENV{'LOCAL'} || 0;
|
||||||
my $complete = $ENV{'COMPLETE'} || 0;
|
my $complete = $ENV{'COMPLETE'} || 0;
|
||||||
|
@ -210,6 +211,65 @@ if ($complete) {
|
||||||
}
|
}
|
||||||
msg(0, "CD $cd will only be filled with $cd_size bytes ...\n");
|
msg(0, "CD $cd will only be filled with $cd_size bytes ...\n");
|
||||||
|
|
||||||
|
# Now select the non-free packages for an extra CD
|
||||||
|
if ($extranonfree and (! $nonfree))
|
||||||
|
{
|
||||||
|
my ($p, @toinclude);
|
||||||
|
|
||||||
|
# Finally accept non-free packages ...
|
||||||
|
foreach $p (grep { $excluded{$_} eq "nonfree" } (keys %excluded))
|
||||||
|
{
|
||||||
|
$excluded{$p} = 0;
|
||||||
|
push @toinclude, $p;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Start a new CD
|
||||||
|
$cd++;
|
||||||
|
$cd_size = 0;
|
||||||
|
$limit = $ENV{"SIZELIMIT$cd"} || $deflimit;
|
||||||
|
msg(0, "Limit for non-free CD $cd is $limit.\n");
|
||||||
|
|
||||||
|
# Include non-free packages
|
||||||
|
foreach $p (@toinclude)
|
||||||
|
{
|
||||||
|
add_package($p, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
# If a contrib package was listed in the list of packages to
|
||||||
|
# include and if COMPLETE=0 there's a chance that the package
|
||||||
|
# will not get included in any CD ... so I'm checking the complete
|
||||||
|
# list again
|
||||||
|
open (LIST, "< $list") || die "Can't open $list : $!\n";
|
||||||
|
while (defined($_=<LIST>)) {
|
||||||
|
chomp;
|
||||||
|
next if m/^\s*$/;
|
||||||
|
next if $included{$_};
|
||||||
|
next if $excluded{$_};
|
||||||
|
if (not exists $packages{$_}) {
|
||||||
|
msg(1, "WARNING: '$_' does not appear to be available ... " .
|
||||||
|
"(ignored)\n");
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
add_package ($_, 1);
|
||||||
|
}
|
||||||
|
close LIST;
|
||||||
|
|
||||||
|
# Try to include other packages that could not be included
|
||||||
|
# before (because they depends on excluded non-free packages)
|
||||||
|
if ($complete)
|
||||||
|
{
|
||||||
|
foreach $p (sort { ($packages{$a}{"Section"}
|
||||||
|
cmp $packages{$b}{"Section"}) || ($a cmp $b) }
|
||||||
|
grep { not ($included{$_} or $excluded{$_}) }
|
||||||
|
keys %packages)
|
||||||
|
{
|
||||||
|
add_package ($p, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
msg(0, "CD $cd will only be filled with $cd_size bytes ...\n");
|
||||||
|
}
|
||||||
|
|
||||||
# Remove old files
|
# Remove old files
|
||||||
foreach (glob("$dir/*.packages")) {
|
foreach (glob("$dir/*.packages")) {
|
||||||
unlink $_;
|
unlink $_;
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
PREFIX=$2
|
PREFIX=$2
|
||||||
NUM=${PREFIX##$TDIR/$CODENAME-$ARCH/}
|
NUM=${PREFIX##$TDIR/$CODENAME-$ARCH/}
|
||||||
if [ -n "$NONFREE" ]; then
|
if [ -n "$NONFREE" -o -n "$EXTRANONFREE" ]; then
|
||||||
SECTIONS="main contrib non-free"
|
SECTIONS="main contrib non-free"
|
||||||
else
|
else
|
||||||
SECTIONS="main contrib"
|
SECTIONS="main contrib"
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
PREFIX=$1
|
PREFIX=$1
|
||||||
if [ -n "$NONFREE" ]; then
|
if [ -n "$NONFREE" -o -n "$EXTRANONFREE" ]; then
|
||||||
SECTIONS="main contrib non-free"
|
SECTIONS="main contrib non-free"
|
||||||
else
|
else
|
||||||
SECTIONS="main contrib"
|
SECTIONS="main contrib"
|
||||||
|
|
Loading…
Reference in New Issue