Author Topic: Building a Dooble RPM  (Read 12477 times)

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Building a Dooble RPM
« on: April 19, 2023, 03:36:52 am »
Hi, so I've revisited building an RPM, which I haven't had luck with, this time with Dooble.
Downloaded the latest Dooble source RPM, dooble-2022.10.15-1.oc00.src.rpm and used unrpm to expand it. Followed the directions at http://trac.netlabs.org/rpm/wiki/RpmHowToPackagers to set up my environment, basically downloaded required packages and created %HOME%\.rpmmacros containing "%_topdir h:/rpmbuild" without the quotes. H: is my ramdisk. Ran rpmbuild as the page recommends, results
Code: [Select]
H:\rpmbuild>rpmbuild -ba dooble.spec
error: line 13: Unknown tag: %scm_source github https://github.com/bitwiseworks/
dooble-os2 2022.10.15-os2
or
Code: [Select]
H:\dooble_rpm>rpmbuild -ba dooble.spec
error: line 13: Unknown tag: %scm_source github https://github.com/bitwiseworks/
dooble-os2 2022.10.15-os2

The RPM page clearly says that %scm_source is a valid tag,
Quote
%scm_source

This macro is intended as a replacement for the standard Source: tag. The format is as follows:

%scm_source SCM URL REV

where SCM is the type of the source code management system (currently supported ones are svn, git and github), URL is the full URL of the source code repository for the given program and REV is the revision to use.

Any ideas where I have gone wrong? I expected a dooble rpm pretty much identical to the Bitwise release, then I could adjust it as needed. I've run into the same issue with trying to build other packages hosted on Github.

Tom

  • Full Member
  • ***
  • Posts: 194
  • Karma: +5/-0
    • View Profile
Re: Building a Dooble RPM
« Reply #1 on: April 19, 2023, 02:54:14 pm »
The %scm_source macro seems to expect three parameters, but in your examples I see only two (the SCM and URL parameters, but no REV parameter).
That is the only obvious thing that I see (I have no experience with building RPMs).

ivan

  • Hero Member
  • *****
  • Posts: 1557
  • Karma: +17/-0
    • View Profile
Re: Building a Dooble RPM
« Reply #2 on: April 19, 2023, 03:29:22 pm »
Hi Dave,

Why not just build a WPI, which is much more useful?

I have RPM on my computer because it came with the install but have never used it.

Andi B.

  • Hero Member
  • *****
  • Posts: 811
  • Karma: +11/-2
    • View Profile
Re: Building a Dooble RPM
« Reply #3 on: April 19, 2023, 04:05:17 pm »
Hi Dave,

Why not just build a WPI, which is much more useful?

I have RPM on my computer because it came with the install but have never used it.
Please don't go offtopic. If you've a question unrelated to the topic, open a new thread. Thanks. Btw. your question is answered more then once.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Re: Building a Dooble RPM
« Reply #4 on: April 19, 2023, 04:26:18 pm »
The %scm_source macro seems to expect three parameters, but in your examples I see only two (the SCM and URL parameters, but no REV parameter).
That is the only obvious thing that I see (I have no experience with building RPMs).

Hi Tom, the revision is 2022.10.15-os2, which exists.
Code: [Select]
K:\work\dooble-os2>git tag
2022.04.04
2022.04.04-os2
2022.10.15
2022.10.15-os2

URL is correct as well.

TeLLie

  • Full Member
  • ***
  • Posts: 226
  • Karma: +11/-0
    • View Profile
Re: Building a Dooble RPM
« Reply #5 on: April 19, 2023, 07:06:08 pm »
Hi Dave

I use for building RPM the BWW rpmbuild-bot
https://github.com/bitwiseworks/rpmbuild-bot

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Re: Building a Dooble RPM
« Reply #6 on: April 20, 2023, 12:21:00 am »
Hi Dave

I use for building RPM the BWW rpmbuild-bot
https://github.com/bitwiseworks/rpmbuild-bot

Interesting, how do you use it? Directory setup etc?
Thanks

Jochen Schäfer

  • Sr. Member
  • ****
  • Posts: 306
  • Karma: +27/-0
    • View Profile
Re: Building a Dooble RPM
« Reply #7 on: April 20, 2023, 09:23:29 am »
The .ini file has some explanations.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Re: Building a Dooble RPM
« Reply #8 on: April 20, 2023, 04:02:27 pm »
Yes, I found the directions in the ini card after posting.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Re: Building a Dooble RPM
« Reply #9 on: April 21, 2023, 03:22:59 am »
Well, I think I have it setup, using Dmiks setup for now.
Dies with,
Code: [Select]
error: line 13: Unknown tag: %scm_source github https://github.com/bitwiseworks/dooble-os2 2022.10.15-os2

So right back to where I was at the beginning except now it tries to build an i686 version first. One problem is that the goal of RPM is to produce billable consultant hours rather then ease of use.

Rich Walsh

  • Sr. Member
  • ****
  • Posts: 331
  • Karma: +23/-0
  • ONU! (OS/2 is NOT Unix!)
    • View Profile
Re: Building a Dooble RPM
« Reply #10 on: April 21, 2023, 10:00:46 am »
One problem is that the goal of RPM is to produce billable consultant hours rather then ease of use.

Not necessarily, at least in this case. A Google search shows that this is a non-standard, home-brew macro that dmik created.

AFAICT, the problem you're having is that your 'x:\usr\lib\rpm\macros' file should include this macro but doesn't (mine doesn't). Look at the diff attached to http://trac.netlabs.org/rpm/ticket/232 and copy its contents into your copy of 'macros'.

Jochen Schäfer

  • Sr. Member
  • ****
  • Posts: 306
  • Karma: +27/-0
    • View Profile
Re: Building a Dooble RPM
« Reply #11 on: April 21, 2023, 10:35:16 am »
Well, I think I have it setup, using Dmiks setup for now.
Dies with,
Code: [Select]
error: line 13: Unknown tag: %scm_source github https://github.com/bitwiseworks/dooble-os2 2022.10.15-os2

So right back to where I was at the beginning except now it tries to build an i686 version first. One problem is that the goal of RPM is to produce billable consultant hours rather then ease of use.
I think, you have to install the BWW rpm tools.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Re: Building a Dooble RPM
« Reply #12 on: April 21, 2023, 05:54:52 pm »
One problem is that the goal of RPM is to produce billable consultant hours rather then ease of use.

Not necessarily, at least in this case. A Google search shows that this is a non-standard, home-brew macro that dmik created.

AFAICT, the problem you're having is that your 'x:\usr\lib\rpm\macros' file should include this macro but doesn't (mine doesn't). Look at the diff attached to http://trac.netlabs.org/rpm/ticket/232 and copy its contents into your copy of 'macros'.

Should have used Google instead of DDG :) Yes, it looks like one of the times they imported from vender these macros got lost in the merge, which doen't explain why Jochen and Tellie seems to have them.
I'll test this evening with those patches and will have to file an issue with Bitwise.
Thanks for finding the patch.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Re: Building a Dooble RPM
« Reply #13 on: April 22, 2023, 03:17:43 am »
OK, looking further, http://trac.netlabs.org/rpm/ticket/245 split the OS/2 macros into their own file, so I was missing "yum install os2-rpm-build" to finish my install. Now the Github macros etc are in @unixroot/usr/lib/rpm/macros.d/macros.scm. There's also @unixroot/etc/rpm/macros.scm_pwd to keep your Github credentials in plain text.
Back to trying to build an dooble RPM and then think about a ticket for a documentation update.
Edit: well rpmbuild -ba dooble.spec built an i386 rpm, actually the debug and source rpm's as well. So next question is how to target P4?
« Last Edit: April 22, 2023, 04:08:31 am by Dave Yeo »

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Re: Building a Dooble RPM
« Reply #14 on: April 22, 2023, 05:15:36 am »
OK, using rpmbuild-bot, I have i686 and pentium4 packages, both binary and dbg rpms, as well as the source rpm and the zip file built. Worked fine though I need to tune the directories to my liking and it would be nice to use more jobs when building, perhaps make -j3.
Now to adapt the spec file.
Is anyone interested in the rpm's? Not sure yet how they would co-exist with any future Bitwise releases, perhaps just releasing the zip would be fine.