Add support for a centos-based distro#202
Conversation
|
@achow101 can you review this? |
| dir = sanitize(remote["dir"], remote["dir"]) | ||
|
|
||
| author_date = `cd inputs/#{dir} && git log --format=@%at -1 | date +"%F %T" -u -f -`.strip | ||
| author_date = `cd inputs/#{dir} > /dev/null && git log --format=@%at -1 | date +"%F %T" -u -f -`.strip |
There was a problem hiding this comment.
what is the output that this is suppressing?
There was a problem hiding this comment.
From what I could figure out, the cd was spitting out information about the new directory -- I think in the case where you/your-distro have your shell configured to update the "window title" to reflect the current working directory. Apparently this isn't an issue on the non-Centos invocations?
There was a problem hiding this comment.
This shouldn't happen in non-interactive shells. Perhaps your personal setup has some interactive shell setup or an alias to cd in the wrong shell startup file?
There was a problem hiding this comment.
I tracked it down -- it's because I have CDPATH set: https://unix.stackexchange.com/questions/245453/how-to-not-show-path-after-cd-command-with-cdpath-set (note the workaround).
a71f782 to
25630b7
Compare
|
Note -- I somehow forgot earlier to include the corresponding changes in |
|
utACK 25630b7 I don't have a CentOS system and am not particularly familiar with them, but this looks correct. At the very least, the debian/ubuntu parts seem to be exactly the same as before. |
4b812c9 to
3d3d473
Compare
|
Updated to improve compatibility with newer versions of docker. |
afc16f6 to
9e21679
Compare
| end | ||
|
|
||
| if ENV["USE_DOCKER"] and build_desc["distro"].eql? "centos" | ||
| ontarget_root_extra = "-w /root" |
There was a problem hiding this comment.
what happens if we don't supply this argument?
There was a problem hiding this comment.
On newer versions of docker there appears to be some sort of security setting that causes the command (without the -w root) to fail because of bad permissions on /home/centos (which is weird, of course, since the login is root). This showed up on a coworker's Arch system -- but only when using a centos-based container.
Similar reports:
|
needs rebase |
This updates
gbuildto be compatible with Centos's package manager (yum). It also adds a few robustness improvements (redirectingcdexecutions to /dev/null, preventing any shell-prompt-related output from causing confusion).I've successfully tested/used this with Docker running against an image created with
$ bin/make-base-vm --docker --distro centos --suite 7 --arch amd64.