Skip to content

Version test in configure/configure uses non-BRE regex, triggering failure to match #112

Open
@Gumnos

Description

@Gumnos

The configure file tests the version using non-BRE (Basic Regular Expression) \+ tokens, causing it not to match with OpenBSD's grep. Extracting the relevant log output during the cargo build execution:

configure:8265: error: 5.3.0-1-ge13ca993e8ccb9ba9847cc330696e02839f328f7 does not match <major>.<minor>.<bugfix>-<nrev>-g<gid> or VERSION                                                                                          

The grep on line 8259 needs to use actual BRE (just using the * and doubling up the previous atom to require one or more):

echo "${with_version}" | grep '^[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*-[0-9][0-9]*-g[0-9a-f][0-9a-f]*$'

or (possibly less-portably) you could use -E for Extended Regular Expressions and just + (not \+) such as

echo "${with_version}" | grep -E '^[0-9]+\.[0-9]+\.[0-9]+-[0-9]+-g[0-9a-f]+$'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions