summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-admin/checksec')
-rw-r--r--app-admin/checksec/Manifest2
-rw-r--r--app-admin/checksec/checksec-1.7.4.ebuild (renamed from app-admin/checksec/checksec-1.7.3.ebuild)29
-rw-r--r--app-admin/checksec/checksec-99999999.ebuild29
-rw-r--r--app-admin/checksec/files/_checksec38
-rw-r--r--app-admin/checksec/files/path.patch10
-rw-r--r--app-admin/checksec/metadata.xml6
6 files changed, 32 insertions, 82 deletions
diff --git a/app-admin/checksec/Manifest b/app-admin/checksec/Manifest
index d3506ea3..7f39643f 100644
--- a/app-admin/checksec/Manifest
+++ b/app-admin/checksec/Manifest
@@ -1 +1 @@
-DIST checksec-1.7.3.tar.gz 49136 SHA256 d9bb3dd6be95a4d30d3ebe6adb8ae2aa64db0b9d2c475db00134a9596d555cbf
+DIST checksec-1.7.4.tar.gz 51677 SHA256 ffa9b73b41f97d341fca5d46ebe93480110450bf37deb1126a29ea8548f854ae
diff --git a/app-admin/checksec/checksec-1.7.3.ebuild b/app-admin/checksec/checksec-1.7.4.ebuild
index 3daae5d8..94624976 100644
--- a/app-admin/checksec/checksec-1.7.3.ebuild
+++ b/app-admin/checksec/checksec-1.7.4.ebuild
@@ -11,7 +11,8 @@ HOMEPAGE="https://github.com/slimm609/checksec.sh"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE="vanilla"
+IUSE="test update"
+DEPEND="test? ( dev-python/demjson dev-libs/libxml2 )"
case ${PV} in
99999999*)
@@ -21,25 +22,18 @@ case ${PV} in
KEYWORDS=""
SRC_URI="";;
*)
- #RESTRICT="mirror"
+ RESTRICT="mirror"
SRC_URI="https://github.com/slimm609/${MY_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
- S="${WORKDIR}"/${MY_PN}-${PV}
+ S=${WORKDIR}/${MY_PN}-${PV}
esac
-
DOCS=( ChangeLog README.md )
src_prepare() {
- local zshcomp
- zshcomp=extras/zsh/_${PN}
- test -f "${zshcomp}" || zshcomp=${FILESDIR}/_${PN}
- if use vanilla
- then cp "${zshcomp}" _${PN} || die
- else sed -e '/--update/d' "${zshcomp}" >_${PN} || die
- cp ${PN} ${PN}.vanilla
- sed -i -e '/--update.*)/,/;;/d' ${PN} || die
- eapply "${FILESDIR}"/path.patch
+ if ! use update
+ then sed -i -e '/--update/d' extras/zsh/_${PN} || die
+ sed -i -e 's/^\([ ]*pkg_release=\)false/\1true/' ${PN} || die
fi
eapply_user
}
@@ -47,7 +41,12 @@ src_prepare() {
src_install() {
dobin ${PN}
insinto /usr/share/zsh/site-functions
- doins _${PN}
+ doins extras/zsh/_${PN}
einstalldocs
- ! test -d extras/man || doman extras/man/*
+ doman extras/man/*
+}
+
+src_test() {
+ cd tests || return 0
+ ./test-checksec.sh || die
}
diff --git a/app-admin/checksec/checksec-99999999.ebuild b/app-admin/checksec/checksec-99999999.ebuild
index 3daae5d8..94624976 100644
--- a/app-admin/checksec/checksec-99999999.ebuild
+++ b/app-admin/checksec/checksec-99999999.ebuild
@@ -11,7 +11,8 @@ HOMEPAGE="https://github.com/slimm609/checksec.sh"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE="vanilla"
+IUSE="test update"
+DEPEND="test? ( dev-python/demjson dev-libs/libxml2 )"
case ${PV} in
99999999*)
@@ -21,25 +22,18 @@ case ${PV} in
KEYWORDS=""
SRC_URI="";;
*)
- #RESTRICT="mirror"
+ RESTRICT="mirror"
SRC_URI="https://github.com/slimm609/${MY_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
- S="${WORKDIR}"/${MY_PN}-${PV}
+ S=${WORKDIR}/${MY_PN}-${PV}
esac
-
DOCS=( ChangeLog README.md )
src_prepare() {
- local zshcomp
- zshcomp=extras/zsh/_${PN}
- test -f "${zshcomp}" || zshcomp=${FILESDIR}/_${PN}
- if use vanilla
- then cp "${zshcomp}" _${PN} || die
- else sed -e '/--update/d' "${zshcomp}" >_${PN} || die
- cp ${PN} ${PN}.vanilla
- sed -i -e '/--update.*)/,/;;/d' ${PN} || die
- eapply "${FILESDIR}"/path.patch
+ if ! use update
+ then sed -i -e '/--update/d' extras/zsh/_${PN} || die
+ sed -i -e 's/^\([ ]*pkg_release=\)false/\1true/' ${PN} || die
fi
eapply_user
}
@@ -47,7 +41,12 @@ src_prepare() {
src_install() {
dobin ${PN}
insinto /usr/share/zsh/site-functions
- doins _${PN}
+ doins extras/zsh/_${PN}
einstalldocs
- ! test -d extras/man || doman extras/man/*
+ doman extras/man/*
+}
+
+src_test() {
+ cd tests || return 0
+ ./test-checksec.sh || die
}
diff --git a/app-admin/checksec/files/_checksec b/app-admin/checksec/files/_checksec
deleted file mode 100644
index 35b3a6ae..00000000
--- a/app-admin/checksec/files/_checksec
+++ /dev/null
@@ -1,38 +0,0 @@
-#compdef checksec
-local curcontext="$curcontext" state state_descr line
-typeset -A opt_args
-_arguments -C : \
-'--version[print version]' \
-{'(--help)-h','(-h)--help'}'[print help]' \
-'-d[debug mode]' \
-{'(--update)--upgrade','(--upgrade)--update'}'[update program]' \
-{'(--format --output)-o','(-o --output)--format','(-o --format)--output'}'[use specified output format]:output format:->format' \
-{'(--dir)-d','(-d)--dir'}'[\[-v\] check specified DIR]:vdir:->vdir' \
-'--file[check specified FILE]:file to check:_files' \
-'--proc[check specifiec process NAME)]:process name:->procname' \
-'--proc-all[check all processes]' \
-'--proc-libs[check specified ID'\''s process libs)]:process ID to check: _pids' \
-'--kernel[check kernel]' \
-'--fortify-file[check specified FILE for fortify)]:file for fortify:_files' \
-'--fortify-proc[check specied ID'\''s process for fortify)]:process ID for fortify: _pids'
-local ret=$?
-case $state in
-format)
- local formats
- formats=(
- 'cli:use cli output format'
- 'csv:use csv output format'
- 'xml:use xml output format'
- 'json:use json output format'
- )
- _describe -t formats 'output format' formats
- ret=$?;;
-procname)
- compadd "$expl[@]" ${${${${(f)"$(_call_program processes-names ps ${${EUID/(#s)0(#e)/xa}//[0-9]#/}ho command 2> /dev/null)"//[][\(\)]/}:#(ps|COMMAND|-*)}%%\ *}:t}
- ret=$?;;
-vdir)
- compadd "$expl[@]" -v
- _files -/
- ret=0;;
-esac
-return ret
diff --git a/app-admin/checksec/files/path.patch b/app-admin/checksec/files/path.patch
deleted file mode 100644
index 18344610..00000000
--- a/app-admin/checksec/files/path.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- 1/checksec
-+++ 1/checksec
-@@ -59,6 +59,7 @@
-
- #set global lang to C
- export LC_ALL="C"
-+export PATH="${PATH}:/usr/sbin:/sbin" # for sysctl
-
- # global vars
- debug=false
diff --git a/app-admin/checksec/metadata.xml b/app-admin/checksec/metadata.xml
index 3d46eda1..0946c882 100644
--- a/app-admin/checksec/metadata.xml
+++ b/app-admin/checksec/metadata.xml
@@ -13,7 +13,7 @@
<upstream>
<remote-id type="github">slimm609/checksec.sh</remote-id>
</upstream>
- <use>
- <flag name="vanilla">Use unpatched version with self-update functionality (not recommended)</flag>
- </use>
+ <use>
+ <flag name="update">Support self-update functionality outside of the package-manager</flag>
+ </use>
</pkgmetadata>