Bug 1221270 - rpm package doesn't provide rpm2archive command
Summary: rpm package doesn't provide rpm2archive command
Status: REOPENED
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Other (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Michael Schröder
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-12 08:37 UTC by Andreas Schneider
Modified: 2024-03-14 12:30 UTC (History)
5 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
piper-voices-1.0.0-0.nosrc.rpm (10.10 KB, application/octet-stream)
2024-03-12 14:44 UTC, Andreas Schneider
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Schneider 2024-03-12 08:37:21 UTC
It looks like rpmlint fails to extract a source rpm which is bigger than 4GB?

[  274s] RPMLINT report:                                                                  
[  274s] ===============                                                                  
[  312s] (none): E: fatal error while reading //home/abuild/rpmbuild/SRPMS/piper-voices-1.0.0-0.src.rpm: [Errno 2] No such file or directory: '/tmp/rpmlint.piper-voices-1.0.0-0.src.
rpm.83mfaz86/piper-voices.spec'                                                           
[  312s] Traceback (most recent call last):                                               
[  312s]   File "/opt/testing/bin/rpmlint.real", line 8, in <module>                      
[  312s]     sys.exit(lint())                                                             
[  312s]              ^^^^^^                                                              
[  312s]   File "./rpmlint/cli.py", line 184, in lint                                     
[  312s]   File "./rpmlint/lint.py", line 123, in run                                     
[  312s]   File "./rpmlint/lint.py", line 91, in _run                      
[  312s]   File "./rpmlint/lint.py", line 264, in validate_files                          
[  312s]   File "./rpmlint/lint.py", line 290, in validate_file                                                                                                                      
[  312s]   File "./rpmlint/lint.py", line 283, in validate_file                           
[  312s]   File "./rpmlint/lint.py", line 299, in run_checks                                                                                                                         
[  312s]   File "./rpmlint/checks/AbstractCheck.py", line 16, in check                    
[  312s]   File "./rpmlint/checks/SpecCheck.py", line 179, in check_source                
[  312s]   File "./rpmlint/checks/SpecCheck.py", line 187, in check_spec                  
[  312s]   File "./rpmlint/checks/SpecCheck.py", line 229, in _check_non_utf8_spec_file                                                                                              
[  312s]   File "./rpmlint/pkg.py", line 105, in is_utf8                                  
[  312s] FileNotFoundError: [Errno 2] No such file or directory: '/tmp/rpmlint.piper-voices-1.0.0-0.src.rpm.83mfaz86/piper-voices.spec'


Reproducer (needs git-lfs):

osc co home:gladiac piper-voices
cd 'home:gladiac/piper-voices/'
osc service manualrun
osc build



I wonder if it has issues with source RPMs which are bigger than 4GB:

# unrpm /srv/oscbuild/build-root-openSUSE_Tumbleweed-x86_64/home/abuild/rpmbuild/SRPMS/piper-voices-1.0.0-0.src.rpm
/srv/oscbuild/build-root-openSUSE_Tumbleweed-x86_64/home/abuild/rpmbuild/SRPMS/piper-voices-1.0.0-0.src.rpm:    files over 4GB not supported by cpio, use rpm2archive instead
cpio: premature end of archive
Comment 1 Andreas Schneider 2024-03-12 09:37:49 UTC
Maybe it is something else. I've tried with:

Index: piper-voices.spec
===================================================================
--- piper-voices.spec   (revision 1)
+++ piper-voices.spec   (working copy)
@@ -24,7 +24,9 @@
 URL:            https://huggingface.co/rhasspy/piper-voices/
 # Created with: osc service manualrun
 # Note that you need git-lfs installed to create the tarball
-Source0:        piper-voices-1.0.0.tar.zstd
+Source0:        piper-voices-1.0.0.tar.zst
+Source1:        README.suse.md
+NoSource:       0
 BuildArch:      noarch
 
 BuildRequires:  rsync
Index: README.suse.md
===================================================================
--- README.suse.md      (revision 0)
+++ README.suse.md      (revision 0)
@@ -0,0 +1,4 @@
+# Piper TTS Voices
+
+The source package doesn't include the piper-voices-x.x.x.tar.zst tarball as it
+is to big.



and it still fails, the nosrc.rpm is only 11kb.
Comment 2 Andreas Schneider 2024-03-12 13:29:42 UTC
Hmm

# rpm -qplv piper-voices-1.0.0-0.nosrc.rpm 
-rw-r--r--    1 root     root                      111 Mar 12 10:19 README.suse.md
-rw-r--r--    1 root     root               6503433009 Mar 12 09:33 piper-voices-1.0.0.tar.zst
-rw-r--r--    1 root     root                     2668 Mar 12 13:56 piper-voices.spec

-rw-r--r-- 1 399 399 11K Mar 12 13:56 piper-voices-1.0.0-0.nosrc.rpm
Comment 4 Andreas Schneider 2024-03-12 14:44:24 UTC
Created attachment 873445 [details]
piper-voices-1.0.0-0.nosrc.rpm
Comment 5 Daniel Garcia 2024-03-13 10:45:04 UTC
This will work only with rpm2archive. It's currently supported by rpmlint [1] but the rpm2archive command should be available, and right now it's not provided by the rpm package in openSUSE [2].

[1] https://github.com/rpm-software-management/rpmlint/blob/main/rpmlint/pkg.py#L600-L606
[2] https://build.opensuse.org/package/view_file/Base:System/rpm/rpm.spec?expand=1
Comment 6 Michael Schröder 2024-03-14 10:33:07 UTC
rpm2archive is a rpm build option that we don't enable.
Comment 7 Marcus Rückert 2024-03-14 10:38:18 UTC
and not enabling it breaks rpmlint's handling of large source rpms. so it would be really helpful _if_ you could enable it.
Comment 8 Marcus Rückert 2024-03-14 10:39:10 UTC
alternatively you can propose another option for rpmlint to handle those files.

a sample nosrc.rpm is attached to the bug.
Comment 9 Marcus Rückert 2024-03-14 12:30:26 UTC
the bsdtar workaround, that I used for rpm2docserv would not work here.

```
bsdtar xf ../piper-voices-1.0.0-0.nosrc.rpm 
bsdtar: Error opening archive: Unrecognized archive format
```