OS2 World Community Forum

OS/2, eCS & ArcaOS - Technical => Applications => Topic started by: Martin Iturbide on February 13, 2021, 05:07:12 pm

Title: Creating some apps RPM packages
Post by: Martin Iturbide on February 13, 2021, 05:07:12 pm
Hi

I had been creating some simple rpm packages for some OS/2 utilities that we discussed on the forum.  The idea for me is to have, eventually, a very simple and fast to install the tools that are commonly used in ArcaOS.

By learning how to make that packages, I checked other samples, and there some choices that sometimes had to be done in file locations (because of the FHS thing) like:
- Where to put HLP files ? - I choose "/@unixroot/usr/share/os2/help"
- Where to put the TXT files? - I choose "@unixroot/usr/share/doc/%{name}"
This was based on some other samples I checked.

I have them here for the moment: https://archive.org/download/rpm-warp-samples (https://archive.org/download/rpm-warp-samples)

Those are far from perfect, but I hope someday they can be improved and put no some RPM server.

Suggestions are always welcome.

Regards

Title: Re: Creating some apps RPM packages
Post by: Martin Iturbide on February 14, 2021, 01:12:23 am
Hi

Just in case to install those manually you can try:
 "yum install <full file name.rpm>"

Or from ANPM:
 Manage->YUM Tools->"Install Package from file..."

This are the package I created:

- AssoEdit-2.1.2-1.oc00.i686.rpm
- CleanINI-0.55-1.oc00.i686.rpm
- Diunpack-3.04B-1.oc00.i686.rpm
- KillFold-1.0-1.oc00.i686.rpm
- LX2Dump-1.03-1.oc00.i686.rpm
-  Larsen_Commander-1.6_M3-1.oc00.i686.rpm
- PMDLL-2.12-1.oc00.i686.rpm (not much needed since it is included on ArcaOS)
- PMDiff-4.0c-1.oc00.i686.rpm
- PMKill-1.0-1.oc00.i686.rpm
- ToLower-1.1-1.oc00.i686.rpm
- VisPro-REXX-Runtime-3.1-1.oc00.i686.rpm
- WatchDog-1.0-1.oc00.i686.rpm
- ePDF-2.99-1.oc00.i686.rpm

Regards
Title: Re: Creating some apps RPM packages
Post by: Martin Iturbide on February 14, 2021, 01:50:51 pm
I included:
- TaskBuster-2.00-1.oc00.i686.rpm
- WinBack-2.0-1.oc00.i686.rpm
Title: Re: Creating some apps RPM packages
Post by: Mike K├Âlling on February 14, 2021, 02:17:06 pm

I have them here for the moment: https://archive.org/download/rpm-warp-samples (https://archive.org/download/rpm-warp-samples)


Hi Martin,

Thanks for all your efforts. I lie the idea for the rpm packages.
Is there a way to download these files? The link provided does not work.

Grettings,
Mike
Title: Re: Creating some apps RPM packages
Post by: Martin Iturbide on February 14, 2021, 05:45:38 pm
Hi Mike

Can you check if you can access archive.org? I remember that some countries (or ISPs) blocked it. If so, you may need a proxy.

Regards
Title: Re: Creating some apps RPM packages
Post by: Andreas Schnellbacher on February 14, 2021, 06:21:51 pm
The link seems to work from (now?) Germany.

Martin, thanks for this.

BTW: I don't see the sense of moving more files than necessary to the UNIXROOT tree, but I'm an early endorser of that concept. Details:

IMO it makes sense to put files of ported Linux tools used by other ported ones to the UNIXROOT tree. The amount of files therein is already complex.

I don't get why to put e.g. assoedit files there. What we need is an additional common place, at least for executable and DLL files. That one should be provided by the OS and its subpaths should be added to the relevant paths in CONFIG.SYS.  It would make installation of tools that are used from the command line much easier. GUI ones usually don't need that. See WarpIN as an example. My suggestion is:

This entry in CONFIG.SYS already exists:
   SET PROGRAMS=x:\Programs
These subdirs have to be created and added to SET PATH, LIBPATH, SET HELP, SET BOOKSHELF in CONFIG.SYS (with %PROGRAMS% expanded):
   %PROGRAMS%\bin, %PROGRAMS%\dll, %PROGRAMS%\help, %PROGRAMS%\book

(While I would prefer the shorter term SET PROGRAMS=x:\Apps, but that's my personal taste.)

Non-command-line tools could be installed in one or a few subdir(s) below %PROGRAMS% or anywhere else, as they don't need common paths.
Title: Re: Creating some apps RPM packages
Post by: Dave Yeo on February 14, 2021, 07:03:28 pm
The drawback is that PATH, LIBPATH etc are finite resources. They are limited in length and the longer they are, the more time to search them.
With a package manager, they can all be put into the same directory structure and the package manager can take care of keeping track.
Another option is to have cmd files that set the environment for the programs installed under x:\programs and a common bin file where the cmd files go.
Title: Re: Creating some apps RPM packages
Post by: Andreas Schnellbacher on February 14, 2021, 07:57:57 pm
The drawback is that PATH, LIBPATH etc are finite resources. They are limited in length and the longer they are, the more time to search them.
Good point. That's the reason why I vote for a just few common paths. And GUI apps usually don't need these paths. But BTW: The search time doesn't matter nowadays.

With a package manager, they can all be put into the same directory structure and the package manager can take care of keeping track.
Sure, but why under UNIXROOT? Packages may be installed anywhere. A package manager is also able to install system (IBM) files. Placing more files than required under UNIXROOT makes the emergency method to fix a broken RPM tree more complicated: Wipe and recreate it. (I had to do that 2 times, probably due to bugs in packages installation scripts.)

Another option is to have cmd files that set the environment for the programs installed under x:\programs and a common bin file where the cmd files go.
I guess most of the time GUI apps are started via program objects, not via paths. Then you don't need a fixed path for executing them. But it's useful for installers or package managers to know the default destination for installation. Setting the env. via .cmd file is the usual method for developers. But for others?

WarpIN is a very good example: Ulrich decided to avoid PATH cluttering. The GUI program doesn't need a fixed path. For wic.exe, he povided a .cmd script that sets the env. locally to find its DLL. That way WarpIN can reside in its own directory anywhere. The path is written to OS2.INI, but nothing more. (I would rather count WarpIN as a system tool than AssoEdit.)

Next example is 4OS2: Should it be added to an own directory or to a common directory tree? The standard way is to install it in its own dir and append that to PATH, LIBPATH, DPATH, HELP and BOOKSHELF. I would prefer common paths instead that are already added to these paths.
Title: Re: Creating some apps RPM packages
Post by: Martin Iturbide on February 14, 2021, 11:15:57 pm
Hi Andreas

This are the "path definitions" that can became an issue while creating RPM packages. I''m not a fan of the FHS, but it is what I have here.
 
BTW: I don't see the sense of moving more files than necessary to the UNIXROOT tree, but I'm an early endorser of that concept. Details:

Do you have experience with RPM packages? For the moment I don't know how to install things outside the UNIXROOT, if you have some samples let me know, I had a lot of issues understanding the %files section of the specs files.

Regards

Title: Re: Creating some apps RPM packages
Post by: Dave Yeo on February 15, 2021, 01:08:03 am
How about having a directory under @unixroot\share? Perhaps @unixroot\share\os2_apps or such.
Title: Re: Creating some apps RPM packages
Post by: Martin Iturbide on February 15, 2021, 01:39:33 am
Hi

Those are the choices that had to be done.

For example, I just made (and uploaded) the "FileFreedom" RPM installer.
- C:\USR\BIN\FILEFRDM.EXE  -- The binary
- C:\USR\SHARE\OS2\HELP\filefrdm.hlp   -- The Help File (I also included this path on the SET HELP=)
- C:\USR\DOC\FILEFREEDOM\*.TXT -- The readme files.
-- Executable Working Directory on C:\HOME\.CONFIG\FILEFREEDOM\  -- So the .INI file get stored there.

I know this is too much trouble, but this is how I see things are organized with the FHS hell.

Regards
Title: Re: Creating some apps RPM packages
Post by: Andreas Schnellbacher on February 15, 2021, 09:43:29 am
This are the "path definitions" that can became an issue while creating RPM packages.
I see. If that's really true, we should better avoid it for non-ported OS/2 apps, IMO.
 
Do you have experience with RPM packages?
No.
Title: Re: Creating some apps RPM packages
Post by: Andreas Schnellbacher on February 15, 2021, 10:29:38 am
This are the "path definitions" that can became an issue while creating RPM packages.
I see.
In RPM How-To document for packagers (http://trac.netlabs.org/rpm/wiki/RpmHowToPackagers#Filepackaging) there is:
Code: [Select]
%files
%{_bindir}/rpm.exe
%{_mandir}/man8/rpm.8*
%{_libdir}/rpm*.dll
It looks to me as if any path or env var can be used here.
Title: Re: Creating some apps RPM packages
Post by: Martin Iturbide on February 15, 2021, 01:59:46 pm
Hi

If I use %PROGRAMS% directly on the specs file it does not work (it created a directory called "%PROGRAMS%")

I need a way to get the variable for "C:\PROGRAMS", if I hardcode the path it will work, but I would like to get some kind of variable like "%{_programs}" (which does not work), or any variable that will work to get me the "PROGRAMS" path.

Any tips are welcome.

Regards

Title: Re: Creating some apps RPM packages
Post by: Andreas Schnellbacher on February 15, 2021, 06:52:56 pm
I don't know where %{_programs} should stay for, but I would try it with %{PROGRAMS}.
Title: Re: Creating some apps RPM packages
Post by: Martin Iturbide on February 16, 2021, 05:14:51 am
Hi

%{PROGRAMS} didn't work to create the RPM packaged.  :(

Regards
Title: Re: Creating some apps RPM packages
Post by: Martin Iturbide on February 16, 2021, 02:04:26 pm
Hi

I'm trying  "%{getenv:PROGRAMS}"  but it gets me "C:PROGRAMS" without the backslash.

- %{getenv:PROGRAMS} = C:PROGRAMS
-  %{getenv:HOME}   =  C:HOME

This is an issue for me, since I need to take out the "C:" for the cp command to work.  If I can only know how to trim the first to characters, it will be fine for me.

Regards
Title: Re: Creating some apps RPM packages
Post by: Dave Yeo on February 16, 2021, 04:33:12 pm
The backslash is an escape character on *nix and needs escaping. Try "SET PROGRAMS=c:\\programs"
Title: Re: Creating some apps RPM packages
Post by: Dave Yeo on February 16, 2021, 04:55:10 pm
This is an issue for me, since I need to take out the "C:" for the cp command to work.  If I can only know how to trim the first to characters, it will be fine for me.

Code: [Select]
echo %PROGRAMS% | cut -c 3-



Title: Re: Creating some apps RPM packages
Post by: Andreas Schnellbacher on February 16, 2021, 06:51:32 pm
I've tried and read a bit, but haven't tried to build an .rpm. I'm still not sure if rpm uses the sh or the cmd syntax. Here's what I got:
Code: [Select]
[C:\]echo %PROGRAMS%
F:\Apps

[C:\]sh
#

# rpm --eval %{echo:$PROGRAMS\\myapp}
F:\Apps\myapp

# exit

[C:\]rpm --eval %{echo:$PROGRAMS\\myapp}
$PROGRAMS\\myapp

I've found that expressions beginning with "${_" are macros. According to this, defining the macro in the header and using it below might work:
Code: [Select]
%_programs %{echo:PROGRAMS}
...
%{_programs}/...
or
%{_programs}\\...
Title: Re: Creating some apps RPM packages
Post by: Ben Rietbroek on February 17, 2021, 04:06:32 pm
Hi,

My name is Ben Rietbroek and I am working on RPM for V.O.I.C.E
(VOICE Software Provisioning)

The use of RPM packages for OS/2 will increase in the future, so it might be
a good idea to think about conventions all RPM providers should adhere to.

These are the conventions I settled on for VOICE:
- package names are lowercase
- the dash (-) is used to separate name components
- no underscores (_)
- always use the '.oc00' distribution identifier

I am developing automated RPM stuff so consistent naming is important for
proper processing.

Additionally one can distinguish between packaging legacy software and
*NIX ported software. This has to do with the locations where the files are
installed and their structure.

And there are more things which would need some cooperation among
package providers so we do not make a mess of our upcoming repositories.

I am open for discussion on these subjects, either at this forum or via:
ben-at-rpm.os2voice.org

Best regards,
Ben Rietbroek.
(aka rousseau)
Title: Re: Creating some apps RPM packages
Post by: Martin Iturbide on February 18, 2021, 02:00:33 am
Hi Ben

I would love the see the specs samples that you have produced for the OS2VOICE RPM.
I would also like to check your suggested specs for "legacy software".

Are you writing the os2voice rpm rules somewhere? I will like to collaborate creating more packages.

- always use the '.oc00' distribution identifier
I have no idea what is this '.oc00'. I don't know where it came from, on the specs it came from "{?dist}"

Regards
Title: Re: Creating some apps RPM packages
Post by: Ben Rietbroek on February 19, 2021, 06:34:22 pm
Hi Martin,

Quote
I would love the see the specs samples that you have produced for the OS2VOICE RPM.
I would also like to check your suggested specs for "legacy software".

I will address the above with a broader document in a Request-For-Comments (RFC)
fashion. I am working on that.

Quote
Are you writing the os2voice rpm rules somewhere?

I am writing almost everything down, from issues with tools to useful conventions to
ideas that popup in my head. They all have a tag and there is a background task active
clustering relevant stuff to produce a coherent document.

Quote
I will like to collaborate creating more packages.

That is very cool.
I tool the liberty to send you an invitation to become a "bollplanker", which kinda means this
https://en.wiktionary.org/wiki/bollplank
and where the focus is on _your_ perspective of things.

Quote
I have no idea what is this '.oc00'.
I don't know where it came from, on the specs it came from "{?dist}"

It is defined in: '@unixroot/etc/macros.dist'.
It is mainly used in the *NIX world to identify target platform.
Dunno who defined the '.oc00' name or what it stands for (yet).

[spectest]
I have a self-contained Makefile that does some 'rpmbuild' inspection.
It comes from the MDE4OS2 engine, so I have to manually adjust it a bit.
When ready I will post a dl-link here for anyone interested in inspecting
how 'rpmbuild' sees your environment behind the scenes.

Looking forward to working with you at the RPM front.

Greetz,
  Ben.
Title: Re: Creating some apps RPM packages
Post by: Martin Iturbide on February 20, 2021, 09:48:29 pm
Hi
I got this suggestion to try out:

Quote
# System-wide path for OS/2 language files accessed via DPATH env. variable.
%os2_langdir %{_datadir}/os2/lang

# System-wide path for OS/2 INF files accessible via BOOKSHELF env. variable.
%os2_bookdir %{_datadir}/os2/book

# System-wide path for OS/2 HLP files accessible via HELP env. variable.
%os2_helpdir %{_datadir}/os2/help

those values are defined in rpm anyway. So don't add new stuff to dpath, help env and so forth
every installation has those values defined.

...but this knowledge came with a demotivational complain that I removed. ;D

But it is not what I'm looking for:
Quote
# rpm --eval %{_programs}
%{_programs}
# rpm --eval %os2_langdir
/@unixroot/usr/share/os2/lang
# rpm --eval %os2_bookdir
/@unixroot/usr/share/os2/book
# rpm --eval %os2_helpdir
/@unixroot/usr/share/os2/help
#

I want to find a way to install things on the \Programs\ path without hard coding it.

Regards
Title: Re: Creating some apps RPM packages
Post by: Ben Rietbroek on February 21, 2021, 05:22:02 pm
Does
rpm --eval %{os2_boot_drive}/Programs
help you?

I also checked a fresh install and %PROGRAMS% is set in CONFIG.SYS,
so it should be in the ENVIRONMENT. So depending on which %section
you are in ${PROGRAMS} might evaluate properly.
Title: Re: Creating some apps RPM packages
Post by: Ben Rietbroek on February 21, 2021, 08:26:43 pm
rpm --eval '%os2_expand_dos_vars %PROGRAMS%'
Title: Re: Creating some apps RPM packages
Post by: Martin Iturbide on February 22, 2021, 02:09:09 am
Hi

Here it is my sample to understand better my issue. Right now it is working with the "PROGRAMS" hardcoded.  My goal is to install gotcha on C:\PROGRAMS\GOTCHA\  , just all files there.

 %os2_expand_dos_vars %PROGRAMS% or "$PROGRAMS" works fine for the WPS icon creation since I need the full path.

Under %install. For the mk and cp commands I have the PROGRAMS directory hardcoded instead of bringing it  from the environment variable.

Also on the %files, I have "PROGRAMS" hardcoded.

I think I need a way to bring the %PROGRAMS% without the drive letter, but other ideas and points of view are welcome.
BTW: I know it may not be usual to someone to change the "SET PROGRAMS=" to other directory, but I think it may be better to call the environment variable instead of hardcoding it. (if possible)

Regards
Title: Re: Creating some apps RPM packages
Post by: Ben Rietbroek on February 22, 2021, 05:36:53 pm
Hi Martin,

Quote
I want to find a way to install things on the \Programs\ path without hard coding it.

The thing of course is that the drive-letter for %UNIXROOT% is not necessarily
the same as the drive-letter for %PROGRAMS%.

Since RPM comes from the *NIX world, which has a single-root concept for the
file-system, stored (file) paths in a '.rpm' package _must_ start with a '/',
a requirement that propagates to the %files section of a specfile.

This is why '/@unixroot' exists at the scripting level, where it basically
functions as a placeholder for %UNIXROOT%, which is evaluated at install-time
on the target-system.

If the %PROGRAMS% location at the target-system is on a different drive than
the %UNIXROOT% location, its _true_ location cannot be used as a target for the
package files. One could strip the drive-letter and ':' from %PROGRAMS% and
use that as a destination, which would result in that path being created under
the %UNIXROOT% location.

This is why I mentioned packaging _legacy_ applications earlier.

I think we need to discuss how we would solve this.
Solutions can range from '@unixrooting' such legacy applications,
to using ZIP-files in the '.rpm' and extract that with -d,
to installing to /@unixroot/var/tmp and then moving to %PROGRAMS%,
to rpm-relocating at install-time,
to ...

I have also contemplated introducing additional placeholders, like @programs
or even a more generalized form where '/@?/' could be a placeholder for a drive
so that '/@C/AUTOEXEC.BAT' would be possible.
Any four-char string in the form of '/@?/' would mark such a placeholder where
? is in [C-Z] or [c-z].

Of course the real RPM gurus are at BWW, and I think that once we have a more
clear picture on this, their input and advise is very important.
Title: Re: Creating some apps RPM packages
Post by: Ben Rietbroek on February 23, 2021, 06:20:57 am
So far I found 2 ways to escape %UNIXROOT% for package installations.

[using %pre and symlinks -- dirty hack]
Because %sections become shell-scripts, symlinks work.
So in %pre, which is executed at the target system _before_ files are installed,
a symlink in for instance ${UNIXROOT}/var/programs to ${PROGRAMS} could be made.
In %files then
/@unixroot/var/programs/MyLegacyApplication
would be the entry put in the .rpm and the same path can be used in ${BUILDROOT}.
The fact that var/programs on the build-system is not a symlink while on the target
system it is does not seem to pose a problem.
This method is of course a dirty hack and probably not the way to go.

[using %pre and kLIBC Path Remapper -- not fully tested yet]
This method is conceptually the same, but instead of fiddling with symlinks we
adjust the mapping in the INI-file of the remapper. A small difference is that
the remapper maps /some/unix/path to ?:\some\os2\path so /@unixroot is not
used in the %files section:
/var/programs/MyLegacyApplication
(/var/programs is mapped to %PROGRAMS%)
I have not tested this method completely yet, but it is most certainly better than
the symlink method because it can provide a proper central mapping registry for legacy apps.

I'll be doing some more testing on this stuff and merge that into the spectest example
which I will post here when it has some more flesh on it.
Title: Re: Creating some apps RPM packages
Post by: Martin Iturbide on February 24, 2021, 12:26:00 am
/@unixroot/var/programs/MyLegacyApplication

Those are "path choices" I was talking about on the first post   :D

Is really "/@unixroot/var/programs/MyLegacyApplication" a good place for this "legacy OS/2 application" ?
According to wikipedia FHS (https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard), /var is "Variable files: files whose content is expected to continually change during normal operation of the system, such as logs, spool files, and temporary e-mail files. "

Regards
Title: Re: Creating some apps RPM packages
Post by: Ben Rietbroek on February 24, 2021, 09:02:10 am
Quote
Those are "path choices" I was talking about on the first post   :D
Indeed.

Quote
Is really "/@unixroot/var/programs/MyLegacyApplication" a good place for this "legacy OS/2 application" ?
No it is not.

I do experimental stuff using /var and it kinda came with the copy-paste.
Cool to throw the FHS in the argument  ;D

But I have been doing more testing with the Path Remapper and I think it is the solution
to this legacy-apps issue and generic outside %UNIXROOT% dir and file addressing.

I must admit I have always taken that clever piece of software for granted :-[

Using the remapper makes it possible to package legacy applications using their native
directory structure and install them in %PROGRAMS%, even if the
drive-letter for %PROGRAMS% differs from the %UNIXROOT% drive-letter.

My next post will explain using the Path Remapper in more detail...
Title: Re: Creating some apps RPM packages
Post by: Ben Rietbroek on February 24, 2021, 11:08:19 am

== Using the Path Remapper to install Legacy Applications ==

What is it and what does it do ?
The Path Remapper maps /unix/style/paths to ?:\os2\style\paths.
It operates at the kLIBC level so its functionality is available for every
application compiled with GCC-OS2. That includes sh.exe, rpm.exe, rpmbuild.exe
and more generally the whole *NIX framework and friends (https://github.com/bitwiseworks) as provided by Bitwiseworks (https://www.bitwiseworks.com/).

Where is it ?
It is in Computer -> System Setup -> kLIBC Path Remapper.
Click on it and it will show you what remappings are active on your system.

Remapping for legacy applications
Now add the following entry:
From: /remapped/programs
To: %PROGRAMS%

Testing with sh or bash
Open a command-prompt.
Enter sh or bash
(bash is more handy as command retrieval works)
Now do: ls /remapped/programs
You will see the content of your %PROGRAMS% directory.

Remappings are virtual *NIX paths
The interesting stuff is that the From paths are virtual, so they do not exist
on the file-system. And they are only visible to kLIBC applications, which is
why a dir ?:\remapped\programs under CMD does not find it on any drive.
The path is not physically present.

Using the Path Remapper in a specfile
Given that the above mentioned /remapped/programs -> %PROGRAMS% mapping now
exists on your build-box, the /remapped/programs can now be used in %pre and %files
and other %sections as part of the location where files will be installed.
The resulting package.rpm file will show entries starting with /remapped/programs.
And of course it is possible to create %{variables} like:
%define remapped_programs_key   /remapped/programs
%define remapped_programs_value %PROGRAMS%

Installing such a path-remapped package on the user system
Of course the user does not have the required /remapped/programs -> %PROGRAMS%
mappings yet, but those are easy to do in the %pre section. Even better, have
a tiny dependency package do it, so registering the mapping is centralized.

Mapping Persistence
While the mapping is not required for the remapped (legacy) programs to
operate, since they are not aware of any kLIBC magic, the mappings are needed
for the RPM tools to do proper querying, since the location is also entered
into all relevant package databases, including those of YUM when that is used.

Determining a proper mapping name
In my example I used /remapped/programs as the from-path to emphasize the
package uses the remapper. We would need to come up with a name agreed upon
by all parties to have a standard.

One could envision mapping other locations like /remapped/osdir -> %OSDIR% and
/remapped/os2root -> %OSDIR\.. and others. The convention I used here is a
remapped prefix followed by a lowercase name of the %VARIABLE% it maps on.

A spectest example
I am working on a spectest example that creates a few example packages using
the remapper solution. I will cram it all in a GNU Makefile with a
File Commander/2 user-menu front-end for the interface.

Hold on...
Title: Re: Creating some apps RPM packages
Post by: Martin Iturbide on February 27, 2021, 09:55:48 pm
Hi

I'm also trying to create a File Commnader/2 RPM installer, but I'm still fighting to create the WPS object for the readme located on %doc.

This is not working, it puts me the %doc on the path as text:
Quote
FC2_README:WPProgram|File Commander/2 Read Me|<FC2_FOLDER>|EXENAME=e.exe;\PROGTYPE=PROG_PM;PARAMETERS=((%doc/fc.txt));OPEN=RUNNING

Ideas are welcome.

Regards
Title: Re: Creating some apps RPM packages
Post by: Martin Iturbide on February 27, 2021, 09:58:40 pm
Hi

FYI: These are the rpm OS/2 macros:
http://svn.netlabs.org/repos/rpm/spec/trunk/SPECS/os2-rpm/macros.os2 (http://svn.netlabs.org/repos/rpm/spec/trunk/SPECS/os2-rpm/macros.os2)

Interesting:

Quote
# Converts back slashes to forward slashes.
%os2_fwdslashes()

# Converts forward lashes to back slashes.
%os2_backslashes()
Title: Re: Creating some apps RPM packages
Post by: Ben Rietbroek on February 28, 2021, 05:21:03 pm
Quote
FC2_README:WPProgram|File Commander/2 Read Me|<FC2_FOLDER>|EXENAME=e.exe;\PROGTYPE=PROG_PM;PARAMETERS=((%doc/fc.txt));OPEN=RUNNING

Wat is that backslash before PROGTYPE doing there ?
It is also in your 'Larsen_Commander.spec' file from your posted examples.
Title: Re: Creating some apps RPM packages
Post by: Ben Rietbroek on February 28, 2021, 05:34:04 pm

Please note that File Commander (http://silk.apana.org.au/fc.html) is not freeware.

It is worth its purchase fee back and forth and sideways,
so I would encourage anyone to obtain a proper registration for the OS/2 version,
which is still being developed.
Title: Re: Creating some apps RPM packages
Post by: Martin Iturbide on February 28, 2021, 10:25:42 pm

Please note that File Commander (http://silk.apana.org.au/fc.html) is not freeware.


Yes, that is the shareware version. It has no registration information at all on the RPM.

Regards
Title: Re: Creating some apps RPM packages
Post by: Martin Iturbide on February 28, 2021, 10:50:41 pm
Quote
FC2_README:WPProgram|File Commander/2 Read Me|<FC2_FOLDER>|EXENAME=e.exe;\PROGTYPE=PROG_PM;PARAMETERS=((%doc/fc.txt));OPEN=RUNNING

Wat is that backslash before PROGTYPE doing there ?
It is also in your 'Larsen_Commander.spec' file from your posted examples.


It seems it was a mistake, but it didn't produce any issue, neither help with my problem. I still do not know how to get the %doc to set the path for the WPS readme shortcut. Maybe there should be some other alternative instead of %doc to put file on usr/share/doc/-name-version/

Regards
Title: Re: Creating some apps RPM packages
Post by: Martin Iturbide on February 28, 2021, 11:41:17 pm
Hi

I found it. odin.spec (http://svn.netlabs.org/repos/rpm/spec/trunk/SPECS/odin.spec) was a good sample that helped me.

The trick was "%{_docdir}. Now the readme is correctly pointed on the WPS object.

Regards
Title: Re: Creating some apps RPM packages
Post by: Martin Iturbide on March 01, 2021, 12:01:26 am
Hi

Just a little tweaking to include the icon on the exe.
I think I'm done with File Commander, it was a nice learning. Until Ben let me know the specifics of what should I do to include it on the RPM server once we elaborate more the idea.

Regard
Title: Re: Creating some apps RPM packages
Post by: ivan on March 01, 2021, 01:31:13 am
Hi Martin,

Thank you for a nice chuckle, I say that because the thought just crossed my mind 'you put them together and I take them apart to use'.  No offence meant but I just don't like the stupidity of the RPM system and will get away from it as much as possible, I have even gone as far as denuding the @unixroot directory of as much junk as possible.
Title: Re: Creating some apps RPM packages
Post by: Ben Rietbroek on March 01, 2021, 04:39:41 pm

FWIW:
%doc is used to mark files as documentation.
It has to do with RPM querying -- querying a list of documentation files.
The files themselves still must be part of the %files section.
See: File-related Directives (http://ftp.rpm.org/max-rpm/s1-rpm-inside-files-list-directives.html)
Title: Re: Creating some apps RPM packages
Post by: Martin Iturbide on March 01, 2021, 10:15:39 pm

FWIW:
%doc is used to mark files as documentation.
It has to do with RPM querying -- querying a list of documentation files.
The files themselves still must be part of the %files section.
See: File-related Directives (http://ftp.rpm.org/max-rpm/s1-rpm-inside-files-list-directives.html)

uhm... I'm still do not know if I'm using the %doc correctly. I'm putting almost all readme.txt files, like history.txt, whatsnew.txt, and all alike inside that directoy that at the end is "usr/share/doc/-name of the app-version/"
But if it is a .txt used by the application, like "high score" for a game or anything like that I'm putting it on "usr/share/-name of the app/".

Yes, FHS is a mess, not even the linux guys like it, but it is how it work  :-\

Regards
Title: Re: Creating some apps RPM packages
Post by: Martin Iturbide on March 01, 2021, 10:21:24 pm
Hi

By the way I made some little updates to some packages, trying to standardize how I use the .specs a little bit better, and trying to use lowercase on the package names.

https://archive.org/download/rpm-warp-samples (https://archive.org/download/rpm-warp-samples)

I still have some road ahead to learn to register a WPS class with this and create a install for "Black Hole" as example.

Regards
Title: Re: Creating some apps RPM packages
Post by: Dave Yeo on March 01, 2021, 10:45:50 pm
But if it is a .txt used by the application, like "high score" for a game or anything like that I'm putting it on "usr/share/-name of the app/".

Shouldn't system wide high scores go somewhere under @unixroot\var with individual ones under %HOME%
Title: Re: Creating some apps RPM packages
Post by: Ben Rietbroek on March 02, 2021, 05:28:49 pm

== Info on the V.O.I.C.E RPM Packaging Engine ==

The attached dt6202103021446.html.zip will give a first impression
of the automated package building being worked on.
Title: Re: Creating some apps RPM packages
Post by: Andreas Schnellbacher on March 02, 2021, 06:17:27 pm
Ben, that would be a large step forward. I guess most of us don't like to place usual OS/2 apps in the UNIXROOT tree. I didn't know that using OS/2 env vars makes a problem as Martin has pointed out.

Automating the build process is even better. I look forward to your project.
Title: Re: Creating some apps RPM packages
Post by: Ben Rietbroek on March 02, 2021, 11:37:27 pm

Greetings, force behind the NEPMD (http://trac.netlabs.org/nepmd) 8) Project ! 
I'll be picking a few cherries from your works Andreas ...