diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-mobilephone/sobexsrv | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-mobilephone/sobexsrv')
-rw-r--r-- | app-mobilephone/sobexsrv/Manifest | 2 | ||||
-rw-r--r-- | app-mobilephone/sobexsrv/files/conf.d_sobexsrv | 35 | ||||
-rw-r--r-- | app-mobilephone/sobexsrv/files/init.d_sobexsrv | 59 | ||||
-rw-r--r-- | app-mobilephone/sobexsrv/metadata.xml | 17 | ||||
-rw-r--r-- | app-mobilephone/sobexsrv/sobexsrv-1.0.1.ebuild | 76 |
5 files changed, 189 insertions, 0 deletions
diff --git a/app-mobilephone/sobexsrv/Manifest b/app-mobilephone/sobexsrv/Manifest new file mode 100644 index 000000000000..03962875d7d8 --- /dev/null +++ b/app-mobilephone/sobexsrv/Manifest @@ -0,0 +1,2 @@ +DIST sobexsrv-1.0.1-fix64.patch 25040 SHA256 83e052e7a63fb53b74b81d51cd5d614a5df29626243700b632c0d14832497cf8 SHA512 9d555bee8d03c13061bbe132df6442daa4d8817ef713e92e5150b1994af110c5b01b34f8bcc1c3ae734529e36bb70f56976ab261f860e95e3de3ffe440a7b393 WHIRLPOOL 4b177c4b4afb921f6580b761ed74845ed27a800b7a0b89ea57e8ed6a28670d2499f44a92688d4c852fbd8562488cda355d5f96ae795dc4bad05a459883499f87 +DIST sobexsrv-1.0.1.tar.gz 27683 SHA256 d3b6db12eb8d0c06d0b7845ca64213e5beb042dd0f1a2e7a753cb7b4b0596069 SHA512 52fe5eff812596caa1f4b8579740ce8b2591db17950d68c093cfdb33ca5b899bfc5c142594843948a29ae0b1bdbe4499a1e24c270c92e61d02fd07a02d9d40cd WHIRLPOOL 984a9413b9e73d570918d115665220bb9beac1dd6a8afb5418eb199be7c369bf6ab81411d746ff51f6b427b2fa77045a3e9d19b2acd7b4de5d330a1c6ab33ba4 diff --git a/app-mobilephone/sobexsrv/files/conf.d_sobexsrv b/app-mobilephone/sobexsrv/files/conf.d_sobexsrv new file mode 100644 index 000000000000..1afdc0c772e3 --- /dev/null +++ b/app-mobilephone/sobexsrv/files/conf.d_sobexsrv @@ -0,0 +1,35 @@ +# /etc/conf.d/sobexsrv +# Config file for sobexsrv daemon + +# owner of sobexsrv process (don't change, must be existing) +USER="sobexsrv" +GROUP="sobexsrv" + +# Incomming of pushed files +INBOX="/var/spool/sobexsrv" + +# chroot to INBOX. +# *NEEDS* the binary to be suid root (not installed by default). +#CHROOT="yes" + +# Listen on the specified RFCOMM channel. If this option is not specified the +# first available channel will be used. Legal range for channel is 1-31 and 0 +# to force auto selection of first available channel. +CHANNEL="10" + +# Set Bluetooth security mode-2 level. Legal values are: 1 (insecure) every- +# body can connect, 2 authentication required and 3 authentication and encryp- +# tion required. +SECURITY_LEVEL="2" + +# Don't register OPUSH service at local ServiceDiscoveryProtocol Server. +#DISABLE_OPUSH="yes" +# Don't register OBEX-FTP service at local ServiceDiscoveryProtocol Server. +DISABLE_OBEXFTP="yes" +DISABLE_OBEXFTP_LISTING="yes" + +# Enable transfer log via syslog(8). +USE_SYSLOG="yes" + +# Additional options. See sobexsrv(8) +#SOBEXSRV_OPT="-l NPTD -m /etc/sobexsrv-mime" diff --git a/app-mobilephone/sobexsrv/files/init.d_sobexsrv b/app-mobilephone/sobexsrv/files/init.d_sobexsrv new file mode 100644 index 000000000000..a1e5cd95889a --- /dev/null +++ b/app-mobilephone/sobexsrv/files/init.d_sobexsrv @@ -0,0 +1,59 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + need bluetooth + use logger +} + +check_config() { + if [[ -z "${USER}" ]] ; then + eerror "Please set \$USER in /etc/conf.d/sobexsrv!" + return 1 + fi + if [[ -z "${GROUP}" ]] ; then + eerror "Please set \$GROUP in /etc/conf.d/sobexsrv!" + return 1 + fi + + if [[ ${CHROOT} == "yes" ]] ; then + if [[ ! -u /usr/bin/sobexsrv ]] ; then + eerror "The \$CHROOT option requires /usr/bin/sobexsrv to be suid root!" + return 1 + fi + fi + + if [[ -z "${INBOX}" || ! -e "${INBOX}" ]] ; then + eerror "Please configure \$INBOX correctly in /etc/conf.d/sobexsrv!" + return 1 + fi +} + + +start() { + check_config || return 1 + + ebegin "Starting sobexsrv" + + OPTIONS="" + [[ -n "${CHANNEL}" ]] && OPTIONS="${OPTIONS} -c ${CHANNEL}" + [[ -n "${SECURITY_LEVEL}" ]] && OPTIONS="${OPTIONS} -s ${SECURITY_LEVEL}" + [[ "${CHROOT}" == "yes" ]] && OPTIONS="${OPTIONS} -R" + [[ "${DISABLE_OPUSH}" == "yes" ]] && OPTIONS="${OPTIONS} -o" + [[ "${DISABLE_OBEXFTP}" == "yes" ]] && OPTIONS="${OPTIONS} -f" + [[ "${DISABLE_OBEXFTP_LISTING}" == "yes" ]] && OPTIONS="${OPTIONS} -F" + [[ "${USE_SYSLOG}" == "yes" ]] && OPTIONS="${OPTIONS} -S" + + OPTIONS="-I -r ${INBOX} ${OPTIONS} ${SOBEXSRV_OPT}" + + start-stop-daemon --chuid ${USER}:${GROUP} --start --quiet --exec /usr/bin/sobexsrv -- $OPTIONS + eend $? +} + +stop() { + ebegin "Stopping sobexsrv" + start-stop-daemon --stop --quiet --exec /usr/bin/sobexsrv + eend $? +} diff --git a/app-mobilephone/sobexsrv/metadata.xml b/app-mobilephone/sobexsrv/metadata.xml new file mode 100644 index 000000000000..740257557dd5 --- /dev/null +++ b/app-mobilephone/sobexsrv/metadata.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> + <email>joker@gentoo.org</email> + <name>Christian Birchinger</name> +</maintainer> + <longdescription>sobexsrv is a Bluetooth OBEX server with Bluetooth +Security Mode-2 (application triggered security) support. It implements +OPUSH (put), OPULL (get) and OBEX-FTP (setpath + directory listing) and +therefore is a full OBEX server. Further it supports pulling generic +mime-types and provides a capability object. sobexsrv was designed with +flexibility and security in mind and supports chroot (if suid root drop to +calling uid immediately). For flexibility a scripting interface provides +access to all functionalities of the server and therefore allows +implementation of further OBEX services on top of sobexsrv.</longdescription> +</pkgmetadata> diff --git a/app-mobilephone/sobexsrv/sobexsrv-1.0.1.ebuild b/app-mobilephone/sobexsrv/sobexsrv-1.0.1.ebuild new file mode 100644 index 000000000000..a3246ca62949 --- /dev/null +++ b/app-mobilephone/sobexsrv/sobexsrv-1.0.1.ebuild @@ -0,0 +1,76 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +inherit eutils toolchain-funcs user + +MY_P="${P/_pre/pre}" + +IUSE="gtk" + +DESCRIPTION="Scripting/Secure OBEX Server (for BlueZ Linux)" +SRC_URI="http://www.mulliner.org/bluetooth/${MY_P}.tar.gz + http://dev.gentoo.org/~joker/${P}-fix64.patch" +HOMEPAGE="http://www.mulliner.org/bluetooth/sobexsrv.php" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="amd64 ppc x86" + +DEPEND="dev-libs/openobex + net-wireless/bluez" +RDEPEND="${DEPEND} + gtk? ( >=dev-python/pygtk-2.2 )" + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + enewgroup sobexsrv + enewuser sobexsrv -1 -1 /var/spool/sobexsrv sobexsrv +} + +src_unpack() { + unpack ${A} + + cd "${S}" + + epatch "${DISTDIR}/${P}"-fix64.patch || die "fix64 patch failed" + + sed -e 's:/usr/man/man8:/usr/share/man/man8:' \ + -i Makefile + + sed -e 's/^CFLAGS =/CFLAGS +=/' \ + -e 's/^CC =/CC ?=/' \ + -e 's/$(CC) $(CFLAGS)/$(CC) $(LDFLAGS) $(CFLAGS)/' \ + -i src/Makefile +} + +src_compile() { + tc-export CC + emake || die "emake failed" +} + +src_install() { + make DESTDIR="${D}" install || die "make install failed" + dodoc AUTHOR CHANGELOG CONFIG README SECURITY TODO + + use gtk || rm "${D}/usr/bin/sobexsrv_handler" + + newinitd "${FILESDIR}/init.d_sobexsrv" sobexsrv + newconfd "${FILESDIR}/conf.d_sobexsrv" sobexsrv + + keepdir /var/spool/sobexsrv + fowners sobexsrv:sobexsrv /var/spool/sobexsrv +} + +pkg_postinst() { + elog + elog "/usr/bin/sobexsrv is *NOT* installed set-uid root by" + elog "default. suid is required for the chroot option (-R)." + elog + elog "Execute the following commands to enable suid:" + elog + elog "chown root:sobexsrv /usr/bin/sobexsrv" + elog "chmod 4710 /usr/bin/sobexsrv" + elog +} |