4 3

[alpine-aports] oath-toolkit port - request for review

systmkor
Details
Message ID
<1443151257-3396-1-git-send-email-systmkor@gmail.com>
Sender timestamp
1443151256
DKIM signature
missing
Download raw message
I would appreciate a review of this port. I prefer more fine-grained
packages for users to be able to install specifically what they want
but I'm not sure if I made too many sub-packages..


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

[alpine-aports] [PATCH] testing/oath-toolkit: new aport

systmkor
Details
Message ID
<1443151257-3396-2-git-send-email-systmkor@gmail.com>
In-Reply-To
<1443151257-3396-1-git-send-email-systmkor@gmail.com> (view parent)
Sender timestamp
1443151257
DKIM signature
missing
Download raw message
Patch: +222 -0
OATH Toolkit provides components for building one-time password
authentication systems.
http://www.nongnu.org/oath-toolkit/

ref #1847
---
 testing/oath-toolkit/APKBUILD | 222 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 222 insertions(+)
 create mode 100644 testing/oath-toolkit/APKBUILD

diff --git a/testing/oath-toolkit/APKBUILD b/testing/oath-toolkit/APKBUILD
new file mode 100644
index 0000000..4aa6379
--- /dev/null
+++ b/testing/oath-toolkit/APKBUILD
@@ -0,0 +1,222 @@
+# Contributor:
+# Maintainer:
+pkgname=oath-toolkit
+pkgver=2.6.1
+pkgrel=0
+pkgdesc="The OATH Toolkit provide components for building one-time password authentication systems."
+url="http://www.nongnu.org/oath-toolkit/"
+arch="any"
+license="LGPL2+ GPL3+"
+depends="liboath=$pkgver-r$pkgrel libpskc=$pkgver-r$pkgrel oathtool=$pkgver-r$pkgrel pskctool=$pkgver-r$pkgrel pam-oath=$pkgver-r$pkgrel"
+depends_dev=""
+makedepends="$depends_dev xmlsec-dev linux-pam-dev libxml2-dev"
+install=""
+subpackages="$pkgname-doc $pkgname-dev
+	     liboath liboath-doc:liboath_doc liboath-dev:liboath_dev
+	     libpskc libpskc-doc:libpskc_doc libpskc-dev:libpskc_dev
+	     oathtool oathtool-doc:oathtool_doc
+	     pskctool pskctool-doc:pskctool_doc
+	     pam-oath:pam_oath pam-oath-doc:pam_oath_doc"
+source="http://download.savannah.gnu.org/releases/${pkgname}/${pkgname}-${pkgver}.tar.gz"
+
+_builddir=${srcdir}/${pkgname}-${pkgver}
+prepare() {
+	local i
+	cd "$_builddir"
+	for i in $source; do
+		case $i in
+		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+		esac
+	done
+}
+
+build() {
+	cd "$_builddir"
+	./configure \
+		--build=$CBUILD \
+		--host=$CHOST \
+		--prefix=/usr \
+		--sysconfdir=/etc \
+		--mandir=/usr/share/man \
+		--infodir=/usr/share/info \
+		--localstatedir=/var \
+		|| return 1
+	make || return 1
+}
+
+package() {
+	cd "$_builddir"
+	make DESTDIR="$pkgdir" install || return 1
+
+	install -D -m 644 COPYING "$pkgdir/usr/share/licenses/$pkgname/LICENSE" || return 1
+	# libpskc & liboath use the same LICENSE and libpskc doesn't have a COPYING file in it's subdir
+	install -D -m 644 liboath/COPYING "$pkgdir/usr/share/licenses/liboath/LICENSE" || return 1
+	install -D -m 644 liboath/COPYING "$pkgdir/usr/share/licenses/libpskc/LICENSE" || return 1
+	# oathtool & pskctool use the same LICENSE and pskctool doesn't have a COPYING file in it's subdir
+	install -D -m 644 oathtool/COPYING "$pkgdir/usr/share/licenses/oathtool/LICENSE" || return 1
+	install -D -m 644 oathtool/COPYING "$pkgdir/usr/share/licenses/pskctool/LICENSE" || return 1
+	install -D -m 644 pam_oath/COPYING "$pkgdir/usr/share/licenses/pam-oath/LICENSE" || return 1
+
+	install -D -m 644 README "$pkgdir/usr/share/doc/$pkgname/README" || return 1
+	install -D -m 644 AUTHORS "$pkgdir/usr/share/doc/$pkgname/AUHTORS" || return 1
+	install -D -m 644 pam_oath/README "$pkgdir/usr/share/doc/pam-oath/README" || return 1
+	install -D -m 644 libpskc/README "$pkgdir/usr/share/doc/libpskc/README" || return 1
+	rm -f "$pkgdir"/usr/lib/*.la
+}
+
+doc() {
+	arch="noarch"
+	depends="
+	     liboath-doc=$pkgver-r$pkgrel 
+	     libpskc-doc=$pkgver-r$pkgrel
+	     oathtool-doc=$pkgver-r$pkgrel
+	     pskctool-doc=$pkgver-r$pkgrel
+	     pam-oath-doc=$pkgver-r$pkgrel
+	     "
+	provides="oath-toolkit-doc=$pkgver-r$pkgrel"
+	pkgdesc="oath-toolkit (documentation)"
+	mkdir -p ${subpkgdir}/usr/share/doc || return 1
+	mv ${pkgdir}/usr/share/doc/oath-toolkit ${subpkgdir}/usr/share/doc/ || return 1
+}
+
+dev() {
+	depends="
+	     liboath=$pkgver-r$pkgrel liboath-doc=$pkgver-r$pkgrel liboath-dev=$pkgver-r$pkgrel
+	     libpskc=$pkgver-r$pkgrel libpskc-doc=$pkgver-r$pkgrel libpskc-dev=$pkgver-r$pkgrel
+	     oathtool=$pkgver-r$pkgrel oathtool-doc=$pkgver-r$pkgrel oathtool-dev=$pkgver-r$pkgrel
+	     pskctool=$pkgver-r$pkgrel pskctool-doc=$pkgver-r$pkgrel pskctool-dev=$pkgver-r$pkgrel
+	     pam-oath=$pkgver-r$pkgrel pam-oath-doc=$pkgver-r$pkgrel
+	     "
+	provides="oath-toolkit-dev=$pkgver-r$pkgrel"
+	pkgdesc="The OATH Toolkit provide components for building one-time password authentication systems. (development files)"
+	mkdir -p ${subpkgdir} || return 1
+}
+
+pam_oath() {
+	depends="linux-pam"
+	provides="pam-oath=$pkgver-r$pkgrel"
+	pkgdesc="A PAM module for pluggable login authentication for OATH."
+	mkdir -p ${subpkgdir}/usr/lib/security || return 1
+	mkdir -p ${subpkgdir}/usr/share/licenses || return 1
+	mv ${pkgdir}/usr/lib/security/* ${subpkgdir}/usr/lib/security/ || return 1
+	ls ${pkgdir}/usr/share/licenses 
+	mv ${pkgdir}/usr/share/licenses/pam-oath ${subpkgdir}/usr/share/licenses/ || return 1
+}
+
+pam_oath_doc() {
+	arch="noarch"
+	depends=""
+	provides="pam-oath-doc=$pkgver-r$pkgrel"
+	pkgdesc="pam-oath (documentation)"
+	mkdir -p ${subpkgdir}/usr/share/doc || return 1
+	mv ${pkgdir}/usr/share/doc/pam-oath ${subpkgdir}/usr/share/doc/ || return 1
+}
+
+liboath() {
+	depends=""
+	provides="liboath=$pkgver-r$pkgrel"
+	pkgdesc="A shared and static C library for OATH handling."
+	mkdir -p ${subpkgdir}/usr/lib || return 1
+	mkdir -p ${subpkgdir}/usr/share/licenses || return 1
+	mv ${pkgdir}/usr/lib/liboath.* ${subpkgdir}/usr/lib/ || return 1
+	mv ${pkgdir}/usr/share/licenses/liboath ${subpkgdir}/usr/share/licenses/ || return 1
+}
+
+liboath_doc() {
+	arch="noarch"
+	depends=""
+	provides="liboath-doc=$pkgver-r$pkgrel"
+	pkgdesc="liboath (documentation)"
+	mkdir -p ${subpkgdir}/usr/share/man/man3 || return 1
+	mkdir -p ${subpkgdir}/usr/share/gtk-doc/html || return 1
+	mv ${pkgdir}/usr/share/man/man3/oath* ${subpkgdir}/usr/share/man/man3/ || return 1
+	mv ${pkgdir}/usr/share/gtk-doc/html/liboath ${subpkgdir}/usr/share/gtk-doc/html/ || return 1
+}
+
+liboath_dev() {
+	depends="liboath=$pkgver-r$pkgrel liboath-doc=$pkgver-r$pkgrel"
+	provides="liboath-doc=$pkgver-r$pkgrel"
+	pkgdesc="liboath (documentation)"
+	mkdir -p ${subpkgdir}/usr/include || return 1
+	mkdir -p ${subpkgdir}/usr/lib/pkgconfig || return 1
+	mv ${pkgdir}/usr/include/liboath ${subpkgdir}/usr/include/ || return 1
+	mv ${pkgdir}/usr/lib/pkgconfig/liboath.pc ${subpkgdir}/usr/lib/pkgconfig/ || return 1
+}
+
+oathtool() {
+	depends=""
+	provides="oathtool=$pkgver-r$pkgrel"
+	pkgdesc="A command line tool for generating and validating OTPs."
+	mkdir -p ${subpkgdir}/usr/bin || return 1
+	mkdir -p ${subpkgdir}/usr/share/licenses || return 1
+	mv ${pkgdir}/usr/bin/oathtool ${subpkgdir}/usr/bin/ || return 1
+	mv ${pkgdir}/usr/share/licenses/oathtool ${subpkgdir}/usr/share/licenses/ || return 1
+}
+
+oathtool_doc() {
+	arch="noarch"
+	depends=""
+	provides="oathtool-doc=$pkgver-r$pkgrel"
+	pkgdesc="oathtool (documentation)"
+	mkdir -p ${subpkgdir}/usr/share/man/man1 || return 1
+	mv ${pkgdir}/usr/share/man/man1/oathtool.1 ${subpkgdir}/usr/share/man/man1/ || return 1
+}
+
+libpskc() {
+	depends=""
+	provides="libpskc=$pkgver-r$pkgrel"
+	pkgdesc="A shared and static C library for PSKC handling."
+	mkdir -p ${subpkgdir}/usr/lib || return 1
+	mkdir -p ${subpkgdir}/usr/share/xml || return 1
+	mkdir -p ${subpkgdir}/usr/share/licenses || return 1
+	mv ${pkgdir}/usr/lib/libpskc.* ${subpkgdir}/usr/lib/ || return 1
+	mv ${pkgdir}/usr/share/xml/pskc ${subpkgdir}/usr/share/xml/ || return 1
+	mv ${pkgdir}/usr/share/licenses/libpskc ${subpkgdir}/usr/share/licenses/ || return 1
+}
+
+libpskc_doc() {
+	arch="noarch"
+	depends=""
+	provides="libpskc-doc=$pkgver-r$pkgrel"
+	pkgdesc="libpskc (documentation)"
+	mkdir -p ${subpkgdir}/usr/share/man/man3 || return 1
+	mkdir -p ${subpkgdir}/usr/share/gtk-doc/html || return 1
+	mkdir -p ${subpkgdir}/usr/share/doc || return 1
+	mv ${pkgdir}/usr/share/man/man3/pskc* ${subpkgdir}/usr/share/man/man3/ || return 1
+	mv ${pkgdir}/usr/share/gtk-doc/html/libpskc ${subpkgdir}/usr/share/gtk-doc/html/ || return 1
+	mv ${pkgdir}/usr/share/doc/libpskc ${subpkgdir}/usr/share/doc/ || return 1
+}
+
+libpskc_dev() {
+	depends="libpskc=$pkgver-r$pkgrel libpskc-doc=$pkgver-r$pkgrel"
+	provides="libpskc-dev=$pkgver-r$pkgrel"
+	pkgdesc="libpskc (documentation)"
+	mkdir -p ${subpkgdir}/usr/include || return 1
+	mkdir -p ${subpkgdir}/usr/lib/pkgconfig || return 1
+	mv ${pkgdir}/usr/include/pskc ${subpkgdir}/usr/include/ || return 1
+	mv ${pkgdir}/usr/lib/pkgconfig/libpskc.pc ${subpkgdir}/usr/lib/pkgconfig/ || return 1
+}
+
+pskctool() {
+	depends=""
+	provides="pskctool=$pkgver-r$pkgrel"
+	pkgdesc="A command line tool for manipulating PSKC data."
+	mkdir -p ${subpkgdir}/usr/bin || return 1
+	mkdir -p ${subpkgdir}/usr/share/licenses || return 1
+	mv ${pkgdir}/usr/bin/pskctool ${subpkgdir}/usr/bin/ || return 1
+	mv ${pkgdir}/usr/share/licenses/pskctool ${subpkgdir}/usr/share/licenses/ || return 1
+}
+
+pskctool_doc() {
+	arch="noarch"
+	depends=""
+	provides="pskctool-doc=$pkgver-r$pkgrel"
+	pkgdesc="pskctool (documentation)"
+	mkdir -p ${subpkgdir}/usr/share/man/man1 || return 1
+	mv ${pkgdir}/usr/share/man/man1/pskctool.1 ${subpkgdir}/usr/share/man/man1/ || return 1
+}
+
+
+md5sums="19ee7ed7c2b40c1dc92887f893ed2726  oath-toolkit-2.6.1.tar.gz"
+sha256sums="9c57831907bc26eadcdf90ba1827d0bd962dd1f737362e817a1dd6d6ec036f79  oath-toolkit-2.6.1.tar.gz"
+sha512sums="59feadbc06d11a52bf5879493227c40358fc1f4f17ec3ff92e3a313e47b92f3154396fa3ff38ef163852b32c8bfcef1f59753b614d0138478b8f7e7971f55e62  oath-toolkit-2.6.1.tar.gz"
-- 
2.4.1



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

Re: [alpine-aports] [PATCH] testing/oath-toolkit: new aport

Sören Tempel
Details
Message ID
<20150925140255.GA3483@calcium.lan>
In-Reply-To
<1443151257-3396-2-git-send-email-systmkor@gmail.com> (view parent)
Sender timestamp
1443189775
DKIM signature
missing
Download raw message
I didn't look at the entire thing but here is just one quick thing I
noticed: Please add an install_if[1] variable to your doc packages.

[1]: http://git.alpinelinux.org/cgit/abuild/tree/abuild.in#n1378

Sören.


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

Re: [alpine-aports] [PATCH] testing/oath-toolkit: new aport

Sören Tempel
Details
Message ID
<20150925141322.GA6041@francium.lan>
In-Reply-To
<1443151257-3396-2-git-send-email-systmkor@gmail.com> (view parent)
Sender timestamp
1443190402
DKIM signature
missing
Download raw message
Noticed some more things on a second look:

On 24.09.15, systmkor wrote:
> +package() {
> +	cd "$_builddir"
> +	make DESTDIR="$pkgdir" install || return 1
> +
> +	install -D -m 644 COPYING "$pkgdir/usr/share/licenses/$pkgname/LICENSE" || return 1
> +	# libpskc & liboath use the same LICENSE and libpskc doesn't have a COPYING file in it's subdir
> +	install -D -m 644 liboath/COPYING "$pkgdir/usr/share/licenses/liboath/LICENSE" || return 1
> +	install -D -m 644 liboath/COPYING "$pkgdir/usr/share/licenses/libpskc/LICENSE" || return 1
> +	# oathtool & pskctool use the same LICENSE and pskctool doesn't have a COPYING file in it's subdir
> +	install -D -m 644 oathtool/COPYING "$pkgdir/usr/share/licenses/oathtool/LICENSE" || return 1
> +	install -D -m 644 oathtool/COPYING "$pkgdir/usr/share/licenses/pskctool/LICENSE" || return 1
> +	install -D -m 644 pam_oath/COPYING "$pkgdir/usr/share/licenses/pam-oath/LICENSE" || return 1
> +
> +	install -D -m 644 README "$pkgdir/usr/share/doc/$pkgname/README" || return 1
> +	install -D -m 644 AUTHORS "$pkgdir/usr/share/doc/$pkgname/AUHTORS" || return 1
> +	install -D -m 644 pam_oath/README "$pkgdir/usr/share/doc/pam-oath/README" || return 1
> +	install -D -m 644 libpskc/README "$pkgdir/usr/share/doc/libpskc/README" || return 1
> +	rm -f "$pkgdir"/usr/lib/*.la
> +}

Removing *.la files manually isn't necessary they are removed
automatically unless you use the 'libtool' option.

On 24.09.15, systmkor wrote:
> +doc() {
> +	arch="noarch"
> +	depends="
> +	     liboath-doc=$pkgver-r$pkgrel 
> +	     libpskc-doc=$pkgver-r$pkgrel
> +	     oathtool-doc=$pkgver-r$pkgrel
> +	     pskctool-doc=$pkgver-r$pkgrel
> +	     pam-oath-doc=$pkgver-r$pkgrel
> +	     "
> +	provides="oath-toolkit-doc=$pkgver-r$pkgrel"
> +	pkgdesc="oath-toolkit (documentation)"
> +	mkdir -p ${subpkgdir}/usr/share/doc || return 1
> +	mv ${pkgdir}/usr/share/doc/oath-toolkit ${subpkgdir}/usr/share/doc/ || return 1
> +}

Why are you overwriting the default doc subpackage function provided by
abuild? And why does this doc function depend on other doc subpackages?

On 24.09.15, systmkor wrote:
> +dev() {
> +	depends="
> +	     liboath=$pkgver-r$pkgrel liboath-doc=$pkgver-r$pkgrel liboath-dev=$pkgver-r$pkgrel
> +	     libpskc=$pkgver-r$pkgrel libpskc-doc=$pkgver-r$pkgrel libpskc-dev=$pkgver-r$pkgrel
> +	     oathtool=$pkgver-r$pkgrel oathtool-doc=$pkgver-r$pkgrel oathtool-dev=$pkgver-r$pkgrel
> +	     pskctool=$pkgver-r$pkgrel pskctool-doc=$pkgver-r$pkgrel pskctool-dev=$pkgver-r$pkgrel
> +	     pam-oath=$pkgver-r$pkgrel pam-oath-doc=$pkgver-r$pkgrel
> +	     "
> +	provides="oath-toolkit-dev=$pkgver-r$pkgrel"
> +	pkgdesc="The OATH Toolkit provide components for building one-time password authentication systems. (development files)"
> +	mkdir -p ${subpkgdir} || return 1
> +}

Again: Why don't you use the default dev subpackage function provided by
abuild, the depends here can be specified in the depends_dev variable.

Sören.


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

Re: [alpine-aports] [PATCH] testing/oath-toolkit: new aport

Isaac Dunham
Details
Message ID
<20150926015828.GA3026@newbook>
In-Reply-To
<20150925141322.GA6041@francium.lan> (view parent)
Sender timestamp
1443232709
DKIM signature
missing
Download raw message
On Fri, Sep 25, 2015 at 04:13:22PM +0200, Sören Tempel wrote:
> On 24.09.15, systmkor wrote:
> > +doc() {
> > +	arch="noarch"
> > +	depends="
> > +	     liboath-doc=$pkgver-r$pkgrel 
> > +	     libpskc-doc=$pkgver-r$pkgrel
> > +	     oathtool-doc=$pkgver-r$pkgrel
> > +	     pskctool-doc=$pkgver-r$pkgrel
> > +	     pam-oath-doc=$pkgver-r$pkgrel
> > +	     "
> > +	provides="oath-toolkit-doc=$pkgver-r$pkgrel"
> > +	pkgdesc="oath-toolkit (documentation)"
> > +	mkdir -p ${subpkgdir}/usr/share/doc || return 1
> > +	mv ${pkgdir}/usr/share/doc/oath-toolkit ${subpkgdir}/usr/share/doc/ || return 1
> > +}
> 
> Why are you overwriting the default doc subpackage function provided by
> abuild? And why does this doc function depend on other doc subpackages?

It seems this is so you get an oath-toolkit-doc package that drags in all
the documentation.

> On 24.09.15, systmkor wrote:
> > +dev() {
> > +	depends="
> > +	     liboath=$pkgver-r$pkgrel liboath-doc=$pkgver-r$pkgrel liboath-dev=$pkgver-r$pkgrel
> > +	     libpskc=$pkgver-r$pkgrel libpskc-doc=$pkgver-r$pkgrel libpskc-dev=$pkgver-r$pkgrel
> > +	     oathtool=$pkgver-r$pkgrel oathtool-doc=$pkgver-r$pkgrel oathtool-dev=$pkgver-r$pkgrel
> > +	     pskctool=$pkgver-r$pkgrel pskctool-doc=$pkgver-r$pkgrel pskctool-dev=$pkgver-r$pkgrel
> > +	     pam-oath=$pkgver-r$pkgrel pam-oath-doc=$pkgver-r$pkgrel
> > +	     "
> > +	provides="oath-toolkit-dev=$pkgver-r$pkgrel"
> > +	pkgdesc="The OATH Toolkit provide components for building one-time password authentication systems. (development files)"
> > +	mkdir -p ${subpkgdir} || return 1
> > +}
> 
> Again: Why don't you use the default dev subpackage function provided by
> abuild, the depends here can be specified in the depends_dev variable.

This seems to be a convenience package for if you want "everything for
developing with the OATH toolkit".


I am somewhat suspicious that needing two metapackages for development
indicates overly aggressive splitting-up.

systmkor, could you give some justification for splitting it into so many
libraries?

How much space does each library take when installed?
Does one of the libraries have more dependencies than another?
Is it likely that someone will link to one library but not the other?

(If space is not in the multi-megabyte range, it's probably too much
division--unless you have a library which some packages use alone
with a smaller set of dependencies.)

Thanks,
Isaac Dunham



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