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
1diff --git a/tools/build-on-freebsd b/tools/build-on-freebsd
2index d23fde2..dc3b974 100755
3--- a/tools/build-on-freebsd
4+++ b/tools/build-on-freebsd
5@@ -9,6 +9,7 @@ fail() { echo "FAILED:" "$@" 1>&2; exit 1; }
6 depschecked=/tmp/c-i.dependencieschecked
7 pkgs="
8 bash
9+ chpasswd
10 dmidecode
11 e2fsprogs
12 py27-Jinja2
13@@ -17,6 +18,7 @@ pkgs="
14 py27-configobj
15 py27-jsonpatch
16 py27-jsonpointer
17+ py27-jsonschema
18 py27-oauthlib
19 py27-requests
20 py27-serial
21@@ -28,12 +30,9 @@ pkgs="
22 [ -f "$depschecked" ] || pkg install ${pkgs} || fail "install packages"
23 touch $depschecked
24
25-# Required but unavailable port/pkg: py27-jsonpatch py27-jsonpointer
26-# Luckily, the install step will take care of this by installing it from pypi...
27-
28 # Build the code and install in /usr/local/:
29-python setup.py build
30-python setup.py install -O1 --skip-build --prefix /usr/local/ --init-system sysvinit_freebsd
31+python2.7 setup.py build
32+python2.7 setup.py install -O1 --skip-build --prefix /usr/local/ --init-system sysvinit_freebsd
33
34 # Enable cloud-init in /etc/rc.conf:
35 sed -i.bak -e "/cloudinit_enable=.*/d" /etc/rc.conf

Subscribers

People subscribed via source and target branches