summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatsuu Takuto <matsuu@gentoo.org>2006-05-20 05:37:28 +0000
committerMatsuu Takuto <matsuu@gentoo.org>2006-05-20 05:37:28 +0000
commit94b915de61af858a288ff7197ea917f28f98ee16 (patch)
tree714c933d5f46b846cf7c4d1da18a5f5f52f7e28b /net-misc/scponly
parentAdd patch to to fix sort options; bug #120403 (diff)
downloadhistorical-94b915de61af858a288ff7197ea917f28f98ee16.tar.gz
historical-94b915de61af858a288ff7197ea917f28f98ee16.tar.bz2
historical-94b915de61af858a288ff7197ea917f28f98ee16.zip
Fixed 127983, 125796
Package-Manager: portage-2.1_rc1-r2
Diffstat (limited to 'net-misc/scponly')
-rw-r--r--net-misc/scponly/ChangeLog9
-rw-r--r--net-misc/scponly/Manifest40
-rw-r--r--net-misc/scponly/files/digest-scponly-4.32
-rw-r--r--net-misc/scponly/files/digest-scponly-4.62
-rw-r--r--net-misc/scponly/files/digest-scponly-4.6-r13
-rw-r--r--net-misc/scponly/files/scponly-4.6-helper.patch97
-rw-r--r--net-misc/scponly/scponly-4.6-r1.ebuild143
7 files changed, 291 insertions, 5 deletions
diff --git a/net-misc/scponly/ChangeLog b/net-misc/scponly/ChangeLog
index d9aa9b14c423..c85ba93910c3 100644
--- a/net-misc/scponly/ChangeLog
+++ b/net-misc/scponly/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-misc/scponly
# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/scponly/ChangeLog,v 1.24 2006/03/01 07:56:29 hansmi Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/scponly/ChangeLog,v 1.25 2006/05/20 05:37:27 matsuu Exp $
+
+*scponly-4.6-r1 (20 May 2006)
+
+ 20 May 2006; MATSUU Takuto <matsuu@gentoo.org>
+ +files/scponly-4.6-helper.patch, +scponly-4.6-r1.ebuild:
+ Fixed to work with rysnc, Bug 127983.
+ Fixed to move the user/group setup to pkg_postint, Bug 125796.
01 Mar 2006; Michael Hanselmann <hansmi@gentoo.org> scponly-4.3.ebuild:
Stable on ppc, sparc.
diff --git a/net-misc/scponly/Manifest b/net-misc/scponly/Manifest
index 99159b0c802b..cc839e84298a 100644
--- a/net-misc/scponly/Manifest
+++ b/net-misc/scponly/Manifest
@@ -1,7 +1,39 @@
-MD5 84cf793cfd4de6a98776895c824fcb41 ChangeLog 3528
-MD5 18902f9bf0f2f546d7bdcf8d96174d8a files/digest-scponly-4.3 59
-MD5 4b7650a14422998944e74496850cadf1 files/digest-scponly-4.6 59
+AUX scponly-4.3-getopt.patch 616 RMD160 18320020a662291ad3530a3c3bae1d9931e0f225 SHA1 95298edb73afafa0dcda07c170dd3d502c775707 SHA256 fbd37908b2d45d11e7556d750ebee7fddb624789e2276a72f386ac1d062af9b4 size 616
MD5 c6b771b0da5de88d90f4715e2fe69e85 files/scponly-4.3-getopt.patch 616
-MD5 e10a0da4fac2882942ffa8360ccdd921 metadata.xml 201
+RMD160 18320020a662291ad3530a3c3bae1d9931e0f225 files/scponly-4.3-getopt.patch 616
+SHA256 fbd37908b2d45d11e7556d750ebee7fddb624789e2276a72f386ac1d062af9b4 files/scponly-4.3-getopt.patch 616
+AUX scponly-4.6-helper.patch 1755 RMD160 be58a67119450b3515934aa04214465a3dbb6d8e SHA1 a1c4e658e77a687d4e724c90c054dc59b0e3a8d1 SHA256 3f834abb3693e7f423f4d5277dd697b7b9a2c4cfab6e1aace60edcb7ea381543 size 1755
+MD5 a9a47d32abfe8737a35cfee497fb0c30 files/scponly-4.6-helper.patch 1755
+RMD160 be58a67119450b3515934aa04214465a3dbb6d8e files/scponly-4.6-helper.patch 1755
+SHA256 3f834abb3693e7f423f4d5277dd697b7b9a2c4cfab6e1aace60edcb7ea381543 files/scponly-4.6-helper.patch 1755
+DIST scponly-4.3.tgz 94889 RMD160 780baf0a2be4b3042d721953c109c06ff0d9d1a2 SHA256 e707315e4f90ccc3f882e6b21617dc4543bab77edbe40546fe230119609b6143 size 94889
+DIST scponly-4.6.tgz 96578 RMD160 c30d4b02314b53dce54d2f3f8e531c18792c7f60 SHA256 dfa5a334d66150289a391aea4dc00d1b039c644fd1c628bdeddaa7b0710e01a7 size 96578
+EBUILD scponly-4.3.ebuild 1144 RMD160 4f54225693d8f6e7f58edf934413371d65dc8475 SHA1 7e261efa20d631471c8f8ab4518161f29931c7ab SHA256 a604cb706def445e5c03600846140b5cf93f4ace67731be03dd04dad7d8c0688 size 1144
MD5 a1d8f11af1bc69f35f41b8ab1f088c71 scponly-4.3.ebuild 1144
+RMD160 4f54225693d8f6e7f58edf934413371d65dc8475 scponly-4.3.ebuild 1144
+SHA256 a604cb706def445e5c03600846140b5cf93f4ace67731be03dd04dad7d8c0688 scponly-4.3.ebuild 1144
+EBUILD scponly-4.6-r1.ebuild 4188 RMD160 bcf9ed69977d97c26117534913b34f457efe5baa SHA1 043450d0cfec38d89ce1b08b5b2093da18989e11 SHA256 4a50bfd167516dbf74f61496e64afef162513d1f9f101073b0f54b6aa7c4e70e size 4188
+MD5 55f73d87815fe7df953690685f5c26dc scponly-4.6-r1.ebuild 4188
+RMD160 bcf9ed69977d97c26117534913b34f457efe5baa scponly-4.6-r1.ebuild 4188
+SHA256 4a50bfd167516dbf74f61496e64afef162513d1f9f101073b0f54b6aa7c4e70e scponly-4.6-r1.ebuild 4188
+EBUILD scponly-4.6.ebuild 4031 RMD160 b9745fc31aa7c8087b74aa7397184eb967b2baef SHA1 5551716dd30927fb6fc951296b0665429d43c2bf SHA256 878751fc3666b6a7decad04ae16e844185fff188978482efcad3e963213ad450 size 4031
MD5 9bf0ff80af9710e903a70988abf2508f scponly-4.6.ebuild 4031
+RMD160 b9745fc31aa7c8087b74aa7397184eb967b2baef scponly-4.6.ebuild 4031
+SHA256 878751fc3666b6a7decad04ae16e844185fff188978482efcad3e963213ad450 scponly-4.6.ebuild 4031
+MISC ChangeLog 3773 RMD160 aae7d708fb1f3b5d83eec31eb55ea1e47855d061 SHA1 559cb562f401a01b6f1b61e01276c48e51231e2a SHA256 d165fb43a074b2ea8d45e976392bcb5a44dadc7e908d7e152395eb5ea13ae563 size 3773
+MD5 7c56a88e62553cd79d89cd7f7ba3f6e3 ChangeLog 3773
+RMD160 aae7d708fb1f3b5d83eec31eb55ea1e47855d061 ChangeLog 3773
+SHA256 d165fb43a074b2ea8d45e976392bcb5a44dadc7e908d7e152395eb5ea13ae563 ChangeLog 3773
+MISC metadata.xml 201 RMD160 d72cb3677f941247cced43c6670a8d64642d5263 SHA1 552087b28a02c98c8c2426f5cab77d1089527572 SHA256 90b7d63705a9ef11d62f6fe39fe9e780d9e249d32c6b7b564ff05b818aa1f7f7 size 201
+MD5 e10a0da4fac2882942ffa8360ccdd921 metadata.xml 201
+RMD160 d72cb3677f941247cced43c6670a8d64642d5263 metadata.xml 201
+SHA256 90b7d63705a9ef11d62f6fe39fe9e780d9e249d32c6b7b564ff05b818aa1f7f7 metadata.xml 201
+MD5 542847c08658e55b695b0c8902de2d24 files/digest-scponly-4.3 223
+RMD160 04e9099215eee778131256381ad26296a4b0fe68 files/digest-scponly-4.3 223
+SHA256 b5099a4618d86784c9a290396a52f5dfd484d32de6b45d5fe70065f758f4901a files/digest-scponly-4.3 223
+MD5 1608ee46d01cebc4e9702f6eb819d184 files/digest-scponly-4.6 223
+RMD160 d66fccafddfaf4df2cf951828b83c14ef666a7dc files/digest-scponly-4.6 223
+SHA256 b0f8518cea81ae04a0fcf666acf00ec50e751579462104854362e3112eb4adac files/digest-scponly-4.6 223
+MD5 1608ee46d01cebc4e9702f6eb819d184 files/digest-scponly-4.6-r1 223
+RMD160 d66fccafddfaf4df2cf951828b83c14ef666a7dc files/digest-scponly-4.6-r1 223
+SHA256 b0f8518cea81ae04a0fcf666acf00ec50e751579462104854362e3112eb4adac files/digest-scponly-4.6-r1 223
diff --git a/net-misc/scponly/files/digest-scponly-4.3 b/net-misc/scponly/files/digest-scponly-4.3
index 86b72bbb8528..30eb3e8ab1da 100644
--- a/net-misc/scponly/files/digest-scponly-4.3
+++ b/net-misc/scponly/files/digest-scponly-4.3
@@ -1 +1,3 @@
MD5 2cef26fe5ed740031a067f189c293e77 scponly-4.3.tgz 94889
+RMD160 780baf0a2be4b3042d721953c109c06ff0d9d1a2 scponly-4.3.tgz 94889
+SHA256 e707315e4f90ccc3f882e6b21617dc4543bab77edbe40546fe230119609b6143 scponly-4.3.tgz 94889
diff --git a/net-misc/scponly/files/digest-scponly-4.6 b/net-misc/scponly/files/digest-scponly-4.6
index faf07b395d69..7db9b807bbdd 100644
--- a/net-misc/scponly/files/digest-scponly-4.6
+++ b/net-misc/scponly/files/digest-scponly-4.6
@@ -1 +1,3 @@
MD5 0425cb868cadd026851238452f1db907 scponly-4.6.tgz 96578
+RMD160 c30d4b02314b53dce54d2f3f8e531c18792c7f60 scponly-4.6.tgz 96578
+SHA256 dfa5a334d66150289a391aea4dc00d1b039c644fd1c628bdeddaa7b0710e01a7 scponly-4.6.tgz 96578
diff --git a/net-misc/scponly/files/digest-scponly-4.6-r1 b/net-misc/scponly/files/digest-scponly-4.6-r1
new file mode 100644
index 000000000000..7db9b807bbdd
--- /dev/null
+++ b/net-misc/scponly/files/digest-scponly-4.6-r1
@@ -0,0 +1,3 @@
+MD5 0425cb868cadd026851238452f1db907 scponly-4.6.tgz 96578
+RMD160 c30d4b02314b53dce54d2f3f8e531c18792c7f60 scponly-4.6.tgz 96578
+SHA256 dfa5a334d66150289a391aea4dc00d1b039c644fd1c628bdeddaa7b0710e01a7 scponly-4.6.tgz 96578
diff --git a/net-misc/scponly/files/scponly-4.6-helper.patch b/net-misc/scponly/files/scponly-4.6-helper.patch
new file mode 100644
index 000000000000..875de04fc1ce
--- /dev/null
+++ b/net-misc/scponly/files/scponly-4.6-helper.patch
@@ -0,0 +1,97 @@
+--- scponly-4.6/helper.c.orig Tue Jan 31 22:04:16 2006
++++ scponly-4.6/helper.c Thu Mar 23 00:53:01 2006
+@@ -133,6 +133,78 @@
+ char **tmpptr=av;
+ int ch;
+ int ac=0;
++ char **av2 = NULL;
++
++ /*
++ * first count the arguments in the vector
++ */
++ tmpptr=av;
++ while (*tmpptr!=NULL)
++ {
++ *tmpptr++;
++ ac++;
++ }
++
++#ifdef PROG_RSYNC
++ if (exact_match(PROG_RSYNC, av[0]))
++ {
++ /*
++ * these are the long opts (beginning "--") which we
++ * allow for rsync
++ */
++ char *permitted_long_opts[] = {
++ "--server",
++ "--sender",
++ "--delete",
++ NULL /* last element must be NULL */
++ };
++
++ /*
++ * make a copy of the args excluding any permitted long
++ * options
++ */
++ int i, j;
++ av2 = malloc(ac * sizeof *av2);
++ av2[0] = av[0];
++ for (i = 1, j = 1; i < ac; ++i)
++ {
++ if (0 == strncmp(av[i], "--", 2))
++ {
++ char **p;
++ /*
++ * test against permitted opts
++ */
++ for (p = permitted_long_opts; *p; ++p)
++ {
++ if (exact_match(av[i], *p))
++ break;
++ }
++
++ if (*p)
++ {
++ /*
++ * permitted; skip this one
++ */
++ continue;
++ }
++ else
++ {
++ /*
++ * no match
++ */
++ syslog(LOG_ERR, "option %s is not permitted for use with %s (%s)",
++ av[i], cmdarg->name, logstamp());
++ return 1;
++ }
++ }
++ av2[j++] = av[i];
++
++ }
++ av2[j] = NULL;
++ ac = j;
++ av = av2;
++ }
++#endif /* PROG_RSYNC */
+
+ while (cmdarg != NULL)
+ {
+@@ -151,15 +223,6 @@
+ */
+ if (1 == cmdarg->getoptflag)
+ {
+- /*
+- * first count the arguments in the vector
+- */
+- tmpptr=av;
+- while (*tmpptr!=NULL)
+- {
+- *tmpptr++;
+- ac++;
+- }
+ /*
+ * now use getopt to look for our problem option
+ */
diff --git a/net-misc/scponly/scponly-4.6-r1.ebuild b/net-misc/scponly/scponly-4.6-r1.ebuild
new file mode 100644
index 000000000000..b29b82a1480d
--- /dev/null
+++ b/net-misc/scponly/scponly-4.6-r1.ebuild
@@ -0,0 +1,143 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/scponly/scponly-4.6-r1.ebuild,v 1.1 2006/05/20 05:37:28 matsuu Exp $
+
+inherit eutils
+
+DESCRIPTION="A tiny pseudoshell which only permits scp and sftp"
+HOMEPAGE="http://www.sublimation.org/scponly/"
+SRC_URI="http://www.sublimation.org/scponly/${P}.tgz"
+
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE="subversion"
+
+DEPEND="virtual/libc
+ net-misc/openssh
+ subversion? ( dev-util/subversion )"
+
+myuser="scponly"
+myhome="/home/${myuser}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ # Bug 125796
+ epatch "${FILESDIR}"/${P}-helper.patch
+}
+
+src_compile() {
+ PATH="${PATH}:/usr/$(get_libdir)/misc" \
+ econf \
+ --enable-scp-compat \
+ --enable-winscp-compat \
+ --enable-rsync-compat \
+ --enable-chrooted-binary \
+ $(use_enable subversion svn-compat) \
+ $(use_enable subversion svnserv-compat) \
+ || die "./configure failed"
+ emake || die
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die
+
+ dodoc AUTHOR BUILDING-JAILS.TXT CHANGELOG CONTRIB README TODO
+ dodoc setup_chroot.sh
+}
+
+pkg_postinst() {
+ einfo "You might want to run:"
+ einfo "\"emerge --config =${CATEGORY}/${PF}\""
+ einfo "to setup the chroot."
+ einfo "Otherwise you will have to setup chroot manually."
+
+ # two slashes ('//') are used by scponlyc to determine the chroot point.
+ enewgroup ${myuser}
+ enewuser ${myuser} -1 /usr/sbin/scponlyc ${myhome}// ${myuser}
+}
+
+pkg_config() {
+ # pkg_postinst is based on ${S}/setup_chroot.sh.
+
+ einfo "Updating /etc/shells"
+ { grep -v "^/usr/bin/scponly$" /etc/shells;
+ echo "/usr/bin/scponly"
+ } > ${T}/shells
+ mv -f ${T}/shells /etc/shells
+
+ { grep -v "^/usr/sbin/scponlyc$" /etc/shells;
+ echo "/usr/sbin/scponlyc"
+ } > ${T}/shells
+ mv -f ${T}/shells /etc/shells
+
+ BINARIES="/usr/$(get_libdir)/misc/sftp-server /bin/ls /usr/bin/scp /bin/rm /bin/ln /bin/mv /bin/chmod /bin/chown /bin/chgrp /bin/mkdir /bin/rmdir /bin/pwd /bin/groups /usr/bin/ld /bin/echo /usr/bin/rsync"
+ if built_with_use ${PN} subversion; then
+ BINARIES="$BINARIES /usr/bin/svn /usr/bin/svnserve"
+ fi
+ LIB_LIST=`/usr/bin/ldd $BINARIES 2> /dev/null | /bin/cut -f2 -d\> | /bin/cut -f1 -d\( | /bin/grep "^ " | /bin/sort -u`
+ LDSO_LIST="/$(get_libdir)/ld.so /libexec/ld-elf.so /libexec/ld-elf.so.1 /usr/libexec/ld.so /$(get_libdir)/ld-linux.so.2 /usr/libexec/ld-elf.so.1"
+ for lib in $LDSO_LIST; do
+ if [ -f $lib ]; then
+ LIB_LIST="$LIB_LIST $lib"
+ fi
+ done
+ /bin/ls /$(get_libdir)/libnss_compat* > /dev/null 2>&1
+ if [ $? -eq 0 ]; then
+ LIB_LIST="$LIB_LIST /$(get_libdir)/libnss_compat*"
+ fi
+
+ ldconfig
+ LIB_LIST="$LIB_LIST /etc/ld.so.cache /etc/ld.so.conf"
+
+ if [ ! -d ${myhome} ]; then
+ /bin/install -c -d ${myhome}
+ /bin/chmod 755 ${myhome}
+ fi
+ if [ ! -d ${myhome} ]; then
+ /bin/install -c -d ${myhome}/etc
+ /bin/chown 0:0 ${myhome}/etc
+ /bin/chmod 755 ${myhome}/etc
+ fi
+ if [ ! -d ${myhome}/$(get_libdir) ]; then
+ /bin/install -c -d ${myhome}/$(get_libdir)
+ /bin/chmod 755 ${myhome}/$(get_libdir)
+ fi
+ if [ ! -d ${myhome}/lib ]; then
+ /usr/bin/ln -s $(get_libdir) ${myhome}/lib
+ fi
+ if [ ! -d ${myhome}/usr/$(get_libdir) ]; then
+ /bin/install -c -d ${myhome}/usr/$(get_libdir)
+ /bin/chmod 755 ${myhome}/usr/$(get_libdir)
+ fi
+ if [ ! -d ${myhome}/usr/lib ]; then
+ /usr/bin/ln -s $(get_libdir) ${myhome}/usr/lib
+ fi
+
+ for bin in $BINARIES; do
+ /bin/install -c -d ${myhome}/`/bin/dirname $bin`
+ /bin/install -c $bin ${myhome}/$bin
+ done
+ for lib in $LIB_LIST; do
+ /bin/install -c -d ${myhome}/`/bin/dirname $lib`
+ /bin/install -c $lib ${myhome}/$lib
+ done
+
+ /bin/chown 0:0 ${myhome}
+ if [ -d ${myhome}/.ssh ]; then
+ /bin/chown 0:0 ${myhome}/.ssh
+ fi
+
+ if [ ! -d ${myhome}/incoming ]; then
+ einfo "creating ${myhome}/incoming directory for uploading files"
+ /bin/install -c -o ${myuser} -d ${myhome}/incoming
+ fi
+ /bin/chown $myuser:$myuser ${myhome}/incoming
+
+ grep "^${myuser}" /etc/passwd > ${myhome}/etc/passwd
+
+ einfo "if you experience a warning with winscp regarding groups, please install"
+ einfo "the provided hacked out fake groups program into your chroot, like so:"
+ einfo "cp groups ${myhome}/bin/groups"
+}