I'm creating an RPM for AIX using
builder.setPlatform(Architecture.PPC, Os.AIX)
which results in the value 6 for the OS field in the RPM lead instead of the expected 5.
The OS values in org.redline_rpm.header.Os are written by Lead.write() using the ordinal value of the enum:
buffer.putShort(( short) (os.ordinal() != 0 ? os.ordinal() : 0xFF));
In /usr/lib/rpm/rpmrc, the values for AmigaOS and AIX are the same (5), but the Os enum has constants for both AmigaOS and AIX. This results in all OSs from AIX onwards being off-by-one.
The simplest solution would to fold the AMIGAOS and AIX enum values into one called AMIGAOS_OR_AIX, otherwise a more sophisticated mapping is required.
I'm creating an RPM for AIX using builder.setPlatform(Architecture.PPC, Os.AIX) which results in the value 6 for the OS field in the RPM lead instead of the expected 5.
The OS values in org.redline_rpm.header.Os are written by Lead.write() using the ordinal value of the enum: buffer.putShort(( short) (os.ordinal() != 0 ? os.ordinal() : 0xFF));
In /usr/lib/rpm/rpmrc, the values for AmigaOS and AIX are the same (5), but the Os enum has constants for both AmigaOS and AIX. This results in all OSs from AIX onwards being off-by-one.
The simplest solution would to fold the AMIGAOS and AIX enum values into one called AMIGAOS_OR_AIX, otherwise a more sophisticated mapping is required.