diff --git a/misc/make-deps.sh b/misc/make-deps.sh index dadc598d..01896618 100755 --- a/misc/make-deps.sh +++ b/misc/make-deps.sh @@ -76,7 +76,7 @@ fi if [ $travis -eq 0 ]; then if [ ! -z "$YUM" ]; then if [ -z "$GO" ]; then - $sudo_command $YUM install -y golang golang-googlecode-tools-stringer + $sudo_command $YUM install -y golang golang-googlecode-tools-stringer || $sudo_command $YUM install -y golang-bin # centos-7 epel fi # some go dependencies are stored in mercurial $sudo_command $YUM install -y hg diff --git a/misc/make-rpm-changelog.sh b/misc/make-rpm-changelog.sh index e55326f7..5047a1b6 100755 --- a/misc/make-rpm-changelog.sh +++ b/misc/make-rpm-changelog.sh @@ -15,6 +15,20 @@ if [ ! -d "$dir" ]; then echo "changelog dir ($dir) does not exist" exit 1 fi + +if [ "$DISTRO" = "centos-7" ]; then + # FIXME: This will fail *inside* a build running on CentOS-7, until we + # improve the below script to work when we have an old version of git! + # Build a "fake" (temporary) changelog so that fpm doesn't fail. + echo "" > "$CHANGELOG" + echo "* $(date '+%a %b %d %Y') James Shubin ${VERSION}" >> "$CHANGELOG" + echo "" >> "$CHANGELOG" + echo " - James Shubin (1):" >> "$CHANGELOG" + echo " Latest release of mgmt" >> "$CHANGELOG" + echo "" >> "$CHANGELOG" + exit 0 # `git tag` isn't new enough on centos-7, skip this here +fi + # input to format flag for git tag TAG_FORMAT="* %(creatordate:format:%a %b %d %Y) %(creator) %(refname:lstrip=2)" # a list of tags to be parsed in the loop diff --git a/misc/mkosi/mkosi.default.centos-7 b/misc/mkosi/mkosi.default.centos-7 index 9eb66a60..c0590b8d 100644 --- a/misc/mkosi/mkosi.default.centos-7 +++ b/misc/mkosi/mkosi.default.centos-7 @@ -1,11 +1,13 @@ [Distribution] -Distribution=centos +Distribution=centos_epel Release=7 [Output] Format=raw_btrfs #Format=gpt_btrfs -Bootable=yes +# Bootable must be no or else systemd-udev package will be installed (some bug) +# TODO: https://github.com/systemd/mkosi/issues/356 +Bootable=no # This can be a ramdisk to improve performance. OutputDirectory=mkosi.output @@ -20,17 +22,17 @@ WithNetwork=true # The packages to appear in both the build and the final image. Packages= - dnf + yum + rpm-build make git - golang tree # The packages to appear in the build image, but absent from the final image. #BuildPackages= -# dnf +# yum +# rpm-build # make # git -# golang # tree # Store our build artifacts here. This makes them accessible to the outside.