Merge ~mwhudson/debian-cd/+git/ubuntu:only-CD1 into ~ubuntu-cdimage/debian-cd/+git/ubuntu:main
- Git
- lp:~mwhudson/debian-cd/+git/ubuntu
- only-CD1
- Merge into main
Status: | Merged |
---|---|
Merged at revision: | d50cf6e243bb8bf83de4a5f72b804a78dba4d12d |
Proposed branch: | ~mwhudson/debian-cd/+git/ubuntu:only-CD1 |
Merge into: | ~ubuntu-cdimage/debian-cd/+git/ubuntu:main |
Diff against target: |
417 lines (+68/-199) 3 files modified
CONF.sh (+0/-8) Makefile (+66/-189) tools/list2cds (+2/-2) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Steve Langasek | Approve | ||
Review via email: mp+455326@code.launchpad.net |
Commit message
Remove support for building multiple binary CDs for a single project
Description of the change
I think I'm done for now, at least for the rest of the day!
Michael Hudson-Doyle (mwhudson) wrote : | # |
Steve Langasek (vorlon) : | # |
Michael Hudson-Doyle (mwhudson) wrote : | # |
On Mon, 20 Nov 2023, 18:42 Steve Langasek, <email address hidden>
wrote:
> Review: Needs Fixing
>
>
>
> Diff comments:
>
> > diff --git a/Makefile b/Makefile
> > index bfe1368..b9c957d 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -39,55 +39,31 @@ CAPSUBPROJECT:=" Legacy"
> > endif
> > endif
> > ifndef BINDISKINFO
> > -ifneq ($(MAXCDS),1)
> > -export BINDISKINFO=
> \"$(CAPCODENAME)\" - $(OFFICIAL) $(FULLARCH) Binary-$$num ($$DATE)"
> > -else
> > export BINDISKINFO=
> \"$(CAPCODENAME)\" - $(OFFICIAL) $(FULLARCH) ($$DATE)"
> > endif
> > -endif
> > ifndef SRCDISKINFO
> > -export SRCDISKINFO=
> \"$(CAPCODENAME)\" - $(OFFICIAL) Source-$$num ($$DATE)"
> > +export SRCDISKINFO=
> \"$(CAPCODENAME)\" - $(OFFICIAL) Source-1 ($$DATE)"
>
> But we do produce multiple source ISOs for a release...
> https:/
Oh oops. Guess I'd better put that back then.
>
Michael Hudson-Doyle (mwhudson) wrote : | # |
Ok, I rebased this to only remove the code for handling multiple binary CDs. Not sure I have the patience to test a source ISO build locally, I assume it would need to download rather a lot of data...
Steve Langasek (vorlon) : | # |
Michael Hudson-Doyle (mwhudson) wrote : | # |
Ah oops I had a git failure there and let a commit in I meant to exclude. Try again?
Steve Langasek (vorlon) : | # |
Preview Diff
1 | diff --git a/CONF.sh b/CONF.sh | |||
2 | index 51a0087..b15a95a 100644 | |||
3 | --- a/CONF.sh | |||
4 | +++ b/CONF.sh | |||
5 | @@ -31,7 +31,6 @@ unset DEFBINSIZE || true | |||
6 | 31 | unset DEFSRCSIZE || true | 31 | unset DEFSRCSIZE || true |
7 | 32 | unset FASTSUMS || true | 32 | unset FASTSUMS || true |
8 | 33 | unset DI_CODENAME || true | 33 | unset DI_CODENAME || true |
9 | 34 | unset MAXCDS || true | ||
10 | 35 | unset OMIT_MANUAL || true | 34 | unset OMIT_MANUAL || true |
11 | 36 | unset OMIT_RELEASE_NOTES || true | 35 | unset OMIT_RELEASE_NOTES || true |
12 | 37 | 36 | ||
13 | @@ -314,13 +313,6 @@ export FASTSUMS=1 | |||
14 | 314 | # for all architectures. | 313 | # for all architectures. |
15 | 315 | #export KERNEL_PARAMS="priority=critical" | 314 | #export KERNEL_PARAMS="priority=critical" |
16 | 316 | 315 | ||
17 | 317 | # If set, limits the number of binary CDs to produce. | ||
18 | 318 | if [ "$CDIMAGE_DVD" = 1 ]; then | ||
19 | 319 | export MAXCDS=1 | ||
20 | 320 | else | ||
21 | 321 | export MAXCDS=1 | ||
22 | 322 | fi | ||
23 | 323 | |||
24 | 324 | # If set to 0, never overflow binary CDs (for when you only want a single CD | 316 | # If set to 0, never overflow binary CDs (for when you only want a single CD |
25 | 325 | # and want to know when it overflows). | 317 | # and want to know when it overflows). |
26 | 326 | export OVERFLOWBINCDS=0 | 318 | export OVERFLOWBINCDS=0 |
27 | diff --git a/Makefile b/Makefile | |||
28 | index bfe1368..74d82a0 100644 | |||
29 | --- a/Makefile | |||
30 | +++ b/Makefile | |||
31 | @@ -39,53 +39,29 @@ CAPSUBPROJECT:=" Legacy" | |||
32 | 39 | endif | 39 | endif |
33 | 40 | endif | 40 | endif |
34 | 41 | ifndef BINDISKINFO | 41 | ifndef BINDISKINFO |
35 | 42 | ifneq ($(MAXCDS),1) | ||
36 | 43 | export BINDISKINFO="$(CAPPROJECT)$(CAPSUBPROJECT) $(DEBVERSION) \"$(CAPCODENAME)\" - $(OFFICIAL) $(FULLARCH) Binary-$$num ($$DATE)" | ||
37 | 44 | else | ||
38 | 45 | export BINDISKINFO="$(CAPPROJECT)$(CAPSUBPROJECT) $(DEBVERSION) \"$(CAPCODENAME)\" - $(OFFICIAL) $(FULLARCH) ($$DATE)" | 42 | export BINDISKINFO="$(CAPPROJECT)$(CAPSUBPROJECT) $(DEBVERSION) \"$(CAPCODENAME)\" - $(OFFICIAL) $(FULLARCH) ($$DATE)" |
39 | 46 | endif | 43 | endif |
40 | 47 | endif | ||
41 | 48 | ifndef SRCDISKINFO | 44 | ifndef SRCDISKINFO |
42 | 49 | export SRCDISKINFO="$(CAPPROJECT)$(CAPSUBPROJECT) $(DEBVERSION) \"$(CAPCODENAME)\" - $(OFFICIAL) Source-$$num ($$DATE)" | 45 | export SRCDISKINFO="$(CAPPROJECT)$(CAPSUBPROJECT) $(DEBVERSION) \"$(CAPCODENAME)\" - $(OFFICIAL) Source-$$num ($$DATE)" |
43 | 50 | endif | 46 | endif |
44 | 51 | # ND=No-Date versions for README | 47 | # ND=No-Date versions for README |
45 | 52 | ifndef BINDISKINFOND | 48 | ifndef BINDISKINFOND |
46 | 53 | ifneq ($(MAXCDS),1) | ||
47 | 54 | export BINDISKINFOND="$(CAPPROJECT)$(CAPSUBPROJECT) $(DEBVERSION) \"$(CAPCODENAME)\" - $(OFFICIAL) $(FULLARCH) Binary-$$num" | ||
48 | 55 | else | ||
49 | 56 | export BINDISKINFOND="$(CAPPROJECT)$(CAPSUBPROJECT) $(DEBVERSION) \"$(CAPCODENAME)\" - $(OFFICIAL) $(FULLARCH)" | 49 | export BINDISKINFOND="$(CAPPROJECT)$(CAPSUBPROJECT) $(DEBVERSION) \"$(CAPCODENAME)\" - $(OFFICIAL) $(FULLARCH)" |
50 | 57 | endif | 50 | endif |
51 | 58 | endif | ||
52 | 59 | ifndef SRCDISKINFOND | 51 | ifndef SRCDISKINFOND |
53 | 60 | export SRCDISKINFOND="$(CAPPROJECT) $(DEBVERSION) \"$(CAPCODENAME)\" - $(OFFICIAL) Source-$$num" | 52 | export SRCDISKINFOND="$(CAPPROJECT) $(DEBVERSION) \"$(CAPCODENAME)\" - $(OFFICIAL) Source-$$num" |
54 | 61 | endif | 53 | endif |
55 | 62 | ifndef BINVOLID | 54 | ifndef BINVOLID |
56 | 63 | ifeq ($(ARCH),powerpc) | 55 | ifeq ($(ARCH),powerpc) |
57 | 64 | ifneq ($(MAXCDS),1) | ||
58 | 65 | BINVOLID="$(CAPPROJECT) $(DEBVERSION) ppc $$num" | ||
59 | 66 | else | ||
60 | 67 | BINVOLID="$(CAPPROJECT) $(DEBVERSION) ppc" | 56 | BINVOLID="$(CAPPROJECT) $(DEBVERSION) ppc" |
61 | 68 | endif | ||
62 | 69 | else ifeq ($(ARCH),ppc64el) | 57 | else ifeq ($(ARCH),ppc64el) |
63 | 70 | ifneq ($(MAXCDS),1) | ||
64 | 71 | BINVOLID="$(CAPPROJECT) $(DEBVERSION) ppc64 $$num" | ||
65 | 72 | else | ||
66 | 73 | BINVOLID="$(CAPPROJECT) $(DEBVERSION) ppc64" | 58 | BINVOLID="$(CAPPROJECT) $(DEBVERSION) ppc64" |
67 | 74 | endif | ||
68 | 75 | else ifeq ($(ARCH),riscv64) | 59 | else ifeq ($(ARCH),riscv64) |
69 | 76 | ifneq ($(MAXCDS),1) | ||
70 | 77 | BINVOLID="$(CAPPROJECT) $(DEBVERSION) riscv $$num" | ||
71 | 78 | else | ||
72 | 79 | BINVOLID="$(CAPPROJECT) $(DEBVERSION) riscv" | 60 | BINVOLID="$(CAPPROJECT) $(DEBVERSION) riscv" |
73 | 80 | endif | ||
74 | 81 | else | ||
75 | 82 | ifneq ($(MAXCDS),1) | ||
76 | 83 | BINVOLID="$(CAPPROJECT) $(DEBVERSION) $(ARCH) $$num" | ||
77 | 84 | else | 61 | else |
78 | 85 | BINVOLID="$(CAPPROJECT) $(DEBVERSION) $(ARCH)" | 62 | BINVOLID="$(CAPPROJECT) $(DEBVERSION) $(ARCH)" |
79 | 86 | endif | 63 | endif |
80 | 87 | endif | 64 | endif |
81 | 88 | endif | ||
82 | 89 | ifndef SRCVOLID | 65 | ifndef SRCVOLID |
83 | 90 | SRCVOLID="$(CAPPROJECT) $(DEBVERSION) Source $$num" | 66 | SRCVOLID="$(CAPPROJECT) $(DEBVERSION) Source $$num" |
84 | 91 | endif | 67 | endif |
85 | @@ -451,13 +427,9 @@ bin-tree: ok bin-list $(BDIR)/CD1/ubuntu | |||
86 | 451 | $(BDIR)/CD1/ubuntu: | 427 | $(BDIR)/CD1/ubuntu: |
87 | 452 | @echo "Adding the required directories to the binary CDs ..." | 428 | @echo "Adding the required directories to the binary CDs ..." |
88 | 453 | $(Q)set -e; \ | 429 | $(Q)set -e; \ |
96 | 454 | for i in $(BDIR)/*.packages; do \ | 430 | dir=$(BDIR)/CD1; \ |
97 | 455 | dir=$${i%%.packages}; \ | 431 | mkdir -p $$dir; \ |
98 | 456 | dir=$${dir##$(BDIR)/}; \ | 432 | $(add_dirs) $$dir; \ |
92 | 457 | dir=$(BDIR)/CD$$dir; \ | ||
93 | 458 | mkdir -p $$dir; \ | ||
94 | 459 | $(add_dirs) $$dir; \ | ||
95 | 460 | done | ||
99 | 461 | 433 | ||
100 | 462 | src-tree: ok src-list $(SDIR)/CD1/ubuntu | 434 | src-tree: ok src-list $(SDIR)/CD1/ubuntu |
101 | 463 | $(SDIR)/CD1/ubuntu: | 435 | $(SDIR)/CD1/ubuntu: |
102 | @@ -477,15 +449,11 @@ bin-infos: bin-tree $(BDIR)/CD1/.disk/info | |||
103 | 477 | $(BDIR)/CD1/.disk/info: | 449 | $(BDIR)/CD1/.disk/info: |
104 | 478 | @echo "Generating the binary CD labels and their volume ids ..." | 450 | @echo "Generating the binary CD labels and their volume ids ..." |
105 | 479 | $(Q)set -e; \ | 451 | $(Q)set -e; \ |
115 | 480 | nb=`find $(BDIR) -name \*.packages | grep '^..?\.packages$$' | wc -l | tr -d " "`; num=0;\ | 452 | DATE=$${CDIMAGE_DATE:-`date +%Y%m%d`}; \ |
116 | 481 | DATE=$${CDIMAGE_DATE:-`date +%Y%m%d`}; \ | 453 | echo -n $(BINDISKINFO) > $(BDIR)/CD1/.disk/info; \ |
117 | 482 | for i in $(BDIR)/*.packages; do \ | 454 | echo -n $(BINVOLID) > $(BDIR)/1.volid; \ |
118 | 483 | num=$${i%%.packages}; num=$${num##$(BDIR)/}; \ | 455 | $(set_mkisofs_opts) bin 1 > $(BDIR)/$${num}.mkisofs_opts; \ |
119 | 484 | dir=$(BDIR)/CD$$num; \ | 456 | |
111 | 485 | echo -n $(BINDISKINFO) > $$dir/.disk/info; \ | ||
112 | 486 | echo -n $(BINVOLID) > $(BDIR)/$${num}.volid; \ | ||
113 | 487 | $(set_mkisofs_opts) bin $$num > $(BDIR)/$${num}.mkisofs_opts; \ | ||
114 | 488 | done | ||
120 | 489 | src-infos: src-tree $(SDIR)/CD1/.disk/info | 457 | src-infos: src-tree $(SDIR)/CD1/.disk/info |
121 | 490 | $(SDIR)/CD1/.disk/info: | 458 | $(SDIR)/CD1/.disk/info: |
122 | 491 | @echo "Generating the source CD labels and their volume ids ..." | 459 | @echo "Generating the source CD labels and their volume ids ..." |
123 | @@ -525,23 +493,13 @@ endif | |||
124 | 525 | >> $(BDIR)/1.packages; \ | 493 | >> $(BDIR)/1.packages; \ |
125 | 526 | fi | 494 | fi |
126 | 527 | $(Q)set -e; \ | 495 | $(Q)set -e; \ |
136 | 528 | for i in $(BDIR)/*.packages; do \ | 496 | dir=$(BDIR)/CD1; \ |
137 | 529 | dir=$${i%%.packages}; \ | 497 | echo "1 ... "; \ |
138 | 530 | n=$${dir##$(BDIR)/}; \ | 498 | grep -v '^#' $(BDIR)/1.packages | xargs -n 200 -r $(add_packages) $$dir; \ |
139 | 531 | dir=$(BDIR)/CD$$n; \ | 499 | $(scanpackages) scan $$dir; \ |
140 | 532 | echo "$$n ... "; \ | 500 | echo "done."; |
132 | 533 | grep -v '^#' $$i | xargs -n 200 -r $(add_packages) $$dir; \ | ||
133 | 534 | $(scanpackages) scan $$dir; \ | ||
134 | 535 | echo "done."; \ | ||
135 | 536 | done | ||
141 | 537 | @#Now install the Packages and Packages.cd files | 501 | @#Now install the Packages and Packages.cd files |
149 | 538 | $(Q)set -e; \ | 502 | $(scanpackages) install $(BDIR)/CD1; |
143 | 539 | for i in $(BDIR)/*.packages; do \ | ||
144 | 540 | dir=$${i%%.packages}; \ | ||
145 | 541 | dir=$${dir##$(BDIR)/}; \ | ||
146 | 542 | dir=$(BDIR)/CD$$dir; \ | ||
147 | 543 | $(scanpackages) install $$dir; \ | ||
148 | 544 | done | ||
150 | 545 | ifeq ($(LIVE_FILESYSTEM),1) | 503 | ifeq ($(LIVE_FILESYSTEM),1) |
151 | 546 | $(Q)$(add_live_filesystem) | 504 | $(Q)$(add_live_filesystem) |
152 | 547 | endif | 505 | endif |
153 | @@ -589,25 +547,21 @@ bootable: ok installtools packages $(BDIR)/bootable-stamp | |||
154 | 589 | $(BDIR)/bootable-stamp: | 547 | $(BDIR)/bootable-stamp: |
155 | 590 | @echo "Making the binary CDs bootable ..." | 548 | @echo "Making the binary CDs bootable ..." |
156 | 591 | $(Q)set -e; \ | 549 | $(Q)set -e; \ |
176 | 592 | for file in $(BDIR)/*.packages; do \ | 550 | dir=$(BDIR)/CD1; \ |
177 | 593 | dir=$${file%%.packages}; \ | 551 | if [ -f $(BASEDIR)/tools/boot/$(DI_CODENAME)/boot-$(FULLARCH) ]; then \ |
178 | 594 | n=$${dir##$(BDIR)/}; \ | 552 | cd $(BDIR); \ |
179 | 595 | dir=$(BDIR)/CD$$n; \ | 553 | echo "Running tools/boot/$(DI_CODENAME)/boot-$(FULLARCH) 1 $$dir" ; \ |
180 | 596 | if [ -f $(BASEDIR)/tools/boot/$(DI_CODENAME)/boot-$(FULLARCH) ]; then \ | 554 | $(BASEDIR)/tools/boot/$(DI_CODENAME)/boot-$(FULLARCH) 1 $$dir; \ |
181 | 597 | cd $(BDIR); \ | 555 | elif [ -f $(BASEDIR)/tools/boot/$(DI_CODENAME)/boot-$(ARCH) ]; then \ |
182 | 598 | echo "Running tools/boot/$(DI_CODENAME)/boot-$(FULLARCH) $$n $$dir" ; \ | 556 | cd $(BDIR); \ |
183 | 599 | $(BASEDIR)/tools/boot/$(DI_CODENAME)/boot-$(FULLARCH) $$n $$dir; \ | 557 | echo "Running tools/boot/$(DI_CODENAME)/boot-$(ARCH) 1 $$dir" ; \ |
184 | 600 | elif [ -f $(BASEDIR)/tools/boot/$(DI_CODENAME)/boot-$(ARCH) ]; then \ | 558 | $(BASEDIR)/tools/boot/$(DI_CODENAME)/boot-$(ARCH) 1 $$dir; \ |
185 | 601 | cd $(BDIR); \ | 559 | else \ |
186 | 602 | echo "Running tools/boot/$(DI_CODENAME)/boot-$(ARCH) $$n $$dir" ; \ | 560 | if [ "$${IGNORE_MISSING_BOOT_SCRIPT:-0}" = "0" ]; then \ |
187 | 603 | $(BASEDIR)/tools/boot/$(DI_CODENAME)/boot-$(ARCH) $$n $$dir; \ | 561 | echo "No script to make CDs bootable for $(FULLARCH) ..."; \ |
188 | 604 | else \ | 562 | exit 1; \ |
189 | 605 | if [ "$${IGNORE_MISSING_BOOT_SCRIPT:-0}" = "0" ]; then \ | 563 | fi; \ |
190 | 606 | echo "No script to make CDs bootable for $(FULLARCH) ..."; \ | 564 | fi; |
172 | 607 | exit 1; \ | ||
173 | 608 | fi; \ | ||
174 | 609 | fi; \ | ||
175 | 610 | done | ||
191 | 611 | $(Q)touch $(BDIR)/bootable-stamp | 565 | $(Q)touch $(BDIR)/bootable-stamp |
192 | 612 | 566 | ||
193 | 613 | # Add the install stuff on the first CD | 567 | # Add the install stuff on the first CD |
194 | @@ -643,41 +597,14 @@ src-extras: | |||
195 | 643 | 597 | ||
196 | 644 | ## IMAGE BUILDING ## | 598 | ## IMAGE BUILDING ## |
197 | 645 | 599 | ||
198 | 646 | # Get some size info about the build dirs | ||
199 | 647 | imagesinfo: bin-imagesinfo | ||
200 | 648 | bin-imagesinfo: ok | ||
201 | 649 | $(Q)for i in $(BDIR)/*.packages; do \ | ||
202 | 650 | echo `du -sb $${i%%.packages}`; \ | ||
203 | 651 | done | ||
204 | 652 | src-imagesinfo: ok | ||
205 | 653 | $(Q)for i in $(SDIR)/*.sources; do \ | ||
206 | 654 | echo `du -sb $${i%%.sources}`; \ | ||
207 | 655 | done | ||
208 | 656 | |||
209 | 657 | # Generate a md5sum.txt file listings all files on the CD | 600 | # Generate a md5sum.txt file listings all files on the CD |
210 | 658 | md5list: bin-md5list src-md5list | 601 | md5list: bin-md5list src-md5list |
211 | 659 | bin-md5list: ok packages bin-secured $(BDIR)/CD1/md5sum.txt | 602 | bin-md5list: ok packages bin-secured $(BDIR)/CD1/md5sum.txt |
212 | 660 | $(BDIR)/CD1/md5sum.txt: | 603 | $(BDIR)/CD1/md5sum.txt: |
213 | 661 | @echo "Generating md5sum of files from all the binary CDs ..." | 604 | @echo "Generating md5sum of files from all the binary CDs ..." |
233 | 662 | $(Q)set -e; \ | 605 | $(fastsums) $(BDIR) |
234 | 663 | if [ "$$FASTSUMS" != "1" ] ; then \ | 606 | $(hardlink) $(BDIR)/CD1 |
235 | 664 | for file in $(BDIR)/*.packages; do \ | 607 | |
217 | 665 | dir=$${file%%.packages}; \ | ||
218 | 666 | n=$${dir##$(BDIR)/}; \ | ||
219 | 667 | dir=$(BDIR)/CD$$n; \ | ||
220 | 668 | cd $$dir; \ | ||
221 | 669 | find . -follow -type f -print0 | grep -zZ -v "\./md5sum" | \ | ||
222 | 670 | grep -zZ -v "dists/stable" | grep -zZ -v "dists/frozen" | \ | ||
223 | 671 | grep -zZ -v "dists/unstable" | \ | ||
224 | 672 | xargs -0 $(md5sum) > md5sum.txt ; \ | ||
225 | 673 | done \ | ||
226 | 674 | else \ | ||
227 | 675 | $(fastsums) $(BDIR); \ | ||
228 | 676 | fi | ||
229 | 677 | $(Q)set -e; for dir in $(BDIR)/CD*; do \ | ||
230 | 678 | [ -d "$$dir" ] || continue; \ | ||
231 | 679 | $(hardlink) "$$dir"; \ | ||
232 | 680 | done | ||
236 | 681 | src-md5list: ok sources src-secured $(SDIR)/CD1/md5sum.txt | 608 | src-md5list: ok sources src-secured $(SDIR)/CD1/md5sum.txt |
237 | 682 | $(SDIR)/CD1/md5sum.txt: | 609 | $(SDIR)/CD1/md5sum.txt: |
238 | 683 | @echo "Generating md5sum of files from all the source CDs ..." | 610 | @echo "Generating md5sum of files from all the source CDs ..." |
239 | @@ -709,14 +636,7 @@ secured: bin-secured src-secured | |||
240 | 709 | bin-secured: $(BDIR)/secured-stamp | 636 | bin-secured: $(BDIR)/secured-stamp |
241 | 710 | $(BDIR)/secured-stamp: | 637 | $(BDIR)/secured-stamp: |
242 | 711 | @echo "Generating $(CODENAME)-secured on all the binary CDs ..." | 638 | @echo "Generating $(CODENAME)-secured on all the binary CDs ..." |
251 | 712 | $(Q)set -e; \ | 639 | cd $(BDIR)/CD1 && $(add_secured) |
244 | 713 | for file in $(BDIR)/*.packages; do \ | ||
245 | 714 | dir=$${file%%.packages}; \ | ||
246 | 715 | n=$${dir##$(BDIR)/}; \ | ||
247 | 716 | dir=$(BDIR)/CD$$n; \ | ||
248 | 717 | cd $$dir; \ | ||
249 | 718 | $(add_secured); \ | ||
250 | 719 | done | ||
252 | 720 | $(Q)touch $(BDIR)/secured-stamp | 640 | $(Q)touch $(BDIR)/secured-stamp |
253 | 721 | 641 | ||
254 | 722 | src-secured: $(SDIR)/secured-stamp | 642 | src-secured: $(SDIR)/secured-stamp |
255 | @@ -738,63 +658,57 @@ images: bin-images src-images | |||
256 | 738 | bin-images: ok bin-md5list $(OUT) | 658 | bin-images: ok bin-md5list $(OUT) |
257 | 739 | @echo "Generating the binary iso images ..." | 659 | @echo "Generating the binary iso images ..." |
258 | 740 | $(Q)set -e; \ | 660 | $(Q)set -e; \ |
281 | 741 | for file in $(BDIR)/*.packages; do \ | 661 | cd $(BDIR); \ |
282 | 742 | dir=$${file%%.packages}; \ | 662 | opts=`cat $(BDIR)/1.mkisofs_opts`; \ |
283 | 743 | n=$${dir##$(BDIR)/}; \ | 663 | volid=`cat $(BDIR)/1.volid`; \ |
284 | 744 | num=$$n; \ | 664 | rm -f $(OUT)/$(CDBASE).raw; \ |
285 | 745 | dir=$(BDIR)/CD$$n; \ | 665 | if [ "$(IMAGE_FORMAT)" = "vfat" ]; then \ |
286 | 746 | cd $$dir/..; \ | 666 | if [ -d boot1/ ]; then \ |
287 | 747 | opts=`cat $(BDIR)/$$n.mkisofs_opts`; \ | 667 | cp -a boot1/* CD1; \ |
266 | 748 | volid=`cat $(BDIR)/$$n.volid`; \ | ||
267 | 749 | rm -f $(OUT)/$(call CDBASE,$$n).raw; \ | ||
268 | 750 | if [ "$(IMAGE_FORMAT)" = "vfat" ]; then \ | ||
269 | 751 | if [ -d boot$$n/ ]; then \ | ||
270 | 752 | cp -a boot$$n/* CD$$n; \ | ||
271 | 753 | fi; \ | ||
272 | 754 | $(make_vfat_img) -d CD$$n \ | ||
273 | 755 | -o $(OUT)/$(call CDBASE,$$n).raw; \ | ||
274 | 756 | elif [ "$(IMAGE_FORMAT)" = "img" ]; then \ | ||
275 | 757 | $(make_raw_img) -g cd-boot-images/ \ | ||
276 | 758 | -d CD$$n -o $(OUT)/$(call CDBASE,$$n).raw; \ | ||
277 | 759 | elif [ "$(IMAGE_FORMAT)" = "iso" ]; then \ | ||
278 | 760 | $(verbose) $(MKISOFS) $(MKISOFS_OPTS) -V "$$volid" \ | ||
279 | 761 | -o $(OUT)/$(call CDBASE,$$n).raw $$opts CD$$n; \ | ||
280 | 762 | chmod +r $(OUT)/$(call CDBASE,$$n).raw; \ | ||
288 | 763 | fi; \ | 668 | fi; \ |
297 | 764 | if [ -f $(BASEDIR)/tools/boot/$(DI_CODENAME)/post-boot-$(FULLARCH) ]; then \ | 669 | $(make_vfat_img) -d CD1 \ |
298 | 765 | $(BASEDIR)/tools/boot/$(DI_CODENAME)/post-boot-$(FULLARCH) $$n $(BDIR)/CD$$n \ | 670 | -o $(OUT)/$(CDBASE).raw; \ |
299 | 766 | $(OUT)/$(call CDBASE,$$n).raw; \ | 671 | elif [ "$(IMAGE_FORMAT)" = "img" ]; then \ |
300 | 767 | elif [ -f $(BASEDIR)/tools/boot/$(DI_CODENAME)/post-boot-$(ARCH) ]; then \ | 672 | $(make_raw_img) -g cd-boot-images/ \ |
301 | 768 | $(BASEDIR)/tools/boot/$(DI_CODENAME)/post-boot-$(ARCH) $$n $(BDIR)/CD$$n \ | 673 | -d CD1 -o $(OUT)/$(CDBASE).raw; \ |
302 | 769 | $(OUT)/$(call CDBASE,$$n).raw; \ | 674 | elif [ "$(IMAGE_FORMAT)" = "iso" ]; then \ |
303 | 770 | fi; \ | 675 | $(verbose) $(MKISOFS) $(MKISOFS_OPTS) -V "$$volid" \ |
304 | 771 | done | 676 | -o $(OUT)/$(CDBASE).raw $$opts CD1; \ |
305 | 677 | chmod +r $(OUT)/$(CDBASE).raw; \ | ||
306 | 678 | fi; \ | ||
307 | 679 | if [ -f $(BASEDIR)/tools/boot/$(DI_CODENAME)/post-boot-$(FULLARCH) ]; then \ | ||
308 | 680 | $(BASEDIR)/tools/boot/$(DI_CODENAME)/post-boot-$(FULLARCH) 1 $(BDIR)/CD1 \ | ||
309 | 681 | $(OUT)/$(CDBASE).raw; \ | ||
310 | 682 | elif [ -f $(BASEDIR)/tools/boot/$(DI_CODENAME)/post-boot-$(ARCH) ]; then \ | ||
311 | 683 | $(BASEDIR)/tools/boot/$(DI_CODENAME)/post-boot-$(ARCH) 1 $(BDIR)/CD1 \ | ||
312 | 684 | $(OUT)/$(CDBASE).raw; \ | ||
313 | 685 | fi; | ||
314 | 772 | ifeq ($(LIVE_FILESYSTEM),1) | 686 | ifeq ($(LIVE_FILESYSTEM),1) |
315 | 773 | -for p in $(LIVEIMAGES)/$(FULLARCH)*.manifest; do \ | 687 | -for p in $(LIVEIMAGES)/$(FULLARCH)*.manifest; do \ |
316 | 774 | f=`basename $$p`; \ | 688 | f=`basename $$p`; \ |
318 | 775 | cp -a $$p $(OUT)/$(call CDBASE,$$n).`echo $$f|cut -d. -f2-`; \ | 689 | cp -a $$p $(OUT)/$(CDBASE).`echo $$f|cut -d. -f2-`; \ |
319 | 776 | done | 690 | done |
320 | 777 | -if [ -e $(LIVEIMAGES)/$(FULLARCH).manifest-remove ]; then \ | 691 | -if [ -e $(LIVEIMAGES)/$(FULLARCH).manifest-remove ]; then \ |
322 | 778 | cp -a $(LIVEIMAGES)/$(FULLARCH).manifest-remove $(OUT)/$(call CDBASE,$$n).manifest-remove; \ | 692 | cp -a $(LIVEIMAGES)/$(FULLARCH).manifest-remove $(OUT)/$(CDBASE).manifest-remove; \ |
323 | 779 | elif [ -e $(LIVEIMAGES)/$(FULLARCH).manifest-desktop ]; then \ | 693 | elif [ -e $(LIVEIMAGES)/$(FULLARCH).manifest-desktop ]; then \ |
325 | 780 | cp -a $(LIVEIMAGES)/$(FULLARCH).manifest-desktop $(OUT)/$(call CDBASE,$$n).manifest-desktop; \ | 694 | cp -a $(LIVEIMAGES)/$(FULLARCH).manifest-desktop $(OUT)/$(CDBASE).manifest-desktop; \ |
326 | 781 | fi | 695 | fi |
327 | 782 | -if [ -e $(LIVEIMAGES)/$(FULLARCH).manifest-minimal-remove ]; then \ | 696 | -if [ -e $(LIVEIMAGES)/$(FULLARCH).manifest-minimal-remove ]; then \ |
329 | 783 | cp -a $(LIVEIMAGES)/$(FULLARCH).manifest-minimal-remove $(OUT)/$(call CDBASE,$$n).manifest-minimal-remove; \ | 697 | cp -a $(LIVEIMAGES)/$(FULLARCH).manifest-minimal-remove $(OUT)/$(CDBASE).manifest-minimal-remove; \ |
330 | 784 | fi | 698 | fi |
331 | 785 | endif | 699 | endif |
332 | 786 | 700 | ||
333 | 787 | # FIXME: This only works with CD1, and not with addon CDs. | 701 | # FIXME: This only works with CD1, and not with addon CDs. |
334 | 788 | bin-compress_images: ok $(OUT) | 702 | bin-compress_images: ok $(OUT) |
336 | 789 | @if [ ! -e "$(OUT)/$(call CDBASE,1).raw" ]; then \ | 703 | @if [ ! -e "$(OUT)/$(CDBASE).raw" ]; then \ |
337 | 790 | echo "No image for $(FULLARCH)!" >&2; \ | 704 | echo "No image for $(FULLARCH)!" >&2; \ |
338 | 791 | exit 1; \ | 705 | exit 1; \ |
339 | 792 | fi; | 706 | fi; |
342 | 793 | @file -b $(OUT)/$(call CDBASE,1).raw > $(OUT)/$(call CDBASE,1).type | 707 | @file -b $(OUT)/$(CDBASE).raw > $(OUT)/$(CDBASE).type |
343 | 794 | @if ! grep -q '^gzip' $(OUT)/$(call CDBASE,1).type; then \ | 708 | @if ! grep -q '^gzip' $(OUT)/$(CDBASE).type; then \ |
344 | 795 | set -e; \ | 709 | set -e; \ |
347 | 796 | gzip -9 --rsyncable $(OUT)/$(call CDBASE,1).raw; \ | 710 | gzip -9 --rsyncable $(OUT)/$(CDBASE).raw; \ |
348 | 797 | mv $(OUT)/$(call CDBASE,1).raw.gz $(OUT)/$(call CDBASE,1).raw; \ | 711 | mv $(OUT)/$(CDBASE).raw.gz $(OUT)/$(CDBASE).raw; \ |
349 | 798 | fi; | 712 | fi; |
350 | 799 | 713 | ||
351 | 800 | src-images: ok src-md5list $(OUT) | 714 | src-images: ok src-md5list $(OUT) |
352 | @@ -827,43 +741,6 @@ pi-makelist: | |||
353 | 827 | fi \ | 741 | fi \ |
354 | 828 | done | 742 | done |
355 | 829 | 743 | ||
356 | 830 | # Generate only one image number $(CD) | ||
357 | 831 | image: bin-image | ||
358 | 832 | bin-image: ok bin-md5list $(OUT) | ||
359 | 833 | @echo "Generating the binary iso image n�$(CD) ..." | ||
360 | 834 | @test -n "$(CD)" || (echo "Give me a CD=<num> parameter !" && false) | ||
361 | 835 | set -e; cd $(BDIR); opts=`cat $(CD).mkisofs_opts`; \ | ||
362 | 836 | volid=`cat $(CD).volid`; \ | ||
363 | 837 | rm -f $(OUT)/$(call CDBASE,$(CD)).raw; \ | ||
364 | 838 | if [ "$(IMAGE_FORMAT)" = "vfat" ]; then \ | ||
365 | 839 | if [ -d boot$(CD)/ ]; then \ | ||
366 | 840 | cp -a boot$(CD)/* CD$(CD); \ | ||
367 | 841 | fi; \ | ||
368 | 842 | $(make_vfat_img) -d CD$(CD) -o $(OUT)/$(call CDBASE,$(CD)).raw; \ | ||
369 | 843 | elif [ "$(IMAGE_FORMAT)" = "iso" ]; then \ | ||
370 | 844 | $(MKISOFS) $(MKISOFS_OPTS) -V "$$volid" \ | ||
371 | 845 | -o $(OUT)/$(call CDBASE,$(CD)).raw $$opts CD$(CD); \ | ||
372 | 846 | chmod +r $(OUT)/$(call CDBASE,$(CD)).raw; \ | ||
373 | 847 | fi; \ | ||
374 | 848 | if [ -f $(BASEDIR)/tools/boot/$(DI_CODENAME)/post-boot-$(FULLARCH) ]; then \ | ||
375 | 849 | $(BASEDIR)/tools/boot/$(DI_CODENAME)/post-boot-$(FULLARCH) $(CD) $(BDIR)/CD$(CD) \ | ||
376 | 850 | $(OUT)/$(call CDBASE,$(CD)).raw; \ | ||
377 | 851 | elif [ -f $(BASEDIR)/tools/boot/$(DI_CODENAME)/post-boot-$(ARCH) ]; then \ | ||
378 | 852 | $(BASEDIR)/tools/boot/$(DI_CODENAME)/post-boot-$(ARCH) $(CD) $(BDIR)/CD$(CD) \ | ||
379 | 853 | $(OUT)/$(call CDBASE,$(CD)).raw; \ | ||
380 | 854 | fi | ||
381 | 855 | |||
382 | 856 | src-image: ok src-md5list $(OUT) | ||
383 | 857 | @echo "Generating the source iso image n�$(CD) ..." | ||
384 | 858 | @test -n "$(CD)" || (echo "Give me a CD=<num> parameter !" && false) | ||
385 | 859 | set -e; cd $(SDIR); opts=`cat $(CD).mkisofs_opts`; \ | ||
386 | 860 | volid=`cat $(CD).volid`; \ | ||
387 | 861 | rm -f $(OUT)/$(call CDSRCBASE,$(CD)).raw; \ | ||
388 | 862 | $(MKISOFS) $(MKISOFS_OPTS) -V "$$volid" \ | ||
389 | 863 | -o $(OUT)/$(call CDSRCBASE,$(CD)).raw $$opts CD$(CD); \ | ||
390 | 864 | chmod +r $(OUT)/$(call CDSRCBASE,$(CD)).raw | ||
391 | 865 | |||
392 | 866 | |||
393 | 867 | #Calculate the md5sums for the images (if available), or get from templates | 744 | #Calculate the md5sums for the images (if available), or get from templates |
394 | 868 | imagesums: | 745 | imagesums: |
395 | 869 | $(Q)cd $(OUT); :> MD5SUMS; :> SHA1SUMS; for file in `find * -name \*.raw`; do \ | 746 | $(Q)cd $(OUT); :> MD5SUMS; :> SHA1SUMS; for file in `find * -name \*.raw`; do \ |
396 | diff --git a/tools/list2cds b/tools/list2cds | |||
397 | index 64506fc..d8b17e3 100755 | |||
398 | --- a/tools/list2cds | |||
399 | +++ b/tools/list2cds | |||
400 | @@ -22,7 +22,7 @@ my $exclude = "$list.exclude"; | |||
401 | 22 | my $nodepends = $ENV{'NODEPENDS'} || 0; | 22 | my $nodepends = $ENV{'NODEPENDS'} || 0; |
402 | 23 | my $norecommends = $ENV{'NORECOMMENDS'} || 0; | 23 | my $norecommends = $ENV{'NORECOMMENDS'} || 0; |
403 | 24 | my $nosuggests = $ENV{'NOSUGGESTS'} || 1; | 24 | my $nosuggests = $ENV{'NOSUGGESTS'} || 1; |
405 | 25 | my $maxcds = $ENV{'MAXCDS'} || 0; | 25 | my $maxcds = 1; |
406 | 26 | my $overflowbincds = $ENV{'OVERFLOWBINCDS'} || 1; | 26 | my $overflowbincds = $ENV{'OVERFLOWBINCDS'} || 1; |
407 | 27 | 27 | ||
408 | 28 | my $apt = "$ENV{'BASEDIR'}/tools/apt-selection"; | 28 | my $apt = "$ENV{'BASEDIR'}/tools/apt-selection"; |
409 | @@ -288,7 +288,7 @@ foreach (glob("$dir/*.packages")) { | |||
410 | 288 | # Now write the lists down | 288 | # Now write the lists down |
411 | 289 | my $numcds=0; | 289 | my $numcds=0; |
412 | 290 | foreach (sort { $a <=> $b } keys %cds) { | 290 | foreach (sort { $a <=> $b } keys %cds) { |
414 | 291 | if ($maxcds && $numcds+1 > $maxcds) { | 291 | if ($maxcds && $numcds+1 > 1) { |
415 | 292 | msg(0, "Stopping at CD $numcds\n"); | 292 | msg(0, "Stopping at CD $numcds\n"); |
416 | 293 | last; | 293 | last; |
417 | 294 | } | 294 | } |
FWIW I've tested this locally now.