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

Improper quoting of PKGBUILD.static #15

Closed
ldr709 opened this issue Feb 10, 2019 · 4 comments
Closed

Improper quoting of PKGBUILD.static #15

ldr709 opened this issue Feb 10, 2019 · 4 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@ldr709
Copy link

ldr709 commented Feb 10, 2019

static_pkgbuild doesn't properly quote strings. This makes packages with apostrophes in their descriptions, such as ruby-stringex, fail to build.

/home/aur/.cache/rua/ruby-stringex/build/PKGBUILD.static: line 13: unexpected EOF while looking for matching `''
/home/aur/.cache/rua/ruby-stringex/build/PKGBUILD.static: line 14: syntax error: unexpected end of file
==> ERROR: Failed to source /home/aur/.cache/rua/ruby-stringex/build/PKGBUILD.static

(followed by a panic)

@vn971 vn971 added bug Something isn't working and removed bug Something isn't working labels Feb 10, 2019
@vn971
Copy link
Owner

vn971 commented Feb 10, 2019

Apparently this line fails to work the way I expected it to work: https://github.com/vn971/rua/blob/master/src/srcinfo.rs#L85
This parsing would be nice to cover with more tests I think, manual and/or unit.

@vn971 vn971 added the good first issue Good for newcomers label Feb 10, 2019
@vn971
Copy link
Owner

vn971 commented Feb 11, 2019

For reference, this is the problematic PKGBUILD.static file that is generated:

pkgbase+=('ruby-stringex')
pkgdesc='Some [hopefully] useful extensions to Ruby's String class'
pkgver='2.7.1'
pkgrel='1'
url='http://github.com/rsl/stringex'
arch+=('any')
license+=('MIT')
depends+=('ruby')
noextract+=('stringex-2.7.1.gem')
options+=('!emptydirs')
source+=('https://rubygems.org/downloads/stringex-2.7.1.gem')
sha1sums+=('d462d32da69b6d65657d3e3ea436eab0128ea700')
pkgname+=('ruby-stringex')

@vn971
Copy link
Owner

vn971 commented Feb 11, 2019

And this is the .SRCINFO:

# Generated by mksrcinfo v8
# Mon Feb 27 01:45:33 UTC 2017
pkgbase = ruby-stringex
	pkgdesc = Some [hopefully] useful extensions to Ruby's String class
	pkgver = 2.7.1
	pkgrel = 1
	url = http://github.com/rsl/stringex
	arch = any
	license = MIT
	depends = ruby
	noextract = stringex-2.7.1.gem
	options = !emptydirs
	source = https://rubygems.org/downloads/stringex-2.7.1.gem
	sha1sums = d462d32da69b6d65657d3e3ea436eab0128ea700

pkgname = ruby-stringex

@vn971 vn971 closed this as completed in 286f7bb Feb 11, 2019
@vn971
Copy link
Owner

vn971 commented Feb 11, 2019

Thanks for raising! The underlying issue is that rust-s regexp implicitly add .*? at both ends of each pattern -- something I overlooked, unfortunately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants