summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2010-10-28 12:55:52 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2010-10-28 12:55:52 +0000
commit6ee9d883b67f4c6da00496b83427befe4422bfcc (patch)
tree75e1f8f42f7a40070ef48ae2e15fe05704014f54 /net-misc/scponly
parentqa: use thirdpartymirrors (diff)
downloadhistorical-6ee9d883b67f4c6da00496b83427befe4422bfcc.tar.gz
historical-6ee9d883b67f4c6da00496b83427befe4422bfcc.tar.bz2
historical-6ee9d883b67f4c6da00496b83427befe4422bfcc.zip
punt broken, solving most repoman issues
Package-Manager: portage-2.2.0_alpha1/cvs/Linux x86_64
Diffstat (limited to 'net-misc/scponly')
-rw-r--r--net-misc/scponly/Manifest2
-rw-r--r--net-misc/scponly/scponly-4.8-r3.ebuild297
-rw-r--r--net-misc/scponly/scponly-4.8.ebuild152
3 files changed, 0 insertions, 451 deletions
diff --git a/net-misc/scponly/Manifest b/net-misc/scponly/Manifest
index b8882e78887d..3fc1d2b371ae 100644
--- a/net-misc/scponly/Manifest
+++ b/net-misc/scponly/Manifest
@@ -1,8 +1,6 @@
AUX scponly-4.8-gcc4.4.0.patch 571 RMD160 acb834c4fba11b7f412c930b74ffba6782acf579 SHA1 6b1e6dc884121709d0490dd8b37507826ee1779a SHA256 bf89c4b56552654140c93b5cf3090370c24ee20e5870f0cf0df76218e52e15b2
AUX scponly-4.8-rsync.patch 7838 RMD160 fc7464eeab781ed51ba85b8120489e10b9db1442 SHA1 992e58ddc5ea7334cf9b72324a96f149b298c210 SHA256 bfab1408ad8cfdfd8fc7f9b583c57a5c6b73be36cb3955db46e4c892acd7e55e
DIST scponly-4.8.tgz 101687 RMD160 de6b58fcb8108d42a1576c69003e9136b9417869 SHA1 154de34901ce22fd9d406f6e02cddc440c435afc SHA256 1693dd678355749c5d9e48ecdd4628dbfe71d82955afde950ee8d88b5adc01cf
-EBUILD scponly-4.8-r3.ebuild 9036 RMD160 fc4237ad3dcffe8c4e8280548543bb9d16f507c5 SHA1 b432c4f7081e7d3e2924b66164cd6f569e6ea507 SHA256 9f3281b40f697b84e30e2b1517798a44723f21e0d4391a641265083746f6573c
EBUILD scponly-4.8-r4.ebuild 9101 RMD160 c50fb1d82c4d15b07d97be697fa18dc3ff3f2ffc SHA1 e795423cde781ad01e2abdc3baf41e629f7e2830 SHA256 26ed9e287605cd1421f2631d30a942bcd82c5d2652d64fcb866b68052ec1efcf
-EBUILD scponly-4.8.ebuild 4272 RMD160 bb1792ddf9cdff8f06c8d57e6c14b084d37fb912 SHA1 c4adfc01832dc7c6ff5b130de37f8ece3f4b2cdd SHA256 b5edb479aeafdcb69ac18132a85f7126eaaede257daed9acfbc569587c7818bc
MISC ChangeLog 7433 RMD160 40302a003974fffb2f16948faf7e0a1ea267d2a7 SHA1 c2eb643327267d689a890524a2b5b6edb3a1e964 SHA256 ed2a0b5843916cdc98f90e011609e3ef7d3ae204bca79b987bf418b1e90822ac
MISC metadata.xml 1424 RMD160 bedfada17f8ebfb8964a627769b1f6f96114ada4 SHA1 c7063171c58a7d6195e291232b96820957df8fbf SHA256 39e481515e78825063291d053dd92d5652d0c824b706e67dadaccecdcad491e2
diff --git a/net-misc/scponly/scponly-4.8-r3.ebuild b/net-misc/scponly/scponly-4.8-r3.ebuild
deleted file mode 100644
index d1d6532e13cd..000000000000
--- a/net-misc/scponly/scponly-4.8-r3.ebuild
+++ /dev/null
@@ -1,297 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/scponly/scponly-4.8-r3.ebuild,v 1.3 2010/06/22 18:54:31 arfrever Exp $
-
-EAPI="1"
-inherit eutils multilib toolchain-funcs
-
-DESCRIPTION="A tiny pseudoshell which only permits scp and sftp"
-HOMEPAGE="http://www.sublimation.org/scponly/"
-SRC_URI="mirror://sourceforge/scponly/${P}.tgz"
-
-LICENSE="as-is"
-SLOT="0"
-KEYWORDS="~amd64 ~mips ~ppc ~sparc ~x86"
-IUSE="+sftp scp winscp gftp rsync unison subversion wildcards quota passwd logging"
-
-RDEPEND="sys-apps/sed
- net-misc/openssh
- quota? ( sys-fs/quota )
- !mips? ( passwd? ( sys-apps/shadow ) )
- rsync? ( net-misc/rsync )
- !mips? ( unison? ( net-misc/unison ) )
- subversion? ( dev-vcs/subversion )"
-DEPEND="${RDEPEND}"
-
-myuser="scponly"
-myhome="/home/${myuser}"
-mysubdir="/pub"
-
-pkg_setup() {
- if use mips; then
- if use unison || use passwd; then
- eerror
- eerror "unison and passwd use-flags are not supported on mips yet!"
- die "unsupported use-flags for your arch"
- fi
- fi
-
- if use unison; then
- if [ ! -e "${ROOT}usr/bin/unison" ]; then
- eerror
- eerror "please run 'eselect unison set <version>' first!"
- die "can't find /usr/bin/unison"
- fi
- fi
-
- if ! use subversion && ! use unison && ! use rsync && \
- ! use sftp && ! use scp && ! use winscp; then
- eerror
- eerror "you have to enable at least one of the following use-flags:"
- eerror "sftp scp winscp rsync unison subversion"
- die "your build will quite useless without any compatibility mode"
- fi
-
- if use subversion || use unison || use rsync || use wildcards || use scp || use winscp; then
- ewarn
- ewarn "NOTE THE FOLLOWING SECURITY RISKS:"
- ewarn
- if use wildcards; then
- ewarn "-- by enabling wildcards, there is a slightly higher chance of an exploit"
- fi
- if use scp || use winscp; then
- ewarn "-- by enabling scp and/or winscp compatibility, more programs will need"
- ewarn " to be installed in the chroot which increases the risk."
- fi
- if use subversion; then
- ewarn "-- CAUTION: by enabling subversion the user WILL BE ABLE TO EXECUTE"
- ewarn " SCRIPTS OR PROGRAMS INDIRECTLY! svn and svnserve will try to execute"
- ewarn " pre-commit, post-commit hooks, as well as a few others. These files"
- ewarn " have specific filenames at specific locations relative to the svn"
- ewarn " repository root. Thus, unless you are *very* careful about security,"
- ewarn " the user WILL BE ABLE TO EXECUTE SCRIPTS OR PROGRAMS INDIRECTLY!"
- ewarn " This can be prevented by a careful configuration."
- fi
- if use subversion || use unison || use rsync; then
- ewarn "-- The following programs use configuration files that might allow the"
- ewarn " user to bypass security restrictions placed on command line arguments:"
- ewarn " svn, svnserve, rsync, unison"
- fi
- ewarn
- ewarn "please read /usr/share/doc/${PF}/SECURITY* after install!"
- ewarn
- ebeep 5
- fi
-}
-
-src_unpack() {
- unpack ${A}
- cd "${S}"
- epatch "${FILESDIR}/${P}-rsync.patch"
- # bug #269242
- epatch "${FILESDIR}/${P}-gcc4.4.0.patch"
-}
-
-src_compile() {
- CFLAGS="${CFLAGS} ${LDFLAGS}" econf \
- --with-sftp-server="/usr/$(get_libdir)/misc/sftp-server" \
- --with-default-chdir="/" \
- --disable-restrictive-names \
- --enable-chrooted-binary \
- --enable-chroot-checkdir \
- $(use_enable winscp winscp-compat) \
- $(use_enable gftp gftp-compat) \
- $(use_enable scp scp-compat) \
- $(use_enable sftp sftp) \
- $(use_enable quota quota-compat) \
- $(use_enable passwd passwd-compat) \
- $(use_enable rsync rsync-compat) \
- $(use_enable unison unison-compat) \
- $(use_enable subversion svn-compat) \
- $(use_enable subversion svnserv-compat) \
- $(use_enable logging sftp-logging-compat) \
- $(use_enable wildcards wildcards) \
- || die "econf failed"
- emake CC=$(tc-getCC) || die "emake failed"
-}
-
-src_install() {
- emake DESTDIR="${D}" install || die
-
- dodoc AUTHOR BUILDING-JAILS.TXT CHANGELOG CONTRIB README SECURITY TODO
-
- # don't compress setup-script, so it is usable if necessary
- insinto /usr/share/doc/${PF}/chroot
- doins setup_chroot.sh config.h
-}
-
-pkg_postinst() {
- elog
- elog "You might want to run"
- elog " emerge --config =${CATEGORY}/${PF}"
- elog "to setup the chroot. Otherwise you will have to setup chroot manually."
- elog
- elog "Please read the docs in /usr/share/doc/${PF} for more informations!"
- elog
-
- # 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 "Collecting binaries and libraries..."
-
- # Binaries launched in sftp compat mode
- if built_with_use =${CATEGORY}/${PF} sftp; then
- BINARIES="/usr/$(get_libdir)/misc/sftp-server"
- fi
-
- # Binaries launched by vanilla- and WinSCP modes
- if built_with_use =${CATEGORY}/${PF} scp || \
- built_with_use =${CATEGORY}/${PF} winscp; then
- BINARIES="${BINARIES} /usr/bin/scp /bin/ls /bin/rm /bin/ln /bin/mv"
- BINARIES="${BINARIES} /bin/chmod /bin/chown /bin/chgrp /bin/mkdir /bin/rmdir"
- fi
-
- # Binaries launched in WinSCP compatibility mode
- if built_with_use =${CATEGORY}/${PF} winscp; then
- BINARIES="${BINARIES} /bin/pwd /bin/groups /usr/bin/id /bin/echo"
- fi
-
- # Rsync compatability mode
- if built_with_use =${CATEGORY}/${PF} rsync; then
- BINARIES="${BINARIES} /usr/bin/rsync"
- fi
-
- # Unison compatability mode
- if built_with_use =${CATEGORY}/${PF} unison; then
- BINARIES="${BINARIES} /usr/bin/unison"
- fi
-
- # subversion cli/svnserv compatibility
- if built_with_use =${CATEGORY}/${PF} subversion; then
- BINARIES="${BINARIES} /usr/bin/svn /usr/bin/svnserve"
- fi
-
- # passwd compatibility
- if built_with_use =${CATEGORY}/${PF} passwd; then
- BINARIES="${BINARIES} /bin/passwd"
- fi
-
- # quota compatibility
- if built_with_use =${CATEGORY}/${PF} quota; then
- BINARIES="${BINARIES} /usr/bin/quota"
- fi
-
- # build lib dependencies
- LIB_LIST=$(ldd ${BINARIES} | sed -n 's:.* => \(/[^ ]\+\).*:\1:p' | sort -u)
-
- # search and add ld*.so
- for LIB in /$(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; do
- [ -f "${LIB}" ] && LIB_LIST="${LIB_LIST} ${LIB}"
- done
-
- # search and add libnss_*.so
- for LIB in /$(get_libdir)/libnss_{compat,files}*.so.*; do
- [ -f "${LIB}" ] && LIB_LIST="${LIB_LIST} ${LIB}"
- done
-
- # create base dirs
- if [ ! -d "${myhome}" ]; then
- einfo "Creating ${myhome}"
- install -o0 -g0 -m0755 -d "${myhome}"
- fi
-
- if [ ! -d "${myhome}/etc" ]; then
- einfo "Creating ${myhome}/etc"
- install -o0 -g0 -m0755 -d "${myhome}/etc"
- fi
-
- if [ ! -d "${myhome}/$(get_libdir)" ]; then
- einfo "Creating ${myhome}/$(get_libdir)"
- install -o0 -g0 -m0755 -d "${myhome}/$(get_libdir)"
- fi
-
- if [ ! -e "${myhome}/lib" ]; then
- einfo "Creating ${myhome}/lib"
- ln -snf $(get_libdir) "${myhome}/lib"
- fi
-
- if [ ! -d "${myhome}/usr/$(get_libdir)" ]; then
- einfo "Creating ${myhome}/usr/$(get_libdir)"
- install -o0 -g0 -m0755 -d "${myhome}/usr/$(get_libdir)"
- fi
-
- if [ ! -e "${myhome}/usr/lib" ]; then
- einfo "Creating ${myhome}/usr/lib"
- ln -snf $(get_libdir) "${myhome}/usr/lib"
- fi
-
- if [ ! -d "${myhome}${mysubdir}" ]; then
- einfo "Creating ${myhome}${mysubdir} directory for uploading files"
- install -o${myuser} -g${myuser} -m0755 -d "${myhome}${mysubdir}"
- fi
-
- # create /dev/null (Bug 135505)
- if [ ! -e "${myhome}/dev/null" ]; then
- install -o0 -g0 -m0755 -d "${myhome}/dev"
- mknod -m0777 "${myhome}/dev/null" c 1 3
- fi
-
- # install binaries
- for BIN in ${BINARIES}; do
- einfo "Install ${BIN}"
- install -o0 -g0 -m0755 -d "${myhome}$(dirname ${BIN})"
- if [ "${BIN}" = "/bin/passwd" ]; then # needs suid
- install -p -o0 -g0 -m04711 "${BIN}" "${myhome}/${BIN}"
- else
- install -p -o0 -g0 -m0755 "${BIN}" "${myhome}/${BIN}"
- fi
- done
-
- # install libs
- for LIB in ${LIB_LIST}; do
- einfo "Install ${LIB}"
- install -o0 -g0 -m0755 -d "${myhome}$(dirname ${LIB})"
- install -p -o0 -g0 -m0755 "${LIB}" "${myhome}/${LIB}"
- done
-
- # create ld.so.conf
- einfo "Creating /etc/ld.so.conf"
- for LIB in ${LIB_LIST}; do
- dirname ${LIB}
- done | sort -u | while read DIR; do
- if ! grep 2>/dev/null -q "^${DIR}$" "${myhome}/etc/ld.so.conf"; then
- echo "${DIR}" >> "${myhome}/etc/ld.so.conf"
- fi
- done
- ldconfig -r "${myhome}"
-
- # update shells
- einfo "Updating /etc/shells"
- grep 2>/dev/null -q "^/usr/bin/scponly$" /etc/shells \
- || echo "/usr/bin/scponly" >> /etc/shells
-
- grep 2>/dev/null -q "^/usr/sbin/scponlyc$" /etc/shells \
- || echo "/usr/sbin/scponlyc" >> /etc/shells
-
- # create /etc/passwd
- if [ ! -e "${myhome}/etc/passwd" ]; then
- (
- echo "root:x:0:0:root:/:/bin/sh"
- sed -n "s|^\(${myuser}:[^:]*:[^:]*:[^:]*:[^:]*:\).*|\1${mysubdir}:/bin/sh|p" /etc/passwd
- ) > "${myhome}/etc/passwd"
- fi
-
- # create /etc/group
- if [ ! -e "${myhome}/etc/group" ]; then
- (
- echo "root:x:0:"
- sed -n "s|^\(${myuser}:[^:]*:[^:]*:\).*|\1|p" /etc/group
- ) > "${myhome}/etc/group"
- fi
-}
diff --git a/net-misc/scponly/scponly-4.8.ebuild b/net-misc/scponly/scponly-4.8.ebuild
deleted file mode 100644
index 68ef62308cbb..000000000000
--- a/net-misc/scponly/scponly-4.8.ebuild
+++ /dev/null
@@ -1,152 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/scponly/scponly-4.8.ebuild,v 1.7 2010/06/22 18:54:31 arfrever Exp $
-
-inherit eutils multilib
-
-DESCRIPTION="A tiny pseudoshell which only permits scp and sftp"
-HOMEPAGE="http://www.sublimation.org/scponly/"
-SRC_URI="mirror://sourceforge/scponly/${P}.tgz"
-
-LICENSE="as-is"
-SLOT="0"
-KEYWORDS="amd64 ~mips ppc sparc x86"
-IUSE="rsync subversion"
-
-DEPEND="net-misc/openssh
- rsync? ( net-misc/rsync )
- subversion? ( dev-vcs/subversion )"
-
-myuser="scponly"
-myhome="/home/${myuser}"
-
-pkg_setup() {
- if use subversion || use rsync ; then
- ewarn
- ewarn "read the \"SECURITY\" document in ${P}.tgz before enabling 'rsync' or 'subversion' USE flag"
- ewarn
- ebeep 5
- fi
-}
-
-src_compile() {
- econf \
- --disable-wildcards \
- --enable-chrooted-binary \
- --disable-gftp-compat \
- --with-sftp-server="/usr/$(get_libdir)/misc/sftp-server" \
- $(use_enable rsync rsync-compat) \
- $(use_enable subversion svn-compat) \
- $(use_enable subversion svnserv-compat) \
- || die "./configure failed"
- emake || die
-}
-
-src_install() {
- emake DESTDIR="${D}" install || die
-
- dodoc AUTHOR BUILDING-JAILS.TXT CHANGELOG CONTRIB README SECURITY TODO
- dodoc setup_chroot.sh
-}
-
-pkg_postinst() {
- elog "You might want to run:"
- elog "\"emerge --config =${CATEGORY}/${PF}\""
- elog "to setup the chroot."
- elog "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
- cp "${T}"/shells /etc/shells
-
- { grep -v "^/usr/sbin/scponlyc$" /etc/shells;
- echo "/usr/sbin/scponlyc"
- } > "${T}"/shells
- cp "${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"
- if built_with_use =${CATEGORY}/${PF} rsync; then
- BINARIES="$BINARIES /usr/bin/rsync"
- fi
- if built_with_use =${CATEGORY}/${PF} subversion; then
- BINARIES="$BINARIES /usr/bin/svn /usr/bin/svnserve"
- fi
- LIB_LIST=`ldd $BINARIES 2> /dev/null | cut -f2 -d\> | cut -f1 -d\( | grep "^[ ]" | 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
- 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
- install -c -d ${myhome}
- chmod 755 ${myhome}
- fi
- if [ ! -d ${myhome} ]; then
- install -c -d ${myhome}/etc
- chown 0:0 ${myhome}/etc
- chmod 755 ${myhome}/etc
- fi
- if [ ! -d ${myhome}/$(get_libdir) ]; then
- install -c -d ${myhome}/$(get_libdir)
- chmod 755 ${myhome}/$(get_libdir)
- fi
- if [ ! -d ${myhome}/lib ]; then
- ln -s $(get_libdir) ${myhome}/lib
- fi
- if [ ! -d ${myhome}/usr/$(get_libdir) ]; then
- install -c -d ${myhome}/usr/$(get_libdir)
- chmod 755 ${myhome}/usr/$(get_libdir)
- fi
- if [ ! -d ${myhome}/usr/lib ]; then
- ln -s $(get_libdir) ${myhome}/usr/lib
- fi
-
- for bin in $BINARIES; do
- install -c -d ${myhome}/`/bin/dirname $bin`
- install -c $bin ${myhome}/$bin
- done
- for lib in $LIB_LIST; do
- install -c -d ${myhome}/`/bin/dirname $lib`
- install -c $lib ${myhome}/$lib
- done
-
- chown 0:0 ${myhome}
- if [ -d ${myhome}/.ssh ]; then
- chown 0:0 ${myhome}/.ssh
- fi
-
- if [ ! -d ${myhome}/incoming ]; then
- einfo "creating ${myhome}/incoming directory for uploading files"
- install -c -o ${myuser} -d ${myhome}/incoming
- fi
- chown $myuser:$myuser ${myhome}/incoming
-
- if [ ! -e ${myhome}/etc/passwd ]; then
- grep "^${myuser}" /etc/passwd > ${myhome}/etc/passwd
- fi
-
- # Bug 135505
- if [ ! -e ${myhome}/dev/null ]; then
- install -c -d ${myhome}/dev
- mknod -m 777 ${myhome}/dev/null c 1 3
- fi
-}