[gentoo-commits] repo/gentoo:master commit in: net-misc/scponly/files/, net-misc/scponly/

2020-02-19 Thread Ulrich Müller
commit: 0cfdb10442be996e94f64bfaca9ba08317ac0e39
Author: Hank Leininger  korelogic  com>
AuthorDate: Tue Feb 18 19:51:48 2020 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Wed Feb 19 20:25:35 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0cfdb104

net-misc/scponly: GLEP-81, fix sftp-server path, add maintainer

Redone to address feedback in https://github.com/gentoo/gentoo/pull/14286

scponly's sftp support has been broken since profile 17.1's move
from /usr/lib/ to /usr/lib64/; this includes the fix for that.

Also moved scponly's creation of a chroot user behind a
USE=chroot flag, as it's entirely usable if you are setting up
your own chroots and do not need it to create one.

Added myself as proxy maintainer.

Signed-off-by: Hank Leininger  korelogic.com>
Closes: https://bugs.gentoo.org/701368
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Ulrich Müller  gentoo.org>

 .../files/scponly-4.8-sftp-server-path.patch   |  42 
 net-misc/scponly/metadata.xml  |  10 +-
 net-misc/scponly/scponly-4.8-r7.ebuild | 245 +
 3 files changed, 296 insertions(+), 1 deletion(-)

diff --git a/net-misc/scponly/files/scponly-4.8-sftp-server-path.patch 
b/net-misc/scponly/files/scponly-4.8-sftp-server-path.patch
new file mode 100644
index 000..c191de87751
--- /dev/null
+++ b/net-misc/scponly/files/scponly-4.8-sftp-server-path.patch
@@ -0,0 +1,42 @@
+diff -urNp scponly-4.8-orig/configure scponly-4.8-dwok/configure
+--- scponly-4.8-orig/configure 2019-11-26 16:34:19.028544577 +0100
 scponly-4.8-dwok/configure 2019-11-26 16:33:24.571763528 +0100
+@@ -3244,7 +3244,7 @@ else
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+-as_dummy="`echo 
"$PATH:/usr/lib:/usr/lib64:/usr/libexec:/usr/libexec/openssh:/usr/lib/ssh:/usr/lib64/ssh:/usr/local/libexec:/usr/lib/misc:/usr/lib/openssh"
 | sed -e 's/:/ /'`"
++as_dummy="`echo 
"$PATH:/usr/lib:/usr/lib64:/usr/lib64/misc:/usr/libexec:/usr/libexec/openssh:/usr/lib/ssh:/usr/lib64/ssh:/usr/local/libexec:/usr/lib/misc:/usr/lib/openssh"
 | sed -e 's/:/ /'`"
+ for as_dir in $as_dummy
+ do
+   IFS=$as_save_IFS
+@@ -4240,7 +4240,7 @@ else
+   ;;
+   *)
+   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+-as_dummy="`echo 
"$PATH:/usr/lib:/usr/lib/ssh:/usr/libexec/openssh:/usr/libexec:/usr/local/libexec"
 | sed -e 's/:/ /'`"
++as_dummy="`echo 
"$PATH:/usr/lib:/usr/lib64:/usr/lib64/misc:/usr/lib/ssh:/usr/libexec/openssh:/usr/libexec:/usr/local/libexec"
 | sed -e 's/:/ /'`"
+ for as_dir in $as_dummy
+ do
+   IFS=$as_save_IFS
+diff -urNp scponly-4.8-orig/configure.in scponly-4.8-dwok/configure.in
+--- scponly-4.8-orig/configure.in  2019-11-26 16:34:19.028544577 +0100
 scponly-4.8-dwok/configure.in  2019-11-26 16:33:28.491819749 +0100
+@@ -231,7 +231,7 @@ AC_ARG_ENABLE([quota-compat],
+ 
+ if test "x$scponly_scp_compat" != "x"; then
+   AC_MSG_NOTICE([enabling core WinSCP and Vanilla SCP binaries...])
+-  SCPONLY_PATH_PROG_DEFINE([PROG_SFTP_SERVER], 
[sftp-server],[/usr/lib:/usr/lib64:/usr/libexec:/usr/libexec/openssh:/usr/lib/ssh:/usr/lib64/ssh:/usr/local/libexec:/usr/lib/misc:/usr/lib/openssh])
++  SCPONLY_PATH_PROG_DEFINE([PROG_SFTP_SERVER], 
[sftp-server],[/usr/lib:/usr/lib64:/usr/lib64/misc:/usr/libexec:/usr/libexec/openssh:/usr/lib/ssh:/usr/lib64/ssh:/usr/local/libexec:/usr/lib/misc:/usr/lib/openssh])
+   SCPONLY_PATH_PROG_DEFINE([PROG_LS],[ls],
[/bin:/usr/bin:/sbin:/usr/sbin])
+   SCPONLY_PATH_PROG_DEFINE([PROG_SCP],   [scp],   
[/bin:/usr/bin:/sbin:/usr/sbin])
+   SCPONLY_PATH_PROG_DEFINE([PROG_RM],[rm],
[/bin:/usr/bin:/sbin:/usr/sbin])
+@@ -297,7 +297,7 @@ if test "x$scponly_sftp_compat" != "x";
+   if test "x$scponly_explicit_sftpserver_path" = "x"; then
+   dnl Informed guess:
+   SCPONLY_PATH_PROG_DEFINE([PROG_SFTP_SERVER], [sftp-server],
+-   
[/usr/lib:/usr/lib/ssh:/usr/libexec/openssh:/usr/libexec:/usr/local/libexec])
++   
[/usr/lib:/usr/lib64:/usr/lib64/misc:/usr/lib/ssh:/usr/libexec/openssh:/usr/libexec:/usr/local/libexec])
+   dnl Debian uses /usr/lib
+   dnl Red Hat uses /usr/libexec/openssh
+   dnl Many a *BSD uses $PATH itself (which is implicit + checked 1st)

diff --git a/net-misc/scponly/metadata.xml b/net-misc/scponly/metadata.xml
index cc5fae365f3..38864027ac1 100644
--- a/net-misc/scponly/metadata.xml
+++ b/net-misc/scponly/metadata.xml
@@ -1,7 +1,14 @@
 
 http://www.gentoo.org/dtd/metadata.dtd;>
 
-   
+   
+   hl...@korelogic.com
+   Hank Leininger
+   
+   
+   proxy-ma...@gentoo.org
+   Proxy Maintainers
+   

scponly is an alternative 'shell' (of sorts) for system 
administrators
who would like to provide access to remote users to both read 
and write
@@ -10,6 +17,7 @@
ssh suite of applications.


+   Enables 

[gentoo-commits] repo/gentoo:master commit in: net-misc/scponly/files/, net-misc/scponly/

2019-11-19 Thread Ulrich Müller
commit: f4fa5d320350e4ab509cf11d13cad5bc46c85504
Author: Ulrich Müller  gentoo  org>
AuthorDate: Tue Nov 19 15:13:44 2019 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Tue Nov 19 15:17:04 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f4fa5d32

net-misc/scponly: [QA] Add missing dependency on net-misc/unison.

Update ebuild to EAPI 7, which also fixes QA issue with estack.eclass.

Rename hard-coded path in pkg_config from /bin/passwd to /usr/bin/passwd
which should always exist.

Closes: https://bugs.gentoo.org/670430
Closes: https://bugs.gentoo.org/680570
Package-Manager: Portage-2.3.79, Repoman-2.3.18
Signed-off-by: Ulrich Müller  gentoo.org>

 net-misc/scponly/files/scponly-4.8-gcc4.4.0.patch  |  6 --
 ...scponly-4.8-r5.ebuild => scponly-4.8-r6.ebuild} | 23 +++---
 2 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/net-misc/scponly/files/scponly-4.8-gcc4.4.0.patch 
b/net-misc/scponly/files/scponly-4.8-gcc4.4.0.patch
index d08ce28b93b..8bb689f5914 100644
--- a/net-misc/scponly/files/scponly-4.8-gcc4.4.0.patch
+++ b/net-misc/scponly/files/scponly-4.8-gcc4.4.0.patch
@@ -1,5 +1,7 @@
 helper.c.orig  2009-05-11 00:33:08.0 -0600
-+++ helper.c   2009-05-11 00:39:59.0 -0600
+https://bugs.gentoo.org/269242
+
+--- scponly-4.8.orig/helper.c
 scponly-4.8/helper.c
 @@ -259,11 +259,11 @@
PROG_RSYNC, logstamp());
return 1;

diff --git a/net-misc/scponly/scponly-4.8-r5.ebuild 
b/net-misc/scponly/scponly-4.8-r6.ebuild
similarity index 95%
rename from net-misc/scponly/scponly-4.8-r5.ebuild
rename to net-misc/scponly/scponly-4.8-r6.ebuild
index 2e53a29f087..b3068376ead 100644
--- a/net-misc/scponly/scponly-4.8-r5.ebuild
+++ b/net-misc/scponly/scponly-4.8-r6.ebuild
@@ -1,8 +1,9 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=5
-inherit eutils multilib readme.gentoo toolchain-funcs user
+EAPI=7
+
+inherit multilib readme.gentoo-r1 toolchain-funcs user
 
 DESCRIPTION="A tiny pseudoshell which only permits scp and sftp"
 HOMEPAGE="https://github.com/scponly/scponly;
@@ -22,6 +23,7 @@ RDEPEND="
quota? ( sys-fs/quota )
rsync? ( net-misc/rsync )
subversion? ( dev-vcs/subversion )
+   unison? ( net-misc/unison:= )
 "
 DEPEND="${RDEPEND}"
 
@@ -29,6 +31,11 @@ myuser="scponly"
 myhome="/home/${myuser}"
 mysubdir="/pub"
 
+PATCHES=(
+   "${FILESDIR}/${P}-rsync.patch"
+   "${FILESDIR}/${P}-gcc4.4.0.patch"
+)
+
 DOC_CONTENTS="
You might want to run\n
emerge --config =${CATEGORY}/${PF}\n
@@ -37,12 +44,6 @@ DOC_CONTENTS="
the SECURITY file.
 "
 
-src_prepare() {
-   epatch "${FILESDIR}/${P}-rsync.patch"
-   # bug #269242
-   epatch "${FILESDIR}/${P}-gcc4.4.0.patch"
-}
-
 src_configure() {
CFLAGS="${CFLAGS} ${LDFLAGS}" econf \
--with-sftp-server="/usr/$(get_libdir)/misc/sftp-server" \
@@ -126,7 +127,7 @@ pkg_config() {
 
# passwd compatibility
if has_version "=${CATEGORY}/${PF}[passwd]" ; then
-   BINARIES="${BINARIES} /bin/passwd"
+   BINARIES="${BINARIES} /usr/bin/passwd"
fi
 
# quota compatibility
@@ -197,7 +198,7 @@ pkg_config() {
for BIN in ${BINARIES}; do
einfo "Install ${BIN}"
install -o0 -g0 -m0755 -d "${myhome}$(dirname ${BIN})"
-   if [ "${BIN}" = "/bin/passwd" ]; then  # needs suid
+   if [ "${BIN}" = "/usr/bin/passwd" ]; then  # needs suid
install -p -o0 -g0 -m04711 "${BIN}" "${myhome}/${BIN}"
else
install -p -o0 -g0 -m0755 "${BIN}" "${myhome}/${BIN}"