* Add support for forcing firmware packages onto CD#1:
+ Add "FORCE_FIRMWARE=1" to CONF.sh to turn this on + Will pick up on packages in the "firmware" task and install them + Will also add sym-links to them in CD1/firmware so that new d-i code can find them easily. + Will add a short sentence into README.html/README.txt * Add top-level control of which checksums are desired for output images see the CHECKSUMS setting in CONF.sh * Fix some bashisms in tools/apt-selection.
This commit is contained in:
parent
291a366790
commit
b9c25ca204
11
CONF.sh
11
CONF.sh
|
@ -128,6 +128,11 @@ export CONTRIB=1
|
|||
# WARNING: Don't use NONFREE and EXTRANONFREE at the same time !
|
||||
# export EXTRANONFREE=1
|
||||
|
||||
# Do I want to force (potentially non-free) firmware packages to be
|
||||
# placed on disc 1? Will make installation much easier if systems
|
||||
# contain hardware that depends on this firmware
|
||||
export FORCE_FIRMWARE=1
|
||||
|
||||
# If you have a $MIRROR/dists/$CODENAME/local/binary-$ARCH dir with
|
||||
# local packages that you want to put on the CD set then
|
||||
# uncomment the following line
|
||||
|
@ -218,9 +223,13 @@ export NORECOMMENDS=1
|
|||
# package on the CD. The default is 'true'.
|
||||
#export NOSUGGESTS=1
|
||||
|
||||
# Set to 1 to generate MD5 and SHA1 sums for generated images
|
||||
# Set to 1 to generate MD5/SHA1/SHA256/SHA512 sums for generated images
|
||||
export IMAGESUMS=1
|
||||
|
||||
# And define the set of checksum algorithms you want here. Default is
|
||||
# all of: md5 sha1 sha512 sha256
|
||||
# export CHECKSUMS="md5 sha1 sha512 sha256"
|
||||
|
||||
# We may have to extract files from packages to put them onto the CD
|
||||
# (e.g. bootloader files). If you make those packages (and their
|
||||
# sources) available somewhere, list it here so that README.source
|
||||
|
|
5
Makefile
5
Makefile
|
@ -123,6 +123,8 @@ ifneq ($(ARCHES),source)
|
|||
$(Q)mkdir -p $(TASKDIR)
|
||||
$(Q)echo "- copying task files from 'tasks/$(DI_CODENAME)/'"
|
||||
$(Q)cp -r $(BASEDIR)/tasks/$(CODENAME)/* $(TASKDIR)
|
||||
$(Q)echo "- copying firwmare task file from 'tasks/firmware'"
|
||||
$(Q)cp -r $(BASEDIR)/tasks/firmware $(TASKDIR)
|
||||
$(Q)echo "- task.languages: using 'tasks/$(DI_CODENAME)/$(TASK_LANGLIST)'"
|
||||
$(Q)cp $(BASEDIR)/tasks/$(DI_CODENAME)/$(TASK_LANGLIST) \
|
||||
$(TASKDIR)/task.languages
|
||||
|
@ -314,6 +316,9 @@ $(BDIR)/rawlist:
|
|||
for VARIANT in $(VARIANTS); do \
|
||||
VARIANTDEFS="$$VARIANTDEFS -D VARIANT_$$VARIANT"; \
|
||||
done; \
|
||||
if [ "$(FORCE_FIRMWARE)"x != "0"x ] ; then \
|
||||
ARCHDEFS="$$ARCHDEFS -DFORCE_FIRMWARE"; \
|
||||
fi; \
|
||||
if [ "$(SOURCEONLY)"x != "yes"x ] ; then \
|
||||
cat $(TASKDIR)/$(TASK) | \
|
||||
cpp -nostdinc -nostdinc++ -P -undef $$ARCHDEFS $$VARIANTDEFS\
|
||||
|
|
|
@ -208,6 +208,13 @@
|
|||
# if TYPEsource
|
||||
This set includes the source code of programs in the Debian OS.</p>
|
||||
# endif
|
||||
# if FORCE_FIRMWARE == 1
|
||||
# if DISKNUM == 1
|
||||
<p>This disc includes non-free firmware files to make installation easier on some
|
||||
systems. See <a href="http://wiki.debian.org/Firmware">http://wiki.debian.org/Firmware</a>
|
||||
for more details.</p>
|
||||
# endif
|
||||
# endif
|
||||
#else
|
||||
</p>
|
||||
# include <unoffextrascd.html.in>
|
||||
|
|
|
@ -128,6 +128,11 @@ export CONTRIB=1
|
|||
# WARNING: Don't use NONFREE and EXTRANONFREE at the same time !
|
||||
# export EXTRANONFREE=1
|
||||
|
||||
# Do I want to force (potentially non-free) firmware packages to be
|
||||
# placed on disc 1? Will make installation much easier if systems
|
||||
# contain hardware that depends on this firmware
|
||||
export FORCE_FIRMWARE=1
|
||||
|
||||
# If you have a $MIRROR/dists/$CODENAME/local/binary-$ARCH dir with
|
||||
# local packages that you want to put on the CD set then
|
||||
# uncomment the following line
|
||||
|
@ -218,9 +223,13 @@ export NORECOMMENDS=1
|
|||
# package on the CD. The default is 'true'.
|
||||
#export NOSUGGESTS=1
|
||||
|
||||
# Set to 1 to generate MD5 and SHA1 sums for generated images
|
||||
# Set to 1 to generate MD5/SHA1/SHA256/SHA512 sums for generated images
|
||||
export IMAGESUMS=1
|
||||
|
||||
# And define the set of checksum algorithms you want here. Default is
|
||||
# all of: md5 sha1 sha512 sha256
|
||||
# export CHECKSUMS="md5 sha1 sha512 sha256"
|
||||
|
||||
# We may have to extract files from packages to put them onto the CD
|
||||
# (e.g. bootloader files). If you make those packages (and their
|
||||
# sources) available somewhere, list it here so that README.source
|
||||
|
|
|
@ -17,6 +17,15 @@ debian-cd (3.1.4) UNRELEASED; urgency=low
|
|||
[ Steve McIntyre ]
|
||||
* Rename log.add_packages to add_packages.log
|
||||
* Add dependency on dpkg-dev for dpkg-architecture. Closes: #574879
|
||||
* Add support for forcing firmware packages onto CD#1:
|
||||
+ Add "FORCE_FIRMWARE=1" to CONF.sh to turn this on
|
||||
+ Will pick up on packages in the "firmware" task and install them
|
||||
+ Will also add sym-links to them in CD1/firmware so that new d-i code
|
||||
can find them easily.
|
||||
+ Will add a short sentence into README.html/README.txt
|
||||
* Add top-level control of which checksums are desired for output images
|
||||
see the CHECKSUMS setting in CONF.sh
|
||||
* Fix some bashisms in tools/apt-selection.
|
||||
|
||||
-- Steve McIntyre <93sam@debian.org> Tue, 27 Feb 2010 12:24:29 +0100
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@ rm -f $dir/README $dir/README.1ST \
|
|||
rm -f $dir/README.html
|
||||
cpp -traditional -undef -P -C -Wall -nostdinc -I$dir \
|
||||
-D DISKTYPE$DISKTYPE \
|
||||
-D FORCE_FIRMWARE="$FORCE_FIRMWARE" \
|
||||
-D COMPLETE="$COMPLETE" \
|
||||
-D OMIT_MANUAL="$OMIT_MANUAL" \
|
||||
-D OFFICIAL_VAL=$OFFICIAL_VAL \
|
||||
|
@ -59,6 +60,7 @@ lynx -dump -force_html $dir/README.html | todos \
|
|||
|
||||
cpp -traditional -undef -P -C -Wall -nostdinc -I $dir/ \
|
||||
-D DISKTYPE$DISKTYPE \
|
||||
-D FORCE_FIRMWARE="$FORCE_FIRMWARE" \
|
||||
-D OMIT_MANUAL="$OMIT_MANUAL" \
|
||||
-D OFFICIAL_VAL=$OFFICIAL_VAL \
|
||||
-D OMIT_RELEASE_NOTES="$OMIT_RELEASE_NOTES" \
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
# set -e
|
||||
|
||||
# Get the configuration information if necessary
|
||||
if [ -z "$CODENAME" -o -z "$ARCH" -o -z "$APTTMP" ]; then
|
||||
if [ -z "$CODENAME" ] || [ -z "$ARCH" ] || [ -z "$APTTMP" ]; then
|
||||
if [ -e CONF.sh ]; then
|
||||
. CONF.sh
|
||||
else
|
||||
echo "Please set the good environment variables before "
|
||||
echo "Please set up environment variables before "
|
||||
echo "launching this program ..."
|
||||
echo "Current values are :"
|
||||
echo "CODENAME=$CODENAME"
|
||||
|
@ -35,7 +35,7 @@ options=" -q -o Dir::State::status=$APTTMP/$CODENAME-$ARCH/status \
|
|||
-o APT::Architecture=$ARCH "
|
||||
|
||||
sections=main
|
||||
if [ "${NONFREE:-0}" != "0" -o "${EXTRANONFREE:-0}" != "0" ]; then
|
||||
if [ "${NONFREE:-0}" != "0" ] || [ "${EXTRANONFREE:-0}" != "0" ] || [ "${FORCE_FIRMWARE:-0}" != "0" ]; then
|
||||
sections="$sections non-free"
|
||||
fi
|
||||
if [ "${CONTRIB:-0}" != "0" ]; then
|
||||
|
@ -84,7 +84,7 @@ if [ ! -e "$APTTMP/$CODENAME-$ARCH/apt/sources.list" ]; then
|
|||
echo "$ADEB file:$MIRROR $DI_CODENAME main/debian-installer" \
|
||||
>> $APTTMP/$CODENAME-$ARCH/apt/sources.list
|
||||
fi
|
||||
if [ -n "$LOCAL" -a -e "${LOCALDEBS:-$MIRROR}/dists/$DI_CODENAME/local/debian-installer" ]; then
|
||||
if [ -n "$LOCAL" ] && [ -e "${LOCALDEBS:-$MIRROR}/dists/$DI_CODENAME/local/debian-installer" ]; then
|
||||
echo "$ADEB file:${LOCALDEBS:-$MIRROR} $DI_CODENAME local/debian-installer" \
|
||||
>> $APTTMP/$CODENAME-$ARCH/apt/sources.list
|
||||
fi
|
||||
|
@ -94,7 +94,7 @@ fi
|
|||
temp=$APTTMP/$CODENAME-$ARCH/temp.apt-selection
|
||||
|
||||
# Launch the command
|
||||
if [ "$1" = "update" -o "$1" = "check" ]; then
|
||||
if [ "$1" = "update" ] || [ "$1" = "check" ]; then
|
||||
apt-get $options $@
|
||||
exit $?
|
||||
elif [ "$1" = "cache" ]; then
|
||||
|
|
|
@ -91,6 +91,11 @@ bpalogin
|
|||
*/
|
||||
multipath-tools-boot
|
||||
|
||||
/* add the list of firmware packages here too if required */
|
||||
#ifdef FORCE_FIRMWARE
|
||||
# include <firmware>
|
||||
#endif
|
||||
|
||||
#ifdef ARCH_i386
|
||||
initramfs-tools
|
||||
busybox
|
||||
|
|
|
@ -6,7 +6,9 @@ if [ "$2"x != ""x ] ; then
|
|||
EXT="$2"
|
||||
fi
|
||||
|
||||
CHECKSUMS="sha1 md5 sha512 sha256"
|
||||
if [ "$CHECKSUMS"x = ""x ] ; then
|
||||
CHECKSUMS="sha1 md5 sha512 sha256"
|
||||
fi
|
||||
|
||||
for SUM in $CHECKSUMS; do
|
||||
UPSUM=`echo $SUM | tr 'a-z' 'A-Z'`
|
||||
|
|
|
@ -8,6 +8,7 @@ use strict;
|
|||
use Digest::MD5;
|
||||
use File::stat;
|
||||
use File::Find;
|
||||
use File::Basename;
|
||||
use Compress::Zlib;
|
||||
|
||||
my %pkginfo;
|
||||
|
@ -17,6 +18,7 @@ my $mkisofs_opts = "";
|
|||
my $mkisofs_dirs = "";
|
||||
my (@arches, @arches_nosrc, @overflowlist, @pkgs_added);
|
||||
my (@exclude_packages, @unexclude_packages, @excluded_package_list);
|
||||
my %firmware_package;
|
||||
|
||||
undef @pkgs_added;
|
||||
undef @exclude_packages;
|
||||
|
@ -163,6 +165,15 @@ if ($archlist =~ /m68k/ || $archlist =~ /powerpc/) {
|
|||
|
||||
print "Starting to lay out packages into $disktype ($diskdesc) images: $maxdiskblocks 2K-blocks maximum per image\n";
|
||||
|
||||
if (-e "$bdir/firmware-packages") {
|
||||
open(FWLIST, "$bdir/firmware-packages") or die "Unable to read firmware-packages file!\n";
|
||||
while (defined (my $pkg = <FWLIST>)) {
|
||||
chomp $pkg;
|
||||
$firmware_package{$pkg} = 1;
|
||||
}
|
||||
close(FWLIST);
|
||||
}
|
||||
|
||||
open(INLIST, "$bdir/packages") or die "No packages file!\n";
|
||||
while (defined (my $pkg = <INLIST>)) {
|
||||
chomp $pkg;
|
||||
|
@ -1075,6 +1086,14 @@ sub add_packages {
|
|||
$total_blocks += get_file_blocks($realfile);
|
||||
$total_blocks += good_link ($realfile, "$dir/$file");
|
||||
msg_ap(0, " Linked $dir/$file\n");
|
||||
if ($firmware_package{$pkgname}) {
|
||||
msg_ap(0, "Symlink fw package $pkgname into /firmware\n");
|
||||
if (! -d "$dir/firmware") {
|
||||
mkdir "$dir/firmware" or die "symlink failed $!\n";
|
||||
}
|
||||
symlink("../$file", "$dir/firmware/" . basename($file));
|
||||
msg_ap(0, "Symlink ../$file $dir/firmware/.\n");
|
||||
}
|
||||
} else {
|
||||
msg_ap(0, " $dir/$file already linked in\n");
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@ my $list = shift;
|
|||
|
||||
my $nonfree = $ENV{'NONFREE'} || 0;
|
||||
my $extranonfree = $ENV{'EXTRANONFREE'} || 0;
|
||||
my $force_firmware = $ENV{'FORCE_FIRMWARE'} || 0;
|
||||
my $local = $ENV{'LOCAL'} || 0;
|
||||
my $complete = $ENV{'COMPLETE'} || 0;
|
||||
my $norecommends = $ENV{'NORECOMMENDS'} || 0;
|
||||
|
@ -60,6 +61,8 @@ msg(1, "Complete selected packages with all the rest: ");
|
|||
msg(1, yesno($complete)."\n");
|
||||
msg(1, "Include non-free packages: ");
|
||||
msg(1, yesno($nonfree)."\n");
|
||||
msg(1, "Force inclusion of firmware packages: ");
|
||||
msg(1, yesno($force_firmware)."\n");
|
||||
msg(1, "======================================================================
|
||||
");
|
||||
|
||||
|
@ -81,6 +84,7 @@ while (defined($_=<AVAIL>)) {
|
|||
$packages{$p}{"Suggests"} = [];
|
||||
$packages{$p}{"Recommends"} = [];
|
||||
$packages{$p}{"IsUdeb"} = ($packages{$p}{"Filename"} =~ /.udeb$/) ? 1 : 0;
|
||||
$packages{$p}{"IsFirmware"} = ($packages{$p}{"Filename"} =~ /(firmware|microcode)/) ? 1 : 0;
|
||||
if ($packages{$p}{"Section"} =~ /contrib\//) {
|
||||
$packages{$p}{"Component"} = "contrib";
|
||||
} elsif ($packages{$p}{"Section"} =~ /non-free\//) {
|
||||
|
@ -103,9 +107,13 @@ my $count_excl = 0;
|
|||
if (not $nonfree) {
|
||||
foreach (grep { $packages{$_}{"Section"} =~ /non-free/ }
|
||||
(keys %packages)) {
|
||||
if ($force_firmware and $packages{$_}{"IsFirmware"}) {
|
||||
msg(1, "force_firmware: keeping non-free package $_\n");
|
||||
} else {
|
||||
$excluded{$_} = 'nonfree';
|
||||
$count_excl++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
msg(1, "Statistics:
|
||||
|
@ -292,13 +300,19 @@ foreach (glob("$dir/*.packages*")) {
|
|||
my $count = 0;
|
||||
open(CDLIST, "> $dir/packages.$arch")
|
||||
|| die "Can't write in $dir/$_.packages.$arch: $!\n";
|
||||
open(FWLIST, ">> $dir/firmware-packages")
|
||||
|| die "Can't write in $dir/firmware-packages: $!\n";
|
||||
foreach (@output) {
|
||||
my $component = $packages{$_}{"Component"};
|
||||
my $size = $packages{$_}{"Size"};
|
||||
print CDLIST "$arch:$component:$_:$size\n";
|
||||
if ($packages{$_}{"IsFirmware"}) {
|
||||
print FWLIST "$_\n";
|
||||
}
|
||||
$count++;
|
||||
}
|
||||
close CDLIST;
|
||||
close FWLIST;
|
||||
msg(0, "Done: processed/sorted $count packages, total size $output_size bytes.\n");
|
||||
|
||||
close LOG;
|
||||
|
|
Loading…
Reference in New Issue