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

Building Linux packages - default setting causes error #2860

Closed
agb19 opened this issue Jun 3, 2019 · 7 comments
Closed

Building Linux packages - default setting causes error #2860

agb19 opened this issue Jun 3, 2019 · 7 comments

Comments

@agb19
Copy link
Contributor

agb19 commented Jun 3, 2019

Attempting to build Linux packages on Debian 9 (with JDK 10.0.2) from an unmodified git clone breaks during rpmbuild with the error message below.

sh desktop/package/linux/package.sh
(...)
Generating RPM for installer to: /home/bisq/bisq/desktop/package/linux/../../../desktop/package/linux
Running [rpmbuild, -bb, (...)] in /tmp/fxbundler5968169114025910883/images/linux-rpm.image
error: line 3: Illegal char '-' in: Version: 1.1.1-SNAPSHOT
java.io.IOException: Exec failed with code 1 command (...)

Only the RPM build is affected, DEB package is built OK. The error message from rpmbuild indicates that the dash character is not allowed in version numbers (1.1.1-SNAPSHOT).

On further investigation:

  • changing the dash to an underscore (1.1.1_SNAPSHOT) caused an error in the DEB builder instead
  • changing the dash to a dot (1.1.1.SNAPSHOT) allowed both RPM and DEB to build correctly.
@ghost
Copy link

ghost commented Jun 3, 2019

Thanks for investigating that.

@ripcurlx
Copy link
Member

ripcurlx commented Jun 3, 2019

@agb19 Thanks for reporting! @devinbileck Not sure if we want to have a special SNAPSHOT version structure for RPM. Maybe there is an additional flag that could be used in the case of a SNAPSHOT version.
@agb19 Is there a different standard on how SNAPSHOT versioning should be done for RPM?

@agb19
Copy link
Contributor Author

agb19 commented Jun 3, 2019

@ripcurlx The RPM file name is usually auto-generated by rpmbuild using the naming scheme: %{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}.rpm, where the variables Name, Version and Release are defined at the top of the spec file (the spec file is the RPM build "recipe").

So, in order to obtain file name Bisq-1.1.1-SNAPSHOT.x86_64.rpm , one would need to declare at the top of the spec file:

Name: Bisq
Version: 1.1.1
Release: SNAPSHOT

However, since the spec file is auto-generated by javapackager, I'm not sure how to set the Release variable from the build script and I worry that it may even be impossible.

This is the relevant section of the (invalid) spec file that is currently generated by javapackager:

Summary: The decentralized exchange network.
Name: bisq
Version: 1.1.1-SNAPSHOT
Release: 1

Note that "Release:1" appears to be auto-populated. I don't know how / if it can be overridden.

(Edited for spelling and updated example)

@devinbileck
Copy link
Member

I had a workaround for this in my initial commit that seems to have since been removed (I believe accidentally). Essentially it just stripped everything after the dash. Likely the easiest approach is just to restore that behaviour.

@agb19
Copy link
Contributor Author

agb19 commented Jun 3, 2019

Yes, or alternatively you could start with two separate variables: version and release and only join them where needed, using whatever delimiter makes most sense in the particular scenario.
Computing-wise, join is easier than split. :)

@stale
Copy link

stale bot commented Sep 2, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the was:dropped label Sep 2, 2019
@stale
Copy link

stale bot commented Sep 9, 2019

This issue has been automatically closed because of inactivity. Feel free to reopen it if you think it is still relevant.

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

No branches or pull requests

3 participants