-
Notifications
You must be signed in to change notification settings - Fork 38
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
musl: basename: use portable implementation for basename API #273
Conversation
maybe just the it includes the posix implementation of the |
@quaresmajose I tried it initially. It looks like we need to use the gnu implementation in this case, not the posix one (including libgen.h won't be enough). Hence, I ended to propose the approach used in kmod. Pending on the authors to review and see if it's acceptable to them. |
Ok, understand. |
Looks fine to me, I'm not overly excited about carrying re-implementations like this, but its trivial enough to not be worth caring about. |
Ah, seems to be some formating issues, can you run "make clang-format" and repush? |
musl has removed the non-prototype declaration of basename from string.h which now results in build errors with newer clang compilers. Implement GNU basename behavior using strchr which is portable across libcs. Fixes: | ../../git/tools/mountcomposefs.c:43:20: | error: call to undeclared function 'basename'; ISO C99 and later do not | support implicit function declarations [-Wimplicit-function-declaration] | 43 | const char *bin = basename(argv0); | | ^ | ../../git/tools/mountcomposefs.c:43:14: | error: incompatible integer to pointer conversion initializing 'const char *' | with an expression of type 'int' [-Wint-conversion] | 43 | const char *bin = basename(argv0); | | ^ ~~~~~~~~~~~~~~~ For reference: https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7 Closes: containers#272 Signed-off-by: Fathi Boudra <[email protected]>
@alexlarsson thanks. formating issue fixed and repushed. |
- This is required to add the native target support. - Drop upstream merged patch: 0001-musl-basename-use-portable-implementation-for-basena.patch containers/composefs#273 Changelog: $ git --no-pager log --oneline HEAD...v1.0.3 ecef20c (HEAD -> main, origin/main, origin/HEAD) Merge pull request openembedded#276 from wahtari/copy_file_range e78c7a4 Merge pull request openembedded#277 from alexlarsson/fix-newline-error 1d82bc1 mkcomposefs: Drop newline from error string 3e38d73 Added copy_file_range for faster file copy. 85a693d Merge pull request openembedded#273 from fboudra/musl-basename 31afa13 musl: basename: use portable implementation for basename API 4776580 Merge pull request openembedded#275 from eriksjolund/fix-spelling-in-error-message 4a68a42 Merge pull request openembedded#269 from wahtari/threading-for-mkcomposefs 7266546 fuse: fix spelling in error message b49499b added threads in mkcomposefs for digest calculation and file copy d144db0 refactored lcfs_load_node_from_file to enable multi-threading in mkcomposefs af69922 Merge pull request openembedded#266 from eriksjolund/erofs-add-missing-free 1eecf38 Merge pull request openembedded#267 from eriksjolund/mkcomposefs-add-missing-free a880713 mkcomposefs: Add missing free() 456d618 erofs: Add missing free() and lcfs_node_unref() 1179638 Merge pull request openembedded#265 from eriksjolund/handle-empty-basedir-option 301b78f Merge pull request openembedded#268 from eriksjolund/set-errno-for-unknown-format 09ca740 writer: Set errno for unknown format a96f786 mountcomposefs: Handle empty basedir option fc9a526 Merge pull request openembedded#260 from eriksjolund/handle-error-from-build-node 9b85011 Merge pull request openembedded#262 from eriksjolund/add-error-check-and-rearrange 2cb505b Merge pull request openembedded#263 from eriksjolund/writer-set-errno 9b417be writer: Set errno d5ffbeb Merge pull request openembedded#261 from eriksjolund/add-missing-node-unref 9c393a4 Merge pull request openembedded#259 from eriksjolund/handle-error-from-node-set-content 396a3b8 mkcomposefs: Handle NULL from lcfs_node_new() 238a94a lib: Set errno in lcfs_node_new() c1181fa erofs: Handle error from lcfs_build_node_from_image() 49288d5 erofs, mkcomposefs: Handle error from lcfs_node_set_content() 4e0b147 lib: Add missing lcfs_node_unref() 9bc76dd Merge pull request openembedded#258 from eriksjolund/fix-missing-options d59dd9b mountcomposefs, mkcomposefs: Add missing options to usage information 418f4f7 Merge pull request openembedded#255 from cgwalters/mount-minor-tweaks 72c602a Merge pull request openembedded#256 from eriksjolund/fix-error-message 770cc36 fuse: Fix filepath argument in error message 465c079 man/mount.composefs: Fix a typo and two markdown lint warnings 8565a8b Merge pull request openembedded#254 from edbaunton/edbaunton/man-mkcomposefs-inline b99a978 man mkcomposefs: detail inlining logic 47f6949 Merge pull request openembedded#253 from rborn-tx/support-older-linux-headers 453eaef ci: Add build test for Ubuntu Focal 384f306 mount: Allow building when macro LOOP_CONFIGURE is not available f163eba mount: Allow building when macro MOUNT_ATTR_IDMAP is not available 80e99bd Merge pull request openembedded#250 from cgwalters/doc-verification f6e8510 README.md: Fix markdownlint warnings 3b7e567 README.md: Drop removed `signed` mount option 091b51f Merge pull request openembedded#247 from cgwalters/readlinkat-overflow 232336d Merge pull request openembedded#248 from cgwalters/more-analyzer a6904d6 writer: Close mmap leak e9632ca Merge pull request openembedded#246 from eriksjolund/handle-null-from-strndup 6b2192b writer: Fix (almost certainly unreachable) overflow bdc2c4c mkcomposefs: Handle NULL from strndup() e63786d Merge pull request openembedded#245 from giuseppe/run-distcheck-ci 5d3fe92 tests: do not hardcode number of threads d6e55bf .github: run make distcheck as part of the CI f6bbf54 Merge pull request openembedded#244 from alexlarsson/mount-api 4e5883b mount.composefs: Add tryverity option 15bdcd6 lib: Add TRY_VERITY mount option f884f57 mount: Use the new lowerdir+ and datadir+ options bd6ce95 Merge pull request openembedded#243 from giuseppe/add-fuzzing 171eae0 mkcompose: fix crash if no target for hardlink 7b1518f mkcomposefs: tree_from_dump does not exit(2) on errors a8ac3d5 mkcomposefs: reject dump without root node 28a9d6b tests: add fuzzing tests for mkcomposefs 932f748 tools: add fuzzing entrypoint for mkcomposefs Signed-off-by: Jose Quaresma <[email protected]>
- This is required to add the native target support. - Drop upstream merged patch: 0001-musl-basename-use-portable-implementation-for-basena.patch containers/composefs#273 Changelog: $ git --no-pager log --oneline HEAD...v1.0.3 ecef20c (HEAD -> main, origin/main, origin/HEAD) Merge pull request openembedded#276 from wahtari/copy_file_range e78c7a4 Merge pull request openembedded#277 from alexlarsson/fix-newline-error 1d82bc1 mkcomposefs: Drop newline from error string 3e38d73 Added copy_file_range for faster file copy. 85a693d Merge pull request openembedded#273 from fboudra/musl-basename 31afa13 musl: basename: use portable implementation for basename API 4776580 Merge pull request openembedded#275 from eriksjolund/fix-spelling-in-error-message 4a68a42 Merge pull request openembedded#269 from wahtari/threading-for-mkcomposefs 7266546 fuse: fix spelling in error message b49499b added threads in mkcomposefs for digest calculation and file copy d144db0 refactored lcfs_load_node_from_file to enable multi-threading in mkcomposefs af69922 Merge pull request openembedded#266 from eriksjolund/erofs-add-missing-free 1eecf38 Merge pull request openembedded#267 from eriksjolund/mkcomposefs-add-missing-free a880713 mkcomposefs: Add missing free() 456d618 erofs: Add missing free() and lcfs_node_unref() 1179638 Merge pull request openembedded#265 from eriksjolund/handle-empty-basedir-option 301b78f Merge pull request openembedded#268 from eriksjolund/set-errno-for-unknown-format 09ca740 writer: Set errno for unknown format a96f786 mountcomposefs: Handle empty basedir option fc9a526 Merge pull request openembedded#260 from eriksjolund/handle-error-from-build-node 9b85011 Merge pull request openembedded#262 from eriksjolund/add-error-check-and-rearrange 2cb505b Merge pull request openembedded#263 from eriksjolund/writer-set-errno 9b417be writer: Set errno d5ffbeb Merge pull request openembedded#261 from eriksjolund/add-missing-node-unref 9c393a4 Merge pull request openembedded#259 from eriksjolund/handle-error-from-node-set-content 396a3b8 mkcomposefs: Handle NULL from lcfs_node_new() 238a94a lib: Set errno in lcfs_node_new() c1181fa erofs: Handle error from lcfs_build_node_from_image() 49288d5 erofs, mkcomposefs: Handle error from lcfs_node_set_content() 4e0b147 lib: Add missing lcfs_node_unref() 9bc76dd Merge pull request openembedded#258 from eriksjolund/fix-missing-options d59dd9b mountcomposefs, mkcomposefs: Add missing options to usage information 418f4f7 Merge pull request openembedded#255 from cgwalters/mount-minor-tweaks 72c602a Merge pull request openembedded#256 from eriksjolund/fix-error-message 770cc36 fuse: Fix filepath argument in error message 465c079 man/mount.composefs: Fix a typo and two markdown lint warnings 8565a8b Merge pull request openembedded#254 from edbaunton/edbaunton/man-mkcomposefs-inline b99a978 man mkcomposefs: detail inlining logic 47f6949 Merge pull request openembedded#253 from rborn-tx/support-older-linux-headers 453eaef ci: Add build test for Ubuntu Focal 384f306 mount: Allow building when macro LOOP_CONFIGURE is not available f163eba mount: Allow building when macro MOUNT_ATTR_IDMAP is not available 80e99bd Merge pull request openembedded#250 from cgwalters/doc-verification f6e8510 README.md: Fix markdownlint warnings 3b7e567 README.md: Drop removed `signed` mount option 091b51f Merge pull request openembedded#247 from cgwalters/readlinkat-overflow 232336d Merge pull request openembedded#248 from cgwalters/more-analyzer a6904d6 writer: Close mmap leak e9632ca Merge pull request openembedded#246 from eriksjolund/handle-null-from-strndup 6b2192b writer: Fix (almost certainly unreachable) overflow bdc2c4c mkcomposefs: Handle NULL from strndup() e63786d Merge pull request openembedded#245 from giuseppe/run-distcheck-ci 5d3fe92 tests: do not hardcode number of threads d6e55bf .github: run make distcheck as part of the CI f6bbf54 Merge pull request openembedded#244 from alexlarsson/mount-api 4e5883b mount.composefs: Add tryverity option 15bdcd6 lib: Add TRY_VERITY mount option f884f57 mount: Use the new lowerdir+ and datadir+ options bd6ce95 Merge pull request openembedded#243 from giuseppe/add-fuzzing 171eae0 mkcompose: fix crash if no target for hardlink 7b1518f mkcomposefs: tree_from_dump does not exit(2) on errors a8ac3d5 mkcomposefs: reject dump without root node 28a9d6b tests: add fuzzing tests for mkcomposefs 932f748 tools: add fuzzing entrypoint for mkcomposefs Signed-off-by: Jose Quaresma <[email protected]> Signed-off-by: Khem Raj <[email protected]>
- This is required to add the native target support. - Drop upstream merged patch: 0001-musl-basename-use-portable-implementation-for-basena.patch containers/composefs#273 Changelog: $ git --no-pager log --oneline HEAD...v1.0.3 ecef20c (HEAD -> main, origin/main, origin/HEAD) Merge pull request openembedded#276 from wahtari/copy_file_range e78c7a4 Merge pull request openembedded#277 from alexlarsson/fix-newline-error 1d82bc1 mkcomposefs: Drop newline from error string 3e38d73 Added copy_file_range for faster file copy. 85a693d Merge pull request openembedded#273 from fboudra/musl-basename 31afa13 musl: basename: use portable implementation for basename API 4776580 Merge pull request openembedded#275 from eriksjolund/fix-spelling-in-error-message 4a68a42 Merge pull request openembedded#269 from wahtari/threading-for-mkcomposefs 7266546 fuse: fix spelling in error message b49499b added threads in mkcomposefs for digest calculation and file copy d144db0 refactored lcfs_load_node_from_file to enable multi-threading in mkcomposefs af69922 Merge pull request openembedded#266 from eriksjolund/erofs-add-missing-free 1eecf38 Merge pull request openembedded#267 from eriksjolund/mkcomposefs-add-missing-free a880713 mkcomposefs: Add missing free() 456d618 erofs: Add missing free() and lcfs_node_unref() 1179638 Merge pull request openembedded#265 from eriksjolund/handle-empty-basedir-option 301b78f Merge pull request openembedded#268 from eriksjolund/set-errno-for-unknown-format 09ca740 writer: Set errno for unknown format a96f786 mountcomposefs: Handle empty basedir option fc9a526 Merge pull request openembedded#260 from eriksjolund/handle-error-from-build-node 9b85011 Merge pull request openembedded#262 from eriksjolund/add-error-check-and-rearrange 2cb505b Merge pull request openembedded#263 from eriksjolund/writer-set-errno 9b417be writer: Set errno d5ffbeb Merge pull request openembedded#261 from eriksjolund/add-missing-node-unref 9c393a4 Merge pull request openembedded#259 from eriksjolund/handle-error-from-node-set-content 396a3b8 mkcomposefs: Handle NULL from lcfs_node_new() 238a94a lib: Set errno in lcfs_node_new() c1181fa erofs: Handle error from lcfs_build_node_from_image() 49288d5 erofs, mkcomposefs: Handle error from lcfs_node_set_content() 4e0b147 lib: Add missing lcfs_node_unref() 9bc76dd Merge pull request openembedded#258 from eriksjolund/fix-missing-options d59dd9b mountcomposefs, mkcomposefs: Add missing options to usage information 418f4f7 Merge pull request openembedded#255 from cgwalters/mount-minor-tweaks 72c602a Merge pull request openembedded#256 from eriksjolund/fix-error-message 770cc36 fuse: Fix filepath argument in error message 465c079 man/mount.composefs: Fix a typo and two markdown lint warnings 8565a8b Merge pull request openembedded#254 from edbaunton/edbaunton/man-mkcomposefs-inline b99a978 man mkcomposefs: detail inlining logic 47f6949 Merge pull request openembedded#253 from rborn-tx/support-older-linux-headers 453eaef ci: Add build test for Ubuntu Focal 384f306 mount: Allow building when macro LOOP_CONFIGURE is not available f163eba mount: Allow building when macro MOUNT_ATTR_IDMAP is not available 80e99bd Merge pull request openembedded#250 from cgwalters/doc-verification f6e8510 README.md: Fix markdownlint warnings 3b7e567 README.md: Drop removed `signed` mount option 091b51f Merge pull request openembedded#247 from cgwalters/readlinkat-overflow 232336d Merge pull request openembedded#248 from cgwalters/more-analyzer a6904d6 writer: Close mmap leak e9632ca Merge pull request openembedded#246 from eriksjolund/handle-null-from-strndup 6b2192b writer: Fix (almost certainly unreachable) overflow bdc2c4c mkcomposefs: Handle NULL from strndup() e63786d Merge pull request openembedded#245 from giuseppe/run-distcheck-ci 5d3fe92 tests: do not hardcode number of threads d6e55bf .github: run make distcheck as part of the CI f6bbf54 Merge pull request openembedded#244 from alexlarsson/mount-api 4e5883b mount.composefs: Add tryverity option 15bdcd6 lib: Add TRY_VERITY mount option f884f57 mount: Use the new lowerdir+ and datadir+ options bd6ce95 Merge pull request openembedded#243 from giuseppe/add-fuzzing 171eae0 mkcompose: fix crash if no target for hardlink 7b1518f mkcomposefs: tree_from_dump does not exit(2) on errors a8ac3d5 mkcomposefs: reject dump without root node 28a9d6b tests: add fuzzing tests for mkcomposefs 932f748 tools: add fuzzing entrypoint for mkcomposefs Signed-off-by: Jose Quaresma <[email protected]> Signed-off-by: Khem Raj <[email protected]>
- This is required to add the native target support. - Drop upstream merged patch: 0001-musl-basename-use-portable-implementation-for-basena.patch containers/composefs#273 Changelog: $ git --no-pager log --oneline HEAD...v1.0.3 ecef20c (HEAD -> main, origin/main, origin/HEAD) Merge pull request openembedded#276 from wahtari/copy_file_range e78c7a4 Merge pull request openembedded#277 from alexlarsson/fix-newline-error 1d82bc1 mkcomposefs: Drop newline from error string 3e38d73 Added copy_file_range for faster file copy. 85a693d Merge pull request openembedded#273 from fboudra/musl-basename 31afa13 musl: basename: use portable implementation for basename API 4776580 Merge pull request openembedded#275 from eriksjolund/fix-spelling-in-error-message 4a68a42 Merge pull request openembedded#269 from wahtari/threading-for-mkcomposefs 7266546 fuse: fix spelling in error message b49499b added threads in mkcomposefs for digest calculation and file copy d144db0 refactored lcfs_load_node_from_file to enable multi-threading in mkcomposefs af69922 Merge pull request openembedded#266 from eriksjolund/erofs-add-missing-free 1eecf38 Merge pull request openembedded#267 from eriksjolund/mkcomposefs-add-missing-free a880713 mkcomposefs: Add missing free() 456d618 erofs: Add missing free() and lcfs_node_unref() 1179638 Merge pull request openembedded#265 from eriksjolund/handle-empty-basedir-option 301b78f Merge pull request openembedded#268 from eriksjolund/set-errno-for-unknown-format 09ca740 writer: Set errno for unknown format a96f786 mountcomposefs: Handle empty basedir option fc9a526 Merge pull request openembedded#260 from eriksjolund/handle-error-from-build-node 9b85011 Merge pull request openembedded#262 from eriksjolund/add-error-check-and-rearrange 2cb505b Merge pull request openembedded#263 from eriksjolund/writer-set-errno 9b417be writer: Set errno d5ffbeb Merge pull request openembedded#261 from eriksjolund/add-missing-node-unref 9c393a4 Merge pull request openembedded#259 from eriksjolund/handle-error-from-node-set-content 396a3b8 mkcomposefs: Handle NULL from lcfs_node_new() 238a94a lib: Set errno in lcfs_node_new() c1181fa erofs: Handle error from lcfs_build_node_from_image() 49288d5 erofs, mkcomposefs: Handle error from lcfs_node_set_content() 4e0b147 lib: Add missing lcfs_node_unref() 9bc76dd Merge pull request openembedded#258 from eriksjolund/fix-missing-options d59dd9b mountcomposefs, mkcomposefs: Add missing options to usage information 418f4f7 Merge pull request openembedded#255 from cgwalters/mount-minor-tweaks 72c602a Merge pull request openembedded#256 from eriksjolund/fix-error-message 770cc36 fuse: Fix filepath argument in error message 465c079 man/mount.composefs: Fix a typo and two markdown lint warnings 8565a8b Merge pull request openembedded#254 from edbaunton/edbaunton/man-mkcomposefs-inline b99a978 man mkcomposefs: detail inlining logic 47f6949 Merge pull request openembedded#253 from rborn-tx/support-older-linux-headers 453eaef ci: Add build test for Ubuntu Focal 384f306 mount: Allow building when macro LOOP_CONFIGURE is not available f163eba mount: Allow building when macro MOUNT_ATTR_IDMAP is not available 80e99bd Merge pull request openembedded#250 from cgwalters/doc-verification f6e8510 README.md: Fix markdownlint warnings 3b7e567 README.md: Drop removed `signed` mount option 091b51f Merge pull request openembedded#247 from cgwalters/readlinkat-overflow 232336d Merge pull request openembedded#248 from cgwalters/more-analyzer a6904d6 writer: Close mmap leak e9632ca Merge pull request openembedded#246 from eriksjolund/handle-null-from-strndup 6b2192b writer: Fix (almost certainly unreachable) overflow bdc2c4c mkcomposefs: Handle NULL from strndup() e63786d Merge pull request openembedded#245 from giuseppe/run-distcheck-ci 5d3fe92 tests: do not hardcode number of threads d6e55bf .github: run make distcheck as part of the CI f6bbf54 Merge pull request openembedded#244 from alexlarsson/mount-api 4e5883b mount.composefs: Add tryverity option 15bdcd6 lib: Add TRY_VERITY mount option f884f57 mount: Use the new lowerdir+ and datadir+ options bd6ce95 Merge pull request openembedded#243 from giuseppe/add-fuzzing 171eae0 mkcompose: fix crash if no target for hardlink 7b1518f mkcomposefs: tree_from_dump does not exit(2) on errors a8ac3d5 mkcomposefs: reject dump without root node 28a9d6b tests: add fuzzing tests for mkcomposefs 932f748 tools: add fuzzing entrypoint for mkcomposefs Signed-off-by: Jose Quaresma <[email protected]> Signed-off-by: Khem Raj <[email protected]>
- This is required to add the native target support. - Drop upstream merged patch: 0001-musl-basename-use-portable-implementation-for-basena.patch containers/composefs#273 Changelog: $ git --no-pager log --oneline HEAD...v1.0.3 ecef20c (HEAD -> main, origin/main, origin/HEAD) Merge pull request openembedded#276 from wahtari/copy_file_range e78c7a4 Merge pull request openembedded#277 from alexlarsson/fix-newline-error 1d82bc1 mkcomposefs: Drop newline from error string 3e38d73 Added copy_file_range for faster file copy. 85a693d Merge pull request openembedded#273 from fboudra/musl-basename 31afa13 musl: basename: use portable implementation for basename API 4776580 Merge pull request openembedded#275 from eriksjolund/fix-spelling-in-error-message 4a68a42 Merge pull request openembedded#269 from wahtari/threading-for-mkcomposefs 7266546 fuse: fix spelling in error message b49499b added threads in mkcomposefs for digest calculation and file copy d144db0 refactored lcfs_load_node_from_file to enable multi-threading in mkcomposefs af69922 Merge pull request openembedded#266 from eriksjolund/erofs-add-missing-free 1eecf38 Merge pull request openembedded#267 from eriksjolund/mkcomposefs-add-missing-free a880713 mkcomposefs: Add missing free() 456d618 erofs: Add missing free() and lcfs_node_unref() 1179638 Merge pull request openembedded#265 from eriksjolund/handle-empty-basedir-option 301b78f Merge pull request openembedded#268 from eriksjolund/set-errno-for-unknown-format 09ca740 writer: Set errno for unknown format a96f786 mountcomposefs: Handle empty basedir option fc9a526 Merge pull request openembedded#260 from eriksjolund/handle-error-from-build-node 9b85011 Merge pull request openembedded#262 from eriksjolund/add-error-check-and-rearrange 2cb505b Merge pull request openembedded#263 from eriksjolund/writer-set-errno 9b417be writer: Set errno d5ffbeb Merge pull request openembedded#261 from eriksjolund/add-missing-node-unref 9c393a4 Merge pull request openembedded#259 from eriksjolund/handle-error-from-node-set-content 396a3b8 mkcomposefs: Handle NULL from lcfs_node_new() 238a94a lib: Set errno in lcfs_node_new() c1181fa erofs: Handle error from lcfs_build_node_from_image() 49288d5 erofs, mkcomposefs: Handle error from lcfs_node_set_content() 4e0b147 lib: Add missing lcfs_node_unref() 9bc76dd Merge pull request openembedded#258 from eriksjolund/fix-missing-options d59dd9b mountcomposefs, mkcomposefs: Add missing options to usage information 418f4f7 Merge pull request openembedded#255 from cgwalters/mount-minor-tweaks 72c602a Merge pull request openembedded#256 from eriksjolund/fix-error-message 770cc36 fuse: Fix filepath argument in error message 465c079 man/mount.composefs: Fix a typo and two markdown lint warnings 8565a8b Merge pull request openembedded#254 from edbaunton/edbaunton/man-mkcomposefs-inline b99a978 man mkcomposefs: detail inlining logic 47f6949 Merge pull request openembedded#253 from rborn-tx/support-older-linux-headers 453eaef ci: Add build test for Ubuntu Focal 384f306 mount: Allow building when macro LOOP_CONFIGURE is not available f163eba mount: Allow building when macro MOUNT_ATTR_IDMAP is not available 80e99bd Merge pull request openembedded#250 from cgwalters/doc-verification f6e8510 README.md: Fix markdownlint warnings 3b7e567 README.md: Drop removed `signed` mount option 091b51f Merge pull request openembedded#247 from cgwalters/readlinkat-overflow 232336d Merge pull request openembedded#248 from cgwalters/more-analyzer a6904d6 writer: Close mmap leak e9632ca Merge pull request openembedded#246 from eriksjolund/handle-null-from-strndup 6b2192b writer: Fix (almost certainly unreachable) overflow bdc2c4c mkcomposefs: Handle NULL from strndup() e63786d Merge pull request openembedded#245 from giuseppe/run-distcheck-ci 5d3fe92 tests: do not hardcode number of threads d6e55bf .github: run make distcheck as part of the CI f6bbf54 Merge pull request openembedded#244 from alexlarsson/mount-api 4e5883b mount.composefs: Add tryverity option 15bdcd6 lib: Add TRY_VERITY mount option f884f57 mount: Use the new lowerdir+ and datadir+ options bd6ce95 Merge pull request openembedded#243 from giuseppe/add-fuzzing 171eae0 mkcompose: fix crash if no target for hardlink 7b1518f mkcomposefs: tree_from_dump does not exit(2) on errors a8ac3d5 mkcomposefs: reject dump without root node 28a9d6b tests: add fuzzing tests for mkcomposefs 932f748 tools: add fuzzing entrypoint for mkcomposefs Signed-off-by: Jose Quaresma <[email protected]>
- This is required to add the native target support. - Drop upstream merged patch: 0001-musl-basename-use-portable-implementation-for-basena.patch containers/composefs#273 Changelog: $ git --no-pager log --oneline HEAD...v1.0.3 ecef20c (HEAD -> main, origin/main, origin/HEAD) Merge pull request #276 from wahtari/copy_file_range e78c7a4 Merge pull request #277 from alexlarsson/fix-newline-error 1d82bc1 mkcomposefs: Drop newline from error string 3e38d73 Added copy_file_range for faster file copy. 85a693d Merge pull request #273 from fboudra/musl-basename 31afa13 musl: basename: use portable implementation for basename API 4776580 Merge pull request #275 from eriksjolund/fix-spelling-in-error-message 4a68a42 Merge pull request #269 from wahtari/threading-for-mkcomposefs 7266546 fuse: fix spelling in error message b49499b added threads in mkcomposefs for digest calculation and file copy d144db0 refactored lcfs_load_node_from_file to enable multi-threading in mkcomposefs af69922 Merge pull request #266 from eriksjolund/erofs-add-missing-free 1eecf38 Merge pull request #267 from eriksjolund/mkcomposefs-add-missing-free a880713 mkcomposefs: Add missing free() 456d618 erofs: Add missing free() and lcfs_node_unref() 1179638 Merge pull request #265 from eriksjolund/handle-empty-basedir-option 301b78f Merge pull request #268 from eriksjolund/set-errno-for-unknown-format 09ca740 writer: Set errno for unknown format a96f786 mountcomposefs: Handle empty basedir option fc9a526 Merge pull request #260 from eriksjolund/handle-error-from-build-node 9b85011 Merge pull request #262 from eriksjolund/add-error-check-and-rearrange 2cb505b Merge pull request #263 from eriksjolund/writer-set-errno 9b417be writer: Set errno d5ffbeb Merge pull request #261 from eriksjolund/add-missing-node-unref 9c393a4 Merge pull request #259 from eriksjolund/handle-error-from-node-set-content 396a3b8 mkcomposefs: Handle NULL from lcfs_node_new() 238a94a lib: Set errno in lcfs_node_new() c1181fa erofs: Handle error from lcfs_build_node_from_image() 49288d5 erofs, mkcomposefs: Handle error from lcfs_node_set_content() 4e0b147 lib: Add missing lcfs_node_unref() 9bc76dd Merge pull request #258 from eriksjolund/fix-missing-options d59dd9b mountcomposefs, mkcomposefs: Add missing options to usage information 418f4f7 Merge pull request #255 from cgwalters/mount-minor-tweaks 72c602a Merge pull request #256 from eriksjolund/fix-error-message 770cc36 fuse: Fix filepath argument in error message 465c079 man/mount.composefs: Fix a typo and two markdown lint warnings 8565a8b Merge pull request #254 from edbaunton/edbaunton/man-mkcomposefs-inline b99a978 man mkcomposefs: detail inlining logic 47f6949 Merge pull request #253 from rborn-tx/support-older-linux-headers 453eaef ci: Add build test for Ubuntu Focal 384f306 mount: Allow building when macro LOOP_CONFIGURE is not available f163eba mount: Allow building when macro MOUNT_ATTR_IDMAP is not available 80e99bd Merge pull request #250 from cgwalters/doc-verification f6e8510 README.md: Fix markdownlint warnings 3b7e567 README.md: Drop removed `signed` mount option 091b51f Merge pull request #247 from cgwalters/readlinkat-overflow 232336d Merge pull request #248 from cgwalters/more-analyzer a6904d6 writer: Close mmap leak e9632ca Merge pull request #246 from eriksjolund/handle-null-from-strndup 6b2192b writer: Fix (almost certainly unreachable) overflow bdc2c4c mkcomposefs: Handle NULL from strndup() e63786d Merge pull request #245 from giuseppe/run-distcheck-ci 5d3fe92 tests: do not hardcode number of threads d6e55bf .github: run make distcheck as part of the CI f6bbf54 Merge pull request #244 from alexlarsson/mount-api 4e5883b mount.composefs: Add tryverity option 15bdcd6 lib: Add TRY_VERITY mount option f884f57 mount: Use the new lowerdir+ and datadir+ options bd6ce95 Merge pull request #243 from giuseppe/add-fuzzing 171eae0 mkcompose: fix crash if no target for hardlink 7b1518f mkcomposefs: tree_from_dump does not exit(2) on errors a8ac3d5 mkcomposefs: reject dump without root node 28a9d6b tests: add fuzzing tests for mkcomposefs 932f748 tools: add fuzzing entrypoint for mkcomposefs Signed-off-by: Jose Quaresma <[email protected]> Signed-off-by: Khem Raj <[email protected]>
- This is required to add the native target support. - Drop upstream merged patch: 0001-musl-basename-use-portable-implementation-for-basena.patch containers/composefs#273 Changelog: $ git --no-pager log --oneline HEAD...v1.0.3 ecef20c (HEAD -> main, origin/main, origin/HEAD) Merge pull request #276 from wahtari/copy_file_range e78c7a4 Merge pull request #277 from alexlarsson/fix-newline-error 1d82bc1 mkcomposefs: Drop newline from error string 3e38d73 Added copy_file_range for faster file copy. 85a693d Merge pull request #273 from fboudra/musl-basename 31afa13 musl: basename: use portable implementation for basename API 4776580 Merge pull request #275 from eriksjolund/fix-spelling-in-error-message 4a68a42 Merge pull request #269 from wahtari/threading-for-mkcomposefs 7266546 fuse: fix spelling in error message b49499b added threads in mkcomposefs for digest calculation and file copy d144db0 refactored lcfs_load_node_from_file to enable multi-threading in mkcomposefs af69922 Merge pull request #266 from eriksjolund/erofs-add-missing-free 1eecf38 Merge pull request #267 from eriksjolund/mkcomposefs-add-missing-free a880713 mkcomposefs: Add missing free() 456d618 erofs: Add missing free() and lcfs_node_unref() 1179638 Merge pull request #265 from eriksjolund/handle-empty-basedir-option 301b78f Merge pull request #268 from eriksjolund/set-errno-for-unknown-format 09ca740 writer: Set errno for unknown format a96f786 mountcomposefs: Handle empty basedir option fc9a526 Merge pull request #260 from eriksjolund/handle-error-from-build-node 9b85011 Merge pull request #262 from eriksjolund/add-error-check-and-rearrange 2cb505b Merge pull request #263 from eriksjolund/writer-set-errno 9b417be writer: Set errno d5ffbeb Merge pull request #261 from eriksjolund/add-missing-node-unref 9c393a4 Merge pull request #259 from eriksjolund/handle-error-from-node-set-content 396a3b8 mkcomposefs: Handle NULL from lcfs_node_new() 238a94a lib: Set errno in lcfs_node_new() c1181fa erofs: Handle error from lcfs_build_node_from_image() 49288d5 erofs, mkcomposefs: Handle error from lcfs_node_set_content() 4e0b147 lib: Add missing lcfs_node_unref() 9bc76dd Merge pull request #258 from eriksjolund/fix-missing-options d59dd9b mountcomposefs, mkcomposefs: Add missing options to usage information 418f4f7 Merge pull request #255 from cgwalters/mount-minor-tweaks 72c602a Merge pull request #256 from eriksjolund/fix-error-message 770cc36 fuse: Fix filepath argument in error message 465c079 man/mount.composefs: Fix a typo and two markdown lint warnings 8565a8b Merge pull request #254 from edbaunton/edbaunton/man-mkcomposefs-inline b99a978 man mkcomposefs: detail inlining logic 47f6949 Merge pull request #253 from rborn-tx/support-older-linux-headers 453eaef ci: Add build test for Ubuntu Focal 384f306 mount: Allow building when macro LOOP_CONFIGURE is not available f163eba mount: Allow building when macro MOUNT_ATTR_IDMAP is not available 80e99bd Merge pull request #250 from cgwalters/doc-verification f6e8510 README.md: Fix markdownlint warnings 3b7e567 README.md: Drop removed `signed` mount option 091b51f Merge pull request #247 from cgwalters/readlinkat-overflow 232336d Merge pull request #248 from cgwalters/more-analyzer a6904d6 writer: Close mmap leak e9632ca Merge pull request #246 from eriksjolund/handle-null-from-strndup 6b2192b writer: Fix (almost certainly unreachable) overflow bdc2c4c mkcomposefs: Handle NULL from strndup() e63786d Merge pull request #245 from giuseppe/run-distcheck-ci 5d3fe92 tests: do not hardcode number of threads d6e55bf .github: run make distcheck as part of the CI f6bbf54 Merge pull request #244 from alexlarsson/mount-api 4e5883b mount.composefs: Add tryverity option 15bdcd6 lib: Add TRY_VERITY mount option f884f57 mount: Use the new lowerdir+ and datadir+ options bd6ce95 Merge pull request #243 from giuseppe/add-fuzzing 171eae0 mkcompose: fix crash if no target for hardlink 7b1518f mkcomposefs: tree_from_dump does not exit(2) on errors a8ac3d5 mkcomposefs: reject dump without root node 28a9d6b tests: add fuzzing tests for mkcomposefs 932f748 tools: add fuzzing entrypoint for mkcomposefs Signed-off-by: Jose Quaresma <jose.quaresmafoundries.io> Signed-off-by: Khem Raj <raj.khemgmail.com>
musl has removed the non-prototype declaration of basename from string.h which now results in build errors with newer clang compilers.
Implement GNU basename behavior using strchr which is portable across libcs.
Fixes:
| ../../git/tools/mountcomposefs.c:43:20:
| error: call to undeclared function 'basename'; ISO C99 and later do not | support implicit function declarations [-Wimplicit-function-declaration]
| 43 | const char *bin = basename(argv0);
| | ^
| ../../git/tools/mountcomposefs.c:43:14:
| error: incompatible integer to pointer conversion initializing 'const char *'
| with an expression of type 'int' [-Wint-conversion]
| 43 | const char *bin = basename(argv0);
| | ^ ~~~~~~~~~~~~~~~
For reference:
https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7
Closes: #272