Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.deb packaging issues #327

Closed
antelle opened this issue Apr 17, 2016 · 12 comments · May be fixed by qcif/data-curator#563
Closed

.deb packaging issues #327

antelle opened this issue Apr 17, 2016 · 12 comments · May be fixed by qcif/data-curator#563

Comments

@antelle
Copy link

antelle commented Apr 17, 2016

Produced .deb-files have some issues:

1: permissions (I get 0 instead of root/root in permissions):

tar -tvf data.tar.xz 
drwx------  0 0      0           0 Apr 17 09:19 ./
drwxr-xr-x  0 0      0           0 Apr 17 09:19 ./opt/

I'm building on Mac, this may be an issue. Currently I'm using patched grunt-contrib-deb for this, and it can create debs with correct permissinos on each platform. You may create something like this...

2: control file

Package: keeweb
Version: 1.1.2-3413983
License: MIT
Vendor: [email protected]   <-------------- machine name?? seems there's no option to change it
Architecture: amd64
Maintainer: Antelle <[email protected]>
Installed-Size: 104670 
Section: default
Priority: extra
Homepage: https://keeweb.info
<------------------- Description must be on two lines (see below)
Description: Free cross-platform password manager compatible with KeePass

Correct description:

Description: (short description, if provided, or empty line)
 bla-bla-bla <------- note the space at the beginning!
@develar
Copy link
Member

develar commented Apr 17, 2016

We use https://github.com/jordansissel/fpm. Do you use latest 1.5?

@develar
Copy link
Member

develar commented Apr 17, 2016

Not quite understand why description is not correct.

@antelle
Copy link
Author

antelle commented Apr 17, 2016

Do you use latest 1.5?

Yes, I've just installed it for this.

$ fpm --version
1.5.0

Description: https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Description

Description: <single line synopsis>
         <extended description over several lines>

Some distros (ubuntu?) don't show description if it's just synopsis (see this comment).

@develar
Copy link
Member

develar commented Apr 17, 2016

Please file issues to https://github.com/jordansissel/fpm/issues (and mention this ticket, so, I can subscribe). If you will not get answers/solution in a 2 days, it will be fixed on our side. Maybe we will stop to use fpm and will use other solution.

@develar
Copy link
Member

develar commented Apr 17, 2016

@antelle Maybe I will reuse code from your package. Because in this case most of our users will not need to install ruby&gems.

@develar
Copy link
Member

develar commented Apr 17, 2016

@antelle Got about description. fpm cannot fix it due to backward compatibility, I guess. I will fix it on our side if Mint/Ubuntu will show correctly new format of description.

@antelle
Copy link
Author

antelle commented Apr 17, 2016

According to fpm wiki, we can specify vendor:
--vendor VENDOR (optional) vendor name for this package
Regarding description (I'm not sure if this will work, I'll check later):

--description DESCRIPTION     Add a description for this package. You can include '
    ' sequences to indicate newline breaks. (default: "no description")

Permissions:

--[no-]deb-use-file-permissions (deb only) Use existing file permissions when defining ownership and modes
--deb-user USER               (deb only) The owner of files in this package (default: "root")
--deb-group GROUP             (deb only) The group owner of files in this package (default: "root")

So I think this could be fixed without making changes to fpm.

Maybe I will reuse code from your package

I would expect from electron-builder to build RPM's as well. So I'd stick with fpm because it's capable to build them, maybe you will consider adding an RPM option in future as well.

@develar
Copy link
Member

develar commented Apr 17, 2016

@antelle Description in progress, permissions — to investigate (as you see, deb-user/deb-group defaults to root already).

Ability to pass any flag to fpm will be added as well.

@antelle
Copy link
Author

antelle commented Apr 17, 2016

I think the problem with permissions is with 'deb-use-file-permissions', so it could be getting permissions from OS which is incorrect on mac.

Ability to pass any flag to fpm will be added as well.

👍

@develar
Copy link
Member

develar commented Apr 17, 2016

On install no permissions issues:

develar@ubuntu:/opt$ ls -l
total 8
drwxr-xr-x 4 root root 4096 Apr 17 08:20 Onshape
drwxr-xr-x 4 root root 4096 Apr 17 13:49 TestApp

@develar
Copy link
Member

develar commented Apr 17, 2016

Description. You are right — thanks. Mint & Ubuntu render it a bit different but in both cases better than before.

Option synopsis added.

develar added a commit to develar/electron-builder that referenced this issue Apr 17, 2016
develar added a commit to develar/electron-builder that referenced this issue Apr 17, 2016
develar added a commit to develar/electron-builder that referenced this issue Apr 17, 2016
@develar
Copy link
Member

develar commented Apr 17, 2016

@antelle You can pass most of the fpm flags using build.linux field fpm: ['--flag', 'value', '--flag2', 'value2'] I don't test it, bit should work. Feel free to open new issue if permissions issue is still actual (as I checked, on install permissions are ok).

fpm is not documented — just to experiment (it is electron-builder task to pass correct flags).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants