Re: [Rpm-maint] [rpm-software-management/rpm] Fix missing includes on macOS (PR #2571)
Heh, I very nearly reverted the duplicate-filename patch as bogus, there's no casting away being done in the code. Luckily I did check this conversation first :laughing: So the "weird" part here is why we were not seeing that const warning with glibc, but the answer is: because glibc has its own version of basename() where the argument *is* const. So yep, duping the path is the right thing to do, even if the posix basename() is dumb. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2571#issuecomment-1667563550 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Fix missing includes on macOS (PR #2571)
Merged #2571 into master. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2571#event-9924253332 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Fix missing includes on macOS (PR #2571)
@Conan-Kudo approved this pull request. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2571#pullrequestreview-1547721323 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Fix missing includes on macOS (PR #2571)
Sorry, this cast to (char*) makes me feel uneasy even if it is save here. Will merge after the test suite passes. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2571#issuecomment-1651780526 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Fix missing includes on macOS (PR #2571)
@ffesti pushed 3 commits. a1ead60c4e936fc154df917b54027a2e008b12b3 Fix missing signal.h include c3db93214ec4f373be2d76c732efd7f7fc7dcdc7 Fix missing basename include on macOS 39f007b68e6f7d99d223a0e06076d88a8e4355bb Duplicate filename before passing it to basename -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/2571/files/cd8878d51fc1d8dc177bed2a4e622eb07570a91c..39f007b68e6f7d99d223a0e06076d88a8e4355bb You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Fix missing includes on macOS (PR #2571)
@Conan-Kudo approved this pull request. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2571#pullrequestreview-1526434141 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Fix missing includes on macOS (PR #2571)
@NattyNarwhal pushed 1 commit. cd8878d51fc1d8dc177bed2a4e622eb07570a91c Cast to fix constiness checks -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/2571/files/56831f16ff2588bc61c9a252fb3157f5246c47f7..cd8878d51fc1d8dc177bed2a4e622eb07570a91c You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Fix missing includes on macOS (PR #2571)
That's weird, `basename(3)` should take a `char*`, not `const char*`, per the glibc and macOS man page. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2571#issuecomment-163278 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Fix missing includes on macOS (PR #2571)
@Conan-Kudo requested changes on this pull request. Looks like this isn't working exactly: >From CI: ``` [ 73%] Building C object CMakeFiles/rpmuncompress.dir/tools/rpmuncompress.c.o /srv/rpm/tools/rpmuncompress.c: In function 'doUntar': /srv/rpm/tools/rpmuncompress.c:101:39: error: passing argument 1 of '__xpg_basename' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] 101 | const char *bn = basename(fn); | ^~ In file included from /srv/rpm/tools/rpmuncompress.c:4: /usr/include/libgen.h:34:36: note: expected 'char *' but argument is of type 'const char *' 34 | extern char *__xpg_basename (char *__path) __THROW; | ~~^~ cc1: all warnings being treated as errors make[3]: *** [CMakeFiles/rpmuncompress.dir/build.make:76: CMakeFiles/rpmuncompress.dir/tools/rpmuncompress.c.o] Error 1 make[2]: *** [CMakeFiles/Makefile2:703: CMakeFiles/rpmuncompress.dir/all] Error 2 ``` -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2571#pullrequestreview-1526023267 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Fix missing includes on macOS (PR #2571)
@Conan-Kudo approved this pull request. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2571#pullrequestreview-1526020644 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
[Rpm-maint] [rpm-software-management/rpm] Fix missing includes on macOS (PR #2571)
These two headers were missing, and would break with implicit function declarations disabled. I assume glibc and friends includes these through other headers. This should fix the build on macOS. You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/2571 -- Commit Summary -- * Fix missing signal.h include * Fix missing basename include on macOS -- File Changes -- M lib/rpmscript.c (1) M tools/rpmuncompress.c (1) -- Patch Links -- https://github.com/rpm-software-management/rpm/pull/2571.patch https://github.com/rpm-software-management/rpm/pull/2571.diff -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2571 You are receiving this because you are subscribed to this thread. Message ID: rpm-software-management/rpm/pull/2...@github.com ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint