Bug 229771 - www/uwsgi: build issues with Poudriere when PSGI option is on
Summary: www/uwsgi: build issues with Poudriere when PSGI option is on
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Kurt Jaeger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-14 16:01 UTC by Mike Andrews
Modified: 2019-03-03 12:51 UTC (History)
4 users (show)

See Also:
pi: maintainer-feedback-


Attachments
diff file with conditional USES+= perl5 (423 bytes, patch)
2018-09-07 21:16 UTC, Lorenzo Salvadore
no flags Details | Diff
Better style patch (300 bytes, patch)
2018-09-07 23:13 UTC, Lorenzo Salvadore
salvadore: maintainer-approval? (eugene)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Andrews 2018-07-14 16:01:46 UTC
Poudriere is unable to build the www/uwsgi port with the PSGI option enabled, because Perl isn't present in Poudriere's build jail.

If you just "cd /usr/ports/www/uwsgi; make install" and select PSGI, it builds and runs just fine as long as Perl is installed.

Looks like the port doesn't pull Perl in as a build dependency when PSGI is enabled.
Comment 1 Mike Andrews 2018-07-15 00:59:59 UTC
adding "perl5" to USES in the port Makefile is the workaround/fix.  I'm trying to figure out how to (temporarily) get that into Poudriere's setname-make.conf file, but no success yet.
Comment 2 Mike Andrews 2018-09-07 19:13:53 UTC
....anyone?
Comment 3 Lorenzo Salvadore freebsd_committer freebsd_triage 2018-09-07 19:59:03 UTC
I am probably not the best person that can help you about that, but since no one else has answered you, I will give it a try.

I think I do not understand your problem completely. Maybe we use poudriere in a different way.

What I would do is create a new port tree (or use an existing one) with "poudriere ports -c -p new_porttree_name" then add USES+= perl5 to /usr/local/poudriere/ports/new_porttree_name/www/uwsgi/Makefile and then I could install the port from there or make a package or wathever.

For example, to make a package I would do as follows:

- configure the port with the options I want by running "poudriere options -p new_porttree_name www/uwsgi";
- make the package with "poudriere bulk -j you_jail_name -p new_porttree_name www/uwsgi".

I would then find the package in /usr/local/poudriere/data/packages/you_jail_name-new_porttree_name/All/.

Why do you want to add anything to setname-make.conf? And what are you trying to achieve?
Comment 4 Lorenzo Salvadore freebsd_committer freebsd_triage 2018-09-07 21:16:10 UTC
Created attachment 196952 [details]
diff file with conditional USES+= perl5

I tested the port myself: I confirm that it is broken due to a missing dependency from perl and that Mike Andrew's workaround works. However, this is only a workaround and should not be used to modify the Makefile because it introduces a dependency to perl whatever are the options set.

I modified the Makefile adding USES+= perl5 when and only when the PSGI option is selected: you find the modifications in the diff file.
Comment 5 Mike Andrews 2018-09-07 21:29:38 UTC
Comment on attachment 196952 [details]
diff file with conditional USES+= perl5

This patch works for me.
Comment 6 Lorenzo Salvadore freebsd_committer freebsd_triage 2018-09-07 23:13:36 UTC
Created attachment 196955 [details]
Better style patch

This patch is the same than "diff file witch conditional USES+= perl5" but with a better style.

(instead of .include <bsd.port.options.mk> etc. it uses PSGI_USES)
Comment 7 Mike Andrews 2018-09-08 17:28:11 UTC
Comment on attachment 196955 [details]
Better style patch

fwiw if I put this into my poudriere make.conf:

.if ${.CURDIR:M*/www/uwsgi}
PSGI_USES= perl5
.endif

it works.  So, I have a temporary workaround until this one gets committed.
Comment 8 Kurt Jaeger freebsd_committer freebsd_triage 2019-03-03 12:50:55 UTC
Committed, thanks!
Comment 9 commit-hook freebsd_committer freebsd_triage 2019-03-03 12:51:00 UTC
A commit references this bug:

Author: pi
Date: Sun Mar  3 12:50:55 UTC 2019
New revision: 494507
URL: https://svnweb.freebsd.org/changeset/ports/494507

Log:
  www/uwsgi: add USES=perl5 if PSGI option is selected

  PR:		229771
  Submitted by:	Lorenzo Salvadore <phascolarctos@protonmail.ch>
  Reported by:	Mike Andrews <mandrews@bit0.com>
  Approved by:	eugene@zhegan.in (maintainer timeout)

Changes:
  head/www/uwsgi/Makefile