-
Notifications
You must be signed in to change notification settings - Fork 216
rules_deb produces invalid Files- and Checksum-sections #659
Copy link
Copy link
Closed
Labels
P2An issue that should be worked on when time is availableAn issue that should be worked on when time is availablebug
Description
Per https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-files, Files (and Checksum-XX)-sections must have the first line empty, ex:
Files:
c6f698f19f2a2aa07dbb9bbda90a2754 571925 example_1.2.orig.tar.gz
Yet rules_deb produces:
Files: c6f698f19f2a2aa07dbb9bbda90a2754 571925 example_1.2.orig.tar.gz
The relevant code does try to do the right thing when generating the fields
rules_pkg/pkg/private/deb/make_deb.py
Lines 299 to 307 in 547077f
| MakeDebianControlField( | |
| 'Files', '\n ' + ' '.join( | |
| [checksums['md5'], debsize, section, priority, deb_basename])), | |
| MakeDebianControlField( | |
| 'Checksums-Sha1', | |
| '\n ' + ' '.join([checksums['sha1'], debsize, deb_basename])), | |
| MakeDebianControlField( | |
| 'Checksums-Sha256', | |
| '\n ' + ' '.join([checksums['sha256'], debsize, deb_basename])) |
But MakeDebianControlField() promptly strips it away
rules_pkg/pkg/private/deb/make_deb.py
Lines 134 to 138 in 547077f
| value = value.rstrip() | |
| if not is_multiline: | |
| value = value.strip() | |
| if '\n' in value: | |
| raise ValueError( |
A trivial fix could be to write out Files:\n " + " ".join([...]) and skip calling MakeDebianControlField()?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2An issue that should be worked on when time is availableAn issue that should be worked on when time is availablebug