Skip Menu |

This queue is for tickets about the App-CPANtoRPM CPAN distribution.

Report information
The Basics
Id: 113482
Status: resolved
Priority: 0/
Queue: App-CPANtoRPM

People
Owner: Nobody in particular
Requestors: Douglas.Irvine [...] fisglobal.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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.
I haven't touched AIX is a LONG time! I'd forgotten all about truss. Thanks for the patch. I've modified it a bit to add some checking (i.e. not all versions of rpm support -ba, so I've tried to build that in). Could you download a new copy of the module from: http://sullybeck.com/App-CPANtoRPM-1.05.tar.gz and give it a shot? If it works, I'll send it out to CPAN in the next day or so. Thanks
Subject: RE: [rt.cpan.org #113482] fixes for AIX platforms
Date: Thu, 31 Mar 2016 19:52:44 +0000
To: "bug-App-CPANtoRPM [...] rt.cpan.org" <bug-App-CPANtoRPM [...] rt.cpan.org>
From: "Irvine, Douglas" <Douglas.Irvine [...] fisglobal.com>
I'l give it a whirl tomorrow, thanks for the prompt reponse!! Show quoted text
-----Original Message----- From: Sullivan Beck via RT [mailto:bug-App-CPANtoRPM@rt.cpan.org] Sent: Thursday, March 31, 2016 3:52 PM To: Irvine, Douglas <Douglas.Irvine@fisglobal.com> Subject: [rt.cpan.org #113482] fixes for AIX platforms <URL: https://rt.cpan.org/Ticket/Display.html?id=113482 > I haven't touched AIX is a LONG time! I'd forgotten all about truss. Thanks for the patch. I've modified it a bit to add some checking (i.e. not all versions of rpm support -ba, so I've tried to build that in). Could you download a new copy of the module from: https://urldefense.proofpoint.com/v2/url?u=http-3A__sullybeck.com_App-2DCPANtoRPM-2D1.05.tar.gz&d=BQIDaQ&c=3BfiSO86x5iKjpl2b39jud9R1NrKYqPq2js90dwBswk&r=_nox2a4idt77YZCJzPo8KdAuqVGX_MT6x1LfAJq-kFg&m=WNJkhSDcthuPJ8jjjlsLqoFIdpAtC_nNROnSC9f7Sn8&s=2r8a7MnqtSle8_ebX_k_3iVOKhamutbOkOuR6I5lvAg&e= and give it a shot? If it works, I'll send it out to CPAN in the next day or so. Thanks
_____________ 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.
_____________ 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.
Subject: RE: [rt.cpan.org #113482] fixes for AIX platforms
Date: Mon, 4 Apr 2016 11:33:20 +0000
To: "bug-App-CPANtoRPM [...] rt.cpan.org" <bug-App-CPANtoRPM [...] rt.cpan.org>
From: "Irvine, Douglas" <Douglas.Irvine [...] fisglobal.com>
Some modifications are necessary... my $strace = $self->_find_exe('strace'); if (! $strace) { $strace = $self->_find_exe('truss'); } if (! $strace) { $self->_log_message('ERR','strace executable not found'); } Assumes that the strace on AIX is the strace that is on linux. It's not =-( https://www.ibm.com/support/knowledgecenter/ssw_aix_53/com.ibm.aix.cmds/doc/aixcmds5/strace.htm so either we need to reverse the preference so truss is preferred to strace on systems that have truss, or figure out a way to differentiate between the AIX strace command and that on linux (see if strace -V returns a version? it doesn't on AIX, it returns 'usage: strace [mid sid level] ...'. Thanks for looking into this with me! --douglas Show quoted text
-----Original Message----- From: Sullivan Beck via RT [mailto:bug-App-CPANtoRPM@rt.cpan.org] Sent: Thursday, March 31, 2016 3:52 PM To: Irvine, Douglas <Douglas.Irvine@fisglobal.com> Subject: [rt.cpan.org #113482] fixes for AIX platforms <URL: https://rt.cpan.org/Ticket/Display.html?id=113482 > I haven't touched AIX is a LONG time! I'd forgotten all about truss. Thanks for the patch. I've modified it a bit to add some checking (i.e. not all versions of rpm support -ba, so I've tried to build that in). Could you download a new copy of the module from: https://urldefense.proofpoint.com/v2/url?u=http-3A__sullybeck.com_App-2DCPANtoRPM-2D1.05.tar.gz&d=BQIDaQ&c=3BfiSO86x5iKjpl2b39jud9R1NrKYqPq2js90dwBswk&r=_nox2a4idt77YZCJzPo8KdAuqVGX_MT6x1LfAJq-kFg&m=WNJkhSDcthuPJ8jjjlsLqoFIdpAtC_nNROnSC9f7Sn8&s=2r8a7MnqtSle8_ebX_k_3iVOKhamutbOkOuR6I5lvAg&e= and give it a shot? If it works, I'll send it out to CPAN in the next day or so. Thanks
_____________ 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.
_____________ 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.
Okay, sorry for the back and forth. I didn't know that AIX also had an strace command. I've modified the patch to include the OS test that you originally suggested. You can download the new version from the same location as before. It should work this time.
Subject: RE: [rt.cpan.org #113482] fixes for AIX platforms
Date: Mon, 4 Apr 2016 13:32:57 +0000
To: "bug-App-CPANtoRPM [...] rt.cpan.org" <bug-App-CPANtoRPM [...] rt.cpan.org>
From: "Irvine, Douglas" <Douglas.Irvine [...] fisglobal.com>
No worries at all! One last suggestion: in your _find_exe() sub, test for the path not being a dir. I just happened to have a dir called 'rpm' in my path in front of the path to the actual exe by happenstance and noticed this. ############################################################################### # Find $exe in ENV{PATH} or one of the directories in @extra_path . # sub _find_exe { my($self,$exe,@extra_path) = @_; my @path = split(/:/,$ENV{PATH}); unshift(@path,@extra_path); foreach my $d (@path) { return "$d/$exe" if (-x "$d/$exe" && ! -d _); } return ''; } Your changes worked perfect once I added this in even when a dir came up first in the path search for 'rpm'. Thank you so much for your assistance! Show quoted text
-----Original Message----- From: Sullivan Beck via RT [mailto:bug-App-CPANtoRPM@rt.cpan.org] Sent: Monday, April 04, 2016 8:51 AM To: Irvine, Douglas <Douglas.Irvine@fisglobal.com> Subject: [rt.cpan.org #113482] fixes for AIX platforms <URL: https://rt.cpan.org/Ticket/Display.html?id=113482 > Okay, sorry for the back and forth. I didn't know that AIX also had an strace command. I've modified the patch to include the OS test that you originally suggested. You can download the new version from the same location as before. It should work this time.
_____________ 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.
_____________ 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.
I'll modify _find_exe as suggested. I'll release a new version today or tomorrow with these changes. Thanks for the report and patch.