import CS ostree-2025.1-1.el9
This commit is contained in:
		
							parent
							
								
									732d08c05a
								
							
						
					
					
						commit
						42eb0cbd1b
					
				
							
								
								
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -1 +1 @@ | |||||||
| SOURCES/libostree-2024.7.tar.xz | SOURCES/libostree-2025.1.tar.xz | ||||||
|  | |||||||
| @ -1 +1 @@ | |||||||
| 7d1cb267442682402152ed4bb5379853e666f06b SOURCES/libostree-2024.7.tar.xz | d1ad76514f2dcc673d1d6c38707b2f9cbd062632 SOURCES/libostree-2025.1.tar.xz | ||||||
|  | |||||||
| @ -1,52 +0,0 @@ | |||||||
| From 6756841a7d04c3cc651a1ce7de35c55c754578d3 Mon Sep 17 00:00:00 2001 |  | ||||||
| From: Colin Walters <walters@verbum.org> |  | ||||||
| Date: Mon, 29 Jul 2024 15:17:10 -0400 |  | ||||||
| Subject: [PATCH 1/1] repo: NUL terminate readlinkat result |  | ||||||
| 
 |  | ||||||
| Coverity was correctly complaining about this. |  | ||||||
| 
 |  | ||||||
| Signed-off-by: Colin Walters <walters@verbum.org> |  | ||||||
| ---
 |  | ||||||
|  src/libostree/ostree-repo-commit.c | 11 ++++++++--- |  | ||||||
|  1 file changed, 8 insertions(+), 3 deletions(-) |  | ||||||
| 
 |  | ||||||
| diff --git a/src/libostree/ostree-repo-commit.c b/src/libostree/ostree-repo-commit.c
 |  | ||||||
| index 4d12d5ec..db83ebf2 100644
 |  | ||||||
| --- a/src/libostree/ostree-repo-commit.c
 |  | ||||||
| +++ b/src/libostree/ostree-repo-commit.c
 |  | ||||||
| @@ -794,7 +794,7 @@ _try_clone_from_payload_link (OstreeRepo *self, OstreeRepo *dest_repo, const cha
 |  | ||||||
|        glnx_autofd int fdf = -1; |  | ||||||
|        char loose_path_buf[_OSTREE_LOOSE_PATH_MAX]; |  | ||||||
|        char loose_path_target_buf[_OSTREE_LOOSE_PATH_MAX]; |  | ||||||
| -      char target_buf[_OSTREE_LOOSE_PATH_MAX + _OSTREE_PAYLOAD_LINK_PREFIX_LEN];
 |  | ||||||
| +      char target_buf[_OSTREE_LOOSE_PATH_MAX + _OSTREE_PAYLOAD_LINK_PREFIX_LEN + 1];
 |  | ||||||
|        char target_checksum[OSTREE_SHA256_STRING_LEN + 1]; |  | ||||||
|        int dfd = dfd_searches[i]; |  | ||||||
|        ssize_t size; |  | ||||||
| @@ -804,16 +804,21 @@ _try_clone_from_payload_link (OstreeRepo *self, OstreeRepo *dest_repo, const cha
 |  | ||||||
|        _ostree_loose_path (loose_path_buf, payload_checksum, OSTREE_OBJECT_TYPE_PAYLOAD_LINK, |  | ||||||
|                            self->mode); |  | ||||||
|   |  | ||||||
| -      size = TEMP_FAILURE_RETRY (readlinkat (dfd, loose_path_buf, target_buf, sizeof (target_buf)));
 |  | ||||||
| +      size = TEMP_FAILURE_RETRY (
 |  | ||||||
| +          readlinkat (dfd, loose_path_buf, target_buf, sizeof (target_buf) - 1));
 |  | ||||||
|        if (size < 0) |  | ||||||
|          { |  | ||||||
|            if (errno == ENOENT) |  | ||||||
|              continue; |  | ||||||
|            return glnx_throw_errno_prefix (error, "readlinkat"); |  | ||||||
|          } |  | ||||||
| +      target_buf[size] = '\0';
 |  | ||||||
|   |  | ||||||
| +      const size_t expected_len = OSTREE_SHA256_STRING_LEN + _OSTREE_PAYLOAD_LINK_PREFIX_LEN;
 |  | ||||||
|        if (size < OSTREE_SHA256_STRING_LEN + _OSTREE_PAYLOAD_LINK_PREFIX_LEN) |  | ||||||
| -        return glnx_throw (error, "invalid data size for %s", loose_path_buf);
 |  | ||||||
| +        return glnx_throw (error, "invalid data size for %s; expected=%llu found=%llu",
 |  | ||||||
| +                           loose_path_buf, (unsigned long long)expected_len,
 |  | ||||||
| +                           (unsigned long long)size);
 |  | ||||||
|   |  | ||||||
|        snprintf (target_checksum, size, "%.2s%.62s", target_buf + _OSTREE_PAYLOAD_LINK_PREFIX_LEN, |  | ||||||
|                  target_buf + _OSTREE_PAYLOAD_LINK_PREFIX_LEN + 3); |  | ||||||
| -- 
 |  | ||||||
| 2.45.2 |  | ||||||
| 
 |  | ||||||
| @ -1,26 +1,27 @@ | |||||||
| #!/bin/bash | #!/bin/bash | ||||||
| # Update an existing system to use a read only sysroot | # Update an existing system to use a read only sysroot | ||||||
| # and https://bugzilla.redhat.com/show_bug.cgi?id=2060976 | # and https://bugzilla.redhat.com/show_bug.cgi?id=2060976 | ||||||
|   | 
 | ||||||
| set -euo pipefail | set -euo pipefail | ||||||
|   | 
 | ||||||
| main() { | main() { | ||||||
|  | 
 | ||||||
|     # Used to condition execution of this unit at the systemd level |     # Used to condition execution of this unit at the systemd level | ||||||
|     local -r stamp_file="/var/lib/.ostree-readonly-sysroot" |     local -r stamp_file="/var/lib/.ostree-readonly-sysroot" | ||||||
|   | 
 | ||||||
|     if [[ -f "${stamp_file}" ]]; then |     if [[ -f "${stamp_file}" ]]; then | ||||||
|         exit 0 |         exit 0 | ||||||
|     fi |     fi | ||||||
|   | 
 | ||||||
|     local -r ostree_sysroot_readonly="$(ostree config --repo=/sysroot/ostree/repo get "sysroot.readonly" &> /dev/null || echo "false")" |     local -r ostree_sysroot_readonly="$(ostree config --repo=/sysroot/ostree/repo get "sysroot.readonly" &> /dev/null || echo "false")" | ||||||
|     if [[ "${ostree_sysroot_readonly}" == "true" ]]; then |     if [[ "${ostree_sysroot_readonly}" == "true" ]]; then | ||||||
|         # Nothing to do |         # Nothing to do | ||||||
|         touch "${stamp_file}" |         touch "${stamp_file}" | ||||||
|         exit 0 |         exit 0 | ||||||
|     fi |     fi | ||||||
|   | 
 | ||||||
|     local -r boot_entries="$(ls -A /boot/loader/entries/ | wc -l)" |     local -r boot_entries="$(ls -A /boot/loader/entries/ | wc -l)" | ||||||
|   | 
 | ||||||
|     # Ensure that we can read BLS entries to avoid touching systems where /boot |     # Ensure that we can read BLS entries to avoid touching systems where /boot | ||||||
|     # is not mounted |     # is not mounted | ||||||
|     if [[ "${boot_entries}" -eq 0 ]]; then |     if [[ "${boot_entries}" -eq 0 ]]; then | ||||||
| @ -29,7 +30,7 @@ main() { | |||||||
|         touch "${stamp_file}" |         touch "${stamp_file}" | ||||||
|         exit 0 |         exit 0 | ||||||
|     fi |     fi | ||||||
|   | 
 | ||||||
|     # Check if any existing deployment is still missing the rw karg |     # Check if any existing deployment is still missing the rw karg | ||||||
|     local rw_kargs_found=0 |     local rw_kargs_found=0 | ||||||
|     local count=0 |     local count=0 | ||||||
| @ -39,13 +40,19 @@ main() { | |||||||
|             rw_kargs_found=$((rw_kargs_found + 1)) |             rw_kargs_found=$((rw_kargs_found + 1)) | ||||||
|         fi |         fi | ||||||
|     done |     done | ||||||
|   | 
 | ||||||
|     # Some deployments are still missing the rw karg. Let's try to update them |     # Some deployments are still missing the rw karg. Let's try to update them | ||||||
|     if [[ "${boot_entries}" -ne "${rw_kargs_found}" ]]; then |     if [[ "${boot_entries}" -ne "${rw_kargs_found}" ]]; then | ||||||
|  |         # work around https://github.com/ostreedev/ostree/issues/2734#issuecomment-2353739450 | ||||||
|  |         stateroot=$(ls /ostree/deploy | head -n1) | ||||||
|  |         if ls /boot/loader/entries/ostree-*-$stateroot.conf &>/dev/null; then | ||||||
|  |             echo "Enabling bootloader naming workaround" 1>&2 | ||||||
|  |             export OSTREE_SYSROOT_OPTS=bootloader-naming-1 | ||||||
|  |         fi | ||||||
|         ostree admin kargs edit-in-place --append-if-missing=rw || \ |         ostree admin kargs edit-in-place --append-if-missing=rw || \ | ||||||
|             echo "Failed to edit kargs in place with ostree" 1>&2 |             echo "Failed to edit kargs in place with ostree" 1>&2 | ||||||
|     fi |     fi | ||||||
|   | 
 | ||||||
|     # Re-check if any existing deployment is still missing the rw karg |     # Re-check if any existing deployment is still missing the rw karg | ||||||
|     rw_kargs_found=0 |     rw_kargs_found=0 | ||||||
|     count=0 |     count=0 | ||||||
| @ -56,7 +63,7 @@ main() { | |||||||
|         fi |         fi | ||||||
|     done |     done | ||||||
|     unset count |     unset count | ||||||
|   | 
 | ||||||
|     # If all deployments are good, then we can set the sysroot.readonly option |     # If all deployments are good, then we can set the sysroot.readonly option | ||||||
|     # in the ostree repo config |     # in the ostree repo config | ||||||
|     if [[ "${boot_entries}" -eq "${rw_kargs_found}" ]]; then |     if [[ "${boot_entries}" -eq "${rw_kargs_found}" ]]; then | ||||||
| @ -65,10 +72,10 @@ main() { | |||||||
|         touch "${stamp_file}" |         touch "${stamp_file}" | ||||||
|         exit 0 |         exit 0 | ||||||
|     fi |     fi | ||||||
|   | 
 | ||||||
|     # If anything else before failed, we will retry on next boot |     # If anything else before failed, we will retry on next boot | ||||||
|     echo "Will retry next boot" 1>&2 |     echo "Will retry next boot" 1>&2 | ||||||
|     exit 0 |     exit 0 | ||||||
| } | } | ||||||
|   | 
 | ||||||
| main "${@}" | main "${@}" | ||||||
|  | |||||||
| @ -7,14 +7,12 @@ | |||||||
| 
 | 
 | ||||||
| Summary: Tool for managing bootable, immutable filesystem trees | Summary: Tool for managing bootable, immutable filesystem trees | ||||||
| Name: ostree | Name: ostree | ||||||
| Version: 2024.7 | Version: 2025.1 | ||||||
| Release: 2%{?dist} | Release: 1%{?dist} | ||||||
| Source0: https://github.com/ostreedev/%{name}/releases/download/v%{version}/libostree-%{version}.tar.xz | Source0: https://github.com/ostreedev/%{name}/releases/download/v%{version}/libostree-%{version}.tar.xz | ||||||
| Source1: ostree-readonly-sysroot-migration | Source1: ostree-readonly-sysroot-migration | ||||||
| Source2: ostree-readonly-sysroot-migration.service | Source2: ostree-readonly-sysroot-migration.service | ||||||
| 
 | 
 | ||||||
| Patch0: 0001-repo-NUL-terminate-readlinkat-result.patch |  | ||||||
| 
 |  | ||||||
| License: LGPLv2+ | License: LGPLv2+ | ||||||
| URL: https://ostree.readthedocs.io/en/latest/ | URL: https://ostree.readthedocs.io/en/latest/ | ||||||
| 
 | 
 | ||||||
| @ -181,6 +179,22 @@ find %{buildroot} -name '*.la' -delete | |||||||
| %endif | %endif | ||||||
| 
 | 
 | ||||||
| %changelog | %changelog | ||||||
|  | * Mon Jan 20 2025 Joseph Marrero <jmarrero@fedoraproject.org> - 2025.1-1 | ||||||
|  | - Rebase to https://github.com/ostreedev/ostree/releases/tag/v2025.1 | ||||||
|  |   Resolves: #RHEL-73827 | ||||||
|  | 
 | ||||||
|  | * Tue Nov 05 2024 Joseph Marrero <jmarrero@fedoraproject.org> - 2024.9-1 | ||||||
|  | - Rebase to https://github.com/ostreedev/ostree/releases/tag/v2024.9 | ||||||
|  |   Resolves: #RHEL-62769 | ||||||
|  | 
 | ||||||
|  | * Thu Oct 17 2024 Joseph Marrero <jmarrero@fedoraproject.org> - 2024.8-1 | ||||||
|  | - Rebase to https://github.com/ostreedev/ostree/releases/tag/v2024.8 | ||||||
|  |   Resolves: #RHEL-62769 | ||||||
|  | 
 | ||||||
|  | * Thu Sep 12 2024 Joseph Marrero <jmarrero@fedoraproject.org> - 2024.7-3 | ||||||
|  | - Rebuild to pickup changes to ostree-readonly-sysroot-migration | ||||||
|  |   Resolves: #RHEL-58437 | ||||||
|  | 
 | ||||||
| * Wed Aug 14 2024 Joseph Marrero <jmarrero@fedoraproject.org> - 2024.7-2 | * Wed Aug 14 2024 Joseph Marrero <jmarrero@fedoraproject.org> - 2024.7-2 | ||||||
| - Backport https://github.com/ostreedev/ostree/pull/3281 | - Backport https://github.com/ostreedev/ostree/pull/3281 | ||||||
|   Resolves: #RHEL-50680 |   Resolves: #RHEL-50680 | ||||||
| @ -796,7 +810,7 @@ find %{buildroot} -name '*.la' -delete | |||||||
| - Move trusted.gpg.d to main runtime package, where it should be | - Move trusted.gpg.d to main runtime package, where it should be | ||||||
| 
 | 
 | ||||||
| * Fri Mar 07 2014 Colin Walters <walters@verbum.org> - 2014.2-2 | * Fri Mar 07 2014 Colin Walters <walters@verbum.org> - 2014.2-2 | ||||||
| - Depend on gpgv2  | - Depend on gpgv2 | ||||||
| - Resolves: #1073813 | - Resolves: #1073813 | ||||||
| 
 | 
 | ||||||
| * Sat Mar 01 2014 Colin Walters <walters@verbum.org> - 2014.2-1 | * Sat Mar 01 2014 Colin Walters <walters@verbum.org> - 2014.2-1 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user