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

build: add make deb target for debian package #116

Merged
merged 2 commits into from
Jan 2, 2025

Conversation

garlick
Copy link
Member

@garlick garlick commented Jan 1, 2025

Problem: the lack of packaging makes testing the installed diod messy on the test system.

Add a 'make deb' target to build snapshot packages in debbuild, borrowing heavily from @grondo's work in flux-framework.

This is currently based on top of #114

Copy link
Member

@grondo grondo left a comment

Choose a reason for hiding this comment

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

LGTM!

Problem: the lack of packaging makes testing the installed
diod messy on the test system.

Add a 'make deb' target to build snapshot packages in debbuild,
borrowing heavily from Mark Grondona's work in flux-framework.
Problem: compilation of diodls.c fails due to a potential string
overflow when building a test deb.

In function ‘snprintf’,
    inlined from ‘np_deserialize_p9dirent’ at ../libnpfs/np.c:1712:3,
    inlined from ‘npc_readdir_r’ at ../libnpclient/readdir.c:115:8,
    inlined from ‘lsdir’ at diodls.c:240:14:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:71:10: error: ‘__builtin___snprintf_chk’ specified bound 4097 exceeds destination size 256 [-Werror=stringop-overflow=]
   71 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
      |          ^
lto1: all warnings being treated as errors

Add an explicit check for the overflow and use memcpy() instead of
snprintf("%.*s") here.
@garlick
Copy link
Member Author

garlick commented Jan 2, 2025

Thanks!

@mergify mergify bot merged commit 646591e into chaos:master Jan 2, 2025
5 checks passed
@garlick garlick deleted the make_deb branch January 2, 2025 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants