From caefc34c829e8f22c180d3c269efda27a255cbb2 Mon Sep 17 00:00:00 2001 From: Thomas Lundström Date: Fri, 3 Jun 2016 18:15:09 +0200 Subject: Updated release info --- .../doc/about_release.xml | 445 +++++++++++++++------ doc/book-enea-linux-release-info/doc/book.xml | 2 +- .../doc/build_boot_template.xml | 22 +- .../doc/feature_matrix.xml | 365 ----------------- .../doc/getting_enea_linux.xml | 115 ++++++ .../doc/known_bugs_and_limitations.xml | 115 ++++++ .../doc/main_changes.xml | 180 +-------- .../doc/prerequisites.xml | 112 ++---- .../doc/security_fixes.xml | 12 - .../doc/supported_architectures.xml | 72 ---- .../doc/supported_features.xml | 95 ----- doc/gen_pkgdiff.py | 167 ++++++++ 12 files changed, 792 insertions(+), 910 deletions(-) delete mode 100644 doc/book-enea-linux-release-info/doc/feature_matrix.xml create mode 100644 doc/book-enea-linux-release-info/doc/getting_enea_linux.xml delete mode 100644 doc/book-enea-linux-release-info/doc/security_fixes.xml delete mode 100644 doc/book-enea-linux-release-info/doc/supported_architectures.xml delete mode 100644 doc/book-enea-linux-release-info/doc/supported_features.xml create mode 100644 doc/gen_pkgdiff.py (limited to 'doc') diff --git a/doc/book-enea-linux-release-info/doc/about_release.xml b/doc/book-enea-linux-release-info/doc/about_release.xml index 90bedaa..500853e 100644 --- a/doc/book-enea-linux-release-info/doc/about_release.xml +++ b/doc/book-enea-linux-release-info/doc/about_release.xml @@ -9,148 +9,206 @@ xmlns:xi="http://www.w3.org/2001/XInclude" xpointer="element(EneaLinux_REL_VER/1)" /> provides a publicly available Enea Linux distribution for a selected set of targets. This release is - generated from the yocto distribution .INFO Yocto distro autopicked from poky.ent as DISTRO_NAME_NO_CAP - Provided contents: - - Source code, recipes, scripts, and documentation for building - your own Linux kernel, root file system, and cross-compilation - toolchains (SDKs) - +
+ Provided Contents + + + + + + Item + + + + + + Source code, recipes, scripts, etc for building the + distro and SDKs. See . + + + + Documentation. See . + + + + Pre-built binaries (kernel image, dtb & rootfs) + + + + Pre-built packages (RPM) + + + + Eclipse executable plus development tools for command line + and Eclipse + + + + +
- - Default configurations for basic Yocto functionality - +
+ Supported Targets - - Feature-specific configurations to optionally add more - capabilities to the Linux kernel - + + + - - Pre-built images (kernels, rootfs, dtb) and other binaries - available for download - + - - Eclipse executable plus development tools for command line and - Eclipse - - + - Supported targets: + + + Target - FIXME should autocreate a list of targets, hopefully from the - generated README file, by using MAKEFILE to update pardoc-distro AND/OR also - auto-create an XML file to includ here with description text for each target - etc.. + Architecture - - - ????????????? LS1021AIOT - + Specification + + - - Freescale P2041RDB, Power architecture, No DSPs, Quad-core QorIQ - P2041 processor, e500mc cores. - + + + P2041RDB - - QEMU PPC - + Power, e500mc - - QEMU ARM - + See + link to NXP's datasheet + - - QEMU X86 - - + + LS1021a-IoT - Kernel configuration: + ARM Cortex-A7 - - - P2041RDB: One kernel flavor (release)FIXME Why are these - listed three times? Why only "one kernel"?? - + See + link to NXP's datasheet + - - P3041DS: One kernel flavor (release)FIXME Why are these - listed three times? - + + QEMUARM - - Low-Latency Desktop (LLD) - - + ARM - Supported host environment: - - 64-bit Ubuntu 14.04 LTSwas - EneaLinux_HOST_VER - - + See link to QEmu web + page + - Supported versions: - - Yocto version INFO: Auto-fetched from - poky.ent via pardoc-distro.xml - + + QEMUPCC - - poky source version INFO: Auto-fetched from - poky.ent via pardoc-distro.xml - + PPC - - gcc version: 4.9was EneaLinux_GCC_VER Not in - poky.en - + See link to QEmu web + page + - - Linux kernel version for all targets: 3.12was - EneaLinux_KERNEL_VER Not in poky.ent - + + QEMUX86 - - Eclipse version 4.5 Marswas Eclipse_VER and was - Eclipse_NAME Not in poky.ent - + X86 - - Package versions: See - - + See link to QEmu web + page + + + + - Distribution channel: - - All deliverables can be downloaded from QUEST REMOVE???? - This is still in pardoc-distro.xml - - + FIXME should autocreate a list of targets, hopefully from + the generated README file, by using MAKEFILE to update pardoc-distro + AND/OR also auto-create an XML file to include here with description text + for each target etc.. +
- Supported features: See . +
+ Supported Host Environment - + + + Ubuntu 14.04 LTS, 64-bitwas + EneaLinux_HOST_VER + + +
- +
+ Supported Versions + + + + + + Item + + Version + + + + + + Yocto + + ()INFO: Auto-fetched + from poky.ent via pardoc-distro.xml + + + + poky source + + INFO: Auto-fetched from + poky.ent via pardoc-distro.xml + + + + gcc version + + 4.9was EneaLinux_GCC_VER Not in poky.ent + + + + + Linux kernel version (all targets) + + 3.12was EneaLinux_KERNEL_VER Not in + poky.ent + + + + Eclipse + + 4.5 (Mars)was Eclipse_VER and was Eclipse_NAME Not + in poky.ent + + + + Packages + + See + + + + +
Provided Packages @@ -195,7 +253,7 @@ Packages provided by Yocto See the Yocto "Release Notes" @@ -221,8 +279,151 @@
Supported Drivers - No information of supported drivers is provided in this version of - the Release Information. + + + + + + + + + + + + + + + + + Driver + + P2041RDB + + LS1021a-IoT + + QEMUARM + + QEMUPCC + + QEMUX86 + + + + + + Ethernet + + + + + + + + + + + + + + I2C + + + + + + + + + + + + + + SPI + + + + + + + + + + + + + + PCI Express + + + + + + + + + + + + + + USB + + + + + + + + + + + + + + Flash + + + + + + + + + + + + + + SD/SDHC/SDXC + + + + + + + + + + + + + + RTC + + + + + + + + + + + + + +
@@ -285,11 +486,6 @@ eclipse/readme.
- - - -
Other Provided Functionality @@ -324,8 +520,15 @@
- +
+ Security Fixes + + See List of + CVEs addressed in Enea Linux and How + to Get Security Updates. +
Intentional Limitations diff --git a/doc/book-enea-linux-release-info/doc/book.xml b/doc/book-enea-linux-release-info/doc/book.xml index 2be87b0..d1226b9 100644 --- a/doc/book-enea-linux-release-info/doc/book.xml +++ b/doc/book-enea-linux-release-info/doc/book.xml @@ -10,9 +10,9 @@ + - diff --git a/doc/book-enea-linux-release-info/doc/build_boot_template.xml b/doc/book-enea-linux-release-info/doc/build_boot_template.xml index 709e624..ca60932 100644 --- a/doc/book-enea-linux-release-info/doc/build_boot_template.xml +++ b/doc/book-enea-linux-release-info/doc/build_boot_template.xml @@ -1,20 +1,20 @@ - + Target Specific Build and Boot Instructions - For each target, a README file contains the build and boot - instructions. To make it easier for the reader, the contents of these - build/boot instruction have been extracted below into this release - information document. + If the source has been fetched (), there will be a target specific README + file containing the build and boot instructions. To make it easier for the + reader, the contents of these build/boot instruction have been extracted + into the following sections. - The README files are parts of the distribution and can be seen after - the distribution is fetched.NOTE: Only EDIT THE TEMPLATE FILE! A new - build_boot.xml file is created from the template and sections are added - below automatically from the README files for each target when building the - book! Only in the template file you see a line below with SCRIPT_...._HERE - and the text telling that this is a template file. + NOTE: Only EDIT THE TEMPLATE FILE! A new build_boot.xml file + is created from the template and sections are added below automatically from + the README files for each target when building the book! Only in the + template file you see a line below with SCRIPT_...._HERE and the text + telling that this is a template file. SCRIPT_INCLUDES_BUILD_BOOT_SECTIONS_HERE diff --git a/doc/book-enea-linux-release-info/doc/feature_matrix.xml b/doc/book-enea-linux-release-info/doc/feature_matrix.xml deleted file mode 100644 index b5fe764..0000000 --- a/doc/book-enea-linux-release-info/doc/feature_matrix.xml +++ /dev/null @@ -1,365 +0,0 @@ - - -
- Feature Compatibility Matrix - - The following features are supported in Enea Linux. Limitations are - explained below the table. - - - - - - - - - - - - - - - - - - - - - - - - Targets - - Networking - Features - - Virtualization - Features - - Real-Time - Features - - Memory Features - - - - OVS - - a) DVS - - a) DPDK - - KVM - - LXC - - CI - - FPK - - d) NUMA - - - - - - AMD Hierofalcon - - X - - - - - - - - X - - X - - - - - - - - - - - - - Freescale B4860QDS - - X - - - - - - - - - - - X - b) - - X - c) - - - - X - - - - Freescale i.MX 6Quad SABRE Lite - - - - - - - - - - - - - - X - b) - - X - c) - - - - - - - - - - Freescale P2020RDB - - X - - - - - - - - - - - X - b) - - X - c) - - X - - X - - - - Freescale P2041RDB - - X - - - - - - - - - - - X - b) - - - c) - - X - - X - - - - Freescale P3041DS - - X - - - - - - - - - - - X - b) - - - - - X - - X - - - - Freescale P4080DS - - X - - - - - - - - X - - X - b) - - X - c) - - X - - X - - - - HP ProLiant m800 - - - - - - - - - - - - - - X - - X - - - - - - - - - - Intel Romley Ivy Bridge x86_64 - - X - - X - - X - - X - - X - - X - - - - - X - - - - PandaBoard - - X - - - - - - - - X - - X - - X - c) - - - - - - - - - - QEMU - - - - - - - - - - - - - - - - - - - - - - - - - - - - TI Keystone EVMK2H - - X - - - - - - - - - - - X - - X - - - - - - - - - - Xilinx Zynq ZC702 - - X - - - - - - - - - - - X - - X - c) - - X - - - - - - - - - X = supported, - = not - supported - - - - DPDK and DPDK vSwitch are supported in x86 architectures - only. - - - - Limited LXC support. LXC feature "user namespace" is not supported - in Power architectures. - - - - Limited CPU Isolation support. Full tickless environment is not - achievable in these targets. Isolated CPUs will be disturbed by ticks - once a second (1 Hz). - - - - NUMA is not supported by ARM architectures. - - -
\ No newline at end of file diff --git a/doc/book-enea-linux-release-info/doc/getting_enea_linux.xml b/doc/book-enea-linux-release-info/doc/getting_enea_linux.xml new file mode 100644 index 0000000..2d0f9c2 --- /dev/null +++ b/doc/book-enea-linux-release-info/doc/getting_enea_linux.xml @@ -0,0 +1,115 @@ + + + + Getting Enea Linux + +
+ Getting Pre-built Binaries + + Application developers will download pre-complied images from the + Enea Portal or will receive prebuilt images from the platform developers. + For further information on this see Enea Linux Application + Development Guide. +
+ +
+ Getting the Source + + For platform developers, this Enea Linux release is available for + cloning from a set of GIT repositories. E.g. git.enea.se & + git.enea.com. To manage the different repositories, Google's repo tool is + used. The basic idea is to store a list with (repo-URL, version) tuples in + a separate file, known as the manifest. The repo tool is then used to + clone the specified versions of the listed repositories. See TBD for more info. + + To use repo tool to download the source for Enea Linux, follow the + steps below: + + + + Make sure that the repo tool is installed. If not, follow the + instructions below: + + $ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo +$ chmod a+x ~/bin/repo + + + + Use the repo tool to download the source: + + $ mkdir enea-linux +$ cd enea-linux +$ repo init -u git://git.enea.se/linux/manifests/el6-standard.git \ + -b refs/tags/EL6 \ + -m <manifest file> +$ repo sync + + The URI and 'refs/tags/EL6' specifies the location and version + of the repository where the manifest file is stored. + + The parameter <manifest file> depends on the target. See + the following table: + + + + + + Target + + Manifest file + + + + + + P2041RDB + + p2041rdb/default.xml + + + + LS1021a-IoT + + ls1021aiot/default.xml + + + + QEMUARM + + qemuarm/default.xml + + + + QEMUPCC + + qemuppc/default.xml + + + + QEMUX86 + + qemux86/default.xml + + + + + + + + The source code is now downloaded. Current directory will contain a + README file with instructions on how to build the distro and boot the + target. For convenience, these instructions are also copied into this + document. See . + + It is not necessary to explicitly clone the manifest repository + since that is done automatically by the repo tool. To see the current + manifest, e.g. to get a list of the repositories, use the following + command: + + $ repo manifest +
+
\ No newline at end of file diff --git a/doc/book-enea-linux-release-info/doc/known_bugs_and_limitations.xml b/doc/book-enea-linux-release-info/doc/known_bugs_and_limitations.xml index dd3dc1e..a219fe4 100644 --- a/doc/book-enea-linux-release-info/doc/known_bugs_and_limitations.xml +++ b/doc/book-enea-linux-release-info/doc/known_bugs_and_limitations.xml @@ -27,6 +27,121 @@
+ + +
+ Extracted from Jira + + This section lists open bugs in Jira. + + project = "Linux CR" \ + and issuetype = Bug \ + and affectedVersion = "Enea Linux 6" \ + and resolution = Unresolved + + + + + + + + + + Key + + Summary + + + + + + LXCR-7094 + + meta-enea-bsp-arm: conf/machine: proliant-m400.conf must be + removed + + + + LXCR-7093 + + meta-enea-bsp-* layers: README files should contain build + & boot instructions + + + + LXCR-7092 + + public layers: none of the 5 public layers can be found + within the OE index + + + + LXCR-7085 + + powerpc-enea-linux-gnuspe-gdb not available in + sdk-ext + + + + LXCR-7064 + + ABI compliance: an ABI dump cannot be created for any + SDK + + + + LXCR-7056 + + README:s on krogoth branch refer to master branch + + + + LXCR-7055 + + Templates set the wrong POKY_BBLAYERS_CONF_VERSION + + + + LXCR-7053 + + [Doc] Eclipse PMD section should use the SDK + + + + LXCR-7025 + + LTP test package does not run correctly for p2041rdb + target + + + + LXCR-7020 + + Eclipse project configure fails with extensible sdk + + + + LXCR-7019 + + LTP test package does not run correctly for ls1021aiot + target + + + + LXCR-6997 + + [Eclipse] Launching QEMU from Eclipse does not work + + + + LXCR-6970 + + Reporting bugs from TestLink does not work + + + + +
\ No newline at end of file diff --git a/doc/book-enea-linux-release-info/doc/main_changes.xml b/doc/book-enea-linux-release-info/doc/main_changes.xml index 2134974..98be78c 100644 --- a/doc/book-enea-linux-release-info/doc/main_changes.xml +++ b/doc/book-enea-linux-release-info/doc/main_changes.xml @@ -5,55 +5,34 @@ Main Changes This chapter describes the major changes and additions in the Enea - Linux release compared to the previous release. + Linux release compared to the previous release (Enea Linux 5.0-ppc).
- New Functionality / Enhancements + New Functionality/Enhancements - - - enea-image-minimal has been replaced by enea-image-base, with a - basic set of packets for a Linux distribution. Users can create a - customized image with more packets, added by the package - manager.FIXME ALL THIS TEXT WHICH NOW IS FROM AN OLD - relinfo - + Based in the Jira query: 'project = CPDX and fixVersion = "Enea + Linux 6"' + - SMART package manager is now included in the image. + New Yocto version () - IPK packages have been replaced by RPM packages. + Introduction of the repo tool to manage the GIT + repositories. - Almost all packages for architectures supported by Yocto are now - available on the download server. + New targets: LS1021a-IoT & QEMUX86. -
-
- Version Updates - - The versions are as follows: - - - - This Enea Linux release is based on Yocto - - - - The poky source version is - - + For details, see the GIT logs for the repositories specified in the + manifest files. See .
@@ -68,133 +47,6 @@ TBD FIXME or set condition hidden
-
- Added or Removed Packages - - TBD FIXME or set condition hidden. Either create a list in - text files using a script and refer to those, or create XML files with a - script and xi include those here "as text"! - -
- Added Packages - - - - - - Package Name - - Version - - - - - - FIXME package-name - - FIXME version - - - - FIXME package-name - - FIXME version - - - - FIXME package-name - - FIXME version - - - - FIXME package-name - - FIXME version - - - - -
- -
- Changed Packages - - - - - - Package Name - - Previous Version - - New Version - - - - - - FIXME package-name - - FIXME version - - FIXME newversion - - - - FIXME package-name - - FIXME version - - FIXME newversion - - - - FIXME package-name - - FIXME version - - FIXME newversion - - - - FIXME package-name - - FIXME version - - FIXME newversion - - - - -
- -
- Removed Packages - - - - - - Package Name - - - - - - FIXME package-name - - - - FIXME package-name - - - - FIXME package-name - - - - -
-
+ \ No newline at end of file diff --git a/doc/book-enea-linux-release-info/doc/prerequisites.xml b/doc/book-enea-linux-release-info/doc/prerequisites.xml index 7241ed1..587b812 100644 --- a/doc/book-enea-linux-release-info/doc/prerequisites.xml +++ b/doc/book-enea-linux-release-info/doc/prerequisites.xml @@ -2,74 +2,48 @@ - Prerequisites and Getting Enea Linux - -
- Install Host Packages - - Building Enea Linux or compiling applications requires some packages - to be installed on your Linux development host. See the list of Required - Packages for Host Development System, found in the Yocto 2.1 document: - https://www.yoctoproject.org/docs/2.1/ref-manual/ref-manual.html#required-packages-for-the-host-development-system. - If needed, replace 2.1 with the actual Yocto version in your Enea Linux - distribution.Sorry by the list in the Yocto document do not seem - to be enough at all at least for platform building! Therefore we need to - add a complete list here, and we actually have a bigger list than we - needed, but it's better to have more and not be needed than to lack - information. - - Install Host Packages - - - The list below is generic and might contain packages that are not - necessary. Additional packages might be required to build for some - targets. See the Enea Linux Release Information if more packages are - needed and which hosts have been tested by Enea for this Enea Linux - release.QUEST: Are the lists below ok? The lists below try to - cover ALL normal use cases for both ApplGuide and PlatfGuide, incl. - Eclipse, instead of limiting to some use case. Easier to keep - updated. - - -
- Ubuntu or Debian - - Ensure the system is up-to-date: - - $ sudo apt-get update - - For a supported Ubuntu - Ubuntu - and Debian - Debian - distributions you need the following packages: - - # sudo apt-get install sed wget subversion git-core -coreutils unzip texi2html texinfo libsdl1.2-dev docbook-utils fop gawk -python-pysqlite2 diffstat make gcc build-essential xsltproc g++ -desktop-file-utils chrpath libgl1-mesa-dev libglu1-mesa-dev autoconf automake -groff libtool xterm libxml-parser-perl -
-
- -
- Getting Enea Linux - - For platform developers, an Enea Linux release is available for - cloning from git.enea.com. Releases are available in distribution-specific - repositories on git.enea.com, for cloning using the repo tool in the local - workstation. For more information on this topic, see the Enea Linux Platforms - Development Guide on http://portal.enea.com. - - Application developers will download pre-complied images from the - Enea Portal or will receive prebuilt images from the platform developers. - For further information on this see Enea Linux Application - Development Guide. + Prerequisites + + Building Enea Linux or compiling applications requires some packages + to be installed on your Linux development host. See the list of Required + Packages for Host Development System, found in the Yocto 2.1 document: + https://www.yoctoproject.org/docs/2.1/ref-manual/ref-manual.html#required-packages-for-the-host-development-system. + If needed, replace 2.1 with the actual Yocto version in your Enea Linux + distribution.Sorry by the list in the Yocto document do not seem to + be enough at all at least for platform building! Therefore we need to add a + complete list here, and we actually have a bigger list than we needed, but + it's better to have more and not be needed than to lack + information. + + Install Host Packages + + + The list below is generic and might contain packages that are not + necessary. Additional packages might be required to build for some + targets. See the Enea Linux Release Information if more packages are + needed and which hosts have been tested by Enea for this Enea Linux + release.QUEST: Are the lists below ok? The lists below try to + cover ALL normal use cases for both ApplGuide and PlatfGuide, incl. + Eclipse, instead of limiting to some use case. Easier to keep + updated. + + +
+ Ubuntu 14.04 LTS, 64-bit + + Ensure the system is up-to-date: + + $ sudo apt-get update + + For a supported Ubuntu + Ubuntu + distribution you need the following packages: + + # sudo apt-get install sed wget subversion git-core + coreutils unzip texi2html texinfo libsdl1.2-dev docbook-utils fop gawk + python-pysqlite2 diffstat make gcc build-essential xsltproc g++ + desktop-file-utils chrpath libgl1-mesa-dev libglu1-mesa-dev autoconf automake + groff libtool xterm libxml-parser-perl
\ No newline at end of file diff --git a/doc/book-enea-linux-release-info/doc/security_fixes.xml b/doc/book-enea-linux-release-info/doc/security_fixes.xml deleted file mode 100644 index 5e72bb7..0000000 --- a/doc/book-enea-linux-release-info/doc/security_fixes.xml +++ /dev/null @@ -1,12 +0,0 @@ - - -
- Security Fixes - - See List of - CVEs addressed in Enea Linux and How - to Get Security Updates. . -
\ No newline at end of file diff --git a/doc/book-enea-linux-release-info/doc/supported_architectures.xml b/doc/book-enea-linux-release-info/doc/supported_architectures.xml deleted file mode 100644 index f46b39b..0000000 --- a/doc/book-enea-linux-release-info/doc/supported_architectures.xml +++ /dev/null @@ -1,72 +0,0 @@ - - -
- Supported Targets and Architectures - - Precompiled images, recipes, and optionally U-Boot - bootloader and build & boot instructions are provided for the - following target and hardware architectures - - - - - - - - - - - - - - Supported Targets - - Processor Architecture - - DSPs - - Specification - - - - - - Freescale P2041RDB - - Power - - (none) - - Quad-core QorIQ P2041 processor, e500mc - cores - - - - Freescale P3041DS - - Power - - (none) - - Quad-core QorIQ P3041 processor, e500mc - cores - - - - Freescale T4240RDB - - Power - - (none) - - Quad-core QorIQ T4240 processor, e6500 - cores - - - - - - QEMU PPC and/or ARM for architecture-specific Linux emulation is - also supported. -
\ No newline at end of file diff --git a/doc/book-enea-linux-release-info/doc/supported_features.xml b/doc/book-enea-linux-release-info/doc/supported_features.xml deleted file mode 100644 index ebc4b59..0000000 --- a/doc/book-enea-linux-release-info/doc/supported_features.xml +++ /dev/null @@ -1,95 +0,0 @@ - - -
- Supported Features - - The basic features provided by Yocto are listed on the "Features" tab - on the ???? FIXME THIS WAS "ULINK_YOCTO_DOWN_MINOR_URL" in previous pardoc-distro file - I don't know what is shall be - now. Perhaps it is Yocto release notes which I have changed this to, as found in poky.ent. - - Enea Linux provides additional target-specific features from other - open source projects: - - - - Networking features: - - - - - Open vSwitch (OVS) version - 2.0.0*) - - - - Data Plane Development Kit (DPDK) version 0.10.0 - - - - DPDK vSwitch (DVS) version 1.6.0r1 - - - - - - - Virtualization features: - - - - - Kernel-Based Virtual Machine (KVM) - - - - Linux Containers (LXC) - - - - - - - Real-time features: - - - - - CPU Isolation (CI) - - - - Fully Preemptible Kernel (FPK) - - - - - - - Memory features: - - - - - Non-Uniform Memory Access (NUMA); package versions numad 0.6 - and numactl 2.0.9 - - - - - - - - *) Runnable on any Linux-based virtualization platform (e.g. KVM) - from kernel version 2.6.32 - - - Refer to the Enea Linux User's Guide for details - about each feature. - -
\ No newline at end of file diff --git a/doc/gen_pkgdiff.py b/doc/gen_pkgdiff.py new file mode 100644 index 0000000..acfbadc --- /dev/null +++ b/doc/gen_pkgdiff.py @@ -0,0 +1,167 @@ +############################################################################### +# +# Diff two licenses.xml files. Splits the result in three sets: +# 1) Removed +# Packages present in the old file, but not in the new. +# +# 2) Added +# Packages present in the new file, but not in the old. +# +# 3) Changed +# Packages present in both files, but with different versions. +# +# Note that packages with the unchanged version is not listed. +# +# The output is presented as XML code printed to stdout. +# +############################################################################### + +import sys +import subprocess +import xml.etree.ElementTree as ET + +def get_pkgs(file_spec): + if file_spec.find(":") >= 0: + cmd = ("git", "show", file_spec) + root = ET.fromstring(subprocess.check_output(cmd)) + + else: + root = ET.parse(file_spec) + + for node in root.iter("section"): + if "id" in node.attrib: + if node.attrib["id"] == "licenses_packages": + break + + else: + return None + + for node in node: + if node.tag == "informaltable": + break + else: + return None + + tab = node[0][-1] + + plist = dict() + for row in tab: + pname = row[0].text + pver = row[1].text + if not pname in plist: + plist[pname] = set() + + plist[pname].add(pver) + + return set(plist), plist + +#---------------------------------------- + +if len(sys.argv) != 3: + sys.stderr.write("Usage:\n") + sys.stderr.write(" %s " % sys.argv[0]) + sys.stderr.write(" \n") + sys.stderr.write("\n") + sys.stderr.write(" E.g.:\n") + sys.stderr.write(" %s " % sys.argv[0]) + sys.stderr.write("licenses-5.0-ppc.xml licenses.xml\n") + exit() + +new_file, old_file = sys.argv[1:3] + +sys.stderr.write("New license file : %s\n" % new_file) +sys.stderr.write("Prev license file : %s\n" % old_file) + +old_pset, old_pdict = get_pkgs(old_file) +new_pset, new_pdict = get_pkgs(new_file) + +added = new_pset - old_pset # Set subtraction +removed = old_pset - new_pset # Set subtraction +common = old_pset & new_pset +changed = [ p for p in common if old_pdict[p] != new_pdict[p] ] + +print '' +print '' +print '
' +print ' Changes in the Set of Provided Package' +print ' ' +print ' This section describes changes in the provided packages.' +print ' ' +print '
' +print ' Added Packages' +print ' ' +print ' ' +print ' ' +print ' ' +print ' Package' +print ' Version(s)' +print ' ' +print ' ' +print ' ' + +for p in sorted(list(added)): + print ' ' + print ' %s' % p + print ' %s' % ", ".join(sorted(new_pdict[p])) + print ' ' + +print ' ' +print ' ' +print ' ' +print '
' + +print '
' +print ' Removed Packages' +print ' ' +print ' ' +print ' ' +print ' ' +print ' Package' +print ' Version(s)' +print ' ' +print ' ' +print ' ' +for p in sorted(list(removed)): + print ' ' + print ' %s' % p + print ' %s' % ", ".join(sorted(old_pdict[p])) + print ' ' +print ' ' +print ' ' +print ' ' +print '
' + +print '
' +print ' Changed Package Versions' +print ' ' +print ' ' +print ' ' +print ' ' +print ' Package' +print ' Previous Version(s)' +print ' New Version(s)' +print ' ' +print ' ' +print ' ' +for p in sorted(list(changed)): + print ' ' + print ' %s' % p + print ' %s' % ", ".join(sorted(old_pdict[p])) + print ' %s' % ", ".join(sorted(new_pdict[p])) + print ' ' + +print ' ' +print ' ' +print ' ' +print '
' +print '
' + +sys.stderr.write("Package Summary:\n") +sys.stderr.write(" Prev file : %3d\n" % len(old_pset)) +sys.stderr.write(" New file : %3d\n" % len(new_pset)) +sys.stderr.write(" Added : %3d\n" % len(added)) +sys.stderr.write(" Removed : %3d\n" % len(removed)) +sys.stderr.write(" Changed : %3d\n" % len(changed)) +sys.stderr.write(" Unchanged : %3d\n" % (len(common) - len(changed))) +sys.stderr.write("Done\n") -- cgit v1.2.3-54-g00ecf