Bug 224341 - Making better use of non-centos RPMs
Summary: Making better use of non-centos RPMs
Status: Closed Not Accepted
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-emulation (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-14 14:51 UTC by Pedro F. Giffuni
Modified: 2019-09-06 15:44 UTC (History)
2 users (show)

See Also:


Attachments
small change (1.30 KB, patch)
2017-12-14 14:51 UTC, Pedro F. Giffuni
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pedro F. Giffuni freebsd_committer freebsd_triage 2017-12-14 14:51:14 UTC
Created attachment 188827 [details]
small change

I am trying to use rpm for software that is not in the centos repositories and I noticed USE_LINUX_RPM could be more efficient/cleaner:

- Move the MASTER_SITES check to an upper level instead of checking within the centos 6 or centos 7 cases.

- I was tempted to also define the MASTER_SITES and DIST_SUBDIR before checking the centos version but I realize you may want to add other repositories there in the future.
Comment 1 Baptiste Daroussin freebsd_committer freebsd_triage 2019-09-05 13:49:28 UTC
At quick glance it looks fine to me, let's add tijl to the review. This is not maintained by portmgr
Comment 2 Tijl Coosemans freebsd_committer freebsd_triage 2019-09-06 10:33:19 UTC
Several ports set MASTER_SITES (e.g. to EPEL) and also want DIST_SUBDIR=centos.  The subdirectory is for all rpm targetting CentOS, not just official CentOS packages.  USE_LINUX_RPM is really tailored for linux-c?-* ports.  If you are creating such a port you can put the distfile in the centos subdirectory.  If you are creating another port which happens to be distributed as an rpm take a look at astro/google-earth.  The main difference from a regular port is that you need a do-install target.
Comment 3 Pedro F. Giffuni freebsd_committer freebsd_triage 2019-09-06 14:39:17 UTC
(In reply to Tijl Coosemans from comment #2)

Ugh ... I did this patch long ago and it is disappointing that it wasnt considered at all.

At the time I was trying to port KingSoft's Office and some Microsoft stuff (an R variant that includes accelerated math libraries) which offer RPMs but of course are not directly related to RedHat or CentOS.

The idea was that after setting the repository and the directory I was able to fetch both the X64 and i386 distfiles. It saved me a lot of trouble and didn't interfere with the existing CentOS support.

You should reconsider.
Comment 4 Tijl Coosemans freebsd_committer freebsd_triage 2019-09-06 15:35:17 UTC
But I just explained that it does interfere.  An example is audio/linux-c7-openal-soft.  It sets MASTER_SITES and expects linux.mk to set DIST_SUBDIR.  That doesn't happen with your patch.  USE_LINUX_RPM is designed for linux-c?-* ports.  For application ports take a look at astro/google-earth.  It also downloads an i386 and amd64 rpm by setting DISTFILES_<arch>.
Comment 5 Pedro F. Giffuni freebsd_committer freebsd_triage 2019-09-06 15:44:37 UTC
(In reply to Tijl Coosemans from comment #4)

Ahh well.. I just haven't looked at this in a while (2017!).

Thanks!