[Slim-Checkins] r10090 - in /trunk/platforms/fedora: ./ SOURCES/
SOURCES/POE-XS-Queue-Array-0.003.tar.gz
SOURCES/slimserver-POE-XS-Queue-Array-0.003.patch SOURCES/slimserver.config
SOURCES/slimserver.init SPECS/ SPECS/slimserver.spec
pacifico at svn.slimdevices.com
pacifico at svn.slimdevices.com
Thu Sep 28 23:40:47 PDT 2006
Author: pacifico
Date: Thu Sep 28 23:40:43 2006
New Revision: 10090
URL: http://svn.slimdevices.com?rev=10090&view=rev
Log:
Supporting files for a Fedora-specific Slimserver RPM.
Added:
trunk/platforms/fedora/
trunk/platforms/fedora/SOURCES/
trunk/platforms/fedora/SOURCES/POE-XS-Queue-Array-0.003.tar.gz (with props)
trunk/platforms/fedora/SOURCES/slimserver-POE-XS-Queue-Array-0.003.patch
trunk/platforms/fedora/SOURCES/slimserver.config
trunk/platforms/fedora/SOURCES/slimserver.init
trunk/platforms/fedora/SPECS/
trunk/platforms/fedora/SPECS/slimserver.spec
Added: trunk/platforms/fedora/SOURCES/POE-XS-Queue-Array-0.003.tar.gz
URL: http://svn.slimdevices.com/trunk/platforms/fedora/SOURCES/POE-XS-Queue-Array-0.003.tar.gz?rev=10090&view=auto
==============================================================================
Binary file - no diff available.
Propchange: trunk/platforms/fedora/SOURCES/POE-XS-Queue-Array-0.003.tar.gz
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: trunk/platforms/fedora/SOURCES/slimserver-POE-XS-Queue-Array-0.003.patch
URL: http://svn.slimdevices.com/trunk/platforms/fedora/SOURCES/slimserver-POE-XS-Queue-Array-0.003.patch?rev=10090&view=auto
==============================================================================
--- trunk/platforms/fedora/SOURCES/slimserver-POE-XS-Queue-Array-0.003.patch (added)
+++ trunk/platforms/fedora/SOURCES/slimserver-POE-XS-Queue-Array-0.003.patch Thu Sep 28 23:40:43 2006
@@ -1,0 +1,765 @@
+diff -Naur POE-XS-Queue-Array-0.003/Makefile.PL slimserver-POE-XS-Queue-Array-0.003/Makefile.PL
+--- POE-XS-Queue-Array-0.003/Makefile.PL 2006-09-13 16:33:12.000000000 -0700
++++ slimserver-POE-XS-Queue-Array-0.003/Makefile.PL 2006-09-28 20:26:38.000000000 -0700
+@@ -5,9 +5,7 @@
+ NAME => 'POE::XS::Queue::Array',
+ VERSION_FROM => 'Array.pm',
+ OBJECT => 'Array.o queue.o alloc.o',
+- PREREQ_PM => {
+- 'POE' => 0.29,
+- },
++ MAN1PODS => {},
+ );
+ if ($ExtUtils::MakeMaker::VERSION > 6.06) {
+ $opts{AUTHOR} = 'Tony Cook <tonyc at cpan.org>';
+diff -Naur POE-XS-Queue-Array-0.003/POE/Queue/Array.pm slimserver-POE-XS-Queue-Array-0.003/POE/Queue/Array.pm
+--- POE-XS-Queue-Array-0.003/POE/Queue/Array.pm 1969-12-31 16:00:00.000000000 -0800
++++ slimserver-POE-XS-Queue-Array-0.003/POE/Queue/Array.pm 2006-08-26 17:48:28.000000000 -0700
+@@ -0,0 +1,561 @@
++# $Id: Array.pm 6689 2006-03-24 03:07:44Z andy $
++# Copyrights and documentation are at the end.
++
++package POE::Queue::Array;
++
++use strict;
++
++use vars qw(@ISA $VERSION);
++ at ISA = qw(POE::Queue);
++$VERSION = do {my at r=(q$Revision: 1.8 $=~/\d+/g);sprintf"%d."."%04d"x$#r, at r};
++
++use Errno qw(ESRCH EPERM);
++use Carp qw(confess);
++
++sub DEBUG () { 0 }
++
++### Helpful offsets.
++
++sub ITEM_PRIORITY () { 0 }
++sub ITEM_ID () { 1 }
++sub ITEM_PAYLOAD () { 2 }
++
++sub import {
++ my $package = caller();
++ no strict 'refs';
++ *{ $package . '::ITEM_PRIORITY' } = \&ITEM_PRIORITY;
++ *{ $package . '::ITEM_ID' } = \&ITEM_ID;
++ *{ $package . '::ITEM_PAYLOAD' } = \&ITEM_PAYLOAD;
++}
++
++# Item IDs are unique across all queues.
++
++my $queue_seq = 0;
++my %item_priority;
++
++# Theoretically, linear array search performance begins to suffer
++# after a queue grows large enough. This is the largest queue size
++# before searches are performed as binary lookups.
++
++sub LARGE_QUEUE_SIZE () { 512 }
++
++### A very simple constructor.
++
++sub new {
++ bless [];
++}
++
++### Add an item to the queue. Returns the new item's ID.
++
++sub enqueue {
++ my ($self, $priority, $payload) = @_;
++
++ # Get the next item ID. This clever loop will hang indefinitely if
++ # you ever run out of integers to store things under. Map the ID to
++ # its due time for search-by-ID functions.
++
++ my $item_id;
++ 1 while exists $item_priority{$item_id = ++$queue_seq};
++ $item_priority{$item_id} = $priority;
++
++ my $item_to_enqueue =
++ [ $priority, # ITEM_PRIORITY
++ $item_id, # ITEM_ID
++ $payload, # ITEM_PAYLOAD
++ ];
++
++ # Special case: No items in the queue. The queue IS the item.
++ unless (@$self) {
++ $self->[0] = $item_to_enqueue;
++ DEBUG and warn $self->_dump_splice(0);
++ return $item_id;
++ }
++
++ # Special case: The new item belongs at the end of the queue.
++ if ($priority >= $self->[-1]->[ITEM_PRIORITY]) {
++ push @$self, $item_to_enqueue;
++ DEBUG and warn $self->_dump_splice(@$self-1);
++ return $item_id;
++ }
++
++ # Special case: The new item belongs at the head of the queue.
++ if ($priority < $self->[0]->[ITEM_PRIORITY]) {
++ unshift @$self, $item_to_enqueue;
++ DEBUG and warn $self->_dump_splice(0);
++ return $item_id;
++ }
++
++ # Special case: There are only two items in the queue. This item
++ # naturally belongs between them.
++ if (@$self == 2) {
++ splice @$self, 1, 0, $item_to_enqueue;
++ DEBUG and warn $self->_dump_splice(1);
++ return $item_id;
++ }
++
++ # A small queue is scanned linearly on the assumptions that (a) the
++ # linear search has less overhead than a binary search for small
++ # queues, and (b) most items will be posted for "now" or some future
++ # time, which tends to place them at the end of the queue.
++
++ if (@$self < LARGE_QUEUE_SIZE) {
++ my $index = @$self;
++ $index--
++ while ( $index and
++ $priority < $self->[$index-1]->[ITEM_PRIORITY]
++ );
++ splice @$self, $index, 0, $item_to_enqueue;
++ DEBUG and warn $self->_dump_splice($index);
++ return $item_id;
++ }
++
++ # And finally, we have this large queue, and the program has already
++ # wasted enough time. Insert the item using a binary seek.
++
++ $self->_insert_item(0, $#$self, $priority, $item_to_enqueue);
++ return $item_id;
++}
++
++### Dequeue the next thing from the queue. Returns an empty list if
++### the queue is empty. There are different flavors of this
++### operation.
++
++sub dequeue_next {
++ my $self = shift;
++
++ return unless @$self;
++ my ($priority, $id, $stuff) = @{shift @$self};
++ delete $item_priority{$id};
++ return ($priority, $id, $stuff);
++}
++
++### Return the next item's priority, undef if the queue is empty.
++
++# Ton Hospel suggests that assignment is relatively slow. He proposed
++# this instead. This is perhaps THE hottest function in POE, and the
++# result is an approximately 4% speed improvement in his benchmarks.
++#
++# return (shift->[0] || return undef)->[ITEM_PRIORITY];
++#
++# We can do similar in a lot of places, but at what cost to
++# maintainability?
++
++sub get_next_priority {
++ my $self = shift;
++ return undef unless @$self;
++ return $self->[0]->[ITEM_PRIORITY];
++}
++
++### Return the number of items currently in the queue.
++
++sub get_item_count {
++ my $self = shift;
++ return scalar @$self;
++}
++
++### Internal method to insert an item in a large queue. Performs a
++### binary seek between two bounds to find the insertion point. We
++### accept the bounds as parameters because the alarm adjustment
++### functions may also use it.
++
++sub _insert_item {
++ my ($self, $lower, $upper, $priority, $item) = @_;
++
++ while (1) {
++ my $midpoint = ($upper + $lower) >> 1;
++
++ # Upper and lower bounds crossed. No match; insert at the lower
++ # bound point.
++ if ($upper < $lower) {
++ splice @$self, $lower, 0, $item;
++ DEBUG and warn $self->_dump_splice($lower);
++ return;
++ }
++
++ # The key at the midpoint is too high. The item just below the
++ # midpoint becomes the new upper bound.
++ if ($priority < $self->[$midpoint]->[ITEM_PRIORITY]) {
++ $upper = $midpoint - 1;
++ next;
++ }
++
++ # The key at the midpoint is too low. The item just above the
++ # midpoint becomes the new lower bound.
++ if ($priority > $self->[$midpoint]->[ITEM_PRIORITY]) {
++ $lower = $midpoint + 1;
++ next;
++ }
++
++ # The key matches the one at the midpoint. Scan towards higher
++ # keys until the midpoint points to an item with a higher key.
++ # Insert the new item before it.
++ $midpoint++
++ while ( ($midpoint < @$self)
++ and ( $priority ==
++ $self->[$midpoint]->[ITEM_PRIORITY]
++ )
++ );
++ splice @$self, $midpoint, 0, $item;
++ DEBUG and warn $self->_dump_splice($midpoint);
++ return;
++ }
++
++ # We should never reach this point.
++ die;
++}
++
++### Internal method to find a queue item by its priority and ID. We
++### assume the priority and ID have been verified already, so the item
++### must exist. Returns the index of the item that matches the
++### priority/ID pair.
++
++sub _find_item {
++ my ($self, $id, $priority) = @_;
++
++ # Small queue. Assume a linear search is faster.
++ if (@$self < LARGE_QUEUE_SIZE) {
++ my $index = @$self;
++ while ($index--) {
++ return $index if $id == $self->[$index]->[ITEM_ID];
++ }
++ die "internal inconsistency: event should have been found";
++ }
++
++ # Use a binary seek on larger queues.
++
++ my $upper = $#$self; # Last index of @$self.
++ my $lower = 0;
++ while (1) {
++ my $midpoint = ($upper + $lower) >> 1;
++
++ # The streams have crossed. That's bad.
++ if ($upper < $lower) {
++ my @priorities = map {$_->[ITEM_PRIORITY]} @$self;
++ warn "internal inconsistency: event should have been found";
++ die "these should be in numeric order: @priorities";
++ }
++
++ # The key at the midpoint is too high. The element just below
++ # the midpoint becomes the new upper bound.
++ if ($priority < $self->[$midpoint]->[ITEM_PRIORITY]) {
++ $upper = $midpoint - 1;
++ next;
++ }
++
++ # The key at the midpoint is too low. The element just above
++ # the midpoint becomes the new lower bound.
++ if ($priority > $self->[$midpoint]->[ITEM_PRIORITY]) {
++ $lower = $midpoint + 1;
++ next;
++ }
++
++ # The key (priority) matches the one at the midpoint. This may be
++ # in the middle of a pocket of events with the same priority, so
++ # we'll have to search back and forth for one with the ID we're
++ # looking for. Unfortunately.
++ my $linear_point = $midpoint;
++ while ( $linear_point >= 0 and
++ $priority == $self->[$linear_point]->[ITEM_PRIORITY]
++ ) {
++ return $linear_point if $self->[$linear_point]->[ITEM_ID] == $id;
++ $linear_point--;
++ }
++ $linear_point = $midpoint;
++ while ( (++$linear_point < @$self) and
++ ($priority == $self->[$linear_point]->[ITEM_PRIORITY])
++ ) {
++ return $linear_point if $self->[$linear_point]->[ITEM_ID] == $id;
++ }
++
++ # If we get this far, then the event hasn't been found.
++ die "internal inconsistency: event should have been found";
++ }
++}
++
++### Remove an item by its ID. Takes a coderef filter, too, for
++### examining the payload to be sure it really wants to leave. Sets
++### $! and returns undef on failure.
++
++sub remove_item {
++ my ($self, $id, $filter) = @_;
++
++ my $priority = $item_priority{$id};
++ unless (defined $priority) {
++ $! = ESRCH;
++ return;
++ }
++
++ # Find that darn item.
++ my $item_index = $self->_find_item($id, $priority);
++
++ # Test the item against the filter.
++ unless ($filter->($self->[$item_index]->[ITEM_PAYLOAD])) {
++ $! = EPERM;
++ return;
++ }
++
++ # Remove the item, and return it.
++ delete $item_priority{$id};
++ return @{splice @$self, $item_index, 1};
++}
++
++### Remove items matching a filter. Regrettably, this must scan the
++### entire queue. An optional count limits the number of items to
++### remove, and it may shorten execution times. Returns a list of
++### references to priority/id/payload lists. This is intended to
++### return all the items matching the filter, and the function's
++### behavior is undefined when $count is less than the number of
++### matching items.
++
++sub remove_items {
++ my ($self, $filter, $count) = @_;
++ $count = @$self unless $count;
++
++ my @items;
++ my $i = @$self;
++ while ($i--) {
++ if ($filter->($self->[$i]->[ITEM_PAYLOAD])) {
++ my $removed_item = splice(@$self, $i, 1);
++ delete $item_priority{$removed_item->[ITEM_ID]};
++ unshift @items, $removed_item;
++ last unless --$count;
++ }
++ }
++
++ return @items;
++}
++
++### Adjust the priority of an item by a relative amount. Adds $delta
++### to the priority of the $id'd object (if it matches $filter), and
++### moves it in the queue.
++
++sub adjust_priority {
++ my ($self, $id, $filter, $delta) = @_;
++
++ my $old_priority = $item_priority{$id};
++ unless (defined $old_priority) {
++ $! = ESRCH;
++ return;
++ }
++
++ # Find that darn item.
++ my $item_index = $self->_find_item($id, $old_priority);
++
++ # Test the item against the filter.
++ unless ($filter->($self->[$item_index]->[ITEM_PAYLOAD])) {
++ $! = EPERM;
++ return;
++ }
++
++ # Nothing to do if the delta is zero. -><- Actually we may need to
++ # ensure that the item is moved to the end of its current priority
++ # bucket, since it should have "moved".
++ return $self->[$item_index]->[ITEM_PRIORITY] unless $delta;
++
++ # Remove the item, and adjust its priority.
++ my $item = splice(@$self, $item_index, 1);
++ my $new_priority = $item->[ITEM_PRIORITY] += $delta;
++ $item_priority{$id} = $new_priority;
++
++ $self->_reinsert_item($new_priority, $delta, $item_index, $item);
++}
++
++### Set the priority to a specific amount. Replaces the item's
++### priority with $new_priority (if it matches $filter), and moves it
++### to the new location in the queue.
++
++sub set_priority {
++ my ($self, $id, $filter, $new_priority) = @_;
++
++ my $old_priority = $item_priority{$id};
++ unless (defined $old_priority) {
++ $! = ESRCH;
++ return;
++ }
++
++ # Nothing to do if the old and new priorities match. -><- Actually
++ # we may need to ensure that the item is moved to the end of its
++ # current priority bucket, since it should have "moved".
++ return $new_priority if $new_priority == $old_priority;
++
++ # Find that darn item.
++ my $item_index = $self->_find_item($id, $old_priority);
++
++ # Test the item against the filter.
++ unless ($filter->($self->[$item_index]->[ITEM_PAYLOAD])) {
++ $! = EPERM;
++ return;
++ }
++
++ # Remove the item, and calculate the delta.
++ my $item = splice(@$self, $item_index, 1);
++ my $delta = $new_priority - $old_priority;
++ $item->[ITEM_PRIORITY] = $item_priority{$id} = $new_priority;
++
++ $self->_reinsert_item($new_priority, $delta, $item_index, $item);
++}
++
++### Sanity-check the results of an item insert. Verify that it
++### belongs where it was put. Only called during debugging.
++
++sub _dump_splice {
++ my ($self, $index) = @_;
++ my @return;
++ my $at = $self->[$index]->[ITEM_PRIORITY];
++ if ($index > 0) {
++ my $before = $self->[$index-1]->[ITEM_PRIORITY];
++ push @return, "before($before)";
++ confess "out of order: $before should be < $at" if $before > $at;
++ }
++ push @return, "at($at)";
++ if ($index < $#$self) {
++ my $after = $self->[$index+1]->[ITEM_PRIORITY];
++ push @return, "after($after)";
++ my @priorities = map {$_->[ITEM_PRIORITY]} @$self;
++ confess "out of order: $at should be < $after (@priorities)"
++ if $at >= $after;
++ }
++ return "@return";
++}
++
++### Reinsert an item into the queue. It has just been removed by
++### adjust_priority() or set_priority() and needs to be replaced.
++### This tries to be clever by not doing more work than necessary.
++
++sub _reinsert_item {
++ my ($self, $new_priority, $delta, $item_index, $item) = @_;
++
++ # Now insert it back. The special cases are duplicates from
++ # enqueue(), but the small and large queue cases avoid unnecessarily
++ # scanning the queue.
++
++ # Special case: No events in the queue. The queue IS the item.
++ unless (@$self) {
++ $self->[0] = $item;
++ DEBUG and warn $self->_dump_splice(0);
++ return $new_priority;
++ }
++
++ # Special case: The item belongs at the end of the queue.
++ if ($new_priority >= $self->[-1]->[ITEM_PRIORITY]) {
++ push @$self, $item;
++ DEBUG and warn $self->_dump_splice(@$self-1);
++ return $new_priority;
++ }
++
++ # Special case: The item belongs at the head of the queue.
++ if ($new_priority < $self->[0]->[ITEM_PRIORITY]) {
++ unshift @$self, $item;
++ DEBUG and warn $self->_dump_splice(0);
++ return $new_priority;
++ }
++
++ # Special case: There are only two items in the queue. This item
++ # naturally belongs between them.
++
++ if (@$self == 2) {
++ splice @$self, 1, 0, $item;
++ DEBUG and warn $self->_dump_splice(1);
++ return $new_priority;
++ }
++
++ # Small queue. Perform a reverse linear search (see enqueue() for
++ # assumptions). We don't consider the entire queue size; only the
++ # number of items between the $item_index and the end of the queue
++ # pointed at by $delta.
++
++ # The item has been moved towards the queue's tail, which is nearby.
++ if ($delta > 0 and (@$self - $item_index) < LARGE_QUEUE_SIZE) {
++ my $index = $item_index;
++ $index++
++ while ( $index < @$self and
++ $new_priority >= $self->[$index]->[ITEM_PRIORITY]
++ );
++ splice @$self, $index, 0, $item;
++ DEBUG and warn $self->_dump_splice($index);
++ return $new_priority;
++ }
++
++ # The item has been moved towards the queue's head, which is nearby.
++ if ($delta < 0 and $item_index < LARGE_QUEUE_SIZE) {
++ my $index = $item_index;
++ $index--
++ while ( $index and
++ $new_priority < $self->[$index-1]->[ITEM_PRIORITY]
++ );
++ splice @$self, $index, 0, $item;
++ DEBUG and warn $self->_dump_splice($index);
++ return $new_priority;
++ }
++
++ # The item has moved towards an end of the queue, but there are a
++ # lot of items into which it may be inserted. We'll binary seek.
++
++ my ($upper, $lower);
++ if ($delta > 0) {
++ $upper = $#$self; # Last index in @$self.
++ $lower = $item_index;
++ }
++ else {
++ $upper = $item_index;
++ $lower = 0;
++ }
++
++ $self->_insert_item($lower, $upper, $new_priority, $item);
++ return $new_priority;
++}
++
++### Peek at items that match a filter. Returns a list of payloads
++### that match the supplied coderef.
++
++sub peek_items {
++ my ($self, $filter, $count) = @_;
++ $count = @$self unless $count;
++
++ my @items;
++ my $i = @$self;
++ while ($i--) {
++ if ($filter->($self->[$i]->[ITEM_PAYLOAD])) {
++ unshift @items, $self->[$i];
++ last unless --$count;
++ }
++ }
++
++ return @items;
++}
++
++1;
++
++__END__
++
++=head1 NAME
++
++POE::Queue::Array - a high-performance array-based priority queue
++
++=head1 SYNOPSIS
++
++See L<POE::Queue>.
++
++=head1 DESCRIPTION
++
++This class is an implementation of the abstract POE::Queue interface.
++It implement the priority queue using Perl arrays, splice, and a
++copious application of cleverness.
++
++Please see the L<POE::Queue> documentation, which explains this one's
++functions, features, and behavior.
++
++=head1 SEE ALSO
++
++L<POE>, L<POE::Queue>
++
++=head1 BUGS
++
++None known.
++
++=head1 AUTHORS & COPYRIGHTS
++
++Please see L<POE> for more information about authors, contributors,
++and POE's licensing.
++
++=cut
+diff -Naur POE-XS-Queue-Array-0.003/POE/Queue.pm slimserver-POE-XS-Queue-Array-0.003/POE/Queue.pm
+--- POE-XS-Queue-Array-0.003/POE/Queue.pm 1969-12-31 16:00:00.000000000 -0800
++++ slimserver-POE-XS-Queue-Array-0.003/POE/Queue.pm 2006-08-26 17:48:28.000000000 -0700
+@@ -0,0 +1,182 @@
++# $Id: Queue.pm 9097 2006-08-22 18:32:53Z dsully $
++
++package POE::Queue;
++
++use vars qw($VERSION);
++$VERSION = do {my($r)=(q$Revision: 1903 $=~/(\d+)/);sprintf"1.%04d",$r};
++
++use Carp qw(croak);
++
++sub new {
++ my $type = shift;
++ croak "$type is a virtual base class and not meant to be used directly";
++}
++
++1;
++
++__END__
++
++=head1 NAME
++
++POE::Queue - documentation for POE's priority queue interface
++
++=head1 SYNOPSIS
++
++ $queue = POE::Queue::Foo->new();
++
++ $payload_id = $queue->enqueue($priority, $payload);
++
++ ($priority, $id, $payload) = $queue->dequeue_next();
++
++ $next_priority = $queue->get_next_priority();
++ $item_count = $queue->get_item_count();
++
++ ($priority, $id, $payload) = $q->remove_item($id, \&filter);
++
++ @items = $q->remove_items(\&filter, $count); # $count is optional
++
++ @items = $q->peek_items(\&filter, $count); # $count is optional
++
++ $new_priority = $q->adjust_priority($id, \&filter, $delta);
++ $new_priority = $q->set_priority($id, \&filter, $priority);
++
++=head1 DESCRIPTION
++
++Priority queues are basically lists of arbitrary things that allow
++items to be inserted arbitrarily but that return them in a particular
++order. The order they are returned in is determined by each item's
++priority.
++
++Priorities may represent anything, as long as they are numbers and
++represent an order from smallest to largest. Items with the same
++priority are entered into a queue in FIFO order. That is, items at
++the same priority are dequeued in the order they achieved a that
++priority.
++
++POE uses priority queues to store and sequence its events. Queue
++items are events, and their priorities are the UNIX epoch times they
++are due.
++
++=over 4
++
++=item $queue = POE::Queue::Foo->new();
++
++Creates a priority queue, returning its reference.
++
++=item $payload_id = $queue->enqueue($priority, $payload);
++
++Enqueue a payload, which can be just about anything, at a specified
++priority level. Returns a unique ID which can be used to manipulate
++the payload or its priority directly.
++
++The payload will be placed into the queue in priority order, from
++lowest to highest. The new payload will follow any others that
++already exist in the queue at the specified priority.
++
++=item ($priority, $id, $payload) = $queue->dequeue_next();
++
++Returns the priority, ID, and payload of the item with the lowest
++priority. If several items exist with the same priority, it returns
++the one that was at that priority the longest.
++
++=item $next_priority = $queue->get_next_priority();
++
++Returns the priority of the item at the head of the queue. This is
++the lowest priority in the queue.
++
++=item $item_count = $queue->get_item_count();
++
++Returns the number of items in the queue.
++
++=item ($priority, $id, $payload) = $q->remove_item($id, \&filter);
++
++Removes an item by its ID, but only if its payload passes the tests in
++a filter function. If a payload is found with the given ID, it is
++passed by reference to the filter function. This filter only allows
++wombats to be removed from a queue.
++
++ sub filter {
++ my $payload = $_[0];
++ return 1 if $payload eq "wombat";
++ return 0;
++ }
++
++Returns undef on failure, and sets $! to the reason why the call
++failed: ESRCH if the $id did not exist in the queue, or EPERM if the
++filter function returned 0.
++
++=item @items = $q->remove_items(\&filter);
++
++=item @items = $q->remove_items(\&filter, $count);
++
++Removes multiple items that match a filter function from a queue.
++Returns them as a list of list references. Each returned item is
++
++ [ $priority, $id, $payload ].
++
++This filter does not allow anything to be removed.
++
++ sub filter { 0 }
++
++The $count is optional. If supplied, remove_items() will remove at
++most $count items. This is useful when you know how many items exist
++in the queue to begin with, as POE sometimes does. If a $count is
++supplied, it should be correct. There is no telling which items are
++removed by remove_items() if $count is too low.
++
++=item @items = $q->peek_items(\&filter);
++
++=item @items = $q->peek_items(\&filter, $count);
++
++Returns a list of items that match a filter function from a queue.
++The items are not removed from the list. Each returned item is a list
++reference
++
++ [ $priority, $id, $payload ]
++
++This filter only lets you move monkeys.
++
++ sub filter {
++ return $_[0]->[TYPE] & IS_A_MONKEY;
++ }
++
++The $count is optional. If supplied, peek_items() will return at most
++$count items. This is useful when you know how many items exist in
++the queue to begin with, as POE sometimes does. If a $count is
++supplied, it should be correct. There is no telling which items are
++returned by peek_items() if $count is too low.
++
++=item $new_priority = $q->adjust_priority($id, \&filter, $delta);
++
++Changes the priority of an item by $delta (which can be negative).
++The item is identified by its $id, but the change will only happen if
++the supplied filter function returns true. Returns $new_priority,
++which is the priority of the item after it has been adjusted.
++
++This filter function allows anything to be removed.
++
++ sub filter { 1 }
++
++=item $new_priority = $q->set_priority($id, \&filter, $priority);
++
++Changes the priority of an item to $priority. The item is identified
++by its $id, but the change will only happen if the supplied filter
++function returns true when applied to the event payload. Returns
++$new_priority, which should match $priority.
++
++=back
++
++=head1 SEE ALSO
++
++L<POE>, L<POE::Queue::Array>
++
++=head1 BUGS
++
++None known.
++
++=head1 AUTHORS & COPYRIGHTS
++
++Please see L<POE> for more information about authors, contributors,
++and POE's licensing.
++
++=cut
Added: trunk/platforms/fedora/SOURCES/slimserver.config
URL: http://svn.slimdevices.com/trunk/platforms/fedora/SOURCES/slimserver.config?rev=10090&view=auto
==============================================================================
--- trunk/platforms/fedora/SOURCES/slimserver.config (added)
+++ trunk/platforms/fedora/SOURCES/slimserver.config Thu Sep 28 23:40:43 2006
@@ -1,0 +1,6 @@
+# Edit this to suit your setup
+SLIMSERVER_USER="slimserver"
+SLIMSERVER_HOME="PREFIX"
+SLIMSERVER_CFG="/etc/slimserver.conf"
+SLIMSERVER_LOG="/tmp/slimserver.log"
+SLIMSERVER_ARGS="--daemon --prefsfile=$SLIMSERVER_CFG --logfile=$SLIMSERVER_LOG"
Added: trunk/platforms/fedora/SOURCES/slimserver.init
URL: http://svn.slimdevices.com/trunk/platforms/fedora/SOURCES/slimserver.init?rev=10090&view=auto
==============================================================================
--- trunk/platforms/fedora/SOURCES/slimserver.init (added)
+++ trunk/platforms/fedora/SOURCES/slimserver.init Thu Sep 28 23:40:43 2006
@@ -1,0 +1,71 @@
+#!/bin/bash
+#
+# slimserver.init This shell script takes care of starting and stopping
+# the Slim streaming MP3 server.
+#
+# chkconfig: 345 80 30
+# description: Slim streaming MP3 server
+# processname: slimserver.pl
+# config: /etc/slimserver.conf
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+# Source networking configuration.
+. /etc/sysconfig/network
+
+if [ -f /etc/sysconfig/slimserver ]; then
+ . /etc/sysconfig/slimserver
+fi
+
+# Check that networking is up.
+[ ${NETWORKING} = "no" ] && exit 0
+
+RETVAL=0
+prog="SLIMSERVER"
+
+SLIMSERVER_BIN="$SLIMSERVER_HOME/slimserver.pl"
+
+[ -x $SLIMSERVER_BIN -a -f $SLIMSERVER_CFG ] || exit 5
+
+start() {
+ echo -n "Starting SlimServer: "
+ daemon --user $SLIMSERVER_USER $SLIMSERVER_BIN $SLIMSERVER_ARGS
+ RETVAL=$?
+ echo
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/slimserver
+ return $RETVAL
+# echo_success
+}
+
+stop() {
+ echo -n "Shutting down SlimServer: "
+ killproc $SLIMSERVER_BIN
+ RETVAL=$?
+ echo
+ [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/slimserver
+ return $RETVAL
+}
+
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart|reload)
+ stop
+ start
+ RETVAL=$?
+ ;;
+ status)
+ status $SLIMSERVER_BIN
+ RETVAL=$?
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart|status}"
+ exit 1
+esac
+exit $RETVAL
Added: trunk/platforms/fedora/SPECS/slimserver.spec
URL: http://svn.slimdevices.com/trunk/platforms/fedora/SPECS/slimserver.spec?rev=10090&view=auto
==============================================================================
--- trunk/platforms/fedora/SPECS/slimserver.spec (added)
+++ trunk/platforms/fedora/SPECS/slimserver.spec Thu Sep 28 23:40:43 2006
@@ -1,0 +1,558 @@
+# Following was set by makerelease.pl for Slimdevices generic Linux RPM
+%define version 6.5.0
+%define POE_XS_Queue_Array_version 0.003
+
+# slimdevices put the binary is /usr/local... Fedora seems to never do that
+# for a package installed with RPM
+%define slimdir %_bindir/slimserver
+
+# Slimdevices generic Linux RPM disables stripping, not sure why
+%define __spec_install_post /usr/lib/rpm/brp-compress
+
+Name: slimserver
+Packager: Slim Devices <support at slimdevices.com>
+Version: %{version}
+# My guess is we'll want to set the 'dist' macro to differentiate the Fedora
+# RPM from the generic linux RPM, but that would seem to mean that somebody
+# out there will be building the RPM on a Fedora box and placing it on the
+# Slim website to support all the different machine architectures Fedora runs
+# on...
+Release: 1%{?dist}
+Summary: This is the Slim Devices server software
+Group: System Environment/Daemons
+License: GPL
+URL: http://www.slimdevices.com/
+Source0: SlimServer_v%{version}.tar.gz
+Source1: slimserver.init
+Source2: slimserver.config
+Source3: POE-XS-Queue-Array-%{POE_XS_Queue_Array_version}.tar.gz
+Patch0: slimserver-POE-XS-Queue-Array-%{POE_XS_Queue_Array_version}.patch
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+# There is no BuildRequires: tag yet. Ideally, the rpmbuild process will
+# include some testing (I haven't yet reviewed how unit-testing works with
+# the slimserver source tree), so there are no BuildRequires.
+
+# slimserver original .spec disabled automatic dependency processing, not
+# commented out yet(?)
+AutoReqProv: no
+
+# The following requires are available in base, core, extras, or RpmForge
+# repositories
+# Really perl 5.8?????
+Requires: perl >= 5.6
+Requires: perl(Digest::SHA1)
+Requires: perl(XML::NamespaceSupport)
+Requires: perl(XML::Parser)
+Requires: perl(XML::SAX.)
+Requires: perl(XML::Simple)
+Requires: perl(SOAP::Lite)
+Requires: perl(Time::HiRes)
+Requires: perl(TimeDate)
+Requires: perl(HTML::Parser.)
+Requires: perl(Compress::Zlib)
+Requires: perl(Template::Toolkit)
+Requires: perl(DBI)
+Requires: perl(DBD::MySQL)
+Requires: perl(Class::DBI)
+Requires: perl(Class::DBI::AbstractSearch)
+Requires: perl(Class::Virtual)
+Requires: perl(Data::Dump)
+Requires: perl(libwww::perl) >= 5.803
+Requires: perl(URI)
+Requires: perl(Audio::Wav)
+Requires: perl(MP3::Info)
+Requires: perl(GD)
+Requires: perl(Number::Compare)
+Requires: perl(Text::Glob)
+Requires: perl(Term::ReadKey)
+Requires: perl(YAML::Syck)
+Requires: flac
+Requires: vorbis-tools
+Requires: sox
+Requires: mysql
+#Requires: lame
+#Requires: shorten
+
+# The following requires are in RPMS built by Al Pacifico, but not yet in any
+# Fedora base, extras, or RpmForge:
+Requires: perl(Algorithm::C3)
+Requires: perl(Class::C3)
+Requires: perl(Class::Data::Accessor)
+Requires: perl(Data::Page)
+Requires: perl(Data::VString)
+Requires: perl(DBIx::Class)
+Requires: perl(DBIx::Migration)
+Requires: perl(File::Which)
+Requires: perl(JSON)
+Requires: perl(Locale::Hebrew)
+Requires: perl(Module::Find)
+Requires: perl(MP4::Info)
+Requires: perl(MPEG::Audio::Frame)
+Requires: perl(Tie::Cache::LRU::Expires)
+Requires: perl(Tie::RegexpHash)
+Requires: perl(URI::Find)
+Requires: perl(XML::XSPF)
+Requires: alac_decoder
+
+%description
+This is the Slim Devices server software.
+Point your web browser to http://localhost:9000/ to configure the server.
+* Open-source server, written in Perl (GPL)
+* Optional HTTP interface - control the player and manage your playlists from
+ a web browser!
+* Internet radio - Shoutcast, Icecast, RadioIO, and Live365
+* Unlimited capacity - it doesn't matter if your mp3 collection is a
+ megabyte or a terabyte. Your files are not stored on the player, so there's
+ no limit to the amount of music you can access, and you don't need to
+ hassle with copying your files onto the player.
+* Easy to use hierarchical browser interface
+* Random mode
+* Supports .pls and .m3u playlist files
+
+
+%prep
+%setup -q -n SlimServer_v%{version}
+tar -xzf %{S:3}
+pushd POE-XS-Queue-Array-%{POE_XS_Queue_Array_version}
+patch -p1 < %{P:0}
+popd
+
+%build
+[ "%buildroot" != "/" ] && rm -rf %buildroot
+# The Bin directory of the source tarball contains compiled (and therefore
+# architecture-dependent) executables. We will use the system's binaries or
+# rebuild these when the RPM is built, so the entire directory is removed.
+[ -d Bin ] && rm -rf Bin
+
+# The CPAN directory of the source contains unmodified perl modules from CPAN,
+# but not neccessarily intact CPAN modules. We've chosen for some of these to
+# use the versions in the tarball rather than system packages, to reduce the
+# disk footprint of the installed package and installed dependencies. The
+# modified CPAN modules for which we will use the source versions are:
+# POE::Queue
+# and we therefore must use the modules that depend on them from the source
+# as well:
+# POE:XS::Queue::Array
+# These will be rebuilt because they contain C Perl extensions that need to
+# compile for the target architecture. Therefore, we will remove the entire
+# CPAN directory and start over. remaining contents of the CPAN directory are removed.
+
+# Remove the perl stuff that system packages provide
+rm -rf CPAN/*
+
+# remake the modified CPAN modules we wish to use
+cp -a POE-XS-Queue-Array-%{POE_XS_Queue_Array_version}/POE CPAN
+mkdir -p CPAN/arch/$(perl -MConfig -e 'print "$Config{version}";')
+pushd POE-XS-Queue-Array-%{POE_XS_Queue_Array_version}
+perl Makefile.PL LIB=%buildroot%_libdir/slimserver/CPAN/arch/$(perl -MConfig -e 'print "$Config{version}";')
+make
+make test
+popd
+
+# The firmware removed per the License.txt
+# Recreate directories though so user can get them from SlimDevices and put
+# them there if the user desires
+rm -rf Firmware
+mkdir Firmware
+rm -rf slimp3
+mkdir slimp3
+
+# The Graphics need Slimdevices permission to distribute
+rm -rf Graphics
+
+
+%install
+rm -rf %buildroot
+mkdir -p %buildroot%_initrddir
+mkdir -p %buildroot%_sysconfdir/sysconfig
+mkdir -p %buildroot%_libdir/slimserver
+mkdir -p %buildroot%_libdir/slimserver/Graphics
+mkdir -p %buildroot%_libdir/slimserver/Firmware
+mkdir -p %buildroot%_sbindir
+mkdir -p %buildroot%{_var}/cache/slimserver/playlists
+
+# copy over stuff that belongs in the RPM
+cp -R Changelog*.html %buildroot%_libdir/slimserver
+cp -R HTML %buildroot%_libdir/slimserver
+cp -R IR %buildroot%_libdir/slimserver
+cp -R lib %buildroot%_libdir/slimserver
+cp -R MySQL %buildroot%_libdir/slimserver
+cp -R Plugins %buildroot%_libdir/slimserver
+cp -R Slim %buildroot%_libdir/slimserver
+cp -R SQL %buildroot%_libdir/slimserver
+cp Installation.txt %buildroot%_libdir/slimserver
+cp License.txt %buildroot%_libdir/slimserver
+cp revision.txt %buildroot%_libdir/slimserver
+cp strings.txt %buildroot%_libdir/slimserver
+cp types.conf %buildroot%_libdir/slimserver
+
+# install our newly built CPAN stuff
+cp -a POE-XS-Queue-Array-%{POE_XS_Queue_Array_version}/POE %buildroot%_libdir/slimserver/CPAN
+pushd POE-XS-Queue-Array-%{POE_XS_Queue_Array_version}
+make install
+popd
+# get rid of unneeded documentation and metadata/markers
+find %buildroot%_libdir/slimserver/CPAN -type f -name .packlist -exec rm -f {} ';'
+find %buildroot%_libdir/slimserver/CPAN -type f -name perllocal.pod -exec rm -f {} ';'
+find %buildroot%_libdir/slimserver/CPAN -type f -name '*.bs' -a -size 0 -exec rm -f {} ';'
+find %buildroot%_libdir/slimserver/CPAN -type d -depth -exec rmdir {} 2>/dev/null ';'
+
+# put slimserver.pl in /usr/sbin
+mv slimserver.pl %buildroot%_sbindir
+chmod +x %buildroot%_sbindir/slimserver.pl
+# put scanner.pl in /usr/sbin
+mv scanner.pl %buildroot%_sbindir
+chmod +x %buildroot%_sbindir/scanner.pl
+
+# install and modify configuration files
+install -D -m755 %SOURCE1 %buildroot%_initrddir/slimserver
+install -D -m644 %SOURCE2 %buildroot%_sysconfdir/sysconfig/slimserver
+touch %buildroot%_sysconfdir/slimserver.conf
+echo "cachedir = %{_var}/cache/slimserver" > %buildroot%_sysconfdir/slimserver.conf
+echo "playlistdir = %{_var}/cache/slimserver/playlists" >> %buildroot%_sysconfdir/slimserver.conf
+
+# Michael Peters' spec makes a /var and /var/playlists
+# If uncommenting, don't forget sed -e 's/%%/%/'
+#mkdir -p %%buildroot%%{cachedir}
+#mkdir %%buildroot%%{cachedir}/playlists
+#echo "cachedir = %%{cachedir}" > %%buildroot%%{slimconf}
+#echo "playlistdir = %%{cachedir}/playlists" >> %%buildroot%%{slimconf}
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+# The following lines are from the Slim Devices generic Linux RPM.
+# They're included here, but commented out, for future assessment
+# The practice of removing the build directory doesn't seem to be
+# part of the Fedora skeleton .spec files. Remember the escaping
+# of '%' with '%%' if uncommenting
+
+#[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -r $RPM_BUILD_ROOT
+#cd ..
+#[ "$RPM_BUILD_DIR" != "/" ] && [ -d $RPM_BUILD_DIR/SlimServer_v%%{version} ] \
+#&& rm -r $RPM_BUILD_DIR/SlimServer_v%%{version}
+
+###############################################################################
+# The following sections copied verbatim from the Slimdevices generic Linux RPM
+# and will need tweaking, including for SELinux
+###############################################################################
+
+%pre
+export SLIMSERVER_USER=slimserver
+
+# Someone might have changed the default. Lets make sure we use it.
+if [ -f /etc/sysconfig/slimserver ]; then
+ . /etc/sysconfig/slimserver;
+fi
+
+# Add the $SLIMSERVER_USER if there is not one
+if [ `grep -c "^$SLIMSERVER_USER:" /etc/passwd` -eq 0 ]; then
+ /usr/sbin/groupadd $SLIMSERVER_USER
+ /usr/sbin/useradd -c "SlimServer" -g $SLIMSERVER_USER -m -d %{slimdir} -s /sbin/nologin $SLIMSERVER_USER
+fi
+
+# Remove the old Favorites plugin
+rm -rf /usr/local/slimserver/Plugins/Favorites
+
+%post
+export SLIMSERVER_USER=slimserver
+
+# Someone might have changed the default. Lets make sure we use it.
+if [ -f /etc/sysconfig/slimserver ]; then
+ . /etc/sysconfig/slimserver;
+fi
+
+# Make sure we have the correct SLIMSERVER_HOME in /etc/sysconfig/slimserver
+# Convert / to \/ for the sed substitution
+if [ `grep -c PREFIX /etc/sysconfig/slimserver` -gt 0 ]; then
+ DEST_FILE=/etc/sysconfig/slimserver
+ SLIMSERVER_PREFIX=`echo %{slimdir} | sed 's/\//\\\\\//g'`
+ sed "s/PREFIX/$SLIMSERVER_PREFIX/" $DEST_FILE > /tmp/slimserver.$$
+ if [ -s /tmp/slimserver.$$ ]; then
+ cp /tmp/slimserver.$$ $DEST_FILE
+ rm /tmp/slimserver.$$
+ fi
+fi
+
+if [ ! -s /etc/slimserver.conf ] && [ -e /etc/slimp3.pref ]; then
+ cp /etc/slimp3.pref /etc/slimserver.conf
+fi
+
+# Now that everything is installed, make sure the permissions are right
+chown -R $SLIMSERVER_USER.$SLIMSERVER_USER %{slimdir}
+
+# Allow the RPM to be installed on SuSE
+if [ -x /sbin/chkconfig ]; then
+ /sbin/chkconfig --add slimserver
+fi
+
+if [ -x /sbin/service ]; then
+
+ /sbin/service slimserver restart >/dev/null 2>&1 || :
+
+ PORT=`awk '/^httpport/ {print $2}' /etc/slimserver.conf`
+fi
+
+# Set a default port if one doesn't exist.
+if [ ! -z "$PORT" -o ! -s /etc/slimserver.conf ]; then
+ PORT=9000
+fi
+
+HOSTNAME=`uname -n`
+
+echo "Point your web browser to http://$HOSTNAME:$PORT/ to configure your server."
+
+if [ -e /tmp/slimserver.log ]; then
+ rm /tmp/slimserver.log
+fi
+
+%preun
+# Only if we are not upgrading...
+if [ "$1" -eq "0" ] ; then
+
+ if [ -x /sbin/service ]; then
+ /sbin/service slimserver stop >/dev/null 2>&1 || :
+ fi
+
+ if [ -x /sbin/chkconfig ]; then
+
+ /sbin/chkconfig --del slimserver
+ fi
+fi
+
+%postun
+# Only if we are upgrading...
+if [ "$1" -ge "1" ]; then
+
+ if [ -x /sbin/service ]; then
+ /sbin/service slimserver restart >/dev/null 2>&1 || :
+ fi
+
+else
+ SLIMSERVER_USER="slimserver"
+ SLIMSERVER_CFG="/etc/slimserver.conf"
+
+ if [ -f /etc/sysconfig/slimserver ]; then
+ . /etc/sysconfig/slimserver;
+ fi
+
+ userdel $SLIMSERVER_USER 2>/dev/null || :
+
+ # assume the group name is the same as the user, it's not in sysconfig
+ groupdel $SLIMSERVER_USER 2>/dev/null || :
+fi
+
+###############################################################################
+# End of verbatim from the Slimdevices generic Linux RPM
+###############################################################################
+
+
+%files
+%defattr(-,root,root)
+
+# library files
+%_libdir/slimserver/Changelog*.html
+%_libdir/slimserver/CPAN
+%_libdir/slimserver/HTML
+%_libdir/slimserver/IR
+%doc %_libdir/slimserver/Installation.txt
+%_libdir/slimserver/lib/Audio
+%_libdir/slimserver/lib/Cache
+%_libdir/slimserver/lib/MP3
+%_libdir/slimserver/lib/Net
+%_libdir/slimserver/lib/Ogg
+%doc %_libdir/slimserver/lib/README
+%_libdir/slimserver/lib/URI
+%_libdir/slimserver/lib/XML
+%doc %_libdir/slimserver/License.txt
+%_libdir/slimserver/MySQL
+%_libdir/slimserver/Plugins
+%doc %_libdir/slimserver/revision.txt
+%_libdir/slimserver/Slim
+%_libdir/slimserver/SQL
+%_libdir/slimserver/strings.txt
+%_libdir/slimserver/types.conf
+
+# empty directories
+%dir %_libdir/slimserver/Graphics
+%dir %_libdir/slimserver/Firmware
+%dir %{_var}/cache/slimserver
+
+# executables
+%_sbindir/slimserver.pl
+%_sbindir/scanner.pl
+
+# configuration files and init scripts
+%attr(-, slimserver, slimserver) %config(noreplace) %_sysconfdir/slimserver.conf
+%_initrddir/slimserver
+%config(noreplace) %_sysconfdir/sysconfig/slimserver
+
+
+%changelog
+* Thu Jul 6 2006 adpacifico at users.sourceforge.net - 6.5.0-1
+- began modifying RPM for Fedora Core 5
+- started with skeleton file generated by fedora-newrpmspec
+- then with generic Linux RPM from SlimDevices
+- then some of the changes from Michael Peters' spec file
+
+* Sat Apr 23 2005 Michael A. Peters <mpeters at mac.com>
+- changed perl-Time-HiRes requires to 1.65 (from 1.66)
+
+* Fri Apr 15 2005 Michael A. Peters <mpeters at mac.com>
+- clean up init script to fedora rpmdevtools template
+- do not actually start the service on install, just
+- chkconfig --add the service
+- start cleanup of specfile to match (as much as possible)
+- the fedora spectemplate-minimal.spec file
+-
+- update version to 6.0.2 maintenance branch
+- updated convert.conf - upstream started using sox to decode
+- ogg files - which is fine for wav and flac transcode, but
+- not fine for mp3 transcode since Fedora sox is not linked
+- against lame for mp3 encoding.
+
+* Tue Apr 11 2005 dsully
+- Make the RPM more SuSE friendly.
+- Fix an error with printing the port number on install/upgrade. (bug 974)
+
+* Fri Apr 04 2005 Michael A. Peters <mpeters at mac.com>
+- Requires File::BOM
+
+* Fri Apr 01 2005 Michael A. Peters <mpeters at mac.com>
+- updated to release version nightly build
+
+* Fri Mar 25 2005 Michael A. Peters <mpeters at mac.com>
+- put confif files into /etc/slimserver
+- patch convert.conf to be properly set up for linux - at least
+- for mp3 capabilities
+
+* Thu Mar 24 2005 Michael A. Peters <mpeters at mac.com>
+- updated the convert.conf patch so apes would transcode to lame
+- better (removed -x switch from lame)
+
+* Tue Mar 22 2005 Michael A. Peters <mpeters at mac.com>
+- do NOT remove iTunes plugin.
+- create a directory in /var for slimserver home and cache
+- use getent to check for existance of slimserver user
+- put cachedir in /var/cache and make that slimserver home
+- create a default playlist dir that slimserver can write to.
+- create the /etc/sysconfig file in the install macro, using the
+- macros we defined in the spec file.
+
+* Mon Mar 21 2005 Michael A. Peters <mpeters at mac.com>
+- Change default in convert.conf to use faad for aac
+- Remove iTunes plugin until iTunes for Linux is released
+
+* Sun Mar 20 2005 Michael A. Peters <mpeters at mac.com>
+- removed dependencies on specific version of perl modules that
+- were installed in CPAN/arch
+- with binaries no longer needed in slimserver home, moved
+- prefix to /usr/share
+
+* Fri Mar 18 2005 Michael A. Peters <mpeters at mac.com>
+- cleaned up some harmless errors in scriplets.
+- Use /usr/sbin/adduser with the -r switch instead of
+- /usr/sbin/useradd - thus creating a user w/ UID belows
+- common users. It will be a UID > 99 still, so no conflict
+- with system UID's.
+- define slimuser macro at top of file, use throughout.
+
+* Sun Mar 13 2005 Michael A. Peters <mpeters at mac.com>
+- prep work and cleanup began for extras or livna.
+- not a public release.
+- changed prefix to /var
+- added comment support for nightly vs release
+- commented out message to console on install
+- removing firmware, removing Bin
+
+* Thu Nov 6 2003 dean
+- Renaming slimd to slimserver
+
+* Mon Sep 15 2003 kdf
+- Patch submitted by many for custom port message on install
+- remove /tmp/slimd.log if it exists, avoid server crash if its locked.
+
+* Fri Aug 1 2003 kdf
+- Change user to slim, install to /usr/local/slimd for consistency
+- Copy old slimp3.pref if it exists and slimd.conf is zero length (new)
+
+* Thu May 22 2003 dean
+Victor Brilon submitted a patch:
+- Got rid of the -r param. On RedHat this creates a system account w/a
+UID lower than value of UID_MIN. I don't see why we need to do this as
+the slimp3 user is not a priviledged user. Also, with this param, the -d
+flag will never create a home dir for security reasons.
+
+- Got rid of the -s flag as this will force the system to use the
+default shell for the user.
+
+- Also with useradd, if a passwd is not specified (which is exactly what
+we're doing), the default action is to lock the account so you can't
+login into it. This should work ok as we can still su into it to start
+the slimp3 player.
+
+- The slimp3 directory hierarchy should be owned by the slimp3 user not
+by root. Changed that as well. This should prevent some of the problems
+people were having with saving playlists and such.
+
+* Mon Feb 10 2003 DV <datavortex at datavortex.net>
+- Remove tag database on full uninstall. db.pag gets big.
+- Fixed postinstall substitution
+- Remove nondefault user and group
+
+* Sun Feb 09 2003 Mike Arnold <mike at razorsedge.org>
+- Cleaned up DV's changes to the preinstall script.
+- Added %config(noreplace) to /etc/sysconfig/slimp3.
+- Fixed two changes in the postinstall script that broke relocation.
+
+* Thu Oct 24 2002 DV <datavortex at datavortex.net>
+- changed account to a system account and shell to nologin.
+- don't add user with default name if the admin changed it.
+
+* Tue Oct 22 2002 Mike Arnold <mike at razorsedge.org>
+- Fixed a problem with doing a package "upgrade" and losing the
+ passwd entry for the slimp3 user in %preun and %postun.
+- Made sure an existing /etc/slimp3.pref was not replaced by a newer package.
+- Got rid of all the commented, tarball-removal stuff in %pre.
+- Beautified the spec file for final release.
+
+* Sun Oct 20 2002 Dean Blackketter <dean at slimdevices.com>
+- Mike Arnold told me to take out the postun directive that removes the
+ passwd entry to fix upgrades.
+
+* Tue Oct 01 2002 Mike Arnold <mike at razorsedge.org>
+- Made the slimp3 user's $HOME be in the correct place even with
+ a relocatable package.
+
+* Wed Sep 11 2002 Dean Blackketter <dean at slimdevices.com>
+- Made the default install back to /usr/local/bin instead of /opt
+
+* Sun Sep 08 2002 Mike Arnold <mike at razorsedge.org>
+- Made the RPM relocatable for those who do not want to use /opt
+ including a %post hack to mod /etc/sysconfig/slimp3
+- Made sure slimp3.pl was chmod +x, even if the tarball was wrong
+- Cleaned up the BUILD_DIR after the rpms are built
+- Changed localhost to "uname -n" in post-install commandline echo
+- Disabled the deletion of old (pre-RPM) files as the procs may
+ still be running. Should we just assume no preexisting installs?
+- Pulled _topdir out and let the build system or user specify it.
+
+* Wed Sep 04 2002 Dean Blackketter <dean at slimdevices.com>
+- Disabling the shutdown of old (pre-RPM) processes.
+- Added AutoReqProv: no, because all we really need is perl
+- Disabled the documentation install until we have some better docs.
+ (until then, use the built-in documentation, available via the web interface)
+
+* Mon Sep 02 2002 Mike Arnold <mike at razorsedge.org>
+- Changed the slimp3dir to /opt as this is where "packages" should go
+- Added an external startup config file in /etc/sysconfig
+- Added documentation to the RPM
+- Kept %postun from deleteing the %config file as rpm takes care of this
+- Changed software group to System Environment/Daemons
+- Added a nice description
+- Added %clean
+
+* Wed Aug 28 2002 Victor Brilon <victor at vail.net>
+- First release
More information about the checkins
mailing list