clboss icon indicating copy to clipboard operation
clboss copied to clipboard

Cleanup/Fix release tarballs

Open ksedgwic opened this issue 4 months ago • 0 comments

Two problems:

  • The link to the current release (https://github.com/ZmnSCPxj/clboss/releases) shows 4 tarballs, 2 of which (labeled Source Code) are not usable because they weren't constructed w/ make dist and lack the the generated commit_hash source file
  • Others use a "abstract" reference to the latest release and it would be nice to have it grab the correct thing.
Bittylicious — Today at 6:30 AM
Hey. I'm having issues compiling the latest clboss release:

#36 20.22 Boss/Mod/Initiator.cpp:1:9: fatal error: commit_hash.h: No such file or directory
#36 20.22     1 | #include"commit_hash.h"
#36 20.22       |         ^~~~~~~~~~~~~~~
#36 20.22 compilation terminated.
Is this a missing dependency or some file that's not included in the release tarball?
Ooh, just found generate_commit_hash.sh - presumably this needs to be manually run before make ? 
Bittylicious — Today at 6:45 AM
(it worked)
Kenstigator — Today at 7:19 AM
It should be getting run automatically though
Bittylicious — Today at 7:36 AM
From configure or make?
Kenstigator — Today at 7:43 AM
make
Bittylicious — Today at 7:58 AM
Hmm, not here for some reason when trying to build from the latest github tarball. I do see it's in Makefile.am so I'm really not sure why it's not getting properly run here.
Kenstigator — Today at 7:59 AM
Ah! There are two versions of the tarball files. The ones with the versions in the names are including the file because they are built using make dist.  I wish the others didn't exist but they are built automatically and so I need to figure out how to get rid of them
The presumption is that with a tarball you don't have an active get tree and therefore the generate script shouldn't work. I'm not sure how it worked in your case actually
Bittylicious — Today at 8:01 AM
Right! The one I'm getting at present is https://api.github.com/repos/ZmnSCPxj/clboss/tarball/v0.14.0
You're right,  and I do like the contents of commit_hash.h
cat commit_hash.h 
#pragma once
#define GIT_COMMIT_HASH ""
#define GIT_DESCRIBE ""
Kenstigator — Today at 8:02 AM
Okay that would at least compile. But we really want to put the commit hash of what was the tarball was generated from
Where did you download the tarball from the link you sent this to the tarball itself?
Bittylicious — Today at 8:03 AM
Yes, that api.github.com URL outputs the tarball. That's what I'm pulling.
Sorry, "pull" a bad word there. Downloading.
Kenstigator — Today at 8:03 AM
Okay, this is important. Thank you very much for reporting this
I'm going to have to dig in. If there's an API to fetch the most recent tarball then I need to absolutely make sure it's fetching the right one
Bittylicious — Today at 8:04 AM
You'll cringe, but...
wget curl -s https://api.github.com/repos/ZmnSCPxj/clboss/releases/latest | grep tarball_url | head -n 1 | cut -d '"' -f 4
(in all fairness, there's only one tarball_url and one zipball there)
Kenstigator — Today at 8:05 AM
https://github.com/ZmnSCPxj/clboss/releases/tag/v0.14.0
GitHub
Release v0.14.0: Hand at the Grindstone · ZmnSCPxj/clboss
Upgraded EarningsTracker to a time bucket scheme allowing storage and access to earnings and
expenditure data over specific time ranges
Added new scripts in contrib for displaying earnings history
...
So that page shows them all and it's bad because there are two that don't work
But I was unaware of the other approach to downloading it. So let's put our heads together in the meeting this week and try to figure out a good solution to make sure we don't have the wrong file out there
(we have a regular open meeting on Friday afternoons)
Bittylicious — Today at 8:06 AM
Excellent, thank you very much.
The reason I'm using this scripted approach is because I build this into my CLN docker image.
Kenstigator — Today at 8:06 AM
We may end up with a URL that's slightly different than the one that you have, but I agree that it's good to have a way to automatically pull the right thing
I need to do some experiments to see if it's possible for me to manipulate I.e remove the source tarballs which don't have the file. The problem is is that experimentation involves making more releases and it took me 16 release candidates to get to where we are
Bittylicious — Today at 8:07 AM
Haha, yes, I do see the pain there!
Well, I'll leave this fun issue with you and go back to playing with clboss again 😄
Kenstigator — Today at 8:08 AM
You know every time I've seen this done. It's a huge pain. But I have to say having The exact version when you're debugging is invaluable
Bittylicious — Today at 8:08 AM
Totally agreed
Kenstigator — Today at 8:08 AM
Thank you again!
Bittylicious — Today at 8:08 AM
No probs, and thank you too.
Kenstigator — Today at 8:09 AM
I think my first approach is to try to remove the bad files and put symbolic links with an abstract name like latest in their place. Does that sound like a good solution to you? You'd be able to use the latest in your script
Bittylicious — Today at 8:11 AM
Would it still be the tarball_url in the /latest API call?
My technique works for most of the git packages I get.
Kenstigator — Today at 8:12 AM
I will endeavor to try to make that work. Not sure if I'm going to succeed of course
Bittylicious — Today at 8:12 AM
I can change my script to whatever really, but you might break whatever scripts others use - that's my main fear.
Kenstigator — Today at 8:13 AM
Exactly. I was unaware of this URL and it would clearly be best if it worked
Bittylicious — Today at 8:15 AM
Indeed. Well, good luck and feel free to let me know if you wanted me to test anything.

ksedgwic avatar Oct 16 '24 01:10 ksedgwic