All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
To: Behan Webster <behanw@converseincode.com>
Cc: openembedded-devel@lists.openembedded.org
Subject: Re: Alpha release of check-requirement.sh
Date: Wed, 09 Aug 2017 09:22:06 -0500	[thread overview]
Message-ID: <1502288526.1934.39.camel@linux.intel.com> (raw)
In-Reply-To: <73F79297-B92A-4F4D-A3F1-A3F43CD39DAE@converseincode.com>

in my opinion, this fits nicely into the oe-core, into the
scripts/contrib folder.



On Tue, 2017-08-08 at 17:24 -0700, Behan Webster wrote:
> I maintain a script (ready-for.sh) which checks requirements for various courses I teach which makes sure you have the right computer, RAM, disk space available, and such in order to do the class. It also makes sure that the required packages for your $DISTRO are installed (supported distros are CentOS, Debian, Fedora, Mint, openSUSE, RHEL, SLES, Ubuntu, with some initial support for ArchLinux). It has a full test suite to make sure the package lists are valid and available for each of the distro. It also can output a JSON version of the requirements (if you want to extract requirements for something else like a webpage or document) and includes an auto-updater. Its designed to make getting ready for a specific course very easy for a new person. I also use it to debug setup issues on people’s computers over the phone or email.
> 
> One of the courses I maintain requirements for is the LF Yocto Project course. And recently I rebuilt the script into something more generic (check-requirements.sh) which specifically allows you to check for requirements for the various groupings of packages in the Yocto Project documentation.
> 
> I’ve made it initially available as an alpha release via https://cm.converseincode.com/cr/ <https://cm.converseincode.com/cr/> , and I plan to maintain it along with the script described above since they share so much of the same code.
> 
> The idea is that users would download and run this script once in order to make sure their machines are ready to build OE or Poky or whatever, instead of reading the setup document and manually installing all the packages. One would still have to clone the appropriate git repo to get a copy of OE or Poky after that.
> 
> As an example, here it is being run on an Ubuntu-16.04 machine which is missing packages for building the documentation. (Showing the YP requirements are boring, because this computer already meets those requirements because I build OE all the time). It is to be run as a normal user, but uses sudo internally when it needs to run privileged commands. In fact if you try to run it as root, it complains.
> 
> $ sudo ./check-requirements.sh 
> [sudo] password for behanw: 
> FAIL: Please don't run as root
> NOTE: Sudo will be used internally by this script as required.
> 
> $ ./check-requirements.sh --list
> Available (4) options:
>   YPDOC - Requirements for Yocto Project Documentation
>   YPGUI - Requirements for Yocto Project GUI
>   YP - Requirements for Yocto Project
>   YPST - Requirements for OpenEmbedded Self-Test
> 
> $ ./check-requirements.sh YPDOC
> Checking that this computer is suitable for YPDOC: Requirements for Yocto Project Documentation
> --------------------------------------------------------------------------------
> PASS: CPU architecture is x86_64
> PASS: 4 core CPU (good enough but 8 is preferred)
> PASS: Your CPU appears powerful enough (currently at 23228 BogoMIPS cumulatively)
> PASS: 6 GiB RAM
> PASS: 158 GiB free disk space in /home/behanw
> PASS: Linux distribution architecture is x86_64
> PASS: Linux distribution is Ubuntu:amd64-16.04 (xenial)
> PASS: Internet is available (which is required in this case)
> --------------------------------------------------------------------------------
> WARN: Some packages are missing
> NOTE: Need to install: dblatex docbook-dsssl docbook-utils fop jadetex java-wrappers libavalon-framework-java libbatik-java libbsf-java libfontbox-java libfop-java libosp5 libostyle1c2 libsgmls-perl libsp1c2 libxmlgraphics-commons-java openjade sgmlspl sp texlive-bibtex-extra texlive-math-extra xmlto
> You can install missing packages by running:
>   ./check-requirements.sh --install YPDOC
> or by:
>   sudo apt-get --no-install-recommends install dblatex docbook-dsssl docbook-utils fop jadetex java-wrappers libavalon-framework-java libbatik-java libbsf-java libfontbox-java libfop-java libosp5 libostyle1c2 libsgmls-perl libsp1c2 libxmlgraphics-commons-java openjade sgmlspl sp texlive-bibtex-extra texlive-math-extra xmlto
> --------------------------------------------------------------------------------
> WARN: Your computer doesn't meet the stated requirements unless you can fix the above warnings.
> WARN: You also have some missing packages.
> 
> $ ./check-requirements.sh --install YPDOC
> Checking that this computer is suitable for YPDOC: Requirements for Yocto Project Documentation
> --------------------------------------------------------------------------------
> <snip>
> --------------------------------------------------------------------------------
> WARN: Some packages are missing
> WARN: About to install: dblatex docbook-dsssl docbook-utils fop jadetex java-wrappers libavalon-framework-java libbatik-java libbsf-java libfontbox-java libfop-java libosp5 libostyle1c2 libsgmls-perl libsp1c2 libxmlgraphics-commons-java openjade sgmlspl sp texlive-bibtex-extra texlive-math-extra xmlto 
> Is that okay? [y/N] 
> 
> Is this useful? Thoughts? Suggestions?
> 
> Give it a try and let me know what you think. It’s extensible, so adding other groupings of packages and such, or adding aliases for OE or something is all trivially done.
> 
> Thanks,
> 
> Behan




  reply	other threads:[~2017-08-09 14:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-09  0:24 Alpha release of check-requirement.sh Behan Webster
2017-08-09 14:22 ` Leonardo Sandoval [this message]
2017-08-09 18:32   ` Randy MacLeod
2017-08-10  4:37     ` Behan Webster
2017-08-10  4:40   ` Behan Webster
2017-08-10  8:38     ` Tim Orling
2017-08-10  8:42       ` Tim Orling
2017-08-10 16:49         ` Behan Webster
2017-08-10 16:54           ` Behan Webster
2017-08-10 15:16       ` Behan Webster
2017-08-10 14:26     ` Leonardo Sandoval
2017-08-10 18:11       ` Behan Webster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1502288526.1934.39.camel@linux.intel.com \
    --to=leonardo.sandoval.gonzalez@linux.intel.com \
    --cc=behanw@converseincode.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.