smstools: this shit probably doesn't work but I don't care

This commit is contained in:
Zero_Chaos 2010-07-18 03:40:12 +00:00
parent 799fddc9ca
commit 9e50ccdda5
7 changed files with 249 additions and 0 deletions

View file

@ -0,0 +1,97 @@
# ChangeLog for app-mobilephone/smstools
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
# $Header: /var/cvsroot/gentoo-x86/app-mobilephone/smstools/ChangeLog,v 1.14 2008/10/31 16:28:50 chainsaw Exp $
31 Oct 2008; <chainsaw@gentoo.org> smstools-2.2.20.ebuild:
Update ebuild based on -dev ML feedback by Torsten Veller
<ml-en@veller.net>.
31 Oct 2008; <chainsaw@gentoo.org> -smstools-2.2.9.ebuild,
-smstools-2.2.13.ebuild:
Remove old ebuilds.
31 Oct 2008; <chainsaw@gentoo.org> smstools-2.2.20.ebuild:
Respect CC variable, closes bug #243690 by Diego Pettenò
<flameeyes@gentoo.org>.
31 Jul 2008; Ulrich Mueller <ulm@gentoo.org> metadata.xml:
Add USE flag description to metadata wrt GLEP 56.
*smstools-2.2.20 (14 Jan 2008)
14 Jan 2008; Tony Vroon <chainsaw@gentoo.org> smstools-2.2.9.ebuild,
+smstools-2.2.20.ebuild:
Version bump. Incoming spool should be setgid, as pointed out by
tucksonjack@gmail.com in bug #196366. Also quote a few variables.
04 Nov 2007; Alin Năstac <mrness@gentoo.org> smstools-2.2.9.ebuild,
smstools-2.2.13.ebuild:
Remove useless pkg_preinst function.
*smstools-2.2.13 (04 Dec 2006)
04 Dec 2006; Tony Vroon <chainsaw@gentoo.org>
-files/2.2.12-buffer-overflow.patch, +files/2.2.13-sendsms-chmod.patch,
-files/2.2.12-sendsms-chmod.patch, -smstools-2.2.12-r1.ebuild,
+smstools-2.2.13.ebuild:
Upstream developer Niclas Felske <nfelske@gmx.de> has incorporated the
buffer overflow patch in 2.2.13 and pointed out that the SRC_URI was no
longer correct. Closes bug #157077.
*smstools-2.2.12-r1 (02 Dec 2006)
02 Dec 2006; Tony Vroon <chainsaw@gentoo.org>
+files/2.2.12-sendsms-chmod.patch, metadata.xml, -smstools-2.2.12.ebuild,
+smstools-2.2.12-r1.ebuild:
Necessary chmod for unprivileged operation was missing, added. Primary
maintainership not respected in mobile-phone herd, unherding package.
*smstools-2.2.12 (02 Dec 2006)
02 Dec 2006; Alin Năstac <mrness@gentoo.org>
+files/2.2.12-buffer-overflow.patch, -smstools-2.2.1-r3.ebuild,
-smstools-2.2.3.ebuild, +smstools-2.2.12.ebuild:
Version bump. Fix buffer overflow, thanks to Niclas Felske <nfelske@gmx.de>
(#155928).
*smstools-2.2.9 (20 Oct 2006)
20 Oct 2006; Tony Vroon <chainsaw@gentoo.org> +smstools-2.2.9.ebuild:
Version bump, as requested by Alin Nastac <mrness@gentoo.org> in bug #147927.
*smstools-2.2.3 (02 Jul 2006)
02 Jul 2006; Tony Vroon <chainsaw@gentoo.org> +smstools-2.2.3.ebuild:
Version bump thanks to Jorma Rus <jormarus@operamail.com>, closes bug
#138791. Add ~ppc keyword.
*smstools-2.2.1-r3 (21 Jun 2006)
21 Jun 2006; Tony Vroon <chainsaw@gentoo.org> -smstools-2.2.1-r2.ebuild,
+smstools-2.2.1-r3.ebuild:
Install additional scripts (some as documentation only). Also install HTML
documentation and support statistics with a local USE-flag. Implemented
thanks to the suggestions of Scott McKenzie <nzgreen@operamail.com> in bugs
#137461 and #137463.
*smstools-2.2.1-r2 (15 Jun 2006)
15 Jun 2006; Tony Vroon <chainsaw@gentoo.org> files/smsd.initd,
-smstools-2.2.1-r1.ebuild, +smstools-2.2.1-r2.ebuild:
Run the daemon as an unprivileged user.
*smstools-2.2.1-r1 (15 Jun 2006)
15 Jun 2006; Tony Vroon <chainsaw@gentoo.org>
+files/2.2.1-skip-dirlock.patch, -smstools-2.2.1.ebuild,
+smstools-2.2.1-r1.ebuild:
Automatically create directory structure necessary for normal operation as
suggested by Graham Murray <gmurray@webwayone.co.uk> in bug #136861. Patched
smsd to ignore portage .keep files.
*smstools-2.2.1 (14 Jun 2006)
14 Jun 2006; Tony Vroon <chainsaw@gentoo.org> +files/smsd.initd,
+metadata.xml, +smstools-2.2.1.ebuild:
Initial commit. Ebuild by me.

View file

@ -0,0 +1,7 @@
AUX 2.2.1-skip-dirlock.patch 1391 RMD160 aa201326762f3bebecbc50e4c39d348df4068cad SHA1 58a55162c0d5232250be485b3954157eee6ccbbc SHA256 b0a6273a0f7b81c45c6de283749a3186ab77753f7e29b525729314f799fd78d4
AUX 2.2.13-sendsms-chmod.patch 283 RMD160 87a34603458b7274f9438b3f406017145581a819 SHA1 2faf4466431d660eb30c6eb7a0f191215577576d SHA256 eff119af416a07d9ebf33d9555b4bd6b9ff9df3240d27dc8a4f5f3d62b64b1a4
AUX smsd.initd 528 RMD160 7d713a7a870e5c46110f8fc83fabbd55e16bcad5 SHA1 b846be3c664fcb35b5e4cfd39ffe1628aa3a412c SHA256 62a590e8f17acaa1147e7478b20305c552d2c2793fe09807b5cb4f9232899360
DIST smstools3-3.1.11.tar.gz 289595 RMD160 a8f094483fadf93273c7b21f3e393b3d8b4bb5a2 SHA1 e084d8d7c4f3613929c923d91658149c625fec5f SHA256 bd4b91e56458feeff5e3a2c95e4cb49de10346ee6ba181a7adc2c06d40a9b681
EBUILD smstools-3.1.11.ebuild 1646 RMD160 28ef1061dd20114932c9a6a6625af4df44f2518a SHA1 de0583ba78e01083ecc7ce473cf2b1eba64823b3 SHA256 d421011e52478d8545e175f106301eaeae460186990664cd911bec989891cb06
MISC ChangeLog 3716 RMD160 a26d84b60596107ec85e7bc76ffb40ab3d207540 SHA1 7c233e19157ca5ac2dcab7e980aee85b68117520 SHA256 eea1a0c3ea51d537ac1e40a096a370eef796e01b82aa33d2ec78f93d28b323fd
MISC metadata.xml 318 RMD160 89a98948c0245b37dfbdfd78a3edec173ed33d5b SHA1 3f6c2e9eac39947198a642b1aa87a5aa90000f20 SHA256 9ef0a6739971ffaafc1e2fbb1e48c1f1614b13c0d9bb327a6ab3eb4c24788da2

View file

@ -0,0 +1,38 @@
--- src/extras.c.orig 2006-06-15 10:45:59.000000000 +0100
+++ src/extras.c 2006-06-15 10:45:39.000000000 +0100
@@ -178,20 +178,21 @@
stat(filename,&statbuf);
if (S_ISDIR(statbuf.st_mode)==0) /* Is this a directory? */
{
- /* File found, check for lock file */
- if (strstr(filename,".LOCK")==0) /* Is the file a lock file itself? */
- if (!islocked(filename)) /* no, is there a lock file for this file? */
- {
- /* check if the file grows at the moment (another program writes to it) */
- int groesse1;
- int groesse2;
- groesse1=statbuf.st_size;
- sleep(1);
- stat(filename,&statbuf);
- groesse2=statbuf.st_size;
- if (groesse1==groesse2)
- found=1;
- }
+ /* File found, check for lock file and skip portage directory locks */
+ if (strstr(filename,".keep")==0) /* Is it a portage directory lock? */
+ if (strstr(filename,".LOCK")==0) /* Is the file a lock file itself? */
+ if (!islocked(filename)) /* no, is there a lock file for this file? */
+ {
+ /* check if the file grows at the moment (another program writes to it) */
+ int groesse1;
+ int groesse2;
+ groesse1=statbuf.st_size;
+ sleep(1);
+ stat(filename,&statbuf);
+ groesse2=statbuf.st_size;
+ if (groesse1==groesse2)
+ found=1;
+ }
}
}
closedir(dirdata);

View file

@ -0,0 +1,9 @@
diff -uNr smstools.ORIG/scripts/sendsms smstools/scripts/sendsms
--- smstools.ORIG/scripts/sendsms 2006-12-02 15:26:09.000000000 +0000
+++ smstools/scripts/sendsms 2006-12-02 15:26:52.000000000 +0000
@@ -26,3 +26,5 @@
echo "" >> $FILE
echo -n "$TEXT" >> $FILE
+chmod 660 $FILE
+

View file

@ -0,0 +1,21 @@
#!/sbin/runscript
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-mobilephone/smstools/files/smsd.initd,v 1.2 2006/06/15 12:52:19 chainsaw Exp $
depend() {
need localmount
}
start() {
ebegin "Starting smsd"
start-stop-daemon -b -m -p /var/run/smsd.pid -c smsd:sms --start --exec /usr/bin/smsd -- \
-c /etc/smsd.conf
eend ${?}
}
stop() {
ebegin "Stopping smsd"
start-stop-daemon --stop -p /var/run/smsd.pid
eend ${?}
}

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>no-herd</herd>
<maintainer>
<email>chainsaw@gentoo.org</email>
<name>Tony Vroon</name>
</maintainer>
<use>
<flag name='stats'>Enable statistic reporting</flag>
</use>
</pkgmetadata>

View file

@ -0,0 +1,65 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-mobilephone/smstools/smstools-2.2.20.ebuild,v 1.3 2008/10/31 16:28:50 chainsaw Exp $
inherit eutils toolchain-funcs
DESCRIPTION="Send and receive short messages through GSM modems"
HOMEPAGE="http://smstools.meinemullemaus.de/"
SRC_URI="http://smstools3.kekekasvi.com/packages/${PN}3-${PV}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 ~amd64 ~ppc"
IUSE="stats"
RDEPEND="sys-process/procps
stats? ( >=dev-libs/mm-1.4.0 )"
S="${WORKDIR}"/smstools3
pkg_setup() {
enewgroup sms
enewuser smsd -1 -1 /var/spool/sms sms
}
src_unpack() {
unpack ${A}
cd "${S}"
# epatch "${FILESDIR}"/2.2.1-skip-dirlock.patch
# epatch "${FILESDIR}"/2.2.13-sendsms-chmod.patch
if use stats; then
sed -i -e "s:CFLAGS += -D NOSTATS:#CFLAGS += -D NOSTATS:" src/Makefile
fi
}
src_compile() {
emake CC="$(tc-getCC)" compile || die "emake failed"
}
src_install() {
emake install || die "go fuck yourself"
dobin src/smsd
cd "${S}"/scripts
dobin sendsms sms2html sms2unicode unicode2sms
dobin hex2bin hex2dec email2sms
dodoc mysmsd smsevent smsresend sms2xml sql_demo
keepdir /var/spool/sms/incoming
keepdir /var/spool/sms/outgoing
keepdir /var/spool/sms/checked
chown -R smsd:sms "${D}"/var/spool/sms
chmod g+s "${D}"/var/spool/sms/incoming
newinitd "${FILESDIR}"/smsd.initd smsd
insopts -o smsd -g sms -m0644
insinto /etc
newins "${S}"/examples/smsd.conf.easy smsd.conf
dohtml "${S}"/doc/*
}
pkg_postinst() {
touch "${ROOT}"/var/log/smsd.log
chown -f smsd:sms "${ROOT}"/var/log/smsd.log
}