summaryrefslogtreecommitdiffstats
path: root/source/ap/workbone/workbone_2.40-9.diff
blob: 324ef93a0f53ac9f28d5d16c97b0aa4af828f833 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
--- workbone-2.40.orig/hardware.c
+++ workbone-2.40/hardware.c
@@ -177,7 +177,7 @@
 	if (cd_fd < 0)
 	{
 
-		if ((cd_fd = open(cd_device, 0)) < 0)
+		if ((cd_fd = open(cd_device, O_RDONLY | O_NONBLOCK)) < 0)
 		{
 
 			if (errno == EACCES)
@@ -187,8 +187,15 @@
 					strcpy(realname, cd_device);
 
 					fprintf(stderr,
-		"As root, please run\n\nchmod 666 %s\n\n%s\n", realname,
-		"to give yourself permission to access the CD-ROM device.");
+  "In order to have permission to access the CD-ROM device, please run the\n"
+  "following commands as root:\n"
+  "\n"						
+  "chgrp --dereference cdrom %s\n"
+  "chmod g+w %s\n"
+  "adduser $USER cdrom\n"
+  "\n"						
+  "After this, log in again and restart workbone.\n",
+						realname, realname);
 					warned++;
 				}
 			}
@@ -611,7 +618,7 @@
 	if (fcntl(fd, F_SETLK, &fl) < 0)
 		exit(0);
 
-	if (open(cd_device, 0) >= 0)
+	if (open(cd_device, O_RDONLY | O_NONBLOCK) >= 0)
 	{
 		brk(&end);
 		pause();
--- workbone-2.40.orig/workbone.1
+++ workbone-2.40/workbone.1
@@ -54,7 +54,7 @@
 is ideal for those who just want to play music with minimal fuss.
 .br
 .SH USAGE
-If no device is specified with the -d switch, 
+If no device is specified with the \-d switch, 
 .B WorkBone
 expects to find the device: /dev/cdrom (linux) or /dev/rsr0 (other).
 If you don't have this device, change to /dev and soft link your current
@@ -62,7 +62,7 @@
 your cdrom device 'mcd0', then do the following:
 .sp
                cd /dev
-               ln -sf mcd0 cdrom
+               ln \-sf mcd0 cdrom
 .PP
 Alternatively, just edit 'hardware.c'  to reflect the
 name of your cdrom device and recompile. 
@@ -122,10 +122,10 @@
 functions as per WorkMan proper. The display code
 was written specifically for the Linux console.
 Portability was not a concern. :-) However,
-the `-a' option will put 
+the `\-a' option will put 
 .B WorkBone
 into the 7-bit mode for use
-with any terminal, and using the `-p' switch, it will
+with any terminal, and using the `\-p' switch, it will
 even run without a terminal. ;).
 .br
 .SH
--- workbone-2.40.orig/workbone.c
+++ workbone-2.40/workbone.c
@@ -96,7 +96,7 @@
 {
 
   int sss, sel_stat, dly;
-  int fastin = FALSE;
+  int fastin = TRUE;
   int scmd = 0, tmppos = 0;
   int save_track = 1;
   fd_set rset;
@@ -166,6 +166,22 @@
   /* set graphics */
   if(play_track<0) setgraf ();
   /* check if drive is mounted (from Mark Buckaway's cdplayer code) */
+  /* link reading code from cdtool */
+
+    /* find out if the device is a link, resolve link name */
+    {
+
+    char *pszTest;
+    char caB[100];
+    int ii;
+
+    ii = readlink(cd_device, caB, sizeof(caB)-1);
+    if (ii < 0) {
+      pszTest = cd_device;
+    }else {
+      pszTest = &caB[0];
+      caB[ii] = '\0';
+    }
   if ((fp = setmntent (MOUNTED, "r")) == NULL)
     {
       fprintf (stderr, "Couldn't open %s: %s\n", MOUNTED, strerror (errno));
@@ -173,7 +189,7 @@
     }
   while ((mnt = getmntent (fp)) != NULL)
     {
-      if (strcmp (mnt->mnt_type, "iso9660") == 0)
+      if (strstr (mnt->mnt_fsname, pszTest) != NULL)
 	{
 	  fputs ("CDROM already mounted. Operation aborted.\n", stderr);
 	  endmntent (fp);
@@ -181,6 +197,7 @@
 	}
     }
   endmntent (fp);
+    } /* end mount checking block */
 
   /*  display control panel template */
   if(play_track<0) control_panel ();
@@ -450,7 +467,7 @@
     "|\021", "\tprevious selection",
     "\020|", "\tnext selection",
     "\021\021", "\tgo backward 15 seconds",
-    "\020\020", "\tgo foreward 15 seconds",
+    "\020\020", "\tgo forward  15 seconds",
     "..", "\tabort workbone",
     "quit", "\texit workbone (music continues)",
     "?", "\tdisplay help screen", NULL};
--- workbone-2.40.orig/debian/compat
+++ workbone-2.40/debian/compat
@@ -0,0 +1 @@
+5
--- workbone-2.40.orig/debian/menu
+++ workbone-2.40/debian/menu
@@ -0,0 +1,3 @@
+?package(workbone):command="/usr/bin/workbone" needs="text" \
+    section="Applications/Sound" title="WorkBone"
+
--- workbone-2.40.orig/debian/changelog
+++ workbone-2.40/debian/changelog
@@ -0,0 +1,118 @@
+workbone (2.40-9) unstable; urgency=low
+
+  * QA upload.
+  * Reverting incorrect and unnecessary fix for #427592 (Closes: #483982)
+
+ -- Mike O'Connor <stew@debian.org>  Wed, 04 Jun 2008 19:59:34 -0400
+
+workbone (2.40-8) unstable; urgency=low
+
+  * QA upload.
+  * hardware.c - Replace deprecated ustat.h with statfs.h (Closes: #427592).
+  * Update FSF address in copyright.
+  * Debhelperize build-system.
+  * Add build-dep on debhelper and set compat to 5.
+  * Escape - in manpage.
+  * Bump Standards Version to 3.7.3.
+    + Update for menu policy.
+
+ -- Barry deFreese <bddebian@comcast.net>  Sun, 03 Feb 2008 10:24:28 -0500
+
+workbone (2.40-7) unstable; urgency=low
+
+  * Orphaning, see #429178.
+
+ -- Antti-Juhani Kaijanaho <ajk@debian.org>  Sat, 16 Jun 2007 11:34:26 +0300
+
+workbone (2.40-6) unstable; urgency=low
+
+  * workbone.c (help): Spelling fix (foreward -> forward).
+    Closes: #272397 (Minor spelling error on help screen)
+    [ Reported by Brian Potkin ]
+
+ -- Antti-Juhani Kaijanaho <ajk@debian.org>  Fri, 31 Dec 2004 08:39:55 +0200
+
+workbone (2.40-5) unstable; urgency=low
+
+  * hardware.c (cd_status): Give sane advice about dealing
+    without access to the cdrom drive; thanks to Josip Rodin.
+    Closes: #149371 (faulty advice about accessing the CD)
+  
+ -- Antti-Juhani Kaijanaho <ajk@debian.org>  Thu,  1 Jul 2004 17:14:02 +0300
+
+workbone (2.40-4) unstable; urgency=low
+
+  * New maintainer
+    Closes: #227782 (ITA: workbone -- A simple text-based CD player)
+  * debian/{postinst,prerm}: No longer set the /usr/doc link.
+  * debian/{menu,rules,postinst,postrm}: Install a menu entry
+    Closes: #182225 (workbone: Please add a menu entry)
+  * debian/copyright: Add proper licensing information
+  * debian/control (Standards-Version): 3.6.1, no changes required
+
+ -- Antti-Juhani Kaijanaho <ajk@debian.org>  Sat, 17 Jan 2004 23:09:16 +0200
+
+workbone (2.40-3) unstable; urgency=low
+
+  * Update to standards version 3.5.6.
+  * Update copyright file.
+  * Fix typo in package description. (closes: #125506)
+  * Add symlink to doc directory. (closes: #58785)
+  * Add open nonblocking patch from Chris Waters. (closes: #88641)
+
+ -- Martin Mitchell <martin@debian.org>  Thu, 25 Apr 2002 00:45:59 +1000
+
+workbone (2.40-2) unstable; urgency=low
+
+  * Update to standards version 3.0.1.
+  * Update copyright file.
+  * Fix cd mounted detection to ignore iso9660 fs. (closes: #32056, #33973)
+
+ -- Martin Mitchell <martin@debian.org>  Fri, 22 Oct 1999 03:04:38 +1000
+
+workbone (2.40-1) unstable; urgency=low
+
+  * New upstream release.
+  * Update copyright file.
+  * Update to standards version 2.4.1.
+  * Clean up rules file.
+
+ -- Martin Mitchell <martin@debian.org>  Wed, 14 Oct 1998 02:11:49 +1000
+
+workbone (2.31-5) unstable; urgency=low
+
+  * Libc6 compile.
+  * Remove startup delay. (#10958)
+  * New maintainer.
+
+ -- Martin Mitchell <martin@debian.org>  Tue, 11 Nov 1997 02:17:24 +1100
+
+workbone (2.31-4) unstable; urgency=low
+
+  * Added a postinst to let you know if you have a /dev/cdrom
+  * Closed all pending bugs
+
+ -- Stephen Pitts <pitts2@memphisonline.com>  Sat, 16 Nov 1996 13:27:57 -0600
+
+workbone (2.31-3) unstable; urgency=low
+
+  * Changed architecture from i386 to any
+
+ -- Stephen Pitts <pitts2@memphisonline.com>  Mon, 11 Nov 1996 20:02:03 -0600
+
+workbone (2.31-2) unstable; urgency=low
+
+  * Workbone was installed as /usr/bin instead of in /usr/bin. Whoops!
+
+ -- Stephen Pitts <pitts2@memphisonline.com>  Fri, 8 Nov 1996 20:39:05 -0600
+
+workbone (2.31-1) unstable; urgency=low
+ 
+  * Version number incremented because of questionable handling of epoch
+     by dpkg/dselect
+  * New maintainer
+  * Package rebuilt from upstream sources using deb-make!
+
+ -- Stephen Pitts <pitts2@memphisonline.com>  Tue, 29 Oct 1996 18:27:01 -0600
+
+
--- workbone-2.40.orig/debian/copyright
+++ workbone-2.40/debian/copyright
@@ -0,0 +1,31 @@
+This package was debianized by Stephen Pitts pitts2@memphisonline.com on
+Tue, 29 Oct 1996 18:27:01 -0600.
+It was downloaded from ftp.ibiblio.org:/pub/linux/apps/sound/cdrom/curses
+This package was then maintained by Martin Mitchell <martin@debian.org>.
+It is currently being maintained by Antti-Juhani Kaijanaho <ajk@debian.org>.
+
+Authors:
+   Dirk Foersterling (Workman hardware support)
+   Thomas McWilliams (Workbone interface)
+
+
+Copyright:
+   Copyright (c) 1994  Thomas McWilliams
+   Currently maintained by Bernhard Rosenkraenzer (bero@bero-online.ml.org)
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
+
+A copy of the GNU General Public License, version 2 or later, can be
+found in /usr/share/common-licenses/GPL.
--- workbone-2.40.orig/debian/install
+++ workbone-2.40/debian/install
@@ -0,0 +1,2 @@
+workbone usr/bin/
+
--- workbone-2.40.orig/debian/docs
+++ workbone-2.40/debian/docs
@@ -0,0 +1 @@
+README
--- workbone-2.40.orig/debian/postrm
+++ workbone-2.40/debian/postrm
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+set -e
+
+if test -x /usr/bin/update-menus; then update-menus; 
+fi
+#DEBHELPER#
+
--- workbone-2.40.orig/debian/README.debian
+++ workbone-2.40/debian/README.debian
@@ -0,0 +1,14 @@
+workbone for DEBIAN
+----------------------
+
+Workbone for Debian is a nice CD player. I've created a login called
+cdplay that has workman as its shell. That way I can enjoy the
+benefits of workman without the security hassle of leaving a virtual
+console open. 
+
+Stephen Pitts <pitts2@memphisonline.com>, Tue, 29 Oct 1996 18:27:01 -0600
+
+Workbone no longer has a delay at startup. This was annoying and seems to
+serve no purpose with modern cdroms.
+
+Martin Mitchell <martin@debian.org>
--- workbone-2.40.orig/debian/rules
+++ workbone-2.40/debian/rules
@@ -0,0 +1,64 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+	CFLAGS += -O0
+else
+	CFLAGS += -O2
+endif
+
+
+build:
+	dh_testdir
+
+	$(MAKE) CFLAGS='$(CFLAGS)' LDFLAGS=""
+
+	touch build
+
+clean:
+	dh_testdir
+	dh_testroot
+
+	rm -f build
+
+	$(MAKE) clean
+
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+
+	dh_install --list-missing
+
+binary-indep:  build install
+# There are no architecture-independent files to be uploaded
+# generated by this package.  If there were any they would be
+# made here.
+
+binary-arch: build install
+	dh_testdir -a
+	dh_testroot -a
+	dh_installchangelogs -a CHANGES
+	dh_installdocs -a
+	dh_installmenu -a
+	dh_installman -a workbone.1
+	dh_desktop -a
+	dh_strip -a
+	dh_compress -a
+	dh_fixperms -a
+	dh_installdeb -a
+	dh_shlibdeps -a
+	dh_gencontrol -a
+	dh_md5sums -a
+	dh_builddeb -a
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install
--- workbone-2.40.orig/debian/postinst
+++ workbone-2.40/debian/postinst
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+if test -x /usr/bin/update-menus; then update-menus; fi
+
+if [ ! -e /dev/cdrom ]
+then
+echo "Please link /dev/cdrom to your CDROM device before running workbone."
+fi
+#DEBHELPER#
--- workbone-2.40.orig/debian/control
+++ workbone-2.40/debian/control
@@ -0,0 +1,15 @@
+Source: workbone
+Section: sound
+Priority: optional
+Maintainer: Debian QA Group <packages@qa.debian.org>
+Build-Depends: debhelper (>> 5.0.0)
+Standards-Version: 3.7.3
+
+Package: workbone
+Architecture: any
+Depends: ${shlibs:Depends}
+Suggests: cdtool
+Description: A simple text-based CD player
+ Workbone is a simple, curses-based CD player that is controlled by
+ the num-lock keys. The cdtool package can be used to determine the
+ contents of a CD before playing it.