Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Jan 2013 07:29:45 +0200
From:      David Naylor <dbn@freebsd.org>
To:        ports@freebsd.org
Subject:   Setting up tinderbox-devel on a pkgng system
Message-ID:  <201301190729.50352.dbn@freebsd.org>

next in thread | raw e-mail | index | archive | help
--nextPart1418753.ED98XTjPsv
Content-Type: multipart/mixed;
  boundary="Boundary-01=_J9i+QWj38Ix4igo"
Content-Transfer-Encoding: 7bit


--Boundary-01=_J9i+QWj38Ix4igo
Content-Type: Text/Plain;
  charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hi,

I'm in the process of setting up tinderbox and have encountered some troubl=
es. =20

Looking at the code, tinderbox uses `pkg info -qgO` but passes package name=
s=20
when, according to pkg-info(8) """-O  Search is done by the <pkg-name>=20
origin.""".  So, no need for different checks per requirement. =20

Another issue with the above approach is that it fails to match against per=
l-
threaded-5.14.  [1]

I've attached a patch that fixes those issues for me. =20

Another issue is that, by default, the port installs databases/p5-DBD-mysql=
=20
which is not a recognised port.  The attached patch fixes that [2].

Regards,


[1] I think pkgng is partially broken as it will succeed in matching pkg na=
mes=20
when using `-O`.  Not sure what the expected behaviour is though.
[2] I assumed that databases/p5-DBD-mysqlXY needs to correspond to=20
databases/mysqlXY-client (no idea if that is a correct assumption).

--Boundary-01=_J9i+QWj38Ix4igo
Content-Type: text/x-patch;
  charset="ISO-8859-1";
  name="tb.diff"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="tb.diff"

Only in scripts: ds.ph
diff -ur /usr/local/tinderbox/scripts/lib/db-mysql.sh scripts/lib/db-mysql.=
sh
=2D-- /usr/local/tinderbox/scripts/lib/db-mysql.sh	2013-01-17 17:56:19.0000=
00000 +0200
+++ scripts/lib/db-mysql.sh	2013-01-18 07:42:32.000000000 +0200
@@ -24,8 +24,8 @@
 #
 # $MCom: portstools/tinderbox/lib/db-mysql.sh,v 1.8 2012/10/27 17:38:49 ma=
rcus Exp $
 #
=2Dexport DB_MAN_PREREQS=3D"databases/p5-DBD-mysql[456][0145]@p5-DBD-mysql[=
456][0145]-* databases/mysql[456][0145]-client@mysql[456][0145]-client-*"
=2Dexport DB_OPT_PREREQS=3D"databases/php5-mysql@php5-mysql-* databases/php=
5-pdo_mysql@php5-pdo_mysql-*"
+export DB_MAN_PREREQS=3D"databases/p5-DBD-mysql[456][0145] databases/mysql=
[456][0145]-client"
+export DB_OPT_PREREQS=3D"databases/php5-mysql databases/php5-pdo_mysql"
=20
 if [ -n "${db_admin_pass}" ]; then
     export DB_PROMPT=3D'true'
diff -ur /usr/local/tinderbox/scripts/lib/db-pgsql.sh scripts/lib/db-pgsql.=
sh
=2D-- /usr/local/tinderbox/scripts/lib/db-pgsql.sh	2013-01-17 17:56:19.0000=
00000 +0200
+++ scripts/lib/db-pgsql.sh	2013-01-18 07:43:07.000000000 +0200
@@ -24,8 +24,8 @@
 #
 # $MCom: portstools/tinderbox/lib/db-pgsql.sh,v 1.9 2012/10/27 17:38:49 ma=
rcus Exp $
 #
=2Dexport DB_MAN_PREREQS=3D"databases/p5-DBD-Pg@p5-DBD-Pg-* databases/postg=
resql*-client@postgresql*-client-*"
=2Dexport DB_OPT_PREREQS=3D"databases/php5-pgsql@php5-pgsql-* databases/php=
5-pdo_pgsql@php5-pdo_pgsql-*"
+export DB_MAN_PREREQS=3D"databases/p5-DBD-Pg databases/postgresql*-client"
+export DB_OPT_PREREQS=3D"databases/php5-pgsql databases/php5-pdo_pgsql"
=20
 if [ -n "${db_admin_pass}" ]; then
     export PGPASSWORD=3D${db_admin_pass}
diff -ur /usr/local/tinderbox/scripts/lib/db-sqlite.sh scripts/lib/db-sqlit=
e.sh
=2D-- /usr/local/tinderbox/scripts/lib/db-sqlite.sh	2013-01-17 17:56:19.000=
000000 +0200
+++ scripts/lib/db-sqlite.sh	2013-01-18 07:41:45.000000000 +0200
@@ -1,5 +1,5 @@
=2Dexport DB_MAN_PREREQS=3D"databases/sqlite3@sqlite3-* databases/p5-DBD-SQ=
Lite@p5-DBD-SQLite-*"
=2Dexport DB_OPT_PREREQS=3D"databases/php5-pdo_sqlite@php5-pdo_sqlite-*"
+export DB_MAN_PREREQS=3D"databases/sqlite3 databases/p5-DBD-SQLite"
+export DB_OPT_PREREQS=3D"databases/php5-pdo_sqlite"
=20
 export DB_PROMPT=3D''
 export DB_SCHEMA_LOAD=3D'/usr/local/bin/sqlite3 -batch ${db_name} < "${sch=
ema_file}"'
diff -ur /usr/local/tinderbox/scripts/lib/tc_command.sh scripts/lib/tc_comm=
and.sh
=2D-- /usr/local/tinderbox/scripts/lib/tc_command.sh	2013-01-17 17:56:19.00=
0000000 +0200
+++ scripts/lib/tc_command.sh	2013-01-18 07:40:58.000000000 +0200
@@ -296,8 +296,8 @@
 #-------------------------------------------------------------------------=
=2D-
=20
 Setup () {
=2D    MAN_PREREQS=3D"lang/perl5.[81]*@perl-5.[81]*"
=2D    OPT_PREREQS=3D"lang/php[45]@php[45]-* www/php[45]-session@php[45]-se=
ssion* archivers/p5-Compress-Bzip2@p5-Compress-Bzip2-*"
+    MAN_PREREQS=3D"lang/perl5.[81]*"
+    OPT_PREREQS=3D"lang/php[45] www/php[45]-session archivers/p5-Compress-=
Bzip2"
     PREF_FILES=3D"tinderbox.ph"
     README=3D"$(tinderLoc scripts README)"
     TINDERBOX_URL=3D"http://tinderbox.marcuscom.com/"
diff -ur /usr/local/tinderbox/scripts/lib/tinderlib.sh scripts/lib/tinderli=
b.sh
=2D-- /usr/local/tinderbox/scripts/lib/tinderlib.sh	2013-01-17 17:56:19.000=
000000 +0200
+++ scripts/lib/tinderlib.sh	2013-01-18 07:39:29.000000000 +0200
@@ -690,16 +690,14 @@
     use_pkgng=3D$(make -f /usr/ports/Mk/bsd.port.mk -VWITH_PKGNG)
=20
     for r in ${reqs} ; do
=2D	png_r=3D${r##*@}
=2D	p_r=3D${r%%@*}
         if [ -n "${use_pkgng}" ]; then=20
=2D            if [ -z "$(pkg info -qgO ${png_r})" ]; then
=2D                missing=3D"${missing} ${png_r}"
+            if [ -z "$(pkg info -qgO ${r})" ]; then
+                missing=3D"${missing} ${r}"
                 error=3D1
             fi
         else
=2D            if [ -z "$(pkg_info -Q -O ${p_r})" ]; then
=2D                missing=3D"${missing} ${p_r}"
+            if [ -z "$(pkg_info -Q -O ${r})" ]; then
+                missing=3D"${missing} ${r}"
                 error=3D1
             fi
         fi
Only in scripts: tinderbox
Only in scripts: tinderbox.ph
Only in scripts: tinderbox.ph.bak

--Boundary-01=_J9i+QWj38Ix4igo
Content-Type: text/x-patch;
  charset="ISO-8859-1";
  name="Makefile.diff"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="Makefile.diff"

=2D-- Makefile.orig	2013-01-18 07:49:57.000000000 +0200
+++ Makefile	2013-01-18 07:50:17.000000000 +0200
@@ -74,7 +74,7 @@
 USE_PHP+=3D	mysql
 .endif
 USE_MYSQL=3D	yes
=2DRUN_DEPENDS+=3D	p5-DBD-mysql>=3D0:${PORTSDIR}/databases/p5-DBD-mysql
+RUN_DEPENDS+=3D	p5-DBD-mysql>=3D0:${PORTSDIR}/databases/p5-DBD-mysql${MYSQ=
L_VER}
 .endif
=20
 .if ${PORT_OPTIONS:MSQLITE}

--Boundary-01=_J9i+QWj38Ix4igo--

--nextPart1418753.ED98XTjPsv
Content-Type: application/pgp-signature; name=signature.asc 
Content-Description: This is a digitally signed message part.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (FreeBSD)

iEYEABECAAYFAlD6L04ACgkQUaaFgP9pFrLdPACdGUPxgDocORb+E/6XD1GILNdt
ttsAn19ecngbxPqU9jJevrX5Kic9uS4w
=gUr+
-----END PGP SIGNATURE-----

--nextPart1418753.ED98XTjPsv--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201301190729.50352.dbn>