Systemd.spec's %autosetup not adding all patches

Greetings all,

I’m trying to modify the .spec package of systemd. Modifying line 219 to add Patch5002: seems to do nothing when I run osc build standard x86_64. The file was added and seemingly used in the initial run:

[    3s] + /usr/lib/rpm/rpmuncompress /home/abuild/rpmbuild/SOURCES/0009-pid1-handle-console-specificities-weirdness-for-s390.patch
[    3s] + /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
[    3s] + /usr/lib/rpm/rpmuncompress /home/abuild/rpmbuild/SOURCES/5000-core-manager-run-generators-directly-when-we-are-in-.patch
[    3s] + /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
[    3s] + /usr/lib/rpm/rpmuncompress /home/abuild/rpmbuild/SOURCES/5001-Revert-core-propagate-stop-too-if-restart-is-issued.patch
[    3s] + /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
[    3s] + /usr/lib/rpm/rpmuncompress /home/abuild/rpmbuild/SOURCES/5002-fix-virt-manager-connection.patch
[    3s] + /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
[    3s] + RPM_EC=0
[    3s] ++ jobs -p

However running osc buildlog standard x86_64 > log.log shows something completely different:

[   43s] + /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
[   43s] + /usr/lib/rpm/rpmuncompress /home/abuild/rpmbuild/SOURCES/0001-conf-parser-introduce-early-drop-ins.patch
[   43s] + /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
[   43s] + /usr/lib/rpm/rpmuncompress /home/abuild/rpmbuild/SOURCES/0009-pid1-handle-console-specificities-weirdness-for-s390.patch
[   43s] + /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
[   43s] + /usr/lib/rpm/rpmuncompress /home/abuild/rpmbuild/SOURCES/5000-core-manager-run-generators-directly-when-we-are-in-.patch
[   43s] + /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
[   43s] + /usr/lib/rpm/rpmuncompress /home/abuild/rpmbuild/SOURCES/5001-Revert-core-propagate-stop-too-if-restart-is-issued.patch
[   43s] + /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
[   43s] + RPM_EC=0
[   43s] ++ jobs -p

I’m trying to apply an upstream PR which affects virt-manager. However, if the log file produced shows that my patch was excluded, even though it was properly inserted into the .spec file and passes patch --dry-run -p1, I’m not sure what I can do.

@asudem Hi add the -p1 eg %autosetup -p1.

Hmmm, line 650 includes the -p1 flag as %autosetup -p1 -n systemd-v%{version}%{archive_version}. I’ve committed to OBS to see what happens, but I may just be seeing a bad log file generated by osc buildlog standard x86_64?

I’ll see what the obs logs actually end up revealing.

@asudem it should work without…

Ah, I’ve encountered a problem I forgot about. Branching on OBS with patches is for pushing to the origin branch, no actual packages are created, so I can’t even install the branch I made for testing purposes with opi. Ah well, guess I’m gonna have to live without my virtual machine for a bit (requires tpm passthrough which I cannot access currently).

@asudem just download them either from the webui or via osc getbinaries and test?

Getting the following error no binaries found: Either the package systemd does not exist or no binaries have been built. even though the rpm files do exist at /var/tmp/build-root/standard-x86_64/home/abuild/rpmbuild/RPMS/x86_64/ after osc build standard x86_64

EDIT: Ah, they were still processing on obs, lol

Ah it appears that 28035 wasn’t correct and the change has been reverted in 28000, which obs is now reflecting as a patch!

Interestingly, trying to apply a local patch to MozillaFirefox, I am encountering the same error as the original post. I have applied the patch in the spec file, and the console output and the log output are different! My patch is omitted!