Installed-Size in deb control file
jault3 opened this issue · 4 comments
I typically work on a Mac and just use the OS X builds that goxc generates, but recently a customer noticed that the .deb files goxc generates are "untrusted". This is due to the lack of an Installed-Size
field in the control file. https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Installed-Size.
It's not a mandatory field it looks like, but it does generate a warning when trying to install it through the Ubuntu Software Center as show in this image.
Could this be added by goxc? I can't really predict this value as it is an estimate of the binary size and would need to be done dynamically.
Current Settings
I am not specifying any settings in my .goxc.json
file for the deb task but I do have a debian/control
file
Maintainer: Catalyze <support@catalyze.io>
Description: Catalyze CLI
Installed-Size: 1
Package: catalyze
Source: catalyze
Architecture: any
Section: user/utils
Priority: optional
The 1
was just testing. It does not make it into the generated control file. Here is what I get when I look at the generated control file
$ goxc
... trimmed this. its too long ...
$ ar -vx builds/3.0.0/catalyze_3.0.0_amd64.deb
x - debian-binary
x - control.tar.gz
x - data.tar.gz
$ tar xvzf control.tar.gz
x control
$ cat control
Package: catalyze
Priority: optional
Maintainer: Catalyze <support@catalyze.io>
Section: user/utils
Version: 3.0.0
Architecture: amd64
Description: Catalyze CLI
by the way, great work on goxc. It's such a useful tool and has saved me tons of dev time!
FWIW I modified the deb file on ubuntu 14.04 directly
mkdir temp
dpkg-deb -R catalyze_3.0.0_amd64.deb temp
vim temp/DEBIAN/control # I added the line 'Installed-Size: 10'
dpkg-deb -R catalyze_3.0.0_amd64.deb temp
tried reinstalling the deb and got this error
the fix was to run that very last command as root to fix file permissions
sudo dpkg-deb -R catalyze_3.0.0_amd64.deb temp
Not sure if that is something that will happen if Installed-Size is added to goxc but I can help debug if you'd like.
Turns out that if you do specify the Installed-Size
field, the file permissions are correct. I have a PR for the debber repo debber/debber-v0.3#1 if you get a chance.
Hi there, thanks for coming up with a solution.
I think the debber change looks good - I'll check more thoroughly and reply in that repo
Fixed in debber/debber-v0.3#1