[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] use "chown uid:gid" instead of "chown uid.gid" everywhere
Holger Levsen (@holger)
gitlab at salsa.debian.org
Sat Sep 24 13:14:02 BST 2022
Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net
Commits:
b88030dd by Holger Levsen at 2022-09-24T14:13:31+02:00
use "chown uid:gid" instead of "chown uid.gid" everywhere
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
3 changed files:
- bin/schroot-create.sh
- init_node
- update_jdn.sh
Changes:
=====================================
bin/schroot-create.sh
=====================================
@@ -216,7 +216,7 @@ bootstrap() {
sudo umount -l "$SCHROOT_TARGET/proc"
# configure sudo inside just like outside
echo "jenkins ALL=NOPASSWD: ALL" | sudo tee -a "$SCHROOT_TARGET/etc/sudoers.d/jenkins" >/dev/null
- sudo chroot "$SCHROOT_TARGET" chown root.root /etc/sudoers.d/jenkins
+ sudo chroot "$SCHROOT_TARGET" chown root:root /etc/sudoers.d/jenkins
sudo chroot "$SCHROOT_TARGET" chmod 700 /etc/sudoers.d/jenkins
fi
}
=====================================
init_node
=====================================
@@ -1,6 +1,6 @@
#!/bin/bash
#
-# Copyright 2014-2021 Holger Levsen <holger at layer-acht.org>
+# Copyright 2014-2022 Holger Levsen <holger at layer-acht.org>
#
# released under the GPLv2
#
@@ -31,7 +31,7 @@ usermod -G jenkins jenkins-adm
which sudo || apt-get install -y sudo
echo '%jenkins-adm ALL= NOPASSWD: ALL' > /etc/sudoers.d/jenkins-adm # will be overwritten later
grep -q bullseye-backports /etc/apt/sources.list || echo "deb http://deb.debian.org/debian/ bullseye-backports main contrib non-free" >> /etc/apt/sources.list
-chown jenkins-adm.jenkins-adm /home/jenkins-adm
+chown jenkins-adm:jenkins-adm /home/jenkins-adm
cd ~jenkins-adm
# the keyring is needed as otherwise update_jdn will fail later
[ -x /usr/bin/git ] || apt-get install -y git fasttrack-archive-keyring
@@ -39,7 +39,7 @@ su jenkins-adm -l -c "git clone $GIT_REPO"
cd jenkins.debian.net
su jenkins-adm -l -c "git -C ~jenkins-adm/jenkins.debian.net config pull.ff only"
mkdir -p /var/log/jenkins/
-chown jenkins.jenkins /var/log/jenkins/
+chown jenkins:jenkins /var/log/jenkins/
set +x
set +e
=====================================
update_jdn.sh
=====================================
@@ -248,12 +248,12 @@ for directory in /schroots /srv/reproducible-results /srv/d-i /srv/udebs /var/lo
if [ ! -d $directory ] ; then
sudo mkdir $directory
fi
- sudo chown jenkins.jenkins $directory
+ sudo chown jenkins:jenkins $directory
done
for directory in /srv/jenkins ; do
if [ ! -d $directory ] ; then
sudo mkdir $directory
- sudo chown jenkins-adm.jenkins-adm $directory
+ sudo chown jenkins-adm:jenkins-adm $directory
fi
done
@@ -644,8 +644,8 @@ sudo systemctl daemon-reload
#
# more configuration than a simple cp can do
#
-sudo chown root.root /etc/sudoers.d/jenkins ; sudo chmod 700 /etc/sudoers.d/jenkins
-sudo chown root.root /etc/sudoers.d/jenkins-adm ; sudo chmod 700 /etc/sudoers.d/jenkins-adm
+sudo chown root:root /etc/sudoers.d/jenkins ; sudo chmod 700 /etc/sudoers.d/jenkins
+sudo chown root:root /etc/sudoers.d/jenkins-adm ; sudo chmod 700 /etc/sudoers.d/jenkins-adm
[ -f /etc/mailname ] || ( echo $HOSTNAME.debian.net | sudo tee /etc/mailname )
if [ "$HOSTNAME" = "jenkins" ] || [ "$HOSTNAME" = "ionos7-amd64" ]; then
@@ -670,12 +670,12 @@ if [ "$HOSTNAME" = "jenkins" ] || [ "$HOSTNAME" = "ionos7-amd64" ] ; then
case "$HOSTNAME" in
jenkins)
sudo a2ensite -q jenkins.debian.net
- sudo chown jenkins-adm.jenkins-adm /etc/apache2/sites-enabled/jenkins.debian.net.conf
+ sudo chown jenkins-adm:jenkins-adm /etc/apache2/sites-enabled/jenkins.debian.net.conf
sudo a2enconf -q munin
;;
ionos7-amd64)
sudo a2ensite -q buildinfos.debian.net
- sudo chown jenkins-adm.jenkins-adm /etc/apache2/sites-enabled/buildinfos.debian.net.conf
+ sudo chown jenkins-adm:jenkins-adm /etc/apache2/sites-enabled/buildinfos.debian.net.conf
;;
esac
# for reproducible.d.n url rewriting:
@@ -733,7 +733,7 @@ shopt -u nullglob
for dir in bin logparse mustache-templates ; do
sudo mkdir -p /srv/jenkins/$dir
sudo rsync -rpt --delete $dir/ /srv/jenkins/$dir/
- sudo chown -R jenkins-adm.jenkins-adm /srv/jenkins/$dir
+ sudo chown -R jenkins-adm:jenkins-adm /srv/jenkins/$dir
done
HOST_JOBS="hosts/$HOSTNAME/job-cfg"
if [ -e "$HOST_JOBS" ] ; then
@@ -745,7 +745,7 @@ fi
sudo mkdir -p -m 700 /var/lib/jenkins/.ssh
-sudo chown jenkins.jenkins /var/lib/jenkins/.ssh
+sudo chown jenkins:jenkins /var/lib/jenkins/.ssh
if [ "$HOSTNAME" = "jenkins" ] ; then
sudo -u jenkins install -m 600 jenkins-home/authorized_keys /var/lib/jenkins/.ssh/authorized_keys
sudo -u jenkins cp jenkins-home/procmailrc /var/lib/jenkins/.procmailrc
@@ -774,7 +774,7 @@ if [ "$HOSTNAME" = "jenkins" ] ; then
rm $TMPFILE
TMPDIR=$(mktemp -d -t update-jdn-XXXXXXXX)
sudo cp -pr userContent $TMPDIR/
- sudo chown -R jenkins.jenkins $TMPDIR
+ sudo chown -R jenkins:jenkins $TMPDIR
sudo cp -pr $TMPDIR/userContent /var/lib/jenkins/
sudo rm -r $TMPDIR > /dev/null
cd /var/lib/jenkins/userContent/
@@ -786,7 +786,7 @@ if [ "$HOSTNAME" = "jenkins" ] ; then
diff THANKS .THANKS >/dev/null || asciidoc $ASCIIDOC_PARAMS -o thanks.html THANKS
mv THANKS .THANKS
rm TODO README INSTALL CONTRIBUTING
- sudo chown jenkins.jenkins /var/lib/jenkins/userContent/*html
+ sudo chown jenkins:jenkins /var/lib/jenkins/userContent/*html
explain "user content for jenkins updated."
fi
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/b88030dd2ca347d1040cc00e0fb1388a14e9374c
--
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/b88030dd2ca347d1040cc00e0fb1388a14e9374c
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20220924/a6196f7f/attachment-0001.htm>
More information about the Qa-jenkins-scm
mailing list