click-review assumes Ubuntu vendor

Bug #1617288 reported by GabrieLucas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Click Reviewers tools (obsolete)
Expired
Undecided
Unassigned

Bug Description

Hello,

There is a bug in the click-review tool. I found it using the ubuntu-sdk-ide trying to build and validate a click package.

When the command click-review is executed the following error appears:
ERROR: Could not find vendor 'ubuntu'

The trace is this and the click package is attached.

click-review webapp.gb_0.1_all.click
ERROR: Could not find vendor 'ubuntu'
ERROR: Could not find vendor 'ubuntu'
Traceback (most recent call last):
  File "/usr/bin/click-review", line 138, in <module>
    main()
  File "/usr/bin/click-review", line 132, in main
    results.run_all_checks()
  File "/usr/bin/click-review", line 105, in run_all_checks
    self._run_module_checks(module)
  File "/usr/bin/click-review", line 92, in _run_module_checks
    review.do_checks()
  File "/usr/lib/python3/dist-packages/clickreviews/cr_common.py", line 566, in do_checks
    func()
  File "/usr/lib/python3/dist-packages/clickreviews/cr_security.py", line 476, in check_template
    templates = self._get_templates(vendor, version)
  File "/usr/lib/python3/dist-packages/clickreviews/cr_security.py", line 282, in _get_templates
    for k in self.aa_policy[vendor][version]['templates'].keys():
KeyError: 'ubuntu'

The bug is probably related with the assumtion that the operating system is Ubuntu.
I´m using Trisquel 7.0

lsb_release -a
Distributor ID: Trisquel
Description: Trisquel GNU/Linux 7.0, Belenos
Release: 7.0
Codename: belenos

Tags: click-review
Revision history for this message
GabrieLucas (gabitogol) wrote :
Revision history for this message
GabrieLucas (gabitogol) wrote :

This is the erros the ubuntu-sdk-ide are showing up

Revision history for this message
Zoltan Balogh (bzoltan) wrote :

It is more like a missing feature than a bug. The c-r-t supports only native Ubuntu vendor.

I wonder if manually altering the $HOME/.cache/click-reviewers-tools/apparmor-easyprof-ubuntu.json would provide a hackaround.

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

The ubuntu vendor is used because that is all that is currently supported by the store. I tested click-review locally against webapp.gb_0.1_all.click.

Can you provide steps on how to reproduce including OS version, how you are running click-review and where you got it from?

Changed in click-reviewers-tools:
status: New → Incomplete
Revision history for this message
GabrieLucas (gabitogol) wrote :

Hello again,

@Zoltan

I tried what you told but I didn´t find the file

$ ls .cache/click-reviewers-tools/
frameworks.json

I get no results from this command
sudo find / -name apparmor-easyprof-ubuntu.json

@Jamie

Did the "webapp.gb_0.1_all.click" work for you?

When I do

$click-review webapp.gb_0.1_all.click

I get the errors described above.

My OS is Trisquel 7.0

lsb_release -a
Distributor ID: Trisquel
Description: Trisquel GNU/Linux 7.0, Belenos
Release: 7.0
Codename: belenos

I got the sdk from

deb http://ppa.launchpad.net/ubuntu-sdk-team/tools-development/ubuntu trusty main

This is the version: 0.35-0~550~ubuntu14.04.1

Do you know where to keep looking?

-----------------

sudo apt-cache show click-reviewers-tools
Package: click-reviewers-tools
Priority: optional
Section: devel
Installed-Size: 752
Maintainer: Ubuntu Appstore Developers <email address hidden>
Architecture: all
Version: 0.35-0~550~ubuntu14.04.1
Recommends: squashfs-tools
Depends: binutils, python3-apt, python3-debian, python3-lxml, python3-magic, python3-simplejson, python3-xdg, python3-yaml, python3, python3:any (>= 3.3.2-2~)
Filename: pool/main/c/click-reviewers-tools/click-reviewers-tools_0.35-0~550~ubuntu14.04.1_all.deb
Size: 73798
MD5sum: 52260db04289af2044c091f31756653c
SHA1: b12dc4f1ba14dc84d003ad260e75245d41657bd1
SHA256: 959a383347105708630af1bda823678948554c278e8d5d7586be3eea9b3b14eb
Description-en: tools to review click packages
 These scripts can be used to review click packages both manually and in a
 programmatic fashion.
Description-md5: 3e24901c144a5166e25fee1b5e0c1ab6
Original-Maintainer: Ubuntu Appstore Developers <email address hidden>

Package: click-reviewers-tools
Priority: optional
Section: universe/devel
Installed-Size: 256
Maintainer: Ubuntu Developers <email address hidden>
Original-Maintainer: Ubuntu Appstore Developers <email address hidden>
Architecture: all
Version: 0.5build1
Depends: apparmor-easyprof, apparmor-easyprof-ubuntu, python3-apt, python3-debian, python3-magic, python3-simplejson, python3-xdg, python3, python3:any (>= 3.3.2-2~)
Filename: pool/main/c/click-reviewers-tools/click-reviewers-tools_0.5build1_all.deb
Size: 27990
SHA256: 80ec7f4e24c4ea6faf5edfd89622ff4f9748b717a19eface992a09d017deb5a1
SHA1: 176a035b28ad69a19ffba6cdd5bfac0a560bcf49
MD5sum: 346336deb91f92cee489196023a85974
Description-en: tools to review click packages
 These scripts can be used to review click packages both manually and in a
 programmatic fashion.
Description-md5: 3e24901c144a5166e25fee1b5e0c1ab6
Homepage: https://launchpad.net/click-reviewers-tools
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Canonical Click Reviewers tools because there has been no activity for 60 days.]

Changed in click-reviewers-tools:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.