Changeset 881
- Timestamp:
- Mar 16, 2016, 12:23:22 PM (5 years ago)
- Location:
- lliurex-maker/trunk/fuentes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
lliurex-maker/trunk/fuentes/debian/control
r874 r881 15 15 Package: lliurex-maker-new 16 16 Architecture: all 17 Depends: ${misc:Depends}, live-build, curl, reprepro, syslinux, syslinux-themes-ubuntu-xenial, gfxboot-theme-ubuntu, syslinux-utils 17 Depends: ${misc:Depends}, live-build, curl, reprepro, syslinux, syslinux-themes-ubuntu-xenial, gfxboot-theme-ubuntu, syslinux-utils, squashfs-tools 18 18 Description: Contains lliurex-maker 19 19 This package contains the : lliurex-maker -
lliurex-maker/trunk/fuentes/new/usr/share/lliurex-maker/auto/build
r862 r881 16 16 rm -f binary.success 17 17 ( 18 if [ -d config/gnupg ]; then19 cat << @@EOF > config/gnupg/NEWKEY20 Key-Type: DSA21 Key-Length: 102422 Key-Usage: sign23 Name-Real: Ubuntu Local Archive One-Time Signing Key24 Name-Email: cdimage@ubuntu.com25 Expire-Date: 026 @@EOF27 gpg --home config/gnupg --gen-key --batch < config/gnupg/NEWKEY \28 > config/gnupg/generate.log 2>&1 &29 GPG_PROCESS=$!30 fi31 18 32 19 lb bootstrap "$@" … … 51 38 EOF 52 39 53 lb chroot "$@" 54 55 if [ -f config/oem-config-preinstalled ]; then 56 57 # This is cargo-culted almost verbatim (with some syntax changes for 58 # preinstalled being slightly different in what it doesn't ask) from 59 # debian-installer's apt-setup: 60 61 codename=$LB_DISTRIBUTION 62 file="chroot/etc/apt/sources.list" 63 dists="main" 64 alldists="main" 65 if echo "$LB_PARENT_ARCHIVE_AREAS" | grep -q restricted; then 66 dists="$dists restricted" 67 alldists="$alldists restricted" 68 fi 69 if echo "$LB_PARENT_ARCHIVE_AREAS" | grep -q universe; then 70 UNIVERSE=true 71 else 72 UNIVERSE=false 73 fi 74 if echo "$LB_PARENT_ARCHIVE_AREAS" | grep -q multiverse; then 75 MULTIVERSE=true 76 else 77 MULTIVERSE=false 78 fi 79 80 cat > $file <<EOF 81 # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to 82 # newer versions of the distribution. 83 84 deb $LB_PARENT_MIRROR_BINARY $codename $dists 85 deb-src $LB_PARENT_MIRROR_BINARY $codename $dists 86 87 ## Major bug fix updates produced after the final release of the 88 ## distribution. 89 deb $LB_PARENT_MIRROR_BINARY $codename-updates $dists 90 deb-src $LB_PARENT_MIRROR_BINARY $codename-updates $dists 40 cat > config/hooks/fixvmlinuz.binary <<'EOF' 41 #! /bin/sh 42 mv binary/casper/vmlinuz* binary/casper/vmlinuz 43 mv binary/casper/initrd.img* binary/casper/initrd.lz 91 44 EOF 92 45 93 # Even if universe isn't enabled, we write example lines for it.94 echo >> $file95 if [ "$UNIVERSE" = true ]; then96 alldists="$alldists universe"97 COMMENT=98 else99 cat >> $file <<EOF100 ## Uncomment the following two lines to add software from the 'universe'101 ## repository.102 EOF103 COMMENT='# '104 fi105 cat >> $file <<EOF106 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu107 ## team. Also, please note that software in universe WILL NOT receive any108 ## review or updates from the Ubuntu security team.109 ${COMMENT}deb $LB_PARENT_MIRROR_BINARY $codename universe110 ${COMMENT}deb-src $LB_PARENT_MIRROR_BINARY $codename universe111 ${COMMENT}deb $LB_PARENT_MIRROR_BINARY $codename-updates universe112 ${COMMENT}deb-src $LB_PARENT_MIRROR_BINARY $codename-updates universe113 EOF114 46 115 # Multiverse is different, don't write anything unless enabled. 116 if [ "$MULTIVERSE" = true ]; then 117 alldists="$alldists multiverse" 118 cat >> $file <<EOF 119 120 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 121 ## team, and may not be under a free licence. Please satisfy yourself as to 122 ## your rights to use the software. Also, please note that software in 123 ## multiverse WILL NOT receive any review or updates from the Ubuntu 124 ## security team. 125 deb $LB_PARENT_MIRROR_BINARY $codename multiverse 126 deb-src $LB_PARENT_MIRROR_BINARY $codename multiverse 127 deb $LB_PARENT_MIRROR_BINARY $codename-updates multiverse 128 deb-src $LB_PARENT_MIRROR_BINARY $codename-updates multiverse 129 EOF 130 fi 131 132 cat >> $file <<EOF 133 134 ## N.B. software from this repository may not have been tested as 135 ## extensively as that contained in the main release, although it includes 136 ## newer versions of some applications which may provide useful features. 137 ## Also, please note that software in backports WILL NOT receive any review 138 ## or updates from the Ubuntu security team. 139 # deb $LB_PARENT_MIRROR_BINARY $codename-backports $alldists 140 # deb-src $LB_PARENT_MIRROR_BINARY $codename-backports $alldists 141 EOF 142 143 cat >> $file <<EOF 144 145 deb $LB_PARENT_MIRROR_BINARY $codename-security $dists 146 deb-src $LB_PARENT_MIRROR_BINARY $codename-security $dists 147 EOF 148 149 # Security sources for Ubuntu universe; not used much, but e.g. unsupported 150 # binary packages from a supported source package will end up here. 151 if [ "$UNIVERSE" = true ]; then 152 COMMENT= 153 else 154 COMMENT='# ' 155 fi 156 cat >> $file <<EOF 157 ${COMMENT}deb $LB_PARENT_MIRROR_BINARY $codename-security universe 158 ${COMMENT}deb-src $LB_PARENT_MIRROR_BINARY $codename-security universe 159 EOF 160 161 # Security sources for Ubuntu multiverse, with the same caveats as for 162 # universe. 163 if [ "$MULTIVERSE" = true ]; then 164 COMMENT= 165 else 166 COMMENT='# ' 167 fi 168 cat >> $file <<EOF 169 ${COMMENT}deb $LB_PARENT_MIRROR_BINARY $codename-security multiverse 170 ${COMMENT}deb-src $LB_PARENT_MIRROR_BINARY $codename-security multiverse 171 EOF 172 173 fi 174 if [ -d chroot/var/lib/preinstalled-pool ]; then 175 cat > config/indices/apt.conf <<-EOF 176 Dir { 177 ArchiveDir "chroot/var/lib/preinstalled-pool"; 178 OverrideDir "config/indices"; 179 CacheDir "config/indices"; 180 } 181 Default { Packages::Compress ". bzip2"; } 182 TreeDefault { Directory "pool"; } 183 Tree "dists/$LB_DISTRIBUTION" 184 { 185 Sections "$LB_PARENT_ARCHIVE_AREAS"; 186 Architectures "$LB_ARCHITECTURES"; 187 BinOverride "override.$LB_DISTRIBUTION.\$(SECTION)"; 188 ExtraOverride "override.$LB_DISTRIBUTION.extra.\$(SECTION)"; 189 Contents " "; 190 } 191 EOF 192 for component in $LB_PARENT_ARCHIVE_AREAS; do 193 mkdir -p chroot/var/lib/preinstalled-pool/dists/$LB_DISTRIBUTION/$component/binary-$LB_ARCHITECTURES 194 done 195 apt-ftparchive generate config/indices/apt.conf 196 cat << @@EOF > chroot/etc/apt/sources.list.preinstall 197 # This is a sources.list entry for a small pool of packages 198 # provided on your preinstalled filesystem for your convenience. 199 # 200 # It is perfectly safe to delete both this entry and the directory 201 # it references, should you want to save disk space and fetch the 202 # packages remotely instead. 203 # 204 deb file:/var/lib/preinstalled-pool/ $LB_DISTRIBUTION $LB_PARENT_ARCHIVE_AREAS 205 # 206 @@EOF 207 208 cp chroot/etc/apt/sources.list chroot/etc/apt/sources.list.orig 209 cp chroot/etc/apt/sources.list.preinstall chroot/etc/apt/sources.list 210 211 echo "Waiting on gnupg ("$GPG_PROCESS") to finish generating a key." 212 wait $GPG_PROCESS 213 214 R_ORIGIN=$(lsb_release -i -s) 215 R_CODENAME=$(lsb_release -c -s) 216 R_VERSION=$(lsb_release -r -s) 217 R_PRETTYNAME=$(echo $R_CODENAME | sed -e 's/^\(.\)/\U\1/') 218 219 apt-ftparchive -o APT::FTPArchive::Release::Origin=$R_ORIGIN \ 220 -o APT::FTPArchive::Release::Label=$R_ORIGIN \ 221 -o APT::FTPArchive::Release::Suite=$R_CODENAME-local \ 222 -o APT::FTPArchive::Release::Version=$R_VERSION \ 223 -o APT::FTPArchive::Release::Codename=$R_CODENAME \ 224 -o APT::FTPArchive::Release::Description="$R_ORIGIN $R_PRETTYNAME Local" \ 225 release chroot/var/lib/preinstalled-pool/dists/$R_CODENAME/ \ 226 > config/gnupg/Release 227 228 gpg --home config/gnupg --detach-sign --armor config/gnupg/Release 229 mv config/gnupg/Release \ 230 chroot/var/lib/preinstalled-pool/dists/$R_CODENAME/Release 231 mv config/gnupg/Release.asc \ 232 chroot/var/lib/preinstalled-pool/dists/$R_CODENAME/Release.gpg 233 apt-key --keyring chroot/etc/apt/trusted.gpg add config/gnupg/pubring.gpg 234 find chroot/var/lib/preinstalled-pool/ -name Packages | xargs rm 235 236 Chroot chroot "apt-get update" 237 cat chroot/etc/apt/sources.list.preinstall chroot/etc/apt/sources.list.orig \ 238 > chroot/etc/apt/sources.list 239 rm chroot/etc/apt/sources.list.preinstall chroot/etc/apt/sources.list.orig 240 fi 241 if [ "$PROJECT" = "ubuntu-touch" ] || [ "$PROJECT" = "ubuntu-pd" ]; then 242 if [ "$ARCH" = "armhf" ]; then 243 INFO_DESC="$(lsb_release -d -s)" 244 echo "$INFO_DESC - $ARCH ($BUILDSTAMP)" >chroot/etc/media-info 245 mkdir -p chroot/var/log/installer 246 Chroot chroot "ln -s /etc/media-info /var/log/installer/media-info" 247 fi 248 fi 249 if [ "$PROJECT" = "ubuntu-cpc" ]; then 250 cat > chroot/etc/cloud/build.info << EOF 251 build_name: server 252 serial: $BUILDSTAMP 253 EOF 254 cat > chroot/etc/apt/sources.list << EOF 255 deb ${LB_PARENT_MIRROR_BINARY} ${LB_DISTRIBUTION} main restricted universe multiverse 256 deb ${LB_PARENT_MIRROR_BINARY} ${LB_DISTRIBUTION}-updates main restricted universe multiverse 257 deb ${LB_PARENT_MIRROR_BINARY_SECURITY} ${LB_DISTRIBUTION}-security main restricted universe multiverse 258 EOF 259 lb chroot_hosts install 260 lb chroot_resolv install 261 Chroot chroot "apt-get update" 262 lb chroot_resolv remove 263 lb chroot_hosts remove 264 fi 47 lb chroot "$@" 265 48 266 49 echo "===== Checking size of /usr/share/doc =====" … … 320 103 fi 321 104 322 if [ "$PROJECT" = "ubuntu-touch" ] || [ "$PROJECT" = "ubuntu-pd" ]; then323 (cd "binary/$INITFS/custom.dir/" && tar -c *) | \324 gzip -9 --rsyncable > "$PREFIX.custom.tar.gz"325 chmod 644 "$PREFIX.custom.tar.gz"326 fi327 328 105 # '--initramfs none' produces different manifest names. 329 106 if [ -e "binary/$INITFS/filesystem.packages" ]; then … … 339 116 fi 340 117 341 # ubuntu-core and ubuntu-desktop-next splits kernel stuff into a "device" tarball so342 # at this point we reset it to "none" as all the work to extract it was done already343 # in a binary hook344 case $PROJECT:$SUBPROJECT in345 ubuntu-core:system-image|ubuntu-desktop-next:system-image)346 347 # create device tarball (for snappy only atm)348 if [ "$PROJECT:$SUBPROJECT" = "ubuntu-core:system-image" ]; then349 case $ARCH in350 armhf)351 subarches="generic raspi2"352 ;;353 i386|amd64|arm64|powerpc|ppc64el)354 subarches="generic"355 ;;356 esac357 358 # create a clean chroot359 debootstrap --variant=minbase $LB_DISTRIBUTION chroot-device $LB_PARENT_MIRROR_BOOTSTRAP360 361 # ... but keep the PPA setup362 cp -a chroot/etc/apt/* chroot-device/etc/apt/363 364 # ... and move it in place365 rm -rf chroot366 mv chroot-device chroot367 368 for devarch in $subarches; do369 (echo "I: creating $devarch device tarball for $ARCH"370 HERE="$(pwd)"371 set -x372 373 linux_package="linux-$devarch"374 case $ARCH in375 amd64)376 linux_package="linux-signed-generic"377 ;;378 esac379 380 # make sure all virtual filesystems are available381 lb chroot_proc install "$@"382 lb chroot_sysfs install "$@"383 lb chroot_devpts install "$@"384 385 # prepare the env386 Chroot chroot "apt-get -y update"387 Chroot chroot "apt-get -y purge linux-image-*"388 Chroot chroot "apt-get -y autoremove"389 rm -rf chroot/boot/initrd.img* chroot/boot/vmlinu?-* chroot/lib/modules/* \390 chroot/boot/abi-* chroot/boot/System.map-* chroot/boot/config-*391 mkdir -p chroot/etc/initramfs-tools/conf.d392 echo "COMPRESS=lzma" >chroot/etc/initramfs-tools/conf.d/snappy-device-tarball.conf393 394 # install needed packages and the kernel itself395 Chroot chroot "apt-get -y install initramfs-tools-ubuntu-core linux-firmware xz-utils"396 Chroot chroot "apt-get -y install $linux_package"397 398 Chroot chroot "dpkg -l" > chroot/dpkg.list399 400 # clean up401 lb chroot_devpts remove "$@"402 lb chroot_sysfs remove "$@"403 lb chroot_proc remove "$@"404 405 # now build the actual device tarball406 TMPDIR="$(mktemp -d)"407 mkdir -p $TMPDIR/system/408 mkdir -p $TMPDIR/assets/409 410 cd chroot411 cp -ar --parent lib/modules/ $TMPDIR/system/412 cp -ar --parent lib/firmware/ $TMPDIR/system/413 414 # new assets handling415 if [ -f boot/vmlinu?-*.signed ]; then416 kernel=boot/vmlinu?-*.signed417 else418 kernel=boot/vmlinu?-*419 fi420 421 initrd=boot/initrd.img-*422 423 cp -ar $initrd $TMPDIR/assets/424 cp -ar $kernel $TMPDIR/assets/425 cp -ar boot/abi-* boot/System.map-* boot/config-* $TMPDIR/assets/426 427 dtbs=$(find lib/firmware -type d -name 'device-tree' -print0)428 if [ -n "$dtbs" ]; then429 mv "$dtbs" $TMPDIR/assets/dtbs430 case $devarch in431 raspi2)432 # ubuntu-device-flash does not like subdirs here, we need to tar it up433 if [ -e $TMPDIR/assets/dtbs/overlays ]; then434 tar -C $TMPDIR/assets/dtbs -f $TMPDIR/assets/dtbs/overlays.tgz -czv overlays435 rm -rf $TMPDIR/assets/dtbs/overlays436 fi437 ;;438 esac439 fi440 441 # copy dpkg manifest442 cp -ar dpkg.list $TMPDIR/assets443 444 # create hardware.yaml445 # this assumes armhf == u-boot446 # and all others grub447 # common bits448 cat > $TMPDIR/hardware.yaml << EOF449 kernel: assets/$(basename $kernel)450 initrd: assets/$(basename $initrd)451 partition-layout: system-AB452 EOF453 # arch specific ones454 if [ "$ARCH" = "armhf" ]; then455 cat >> $TMPDIR/hardware.yaml << EOF456 dtbs: assets/dtbs457 bootloader: u-boot458 EOF459 else460 cat >> $TMPDIR/hardware.yaml << EOF461 bootloader: grub462 EOF463 fi464 465 # compress everything466 cd $TMPDIR467 tarname="device.tar.gz"468 if [ "$devarch" = "raspi2" ];then469 tarname="raspi2.$tarname"470 fi471 tar -c -z -f $HERE/$PREFIX.$tarname system assets hardware.yaml472 473 # show size of initrd and kernel in the log474 ls -lh assets/475 476 # dump the content list into the log477 echo "I: device tarball contents for $PREFIX.$tarname:"478 find . -type f479 480 # azure wants its own device tarball481 if [ "$ARCH" = "amd64" ]; then482 cp $HERE/$PREFIX.$tarname $HERE/$PREFIX.azure.$tarname483 fi484 cd $HERE)485 done486 fi487 488 ls -l *device.tar.gz489 490 LB_LINUX_FLAVOURS=none491 ;;492 esac493 118 494 119 for FLAVOUR in $LB_LINUX_FLAVOURS; do … … 542 167 fi 543 168 fi 544 545 if [ "$SUBARCH" = "ac100" ] || [ "$SUBARCH" = "nexus7" ]; then546 # create the md5sum and size files for which we are actually doing all this547 md5sum $PREFIX.rootfs.tar.gz >chroot/installer.md5548 wc -c $PREFIX.rootfs.tar.gz >chroot/installer.size549 550 INFO_DESC="$(lsb_release -d -s)"551 INFO_STAMP=$(date +20%y%m%d-%H:%M)552 553 echo "$INFO_DESC - $ARCH ($INFO_STAMP)" >chroot/media-info554 555 # make sure update-initramfs feels cosy and warm in the environment556 lb chroot_proc install "$@"557 lb chroot_sysfs install "$@"558 lb chroot_devpts install "$@"559 560 # re-create initrd to contain the installer.md5 file561 Chroot chroot "env FLASH_KERNEL_SKIP=1 update-initramfs -k all -t -u -v"562 563 # create boot.img564 Chroot chroot "abootimg --create /boot/installer-${KVERS}.img -f /boot/bootimg.cfg-$SUBARCH -r /boot/initrd.img-${KVERS} -k /boot/vmlinuz-${KVERS}"565 566 if [ "$SUBARCH" = "nexus7" ]; then567 # roll the android rootfs images568 mkdir -p userdata569 mv $PREFIX.rootfs.tar.gz userdata/rootfs.tar.gz570 make_ext4fs -l 6G -s $PREFIX.ext4-$FLAVOUR userdata/571 mv userdata/rootfs.tar.gz $PREFIX.rootfs.tar.gz572 ln -sf "$PREFIX.ext4-$FLAVOUR" "$PREFIX.ext4"573 fi574 575 # clean up576 lb chroot_devpts remove "$@"577 lb chroot_sysfs remove "$@"578 lb chroot_proc remove "$@"579 580 cp "chroot/boot/installer-${KVERS}.img" "$PREFIX.bootimg-$FLAVOUR"581 ln -sf "$PREFIX.bootimg-$FLAVOUR" "$PREFIX.bootimg"582 583 fi584 585 if [ "$PROJECT" = "ubuntu-touch" ] || [ "$PROJECT" = "ubuntu-pd" ]; then586 sourceslist="chroot/etc/apt/sources.list"587 588 lb chroot_proc install "$@"589 lb chroot_sysfs install "$@"590 lb chroot_devpts install "$@"591 592 if [ -e "$PREFIX.manifest" ]; then593 Chroot chroot "click list" | while read line; do594 echo "click:$line" >>"$PREFIX.manifest"595 done596 fi597 598 if [ -e chroot/etc/resolv.conf ]; then599 mv chroot/etc/resolv.conf chroot/etc/resolv.conf.orig600 fi601 if [ -e /etc/resolv.conf ]; then602 cp /etc/resolv.conf chroot/etc/resolv.conf603 fi604 605 mv "${sourceslist}" "${sourceslist}.orig"606 mv "${sourceslist}.d" "${sourceslist}.d.orig"607 echo "deb $LB_PARENT_MIRROR_CHROOT ${LB_DISTRIBUTION} main universe multiverse restricted" >$sourceslist608 Chroot chroot "apt-get -y update"609 Chroot chroot "apt-get -y install android"610 611 if [ "$ARCH" = "armhf" ]; then612 touchsubarches="flo mako generic"613 for subarch in $touchsubarches; do614 cp -v chroot/usr/share/android/product/*-preinstalled-system-armel+${subarch}.img\615 "${PREFIX}.system-armel+${subarch}.img"616 cp -v chroot/usr/share/android/product/*-preinstalled-recovery-armel+${subarch}.img\617 "${PREFIX}.recovery-armel+${subarch}.img"618 cp -v chroot/usr/share/android/product/*-preinstalled-boot-armhf+${subarch}.img\619 "${PREFIX}.boot-armhf+${subarch}.img"620 # drop this following line once cdimage can handle -boot-*.img621 cp -v "${PREFIX}.boot-armhf+${subarch}.img" "${PREFIX}.bootimg-${subarch}"622 done623 fi624 if [ "$ARCH" = "i386" ]; then625 touchsubarches="generic_x86"626 for subarch in $touchsubarches; do627 cp -v chroot/usr/share/android/product/*-preinstalled-system-i386+${subarch}.img\628 "${PREFIX}.system-i386+${subarch}.img"629 cp -v chroot/usr/share/android/product/*-preinstalled-recovery-i386+${subarch}.img\630 "${PREFIX}.recovery-i386+${subarch}.img"631 cp -v chroot/usr/share/android/product/*-preinstalled-boot-i386+${subarch}.img\632 "${PREFIX}.boot-i386+${subarch}.img"633 # drop this following line once cdimage can handle -boot-*.img634 cp -v "${PREFIX}.boot-i386+${subarch}.img" "${PREFIX}.bootimg-${subarch}"635 done636 fi637 638 lb chroot_devpts remove "$@"639 lb chroot_sysfs remove "$@"640 lb chroot_proc remove "$@"641 642 rm -rf chroot/etc/init/*.override643 fi644 645 # LTSP chroot building (only in 32bit and for Edubuntu (DVD))646 case $PROJECT in647 edubuntu-dvd)648 if [ "$ARCH" = i386 ]; then649 echo "Building LTSP chroot"650 ltsp-build-client --base $(pwd) --mirror $LB_PARENT_MIRROR_BOOTSTRAP --arch $ARCH --dist $LB_PARENT_DISTRIBUTION --chroot ltsp-live --late-packages ldm-edubuntu-theme,plymouth-theme-edubuntu --purge-chroot --skipimage651 mkdir -p images652 mksquashfs ltsp-live images/ltsp-live.img -e cdrom653 rm -Rf ltsp-live654 if [ -f images/ltsp-live.img ]; then655 mv images/ltsp-live.img livecd.$PROJECT-ltsp.squashfs656 chmod 0644 livecd.$PROJECT-ltsp.squashfs657 rmdir --ignore-fail-on-non-empty images658 else659 echo "LTSP: Unable to build the chroot, see above for details."660 fi661 fi662 ;;663 esac
Note: See TracChangeset
for help on using the changeset viewer.