spkrepo
spkrepo copied to clipboard
path too short
After adding new archs to generic arch x64 I get an internal server error when upploading package for x64-7.0.
added archs are
- broadwellnkv2
- broadwellntbap
- epyc7002
- r1000
this results in the package file name:
kiwix.v2.f41890[apollolake-avoton-braswell-broadwell-broadwellnk-broadwellnkv2-broadwellntbap-bromolow-cedarview-denverton-epyc7002-dockerx64-geminilake-grantley-purley-kvmx64-r1000-v1000-x86-x86_64].spk
that has 203 characters.
The database field "path" is limitted to 100 Unicode-Chars and can hold 200 ANSI chars.
A temporary fix would be to enlarge the "path" field in the "build" table (path in "icon" and "screenshot" tables are not affected) - OR at least to limit the filename to the db field length.
A better solution would be to use the generic archs (x64, aarch64, armv7) as file-name for the generic packages. But this needs some redesign, as the publish api does not support this information yet.
As a short fix I will remove broadwellnkv2
from the x64 archs, as there exists no models with this arch yet.
Instead of removing broadwellnkv2
I have removed the archs not available under DSM 7+ (dockerx64, x86, x86_64).
now we can have generic x64 packages for DSM 7 under following condition:
(len(packagename) + len(SPK_REV)) <= 24
before the limit was (len(packagename) + len(SPK_REV)) <= 3
The fix above worked for the kiwix
package, but not for synocli-monitor
.
So the limit above is less than 16.
path enlarged by @publicarray