Explorar o código

Finish all non-adminserver package components

Michael Schloh von Bennewitz %!s(int64=22) %!d(string=hai) anos
pai
achega
1dd6b2a502
Modificáronse 2 ficheiros con 117 adicións e 25 borrados
  1. 92 0
      dss/dss.patch
  2. 25 25
      dss/dss.spec

+ 92 - 0
dss/dss.patch

@@ -28,3 +28,95 @@ diff -Naur DSS-4_1_3.src.orig/WebAdmin/WebAdminHtml/playlist-lib.pl DSS-4_1_3.sr
              $wt = 10;
          }
          $htmlstr .= &playlistlib::EmitPLDetailTableRowHTML($movie, $wt, $i, $label);
+diff -Naur DSS-4_1_3.src.orig/qtaccess DSS-4_1_3.src/qtaccess
+--- DSS-4_1_3.src.orig/qtaccess	Sat Feb 22 00:42:15 2003
++++ DSS-4_1_3.src/qtaccess	Mon Jun  2 17:28:44 2003
+@@ -1,9 +1,9 @@
+ # qtaccess
+-# A sample access file for streaming 
+-# server authorization 
++# A sample access file for streaming
++# server authorization
+ # ----------------------------------
+-# Note: 
+-# For each keyword, the first sentence in the comment 
++# Note:
++# For each keyword, the first sentence in the comment
+ # explains the keyword, and the usage: line explains
+ # how to use it. Anything not in angle brackets is a keyword
+ # and keywords are case-sensitive.
+@@ -12,31 +12,29 @@
+ # AuthScheme: The authentication scheme that will be used
+ # usage: AuthScheme <scheme>
+ # where scheme is either "basic" or "digest"
+-AuthScheme basic
++AuthScheme digest
+ 
+ # AuthName: The authentication realm that will be
+ # presented to the client (for Basic Authentication only)
+ # usage: AuthName <realm>
+ # where realm can be a single word or a quoted multi-word string
+-AuthName "streaming server realm"
++AuthName "Streaming Server"
+ 
+ # AuthUserFile: The filename that contains the list of users
+-# for this access file 
++# for this access file
+ # If not given, the default filename is /Library/QuickTimeStreaming/Config/qtusers for MacOSX
+-# If not given, the default filename is /etc/streaming/qtusers for POSIX
++# If not given, the default filename is @l_prefix@/etc/dss/qtusers for POSIX
+ # usage: AuthUserFile <user filename>
+-#AuthUserFile /etc/streaming/qtusers
+-AuthUserFile /Library/QuickTimeStreaming/Config/qtusers
++AuthUserFile @l_prefix@/etc/dss/qtusers
+ 
+-# AuthGroupFile: The filename that contains the groups and the 
++# AuthGroupFile: The filename that contains the groups and the
+ # users that belong to each group
+ # If not given, the default filename is /Library/QuickTimeStreaming/Config/qtgroups for MacOSX
+-# If not given, the default filename is /etc/streaming/qtgroups for POSIX
++# If not given, the default filename is @l_prefix@/etc/dss/qtgroups for POSIX
+ # usage: AuthGroupFile  <group filename>
+-#AuthGroupFile  /etc/streaming/qtgroups
+-AuthGroupFile /Library/QuickTimeStreaming/Config/qtgroups
++AuthGroupFile  @l_prefix@/etc/dss/qtgroups
+ 
+-# require user: The names next to this specify which user 
++# require user: The names next to this specify which user
+ # is allowed to access the media in this folder
+ # below are two special cases:
+ # require any-user         =>      implies any user is allowed without
+@@ -44,24 +42,24 @@
+ # require valid-user       =>      implies any user that is
+ #                                               authenticated is allowed access
+ # usage: require user <username1> <username2> ...
+-require user johndoe
++require any-user
+ 
+ # require group: The names of the groups that are allowed
+ # access to the media in this folder
+ # usage: require group <groupname1> <groupname2> ...
+-require group movie-watchers
+ 
+ # <Limit READ/WRITE>: This directive is to specify access control
+ # for READ and/or WRITE privileges. If not present, all access control
+ # keywords apply to READ privileges only.
+-# <Limit WRITE> is used for WRITE privileges, and <Limit READ WRITE> for 
++# <Limit WRITE> is used for WRITE privileges, and <Limit READ WRITE> for
+ # both. <Limit READ> can be omitted as the access keywords outside the
+ # Limit directive
+ # usage: <Limit [READ|WRITE] ..> ... </Limit>
+-<Limit WRITE>
+- AuthName "streaming server broadcaster realm"
+- AuthUserFile /Library/QuickTimeStreaming/Config/qtbroadcastusers
+- AuthGroupFile /Library/QuickTimeStreaming/Config/qtbroadcastgroups
+- require group broadcaster
+-</Limit>
++
++#<Limit WRITE>
++# AuthName "Streaming Server Broadcaster"
++# AuthUserFile @l_prefix@/etc/dss/qtbroadcastusers
++# AuthGroupFile @l_prefix@/etc/dss/qtbroadcastgroups
++# require group broadcaster
++#</Limit>
+ 

+ 25 - 25
dss/dss.spec

@@ -37,12 +37,11 @@ Distribution: OpenPKG [EVAL]
 Group:        Video
 License:      APSL
 Version:      %{V_opkg}
-Release:      20030530
+Release:      20030602
 
 #   list of sources
 Source0:      http://www.opensource.apple.com/projects/streaming/source/DSS-%{V_dss}.src.tar.gz
 Source1:      rc.dss
-Source2:      qtaccess
 Patch0:       dss.patch
 %NoSource     0
 
@@ -81,13 +80,23 @@ AutoReqProv:  no
         -e 's;/etc/streaming/qtusers;%{l_prefix}/etc/dss/qtusers;' \
         qtpasswd.tproj/QTSSPasswd.cpp
     %{l_shtool} subst \
-        -e 's;/Library/QuickTimeStreaming/Logs;%{l_prefix}/var/dss/logs;' \
-        -e 's;/Library/QuickTimeStreaming/Modules;%{l_prefix}/share/dss/modules;' \
-        -e 's;/Library/QuickTimeStreaming/Movies;%{l_prefix}/share/dss/movies;' \
-        -e 's;/Library/QuickTimeStreaming/Config/relayconfig.xml;%{l_prefix}/etc/dss/relayconfig.xml;' \
-        -e 's;/Library/QuickTimeStreaming/Config/qtgroups;%{l_prefix}/etc/dss/qtgroups.xml;' \
-        -e 's;<PREF NAME="bind_ip_addr" >0;<PREF NAME="bind_ip_addr" >127.0.0.1;' \
-       streamingserver.xml
+        -e 's;[ \t]$;;g' \
+        -e 's;\t;    ;g' \
+        qtusers \
+        qtgroups \
+        streamingserver.xml \
+        relayconfig.xml-Sample
+    %{l_shtool} subst \
+        -e 's;/Library/QuickTimeStreaming/Logs;%{l_prefix}/var/dss/logs;g' \
+        -e 's;/Library/QuickTimeStreaming/Modules;%{l_prefix}/share/dss/modules;g' \
+        -e 's;/Library/QuickTimeStreaming/Movies;%{l_prefix}/share/dss/movies;g' \
+        -e 's;/Library/QuickTimeStreaming/Config/relayconfig.xml;%{l_prefix}/etc/dss/relayconfig.xml;g' \
+        -e 's;/Library/QuickTimeStreaming/Config/qtgroups;%{l_prefix}/etc/dss/qtgroups;g' \
+        -e 's;/Library/QuickTimeStreaming/Config/qtusers;%{l_prefix}/etc/dss/qtusers;g' \
+        streamingserver.xml
+    %{l_shtool} subst \
+        -e 's;@l_prefix@;%{l_prefix};g' \
+        qtaccess
 
 %build
     #   standard OpenPKG build variables
@@ -176,6 +185,7 @@ AutoReqProv:  no
         $RPM_BUILD_ROOT%{l_prefix}/etc/dss \
         $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
         $RPM_BUILD_ROOT%{l_prefix}/share/dss/movies \
+        $RPM_BUILD_ROOT%{l_prefix}/share/dss/modules \
         $RPM_BUILD_ROOT%{l_prefix}/var/dss/logs
 
     #   install the server and administrative binaries
@@ -200,8 +210,10 @@ AutoReqProv:  no
         streamingserver.xml \
         relayconfig.xml-Sample \
         $RPM_BUILD_ROOT%{l_prefix}/etc/dss/
-    cp -fp $RPM_BUILD_ROOT%{l_prefix}/etc/dss/streamingserver.xml \
-           $RPM_BUILD_ROOT%{l_prefix}/etc/dss/streamingserver.xml-sample
+    (
+        cd $RPM_BUILD_ROOT%{l_prefix}/etc/dss/
+        mv -f relayconfig.xml-Sample relayconfig.xml
+    )
 
     #   install run commands
     %{l_shtool} install -c -m 755 \
@@ -212,32 +224,20 @@ AutoReqProv:  no
 
     #   install sample movies, audio files, and access file
     %{l_shtool} install -c -m 644 \
+        qtaccess \
         sample.mp3 \
         sample_100kbit.mov \
         sample_300kbit.mov \
         sample_100kbit.mp4 \
         sample_300kbit.mp4 \
-        %{SOURCE qtaccess} \
         $RPM_BUILD_ROOT%{l_prefix}/share/dss/movies/
 
     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
         %{l_files_std} \
-        '%config %{l_prefix}/etc/dss/*' \
-        '%config %attr(600,%{l_susr},%{l_mgrp}) %{l_prefix}/etc/dss/qtusers' \
-        '%config %attr(600,%{l_susr},%{l_mgrp}) %{l_prefix}/etc/dss/qtgroups' \
-        '%config %attr(600,%{l_susr},%{l_mgrp}) %{l_prefix}/etc/dss/streamingserver.xml' \
-        '%config %attr(600,%{l_susr},%{l_mgrp}) %{l_prefix}/etc/dss/relayconfig.xml-Sample'
+        '%config %{l_prefix}/etc/dss/*'
 
 %files -f files
 
 %clean
     rm -rf $RPM_BUILD_ROOT
 
-%post
-    #   write a default admin username and password to qtusers
-        username='ghandi'; password='guessit'
-        $RPM_INSTALL_PREFIX/bin/qtpasswd -p $password $username
-
-    #   add the new admin username to {l_prefix}/etc/dss/qtgroupsusers
-        echo 'admin: $username' >$RPM_INSTALL_PREFIX/etc/dss/qtgroups
-