Skip to content

ansible: add libcap-dev package to Linux distros #2607

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

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions ansible/roles/baselayout/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ packages: {
# centos-release-scl is required to enable SCLo but we do it manually in
# partials/repo/centos7.yml for arm64
centos7_arm64: ['git,python3'], # git2u not available for aarch64 (yet)
centos7_x64: ['devtoolset-6-libatomic-devel,git222,centos-release-scl,python3'],
centos7_ppc64: ['cmake3,devtoolset-6-libatomic-devel,glib2-devel,git,python3'],
centos7_x64: ['devtoolset-6-libatomic-devel,git222,centos-release-scl,python3,libcap-devel'],
centos7_ppc64: ['cmake3,devtoolset-6-libatomic-devel,glib2-devel,git,python3,libcap-devel'],

centos7: [
'bzip2-devel,openssl-devel,ccache,gcc-c++,devtoolset-6,sudo,zlib-devel,libffi-devel,devtoolset-8,devtoolset-8-libatomic-devel',
'bzip2-devel,openssl-devel,ccache,gcc-c++,devtoolset-6,sudo,zlib-devel,libffi-devel,devtoolset-8,devtoolset-8-libatomic-devel,libcap-devel',
],

aix: [
Expand All @@ -57,23 +57,23 @@ packages: {
],

debian8: [
'ccache,git,gcc-4.9,g++-4.9,libfontconfig1,binutils-2.26,sudo',
'ccache,git,gcc-4.9,g++-4.9,libfontconfig1,binutils-2.26,sudo,libcap-dev',
],

debian9: [
'gcc-6,g++-6,ccache,git,curl,libfontconfig1,apt-transport-https,ca-certificates,sudo',
'gcc-6,g++-6,ccache,git,curl,libfontconfig1,apt-transport-https,ca-certificates,sudo,libcap-dev',
],

debian10: [
'gcc-8,g++-8,ccache,git,curl,libfontconfig1,apt-transport-https,ca-certificates,sudo,python3-pip',
'gcc-8,g++-8,ccache,git,curl,libfontconfig1,apt-transport-https,ca-certificates,sudo,python3-pip,libcap-dev',
],

fedora: [
'bzip2,ccache,gcc-c++,git,fontconfig,sudo,make',
'bzip2,ccache,gcc-c++,git,fontconfig,sudo,make,libcap-devel',
],

freebsd: [
'ccache,git,gmake,sudo,python3'
'ccache,git,gmake,sudo,python3,libcap-dev'
],

'macos10.10': [
Expand Down Expand Up @@ -111,7 +111,7 @@ packages: {
],

rhel7: [
'gcc-c++,sudo,git,zip,unzip,iptables-services,GConf2-devel,openssl-devel,python3',
'gcc-c++,sudo,git,zip,unzip,iptables-services,GConf2-devel,openssl-devel,python3,libcap-devel',
],

smartos: [
Expand Down Expand Up @@ -144,7 +144,7 @@ packages: {
],

ubuntu: [
'ccache,git,libfontconfig1,sudo,python3-pip',
'ccache,git,libfontconfig1,sudo,python3-pip,libcap-dev',
],

ubuntu1404: [
Expand All @@ -158,6 +158,6 @@ packages: {

# Default gcc/g++ package is 7.
ubuntu1804: [
'gcc-6,g++-6,gcc-8,g++-8',
'gcc-6,g++-6,gcc-8,g++-8,libcap-dev',
],
}
3 changes: 2 additions & 1 deletion ansible/roles/docker/templates/alpine311.Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ RUN apk add --no-cache --virtual .build-deps \
bash \
automake \
libtool \
autoconf
autoconf \
libcap-dev

RUN pip3 install tap2junit

Expand Down
3 changes: 2 additions & 1 deletion ansible/roles/docker/templates/alpine312.Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ RUN apk add --no-cache --virtual .build-deps \
bash \
automake \
libtool \
autoconf
autoconf \
libcap-dev

RUN pip3 install tap2junit

Expand Down
3 changes: 3 additions & 0 deletions ansible/roles/docker/templates/ubi81.Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ RUN dnf install --disableplugin=subscription-manager -y \
python3 \
openssl-devel \
procps-ng \
glibc-static \
&& dnf --disableplugin=subscription-manager clean all
RUN git clone https://github.com/mhiramat/libcap && cd libcap \
&& make install

RUN groupadd -r -g {{ server_user_gid.stdout_lines[0] }} {{ server_user }} \
&& adduser -r -m -d /home/{{ server_user }}/ \
Expand Down
3 changes: 2 additions & 1 deletion ansible/roles/docker/templates/ubuntu1604.Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ RUN apt-get update && apt-get dist-upgrade -y && apt-get install -y \
curl \
python-pip \
python3-pip \
libfontconfig1
libfontconfig1 \
libcap-dev

RUN pip install tap2junit

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ RUN apt-get update \
gcc-4.9-multilib \
g++-4.9-multilib \
gcc-6-multilib \
g++-6-multilib
g++-6-multilib \
libcap-dev

RUN pip install tap2junit \
&& pip3 install tap2junit
Expand Down
3 changes: 2 additions & 1 deletion ansible/roles/docker/templates/ubuntu1804.Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ RUN apt-get update && apt-get dist-upgrade -y && apt-get install -y \
curl \
python-pip \
python3-pip \
libfontconfig1
libfontconfig1 \
libcap-dev

RUN pip install tap2junit

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ RUN apt-get update \
gcc-6-multilib \
g++-6-multilib \
gcc-8-multilib \
g++-8-multilib
g++-8-multilib \
libcap-dev

RUN pip install tap2junit \
&& pip3 install tap2junit
Expand All @@ -35,6 +36,10 @@ COPY cc-selector.sh /opt/raspberrypi/cc-selector.sh

RUN chmod 755 /opt/raspberrypi/cc-selector.sh

RUN cp /usr/include/sys/capability.h /opt/raspberrypi/rpi-newer-crosstools/x64-gcc-6.5.0/arm-rpi-linux-gnueabihf/arm-rpi-linux-gnueabihf/sysroot/usr/include/sys/
RUN cp /usr/include/sys/capability.h /opt/raspberrypi/rpi-newer-crosstools/x64-gcc-8.3.0/arm-rpi-linux-gnueabihf/arm-rpi-linux-gnueabihf/sysroot/usr/include/sys/
RUN cp /usr/include/sys/capability.h /opt/raspberrypi/rpi-newer-crosstools/x64-gcc-4.9.4-binutils-2.28/arm-rpi-linux-gnueabihf/arm-rpi-linux-gnueabihf/sysroot/usr/include/sys/

RUN addgroup --gid {{ server_user_gid.stdout_lines[0] }} {{ server_user }} \
&& adduser --gid {{ server_user_gid.stdout_lines[0] }} --uid {{ server_user_uid.stdout_lines[0] }} --disabled-password --gecos {{ server_user }} {{ server_user }}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ RUN apt-get update && apt-get install apt-utils -y && \
curl \
python-pip \
python3-pip \
libfontconfig1
libfontconfig1 \
libcap-dev

RUN pip install tap2junit

Expand Down