Skip to content

build: Check for git before making the version#131

Merged
ooxi merged 1 commit intogerbv:mainfrom
eyal0:no_git_version
Sep 18, 2022
Merged

build: Check for git before making the version#131
ooxi merged 1 commit intogerbv:mainfrom
eyal0:no_git_version

Conversation

@eyal0
Copy link
Copy Markdown
Collaborator

@eyal0 eyal0 commented Sep 17, 2022

This fixes #130
This fixes pcb2gcode/pcb2gcode#626

@eyal0 eyal0 requested a review from ooxi September 17, 2022 05:37
@ooxi ooxi merged commit 01efacf into gerbv:main Sep 18, 2022
@ooxi
Copy link
Copy Markdown
Contributor

ooxi commented Sep 18, 2022

Thank you! I'm not quite sure why the build succeeded with git missing, but in those cases using the prefix instead of the actual version is fine.

@eyal0 eyal0 deleted the no_git_version branch September 19, 2022 13:55
@eyal0
Copy link
Copy Markdown
Collaborator Author

eyal0 commented Sep 19, 2022

Thank you! I'm not quite sure why the build succeeded with git missing, but in those cases using the prefix instead of the actual version is fine.

The problem is not that the build fails. It succeeds. The problem is that it succeeds without a version number.


We can be in one of three situations:

  1. git installed and there is a .git directory (like if you clone the repo).
  2. git installed but no .git directory (like if you download the .tar.gz file from the releases page).
  3. Same as 2 but without git installed.

In cases 2 and 3, ./autogen.sh will succeed even though the script git-version-gen.sh will fail. This causes the VERSION variable to be empty and so the Version: line in libgerbv.pc will be empty.

pcb2gcode has a requirement for minimum gerbv version so any gerbv installed from the .tar.gz file on the releases page will have no version number.

We suspect that the maintainers of Arch Linux and perhaps Ubuntu are using a download from the releases page to build the package that people download with pacman or apt-get, so they're getting a version that has no version number.

Anyway, this resolves it. If we made a new gerbv release and notify the maintainers, they can put a new gerbv into their package repositories and users will get the new gerbv with version number. I hope!

@ooxi
Copy link
Copy Markdown
Contributor

ooxi commented Sep 19, 2022

I think we should do a new patch release soon, before adding bigger changes. I'll try to make time this week but feel free to go ahead.

@ooxi
Copy link
Copy Markdown
Contributor

ooxi commented Sep 21, 2022

@eyal0 I have created the release v2.9.3-rc.1. Do know a way to verify whether this fixes the issue experienced by maintainers?

@eyal0
Copy link
Copy Markdown
Collaborator Author

eyal0 commented Sep 22, 2022

  1. Download the .tar.gz files from the releases page. Don't do it in a git repo.
  2. Decompress it.
  3. Build the usual way.
  4. Confirm that the generated file libgerbv.pc contains a version number.

@eyal0
Copy link
Copy Markdown
Collaborator Author

eyal0 commented Sep 22, 2022

Here are the commands that I typed to check it:

wget 'https://github.com/gerbv/gerbv/archive/refs/tags/v2.9.3-rc.1.tar.gz'
tar xvf gerbv-2.9.3-rc.1.tar.gz
cd gerbv-2.9.3-rc.1
./autogen.sh 
./configure
make -j 20
grep "Version" ./src/libgerbv.pc

I got:

Version: 2.9.3-rc.1

Looks good! The same commands on 2.9.2 do not make a valid Version:

Version:

Perfect. This ought to solve the problem. Hopefully the maintainers of the ubuntu and arch package will get around to shipping a new one soon.

@hachi
Copy link
Copy Markdown

hachi commented Mar 13, 2023

Ubuntu shipped a new version in lunar I think... but I don't think the checks for git are enough. You may be inside a git working tree from some other project (the package maintainers) and as a result the .pc file will still not have a Version: marked properly.

https://packages.ubuntu.com/lunar/gerbv # I believe 2.9.6 build should have included your fix. Sadly the Version line is still empty there.

@eyal0
Copy link
Copy Markdown
Collaborator Author

eyal0 commented Mar 24, 2023

And it still doesn't have the fix. :-( I just unpacked that debian file and the version is not there. Oh no!

Is the maintainer, like... a human? Someone that we can talk to? I tried sending a bug report and emailing someone but I got not response.

@hachi
Copy link
Copy Markdown

hachi commented Nov 16, 2024

@eyal0 I thought you are the maintainer

@eyal0
Copy link
Copy Markdown
Collaborator Author

eyal0 commented Nov 18, 2024

Nope. There are people that update the gerbv package for Ubuntu but I'm not that person.

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.

Install hanging on libgerbv version check libgerbv.pc version doesn't match

3 participants