Guest User

Untitled

a guest
Jul 7th, 2019
40
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # DisplayName: Jolla f5121/@ARCH@ (release) 1+master.20190707092513.786300a
  2. # KickstartType: release
  3. # DeviceModel: f5121
  4. # DeviceVariant: sony-loire
  5. # SuggestedFeatures: customer-jolla, sailfish-xt9-feature, sailfish-eas, aliendalvik-feature
  6. # SuggestedImageType: loop
  7. # SuggestedArchitecture: armv7hl
  8.  
  9. user --name nemo --groups audio,input,video --password nemo
  10. timezone --utc UTC
  11. keyboard us
  12. lang en_US.UTF-8
  13.  
  14. ### Commands from /tmp/sandbox/usr/share/ssu/kickstart/part/default
  15. part / --size 500 --ondisk sda --fstype=ext4
  16.  
  17. ## No suitable configuration found in /tmp/sandbox/usr/share/ssu/kickstart/bootloader
  18.  
  19. repo --name=adaptation-community-f5121-@RELEASE@ --baseurl=http://repo.merproject.org/obs/home:/vknecht:/hw:/qualcomm:/f5121/sailfish_latest_@ARCH@/
  20. repo --name=adaptation-community-common-f5121-@RELEASE@ --baseurl=http://repo.merproject.org/obs/nemo:/devel:/hw:/common/sailfish_latest_@ARCH@/
  21. repo --name=apps-@RELEASE@ --baseurl=https://releases.jolla.com/jolla-apps/@RELEASE@/@ARCH@/
  22. repo --name=hotfixes-@RELEASE@ --baseurl=https://releases.jolla.com/releases/@RELEASE@/hotfixes/@ARCH@/
  23. repo --name=jolla-@RELEASE@ --baseurl=https://releases.jolla.com/releases/@RELEASE@/jolla/@ARCH@/
  24.  
  25. %packages
  26. @Jolla Configuration f5121
  27. %end
  28.  
  29. %attachment
  30. ### Commands from /tmp/sandbox/usr/share/ssu/kickstart/attachment/f5121
  31. /boot/hybris-boot.img
  32. /boot/hybris-updater-script
  33. /boot/hybris-updater-unpack.sh
  34. /boot/update-binary
  35.  
  36. %end
  37.  
  38. %pre
  39. export SSU_RELEASE_TYPE=release
  40. ### begin 01_init
  41. touch $INSTALL_ROOT/.bootstrap
  42. ### end 01_init
  43. %end
  44.  
  45. %post
  46. export SSU_RELEASE_TYPE=release
  47. ### begin 01_arch-hack
  48. if [ "@ARCH@" == armv7hl ] || [ "@ARCH@" == armv7tnhl ]; then
  49. # Without this line the rpm does not get the architecture right.
  50. echo -n "@ARCH@-meego-linux" > /etc/rpm/platform
  51.  
  52. # Also libzypp has problems in autodetecting the architecture so we force tha as well.
  53. # https://bugs.meego.com/show_bug.cgi?id=11484
  54. echo "arch = @ARCH@" >> /etc/zypp/zypp.conf
  55. fi
  56. ### end 01_arch-hack
  57. ### begin 01_rpm-rebuilddb
  58. # Rebuild db using target's rpm
  59. echo -n "Rebuilding db using target rpm.."
  60. rm -f /var/lib/rpm/__db*
  61. rpm --rebuilddb
  62. echo "done"
  63. ### end 01_rpm-rebuilddb
  64. ### begin 50_oneshot
  65. # exit boostrap mode
  66. rm -f /.bootstrap
  67.  
  68. # export some important variables until there's a better solution
  69. export LANG=en_US.UTF-8
  70. export LC_COLLATE=en_US.UTF-8
  71. export GSETTINGS_BACKEND=gconf
  72.  
  73. # run the oneshot triggers for root and first user uid
  74. UID_MIN=$(grep "^UID_MIN" /etc/login.defs | tr -s " " | cut -d " " -f2)
  75. DEVICEUSER=`getent passwd $UID_MIN | sed 's/:.*//'`
  76.  
  77. if [ -x /usr/bin/oneshot ]; then
  78. su -c "/usr/bin/oneshot --mic"
  79. su -c "/usr/bin/oneshot --mic" $DEVICEUSER
  80. fi
  81. ### end 50_oneshot
  82. ### begin 60_ssu
  83. if [ "$SSU_RELEASE_TYPE" = "rnd" ]; then
  84. [ -n "@RNDRELEASE@" ] && ssu release -r @RNDRELEASE@
  85. [ -n "@RNDFLAVOUR@" ] && ssu flavour @RNDFLAVOUR@
  86. # RELEASE is reused in RND setups with parallel release structures
  87. # this makes sure that an image created from such a structure updates from there
  88. [ -n "@RELEASE@" ] && ssu set update-version @RELEASE@
  89. ssu mode 2
  90. else
  91. [ -n "@RELEASE@" ] && ssu release @RELEASE@
  92. ssu mode 4
  93. fi
  94. ### end 60_ssu
  95. %end
  96.  
  97. %post --nochroot
  98. export SSU_RELEASE_TYPE=release
  99. ### begin 50_os-release
  100. (
  101. CUSTOMERS=$(find $INSTALL_ROOT/usr/share/ssu/features.d -name 'customer-*.ini' \
  102. |xargs --no-run-if-empty sed -n 's/^name[[:space:]]*=[[:space:]]*//p')
  103.  
  104. cat $INSTALL_ROOT/etc/os-release
  105. echo "SAILFISH_CUSTOMER=\"${CUSTOMERS//$'\n'/ }\""
  106. ) > $IMG_OUT_DIR/os-release
  107. ### end 50_os-release
  108. %end
  109.  
  110. %pack
  111. export SSU_RELEASE_TYPE=release
  112. ### begin hybris
  113. pushd $IMG_OUT_DIR
  114.  
  115. DEVICE=f5121
  116.  
  117. VERSION_FILE=./os-release
  118. source $VERSION_FILE
  119.  
  120. # Locate rootfs tar.bz2 archive.
  121. for filename in *.tar.bz2; do
  122. GEN_IMG_BASE=$(basename $filename .tar.bz2)
  123. done
  124.  
  125. if [ ! -e "$GEN_IMG_BASE.tar.bz2" ]; then
  126. echo "No rootfs archive found, exiting ..."
  127. exit 1
  128. fi
  129.  
  130. IMG_SIZE=$(du -h $GEN_IMG_BASE.tar.bz2 | cut -f1)
  131.  
  132. # Output filenames
  133. DST_IMG_BASE=$ID-$DEVICE-$SAILFISH_FLAVOUR-$VERSION_ID@EXTRA_NAME@
  134. DST_IMG=$DST_IMG_BASE.tar.bz2
  135.  
  136. # Copy boot image, updater scripts and updater binary into updater .zip tree.
  137. mkdir -p updater/META-INF/com/google/android
  138.  
  139. mv update-binary updater/META-INF/com/google/android/update-binary
  140. mv hybris-updater-script updater/META-INF/com/google/android/updater-script
  141. mv hybris-updater-unpack.sh updater/updater-unpack.sh
  142. mv hybris-boot.img updater/hybris-boot.img
  143.  
  144. # Temporarily move the rootfs into the updater directory
  145. mv $GEN_IMG_BASE.tar.bz2 updater/$DST_IMG
  146.  
  147. # Update updater-script with image details.
  148. sed -i -e "s %VERSION% $VERSION_ID g" -e "s %IMAGE_FILE% $DST_IMG g" -e "s %IMAGE_SIZE% $IMG_SIZE g" updater/META-INF/com/google/android/updater-script
  149.  
  150. # pack updater .zip
  151. pushd updater
  152. zip -r ../$DST_IMG_BASE.zip META-INF/com/google/android/update-binary META-INF/com/google/android/updater-script updater-unpack.sh hybris-boot.img $DST_IMG_BASE.ks $DST_IMG
  153. popd # updater
  154.  
  155. # Move the rootfs back out of the updater directory
  156. mv updater/$DST_IMG $GEN_IMG_BASE.tar.bz2
  157.  
  158. # Clean up updater .zip working directory.
  159. rm -rf updater
  160.  
  161. popd # $IMG_OUT_DIR
  162. ### end hybris
  163. %end
RAW Paste Data