Author Topic: Creating a RPM package for PMDLL  (Read 1609 times)

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 532
  • -Receive: 105
  • Posts: 2861
  • Karma: +5/-0
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Creating a RPM package for PMDLL
« Reply #15 on: October 07, 2020, 03:21:58 am »
Thanks for the suggestion.

Try:

Code: [Select]
%wps_object_create_begin
PMDLL_EXE:WPProgram|PMDLL|<WP_DESKTOP>|EXENAME=((%{_bindir}/PMDLL.EXE));ASSOCTYPE=Executable,Dynamic Link Library;ASSOCFILTER=*.EXE,*.DLL|R
%wps_object_create_end

By the way: you can only set the ASSOCTYPE's that actually exists. On my system, "Executable" exists but not "Dynamic Link Library". Check your XWorkplace Workplace Shell Object.
In the end, the "lengthy" string that you specify as the 4.parameter (where parameters are separated by |) follows the setup strings as described in the "Workplace Shell Programming Reference"

What is the "|R" at the end?

By the way, on ArcaOS I have a "Dynamic Link Library" on WPS and it even seems to assign ok the Association.  (Check attached picture)

I changed the "%wps_object_create_begin", but I still get a freeze on the WPS-OBJECT.EXE file and the desktop gets locked when I install the rpm package.

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Lars

  • Hero Member
  • *****
  • Thank You
  • -Given: 0
  • -Receive: 65
  • Posts: 643
  • Karma: +2/-0
    • View Profile
Re: Creating a RPM package for PMDLL
« Reply #16 on: October 07, 2020, 09:13:36 am »
1) go to directory \var\cache\rpm\wps\packages and check if you find a file for your package (PMDLL). Have a look at the contained file and check if the string resolves to what you expect it to be
2) try to do a "dry" run of wps-object.exe:
   a) change to directory \usr\lib\rpm\pc
   b) invoke: wps-object.exe /create pmdll "PMDLL_EXE:WPProgram|PMDLL|<WP_DESKTOP>|EXENAME=((%{_bindir}/PMDLL.EXE));ASSOCTYPE=Executable,Dynamic Link Library;ASSOCFILTER=*.EXE,*.DLL;|R"

That should create the desktop icon. Of couse, since the path does not properly resolve, it will not work. But that will let you check if wps-object.exe runs unobstructed. If the latter fails then you know you have a problem with your WPS. If it succeeds, it means you have a problem somewhere else in your spec file or a broken RPM installation that possibly fails in resolving the %{_bindir} variable.

The "R" stands for "replace" in contrast to "U" which stands for "update". Since "update" is the default, you do not need to specify it.

All of this is explained here:http://trac.netlabs.org/rpm/changeset/91

That will also show you that wps-object.exe really is just a simple REXX script that has been compiled into an executable (via the REXX2EXE tool from Veit Kannegieser).

Lars


« Last Edit: October 07, 2020, 09:21:43 am by Lars »

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 532
  • -Receive: 105
  • Posts: 2861
  • Karma: +5/-0
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Creating a RPM package for PMDLL
« Reply #17 on: October 10, 2020, 03:22:31 am »
Hi
1) go to directory \var\cache\rpm\wps\packages and check if you find a file for your package (PMDLL). Have a look at the contained file and check if the string resolves to what you expect it to be
I didn't find any folder related to PMDLL.


2) try to do a "dry" run of wps-object.exe:
   a) change to directory \usr\lib\rpm\pc
   b) invoke: wps-object.exe /create pmdll "PMDLL_EXE:WPProgram|PMDLL|<WP_DESKTOP>|EXENAME=((%{_bindir}/PMDLL.EXE));ASSOCTYPE=Executable,Dynamic Link Library;ASSOCFILTER=*.EXE,*.DLL;|R"
It worked very fast to create a WPS Object on the desktop and it didn't hang.

But now I have a problem with YUM and RPM. Now everytime I try to run YUM I get a error that says it is locked. (Check Screenshot)

Any it to unlock YUM is welcome.

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

ivan

  • Hero Member
  • *****
  • Thank You
  • -Given: 2
  • -Receive: 45
  • Posts: 1225
  • Karma: +2/-0
    • View Profile
Re: Creating a RPM package for PMDLL
« Reply #18 on: October 10, 2020, 05:07:55 am »
Have you used something like Task Buster to check what is attached to the PID displayed?  It might give you some idea of what is going on as well as allowing the possibility of killing it.,

EDIT to attach Task Buster in zip format.
« Last Edit: October 10, 2020, 05:16:36 am by ivan »

Dave Yeo

  • Hero Member
  • *****
  • Thank You
  • -Given: 11
  • -Receive: 195
  • Posts: 2715
  • Karma: +16/-0
    • View Profile
Re: Creating a RPM package for PMDLL
« Reply #19 on: October 10, 2020, 09:07:52 am »
Yum probably crashed and left its PID file behind and now that it sees it, thinks it is already running. Try deleting the PID file.

Lars

  • Hero Member
  • *****
  • Thank You
  • -Given: 0
  • -Receive: 65
  • Posts: 643
  • Karma: +2/-0
    • View Profile
Re: Creating a RPM package for PMDLL
« Reply #20 on: October 10, 2020, 12:40:06 pm »
One Thing is clear by now: you have a screwed installation of yum/rpm.
I suggest you redo the install of yum/rpm via ANPM, if possible. Possibly also python.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 532
  • -Receive: 105
  • Posts: 2861
  • Karma: +5/-0
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Creating a RPM package for PMDLL
« Reply #21 on: October 11, 2020, 04:30:28 am »
Hi

I reset the VM to a previous snapshot where RPM/YUM worked fine.
I created PMDLL rpm and install it again, but it keeps stalling at the wps-object.exe process and slowing down the PM desktop. (CPU does not spike). If I stop the installation procedure, the desktop remains unreliable (a reboot was required). I'm attaching the specs file.

If I remove the ";ASSOCTYPE=Executable,Dynamic Link Library;ASSOCFILTER=*.EXE,*.DLL;", the rpm package works perfectly, but does not associate the type and filters of course.

Any other experience trying ASSOCTYPE= and ASSOCFILTER= with RPM?

Regards

« Last Edit: October 11, 2020, 04:32:52 am by Martin Iturbide »
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 532
  • -Receive: 105
  • Posts: 2861
  • Karma: +5/-0
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Creating a RPM package for PMDLL
« Reply #22 on: October 11, 2020, 05:26:35 am »
Hi

I also tried a different sample, since Ivan posted the Task Buster binaries. So I tried to create a rpm package for it.

But I may be missing something on the .spec, since the installer tells me it required BUSTER.DLL and I had included it on the package.

This is the error I get:

Code: [Select]
[C:\HOME\RPMBUILD\RPMS\I686]yum install TaskBuster-2.00-1.oc00.i686.rpm
Setting up Install Process
Examining TaskBuster-2.00-1.oc00.i686.rpm: TaskBuster-2.00-1.oc00.i686
Marking TaskBuster-2.00-1.oc00.i686.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package TaskBuster.i686 0:2.00-1.oc00 will be installed
--> Processing Dependency: buster.dll for package: TaskBuster-2.00-1.oc00.i686
--> Finished Dependency Resolution
Error: Package: TaskBuster-2.00-1.oc00.i686 (/TaskBuster-2.00-1.oc00.i686)
           Requires: buster.dll
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

Any tips on how I tell the rpm installer that BUSTER.DLL is already included there?

Regards
« Last Edit: October 11, 2020, 05:30:03 am by Martin Iturbide »
Martin Iturbide
OS2World NewsMaster
... just share the dream.

ivan

  • Hero Member
  • *****
  • Thank You
  • -Given: 2
  • -Receive: 45
  • Posts: 1225
  • Karma: +2/-0
    • View Profile
Re: Creating a RPM package for PMDLL
« Reply #23 on: October 11, 2020, 07:07:46 pm »
Hi Martin,

One thing I found with the Task Buster program is that both the exe and dll need to be in the same directory.  I don't know if that will help, I'm a hardware engineer that employed others to do the software.

Lars

  • Hero Member
  • *****
  • Thank You
  • -Given: 0
  • -Receive: 65
  • Posts: 643
  • Karma: +2/-0
    • View Profile
Re: Creating a RPM package for PMDLL
« Reply #24 on: October 11, 2020, 10:44:04 pm »
Martin's problem is not a runtime problem but an installation problem.
Nonetheless, if what you say is true, that also means that Martin will have to change the spec file accordingly.

Lars

  • Hero Member
  • *****
  • Thank You
  • -Given: 0
  • -Receive: 65
  • Posts: 643
  • Karma: +2/-0
    • View Profile
Re: Creating a RPM package for PMDLL
« Reply #25 on: October 12, 2020, 03:30:18 pm »
Hi

I also tried a different sample, since Ivan posted the Task Buster binaries. So I tried to create a rpm package for it.

But I may be missing something on the .spec, since the installer tells me it required BUSTER.DLL and I had included it on the package.

This is the error I get:

Code: [Select]
[C:\HOME\RPMBUILD\RPMS\I686]yum install TaskBuster-2.00-1.oc00.i686.rpm
Setting up Install Process
Examining TaskBuster-2.00-1.oc00.i686.rpm: TaskBuster-2.00-1.oc00.i686
Marking TaskBuster-2.00-1.oc00.i686.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package TaskBuster.i686 0:2.00-1.oc00 will be installed
--> Processing Dependency: buster.dll for package: TaskBuster-2.00-1.oc00.i686
--> Finished Dependency Resolution
Error: Package: TaskBuster-2.00-1.oc00.i686 (/TaskBuster-2.00-1.oc00.i686)
           Requires: buster.dll
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

Any tips on how I tell the rpm installer that BUSTER.DLL is already included there?

Regards

Hi Martin,
have you looked at https://www.golinuxcloud.com/how-to-create-rpm-package-in-linux/ or similar pages ?

What you need to do is set up a directory structure in some temporary dir to DIRECTLY reflect the directory structure that you specify in %files in the spec file which is also the directory structure that you want to exist or be created on the installation target (for example, an "bin" dir for executables and a "lib" dir for DLLs). You then create a tar file from the files to install that preserves that directory structure.
Once this is done, you need to place that tar file into the subdirectory that "rpmbuild" will look for (installation) sources.
Maybe you should look at the tar file you produced (did you ?) to see what directory structure you have created.

Andreas Schnellbacher

  • Hero Member
  • *****
  • Thank You
  • -Given: 1
  • -Receive: 32
  • Posts: 592
  • Karma: +1/-0
    • View Profile
Re: Creating a RPM package for PMDLL
« Reply #26 on: October 12, 2020, 10:08:46 pm »
All of this is explained here:http://trac.netlabs.org/rpm/changeset/91
BTW: The file was moved. The current revision is here. (The Trac browser doesn't show .cmd files.)