Merge ~goneri/cloud-init:build-on-freebsd into cloud-init:master

Proposed by Gonéri Le Bouder
Status: Merged
Approved by: Ryan Harper
Approved revision: d69f15073a1d0649a72ce0f6d2fde73f133b7ea1
Merge reported by: Server Team CI bot
Merged at revision: not available
Proposed branch: ~goneri/cloud-init:build-on-freebsd
Merge into: cloud-init:master
Diff against target: 35 lines (+4/-5)
1 file modified
tools/build-on-freebsd (+4/-5)
Reviewer Review Type Date Requested Status
Server Team CI bot continuous-integration Approve
Ryan Harper Approve
Review via email: mp+366333@code.launchpad.net

This proposal supersedes a proposal from 2019-04-07.

Commit message

freebsd: add chpasswd pkg in the image

cc_set_passwords.py depends on chpasswd binary.

To post a comment you must log in.
Revision history for this message
Dan Watkins (oddbloke) wrote :

This looks like a reasonable set of changes to me; is there any good way for me to test it? (Perhaps in a container/public cloud?)

Also, do we need to open a bug for converting this script to Python 3 in preparation for dropping Python 2 support from cloud-init[0]?

[0] https://lists.launchpad.net/cloud-init/msg00170.html

Revision history for this message
Gonéri Le Bouder (goneri) wrote :

I use the following script to prepare my FreeBSD images, my freebsd branch comes with all the patches from my different branches:
https://github.com/virt-lightning/freebsd-cloud-images

Python3 is on my TODO list, with a lower priority. If you open a bug, you can affect it to me.

Revision history for this message
do3meli (d-info-e) wrote :

i wonder if tools/build-on-freebsd could not be dropped completely as there is an official freshport in the meanwhile: https://www.freshports.org/net/cloud-init/

the port is version 18.3 and includes just some FreeBSD specific patches out of which i know some are 100% obsolete in the meanwhile. see https://svnweb.freebsd.org/ports/head/net/cloud-init/files/

instead of having this script i would rather have a closer work together with the port maintainer to get these FreeBSD patches upstream if still needed.

or is there any good reason to still keep and maintain this build-on-freebsd script? if so i think we should make the script python2 and python3 compatible until we can drop python2 sometime in 2020.

just my 2 cents ;-)

Revision history for this message
Gonéri Le Bouder (goneri) wrote :

I use the script to quickly set-up my environment without depending on the port. I understand that the port is definitely a better solution most of the time, but it's also good to have a vanilla way to install the software.

Revision history for this message
do3meli (d-info-e) wrote :

sorry i somehow missed your answer. can not subscribe to this thread somehow. can you subscribe me as branch owner?

it is ok to have a vanilla way to install the software. it just needs to be maintained.

and independent of this: we should bring the freshport patches somehow upstream and update to a newer version there. maybe you have contact with the port maintainer already?

Revision history for this message
Gonéri Le Bouder (goneri) wrote :

I didn't know about the freshport patches until you mentioned that in your previous comment. I'm not that familiar with FreeBSD. Anyway, I haven't see any PR with these patches, but some of them are actually already covered by branches.

Revision history for this message
Ryan Harper (raharper) wrote :

Seems fine to me. I'm skipping CI since we don't exercise the build-on-freebsd tool.

review: Approve
Revision history for this message
Server Team CI bot (server-team-bot) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/tools/build-on-freebsd b/tools/build-on-freebsd
index d23fde2..dc3b974 100755
--- a/tools/build-on-freebsd
+++ b/tools/build-on-freebsd
@@ -9,6 +9,7 @@ fail() { echo "FAILED:" "$@" 1>&2; exit 1; }
9depschecked=/tmp/c-i.dependencieschecked9depschecked=/tmp/c-i.dependencieschecked
10pkgs="10pkgs="
11 bash11 bash
12 chpasswd
12 dmidecode13 dmidecode
13 e2fsprogs14 e2fsprogs
14 py27-Jinja215 py27-Jinja2
@@ -17,6 +18,7 @@ pkgs="
17 py27-configobj18 py27-configobj
18 py27-jsonpatch19 py27-jsonpatch
19 py27-jsonpointer20 py27-jsonpointer
21 py27-jsonschema
20 py27-oauthlib22 py27-oauthlib
21 py27-requests23 py27-requests
22 py27-serial24 py27-serial
@@ -28,12 +30,9 @@ pkgs="
28[ -f "$depschecked" ] || pkg install ${pkgs} || fail "install packages"30[ -f "$depschecked" ] || pkg install ${pkgs} || fail "install packages"
29touch $depschecked31touch $depschecked
3032
31# Required but unavailable port/pkg: py27-jsonpatch py27-jsonpointer
32# Luckily, the install step will take care of this by installing it from pypi...
33
34# Build the code and install in /usr/local/:33# Build the code and install in /usr/local/:
35python setup.py build34python2.7 setup.py build
36python setup.py install -O1 --skip-build --prefix /usr/local/ --init-system sysvinit_freebsd35python2.7 setup.py install -O1 --skip-build --prefix /usr/local/ --init-system sysvinit_freebsd
3736
38# Enable cloud-init in /etc/rc.conf:37# Enable cloud-init in /etc/rc.conf:
39sed -i.bak -e "/cloudinit_enable=.*/d" /etc/rc.conf38sed -i.bak -e "/cloudinit_enable=.*/d" /etc/rc.conf

Subscribers

People subscribed via source and target branches