VERBOSE_MAKE variable added.  allows the verbosity of the make process
    to be controlled, by determining if the lines start with a @ or not
  ATTEMPT_FALLBACK variable added.  allows one to control whether build_all.sh
    should bother to attempt to build a simple CD if the official build
    fails.

Makefile:
  o  added "set -e;" to the start of most of the blocks of shell commands to
     ensure that if one of the scripts fails, that fact is not ignored
  o  replaced many of the @'s with $(Q) and ensured that Q=@ by default.
     This allows one to see what make is actually doing when it all goes
     horribly wrong -- VERBOSE_MAKE in CONF.sh is used to control this

build_all.sh
  o  made it stop on error dependant on ATTEMPT_FALLBACK from CONF.sh

tools/pi-makelist:
  These are the changes by J.A. Bezemer to get rid of files from the list
  that are not available on ftp mirrors

tools/boot/potato/boot-alpha
  check to see if the boot1 directory already exists, and skip its creation
  if so.  This is required to deal with the fact that this script gets called
  for CD1 & CD1_NONUS, and making the directories twice fails, and is pointless
This commit is contained in:
Philip Hands 2000-08-25 16:54:03 +00:00
parent ef89f2f4fa
commit a03167f409
5 changed files with 189 additions and 97 deletions

View File

@ -80,3 +80,10 @@ export APTTMP=/ftp/tmp/apt
# export MKISOFS=/usr/bin/mkhybrid # export MKISOFS=/usr/bin/mkhybrid
# export MKISOFS_OPTS="-a -r -T" #For normal users # export MKISOFS_OPTS="-a -r -T" #For normal users
# export MKISOFS_OPTS="-a -r -F . -T" #For symlink farmers # export MKISOFS_OPTS="-a -r -F . -T" #For symlink farmers
# uncomment this to if you want to see more of what the Makefile is doing
#export VERBOSE_MAKE=1
# uncoment this to make build_all.sh try to build a simple CD image if
# the proper official CD run does not work
#ATTEMPT_FALLBACK=yes

143
Makefile
View File

@ -11,7 +11,9 @@
## DEFAULT VALUES ## DEFAULT VALUES
ifndef VERBOSE_MAKE
Q=@
endif
ifndef SIZELIMIT ifndef SIZELIMIT
SIZELIMIT=$(shell echo -n $$[ 610 * 1024 * 1024 ]) SIZELIMIT=$(shell echo -n $$[ 610 * 1024 * 1024 ])
endif endif
@ -154,34 +156,34 @@ ok:
# Creation of the directories needed # Creation of the directories needed
init: ok $(TDIR) $(BDIR) $(SDIR) $(ADIR) init: ok $(TDIR) $(BDIR) $(SDIR) $(ADIR)
$(TDIR): $(TDIR):
@mkdir -p $(TDIR) $(Q)mkdir -p $(TDIR)
$(BDIR): $(BDIR):
@mkdir -p $(BDIR) $(Q)mkdir -p $(BDIR)
$(SDIR): $(SDIR):
@mkdir -p $(SDIR) $(Q)mkdir -p $(SDIR)
$(ADIR): $(ADIR):
@mkdir -p $(ADIR) $(Q)mkdir -p $(ADIR)
## CLEANINGS ## ## CLEANINGS ##
# CLeans the current arch tree (but not packages selection info) # CLeans the current arch tree (but not packages selection info)
clean: ok bin-clean src-clean clean: ok bin-clean src-clean
bin-clean: bin-clean:
@-rm -rf $(BDIR)/[1234567890] $(Q)-rm -rf $(BDIR)/[1234567890]
@-rm -f $(BDIR)/packages-stamp $(BDIR)/bootable-stamp \ $(Q)-rm -f $(BDIR)/packages-stamp $(BDIR)/bootable-stamp \
$(BDIR)/upgrade-stamp $(BDIR)/upgrade-stamp
src-clean: src-clean:
@-rm -rf $(SDIR)/[1234567890] $(Q)-rm -rf $(SDIR)/[1234567890]
@-rm -rf $(SDIR)/sources-stamp $(Q)-rm -rf $(SDIR)/sources-stamp
# Completely cleans the current arch tree # Completely cleans the current arch tree
realclean: distclean realclean: distclean
distclean: ok bin-distclean src-distclean distclean: ok bin-distclean src-distclean
bin-distclean: bin-distclean:
@-rm -rf $(BDIR) $(Q)-rm -rf $(BDIR)
@-rm -rf $(ADIR) $(Q)-rm -rf $(ADIR)
src-distclean: src-distclean:
@-rm -rf $(SDIR) $(Q)-rm -rf $(SDIR)
## STATUS and APT ## ## STATUS and APT ##
@ -191,18 +193,18 @@ src-distclean:
status: init $(ADIR)/status status: init $(ADIR)/status
$(ADIR)/status: $(ADIR)/status:
@echo "Generating a fake status file for apt-get and apt-cache..." @echo "Generating a fake status file for apt-get and apt-cache..."
@zcat $(MIRROR)/dists/$(CODENAME)/main/binary-$(ARCH)/Packages.gz | \ $(Q)zcat $(MIRROR)/dists/$(CODENAME)/main/binary-$(ARCH)/Packages.gz | \
perl -000 -ne 's/^(Package: .*)$$/$$1\nStatus: install ok installed/m; \ perl -000 -ne 's/^(Package: .*)$$/$$1\nStatus: install ok installed/m; \
print if (/^Priority: (required|important|standard)/m or \ print if (/^Priority: (required|important|standard)/m or \
/^Section: base/m);' \ /^Section: base/m);' \
> $(ADIR)/status > $(ADIR)/status
# Updating the apt database # Updating the apt database
@$(apt) update $(Q)$(apt) update
# #
# Checking the consistence of the standard system # Checking the consistence of the standard system
# If this does fail, then launch make correctstatus # If this does fail, then launch make correctstatus
# #
@$(apt) check || $(MAKE) correctstatus $(Q)$(apt) check || $(MAKE) correctstatus
# Only useful if the standard system is broken # Only useful if the standard system is broken
# It tries to build a better status file with apt-get -f install # It tries to build a better status file with apt-get -f install
@ -211,14 +213,16 @@ correctstatus: status apt-update
# in order to correct all dependencies # in order to correct all dependencies
# #
# Removing packages from the system : # Removing packages from the system :
@for i in `$(apt) deselected -f install`; do \ $(Q)set -e; \
for i in `$(apt) deselected -f install`; do \
echo $$i; \ echo $$i; \
perl -i -000 -ne "print unless /^Package: \Q$$i\E/m" \ perl -i -000 -ne "print unless /^Package: \Q$$i\E/m" \
$(ADIR)/status; \ $(ADIR)/status; \
done done
# #
# Adding packages to the system : # Adding packages to the system :
@for i in `$(apt) selected -f install`; do \ $(Q)set -e; \
for i in `$(apt) selected -f install`; do \
echo $$i; \ echo $$i; \
$(apt) cache dumpavail | perl -000 -ne \ $(apt) cache dumpavail | perl -000 -ne \
"s/^(Package: .*)\$$/\$$1\nStatus: install ok installed/m; \ "s/^(Package: .*)\$$/\$$1\nStatus: install ok installed/m; \
@ -227,19 +231,19 @@ correctstatus: status apt-update
done done
# #
# Showing the output of apt-get check : # Showing the output of apt-get check :
@$(apt) check $(Q)$(apt) check
apt-update: status apt-update: status
@echo "Apt-get is updating his files ..." @echo "Apt-get is updating his files ..."
@$(apt) update $(Q)$(apt) update
## GENERATING LISTS ## ## GENERATING LISTS ##
# Deleting the list only # Deleting the list only
deletelist: ok deletelist: ok
@-rm $(BDIR)/rawlist $(Q)-rm $(BDIR)/rawlist
@-rm $(BDIR)/list $(Q)-rm $(BDIR)/list
# Generates the list of packages/files to put on each CD # Generates the list of packages/files to put on each CD
list: bin-list src-list list: bin-list src-list
@ -248,9 +252,10 @@ list: bin-list src-list
bin-list: ok apt-update genlist $(BDIR)/1.packages bin-list: ok apt-update genlist $(BDIR)/1.packages
$(BDIR)/1.packages: $(BDIR)/1.packages:
@echo "Dispatching the packages on all the CDs ..." @echo "Dispatching the packages on all the CDs ..."
@$(list2cds) $(BDIR)/list $(SIZELIMIT) $(Q)$(list2cds) $(BDIR)/list $(SIZELIMIT)
ifdef FORCENONUSONCD1 ifdef FORCENONUSONCD1
@for file in $(BDIR)/*.packages; do \ $(Q)set -e; \
for file in $(BDIR)/*.packages; do \
newfile=$${file%%.packages}_NONUS.packages; \ newfile=$${file%%.packages}_NONUS.packages; \
cp $$file $$newfile; \ cp $$file $$newfile; \
$(strip_nonus_bin) $$file $$file.tmp; \ $(strip_nonus_bin) $$file $$file.tmp; \
@ -268,9 +273,10 @@ endif
src-list: bin-list $(SDIR)/1.sources src-list: bin-list $(SDIR)/1.sources
$(SDIR)/1.sources: $(SDIR)/1.sources:
@echo "Dispatching the sources on all the CDs ..." @echo "Dispatching the sources on all the CDs ..."
@$(cds2src) $(SIZELIMIT) $(Q)$(cds2src) $(SIZELIMIT)
ifdef FORCENONUSONCD1 ifdef FORCENONUSONCD1
@for file in $(SDIR)/*.sources; do \ $(Q)set -e; \
for file in $(SDIR)/*.sources; do \
newfile=$${file%%.sources}_NONUS.sources; \ newfile=$${file%%.sources}_NONUS.sources; \
cp $$file $$newfile; \ cp $$file $$newfile; \
grep -v non-US $$file >$$file.tmp; \ grep -v non-US $$file >$$file.tmp; \
@ -288,7 +294,7 @@ endif
genlist: ok $(BDIR)/list genlist: ok $(BDIR)/list
$(BDIR)/list: $(BDIR)/rawlist $(BDIR)/list: $(BDIR)/rawlist
@echo "Generating the complete list of packages to be included ..." @echo "Generating the complete list of packages to be included ..."
@perl -ne 'chomp; next if /^\s*$$/; \ $(Q)perl -ne 'chomp; next if /^\s*$$/; \
print "$$_\n" if not $$seen{$$_}; $$seen{$$_}++;' \ print "$$_\n" if not $$seen{$$_}; $$seen{$$_}++;' \
$(BDIR)/rawlist \ $(BDIR)/rawlist \
> $(BDIR)/list > $(BDIR)/list
@ -296,10 +302,10 @@ $(BDIR)/list: $(BDIR)/rawlist
# Build the raw list (cpp output) with doubles and spaces # Build the raw list (cpp output) with doubles and spaces
$(BDIR)/rawlist: $(BDIR)/rawlist:
ifdef FORCENONUSONCD1 ifdef FORCENONUSONCD1
@find $(NONUS)/dists/$(CODENAME) | grep binary-.*/.*deb | \ $(Q)find $(NONUS)/dists/$(CODENAME) | grep binary-.*/.*deb | \
sed 's/.*\///g;s/_.*//g' | sort | uniq > $(BDIR)/Debian_$(CODENAME)_nonUS sed 's/.*\///g;s/_.*//g' | sort | uniq > $(BDIR)/Debian_$(CODENAME)_nonUS
endif endif
@perl -npe 's/\@ARCH\@/$(ARCH)/g' $(TASK) | \ $(Q)perl -npe 's/\@ARCH\@/$(ARCH)/g' $(TASK) | \
cpp -nostdinc -nostdinc++ -P -undef -D ARCH=$(ARCH) -D ARCH_$(ARCH) \ cpp -nostdinc -nostdinc++ -P -undef -D ARCH=$(ARCH) -D ARCH_$(ARCH) \
-DFORCENONUSONCD1=$(forcenonusoncd1) \ -DFORCENONUSONCD1=$(forcenonusoncd1) \
-I $(BASEDIR)/tasks -I $(BDIR) - - >> $(BDIR)/rawlist -I $(BASEDIR)/tasks -I $(BDIR) - - >> $(BDIR)/rawlist
@ -312,7 +318,8 @@ tree: bin-tree src-tree
bin-tree: ok bin-list $(BDIR)/CD1/debian bin-tree: ok bin-list $(BDIR)/CD1/debian
$(BDIR)/CD1/debian: $(BDIR)/CD1/debian:
@echo "Adding the required directories to the binary CDs ..." @echo "Adding the required directories to the binary CDs ..."
@for i in $(BDIR)/*.packages; do \ $(Q)set -e; \
for i in $(BDIR)/*.packages; do \
dir=$${i%%.packages}; \ dir=$${i%%.packages}; \
dir=$${dir##$(BDIR)/}; \ dir=$${dir##$(BDIR)/}; \
dir=$(BDIR)/CD$$dir; \ dir=$(BDIR)/CD$$dir; \
@ -323,7 +330,8 @@ $(BDIR)/CD1/debian:
src-tree: ok src-list $(SDIR)/CD1/debian src-tree: ok src-list $(SDIR)/CD1/debian
$(SDIR)/CD1/debian: $(SDIR)/CD1/debian:
@echo "Adding the required directories to the source CDs ..." @echo "Adding the required directories to the source CDs ..."
@for i in $(SDIR)/*.sources; do \ $(Q)set -e; \
for i in $(SDIR)/*.sources; do \
dir=$${i%%.sources}; \ dir=$${i%%.sources}; \
dir=$${dir##$(SDIR)/}; \ dir=$${dir##$(SDIR)/}; \
dir=$(SDIR)/CD$$dir; \ dir=$(SDIR)/CD$$dir; \
@ -336,7 +344,8 @@ infos: bin-infos src-infos
bin-infos: bin-tree $(BDIR)/CD1/.disk/info bin-infos: bin-tree $(BDIR)/CD1/.disk/info
$(BDIR)/CD1/.disk/info: $(BDIR)/CD1/.disk/info:
@echo "Generating the binary CD labels and their volume ids ..." @echo "Generating the binary CD labels and their volume ids ..."
@nb=`ls -l $(BDIR)/?.packages | wc -l | tr -d " "`; num=0;\ $(Q)set -e; \
nb=`ls -l $(BDIR)/?.packages | wc -l | tr -d " "`; num=0;\
DATE=`date +%Y%m%d`; \ DATE=`date +%Y%m%d`; \
for i in $(BDIR)/*.packages; do \ for i in $(BDIR)/*.packages; do \
num=$${i%%.packages}; num=$${num##$(BDIR)/}; \ num=$${i%%.packages}; num=$${num##$(BDIR)/}; \
@ -366,7 +375,8 @@ $(BDIR)/CD1/.disk/info:
src-infos: src-tree $(SDIR)/CD1/.disk/info src-infos: src-tree $(SDIR)/CD1/.disk/info
$(SDIR)/CD1/.disk/info: $(SDIR)/CD1/.disk/info:
@echo "Generating the source CD labels and their volume ids ..." @echo "Generating the source CD labels and their volume ids ..."
@nb=`ls -l $(SDIR)/?.sources | wc -l | tr -d " "`; num=0;\ $(Q)set -e; \
nb=`ls -l $(SDIR)/?.sources | wc -l | tr -d " "`; num=0;\
DATE=`date +%Y%m%d`; \ DATE=`date +%Y%m%d`; \
for i in $(SDIR)/*.sources; do \ for i in $(SDIR)/*.sources; do \
num=$${i%%.sources}; num=$${num##$(SDIR)/}; \ num=$${i%%.sources}; num=$${num##$(SDIR)/}; \
@ -398,7 +408,8 @@ $(SDIR)/CD1/.disk/info:
packages: bin-infos bin-list $(BDIR)/packages-stamp packages: bin-infos bin-list $(BDIR)/packages-stamp
$(BDIR)/packages-stamp: $(BDIR)/packages-stamp:
@echo "Adding the selected packages to each CD :" @echo "Adding the selected packages to each CD :"
@for i in $(BDIR)/*.packages; do \ $(Q)set -e; \
for i in $(BDIR)/*.packages; do \
dir=$${i%%.packages}; \ dir=$${i%%.packages}; \
n=$${dir##$(BDIR)/}; \ n=$${dir##$(BDIR)/}; \
dir=$(BDIR)/CD$$n; \ dir=$(BDIR)/CD$$n; \
@ -411,18 +422,20 @@ $(BDIR)/packages-stamp:
echo "done."; \ echo "done."; \
done done
@#Now install the Packages and Packages.cd files @#Now install the Packages and Packages.cd files
@for i in $(BDIR)/*.packages; do \ $(Q)set -e; \
for i in $(BDIR)/*.packages; do \
dir=$${i%%.packages}; \ dir=$${i%%.packages}; \
dir=$${dir##$(BDIR)/}; \ dir=$${dir##$(BDIR)/}; \
dir=$(BDIR)/CD$$dir; \ dir=$(BDIR)/CD$$dir; \
$(scanpackages) install $$dir; \ $(scanpackages) install $$dir; \
done done
@touch $(BDIR)/packages-stamp $(Q)touch $(BDIR)/packages-stamp
sources: src-infos src-list $(SDIR)/sources-stamp sources: src-infos src-list $(SDIR)/sources-stamp
$(SDIR)/sources-stamp: $(SDIR)/sources-stamp:
@echo "Adding the selected sources to each CD." @echo "Adding the selected sources to each CD."
@for i in $(SDIR)/*.sources; do \ $(Q)set -e; \
for i in $(SDIR)/*.sources; do \
dir=$${i%%.sources}; \ dir=$${i%%.sources}; \
n=$${dir##$(SDIR)/}; \ n=$${dir##$(SDIR)/}; \
dir=$(SDIR)/CD$$n; \ dir=$(SDIR)/CD$$n; \
@ -434,7 +447,7 @@ $(SDIR)/sources-stamp:
$(scansources) $$dir; \ $(scansources) $$dir; \
echo "done."; \ echo "done."; \
done done
@touch $(SDIR)/sources-stamp $(Q)touch $(SDIR)/sources-stamp
## BOOT & DOC & INSTALL ## ## BOOT & DOC & INSTALL ##
@ -442,34 +455,38 @@ $(SDIR)/sources-stamp:
bootable: ok disks installtools $(BDIR)/bootable-stamp bootable: ok disks installtools $(BDIR)/bootable-stamp
$(BDIR)/bootable-stamp: $(BDIR)/bootable-stamp:
@echo "Making the binary CDs bootable ..." @echo "Making the binary CDs bootable ..."
@for file in $(BDIR)/*.packages; do \ $(Q)set -e; \
for file in $(BDIR)/*.packages; do \
dir=$${file%%.packages}; \ dir=$${file%%.packages}; \
n=$${dir##$(BDIR)/}; \ n=$${dir##$(BDIR)/}; \
dir=$(BDIR)/CD$$n; \ dir=$(BDIR)/CD$$n; \
if [ -f $(BASEDIR)/tools/boot/$(CODENAME)/boot-$(ARCH) ]; then \ if [ -f $(BASEDIR)/tools/boot/$(CODENAME)/boot-$(ARCH) ]; then \
cd $(BDIR); \ cd $(BDIR); \
echo "Running tools/boot/$(CODENAME)/boot-$(ARCH) $$n $$dir" ; \
$(BASEDIR)/tools/boot/$(CODENAME)/boot-$(ARCH) $$n $$dir; \ $(BASEDIR)/tools/boot/$(CODENAME)/boot-$(ARCH) $$n $$dir; \
else \ else \
echo "No script to make CDs bootable for $(ARCH) ..."; \ echo "No script to make CDs bootable for $(ARCH) ..."; \
exit 1; \ exit 1; \
fi; \ fi; \
done done
@touch $(BDIR)/bootable-stamp $(Q)touch $(BDIR)/bootable-stamp
# Add the doc files to the CDs and the Release-Notes and the # Add the doc files to the CDs and the Release-Notes and the
# Contents-$(ARCH).gz files # Contents-$(ARCH).gz files
bin-doc: ok bin-infos $(BDIR)/CD1/doc bin-doc: ok bin-infos $(BDIR)/CD1/doc
$(BDIR)/CD1/doc: $(BDIR)/CD1/doc:
@echo "Adding the documentation (bin) ..." @echo "Adding the documentation (bin) ..."
@for DISK in $(FIRSTDISKS) ; do \ $(Q)set -e; \
for DISK in $(FIRSTDISKS) ; do \
$(addfiles) $(BDIR)/$$DISK $(MIRROR) doc; \ $(addfiles) $(BDIR)/$$DISK $(MIRROR) doc; \
done done
@$(add_bin_doc) # Common stuff for all disks $(Q)$(add_bin_doc) # Common stuff for all disks
src-doc: ok src-infos $(SDIR)/CD1/README.html src-doc: ok src-infos $(SDIR)/CD1/README.html
$(SDIR)/CD1/README.html: $(SDIR)/CD1/README.html:
@echo "Adding the documentation (src) ..." @echo "Adding the documentation (src) ..."
@for i in $(SDIR)/*.sources; do \ $(Q)set -e; \
for i in $(SDIR)/*.sources; do \
dir=$${i%%.sources}; \ dir=$${i%%.sources}; \
dir=$${dir##$(SDIR)/}; \ dir=$${dir##$(SDIR)/}; \
dir=$(SDIR)/CD$$dir; \ dir=$(SDIR)/CD$$dir; \
@ -494,7 +511,8 @@ $(SDIR)/CD1/README.html:
installtools: ok bin-doc disks $(BDIR)/CD1/tools installtools: ok bin-doc disks $(BDIR)/CD1/tools
$(BDIR)/CD1/tools: $(BDIR)/CD1/tools:
@echo "Adding install tools and documentation ..." @echo "Adding install tools and documentation ..."
@for DISK in $(FIRSTDISKS) ; do \ $(Q)set -e; \
for DISK in $(FIRSTDISKS) ; do \
$(addfiles) $(BDIR)/$$DISK $(MIRROR) tools ; \ $(addfiles) $(BDIR)/$$DISK $(MIRROR) tools ; \
mkdir $(BDIR)/$$DISK/install ; \ mkdir $(BDIR)/$$DISK/install ; \
if [ -x "$(BASEDIR)/tools/$(CODENAME)/installtools.sh" ]; then \ if [ -x "$(BASEDIR)/tools/$(CODENAME)/installtools.sh" ]; then \
@ -506,7 +524,8 @@ $(BDIR)/CD1/tools:
disks: ok bin-infos $(BDIR)/CD1/dists/$(CODENAME)/main/disks-$(ARCH) disks: ok bin-infos $(BDIR)/CD1/dists/$(CODENAME)/main/disks-$(ARCH)
$(BDIR)/CD1/dists/$(CODENAME)/main/disks-$(ARCH): $(BDIR)/CD1/dists/$(CODENAME)/main/disks-$(ARCH):
@echo "Adding disks-$(ARCH) stuff ..." @echo "Adding disks-$(ARCH) stuff ..."
@for DISK in $(FIRSTDISKS) ; do \ $(Q)set -e; \
for DISK in $(FIRSTDISKS) ; do \
mkdir -p $(BDIR)/$$DISK/dists/$(CODENAME)/main/disks-$(ARCH) ; \ mkdir -p $(BDIR)/$$DISK/dists/$(CODENAME)/main/disks-$(ARCH) ; \
$(addfiles) \ $(addfiles) \
$(BDIR)/$$DISK/dists/$(CODENAME)/main/disks-$(ARCH) \ $(BDIR)/$$DISK/dists/$(CODENAME)/main/disks-$(ARCH) \
@ -526,43 +545,43 @@ $(BDIR)/CD1/dists/$(CODENAME)/main/disks-$(ARCH):
upgrade: ok bin-infos $(BDIR)/upgrade-stamp upgrade: ok bin-infos $(BDIR)/upgrade-stamp
$(BDIR)/upgrade-stamp: $(BDIR)/upgrade-stamp:
@echo "Trying to add upgrade* directories ..." @echo "Trying to add upgrade* directories ..."
@if [ -x "$(BASEDIR)/tools/$(CODENAME)/upgrade.sh" ]; then \ $(Q)if [ -x "$(BASEDIR)/tools/$(CODENAME)/upgrade.sh" ]; then \
$(BASEDIR)/tools/$(CODENAME)/upgrade.sh; \ $(BASEDIR)/tools/$(CODENAME)/upgrade.sh; \
fi fi
@if [ -x "$(BASEDIR)/tools/$(CODENAME)/upgrade-$(ARCH).sh" ]; then \ $(Q)if [ -x "$(BASEDIR)/tools/$(CODENAME)/upgrade-$(ARCH).sh" ]; then \
$(BASEDIR)/tools/$(CODENAME)/upgrade-$(ARCH).sh; \ $(BASEDIR)/tools/$(CODENAME)/upgrade-$(ARCH).sh; \
fi fi
@touch $(BDIR)/upgrade-stamp $(Q)touch $(BDIR)/upgrade-stamp
## EXTRAS ## ## EXTRAS ##
# Launch the extras scripts correctly for customizing the CDs # Launch the extras scripts correctly for customizing the CDs
extras: bin-extras extras: bin-extras
bin-extras: ok bin-extras: ok
@if [ -z "$(DIR)" -o -z "$(CD)" -o -z "$(ROOTSRC)" ]; then \ $(Q)if [ -z "$(DIR)" -o -z "$(CD)" -o -z "$(ROOTSRC)" ]; then \
echo "Give me more parameters (DIR, CD and ROOTSRC are required)."; \ echo "Give me more parameters (DIR, CD and ROOTSRC are required)."; \
false; \ false; \
fi fi
@echo "Adding dirs '$(DIR)' from '$(ROOTSRC)' to '$(BDIR)/$(CD)'" ... @echo "Adding dirs '$(DIR)' from '$(ROOTSRC)' to '$(BDIR)/$(CD)'" ...
@$(addfiles) $(BDIR)/$(CD) $(ROOTSRC) $(DIR) $(Q)$(addfiles) $(BDIR)/$(CD) $(ROOTSRC) $(DIR)
src-extras: src-extras:
@if [ -z "$(DIR)" -o -z "$(CD)" -o -z "$(ROOTSRC)" ]; then \ $(Q)if [ -z "$(DIR)" -o -z "$(CD)" -o -z "$(ROOTSRC)" ]; then \
echo "Give me more parameters (DIR, CD and ROOTSRC are required)."; \ echo "Give me more parameters (DIR, CD and ROOTSRC are required)."; \
false; \ false; \
fi fi
@echo "Adding dirs '$(DIR)' from '$(ROOTSRC)' to '$(SDIR)/$(CD)'" ... @echo "Adding dirs '$(DIR)' from '$(ROOTSRC)' to '$(SDIR)/$(CD)'" ...
@$(addfiles) $(SDIR)/$(CD) $(ROOTSRC) $(DIR) $(Q)$(addfiles) $(SDIR)/$(CD) $(ROOTSRC) $(DIR)
## IMAGE BUILDING ## ## IMAGE BUILDING ##
# Get some size info about the build dirs # Get some size info about the build dirs
imagesinfo: bin-imagesinfo imagesinfo: bin-imagesinfo
bin-imagesinfo: ok bin-imagesinfo: ok
@for i in $(BDIR)/*.packages; do \ $(Q)for i in $(BDIR)/*.packages; do \
echo `du -sb $${i%%.packages}`; \ echo `du -sb $${i%%.packages}`; \
done done
src-imagesinfo: ok src-imagesinfo: ok
@for i in $(SDIR)/*.sources; do \ $(Q)for i in $(SDIR)/*.sources; do \
echo `du -sb $${i%%.sources}`; \ echo `du -sb $${i%%.sources}`; \
done done
@ -571,7 +590,8 @@ md5list: bin-md5list src-md5list
bin-md5list: ok packages $(BDIR)/CD1/md5sum.txt bin-md5list: ok packages $(BDIR)/CD1/md5sum.txt
$(BDIR)/CD1/md5sum.txt: $(BDIR)/CD1/md5sum.txt:
@echo "Generating md5sum of files from all the binary CDs ..." @echo "Generating md5sum of files from all the binary CDs ..."
@for file in $(BDIR)/*.packages; do \ $(Q)set -e; \
for file in $(BDIR)/*.packages; do \
dir=$${file%%.packages}; \ dir=$${file%%.packages}; \
n=$${dir##$(BDIR)/}; \ n=$${dir##$(BDIR)/}; \
dir=$(BDIR)/CD$$n; \ dir=$(BDIR)/CD$$n; \
@ -584,7 +604,8 @@ $(BDIR)/CD1/md5sum.txt:
src-md5list: ok sources $(SDIR)/CD1/md5sum.txt src-md5list: ok sources $(SDIR)/CD1/md5sum.txt
$(SDIR)/CD1/md5sum.txt: $(SDIR)/CD1/md5sum.txt:
@echo "Generating md5sum of files from all the source CDs ..." @echo "Generating md5sum of files from all the source CDs ..."
@for file in $(SDIR)/*.sources; do \ $(Q)set -e; \
for file in $(SDIR)/*.sources; do \
dir=$${file%%.sources}; \ dir=$${file%%.sources}; \
dir=$${dir##$(SDIR)/}; \ dir=$${dir##$(SDIR)/}; \
dir=$(SDIR)/CD$$dir; \ dir=$(SDIR)/CD$$dir; \
@ -598,7 +619,7 @@ $(SDIR)/CD1/md5sum.txt:
images: bin-images src-images images: bin-images src-images
bin-images: ok bin-md5list $(OUT) bin-images: ok bin-md5list $(OUT)
@echo "Generating the binary iso images ..." @echo "Generating the binary iso images ..."
@set -e; \ $(Q)set -e; \
for file in $(BDIR)/*.packages; do \ for file in $(BDIR)/*.packages; do \
dir=$${file%%.packages}; \ dir=$${file%%.packages}; \
n=$${dir##$(BDIR)/}; \ n=$${dir##$(BDIR)/}; \
@ -616,7 +637,7 @@ bin-images: ok bin-md5list $(OUT)
done done
src-images: ok src-md5list $(OUT) src-images: ok src-md5list $(OUT)
@echo "Generating the source iso images ..." @echo "Generating the source iso images ..."
@set -e; \ $(Q)set -e; \
for file in $(SDIR)/*.sources; do \ for file in $(SDIR)/*.sources; do \
dir=$${file%%.sources}; \ dir=$${file%%.sources}; \
n=$${dir##$(SDIR)/}; \ n=$${dir##$(SDIR)/}; \
@ -631,7 +652,7 @@ src-images: ok src-md5list $(OUT)
# Generate the *.list files for the Pseudo Image Kit # Generate the *.list files for the Pseudo Image Kit
pi-makelist: pi-makelist:
@set -e; \ $(Q)set -e; \
cd $(OUT); for file in `find * -name \*.raw`; do \ cd $(OUT); for file in `find * -name \*.raw`; do \
$(BASEDIR)/tools/pi-makelist \ $(BASEDIR)/tools/pi-makelist \
$$file > $${file%%.raw}.list; \ $$file > $${file%%.raw}.list; \
@ -661,7 +682,7 @@ src-image: ok src-md5list $(OUT)
#Calculate the md5sums for the images #Calculate the md5sums for the images
imagesums: imagesums:
@cd $(OUT); :> MD5SUMS; for file in `find * -name \*.raw`; do \ $(Q)cd $(OUT); :> MD5SUMS; for file in `find * -name \*.raw`; do \
md5sum $$file >>MD5SUMS; \ md5sum $$file >>MD5SUMS; \
done done
@ -677,7 +698,7 @@ conf:
sensible-editor $(BASEDIR)/CONF.sh sensible-editor $(BASEDIR)/CONF.sh
mirrorcheck: ok apt-update mirrorcheck: ok apt-update
@$(apt) cache dumpavail | $(mirrorcheck) $(Q)$(apt) cache dumpavail | $(mirrorcheck)
# Little trick to simplify things # Little trick to simplify things
official_images: bin-official_images src-official_images official_images: bin-official_images src-official_images
@ -686,5 +707,5 @@ src-official_images: ok src-doc src-images
$(CODENAME)_status: ok init $(CODENAME)_status: ok init
@echo "Using the provided status file for $(CODENAME)-$(ARCH) ..." @echo "Using the provided status file for $(CODENAME)-$(ARCH) ..."
@cp $(BASEDIR)/data/$(CODENAME)/status.$(ARCH) $(ADIR)/status \ $(Q)cp $(BASEDIR)/data/$(CODENAME)/status.$(ARCH) $(ADIR)/status \
2>/dev/null || $(MAKE) status || $(MAKE) correctstatus 2>/dev/null || $(MAKE) status || $(MAKE) correctstatus

View File

@ -53,10 +53,14 @@ do
make bin-official_images make bin-official_images
if [ $? -gt 0 ]; then if [ $? -gt 0 ]; then
echo "ERROR WHILE BUILDING OFFICIAL IMAGES !!" >&2 echo "ERROR WHILE BUILDING OFFICIAL IMAGES !!" >&2
echo "I'll try to build a simple (non-bootable) CD" >&2 if [ "$ATTEMPT_FALLBACK" = "yes" ]; then
make clean echo "I'll try to build a simple (non-bootable) CD" >&2
make installtools make clean
make bin-images make installtools
make bin-images
else
exit 1
fi
fi fi
echo Generating MD5Sums of the images echo Generating MD5Sums of the images
make imagesums make imagesums

View File

@ -22,11 +22,15 @@ if [ $N != 1 -a $N != 1_NONUS ]; then
exit 0; exit 0;
fi fi
# Hack for bootable disks
mkdir -p boot1/boot
echo -n "-J boot1" > $N.mkisofs_opts echo -n "-J boot1" > $N.mkisofs_opts
# Hack for bootable disks
test -d boot1 && {
echo "skipping the rest, because boot1 exists already"
exit 0
}
mkdir -p boot1/boot
# Use the generic linux image # Use the generic linux image
cp -f $CDDIR/dists/stable/main/disks-$ARCH/current/linux \ cp -f $CDDIR/dists/stable/main/disks-$ARCH/current/linux \
boot1/boot/linux boot1/boot/linux

View File

@ -2,7 +2,7 @@
if [ "$1" == "" ] ; then if [ "$1" == "" ] ; then
echo "" echo ""
echo 'Usage: pi-makelist cdimage.iso > cdimage.iso.list' echo 'Usage: pi-makelist cdimage.iso > cdimage.list'
echo "" echo ""
echo "Will print on stdout the ordered list of files in the ISO 9660 image." echo "Will print on stdout the ordered list of files in the ISO 9660 image."
echo "" echo ""
@ -17,45 +17,101 @@ fi
PATH="$PATH":. PATH="$PATH":.
export PATH export PATH
# We need a tempfile. tempfile(1) is in debianutils >= 1.6
# You can also insert some fixed name here, but then you can run
# only one pi-makelist at a time.
TEMPF=`tempfile --prefix pimkl --mode 644`
# The rest is one long pipe. The best way to find out why it works is # The rest is one long pipe. The best way to find out why it works is
# to comment out all but the first command, and then remove one hash # to comment out all but the first command, and then remove one hash
# each run. # each run.
isoinfo -i "$1" -R -l -f \ isoinfo -i "$1" -R -l -f \
| grep -B 1 '^-' \ | grep -B 1 '^-' \
| grep -v '^--$' \ | grep -v '^--$' \
| ( | (
while read ThisFile; do while read ThisFile; do
read ThisInfoLine read ThisInfoLine
echo "$ThisInfoLine" ["$ThisFile"] echo "$ThisInfoLine" ["$ThisFile"]
done done
) \ ) \
| tr ']' '[' \ | tr ']' '[' \
| cut -d '[' -f 2,4 \ | cut -d '[' -f 2,4 \
| sort \ | sort \
| cut -d '[' -f 2 \ | cut -d '[' -f 2 \
| grep -v -e '/Packages' \ | grep -v \
-e '/Sources' \ -e '/Packages' \
-e 'TRANS.TBL$' \ -e '/Sources' \
-e '^/md5sum.txt$' \ -e 'TRANS\.TBL$' \
-e '^/Release-Notes$' \ -e '^/md5sum\.txt$' \
-e '^/README.1ST$' \ -e '/Release-Notes$' \
-e '^/README.multicd$' \ -e '^/README\.1ST$' \
-e '^/.disk/' \ -e '^/README\.multicd$' \
-e '^/boot/' \ -e '^/\.disk/' \
-e '^/install/' \ -e '^/boot/' \
-e '^/tools/.*/' \ -e '^/tools/.*/' \
-e '^/tools/README.tools$' \ -e '^/tools/README\.tools$' \
-e '.info$' \ -e '\.info$' \
-e '.m68k$' \ -e '\.m68k$' \
-e '^/m68k-faq/' \ -e '^/m68k-faq/' \
-e '^/m68k-tools/' \ -e '^/m68k-tools/' \
-e '^/extras/' -e '^/extras/' \
-e '^/dedication\.txt$' \
-e '^/README\.html$' \
-e '^/README\.txt$' \
-e '^/etc/' \
-e '^/pics/' \
-e '^/doc/package-developer/hello' \
-e '^/milo/' \
-e '^/apb/' \
-e '^/linux$' \
> "$TEMPF"
# Temporarily block the pipe, since we need to inspect it's contents
# Some magic to determine the architecture and codename
# (Doesn't work for source CDs, but isn't needed there, either)
L=` \
grep '/dists/.*/binary-' \
< "$TEMPF" \
| grep -v '/binary-all/' \
| head -1 \
| sed -e 's|/dists/\([^/]*\)/.*/binary-\([^/]*\)/.*|\1:\2|' \
`
ARCH=`echo "$L" | cut -d ':' -f 2`
CODENAME=`echo "$L" | cut -d ':' -f 1`
#echo Arch: "$ARCH" Codename: "$CODENAME"
# Now the rest of the pipe
sed -e 's|^/upgrade/|/dists/'"$CODENAME"'/main/upgrade-'"$ARCH"'/|' \
< "$TEMPF" \
| (
if [ x"$ARCH" = xm68k ] ; then
sed -e 's|^/install/|/dists/'"$CODENAME"'/main/disks-'"$ARCH"'/current/|'
else
grep -v '^/install'
fi
) \
| (
# See if it's really non-US
# If not, then also delete non-US/{Contents,Release} etc.
if grep -q '^/dists/.*/non-US/.*\.d[es][bc]$' "$TEMPF" ; then
cat
else
grep -v '^/dists/.*/non-US/'
fi
) \
| grep -v '/disks-.*/index\.html$'
# Remove tempfile
rm -f "$TEMPF"
# Note: we grep /install/ out because contents are also on other places
# on the CD; rsync will duplicate them. Same with /boot/resc1440.bin
# (/boot/boot.catalog is made during image generation).
# Packages[.cd][.gz] are usually not the same as those on FTP. Same with # Packages[.cd][.gz] are usually not the same as those on FTP. Same with
# Sources[.gz]. # Sources[.gz].
# And the /tools are only zipped on FTP. # And the /tools are only zipped on FTP.