Re: Differences when using `make` V `port test`

2016-09-23 Thread Jev Bjorsell
Thanks for the help.

I made some adjustments, and now both my pending ports are passing
`poudriere testport`.

Could someone please commit;

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212468
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212467

Thanks all!
Jev

On Fri, Sep 23, 2016 at 7:08 AM Mathieu Arnold  wrote:

> Le 23/09/2016 à 15:26, Alexander Moisseev via freebsd-ports a écrit :
> > On 23.09.2016 15:45, Mathieu Arnold wrote:
> >>
> >> I don't really know what it does, but to test a port, it seems
> >> overcomplicated, everything is already done by the framework.
> >>
> >> Best would be for you to put:
> >>
> >> DEVELOPER=yes
> >>
> >> in /etc/make.conf
> >>
> >> and simply run "make" as a regular user, it will check everything that
> >> can be.
> >>
> > I believe the most important difference is "port test" does real
> > install (into a temp dir) and deinstall, "make" doesn't (merely staging).
>
> I don't really see a point in really installing the port, the only thing
> this achieve is test pkg add  works.
>
> These days, it is better to use poudriere testport[1] to test your work.
> At least you can be certain everything is ok.
>
> 1:
>
> https://www.freebsd.org/doc/en/books/porters-handbook/testing-poudriere.html
>
> --
> Mathieu Arnold
>
>
>
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"

Re: Differences when using `make` V `port test`

2016-09-23 Thread Mathieu Arnold
Le 23/09/2016 à 15:26, Alexander Moisseev via freebsd-ports a écrit :
> On 23.09.2016 15:45, Mathieu Arnold wrote:
>>
>> I don't really know what it does, but to test a port, it seems
>> overcomplicated, everything is already done by the framework.
>>
>> Best would be for you to put:
>>
>> DEVELOPER=yes
>>
>> in /etc/make.conf
>>
>> and simply run "make" as a regular user, it will check everything that
>> can be.
>>
> I believe the most important difference is "port test" does real
> install (into a temp dir) and deinstall, "make" doesn't (merely staging).

I don't really see a point in really installing the port, the only thing
this achieve is test pkg add  works.

These days, it is better to use poudriere testport[1] to test your work.
At least you can be certain everything is ok.

1:
https://www.freebsd.org/doc/en/books/porters-handbook/testing-poudriere.html

-- 
Mathieu Arnold




signature.asc
Description: OpenPGP digital signature


Re: Differences when using `make` V `port test`

2016-09-23 Thread Alexander Moisseev via freebsd-ports

On 23.09.2016 15:45, Mathieu Arnold wrote:


I don't really know what it does, but to test a port, it seems
overcomplicated, everything is already done by the framework.

Best would be for you to put:

DEVELOPER=yes

in /etc/make.conf

and simply run "make" as a regular user, it will check everything that
can be.


I believe the most important difference is "port test" does real install (into a temp 
dir) and deinstall, "make" doesn't (merely staging).
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Differences when using `make` V `port test`

2016-09-23 Thread Mathieu Arnold
Le 22/09/2016 à 23:49, Jev Bjorsell a écrit :
> Hi All,
>
> Noob porter here. :)
>
> I created a port for prometheus, and opened a ticket here:
> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212468
>
> On the advice of Kubilay, I ran `port test`, and this leads me to my
> question;
>
> When running `port test` the build binaries are not found, (logs below),
> but when doing a simple `make install` everything works fine, and I can see
> the binaries in the work/ directory also.
> I suspect that the pormetheus build process is doing something a little
> magic, but I'm lookin to understand why the build behaves differently under
> `port test` compared to a straight `make`.
>
> Logs from both `port test` and `make` follow.

I don't really know what it does, but to test a port, it seems
overcomplicated, everything is already done by the framework.

Best would be for you to put:

DEVELOPER=yes

in /etc/make.conf

and simply run "make" as a regular user, it will check everything that
can be.

-- 
Mathieu Arnold




signature.asc
Description: OpenPGP digital signature


Differences when using `make` V `port test`

2016-09-22 Thread Jev Bjorsell
Hi All,

Noob porter here. :)

I created a port for prometheus, and opened a ticket here:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212468

On the advice of Kubilay, I ran `port test`, and this leads me to my
question;

When running `port test` the build binaries are not found, (logs below),
but when doing a simple `make install` everything works fine, and I can see
the binaries in the work/ directory also.
I suspect that the pormetheus build process is doing something a little
magic, but I'm lookin to understand why the build behaves differently under
`port test` compared to a straight `make`.

Logs from both `port test` and `make` follow.

Thanks,
Jev


output from `port test`

 jev@futz  /usr/ports/net-mgmt/prometheus  port test
===> Using ports tree /usr/ports
===> Validating port with portlint
WARN: Makefile: [43]: whitespace before end of line.
0 fatal errors and 1 warning found.
===> flags: PREFIX=/tmp/prometheus-1.1.3 NO_DEPENDS=yes
PKG_DBDIR=/tmp/pkg_db.bZyp4Q3g PORTSDIR=/usr/ports --
===> Cleaning workspace before port test
===>  Cleaning for prometheus-1.1.3
===>  License APACHE20 accepted by the user
===> Fetching all distfiles required by prometheus-1.1.3 for building
===>  Extracting for prometheus-1.1.3
=> SHA256 Checksum OK for prometheus-prometheus-v1.1.3_GH0.tar.gz.
===>  Patching for prometheus-1.1.3
===>  Applying FreeBSD patches for prometheus-1.1.3
===>  Configuring for prometheus-1.1.3
===>  Building for prometheus-1.1.3
(cd /usr/ports.svn/net-mgmt/prometheus/work/src/
github.com/prometheus/prometheus ; /usr/bin/env
GOPATH="/usr/ports.svn/net-mgmt/prometheus/work:/usr/local/share/go"
 CGO_CFLAGS="-I/usr/local/include"  CGO_LDFLAGS="-L/usr/local/lib"
 GOBIN="" PREFIX=/usr/ports.svn/net-mgmt/prometheus/work/src/
github.com/prometheus/prometheus gmake build)
gmake[1]: Entering directory
'/usr/ports.svn/net-mgmt/prometheus/work/prometheus-1.1.3'
>> building binaries
Using config file: /usr/ports.svn/net-mgmt/prometheus/work/src/
github.com/prometheus/prometheus/.promu.yml
 >   prometheus
+ go build -a -tags netgo -ldflags "-X
github.com/prometheus/prometheus/vendor/github.com/prometheus/common/version.Version=1.1.3
-X
github.com/prometheus/prometheus/vendor/github.com/prometheus/common/version.Revision=
-X
github.com/prometheus/prometheus/vendor/github.com/prometheus/common/version.Branch=
-X
github.com/prometheus/prometheus/vendor/github.com/prometheus/common/version.BuildUser=jev@futz
-X
github.com/prometheus/prometheus/vendor/github.com/prometheus/common/version.BuildDate=20160922-21:22:42
 -extldflags "-static"" -o /tmp/prometheus-1.1.3/prometheus
github.com/prometheus/prometheus/cmd/prometheus
 >   promtool
+ go build -a -tags netgo -ldflags "-X
github.com/prometheus/prometheus/vendor/github.com/prometheus/common/version.Version=1.1.3
-X
github.com/prometheus/prometheus/vendor/github.com/prometheus/common/version.Revision=
-X
github.com/prometheus/prometheus/vendor/github.com/prometheus/common/version.Branch=
-X
github.com/prometheus/prometheus/vendor/github.com/prometheus/common/version.BuildUser=jev@futz
-X
github.com/prometheus/prometheus/vendor/github.com/prometheus/common/version.BuildDate=20160922-21:22:42
 -extldflags "-static"" -o /tmp/prometheus-1.1.3/promtool
github.com/prometheus/prometheus/cmd/promtool
gmake[1]: Leaving directory
'/usr/ports.svn/net-mgmt/prometheus/work/prometheus-1.1.3'
===>  Staging for prometheus-1.1.3
===>   Generating temporary packing list
===> Creating groups.
===> Creating users
install   -m 555
/usr/ports.svn/net-mgmt/prometheus/work/prometheus-1.1.3/promtool
/usr/ports.svn/net-mgmt/prometheus/work/stage/tmp/prometheus-1.1.3/bin
install: /usr/ports.svn/net-mgmt/prometheus/work/prometheus-1.1.3/promtool:
No such file or directory
*** Error code 71

Stop.
make: stopped in /usr/ports.svn/net-mgmt/prometheus
===> Error running make stage
===> Cleaning up
 ✘ jev@futz  /usr/ports/net-mgmt/prometheus 



output from just make;

 jev@futz  /usr/ports/net-mgmt/prometheus  sudo make
===>  License APACHE20 accepted by the user
===>   prometheus-1.1.3 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by prometheus-1.1.3 for building
===>  Extracting for prometheus-1.1.3
=> SHA256 Checksum OK for prometheus-prometheus-v1.1.3_GH0.tar.gz.
===>  Patching for prometheus-1.1.3
===>  Applying FreeBSD patches for prometheus-1.1.3
===>   prometheus-1.1.3 depends on file: /usr/local/bin/go - found
===>   prometheus-1.1.3 depends on executable: gmake - found
===>  Configuring for prometheus-1.1.3
===>  Building for prometheus-1.1.3
(cd /usr/ports.svn/net-mgmt/prometheus/work/src/
github.com/prometheus/prometheus ; /usr/bin/env
GOPATH="/usr/ports.svn/net-mgmt/prometheus/work:/usr/local/share/go"
 CGO_CFLAGS="-I/usr/local/include"  CGO_LDFLAGS="-L/usr/local/lib"
 GOBIN="" PREFIX=/usr/ports.svn/net-mgmt/prometheus/work/src/
github.com/prometheus/prometheus gmake build)
gmake[1]: Entering directory