Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 May 2012 14:58:51 GMT
From:      Nicole Reid <root@cooltrainer.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/167735: [Maintainer Update] sysutils/abgx360 to 1.0.6
Message-ID:  <201205091458.q49Ewp2C088798@red.freebsd.org>
Resent-Message-ID: <201205091500.q49F0RsT061817@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         167735
>Category:       ports
>Synopsis:       [Maintainer Update] sysutils/abgx360 to 1.0.6
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 09 15:00:27 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Nicole Reid
>Release:        
>Organization:
>Environment:
>Description:
Update to 1.0.6 and unbreak on FreeBSD 9 by disabling CAM CCB code.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -ruN abgx360-1.0.5/Makefile abgx360/Makefile
--- abgx360-1.0.5/Makefile	2012-05-07 09:59:46.840664846 -0400
+++ abgx360/Makefile	2012-05-09 10:36:40.949478031 -0400
@@ -6,9 +6,10 @@
 #
 
 PORTNAME=	abgx360
-PORTVERSION=	1.0.5
+PORTVERSION=	1.0.6
 CATEGORIES=	sysutils
-MASTER_SITES=	http://abgx360.x-scene.com/
+MASTER_SITES=	http://abgx360.x-scene.com/ \
+	http://update.cooltrainer.org/freebsd-ports/sysutils/abgx360/
 
 MAINTAINER=	root@cooltrainer.org
 COMMENT=	Verify and repair Xbox 360 backup images
@@ -24,8 +25,8 @@
 
 .include <bsd.port.pre.mk>
 
-.if ${OSVERSION} >= 900044
-BROKEN=		does not compile on FreeBSD 9.X
+.if ${OSVERSION} >= 900000
+EXTRA_PATCHES+=	${FILESDIR}/extra-patch-src-abgx360.c
 .endif
 
 .if ${OSVERSION} > 900000
diff -ruN abgx360-1.0.5/distinfo abgx360/distinfo
--- abgx360-1.0.5/distinfo	2012-05-07 09:59:46.841664865 -0400
+++ abgx360/distinfo	2012-05-07 10:19:44.516664688 -0400
@@ -1,2 +1,2 @@
-SHA256 (abgx360-1.0.5.tar.gz) = 69700079d7308b2d7fd20eafbde1bd939da4c900a6240511e4289de1dd112615
-SIZE (abgx360-1.0.5.tar.gz) = 264889
+SHA256 (abgx360-1.0.6.tar.gz) = d73e0270383ff9c150224e1f687d1d5643b4c23752cfaec2dcfde8a12db5a8f7
+SIZE (abgx360-1.0.6.tar.gz) = 308959
diff -ruN abgx360-1.0.5/files/extra-patch-src-abgx360.c abgx360/files/extra-patch-src-abgx360.c
--- abgx360-1.0.5/files/extra-patch-src-abgx360.c	1969-12-31 19:00:00.000000000 -0500
+++ abgx360/files/extra-patch-src-abgx360.c	2012-05-07 10:31:43.103664754 -0400
@@ -0,0 +1,87 @@
+--- src/abgx360.c.orig	2012-05-07 10:23:05.997665157 -0400
++++ src/abgx360.c	2012-05-07 10:26:22.824665331 -0400
+@@ -2220,82 +2220,8 @@
+ 
+ int sendcdb(int direction, unsigned char *dataBuffer, unsigned long dataBufferSize,
+             unsigned char *cdb, unsigned char cdbLen, bool checkreturnlength) {
+-    int i;
+-    union ccb *ccb = NULL;
+-    ccb = cam_getccb(cam_dev);
+-    if (ccb == NULL) {
+-        color(red);
+-        printf("ERROR: Memory allocation of CAM CCB failed! Game over man... Game over!%s", newline);
+-        color(normal);
+-      exit(1);
+-    }
+-    cam_fill_csio(&ccb->csio,
+-                  1,                  // retries
+-                  NULL,               // cbfcnp      // ?
+-                  direction,          // flags
+-                  MSG_SIMPLE_Q_TAG,   // tag_action  // What to do for tag queueing - ?
+-                  dataBuffer,         // data_ptr
+-                  dataBufferSize,     // dxfer_len
+-                  96,                 // sense_len   // Number of bytes to autosense - ?
+-                  cdbLen,             // cdb_len
+-                  dvdtimeout * 1000); // timeout (ms)
+-    memcpy(ccb->csio.cdb_io.cdb_bytes, cdb, cdbLen);
+-    int rv = cam_send_ccb(cam_dev, ccb);
+-    if (debug) {
+-        printf("ccb->csio.sense_data.error_code = %02X%s", ccb->csio.sense_data.error_code, newline);
+-        printf("ccb->csio.sense_data.segment = %02X%s", ccb->csio.sense_data.segment, newline);
+-        printf("ccb->csio.sense_data.flags = %02X%s", ccb->csio.sense_data.flags, newline);
+-        printf("ccb->csio.sense_data.info = %02X%02X%02X%02X%s", ccb->csio.sense_data.info[0], ccb->csio.sense_data.info[1], ccb->csio.sense_data.info[2], ccb->csio.sense_data.info[3], newline);
+-        printf("ccb->csio.sense_data.extra_len = %02X%s", ccb->csio.sense_data.extra_len, newline);
+-        printf("ccb->csio.sense_data.cmd_spec_info = %02X%02X%02X%02X%s", ccb->csio.sense_data.cmd_spec_info[0], ccb->csio.sense_data.cmd_spec_info[1], ccb->csio.sense_data.cmd_spec_info[2], ccb->csio.sense_data.cmd_spec_info[3], newline);
+-        printf("ccb->csio.sense_data.add_sense_code = %02X%s", ccb->csio.sense_data.add_sense_code, newline);
+-        printf("ccb->csio.sense_data.add_sense_code_qual = %02X%s", ccb->csio.sense_data.add_sense_code_qual, newline);
+-        printf("ccb->csio.sense_data.fru = %02X%s", ccb->csio.sense_data.fru, newline);
+-        printf("ccb->csio.sense_data.sense_key_spec = %02X%02X%02X%s", ccb->csio.sense_data.sense_key_spec[0], ccb->csio.sense_data.sense_key_spec[1], ccb->csio.sense_data.sense_key_spec[2], newline);
+-        printf("ccb->csio.sense_data.extra_bytes = ");
+-        for (i=0;i<14;i++) printf("%02X", ccb->csio.sense_data.extra_bytes[i]);
+-        printf("%s", newline);
+-    }
+-    sprintf(sense, "%02X/%02X/%02X", ccb->csio.sense_data.flags, ccb->csio.sense_data.add_sense_code, ccb->csio.sense_data.add_sense_code_qual); // not 100% sure about this
+-    if (rv == -1) {
+-        if (debug || testingdvd) {
+-            color(red);
+-            printf("ERROR: cam_send_ccb returned -1! (%s)%s", strerror(errno), newline);
+-            color(normal);
+-        }
+-	  return 1;
+-    }
+-    // check sense code (00/00/00 or 01/xx/xx is ok)
+-    if (ccb->csio.sense_data.flags != 0x00 || ccb->csio.sense_data.add_sense_code != 0x00 || ccb->csio.sense_data.add_sense_code_qual != 0x00) {
+-        if (ccb->csio.sense_data.flags != 0x01) {
+-            if (debug || testingdvd) {
+-                color(red);
+-                printf("sense: %s (%s)%s", sense, cdberror(sense), newline);
+-                color(normal);
+-            }
+-          return 1;
+-        }
+-        else if (debug || testingdvd) {
+-            color(yellow);
+-            printf("sense: %s (%s)%s", sense, cdberror(sense), newline);
+-            color(normal);
+-        }
+-    }
+-    else if (debug) printf("sense: %s (%s)%s", sense, cdberror(sense), newline);
+-    // todo: check that the proper amount of bytes were returned
+-    
+-    if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) {
+-        // error occured (includes sense errors - not sure if 01/xx/xx will trigger this or not)
+-        if (debug || testingdvd) {
+-            color(red);
+-            printf("ERROR: ccb->ccb_h.status (%08X) & CAM_STATUS_MASK (%08X) [%08X] != CAM_REQ_CMP (%08X)%s",
+-                   ccb->ccb_h.status, CAM_STATUS_MASK, ccb->ccb_h.status & CAM_STATUS_MASK, CAM_REQ_CMP, newline);
+-            color(normal);
+-        }
+-	  return 1;
+-    }
+-    cam_freeccb(ccb);
+-  return 0;
++    sprintf(sense, "UU/OO/SS"); // temp -- gives sense error "Unsupported Operat
++  return 1; // temp
+ }
+ 
+ #elif (defined(__OpenBSD__) || defined(__NetBSD__))


>Release-Note:
>Audit-Trail:
>Unformatted:



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