Bug 94288 - [PATCH] misc/tinderbox: OPTIONaly depend on c[v]sup
Summary: [PATCH] misc/tinderbox: OPTIONaly depend on c[v]sup
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Ion-Mihai "IOnut" Tetcu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-10 01:50 UTC by Ion-Mihai " IOnut " Tetcu
Modified: 2006-05-12 14:51 UTC (History)
0 users

See Also:


Attachments
tinderbox.diff (1.02 KB, patch)
2006-03-10 01:50 UTC, Ion-Mihai " IOnut " Tetcu
no flags Details | Diff
tinderbox.diff (1.16 KB, patch)
2006-03-10 02:32 UTC, Ion-Mihai " IOnut " Tetcu
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ion-Mihai " IOnut " Tetcu 2006-03-10 01:50:05 UTC

Csup is mature enough to be used and builds much faster that cvsup and dependencies.
Tinderbox now has support for using something else that cvsup for updates.
So offer the option to tun-depend on one or the other.

On HEAD csup is in the base, but I don't think we had a OSVERSION bump since it was imported;
when a new bump is done we should try to install/depend on csup.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2006-03-10 01:52:11 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback
Comment 2 Ion-Mihai " IOnut " Tetcu 2006-03-10 02:32:04 UTC
This new patch also fixes p5-DBD-mysql dependency

 # /var/tinderbox/scripts/setup.sh
Welcome to the Tinderbox Setup script.  This script will guide you through
some of the automated Tinderbox setup steps.  Once this script completes, you
should review the documentation in /var/tinderbox/scripts/README or on the
web at http://tinderbox.marcuscom.com/ to complete your setup.

Hit <ENTER> to get started:
INFO: Checking prerequisites ...
DONE.

INFO: Creating default configuration files ...
DONE.

INFO: Beginning database configuration.
Enter database driver (mysql pgsql): mysql
INFO: Checking for prerequisites for mysql database driver ...
ERROR: The following mandatory dependencies are missing.  These must be
installed prior to running the Tinderbox setup script.
ERROR:     databases/p5-DBD-mysql41 databases/mysql41-client
root(itetcu)@worf/SU >-SSH-> /usr/ports/misc/tinderbox [4:20:44] 1
 # pkg_info -I p5-DBD\*
p5-DBD-mysql-3.0002 MySQL driver for the Perl5 Database Interface (DBI)

 # make -VMYSQL_VER
50



-- 
IOnut - Unregistered ;) FreeBSD "user"
  "Intellectual Property" is   nowhere near as valuable   as "Intellect"

BOFH excuse #157:
Incorrect time synchronization

Comment 3 Ion-Mihai " IOnut " Tetcu 2006-03-10 03:17:21 UTC
> >Description:
> 
> 
> Csup is mature enough to be used and builds much faster that cvsup and dependencies.
> Tinderbox now has support for using something else that cvsup for updates.

The update command for ./create Jail should be set to ../../../usr/local/bin/csup

-- 
IOnut - Unregistered ;) FreeBSD "user"
  "Intellectual Property" is   nowhere near as valuable   as "Intellect"

BOFH excuse #370:
Virus due to computers having unsafe sex
Comment 4 Ion-Mihai " IOnut " Tetcu 2006-03-10 12:58:13 UTC
On Fri, 10 Mar 2006 05:17:21 +0200
Ion-Mihai Tetcu <itetcu@people.tecnik93.com> wrote:

> > >Description:
> > 
> > 
> > Csup is mature enough to be used and builds much faster that cvsup and dependencies.
> > Tinderbox now has support for using something else that cvsup for updates.
> 
> The update command for ./create Jail should be set to ../../../usr/local/bin/csup

Err, more like:
      '../../../usr/local/bin/csup /var/tinderbox/jails/6/src-supfile'
e.g. if not using cvsup you need to pass the exact invocation of the update  command.


-- 
IOnut - Unregistered ;) FreeBSD "user"
  "Intellectual Property" is   nowhere near as valuable   as "Intellect"

History tends to exaggerate.
		-- Col. Green, "The Savage Curtain", stardate 5906.4
Comment 5 Andreas Kohn 2006-03-18 11:59:31 UTC
Hi,

I like the patch to enable cvsup/csup selection.
I think the unconditional RUN_DEPENDS on cvsup needs to get removed in
that case as well.
The patch for MySQL is incomplete, as setup-mysql.sh would still barf
about missing MySQL-ports.
The attached patch also fixes that, and sets USE_APACHE=1.3+ to stop
annoying apache2 users that apache13 is needed :)

Ion-Mihai, what do you think?

Regards,
Andreas

(Patch copy/pasted into the Mail, I cannot make evolution not send it base64-encoded :/
 same patch available on http://andreas.syndrom23.de/dump/tb-r2.diff
)
--- tb-r2.diff begins here ---
Index: Makefile
===================================================================
RCS file: /storage/freebsd/cvs/ports/misc/tinderbox/Makefile,v
retrieving revision 1.13
diff -u -r1.13 Makefile
--- Makefile	24 Feb 2006 02:28:02 -0000	1.13
+++ Makefile	18 Mar 2006 11:38:26 -0000
@@ -6,7 +6,7 @@
 
 PORTNAME=	tinderbox
 PORTVERSION=	2.3.0
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	misc
 MASTER_SITES=	http://tinderbox.marcuscom.com/
 
@@ -15,14 +15,15 @@
 
 RUN_DEPENDS=	${SITE_PERL}/${PERL_ARCH}/Digest/MD5.pm:${PORTSDIR}/security/p5-Digest-MD5 \
 		${SITE_PERL}/Net/SMTP.pm:${PORTSDIR}/net/p5-Net \
-		${LOCALBASE}/share/pear/DB.php:${PORTSDIR}/databases/pear-DB \
-		cvsup:${PORTSDIR}/net/cvsup-without-gui
+		${LOCALBASE}/share/pear/DB.php:${PORTSDIR}/databases/pear-DB
 
 OPTIONS=	PGSQL "With pgsql" On \
-		MYSQL "With mysql" Off
+		MYSQL "With mysql" Off \
+		CSUP  "Use csup for updates" On \
+		CVSUP "Use cvsup for updates" Off
 
 NO_BUILD=	yes
-USE_APACHE=	yes
+USE_APACHE=	1.3+
 SUB_FILES=	pkg-message
 PKGMESSAGE=	${WRKDIR}/pkg-message
 
@@ -43,7 +44,15 @@
 .if defined(WITH_MYSQL)
 USE_PHP+=	mysql
 USE_MYSQL=	yes
-RUN_DEPENDS+=	${SITE_PERL}/${PERL_ARCH}/DBD/mysql.pm:${PORTSDIR}/databases/p5-DBD-mysql
+RUN_DEPENDS+=	${SITE_PERL}/${PERL_ARCH}/DBD/mysql.pm:${PORTSDIR}/databases/p5-DBD-mysql${MYSQL_VER}
+.endif
+
+.if defined(WITH_CSUP)
+RUN_DEPENDS+=	csup:${PORTSDIR}/net/csup
+.endif
+
+.if defined(WITH_CVSUP)
+RUN_DEPENDS+=	cvsup:${PORTSDIR}/net/cvsup-without-gui
 .endif
 
 .include "${PORTSDIR}/Mk/bsd.php.mk"
@@ -53,6 +62,13 @@
 	${MV} ${WRKSRC}/www-exp/${f} ${WRKSRC}/www-exp/${f}-dist
 .endfor
 
+post-patch:
+.if defined(WITH_MYSQL)
+	${REINPLACE_CMD} \
+		-e 's,DB_MAN_PREREQS=.*,DB_MAN_PREREQS="databases/p5-DBD-mysql${MYSQL_VER} databases/mysql${MYSQL_VER}-client",' \
+		${WRKSRC}/lib/setup-mysql.sh
+.endif
+
 do-install:
 	${MKDIR} ${PREFIX}/tinderbox/scripts
 	${CP} -R ${WRKSRC}/* ${PREFIX}/tinderbox/scripts

--- tb-r2.diff ends here ---

Comment 6 Ion-Mihai " IOnut " Tetcu 2006-03-18 17:09:26 UTC
On Sat, 18 Mar 2006 12:59:31 +0100
Andreas Kohn <andreas@syndrom23.de> wrote:

> Hi,
> 
> I like the patch to enable cvsup/csup selection.
> I think the unconditional RUN_DEPENDS on cvsup needs to get removed in
> that case as well.
> The patch for MySQL is incomplete, as setup-mysql.sh would still barf
> about missing MySQL-ports.

Yes, I was too enthusiastic the night I sent that PR; I didn't do the
post-patch because I didn't know if that shouldn't be fixed upstream.

> The attached patch also fixes that, and sets USE_APACHE=1.3+ to stop
> annoying apache2 users that apache13 is needed :)
> 
> Ion-Mihai, what do you think?

 [ .. patch .. ]

Looks good.


-- 
IOnut - Unregistered ;) FreeBSD "user"
  "Intellectual Property" is   nowhere near as valuable   as "Intellect"

The sooner our happiness together begins, the longer it will last.
		-- Miramanee, "The Paradise Syndrome", stardate 4842.6
Comment 7 Jean Milanez Melo freebsd_committer freebsd_triage 2006-04-04 18:37:38 UTC
Responsible Changed
From-To: freebsd-ports-bugs->jmelo

I'll take it.
Comment 8 Jean Milanez Melo freebsd_committer freebsd_triage 2006-04-05 16:52:00 UTC
Dears,

I looked the patch last night and i would like to give an advice to you. 
You should apply a patch (eg. with REINPLACE_CMD) in tinderbox script 
when the user choose csup as default updater. Otherwise the user must 
pass exact invocation of the update command as itetcu said before.

- Jean
Comment 9 Ion-Mihai " IOnut " Tetcu 2006-04-05 21:46:05 UTC
On Wed, 05 Apr 2006 12:52:00 -0300
Jean Milanez Melo <jmelo@FreeBSD.org> wrote:

> Dears,
> 
> I looked the patch last night and i would like to give an advice to you. 
> You should apply a patch (eg. with REINPLACE_CMD) in tinderbox script 
> when the user choose csup as default updater. Otherwise the user must 
> pass exact invocation of the update command as itetcu said before.

After reading a small part of the code when installing my latest tindy,
I believe the problem should be fixed upstream (hence tinderbox list
cc'ed), both in the scripts/create and in scripts/tc. We can of course
patch this locally until the next release.

Please commit the patch as it is for now, since Andreas is rather busy
for now.

Thanks,

-- 
IOnut - Unregistered ;) FreeBSD "user"
  "Intellectual Property" is   nowhere near as valuable   as "Intellect"

BOFH excuse #23:
improperly oriented keyboard
Comment 10 Joe Marcus Clarke 2006-04-05 21:56:03 UTC
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ion-Mihai Tetcu wrote:
> On Wed, 05 Apr 2006 12:52:00 -0300
> Jean Milanez Melo <jmelo@FreeBSD.org> wrote:
> 
>> Dears,
>>
>> I looked the patch last night and i would like to give an advice to you. 
>> You should apply a patch (eg. with REINPLACE_CMD) in tinderbox script 
>> when the user choose csup as default updater. Otherwise the user must 
>> pass exact invocation of the update command as itetcu said before.

Please concisely describe the problem for this list.

Joe

- --
PGP Key : http://www.marcuscom.com/pgp.asc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFENC7Ib2iPiv4Uz4cRAu0iAJ9+W7caF6kbAe4y8TrwN6e6vv/k8ACfdDhp
zREaEiFPIxPlBv54iLpdvJk=
=uVFt
-----END PGP SIGNATURE-----
Comment 11 Ion-Mihai " IOnut " Tetcu 2006-04-05 23:07:06 UTC
 [ Dropped bug-follow-up ]

On Wed, 05 Apr 2006 16:56:03 -0400
Joe Marcus Clarke <marcus@marcuscom.com> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Ion-Mihai Tetcu wrote:
> > On Wed, 05 Apr 2006 12:52:00 -0300
> > Jean Milanez Melo <jmelo@FreeBSD.org> wrote:
> > 
> >> Dears,
> >>
> >> I looked the patch last night and i would like to give an advice to you. 
> >> You should apply a patch (eg. with REINPLACE_CMD) in tinderbox script 
> >> when the user choose csup as default updater. Otherwise the user must 
> >> pass exact invocation of the update command as itetcu said before.
> 
> Please concisely describe the problem for this list.

You can't use something else that cvsup as update command for port
trees or jails. The example in the README doesn't work (it will still
try to use cvsup). From glancing at the code it seems -P's values isn't
used by ./tc  (and it's used wrong by ./create).

I don't have my last full session of trial and error, but if you want I
could set up a tinderbox on my desktop and give you a script(1) session
of it or something like that.

-- 
IOnut - Unregistered ;) FreeBSD "user"
  "Intellectual Property" is   nowhere near as valuable   as "Intellect"

BOFH excuse #111:
The salesman drove over the CPU board
Comment 12 Joe Marcus Clarke 2006-04-06 06:14:38 UTC
On Thu, 2006-04-06 at 01:07 +0300, Ion-Mihai Tetcu wrote:
>  [ Dropped bug-follow-up ]
> 
> On Wed, 05 Apr 2006 16:56:03 -0400
> Joe Marcus Clarke <marcus@marcuscom.com> wrote:
> 
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> > 
> > Ion-Mihai Tetcu wrote:
> > > On Wed, 05 Apr 2006 12:52:00 -0300
> > > Jean Milanez Melo <jmelo@FreeBSD.org> wrote:
> > > 
> > >> Dears,
> > >>
> > >> I looked the patch last night and i would like to give an advice to you. 
> > >> You should apply a patch (eg. with REINPLACE_CMD) in tinderbox script 
> > >> when the user choose csup as default updater. Otherwise the user must 
> > >> pass exact invocation of the update command as itetcu said before.
> > 
> > Please concisely describe the problem for this list.
> 
> You can't use something else that cvsup as update command for port
> trees or jails. The example in the README doesn't work (it will still
> try to use cvsup). From glancing at the code it seems -P's values isn't
> used by ./tc  (and it's used wrong by ./create).
> 
> I don't have my last full session of trial and error, but if you want I
> could set up a tinderbox on my desktop and give you a script(1) session
> of it or something like that.


This should be fixed in the 2.X branch in CVS.

Joe

-- 
PGP Key : http://www.marcuscom.com/pgp.asc
Comment 13 Jean Milanez Melo 2006-04-06 14:07:31 UTC
Joe Marcus Clarke wrote:
> 
> This should be fixed in the 2.X branch in CVS.
> 
> Joe
> 

Itetcu,

So i think that right thing is wait until 2.X branch in CVS to be 
released to do this changes on port.

- Jean
Comment 14 Sergey Matveychuk freebsd_committer freebsd_triage 2006-05-05 22:23:06 UTC
>  So i think that right thing is wait until 2.X branch in CVS to be 
>  released to do this changes on port.

But note, the port does not sets up with mysql right now. I've installed
   the port and should change the port to work. And not just me.
ports/96823 was submitted today.

-- 
Dixi.
Sem.
Comment 15 Jean Milanez Melo 2006-05-08 15:10:29 UTC
Sergey Matveychuk wrote:
>> So i think that right thing is wait until 2.X branch in CVS to be 
>> released to do this changes on port.
> 
> 
> But note, the port does not sets up with mysql right now. I've installed
>    the port and should change the port to work. And not just me.
> ports/96823 was submitted today.
> 

Hello sem and itetcu,

I can commit only mysql change on port. Is it ok to you?

If itetcu wants i can assign this PR to him, after all now he's committer ;)

-- 
Atenciosamente
Jean Milanez Melo
FreeBSD Brasil LTDA.
Fone: (31) 3281-9633
http://www.freebsdbrasil.com.br
Comment 16 Ion-Mihai " IOnut " Tetcu 2006-05-08 15:27:07 UTC
On Mon, 08 May 2006 11:10:29 -0300
Jean Milanez Melo <jmelo@freebsdbrasil.com.br> wrote:

> Sergey Matveychuk wrote:
> >> So i think that right thing is wait until 2.X branch in CVS to be 
> >> released to do this changes on port.
> > 
> > 
> > But note, the port does not sets up with mysql right now. I've installed
> >    the port and should change the port to work. And not just me.
> > ports/96823 was submitted today.
> > 
> 
> Hello sem and itetcu,
> 
> I can commit only mysql change on port. Is it ok to you?

For the time being, yes.
 
> If itetcu wants i can assign this PR to him, after all now he's committer ;)

Please and thanks.


-- 
IOnut - Un^d^dregistered ;) FreeBSD "user"
  "Intellectual Property" is   nowhere near as valuable   as "Intellect"

BOFH excuse #259:
Someone's tie is caught in the printer, and if anything else gets
printed, he'll be in it too
Comment 17 Jean Milanez Melo freebsd_committer freebsd_triage 2006-05-08 15:49:20 UTC
Responsible Changed
From-To: jmelo->itetcu

Assign PR to submitter, now he's committer.
Comment 18 Ion-Mihai "IOnut" Tetcu freebsd_committer freebsd_triage 2006-05-12 14:51:34 UTC
State Changed
From-To: feedback->closed

Committed.