Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package pcp for openSUSE:Factory checked in 
at 2026-10-08 11:55:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/pcp (Old)
 and      /work/SRC/openSUSE:Factory/.pcp.new.3698736 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "pcp"

Thu Oct  8 11:55:15 2026 rev:80 rq:1382878 version:6.3.8

Changes:
--------
--- /work/SRC/openSUSE:Factory/pcp/pcp.changes  2026-08-09 21:33:38.270699474 
+0200
+++ /work/SRC/openSUSE:Factory/.pcp.new.3698736/pcp.changes     2026-10-08 
11:55:46.325901133 +0200
@@ -1,0 +2,21 @@
+Tue Oct  6 15:06:56 UTC 2026 - Guillaume GARDET <[email protected]>
+
+- Treat 32-bit arm as 32-bit x86 aka disable perl
+  (perl lacks Y2038-safe time_t)
+
+-------------------------------------------------------------------
+Sun Sep 27 19:13:49 UTC 2026 - Martin Schreiner <[email protected]>
+
+- Fix bsc#1267897, systemd-tmpfiles "Duplicate line for path" warnings
+  logged at every boot and package update since the /var/lib/pcp relocation:
+  * pcp-stash-relocate.sh: add --defer-to, so paths already declared
+    by upstream's pcp-reboot-init.conf (/var/log/pcp/*) are no longer
+    emitted in pcp-base-stash.conf, and --prune, which drops every path
+    recreated by a pcp-*-stash.conf snippet from the install-sh
+    generated pcp.conf.
+  * Stop listing /var/lib/pcp/config/pmieconf/dm in base pcp; it
+    belongs to pcp-pmda-dm only.
+  * Fail the build if any path is declared by more than one of the
+    shipped tmpfiles.d files.
+
+-------------------------------------------------------------------

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

Other differences:
------------------
++++++ pcp.spec ++++++
--- /var/tmp/diff_new_pack.2Xo2wr/_old  2026-10-08 11:55:47.705958921 +0200
+++ /var/tmp/diff_new_pack.2Xo2wr/_new  2026-10-08 11:55:47.708959046 +0200
@@ -142,7 +142,7 @@
 %endif
 
 # Perl PMDA bindings need a Y2038-safe Perl (64-bit time_t)
-%ifarch %{ix86}
+%ifarch %{ix86} %{arm}
 %global disable_perl 1
 %global disable_nutcracker 1
 %global disable_snmp 1
@@ -2653,9 +2653,10 @@
 ls -1 %{buildroot}/%{_logconfdir}/ |\
     sed -e 's#^#'%{_logconfdir}'\/#' |\
     grep -E -v 'zeroconf' >pcp-logconf.list
+# pmieconf/dm belongs to pcp-pmda-dm (see pmda-dm.list), not base pcp.
 ls -1 %{buildroot}/%{_ieconfdir}/ |\
     sed -e 's#^#'%{_ieconfdir}'\/#' |\
-    grep -E -v 'zeroconf' >pcp-ieconf.list
+    grep -E -v 'zeroconf|/dm$' >pcp-ieconf.list
 
 # generate full base package file list
 cat base_pmdas.list base_conf.list base_bin.list base_exec.list 
base_bashcomp.list \
@@ -3137,8 +3138,16 @@
 # Required for transactional-update / immutable-OS targets where /var
 # is a separate writable subvolume from the read-only /usr snapshot.
 ###############################################################################
+# Keep the generated snippets disjoint from upstream's tmpfiles.d files:
+# paths declared by pcp-reboot-init.conf are left to it, and paths the
+# snippets recreate are dropped from the install-sh generated pcp.conf.
+# Otherwise systemd-tmpfiles logs 'Duplicate line for path' for each.
+TMPFILES_DEDUP=
+%if !%{disable_systemd}
+TMPFILES_DEDUP="--defer-to %{_tmpfilesdir}/pcp-reboot-init.conf --prune 
%{_tmpfilesdir}/pcp.conf"
+%endif
 install -m 0755 %{SOURCE50} $BACKDIR/pcp-stash-relocate.sh
-$BACKDIR/pcp-stash-relocate.sh \
+$BACKDIR/pcp-stash-relocate.sh $TMPFILES_DEDUP \
     --buildroot   %{buildroot} \
     --legacy-root /var/lib/pcp \
     --legacy-root /var/log/pcp \
@@ -3154,6 +3163,18 @@
     --skip        pcp-logconf \
     --skip        pcp-ieconf
 
+%if !%{disable_systemd}
+# Fail the build if any path is declared by more than one of our
+# tmpfiles.d files; systemd-tmpfiles would warn about it at every boot.
+dups=$(awk '$0 !~ /^[[:space:]]*(#|$)/ { print $2 }' \
+    %{buildroot}%{_tmpfilesdir}/pcp*.conf | sort | uniq -d)
+if [ -n "$dups" ]; then
+    echo "error: duplicate tmpfiles.d paths:" >&2
+    echo "$dups" >&2
+    exit 1
+fi
+%endif
+
 %pre testsuite
 test -d %{_testsdir} || mkdir -p -m 755 %{_testsdir}
 getent group pcpqa >/dev/null || groupadd -r pcpqa

++++++ pcp-stash-relocate.sh ++++++
--- /var/tmp/diff_new_pack.2Xo2wr/_old  2026-10-08 11:55:47.841964616 +0200
+++ /var/tmp/diff_new_pack.2Xo2wr/_new  2026-10-08 11:55:47.844964741 +0200
@@ -47,6 +47,19 @@
 #       --listdir     <path>     # dir containing the *.list files
 #       --tmpfilesdir <path>     # dir where pcp-*-stash.conf files land
 #                                #   (relative to --buildroot)
+#       --defer-to    <file>     # tmpfiles.d file (relative to
+#                                #   --buildroot, repeatable) whose paths
+#                                #   are authoritative: they are not
+#                                #   emitted in any stash snippet
+#       --prune       <file>     # tmpfiles.d file (relative to
+#                                #   --buildroot, repeatable) from which
+#                                #   every path emitted in a stash snippet
+#                                #   is removed afterwards
+#
+# systemd-tmpfiles warns 'Duplicate line for path' whenever two snippets
+# declare the same path. --defer-to and --prune keep the generated
+# snippets disjoint from the tmpfiles.d files upstream PCP installs
+# (pcp-reboot-init.conf, and the install-sh generated pcp.conf).
 
 set -euo pipefail
 
@@ -56,6 +69,8 @@
 LISTDIR=
 TMPFILESDIR=
 SKIP_LISTS=
+DEFER_FILES=()
+PRUNE_FILES=()
 
 die() {
     printf 'pcp-stash-relocate: error: %s\n' "$*" >&2
@@ -70,6 +85,8 @@
         --listdir)     LISTDIR=$2; shift 2 ;;
         --tmpfilesdir) TMPFILESDIR=$2; shift 2 ;;
         --skip)        SKIP_LISTS="$SKIP_LISTS $2"; shift 2 ;;
+        --defer-to)    DEFER_FILES+=("$2"); shift 2 ;;
+        --prune)       PRUNE_FILES+=("$2"); shift 2 ;;
         -h|--help)     sed -n '2,/^# Usage/p' "$0" | sed 's/^# \{0,1\}//'; 
exit 0 ;;
         *)             die "unknown argument: $1" ;;
     esac
@@ -86,6 +103,9 @@
     [ -d "$BUILDROOT$lr" ] || die "legacy root does not exist in buildroot: 
$BUILDROOT$lr"
 done
 [ -d "$LISTDIR" ] || die "listdir does not exist: $LISTDIR"
+for f in ${DEFER_FILES[@]+"${DEFER_FILES[@]}"} 
${PRUNE_FILES[@]+"${PRUNE_FILES[@]}"}; do
+    [ -f "$BUILDROOT$f" ] || die "tmpfiles file does not exist in buildroot: 
$BUILDROOT$f"
+done
 
 mkdir -p "$BUILDROOT$STASH_ROOT"
 mkdir -p "$BUILDROOT$TMPFILESDIR"
@@ -102,6 +122,24 @@
     return 1
 }
 
+# Helper: print the path (2nd field) of every entry in the given
+# tmpfiles.d files, skipping blank lines and comments.
+tmpfiles_paths() {
+    awk '$0 !~ /^[[:space:]]*(#|$)/ { print $2 }' "$@"
+}
+
+# Paths declared by the --defer-to files. Entries for these are not
+# emitted in any stash snippet.
+DEFERRED_PATHS=$(mktemp)
+trap 'rm -f "$DEFERRED_PATHS"' EXIT
+for f in ${DEFER_FILES[@]+"${DEFER_FILES[@]}"}; do
+    tmpfiles_paths "$BUILDROOT$f" >> "$DEFERRED_PATHS"
+done
+
+is_deferred() {
+    grep -Fxq -- "$1" "$DEFERRED_PATHS"
+}
+
 # ---------------------------------------------------------------------------
 # Per-path permission overrides for 'd' (directory) entries.
 #
@@ -121,12 +159,6 @@
 /var/lib/pcp/tmp/pmie        0775 pcp pcp
 /var/lib/pcp/tmp/pmlogger    0775 pcp pcp
 /var/lib/pcp/tmp/pmproxy     0775 pcp pcp
-/var/log/pcp                 0775 pcp pcp
-/var/log/pcp/pmcd            0775 pcp pcp
-/var/log/pcp/pmlogger        0775 pcp pcp
-/var/log/pcp/pmie            0775 pcp pcp
-/var/log/pcp/pmproxy         0775 pcp pcp
-/var/log/pcp/pmfind          0775 pcp pcp
 EOF
 )
 
@@ -208,7 +240,7 @@
     tmpfile_snippet="$BUILDROOT$TMPFILESDIR/pcp-${listname}-stash.conf"
 
     work_dir=$(mktemp -d)
-    trap 'rm -rf "$work_dir"' EXIT
+    trap 'rm -rf "$work_dir" "$DEFERRED_PATHS"' EXIT
 
     files_to_relocate=$work_dir/files     # real files: move to stash
     links_to_remove=$work_dir/links       # symlinks: just delete
@@ -253,7 +285,7 @@
     if [ ! -s "$files_to_relocate" ] && [ ! -s "$links_to_remove" ] \
        && [ ! -s "$dirs_listed" ]; then
         rm -rf "$work_dir"
-        trap - EXIT
+        trap 'rm -f "$DEFERRED_PATHS"' EXIT
         continue
     fi
 
@@ -314,6 +346,7 @@
         # other subpackages (triggering rpmlint's tmpfile-not-in-filelist).
         sort -u "$dirs_listed" | awk '{ print length, $0 }' | sort -n | cut 
-d' ' -f2- | \
         while IFS= read -r d; do
+            is_deferred "$d" && continue
             read -r mode user group <<<"$(lookup_perms "$d")"
             printf 'd %-50s %s %s %s -\n' "$d" "$mode" "$user" "$group"
         done
@@ -323,11 +356,13 @@
             lr=$(match_legacy_root "$path") || continue
             rel=${path#"$lr"/}
             target="$STASH_ROOT/$rel"
+            is_deferred "$path" && continue
             printf 'L+ %-50s - - - - %s\n' "$path" "$target"
         done < "$files_to_relocate"
 
         # Symlinks for previously-shipped symlinks (target preserved).
         while IFS=$'\t' read -r path target; do
+            is_deferred "$path" && continue
             printf 'L+ %-50s - - - - %s\n' "$path" "$target"
         done < "$links_to_remove"
     } > "$tmpfile_snippet"
@@ -387,9 +422,31 @@
     mv "$rewritten" "$listfile"
 
     rm -rf "$work_dir"
-    trap - EXIT
+    trap 'rm -f "$DEFERRED_PATHS"' EXIT
 done
 
+# ---------------------------------------------------------------------------
+# Remove every path declared by a stash snippet from the --prune files.
+# Upstream's install-sh records an L+ entry in $DIST_TMPFILES for each
+# symlink it installs under /var, and those same symlinks are what the
+# stash snippets recreate per subpackage. Keeping both makes
+# systemd-tmpfiles log a 'Duplicate line' warning for each of them.
+# ---------------------------------------------------------------------------
+
+if [ ${#PRUNE_FILES[@]} -gt 0 ]; then
+    stash_paths=$(mktemp)
+    tmpfiles_paths "$BUILDROOT$TMPFILESDIR"/pcp-*-stash.conf | sort -u > 
"$stash_paths"
+    for f in "${PRUNE_FILES[@]}"; do
+        pruned=$(mktemp)
+        awk 'NR == FNR { seen[$0] = 1; next }
+             $0 ~ /^[[:space:]]*(#|$)/ || !($2 in seen)' \
+            "$stash_paths" "$BUILDROOT$f" > "$pruned"
+        cat "$pruned" > "$BUILDROOT$f"
+        rm -f "$pruned"
+    done
+    rm -f "$stash_paths"
+fi
+
 # Note: we deliberately do NOT remove empty directories from the legacy
 # buildroot tree. %ghost and %ghost %dir entries in the rewritten lists
 # still require the path to physically exist in the buildroot, even

Reply via email to