Almost every free software license requires distributors to include a copy of the license when they distribute the software. Unfortunately, it can be difficult to arrange this with fpm-generated packages. I've run into this most often converting Python packages to .rpms and .debs: most Python packages include the license with their source, but don't install it as part of the install process. And it can be difficult to add if you're starting from fpm -s python -t deb foopkg.
It would help out a lot with license compliance if there was some easy way to add a license file to the generated package for cases like this. I can think of at least a couple different ways it might be implemented:
--license FILENAME switch that adds the file to the right place in the generated package; e.g., /usr/share/doc/packagename/LICENSE.--doc switch to add any number of arbitrary documentation files to the package.fpm -s python -t deb foopkg LICENSE=/usr/share/doc/foopkg/LICENSE to build foopkg normally, then add the LICENSE file to it at the designated path. This would require a little more work for the user to figure out what goes where, but it would be most flexible.I'm sure there are other possibilities I haven't thought of, too. I would be interested in working on this if there's agreement on how it should look. Thanks for considering it.
There already is a --license flag, although it just sets the name of the license. Pretty much all FOSS operating systems include a standard licenses package which contains the license text for almost all open source licenses. Unless you need a custom license type (which doesn't sound like it since you mention FOSS), there is no need to include the license file itself.
lintian does flag a deb from fpm as not having a copyright file. a --copyright FILE would be useful for people who care about warning/error messages or those whose license is complicated. You do have to dig to find out how to format that file.
That sounds like more Debian policy getting in the way of just building packages. I get that sometimes people want to follow policy but then there are build systems designed for that in the first place. It seems like there is lots of issues recently to try and get FPM to follow/pass Debian policy checks when one of the project goals is "a simple way to create packages without all the bullshit". There is also the goal of supporting building on as many platforms as possible, and Lintian is only available on Linux. I'm pretty opinionated on this though.
@hatt - understood. I've cautioned my users (not that many) that if they need to build debian packages _and_ if they care about Debian Policy then they shouldn't use fpm. Is that a + sign or a - sign for future fpm adoption?
I don't really care about OSS politics - Interesting in some abstract way but irrelevant to me like most PC talk. I'm only commenting on this issue as a courtesy to fpm developers and users. . If I cared enough, I could script a deb without fpm's help. It's not rocket science.
Feel free to close this issue.
Honestly, I'm not sure. I think it's good to support users to do what the core task is: build packages simply, but I don't know if pandering to policies really helps there. Anyone doing Lintian-compliant packages likely has a full Debian build system already, so I guess if there was a PR for it then great, but otherwise I don't really see the point in putting effort into it.
Anyone on Linux or OSX with a Ruby and the ability to gem install fpm already has the bare tools to not need fpm. (does fpm OSX require xCode?) I don't use fpm on OSX and Windows either and I gather I shouldn't use on Linux anytime soon unless I fix fpm with a PR. Low priority for me. Tis the way the world works. Thanks for responding @hatt
Regarding license files, what doesn't work today? Packaging a gem to a deb,
for example, should include all the files from that gem including any
license file. Fpm will also copy the name of the license from that gem into
the deb license field in the package metadata.
If there's something I can help with, I will try. I haven't seen myself
packages missing license file content that otherwise should have had them
-- I think I am lost?
On Sunday, April 10, 2016, Cecil Coupe [email protected] wrote:
Anyone on Linux or OSX with a Ruby and the ability to gem install fpm
already has the bare tools to not need fpm. (does fpm OSX require xCode?) I
don't use fpm on OSX and Windows either and I gather I shouldn't use on
Linux anytime soon unless I fix fpm with a PR. Low priority for me. Tis the
way the world works. Thanks for responding @hatt https://github.com/hatt—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/jordansissel/fpm/issues/1045#issuecomment-208161522
@jordansissel The original request, and mine was a way to get a copyright file into a .deb. I'm packing a dir to deb and I do have a license in the dir. deb config settings are the issue. lintian thinks a missing copyright file is an error but everything works fine anyway.
Edit: the .deb installs fine without a copyright file.
@ccoupe In my experience, lintian errors are largely meaningless with respect to successfully deploying a package. However, my experience is not all-encompassing ;)
So, let's figure out what's causing you troubles. Are you running lintian manually? Or are you installing a package in a way that runs lintian and fails?
I agree that Lintian is noisy. The deb that fpm builds Works. The app installs. I don't have a problem to solve unless I really cared about the copyright file or Ubuntu and friends refuse the deb -that would be a problem, but unlikely to occur. @brettcs was the original poster. I agreed with him. It would nice if fpm could do that some day. --deb-copyright FILE? It's a feature request.
One of my users complained about my deb email address being flagged by Lintian and yes it was incorrect, so I fixed it and saw that it also complained about copyright missing and when I couldn't find a option in fpm I thought I ask for one and @brettcs already had.
My debs are fine for my project.
Thanks for the details. I am in favor of the flag as proposed. ❤️
On Monday, April 11, 2016, Cecil Coupe [email protected] wrote:
I agree that Lintian is noisy. The deb that fpm builds Works. The app
installs. I don't have a problem to solve unless I really cared about the
copyright file or Ubuntu and friends refuse the deb -that would be a
problem, but unlikely to occur. @brettcs https://github.com/brettcs was
the original poster. I agreed with him. It would nice if fpm could do that
some day. --deb-copyright FILE? It's a feature request.One of my users complained about my deb email address being flagged by
Lintian and yes it was incorrect, so I fixed it and saw that it also
complained about copyright missing and when I couldn't find a option in fpm
I thought I ask for one and @brettcs https://github.com/brettcs already
had.My debs are fine for my project.
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/jordansissel/fpm/issues/1045#issuecomment-208547200
Could this be solved by allowing a directory to be specified when using --deb-meta-file?
Most helpful comment
lintian does flag a deb from fpm as not having a copyright file. a
--copyright FILEwould be useful for people who care about warning/error messages or those whose license is complicated. You do have to dig to find out how to format that file.