--- xmcd-2.6.orig/Imakefile +++ xmcd-2.6/Imakefile @@ -51,7 +51,7 @@ /* * Custom install rule */ -#if defined(HPArchitecture) +#if 0 SHELL=/bin/ksh #else #if defined(ultrix) || defined(__ultrix) --- xmcd-2.6.orig/install.sh +++ xmcd-2.6/install.sh @@ -49,15 +49,15 @@ XMCD_URL=http://metalab.unc.edu/tkan/xmcd/ DIRPERM=755 SCRPERM=755 -FILEPERM=444 -BINPERM=711 -XBINPERM=4711 -OWNER=bin -GROUP=bin -BINOWNER=bin -BINGROUP=bin +FILEPERM=644 +BINPERM=755 +XBINPERM=4755 +OWNER=root +GROUP=root +BINOWNER=root +BINGROUP=root XBINOWNER=root -XBINGROUP=bin +XBINGROUP=root ERRFILE=/tmp/xmcd.err TMPFILE=/tmp/xmcdinst.$$ STARTUP_SCRIPT=.xmcd_start @@ -963,80 +963,8 @@ fi -# Remove old xmcd components - -$ECHO "\n\nChecking for old xmcd components..." - -# Old binaries -dirs=`echo "$OPATH" | $AWK -F: '{ for (i = 1; i <= NF; i++) print $i }'` -for i in $BINTRYDIRS -do - dirs=`$ECHO "$dirs\n$i"` -done -dirs=`($ECHO "$dirs" | \ - sed -e 's/^[ ]*//' -e '/^$/d' | \ - sort | uniq) 2>/dev/null` - -if [ -n "$dirs" ] -then - for i in $dirs - do - if [ "$i" = "$BINDIR" -o "$i" = "." ] - then - continue - fi - - for j in xmcd cda cddbcmd wm2xmcd dp2xmcd $STARTUP_SCRIPT - do - tryfile=${i}/${j} - if [ -f $tryfile -a -x $tryfile ] - then - if [ -z "$BATCH" ] - then - YNDEF=y - if get_yn "Remove old executable $tryfile" - then - rm -f $tryfile - if [ $? -ne 0 ] - then - $ECHO "Cannot remove $tryfile." - fi - fi - else - rm -f $tryfile - fi - fi - done - done -fi - -# Old xmcd app-defaults files -dirs=`for i in $LIBTRYDIRS $LIBDIR; do echo "$i"; done | sort | uniq` -for i in $dirs -do - tryfile=${i}/app-defaults/XMcd - if [ -f "$tryfile" ] - then - if [ -z "$BATCH" ] - then - YNDEF=y - if get_yn "Remove old xmcd resource file $tryfile" - then - rm -f $tryfile - if [ $? -ne 0 ] - then - $ECHO "Cannot remove ${tryfile}." - fi - fi - else - rm -f $tryfile - fi - fi -done - - # Set architecture-specific binary directory -ARCHBIN="${XMCDLIB}/bin-${OS_SYS_T}-${OS_MACH_T}" +ARCHBIN=`echo ${BINDIR%bin}`lib/xmcd/ # Make all necessary directories --- xmcd-2.6.orig/docs_d/WEB +++ xmcd-2.6/docs_d/WEB @@ -33,6 +33,10 @@ Please be sure to read the FAQ section on the CDDB site before sending submissions to the master database. +The original CDDB database server has now gone commercial. We encourage you +to submit to the FreeDB project instead - http://www.freedb.org. As of +xmcd-2.6-1 the Debian package has been changed to prefer freedb.org. + The xmcd wwwWarp feature also lets you perform searches on Internet search engine sites, so you can browse discographies, music reviews, lyrics, fan club and concert information, art and graphics, and many --- xmcd-2.6.orig/common_d/appenv.h +++ xmcd-2.6/common_d/appenv.h @@ -533,7 +533,7 @@ /* * Default Send CDDB site and command */ -#define CDDB_MAILSITE "cddb-submit@submit.cddb.com" +#define CDDB_MAILSITE "freedb-submit@freedb.org" #define CDDB_MAILCMD "mailx -s '%S' %A < %F" /* --- xmcd-2.6.orig/cddb_d/cddb_int.c +++ xmcd-2.6/cddb_d/cddb_int.c @@ -869,8 +869,8 @@ return FALSE; /* Send hello */ - (void) sprintf(buf, "%s %.64s %.64s %s v%s%sPL%d\r\n", - CDDB_HELLO, cddb_clinfo->user, cddb_clinfo->host, + (void) sprintf(buf, "%s unknown localhost %s v%s%sPL%d\r\n", + CDDB_HELLO, cddb_clinfo->prog, VERSION, VERSION_EXT, PATCHLEVEL); if ((code = cddb_remote_cmd(fp, buf, buflen)) == NULL) --- xmcd-2.6.orig/cddb_d/cddb_ext.c +++ xmcd-2.6/cddb_d/cddb_ext.c @@ -72,12 +72,7 @@ cddb_init(cddb_client_t *clp) { char *cp, - *path, - **ap, - hname[MAXHOSTNAMELEN], - tmpuser[STR_BUF_SZ], - tmphost[MAXHOSTNAMELEN]; - struct hostent *he; + *path; DBGPRN(errfp, "\nlibcddb: %s %s %s\n", #ifdef SYNCHRONOUS @@ -108,7 +103,7 @@ * common.cfg file */ if (app_data.cddb_filemode == NULL) - app_data.cddb_filemode = "0666"; + app_data.cddb_filemode = "0664"; if (app_data.hist_filemode == NULL) app_data.hist_filemode = "0644"; @@ -116,44 +111,6 @@ SOCKSINIT(clp->prog); #endif - if (clp->host[0] == '\0') { -#ifndef NOREMOTE - /* Try to determine host name */ - if (gethostname(hname, MAXHOSTNAMELEN-1) < 0 || - (he = gethostbyname(hname)) == NULL) { - (void) strcpy(clp->host, "unknown"); - } - else { - /* Look for a a fully-qualified hostname - * (with domain) - */ - if (strchr(he->h_name, '.') != NULL) { - (void) strncpy(clp->host, he->h_name, - MAXHOSTNAMELEN-1); - } - else { - for (ap = he->h_aliases; *ap != NULL; ap++) { - if (strchr(*ap, '.') != NULL) { - (void) strncpy(clp->host, *ap, - MAXHOSTNAMELEN-1); - break; - } - } - } - - if (clp->host[0] == '\0') - (void) strcpy(clp->host, hname); - - clp->host[MAXHOSTNAMELEN-1] = '\0'; - } -#else - (void) strcpy(clp->host, "unknown"); -#endif - } - - if (clp->user[0] == '\0') - (void) strcpy(clp->user, "unknown"); - /* Load XMCD_CDDBPATH environment variable, if specified */ if ((cp = (char *) getenv("XMCD_CDDBPATH")) != NULL) { if ((int) strlen(cp) >= MAX_ENV_LEN) { @@ -210,12 +167,8 @@ cddb_proxy.port = HTTP_DFLT_PORT; } - cddb_http_xlat(cddb_clinfo->user, tmpuser); - cddb_http_xlat(cddb_clinfo->host, tmphost); - (void) sprintf(http_hellostr, - "hello=%.64s+%.64s+%s+v%s%sPL%d", - tmpuser, tmphost, + "hello=unknown+localhost+%s+v%s%sPL%d", cddb_clinfo->prog, VERSION, VERSION_EXT, PATCHLEVEL); (void) sprintf(http_extinfo, #ifdef NO_MASQUERADE --- xmcd-2.6.orig/cddb_d/cddb.h +++ xmcd-2.6/cddb_d/cddb.h @@ -189,8 +189,6 @@ /* Client information structure */ typedef struct { char prog[FILE_PATH_SZ]; /* Client program name */ - char host[MAXHOSTNAMELEN]; /* Client host name */ - char user[STR_BUF_SZ]; /* Client user name */ bool_t (*isdemo)(void); /* Demo mode func */ curstat_t * (*curstat_addr)(void); /* Current status structure */ void (*fatal_msg)(char *, char *); /* Fatal message popup func */ --- xmcd-2.6.orig/libdi_d/config.sh +++ xmcd-2.6/libdi_d/config.sh @@ -31,25 +31,27 @@ VER=2.6 # Change the following directory to fit your local configuration -BINDIR=/usr/bin/X11 -LIBDIR=/usr/lib/X11 -XMCDLIB=/usr/lib/X11/xmcd -CDDBDIR=/usr/lib/X11/xmcd/cddb -DISCOGDIR=/usr/lib/X11/xmcd/discog - -ERRFILE=/tmp/xmcd.err -TMPFILE=/tmp/.xmcdcfg.$$ -TMPSITES=/tmp/.sites.$$ +# WTA: BINDIR is only used for cddbcmd, so it's safe to change it +BINDIR=/usr/bin +LIBDIR=/usr/X11R6/lib/X11 +XMCDLIB=/$LIBDIR/xmcd +CDDBDIR=/var/lib/cddb +DISCOGDIR=/var/lib/xmcd/discog + +ERRFILE=`tempfile --prefix xmcd --mode 0600` +TMPFILE=`tempfile --prefix xmcd --mode 0600` +TMPSITES=`tempfile --prefix xmcd --mode 0600` -CFGDIR=$XMCDLIB/config +CFGDIR=/etc/xmcd SCRDIR=$XMCDLIB/scripts SITES=$CFGDIR/sites -OWNER=bin -GROUP=bin -CDIRPERM=777 +TBLDIR=$XMCDLIB/tbl +OWNER=root +GROUP=audio +CDIRPERM=03775 DFLT_CGIPATH='/~cddb/cddb.cgi' CDDBCATS="rock jazz blues newage classical reggae folk country soundtrack misc data" -BROWSERS="netscape Mosaic" +BROWSERS="mozilla netscape Mosaic" # Utility functions @@ -209,7 +211,7 @@ YNDEF=n if get_yn "\n Do you want to continue" then - METHOD=0 + METHOD=1 VENDOR=0 VOLBASE=0 VOLTAPER=0 @@ -491,40 +493,9 @@ return 1 fi - # - # Select the ioctl method - # - $ECHO "\n Please select a Device Interface Method:\n" - $ECHO " 1.\tSunOS/Solaris/Linux/QNX ioctl method" - $ECHO " 2.\tFreeBSD/NetBSD/OpenBSD ioctl method" - $ECHO " 3.\tIBM AIX IDE ioctl method" - $ECHO " 4.\tBSDI BSD/OS ATAPI" - $ECHO " 5.\tSCO Open Server ATAPI BTLD" - $ECHO " 6.\tCompaq Tru64 UNIX / Digital UNIX ATAPI" - $ECHO " 7.\tHP-UX ATAPI" - $ECHO " q.\tquit (abort configuration)" - - while : - do - if get_str "\n Enter choice:" - then - case "$ANS" in - [1-7]) - break - ;; - q) - return 1 - ;; - *) - $ECHO " Please answer 1 to 7." - ;; - esac - else - $ECHO " Please answer 1 to 7." - fi - done - - IOCMETHOD="$ANS" + # WTA: disable the ioctl-selection code: since Debian is a Linux + # distribution, we already know the answer. + IOCMETHOD="1" if [ -z "$NUMDISCS" ] then @@ -765,18 +736,18 @@ eval `\ ( $ECHO "ENTRIES=\"" - cd $CFGDIR/.tbl + cd $TBLDIR for i in * do if [ -f $i ] then - if fgrep tblver=4 $CFGDIR/.tbl/$i \ + if fgrep tblver=4 $TBLDIR/$i \ >/dev/null 2>&1 then $ECHO "$i \c" else log_err -p \ - "$CFGDIR/.tbl/$i version mismatch" + "$TBLDIR/$i version mismatch" fi fi done @@ -789,7 +760,7 @@ then for i in $ENTRIES do - brand=`fgrep tblalias= $CFGDIR/.tbl/$i 2>/dev/null | \ + brand=`fgrep tblalias= $TBLDIR/$i 2>/dev/null | \ sed 's/^.*tblalias=//'` if [ -z "$brand" ] then @@ -818,10 +789,12 @@ rm -f $TMPFILE - while : - do - if get_str "\n Enter choice:" +# while : +# do + if ! get_str "\n Enter choice [$j]:" then + ANS=$j + fi if [ "$ANS" = q ] then return 1 @@ -842,7 +815,7 @@ do if [ $k = $ANS ] then - model_sel $i $CFGDIR/.tbl/$i + model_sel $i $TBLDIR/$i return $? fi k=`expr $k + 1` @@ -851,10 +824,7 @@ # Should not get here. return 1 fi - else - $ECHO " Please answer 1 to $j." - fi - done +# done # Should not get here. return 1 @@ -958,7 +928,7 @@ !/^#/ { if (n == sel) { if ($2 > 0) { - print "METHOD=0" + print "METHOD=1" printf("VENDOR=%d\n", $3) } else { @@ -1542,16 +1512,8 @@ WORD=A for j in $BROWSERS do - for i in /usr/bin/X11 \ - /usr/X/bin \ - /usr/X11/bin \ - /usr/X11R6/bin \ - /usr/X11R5/bin \ - /usr/X386/bin \ - /usr/openwin/bin \ - /usr/local/bin/X11 \ - /usr/local/bin \ - /usr/lbin + for i in /usr/bin \ + /usr/X11R6/bin do if [ -x $i/$j ] then @@ -1577,15 +1539,15 @@ if [ -z "$BROWSER" ] then $ECHO "\n$WORD web browser cannot be found on your system." - $ECHO "You must have Netscape Navigator/Communicator or" - $ECHO "or NCSA Mosaic in order to use the wwwWarp feature" - $ECHO "in xmcd. If you have one of these browsers, please" + $ECHO "You must have Mozilla, Netscape or similar" + $ECHO "in order to use the wwwWarp feature in xmcd." + $ECHO "If you have one of these browsers, please" $ECHO "enter its full path name." while : do - BDIR=/usr/bin/X11 - i=netscape + BDIR=/usr/bin + i=mozilla $ECHO "\n Enter web browser path, type \"c\" to \c" $ECHO "continue without\n specifying a browser path, \c" @@ -1606,21 +1568,8 @@ then BDIR=`dirname $ANS` i=`basename $ANS` - for j in $BROWSERS - do - if (echo $i | grep -i $j) \ - >/dev/null 2>&1 - then - BROWSER=$i - break - fi - done - if [ -z "$BROWSER" ] - then - $ECHO "\n$i is not a supported browser." - else - break - fi + BROWSER=$i + break else $ECHO "\n$ANS does not exist!" fi @@ -1642,16 +1591,8 @@ # # Set up browser configuration # - case $BROWSER in - *[nN][eE][tT][sS][cC][aA][pP][eE]*) - BROWSER_RMT="$BDIR/$BROWSER_RMT" - BROWSER_DIR="$BDIR/$BROWSER_DIR" - ;; - *[mM][oO][sS][aA][iI][cC]*) - BROWSER_RMT="$SCRDIR/ncsarmt '%U'" - BROWSER_DIR="$BDIR/Mosaic '%U' >/dev/null 2>&1 &" - ;; - esac + BROWSER_RMT="$BDIR/$BROWSER_RMT" + BROWSER_DIR="$BDIR/$BROWSER_DIR" $ECHO "\nXmcd has been configured to use the $BROWSER browser." else @@ -1687,8 +1628,8 @@ then while : do - BDIR=/usr/bin/X11 - i=netscape + BDIR=/usr/bin + i=mozilla $ECHO "\n Enter web browser path on \"$RMTSYS\", \c" $ECHO "type \"c\" to\n continue without specifying \c" @@ -1707,21 +1648,8 @@ BDIR=`dirname $ANS` i=`basename $ANS` - for j in $BROWSERS - do - if (echo $i | grep -i $j) >/dev/null 2>&1 - then - BROWSER=$i - break - fi - done - - if [ -z "$BROWSER" ] - then - $ECHO "\n$i is not a supported browser." - else - break - fi + BROWSER=$i + break else BROWSER=$i break @@ -1730,16 +1658,7 @@ fi fi - if [ -n "$BROWSER" ] - then - case $BROWSER in - *[nN][eE][tT][sS][cC][aA][pP][eE]*) SCR=$SCRDIR/nswrap - ;; - *[mM][oO][sS][aA][iI][cC]*) - SCR=$SCRDIR/ncsawrap - ;; - esac BROWSER_RMT="$SCR -remote $RMTSYS $BDIR/$BROWSER '%U'" BROWSER_DIR="$SCR -direct $RMTSYS $BDIR/$BROWSER '%U' &" @@ -1752,10 +1671,6 @@ $ECHO "mode, only if the host \"$RMTSYS\" and your" $ECHO "system has a NFS-shared $DISCOGDIR" $ECHO "directory." - else - $ECHO "\nNo web browser is configured." - $ECHO "The xmcd wwwWarp feature will not function." - fi fi } @@ -1840,9 +1755,9 @@ do_exit 2 fi -if [ ! -d $CFGDIR/.tbl ] +if [ ! -d $TBLDIR ] then - log_err -p "The directory $CFGDIR/.tbl is missing" + log_err -p "The directory $TBLDIR is missing" do_exit 2 fi @@ -1930,8 +1845,9 @@ elif [ "$OS_SYS" = Linux ] then # Linux - DEVPREF=/dev/scd + DEVPREF=/dev/cdrom DEVSUFF= + DEVNO= FIRST=0 BLKDEV=1 MAILCMD="mail -s '%S' %A <%F >/dev/null 2>&1" @@ -2170,7 +2086,6 @@ $ECHO "if your CD-ROM drive is not SCSI." EXITSTAT=0 DRVNO=0 -DEVNO=$FIRST SEDLINE= while : do @@ -2178,6 +2093,7 @@ NUMDISCS= DEFAULT_DEV="${DEVPREF}${DEVNO}${DEVSUFF}" + DEVNO=$FIRST while : do @@ -2201,39 +2117,14 @@ break fi - $ECHO " $XMCD_DEV is an invalid device." + $ECHO " $XMCD_DEV does not appear to be a CD-ROM." + $ECHO " Continuing anyway as this maybe a removable device." + break done if [ $DRVNO -eq 0 ] then # - # Configure app-defaults/XMcd file - # - chmod 644 $XMCDLIB/app-defaults/XMcd 2>/dev/null - if [ -w $XMCDLIB/app-defaults/XMcd ] - then - $AWK ' - /^XMcd\.libdir:/ { - printf("XMcd.libdir:\t\t\t%s\n", xmcdlib) - next - } - /^XMcd\.cddbMailCmd:/ { - printf("XMcd.cddbMailCmd:\t\t%s\n", mailcmd) - next - } - { - print $0 - }' xmcdlib="$XMCDLIB" mailcmd="$MAILCMD" \ - $XMCDLIB/app-defaults/XMcd > /tmp/xmcd.$$ - - cp /tmp/xmcd.$$ $XMCDLIB/app-defaults/XMcd - rm -f /tmp/xmcd.$$ - else - log_err -p "Cannot configure $XMCDLIB/app-defaults/XMcd" - EXITSTAT=1 - fi - - # # Configure common.cfg file # chmod 644 $CFGDIR/common.cfg 2>/dev/null @@ -2278,10 +2169,9 @@ proxyserver="$PROXYSERVER" \ browserrmt="$BROWSER_RMT" \ browserdir="$BROWSER_DIR" \ - $CFGDIR/common.cfg > /tmp/xmcd.$$ + $CFGDIR/common.cfg > $TMPFILE - cp /tmp/xmcd.$$ $CFGDIR/common.cfg - rm -f /tmp/xmcd.$$ + cp $TMPFILE $CFGDIR/common.cfg (cd $CFGDIR ;\ rm -f common.cfg-${OS_NODE} ;\ do_link common.cfg common.cfg-${OS_NODE}) --- xmcd-2.6.orig/libdi_d/common.cfg +++ xmcd-2.6/libdi_d/common.cfg @@ -75,7 +75,7 @@ ! /dev/rdsk/m187_c0d3s7 (UNIX SVR4.0/88k, m187 controller 0, SCSI ID 3) ! DKA500: (Digital OpenVMS) ! -device: /dev/rcd0 +device: /dev/cdrom ! CD database search path. Items are separated by a semi-colon ';' ! character. Each item can be: @@ -101,10 +101,11 @@ ! http://cddbsrv.xyz.com/~cddb/cddb.cgi ! ! (The XMCD_CDDBPATH environment variable overrides this) -cddbPath: rock;jazz;blues;newage;classical;reggae;folk;country;soundtrack;misc;data;cddbp://cddb.cddb.com:8880 +cddbPath: rock;jazz;blues;newage;classical;reggae;folk;country;soundtrack;misc;data;cddbp://freedb.freedb.org;cddbp://cddb.cddb.com:8880 + ! Local CD database cache file permissions -cddbFileMode: 0666 +cddbFileMode: 0664 ! Remote CD database default port number when connecting in CDDBP mode ! The default port number for the HTTP mode is 80. @@ -191,7 +192,7 @@ ! errors when delivering commands to the CD-ROM drive. You should ! only set this to False if you have a non SCSI-2 compliant CD-ROM ! drive that causes xmcd to display lots of error messages. -showScsiErrMsg: True +showScsiErrMsg: False ! Whether the current device, disc ID, category and other information ! should be recorded in the /tmp/.cdaudio/cur.XXX file --- xmcd-2.6.orig/libdi_d/device.cfg +++ xmcd-2.6/libdi_d/device.cfg @@ -55,7 +55,7 @@ ! /dev/cdrom0 ! /dev/rcdrom/c0b0t0d0;/dev/rcdrom/c0b0t0d1;/dev/rcdrom/c0b0t0d2 ! -deviceList: /dev/rcd0 +deviceList: /dev/cdrom ! Device Interface Method: Configure xmcd/cda to control the CD-ROM device ! via one of several methods. @@ -72,7 +72,7 @@ ! ! (No-override) ! -deviceInterfaceMethod: 0 +deviceInterfaceMethod: 1 ! CD-ROM drive vendor code. If your CD-ROM drive is not SCSI-2 compliant, ! this is used to specify that xmcd should issue vendor-unique commands --- xmcd-2.6.orig/libdi_d/os_linux.h +++ xmcd-2.6/libdi_d/os_linux.h @@ -51,7 +51,7 @@ #define OS_MODULE /* Indicate that this is compiled on a supported OS */ -#define SETUID_ROOT /* Setuid root privilege is required */ +/*#define SETUID_ROOT*/ /* Setuid root privilege is required */ /* Public function prototypes */ --- xmcd-2.6.orig/xmcd_d/XMcd.ad +++ xmcd-2.6/xmcd_d/XMcd.ad @@ -42,7 +42,7 @@ !* This resource _must_ be set correctly in your environment !* in order for xmcd to function correctly. !* -XMcd.libdir: /usr/lib/X11/xmcd +XMcd.libdir: /usr/share/xmcd !* !* CD Database archive contribution @@ -62,8 +62,15 @@ !* %A e-mail address (cddbMailSite) !* %F CD database file path !* -XMcd.cddbMailSite: cddb-submit@submit.cddb.com -XMcd.cddbMailCmd: mailx -s '%S' %A <%F >/dev/null 2>&1 +XMcd.cddbMailSite: freedb-submit@freedb.org +! XMcd.cddbMailCmd: mailx -s '%S' %A <%F >/dev/null 2>&1 +! +! WTA: change this since mailx is not guaranteed to exist on a Debian +! system (or any other system for that matter), but sendmail is. +XMcd*cddbMailCmd: \ + (echo "To: %A"; echo "Subject: %S"; echo; cat %F) | \ + /usr/sbin/sendmail -t + !* !* Color resource defaults @@ -156,64 +163,64 @@ !* If you change the fonts, then you may need to adjust some window !* sizes (see below). !* -XMcd*mainForm.checkBoxFrame*fontList: -*-helvetica-medium-r-*--10-100-* -XMcd*mainForm.XmPushButton*fontList: -*-helvetica-medium-r-*--10-100-* -XMcd*discIndicator.fontList: -*-helvetica-bold-o-*--14-140-* -XMcd*trackIndicator.fontList: -*-helvetica-medium-o-*--24-240-*=chset1, \ - -*-helvetica-bold-o-*--12-120-*=chset2 -XMcd*indexIndicator.fontList: -*-helvetica-bold-o-*--14-140-* -XMcd*timeIndicator.fontList: -*-helvetica-medium-o-*--24-240-*=chset1, \ - -*-helvetica-medium-o-*--18-180-*=chset2 -XMcd*repeatCountIndicator.fontList: -*-helvetica-bold-o-*--12-120-* -XMcd*dbModeIndicator.fontList: -*-helvetica-bold-r-*--12-120-* -XMcd*progModeIndicator.fontList: -*-helvetica-bold-r-*--12-120-* -XMcd*timeModeIndicator.fontList: -*-helvetica-bold-r-*--12-120-* -XMcd*playModeIndicator.fontList: -*-helvetica-bold-r-*--12-120-* -XMcd*discTitleIndicator.fontList: -*-helvetica-medium-r-*--10-100-* -XMcd*trackTitleIndicator.fontList: -*-helvetica-medium-r-*--10-100-* -XMcd*aboutPopup*fontList: -*-times-bold-i-*--24-240-*=chset1, \ - -*-helvetica-bold-r-*--12-120-*=chset2, \ - -misc-fixed-medium-r-*--10-100-*=chset3, \ +XMcd*mainForm.checkBoxFrame*fontList: -*-helvetica-medium-r-*--10-100-*-*-*-*-iso8859-1 +XMcd*mainForm.XmPushButton*fontList: -*-helvetica-medium-r-*--10-100-*-*-*-*-iso8859-1 +XMcd*discIndicator.fontList: -*-helvetica-bold-o-*--14-140-*-*-*-*-iso8859-1 +XMcd*trackIndicator.fontList: -*-helvetica-medium-o-*--24-240-*=chset1-*-*-*-iso8859-1, \ + -*-helvetica-bold-o-*--12-120-*=chset2-*-*-*-iso8859-1 +XMcd*indexIndicator.fontList: -*-helvetica-bold-o-*--14-140-*-*-*-*-iso8859-1 +XMcd*timeIndicator.fontList: -*-helvetica-medium-o-*--24-240-*=chset1-*-*-*-iso8859-1, \ + -*-helvetica-medium-o-*--18-180-*=chset2-*-*-*-iso8859-1 +XMcd*repeatCountIndicator.fontList: -*-helvetica-bold-o-*--12-120-*-*-*-*-iso8859-1 +XMcd*dbModeIndicator.fontList: -*-helvetica-bold-r-*--12-120-*-*-*-*-iso8859-1 +XMcd*progModeIndicator.fontList: -*-helvetica-bold-r-*--12-120-*-*-*-*-iso8859-1 +XMcd*timeModeIndicator.fontList: -*-helvetica-bold-r-*--12-120-*-*-*-*-iso8859-1 +XMcd*playModeIndicator.fontList: -*-helvetica-bold-r-*--12-120-*-*-*-*-iso8859-1 +XMcd*discTitleIndicator.fontList: -*-helvetica-medium-r-*--10-100-*-*-*-*-iso8859-1 +XMcd*trackTitleIndicator.fontList: -*-helvetica-medium-r-*--10-100-*-*-*-*-iso8859-1 +XMcd*aboutPopup*fontList: -*-times-bold-i-*--24-240-*=chset1-*-*-*-iso8859-1, \ + -*-helvetica-bold-r-*--12-120-*=chset2-*-*-*-iso8859-1, \ + -misc-fixed-medium-r-*--10-100-*=chset3-*-*-*-iso8859-1, \ fixed -XMcd*totalTimeLabel.fontList: -*-helvetica-medium-r-*--10-100-* -XMcd*totalTimeIndicator.fontList: -*-helvetica-medium-r-*--10-100-* -XMcd*cddbRemoteDisableButton.fontList: -*-helvetica-medium-r-*--10-100-* +XMcd*totalTimeLabel.fontList: -*-helvetica-medium-r-*--10-100-*-*-*-*-iso8859-1 +XMcd*totalTimeIndicator.fontList: -*-helvetica-medium-r-*--10-100-*-*-*-*-iso8859-1 +XMcd*cddbRemoteDisableButton.fontList: -*-helvetica-medium-r-*--10-100-*-*-*-*-iso8859-1 XMcd*searchSitePulldownMenu*fontList: \ - -*-helvetica-medium-r-*--12-120-*=chset1, \ - -*-helvetica-medium-o-*--12-120-*=chset2, \ - -*-courier-medium-r-*--8-80-*=chset3 + -*-helvetica-medium-r-*--12-120-*=chset1-*-*-*-iso8859-1, \ + -*-helvetica-medium-o-*--12-120-*=chset2-*-*-*-iso8859-1, \ + -*-courier-medium-r-*--8-80-*=chset3-*-*-*-iso8859-1 XMcd*searchSiteOptionMenu*fontList: \ - -*-helvetica-medium-r-*--12-120-*=chset1, \ - -*-helvetica-medium-o-*--12-120-*=chset2, \ - -*-courier-medium-r-*--8-80-*=chset3 -XMcd*discIdIndicator.fontList: -*-helvetica-medium-r-*--10-100-* -XMcd*dirSelectList.fontList: -*-helvetica-medium-r-*--12-120-* -XMcd*linkSelectList*fontList: -*-helvetica-medium-r-*--12-120-*=chset1, \ - -*-helvetica-bold-r-*--12-120-*=chset2, \ + -*-helvetica-medium-r-*--12-120-*=chset1-*-*-*-iso8859-1, \ + -*-helvetica-medium-o-*--12-120-*=chset2-*-*-*-iso8859-1, \ + -*-courier-medium-r-*--8-80-*=chset3-*-*-*-iso8859-1 +XMcd*discIdIndicator.fontList: -*-helvetica-medium-r-*--10-100-*-*-*-*-iso8859-1 +XMcd*dirSelectList.fontList: -*-helvetica-medium-r-*--12-120-*-*-*-*-iso8859-1 +XMcd*linkSelectList*fontList: -*-helvetica-medium-r-*--12-120-*=chset1-*-*-*-iso8859-1, \ + -*-helvetica-bold-r-*--12-120-*=chset2-*-*-*-iso8859-1, \ fixed -XMcd*extDiscInfoLabel.fontList: -*-helvetica-bold-r-*--12-120-* -XMcd*extTrackInfoLabel.fontList: -*-helvetica-bold-r-*--12-120-* -XMcd*keypadForm*keypadLabel.fontList: -*-helvetica-medium-r-*--10-100-* -XMcd*keypadForm*keypadIndicator.fontList: -*-helvetica-*-o-*--14-140-* -XMcd*keypadForm*keypadSelectBox*fontList: -*-helvetica-medium-r-*--12-120-* -XMcd*keypadForm*trackWarpLabel.fontList: -*-helvetica-medium-r-*--10-100-* -XMcd*keypadForm*keypadCancelButton.fontList: -*-helvetica-medium-r-*--12-120-* -XMcd*keypadForm*fontList: -*-helvetica-medium-r-*--10-100-* -XMcd*optionsForm*XmFrame*fontList: -*-helvetica-medium-r-*--10-100-* -XMcd*optionsForm*XmLabel*fontList: -*-helvetica-medium-r-*--10-100-* -XMcd*optionsForm*balanceCenterButton.fontList: -*-helvetica-medium-r-*--10-100-* -XMcd*optionsForm*fontList: -*-helvetica-medium-r-*--12-120-* -XMcd*discListTypeOptionMenu*fontList: -*-helvetica-medium-o-*--12-120-* -XMcd*topicOptionMenu*fontList: -*-helvetica-medium-o-*--12-120-* -XMcd*helpForm*XmPushButton*fontList: -*-helvetica-medium-r-*--12-120-* -XMcd*authForm*fontList: -*-helvetica-medium-r-*--12-120-* -XMcd*tooltipShell*fontList: -*-helvetica-medium-r-*--12-120-* -XMcd*XmList.fontList: -*-helvetica-medium-r-*--12-120-*=chset1, \ - -*-helvetica-bold-r-*--12-120-*=chset2, \ +XMcd*extDiscInfoLabel.fontList: -*-helvetica-bold-r-*--12-120-*-*-*-*-iso8859-1 +XMcd*extTrackInfoLabel.fontList: -*-helvetica-bold-r-*--12-120-*-*-*-*-iso8859-1 +XMcd*keypadForm*keypadLabel.fontList: -*-helvetica-medium-r-*--10-100-*-*-*-*-iso8859-1 +XMcd*keypadForm*keypadIndicator.fontList: -*-helvetica-*-o-*--14-140-*-*-*-*-iso8859-1 +XMcd*keypadForm*keypadSelectBox*fontList: -*-helvetica-medium-r-*--12-120-*-*-*-*-iso8859-1 +XMcd*keypadForm*trackWarpLabel.fontList: -*-helvetica-medium-r-*--10-100-*-*-*-*-iso8859-1 +XMcd*keypadForm*keypadCancelButton.fontList: -*-helvetica-medium-r-*--12-120-*-*-*-*-iso8859-1 +XMcd*keypadForm*fontList: -*-helvetica-medium-r-*--10-100-*-*-*-*-iso8859-1 +XMcd*optionsForm*XmFrame*fontList: -*-helvetica-medium-r-*--10-100-*-*-*-*-iso8859-1 +XMcd*optionsForm*XmLabel*fontList: -*-helvetica-medium-r-*--10-100-*-*-*-*-iso8859-1 +XMcd*optionsForm*balanceCenterButton.fontList: -*-helvetica-medium-r-*--10-100-*-*-*-*-iso8859-1 +XMcd*optionsForm*fontList: -*-helvetica-medium-r-*--12-120-*-*-*-*-iso8859-1 +XMcd*discListTypeOptionMenu*fontList: -*-helvetica-medium-o-*--12-120-*-*-*-*-iso8859-1 +XMcd*topicOptionMenu*fontList: -*-helvetica-medium-o-*--12-120-*-*-*-*-iso8859-1 +XMcd*helpForm*XmPushButton*fontList: -*-helvetica-medium-r-*--12-120-*-*-*-*-iso8859-1 +XMcd*authForm*fontList: -*-helvetica-medium-r-*--12-120-*-*-*-*-iso8859-1 +XMcd*tooltipShell*fontList: -*-helvetica-medium-r-*--12-120-*-*-*-*-iso8859-1 +XMcd*XmList.fontList: -*-helvetica-medium-r-*--12-120-*=chset1-*-*-*-iso8859-1, \ + -*-helvetica-bold-r-*--12-120-*=chset2-*-*-*-iso8859-1, \ fixed -XMcd*XmText.fontList: -*-helvetica-medium-r-*--12-120-* +XMcd*XmText.fontList: -*-helvetica-medium-r-*--12-120-*-*-*-*-iso8859-1 XMcd*XmScale.fontList: 6x10 -XMcd*fontList: -*-helvetica-medium-r-*--12-120-* +XMcd*fontList: -*-helvetica-medium-r-*--12-120-*-*-*-*-iso8859-1 ! Text string defaults XMcd*modeButton.labelString: Basic / Normal --- xmcd-2.6.orig/xmcd_d/cdfunc.c +++ xmcd-2.6/xmcd_d/cdfunc.c @@ -2650,7 +2650,6 @@ /* Initialize CD database services */ (void) strcpy(cddb_cldata.prog, PROGNAME); - (void) strcpy(cddb_cldata.user, util_loginname()); cddb_cldata.isdemo = di_isdemo; cddb_cldata.curstat_addr = curstat_addr; cddb_cldata.fatal_msg = cd_fatal_popup; @@ -2948,25 +2947,6 @@ /* - * cd_hostname - * Return the system's host name (with fully qualified domain name - * if possible). This function can only be used after the call - * to cddb_init() is completed. - * - * Args: - * None. - * - * Return: - * The host name string. - */ -char * -cd_hostname(void) -{ - return (cddb_cldata.host); -} - - -/* * onsig * Signal handler. Causes the application to shut down gracefully. * --- xmcd-2.6.orig/xmcd_d/help.c +++ xmcd-2.6/xmcd_d/help.c @@ -31,7 +31,7 @@ #include "xmcd_d/callback.h" #include "xmcd_d/cdfunc.h" #include "xmcd_d/help.h" - +#include "zlib.h" extern appdata_t app_data; extern widgets_t widgets; @@ -223,6 +223,9 @@ return; } p->next = NULL; + if ((strlen(de->d_name) > 4) && + ! strcmp(".gz", &(de->d_name[strlen(de->d_name)-3]))) + de->d_name[strlen(de->d_name)-3] = '\0'; p->name = (char *) MEM_ALLOC( "p->name", strlen(de->d_name) + 1 @@ -339,7 +342,7 @@ DBGPRN(errfp, "Help: loading %s\n", path); - if ((fp = fopen(path, "r")) == NULL) + if ((fp = gzopen((gzFile) path, "r")) == NULL) DBGPRN(errfp, "Cannot open %s\n", path); if ((wfp = fdopen(pfd[1], "w")) == NULL) { @@ -362,10 +365,10 @@ exit(2); } - while (fgets(tmpbuf, bufsz, fp) != NULL) + while (gzgets((gzFile) fp, tmpbuf, bufsz) != NULL) (void) fprintf(wfp, "%s", tmpbuf); - (void) fclose(fp); + (void) gzclose(fp); (void) fclose(wfp); exit(0); --- xmcd-2.6.orig/xmcd_d/wwwwarp.c +++ xmcd-2.6/xmcd_d/wwwwarp.c @@ -694,7 +694,7 @@ break; case 'H': - q = cd_hostname(); + q = "localhost"; (void) strcpy(r, q); r += strlen(q); break; --- xmcd-2.6.orig/xmcd_d/xmcd.man +++ xmcd-2.6/xmcd_d/xmcd.man @@ -667,8 +667,8 @@ .IP \fBXMCD_LIBDIR\fR This parameter is the directory path under which \fIxmcd\fP's configuration files, help files, and CD database files are located. -The default value of XMCD_LIBDIR on most systems -is \fI/usr/lib/X11/xmcd\fR. +The default value of XMCD_LIBDIR on Debian is \fI/usr/share/xmcd\fR and is +set automatically. .IP \fBXMCD_CDDBPATH\fR This is used to override the \fBcddbPath\fR common configuration parameter, which is a list of CD database category directories to be @@ -805,6 +805,8 @@ .br CD database server page: \fIhttp://www.cddb.com/\fR .br +FreeDB database server page: \fIhttp://www.freedb.org/\fR +.br Xmmix home page: \fIhttp://metalab.unc.edu/tkan/xmmix/\fR .SH "SEE ALSO" @@ -815,6 +817,8 @@ Xmcd web site: http://metalab.unc.edu/tkan/xmcd/ .br CDDB web site: http://www.cddb.com/ +.br +FreeDB web site: http://www.freedb.org/ .SH "AUTHOR" Ti Kan (\fIti@amb.org\fR) --- xmcd-2.6.orig/cda_d/cda.c +++ xmcd-2.6/cda_d/cda.c @@ -3941,7 +3941,6 @@ if (remote > 0) app_data.cddb_rmtdsbl = (remote == 1) ? FALSE : TRUE; (void) strcpy(cddb_cldata.prog, PROGNAME); - (void) strcpy(cddb_cldata.user, util_loginname()); cddb_cldata.isdemo = di_isdemo; cddb_cldata.curstat_addr = curstat_addr; cddb_cldata.fatal_msg = cda_fatal_msg; --- xmcd-2.6.orig/cda_d/cda.man +++ xmcd-2.6/cda_d/cda.man @@ -549,6 +549,8 @@ .br CD database server page: \fIhttp://www.cddb.com/\fR .br +FreeDB server page: \fIhttp://www.freedb.org/\fR +.br Xmmix home page: \fIhttp://metalab.unc.edu/tkan/xmmix/\fR .SH "SEE ALSO" --- xmcd-2.6.orig/misc_d/genidx.sh +++ xmcd-2.6/misc_d/genidx.sh @@ -31,12 +31,13 @@ # Modify these to suit your local configuration XMCDLIB=/usr/lib/X11/xmcd DISCOGDIR=$XMCDLIB/discog -FILE_MODE=666 +FILE_MODE=664 -CATEGORIES="rock jazz blues folk reggae newage classical country soundtrack misc data" +CATEGORIES="data folk jazz misc rock country blues newage" +CATEGORIES="${CATEGORIES} reggae classical soundtrack" XMCD_EMAIL=xmcd@amb.org XMCD_URL=http://metalab.unc.edu/tkan/xmcd/ -CDDB_URL=http://www/cddb.com/ +CDDB_URL=http://www.cddb.com/ REVIEWS_URL=http://www.yahoo.com/Entertainment/Music/Reviews/ TMPFILE=/tmp/_gilist.$$ @@ -88,7 +89,7 @@ dtitle=`grep "^//'` echo "$j $dtitle" - done | sort -f +1 | awk '{ print $1 }' >$TMPFILE 2>&1 + done | sort -f -k 2 | awk '{ print $1 }' >$TMPFILE 2>&1 first=1 for j in `cat $TMPFILE` --- xmcd-2.6.orig/misc_d/sites +++ xmcd-2.6/misc_d/sites @@ -1,6 +1,8 @@ # # @(#)sites 6.8 00/01/12 # +freedb.freedb.org cddbp 8880 - FreeDB Site +freedb.freedb.org http 80 /~cddb/cddb.cgi FreeDB Site us.cddb.com cddbp 8880 - N039.46 W086.09 Random US site us.cddb.com http 80 /~cddb/cddb.cgi N039.46 W086.09 Random US site sj.ca.us.cddb.com cddbp 8880 - N037.33 W122.04 San Jose, CA US --- xmcd-2.6.orig/misc_d/start.sh +++ xmcd-2.6/misc_d/start.sh @@ -31,66 +31,24 @@ if [ -z "$XMCD_LIBDIR" ] then - XMCD_LIBDIR=/usr/lib/X11/xmcd + XMCD_LIBDIR=/usr/share/xmcd export XMCD_LIBDIR +elif [ -z "$XMCD_LIBDIR_QUIET" ]; then + cat <&2 +Older versions of xmcd relied on the XMCD_LIBDIR environment +variable to find the location of the xmcd data directory. The +use of XMCD_LIBDIR with the current version of xmcd is not +recommended, however you currently have this variable set. If +you really think that this is a correct setting, also set the +XMCD_LIBDIR_QUIET variable to get rid of this warning. +EOF + exit 2 fi -XFILESEARCHPATH=$XMCD_LIBDIR/%T/%N%S:$XFILESEARCHPATH XUSERFILESEARCHPATH=$HOME/.xmcdcfg/%N%S:$XUSERFILESEARCHPATH -XKEYSYMDB=$XMCD_LIBDIR/app-defaults/XKeysymDB PROG=`(basename $0) 2>/dev/null` -SYS=`(uname -s) 2>/dev/null | sed -e 's/\//_/g' -e 's/-/_/g' -e 's/[ ]/_/g'` -MACH=`(uname -m) 2>/dev/null | sed -e 's/\//_/g' -e 's/-/_/g' -e 's/[ ]/_/g'` -REL=`(uname -r) 2>/dev/null | sed -e 's/\//_/g' -e 's/-/_/g' -e 's/[ ]/_/g'` +export XUSERFILESEARCHPATH -# Platform-specific handling -if [ "$SYS" = FreeBSD ] -then - # Differentiate between FreeBSD versions - REL=`echo "$REL" | sed 's/\..*$//'` - SYS=${SYS}_${REL} -elif [ "$SYS" = SunOS ] -then - # Differentiate between SunOS 4.x and Solaris - case "$REL" in - 4.*) - ;; - 5.*) - SYS=Solaris - ;; - *) - SYS=Solaris - ;; - esac -elif [ -x /bin/i386 -o -x /sbin/i386 ] && i386 -then - case "$REL" in - 3.2) - # SCO UNIX/Open Desktop - if (uname -X | fgrep "Release = 3.2") >/dev/null 2>&1 - then - SYS=SCO_SV - fi - ;; - 4.*) - # UNIX SVR4.x - SYS=${SYS}_${REL} - ;; - 5) - # UNIX SVR5 - SYS=${SYS}_${REL} - ;; - 5.*) - # UNIX SVR5.x - SYS=${SYS}_${REL} - ;; - *) - ;; - esac -fi - -export XFILESEARCHPATH XUSERFILESEARCHPATH XKEYSYMDB - -exec $XMCD_LIBDIR/bin-${SYS}-${MACH}/$PROG ${1+"$@"} +exec /usr/lib/xmcd/$PROG ${1+"$@"} --- xmcd-2.6.orig/util_d/cddbcmd.c +++ xmcd-2.6/util_d/cddbcmd.c @@ -86,14 +86,7 @@ #define CLIENT "xmcd" #define CGIPATH "/~cddb/cddb.cgi" -#define DFLHOST "cddb.cddb.com" - -#ifndef MAXHOSTNAMELEN -#define MAXHOSTNAMELEN 64 -#endif -#ifndef MAXUSERNAMELEN -#define MAXUSERNAMELEN 16 -#endif +#define DFLHOST "freedb.freedb.org" #define CMD_BUFLEN 1024 @@ -129,9 +122,7 @@ serverport, proxyport, cddbproto; -char user[MAXUSERNAMELEN], - myhost[MAXHOSTNAMELEN], - *auth_buf, +char *auth_buf, *serverhost, *proxyhost, *cgipath, @@ -591,8 +582,8 @@ (void) strcpy(str2, cgipath); (void) sprintf(buf, - "GET %s?cmd=%s&hello=%s+%s+%s+v%s%sPL%d&proto=%d HTTP/1.0\r\n", - str2, str, user, myhost, + "GET %s?cmd=%s&hello=unknown+localhost+%s+v%s%sPL%d&proto=%d HTTP/1.0\r\n", + str2, str, CLIENT, VERSION, VERSION_EXT, PATCHLEVEL, cddbproto); n = strlen(buf); @@ -806,8 +797,8 @@ } /* Send hello handshake */ - (void) sprintf(buf, "cddb hello %s %s %s v%s%sPL%d\r\n", - user, myhost, CLIENT, VERSION, VERSION_EXT, PATCHLEVEL); + (void) sprintf(buf, "cddb hello unknown localhost %s v%s%sPL%d\r\n", + CLIENT, VERSION, VERSION_EXT, PATCHLEVEL); n = strlen(buf); if (my_fputs(buf, fp) < n) return (errno); @@ -1186,11 +1177,7 @@ n, ret, c; - uid_t ouid; - struct passwd *pw; - struct hostent *he; - char *cp, - **ap; + char *cp; serverhost = DFLHOST; proxyhost = NULL; @@ -1296,43 +1283,6 @@ "proxyhost", (proxyhost == NULL) ? "-" : proxyhost, "proxyport", proxyport); - /* Try to get the host name */ - if (gethostname(myhost, MAXHOSTNAMELEN-1) < 0 || - (he = gethostbyname(myhost)) == NULL) { - (void) strcpy(myhost, "unknown"); - } - else { - /* Look for a a fully-qualified hostname - * (with domain) - */ - if (strchr(he->h_name, '.') != NULL) { - (void) strncpy(myhost, he->h_name, MAXHOSTNAMELEN-1); - } - else { - for (ap = he->h_aliases; *ap != NULL; ap++) { - if (strchr(*ap, '.') != NULL) { - (void) strncpy(myhost, *ap, - MAXHOSTNAMELEN-1); - break; - } - } - } - } - myhost[MAXHOSTNAMELEN-1] = '\0'; - - ouid = getuid(); - - if ((pw = getpwuid(ouid)) != NULL) - (void) strncpy(user, pw->pw_name, MAXUSERNAMELEN-1); - else if ((cp = getenv("LOGNAME")) != NULL) - (void) strncpy(user, cp, MAXUSERNAMELEN-1); - else if ((cp = getenv("USER")) != NULL) - (void) strncpy(user, cp, MAXUSERNAMELEN-1); - else - (void) strcpy(user, "nobody"); - - user[MAXUSERNAMELEN-1] = '\0'; - SOCKSINIT("xmcd"); ret = server_connect(proxyhost, proxyport, --- xmcd-2.6.orig/util_d/cddbcmd.man +++ xmcd-2.6/util_d/cddbcmd.man @@ -63,7 +63,7 @@ .TP .I \-h\ serverhost[:port] Specifies the CDDB server host to connect to. The default is -.B cddb.cddb.com The optional port argument specifies the port +.B freedb.freedb.org The optional port argument specifies the port number, The default is port 888 for cddbp, and port 80 for http. .TP .I \-c\ cgipath @@ -105,6 +105,8 @@ Xmcd web site: http://metalab.unc.edu/tkan/xmcd/ .br CDDB web site: http://www.cddb.com/ +.br +FreeDB web site: http://www.freedb.org/ .SH "AUTHOR" Ti Kan (\fIti@amb.org\fR) --- xmcd-2.6.orig/util_d/dp2xmcd.man +++ xmcd-2.6/util_d/dp2xmcd.man @@ -50,6 +50,8 @@ Xmcd web site: http://metalab.unc.edu/tkan/xmcd/ .br CDDB web site: http://www.cddb.com/ +.br +FreeDB web site: http://www.freedb.org/ .SH "AUTHOR" Ti Kan (\fIti@amb.org\fR) --- xmcd-2.6.orig/util_d/wm2xmcd.man +++ xmcd-2.6/util_d/wm2xmcd.man @@ -100,6 +100,8 @@ Xmcd web site: http://metalab.unc.edu/tkan/xmcd/ .br CDDB web site: http://www.cddb.com/ +.br +FreeDB web site: http://www.freedb.org/ .SH "AUTHOR" Ti Kan (\fIti@amb.org\fR) --- xmcd-2.6.orig/debian/xmcd.menu +++ xmcd-2.6/debian/xmcd.menu @@ -0,0 +1,3 @@ +?package(xmcd):needs="x11" section="Apps/Sound" \ + title="Xmcd" command="/usr/bin/xmcd" \ + icon="/usr/share/xmcd/pixmaps/xmcd_small.xpm" --- xmcd-2.6.orig/debian/copyright +++ xmcd-2.6/debian/copyright @@ -0,0 +1,10 @@ +This package was debianized by Adrian Bridgett . + +It was downloaded from: + http://sunsite.unc.edu/~cddb/xmcd/ + +Copyright: + The libdi code contained is copyrighted according to the LGPL v2. + All other code is copyrighted according to the GPL v2. + Both copyrights can be found on Debian GNU/Linux systems in + /usr/share/common-licenses/. --- xmcd-2.6.orig/debian/control +++ xmcd-2.6/debian/control @@ -0,0 +1,25 @@ +Source: xmcd +Section: sound +Priority: optional +Maintainer: Adrian Bridgett +Build-Depends: lesstif2-dev, libncurses-dev, libx11-dev, x-dev, zlib1g-dev, debhelper (>> 4.0.0), xutils +Standards-Version: 3.5.5.0 + +Package: xmcd +Architecture: any +Depends: ${shlibs:Depends}, cddb (>=2.6-1), debconf, awk +Conflicts: suidmanager (<<0.50) +Description: X11 based CD player + Xmcd uses the Motif toolkit (using the free Lesstif libraries) to achieve a + pleasing appearance, such that it actually looks and feels like a real CD + player for all basic functions, yet takes advantage of the GUI and window + system to make programming and CD database functions easy. + +Package: cddb +Architecture: any +Replaces: xmcd (<=2.3-1) +Depends: ${shlibs:Depends} +Conflicts: suidmanager (<<0.50) +Description: CD DataBase support tools + This package provides a location for programs to store files from the + CDDB in and contains a simple program to query CDDB servers. --- xmcd-2.6.orig/debian/changelog +++ xmcd-2.6/debian/changelog @@ -0,0 +1,460 @@ +xmcd (2.6-18) unstable; urgency=low + + * Ack NMUs - many thanks guys. + * a huge patch from Jurij Smakov converting xmcd + to debconf - a big Thanks! (closes: #229686) + * swap to lesstif2 (closes #374229) + * remove unused .xmcd_start file (closes: #332577, #310142) + + -- Adrian Bridgett Sun, 9 Jul 2006 11:07:51 +0100 + +xmcd (2.6-17.2) unstable; urgency=low + + * Non-maintainer upload. + * Fully implemented non-world-writeable directories [libdi_d/config.sh + alias xmcdconfig, CVE-2006-2542] (Closes: #366816) + * Switch to debhelper 4 + + -- Julien Danjou Thu, 1 Jun 2006 12:12:32 +0200 + +xmcd (2.6-17.1) unstable; urgency=high + + * Non-maintainer upload. + * Split xlibs-dev build-dep (Closes: #346824). + + -- Luk Claes Fri, 20 Jan 2006 19:39:40 +0100 + +xmcd (2.6-17) unstable; urgency=low + + * make install default to a non-SCSI CDROM - answering default + to all questions should work for 95% of people (I hope!) + + -- Adrian Bridgett Sat, 31 May 2003 20:43:08 +0100 + +xmcd (2.6-16) unstable; urgency=low + + * fix major snafu in postinst on fresh install (closes: #193801) + + -- Adrian Bridgett Sat, 31 May 2003 20:29:22 +0100 + +xmcd (2.6-15) unstable; urgency=low + + * do not depend upon existance of /usr/share/doc (closes: #189757) + (also, modify postinst appropriately) + * fixup /usr/doc transition (closes: #189859) + * remove browser checks - we don't support mosaic so just treat + everything as netscape compatible (closes: #180294) + * CD-ROM device not existing is now a warning, not an error (closes: #182220) + + -- Adrian Bridgett Mon, 21 Apr 2003 18:20:25 +0100 + +xmcd (2.6-14) unstable; urgency=low + + * last upload of the day - list GPL version of COPYING files shipped + (closes: #133489) + + -- Adrian Bridgett Sun, 7 Apr 2002 11:34:06 +0100 + +xmcd (2.6-13) unstable; urgency=low + + * leave /etc/xmcd/sites as a conffile as otherwise you don't get + freedb.org listed. xmcd's config is such a pain! + + -- Adrian Bridgett Sun, 7 Apr 2002 11:25:03 +0100 + +xmcd (2.6-12) unstable; urgency=low + + * don't send email address details to CDDB server (closes: #138916) + + -- Adrian Bridgett Sun, 7 Apr 2002 10:46:10 +0100 + +xmcd (2.6-11) unstable; urgency=low + + * move initial configuration files to /usr/share/doc/cddb/examples to + appease policy 11.7 (closes: #132086) + + -- Adrian Bridgett Mon, 25 Feb 2002 19:50:01 +0000 + +xmcd (2.6-10) unstable; urgency=low + + * okay - if you don't mark them as conffiles then they just overwrite any + copes (doh!) So ship .orig files and copy them to provide defaults. + Thanks to Richard Braakman for spotting! + * cat README.Debian not README.debian in postinst + + -- Adrian Bridgett Mon, 22 Oct 2001 20:20:39 +0100 + +xmcd (2.6-9) unstable; urgency=low + + * fix stupid typo in postrm (closes: #115262) + * these cases are dealt with by xlibs - xmcd conforms to the standard, + it's just that migration requires a bit of xlibs magic + (closes: #113417, #113432, #113536) + + -- Adrian Bridgett Sun, 14 Oct 2001 15:08:34 +0100 + +xmcd (2.6-8) unstable; urgency=low + + * long overdue upload + * this is AFAICT easier than I thought - just don't tag files which may + be modified conffiles (closes: #85393) + * remove extra backslash in script - thanks to Ian Wienand for finding + (closes: #108840, #108839) + * get rid of /etc/xmcd,/var/lib/xmcd on purge (closes: #109234) + * hopefully followed Brandons excellent post to -devel to fix square font + syndrome (closes: #113510) + * default install uses /dev/cdrom if unconfigured + + -- Adrian Bridgett Wed, 26 Sep 2001 19:43:42 +0100 + +xmcd (2.6-7) unstable; urgency=low + + * stop Imakefile using /bin/ksh on HP (closes: #104990) + * add mozilla support (mozilla no longer crashes when passed + "-remote") (closes: #87902) + * Linuxize xmcdconfig a bit more + + -- Adrian Bridgett Tue, 31 Jul 2001 23:09:38 +0100 + +xmcd (2.6-6) unstable; urgency=low + + * remove suid(un)register calls, also chmod is no longer needed + (closes: #87893) + * Oliver reported that he can't reproduce the bug anymore (closes: #59606) + + -- Adrian Bridgett Fri, 23 Mar 2001 20:49:48 +0000 + +xmcd (2.6-5) unstable; urgency=high + + * argh - genidx was making files 666! (closes: #88621) + * app-default files are conffiles (closes: #87888) + * README.debian is installed in cddb package now that I've renamed it to + cddb.README.debian for debhelper. xmcd symlinks to cddb. (closes: #87891) + * fixed ages ago and error message is output on error (closes: #56686) + * fixed typo in postinst (closes: #87889) + + -- Adrian Bridgett Mon, 5 Mar 2001 19:20:01 +0000 + +xmcd (2.6-4) unstable; urgency=low + + * add debhelper, xutils to build-depends (closes: #85487, #87227) + + -- Adrian Bridgett Sat, 3 Mar 2001 15:17:27 +0000 + +xmcd (2.6-3) unstable; urgency=low + + * add build-depends (closes: #85042) + + -- Adrian Bridgett Tue, 6 Feb 2001 21:06:34 +0000 + +xmcd (2.6-2) unstable; urgency=low + + * protocol is cddbp not cddb (closes: #84466) + * use /etc/X11/app-defaults (closes: #80785) + + -- Adrian Bridgett Sun, 4 Feb 2001 18:16:55 +0000 + +xmcd (2.6-1) unstable; urgency=low + + * new upstream + * copyright and changelog are in the cddb dependency (closes: #79443) + * stop xmcd complaining when it can't setuid - Daniel decided that + we should just add users to audio/cdrom group. Makes good sense. + (closes: #79761, #78444). + * ide-scsi only works if root or if using Linux ioctl rather than + SCSI pass-through. So default to Linux ioctl and warn if SCSI is picked. + * setuid was dropped in NMU (closes: #69518) + * use FreeDB in preference to CDDB.com (closes: #75308) + * fix minor typo in postinst + * exit if XMCD_LIBDIR is set to avoid lots of problems. + Allow the users to override this behaviour. + Corrected manpage's view on this (thanks to Bob Billson) + * depend on a recent cddb package too since file locations etc have changed. + * add subdirectories to /var/lib/cddb and /var/lib/xmcd/discog in the + package rather than waiting for people to run xmcdconfig (closes: #61945) + * add /usr/doc/xmcd -> /usr/share/doc/xmcd link if required + + -- Adrian Bridgett Thu, 6 Apr 2000 20:31:10 +0100 + +xmcd (2.5pl1-7.1) stable unstable; urgency=low + + * NMU by security team, with permission of maintainer. + * Do not mark our binaries setuid root; remove setuid + root when upgrading from an older version. + + -- Daniel Jacobowitz Tue, 21 Nov 2000 22:37:08 -0500 + +xmcd (2.5pl1-7) frozen unstable; urgency=low + + * Doh! don't setgid files, just the directories + + -- Adrian Bridgett Tue, 7 Mar 2000 23:33:03 +0000 + +xmcd (2.5pl1-6) frozen unstable; urgency=low + + * fix location of pixmap in menu file (closes: #58535) + + -- Adrian Bridgett Tue, 7 Mar 2000 22:02:47 +0000 + +xmcd (2.5pl1-5) frozen unstable; urgency=low + + * add versioned dependencies on new cddb to properly fix 55966 + thanks to Eric Prestemon for spotting (closes: #55966) + + -- Adrian Bridgett Thu, 17 Feb 2000 19:43:54 +0000 + +xmcd (2.5pl1-4) frozen unstable; urgency=low + + * handle discog directory like cddb directory (664 setgid audio) + fixup existing in posting (closes: #57743) RM: files were 0666 before + * fixup common.cfg to match (closes: #57505) + + -- Adrian Bridgett Thu, 10 Feb 2000 21:28:02 +0000 + +xmcd (2.5pl1-3) frozen unstable; urgency=low + + * remove doc directory in preinst so that symlink is made (closes #55966) + RM: this bug is RC because otherwise the copyright cannot be found + + -- Adrian Bridgett Wed, 26 Jan 2000 21:35:55 +0000 + +xmcd (2.5pl1-2) unstable; urgency=low + + * find | xargs now uses null-terminated names (closes: #38179) + + -- Adrian Bridgett Wed, 12 Jan 2000 19:00:23 +0000 + +xmcd (2.5pl1-1) unstable; urgency=low + + * new maintainer + * new upstream (closes: #53427) + * FHS directories (including no /usr/X11R6/bin) (updated Standards-version) + * fixed description (closes: #30971) + * compressed changelog (closes: #45994) + * patch to cda no longer needed (closes: #36669) + * errfp initialisation was fixed upstream (closes: #37124, #37126) + * turn off error message by default (showScsiErrMsh in common.cfg) + (closes: #46936) + * remove xpm from two location and fix the menu entry (closes: #45995) + * xmcdconfig manpage (albeit a basic one ) had been added + (closes: #39499) + * app-defaults moved to correct place. old configuration file purged + (closes: #20747) + * /var/lib/cddb is removed on purge + * unreproducible - no crashes whether or not the browser exists + (closes: #29252) + * already fixed bugs (closes: #29456, #27358, #46907, #31340) + * miscellaneous rules fixes (mainly remove execute from things) + and to stop it messing with installed packages + * changed to debhelper + * xmcd now uses zlib to read documentation since some is compressed + * bugs to recheck: + I think the remaining part of #31378 is because the reporter + is trying to compile on a non-potato system + #29253 looks fine here. Very similar to #46045 + * both cda and xmcd must be installed setuid root to use the SCSI + pass-though mechanism. suidmanager support added (closes: #27036) + * on install, state that if you don't use SCSI devices and don't wish + to write to the local cddb database then the setuid bit can be removed. + remove bit if asked. + * /var/lib/cddb perms are 3775 root.audio. xmcd and cda are now setgid and + cddb_ext.c only drops setuid before opening the file (then it drops + setgid). The file permissions are now made 664 (was 666!). + (closes: #36984, #47815) + + -- Adrian Bridgett Sun, 9 Jan 2000 15:25:40 +0000 + +xmcd (2.5-6) unstable; urgency=low + + * Rebuild with new lesstif. + + -- Wichert Akkerman Mon, 18 Oct 1999 17:40:12 +0200 + +xmcd (2.5-5) unstable; urgency=low + + * Fixup BINDIR in xmcdconfig since install.sh mangles it + Closes: Bug#45494,46907 + * Also install pixmap in /usr/X11R6/include/X11/pixmaps + Closes: Bug#46182,45995 + * Closed with earlier releases: Cloes: Bug#43353,37126,47124 + + -- Wichert Akkerman Fri, 8 Oct 1999 11:36:16 +0200 + +xmcd (2.5-4) unstable; urgency=low + + * Remove debian/files as well, Closes: #45558 + + -- Wichert Akkerman Tue, 28 Sep 1999 03:18:16 +0200 + +xmcd (2.5-3) unstable; urgency=low + + * Really use sh to call remove-tmp, Closes: #44596 + + -- Wichert Akkerman Wed, 15 Sep 1999 04:00:14 +0200 + +xmcd (2.5-2) unstable; urgency=low + + * Remove cddb.preinst, it's not needed anymore + * Fix test for update-menus, Closes: #44492 + * Use sh to call remove-tmp, Closes: #44596 + + -- Wichert Akkerman Thu, 9 Sep 1999 00:39:19 +0200 + +xmcd (2.5-1) unstable; urgency=low + + * New upstream version + * Use symlink /usr/X11R6/lib/xmcd/cddb instead of modifying the + code. A bit less clean, but save a whole lot of work + * Completely redid packaging. It should now be more robust. + * No longer use debhelper; I like to have control over my package + * Use new location for GPL and LGPL (/usr/share/common-licenses) + * No longer include md5sums; the idea is just wrong + * Fix a typo in the description + + -- Wichert Akkerman Mon, 6 Sep 1999 03:02:06 +0200 + +xmcd (2.3-5) frozen unstable; urgency=low + + * Fix the last two insecure /tmp usages in xmcdconfig + + -- Wichert Akkerman Mon, 2 Nov 1998 15:48:57 +0100 + +xmcd (2.3-4) unstable; urgency=low + + * Install pixmaps correctly + + -- Wichert Akkerman Mon, 20 Jul 1998 11:20:19 +0200 + +xmcd (2.3-3) unstable; urgency=low + + * Only ask to configure xmcd on installs, not un upgrades + * Fix a bash-ism in the postinst + + -- Wichert Akkerman Wed, 15 Jul 1998 13:44:16 +0200 + +xmcd (2.3-2) unstable; urgency=low + + * Fix xmcdconfig to look for cddbcmd in /usr/bin + * Make cddb conflict with kdemultimedia <= 2:980419-b4-1 + + -- Wichert Akkerman Tue, 7 Jul 1998 00:21:48 +0200 + +xmcd (2.3-1) unstable; urgency=low + + * New uptream version + * Split out a seperate cddb package + * Clean up debian/rules somewhat + * Move cddb-directory to /var/lib/xmcd (Bug# 22409, 21740) + * Fixed permission on cddb-directory (Bug# 22408, 15280) + * Cleaned preinst + * Fixed copyright (there is also some LGPL-code in here) + * Improved xmcdconfig somewhat: + + use tmpfile instead of hardcoded names + + skip question about ioctl-method, since already know we're linux + * Don't make wrong cddb-directories in xmcdconfig + + -- Wichert Akkerman Sun, 28 Jun 1998 02:07:07 +0200 + +xmcd (2.2p1-5) unstable frozen; urgency=low + + * Clean debhelper files properly (Bug# 20696) + + -- Wichert Akkerman Sun, 5 Apr 1998 13:13:59 +0200 + +xmcd (2.2p1-4) unstable frozen; urgency=low + + * Finally fix xmcdconfig! (hopefully) (Bug# 20490) + + -- Wichert Akkerman Wed, 1 Apr 1998 15:01:02 +0200 + +xmcd (2.2p1-3) unstable frozen; urgency=low + + * Fixed error in configuration-script which made xmcd useless + + -- Wichert Akkerman Wed, 25 Mar 1998 15:50:33 +0100 + +xmcd (2.2p1-2) unstable; urgency=low + + * Sent mail using /usr/sbin/sendmail (Bug# 10610) + + -- Wichert Akkerman Wed, 18 Mar 1998 17:25:26 +0100 + +xmcd (2.2p1-1) unstable; urgency=low + + * New upstream version + + -- Wichert Akkerman Sun, 15 Mar 1998 22:03:34 +0100 + +xmcd (2.2-5) unstable; urgency=low + + * Switched to debhelper + * Moved to policy standard 2.3.0.1 + * Remove README.Debian. It was empty anyway + * Install setuid root since SCSI seems to need this + + -- Wichert Akkerman Thu, 15 Jan 1998 03:03:42 +0100 + +xmcd (2.2-4) unstable; urgency=low + + * Added a missing / in the database path (Bug# 13813, 13793) + * Improved check for existing /usr/X11R6/lib/X11/xmcd/config + + -- Wichert Akkerman Mon, 13 Oct 1997 15:33:46 +0200 + +xmcd (2.2-3) unstable; urgency=low + + * Fixed a type in xmcdconfig (Thanks to Milan for noticing this) + * Fixed an upgrade problem in the preinst + + -- Wichert Akkerman Tue, 7 Oct 1997 16:30:00 +0200 + +xmcd (2.2-2) unstable; urgency=low + + * Fixed xmcdconfig, patch by Milan Hodoscek + (Bug# 13499) + * Shortened extended description + + -- Wichert Akkerman Tue, 30 Sep 1997 14:35:53 +0200 + +xmcd (2.2-1) unstable; urgency=low + + * New maintainer + * New upstream version (Bug# 9363, 12114) + + better multi-CD hardware support + + more CD-ROM drives supported + + bugfixes + * libc6 build (Bug# 11751) + * Revamped control file + * Switched to new-style menu support + * Put manpage in proper directory + * Move configuration files to /etc/xmcd (Bug# 10647, 13100) + * Changed paths so helpfiles work correctly (Bug# 10637) + * Moved database to /var/xmcd (Bug# 10647) + * Made app-defaults file a conffile + * Added suggestion to xmcdconfig to look in /usr/doc/xmcd/cddb.servers + * xmcd is no longer setuid (Bug# 9241, 8955) + * Check in postinst for aborted installation + + -- Wichert Akkerman Fri, 12 Sep 1997 17:06:29 +0200 + +xmcd (2.1-2) unstable; urgency=low + + * fixed bug #9070: app-defaults/xmcd.ad renamed to xmcd + + -- Paul Haggart Sun, 27 Apr 1997 17:46:29 -0400 + +xmcd (2.1-1) unstable; urgency=low + + * new maintainer + * switched from experimental to unstable distribution + * switched to debmake for packaging + + -- Paul Haggart Sat, 19 Apr 1997 14:54:53 -0400 + +xmcd (2.0-1) experimental; urgency=low + + * Initial release. + + -- Klee Dienes Fri, 29 Nov 1996 19:46:18 -0700 + +vim: sw=2 ai --- xmcd-2.6.orig/debian/conffiles +++ xmcd-2.6/debian/conffiles @@ -0,0 +1,2 @@ +/etc/X11/app-defaults/XMcd +/etc/xmcd/sites --- xmcd-2.6.orig/debian/xmcd.postinst +++ xmcd-2.6/debian/xmcd.postinst @@ -0,0 +1,204 @@ +#!/bin/sh + +. /usr/share/debconf/confmodule + +set -e + +case "$1" in + configure) + for i in common.cfg device.cfg; do + if ! [ -e /etc/xmcd/$i ]; then + cp /usr/share/xmcd/config.new/$i /etc/xmcd/$i + fi + done + # continue as normal + ;; + abort-upgrade|abort-remove|abort-deconfigure) + exit 0; + ;; + *) + echo "postinst called with unknown argument \`$1'" >&2; + exit 0; + ;; +esac + +if [ -e /usr/doc/xmcd ]; then + rm -rf /usr/doc/xmcd +fi +if [ -n "$2" ]; then + # there was an old conffile here long ago + if [ -d /usr/X11R6/lib/X11/xmcd ]; then + rm -rf /usr/X11R6/lib/X11/xmcd + fi +fi +# +# Everything below is just bits and pieces from xmcdconfig +# +# This variable is also used in cddb.postinst. If changed, change there also. +CDDBCATS="data folk jazz misc rock country blues newage" +CDDBCATS="${CDDBCATS} reggae classical soundtrack" +for i in ${CDDBCATS}; do + mkdir -p /var/lib/xmcd/discog/${i} +done +# Set ownership and access rights here as well since dpkg +# does not reset them for directories when upgrading +chown -R root:audio /var/lib/xmcd/discog +find /var/lib/xmcd/discog -type d -print0 | xargs -0r chmod 3775 +# permissions used to be 666! +chmod -R o-w /var/lib/xmcd/discog +# now run genidx to make the index (we may have only just made the dirs!) +/usr/share/xmcd/scripts/genidx > /dev/null 2>&1 +# +# Generate the configuration files +# +XMCD_DEV="/dev/cdrom" +if db_get xmcd/cdrom-device-name; then + if [ -n "${RET}" ]; then + XMCD_DEV="${RET}" + fi +fi +OS_NODE=`(uname -n) 2>/dev/null` +COMMON_TMP=`mktemp /tmp/xmcd-common-XXXXXX` +CONFIGFILE=`basename ${XMCD_DEV}` +# +# We will only generate the configuration files if the device-specific +# configuration file does not exist and the templates have not been +# yet tampered with. +# +if diff /etc/xmcd/common.cfg \ + /usr/share/xmcd/config.new/common.cfg > /dev/null 2>&1 && \ + diff /etc/xmcd/device.cfg \ + /usr/share/xmcd/config.new/device.cfg > /dev/null 2>&1 && \ + [ ! -f /etc/xmcd/${CONFIGFILE} ]; then +# We set a bunch of default variables and then generate the config files +# the way xmcdconfig does. Relevant chuncks are ripped out from there. +VOLMGT="False" +CDDBPATH=`echo ${CDDBCATS} | tr ' ' ';'` +CDDBPATH="${CDDBPATH};cddbp://freedb.freedb.org:8880" +USEPROXY="False" +PROXYSERVER="yourproxyhost:80" +# Probably not all browsers support this feature, but hopefully even less +# people out there are going to use it. Works fine with mozilla and friends. +BROWSER_RMT="/usr/bin/x-www-browser -remote 'openURL(%U)' >/dev/null 2>&1" +BROWSER_DIR="/usr/bin/x-www-browser '%U' >/dev/null 2>&1 &" +# Generate the common.cfg file +awk ' +/^device:/ { + printf("device:\t\t\t%s\n", device) + next +} +/^solaris2VolumeManager:/ { + printf("solaris2VolumeManager:\t%s\n", volmgt) + next +} +/^cddbPath:/ { + printf("cddbPath:\t%s\n", cddbpath) + next +} +/^cddbUseHttpProxy:/ { + printf("cddbUseHttpProxy:\t%s\n", useproxy) + next +} +/^proxyServer:/ { + printf("proxyServer:\t\t%s\n", proxyserver) + next +} +/^browserRemote:/ { + printf("browserRemote:\t%s\n", browserrmt) + next +} +/^browserDirect:/ { + printf("browserDirect:\t%s\n", browserdir) + next +} +{ + print $0 +}' \ + device="$XMCD_DEV" \ + volmgt="$VOLMGT" \ + cddbpath="$CDDBPATH" \ + useproxy="$USEPROXY" \ + proxyserver="$PROXYSERVER" \ + browserrmt="$BROWSER_RMT" \ + browserdir="$BROWSER_DIR" \ + /etc/xmcd/common.cfg > ${COMMON_TMP} +cp ${COMMON_TMP} /etc/xmcd/common.cfg +chown root:root /etc/xmcd/common.cfg +chmod 644 /etc/xmcd/common.cfg +(cd /etc/xmcd; rm -f common.cfg-${OS_NODE}; \ + ln -s common.cfg common.cfg-${OS_NODE}) +rm -f ${COMMON_TMP} + +DRVNO="0" +METHOD="1" +CHGMETHOD="0" +NUMDISCS="1" +GDEVLIST=`echo ${XMCD_DEV} | sed 's/\//\\\\\//g'` +VENDOR="0" +PLAY12="False" +PLAYMSF="True" +PLAY10="False" +PLAYTI="True" +LOAD="True" +EJECT="True" +MODEDBD="False" +VOLSUPP="True" +BALSUPP="True" +CHRSUPP="True" +VOLTAPER="0" +VOLBASE="0" +PAUSE="True" +STRICTPAUSERESUME="False" +PLAYPAUSEPLAY="False" +CADDYLOCK="False" +CURPOSFMT="False" +PLAYNOTUR="False" +STOPONLOAD="True" +EJECTONEXIT="False" +STOPONEXIT="True" +EXITONEJECT="False" +CLOSEONEJECT="False" +MULTIPLAY="False" +# Generate the device configuration file +sed \ +-e "s/^!.*DO NOT MODIFY.*$/! DEVICE CONFIGURATION FILE/" \ +-e "s/^logicalDriveNumber:.*/logicalDriveNumber: $DRVNO/" \ +-e "s/^deviceInterfaceMethod:.*/deviceInterfaceMethod: $METHOD/" \ +-e "s/^mediumChangeMethod:.*/mediumChangeMethod: $CHGMETHOD/" \ +-e "s/^numDiscs:.*/numDiscs: $NUMDISCS/" \ +-e "s/^deviceList:.*/deviceList: $GDEVLIST/" \ +-e "s/^driveVendorCode:.*/driveVendorCode: $VENDOR/" \ +-e "s/^playAudio12Support:.*/playAudio12Support: $PLAY12/" \ +-e "s/^playAudioMSFSupport:.*/playAudioMSFSupport: $PLAYMSF/" \ +-e "s/^playAudio10Support:.*/playAudio10Support: $PLAY10/" \ +-e "s/^playAudioTISupport:.*/playAudioTISupport: $PLAYTI/" \ +-e "s/^loadSupport:.*/loadSupport: $LOAD/" \ +-e "s/^ejectSupport:.*/ejectSupport: $EJECT/" \ +-e "s/^modeSenseSetDBD:.*/modeSenseSetDBD: $MODEDBD/" \ +-e "s/^volumeControlSupport:.*/volumeControlSupport: $VOLSUPP/" \ +-e "s/^balanceControlSupport:.*/balanceControlSupport: $BALSUPP/" \ +-e "s/^channelRouteSupport:.*/channelRouteSupport: $CHRSUPP/" \ +-e "s/^volumeControlTaper:.*/volumeControlTaper: $VOLTAPER/" \ +-e "s/^scsiAudioVolumeBase:.*/scsiAudioVolumeBase: $VOLBASE/" \ +-e "s/^pauseResumeSupport:.*/pauseResumeSupport: $PAUSE/" \ +-e "s/^strictPauseResume:.*/strictPauseResume: $STRICTPAUSERESUME/" \ +-e "s/^playPausePlay:.*/playPausePlay: $PLAYPAUSEPLAY/" \ +-e "s/^caddyLockSupport:.*/caddyLockSupport: $CADDYLOCK/" \ +-e "s/^curposFormat:.*/curposFormat: $CURPOSFMT/" \ +-e "s/^noTURWhenPlaying:.*/noTURWhenPlaying: $PLAYNOTUR/" \ +-e "s/^spinDownOnLoad:.*/spinDownOnLoad: $STOPONLOAD/" \ +-e "s/^ejectOnExit:.*/ejectOnExit: $EJECTONEXIT/" \ +-e "s/^stopOnExit:.*/stopOnExit: $STOPONEXIT/" \ +-e "s/^exitOnEject:.*/exitOnEject: $EXITONEJECT/" \ +-e "s/^closeOnEject:.*/closeOnEject: $CLOSEONEJECT/" \ +-e "s/^multiPlay:.*/multiPlay: $MULTIPLAY/" \ +< /etc/xmcd/device.cfg > /etc/xmcd/${CONFIGFILE} +chown root:root /etc/xmcd/${CONFIGFILE} +chmod 644 /etc/xmcd/${CONFIGFILE} +(cd /etc/xmcd; rm -f ${CONFIGFILE}-${OS_NODE}; \ + ln -s ${CONFIGFILE} ${CONFIGFILE}-${OS_NODE}) +fi + +#DEBHELPER# + +exit 0 --- xmcd-2.6.orig/debian/xmcd.preinst +++ xmcd-2.6/debian/xmcd.preinst @@ -0,0 +1,47 @@ +#!/bin/sh -e + +case "$1" in + install) + # Nothing special to do + exit 0; + ;; + upgrade) + # continue with rest of script + ;; + *) + echo "postinst called with unknown argument \`$1'" >&2; + exit 0; + ;; +esac + +movedir() { + if [ ! -d $2 ]; then + echo "$2 does not yet exist, creating it" + mkdir -p $2 + fi + echo -n "Copying from $1 to $2.." + (cd $1; tar c * ) | ( cd $2 ; tar xf - ) + echo " Done." + + echo -n "Removing $1.." + rm -rf $1 + echo " Done." +} + +# dpkg won't replace a directory with a symlink +if [ -d /usr/share/doc/xmcd ]; then + rm -rf /usr/share/doc/xmcd +fi + +OLDCONFIG=/usr/X11R6/lib/X11/xmcd/config +if [ -d $OLDCONFIG -a ! -L $OLDCONFIG ]; then + echo "The location of the configuration files has changed from" + echo "/usr/X11R6/lib/X11/xmcd/config to /etc/xmcd. I will" + echo "move your configuration files to the new position." + echo "" + + movedir /usr/X11R6/lib/X11/xmcd/config /etc/xmcd +fi + +#DEBHELPER# + --- xmcd-2.6.orig/debian/rules +++ xmcd-2.6/debian/rules @@ -0,0 +1,118 @@ +#!/usr/bin/make -f +# This script uses debhelper by Joey Hess +export DH_VERBOSE=1 +export DH_COMPAT=4 + +XMCD=`pwd`/debian/xmcd +XMCDLIB=$(XMCD)/usr/share/xmcd +CDDB=`pwd`/debian/cddb + +libdir = /usr/X11R6/lib/X11/xmcd +tmpdir := $(shell pwd)/debian/tmp + +build: build-stamp +build-stamp: + dh_testdir + xmkmf -a + make LOCAL_LIBRARIES="-lXm -lXt -lX11 -lncurses -lz" + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + dh_clean + -make clean + -rm -f Makefile *_d/Makefile + +binary-indep: + @echo Nothing to do + +binary-arch: build + dh_testdir + dh_testroot + dh_installdirs -p xmcd usr/bin usr/sbin etc \ + etc/X11/app-defaults usr/share/doc/cddb usr/share/xmcd/config.new + BATCH_BINDIR=$(XMCD)/usr/bin \ + BATCH_LIBDIR=$(XMCD)/usr/share \ + BATCH_MANDIR=$(XMCD)/usr/share/man/man1 \ + BATCH_CDDBDIR=$(XMCD)/var/lib/cddb \ + BATCH_DISCOGDIR=$(XMCD)/var/lib/xmcd/discog \ + sh install.sh -n -b + + # move app-defaults to correct place + mv $(XMCDLIB)/app-defaults/XMcd $(XMCD)/etc/X11/app-defaults + # remove junk that just installed (XKeysymDB) + rm -rf $(XMCDLIB)/app-defaults + rm -rf $(XMCDLIB)/docs + + # move some binaries to/usr/bin + # remove symlinks, then move proper programs + rm $(XMCD)/usr/bin/.xmcd_start $(XMCD)/usr/bin/* + mv $(XMCD)/usr/lib/xmcd/* $(XMCD)/usr/bin + # strip $(XMCD) from generated files + #for i in usr/bin/xmcd usr/bin/cda var/lib/xmcd/discog/discog.html \ + # usr/share/xmcd/scripts/genidx usr/sbin/xmcdconfig; do \ + # echo $(XMCD)/$$i; \ + #done | xargs perl -i -p -e "s!$(XMCD)!!" + + # This doesn't need to be hidden (and we don't want it in config) + mv $(XMCDLIB)/config/.tbl $(XMCDLIB)/tbl + + # This is our configuration program + mv $(XMCDLIB)/config/config.sh $(XMCD)/usr/sbin/xmcdconfig + + # move the contents of the config directory around + mv $(XMCDLIB)/config $(XMCD)/etc/xmcd + for i in common.cfg device.cfg; do \ + mv $(XMCD)/etc/xmcd/$$i $(XMCD)/usr/share/xmcd/config.new ; \ + done + ln -s /etc/xmcd $(XMCDLIB)/config + ln -s ../doc/xmcd $(XMCDLIB)/docs + + # Install our little icon + cp debian/xmcd.xpm $(XMCDLIB)/pixmaps/xmcd_small.xpm + + # same for symlinks + # I'm sure this is a bug - -f should override! + rm $(XMCDLIB)/cddb $(XMCDLIB)/discog + ln -sf /var/lib/cddb $(XMCDLIB)/cddb + ln -sf /var/lib/xmcd/discog $(XMCDLIB)/discog + + cp docs_d/DRIVES docs_d/FEATURES docs_d/README docs_d/RELNOTES \ + $(XMCD)/usr/share/doc/cddb + ln -s cddb $(XMCD)/usr/share/doc/xmcd + dh_installdocs -p cddb docs_d/ACKS docs_d/CDDB docs_d/FAQ docs_d/WEB + dh_installmanpages -p xmcd + dh_installdirs -p cddb usr/share/man/man1 + dh_installdebconf + mv $(XMCD)/usr/share/man/man1/cddbcmd.1 $(CDDB)/usr/share/man/man1 + dh_installchangelogs -p cddb docs_d/CHANGES + dh_installmenu + dh_strip + dh_compress + dh_fixperms + # move cddb stuff to where it should be + dh_installdirs -p cddb var/lib usr/bin + mv $(XMCD)/var/lib/cddb $(CDDB)/var/lib + # this was done in xmcdconfig + for i in rock jazz blues newage classical reggae folk country \ + soundtrack misc data; do \ + install -d -o root -g audio -m 3775 $(CDDB)/var/lib/cddb/$i; \ + install -d -o root -g audio -m 3775 $(XMCD)/var/lib/xmcd/discog/$i; \ + done + mv $(XMCD)/usr/bin/cddbcmd $(CDDB)/usr/bin + # now we need to refix the perms :-) + chgrp -R audio $(CDDB)/var/lib/cddb $(XMCD)/var/lib/xmcd/discog + chmod 3775 $(CDDB)/var/lib/cddb $(XMCD)/var/lib/xmcd/discog + dh_shlibdeps + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + +# Below here is fairly generic really + +binary: binary-indep binary-arch + +.PHONY: binary binary-arch binary-indep clean --- xmcd-2.6.orig/debian/cddb.postinst +++ xmcd-2.6/debian/cddb.postinst @@ -0,0 +1,29 @@ +#!/bin/sh -e + +case "$1" in + configure) + # continue as normal + ;; + abort-upgrade|abort-remove|abort-deconfigure) + exit 0; + ;; + *) + echo "postinst called with unknown argument \`$1'" >&2; + exit 0; + ;; +esac + +#DEBHELPER# + +# This variable is also used in xmcd.postinst +CDDBCATS="data folk jazz misc rock country blues newage" +CDDBCATS="${CDDBCATS} reggae classical soundtrack" +for i in ${CDDBCATS}; do + mkdir -p /var/lib/cddb/${i} +done +# Set ownership and access rights here as well since dpkg +# does not reset them for directories when upgrading +chown -R root:audio /var/lib/cddb +find /var/lib/cddb -type d -print0 | xargs -0r chmod 3775 +# permissions used to be 666! +chmod -R o-w /var/lib/cddb --- xmcd-2.6.orig/debian/xmcd.xpm +++ xmcd-2.6/debian/xmcd.xpm @@ -0,0 +1,51 @@ +/* XPM */ +static char * xmcd_small_xpm[] = { +"32 32 16 1", +" c None", +". c #CCCCCC", +"+ c #E5E5E5", +"@ c #B2B2B2", +"# c #FF0000", +"$ c #7F7F7F", +"% c #999999", +"& c #7F007F", +"* c #7F7F00", +"= c #666667", +"- c #4C4C4C", +"; c #FFFFFF", +"> c #7F0000", +", c #007F7F", +"' c #00FFFF", +") c #0000FF", +".....+.....+++......+++......+++", +"....++...+....@@++......++++....", +"..+....+++....#$@+....+++..+++..", +"..++..++...+.%#$%.+...+......+..", +"...+.++....+%@###&@.......+..+++", +"+..+.+.....+@#####%@.....++....+", +"++.+....++.@###%@##%@.+.....++..", +".....++++..@##%.+@#&%.+.++..+...", +"..++.....+.*##%+.@#*@...+...+...", +"...++++.++%###@..@@#@...@@@@.+..", +"++.....++.%##*...+@@..+@$$=$@..+", +"+.....@@+@*##%...+.@@+@@%*$$@.@.", +"..+..+%##*###...+@$*=$%@.+..@%$*", +"..@.@%*#####*+..@%$=-=$%.+;+@%$$", +".@###>##>>##%..+$=$$,%$'%.+;++..", +".+$####>####%.@%==$%%%%%,@+;;;;;", +"+.*#>##>>##%@@$$$$,@%'$,@@++;;;;", +"..#>##>###=#.@$$$%'%@,@%%%+;;;;;", +".@###>>##>%..@%,%@$%$@..'%.;;;;;", +".@%#>####%+.@@%$',%$$'..%@.;;;;;", +"...*####@@.+$$$%$$$%,@@@%%+;;;;;", +"++..%#>%@.+@==%%%%$''%%,,%+;;;;;", +"++..+@@.....%'..'$)%$%,%$$+;;;;;", +"+......++..@%%+.%%@%%$%$=%.+;;++", +"..++++....+.%%'%'%%$%$=$%.+;;+@@", +"......++..+.%%@%%@)$%$-=@.+.;+@$", +".++...+....@%%..%$%',%,=@...;+%,", +".+..+...+++.'@++@%@,%%$$%...+.'@", +"++..+...++.@%@++'$%,%%.@$$...@,@", +"++..+.+.+...%%++@@@@@@..%%..%$'%", +"..++..++...@,%.;+++++.@@..@%'@$%", +"..++.......@=$.;+;;+;+'%++%%$,%$"}; --- xmcd-2.6.orig/debian/xmcdconfig.8 +++ xmcd-2.6/debian/xmcdconfig.8 @@ -0,0 +1,15 @@ +.TH XMCDCONFIG 8 "" "" +.SH NAME +xmcdconfig \- configure Xmcd +.SH SYNOPSIS +.B xmcdconfig +.SH DESCRIPTION +This program configures the Xmcd CD player. It asks you what kind of +hardware you have and which CDDB servers you Xmcd want to consult. +.SH AUTHOR +This manual page was written by Wichert Akkerman +for the Debian GNU/Linux system. +.PP +.B xmcdconfig +was writting by the Xmcd author Ti Kan. It was modified by Wichert Akkerman +for Debian GNU/Linux. --- xmcd-2.6.orig/debian/TODO +++ xmcd-2.6/debian/TODO @@ -0,0 +1,2 @@ +debconf for xmcdconfig - hmmmmm - when I retire (2^5 years to go) +run on IDE CDROMs out of the box --- xmcd-2.6.orig/debian/cddb.postrm +++ xmcd-2.6/debian/cddb.postrm @@ -0,0 +1,7 @@ +#!/bin/sh -e + +if [ "$1" = "purge" ]; then + rm -rf /var/lib/cddb +fi + +#DEBHELPER# --- xmcd-2.6.orig/debian/cddb.README.debian +++ xmcd-2.6/debian/cddb.README.debian @@ -0,0 +1,13 @@ +Previous versions of the xmcd package (before 2.5pl1-7.1) used set-user-id +binaries to access SCSI drives and update CDDB databases. + +For security reasons this has changed. Now you should add users who wish to +update the databases to the "audio" group, and users who wish to access +drives to the "cdrom" group. NB: User group changes don't take effect until +you have logged out and logged back in again. + +You will also need to make your cdrom device readable and writeable by the +cdrom group. If this still doesn't work, please ensure that you are using +the "Linux IOCTL" method to access the drive (look at +"deviceInterfaceMethod" in /etc/xmcd/device.cfg and check it is set to "1"). + --- xmcd-2.6.orig/debian/xmcd.postrm +++ xmcd-2.6/debian/xmcd.postrm @@ -0,0 +1,15 @@ +#!/bin/sh + +. /usr/share/debconf/confmodule + +#DEBHELPER# + +# get rid of configuration files +if [ "$1" = "purge" ]; then + rm -rf /etc/xmcd /var/lib/xmcd + db_purge > /dev/null 2>&1 || true +fi + +exit 0 + + --- xmcd-2.6.orig/debian/xmcd.config +++ xmcd-2.6/debian/xmcd.config @@ -0,0 +1,6 @@ +#!/bin/sh +set -e +. /usr/share/debconf/confmodule +db_input high xmcd/cdrom-device-name || true +db_go || true + --- xmcd-2.6.orig/debian/xmcd.templates +++ xmcd-2.6/debian/xmcd.templates @@ -0,0 +1,14 @@ +Template: xmcd/cdrom-device-name +Type: string +Default: /dev/cdrom +Description: Enter the device name of the CD drive for xmcd to use: + See /usr/share/doc/xmcd/README.Debian for important information on how + to properly enable access to CD drives and CD database for unprivileged users. + . + In order to function properly, xmcd requires at least a device name of the + CD drive which should be used for playback. Possible examples of the CD drive + device names are /dev/cdrom (this is usually a symbolic link), /dev/sr0 or + /dev/scd0 (for SCSI or SCSI-emulated devices), /dev/hdc or /dev/hdd (for IDE + devices). Based on the supplied value the default configuration files will be + generated. You can always reconfigure and customize xmcd by running the + /usr/sbin/xmcdconfig script later.