[apparmor] [PATCH v2 4/5] Makefile: Add coverity target

Tyler Hicks tyhicks at canonical.com
Thu Jan 7 17:30:00 UTC 2016


On 2016-01-06 20:44:46, Tyler Hicks wrote:
> Add a target that uses cov-build, which must be found in $PATH, to
> generate an intermediate Coverity directory. The intermediate Coverity
> directory will be based on a clean snapshot of the last commit in the
> bzr tree. Finally, the intermediate directory is converted to a
> compressed tarball, stored in
> coverity/apparmor-<SNAPSHOT_VERSION>-cov-int.tar.gz, that is suitable
> for uploading to scan.coverity.com.
> 
> Signed-off-by: Tyler Hicks <tyhicks at canonical.com>
> ---

Hold off on reviewing this one. My initial Coverity build upload was
scanned a moment ago and the scan failed because the untarred directory
name must be "cov-int".

I've adjusted the Makefile and resubmitted a new build. If it works,
I'll send out a new version of this patch.

Tyler

>  Makefile | 13 ++++++++++---
>  1 file changed, 10 insertions(+), 3 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index b3f5130..6f0be36 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -24,6 +24,7 @@ REPO_URL?=https://code.launchpad.net/~apparmor-dev/apparmor/master
>  #REPO_URL=.
>  #REPO_URL="bzr+ssh://bazaar.launchpad.net/~sbeattie/+junk/apparmor-dev/"
>  
> +COVERITY_DIR=coverity
>  RELEASE_DIR=apparmor-${VERSION}
>  __SETUP_DIR?=.
>  
> @@ -44,13 +45,19 @@ tarball: clean
>  	tar ${TAR_EXCLUSIONS} -cvzf ${RELEASE_DIR}.tar.gz ${RELEASE_DIR}
>  
>  .PHONY: snapshot
> -snapshot: REPO_VERSION:=$(shell $(value REPO_VERSION_CMD))
> -snapshot: SNAPSHOT_NAME=apparmor-$(VERSION)~$(REPO_VERSION)
> +snapshot coverity: REPO_VERSION:=$(shell $(value REPO_VERSION_CMD))
> +snapshot coverity: SNAPSHOT_NAME=apparmor-$(VERSION)~$(REPO_VERSION)
>  snapshot: clean
>  	make export_dir __EXPORT_DIR=${SNAPSHOT_NAME} __REPO_VERSION=${REPO_VERSION} ; \
>  	make setup __SETUP_DIR=${SNAPSHOT_NAME} ; \
>  	tar ${TAR_EXCLUSIONS} -cvzf ${SNAPSHOT_NAME}.tar.gz ${SNAPSHOT_NAME} ;
>  
> +.PHONY: coverity
> +coverity: COV_INT=$(COVERITY_DIR)/$(SNAPSHOT_NAME)-cov-int
> +coverity: snapshot
> +	cd $(SNAPSHOT_NAME)/libraries/libapparmor && ./configure --with-python
> +	$(foreach dir, $(DIRS), cov-build --dir $(COV_INT) -- make -C $(SNAPSHOT_NAME)/$(dir);)
> +	tar -cvzf $(COV_INT).tar.gz $(COV_INT)
>  
>  .PHONY: export_dir
>  export_dir:
> @@ -60,7 +67,7 @@ export_dir:
>  
>  .PHONY: clean
>  clean:
> -	-rm -rf ${RELEASE_DIR} ./apparmor-${VERSION}~*
> +	-rm -rf ${RELEASE_DIR} ./apparmor-${VERSION}~* ${COVERITY_DIR}
>  	for dir in $(DIRS); do \
>  		make -C $$dir clean; \
>  	done
> -- 
> 2.5.0
> 
> 
> -- 
> AppArmor mailing list
> AppArmor at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20160107/745e9ef4/attachment.pgp>


More information about the AppArmor mailing list