Skip to content

Conversation

@sswamy48
Copy link
Contributor

@sswamy48 sswamy48 commented Nov 24, 2025

AIX don't have xgetprogname & xsetprogname.

Hence, we see an compilation error due to missing xgetprogname & xsetprogname.
The proposed patch fixes the compilation error by implementing these missing function.

We can launch rpm program without any issue, and also run some query commands (With some local changes which we would be contributing).

$ LIBPATH=/opt/freeware/lib/gcc/powerpc-ibm-aix7.3.0.0/10/pthread/ppc64 ./tools/rpm RPM version 6.0.90
Copyright (C) 1998-2002 - Red Hat, Inc.
This program may be freely redistributed under the terms of the GNU GPL

Usage: rpm [-afgpqlsiv?] [-a|--all] [-f|--file] [--path] [-g|--group] [-p|--package] [-q|--query] [--triggeredby]
.......

Please review the changes and let us know if any comments.

AIX don't have xgetprogname & xsetprogname.
Hence, we see an compilation error due to missing xgetprogname & xsetprogname.
The proposed patch fixes the compilation error by implementing these missing function.
We launch rpm program without any issue (other local changes).
$ LIBPATH=/opt/freeware/lib/gcc/powerpc-ibm-aix7.3.0.0/10/pthread/ppc64 ./tools/rpm
RPM version 6.0.90
Copyright (C) 1998-2002 - Red Hat, Inc.
This program may be freely redistributed under the terms of the GNU GPL

Usage: rpm [-afgpqlsiv?] [-a|--all] [-f|--file] [--path] [-g|--group] [-p|--package] [-q|--query] [--triggeredby]
@sswamy48 sswamy48 requested a review from a team as a code owner November 24, 2025 15:08
@sswamy48 sswamy48 requested review from dmnks and removed request for a team November 24, 2025 15:08
@dmnks
Copy link
Contributor

dmnks commented Nov 26, 2025

We used to implement these functions until commit fa06b68 where they were dropped. This is surely a more minimal implementation than the old one, though. I don't see why not re-introduce these if they're useful on AIX. @pmatilai, any thoughts?

@dmnks
Copy link
Contributor

dmnks commented Nov 26, 2025

Hmm, having written the above comment, I just realized one thing:

This is not an AIX specific thing, is it? In that case it shouldn't be tied to the AIX platform but rather be part of the else branch, basically how it was before the commit mentioned above.

I guess the same applies to #4051 as well.

Copy link
Member

@pmatilai pmatilai left a comment

Choose a reason for hiding this comment

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

Yeah if we need it then lets resurrect the old generic implementation, it was only really dropped because it was broken and thus clearly not used by anything.

The issue with this smaller patch is that it redefines and initializes the "char *aix_progname = NULL" variable in every single compilation unit that includes system.h, and that happens to be every single source file in rpm. At least gcc refuses to compile such a construct at all. Variables need to defined in source files, not headers.

@dmnks
Copy link
Contributor

dmnks commented Nov 27, 2025

Ack, I'll do that.

@dmnks dmnks closed this Nov 27, 2025
dmnks added a commit to dmnks/rpm that referenced this pull request Nov 27, 2025
Turns out some platforms (such as AIX) don't implement these.

Related: rpm-software-management#4053

This reverts commit fa06b68.
dmnks added a commit to dmnks/rpm that referenced this pull request Nov 27, 2025
Fix minor issues with the original code reverted in the previous commit
that prevented it from compiling cleanly (mostly around the const usage)
and actually enable it if no system implementation is available (such as
on AIX).

Note that this new source file is tiny so it's included in libmisc
instead of a new target, and librpm is linked against it.

Related: rpm-software-management#4053
dmnks added a commit to dmnks/rpm that referenced this pull request Nov 27, 2025
Turns out some platforms (such as AIX) don't implement these.

Don't compile it just yet, it needs some fixing up, which will be done
in the next commit.

Related: rpm-software-management#4053

This reverts commit fa06b68.
dmnks added a commit to dmnks/rpm that referenced this pull request Nov 27, 2025
Fix minor issues with the original code reverted in the previous commit
that prevented it from compiling cleanly (mostly around the const usage)
and actually enable it if no system implementation is available (such as
on AIX).

Note that this new source file is tiny so it's included in libmisc
instead of a new target, and librpm is linked against it.

Related: rpm-software-management#4053
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