Release bootc 1.1.4
Resolves: #RHEL-72584
This commit is contained in:
		
							parent
							
								
									8dee354522
								
							
						
					
					
						commit
						c3ea96f270
					
				
							
								
								
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -24,3 +24,5 @@ | ||||
| /bootc-1.1.2-vendor.tar.zstd | ||||
| /bootc-1.1.3-vendor.tar.zstd | ||||
| /bootc-1.1.3.tar.zstd | ||||
| /bootc-1.1.4.tar.zstd | ||||
| /bootc-1.1.4-vendor.tar.zstd | ||||
|  | ||||
| @ -1,132 +0,0 @@ | ||||
| From 5013d45effbbb9c6ca0a6405fca894c8dc06e767 Mon Sep 17 00:00:00 2001 | ||||
| From: Colin Walters <walters@verbum.org> | ||||
| Date: Fri, 20 Dec 2024 09:27:30 -0500 | ||||
| Subject: [PATCH] tree-wide: Use cap-std-ext is_mountpoint() API | ||||
| 
 | ||||
| I moved it there a while ago, now we can drop the copy of it | ||||
| here. | ||||
| 
 | ||||
| Signed-off-by: Colin Walters <walters@verbum.org> | ||||
| ---
 | ||||
|  lib/src/install.rs          |  2 +- | ||||
|  ostree-ext/src/commit.rs    |  3 +- | ||||
|  ostree-ext/src/lib.rs       |  1 - | ||||
|  ostree-ext/src/mountutil.rs | 60 ------------------------------------- | ||||
|  4 files changed, 2 insertions(+), 64 deletions(-) | ||||
|  delete mode 100644 ostree-ext/src/mountutil.rs | ||||
| 
 | ||||
| diff --git a/lib/src/install.rs b/lib/src/install.rs
 | ||||
| index 5929e4cd..d591672b 100644
 | ||||
| --- a/lib/src/install.rs
 | ||||
| +++ b/lib/src/install.rs
 | ||||
| @@ -1711,7 +1711,7 @@ pub(crate) async fn install_to_filesystem(
 | ||||
|   | ||||
|          tracing::debug!("Root filesystem: {root_path}"); | ||||
|   | ||||
| -        if let Some(false) = ostree_ext::mountutil::is_mountpoint(&rootfs_fd, ".")? {
 | ||||
| +        if let Some(false) = rootfs_fd.is_mountpoint(".")? {
 | ||||
|              anyhow::bail!("Not a mountpoint: {root_path}"); | ||||
|          } | ||||
|          rootfs_fd | ||||
| diff --git a/ostree-ext/src/commit.rs b/ostree-ext/src/commit.rs
 | ||||
| index babe9017..31571d1e 100644
 | ||||
| --- a/ostree-ext/src/commit.rs
 | ||||
| +++ b/ostree-ext/src/commit.rs
 | ||||
| @@ -3,7 +3,6 @@
 | ||||
|  //! <https://github.com/ostreedev/ostree-rs-ext/issues/159> | ||||
|   | ||||
|  use crate::container_utils::require_ostree_container; | ||||
| -use crate::mountutil::is_mountpoint;
 | ||||
|  use anyhow::Context; | ||||
|  use anyhow::Result; | ||||
|  use cap_std::fs::Dir; | ||||
| @@ -60,7 +59,7 @@ fn clean_subdir(root: &Dir, rootdev: u64) -> Result<()> {
 | ||||
|          } | ||||
|          // Also ignore bind mounts, if we have a new enough kernel with statx() | ||||
|          // that will tell us. | ||||
| -        if is_mountpoint(root, &path)?.unwrap_or_default() {
 | ||||
| +        if root.is_mountpoint(&path)?.unwrap_or_default() {
 | ||||
|              tracing::trace!("Skipping mount point {path:?}"); | ||||
|              continue; | ||||
|          } | ||||
| diff --git a/ostree-ext/src/lib.rs b/ostree-ext/src/lib.rs
 | ||||
| index b962c8d6..97ec80de 100644
 | ||||
| --- a/ostree-ext/src/lib.rs
 | ||||
| +++ b/ostree-ext/src/lib.rs
 | ||||
| @@ -39,7 +39,6 @@ pub mod diff;
 | ||||
|  pub mod ima; | ||||
|  pub mod keyfileext; | ||||
|  pub(crate) mod logging; | ||||
| -pub mod mountutil;
 | ||||
|  pub mod ostree_prepareroot; | ||||
|  pub mod refescape; | ||||
|  #[doc(hidden)] | ||||
| diff --git a/ostree-ext/src/mountutil.rs b/ostree-ext/src/mountutil.rs
 | ||||
| deleted file mode 100644 | ||||
| index f73cbba2..00000000
 | ||||
| --- a/ostree-ext/src/mountutil.rs
 | ||||
| +++ /dev/null
 | ||||
| @@ -1,60 +0,0 @@
 | ||||
| -//! Helpers for interacting with mounts.
 | ||||
| -
 | ||||
| -use std::os::fd::AsFd;
 | ||||
| -use std::path::Path;
 | ||||
| -
 | ||||
| -use anyhow::Result;
 | ||||
| -use cap_std::fs::Dir;
 | ||||
| -use cap_std_ext::cap_std;
 | ||||
| -
 | ||||
| -// Fix musl support
 | ||||
| -#[cfg(target_env = "gnu")]
 | ||||
| -use libc::STATX_ATTR_MOUNT_ROOT;
 | ||||
| -#[cfg(target_env = "musl")]
 | ||||
| -const STATX_ATTR_MOUNT_ROOT: libc::c_int = 0x2000;
 | ||||
| -
 | ||||
| -fn is_mountpoint_impl_statx(root: &Dir, path: &Path) -> Result<Option<bool>> {
 | ||||
| -    // https://github.com/systemd/systemd/blob/8fbf0a214e2fe474655b17a4b663122943b55db0/src/basic/mountpoint-util.c#L176
 | ||||
| -    use rustix::fs::{AtFlags, StatxFlags};
 | ||||
| -
 | ||||
| -    // SAFETY(unwrap): We can infallibly convert an i32 into a u64.
 | ||||
| -    let mountroot_flag: u64 = STATX_ATTR_MOUNT_ROOT.try_into().unwrap();
 | ||||
| -    match rustix::fs::statx(
 | ||||
| -        root.as_fd(),
 | ||||
| -        path,
 | ||||
| -        AtFlags::NO_AUTOMOUNT | AtFlags::SYMLINK_NOFOLLOW,
 | ||||
| -        StatxFlags::empty(),
 | ||||
| -    ) {
 | ||||
| -        Ok(r) => {
 | ||||
| -            let present = (r.stx_attributes_mask & mountroot_flag) > 0;
 | ||||
| -            Ok(present.then_some(r.stx_attributes & mountroot_flag > 0))
 | ||||
| -        }
 | ||||
| -        Err(e) if e == rustix::io::Errno::NOSYS => Ok(None),
 | ||||
| -        Err(e) => Err(e.into()),
 | ||||
| -    }
 | ||||
| -}
 | ||||
| -
 | ||||
| -/// Try to (heuristically) determine if the provided path is a mount root.
 | ||||
| -pub fn is_mountpoint(root: &Dir, path: impl AsRef<Path>) -> Result<Option<bool>> {
 | ||||
| -    is_mountpoint_impl_statx(root, path.as_ref())
 | ||||
| -}
 | ||||
| -
 | ||||
| -#[cfg(test)]
 | ||||
| -mod tests {
 | ||||
| -    use super::*;
 | ||||
| -    use cap_std_ext::cap_tempfile;
 | ||||
| -
 | ||||
| -    #[test]
 | ||||
| -    fn test_is_mountpoint() -> Result<()> {
 | ||||
| -        let root = cap_std::fs::Dir::open_ambient_dir("/", cap_std::ambient_authority())?;
 | ||||
| -        let supported = is_mountpoint(&root, Path::new("/")).unwrap();
 | ||||
| -        match supported {
 | ||||
| -            Some(r) => assert!(r),
 | ||||
| -            // If the host doesn't support statx, ignore this for now
 | ||||
| -            None => return Ok(()),
 | ||||
| -        }
 | ||||
| -        let tmpdir = cap_tempfile::TempDir::new(cap_std::ambient_authority())?;
 | ||||
| -        assert!(!is_mountpoint(&tmpdir, Path::new(".")).unwrap().unwrap());
 | ||||
| -        Ok(())
 | ||||
| -    }
 | ||||
| -}
 | ||||
| -- 
 | ||||
| 2.47.0 | ||||
| 
 | ||||
							
								
								
									
										27
									
								
								bootc.spec
									
									
									
									
									
								
							
							
						
						
									
										27
									
								
								bootc.spec
									
									
									
									
									
								
							| @ -1,8 +1,18 @@ | ||||
| %bcond_without check | ||||
| %bcond_without ostree_ext | ||||
| %if 0%{?rhel} >= 10 || 0%{?fedora} > 41 | ||||
|     %bcond_without ostree_ext | ||||
| %else | ||||
|     %bcond_with ostree_ext | ||||
| %endif | ||||
| 
 | ||||
| %if 0%{?rhel} | ||||
|     %bcond_without rhsm | ||||
| %else | ||||
|     %bcond_with rhsm | ||||
| %endif | ||||
| 
 | ||||
| Name:           bootc | ||||
| Version:        1.1.3 | ||||
| Version:        1.1.4 | ||||
| Release:        %{autorelease} | ||||
| Summary:        Bootable container system | ||||
| 
 | ||||
| @ -19,10 +29,6 @@ URL:            https://github.com/containers/bootc | ||||
| Source0:        %{url}/releases/download/v%{version}/bootc-%{version}.tar.zstd | ||||
| Source1:        %{url}/releases/download/v%{version}/bootc-%{version}-vendor.tar.zstd | ||||
| 
 | ||||
| # Because old mock doesn't have / be a mountpoint, and this breaks | ||||
| # a test case. | ||||
| Patch0: 0001-tree-wide-Use-cap-std-ext-is_mountpoint-API.patch | ||||
| 
 | ||||
| # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval | ||||
| ExcludeArch:    %{ix86} | ||||
| 
 | ||||
| @ -42,6 +48,7 @@ BuildRequires: skopeo ostree | ||||
| # Backing storage tooling https://github.com/containers/composefs/issues/125 | ||||
| Requires: composefs | ||||
| # For OS updates | ||||
| Requires: ostree | ||||
| Requires: skopeo | ||||
| Requires: podman | ||||
| # For bootloader updates | ||||
| @ -60,7 +67,12 @@ Provides: ostree-cli(ostree-container) | ||||
| %cargo_prep -v vendor | ||||
| 
 | ||||
| %build | ||||
| %cargo_build | ||||
| %if 0%{?rhel} == 10 | ||||
|     %cargo_build %{?with_rhsm:-f rhsm} | ||||
| %else | ||||
|     %cargo_build %{?with_rhsm:--features rhsm} | ||||
| %endif | ||||
| 
 | ||||
| %cargo_vendor_manifest | ||||
| %cargo_license_summary | ||||
| %{cargo_license} > LICENSE.dependencies | ||||
| @ -89,6 +101,7 @@ make install-ostree-hooks DESTDIR=%{?buildroot} | ||||
| %{_prefix}/libexec/libostree/ext/* | ||||
| %endif | ||||
| %{_unitdir}/* | ||||
| %{_docdir}/bootc/* | ||||
| %{_mandir}/man*/bootc* | ||||
| 
 | ||||
| %changelog | ||||
|  | ||||
							
								
								
									
										4
									
								
								sources
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								sources
									
									
									
									
									
								
							| @ -1,2 +1,2 @@ | ||||
| SHA512 (bootc-1.1.3-vendor.tar.zstd) = 40666f9da2ff59a85446f7137da5be5704537a82d80c581bceeec1714176ef2edccf0800ce03a5f2689d083c66686cc31973c33ef0db96ee9439492a6b563b0e | ||||
| SHA512 (bootc-1.1.3.tar.zstd) = cf19102897f3f9736fe5979ff1e3be486f8d9d5e8de9f14d00555ad333f3acb61dbf3184d9453ad92cd5ac58da4384f8eef5bde16d5bdbfc83e17443c757330b | ||||
| SHA512 (bootc-1.1.4.tar.zstd) = 9d349f0954eef26bfa0a4f97d48bb497b845b0ba00748dba07571d6149b6fe75bf6cfcada6851f3c3a3f7f8bc863fbac51386d3018812f5db762e1b8a5eb1035 | ||||
| SHA512 (bootc-1.1.4-vendor.tar.zstd) = fd7a68ae2c1b9890865705afa81aed940a51d588a9c9d63439b5e639608d8f9d23294f7fa09ccfb27f43ff21c44db157865f36c5a60862736d9fcc1614c91862 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user