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

Cannot build Bisq rpm on Debian 10.3 VM #4006

Closed
ghubstan opened this issue Feb 24, 2020 · 3 comments · Fixed by #4009
Closed

Cannot build Bisq rpm on Debian 10.3 VM #4006

ghubstan opened this issue Feb 24, 2020 · 3 comments · Fixed by #4009

Comments

@ghubstan
Copy link
Member

ghubstan commented Feb 24, 2020

Description

The desktop/package/linux/package.sh script fails while trying to create an rpm for version=1.2.7-SNAPSHOT

	error: line 3: Illegal char '-' (0x2d) in: Version: 1.2.7-SNAPSHOT	

Version

1.2.7-SNAPSHOT

Steps to reproduce

  1. Build src using OpenJDK 11 (on Debian 10.3)
  2. Set JAVA_HOME to Oracle JDK 10
  3. Run desktop/package/linux/package.sh

Expected behaviour

Bisq-1.2.7-SNAPSHOT.deb and Bisq-1.2.7-SNAPSHOT.rpm are created with no errors.

Actual behaviour

Bisq-1.2.7-SNAPSHOT.rpm could not be created because of the hyphen in the rpm version.

Device or machine

Debian 10.3 VM running inside Ubuntu 18.0.4
Intel i7, Nvidia GTX 960

Additional info

package.sh debug output:
rpm-build-error.log

According to https://twiki.cern.ch/twiki/bin/view/Main/RPMAndDebVersioning

RPM (4.7.1) version format 	
	version
		Mandatory
		Characters NOT allowed: - / ~ .. (hyphen, slash, tilde, double dot)
		Spaces not allowed 
	release
		Optional
		Characters NOT allowed: - / ~ .. (hyphen, slash, tilde, double dot)
		Spaces not allowed 

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

upstream_version
	The upstream_version may contain only alphanumerics [6] and the 
	characters . + - ~ (full stop, plus, hyphen, tilde) and should 
	start with a digit. 
	*** If there is no debian_revision then hyphens are not allowed. ***		
debian_revision
	This part of the version number specifies the version of the Debian 
	package based on the upstream version. It may contain only alphanumerics 
	and the characters + . ~ (plus, full stop, tilde) and is compared in the 
	same way as the upstream_version is.

Debian 10.3 can create Bisq-1.2.7-SNAPSHOT.deb, but not Bisq-1.2.7-SNAPSHOT.rpm

Workaround:

I created the rpm Bisq-1.2.7+SNAPSHOT.rpm on Debian 10.3 by creating a variable in linux/package.sh that replaces "-" with a valid "+"

rpmVersion=${version//-/+}

and substituting $rpmVersion for $version in the rpm generation related code in package.sh.

I also created Bisq-1.2.7SNAPSHOT.rpm by replacing "-" with "".


The Bisq-1.2.7+SNAPSHOT.rpm file I created on the debian vm was installed using dnf on another rpm based fedora vm; it created the fedora menu item and bisq started with no problems.

@ripcurlx
Copy link
Contributor

I think we something similar already in Windows as far as I remember (@devinbileck) Not super high prio IMO, but probably nice to get it fixed at some point.

@devinbileck
Copy link
Member

This is a duplicate of #2860. We could restore this behaviour to strip everything after the dash.

@ripcurlx
Copy link
Contributor

This is a duplicate of #2860. We could restore this behaviour to strip everything after the dash.

Yes, it was removed by mistake in this merge be70eb1. As it was me I'll create a quick PR for it 😬

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

Successfully merging a pull request may close this issue.

3 participants