- The previous "echo $0" got actually expanded to the temporary
build-time script name, something like /var/tmp/rpm-tmp.UtGhG1,
which isn't what we're interested in, and depends on rpm
configuration so can easily cause false positives. Just use
%{name}-%{version} to get stable content.
(cherry picked from commit
9e918abb4c6d577f3aae2a1a1abd0f4e67f2d151)
mkdir -p $RPM_BUILD_ROOT/foo
cat << EOF >> $RPM_BUILD_ROOT/foo/hello
#!/bin/sh
-echo $0
+echo %{name}-%{version}
EOF
cd $RPM_BUILD_ROOT/foo
4 /foo/hello-bar
4 /foo/hello-foo
4 /foo/hello-world
-78
+58
1
],
[])