--- rio-1.07.orig/app.cpp +++ rio-1.07/app.cpp @@ -43,7 +43,7 @@ #endif #define DELETEARRAY delete[] -#elif defined(__FreeBSD__) +#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) // FreeBSD g++ #include #include --- rio-1.07.orig/rio.cpp +++ rio-1.07/rio.cpp @@ -63,18 +63,36 @@ #elif defined(__linux__) // linux g++ #include - #if defined(__alpha) - #include + + // Changed per Debian bug 50938 + //#if defined(__alpha) + // #include + //#else + // #include + //#endif + + // Changes per Debian bug 50938 + #if !defined(__i386__) + #include #else - #include + #include #endif + + // Changed per bug Debian bug 88779 + #if !defined(__alpha__) + #if __GLIBC__ + #include + #else #include + #endif + #endif + #define OUTPORT(p,v) outb( v, p ) #define INPORT(p) inb( p ) #define CLOCK_SECOND CLOCKS_PER_SEC #define DELETEARRAY delete[] -#elif defined(__FreeBSD__) +#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) // FreeBSD g++ #include #include @@ -236,7 +254,7 @@ #endif // if FreeBSD - #if defined(__FreeBSD__) + #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) // request direct access to memory addresses if ( open("/dev/io", O_RDONLY) == -1 ) { --- rio-1.07.orig/makefile +++ rio-1.07/makefile @@ -6,11 +6,19 @@ # ############################################################################### +# Editied for Debian GNU/Linux +DESTDIR = +BIN = $(DESTDIR)/usr/bin + + all: rio rio: app.cpp rio.cpp - g++ -O1 -o rio app.cpp rio.cpp - chmod +s rio + g++ -O1 -o rio app.cpp rio.cpp $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) +# chmod +s rio + +install: rio + install ./rio $(BIN) clean: rm -f rio --- rio-1.07.orig/rio.1 +++ rio-1.07/rio.1 @@ -0,0 +1,116 @@ +.TH RIO 1 +.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection +.\" other parms are allowed: see man(7), man(1) +.SH NAME +rio \- program to control a Diamond RIO MP3 player +.SH SYNOPSIS +.B rio +.I "[options] files ..." +.br +.SH DESCRIPTION +This manual page documents briefly the +.BR rio +command. +This manual page was written for the Debian GNU/Linux distribution +because the original program does not have a manual page. +.PP +.B rio +is a CLI controller for a Diamond Rio MP3 file player. +.PP +The default ioport is 0x378. If this is not the ioport for your +printer port, you will have to use the +.B -p +option. +.SH INITIALIZATION +.PP +Initialization should only be performed on new or corrupt cards. +You can initialize with bad block checking enabled (-iy) which +will test all blocks on the internal or external flash ram (which +ever is selected) and note all bad blocks. This process will +take some time (upto 20 minutes on slow machines). +You can also initialize with bad block checking disabled (-in) +which is much quicker but all blocks (even bad blocks) will +be used. +.PP +If you want to delete all files on the device, the (-za) option +should be used instead of using the initialization options +mentioned above. +.PP +.SH OPTIONS +A summary of options are included below. +.TP +.B \-d +Display Directory +.TP +.B \-iy +initialize with check for bad blocks +.TP +.B \-in +initialize without check for bad blocks +.TP +.B \-x +perform operations on external flash ram +.TP +.B \-u +specify file(s) to upload +.TP +.B \-g +specify file to download +.TP +.B \-f +specify text based playlist file which contains files to be upload +.TP +.B \-z +specify file to delete +.TP +.B \-za +delete all files +.TP +.B \-o +specify new playlist order in quotes +.TP +.B \-p +specify parallel port base IO address, default=0x378 +.TP +.B \-v +enable verbose mode +.TP +.B \-di +specify initialization delay +.TP +.B \-dt +specify tx delay +.TP +.B \-dr +specify rx delay +.SH EXAMPLES +.TP +display directory using parallel port at 0x278 +.PP +rio -p 0x278 -d +.TP +initialize (with bad block check) and upload files +.PP +rio -iy -u *.mp3 +.TP +delete existing files and upload playlist onto external flash ram +.PP +rio -za -f playlist.txt -x +.TP +initialize, upload files in playlist and then display directory +.PP +rio -d -in -f playlist.txt +.TP +download file then delete it and finally display directory +.PP +rio -d -g mp3Files/song.mp3 -z song.mp3 +.TP +reverse playlist order and display directory, also change rx iodelay +.PP +rio -o "5 4 3 2 1" -d -dr 4 +.SH SEE ALSO +file:/usr/doc/rio/README.gz +http://www.world.co.uk.sba/index.htm +.SH AUTHOR +This manual page was written by Vince Mulhollon , +for the Debian GNU/Linux system (but may be used by others). --- rio-1.07.orig/debian/dirs +++ rio-1.07/debian/dirs @@ -0,0 +1 @@ +usr/bin --- rio-1.07.orig/debian/compat +++ rio-1.07/debian/compat @@ -0,0 +1 @@ +9 --- rio-1.07.orig/debian/rio.manpages +++ rio-1.07/debian/rio.manpages @@ -0,0 +1 @@ +rio.1 --- rio-1.07.orig/debian/watch +++ rio-1.07/debian/watch @@ -0,0 +1 @@ +# This package is orphaned upstream --- rio-1.07.orig/debian/docs +++ rio-1.07/debian/docs @@ -0,0 +1,4 @@ +CREDITS +README +playlist.txt +rio.txt --- rio-1.07.orig/debian/rules +++ rio-1.07/debian/rules @@ -0,0 +1,7 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +%: + dh $@ + --- rio-1.07.orig/debian/README.Debian +++ rio-1.07/debian/README.Debian @@ -0,0 +1,11 @@ +rio for Debian +---------------------- + +Rio no longer has a debconf front end to set SUID root. + +If you want to access your rio as a user other than root, +you need to SUID root the /usr/bin/rio binary. + +execute this command as root: chmod 4755 /usr/bin/rio + + -- Vince Mulhollon , Wed, 19 Dec 2001 18:32:26 -0500 --- rio-1.07.orig/debian/rio.menu +++ rio-1.07/debian/rio.menu @@ -0,0 +1,18 @@ +?package(rio):\ + needs="text"\ +section="Applications/Mobile Devices"\ +title="Directory of Rio Connected to lp0"\ +command="/usr/bin/rio -d -p 0x3bc; sleep 20" + +?package(rio):\ + needs="text"\ +section="Applications/Mobile Devices"\ +title="Directory of Rio Connected to lp1"\ +command="/usr/bin/rio -d -p 0x378; sleep 20" + +?package(rio):\ + needs="text"\ +section="Applications/Mobile Devices"\ +title="Directory of Rio Connected to lp2"\ +command="/usr/bin/rio -d -p 0x278; sleep 20" + --- rio-1.07.orig/debian/control +++ rio-1.07/debian/control @@ -0,0 +1,29 @@ +Source: rio +Section: sound +Priority: optional +Maintainer: Vince Mulhollon +Build-Depends: debhelper (>= 9) +Standards-Version: 3.9.5.0 + +Package: rio +Architecture: alpha amd64 i386 kfreebsd-i386 +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Command line Diamond Rio MP3 player controller + rio is a Diamond Rio MP3 CLI controller program + The home website is http://www.world.co.uk/sba + This program supports file uploads and downloads, on both + the Classic Rio and the 64 Meg Rio, and supports plug in cards. + . + The default port is 0x378, if your rio is plugged into a + different port, you will need to use the -p option. + . + This program directly controls various IOports. The program need to + be run as root, or setuid root. + . + If you execute the following line as root after package installation, + the program will be setuid root. + . + chmod 4755 /usr/bin/rio + . + Do NOT do that unless you understand the security implications of a + setuid binary that can "easily" overwrite any system file. --- rio-1.07.orig/debian/copyright +++ rio-1.07/debian/copyright @@ -0,0 +1,26 @@ +This package was debianized by Vince Mulhollon on +Sat, 30 Oct 1999 21:37:01 -0500. + +It was downloaded from http://www.world.co.uk/sba/index.htm + +Upstream Author: sba@tessier-ashpool.cix.co.uk + +Copyright: + +This is a cut-n-paste from the original README file: + + RIO utility v1.07 - The Snowblind Alliance (c) 1999 + + Licence Terms + ------------- + + This software is released under the terms of the GPL. Please see + the file gpl.txt for further information. + +A lintian compatible copyright line can be created by typographically +reformatting the information abovei into: + +Copyright 1999 The Snowblind Alliance + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License Version 2 can be found in /usr/share/common-licenses/GPL file. --- rio-1.07.orig/debian/changelog +++ rio-1.07/debian/changelog @@ -0,0 +1,136 @@ +rio (1.07-12) unstable; urgency=low + + * Upgrade standards version from 3.6.2.0 to 3.9.5.0 in debian/control + * Upgrade debhelper debian/compat level from 4 to 9 + * Updated debhelper Build-Depends in debian/control to >= 9 + * Added minimal debian/watch file + * Added ${misc:Depends} to Depends: line in debian/control + * Removed Suggests for menu in debian/control + (Closes: #647376) + * Added amd64 to Architecture in debian/control + * Added upstream CREDITS file to debian/docs + * Removed gpl.txt from debian/docs, it is GPL-V2 + * Changed debian/rules into the "tiny" version. + * Set debian/source/format to 1.0 + * Added debian/rio.manpages containing rio.1 + * Added $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) to makefile for hardening + * Typographically reformatted the copyright line to make lintian + happy. Its a one-liner now instead of two. + * Removed leading "A" article from description synopsis + in debian/control to fix description-synopsis-starts-with-article + * Changed from Apps/Sound/Rio to Applications/Mobile Devices + in debian/rio.menu + + -- Vince Mulhollon Fri, 21 Mar 2014 09:55:05 -0500 + +rio (1.07-11.1) unstable; urgency=low + + * Non-maintainer upload. + * Include sys/io.h rather than asm/io.h (Closes: 429010). + + -- Pierre Habouzit Wed, 18 Jul 2007 12:04:16 +0200 + +rio (1.07-11) unstable; urgency=low + + * Policy compliant up to 3.6.2.0, quoted strings in menu file. + * Patched for GNU/kFreeBSD (Closes: #327646) + * Boost debhelper compat level from 1 to 4 + * Convert from dh_installmanpages to dh_installman + + -- Vince Mulhollon Tue, 11 Oct 2005 19:18:35 -0500 + +rio (1.07-10) unstable; urgency=low + + * Upgrading to new gcc + * Fixed URL in control description + * Closes: #196926 + + -- Vince Mulhollon Mon, 25 Aug 2003 20:10:18 -0500 + +rio (1.07-9) unstable; urgency=low + + * Policy compliant up to 3.5.8.0 + * Fixes the lintian warning about postinst-should-not-set-usr-doc-link + * Fixes copyright-lists-upstream-authors-with-dh_make-boilerplate + + * No longer uses debconf + * Closes: #136453 + + -- Vince Mulhollon Tue, 17 Dec 2002 19:54:16 -0600 + +rio (1.07-8) unstable; urgency=low + + * Fix lintian error, licenses is spelled with an s not a c + * Debian policy compliance upgrade from 3.5.2.0 to 3.5.6.0 + + -- Vince Mulhollon Wed, 19 Dec 2001 18:19:30 -0600 + +rio (1.07-7) unstable; urgency=low + + * OK, lets try this again, getting rid of the postinst + + -- Vince Mulhollon Wed, 23 May 2001 20:07:39 -0500 + +rio (1.07-6) unstable; urgency=low + + * Bug 88779 fixed (no complaints in some months, anyway) + * Closes: #88779 + * + * Bug 92857 prconfigure fails due to chmod issues + * I do not intend to debconf the suid issue + * I am no longer of the opinion that essentially + * opening a security hole is a wise idea. + * Someone smart enough to SUID the binary should be + * responsible for their actions and I will not help them + * Closes: #92857 + * + * Bug 94399 german templates for debconf + * See bug 92857, I'm not doing the debconf SUID thing anymore. + * Closes: #94399 + + -- Vince Mulhollon Mon, 21 May 2001 18:57:49 -0500 + +rio (1.07-5) unstable; urgency=low + + * Bug 88779 build on Alpha fails. + * Problem, in summary, was #include + * Solution was to ifdef it out for alpha. + + -- Vince Mulhollon Tue, 6 Mar 2001 21:01:30 -0600 + +rio (1.07-4) unstable; urgency=low + + * Update to standards version 3.5.2.0 from 3.0.1 + + -- Vince Mulhollon Sun, 4 Mar 2001 17:08:06 -0600 + +rio (1.07-3) unstable; urgency=low + + * Bug 50510 was fixed in 1.07-2 (closes: Bug#50510) + * per bug 50938, I applied the patch and uploaded (closes: Bug#50938) + * Bug 52128 indicates the rio program directly molests the IO chips + * So I will change the control file per bug report (closes: Bug#52128) + * Early experiments with menu appear to work OK + + -- Vince Mulhollon Tue, 7 Dec 1999 18:36:23 -0600 + +rio (1.07-2) unstable; urgency=low + + * Per bug #50510, debconf defaults to non-setuid root. + * Per bug #50938, I will implement the suggested change. + + -- Vince Mulhollon Mon, 29 Nov 1999 20:03:33 -0600 + +rio (1.07-1.1) unstable; urgency=low + + * NMU. Removed suid bit. Fixes #50510. + + -- Joop Stakenborg Sat, 20 Nov 1999 21:35:18 +0100 + +rio (1.07-1) unstable; urgency=low + + * Initial Release. + * This is my first Debian package. + + -- Vince Mulhollon Sat, 30 Oct 1999 21:37:01 -0500 + --- rio-1.07.orig/debian/source/format +++ rio-1.07/debian/source/format @@ -0,0 +1 @@ +1.0