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

Fix building reproducible #1540

Merged
merged 4 commits into from
Mar 6, 2024
Merged

Fix building reproducible #1540

merged 4 commits into from
Mar 6, 2024

Conversation

gusnan
Copy link
Contributor

@gusnan gusnan commented Feb 27, 2024

The allegro-doc package doesn't build reproducible - these commits fix the "Last updated:" message on each html page by using the SOURCE_DATE_EPOCH build timestamp (more info here: https://reproducible-builds.org/docs/source-date-epoch/ ) and the other commit fix sorting example documents which are referenced alongside functions.

Original bug report in Debian here: https://bugs.debian.org/1064648 with links to more information regarding the problem.

https://reproducible-builds.org

Should fix reproducibility which currently may vary in between builds in
the order the files are discovered in the file system.
@@ -81,9 +90,13 @@ int main(int argc, char* argv[])
lookup = calloc(argc, sizeof(lookup_t));
for (j = 0; j < argc; ++j) {
lookup[j].index = j;
int len = strlen(argv[j]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lookup[j].filename = strdup(argv[j]); ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't you just store the argv[i] pointer, no need to make a copy of the string it points to?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SiegeLord That seems very reasonable yes - and I have tested your method too now @pedro-w - that seems even better. I'll push to my branch here using this instead. Thanks!

@SiegeLord
Copy link
Member

Thanks, this is great work. I suggested some possible simplifications (the strdup is probably a clear improvement, but sscanf could be argued against).

} lookup_t;
static lookup_t *lookup;
static int number_of_items = 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for this anymore.

@SiegeLord SiegeLord merged commit d56a2c5 into liballeg:master Mar 6, 2024
3 checks passed
@SiegeLord
Copy link
Member

Thanks again!

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.

3 participants