From 339e9cd12ba2fa94906dbc03d639846098e04a57 Mon Sep 17 00:00:00 2001
From: Eric Lippmann <eric.lippmann@icinga.com>
Date: Thu, 2 Jun 2022 13:11:22 +0200
Subject: [PATCH] Fix permissions of /usr/local/bin

See https://git.icinga.com/build-docker/scripts/-/issues/1
---
 bionic/x86/Dockerfile     | 3 +--
 bionic/x86_64/Dockerfile  | 5 ++---
 focal/x86_64/Dockerfile   | 3 +--
 hirsute/x86_64/Dockerfile | 3 +--
 impish/x86_64/Dockerfile  | 3 +--
 jammy/x86_64/Dockerfile   | 3 +--
 6 files changed, 7 insertions(+), 13 deletions(-)

diff --git a/bionic/x86/Dockerfile b/bionic/x86/Dockerfile
index c620384..7f888c0 100644
--- a/bionic/x86/Dockerfile
+++ b/bionic/x86/Dockerfile
@@ -17,8 +17,7 @@ RUN curl https://packages.icinga.com/icinga.key | apt-key add - \
 RUN groupadd -g 1000 build \
  && useradd -u 1000 -g 1000 -m build \
  && echo 'Defaults:build !requiretty' | tee -a /etc/sudoers \
- && echo 'build ALL=(ALL:ALL) NOPASSWD: ALL' | tee -a /etc/sudoers \
- && chown build.build /usr/local/bin
+ && echo 'build ALL=(ALL:ALL) NOPASSWD: ALL' | tee -a /etc/sudoers
 
 RUN git clone https://git.icinga.com/build-docker/scripts.git /usr/local/bin
 RUN icinga-provide-go 386
diff --git a/bionic/x86_64/Dockerfile b/bionic/x86_64/Dockerfile
index 8e021f2..ae5cc77 100644
--- a/bionic/x86_64/Dockerfile
+++ b/bionic/x86_64/Dockerfile
@@ -5,7 +5,7 @@ ENV DEBIAN_FRONTEND=noninteractive
 RUN apt-get update \
  && apt-get -y install apt-transport-https gnupg
 
-RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 308C15A29AD198E9 
+RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 308C15A29AD198E9
 
 RUN echo 'deb http://ppa.launchpad.net/gophers/archive/ubuntu bionic main \n\
 deb-src http://ppa.launchpad.net/gophers/archive/ubuntu bionic main' > /etc/apt/sources.list.d/gophers.list
@@ -25,8 +25,7 @@ RUN curl https://packages.icinga.com/icinga.key | apt-key add - \
 RUN groupadd -g 1000 build \
  && useradd -u 1000 -g 1000 -m build \
  && echo 'Defaults:build !requiretty' | tee -a /etc/sudoers \
- && echo 'build ALL=(ALL:ALL) NOPASSWD: ALL' | tee -a /etc/sudoers \
- && chown build.build /usr/local/bin
+ && echo 'build ALL=(ALL:ALL) NOPASSWD: ALL' | tee -a /etc/sudoers
 
 RUN git clone https://git.icinga.com/build-docker/scripts.git /usr/local/bin
 RUN icinga-provide-go
diff --git a/focal/x86_64/Dockerfile b/focal/x86_64/Dockerfile
index 4c3742c..c59cdac 100644
--- a/focal/x86_64/Dockerfile
+++ b/focal/x86_64/Dockerfile
@@ -17,8 +17,7 @@ RUN curl https://packages.icinga.com/icinga.key | apt-key add - \
 RUN groupadd -g 1000 build \
  && useradd -u 1000 -g 1000 -m build \
  && echo 'Defaults:build !requiretty' | tee -a /etc/sudoers \
- && echo 'build ALL=(ALL:ALL) NOPASSWD: ALL' | tee -a /etc/sudoers \
- && chown build.build /usr/local/bin
+ && echo 'build ALL=(ALL:ALL) NOPASSWD: ALL' | tee -a /etc/sudoers
 
 RUN git clone https://git.icinga.com/build-docker/scripts.git /usr/local/bin
 RUN icinga-provide-go
diff --git a/hirsute/x86_64/Dockerfile b/hirsute/x86_64/Dockerfile
index fd26df5..5edcef9 100644
--- a/hirsute/x86_64/Dockerfile
+++ b/hirsute/x86_64/Dockerfile
@@ -17,8 +17,7 @@ RUN curl https://packages.icinga.com/icinga.key | apt-key add - \
 RUN groupadd -g 1000 build \
  && useradd -u 1000 -g 1000 -m build \
  && echo 'Defaults:build !requiretty' | tee -a /etc/sudoers \
- && echo 'build ALL=(ALL:ALL) NOPASSWD: ALL' | tee -a /etc/sudoers \
- && chown build.build /usr/local/bin
+ && echo 'build ALL=(ALL:ALL) NOPASSWD: ALL' | tee -a /etc/sudoers
 
 RUN git clone https://git.icinga.com/build-docker/scripts.git /usr/local/bin
 RUN icinga-provide-go
diff --git a/impish/x86_64/Dockerfile b/impish/x86_64/Dockerfile
index 2823350..1f60976 100644
--- a/impish/x86_64/Dockerfile
+++ b/impish/x86_64/Dockerfile
@@ -17,8 +17,7 @@ RUN curl https://packages.icinga.com/icinga.key | apt-key add - \
 RUN groupadd -g 1000 build \
  && useradd -u 1000 -g 1000 -m build \
  && echo 'Defaults:build !requiretty' | tee -a /etc/sudoers \
- && echo 'build ALL=(ALL:ALL) NOPASSWD: ALL' | tee -a /etc/sudoers \
- && chown build.build /usr/local/bin
+ && echo 'build ALL=(ALL:ALL) NOPASSWD: ALL' | tee -a /etc/sudoers
 
 RUN git clone https://git.icinga.com/build-docker/scripts.git /usr/local/bin
 RUN icinga-provide-go
diff --git a/jammy/x86_64/Dockerfile b/jammy/x86_64/Dockerfile
index e3044e2..1cfdfdc 100644
--- a/jammy/x86_64/Dockerfile
+++ b/jammy/x86_64/Dockerfile
@@ -17,8 +17,7 @@ RUN curl https://packages.icinga.com/icinga.key | apt-key add - \
 RUN groupadd -g 1000 build \
  && useradd -u 1000 -g 1000 -m build \
  && echo 'Defaults:build !requiretty' | tee -a /etc/sudoers \
- && echo 'build ALL=(ALL:ALL) NOPASSWD: ALL' | tee -a /etc/sudoers \
- && chown build.build /usr/local/bin
+ && echo 'build ALL=(ALL:ALL) NOPASSWD: ALL' | tee -a /etc/sudoers
 
 RUN git clone https://git.icinga.com/build-docker/scripts.git /usr/local/bin
 RUN icinga-provide-go
-- 
GitLab