1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
|
Recipe:
Active: true
Attachment: []
Baseline: tizen
BootLoader: true
BootloaderAppend: rw vga=current splash rootwait rootfstype=ext4 plymouth.enable=0
BootloaderOptions: --ptable=gpt --menus="install:Wipe and Install:systemd.unit=system-installer.service:test"
BootloaderTimeout: 3
DefaultUser: guest
DefaultUserPass: tizen
Desktop: None
ExtraPackages: []
FileName: default
Groups: []
Keyboard: us
Language: C
Mic2Options: -f loop --pack-to=@NAME@.tar.gz
Name: default-recipe
NoChrootScripts:
- buildname
Part: default-part
PostScripts:
- common-adaptation-rpi3
- generic-base
- common-base
- generic-console-tools
- common-packaging
- generic-adaptation
- generic-desktop-applications
- common-crosswalk
- common-license
- generic-security
- common-cleanup-rpi3
RemovePackages: []
Repos:
- tizen_unified
- tizen_base
RootPass: tizen
SaveRepos: false
Schedule: '*'
StartX: false
Timezone: Asia/Seoul
UserGroups: audio,video
Repositories:
- Name: tizen_unified
Options: --ssl_verify=no
Url: http://download.tizen.org/snapshots/tizen/unified/latest/repos/standard/packages/
- Name: tizen_base
Options: --ssl_verify=no
Url: http://download.tizen.org/snapshots/tizen/base/latest/repos/standard/packages/
Partitions:
- Name: default-part
Contents: |
part / --size=2000 --ondisk mmcblk0p --fstype=ext4 --label=rootfs --extoptions="-J size=16"
part /opt/ --size=1000 --ondisk mmcblk0p --fstype=ext4 --label=system-data --extoptions="-m 0"
part /mnt/initrd --size=7 --ondisk mmcblk0p --fstype=ext4 --label=ramdisk --extoptions="-b 1024"
- Name: common-mbr
Contents: |
part / --fstype="ext4" --size=3584 --ondisk=sda --active --label tizen-common --fsoptions=defaults,noatime
- Name: common-mbr-3parts
Contents: |
part / --fstype="ext4" --size=3500 --ondisk=mmcblk0 --label rootfs --fsoptions=defaults,noatime
part /opt --fstype="ext4" --size=512 --ondisk=mmcblk0 --label system-data --fsoptions=defaults,noatime
part /opt/usr --fstype="ext4" --size=3500 --ondisk=mmcblk0 --label user --fsoptions=defaults,noatime
- Name: common-mbr-boot
Contents: |
part /boot --fstype="vfat" --size=32 --ondisk=mmcblk0 --active --label boot --fsoptions=defaults,noatime
part /lib/modules --fstype="ext4" --size=20 --ondisk=mmcblk0 --active --label modules --fsoptions=defaults,noatime
- Name: common-artik-mbr-boot
Contents: |
part /lib/modules --fstype="ext4" --size=20 --ondisk=mmcblk0 --active --label modules --fsoptions=defaults,noatime
- Name: common-mbr-2parts-rpi3-ramdisk
Contents: |
part / --size=200 --ondisk mmcblk0p --fstype=ext4 --label=rootfs --extoptions="-J size=16"
part /opt/ --size=100 --ondisk mmcblk0p --fstype=ext4 --label=system-data --extoptions="-m 0"
part /mnt/initrd --size=7 --ondisk mmcblk0p --fstype=ext4 --label=ramdisk --extoptions="-b 1024"
- Name: common-3parts-ramdisk
Contents: |
part / --fstype="ext4" --size=3500 --ondisk=mmcblk0 --label rootfs --fsoptions=defaults,noatime
part /opt --fstype="ext4" --size=512 --ondisk=mmcblk0 --label system-data --fsoptions=defaults,noatime
part /opt/usr --fstype="ext4" --size=3500 --ondisk=mmcblk0 --label user --fsoptions=defaults,noatime
part /mnt/initrd --size=7 --ondisk mmcblk0p --fstype=ext4 --label=ramdisk --extoptions="-b 1024"
- Name: common-mbr-2parts-artik530_710-ramdisk
Contents: |
part / --size=1000 --ondisk mmcblk0p --fstype=ext4 --label=rootfs --extoptions="-J size=16"
part /opt/ --size=512 --ondisk mmcblk0p --fstype=ext4 --label=system-data --extoptions="-m 0"
part /mnt/initrd --size=7 --ondisk mmcblk0p --fstype=ext4 --label=ramdisk --extoptions="-b 1024"
- Name: common-mbr-2parts-rpi3-ramdisk-recovery
Contents: |
part / --size=1000 --ondisk mmcblk0p --fstype=ext4 --label=rootfs --extoptions="-J size=16"
part /opt/ --size=512 --ondisk mmcblk0p --fstype=ext4 --label=system-data --extoptions="-m 0"
part /mnt/initrd --size=7 --ondisk mmcblk0p --fstype=ext4 --label=ramdisk --extoptions="-b 1024"
part /mnt/initrd-recovery --size=12 --ondisk mmcblk0p --fstype=ext4 --label=ramdisk-recovery --extoptions="-b 1024"
- Name: common-mbr-2parts-rpi3-ramdisk-squashfs
Contents: |
part / --size=10 --ondisk mmcblk0p --fstype=ext4 --label=rootfs --extoptions="-b 1024"
part /usr --grow --fstype=ext4 --label=sqsh_usr --exclude-from-image
part /opt/ --size=70 --ondisk mmcblk0p --fstype=ext4 --label=system-data --extoptions="-m 0 -b 1024"
part /mnt/initrd --size=7 --ondisk mmcblk0p --fstype=ext4 --label=ramdisk --extoptions="-b 1024"
- Name: common-mbr-3parts-emulator
Contents: |
part / --size=3000 --ondisk=sda --fstype="ext4" --label=emulator-rootfs
part /opt/ --size=2000 --ondisk=sda --fstype="ext4" --label=emulator-sysdata
part /opt/usr/ --size=3000 --ondisk=sda --fstype="ext4" --label=emulator-user
- Name: mobile-mbr
Contents: |
part / --fstype="ext4" --size=3584 --ondisk=sda --active --label platform --fsoptions=defaults,noatime
- Name: mobile-dummy-partition
Contents: |
part / --exclude-from-image --fstype="ext4" --size=32 --ondisk=mmcblk0 --active --label dummy --fsoptions=defaults,noatime
- Name: mobile-headless
Contents: |
part / --size=2000 --ondisk mmcblk0p --fstype=ext4 --label=rootfs --extoptions="-J size=16"
part /opt/ --size=1000 --ondisk mmcblk0p --fstype=ext4 --label=system-data --extoptions="-m 0"
part /boot/kernel/mod_tizen_tm1/lib/modules --size=12 --ondisk mmcblk0p --fstype=ext4 --label=modules
- Name: mobile-2parts-emulator
Contents: |
part / --size=2000 --ondisk=sda --fstype=ext4 --label=emulator-rootfs
part /opt/ --size=2000 --ondisk=sda --fstype=ext4 --label=emulator-sysdata
- Name: mobile-mbr-3parts
Contents: |
part / --fstype="ext4" --size=3500 --ondisk=mmcblk0 --label rootfs --fsoptions=defaults,noatime
part /opt --fstype="ext4" --size=512 --ondisk=mmcblk0 --label system-data --fsoptions=defaults,noatime
part /opt/usr --fstype="ext4" --size=3500 --ondisk=mmcblk0 --label user --fsoptions=defaults,noatime
- Name: mobile-mbr-boot
Contents: |
part /boot --fstype="vfat" --size=32 --ondisk=mmcblk0 --active --label boot --fsoptions=defaults,noatime
part /lib/modules --fstype="ext4" --size=20 --ondisk=mmcblk0 --active --label modules --fsoptions=defaults,noatime
- Name: mobile-mbr-tm1
Contents: |
part / --size=2000 --ondisk mmcblk0p --fstype=ext4 --label=rootfs --extoptions="-J size=16"
part /opt/ --size=1000 --ondisk mmcblk0p --fstype=ext4 --label=system-data --extoptions="-m 0"
part /opt/usr --size=2000 --ondisk mmcblk0p --fstype=ext4 --label=user --extoptions="-m 0"
part /boot/kernel/mod_tizen_tm1/lib/modules --size=12 --ondisk mmcblk0p --fstype=ext4 --label=modules
part /mnt/initrd --size=7 --ondisk mmcblk0p --fstype=ext4 --label=ramdisk --extoptions="-b 1024"
part /mnt/initrd-recovery --size=8 --ondisk mmcblk0p --fstype=ext4 --label=ramdisk-recovery --extoptions="-b 1024"
- Name: tv-mbr
Contents: |
part / --fstype="ext4" --size=3584 --ondisk=sda --active --label platform --fsoptions=defaults,noatime
- Name: tv-mbr-boot
Contents: |
part /boot --fstype="vfat" --size=32 --ondisk=mmcblk0 --active --label boot --fsoptions=defaults,noatime
part /lib/modules --fstype="ext4" --size=20 --ondisk=mmcblk0 --active --label modules --fsoptions=defaults,noatime
- Name: tv-2parts-emulator
Contents: |
part / --size=2000 --ondisk=sda --fstype=ext4 --label=emulator-rootfs
part /opt/ --size=2000 --ondisk=sda --fstype=ext4 --label=emulator-sysdata
- Name: tv-3parts-ramdisk
Contents: |
part / --fstype="ext4" --size=3500 --ondisk=mmcblk0 --label rootfs --fsoptions=defaults,noatime
part /opt --fstype="ext4" --size=512 --ondisk=mmcblk0 --label system-data --fsoptions=defaults,noatime
part /opt/usr --fstype="ext4" --size=3500 --ondisk=mmcblk0 --label user --fsoptions=defaults,noatime
part /mnt/initrd --size=7 --ondisk mmcblk0p --fstype=ext4 --label=ramdisk --extoptions="-b 1024"
- Name: tv-mbr-3parts
Contents: |
part / --fstype="ext4" --size=3500 --ondisk=mmcblk0 --label rootfs --fsoptions=defaults,noatime
part /opt --fstype="ext4" --size=512 --ondisk=mmcblk0 --label system-data --fsoptions=defaults,noatime
part /opt/usr --fstype="ext4" --size=3500 --ondisk=mmcblk0 --label user --fsoptions=defaults,noatime
- Name: wearable-mbr
Contents: |
part / --fstype="ext4" --size=3584 --ondisk=sda --active --label tizen-wearable --fsoptions=defaults,noatime
- Name: wearable-2parts-emulator
Contents: |
part / --size=2000 --ondisk=sda --fstype=ext4 --label=emulator-rootfs
part /opt/ --size=2000 --ondisk=sda --fstype=ext4 --label=emulator-sysdata
- Name: wearable-mbr-target-circle
Contents: |
part / --size=2000 --ondisk=sda --fstype=ext4 --label=emulator-rootfs
part /opt/ --size=2000 --ondisk=sda --fstype=ext4 --label=emulator-sysdata
- Name: ivi-mbr
Contents: |
part / --fstype="ext4" --size=3500 --ondisk=mmcblk0 --label rootfs --fsoptions=defaults,noatime
part /opt --fstype="ext4" --size=512 --ondisk=mmcblk0 --label system-data --fsoptions=defaults,noatime
part /opt/usr --fstype="ext4" --size=3500 --ondisk=mmcblk0 --label user --fsoptions=defaults,noatime
- Name: ivi-emul
Contents: |
part / --fstype="ext4" --size=3500 --ondisk=mmcblk0 --label rootfs --fsoptions=defaults,noatime
part /opt --fstype="ext4" --size=512 --ondisk=mmcblk0 --label system-data --fsoptions=defaults,noatime
part /opt/usr --fstype="ext4" --size=3500 --ondisk=mmcblk0 --label user --fsoptions=defaults,noatime
NoChrootScripts:
- Name: buildname
Contents: |
if [ -n "$IMG_NAME" ]; then
echo "BUILD_ID=$IMG_NAME" >> $INSTALL_ROOT/etc/tizen-release
echo "BUILD_ID=$IMG_NAME" >> $INSTALL_ROOT/etc/os-release
fi
PostScripts:
- Name: common-adaptation
Contents: |
#!/bin/sh
echo "############### common-adaptation.post ################"
- Name: common-adaptation-rpi3
Contents: |
#!/bin/sh
echo "############### common-adaptation-rpi3.post ################"
pkg_initdb --ro
#rpm -e boost-filesystem libiri minizip manifest-parser tpk-manifest-handlers pkgmgr-info-parser xdelta3 app-installers tpk-backend
- Name: common-base
Contents: |
#!/bin/sh
echo "############### common-base.post ################"
######### multiuser mode: create additional users and fix their homedirs
if ! generic_base_user_exists owner; then
gum-utils --offline --add-user --username=owner --usertype=admin --usecret=tizen
fi
for user in alice bob carol guest; do
if ! generic_base_user_exists $user; then
gum-utils --offline --add-user --username="$user" --usertype=normal --usecret=tizen
fi
done
######### add 'guest' user that runs bt-service daemon to vconf_bt group
function mygetid() { sed '/^'"$1"':/!d;s/^\([^:]*:\)\{2\}\([^:]*\):.*$/\2/' "$2"; }
function mygetuid() { mygetid "$1" /etc/passwd; }
function mygetgid() { mygetid "$1" /etc/group; }
gum-utils --offline --add-member --gid=$(mygetgid vconf_bt) --mem_uid=$(mygetuid guest)
- Name: common-cleanup-rpi3
Contents: |
#!/bin/sh
echo "############### common-cleanup-rpi3.post ################"
# remove manuals, docs and headers
rm -rf /usr/include
rm -rf /usr/share/man
rm -rf /usr/share/doc
- Name: common-crosswalk
Contents: |
#!/bin/sh
echo "############### common-crosswalk.post ################"
# start wrt widgets preinstall
prepare_widgets.sh
- Name: common-desktop-applications
Contents: |
#!/bin/sh
echo "############### common-desktop-applications.post ################"
# call function defined in meta-generic
for user in alice bob carol guest developer; do
generic_desktop_applications_fix_userhome $user
done
- Name: common-license
Contents: |
#!/bin/sh
echo "############### common-license.post ################"
LICENSE_DIR=/usr/share/licenses
LICENSE_FILE=/usr/share/license.html
MD5_TEMP_FILE=/usr/share/temp_license_md5
if [[ -f $LICENSE_FILE ]]; then
rm -f $LICENSE_FILE
fi
if [[ -f $MD5_TEMP_FILE ]]; then
rm -f $MD5_TEMP_FILE
fi
cd $LICENSE_DIR
LICENSE_LIST=`ls */*`
for INPUT in $LICENSE_LIST; do
if [[ -f $INPUT ]]; then
PKG_NAME=`echo $INPUT|cut -d'/' -f1`
echo `md5sum $INPUT` $PKG_NAME >> $MD5_TEMP_FILE
fi
done
MD5_LIST=`cat $MD5_TEMP_FILE|awk '{print $1}'|sort -u`
echo "<html>" >> $LICENSE_FILE
echo "<head>" >> $LICENSE_FILE
echo "<meta name=\"viewport\" content=\"initial-scale=1.0\">" >> $LICENSE_FILE
echo "</head>" >> $LICENSE_FILE
echo "<body>" >> $LICENSE_FILE
echo "<xmp>" >> $LICENSE_FILE
for INPUT in $MD5_LIST; do
PKG_LIST=`cat $MD5_TEMP_FILE|grep $INPUT|awk '{print $3}'`
FILE_LIST=`cat $MD5_TEMP_FILE|grep $INPUT|awk '{print $2}'`
PKG_FILE=`echo $FILE_LIST |awk '{print $1}'`
echo "$PKG_LIST :" >> $LICENSE_FILE
cat $PKG_FILE >> $LICENSE_FILE
echo >> $LICENSE_FILE
echo >> $LICENSE_FILE
echo >> $LICENSE_FILE
done
echo "</xmp>" >> $LICENSE_FILE
echo "</body>" >> $LICENSE_FILE
echo "</html>" >> $LICENSE_FILE
rm -rf $LICENSE_DIR/* $MD5_TEMP_FILE
- Name: common-middleware
Contents: |
#!/bin/sh
echo "############### common-middleware.post ################"
- Name: common-packaging
Contents: |
#!/bin/sh
echo "############### common-packaging.post ################"
# generate repo files for zypper
function genrepo() {
local url=$1
local reponame=$2
local filename=${3:-$2}
local enabled=${4:-0}
local prefix=${TZ_BUILD_VENDOR}-${TZ_BUILD_PROFILE}-${TZ_BUILD_REPO}
# remove double slashes if any
url=$(sed -e 's|/\+|/|g' -e 's|:/|://|' <<<$url)
cat >> /etc/zypp/repos.d/$prefix-${filename}.repo << EOF
[$prefix-${reponame}]
name=$prefix-${reponame}
enabled=$enabled
autorefresh=0
baseurl=${url}?ssl_verify=no
type=rpm-md
gpgcheck=0
EOF
}
# source /etc/tizen-build.conf to get more infos about project, repos etc.
. /etc/tizen-build.conf
# adjust build_id if this scripts executes before the replacement in /etc/tizen-build.conf
TZ_BUILD_ID=$(echo $TZ_BUILD_ID | sed 's|@BUILD_ID[@]|@BUILD_ID@|')
# snapshot repo
genrepo ${TZ_BUILD_SNAPSHOT_URL}/${TZ_BUILD_ID}/repos/${TZ_BUILD_REPO}/packages snapshot snapshot 1
genrepo ${TZ_BUILD_SNAPSHOT_URL}/${TZ_BUILD_ID}/repos/${TZ_BUILD_REPO}/debug snapshot-debug snapshot 1
# latest repo
genrepo ${TZ_BUILD_SNAPSHOT_URL}/latest/repos/${TZ_BUILD_REPO}/packages update update 0
genrepo ${TZ_BUILD_SNAPSHOT_URL}/latest/repos/${TZ_BUILD_REPO}/debug update-debug update 0
# daily repo
genrepo ${TZ_BUILD_DAILY_URL}/latest/repos/${TZ_BUILD_REPO}/packages daily daily 0
genrepo ${TZ_BUILD_DAILY_URL}/latest/repos/${TZ_BUILD_REPO}/debug daily-debug daily 0
# weekly repo
genrepo ${TZ_BUILD_WEEKLY_URL}/latest/repos/${TZ_BUILD_REPO}/packages weekly weekly 0
genrepo ${TZ_BUILD_WEEKLY_URL}/latest/repos/${TZ_BUILD_REPO}/debug weekly-debug weekly 0
- Name: common-wayland
Contents: |
#!/bin/sh
echo "#################### common-wayland.post ##################"
# add users to display group
for user in alice bob carol guest developer owner; do
if generic_base_user_exists $user; then
/usr/sbin/groupmod -A $user display
fi
done
#{ Add installed apps for tizen to launcher if not present
dst="/usr/share/applications/tizen/launcher.conf"
if [ -w "$dst" ] ; then
ls /usr/share/applications/tizen/*.desktop \
| while read src; do
grep "$src" "$dst" \
|| { [ ! -r "$src" ] || echo "$src" >> "$dst" ; }
done
fi
#}
# tag the background image with the current snapshot id
/usr/bin/mark_image.py /opt/share/settings/Wallpapers/home_001.png "Tizen Common: @BUILD_ID@" ffff70 10 60 95 70
- Name: generic-adaptation
Contents: |
#!/bin/sh
echo "#################### generic-adaptation.post ####################"
# fix TIVI-2291
sed -ri "s/(^blacklist i8042.*$)/#fix from base-general.post \1/" /etc/modprobe.d/blacklist.conf
- Name: generic-base
Contents: |
#!/bin/sh
echo "#################### generic-base.post ####################"
test ! -e /opt/var && mkdir -p /opt/var
test -d /var && cp -arf /var/* /opt/var/
rm -rf /var
ln -snf opt/var /var
test ! -e /opt/usr/home && mkdir -p /opt/usr/home
test -d /home && cp -arf /home/* /opt/usr/home/
rm -rf /home
ln -snf opt/usr/home /home
build_ts=$(date -u +%s)
build_date=$(date -u --date @$build_ts +%Y%m%d_%H%M%S)
build_time=$(date -u --date @$build_ts +%H:%M:%S)
sed -ri \
-e 's|@BUILD_ID[@]|@BUILD_ID@|g' \
-e "s|@BUILD_DATE[@]|$build_date|g" \
-e "s|@BUILD_TIME[@]|$build_time|g" \
-e "s|@BUILD_TS[@]|$build_ts|g" \
/etc/tizen-build.conf
# setup systemd default target for user session
cat <<'EOF' >>/usr/lib/systemd/user/default.target
[Unit]
Description=User session default target
EOF
mkdir -p /usr/lib/systemd/user/default.target.wants
# sdx: fix smack labels on /var/log
chsmack -a '*' /var/log
# create appfw dirs inside homes
function generic_base_user_exists() {
user=$1
getent passwd | grep -q ^${user}:
}
function generic_base_user_home() {
user=$1
getent passwd | grep ^${user}: | cut -f6 -d':'
}
function generic_base_fix_user_homedir() {
user=$1
generic_base_user_exists $user || return 1
homedir=$(generic_base_user_home $user)
mkdir -p $homedir/apps_rw
for appdir in desktop manifest dbspace; do
mkdir -p $homedir/.applications/$appdir
done
find $homedir -type d -exec chsmack -a User {} \;
chown -R $user:users $homedir
return 0
}
# fix TC-320 for SDK
. /etc/tizen-build.conf
[ "${TZ_BUILD_WITH_EMULATOR}" == "1" ] && generic_base_fix_user_homedir developer
# Add info.ini for system-info CAPI (TC-2047)
/etc/make_info_file.sh
- Name: generic-bluetooth
Contents: |
#!/bin/sh
echo "#################### generic-bluetooth.post ####################"
- Name: generic-console-tools
Contents: |
#!/bin/sh
echo "#################### generic-console-tools.post ####################"
# customize bash prompt
cat >/etc/profile.d/bash_prompt_custom.sh <<'EOF'
if [ "$PS1" ]; then
function proml {
# set a fancy prompt (overwrite the one in /etc/profile)
local default="\[\e[0m\]"
local usercol='\[\e[1;34m\]' # blue
local hostcol='\[\e[1;32m\]' # green
local pathcol='\[\e[1;33m\]' # yellow
local gitcol='\[\e[1;31m\]' # light red
local termcmd=''
local _p="$";
if [ "`id -u`" -eq 0 ]; then
usercol='\[\e[1;31m\]'
_p="#"
fi
PS1="${usercol}\u${default}@${hostcol}\h${default}:${pathcol}\w${default}${gitcol}${default}${_p} ${termcmd}"
}
proml
function rcd () {
[ "${1:0:1}" == "/" ] && { cd $1; } || { cd $(pwd -P)/$1; }
}
alias ll="ls -lZ"
alias lr="ls -ltrZ"
alias la="ls -alZ"
function get_manifest () {
rpm -qa --queryformat="%{name} %{Version} %{Release} %{VCS}\n" | sort
}
fi
EOF
- Name: generic-crosswalk
Contents: |
#!/bin/sh
echo "#################### generic-crosswalk.post ####################"
- Name: generic-desktop-applications
Contents: |
#!/bin/sh
echo "#################### generic-desktop-applications.post ####################"
# depends on generic-base functions
function generic_desktop_applications_fix_userhome() {
user=$1
generic_base_user_exists $user || return 1
homedir=$(generic_base_user_home $user)
echo "Fix app_info.db of $user"
chown -R $user:users $homedir/.applications/dbspace/
}
# fix TC-320 for SDK
. /etc/tizen-build.conf
[ "${TZ_BUILD_WITH_EMULATOR}" == "1" ] && generic_desktop_applications_fix_userhome developer
- Name: generic-middleware
Contents: |
#!/bin/sh
echo "#################### generic-middleware.post ####################"
- Name: generic-multimedia
Contents: |
#!/bin/sh
echo "#################### generic-multimedia.post ####################"
- Name: generic-packaging
Contents: |
#!/bin/sh
echo "#################### generic-packaging.post ####################"
rm -rf /root/.zypp
# was: rpm.post
rm -f /var/lib/rpm/__db*
rpmdb --rebuilddb
- Name: generic-prepatch-backup
Contents: |
#!/bin/sh
echo "#################### generic-prepatch-backup.post ####################"
if [ -e $INSTALL_ROOT/usr/lib/initrd-recovery/fota/backup-passwd.sh ]; then
$INSTALL_ROOT/usr/lib/initrd-recovery/fota/backup-passwd.sh
fi
- Name: generic-security
Contents: |
#!/bin/sh
echo "#################### generic-security.post ####################"
if [ -e /usr/share/security-config/set_capability ]; then
echo 'Give capabilities to daemons via set_capability from security-config package'
/usr/share/security-config/set_capability
fi
if [ -e /opt/share/security-config/test/image_test.sh ]; then
echo 'Run security-test'
/opt/share/security-config/test/image_test.sh
fi
- Name: generic-wayland
Contents: |
#!/bin/sh
echo "#################### generic-wayland.post ####################"
- Name: ivi-adaptation
Contents: |
#!/bin/sh
echo "############### ivi-adaptation.post ################"
- Name: ivi-base
Contents: |
#!/bin/sh
echo "#################### ivi-base.post ####################"
######### multiuser mode: create additional users and fix their homedirs
if ! generic_base_user_exists owner; then
gum-utils --offline --add-user --username=owner --usertype=admin --usecret=tizen
fi
- Name: ivi-bluetooth
Contents: |
#!/bin/sh
echo "#################### ivi-bluetooth.post ####################"
- Name: ivi-license
Contents: |
#!/bin/sh
echo "############### ivi-license.post ################"
LICENSE_DIR=/usr/share/licenses
LICENSE_FILE=/usr/share/license.html
MD5_TEMP_FILE=/usr/share/temp_license_md5
if [[ -f $LICENSE_FILE ]]; then
rm -f $LICENSE_FILE
fi
if [[ -f $MD5_TEMP_FILE ]]; then
rm -f $MD5_TEMP_FILE
fi
cd $LICENSE_DIR
LICENSE_LIST=`ls */*`
for INPUT in $LICENSE_LIST; do
if [[ -f $INPUT ]]; then
PKG_NAME=`echo $INPUT|cut -d'/' -f1`
echo `md5sum $INPUT` $PKG_NAME >> $MD5_TEMP_FILE
fi
done
MD5_LIST=`cat $MD5_TEMP_FILE|awk '{print $1}'|sort -u`
echo "<html>" >> $LICENSE_FILE
echo "<head>" >> $LICENSE_FILE
echo "<meta name=\"viewport\" content=\"initial-scale=1.0\">" >> $LICENSE_FILE
echo "</head>" >> $LICENSE_FILE
echo "<body>" >> $LICENSE_FILE
echo "<xmp>" >> $LICENSE_FILE
for INPUT in $MD5_LIST; do
PKG_LIST=`cat $MD5_TEMP_FILE|grep $INPUT|awk '{print $3}'`
FILE_LIST=`cat $MD5_TEMP_FILE|grep $INPUT|awk '{print $2}'`
PKG_FILE=`echo $FILE_LIST |awk '{print $1}'`
echo "$PKG_LIST :" >> $LICENSE_FILE
cat $PKG_FILE >> $LICENSE_FILE
echo >> $LICENSE_FILE
echo >> $LICENSE_FILE
echo >> $LICENSE_FILE
done
echo "</xmp>" >> $LICENSE_FILE
echo "</body>" >> $LICENSE_FILE
echo "</html>" >> $LICENSE_FILE
rm -rf $LICENSE_DIR/* $MD5_TEMP_FILE
- Name: ivi-mbr-3parts
Contents: |
#!/bin/sh
echo "############### ivi-mbr-3parts.post ################"
- Name: ivi-middleware
Contents: |
#!/bin/sh
echo "############### ivi-middleware.post ################"
- Name: ivi-packaging
Contents: |
#!/bin/sh
echo "############### ivi-packaging.post ################"
# generate repo files for zypper
function genrepo() {
local url=$1
local reponame=$2
local filename=${3:-$2}
local enabled=${4:-0}
local prefix=${TZ_BUILD_VENDOR}-${TZ_BUILD_PROFILE}-${TZ_BUILD_REPO}
# remove double slashes if any
url=$(sed -e 's|/\+|/|g' -e 's|:/|://|' <<<$url)
cat >> /etc/zypp/repos.d/$prefix-${filename}.repo << EOF
[$prefix-${reponame}]
name=$prefix-${reponame}
enabled=$enabled
autorefresh=0
baseurl=${url}?ssl_verify=no
type=rpm-md
gpgcheck=0
EOF
}
# source /etc/tizen-build.conf to get more infos about project, repos etc.
. /etc/tizen-build.conf
# adjust build_id if this scripts executes before the replacement in /etc/tizen-build.conf
TZ_BUILD_ID=$(echo $TZ_BUILD_ID | sed 's|@BUILD_ID[@]|@BUILD_ID@|')
# snapshot repo
genrepo ${TZ_BUILD_SNAPSHOT_URL}/${TZ_BUILD_ID}/repos/${TZ_BUILD_REPO}/packages snapshot snapshot 1
genrepo ${TZ_BUILD_SNAPSHOT_URL}/${TZ_BUILD_ID}/repos/${TZ_BUILD_REPO}/debug snapshot-debug snapshot 1
# latest repo
genrepo ${TZ_BUILD_SNAPSHOT_URL}/latest/repos/${TZ_BUILD_REPO}/packages update update 0
genrepo ${TZ_BUILD_SNAPSHOT_URL}/latest/repos/${TZ_BUILD_REPO}/debug update-debug update 0
# daily repo
genrepo ${TZ_BUILD_DAILY_URL}/latest/repos/${TZ_BUILD_REPO}/packages daily daily 0
genrepo ${TZ_BUILD_DAILY_URL}/latest/repos/${TZ_BUILD_REPO}/debug daily-debug daily 0
# weekly repo
genrepo ${TZ_BUILD_WEEKLY_URL}/latest/repos/${TZ_BUILD_REPO}/packages weekly weekly 0
genrepo ${TZ_BUILD_WEEKLY_URL}/latest/repos/${TZ_BUILD_REPO}/debug weekly-debug weekly 0
- Name: ivi-user
Contents: |
#!/bin/sh
echo "############### ivi-user.post ################"
#for user in alice bob carol guest; do
# if ! generic_base_user_exists $user; then
# gum-utils --offline --add-user --username="$user" --usertype=normal --usecret=tizen
# fi
#done
- Name: mobile-adaptation
Contents: |
#!/bin/sh
echo "############### mobile-adaptation.post ################"
- Name: mobile-base
Contents: |
#!/bin/sh
echo "############### mobile-base.post ################"
######### multiuser mode: create additional users and fix their homedirs
if ! generic_base_user_exists owner; then
gum-utils --offline --add-user --username=owner --usertype=admin --usecret=tizen
fi
- Name: mobile-bluetooth
Contents: |
#!/bin/sh
echo "#################### mobile-bluetooth.post ####################"
- Name: mobile-dotnet-generate-ni
Contents: |
#!/bin/sh
echo "############### mobile-dotnet-generate-ni.post ################"
# Generate NI for System
nitool --dll /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.0/System.Collections.dll
nitool --dll /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.0/System.IO.FileSystem.dll
nitool --dll /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.0/System.Linq.dll
nitool --dll /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.0/System.Linq.Expressions.dll
nitool --dll /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.0/System.ObjectModel.dll
nitool --dll /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.0/System.Private.DataContractSerialization.dll
nitool --dll /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.0/System.Private.Uri.dll
nitool --dll /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.0/System.Private.Xml.dll
nitool --dll /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.0/System.Reflection.Metadata.dll
nitool --dll /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.0/System.Text.RegularExpressions.dll
# Generate NI for Xamarin and Device API
nitool --dll /usr/share/dotnet.tizen/framework/ElmSharp.dll
nitool --dll /usr/share/dotnet.tizen/framework/Tizen.dll
nitool --dll /usr/share/dotnet.tizen/framework/Tizen.Applications.Common.dll
nitool --dll /usr/share/dotnet.tizen/framework/Tizen.Applications.UI.dll
nitool --dll /usr/share/dotnet.tizen/framework/Xamarin.Forms.Core.dll
nitool --dll /usr/share/dotnet.tizen/framework/Xamarin.Forms.Platform.dll
nitool --dll /usr/share/dotnet.tizen/framework/Xamarin.Forms.Platform.Tizen.dll
nitool --dll /usr/share/dotnet.tizen/framework/Xamarin.Forms.Xaml.dll
# Generate Launcher
nitool --dll /usr/bin/Tizen.Runtime.Coreclr.dll
- Name: mobile-license
Contents: |
#!/bin/sh
echo "############### mobile-license.post ################"
LICENSE_BASE=/usr/share
LICENSE_DIR=$LICENSE_BASE/licenses
LICENSE_FILE=$LICENSE_BASE/license.html
LICENSE_ZIP=$LICENSE_BASE/license.zip
MD5_TEMP_FILE=$LICENSE_BASE/temp_license_md5
if [[ -f $LICENSE_FILE ]]; then
rm -f $LICENSE_FILE
fi
if [[ -f $LICENSE_ZIP ]]; then
rm -f $LICENSE_ZIP
fi
if [[ -f $MD5_TEMP_FILE ]]; then
rm -f $MD5_TEMP_FILE
fi
cd $LICENSE_DIR
LICENSE_LIST=`ls */*`
for INPUT in $LICENSE_LIST; do
if [[ -f $INPUT ]]; then
PKG_NAME=`echo $INPUT|cut -d'/' -f1`
echo `md5sum $INPUT` $PKG_NAME >> $MD5_TEMP_FILE
fi
done
MD5_LIST=`cat $MD5_TEMP_FILE|awk '{print $1}'|sort -u`
echo "<html>" >> $LICENSE_FILE
echo "<head>" >> $LICENSE_FILE
echo "<meta name=\"viewport\" content=\"initial-scale=1.0\">" >> $LICENSE_FILE
echo "</head>" >> $LICENSE_FILE
echo "<body>" >> $LICENSE_FILE
echo "<xmp>" >> $LICENSE_FILE
for INPUT in $MD5_LIST; do
PKG_LIST=`cat $MD5_TEMP_FILE|grep $INPUT|awk '{print $3}'`
FILE_LIST=`cat $MD5_TEMP_FILE|grep $INPUT|awk '{print $2}'`
PKG_FILE=`echo $FILE_LIST |awk '{print $1}'`
echo "$PKG_LIST :" >> $LICENSE_FILE
cat $PKG_FILE >> $LICENSE_FILE
echo >> $LICENSE_FILE
echo >> $LICENSE_FILE
echo >> $LICENSE_FILE
done
echo "</xmp>" >> $LICENSE_FILE
echo "</body>" >> $LICENSE_FILE
echo "</html>" >> $LICENSE_FILE
cd $LICENSE_BASE ; zip license.zip license.html
cd -
rm -rf $LICENSE_DIR/* $MD5_TEMP_FILE
rm -rf $LICENSE_FILE
- Name: mobile-mbr-3parts
Contents: |
#!/bin/sh
echo "############### mobile-mbr-3parts.post ################"
- Name: mobile-middleware
Contents: |
#!/bin/sh
echo "############### mobile-middleware.post ################"
- Name: mobile-packaging
Contents: |
#!/bin/sh
echo "############### mobile-packaging.post ################"
# generate repo files for zypper
function genrepo() {
local url=$1
local reponame=$2
local filename=${3:-$2}
local enabled=${4:-0}
local prefix=${TZ_BUILD_VENDOR}-${TZ_BUILD_PROFILE}-${TZ_BUILD_REPO}
# remove double slashes if any
url=$(sed -e 's|/\+|/|g' -e 's|:/|://|' <<<$url)
cat >> /etc/zypp/repos.d/$prefix-${filename}.repo << EOF
[$prefix-${reponame}]
name=$prefix-${reponame}
enabled=$enabled
autorefresh=0
baseurl=${url}?ssl_verify=no
type=rpm-md
gpgcheck=0
EOF
}
# source /etc/tizen-build.conf to get more infos about project, repos etc.
. /etc/tizen-build.conf
# adjust build_id if this scripts executes before the replacement in /etc/tizen-build.conf
TZ_BUILD_ID=$(echo $TZ_BUILD_ID | sed 's|@BUILD_ID[@]|@BUILD_ID@|')
# snapshot repo
genrepo ${TZ_BUILD_SNAPSHOT_URL}/${TZ_BUILD_ID}/repos/${TZ_BUILD_REPO}/packages snapshot snapshot 1
genrepo ${TZ_BUILD_SNAPSHOT_URL}/${TZ_BUILD_ID}/repos/${TZ_BUILD_REPO}/debug snapshot-debug snapshot 1
# latest repo
genrepo ${TZ_BUILD_SNAPSHOT_URL}/latest/repos/${TZ_BUILD_REPO}/packages update update 0
genrepo ${TZ_BUILD_SNAPSHOT_URL}/latest/repos/${TZ_BUILD_REPO}/debug update-debug update 0
# daily repo
genrepo ${TZ_BUILD_DAILY_URL}/latest/repos/${TZ_BUILD_REPO}/packages daily daily 0
genrepo ${TZ_BUILD_DAILY_URL}/latest/repos/${TZ_BUILD_REPO}/debug daily-debug daily 0
# weekly repo
genrepo ${TZ_BUILD_WEEKLY_URL}/latest/repos/${TZ_BUILD_REPO}/packages weekly weekly 0
genrepo ${TZ_BUILD_WEEKLY_URL}/latest/repos/${TZ_BUILD_REPO}/debug weekly-debug weekly 0
- Name: mobile-user
Contents: |
#!/bin/sh
echo "############### mobile-user.post ################"
#for user in alice bob carol guest; do
# if ! generic_base_user_exists $user; then
# gum-utils --offline --add-user --username="$user" --usertype=normal --usecret=tizen
# fi
#done
- Name: tv-adaptation
Contents: |
#!/bin/sh
echo "############### tv-adaptation.post ################"
- Name: tv-base
Contents: |
#!/bin/sh
echo "############### tv-base.post ################"
######### multiuser mode: create additional users and fix their homedirs
if ! generic_base_user_exists owner; then
gum-utils --offline --add-user --username=owner --usertype=admin --usecret=tizen
fi
- Name: tv-bluetooth
Contents: |
#!/bin/sh
echo "#################### tv-bluetooth.post ####################"
- Name: tv-dotnet-generate-ni
Contents: |
#!/bin/sh
echo "############### tv-dotnet-generate-ni.post ################"
# Generate NI for System
nitool --dll /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.0/System.Collections.dll
nitool --dll /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.0/System.IO.FileSystem.dll
nitool --dll /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.0/System.Linq.dll
nitool --dll /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.0/System.Linq.Expressions.dll
nitool --dll /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.0/System.ObjectModel.dll
nitool --dll /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.0/System.Private.DataContractSerialization.dll
nitool --dll /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.0/System.Private.Uri.dll
nitool --dll /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.0/System.Private.Xml.dll
nitool --dll /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.0/System.Reflection.Metadata.dll
nitool --dll /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.0/System.Text.RegularExpressions.dll
# Generate NI for Xamarin and Device API
nitool --dll /usr/share/dotnet.tizen/framework/ElmSharp.dll
nitool --dll /usr/share/dotnet.tizen/framework/Tizen.dll
nitool --dll /usr/share/dotnet.tizen/framework/Tizen.Applications.Common.dll
nitool --dll /usr/share/dotnet.tizen/framework/Tizen.Applications.UI.dll
nitool --dll /usr/share/dotnet.tizen/framework/Xamarin.Forms.Core.dll
nitool --dll /usr/share/dotnet.tizen/framework/Xamarin.Forms.Platform.dll
nitool --dll /usr/share/dotnet.tizen/framework/Xamarin.Forms.Platform.Tizen.dll
nitool --dll /usr/share/dotnet.tizen/framework/Xamarin.Forms.Xaml.dll
# Generate Launcher
nitool --dll /usr/bin/Tizen.Runtime.Coreclr.dll
- Name: tv-license
Contents: |
#!/bin/sh
echo "############### tv-license.post ################"
LICENSE_DIR=/usr/share/licenses
LICENSE_FILE=/usr/share/license.html
MD5_TEMP_FILE=/usr/share/temp_license_md5
if [[ -f $LICENSE_FILE ]]; then
rm -f $LICENSE_FILE
fi
if [[ -f $MD5_TEMP_FILE ]]; then
rm -f $MD5_TEMP_FILE
fi
cd $LICENSE_DIR
LICENSE_LIST=`ls */*`
for INPUT in $LICENSE_LIST; do
if [[ -f $INPUT ]]; then
PKG_NAME=`echo $INPUT|cut -d'/' -f1`
echo `md5sum $INPUT` $PKG_NAME >> $MD5_TEMP_FILE
fi
done
MD5_LIST=`cat $MD5_TEMP_FILE|awk '{print $1}'|sort -u`
echo "<html>" >> $LICENSE_FILE
echo "<head>" >> $LICENSE_FILE
echo "<meta name=\"viewport\" content=\"initial-scale=1.0\">" >> $LICENSE_FILE
echo "</head>" >> $LICENSE_FILE
echo "<body>" >> $LICENSE_FILE
echo "<xmp>" >> $LICENSE_FILE
for INPUT in $MD5_LIST; do
PKG_LIST=`cat $MD5_TEMP_FILE|grep $INPUT|awk '{print $3}'`
FILE_LIST=`cat $MD5_TEMP_FILE|grep $INPUT|awk '{print $2}'`
PKG_FILE=`echo $FILE_LIST |awk '{print $1}'`
echo "$PKG_LIST :" >> $LICENSE_FILE
cat $PKG_FILE >> $LICENSE_FILE
echo >> $LICENSE_FILE
echo >> $LICENSE_FILE
echo >> $LICENSE_FILE
done
echo "</xmp>" >> $LICENSE_FILE
echo "</body>" >> $LICENSE_FILE
echo "</html>" >> $LICENSE_FILE
rm -rf $LICENSE_DIR/* $MD5_TEMP_FILE
- Name: tv-middleware
Contents: |
#!/bin/sh
echo "############### tv-middleware.post ################"
- Name: tv-packaging
Contents: |
#!/bin/sh
echo "############### tv-packaging.post ################"
- Name: tv-user
Contents: |
#!/bin/sh
echo "############### tv-user.post ################"
#for user in alice bob carol guest; do
# if ! generic_base_user_exists $user; then
# gum-utils --offline --add-user --username="$user" --usertype=normal --usecret=tizen
# fi
#done
- Name: wearable-adaptation
Contents: |
#!/bin/sh
echo "############### wearable-adaptation.post ################"
- Name: wearable-adaptation
Contents: |
#!/bin/sh
echo "############### wearable-adaptation.post ################"
- Name: wearable-base
Contents: |
#!/bin/sh
echo "############### wearable-base.post ################"
######### multiuser mode: create additional users and fix their homedirs
if ! generic_base_user_exists owner; then
gum-utils --offline --add-user --username=owner --usertype=admin --usecret=tizen
fi
#for user in owner alice bob carol guest; do
# if ! generic_base_user_exists $user; then
# gum-utils --offline --add-user --username="$user" --usertype=normal --usecret=tizen
# fi
#done
- Name: wearable-crosswalk
Contents: |
#!/bin/sh
echo "############### wearable-crosswalk.post ################"
- Name: wearable-desktop-applications
Contents: |
#!/bin/sh
echo "############### wearable-desktop-applications.post ################"
# call function defined in meta-generic
for user in alice bob carol guest developer; do
generic_desktop_applications_fix_userhome $user
done
- Name: wearable-license
Contents: |
#!/bin/sh
echo "############### wearable-license.post ################"
LICENSE_DIR=/usr/share/licenses
LICENSE_FILE=/usr/share/license.html
MD5_TEMP_FILE=/usr/share/temp_license_md5
if [[ -f $LICENSE_FILE ]]; then
rm -f $LICENSE_FILE
fi
if [[ -f $MD5_TEMP_FILE ]]; then
rm -f $MD5_TEMP_FILE
fi
cd $LICENSE_DIR
LICENSE_LIST=`ls */*`
for INPUT in $LICENSE_LIST; do
if [[ -f $INPUT ]]; then
PKG_NAME=`echo $INPUT|cut -d'/' -f1`
echo `md5sum $INPUT` $PKG_NAME >> $MD5_TEMP_FILE
fi
done
MD5_LIST=`cat $MD5_TEMP_FILE|awk '{print $1}'|sort -u`
echo "<html>" >> $LICENSE_FILE
echo "<head>" >> $LICENSE_FILE
echo "<meta name=\"viewport\" content=\"initial-scale=1.0\">" >> $LICENSE_FILE
echo "</head>" >> $LICENSE_FILE
echo "<body>" >> $LICENSE_FILE
echo "<xmp>" >> $LICENSE_FILE
for INPUT in $MD5_LIST; do
PKG_LIST=`cat $MD5_TEMP_FILE|grep $INPUT|awk '{print $3}'`
FILE_LIST=`cat $MD5_TEMP_FILE|grep $INPUT|awk '{print $2}'`
PKG_FILE=`echo $FILE_LIST |awk '{print $1}'`
echo "$PKG_LIST :" >> $LICENSE_FILE
cat $PKG_FILE >> $LICENSE_FILE
echo >> $LICENSE_FILE
echo >> $LICENSE_FILE
echo >> $LICENSE_FILE
done
echo "</xmp>" >> $LICENSE_FILE
echo "</body>" >> $LICENSE_FILE
echo "</html>" >> $LICENSE_FILE
rm -rf $LICENSE_DIR/* $MD5_TEMP_FILE
- Name: wearable-middleware
Contents: |
#!/bin/sh
echo "############### wearable-middleware.post ################"
- Name: wearable-packaging
Contents: |
#!/bin/sh
echo "############### wearable-packaging.post ################"
# generate repo files for zypper
function genrepo() {
local url=$1
local reponame=$2
local filename=${3:-$2}
local enabled=${4:-0}
local prefix=${TZ_BUILD_VENDOR}-${TZ_BUILD_PROFILE}-${TZ_BUILD_REPO}
# remove double slashes if any
url=$(sed -e 's|/\+|/|g' -e 's|:/|://|' <<<$url)
cat >> /etc/zypp/repos.d/$prefix-${filename}.repo << EOF
[$prefix-${reponame}]
name=$prefix-${reponame}
enabled=$enabled
autorefresh=0
baseurl=${url}?ssl_verify=no
type=rpm-md
gpgcheck=0
EOF
}
# source /etc/tizen-build.conf to get more infos about project, repos etc.
. /etc/tizen-build.conf
# adjust build_id if this scripts executes before the replacement in /etc/tizen-build.conf
TZ_BUILD_ID=$(echo $TZ_BUILD_ID | sed 's|@BUILD_ID[@]|@BUILD_ID@|')
# snapshot repo
genrepo ${TZ_BUILD_SNAPSHOT_URL}/${TZ_BUILD_ID}/repos/${TZ_BUILD_REPO}/packages snapshot snapshot 1
genrepo ${TZ_BUILD_SNAPSHOT_URL}/${TZ_BUILD_ID}/repos/${TZ_BUILD_REPO}/debug snapshot-debug snapshot 1
# latest repo
genrepo ${TZ_BUILD_SNAPSHOT_URL}/latest/repos/${TZ_BUILD_REPO}/packages update update 0
genrepo ${TZ_BUILD_SNAPSHOT_URL}/latest/repos/${TZ_BUILD_REPO}/debug update-debug update 0
# daily repo
genrepo ${TZ_BUILD_DAILY_URL}/latest/repos/${TZ_BUILD_REPO}/packages daily daily 0
genrepo ${TZ_BUILD_DAILY_URL}/latest/repos/${TZ_BUILD_REPO}/debug daily-debug daily 0
# weekly repo
genrepo ${TZ_BUILD_WEEKLY_URL}/latest/repos/${TZ_BUILD_REPO}/packages weekly weekly 0
genrepo ${TZ_BUILD_WEEKLY_URL}/latest/repos/${TZ_BUILD_REPO}/debug weekly-debug weekly 0
|