adding brokenlibs checker scripts

This commit is contained in:
mudler
2016-02-22 16:37:54 +01:00
parent c7abf2e24b
commit fae9e91583
4 changed files with 56 additions and 0 deletions
+2
View File
@@ -28,3 +28,5 @@ install:
install -m 0755 sabayon-buildpackages $(DESTDIR)/$(UBINDIR)/
install -m 0755 sabayon-createrepo $(DESTDIR)/$(UBINDIR)/
install -m 0755 sabayon-entropypreservedlibs $(DESTDIR)/$(UBINDIR)/
install -m 0755 sabayon-brokenlibs $(DESTDIR)/$(UBINDIR)/
install -m 0755 sabayon-bz2brokenlibs $(DESTDIR)/$(UBINDIR)/
+26
View File
@@ -0,0 +1,26 @@
#!/bin/bash
PACKAGES=()
bin=$1
. /sbin/sabayondevkit-functions.sh
[ -z "$bin" ] && die "No Arg given"
# Getting linked libraries
for i in $(ldd $1 | cut -d \( -f1 | cut -d \> -f2 | grep "/" | xargs echo)
do
package=$(equo q belongs -q $i)
[ -z "$package" ] && die "borked: $i"
PACKAGES+=($package)
done
# Unique and ordered
U_PACKAGES=$(echo "${PACKAGES[@]}" | tr ' ' '\n' | sort -u | tr '\n' ' ')
if [ "${#PACKAGES}" -ne 0 ]; then
for i in ${U_PACKAGES[@]}
do
echo " $i"
done
fi
+26
View File
@@ -0,0 +1,26 @@
#!/bin/bash
. /sbin/sabayondevkit-functions.sh
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# the temp directory used, within $DIR
WORK_DIR=`mktemp -d -p "$DIR"`
# deletes the temp directory
function cleanup {
rm -rf "$WORK_DIR"
}
# register the cleanup function to be called on the EXIT signal
trap cleanup EXIT
tbz=$1
[ -z "$tbz" ] && die "No Arg given"
tar xjf "$tbz" -C "$WORK_DIR"
for file in $(find "$WORK_DIR" | xargs echo)
do
[ -f "$file" ] && /usr/bin/sabayon-brokenlibs "$file"
done
+2
View File
@@ -7,6 +7,8 @@ check_docker_requirements(){
ps aux | grep -q '[d]ocker' || echo "--> Be sure to have the docker daemon running (sudo systemctl start docker) of configure it to run on boot (sudo systemctl enable docker). Trying to start it anyway" && sudo systemctl start docker
}
die() { echo "$@" 1>&2 ; exit 1; }
build() {
local SEARCH=$1
local EMERGE_DEFAULT_ARGS=${2:---accept-properties=-interactive --verbose --oneshot --nospinner --quiet-build=y --quiet-fail --fail-clean=y --complete-graph --buildpkg}