Skip to content

Conversation

@nomnombtc
Copy link
Contributor

@nomnombtc nomnombtc commented Aug 24, 2016

This creates a new variable DIST_CONTRIB in Makefile.am and adds it to EXTRA_DIST.

I included a few useful things like contrib/debian subdir (contains manpages, .desktop file), contrib/rpm subdir (contains .spec file to build rpms), contrib/init subdir (contains things like systemd startup files) and the *.bash-completion files.

Reason is that many packagers just use the (unsigned) tarball from the github release page, as it contains the full contrib folder including manpages. With this change the release tarball created by
make dist contains most of those files too, so packagers can use this one instead. See also #6753

@laanwj
Copy link
Member

laanwj commented Aug 25, 2016

This reminds me, we should move the manpages from contrib/debian to a more general directory, and make make install install them, like a proper unix package.

@nomnombtc
Copy link
Contributor Author

Indeed this would make sense. I looked into how other projects handle the manpages.
And it seems most of the stuff gets automatically handled by automake, just need to define a few things.

So I got inspired by how gnome does it: https://git.gnome.org/browse/gnome-shell/tree/Makefile.am
and played a bit around in trial&error mode. And came up with this: https://github.com/nomnombtc/bitcoin/commits/man_automake

But I wasn't sure about the license of the debian manpages, only one is MIT the others are GPL.
Then I found this program called help2man, which creates manpages from running a binary with -help option and so I just created a few manpages on my own.

A positive side effect of all of this is that those manpages now also end up in the tarball that gets created by make dist - which was my goal with this PR we are commenting in here ...

If you think this is the correct way of doing it and you can clarify if the debian manpages can be included because of the GPL license, we could use this for 7626.

@laanwj
Copy link
Member

laanwj commented Aug 26, 2016

Full diff can be seen here: master...nomnombtc:man_automake

Looks good to me, concept ACK.

The man page licensing issue came up before: #1040 (comment) . I don't have an answer there. I do not know what the licensing rules are for documentation, but I'd feel better to have them under the same license as Bitcoin Core itself.

We could ask the authors if they agree with re-licensing.

Good idea to auto-generate the man pages! that will prevent them from being eternally out of date. The installation step looks ok to me.

  • As gen_manpages.sh is a tool to be manually executed by developers in a suitable environment, please put it in contrib/devtools, the scripts to update translations and such are there too.

@maflcko
Copy link
Member

maflcko commented Aug 26, 2016

I don't understand why licensing is an issue with auto generated man pages through help2man. Our help text is MIT licensed and changing the formatting with a program is not a copyrightable action. So changing from MIT to GPL exclusively is not even possible.

@maflcko
Copy link
Member

maflcko commented Aug 26, 2016

Concept ACK

@laanwj
Copy link
Member

laanwj commented Aug 26, 2016

I don't understand why licensing is an issue with auto generated man pages through help2man. Our help text is MIT licensed and changing the formatting with a program is not a copyrightable action

As I understood it's a problem with the current manpages in contrib/debian, not the proposed auto-generated ones.

@maflcko
Copy link
Member

maflcko commented Aug 26, 2016

Ok, but we would just delete the current manpages in contrib/debian and (maybe) replace them with the autogenerated ones? GPL doesn't forbid deleting.

@laanwj
Copy link
Member

laanwj commented Aug 26, 2016

Sure, if there is nothing in those man pages that we want to keep, then we can save ourselves the work of trying to get them re-licensed. That's a valid option.

Makefile.am Outdated

DIST_DOCS = $(wildcard doc/*.md) $(wildcard doc/release-notes/*.md)
DIST_CONTRIB = $(wildcard $(top_srcdir)/contrib/*.bash-completion) \
$(top_srcdir)/contrib/debian \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that the manpages have been moved out of debian, is there still a reason to include the debian directory here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is still a bitcoin-qt.desktop file and a bitcoin-qt.protocol file in there (makes it open bitcoin-qt when clicking a bitcoin: url in kde apps like kmail for example) but I could live without it... Problem is still apparently everything in debian/ is GPL2 according to the copyright file in that folder:

Files: debian/*
Copyright: 2010-2011, Jonas Smedegaard [email protected]
2011, Matt Corallo [email protected]
License: GPL-2+

So I guess it makes sense to remove it for now, until someone has a better idea because of the licensing.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, yes, the licensing is still annoying.

Would be easy enough to write our own desktop and protocol file and install them, though OTOH I suppose those things are quite distro specific, at least where to install them.

Out of scope for this pull at least.

@theuni
Copy link
Member

theuni commented Sep 29, 2016

Concept ACK. Please list them rather than using wildcards, though. That ensures that local files don't cause unexpected results.

I know doc already uses it above, but let's not make it worse here.

@nomnombtc
Copy link
Contributor Author

@theuni

Ok no problem, I've added a commit that removes the wildcard.

@fanquake
Copy link
Member

fanquake commented Nov 6, 2016

Concept ACK

@maflcko
Copy link
Member

maflcko commented Nov 6, 2016

Hmm, maybe squash the three commits into one?

Concept ACK f6c6c6b

laanwj added a commit that referenced this pull request Nov 7, 2016
…om contrib

1ee6f91 new var DIST_CONTRIB adds useful things for packagers from contrib/ to EXTRA_DIST (nomnombtc)
@laanwj
Copy link
Member

laanwj commented Nov 7, 2016

Merged (and squashed) via 078900d

@laanwj laanwj closed this Nov 7, 2016
@nomnombtc nomnombtc deleted the DIST_CONTRIB branch December 13, 2016 22:16
codablock pushed a commit to codablock/dash that referenced this pull request Jan 13, 2018
…gers from contrib

1ee6f91 new var DIST_CONTRIB adds useful things for packagers from contrib/ to EXTRA_DIST (nomnombtc)
andvgal pushed a commit to energicryptocurrency/gen2-energi that referenced this pull request Jan 6, 2019
…gers from contrib

1ee6f91 new var DIST_CONTRIB adds useful things for packagers from contrib/ to EXTRA_DIST (nomnombtc)
CryptoCentric pushed a commit to absolute-community/absolute that referenced this pull request Feb 15, 2019
…gers from contrib

1ee6f91 new var DIST_CONTRIB adds useful things for packagers from contrib/ to EXTRA_DIST (nomnombtc)
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants