OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Christoph Schug
  Root:   /v/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   26-Oct-2007 22:11:05
  Branch: HEAD                             Handle: 2007102621110301

  Modified files:
    openpkg-src/op          op.conf op.spec

  Log:
    Permission fixes; Provide a very basic example without the portability
    issues; Minor cleanups; Loggiing via OSSP fsl is a todo, currently
    logging is still passed to the syslogd of the underlying OS

  Summary:
    Revision    Changes     Path
    1.2         +1  -4      openpkg-src/op/op.conf
    1.3         +26 -17     openpkg-src/op/op.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/op/op.conf
  ============================================================================
  $ cvs diff -u -r1.1 -r1.2 op.conf
  --- openpkg-src/op/op.conf    25 Oct 2007 17:04:04 -0000      1.1
  +++ openpkg-src/op/op.conf    26 Oct 2007 20:11:03 -0000      1.2
  @@ -9,9 +9,6 @@
       password
       environment
   
  -shutdown @l_shutdown@;
  -    users=PRIVILEGED
  -
  -reboot @l_reboot@;
  +id @l_id@;
       users=PRIVILEGED
   
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/op/op.spec
  ============================================================================
  $ cvs diff -u -r1.2 -r1.3 op.spec
  --- openpkg-src/op/op.spec    25 Oct 2007 18:45:06 -0000      1.2
  +++ openpkg-src/op/op.spec    26 Oct 2007 20:11:04 -0000      1.3
  @@ -33,7 +33,7 @@
   Group:        ShellUtils
   License:      MIT-style
   Version:      1.32
  -Release:      20071025
  +Release:      20071026
   
   #   list of sources
   Source0:      http://swapoff.org/files/op/op-%{version}.tar.gz
  @@ -62,9 +62,17 @@
       }
   
   %prep
  +    #   unpack distribution
       %setup -q
   
  +    #   fix paths on man page
  +    %{l_shtool} subst \
  +        -e 's;/etc/op.conf;%{l_prefix}/etc/op/op.conf;g' \
  +        -e 's;/etc/op.d;%{l_prefix}/etc/op/op.d;g' \
  +        op.1
  +
   %build
  +    #   configure package
       CC="%{l_cc}" \
       CFLAGS="%{l_cflags -O}" \
       CPPFLAGS="%{l_cppflags}" \
  @@ -72,36 +80,37 @@
       ./configure \
           --prefix=%{l_prefix} \
           --sysconfdir=%{l_prefix}/etc/op
  +
  +    #   build package
       %{l_make} %{l_mflags -O}
   
   %install
       rm -rf $RPM_BUILD_ROOT
  +
  +    #   install package
       %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  -    strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  +
  +    #   install default configuration with examples
       l_su="`%{l_shtool} path su`"
  -    l_shutdown="`%{l_shtool} path shutdown`"
  -    l_reboot="`%{l_shtool} path shutdown`"
  -    case "%{l_platform -t}" in
  -        *-sunos* )
  -            l_shutdown="$l_shutdown -i0 -g0 -y"
  -            l_reboot="$l_reboot -i6 -g0 -y"
  -            ;;
  -        * )
  -            l_shutdown="$l_shutdown -r now"
  -            l_reboot="$l_reboot -r now"
  -            ;;
  -    esac
  +    l_id="`%{l_shtool} path id`"
       %{l_shtool} mkdir -f -p -m 755 \
           $RPM_BUILD_ROOT%{l_prefix}/etc/op/op.d
       %{l_shtool} install -c -m 644 \
           -e "s;@l_su@;$l_su;g" \
  -        -e "s;@l_shutdown@;$l_shutdown;g" \
  -        -e "s;@l_reboot@;$l_reboot;g" \
  +        -e "s;@l_id@;$l_id;g" \
           %{SOURCE op.conf} \
           $RPM_BUILD_ROOT%{l_prefix}/etc/op/
  +
  +    #   strip installation
  +    strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  +
  +    #   determine installation files
       %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
           %{l_files_std} \
  -        '%config %{l_prefix}/etc/op/op.conf'
  +        '%attr(4111,%{l_susr},%{l_sgrp})         %{l_prefix}/bin/op' \
  +        '%dir    %attr(0700,%{l_susr},%{l_sgrp}) %{l_prefix}/etc/op' \
  +        '%dir    %attr(0700,%{l_susr},%{l_sgrp}) %{l_prefix}/etc/op/op.d' \
  +        '%config %attr(0600,%{l_susr},%{l_sgrp}) %{l_prefix}/etc/op/op.conf'
   
   %files -f files
   
  @@ .
______________________________________________________________________
OpenPKG                                             http://openpkg.org
CVS Repository Commit List                     [email protected]

Reply via email to