Changeset 2e8b589 for gutenbach/debian


Ignore:
Timestamp:
Jun 24, 2010, 1:27:07 AM (14 years ago)
Author:
Jessica B. Hamrick <jhamrick@…>
Branches:
master, debian, mac, no-cups, nodebathena, web
Children:
d988d9d
Parents:
e5529cd
git-author:
Jessica B. Hamrick <jhamrick@…> (12/12/09 18:08:33)
git-committer:
Jessica B. Hamrick <jhamrick@…> (06/24/10 01:27:07)
Message:

Updated paths and filenames to the correct values for the gutenbach package.

Location:
gutenbach/debian/lib
Files:
11 edited
2 moved

Legend:

Unmodified
Added
Removed
  • gutenbach/debian/lib/README

    re5529cd r2e8b589  
    1 sipbmp3
     1gutenbach
    22    The SIPB MP3 Music Spooler
    33
    44We would love you forever if you took this README/INSTALL document and made
    55a Debian package out of it.  That would be uber-awesome.  But otherwise, we're
    6 assuming that you just want to get sipbmp3 up and running on your own
     6assuming that you just want to get gutenbach up and running on your own
    77system.  Well, maybe we shouldn't assume that.
    88
    99
    10 What does sipbmp3 do?
     10What does gutenbach do?
    1111---------------------
    1212
    13 sipbmp3 is a music spooler.  As it turns out, streaming music is a hard
     13gutenbach is a music spooler.  As it turns out, streaming music is a hard
    1414problem, with lots of proprietary protocols, client and server software.
    1515All of these jiggety bits are kind of a pain to get working correctly,
    16 so, we built sipbmp3 on top of... a printer system.  It's very simple:
     16so, we built gutenbach on top of... a printer system.  It's very simple:
    1717you print an mp3 file to a special "printer", and it gets played on
    1818whatever speakers you're hooked up to.
     
    2727
    2828
    29 Installing sipbmp3
     29Installing gutenbach
    3030------------------
    3131
     
    33331. Configuring your sound
    3434
    35 If you're installing sipbmp3 on a server environment, it's highly likely
     35If you're installing gutenbach on a server environment, it's highly likely
    3636that you have a bare bones audio setup and everything is muted.  Make sure
    3737your sound works!  One common problem is that the daemon user (the user which
     
    48482. Install some prerequisite software
    4949
    50 On a vanilla Ubuntu server install, sipbmp3 will also need the following
     50On a vanilla Ubuntu server install, gutenbach will also need the following
    5151packages to work properly:
    5252
     
    5757
    5858
    59 3. Setup sipbmp3
    60 
    61 The Git repository for sipbmp3 is located in:
    62 
    63     /afs/sipb/project/sipbmp3/sipbmp3.git
    64 
    65 Place this in /root/sipbmp3; the remctl scripts will assume that the
     593. Setup gutenbach
     60
     61The Git repository for gutenbach is located in:
     62
     63    /afs/sipb/project/sipbmp3/gutenbach.git
     64
     65Place this in /root/gutenbach; the remctl scripts will assume that the
    6666scripts can be found in this location.
    6767
    6868
    69 4. Configure sipbmp3
    70 
    71 sipbmp3 will send zephyrs during playback start and end.  Since you don't
     694. Configure gutenbach
     70
     71gutenbach will send zephyrs during playback start and end.  Since you don't
    7272want to be spamming sipb-auto (which is the default zephyr class these
    7373are sent to), you should create a configuration file:
    7474
    75     /etc/sipbmp3-filter-config.pl
     75    /etc/gutenbach-filter-config.pl
    7676
    7777That looks like:
     
    8484
    8585
    86 5. Configure sipbmp3 init scripts
    87 
    88 sipbmp3 will attempt to drop some information into /var/run/sipbmp3, which
     865. Configure gutenbach init scripts
     87
     88gutenbach will attempt to drop some information into /var/run/gutenbach, which
    8989needs to exist and you can't simply mkdir since /var/run on Ubuntu is
    90 a tempfs. Thus, add the following lines to a new file, /etc/init.d/sipbmp3:
     90a tempfs. Thus, add the following lines to a new file, /etc/init.d/gutenbach:
    9191
    9292#!/bin/sh
    93 mkdir /var/run/sipbmp3
    94 touch /var/run/sipbmp3/status
    95 chmod 0777 /var/run/sipbmp3/status
     93mkdir /var/run/gutenbach
     94touch /var/run/gutenbach/status
     95chmod 0777 /var/run/gutenbach/status
    9696
    9797You should also run these commands yourself. :-)
    9898
    99 XXX: Note from jhamrick: I would recomment actually setting this up as a nice startup script, with a switch case for {start|stop|restart} (where with stop you just remove the directory, and with restart you remove the directory and then recreate it).  Also, sipbmp3 won't actually run on startup unless there are scripts in the /etc/rc*.d directory, so we need to do:
    100 
    101 > ln -s ../init.d/sipbmp3 /etc/rc2.d/S61sipbmp3
    102 > ln -s ../init.d/sipbmp3 /etc/rc3.d/S61sipbmp3
    103 > ln -s ../init.d/sipbmp3 /etc/rc4.d/S61sipbmp3
    104 > ln -s ../init.d/sipbmp3 /etc/rc5.d/S61sipbmp3
    105 > ln -s ../init.d/sipbmp3 /etc/rc0.d/K39sipbmp3
    106 > ln -s ../init.d/sipbmp3 /etc/rc1.d/K39sipbmp3
    107 > ln -s ../init.d/sipbmp3 /etc/rc6.d/K39sipbmp3
     99XXX: Note from jhamrick: I would recomment actually setting this up as a nice startup script, with a switch case for {start|stop|restart} (where with stop you just remove the directory, and with restart you remove the directory and then recreate it).  Also, gutenbach won't actually run on startup unless there are scripts in the /etc/rc*.d directory, so we need to do:
     100
     101> ln -s ../init.d/gutenbach /etc/rc2.d/S61gutenbach
     102> ln -s ../init.d/gutenbach /etc/rc3.d/S61gutenbach
     103> ln -s ../init.d/gutenbach /etc/rc4.d/S61gutenbach
     104> ln -s ../init.d/gutenbach /etc/rc5.d/S61gutenbach
     105> ln -s ../init.d/gutenbach /etc/rc0.d/K39gutenbach
     106> ln -s ../init.d/gutenbach /etc/rc1.d/K39gutenbach
     107> ln -s ../init.d/gutenbach /etc/rc6.d/K39gutenbach
    108108
    109109XXX: We need better permissions for status. Also, quentin wants to put this
     
    116116running a printer! The magic lines are:
    117117
    118     :if=|/path/to/sipbmp3-filter
     118    :if=|/path/to/gutenbach-filter
    119119    :lp=/dev/null
    120120
    121 Which mean that we pipe the mp3 files through sipbmp3-filter (which does
     121Which mean that we pipe the mp3 files through gutenbach-filter (which does
    122122the actual playing), and then dump the rest of the output into /dev/null,
    123123since we don't actually care about it.
     
    129129  :cm=Human Readable Printer Name
    130130  :lp=/dev/null
    131   :if=|/path/to/sipbmp3-filter
     131  :if=|/path/to/gutenbach-filter
    132132  :sd=/var/spool/lpd/printername
    133133  :ml=0:mx=0:sh:sf
     
    148148in the future.
    149149
    150 WARNING: On a cluster machine, get_hesiod_pcap will clobber sipbmp3
    151 because it sets all:all=someotherprinter, making lpr not see sipbmp3.
     150WARNING: On a cluster machine, get_hesiod_pcap will clobber gutenbach
     151because it sets all:all=someotherprinter, making lpr not see gutenbach.
    152152There are two ways of fixing this:
    153153
     
    190190properly, so removing the REJECT line is a must!
    191191
    192 XXXXXX: sipbmp3 accepts no responsibility for social faux pas that may
     192XXXXXX: gutenbach accepts no responsibility for social faux pas that may
    193193be committed with this system.  It is consider good etiquette, however,
    194194to clear the status file if you're on zsr.
     
    2062067. Test, round one
    207207
    208 The first test you should do to make sure sipbmp3 is configured properly is
     208The first test you should do to make sure gutenbach is configured properly is
    209209to attempt to play an mp3 file locally, via lpr.  The command you should use
    210210is:
     
    258258further:
    259259
    260     * Check the zephyr logs of the class sipbmp3 was configured to
     260    * Check the zephyr logs of the class gutenbach was configured to
    261261      send messages to:
    262262
     
    269269          *software* volume.
    270270
    271         - If you see a blank zephyr, that means that sipbmp3-filter died
    272           trying to get a handle to /var/run/sipbmp3/status and failing.
     271        - If you see a blank zephyr, that means that gutenbach-filter died
     272          trying to get a handle to /var/run/gutenbach/status and failing.
    273273          Check if you created the file correctly, and that daemon has
    274274          permissions to write to it. If you rebooted recently, check if
     
    281281          exiftools is not installed.
    282282
    283     * Otherwise, double check the userland code in sipbmp3-filter. XXX: There
     283    * Otherwise, double check the userland code in gutenbach-filter. XXX: There
    284284      are some edge-cases that don't give nice error messages, for example
    285       the failed write to /var/run/sipbmp3/status
     285      the failed write to /var/run/gutenbach/status
    286286
    287287
     
    292292In order to do this, you will need to ask IS&T for a Moira pcap entry
    293293request.  Send mail to hesreq@mit.edu, specifying that you are setting
    294 up a sipbmp3 clone, that you want a Moira pcap entry, the printer name
     294up a gutenbach clone, that you want a Moira pcap entry, the printer name
    295295and server name of your queue, and that you want hwtype=LOCAL,ka=1. It wouldn't
    296296hurt to also tell them where your print queue is, and a contact list.
     
    326326Finally, edit /etc/printcap and give it information about the Kerberos:
    327327
    328 sipbmp3: server
     328gutenbach: server
    329329    :cm=SIPB MP3 Spooler
    330330    ...
     
    351351You will probably need to apt-get install remctl-server. Then, replace
    352352the /etc/remctl/conf.d directory with a Git checkout of
    353 /afs/sipb/project/sipbmp3/sipbmp3-remctl.git.
     353/afs/sipb/project/sipbmp3/gutenbach-remctl.git.
    354354
    355355Please note that remctl will NOT work without a keytab setup.
    356356
    357357
    358 X. Deploying sipbmp3web
     358X. Deploying gutenbachweb
    359359------------------------
    360360
    361 sipbmp3 web provides a nice and user-friendly interface for some common
     361gutenbach web provides a nice and user-friendly interface for some common
    362362tasks. XXX: It is currently not portable beyond zsr. Stay tuned!
    363363
     
    367367If things are broken on a reboot, make sure you're running:
    368368
    369     /etc/init.d/{sipbmp3,zhm,debatehna-lprng}
     369    /etc/init.d/{gutenbach,zhm,debatehna-lprng}
  • gutenbach/debian/lib/cd-cddb-get

    r737d88b r2e8b589  
    33
    44CDDBURL="http://freedb.freedb.org/~cddb/cddb.cgi"
    5 MYUSER="sipbmp3"
     5MYUSER="gutenbach"
    66MYHOST="zsr.mit.edu"
    77
     
    1313TRACKS="$2"
    1414
    15 mkdir -p /var/cache/sipbmp3
     15mkdir -p /var/cache/gutenbach
    1616
    17 CACHEFILE="/var/cache/sipbmp3/$ID"
     17CACHEFILE="/var/cache/gutenbach/$ID"
    1818
    1919if [ ! -e "$CACHEFILE" ]; then
  • gutenbach/debian/lib/cd-play

    r737d88b r2e8b589  
    1818    fi
    1919
    20     echo "cdda://$(($T - 1))" | mit-lpr -Psipbmp3@localhost -J "Track $T$DESC";
     20    echo "cdda://$(($T - 1))" | mit-lpr -Pgutenbach@localhost -J "Track $T$DESC";
    2121    echo "Queued Track $T$DESC";
    2222}
  • gutenbach/debian/lib/gutenbach-filter

    rf1ba976 r2e8b589  
    22# Play the data on STDIN as an audio file
    33#
    4 # $Id: sipbmp3-filter,v 1.26 2009/02/20 00:27:17 geofft Exp root $
    5 # $Source: /usr/local/bin/RCS/sipbmp3-filter,v $
     4# $Id: gutenbach-filter,v 1.26 2009/02/20 00:27:17 geofft Exp root $
     5# $Source: /usr/local/bin/RCS/gutenbach-filter,v $
    66#
    77# TODO
     
    2525my $zephyr_class = "sipb-test";
    2626my $host = `hostname`;
    27 my $queue = "sipbmp3";
     27my $queue = "gutenbach";
    2828
    2929# Configuration
    30 my $config_file = "/etc/sipbmp3-filter-config.pl";
     30my $config_file = "/usr/lib/gutenbach/gutenbach-filter-config.pl";
    3131if (-r $config_file) {
    3232    # Inline the configuration file
     
    4040
    4141close(STDERR);
    42 open(STDERR, ">>", "/tmp/sipbmp3.log") or warn "Couldn't open log: $!";
     42open(STDERR, ">>", "/tmp/gutenbach.log") or warn "Couldn't open log: $!";
    4343
    4444$ENV{"TERM"}="vt100";
     
    9898
    9999# For the Now Playing remctl command
    100 open(STATUS, '>', '/var/run/sipbmp3/status') or die("Can't open status file /var/run/sipbmp3/status");
     100open(STATUS, '>', '/var/run/gutenbach/status') or die("Can't open status file /var/run/gutenbach/status");
     101
     102# For the Now Playing local command
     103open(CURRENT, '>', '/var/run/gutenbach/current') or die("Can't open status file /var/run/sipbp3/current");
    101104
    102105print(ZEPHYR "$opts{'n'}\@$opts{'H'} is playing:\n");
    103106print(STATUS "User: $opts{'n'}\@$opts{'H'}\n");
     107print(CURRENT "$opts{'n'}\@$opts{'H'} is playing:\n");
    104108
    105109# SIGHUP handler
    106110sub clear_status {
    107111    # Possible race condition if the previous status is still going
    108     open(STA, '>', '/var/run/sipbmp3/status');
     112    open(STA, '>', '/var/run/gutenbach/status');
    109113    close(STA);
    110114    open(ZEPH, '|/usr/athena/bin/zwrite -d -n -c '. $zephyr_class .' -i '.
     
    112116    print(ZEPH "Playback aborted.\n");
    113117    close(ZEPH);
     118    open(CURRENT, '|/usr/athena/bin/zwrite -d -n -c '. $zephyr_class .' -i '.
     119        $queue.'@'.$host.' -s "SIPB LPR music spooler"');
     120    close(CURRENT);
    114121    die;
    115122}
     
    125132if ($magic) {
    126133    printf(ZEPHYR "%s file %s\n", $magic, $opts{'J'});
     134    printf(CURRENT "%s file %s\n", $magic, $opts{'J'});
    127135    printf(STATUS "Filetype: %s\n", $magic);
    128136    printf(STATUS "Filename: %s\n", $opts{'J'});
    129137    if (exists $fileinfo->{'Title'}) {
    130138        printf(ZEPHYR "\@b{%s}\n", $fileinfo->{'Title'}) if exists $fileinfo->{'Title'};
     139        printf(CURRENT "\@b{%s}\n", $fileinfo->{'Title'}) if exists $fileinfo->{'Title'};
    131140        printf(STATUS "Title: %s\n", $fileinfo->{'Title'});
    132141    }
     
    134143        if (exists $fileinfo->{$key}) {
    135144            printf(ZEPHYR "%s\n", $fileinfo->{$key}) if exists $fileinfo->{$key};
     145            printf(CURRENT "%s\n", $fileinfo->{$key}) if exists $fileinfo->{$key};
    136146            printf(STATUS "%s: %s\n", $key, $fileinfo->{$key});
    137147        }
     
    150160        $title = "";
    151161        print ZEPHYR "YouTube video $filepath\n$title";
     162        print CURRENT "YouTube video $filepath\n$title";
    152163        print STATUS "YouTube video $filepath\n$title";
    153164        $filepath = <$out>;
     
    157168        print STDERR "Resolved external reference to $filepath\n";
    158169        printf(ZEPHYR "%s\n", $filepath);
     170        printf(CURRENT "%s\n", $filepath);
    159171        printf(STATUS "External: %s\n", $filepath);
    160172    }
     
    163175    split_playlist($filepath, \%opts);
    164176    close(ZEPHYR);
     177    close(CURRENT);
    165178    close(STATUS);
    166179    exit 0;
     
    170183#printf(ZEPHYR "Job priority %s\n", $opts{'C'}) if ($opts{'C'} && ($opts{'C'} ne 'A'));
    171184close(ZEPHYR);
     185close(CURRENT);
    172186close(STATUS);
    173187play_mplayer_audio($filepath, \%opts);
     
    291305       
    292306        close(ZEPHYR);
    293         open(STATUS, '>', '/var/run/sipbmp3/status');
     307        open(STATUS, '>', '/var/run/gutenbach/status');
    294308        close(STATUS);
    295309    }
  • gutenbach/debian/lib/gutenbach-get-config

    r28836c2 r2e8b589  
    11#!/usr/athena/bin/perl
    22use strict;
    3 # Get configuration of sipbmp3
     3# Get configuration of gutenbach
    44
    55my $zephyr_class = "sipb-test";
    66my $host = `hostname`;
    7 my $queue = "sipbmp3";
     7my $queue = "gutenbach";
    88my $mixer = "Headphone";
    99my $channel = "Front Left";
    1010
    1111# Configuration
    12 my $config_file = "/etc/sipbmp3-filter-config.pl";
     12my $config_file = "/usr/lib/gutenbach/gutenbach-filter-config.pl";
    1313if (-r $config_file) {
    1414    # Inline the configuration file
  • gutenbach/debian/lib/status-clear

    r737d88b r2e8b589  
    11#!/bin/sh
    22PATH="$(dirname $0):$PATH"
    3 > /var/run/sipbmp3/status
     3> /var/run/gutenbach/status
  • gutenbach/debian/lib/status-get

    r737d88b r2e8b589  
    11#!/bin/sh
    22PATH="$(dirname $0):$PATH"
    3 cat /var/run/sipbmp3/status
     3cat /var/run/gutenbach/status
  • gutenbach/debian/lib/volume-get

    r28836c2 r2e8b589  
    22PATH="$(dirname $0):$PATH"
    33
    4 mixer=$(sipbmp3-get-config mixer)
    5 channel=$(sipbmp3-get-config channel)
     4mixer=$(gutenbach-get-config mixer)
     5channel=$(gutenbach-get-config channel)
    66
    77amixer get $mixer | grep "$channel" \
  • gutenbach/debian/lib/volume-is-muted

    r9f0c46e r2e8b589  
    22PATH="$(dirname $0):$PATH"
    33
    4 mixer=$(sipbmp3-get-config mixer)
    5 channel=$(sipbmp3-get-config channel)
     4mixer=$(gutenbach-get-config mixer)
     5channel=$(gutenbach-get-config channel)
    66
    77volstat=$(amixer get $mixer | grep "$channel" \
  • gutenbach/debian/lib/volume-mute

    r0d16875 r2e8b589  
    22PATH="$(dirname $0):$PATH"
    33
    4 mixer=$(sipbmp3-get-config mixer)
    5 channel=$(sipbmp3-get-config channel)
     4mixer=$(gutenbach-get-config mixer)
     5channel=$(gutenbach-get-config channel)
    66
    77amixer set $mixer toggle > /dev/null
  • gutenbach/debian/lib/volume-set

    r9f0c46e r2e8b589  
    22PATH="$(dirname $0):$PATH"
    33
    4 mixer=$(sipbmp3-get-config mixer)
    5 channel="$(sipbmp3-get-config channel)"
     4mixer=$(gutenbach-get-config mixer)
     5channel="$(gutenbach-get-config channel)"
    66
    77amixer set $mixer "$2" | grep "$channel" \
  • gutenbach/debian/lib/volume-show

    r9f0c46e r2e8b589  
    22PATH="$(dirname $0):$PATH"
    33
    4 mixer=$(sipbmp3-get-config mixer)
    5 channel=$(sipbmp3-get-config channel)
     4mixer=$(gutenbach-get-config mixer)
     5channel=$(gutenbach-get-config channel)
    66
    77amixer get $mixer
  • gutenbach/debian/lib/volume-zephyr

    r4f58f93 r2e8b589  
    11#!/bin/sh
    22PATH="$(dirname $0):$PATH"
    3 class=$(sipbmp3-get-config zephyr-class)
    4 host=$(sipbmp3-get-config host)
    5 queue=$(sipbmp3-get-config queue)
     3class=$(gutenbach-get-config zephyr-class)
     4host=$(gutenbach-get-config host)
     5queue=$(gutenbach-get-config queue)
    66instance="$queue-volume@$host"
    77
    8 mixer=$(sipbmp3-get-config mixer)
    9 channel=$(sipbmp3-get-config channel)
     8mixer=$(gutenbach-get-config mixer)
     9channel=$(gutenbach-get-config channel)
    1010
    1111muted=$(volume-is-muted)
     
    1515fi
    1616
    17 start-stop-daemon --stop --oknodo --pidfile /var/run/sipbmp3-zephyr >/dev/null 2>&1
    18 start-stop-daemon --start --pidfile /var/run/sipbmp3-zephyr --make-pidfile --background --exec /bin/sh -- -c "sleep 10 && zwrite -c $class -i $instance -d -n -m 'volume changed to $(volume-get)$mute_str' > /dev/null" >/dev/null 2>&1
     17start-stop-daemon --stop --oknodo --pidfile /usr/lib/gutenbach/gutenbach-zephyr >/dev/null 2>&1
     18start-stop-daemon --start --pidfile /usr/lib/gutenbach/gutenbach-zephyr --make-pidfile --background --exec /bin/sh -- -c "sleep 10 && zwrite -c $class -i $instance -d -n -m '$REMOTE_USER set volume $(volume-get)$mute_str' > /dev/null" >/dev/null 2>&1
Note: See TracChangeset for help on using the changeset viewer.