CONF.sh:
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:
parent
ef89f2f4fa
commit
a03167f409
7
CONF.sh
7
CONF.sh
|
@ -80,3 +80,10 @@ export APTTMP=/ftp/tmp/apt
|
|||
# export MKISOFS=/usr/bin/mkhybrid
|
||||
# export MKISOFS_OPTS="-a -r -T" #For normal users
|
||||
# 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
143
Makefile
|
@ -11,7 +11,9 @@
|
|||
|
||||
|
||||
## DEFAULT VALUES
|
||||
|
||||
ifndef VERBOSE_MAKE
|
||||
Q=@
|
||||
endif
|
||||
ifndef SIZELIMIT
|
||||
SIZELIMIT=$(shell echo -n $$[ 610 * 1024 * 1024 ])
|
||||
endif
|
||||
|
@ -154,34 +156,34 @@ ok:
|
|||
# Creation of the directories needed
|
||||
init: ok $(TDIR) $(BDIR) $(SDIR) $(ADIR)
|
||||
$(TDIR):
|
||||
@mkdir -p $(TDIR)
|
||||
$(Q)mkdir -p $(TDIR)
|
||||
$(BDIR):
|
||||
@mkdir -p $(BDIR)
|
||||
$(Q)mkdir -p $(BDIR)
|
||||
$(SDIR):
|
||||
@mkdir -p $(SDIR)
|
||||
$(Q)mkdir -p $(SDIR)
|
||||
$(ADIR):
|
||||
@mkdir -p $(ADIR)
|
||||
$(Q)mkdir -p $(ADIR)
|
||||
|
||||
## CLEANINGS ##
|
||||
|
||||
# CLeans the current arch tree (but not packages selection info)
|
||||
clean: ok bin-clean src-clean
|
||||
bin-clean:
|
||||
@-rm -rf $(BDIR)/[1234567890]
|
||||
@-rm -f $(BDIR)/packages-stamp $(BDIR)/bootable-stamp \
|
||||
$(Q)-rm -rf $(BDIR)/[1234567890]
|
||||
$(Q)-rm -f $(BDIR)/packages-stamp $(BDIR)/bootable-stamp \
|
||||
$(BDIR)/upgrade-stamp
|
||||
src-clean:
|
||||
@-rm -rf $(SDIR)/[1234567890]
|
||||
@-rm -rf $(SDIR)/sources-stamp
|
||||
$(Q)-rm -rf $(SDIR)/[1234567890]
|
||||
$(Q)-rm -rf $(SDIR)/sources-stamp
|
||||
|
||||
# Completely cleans the current arch tree
|
||||
realclean: distclean
|
||||
distclean: ok bin-distclean src-distclean
|
||||
bin-distclean:
|
||||
@-rm -rf $(BDIR)
|
||||
@-rm -rf $(ADIR)
|
||||
$(Q)-rm -rf $(BDIR)
|
||||
$(Q)-rm -rf $(ADIR)
|
||||
src-distclean:
|
||||
@-rm -rf $(SDIR)
|
||||
$(Q)-rm -rf $(SDIR)
|
||||
|
||||
|
||||
## STATUS and APT ##
|
||||
|
@ -191,18 +193,18 @@ src-distclean:
|
|||
status: init $(ADIR)/status
|
||||
$(ADIR)/status:
|
||||
@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; \
|
||||
print if (/^Priority: (required|important|standard)/m or \
|
||||
/^Section: base/m);' \
|
||||
> $(ADIR)/status
|
||||
# Updating the apt database
|
||||
@$(apt) update
|
||||
$(Q)$(apt) update
|
||||
#
|
||||
# Checking the consistence of the standard system
|
||||
# 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
|
||||
# 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
|
||||
#
|
||||
# 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; \
|
||||
perl -i -000 -ne "print unless /^Package: \Q$$i\E/m" \
|
||||
$(ADIR)/status; \
|
||||
done
|
||||
#
|
||||
# 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; \
|
||||
$(apt) cache dumpavail | perl -000 -ne \
|
||||
"s/^(Package: .*)\$$/\$$1\nStatus: install ok installed/m; \
|
||||
|
@ -227,19 +231,19 @@ correctstatus: status apt-update
|
|||
done
|
||||
#
|
||||
# Showing the output of apt-get check :
|
||||
@$(apt) check
|
||||
$(Q)$(apt) check
|
||||
|
||||
apt-update: status
|
||||
@echo "Apt-get is updating his files ..."
|
||||
@$(apt) update
|
||||
$(Q)$(apt) update
|
||||
|
||||
|
||||
## GENERATING LISTS ##
|
||||
|
||||
# Deleting the list only
|
||||
deletelist: ok
|
||||
@-rm $(BDIR)/rawlist
|
||||
@-rm $(BDIR)/list
|
||||
$(Q)-rm $(BDIR)/rawlist
|
||||
$(Q)-rm $(BDIR)/list
|
||||
|
||||
# Generates the list of packages/files to put on each CD
|
||||
list: bin-list src-list
|
||||
|
@ -248,9 +252,10 @@ list: bin-list src-list
|
|||
bin-list: ok apt-update genlist $(BDIR)/1.packages
|
||||
$(BDIR)/1.packages:
|
||||
@echo "Dispatching the packages on all the CDs ..."
|
||||
@$(list2cds) $(BDIR)/list $(SIZELIMIT)
|
||||
$(Q)$(list2cds) $(BDIR)/list $(SIZELIMIT)
|
||||
ifdef FORCENONUSONCD1
|
||||
@for file in $(BDIR)/*.packages; do \
|
||||
$(Q)set -e; \
|
||||
for file in $(BDIR)/*.packages; do \
|
||||
newfile=$${file%%.packages}_NONUS.packages; \
|
||||
cp $$file $$newfile; \
|
||||
$(strip_nonus_bin) $$file $$file.tmp; \
|
||||
|
@ -268,9 +273,10 @@ endif
|
|||
src-list: bin-list $(SDIR)/1.sources
|
||||
$(SDIR)/1.sources:
|
||||
@echo "Dispatching the sources on all the CDs ..."
|
||||
@$(cds2src) $(SIZELIMIT)
|
||||
$(Q)$(cds2src) $(SIZELIMIT)
|
||||
ifdef FORCENONUSONCD1
|
||||
@for file in $(SDIR)/*.sources; do \
|
||||
$(Q)set -e; \
|
||||
for file in $(SDIR)/*.sources; do \
|
||||
newfile=$${file%%.sources}_NONUS.sources; \
|
||||
cp $$file $$newfile; \
|
||||
grep -v non-US $$file >$$file.tmp; \
|
||||
|
@ -288,7 +294,7 @@ endif
|
|||
genlist: ok $(BDIR)/list
|
||||
$(BDIR)/list: $(BDIR)/rawlist
|
||||
@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{$$_}++;' \
|
||||
$(BDIR)/rawlist \
|
||||
> $(BDIR)/list
|
||||
|
@ -296,10 +302,10 @@ $(BDIR)/list: $(BDIR)/rawlist
|
|||
# Build the raw list (cpp output) with doubles and spaces
|
||||
$(BDIR)/rawlist:
|
||||
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
|
||||
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) \
|
||||
-DFORCENONUSONCD1=$(forcenonusoncd1) \
|
||||
-I $(BASEDIR)/tasks -I $(BDIR) - - >> $(BDIR)/rawlist
|
||||
|
@ -312,7 +318,8 @@ tree: bin-tree src-tree
|
|||
bin-tree: ok bin-list $(BDIR)/CD1/debian
|
||||
$(BDIR)/CD1/debian:
|
||||
@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=$${dir##$(BDIR)/}; \
|
||||
dir=$(BDIR)/CD$$dir; \
|
||||
|
@ -323,7 +330,8 @@ $(BDIR)/CD1/debian:
|
|||
src-tree: ok src-list $(SDIR)/CD1/debian
|
||||
$(SDIR)/CD1/debian:
|
||||
@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=$${dir##$(SDIR)/}; \
|
||||
dir=$(SDIR)/CD$$dir; \
|
||||
|
@ -336,7 +344,8 @@ infos: bin-infos src-infos
|
|||
bin-infos: bin-tree $(BDIR)/CD1/.disk/info
|
||||
$(BDIR)/CD1/.disk/info:
|
||||
@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`; \
|
||||
for i in $(BDIR)/*.packages; do \
|
||||
num=$${i%%.packages}; num=$${num##$(BDIR)/}; \
|
||||
|
@ -366,7 +375,8 @@ $(BDIR)/CD1/.disk/info:
|
|||
src-infos: src-tree $(SDIR)/CD1/.disk/info
|
||||
$(SDIR)/CD1/.disk/info:
|
||||
@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`; \
|
||||
for i in $(SDIR)/*.sources; do \
|
||||
num=$${i%%.sources}; num=$${num##$(SDIR)/}; \
|
||||
|
@ -398,7 +408,8 @@ $(SDIR)/CD1/.disk/info:
|
|||
packages: bin-infos bin-list $(BDIR)/packages-stamp
|
||||
$(BDIR)/packages-stamp:
|
||||
@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}; \
|
||||
n=$${dir##$(BDIR)/}; \
|
||||
dir=$(BDIR)/CD$$n; \
|
||||
|
@ -411,18 +422,20 @@ $(BDIR)/packages-stamp:
|
|||
echo "done."; \
|
||||
done
|
||||
@#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=$${dir##$(BDIR)/}; \
|
||||
dir=$(BDIR)/CD$$dir; \
|
||||
$(scanpackages) install $$dir; \
|
||||
done
|
||||
@touch $(BDIR)/packages-stamp
|
||||
$(Q)touch $(BDIR)/packages-stamp
|
||||
|
||||
sources: src-infos src-list $(SDIR)/sources-stamp
|
||||
$(SDIR)/sources-stamp:
|
||||
@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}; \
|
||||
n=$${dir##$(SDIR)/}; \
|
||||
dir=$(SDIR)/CD$$n; \
|
||||
|
@ -434,7 +447,7 @@ $(SDIR)/sources-stamp:
|
|||
$(scansources) $$dir; \
|
||||
echo "done."; \
|
||||
done
|
||||
@touch $(SDIR)/sources-stamp
|
||||
$(Q)touch $(SDIR)/sources-stamp
|
||||
|
||||
## BOOT & DOC & INSTALL ##
|
||||
|
||||
|
@ -442,34 +455,38 @@ $(SDIR)/sources-stamp:
|
|||
bootable: ok disks installtools $(BDIR)/bootable-stamp
|
||||
$(BDIR)/bootable-stamp:
|
||||
@echo "Making the binary CDs bootable ..."
|
||||
@for file in $(BDIR)/*.packages; do \
|
||||
$(Q)set -e; \
|
||||
for file in $(BDIR)/*.packages; do \
|
||||
dir=$${file%%.packages}; \
|
||||
n=$${dir##$(BDIR)/}; \
|
||||
dir=$(BDIR)/CD$$n; \
|
||||
if [ -f $(BASEDIR)/tools/boot/$(CODENAME)/boot-$(ARCH) ]; then \
|
||||
cd $(BDIR); \
|
||||
echo "Running tools/boot/$(CODENAME)/boot-$(ARCH) $$n $$dir" ; \
|
||||
$(BASEDIR)/tools/boot/$(CODENAME)/boot-$(ARCH) $$n $$dir; \
|
||||
else \
|
||||
echo "No script to make CDs bootable for $(ARCH) ..."; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
done
|
||||
@touch $(BDIR)/bootable-stamp
|
||||
$(Q)touch $(BDIR)/bootable-stamp
|
||||
|
||||
# Add the doc files to the CDs and the Release-Notes and the
|
||||
# Contents-$(ARCH).gz files
|
||||
bin-doc: ok bin-infos $(BDIR)/CD1/doc
|
||||
$(BDIR)/CD1/doc:
|
||||
@echo "Adding the documentation (bin) ..."
|
||||
@for DISK in $(FIRSTDISKS) ; do \
|
||||
$(Q)set -e; \
|
||||
for DISK in $(FIRSTDISKS) ; do \
|
||||
$(addfiles) $(BDIR)/$$DISK $(MIRROR) doc; \
|
||||
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
|
||||
$(SDIR)/CD1/README.html:
|
||||
@echo "Adding the documentation (src) ..."
|
||||
@for i in $(SDIR)/*.sources; do \
|
||||
$(Q)set -e; \
|
||||
for i in $(SDIR)/*.sources; do \
|
||||
dir=$${i%%.sources}; \
|
||||
dir=$${dir##$(SDIR)/}; \
|
||||
dir=$(SDIR)/CD$$dir; \
|
||||
|
@ -494,7 +511,8 @@ $(SDIR)/CD1/README.html:
|
|||
installtools: ok bin-doc disks $(BDIR)/CD1/tools
|
||||
$(BDIR)/CD1/tools:
|
||||
@echo "Adding install tools and documentation ..."
|
||||
@for DISK in $(FIRSTDISKS) ; do \
|
||||
$(Q)set -e; \
|
||||
for DISK in $(FIRSTDISKS) ; do \
|
||||
$(addfiles) $(BDIR)/$$DISK $(MIRROR) tools ; \
|
||||
mkdir $(BDIR)/$$DISK/install ; \
|
||||
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)
|
||||
$(BDIR)/CD1/dists/$(CODENAME)/main/disks-$(ARCH):
|
||||
@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) ; \
|
||||
$(addfiles) \
|
||||
$(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
|
||||
$(BDIR)/upgrade-stamp:
|
||||
@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; \
|
||||
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; \
|
||||
fi
|
||||
@touch $(BDIR)/upgrade-stamp
|
||||
$(Q)touch $(BDIR)/upgrade-stamp
|
||||
|
||||
## EXTRAS ##
|
||||
|
||||
# Launch the extras scripts correctly for customizing the CDs
|
||||
extras: bin-extras
|
||||
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)."; \
|
||||
false; \
|
||||
fi
|
||||
@echo "Adding dirs '$(DIR)' from '$(ROOTSRC)' to '$(BDIR)/$(CD)'" ...
|
||||
@$(addfiles) $(BDIR)/$(CD) $(ROOTSRC) $(DIR)
|
||||
$(Q)$(addfiles) $(BDIR)/$(CD) $(ROOTSRC) $(DIR)
|
||||
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)."; \
|
||||
false; \
|
||||
fi
|
||||
@echo "Adding dirs '$(DIR)' from '$(ROOTSRC)' to '$(SDIR)/$(CD)'" ...
|
||||
@$(addfiles) $(SDIR)/$(CD) $(ROOTSRC) $(DIR)
|
||||
$(Q)$(addfiles) $(SDIR)/$(CD) $(ROOTSRC) $(DIR)
|
||||
|
||||
## IMAGE BUILDING ##
|
||||
|
||||
# Get some size info about the build dirs
|
||||
imagesinfo: bin-imagesinfo
|
||||
bin-imagesinfo: ok
|
||||
@for i in $(BDIR)/*.packages; do \
|
||||
$(Q)for i in $(BDIR)/*.packages; do \
|
||||
echo `du -sb $${i%%.packages}`; \
|
||||
done
|
||||
src-imagesinfo: ok
|
||||
@for i in $(SDIR)/*.sources; do \
|
||||
$(Q)for i in $(SDIR)/*.sources; do \
|
||||
echo `du -sb $${i%%.sources}`; \
|
||||
done
|
||||
|
||||
|
@ -571,7 +590,8 @@ md5list: bin-md5list src-md5list
|
|||
bin-md5list: ok packages $(BDIR)/CD1/md5sum.txt
|
||||
$(BDIR)/CD1/md5sum.txt:
|
||||
@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}; \
|
||||
n=$${dir##$(BDIR)/}; \
|
||||
dir=$(BDIR)/CD$$n; \
|
||||
|
@ -584,7 +604,8 @@ $(BDIR)/CD1/md5sum.txt:
|
|||
src-md5list: ok sources $(SDIR)/CD1/md5sum.txt
|
||||
$(SDIR)/CD1/md5sum.txt:
|
||||
@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=$${dir##$(SDIR)/}; \
|
||||
dir=$(SDIR)/CD$$dir; \
|
||||
|
@ -598,7 +619,7 @@ $(SDIR)/CD1/md5sum.txt:
|
|||
images: bin-images src-images
|
||||
bin-images: ok bin-md5list $(OUT)
|
||||
@echo "Generating the binary iso images ..."
|
||||
@set -e; \
|
||||
$(Q)set -e; \
|
||||
for file in $(BDIR)/*.packages; do \
|
||||
dir=$${file%%.packages}; \
|
||||
n=$${dir##$(BDIR)/}; \
|
||||
|
@ -616,7 +637,7 @@ bin-images: ok bin-md5list $(OUT)
|
|||
done
|
||||
src-images: ok src-md5list $(OUT)
|
||||
@echo "Generating the source iso images ..."
|
||||
@set -e; \
|
||||
$(Q)set -e; \
|
||||
for file in $(SDIR)/*.sources; do \
|
||||
dir=$${file%%.sources}; \
|
||||
n=$${dir##$(SDIR)/}; \
|
||||
|
@ -631,7 +652,7 @@ src-images: ok src-md5list $(OUT)
|
|||
|
||||
# Generate the *.list files for the Pseudo Image Kit
|
||||
pi-makelist:
|
||||
@set -e; \
|
||||
$(Q)set -e; \
|
||||
cd $(OUT); for file in `find * -name \*.raw`; do \
|
||||
$(BASEDIR)/tools/pi-makelist \
|
||||
$$file > $${file%%.raw}.list; \
|
||||
|
@ -661,7 +682,7 @@ src-image: ok src-md5list $(OUT)
|
|||
|
||||
#Calculate the md5sums for the images
|
||||
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; \
|
||||
done
|
||||
|
||||
|
@ -677,7 +698,7 @@ conf:
|
|||
sensible-editor $(BASEDIR)/CONF.sh
|
||||
|
||||
mirrorcheck: ok apt-update
|
||||
@$(apt) cache dumpavail | $(mirrorcheck)
|
||||
$(Q)$(apt) cache dumpavail | $(mirrorcheck)
|
||||
|
||||
# Little trick to simplify things
|
||||
official_images: bin-official_images src-official_images
|
||||
|
@ -686,5 +707,5 @@ src-official_images: ok src-doc src-images
|
|||
|
||||
$(CODENAME)_status: ok init
|
||||
@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
|
||||
|
|
12
build_all.sh
12
build_all.sh
|
@ -53,10 +53,14 @@ do
|
|||
make bin-official_images
|
||||
if [ $? -gt 0 ]; then
|
||||
echo "ERROR WHILE BUILDING OFFICIAL IMAGES !!" >&2
|
||||
echo "I'll try to build a simple (non-bootable) CD" >&2
|
||||
make clean
|
||||
make installtools
|
||||
make bin-images
|
||||
if [ "$ATTEMPT_FALLBACK" = "yes" ]; then
|
||||
echo "I'll try to build a simple (non-bootable) CD" >&2
|
||||
make clean
|
||||
make installtools
|
||||
make bin-images
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
echo Generating MD5Sums of the images
|
||||
make imagesums
|
||||
|
|
|
@ -22,11 +22,15 @@ if [ $N != 1 -a $N != 1_NONUS ]; then
|
|||
exit 0;
|
||||
fi
|
||||
|
||||
# Hack for bootable disks
|
||||
mkdir -p boot1/boot
|
||||
|
||||
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
|
||||
cp -f $CDDIR/dists/stable/main/disks-$ARCH/current/linux \
|
||||
boot1/boot/linux
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
if [ "$1" == "" ] ; then
|
||||
echo ""
|
||||
echo 'Usage: pi-makelist cdimage.iso > cdimage.iso.list'
|
||||
echo 'Usage: pi-makelist cdimage.iso > cdimage.list'
|
||||
echo ""
|
||||
echo "Will print on stdout the ordered list of files in the ISO 9660 image."
|
||||
echo ""
|
||||
|
@ -17,45 +17,101 @@ fi
|
|||
PATH="$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
|
||||
# to comment out all but the first command, and then remove one hash
|
||||
# each run.
|
||||
|
||||
isoinfo -i "$1" -R -l -f \
|
||||
| grep -B 1 '^-' \
|
||||
| grep -v '^--$' \
|
||||
isoinfo -i "$1" -R -l -f \
|
||||
| grep -B 1 '^-' \
|
||||
| grep -v '^--$' \
|
||||
| (
|
||||
while read ThisFile; do
|
||||
read ThisInfoLine
|
||||
|
||||
echo "$ThisInfoLine" ["$ThisFile"]
|
||||
done
|
||||
) \
|
||||
| tr ']' '[' \
|
||||
| cut -d '[' -f 2,4 \
|
||||
| sort \
|
||||
| cut -d '[' -f 2 \
|
||||
| grep -v -e '/Packages' \
|
||||
-e '/Sources' \
|
||||
-e 'TRANS.TBL$' \
|
||||
-e '^/md5sum.txt$' \
|
||||
-e '^/Release-Notes$' \
|
||||
-e '^/README.1ST$' \
|
||||
-e '^/README.multicd$' \
|
||||
-e '^/.disk/' \
|
||||
-e '^/boot/' \
|
||||
-e '^/install/' \
|
||||
-e '^/tools/.*/' \
|
||||
-e '^/tools/README.tools$' \
|
||||
-e '.info$' \
|
||||
-e '.m68k$' \
|
||||
-e '^/m68k-faq/' \
|
||||
-e '^/m68k-tools/' \
|
||||
-e '^/extras/'
|
||||
) \
|
||||
| tr ']' '[' \
|
||||
| cut -d '[' -f 2,4 \
|
||||
| sort \
|
||||
| cut -d '[' -f 2 \
|
||||
| grep -v \
|
||||
-e '/Packages' \
|
||||
-e '/Sources' \
|
||||
-e 'TRANS\.TBL$' \
|
||||
-e '^/md5sum\.txt$' \
|
||||
-e '/Release-Notes$' \
|
||||
-e '^/README\.1ST$' \
|
||||
-e '^/README\.multicd$' \
|
||||
-e '^/\.disk/' \
|
||||
-e '^/boot/' \
|
||||
-e '^/tools/.*/' \
|
||||
-e '^/tools/README\.tools$' \
|
||||
-e '\.info$' \
|
||||
-e '\.m68k$' \
|
||||
-e '^/m68k-faq/' \
|
||||
-e '^/m68k-tools/' \
|
||||
-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
|
||||
# Sources[.gz].
|
||||
# And the /tools are only zipped on FTP.
|
||||
|
|
Loading…
Reference in New Issue