Subject: | fixes for AIX platforms |
Date: | Thu, 31 Mar 2016 15:12:35 +0000 |
To: | "bug-App-CPANtoRPM [...] rt.cpan.org" <bug-App-CPANtoRPM [...] rt.cpan.org> |
From: | "Irvine, Douglas" <Douglas.Irvine [...] fisglobal.com> |
Hi, I am greatly impressed with this module, am exploring it's usefulness. I have discovered some small issues when using on the AIX platform.
1) strace: strace is a totally different utility on AIX (and some other unixes). the utility that performs in like manner to the Linux strace tool on AIX is 'truss'.
2) AIX ships with an old version of rpm (3.05) which deosn't have the rpmbuild executable. The standard rpm command accepts the -ba option and functions identically.
Here's some dirty hacks that got it working for my platform (AIX 7.1):
$ diff CPANtoRPM.pm CPANtoRPM.pm.new
1325a1326,1329
Show quoted text
> #try to find the rpm command, rpm -ba also works on AIX
> $rpmbuild = $self->_find_exe("rpm");
> }
> if (! $rpmbuild) {
3294c3298,3306
< my $strace = $self->_find_exe('strace');
---
Show quoted text> my $strace;
>
> if ($^O eq 'aix') {
> $strace = $self->_find_exe('truss');
> }
> else {
> $strace = $self->_find_exe('strace');
> }
>
3310c3322
< if (! $trace) {
---
Show quoted text> if (! $trace ) {
3318c3330,3331
< $trace =~ /Operation not permitted/) {
---
Show quoted text> $trace =~ /Operation not permitted/ ||
> $trace =~ /Cannot control process/) {
Show quoted text_____________
The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.