Merge lp:~oem-solutions-releng/live-build/lb-sg-2.x-explicit-rootfs-size into lp:~ce-infrastructure/live-build/lb-sg-2.x

Proposed by Timothy R. Chavez
Status: Merged
Approved by: Timothy R. Chavez
Approved revision: 1614
Merged at revision: 1613
Proposed branch: lp:~oem-solutions-releng/live-build/lb-sg-2.x-explicit-rootfs-size
Merge into: lp:~ce-infrastructure/live-build/lb-sg-2.x
Diff against target: 80 lines (+31/-2)
4 files modified
debian/changelog (+9/-0)
functions/defaults.sh (+3/-0)
scripts/build/lb_binary_rootfs (+9/-2)
scripts/build/lb_config (+10/-0)
To merge this branch: bzr merge lp:~oem-solutions-releng/live-build/lb-sg-2.x-explicit-rootfs-size
Reviewer Review Type Date Requested Status
Nicola Heald (community) Approve
Review via email: mp+156626@code.launchpad.net

Description of the change

Make the size of the rootfs configurable (in MB's). We retain the default, which is to allow live-build to auto-calculate what the size of the rootfs should be.

To post a comment you must log in.
Revision history for this message
Nicola Heald (notnownikki) wrote :

Looks fine to me, +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2013-03-27 01:09:57 +0000
3+++ debian/changelog 2013-04-02 16:15:34 +0000
4@@ -1,3 +1,12 @@
5+live-build (2.0.12-2cesg20) lucid; urgency=low
6+
7+ * functions/defaults.sh,
8+ scripts/build/lb_binary_rootfs,
9+ scripts/build/lb_config:
10+ - Make rootfs size configurable
11+
12+ -- Timothy Chavez <timothy.chavez@canonical.com> Mon, 01 Apr 2013 11:58:02 -0500
13+
14 live-build (2.0.12-2cesg19) lucid; urgency=low
15
16 * functions/defaults.sh
17
18=== modified file 'functions/defaults.sh'
19--- functions/defaults.sh 2013-03-27 01:09:57 +0000
20+++ functions/defaults.sh 2013-04-02 16:15:34 +0000
21@@ -516,6 +516,9 @@
22 # Setting chroot filesystem
23 LB_CHROOT_FILESYSTEM="${LB_CHROOT_FILESYSTEM:-squashfs}"
24
25+ # Setting chroot filesystem size
26+ LB_CHROOT_FILESYSTEM_SIZE="${LB_CHROOT_FILESYSTEM_SIZE:-auto}"
27+
28 # Setting chroot filesystem blocksize
29 LB_CHROOT_FILESYSTEM_BLOCKSIZE="${LB_CHROOT_FILESYSTEM_BLOCKSIZE:-1024}"
30
31
32=== modified file 'scripts/build/lb_binary_rootfs'
33--- scripts/build/lb_binary_rootfs 2013-03-27 01:09:57 +0000
34+++ scripts/build/lb_binary_rootfs 2013-04-02 16:15:34 +0000
35@@ -107,8 +107,15 @@
36 ;;
37 esac
38
39- REAL_DIM="$(Calculate_partition_size ${DU_DIM} ${LB_CHROOT_FILESYSTEM})"
40- REAL_INODES="$(Calculate_partition_size ${INODES} ${LB_CHROOT_FILESYSTEM})"
41+ if [ "$LB_CHROOT_FILESYSTEM_SIZE" = "auto" ]
42+ then
43+ REAL_DIM="$(Calculate_partition_size ${DU_DIM} ${LB_CHROOT_FILESYSTEM})"
44+ REAL_INODES="$(Calculate_partition_size ${INODES} ${LB_CHROOT_FILESYSTEM})"
45+ else
46+ REAL_DIM="${LB_CHROOT_FILESYSTEM_SIZE}"
47+ # Passing -N 0 will produce the same result as passing no argument at all
48+ REAL_INODES="0"
49+ fi
50
51 RESERVED_PERCENTAGE="--reserved-percentage"
52
53
54=== modified file 'scripts/build/lb_config'
55--- scripts/build/lb_config 2013-03-27 01:09:57 +0000
56+++ scripts/build/lb_config 2013-04-02 16:15:34 +0000
57@@ -454,6 +454,12 @@
58 shift 2
59 ;;
60
61+ --chroot-filesystem-size)
62+ LB_CHROOT_FILESYSTEM_SIZE="${2}"
63+ shift 2
64+ ;;
65+
66+
67 --chroot-filesystem-blocksize)
68 LB_CHROOT_FILESYSTEM_BLOCKSIZE="${2}"
69 shift 2
70@@ -1086,6 +1092,10 @@
71 # (Default: ${LB_CHROOT_FILESYSTEM})
72 LB_CHROOT_FILESYSTEM="${LB_CHROOT_FILESYSTEM}"
73
74+# \$LB_CHROOT_FILESYSTEM_SIZE; set chroot filesystem size (in MB)
75+# (Default: ${LB_CHROOT_FILESYSTEM_SIZE})
76+LB_CHROOT_FILESYSTEM_SIZE="${LB_CHROOT_FILESYSTEM_SIZE}"
77+
78 # \$LB_CHROOT_FILESYSTEM_BLOCKSIZE; set chroot filesystem blocksize
79 # (Default: ${LB_CHROOT_FILESYSTEM_BLOCKSIZE})
80 LB_CHROOT_FILESYSTEM_BLOCKSIZE="${LB_CHROOT_FILESYSTEM_BLOCKSIZE}"

Subscribers

People subscribed via source and target branches