Merge lp:~kyle-ireland/opencompute/Checkbox-Port-CentOS into lp:opencompute/checkbox

Proposed by Kyle Ireland
Status: Merged
Approved by: Jeff Marcom
Approved revision: 2145
Merged at revision: 2145
Proposed branch: lp:~kyle-ireland/opencompute/Checkbox-Port-CentOS
Merge into: lp:opencompute/checkbox
Diff against target: 95 lines (+80/-0)
2 files modified
README-PORT (+76/-0)
bin/checkbox-ocp (+4/-0)
To merge this branch: bzr merge lp:~kyle-ireland/opencompute/Checkbox-Port-CentOS
Reviewer Review Type Date Requested Status
Jeff Marcom (community) Approve
Review via email: mp+181424@code.launchpad.net

Description of the change

Symbolic link created in bin/checkbox-cli between /usr/share/checkbox/examples and /etc/checkbox.d/configs. Also provided a README on how to port the Checkbox source to a CentOS system.

To post a comment you must log in.
Revision history for this message
Jeff Marcom (jeffmarcom) wrote :

Awesome work Kyle!
Now, I want to make sure we're handling this the correct way. Earlier, there was a merge that added a new package type to checkbox called "checkbox-ocp".

Our original discussion suggested that this proposed fix make its way into checkbox-cli, however I feel that this symlink check be instead now incorporated into "bin/checkbox-ocp" instead.

The fact that we have "bin/checkbox-ocp" will give you a bit more flexibility into making this work for other distributions without hindering the back-porting of features of lp:checkbox into lp:opencompute/checkbox.

This of course isn't your fault, and if it were not for the checkbox-ocp commit earlier today this would have a BIG stamp of approval from myself atleast.

Jeff Lane:

To give some context here (in case you look ) is that through the process of porting from debian to rpm using alien, the symlink "configs" is not preserved/made when installing with the rpm. Instead, Kyle has put a non-intrusive check to make sure it exists before executing checkbox.

There's one more thing,

I believe it should be if [ ! -s ] or [ ! -L] not if [ ! -S], please correct me if I'm wrong.

Thanks!!

review: Needs Fixing
2145. By Kyle Ireland <email address hidden>

Initial submission for Checkbox port to CentOS

Revision history for this message
Jeff Marcom (jeffmarcom) wrote :

+1 Thanks Kyle,

I'm making some very minor changes to the readme and bin/checkbox-ocp. You should be able to see the new diff in rev 2147.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'README-PORT'
2--- README-PORT 1970-01-01 00:00:00 +0000
3+++ README-PORT 2013-08-23 21:35:28 +0000
4@@ -0,0 +1,76 @@
5+The following steps will port your Checkbox source from Ubuntu to CentOS 6.4.
6+
7+Note: Following steps are on an Ubuntu system.
8+1) Install the devscripts package to create a debian package from source.
9+ # apt-get install devscripts
10+
11+2) Perform the following command in the Checkbox source code root directory to create
12+ a debian package.
13+ /checkbox# debuild -i -us -uc -b
14+
15+3) Move up to the parent directory to view the debian packages that were built:
16+ # cd ..
17+
18+4) Download alien to convert the .deb packages into .rpm packages.
19+ # apt-get install alien
20+
21+5) Convert the .deb packages into .rpm packages using the following command:
22+ alien -r package_name.deb -scripts
23+
24+6) Transfer the checkbox*.rpm files to the CentOS 6.4 machine.
25+
26+Note: Following steps are on a CentOS 6.4 system.
27+7) Install python3 on the CentOS machnine.
28+ 7a) Install Development tools to be able to build from source
29+ # yum groupinstall "Development tools"
30+
31+ 7b) Install extra libraries for the python3 interpreter
32+ # yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqllite-devel readline-devel tk-devel
33+
34+ 7c) Add the Princeton University and the Institute for Advanced Study (PUIAS) repository to your mirrorlist to install python3.
35+ i. Download the rpm gpg key
36+ # cd /etc/pki/rpm-gpg
37+ # wget -q http://springdale.math.ias.edu/data/puias/6/x86_64/os/RPM-GPG-KEY-puias
38+ # rpm -import RPM-GPG-KEY-puias
39+ ii. Create the repository file as /etc/yum.repos.d/puias-computational.repo
40+ # cd /etc/yum.repos.d
41+ # touch puias-computational.repo
42+ # editor(vim, nano, etc) puias-computational.repo
43+ [PUIAS_6_computational]
44+ name=PUIAS computational BASE $releasever - $basearch
45+ mirrorlist=http://puias.math.ias.edu/data/puias/computational/$releasever/$basearch/mirrorlist
46+ #baseurl=http://puias.math.ias.edu/data/puias/computational/$releasever/$basearch
47+ gpgcheck=1
48+ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puias
49+
50+ 7d) Search for python3 in your repo.
51+ # yum search python3
52+
53+ 7e) Install python3 if it is returned after the search.
54+ # yum install python3
55+
56+8) Install Distribute to allow python modules to be installed
57+ 8a) Download Distribute source code.
58+ # wget http://pypi.python.org/packages/source/d/distribute/distribute-0.6.35.tar.gz
59+
60+ 8b) Extract and Install
61+ # tar -xzvf distribute-0.6.35.tar.gz
62+ # cd distribute-0.6.35
63+ # python3 setup.py make && python3 setup.py install
64+
65+9) Install the lxml python module that is needed by checkbox
66+ 9a) Install lxml dependencies
67+ # yum install libxml2-devel libxslt-devel
68+
69+ 9b) Install module
70+ # easy_install-3.3 lxml
71+
72+10) Install the checkbox*.rpm files in the directory they were stored in.
73+ # rpm -Uvh checkbox*.rpm
74+
75+11) Copy the checkbox files from /usr/lib/python3/dist-packages into /usr/lib/python3.3/site-packages/ or else checkbox won't run.
76+ # cp -r /usr/lib/python3/dist-packages/checkbox* /usr/lib/python3.3/site-packages/
77+
78+12) Run checkbox at the terminal with the following command
79+ # checkbox-cli
80+
81
82=== modified file 'bin/checkbox-ocp'
83--- bin/checkbox-ocp 2013-08-21 16:18:29 +0000
84+++ bin/checkbox-ocp 2013-08-23 21:35:28 +0000
85@@ -6,6 +6,10 @@
86 export CHECKBOX_OPTIONS=${CHECKBOX_OPTIONS:---whitelist-file=$CHECKBOX_SHARE/data/whitelists/opencompute-ready-local.whitelist}
87 export PYTHONPATH=$PYTHONPATH:$CHECKBOX_SHARE
88
89+if [ ! -S /etc/checkbox.d/configs ]
90+then ln -s /usr/share/checkbox/examples /etc/checkbox.d/configs
91+fi
92+
93 if [ $CHECKBOX_DATA != '.' ]
94 then
95 old_data=$HOME/.checkbox

Subscribers

People subscribed via source and target branches