Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package obs-service-source_validator for 
openSUSE:Factory checked in at 2026-12-03 13:56:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/obs-service-source_validator (Old)
 and      /work/SRC/openSUSE:Factory/.obs-service-source_validator.new.1340718 
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "obs-service-source_validator"

Thu Dec  3 13:56:31 2026 rev:97 rq:1402465 version:0.49.1

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/obs-service-source_validator/obs-service-source_validator.changes
        2026-11-19 16:58:55.288463871 +0100
+++ 
/work/SRC/openSUSE:Factory/.obs-service-source_validator.new.1340718/obs-service-source_validator.changes
   2026-12-03 13:59:08.092861850 +0100
@@ -1,0 +2,14 @@
+Wed Dec 02 15:42:28 UTC 2026 - Dirk Müller <[email protected]>
+
+- Update to version 0.49.1:
+  * Fix testsuite failure in build environment
+
+-------------------------------------------------------------------
+Wed Dec 02 09:52:29 UTC 2026 - Dirk Müller <[email protected]>
+
+- Update to version 0.49:
+  * Export an empty home directory for the test
+  * skip fsmonitor as well
+  * Fix Git ignore handling in submodule and worktree checkouts
+
+-------------------------------------------------------------------

Old:
----
  obs-service-source_validator-0.48.tar.xz

New:
----
  obs-service-source_validator-0.49.1.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ obs-service-source_validator.spec ++++++
--- /var/tmp/diff_new_pack.yeAi5r/_old  2026-12-03 13:59:09.063903672 +0100
+++ /var/tmp/diff_new_pack.yeAi5r/_new  2026-12-03 13:59:09.065903759 +0100
@@ -22,7 +22,7 @@
 %define build_pkg_name obs-build
 %endif
 Name:           obs-service-source_validator
-Version:        0.48
+Version:        0.49.1
 Release:        0
 Summary:        An OBS source service: running all the osc source-validator 
checks
 License:        GPL-2.0-or-later

++++++ PKGBUILD ++++++
--- /var/tmp/diff_new_pack.yeAi5r/_old  2026-12-03 13:59:09.094905008 +0100
+++ /var/tmp/diff_new_pack.yeAi5r/_new  2026-12-03 13:59:09.101905309 +0100
@@ -1,5 +1,5 @@
 pkgname=obs-service-source_validator
-pkgver=0.48
+pkgver=0.49.1
 pkgrel=0
 pkgdesc='An OBS source service: running all the osc source-validator checks'
 arch=('any')

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.yeAi5r/_old  2026-12-03 13:59:09.133906687 +0100
+++ /var/tmp/diff_new_pack.yeAi5r/_new  2026-12-03 13:59:09.136906817 +0100
@@ -3,6 +3,6 @@
             <param 
name="url">git://github.com/openSUSE/obs-service-source_validator.git</param>
           <param 
name="changesrevision">c68d7a28c4ecd88b179359b030098503e75adc0b</param></service><service
 name="tar_scm">
                 <param 
name="url">https://github.com/openSUSE/obs-service-source_validator.git</param>
-              <param 
name="changesrevision">cbb73bbad40c2387aced6374edaf8f00d05a868d</param></service></servicedata>
+              <param 
name="changesrevision">e749b80fd157fcd1bbab85a8c1d89cd412846086</param></service></servicedata>
 (No newline at EOF)
 

++++++ debian.dsc ++++++
--- /var/tmp/diff_new_pack.yeAi5r/_old  2026-12-03 13:59:09.154907592 +0100
+++ /var/tmp/diff_new_pack.yeAi5r/_new  2026-12-03 13:59:09.158907764 +0100
@@ -1,6 +1,6 @@
 Format: 1.0
 Source: obs-service-source-validator
-Version: 0.48-0
+Version: 0.49.1-0
 Binary: obs-service-source-validator
 Maintainer: Hib Eris <[email protected]>
 Architecture: all

++++++ obs-service-source_validator-0.48.tar.xz -> 
obs-service-source_validator-0.49.1.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-source_validator-0.48/20-files-present-and-referenced 
new/obs-service-source_validator-0.49.1/20-files-present-and-referenced
--- old/obs-service-source_validator-0.48/20-files-present-and-referenced       
2026-10-12 21:56:14.000000000 +0200
+++ new/obs-service-source_validator-0.49.1/20-files-present-and-referenced     
2026-12-02 16:41:17.000000000 +0100
@@ -13,7 +13,7 @@
 . $HELPERS_DIR/functions
 
 test -z "$DESTINATIONDIR" && test -d "$DIR_TO_CHECK/.osc" && {
-    if [ -d "$DIR_TO_CHECK/.git" ]; then
+    if [ -e "$DIR_TO_CHECK/.git" ]; then
         # osc has used git to clone the package source.
         DESTINATIONDIR="$DIR_TO_CHECK"
     else
@@ -169,11 +169,21 @@
     shift
 
     env GIT_CONFIG_NOSYSTEM=1 GIT_ADVICE=0 \
-        git -c core.hooksPath=/dev/null -c safe.bareRepository=explicit \
+        git -c core.hooksPath=/dev/null -c core.fsmonitor=false \
+        -c safe.bareRepository=explicit \
         --git-dir="$target_dir/.git" --work-tree="$target_dir" \
         "$@"
 }
 
+# Submodules and linked worktrees have a .git file, not a directory.
+# Ask Git to validate the checkout without requiring a local config file.
+GIT_CHECKOUT=false
+if command -v git >/dev/null 2>&1 && [ -e "$DIR_TO_CHECK/.git" ]; then
+    if safe_git "$DIR_TO_CHECK" rev-parse --git-dir >/dev/null 2>&1; then
+        GIT_CHECKOUT=true
+    fi
+fi
+
 check_tracked()
 {
     local file=${1##*/}
@@ -197,7 +207,7 @@
     fi
 
     # working in local clone. osc may or may be not used.
-    if test -x "$(type -p git)" && test -d "$DIR_TO_CHECK/.git" && test -f 
"$DIR_TO_CHECK/.git/config" && test -f "$DIR_TO_CHECK/$file"; then
+    if "$GIT_CHECKOUT" && test -f "$DIR_TO_CHECK/$file"; then
         if safe_git "$DIR_TO_CHECK" check-ignore -q "$file"; then
             # temporary data, marked intentionally by the packager, handle it 
as untracked
             return 1
@@ -418,8 +428,8 @@
             # and source services on server side
             [ -d "$DIR_TO_CHECK/$BASE" ] && [ -d "$DIR_TO_CHECK/.old" ] && 
continue
 
-            # ignore files that are ignored by "it
-            if test -x "$(type -p git)" && test -d "$DIR_TO_CHECK/.git" && 
test -f "$DIR_TO_CHECK/.gitignore"; then
+            # Git also reads info/exclude and configured global ignore rules.
+            if "$GIT_CHECKOUT"; then
                 if safe_git "$DIR_TO_CHECK" check-ignore -q "$BASE"; then
                     continue
                 fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-source_validator-0.48/t/test_gitignore.sh 
new/obs-service-source_validator-0.49.1/t/test_gitignore.sh
--- old/obs-service-source_validator-0.48/t/test_gitignore.sh   2026-10-12 
21:56:14.000000000 +0200
+++ new/obs-service-source_validator-0.49.1/t/test_gitignore.sh 2026-12-02 
16:41:17.000000000 +0100
@@ -1,19 +1,49 @@
 #!/bin/bash
-# Test for .gitignore integration in 20-files-present-and-referenced
+# Test Git ignore handling, including checkouts with a .git file.
 
-set -e
+set -eu
 
-# Path to the script to test
-VALIDATOR="./20-files-present-and-referenced"
-TEST_DATA_DIR="t/data/gitignore_test"
+VALIDATOR="$PWD/20-files-present-and-referenced"
+TEST_ROOT=$(mktemp -d)
+trap 'rm -rf "$TEST_ROOT"' EXIT
+
+# Keep user and system ignore settings out of these tests.
+# Git reads $XDG_CONFIG_HOME/git/ignore even when GIT_CONFIG_GLOBAL is unset.
+export HOME="$TEST_ROOT/home"
+export XDG_CONFIG_HOME="$HOME/.config"
+mkdir -p "$XDG_CONFIG_HOME"
+export GIT_CONFIG_NOSYSTEM=1
+export GIT_CONFIG_GLOBAL=/dev/null
+
+fail() {
+    echo "FAIL: $*" >&2
+    printf '%s\n' "${OUTPUT:-}" >&2
+    exit 1
+}
+
+assert_mentioned() {
+    grep -Fq -- "$1" <<< "$OUTPUT" || fail "$1 should be mentioned"
+}
+
+assert_ignored() {
+    if grep -Fq -- "$1" <<< "$OUTPUT"; then
+        fail "$1 should be ignored"
+    fi
+}
+
+for layout in directory gitfile; do
+    TEST_DATA_DIR="$TEST_ROOT/$layout"
+    if [ "$layout" = gitfile ]; then
+        # The same .git indirection is used by submodules and worktrees.
+        git init -q --separate-git-dir="$TEST_ROOT/metadata" "$TEST_DATA_DIR"
+        [ -f "$TEST_DATA_DIR/.git" ] || fail "expected a .git file"
+        # An osc checkout using Git must not require .osc/_osclib_version.
+        mkdir "$TEST_DATA_DIR/.osc"
+    else
+        git init -q "$TEST_DATA_DIR"
+    fi
 
-# Create test data directory if it doesn't exist
-mkdir -p "$TEST_DATA_DIR"
-trap 'rm -rf "$TEST_DATA_DIR"' EXIT
-git -C "$TEST_DATA_DIR" init -q
-
-# Create a dummy spec file
-cat > "$TEST_DATA_DIR/test.spec" <<EOF
+    cat > "$TEST_DATA_DIR/test.spec" <<'EOF'
 Name: test
 Version: 1.0
 Release: 0
@@ -28,40 +58,62 @@
 %install
 %files
 EOF
+    touch "$TEST_DATA_DIR/test.tar.gz"
+    git -C "$TEST_DATA_DIR" add test.tar.gz
 
-touch "$TEST_DATA_DIR/test.tar.gz"
-git -C "$TEST_DATA_DIR" add test.tar.gz
-
-# Create a .gitignore and an ignored file
-echo "ignored.txt" > "$TEST_DATA_DIR/.gitignore"
-touch "$TEST_DATA_DIR/ignored.txt"
-
-# Create an extra file that should NOT be ignored and NOT in spec
-touch "$TEST_DATA_DIR/extra.txt"
-
-echo "Running validator on $TEST_DATA_DIR..."
-OUTPUT=$(./20-files-present-and-referenced --batchmode "$TEST_DATA_DIR" 2>&1)
-
-echo "Output:"
-echo "$OUTPUT"
-
-# Verification
-RET=0
-
-if echo "$OUTPUT" | grep -q "ignored.txt"; then
-    echo "FAIL: ignored.txt should have been ignored but was mentioned in 
output"
-    RET=1
-fi
-
-if ! echo "$OUTPUT" | grep -q "extra.txt"; then
-    echo "FAIL: extra.txt should have been mentioned in output but was not"
-    RET=1
-fi
-
-if [ $RET -eq 0 ]; then
-    echo "SUCCESS: gitignore filtering works correctly"
-else
-    echo "FAILURE: gitignore filtering test failed"
+    printf 'ignored.txt\nignored-dir/\nextra.txt\n!extra.txt\n' > 
"$TEST_DATA_DIR/.gitignore"
+    touch "$TEST_DATA_DIR/ignored.txt" "$TEST_DATA_DIR/extra.txt"
+    mkdir "$TEST_DATA_DIR/ignored-dir"
+    touch "$TEST_DATA_DIR/ignored-dir/file"
+
+    echo "Testing .gitignore with $layout checkout"
+    OUTPUT=$("$VALIDATOR" --batchmode "$TEST_DATA_DIR" 2>&1)
+    assert_ignored ignored.txt
+    assert_ignored ignored-dir
+    assert_mentioned extra.txt
+
+    # No root .gitignore is needed for repository-local excludes.
+    rm "$TEST_DATA_DIR/.gitignore"
+    EXCLUDE=$(git -C "$TEST_DATA_DIR" rev-parse --path-format=absolute 
--git-path info/exclude)
+    printf 'ignored.txt\nignored-dir/\n' >> "$EXCLUDE"
+    echo "Testing info/exclude with $layout checkout"
+    OUTPUT=$("$VALIDATOR" --batchmode "$TEST_DATA_DIR" 2>&1)
+    assert_ignored ignored.txt
+    assert_ignored ignored-dir
+    assert_mentioned extra.txt
+
+    # Global ignore rules must work without a root .gitignore too.
+    printf 'global-ignored.txt\n' > "$TEST_ROOT/global-ignore"
+    git -C "$TEST_DATA_DIR" config core.excludesFile "$TEST_ROOT/global-ignore"
+    touch "$TEST_DATA_DIR/global-ignored.txt"
+    OUTPUT=$("$VALIDATOR" --batchmode "$TEST_DATA_DIR" 2>&1)
+    assert_ignored global-ignored.txt
+
+    # An ignored, untracked source required by the spec is still an error.
+    git -C "$TEST_DATA_DIR" rm -q --cached test.tar.gz
+    printf 'test.tar.gz\n' >> "$EXCLUDE"
+    if OUTPUT=$("$VALIDATOR" --batchmode "$TEST_DATA_DIR" 2>&1); then
+        fail "ignored required source should fail validation"
+    fi
+    git -C "$TEST_DATA_DIR" add -f test.tar.gz
+
+done
+
+# Provide the validator's external tools, but deliberately omit Git.
+mkdir "$TEST_ROOT/bin"
+for tool in bash dirname perl mktemp uname uname.bin sed grep sort rm find cat 
touch cpio patch unzip xmllint diff cmp; do
+    if TOOL_PATH=$(command -v "$tool"); then
+        ln -s "$TOOL_PATH" "$TEST_ROOT/bin/$tool"
+    fi
+done
+
+echo "Testing fallback without Git"
+OUTPUT=$(PATH="$TEST_ROOT/bin" "$VALIDATOR" --batchmode "$TEST_DATA_DIR" 2>&1)
+assert_mentioned ignored.txt
+assert_mentioned ignored-dir
+assert_mentioned extra.txt
+if grep -Eq 'command not found|No such file or directory' <<< "$OUTPUT"; then
+    fail "fallback should not invoke missing commands"
 fi
 
-exit $RET
+echo "SUCCESS: Git ignore handling works with both checkout layouts and 
without Git"

Reply via email to