Bug 2492128

Summary: rpmuncompress foo-ver.gem produces foo-ver..gemspec instead of foo-ver.gemspec
Product: [Fedora] Fedora Reporter: Mamoru TASAKA <mtasaka>
Component: rpmAssignee: Panu Matilainen <pmatilai>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: high    
Version: rawhideCC: igor.raits, mdomonko, packaging-team-maint, pmatilai, vondruch
Target Milestone: ---Flags: fedora-admin-xmlrpc: mirror+
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: 6.0.91-2 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2026-06-25 03:25:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Mamoru TASAKA 2026-06-24 10:05:34 UTC
On rawhide rebuilding rubygem-atk fails:

https://koschei.fedoraproject.org/package/rubygem-atk?collection=f45
https://koji.fedoraproject.org/koji/taskinfo?taskID=146989377

```
+ cd atk-4.3.6
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ mv ../atk-4.3.6.gemspec .
mv: cannot stat '../atk-4.3.6.gemspec': No such file or directory
```

Checking buildroot shows there is actually "atk-4.3.6..gemspec" file:

```
<mock-chroot> sh-5.3# ls -1 /builddir/build/BUILD/rubygem-atk-4.3.4-build/
SPECPARTS
atk-4.3.4
atk-4.3.4..gemspec
rpmbuild.env
```

Most likely this is because of the following change:
https://github.com/rpm-software-management/rpm/pull/4113/changes/b8b54f92c65bca7bfdd80c3ecf717d5c48b02e91

rstrlcpy implemention puts the sentinel null character, while std::string(bn, nvlen); copies the string bn with the "length" of nvlen.

rpm-6.0.91-1.fc45.x86_64
rubygem-atk-4.3.6-1.fc45.src

Reproducible: Always

Comment 1 Panu Matilainen 2026-06-24 10:52:27 UTC
Oops. Thanks for the report, will fix ASAP. 

This is apparently one of the things with zero tests still, which is why such fallout happens.

Comment 2 Panu Matilainen 2026-06-24 12:54:21 UTC
Fix being built in https://koji.fedoraproject.org/koji/taskinfo?taskID=146992055

Comment 4 Mamoru TASAKA 2026-06-24 13:41:12 UTC
Actually -2 seems to fix this issue, thank you.

Comment 5 Mamoru TASAKA 2026-06-25 03:25:04 UTC
Marking this as fixed, thank you.