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

Subscribers

People subscribed via source and target branches