Patches for aports can be sent to this list

2

[alpine-aports] [PATCH] testing/3proxy: new aport

sillysausage
Details
Message ID
<1448712594-3255-1-git-send-email-sillysausage@privatedemail.net>
Sender timestamp
1448712594
DKIM signature
missing
Download raw message
Patch: +90 -0
http://3proxy.ru/
Really tiny cross-platform proxy servers set.
---
 testing/3proxy/3proxy.initd       | 29 +++++++++++++++++++++
 testing/3proxy/3proxy.pre-install |  6 +++++
 testing/3proxy/APKBUILD           | 55 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 90 insertions(+)
 create mode 100644 testing/3proxy/3proxy.initd
 create mode 100644 testing/3proxy/3proxy.pre-install
 create mode 100644 testing/3proxy/APKBUILD

diff --git a/testing/3proxy/3proxy.initd b/testing/3proxy/3proxy.initd
new file mode 100644
index 0000000..5c55b05
--- /dev/null
+++ b/testing/3proxy/3proxy.initd
@@ -0,0 +1,29 @@
+#!/sbin/runscript
+#
+# Start 3proxy tiny proxy server.
+#
+
+CONFFILE=/etc/${SVCNAME}/${SVCNAME}.cfg
+PIDFILE=/var/run/${SVCNAME}.pid
+
+depend() {
+	need net
+}
+
+start() {
+	if [ ! -f "${CONFFILE}" ]; then
+		eerror "Configuration file ${CONFFILE} not found!"
+		return 1
+	fi
+
+	ebegin "Starting 3proxy"
+	start-stop-daemon --start --quiet --exec /usr/bin/3proxy --pidfile "${PIDFILE}" \
+		-- --pidfile "${PIDFILE}" --user 3proxy.3proxy "${CONFFILE}" #2>/dev/null
+	eend $?
+}
+
+stop() {
+	ebegin "Stopping 3proxy"
+	start-stop-daemon --stop --quiet --pidfile "${PIDFILE}"
+	eend $?
+}
diff --git a/testing/3proxy/3proxy.pre-install b/testing/3proxy/3proxy.pre-install
new file mode 100644
index 0000000..b1e227a
--- /dev/null
+++ b/testing/3proxy/3proxy.pre-install
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+addgroup 3proxy 2>/dev/null
+adduser -S -G 3proxy -h /var/log/3proxy -s /sbin/nologin -D 3proxy 2>/dev/null
+exit 0
+
diff --git a/testing/3proxy/APKBUILD b/testing/3proxy/APKBUILD
new file mode 100644
index 0000000..775d934
--- /dev/null
+++ b/testing/3proxy/APKBUILD
@@ -0,0 +1,55 @@
+# Contributor: sillysausage <sillysausage@privatedemail.net>
+# Maintainer:
+pkgname=3proxy
+pkgver=0.7.1.3
+pkgrel=0
+pkgdesc="Really tiny cross-platform proxy servers set"
+url="http://3proxy.ru"
+arch="all"
+license="3proxy"
+pkgusers="3proxy"
+pkggroups="3proxy"
+depends=
+makedepends="linux-headers"
+install="3proxy.pre-install"
+subpackages="$pkgname-doc"
+source="https://github.com/z3APA3A/$pkgname/archive/$pkgname-$pkgver.tar.gz
+        $pkgname.initd"
+
+_builddir=$srcdir/$pkgname-$pkgname-$pkgver
+
+prepare() {
+	cd "$srcdir/$pkgname-$pkgname-$pkgver"
+	for i in $source; do
+		case $i in
+		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+		esac
+	done
+}
+
+build() {
+	cd "$_builddir"
+	make -f Makefile.Linux prefix="/usr" || return 1
+}
+
+package() {
+	cd "$_builddir"
+	make -f Makefile.Linux DESTDIR="$pkgdir" prefix="/usr" install || return 1
+	install -Dm755 "$srcdir"/3proxy.initd "$pkgdir"/etc/init.d/3proxy || return 1
+	mv "$pkgdir"/usr/etc/3proxy "$pkgdir"/etc/3proxy || return 1
+	chown -R 3proxy:3proxy "$pkgdir"/etc/3proxy || return 1
+	install -Dm644 copying "$pkgdir"/usr/share/licenses/$pkgname/COPYING || return 1
+	
+}
+
+doc() {
+	mkdir -p "$subpkgdir"/usr/share || return 1
+	mv "$pkgdir"/usr/share/licenses "$subpkgdir"/usr/share/licenses || return 1
+	mv "$pkgdir"/usr/share/man "$subpkgdir"/usr/share/man || return 1
+}
+md5sums="4754d5cf7071db9eb8013bbd739836f8  3proxy-0.7.1.3.tar.gz
+debcf0b8c2a6827e438ad3addec5fbc4  3proxy.initd"
+sha256sums="4d1f3cf539c8a32f5845b54e8a3fdbabef6fe8a6bbb06dfc80f7361804f6cb60  3proxy-0.7.1.3.tar.gz
+b7837c5817cbb45a96c92fa119ba623f3a1a5ca6849dfd85518bbea163baefe8  3proxy.initd"
+sha512sums="d72e5ca79a55ad9cde6c9becfc1674aa7a38fb52ee73b479aee8747d52bb9966c8cf73f348f2a2c8319afcbedb9e7ba8bea485a785204d7ee1a9ab21e3a1d9ef  3proxy-0.7.1.3.tar.gz
+5425792d0babc75221b5a35996a1fa47a6d0b9a435edde7b63e0344b7d58ab96b18f1c5fb28e798df36cb342d9793d530dbcdd0102cc5fb04a70ca525c924576  3proxy.initd"
-- 
2.4.1



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
sillysausage
Details
Message ID
<20151128225832.764393f0@palanthas.192.168.1.1>
In-Reply-To
<1448712594-3255-1-git-send-email-sillysausage@privatedemail.net> (view parent)
Sender timestamp
1448713712
DKIM signature
missing
Download raw message
This is my first aport, so any suggestions/improvements would be
welcome. 

A few questions:


Question 1:
===============

I noticed this when compiling 3proxy:

scanelf: rpath_security_checks(): Security problem NULL DT_RPATH

Not entirely sure what that is about. It seems to be an error I saw
with quite a few of the binaries.

Should I raise this with upstream?

I noticed that upstream seems to have ignored quite a few compiler
warnings. Don't know why developers do that :(


Question 2:
===============

It's also my first OpenRC script, I based it off their sysvinit script:
https://github.com/z3APA3A/3proxy/blob/devel/scripts/rc.d/proxy.sh

Gentoo https://gitweb.gentoo.org/repo/gentoo.git/tree/net-proxy/3proxy/
didn't have an OpenRC script to borrow, so I tried to write my own.


Question 3:
===============
In regard to the moving around of some files. Is that correct? Should I
patch the Makefile.Linux
https://github.com/z3APA3A/3proxy/blob/devel/Makefile.Linux is that a
better approach? in

I had written this with using the following resources.

http://wiki.alpinelinux.org/wiki/Creating_an_Alpine_package
http://wiki.alpinelinux.org/wiki/Creating_patches
http://wiki.alpinelinux.org/wiki/Writing_Init_Scripts
https://wiki.gentoo.org/wiki/Handbook:X86/Working/Initscripts


---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
sillysausage
Details
Message ID
<565AF457.4070207@privatedemail.net>
In-Reply-To
<20151128225832.764393f0@palanthas.192.168.1.1> (view parent)
Sender timestamp
1448801367
DKIM signature
missing
Download raw message
I have opened this on my Github fork of aports. I was told that there is
now the ability to make pulls from github instead of git-email to the
mailing list.

https://github.com/supersillysausage/aports/commit/87e3b7309439f9a6633261df801cfff59b5b5fc9

There are some improvements to this APKBUILD. Still have not solved the
scanelf: rpath_security_checks(): Security problem NULL DT_RPATH error.

I have tried a number of things with _mjones but none of those things
helped.

It apparently doesn't happen with edge releases of Alpine Linux, just 3.2.3

Any assistance with this would be welcome.


---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---