aboutsummaryrefslogtreecommitdiffstats
path: root/ports-mgmt/tinderbox
diff options
context:
space:
mode:
authoritetcu <itetcu@FreeBSD.org>2008-09-07 15:41:41 +0800
committeritetcu <itetcu@FreeBSD.org>2008-09-07 15:41:41 +0800
commit98ca25d76fa3c85fb68fd85078e443ad2e6a9bfc (patch)
treece825538bd2b189e725d6c4ec307ae7e47294312 /ports-mgmt/tinderbox
parent4c360293e6eb3af174e19604c1484af09f9977e2 (diff)
downloadfreebsd-ports-gnome-98ca25d76fa3c85fb68fd85078e443ad2e6a9bfc.tar.gz
freebsd-ports-gnome-98ca25d76fa3c85fb68fd85078e443ad2e6a9bfc.tar.zst
freebsd-ports-gnome-98ca25d76fa3c85fb68fd85078e443ad2e6a9bfc.zip
- fix PGSQL support [1]
- use strftime like in 2.x [1] - install rc script in system etc/rc.d - bump PORTREVISION Prompted by: makc@ [1] Obtained from: marcoscom CVS [1]
Diffstat (limited to 'ports-mgmt/tinderbox')
-rw-r--r--ports-mgmt/tinderbox/Makefile14
-rw-r--r--ports-mgmt/tinderbox/files/patch-lib__Tinderbox__TinderboxDS.pm33
-rw-r--r--ports-mgmt/tinderbox/files/patch-lib__tc_command.pl20
-rw-r--r--ports-mgmt/tinderbox/files/patch-sql__genschema19
-rw-r--r--ports-mgmt/tinderbox/files/patch-sql__schema.pgsql.pre20
-rw-r--r--ports-mgmt/tinderbox/pkg-plist1
6 files changed, 106 insertions, 1 deletions
diff --git a/ports-mgmt/tinderbox/Makefile b/ports-mgmt/tinderbox/Makefile
index 0efd4e652d12..a5b6a44b3550 100644
--- a/ports-mgmt/tinderbox/Makefile
+++ b/ports-mgmt/tinderbox/Makefile
@@ -7,6 +7,7 @@
PORTNAME= tinderbox
#DISTVERSION= ${PORTVERSION}-${PORTREVISION}
PORTVERSION= 3.0.0
+PORTREVISION= 1
CATEGORIES= ports-mgmt
MASTER_SITES= http://T32.TecNik93.com/FreeBSD/ports/${PORTNAME}/sources/
#DIST_SUBDIR= tinderbox
@@ -88,11 +89,22 @@ post-extract:
@${RM} -R ${WRKSRC}/webui
.endif
+post-patch:
+ ${RM} ${WRKSRC}/lib/Tinderbox/TinderboxDS.pm.orig \
+ ${WRKSRC}/lib/tc_command.pl.orig \
+ ${WRKSRC}/sql/schema.pgsql.pre.orig \
+ ${WRKSRC}/sql/genschema.orig
+
do-install:
- ${MKDIR} ${PREFIX}/tinderbox/scripts
+ @${MKDIR} ${PREFIX}/tinderbox/scripts
+ @${ECHO_CMD} "Installing man pages ..."
cd ${WRKSRC}/man/man1 && ${INSTALL_MAN} ${MAN1} ${MAN1PREFIX}/man/man1 && \
cd ${WRKSRC} && ${RM} -r ${WRKSRC}/man
+ @${ECHO_CMD} "Installing rc script ..."
+ ${INSTALL_SCRIPT} ${WRKSRC}/etc/rc.d/tinderd.sh ${PREFIX}/etc/rc.d/${PORTNAME}
+ @${ECHO_CMD} "Installing tinderbox ..."
${CP} -R ${WRKSRC}/* ${PREFIX}/tinderbox/scripts
+ @${ECHO_CMD} "All Done"
post-install:
@${CAT} ${PKGMESSAGE}
diff --git a/ports-mgmt/tinderbox/files/patch-lib__Tinderbox__TinderboxDS.pm b/ports-mgmt/tinderbox/files/patch-lib__Tinderbox__TinderboxDS.pm
new file mode 100644
index 000000000000..a20f37b4824d
--- /dev/null
+++ b/ports-mgmt/tinderbox/files/patch-lib__Tinderbox__TinderboxDS.pm
@@ -0,0 +1,33 @@
+--- ./lib/Tinderbox/TinderboxDS.pm.orig 2008-08-07 07:27:49.000000000 +0300
++++ ./lib/Tinderbox/TinderboxDS.pm 2008-09-07 09:37:07.000000000 +0300
+@@ -23,7 +23,7 @@
+ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ # SUCH DAMAGE.
+ #
+-# $MCom: portstools/tinderbox/lib/Tinderbox/TinderboxDS.pm,v 1.88 2008/08/07 04:27:49 marcus Exp $
++# $MCom: portstools/tinderbox/lib/Tinderbox/TinderboxDS.pm,v 1.88.2.2 2008/09/05 21:07:14 marcus Exp $
+ #
+
+ package Tinderbox::TinderboxDS;
+@@ -42,6 +42,7 @@
+ use DBI;
+ use Carp;
+ use Digest::MD5 qw(md5_hex);
++use POSIX qw(strftime);
+ use vars qw(
+ $DB_DRIVER
+ $DB_HOST
+@@ -362,8 +363,12 @@
+ sub reorgBuildPortsQueue {
+ my $self = shift;
+
++ my $enq_time = time - 25200;
++ my $enq_sql = strftime("%Y-%m-%d %H:%M:%S", localtime($enq_time));
++
+ my $rc = $self->_doQuery(
+- "DELETE FROM build_ports_queue WHERE enqueue_date<=NOW()-25200 AND status != 'ENQUEUED'"
++ "DELETE FROM build_ports_queue WHERE enqueue_date<=? AND status != 'ENQUEUED'",
++ [$enq_sql]
+ );
+
+ return $rc;
diff --git a/ports-mgmt/tinderbox/files/patch-lib__tc_command.pl b/ports-mgmt/tinderbox/files/patch-lib__tc_command.pl
new file mode 100644
index 000000000000..e57dc27820a1
--- /dev/null
+++ b/ports-mgmt/tinderbox/files/patch-lib__tc_command.pl
@@ -0,0 +1,20 @@
+--- ./lib/tc_command.pl.orig 2008-08-15 20:23:07.000000000 +0300
++++ ./lib/tc_command.pl 2008-09-07 09:37:07.000000000 +0300
+@@ -24,7 +24,7 @@
+ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ # SUCH DAMAGE.
+ #
+-# $MCom: portstools/tinderbox/lib/tc_command.pl,v 1.150 2008/08/15 17:23:07 marcus Exp $
++# $MCom: portstools/tinderbox/lib/tc_command.pl,v 1.150.2.1 2008/09/05 21:52:24 marcus Exp $
+ #
+
+ my $pb;
+@@ -1668,7 +1668,7 @@
+ . "\n");
+ } else {
+ cleanup($ds, 1,
+- "There is no BuildPortsQueue configured in the datastore.\n"
++ "There are no more queued ports for this host in the datastore.\n"
+ );
+ }
+ }
diff --git a/ports-mgmt/tinderbox/files/patch-sql__genschema b/ports-mgmt/tinderbox/files/patch-sql__genschema
new file mode 100644
index 000000000000..59a008d3086b
--- /dev/null
+++ b/ports-mgmt/tinderbox/files/patch-sql__genschema
@@ -0,0 +1,19 @@
+--- ./sql/genschema.orig 2008-07-25 02:52:33.000000000 +0300
++++ ./sql/genschema 2008-09-07 09:37:07.000000000 +0300
+@@ -24,7 +24,7 @@
+ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ # SUCH DAMAGE.
+ #
+-# $MCom: portstools/tinderbox/sql/genschema,v 1.1 2008/07/24 23:52:33 ade Exp $
++# $MCom: portstools/tinderbox/sql/genschema,v 1.1.2.1 2008/09/05 11:16:29 beat Exp $
+ #
+ # Create a full-blown schema from a series of files, reducing duplication
+ #
+@@ -48,6 +48,6 @@
+ # Kick out the generated schema
+ #
+ cat schema.${dbtype}.pre \
+- values.config values.hooks values.pfp values.pfr \
++ values.config values.hooks values.pfr values.pfp \
+ schema.${dbtype}.post
+ exit 0
diff --git a/ports-mgmt/tinderbox/files/patch-sql__schema.pgsql.pre b/ports-mgmt/tinderbox/files/patch-sql__schema.pgsql.pre
new file mode 100644
index 000000000000..5d516eb2b046
--- /dev/null
+++ b/ports-mgmt/tinderbox/files/patch-sql__schema.pgsql.pre
@@ -0,0 +1,20 @@
+--- ./sql/schema.pgsql.pre.orig 2008-08-05 02:18:10.000000000 +0300
++++ ./sql/schema.pgsql.pre 2008-09-07 09:37:07.000000000 +0300
+@@ -99,7 +99,7 @@
+ -- DROP TABLE port_dependencies CASCADE;
+ CREATE TABLE port_dependencies (
+ port_dependency_id SERIAL PRIMARY KEY,
+- build_port_id INTEGER REFERENCES build_port(build_port_id) ON UPDATE CASCADE ON DELETE CASCADE,
++ build_port_id INTEGER REFERENCES build_ports(build_port_id) ON UPDATE CASCADE ON DELETE CASCADE,
+ port_id INTEGER REFERENCES ports(port_id) ON UPDATE CASCADE ON DELETE CASCADE,
+ dependency_type VARCHAR(16) CHECK (dependency_type IN ('UNKNOWN', 'EXTRACT_DEPENDS', 'PATCH_DEPENDS', 'FETCH_DEPENDS', 'BUILD_DEPENDS', 'LIB_DEPENDS', 'DEPENDS', 'RUN_DEPENDS')) DEFAULT 'UNKNOWN'
+ );
+@@ -109,7 +109,7 @@
+ -- DROP TABLE config CASCADE;
+ CREATE TABLE config (
+ config_option_name VARCHAR(255) NOT NULL PRIMARY KEY,
+- config_option_value TEXT,
++ config_option_value TEXT
+ );
+
+ -- DROP TABLE build_ports_queue CASCADE;
diff --git a/ports-mgmt/tinderbox/pkg-plist b/ports-mgmt/tinderbox/pkg-plist
index 6d62d477ba07..5386ca5f8ed1 100644
--- a/ports-mgmt/tinderbox/pkg-plist
+++ b/ports-mgmt/tinderbox/pkg-plist
@@ -1,3 +1,4 @@
+etc/rc.d/tinderbox
tinderbox/scripts/README
tinderbox/scripts/ds.ph.dist
tinderbox/scripts/etc/env/.keep_me