[PATCH] Adding timezone data to sysadmin-basic bundle and producing bundle dependency graph grouped and colored by bundle status
by George Kramer
---
README.md | 2 +-
bundles/sysadmin-basic | 1 +
make-dot.pl | 135 -------------------------------------------------
make-dot.py | 73 ++++++++++++++++++++++++++
4 files changed, 75 insertions(+), 136 deletions(-)
delete mode 100644 make-dot.pl
create mode 100644 make-dot.py
diff --git a/README.md b/README.md
index 042f3dc..6039d40 100644
--- a/README.md
+++ b/README.md
@@ -17,7 +17,7 @@ For debugging and visualization purposes, a small perl program called
`make-dot.pl` is included. If run, the output will be suitable to create
a dependency graph of the bundles. Run it as so:
- `make-dot.pl | dot -Tsvg > dot.svg`
+ `python make-dot.py | dot -Tsvg > dot.svg`
This will output a "dot.svg" file that can be opened with a web browser.
diff --git a/bundles/sysadmin-basic b/bundles/sysadmin-basic
index 6670608..bf648ac 100644
--- a/bundles/sysadmin-basic
+++ b/bundles/sysadmin-basic
@@ -51,6 +51,7 @@ systemd-doc
systemd-extras
tmux
tree
+tzdata
unzip
usbutils
util-linux
diff --git a/make-dot.pl b/make-dot.pl
deleted file mode 100644
index 1861532..0000000
--- a/make-dot.pl
+++ /dev/null
@@ -1,135 +0,0 @@
-#!/usr/bin/perl
-
-use File::Basename;
-
-print "digraph {\n";
-
-my $inc = <<"END_INCLUDE";
-subgraph cluster1 {
- style=invis;
- "R-basic";
- "R-extras";
-}
-subgraph cluster2 {
- style=invis;
- "pnp-tools-basic";
- "pnp-tools-intermediate";
- "pnp-tools-advanced";
-}
-subgraph cluster3 {
- style=invis;
- "go-basic";
- "go-extras";
-}
-subgraph cluster4 {
- style=invis;
- "perl-basic";
- "perl-extras";
-}
-subgraph cluster5 {
- style=invis;
- "python-basic";
- "python-extras";
-}
-subgraph cluster6 {
- style=invis;
- "ruby-basic";
- "ruby-extras";
-}
-subgraph cluster7 {
- style=invis;
- "os-core";
- "os-core-update";
- "os-core-dev";
- "os-clr-on-clr";
- "os-utils";
- "os-utils-gui";
-}
-subgraph cluster8 {
- style=invis;
- "devtools-basic";
- "devtools-extras";
-}
-subgraph clusteropenstack {
- style=invis;
- "openstack-common";
- "openstack-database";
- "openstack-compute";
- "openstack-compute-controller";
- "openstack-test-suite";
- "openstack-block-storage-controller";
- "openstack-block-storage";
- "openstack-data-processing";
- "openstack-telemetry";
- "openstack-telemetry-controller";
- "openstack-object-storage";
- "openstack-orchestration";
- "openstack-lbaas";
- "openstack-network";
- "openstack-vpnaas";
- "openstack-all-in-one";
- "openstack-image";
- "openstack-identity";
- "openstack-controller";
- "openstack-python-clients";
- "openstack-dashboard";
- "message-broker-rabbitmq";
-};
-subgraph cluster0 {
- style=invis;
- "sysadmin-basic";
- "sysadmin-advanced";
-}
-
-rankdir=LR;
-{ rank=same "hpc-basic" "go-basic" "ruby-basic" "perl-basic" "python-basic" }
-{ rank=same "hpc-extras" "go-extras" "ruby-extras" "perl-extras" "python-extras" }
-{ rank=same "kernel-native" "kernel-container" "kernel-embedded" "kernel-kvm" }
-{ rank=bottommost "os-core" }
-END_INCLUDE
-
-print $inc;
-
-(a)files = glob("bundles/*");
-
-my %bundles;
-my %bundles2;
-
-foreach my $filename (@files) {
- open (my $fh, "<", $filename);
- my $first = 0;
- my $bundle = basename($filename);
-
- #if ($bundle =~ /^os-core/) {
- # next;
- #}
- #if ($bundle =~ /^bat/) {
- # next;
- #}
-
- while (<$fh>) {
- chomp;
- if (!/^include\((.*)\)/) {
- next;
- }
- my $line = $1;
- $first = 1;
- print "\"$bundle\" -> \"$line\";\n";
- # bundle that included something
- $bundles2{"$line"} = 1;
- }
- # bundles that didn't include anything
- if ($first == 0) {
- $bundles{"$bundle"} = 1;
- }
-
- close($fh);
-}
-
-while (my ($key, $value) = each(%bundles)){
- if (defined($bundles2{"$key"})) {
- print "\"$key\" -> \"os-core\";\n";
- }
-}
-print "}\n";
-
diff --git a/make-dot.py b/make-dot.py
new file mode 100644
index 0000000..65c2b8c
--- /dev/null
+++ b/make-dot.py
@@ -0,0 +1,73 @@
+from re import compile
+from glob import glob
+from os import getcwd
+from ntpath import basename
+
+statuscolordict = {'Active':'green', 'WIP':'darkorange1', 'Deprecated':'red'}
+
+def main():
+ bundledict = build_bundle_dictionary()
+ statusbundledict = build_statusbundle_dictionary(bundledict)
+ subgraphs = generate_subgraphs(statusbundledict)
+ edges = generate_edges(bundledict)
+ print('digraph {\n\tgraph [layout = dot, fontname = "sans-serif", penwidth = 4]\n\tnode [fontname = "sans-serif", style = filled, fontcolor = white]\n\tedge [fontname = "sans-serif", penwidth = 2]\n' + '\n'.join(subgraphs) + '\n' + ''.join(edges) + '}')
+
+def build_bundle_dictionary():
+ bundledict = {}
+ titlepattern = compile('(?<=\[TITLE\]: ).+')
+ statuspattern = compile('(?<=\[STATUS\]: ).+')
+ includepattern = compile('(?<=include\().+(?=\))')
+ packagepattern = compile('^(?<!include\()[a-zA-Z0-9-_+]+$')
+ for filename in glob(getcwd() + '\\bundles\\*'):
+ with open(filename, 'r') as file:
+ bundledef = file.read()
+ bundletitle = titlepattern.findall(bundledef)[0]
+ bundlestatus = statuspattern.findall(bundledef)[0]
+ bundleincludes = includepattern.findall(bundledef)
+ bundlepackages = packagepattern.findall(bundledef)
+ bundledict[bundletitle] = Bundle(bundletitle, bundlestatus, bundleincludes, bundlepackages)
+ return bundledict
+
+def build_statusbundle_dictionary(bundledict):
+ statusbundledict = {}
+ for status in statuscolordict.keys():
+ statusbundledict[status] = []
+ for bundletitle in bundledict.keys():
+ statusbundledict[bundledict[bundletitle].status].append(bundletitle)
+ return statusbundledict
+
+def generate_subgraphs(statusbundledict):
+ subgraphs = []
+ subgraphindex = 0
+ for status in statusbundledict.keys():
+ subgraphnodes = ['\t\tnode [color = ' + statuscolordict[status] + ']\n', '\t\tlabel = <<b>' + status.upper() + '</b>>\n']
+ for bundle in statusbundledict[status]:
+ subgraphnodes.append('\t\t"' + bundle + '";\n')
+ subgraphs.append('\tsubgraph cluster_' + str(subgraphindex) + ' {\n' + ''.join(subgraphnodes) + '\t}')
+ subgraphindex += 1
+ return subgraphs
+
+def generate_edges(bundledict):
+ edges = []
+ for bundletitle in bundledict.keys():
+ bundle = bundledict[bundletitle]
+ bundlecolor = statuscolordict[bundle.status]
+ for includetitle in bundle.includes:
+ includebundle = bundledict[includetitle]
+ includecolor = statuscolordict[includebundle.status]
+ edgecolor = None
+ if bundlecolor == includecolor:
+ edgecolor = bundlecolor
+ else:
+ edgecolor = includecolor
+ edges.append('\t"' + bundletitle + '" -> "' + includetitle + '" [color = ' + edgecolor + ', tooltip = "' + bundletitle + ' -> ' + includetitle + '"];\n')
+ return edges
+
+class Bundle:
+ def __init__(self, title, status, includes, packages):
+ self.title = title
+ self.status = status
+ self.includes = includes
+ self.packages = packages
+
+main()
--
2.9.2.windows.1
6 years, 2 months
[PATCH clr-bundles] Add cifs-utils to storage-utils
by William Douglas
Add user-space CIFS filesystem management tools to storage utils.
---
bundles/storage-utils | 1 +
1 file changed, 1 insertion(+)
diff --git a/bundles/storage-utils b/bundles/storage-utils
index 8115ae6..d12c82c 100644
--- a/bundles/storage-utils
+++ b/bundles/storage-utils
@@ -7,6 +7,7 @@ LVM2
LVM2-extras
autofs
btrfs-progs
+cifs-utils
dosfstools
e2fsprogs
e2fsprogs-extras
--
2.11.0
6 years, 2 months
[PATCH clr-bundles] Add which to resolve mavan bug
by William Douglas
mvn --version would error when which command was not available so add
the program to the bundle.
---
bundles/java-basic | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/bundles/java-basic b/bundles/java-basic
index 4e5f31b..dfb2895 100644
--- a/bundles/java-basic
+++ b/bundles/java-basic
@@ -4,11 +4,8 @@
# [CAPABILITIES]: Compile and run basic java applications
# [MAINTAINER]: Athenas Jimenez <athenas.jimenez.gonzalez(a)intel.com >
include(libX11client)
-openjdk
-openjdk-dev
apache-ant
apache-maven
-jdk-plexus-classworlds
jdk-aether
jdk-aopalliance
jdk-atinject
@@ -19,18 +16,22 @@ jdk-commons-io
jdk-commons-lang
jdk-commons-lang3
jdk-commons-logging
-jdk-guice
jdk-guava
+jdk-guice
jdk-httpcomponents-client
jdk-httpcomponents-core
jdk-jsoup
jdk-jsr-305
-jdk-wagon
jdk-objectweb-asm
-jdk-sisu
+jdk-plexus-cipher
+jdk-plexus-classworlds
jdk-plexus-containers
jdk-plexus-interpolation
-jdk-plexus-cipher
jdk-plexus-sec-dispatcher
jdk-plexus-utils
+jdk-sisu
jdk-slf4j
+jdk-wagon
+openjdk
+openjdk-dev
+which
--
2.11.0
6 years, 2 months
[PATCH clr-bundles] Add remote display applications to os-utils-gui
by William Douglas
---
bundles/os-utils-gui | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/bundles/os-utils-gui b/bundles/os-utils-gui
index 58798b3..fe75ba1 100644
--- a/bundles/os-utils-gui
+++ b/bundles/os-utils-gui
@@ -6,6 +6,7 @@
include(cryptography)
include(python-basic)
include(xfce4-desktop)
+FreeRDP
Thunar
Vertex-theme
alsa-plugins-lib
@@ -94,6 +95,6 @@ xrdb
xscreensaver
connman-gtk
openconnect
+xrdp
xrestop
xwd
-
--
2.11.0
6 years, 3 months
[PATCH clr-bundles 2/2] Add samba to storage-utils
by William Douglas
Samba fits along with nfs-utils and sshfs as a remote filesystem
management layer so put it inside the filesystem management bundle.
---
bundles/storage-utils | 1 +
1 file changed, 1 insertion(+)
diff --git a/bundles/storage-utils b/bundles/storage-utils
index 20a6f95..8115ae6 100644
--- a/bundles/storage-utils
+++ b/bundles/storage-utils
@@ -23,6 +23,7 @@ opensm
parted
rdma
rpcbind
+samba
sshfs
usermode
xfsprogs
--
2.11.0
6 years, 3 months
[PATCH clr-bundles 1/2] Deprecate nfs-utils into storage-utils
by William Douglas
nfs-utils was moved to not auto activate on start up and since it is not
particuarly large move it inside the storage-util bundle where it fits
like functional components.
---
bundles/nfs-utils | 7 ++-----
bundles/storage-utils | 4 ++++
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/bundles/nfs-utils b/bundles/nfs-utils
index 4cfddce..779d54a 100644
--- a/bundles/nfs-utils
+++ b/bundles/nfs-utils
@@ -1,9 +1,6 @@
# [TITLE]: nfs-utils
# [DESCRIPTION]: Run an NFS client
-# [STATUS]: Active
+# [STATUS]: Deprecated
# [CAPABILITIES]:
# [MAINTAINER]: William Douglas <william.douglas(a)intel.com >
-autofs
-nfs-utils
-rpcbind
-usermode
+include(storage-utils)
diff --git a/bundles/storage-utils b/bundles/storage-utils
index 6558562..20a6f95 100644
--- a/bundles/storage-utils
+++ b/bundles/storage-utils
@@ -5,6 +5,7 @@
# [MAINTAINER]: William Douglas <william.douglas(a)intel.com >
LVM2
LVM2-extras
+autofs
btrfs-progs
dosfstools
e2fsprogs
@@ -16,9 +17,12 @@ libmlx5-dev
mdadm
mstflint
ndctl
+nfs-utils
ntfs-3g
opensm
parted
rdma
+rpcbind
sshfs
+usermode
xfsprogs
--
2.11.0
6 years, 3 months
[PATCH clr-bundles] Add darktable to gui bundle
by William Douglas
---
bundles/os-utils-gui | 1 +
1 file changed, 1 insertion(+)
diff --git a/bundles/os-utils-gui b/bundles/os-utils-gui
index 3a7488d..58798b3 100644
--- a/bundles/os-utils-gui
+++ b/bundles/os-utils-gui
@@ -15,6 +15,7 @@ bash-completion
clear-font
clr-desktop-defaults
clr-wallpapers
+darktable
dbus-extras
desktop-file-utils
elementary-xfce
--
2.11.0
6 years, 3 months
[PATCH 1/1] Adding timezone data package to the sysadmin-basic bundle
by George Kramer
---
bundles/sysadmin-basic | 1 +
1 file changed, 1 insertion(+)
diff --git a/bundles/sysadmin-basic b/bundles/sysadmin-basic
index 6670608..bf648ac 100644
--- a/bundles/sysadmin-basic
+++ b/bundles/sysadmin-basic
@@ -51,6 +51,7 @@ systemd-doc
systemd-extras
tmux
tree
+tzdata
unzip
usbutils
util-linux
--
2.9.2.windows.1
6 years, 3 months