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

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   06-May-2004 18:06:36
  Branch: HEAD                             Handle: 2004050617063500

  Modified files:
    openpkg-src/openssh     openssh.patch.scpbindir openssh.spec

  Log:
    cleanup patch and avoid having to pass a string over the command line
    (which is nasty because of escaping)

  Summary:
    Revision    Changes     Path
    1.2         +14 -5      openpkg-src/openssh/openssh.patch.scpbindir
    1.131       +2  -3      openpkg-src/openssh/openssh.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/openssh/openssh.patch.scpbindir
  ============================================================================
  $ cvs diff -u -r1.1 -r1.2 openssh.patch.scpbindir
  --- openpkg-src/openssh/openssh.patch.scpbindir       5 May 2004 08:24:16 -0000      
 1.1
  +++ openpkg-src/openssh/openssh.patch.scpbindir       6 May 2004 16:06:35 -0000      
 1.2
  @@ -1,3 +1,11 @@
  +This patch provides a workaround for the nasty issue that scp(1) is
  +found on the server side only if it is in $PATH (due to a ~/.bashrc,
  +/etc/profile, etc). The default $PATH is out of scope for OpenPKG and is
  +different across platforms anyway. Nevertheless we want to ensure that
  +with OpenPKG on the server side, scp(1) is always usable (on the client
  +side) without having to adjust the system and/or user environment (on
  +the server side).
  +
   Index: session.c
   --- session.c.orig   2004-04-16 14:47:55.000000000 +0200
   +++ session.c        2004-05-05 10:10:08.000000000 +0200
  @@ -22,29 +30,30 @@
    {
        int fdout, ptyfd, ttyfd, ptymaster;
        pid_t pid;
  -@@ -650,8 +650,25 @@
  +@@ -650,8 +650,26 @@
     * to be forced, execute that instead.
     */
    void
   -do_exec(Session *s, const char *command)
   +do_exec(Session *s, char *command)
    {
  -+#ifdef OPENPKG_SCP_BINDIR
  ++#ifndef SCPBINDIR
  ++#define SCPBINDIR "@l_prefix@/bin"
  ++#endif
   +    if (   command != NULL
   +            && strlen(command) >= 3
   +            && strncmp(command, "scp", 3) == 0
   +            && (command[3] == ' ' || command[3] == '\0')) {
   +            size_t l, k;
   +            char *cp;
  -+            l = strlen(OPENPKG_SCP_BINDIR);
  ++            l = strlen(SCPBINDIR);
   +            k = strlen(command);
   +            cp = xmalloc(l+1+k+1);
  -+            snprintf(cp, l+1+k+1, "%s/%s", OPENPKG_SCP_BINDIR, command);
  ++            snprintf(cp, l+1+k+1, "%s/%s", SCPBINDIR, command);
   +            xfree(command);
   +            command = cp;
   +            debug("Forced SCP command '%.900s'", command);
   +    }
  -+#endif
   +
        if (forced_command) {
                original_command = command;
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/openssh/openssh.spec
  ============================================================================
  $ cvs diff -u -r1.130 -r1.131 openssh.spec
  --- openpkg-src/openssh/openssh.spec  5 May 2004 08:24:16 -0000       1.130
  +++ openpkg-src/openssh/openssh.spec  6 May 2004 16:06:35 -0000       1.131
  @@ -42,7 +42,7 @@
   Group:        Security
   License:      BSD
   Version:      %{V_base}%{V_portable}
  -Release:      20040505
  +Release:      20040506
   
   #   package options
   %option       with_fsl          yes
  @@ -154,13 +154,12 @@
   %if "%{with_sftplogging}" == "yes"
       %patch -p1 -P 5
   %endif
  -    %patch -p0 -P 6
  +    sed -e 's;@l_prefix@;%{l_prefix};g' %{SOURCE openssh.patch.scpbindir} | 
%{l_patch} -p0
   
   %build
       #   configure package
       cflags=""
       ldflags=""
  -    cflags="$cflags -DOPENPKG_SCP_BINDIR=\\\"%{l_prefix}/bin\\\""
   %if "%{with_chroot}" == "yes"
       cflags="$cflags -DUSE_CHROOT"
   %endif
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to