~alpine/aports

2 2

[alpine-aports] [PATCH] testing/tmate: new aport

Daniel Isaksen <d@duniel.no>
Details
Message ID
<20170927014037.11808-1-d@duniel.no>
Sender timestamp
1506476437
DKIM signature
missing
Download raw message
Patch: +79 -0
---
 testing/tmate/APKBUILD                    | 51 +++++++++++++++++++++++++++++++
 testing/tmate/remove-backtrace-musl.patch | 28 +++++++++++++++++
 2 files changed, 79 insertions(+)
 create mode 100644 testing/tmate/APKBUILD
 create mode 100644 testing/tmate/remove-backtrace-musl.patch

diff --git a/testing/tmate/APKBUILD b/testing/tmate/APKBUILD
new file mode 100644
index 0000000000..82e4bdf021
--- /dev/null
+++ b/testing/tmate/APKBUILD
@@ -0,0 +1,51 @@
# Maintainer: Daniel Isaksen <d@duniel.no>
pkgname=tmate
pkgver=2.2.1
pkgrel=0
pkgdesc="Instant Terminal Sharing"
url="https://tmate.io/"
arch="all"
license="ISC"
depends="ncurses-terminfo"
makedepends="ncurses-dev libevent-dev autoconf automake bsd-compat-headers
	libtool zlib-dev libssh-dev msgpack-c-dev libexecinfo-dev"
install=
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/$pkgname-io/$pkgname/archive/$pkgver.tar.gz
	remove-backtrace-musl.patch"

builddir="$srcdir/"$pkgname-$pkgver

build() {
	cd "$builddir"

	./autogen.sh || return 1

	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	cd "$builddir"
	make check
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install

	install -Dm644 example_tmux.conf \
		"$pkgdir"/usr/share/doc/$pkgname/examples/$pkgname.conf
	for file in CHANGES FAQ README TODO; do
		install -m644 "$file" "$pkgdir"/usr/share/doc/$pkgname/
	done
}

sha512sums="3d4ce7510cd8da39bc4fe63f2a64179846a813bb3560ca811d9e1e2a28b06d95a9033047a900d76bda069c249d7ebbe1143daa082b23212c5d32a50bf1819d2d  tmate-2.2.1.tar.gz
530f17f86688980fb3e0d48adaff70cc413efafda7025be4f1dfaaf5a3d71ab21ee923a1d658d30691464e375aea73ba1b06a4b5545998c4a7df9dc19fc91561  remove-backtrace-musl.patch"
diff --git a/testing/tmate/remove-backtrace-musl.patch b/testing/tmate/remove-backtrace-musl.patch
new file mode 100644
index 0000000000..650634855b
--- /dev/null
+++ b/testing/tmate/remove-backtrace-musl.patch
@@ -0,0 +1,28 @@
This is a quite ugly hack to make it compile.

TODO: use libunwind instead.

---
--- a/tmate-debug.c
+++ b/tmate-debug.c
@@ -60,18 +60,17 @@ void tmate_print_stack_trace(void)
 	char **strings;
 	size_t i;
 
+#if 0
 	size = backtrace (array, 20);
 	strings = backtrace_symbols (array, size);
 
 	tmate_info ("============ %zd stack frames ============", size);
 
 	for (i = 1; i < size; i++) {
-#if DEBUG
 		if (print_resolved_stack_frame(strings[i]) < 0)
-#endif
 			tmate_info("%s", strings[i]);
 	}
-
+#endif
 	free (strings);
 }
 
-- 
2.14.1



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Natanael Copa <ncopa@alpinelinux.org>
Details
Message ID
<20170928115034.7a8789d8@ncopa-desktop.copa.dup.pw>
In-Reply-To
<20170927014037.11808-1-d@duniel.no> (view parent)
Sender timestamp
1506592234
DKIM signature
missing
Download raw message
On Wed, 27 Sep 2017 01:40:37 +0000
Daniel Isaksen <d@duniel.no> wrote:

> ---
>  testing/tmate/APKBUILD                    | 51 +++++++++++++++++++++++++++++++
>  testing/tmate/remove-backtrace-musl.patch | 28 +++++++++++++++++
>  2 files changed, 79 insertions(+)
>  create mode 100644 testing/tmate/APKBUILD
>  create mode 100644 testing/tmate/remove-backtrace-musl.patch
> 
> diff --git a/testing/tmate/APKBUILD b/testing/tmate/APKBUILD
> new file mode 100644
> index 0000000000..82e4bdf021
> --- /dev/null
> +++ b/testing/tmate/APKBUILD
> @@ -0,0 +1,51 @@
> +# Maintainer: Daniel Isaksen <d@duniel.no>
> +pkgname=tmate
> +pkgver=2.2.1
> +pkgrel=0
> +pkgdesc="Instant Terminal Sharing"
> +url="https://tmate.io/"
> +arch="all"
> +license="ISC"
> +depends="ncurses-terminfo"
> +makedepends="ncurses-dev libevent-dev autoconf automake bsd-compat-headers
> +	libtool zlib-dev libssh-dev msgpack-c-dev libexecinfo-dev"

Do you need libexecinfo when you remove the use of backtrace?

-nc

> +install=
> +subpackages="$pkgname-doc"
> +source="$pkgname-$pkgver.tar.gz::https://github.com/$pkgname-io/$pkgname/archive/$pkgver.tar.gz
> +	remove-backtrace-musl.patch"
> +
> +builddir="$srcdir/"$pkgname-$pkgver
> +
> +build() {
> +	cd "$builddir"
> +
> +	./autogen.sh || return 1
> +
> +	./configure \
> +		--build=$CBUILD \
> +		--host=$CHOST \
> +		--prefix=/usr \
> +		--sysconfdir=/etc \
> +		--mandir=/usr/share/man \
> +		--localstatedir=/var
> +	make
> +}
> +
> +check() {
> +	cd "$builddir"
> +	make check
> +}
> +
> +package() {
> +	cd "$builddir"
> +	make DESTDIR="$pkgdir" install
> +
> +	install -Dm644 example_tmux.conf \
> +		"$pkgdir"/usr/share/doc/$pkgname/examples/$pkgname.conf
> +	for file in CHANGES FAQ README TODO; do
> +		install -m644 "$file" "$pkgdir"/usr/share/doc/$pkgname/
> +	done
> +}
> +
> +sha512sums="3d4ce7510cd8da39bc4fe63f2a64179846a813bb3560ca811d9e1e2a28b06d95a9033047a900d76bda069c249d7ebbe1143daa082b23212c5d32a50bf1819d2d  tmate-2.2.1.tar.gz
> +530f17f86688980fb3e0d48adaff70cc413efafda7025be4f1dfaaf5a3d71ab21ee923a1d658d30691464e375aea73ba1b06a4b5545998c4a7df9dc19fc91561  remove-backtrace-musl.patch"
> diff --git a/testing/tmate/remove-backtrace-musl.patch b/testing/tmate/remove-backtrace-musl.patch
> new file mode 100644
> index 0000000000..650634855b
> --- /dev/null
> +++ b/testing/tmate/remove-backtrace-musl.patch
> @@ -0,0 +1,28 @@
> +This is a quite ugly hack to make it compile.
> +
> +TODO: use libunwind instead.
> +
> +---
> +--- a/tmate-debug.c
> ++++ b/tmate-debug.c
> +@@ -60,18 +60,17 @@ void tmate_print_stack_trace(void)
> + 	char **strings;
> + 	size_t i;
> + 
> ++#if 0
> + 	size = backtrace (array, 20);
> + 	strings = backtrace_symbols (array, size);
> + 
> + 	tmate_info ("============ %zd stack frames ============", size);
> + 
> + 	for (i = 1; i < size; i++) {
> +-#if DEBUG
> + 		if (print_resolved_stack_frame(strings[i]) < 0)
> +-#endif
> + 			tmate_info("%s", strings[i]);
> + 	}
> +-
> ++#endif
> + 	free (strings);
> + }
> + 



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Daniel Isaksen <d@duniel.no>
Details
Message ID
<CAFWK1CDkirQT=Rx6KBxc-G0ji7dmqJBkPRCUpjsrPy1LENQN2Q@mail.gmail.com>
In-Reply-To
<20170928115034.7a8789d8@ncopa-desktop.copa.dup.pw> (view parent)
Sender timestamp
1506592894
DKIM signature
missing
Download raw message
I forgot to remove the dependency. I will fix it ASAP - or you can, if you
have the time.

- Daniel

On Sep 28, 2017 11:50 AM, "Natanael Copa" <ncopa@alpinelinux.org> wrote:

> On Wed, 27 Sep 2017 01:40:37 +0000
> Daniel Isaksen <d@duniel.no> wrote:
>
> > ---
> >  testing/tmate/APKBUILD                    | 51
> +++++++++++++++++++++++++++++++
> >  testing/tmate/remove-backtrace-musl.patch | 28 +++++++++++++++++
> >  2 files changed, 79 insertions(+)
> >  create mode 100644 testing/tmate/APKBUILD
> >  create mode 100644 testing/tmate/remove-backtrace-musl.patch
> >
> > diff --git a/testing/tmate/APKBUILD b/testing/tmate/APKBUILD
> > new file mode 100644
> > index 0000000000..82e4bdf021
> > --- /dev/null
> > +++ b/testing/tmate/APKBUILD
> > @@ -0,0 +1,51 @@
> > +# Maintainer: Daniel Isaksen <d@duniel.no>
> > +pkgname=tmate
> > +pkgver=2.2.1
> > +pkgrel=0
> > +pkgdesc="Instant Terminal Sharing"
> > +url="https://tmate.io/"
> > +arch="all"
> > +license="ISC"
> > +depends="ncurses-terminfo"
> > +makedepends="ncurses-dev libevent-dev autoconf automake
> bsd-compat-headers
> > +     libtool zlib-dev libssh-dev msgpack-c-dev libexecinfo-dev"
>
> Do you need libexecinfo when you remove the use of backtrace?
>
> -nc
>
> > +install=
> > +subpackages="$pkgname-doc"
> > +source="$pkgname-$pkgver.tar.gz::https://github.com/$
> pkgname-io/$pkgname/archive/$pkgver.tar.gz
> > +     remove-backtrace-musl.patch"
> > +
> > +builddir="$srcdir/"$pkgname-$pkgver
> > +
> > +build() {
> > +     cd "$builddir"
> > +
> > +     ./autogen.sh || return 1
> > +
> > +     ./configure \
> > +             --build=$CBUILD \
> > +             --host=$CHOST \
> > +             --prefix=/usr \
> > +             --sysconfdir=/etc \
> > +             --mandir=/usr/share/man \
> > +             --localstatedir=/var
> > +     make
> > +}
> > +
> > +check() {
> > +     cd "$builddir"
> > +     make check
> > +}
> > +
> > +package() {
> > +     cd "$builddir"
> > +     make DESTDIR="$pkgdir" install
> > +
> > +     install -Dm644 example_tmux.conf \
> > +             "$pkgdir"/usr/share/doc/$pkgname/examples/$pkgname.conf
> > +     for file in CHANGES FAQ README TODO; do
> > +             install -m644 "$file" "$pkgdir"/usr/share/doc/$pkgname/
> > +     done
> > +}
> > +
> > +sha512sums="3d4ce7510cd8da39bc4fe63f2a6417
> 9846a813bb3560ca811d9e1e2a28b06d95a9033047a900d76bda069c249d
> 7ebbe1143daa082b23212c5d32a50bf1819d2d  tmate-2.2.1.tar.gz
> > +530f17f86688980fb3e0d48adaff70cc413efafda7025be4f1dfaaf5a3d7
> 1ab21ee923a1d658d30691464e375aea73ba1b06a4b5545998c4a7df9dc19fc91561
> remove-backtrace-musl.patch"
> > diff --git a/testing/tmate/remove-backtrace-musl.patch
> b/testing/tmate/remove-backtrace-musl.patch
> > new file mode 100644
> > index 0000000000..650634855b
> > --- /dev/null
> > +++ b/testing/tmate/remove-backtrace-musl.patch
> > @@ -0,0 +1,28 @@
> > +This is a quite ugly hack to make it compile.
> > +
> > +TODO: use libunwind instead.
> > +
> > +---
> > +--- a/tmate-debug.c
> > ++++ b/tmate-debug.c
> > +@@ -60,18 +60,17 @@ void tmate_print_stack_trace(void)
> > +     char **strings;
> > +     size_t i;
> > +
> > ++#if 0
> > +     size = backtrace (array, 20);
> > +     strings = backtrace_symbols (array, size);
> > +
> > +     tmate_info ("============ %zd stack frames ============", size);
> > +
> > +     for (i = 1; i < size; i++) {
> > +-#if DEBUG
> > +             if (print_resolved_stack_frame(strings[i]) < 0)
> > +-#endif
> > +                     tmate_info("%s", strings[i]);
> > +     }
> > +-
> > ++#endif
> > +     free (strings);
> > + }
> > +
>
>
Reply to thread Export thread (mbox)