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: 27-Sep-2003 13:14:44
Branch: HEAD Handle: 2003092712144300
Added files:
openpkg-src/openssh openssh.patch
Modified files:
openpkg-src/openssh openssh.spec
Log:
1. Because the CHROOT patch is maintained with delays and is small enough,
we finally move it into a local patch and maintain it ourself from now on.
2. Move some more substitutions into our new local patch files, too.
3. Add OpenPKG release identification.
Summary:
Revision Changes Path
1.4 +62 -0 openpkg-src/openssh/openssh.patch
1.112 +16 -27 openpkg-src/openssh/openssh.spec
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/openssh/openssh.patch
============================================================================
$ cvs diff -u -r0 -r1.4 openssh.patch
--- /dev/null 2003-09-27 13:14:44.000000000 +0200
+++ openssh.patch 2003-09-27 13:14:44.000000000 +0200
@@ -0,0 +1,62 @@
+Index: version.h
+--- version.h.orig 2003-09-23 11:26:51.000000000 +0200
++++ version.h 2003-09-27 12:30:35.000000000 +0200
+@@ -1,3 +1,3 @@
+ /* $OpenBSD: version.h,v 1.39 2003/09/16 21:02:40 markus Exp $ */
+
+-#define SSH_VERSION "OpenSSH_3.7.1p2"
++#define SSH_VERSION "OpenSSH_3.7.1p2 @l_openpkg_release@"
+Index: session.c
+--- session.c.orig 2003-09-23 10:59:08.000000000 +0200
++++ session.c 2003-09-27 12:29:28.000000000 +0200
+@@ -1268,6 +1268,26 @@
+ exit(1);
+ }
+ endgrent();
++# ifdef USE_CHROOT
++ {
++ char *user_dir;
++ char *new_root;
++ user_dir = xstrdup(pw->pw_dir);
++ new_root = user_dir + 1;
++ while ((new_root = strchr(new_root, '.')) != NULL) {
++ new_root--;
++ if (strncmp(new_root, "/./", 3) == 0) {
++ *new_root = '\0';
++ new_root += 2;
++ if (chroot(user_dir) == -1)
++ fatal("Couldn't chroot to user directory \"%s\"",
user_dir);
++ pw->pw_dir = new_root;
++ break;
++ }
++ new_root += 2;
++ }
++ }
++# endif /* USE_CHROOT */
+ # ifdef USE_PAM
+ /*
+ * PAM credentials may take the form of supplementary groups.
+Index: auth-pam.h
+--- auth-pam.h.orig 2003-09-02 15:18:53.000000000 +0200
++++ auth-pam.h 2003-09-27 12:29:28.000000000 +0200
+@@ -28,7 +28,7 @@
+ #ifdef USE_PAM
+
+ #if !defined(SSHD_PAM_SERVICE)
+-# define SSHD_PAM_SERVICE __progname
++# define SSHD_PAM_SERVICE "openssh"
+ #endif
+
+ void start_pam(const char *);
+Index: Makefile.in
+--- Makefile.in.orig 2003-09-22 03:00:12.000000000 +0200
++++ Makefile.in 2003-09-27 12:29:28.000000000 +0200
+@@ -224,7 +224,7 @@
+ $(AUTORECONF)
+ (cd scard && $(MAKE) -f Makefile.in distprep)
+
+-install: $(CONFIGFILES) ssh_prng_cmds.out $(MANPAGES) $(TARGETS) install-files
host-key check-config
++install: $(CONFIGFILES) ssh_prng_cmds.out $(MANPAGES) $(TARGETS) install-files
host-key
+ install-nokeys: $(CONFIGFILES) ssh_prng_cmds.out $(MANPAGES) $(TARGETS)
install-files
+
+ check-config:
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/openssh/openssh.spec
============================================================================
$ cvs diff -u -r1.111 -r1.112 openssh.spec
--- openpkg-src/openssh/openssh.spec 27 Sep 2003 06:37:08 -0000 1.111
+++ openpkg-src/openssh/openssh.spec 27 Sep 2003 11:14:43 -0000 1.112
@@ -26,7 +26,6 @@
# package versions
%define V_base 3.7.1
%define V_portable p2
-%define V_chroot 3.7.1p2
# package information
Name: openssh
@@ -58,13 +57,13 @@
Source6: ssh-keyman
Source7: ssh-keyman.1
Source8: ssh-keyman.pod
-Source9: http://chrootssh.sourceforge.net/download/osshChroot-%{V_chroot}.diff
+Patch0: openssh.patch
# build information
Prefix: %{l_prefix}
BuildRoot: %{l_buildroot}
-BuildPreReq: OpenPKG, openpkg >= 20030718, perl
-PreReq: OpenPKG, openpkg >= 20030718
+BuildPreReq: OpenPKG, openpkg >= 20030927, perl
+PreReq: OpenPKG, openpkg >= 20030927
BuildPreReq: openssl, zlib
PreReq: openssl, zlib
%if "%{with_pam}" == "yes"
@@ -102,37 +101,27 @@
algorithms to separate libraries (OpenSSL).
%prep
- # unpack distribution
+ # unpack and patch distribution
%setup -q
-
- # optionally apply chroot(2) patch
-%if "%{with_chroot}" == "yes"
- %{l_patch} -p1 <%{SOURCE osshChroot-%{V_chroot}.diff}
-%endif
-
- # enforce "openssh" and the PAM identification string
-%if "%{with_pam}" == "yes"
+ %patch -p0
%{l_shtool} subst \
- -e 's;\(define *SSHD_PAM_SERVICE\).*;\1 "openssh";' \
- auth-pam.h
-%endif
-
- # prevent in advance "make install" from running sshd
- %{l_shtool} subst \
- -e 's;^\(install:.*\)check-config\(.*\)$;\1 \2;' \
- Makefile.in
+ -e 's;@l_openpkg_release@;%{l_openpkg_release -F "OpenPKG-%s"};' \
+ version.h
%build
# configure package
- inc="%{l_cppflags}"
- lib="%{l_ldflags}"
+ cflags=""
+ ldflags=""
+%if "%{with_chroot}" == "yes"
+ cflags="$cflags -DUSE_CHROOT"
+%endif
%if "%{with_pam}" == "yes"
- inc="$inc -I`%{l_prefix}/etc/rc --query pam_incdir`"
- lib="$lib -L`%{l_prefix}/etc/rc --query pam_libdir`"
+ cflags="$cflags -I`%{l_prefix}/etc/rc --query pam_incdir`"
+ ldflags="$ldflags -L`%{l_prefix}/etc/rc --query pam_libdir`"
%endif
CC="%{l_cc}" \
- CFLAGS="%{l_cflags -O} $inc" \
- LDFLAGS="%{l_ldflags} %{l_fsl_ldflags} $lib" \
+ CFLAGS="%{l_cflags -O} %{l_cppflags} $cflags" \
+ LDFLAGS="%{l_ldflags} %{l_fsl_ldflags} $ldflags" \
LIBS="%{l_fsl_libs}" \
./configure \
--prefix=%{l_prefix} \
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]