Skip to content

Commit

Permalink
Add an always-on inode64 feature
Browse files Browse the repository at this point in the history
As I (and others) will be backporting the fix in
de6fddc
pretty far, I want a way for sysadmins and OS builders to
be able to reliably see when their version of ostree has this fix
(Because comparing version numbers isn't portable).
  • Loading branch information
cgwalters committed Jul 20, 2023
1 parent 5593616 commit be2b962
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 2 deletions.
1 change: 1 addition & 0 deletions Makefile-tests.am
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ test_programs = \
tests/test-repo-finder-mount \
$(NULL)
_installed_or_uninstalled_test_scripts = \
tests/test-features.sh \
tests/test-basic.sh \
tests/test-basic-bare-split-xattrs.sh \
tests/test-basic-user.sh \
Expand Down
5 changes: 4 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@ AM_COND_IF([BUILDOPT_TSAN],
LT_PREREQ([2.2.4])
LT_INIT([disable-static])

OSTREE_FEATURES=""
dnl We have an always-on feature now to signify the fix for
dnl https://github.com/ostreedev/ostree/pull/2874/commits/de6fddc6adee09a93901243dc7074090828a1912
dnl "commit: fix ostree deployment on 64-bit inode fs"
OSTREE_FEATURES="inode64"
AC_SUBST([OSTREE_FEATURES])

GLIB_TESTS
Expand Down
5 changes: 4 additions & 1 deletion tests/inst/src/repobin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ use sh_inline::{bash, bash_command};
use with_procspawn_tempdir::with_procspawn_tempdir;

pub(crate) fn itest_basic() -> Result<()> {
bash!(r"ostree --help >/dev/null")?;
// This helps verify we're running at least relatively new code
// as inode64 was added recently. It's just a sanity check that
// we can run the binary too.
bash!(r"ostree --version |grep -q -e '- inode64'")?;
Ok(())
}

Expand Down
29 changes: 29 additions & 0 deletions tests/test-features.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash
#
# Copyright (C) 2015 Red Hat, Inc.
#
# SPDX-License-Identifier: LGPL-2.0+
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library. If not, see <https://www.gnu.org/licenses/>.

set -euo pipefail

. $(dirname $0)/libtest.sh

if ! $CMD_PREFIX ostree --version | grep -q -e '- inode64'; then
fatal missing inode64 feature
fi
tap_ok "inode64 feature"

tap_end

0 comments on commit be2b962

Please sign in to comment.