akhilkalwakurthy

.ks file

Mar 9th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 5.92 KB | None | 0 0
  1. # DisplayName: Jolla kenzo/@ARCH@ (release) 1
  2. # KickstartType: release
  3. # SuggestedImageType: fs
  4. # SuggestedArchitecture: armv7hl
  5.  
  6. timezone --utc UTC
  7. lang en_US.UTF-8
  8. keyboard us
  9. user --name nemo --groups audio,video --password nemo
  10.  
  11. ### Commands from /tmp/sandbox/usr/share/ssu/kickstart/part/default
  12. part / --size 500 --ondisk sda --fstype=ext4
  13.  
  14. ## No suitable configuration found in /tmp/sandbox/usr/share/ssu/kickstart/bootloader
  15.  
  16. repo --name=openrepos --baseurl=https://sailfish.openrepos.net/basil/personal/main/
  17. repo --name=adaptation-community-kenzo-@RELEASE@ --baseurl=http://repo.merproject.org/obs/nemo:/devel:/hw:/xiaomi:/kenzo/sailfish_latest_@ARCH@/
  18. repo --name=adaptation-community-common-kenzo-@RELEASE@ --baseurl=http://repo.merproject.org/obs/nemo:/devel:/hw:/common/sailfish_latest_@ARCH@/
  19. repo --name=apps-@RELEASE@ --baseurl=https://releases.jolla.com/jolla-apps/@RELEASE@/@ARCH@/
  20. repo --name=hotfixes-@RELEASE@ --baseurl=https://releases.jolla.com/releases/@RELEASE@/hotfixes/@ARCH@/
  21. repo --name=jolla-@RELEASE@ --baseurl=https://releases.jolla.com/releases/@RELEASE@/jolla/@ARCH@/
  22.  
  23. %packages
  24. @Jolla Configuration kenzo
  25. harbour-kladi
  26. harbour-mmslog
  27. harbour-sailorgram
  28. harbour-communi
  29. harbour-books
  30. harbour-messwerk
  31. sailfish-content-tones-default
  32. sailfish-content-profiled-settings-default
  33. sailfish-content-gallery-default
  34. sailfish-content-gallery-configuration-2k
  35. sailfish-content-ambiences-default-default-ambience
  36. sailfish-content-ambiences-default
  37. sailfish-weather
  38. harbour-poor-maps
  39. less
  40. susepaste
  41. geoclue-provider-mlsdb-agreements
  42. geoclue-provider-mlsdb
  43. geoclue-provider-hybris
  44. gstreamer1.0-droid
  45. telepathy-ring
  46. mms-engine
  47. voicecall-ui-jolla-settings
  48. voicecall-ui-jolla
  49. jolla-settings-layout
  50. strace
  51. jolla-calendar
  52. jolla-mediaplayer
  53. jolla-clock
  54. jolla-notes
  55. jolla-email
  56. jolla-calculator
  57. sailfish-office
  58. %end
  59.  
  60. %attachment
  61. ### Commands from /tmp/sandbox/usr/share/ssu/kickstart/attachment/kenzo
  62. /boot/hybris-boot.img
  63. /boot/hybris-updater-script
  64. /boot/hybris-updater-unpack.sh
  65. /boot/update-binary
  66.  
  67. %end
  68.  
  69. %pre
  70. export SSU_RELEASE_TYPE=release
  71. ### begin 01_init
  72. touch $INSTALL_ROOT/.bootstrap
  73. ### end 01_init
  74. %end
  75.  
  76. %post
  77. export SSU_RELEASE_TYPE=release
  78. ### begin 01_arch-hack
  79. if [ "@ARCH@" == armv7hl ] || [ "@ARCH@" == armv7tnhl ]; then
  80.     # Without this line the rpm does not get the architecture right.
  81.     echo -n "@ARCH@-meego-linux" > /etc/rpm/platform
  82.  
  83.     # Also libzypp has problems in autodetecting the architecture so we force tha as well.
  84.     # https://bugs.meego.com/show_bug.cgi?id=11484
  85.     echo "arch = @ARCH@" >> /etc/zypp/zypp.conf
  86. fi
  87. ### end 01_arch-hack
  88. ### begin 01_rpm-rebuilddb
  89. # Rebuild db using target's rpm
  90. echo -n "Rebuilding db using target rpm.."
  91. rm -f /var/lib/rpm/__db*
  92. rpm --rebuilddb
  93. echo "done"
  94. ### end 01_rpm-rebuilddb
  95. ### begin 50_oneshot
  96. # exit boostrap mode
  97. rm -f /.bootstrap
  98.  
  99. # export some important variables until there's a better solution
  100. export LANG=en_US.UTF-8
  101. export LC_COLLATE=en_US.UTF-8
  102. export GSETTINGS_BACKEND=gconf
  103.  
  104. # run the oneshot triggers for root and first user uid
  105. UID_MIN=$(grep "^UID_MIN" /etc/login.defs |  tr -s " " | cut -d " " -f2)
  106. DEVICEUSER=`getent passwd $UID_MIN | sed 's/:.*//'`
  107.  
  108. if [ -x /usr/bin/oneshot ]; then
  109.    su -c "/usr/bin/oneshot --mic"
  110.    su -c "/usr/bin/oneshot --mic" $DEVICEUSER
  111. fi
  112. ### end 50_oneshot
  113. ### begin 60_ssu
  114. if [ "$SSU_RELEASE_TYPE" = "rnd" ]; then
  115.     [ -n "@RNDRELEASE@" ] && ssu release -r @RNDRELEASE@
  116.     [ -n "@RNDFLAVOUR@" ] && ssu flavour @RNDFLAVOUR@
  117.     # RELEASE is reused in RND setups with parallel release structures
  118.     # this makes sure that an image created from such a structure updates from there
  119.     [ -n "@RELEASE@" ] && ssu set update-version @RELEASE@
  120.     ssu mode 2
  121. else
  122.     [ -n "@RELEASE@" ] && ssu release @RELEASE@
  123.     ssu mode 4
  124. fi
  125. ### end 60_ssu
  126. ### begin 70_sdk-domain
  127.  
  128. export SSU_DOMAIN=@RNDFLAVOUR@
  129.  
  130. if [ "$SSU_RELEASE_TYPE" = "release" ] && [[ "$SSU_DOMAIN" = "public-sdk" ]];
  131. then
  132.     ssu domain sailfish
  133. fi
  134. ### end 70_sdk-domain
  135. %end
  136.  
  137. %post --nochroot
  138. export SSU_RELEASE_TYPE=release
  139. ### begin 01_release
  140. if [ -n "$IMG_NAME" ]; then
  141.     echo "BUILD: $IMG_NAME" >> $INSTALL_ROOT/etc/meego-release
  142. fi
  143. ### end 01_release
  144. ### begin kenzo
  145. cp $INSTALL_ROOT/etc/sailfish-release $IMG_OUT_DIR
  146. ### end kenzo
  147. %end
  148.  
  149. %pack
  150. export SSU_RELEASE_TYPE=release
  151. ### begin hybris
  152. pushd $IMG_OUT_DIR
  153.  
  154. DEVICE=kenzo
  155.  
  156. VERSION_FILE=./sailfish-release
  157. source $VERSION_FILE
  158.  
  159. # Locate rootfs tar.bz2 archive.
  160. for filename in *.tar.bz2; do
  161.     GEN_IMG_BASE=$(basename $filename .tar.bz2)
  162. done
  163.  
  164. if [ ! -e "$GEN_IMG_BASE.tar.bz2" ]; then
  165.     echo "No rootfs archive found, exiting ..."
  166.     exit 1
  167. fi
  168.  
  169. IMG_SIZE=$(du -h $GEN_IMG_BASE.tar.bz2 | cut -f1)
  170.  
  171. # Output filenames
  172. DST_IMG_BASE=$ID-$DEVICE-$SAILFISH_FLAVOUR-$VERSION_ID@EXTRA_NAME@
  173. DST_IMG=$DST_IMG_BASE.tar.bz2
  174.  
  175. # Copy boot image, updater scripts and updater binary into updater .zip tree.
  176. mkdir -p updater/META-INF/com/google/android
  177.  
  178. mv update-binary updater/META-INF/com/google/android/update-binary
  179. mv hybris-updater-script updater/META-INF/com/google/android/updater-script
  180. mv hybris-updater-unpack.sh updater/updater-unpack.sh
  181. mv hybris-boot.img updater/hybris-boot.img
  182.  
  183. # Temporarily move the rootfs into the updater directory
  184. mv $GEN_IMG_BASE.tar.bz2 updater/$DST_IMG
  185.  
  186. # Update updater-script with image details.
  187. 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
  188.  
  189. # pack updater .zip
  190. pushd updater
  191. 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
  192. popd # updater
  193.  
  194. # Move the rootfs back out of the updater directory
  195. mv updater/$DST_IMG $GEN_IMG_BASE.tar.bz2
  196.  
  197. # Clean up updater .zip working directory.
  198. rm -rf updater
  199.  
  200. popd # $IMG_OUT_DIR
  201. ### end hybris
  202. %end
Add Comment
Please, Sign In to add comment