-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
try to move linux arm gnueahibf onto container #29
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just chiming in
build/create_container.sh
Outdated
libx11-dev:armhf \ | ||
libx11-xcb-dev:armhf \ | ||
libxkbfile-dev:armhf \ | ||
libsecret-1-dev:armhf \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think these are really needed to build ripgrep. All you actually need is cargo, correct?
build/create_container.sh
Outdated
gcc-8-arm-linux-gnueabihf \ | ||
g++-8-arm-linux-gnueabihf \ | ||
binutils-arm-linux-gnueabihf \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this part is already covered by build/install.sh
build/create_container.sh
Outdated
sudo sed -i "s/^deb/deb [arch=amd64,i386]/g" /etc/apt/sources.list | ||
echo "deb [arch=arm64,armhf] http://ports.ubuntu.com/ bionic main universe multiverse restricted" | sudo tee -a /etc/apt/sources.list | ||
echo "deb [arch=arm64,armhf] http://ports.ubuntu.com/ bionic-security main universe multiverse restricted" | sudo tee -a /etc/apt/sources.list | ||
echo "deb [arch=arm64,armhf] http://ports.ubuntu.com/ bionic-updates main universe multiverse restricted" | sudo tee -a /etc/apt/sources.list | ||
sudo dpkg --add-architecture armhf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really needed, is it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the build/create_container.sh
executable? Might be a good idea to add #!/bin/bash
and chmod +x build/create_container.sh
but that's just a personal preference.
build/create_container.sh
Outdated
pkg-config \ | ||
fakeroot \ | ||
rpm \ | ||
sudo \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these also needed?
build/create_container.sh
Outdated
libsecret-1-dev:armhf \ | ||
curl \ | ||
gnupg \ | ||
unzip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe what you initially need to install is just nodejs
and git
, and I think that's pretty much it, after that, /build/install.sh
will install cargo.
build/main.yml
Outdated
- script: | | ||
set -ex | ||
sudo apt-get install git | ||
sudo apt-get install nodejs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you try running without sudo?
Looks like the container is running rootless, so we can't install
No need to change |
I'm guessing that's the correct path from |
I asked about using that container, and the team preferred that I don't rely on it since it might be changing often. Instead, they proposed that I extract what I need from it and run my own container. That's what I'm trying to do here (with my limited container experience)... |
Hmmmm well... you can install nodejs from a binary release, that should not require superuser, but From what I've read from other issues, it doesn't look like we can install packages on the running container without some more complicated steps. I wrote a PoC using the steps mentioned in the issue above but I don't really feel like that's going a be an accepted solution (too fragile and might change in the future). I would reconsider using |
Yeah, I would imagine that this is an issue for any non-musl linux releases. I think that I could maybe install packages like they do in zeromq-prebuilt https://github.com/microsoft/zeromq-prebuilt/blob/55d19504bf58b0ff04c7e17f015ad5b6a826bbf3/build/main.yml#L178-L193, but I'm unsure how to cleanly run everything in that container in this case. Would I need to run everything from a script rather than yml file steps? |
Hmmm do you think this will work then? - job: linux_arm
pool:
vmImage: 'ubuntu-latest'
container:
image: mcr.microsoft.com/mirror/docker/library/ubuntu:18.04
options: '--name build-container'
steps:
- script: |
set -ex
docker exec -t -u root build-container mv /etc/sudoers /etc/sudoers.bak
docker exec -t -e DEBIAN_FRONTEND=noninteractive -u root build-container apt-get -qq update
docker exec -t -e DEBIAN_FRONTEND=noninteractive -u root build-container apt-get -qq install sudo curl git nodejs
docker exec -t -u root build-container mv /etc/sudoers.bak /etc/sudoers
displayName: Container Pre-reqs
target: host
- template: linux.yml
parameters:
target: arm-unknown-linux-gnueabihf We create the container with the ubuntu:18.04 image and name it |
Fixes #24