Skip to content

Packaging for multiple Linux distros#296

Merged
Atheros1 merged 6 commits intomasterfrom
unknown repository
Jul 14, 2013
Merged

Packaging for multiple Linux distros#296
Atheros1 merged 6 commits intomasterfrom
unknown repository

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Jul 12, 2013

Supported formats: deb, RPM, Arch, ebuild, PET, TXZ

The RPM dependency uses the Bitcoin SSL library. Pre-built packages are available at:

http://download.opensuse.org/repositories/home:/motters:/pybitmessage/

Comment thread archpackage/PKGBUILD
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm having a hard time understanding the workflow you intended for this PKGBUILD. As I picture the use of this script, you'd have to get a source tarball somehow, stick it in the same directory as this PKGBUILD, then run this. The PKGBUILD usually gets the source tarball for you though. Plus, I reckon that an arch package should be put in AUR rather than the upstream package (and it already is in AUR with the cleanly-written pybitmessage-git package)... to me one of the main points of arch is to avoid polluting upstream codebases with special packaging.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

The source tarball is generated with arch.sh, and gets put into the archpackage subdirectory of the project. When building with OBS just upload that, plus the PKGBUILD. See https://build.opensuse.org/package/show/home:motters:pybitmessage/pybitmessage-0.3.4

It would be entirely possible to pull the latest code from github, but I assume that if you're distributing source code then it's not a good idea to have it dependent upon a particular hosting service.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ah, ok, I see what your doing. Fair enough. Dependencies look good now. Strictly speaking, gevent is an optional dependency but it's small so I suppose it's fine to make it mandatory. I'm still not totally convinced arch users would tend to use this, but I'm hardly opposed to giving people options! Thanks.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

python2-gevent is now optional. All the packaging files and scripts are generated by a single script called generate.sh, so it's fairly easy to change things without a lot of manual editing.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ah, I forgot...I don't see anywhere this is doing the s|#!/usr/bin/python|#!/usr/bin/python2| fix. Am I just ignoring something obvious here too?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I assume that Arch conforms to the free desktop specification (http://www.freedesktop.org) and so the desktop icons should appear normally.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Is it essential that python2 be used? Does PyBitmessage not run with version 3?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

PyBitmessage has its fair share of python3 incompatible stuff. Old-style
print statements (which are slowly being migrated to logging anyway),
ConfigParser, builtins, Queue, repr, thread, xrange, old-format
exception handling, and probably something that I have missed. It shouldn't
be that much work to make it compatible after the print statements are
converted to logging messages.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

It looks like there's only one instance of #!/usr/bin/python, and that's within src/pyelliptic/README.md. The version of Python within /usr/bin/pybitmessage can be changed though.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Funny, I didn't look where these substitutions were occurring... I only saw that they existed. src/bitmessagemain.py is already pointing to /usr/bin/env python2.7, so that's fine. The other instances of "/usr/bin/env python" should be deleted anyway, since they are never to be executed. /usr/bin/pybitmessage indeed needs to be fixed to be python2. Otherwise the package looks like it should do.

Comment thread arch.sh
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

At first this comment recommended using dirname to enforce the directory in which the script operates, but on second thought I don't see any major reason to do that. This is fine, but maybe it's worth adding a usage comment that includes the stipulation of where the cwd needs to be upon invocation.

@Atheros1
Copy link
Copy Markdown
Contributor

I tried to manually merge this but I'm not sure what is correct. In the Makefile, one side of the conflict makes heavy use of {DESTDIR} and the other makes heavy use of {DEST_APP} and {DEST_SHARE}.

@ghost
Copy link
Copy Markdown
Author

ghost commented Jul 14, 2013

I think it's safe to overwrite the older Makefile with the newer one. An advantage is that the Makefile and the other packaging scripts and files are all generated via generate.sh, which means a lot less maintenance effort.

@Atheros1
Copy link
Copy Markdown
Contributor

Excellent. Thank you.

@Atheros1 Atheros1 merged commit d04b874 into Bitmessage:master Jul 14, 2013
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 this pull request may close these issues.

2 participants