FreeBSD Bugzilla – Attachment 151513 Details for
Bug 195203
[stage-qa] bsd.port.mk: New check 'proxydeps': checks for the missing package dependencies
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Updated patch
patch-add-qa-proxydeps-update.patch (text/plain), 4.82 KB, created by
Yuri Victorovich
on 2015-01-12 22:38:25 UTC
(
hide
)
Description:
Updated patch
Filename:
MIME Type:
Creator:
Yuri Victorovich
Created:
2015-01-12 22:38:25 UTC
Size:
4.82 KB
patch
obsolete
>Index: Mk/bsd.port.mk >=================================================================== >--- Mk/bsd.port.mk (revision 376889) >+++ Mk/bsd.port.mk (working copy) >@@ -4805,6 +4805,11 @@ > ${PKG_QUERY} "\"%n\": {origin: %o, version: \"%v\"}" " " ${_LIB_RUN_DEPENDS:C,[^:]*:([^:]*):?.*,\1,:C,${PORTSDIR}/,,} 2>/dev/null || : ; \ > fi > >+ACTUAL-PACKAGE-DEPENDS-NAMES?= \ >+ if [ "${_LIB_RUN_DEPENDS}" != " " ]; then \ >+ ${PKG_QUERY} "%n-%v" " " ${_LIB_RUN_DEPENDS:C,[^:]*:([^:]*):?.*,\1,:C,${PORTSDIR}/,,} 2>/dev/null || : ; \ >+ fi >+ > create-manifest: > @${MKDIR} ${METADIR}; \ > (\ >@@ -4874,6 +4879,9 @@ > actual-package-depends: > @${ACTUAL-PACKAGE-DEPENDS} > >+actual-package-depends-names: >+ @${ACTUAL-PACKAGE-DEPENDS-NAMES} >+ > # Build packages for port and dependencies > > package-recursive: package >@@ -5254,7 +5262,7 @@ > .if !target(stage-qa) > stage-qa: > @${ECHO_MSG} "====> Running Q/A tests (stage-qa)" >- @${SETENV} ${QA_ENV} ${SH} ${SCRIPTSDIR}/qa.sh >+ @${SETENV} ${QA_ENV} ${SH} ${SCRIPTSDIR}/qa.sh "${PKGBASE}-${PKGVERSION}" "`${ACTUAL-PACKAGE-DEPENDS-NAMES}`" > .endif > > # Fake installation of package so that user can pkg delete it later. >Index: Mk/Scripts/qa.sh >=================================================================== >--- Mk/Scripts/qa.sh (revision 376889) >+++ Mk/Scripts/qa.sh (working copy) >@@ -7,6 +7,16 @@ > exit 1 > fi > >+usage () { >+ echo "usage: $0 pkg-name pkg-deps" >+ exit 1 >+} >+ >+[ "$#" -eq 2 ] || usage >+ >+PKG_NAME=$1 >+PKG_DEPS=$2 >+ > LF=$(printf '\nX') > LF=${LF%X} > >@@ -18,6 +28,19 @@ > echo "Error: $@" >&2 > } > >+listcontains() { >+ local str lst elt >+ str=$1 >+ lst=$2 >+ >+ for elt in ${lst} ; do >+ if [ ${elt} = ${str} ] ; then >+ return 0 >+ fi >+ done >+ return 1 >+} >+ > shebangonefile() { > local f interp rc > >@@ -255,8 +278,80 @@ > fi > } > >-checks="shebang symlinks paths stripped desktopfileutils sharedmimeinfo suidfiles libtool libperl" >+proxydeps_suggest_uses() { >+ local pkg=$1 >+ local lib_file=$2 >+ >+ if expr ${pkg} : '^gettext-[0-9]' > /dev/null ; then >+ warn "you need USES+=gettext" >+ elif expr ${pkg} : '^glib-2' > /dev/null ; then >+ warn "you need USE_GNOME+=glib20" >+ elif expr ${pkg} : '^gdk-pixbuf2-' > /dev/null ; then >+ warn "you need USE_GNOME+=gdkpixbuf2" >+ elif expr ${pkg} : '^cairo-[0-9]' > /dev/null ; then >+ warn "you need USE_GNOME+=cairo" >+ # Xorg-libraries: this should be by XORG_MODULES @ bsd.xorg.mk >+ elif echo ${pkg} | grep -E '^lib(X11|Xau|Xdmcp|Xext|SM|ICE|Xfixes|Xft|Xdamage|Xcomposite|Xcursor|Xinerama|Xmu|Xmuu|Xpm|Xt|Xtst|Xi|Xrandr|Xrender|Xres|Xv|Xxf86vm|Xxf86dga|Xxf86misc)-' > /dev/null ; then >+ warn "you need USE_XORG+=$(echo ${pkg} | sed -E 's/^lib(.+)\-.*/\1/' | tr '[:upper:]' '[:lower:]')" >+ # Qt4 >+ elif echo ${pkg} | grep -E '^qt4-([a-z0-9]+)-[0-9]' > /dev/null ; then >+ warn "you need USE_QT4+=$(echo ${pkg} | sed -E 's/^qt4-([a-z0-9]+)-[0-9].*/\1/')" >+ # Qt5 >+ elif echo ${pkg} | grep -E '^qt5-([a-z]+)-[0-9]' > /dev/null ; then >+ warn "you need USE_QT5+=$(echo ${pkg} | sed -E 's/^qt5-([a-z]+)-[0-9].*/\1/')" >+ elif expr ${lib_file} : "${LOCALBASE}/lib/[^/]*$" > /dev/null ; then >+ warn "you need LIB_DEPENDS+=${lib_file#${LOCALBASE}/lib/}:\${PORTSDIR}/$(pkg info -o ${pkg} | sed -E 's/^[^[:space:]]+[[:space:]]+//g')" >+ fi >+} > >+proxydeps_check() { >+ local pkg=$1 >+ local filelist=$2 >+ local deplist=$3 >+ >+ local file dep_file dep_file_pkg already pkg_dep_files >+ >+ # check for every dynamic executable >+ for file in ${filelist}; do >+ pkg_dep_files=$(ldd -a "${file}" | \ >+ awk 'BEGIN {section=0}; /^\// {section++} /^[^\/]/ {if(section<=1) print}' | \ >+ sed -e 's/.*=> //' | sed -e 's/ .*//') >+ # check every dependency file >+ for dep_file in $pkg_dep_files; do >+ if listcontains ${dep_file} "${already}" ; then >+ continue >+ fi >+ if ! (expr "$dep_file" : '^/lib/' \| "$dep_file" : '^/usr/lib/' > /dev/null) ; then >+ if $(pkg which ${dep_file} > /dev/null 2>&1) ; then >+ dep_file_pkg=$(pkg which ${dep_file} | sed -e 's/.* installed by package //g') >+ if ! listcontains ${dep_file_pkg} "${deplist} ${pkg}" ; then >+ warn "dependency file ${dep_file} belongs to the package ${dep_file_pkg} which isn't declared as a dependency" >+ proxydeps_suggest_uses ${dep_file_pkg} ${dep_file} >+ fi >+ else >+ warn "dependency file ${dep_file} doesn't belong to any package" >+ fi >+ fi >+ already="${already} ${dep_file}" >+ done >+ done >+} >+ >+ >+proxydeps() { >+ # finds all dynamic executables which have dependencies that aren't within the >+ # declared set of dependencies in this port >+ local filelist >+ filelist=`find ${STAGEDIR} -type f \ >+ \( -perm -u+x -or -perm -g+x -or -perm -o+x \) \ >+ -and -exec /bin/sh -c "ldd {} > /dev/null 2>&1" \; \ >+ -and -exec echo {} \;` >+ proxydeps_check ${PKG_NAME} "${filelist}" "${PKG_DEPS}" >+} >+ >+ >+checks="shebang symlinks paths stripped desktopfileutils sharedmimeinfo suidfiles libtool libperl proxydeps" >+ > ret=0 > cd ${STAGEDIR} > for check in ${checks}; do
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 195203
:
149628
|
149732
|
151513
|
170556
|
170557