platform/core/system/upgrade-tools.git
5 weeks agopackaging: Exclude libdivsufsort for movable profile 51/318251/3 accepted/tizen_9.0_unified accepted/tizen_unified accepted/tizen_unified_toolchain accepted/tizen_unified_x accepted/tizen_unified_x_asan tizen tizen_9.0 accepted/tizen/9.0/unified/20241030.234702 accepted/tizen/unified/20240926.163050 accepted/tizen/unified/20240926.184805 accepted/tizen/unified/toolchain/20241004.102123 accepted/tizen/unified/x/20240927.022742 accepted/tizen/unified/x/asan/20241014.000530 tizen_9.0_m2_release
SangYoun Kwak [Thu, 26 Sep 2024 02:23:40 +0000 (11:23 +0900)]
packaging: Exclude libdivsufsort for movable profile

Since the libdivsufsort package is not required for movable profile, it
is excluded.

Change-Id: I67d8bc2e43643d707da348265a4200c7f7153f0c
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
5 weeks agomk_delta: sign_img.sh: Remove meaningless value of KEY_PASSWORD defintion 67/318067/1 accepted/tizen/unified/20240924.153249 accepted/tizen/unified/x/20240925.015942
Chanwoo Choi [Tue, 24 Sep 2024 07:25:21 +0000 (16:25 +0900)]
mk_delta: sign_img.sh: Remove meaningless value of KEY_PASSWORD defintion

In order to remove security warning, remove meaningless value
of KEY_PASSWORD defintion on sign_img.sh.

Change-Id: Iea25ef75074ab2afc9623c43eb2a8e1912d7539c
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2 months agoRefactor code to improve the SAM score 06/316106/1
Mateusz Moscicki [Tue, 13 Aug 2024 14:33:27 +0000 (16:33 +0200)]
Refactor code to improve the SAM score

Change-Id: I2ef1f9f887c32b352104ec99539ea8e3ae259161

2 months agoCI: Add building Tizen 9.0 -> Tizen 9.0 deltas 87/315787/1
Mateusz Moscicki [Wed, 7 Aug 2024 11:14:54 +0000 (13:14 +0200)]
CI: Add building Tizen 9.0 -> Tizen 9.0 deltas

Deltas built for Tizen 9.0 -> Tizen 9.0 are platform deltas only

Change-Id: Ic47a2c7b78b1944b7d1b8e0b43b6b1634f8c5c1f

3 months agoss_bsdiff: Enable libdivsufsort by default 10/315410/3
Antoni [Wed, 31 Jul 2024 12:27:33 +0000 (14:27 +0200)]
ss_bsdiff: Enable libdivsufsort by default

This fixes the issue where containers would build ss_bsdiff without
libdivsufsort.

Change-Id: I3f91566e24517899ff2a07adae51fee9a1fb600e

3 months agoss_bsdiff: Fix to check the return value of lseek() 12/314612/3 accepted/tizen_unified_dev accepted/tizen/unified/20240718.143638 accepted/tizen/unified/dev/20240722.073439 accepted/tizen/unified/toolchain/20240812.133507 accepted/tizen/unified/x/20240719.012651 accepted/tizen/unified/x/asan/20240813.231950
SangYoun Kwak [Tue, 16 Jul 2024 07:42:49 +0000 (16:42 +0900)]
ss_bsdiff: Fix to check the return value of lseek()

To handle the lseek() failure case, codes for checking the return value
of lseek() is added.
Also, since the return value of lseek() is off_t, the type of its
container is also modified to off_t.

Change-Id: Ia7c63f3b5a4d4b306ff9a831584107007e32b140
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
3 months agoss_bsdiff: Fix to check memalloc fail case 09/314609/1
SangYoun Kwak [Tue, 16 Jul 2024 07:12:01 +0000 (16:12 +0900)]
ss_bsdiff: Fix to check memalloc fail case

New memory is allocated but its result(success or fail) is not checked,
so it is fixed to check and exit if malloc is failed.

Change-Id: I4d9f0d30ccf84185f6292d0ae68ca7d735121657
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
3 months agoss_bsdiff: Remove unreachable codes and modify help message 29/314529/1
SangYoun Kwak [Mon, 15 Jul 2024 03:00:05 +0000 (12:00 +0900)]
ss_bsdiff: Remove unreachable codes and modify help message

Previously, there were unreachable codes about argument checking logic
and pringing help messages.
The logic for argument checking and printing help message were fixed to
not make unreachable codes.
Additionally, the help messages are modified to make them more readable.

Change-Id: Ia8fc2fc4637f14b35b7281b6ae6eb64875fb4efb
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
4 months agoss_bsdiff: Unification of variable types 38/313538/1 accepted/tizen/unified/20240628.172836 accepted/tizen/unified/dev/20240701.072917 accepted/tizen/unified/x/20240701.021503
Mateusz Moscicki [Thu, 27 Jun 2024 12:06:07 +0000 (14:06 +0200)]
ss_bsdiff: Unification of variable types

Change-Id: I328731120dd3dbbe2954a0444b098c331f0d4d48

4 months agoCI: Fix images download 37/313537/1
Mateusz Moscicki [Tue, 25 Jun 2024 14:37:56 +0000 (16:37 +0200)]
CI: Fix images download

As there is a delta file in the source directory in addition to the
image, both files are downloaded and in some situations the script tries
to build a delta not between the OLD and NEW image, but for example,
between the OLD image and the downloaded DELTA.

Change-Id: Ibafc63cf21b22b55221dd45eb946148076918aec

4 months agoCI: Build three deltas for each version 58/313258/2
Mateusz Moscicki [Thu, 20 Jun 2024 11:34:46 +0000 (13:34 +0200)]
CI: Build three deltas for each version

Change-Id: I028022d640c406e00b62b5a1e50509b7c85203af

4 months agomass-delta-builder.py: Fix a typo about upgrade-tools dir 62/312762/1
Jaehoon Chung [Fri, 14 Jun 2024 03:26:30 +0000 (12:26 +0900)]
mass-delta-builder.py: Fix a typo about upgrade-tools dir

Fix a typo.
- s/UPGRATE_TOOLS_DIR/UPGRADE_TOOLS_DIR/

Change-Id: I47c242e3c2930cae804089913629c00779125e3a
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
4 months agoss_bsdiff: Add casting for explicit conversion 48/312548/2 accepted/tizen/unified/20240612.160709 accepted/tizen/unified/dev/20240620.000312 accepted/tizen/unified/toolchain/20240624.121655 accepted/tizen/unified/x/20240614.011706 accepted/tizen/unified/x/asan/20240625.091336
SangYoun Kwak [Tue, 11 Jun 2024 10:44:44 +0000 (19:44 +0900)]
ss_bsdiff: Add casting for explicit conversion

Since there were implicit conversion from off_t to uint64_t, which
caused by the compariton between off_t type variables and uint64_t type
varaibles.

It causes warning about the comparison between unmatched types thus the
off_t value will be casted implicitly to uint64_t if this warning is
ignored.

To suppress this warning and preserve the behavior of the original code,
explicit type casting to uint64_t is added.

Change-Id: Ieb6c0e073986e2cf0ef686307b2cfe894d84f27d
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
4 months agoss_bsdiff: Fix uninitialized use of a variable 47/312547/1
SangYoun Kwak [Tue, 11 Jun 2024 09:19:00 +0000 (18:19 +0900)]
ss_bsdiff: Fix uninitialized use of a variable

There were two pointer variables for the memory map(mmap) address:
 * input_file_ptr
 * output_file_ptr

If mmap function fails, control flow goes to "exit" lable and munmap the
mapped addresses.

Previously, the declaration of output_file_ptr was placed after the mmap
of input_file_ptr. In this situation, if mmap fails, program tries to
unmap the both input_file_ptr and output_file_ptr but output_file_ptr is
not declared yet.

To fix this issue, declarations of these variables are moved to 'before
the first mmap'.

Change-Id: I721cfaaf269c02868de7e868e2e73ea64698abe7
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
4 months agoss_bsdiff: Fix printf format for uint64_t 46/312546/1
SangYoun Kwak [Tue, 11 Jun 2024 08:41:02 +0000 (17:41 +0900)]
ss_bsdiff: Fix printf format for uint64_t

The printf format for uint64_t was "%ld", so it is fixed with "PRIu64",
which can be used for uint64_t portably.

Change-Id: I78643cf92e45eeb3ca87b01e1e3be682d63e2391
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
4 months agoModify not to use libdivsufsort if profile is tv 67/312467/3 accepted/tizen/unified/20240611.162853 accepted/tizen/unified/x/20240612.030016
SangYoun Kwak [Mon, 10 Jun 2024 09:18:02 +0000 (18:18 +0900)]
Modify not to use libdivsufsort if profile is tv

There are no package named libdivsufsort in tv profile environment.
Thus, it is required to not use libdivsufsort if the profile is tv.
(ss_bsdiff is not used in tv profile so libdivsufsort is not mandatory)
To not use libdivsufsort, dummy functions are added.

Change-Id: Iad7c8432f0c35473d07df1659c3a35fcabe595df
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
4 months agocommon: Remove 'sudo' from shell script 44/312444/1
SangYoun Kwak [Mon, 10 Jun 2024 07:34:53 +0000 (16:34 +0900)]
common: Remove 'sudo' from shell script

Since the delta-creating scripts are executed with root privilege, sudo
is unnecessary.

Change-Id: Ic108d8bb3fcd0ab3ed41cfdca57d41d1ed6325d1
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
5 months agoAllow building deltas with boot image only (no rootfs) 83/311583/3
Antoni [Wed, 22 May 2024 14:21:36 +0000 (16:21 +0200)]
Allow building deltas with boot image only (no rootfs)

update-info-builder.py was extended for more verbose logging

Change-Id: I4ea0be05bbf281fff1e503cd008aa8c2b50fc62d

5 months agoAdd a new file (update-progress-info.ini) to archive 87/309187/7 accepted/tizen/unified/20240605.153140
Antoni [Wed, 3 Apr 2024 14:02:31 +0000 (16:02 +0200)]
Add a new file (update-progress-info.ini) to archive

This file is needed for upgrade progress reporting in DELTA_IMAGE type
deltas.

Change-Id: Ibb4cfe904ce43b17da39c8a6e21961e70b33cae7

5 months agoMerge "Add copy-blockdev to delta.tar" into tizen
Mateusz Mościcki [Fri, 10 May 2024 13:55:08 +0000 (13:55 +0000)]
Merge "Add copy-blockdev to delta.tar" into tizen

5 months agoModify bsdiff to be built during gbs build 14/310814/1
SangYoun Kwak [Tue, 23 Apr 2024 02:32:20 +0000 (11:32 +0900)]
Modify bsdiff to be built during gbs build

Since bsdiff(executable name is ss_bsdiff) is required to make delta
image, CMakeLists.txt and .spec files are modified to make it to be
built during the gbs build.
ss_bsdiff is installed under /upgrade-tools/mk_delta/common/bin.

Change-Id: Ib7fda42c8677f5ebb9d892b87c90fc5e25ae2370
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
5 months agoModify script for ks to set delta name properly 13/310813/1
SangYoun Kwak [Wed, 8 May 2024 11:21:33 +0000 (20:21 +0900)]
Modify script for ks to set delta name properly

To make delta image name properly, source image version and destination
image version are retrieved.
Also informations like device(like rpi4) and architectures are retrieved
from parameter for the delta image name.

Change-Id: If16b8c30d6f9ff317044e0e12656b692350b5b25
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
6 months agoRevert "Modify bsdiff to be built during gbs build" 17/310517/2 accepted/tizen/unified/20240502.044710 accepted/tizen/unified/toolchain/20240515.061117 accepted/tizen/unified/x/20240513.060300
SangYoun Kwak [Tue, 30 Apr 2024 07:44:20 +0000 (07:44 +0000)]
Revert "Modify bsdiff to be built during gbs build"

This reverts commit 652c9a8e4c96fb93d006574aba8c23ad34c9f93b.

Reason for revert: Since the libdivsufsort is not usable, to prevent build error, revert this commit.

Change-Id: Ic0043000c8297c4a9f9bb4115dac8e8e54add018

6 months agoscripts: Add a script to generate delta for .ks runscript 24/310224/3
SangYoun Kwak [Wed, 24 Apr 2024 06:54:50 +0000 (15:54 +0900)]
scripts: Add a script to generate delta for .ks runscript

To generate delta image in the image-building sequence(using .ks),
a script to prepare and generate delta image is added.

Change-Id: Icc51af99a4ef912fef9160fdc9075396177ce2c8
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
6 months agoAdd copy-blockdev to delta.tar 47/310247/1
Jacek Kryszyn [Wed, 24 Apr 2024 07:25:04 +0000 (09:25 +0200)]
Add copy-blockdev to delta.tar

So that the upgrade package provides the tools that are needed during
the upgrade and which may not be on the system.

Change-Id: I58eefebdd2c8eb38217a2a012c0820c593a55147

6 months agoFix CreatePatch.py to use ss_bsdiff in the common/bin 23/310223/1
SangYoun Kwak [Tue, 23 Apr 2024 02:36:51 +0000 (11:36 +0900)]
Fix CreatePatch.py to use ss_bsdiff in the common/bin

In the python script CreatePatch.py, ss_bsdiff is checked whether it is
exist in the /usr/local/bin/ss_bsdiff or not.
If not exist, then it checks if it exists under "../../common/bin".
Script makes new path using statement below:
 > os.path.join("../../common/bin", "/usr/local/bin/ss_bsdiff")
But the return value of the function above is not
 > "../../common/bin/usr/local/bin/ss_bsdiff"
but
 > "/usr/local/bin/ss_bsdiff"
so the script is just checking about "/usr/local/bin/ss_bsdiff" twice.

To fix it, a variable DIFF_UTIL_NAME is added to store the name of the
diff util and check if it exist under "../../common/bin" if
/usr/local/bin/ss_bsdiff is not exist.

Change-Id: I138b54b7dc77a47130435e9034f594b99afa35aa
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
6 months agoModify bsdiff to be built during gbs build 22/310222/1
SangYoun Kwak [Tue, 23 Apr 2024 02:32:20 +0000 (11:32 +0900)]
Modify bsdiff to be built during gbs build

Since bsdiff(executable name is ss_bsdiff) is required to make delta
image, CMakeLists.txt and .spec files are modified to make it to be
built during the gbs build.
ss_bsdiff is installed under /upgrade-tools/mk_delta/common/bin.

Change-Id: I58b52b85282bac775e03ac1222081d1f4dcb9732
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
6 months agocommon: Modify package checking code to use 'which' 21/310221/1
SangYoun Kwak [Fri, 19 Apr 2024 10:30:58 +0000 (19:30 +0900)]
common: Modify package checking code to use 'which'

Since apt is not a default package of python, shutil.which is used to
increase portability.

Change-Id: I1745f065f0772bffdafd90ea50daf4d67d6338af
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
6 months agocommon: Remove 'sudo' from shell scripts 20/310220/1
SangYoun Kwak [Fri, 19 Apr 2024 09:38:50 +0000 (18:38 +0900)]
common: Remove 'sudo' from shell scripts

Since the delta-creating scripts are executed with root privilege, sudo
is unnecessary.

Change-Id: I9e612b06db62fca82af419980dc76232328f9bff
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
6 months agoAdd executable mode to directory-setup.sh 19/310219/1
SangYoun Kwak [Wed, 17 Apr 2024 09:37:22 +0000 (18:37 +0900)]
Add executable mode to directory-setup.sh

Change-Id: I51be9cc3c5f8892476f6da631c6542564cac77a4
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
6 months agoAdd .spec to make this repository can be built by gbs 25/309925/1 accepted/tizen/unified/20240419.110853
SangYoun Kwak [Thu, 18 Apr 2024 07:14:59 +0000 (16:14 +0900)]
Add .spec to make this repository can be built by gbs

Change-Id: Idecf1f7e1bb22c157feb26c47154b5def9a0235d
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
7 months agoFix casing mismatch in Dockerfile 04/309004/1
Antoni [Wed, 3 Apr 2024 14:06:11 +0000 (16:06 +0200)]
Fix casing mismatch in Dockerfile

This mismatch produced a warining during docker build.

Change-Id: I5a92a612516e59d3d4f7048af196b0187993acb5

7 months agoCI: Disable 7 to 8 build 27/308427/1
Marek Pikuła [Mon, 25 Mar 2024 09:07:43 +0000 (10:07 +0100)]
CI: Disable 7 to 8 build

Change-Id: Ief785cb7b35ded7fab0ddac609cd075f449d5862

7 months agoCI: Fix naming of platform images 57/307957/1
Marek Pikuła [Thu, 14 Mar 2024 15:11:35 +0000 (16:11 +0100)]
CI: Fix naming of platform images

Platform images (i.e., without boot image) don't provide information
about target. Up to this point, the image name for platform images was
lacking the target information, resulting in missing device model field
in the name (e.g., `IoT_Headless----platform--aarch64--...`). This
change sets the default `none` value for device model (resulting in
`IoT_Headless--none--platform--aarch64--...`).

Change-Id: Ie50624095a098bf34d7e1adc6364d7a000a79cd3

7 months agoCI: Fix cleanup workflow path 47/307847/1
Marek Pikuła [Wed, 13 Mar 2024 22:29:51 +0000 (23:29 +0100)]
CI: Fix cleanup workflow path

Change-Id: I2ef2de81385c85d482befd25d6514b877aaacac5
Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
7 months agomass-delta-builder: Remove unused enum values 87/307687/2
SangYoun Kwak [Tue, 12 Mar 2024 07:57:39 +0000 (16:57 +0900)]
mass-delta-builder: Remove unused enum values

In the enum "DeltaType", there were values named "kernel", "system", but
they are not used. (DeltaType was checked only if it is "full" or not)
These unused enum values are removed.

Also their values are defined with 'enum.auto()' function instead of
integer value since it is better to distinguish enum elements when the
new element is added or element is removed.

Change-Id: I607c9358f6c03ae4a333d21705c0775d731b1b10
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
7 months agoUse release version instead of build.date in the delta file name 14/307514/1
Mateusz Moscicki [Fri, 8 Mar 2024 12:42:30 +0000 (13:42 +0100)]
Use release version instead of build.date in the delta file name

Change-Id: I9ccb90efaaf519ee4e7926562c9d3c77931c6a2c

8 months agoChange workflow scheduled time to more "random" minute 34/307134/1
Marek Pikuła [Tue, 5 Mar 2024 08:17:17 +0000 (09:17 +0100)]
Change workflow scheduled time to more "random" minute

According to GitHub documentation:

> The schedule event can be delayed during periods of high loads of
> GitHub Actions workflow runs. High load times include the start of
> every hour. If the load is sufficiently high enough, some queued jobs
> may be dropped. To decrease the chance of delay, schedule your
> workflow to run at a different time of the hour.

During initial tests it turned out that during peak hours the schedule
didn't execute.

Change-Id: Idcbaed6fc43cf517f616842b7ed7acc7886bea13
Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
8 months agoAdd mk_delta GitHub action and test workflow 86/307086/1
Marek Pikuła [Tue, 16 Jan 2024 16:21:28 +0000 (17:21 +0100)]
Add mk_delta GitHub action and test workflow

Change-Id: I0266a6442be27e3c444c20cfa4c7644d85750777
Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
8 months agoAdd Docker image build GitHub Workflow 85/307085/1
Marek Pikuła [Tue, 16 Jan 2024 13:31:37 +0000 (14:31 +0100)]
Add Docker image build GitHub Workflow

Change-Id: I376c5043dc3d70abcb13554f978fdd3212ca5acd
Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
8 months agoClean-up Dockerfile 84/307084/1
Marek Pikuła [Tue, 16 Jan 2024 13:15:39 +0000 (14:15 +0100)]
Clean-up Dockerfile

- use BART-provided base Ubuntu images
- use COPY instead of ADD (safer)
- decrease number of layers
- improve formatting

Change-Id: Ia9357f404bf2cd323db1df371ad7bdfe45ed461e
Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
8 months agoMerge "Separate delta configurations to separate repos" into tizen
Mateusz Mościcki [Thu, 29 Feb 2024 15:04:56 +0000 (15:04 +0000)]
Merge "Separate delta configurations to separate repos" into tizen

8 months agoSeparate delta configurations to separate repos 59/305859/4
Antoni [Wed, 7 Feb 2024 14:23:48 +0000 (15:23 +0100)]
Separate delta configurations to separate repos

Delta configuration files will now be downloaded during docker image
build. Two host env variables are used for this:
- DOCKER_CFG_GIT_CLONE_PATH
- DOCKER_CFG_GIT_BRANCH

Change-Id: Id4982ab167ea4e3fa0d23e98e918f978b7859801

8 months agoAdd resize-dynparts to delta.tar 81/305881/1
Jacek Kryszyn [Mon, 12 Feb 2024 14:58:39 +0000 (15:58 +0100)]
Add resize-dynparts to delta.tar

So that the upgrade package provides the tools that are needed during
the upgrade and which may not be on the system.

Change-Id: Ia6f9c2eae3bc6a42ee3d10c6b7ec4aa1528c55a1

8 months agoAdd blkid-print to delta.tar 61/305861/1
Mateusz Moscicki [Fri, 9 Feb 2024 12:10:53 +0000 (13:10 +0100)]
Add blkid-print to delta.tar

So that the upgrade package provides the tools that are needed during
the upgrade and which may not be on the system.

Change-Id: Ic73bd642a31b9402ec51fcbf1e87f6a13cdb9dfd

9 months agoscripts: Add support to delta without hal.img 52/305352/2
Mateusz Moscicki [Wed, 31 Jan 2024 15:01:13 +0000 (16:01 +0100)]
scripts: Add support to delta without hal.img

Change-Id: Icccdbfccb548457b7f24e8b5962e3299d4412ee9

12 months agoscripts: delta-generation: Update an usage about target 10/300610/2
Jaehoon Chung [Mon, 30 Oct 2023 00:33:29 +0000 (09:33 +0900)]
scripts: delta-generation: Update an usage about target

rpi3 and tw1 are deprecated. To notice a correct information, update an
usage about target.
Remove - rpi3, tw1
Add - rpi4

Change-Id: Ib1863fdb35dc06c8ca8fb2230bedb7732cf16158
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
12 months agoscripts: delta-generation: Check if there is a path 88/300588/3
Jaehoon Chung [Fri, 27 Oct 2023 11:18:26 +0000 (20:18 +0900)]
scripts: delta-generation: Check if there is a path

Check if there is a path. If there is no path, it will be exited.
Otherwise, all files are removed under current directory
It's a critical bug in this script.

Change-Id: Ie3537ead4152f265d97f65e966342183a9dcd1c2
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
12 months agoUpdate README file about Tizen Version 87/300587/1
Jaehoon Chung [Fri, 27 Oct 2023 09:38:01 +0000 (18:38 +0900)]
Update README file about Tizen Version

Officially, Tizen 7.5 doesn't exist. Tizen 8.0 is correct.
Update README file about Tizen Version.

Change-Id: I2290fbb9183a5dfee5be09b24ddb6b338c6dc242
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
21 months agoFix `touch` arguments 19/287019/2
Antoni Adaszkiewicz [Wed, 18 Jan 2023 11:28:05 +0000 (12:28 +0100)]
Fix `touch` arguments

Remove reference to legacy delta.ua and ensure *.inc files are in the
begining of delta.

Change-Id: I15a4267cdc36be23e8851d877affdd1282857b85

21 months agoAdd delta-verifier to delta.tar 11/286911/2
Mateusz Moscicki [Mon, 16 Jan 2023 16:05:27 +0000 (17:05 +0100)]
Add delta-verifier to delta.tar

So that the upgrade package provides the tools that are needed during
the upgrade and which may not be on the system.

Change-Id: I382e591ae7f6e80bcccb6021b9a52accbb03b51c

21 months agoFix variable name 10/286910/1
Mateusz Moscicki [Mon, 16 Jan 2023 16:03:28 +0000 (17:03 +0100)]
Fix variable name

Change-Id: I18b5f8272529529e6f9d0fab8eb03b1f3690739d

21 months agoMerge changes I82d23e08,I65d7976b into tizen
Mateusz Mościcki [Tue, 10 Jan 2023 10:25:34 +0000 (10:25 +0000)]
Merge changes I82d23e08,I65d7976b into tizen

* changes:
  CreatePatch.py: Inform more explicitly about missing utilities
  CreatePatch.py: Fix call to legacy version of ss_bsdiff

21 months agoCreatePatch.py: Inform more explicitly about missing utilities 95/286595/5
Antoni Adaszkiewicz [Tue, 10 Jan 2023 09:39:20 +0000 (10:39 +0100)]
CreatePatch.py: Inform more explicitly about missing utilities

Change-Id: I82d23e08d8af38388a7223ec02a732a02ba3eaf2

21 months agoCreatePatch.py: Fix call to legacy version of ss_bsdiff 15/286415/1
Antoni Adaszkiewicz [Thu, 5 Jan 2023 11:05:45 +0000 (12:05 +0100)]
CreatePatch.py: Fix call to legacy version of ss_bsdiff

Change-Id: I65d7976b92a9e64b8a26b3634d04e5814ca2645f

21 months agoEnsure files vital for upgrade are at the begining of full type delta 12/286412/1
Antoni Adaszkiewicz [Thu, 5 Jan 2023 09:27:35 +0000 (10:27 +0100)]
Ensure files vital for upgrade are at the begining of full type delta

Change-Id: Ib1cd9d03d22fb8e41a58242496edf5f5cb417d53

21 months agoAdd missing file to full type delta 16/286316/2
Antoni Adaszkiewicz [Tue, 3 Jan 2023 15:07:26 +0000 (16:07 +0100)]
Add missing file to full type delta

For upgrade scripts to work properly upgrade-apply-deltafs has to be
present in all deltas.

Change-Id: I7c95cbe0288f754b0b8ed7bd2b052ea00a3bffb6

22 months agoRemove LZMA support 93/285493/6
Mateusz Moscicki [Tue, 13 Dec 2022 13:28:57 +0000 (14:28 +0100)]
Remove LZMA support

For unification, in order not to support two different compression
algorithms, the LZMA algorithm was replaced by Brotli.

The difference in compression time is negligible:

    system.tar.br: 26082
    system.7z:     25480

Change-Id: Id707be53d7e53a50a6076ce92f70b6812c51de0e

22 months agoRemove unused ss_bspatch 92/285492/2
Mateusz Moscicki [Tue, 13 Dec 2022 13:24:28 +0000 (14:24 +0100)]
Remove unused ss_bspatch

To apply patches use upgrade-apply from platform/core/system/upgrade
repository.

Change-Id: I54f3eab07d345600e16b564db5d7028cf943a1bf

22 months agoChange update-info.ini file generation in "full" type deltas 92/285292/9
Antoni Adaszkiewicz [Thu, 8 Dec 2022 15:05:08 +0000 (16:05 +0100)]
Change update-info.ini file generation in "full" type deltas

This change will allow update-manager to update using "full" type
deltas.

Change-Id: I2e9d3ef702483d8b6ab48ba72e2fa908e27b00ac

23 months agoExtract upgrade-apply-deltafs binary form image during delta generation and append it 03/284603/9
Antoni Adaszkiewicz [Mon, 21 Nov 2022 13:35:17 +0000 (14:35 +0100)]
Extract upgrade-apply-deltafs binary form image during delta generation and append it
to the delta.

Change-Id: I438619f91250e72a45df21c16dadf8e98759762e

23 months agoEnsure that files vital for upgrade process are extracted from images even when parti... 33/283633/16
Antoni Adaszkiewicz [Mon, 31 Oct 2022 12:24:37 +0000 (13:24 +0100)]
Ensure that files vital for upgrade process are extracted from images even when partitions
where these files are located are not used for delta generation

Change-Id: I1c20c567f8cf5a70412640e8cc95bdbdb7212d7f

23 months agoAdd update-info-builder.py, used to generate update-info file. 29/283329/16
Antoni Adaszkiewicz [Mon, 17 Oct 2022 13:31:08 +0000 (15:31 +0200)]
Add update-info-builder.py, used to generate update-info file.
Use it in delta building scripts to generate file needed to verify it's compatibility
with upgraded device. Reduce the ammount of times same partition is mounted/unpacked
during delta generation.

Change-Id: I6fd4a820cded25588464d2f0279124c7727bc89d

23 months agoCreatePatch.py: Rewrite command line argument parsing 96/282396/15
Antoni Adaszkiewicz [Fri, 30 Sep 2022 12:33:22 +0000 (14:33 +0200)]
CreatePatch.py: Rewrite command line argument parsing

Change-Id: Ie229c96b8ee0019adf01acfd008d074e2fefcd49

23 months agoCreatePatch.py: Refactor code mainly responsible for generating DELTA_FS deltas,... 09/282309/14
Antoni Adaszkiewicz [Thu, 29 Sep 2022 10:43:06 +0000 (12:43 +0200)]
CreatePatch.py: Refactor code mainly responsible for generating DELTA_FS deltas, improve
readability, drop importing of unused modules, drop obsolete comments and commented-out code,
force python 3.0 or higher

Change-Id: I750d237b038cc6215aa0e9519c6893746bf6f011

23 months agoAdd mass-delta-builder 97/284697/5
Mateusz Moscicki [Wed, 23 Nov 2022 15:32:35 +0000 (16:32 +0100)]
Add mass-delta-builder

This tool is used to generate specific deltas depending on the
configuration.

Change-Id: Iee70a19f0c00a10a0620e6e0e10b71e9d2a3c333
Signed-off-by: Mateusz Moscicki <m.moscicki2@partner.samsung.com>
23 months agoMerge "CreatePatch.py: Drop legacy "VERBATIM" mechanism" into tizen
Karol Lewandowski [Thu, 17 Nov 2022 11:30:54 +0000 (11:30 +0000)]
Merge "CreatePatch.py: Drop legacy "VERBATIM" mechanism" into tizen

23 months agoMerge "Change DELTA_FS type deltas to be created with relative pathnames and remove...
Karol Lewandowski [Thu, 17 Nov 2022 11:30:48 +0000 (11:30 +0000)]
Merge "Change DELTA_FS type deltas to be created with relative pathnames and remove their dependency on /run/upgrade-sysroot directory" into tizen

23 months agoMerge "CreatePatch.py: Add support for hardlinks during delta generation." into tizen
Karol Lewandowski [Thu, 17 Nov 2022 11:30:38 +0000 (11:30 +0000)]
Merge "CreatePatch.py: Add support for hardlinks during delta generation." into tizen

2 years agoCreatePatch.py: Drop legacy "VERBATIM" mechanism 08/282308/1
Antoni Adaszkiewicz [Thu, 29 Sep 2022 10:47:13 +0000 (12:47 +0200)]
CreatePatch.py: Drop legacy "VERBATIM" mechanism

Change-Id: I2def77d974733fa8708b3e806abc0c70aa2b7ae4

2 years agoChange DELTA_FS type deltas to be created with relative pathnames and remove their... 97/280997/4
Antoni Adaszkiewicz [Tue, 6 Sep 2022 13:31:42 +0000 (15:31 +0200)]
Change DELTA_FS type deltas to be created with relative pathnames and remove their dependency on
/run/upgrade-sysroot directory

Change-Id: I58348748e5359047bd587a6a7cf34af570665940

2 years agoDrop unsupported targets 19/280819/1
Karol Lewandowski [Mon, 5 Sep 2022 10:50:03 +0000 (12:50 +0200)]
Drop unsupported targets

None of dropped targets are supported by current `upgrade` support
in initrd-recovery.  Due to this upgrade packages are no longer
installed on these targets.

Change-Id: Id0dde3f0503cfa92e4c18542879208aa101e4d98

2 years agoCreatePatch.py: Add support for hardlinks during delta generation. 22/280722/2
Antoni Adaszkiewicz [Mon, 29 Aug 2022 12:19:06 +0000 (14:19 +0200)]
CreatePatch.py: Add support for hardlinks during delta generation.

Change-Id: Ie3fd13d9557f36222d96c61db1ce4b54cb5e2d82

2 years agoMerge remote-tracking branch 'tota-upg/tizen' into tizen 58/280658/1
Karol Lewandowski [Thu, 1 Sep 2022 22:06:39 +0000 (00:06 +0200)]
Merge remote-tracking branch 'tota-upg/tizen' into tizen

Change-Id: I9d3882ab0928efbbf60519f20ea3a21187fcc10a

2 years agoMerge changes Id8ad3953,I98b5a184 into tizen tota-upg-tizen
Karol Lewandowski [Thu, 1 Sep 2022 22:04:20 +0000 (22:04 +0000)]
Merge changes Id8ad3953,I98b5a184 into tizen

* changes:
  Remove unused Apply_Container_Delta() function from CreatePatch.py
  Fix ensure_dir_exists() function behaviour and exception handling

2 years agoMerge changes I7634bd46,I6abeeca4,I78c7a4d8 into tizen
Karol Lewandowski [Thu, 1 Sep 2022 22:04:10 +0000 (22:04 +0000)]
Merge changes I7634bd46,I6abeeca4,I78c7a4d8 into tizen

* changes:
  Fix inconsistent code formating and indentations in CreatePatch.py
  Remove unnecessary difflines() function and unnecessary closing of files in CreatePatch.py
  Remove bare excepts in CreatePatch.py

2 years agoDrop unused delta.ua from image 02/280302/1
Karol Lewandowski [Fri, 26 Aug 2022 10:27:32 +0000 (12:27 +0200)]
Drop unused delta.ua from image

delta.ua is legacy style upgrade agent that is no longer supported.

Change-Id: Ib5c17736dc91643e05d90a0d40f3c69edea2bd75

2 years agoss_bsdiff: Change the search function 64/280164/3
Mateusz Moscicki [Wed, 24 Aug 2022 15:17:49 +0000 (17:17 +0200)]
ss_bsdiff: Change the search function

This commit uses the provided sa_search() function to look for patterns,
instead of using own implementation.

The change is inspired by:

    https://android.googlesource.com/platform/external/bsdiff/+/refs/heads/master/suffix_array_index.cc

Change-Id: I49b3c4dd12c11b81157e030851bb8e4e48d1f6b2

2 years agoAdd dockerfile to provide upgrade-tools in reproductible manner 62/280162/3
Karol Lewandowski [Wed, 24 Aug 2022 13:58:26 +0000 (15:58 +0200)]
Add dockerfile to provide upgrade-tools in reproductible manner

Build with:
./docker-build.sh

Run with:
docker run --rm -ti --privileged -v /dev:/dev -v /data:/data upgrade-tools:latest

Update volume (-v) mappings as needed. Note that --privileged and -v /dev:/dev are needed
for loop device mounting to work correctly. /data volume is just example how to transfer
tizen images into container and deltas - out of container.

Change-Id: I5bd09d446df32eda44dddffb9dcc5bee942cd427

2 years agoImport bsdiff from libtota 61/280161/1
Karol Lewandowski [Wed, 24 Aug 2022 13:12:17 +0000 (15:12 +0200)]
Import bsdiff from libtota

This commit import tools to generate binary deltas from libtota
commit 143447ad7 ("ss_bsdiff: Fix to speed up patch generation")

Change-Id: I3ef5abd6065b476ffbd682c92bf306edd9a2ea4f

2 years agoUpdate README after repository copy
Karol Lewandowski [Tue, 23 Aug 2022 12:00:14 +0000 (14:00 +0200)]
Update README after repository copy

Copied platform/core/system/tota-upg -> upgrade-tools, which
will handle delta generation from 7.5 onwards.

Change-Id: I0413f75b634cb3907cf787a521ae415e95d36be3

2 years agoModify upgrade-verifier to verify partitions with image files
SangYoun Kwak [Thu, 18 Aug 2022 01:58:05 +0000 (10:58 +0900)]
Modify upgrade-verifier to verify partitions with image files

Change-Id: I7d83092a65ff153e18dd498e40122d6787318094
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
2 years agoAdd update-verifier
Mateusz Moscicki [Wed, 27 Jul 2022 10:43:20 +0000 (12:43 +0200)]
Add update-verifier

Change-Id: Id074d36297145e07f68d49be8f51feafcc726d5a

2 years agoRemove unused Apply_Container_Delta() function from CreatePatch.py
Antoni [Mon, 18 Jul 2022 15:08:46 +0000 (17:08 +0200)]
Remove unused Apply_Container_Delta() function from CreatePatch.py

Change-Id: Id8ad395399ba6b631cf1ad2ecb3ce8b201b95e43

2 years agoFix ensure_dir_exists() function behaviour and exception handling
Antoni [Mon, 18 Jul 2022 11:42:35 +0000 (13:42 +0200)]
Fix ensure_dir_exists() function behaviour and exception handling

Change-Id: I98b5a184714d34784068e840a1bb2636458a752f

2 years agoDrop DELTA_FS image generation
Karol Lewandowski [Thu, 21 Jul 2022 12:48:20 +0000 (14:48 +0200)]
Drop DELTA_FS image generation

This commit changes all occurences of DELTA_FS with DELTA_IMAGE.
DELTA_FS is considered legacy and should not be used unless necessary.

Change-Id: I17dccac5ec532af2db0bb2e385c9871763956b38

2 years agoFix inconsistent code formating and indentations in CreatePatch.py
Antoni [Mon, 18 Jul 2022 11:39:35 +0000 (13:39 +0200)]
Fix inconsistent code formating and indentations in CreatePatch.py

Change-Id: I7634bd462dd8b875c816540b3ca0720cde93b2ab

2 years agoRemove unnecessary difflines() function and unnecessary closing of files in CreatePat...
Antoni [Mon, 18 Jul 2022 11:33:12 +0000 (13:33 +0200)]
Remove unnecessary difflines() function and unnecessary closing of files in CreatePatch.py

Change-Id: I6abeeca4ed203d0718ca04b51809220fafe11f56

2 years agoRemove bare excepts in CreatePatch.py
Antoni [Fri, 15 Jul 2022 13:15:25 +0000 (15:15 +0200)]
Remove bare excepts in CreatePatch.py

Change-Id: I78c7a4d88057f21eaf5fb708a94c0a7378a0b742

2 years agoSave a checksum of all files contained in delta archive
Mateusz Moscicki [Mon, 20 Jun 2022 11:28:31 +0000 (13:28 +0200)]
Save a checksum of all files contained in delta archive

Change-Id: I82563afd2ef30784ece716a7b9a090241a159b95

2 years agoUnifies the location of the result delta.tar file
Mateusz Moscicki [Mon, 20 Jun 2022 10:18:12 +0000 (12:18 +0200)]
Unifies the location of the result delta.tar file

Change-Id: I2089c6e6f10bb1c462f68efe58faa8bb49d32cef

2 years agoUse Date field from info.ini for old & new version string
Mateusz Moscicki [Thu, 9 Jun 2022 12:59:06 +0000 (14:59 +0200)]
Use Date field from info.ini for old & new version string

Change-Id: I79861a7d7f08166c191552a1c52b71256c51ecd6

2 years agoRename upgrade types:
Mateusz Moscicki [Thu, 9 Jun 2022 14:47:09 +0000 (16:47 +0200)]
Rename upgrade types:

Types now include information in the name about what the upgrade is
(FULL_IMAGE, DELTA_IMAGE) and when it is to be performed
(BEFORE_BOOT_FOTA, AT_BOOT_FOTA):

  PRE_UA    -> FULL_IMAGE:BEFORE_BOOT_FOTA
  FULL_IMG  -> FULL_IMAGE:AT_BOOT_FOTA
  DELTA_IMG -> DELTA_IMAGE:AT_BOOT_FOTA

Change-Id: I31343d64a37156d0ca4673b9150cdfeb97f99ff4

2 years agoAdd upgrade-apply
Mateusz Moscicki [Fri, 3 Jun 2022 14:49:43 +0000 (16:49 +0200)]
Add upgrade-apply

Change-Id: Idd1a48cf89a17bb74351672094cc1f471a2e973e

2 years agoFix rootfs mount for metadata extraction
Mateusz Moscicki [Fri, 27 May 2022 15:15:33 +0000 (17:15 +0200)]
Fix rootfs mount for metadata extraction

Change-Id: I63e1203ba98fa1513bb3c3b731cb15f1210d8922

2 years agoAdd script to generate full delta
Mateusz Moscicki [Thu, 26 May 2022 14:41:59 +0000 (16:41 +0200)]
Add script to generate full delta

To generate the full delta, pass the 'full' argument to the
delta-generation.sh:

    ./scripts/delta-generation.sh . device_XYZ full

Change-Id: Ic847f396455b97e07091bf01c62bfb21b5da7ea9

2 years agoSave the checksum and image size of PRE_UA images in the update.cfg
Mateusz Moscicki [Fri, 13 May 2022 09:37:48 +0000 (11:37 +0200)]
Save the checksum and image size of PRE_UA images in the update.cfg

Change-Id: If6338b6ac94ec8c327f0891ae50cc45ee4be4996

2 years agoUse arm64 as architecture string instead of aarch64
Karol Lewandowski [Wed, 11 May 2022 08:55:47 +0000 (10:55 +0200)]
Use arm64 as architecture string instead of aarch64

It's was requested to be consistent with arm32 naming.

Change-Id: I0939e70745bb88354cd47861f5ad0326a6a26971

2 years agoUse Release field from info.ini for old & new version string
Karol Lewandowski [Tue, 10 May 2022 10:56:16 +0000 (12:56 +0200)]
Use Release field from info.ini for old & new version string

Change-Id: I58f34834589787101cd740287954e5271e6e71d4

2 years agoAlways copy whole /usr/libexec/upgrade-support to delta tar
Karol Lewandowski [Mon, 4 Apr 2022 18:27:16 +0000 (20:27 +0200)]
Always copy whole /usr/libexec/upgrade-support to delta tar

Recently there have been quite a few changes with upgrade scripts,
with each change requiring in this repository _in additon_ to changes
in packages which provide such scripts (tota-ua).

This commit generalizes the script concept, allowing it for any
package to install needed scrips to /usr/libexec/upgrade-support whose
contents will be copied in verbatim to delta.tar.

Change-Id: Ia6baec1ab777da842c4ea5b87e83046cbaa0b8fd