~alpine/aports

1

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

Details
Message ID
<1421625101-11123-1-git-send-email-systmkor@gmail.com>
Sender timestamp
1421625101
DKIM signature
missing
Download raw message
Patch: +43 -0
Tool designed to test which standard Linux OS and PaX security features
are being used.
http://www.trapkit.de/tools/checksec.html
---
 testing/checksec/APKBUILD | 43 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100644 testing/checksec/APKBUILD

diff --git a/testing/checksec/APKBUILD b/testing/checksec/APKBUILD
new file mode 100644
index 0000000..9d459f8
--- /dev/null
+++ b/testing/checksec/APKBUILD
@@ -0,0 +1,43 @@
# Contributor: Orion <systmkor@gmail.com>
# Maintainer: Orion <systmkor@gmail.com>
# Reference
#   https://www.archlinux.org/packages/community/any/checksec/
pkgname=checksec
pkgver=1.5
pkgrel=0
pkgdesc="Tool designed to test which standard Linux OS and PaX security features are being used"
url="http://www.trapkit.de/tools/checksec.html"
arch="noarch"
license="BSD"
depends="bash"
depends_dev=""
makedepends="$depends_dev"
install=""
subpackages=""
source="http://www.trapkit.de/tools/checksec.sh"

_builddir=$srcdir
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"
}

package() {
	cd "$_builddir"
	install -Dm755 checksec.sh "$pkgdir/usr/bin/checksec"
	install -d "$pkgdir/usr/share/licenses/$pkgname"
	tail -n +3 checksec.sh | head -32 | cut -c3- > "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

md5sums="075996be339ab16ad7b94d6de3ee07bd  checksec.sh"
sha256sums="77b8a7fd9393d10def665658a41176ee745d5c7969a4a0f43cefcc8a4cd90947  checksec.sh"
sha512sums="de72caf32c9c3b53384b34b16ea86b29dad42ce7c8db5c769166dc43bcfdde91790e99f268d30151512c89550af6e7b19701d9561081cfa92bb7aeacd2306d04  checksec.sh"
-- 
2.2.1



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Natanael Copa <ncopa@alpinelinux.org>
Details
Message ID
<20150121133036.2eac8006@ncopa-desktop.alpinelinux.org>
In-Reply-To
<1421625101-11123-1-git-send-email-systmkor@gmail.com> (view parent)
Sender timestamp
1421843436
DKIM signature
missing
Download raw message
On Sun, 18 Jan 2015 15:51:41 -0800
systmkor <systmkor@gmail.com> wrote:

> Tool designed to test which standard Linux OS and PaX security features
> are being used.
> http://www.trapkit.de/tools/checksec.html
> ---
>  testing/checksec/APKBUILD | 43 +++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 43 insertions(+)
>  create mode 100644 testing/checksec/APKBUILD
> 
> diff --git a/testing/checksec/APKBUILD b/testing/checksec/APKBUILD
> new file mode 100644
> index 0000000..9d459f8
> --- /dev/null
> +++ b/testing/checksec/APKBUILD
> @@ -0,0 +1,43 @@
> +# Contributor: Orion <systmkor@gmail.com>
> +# Maintainer: Orion <systmkor@gmail.com>
> +# Reference
> +#   https://www.archlinux.org/packages/community/any/checksec/
> +pkgname=checksec
> +pkgver=1.5
> +pkgrel=0
> +pkgdesc="Tool designed to test which standard Linux OS and PaX security features are being used"
> +url="http://www.trapkit.de/tools/checksec.html"
> +arch="noarch"
> +license="BSD"
> +depends="bash"
> +depends_dev=""
> +makedepends="$depends_dev"
> +install=""
> +subpackages=""
> +source="http://www.trapkit.de/tools/checksec.sh"

No version number in the source url. What happens when they release
next version? The builders will find the 'checksec.sh' file cached and
will re-use that. So checksum will fail on builders.

Since this is a simple shell file, we could maybe even just copy it to
our aports git repository?

This will bite us later. better fix it now.

-nc


> +
> +_builddir=$srcdir
> +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"
> +}
> +
> +package() {
> +	cd "$_builddir"
> +	install -Dm755 checksec.sh "$pkgdir/usr/bin/checksec"
> +	install -d "$pkgdir/usr/share/licenses/$pkgname"
> +	tail -n +3 checksec.sh | head -32 | cut -c3- > "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
> +}
> +
> +md5sums="075996be339ab16ad7b94d6de3ee07bd  checksec.sh"
> +sha256sums="77b8a7fd9393d10def665658a41176ee745d5c7969a4a0f43cefcc8a4cd90947  checksec.sh"
> +sha512sums="de72caf32c9c3b53384b34b16ea86b29dad42ce7c8db5c769166dc43bcfdde91790e99f268d30151512c89550af6e7b19701d9561081cfa92bb7aeacd2306d04  checksec.sh"



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)