Created attachment 175219 [details] new framework: postgis.mk Hello, As exposed on some databases/postgis* bugs (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206049#c5 and https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209478#c3). I propose an infrastructure framework for this ports. PostGis is not compatible with all versions of PostGreSQL (https://trac.osgeo.org/postgis/wiki/UsersWikiPostgreSQLPostGIS). So postgis.mk can check if a version of postgis is already installed and compatible, and check if postgresql is compatible too. What I've done: - Create the Uses file (Mk/Uses/postgis.mk) - Add a default version of postgis (Mk/bsd.default-versions.mk) - Modify all postgis Makefile. There may a problem with postgis21 which require a PGSQL version between 9.1 and 9.4 (Uses= pgsql:9.1+ pgsql:9.4- is it correct? Can we have bounded versions?) - Modify all dependent ports (Qgis, Pgrouting) It seems to works for me tested with some pgsql and postgis versions. But I prefer request some help from mentors, so can you check this framework and help me to test it? Thank you in advance. Regards,
Can more than one version of postgis be installed ? If not, can you add a POSTGIS_DEFAULT to bsd.default-versions.mk ?
No, only one version can be installed. Unless I am mistaken, there is a POSTGIS_DEFAULT into my patch +# PostGis default must be compatible with PGSQL_DEFAULT +POSTGIS_DEFAULT?= 2.2
Oh, yes, sorry, I missed it :-D
Add the exp-run flag.
I don't believe the +.include "${PORTSDIR}/Mk/bsd.default-versions.mk" is necessary, bsd.port.mk does it already ${PORTSDIR}/Mk/Uses/ should be spelled ${USESDIR}/ USES=... pgsql:9.1+ pgsql:9.4- The 2nd pgsql:9.4- doesn't do anything
Yes, don't include bsd.default-versions.mk, it is already done for you.
(In reply to Antoine Brodin from comment #5) OK I'll make the changes for include and USEDIR. For USES=... pgsql:9.1+ pgsql:9.4- In fact, perhaps I can suggest a change in the search for the version of pgsql (Uses/pgsql.mk). As you can see, postgis need bounded versions (9.1->9.4 for this example). I have not been able to find an equivalent in other ports. Any suggestions?
You can't use the same USES more than once one, so if you need something like pgsql:9.1-9.4, pgsql.mk needs to grow the functionnality.
Created attachment 177091 [details] new framework: postgis.mk New proposition of patch. Includes: - Some fix to postgis.mk - Feature for pgsql.mk. Now you can determine min and max versions like this: USES= pgsql:9.1-9.4 - Change postgis' ports or dependent of one version of postgis I have tested to install each version with each version of postgresql, seems ok.
Since some ports depending of postgis are update (especially QGis). Would you like separate patches? One for postgresql.mk, one for postgis.mk and one for each port?
Any news or suggestions?
(In reply to lbartoletti from comment #11) I can only speak for databases/postgis22 and graphics/qgis. Both where updated in the meantime. The dependency for graphics/qgis is databases/postgis22 now (instead of postgis21). I really like the idea of your patches and am looking forward to it :)
Just wanted to take the time to throw in a +1 on all the time, and work you put into this, @lbartoletti. Thank you, and looking forward to seeing it incorporated soon! :) __chris
While including pgsql.mk from postgis.mk is ok, you should probably not remove all the USES=pgsql from the ports.
OK. I will update the patch. Mathieu isn't there a risk that this could result in conflicts? Imagine something like this: USES= postgis:2.0 pgsql:9.3+ Which isn't possible.
Well, sure, conflicts could arise, it should just error out, saying "you asked for pg version xx and postgis yy needs zz"
Created attachment 187734 [details] postgis.mk Remove old patch including postgis24 #222703
Created attachment 187735 [details] PostGreSQL option to install a version between an interval
Created attachment 187736 [details] Add postgis into bsd.default-versions Depends on postgis24 #222703
I will update ports depending of postgis later. Also pgsql.mk don't include my previous patch for plpython #222094
mat@, does the exp-run has been performed ?
Hi, any news? Thanks.
I think we can close this ticket when https://reviews.freebsd.org/D17320 will be merged.
It appears this issue is for a new postgis framework, but the changes in the review mentioned in comment 23 do not include framework additions/changes. If that's the case, I would recommend: - Updating the title here to match the review - Obsoleting all the patches here - Adding the review URL to this issues URL field
In fact, my patch in the review makes this ticket obsolete since only one version of postgis will be maintained.
A commit references this bug: Author: crees Date: Tue Jan 15 21:50:55 UTC 2019 New revision: 490431 URL: https://svnweb.freebsd.org/changeset/ports/490431 Log: Add facility to give a range of allowable versions for postgresql PR: ports/213038 PR: ports/234813 Submitted by: lbartoletti@tuxfamily.org Differential Revision: https://reviews.freebsd.org/D18818 Changes: head/Mk/Uses/pgsql.mk