Browse Source

travis: fix issue with FS priviliges after recent update

Jakub Jirutka 2 years ago
parent
commit
705d03e2e0
3 changed files with 5 additions and 6 deletions
  1. 1
    1
      .travis.yml
  2. 0
    1
      .travis/common.sh
  3. 4
    4
      .travis/setup-alpine

+ 1
- 1
.travis.yml View File

@@ -4,6 +4,6 @@ install:
4 4
   - sudo .travis/setup-alpine
5 5
 script: |
6 6
   source .travis/common.sh
7
-  alpine_run $ALPINE_USER .travis/build-pkgs
7
+  alpine_run $USER .travis/build-pkgs
8 8
 notifications:
9 9
   email: false

+ 0
- 1
.travis/common.sh View File

@@ -1,7 +1,6 @@
1 1
 # vim: set ts=4:
2 2
 
3 3
 readonly ALPINE_ROOT='/mnt/alpine'
4
-readonly ALPINE_USER='alpine'
5 4
 readonly CLONE_DIR="${CLONE_DIR:-$(pwd)}"
6 5
 readonly MIRROR_URI='http://nl.alpinelinux.org/alpine/edge'
7 6
 

+ 4
- 4
.travis/setup-alpine View File

@@ -12,9 +12,9 @@ mount --bind "$CLONE_DIR" "${ALPINE_ROOT}${CLONE_DIR}"
12 12
 alpine_run <<-EOF
13 13
 	apk add alpine-sdk lua-aports
14 14
 
15
-	adduser -G users -s /bin/sh -D $ALPINE_USER
16
-	addgroup $ALPINE_USER abuild
17
-	addgroup $ALPINE_USER wheel
15
+	adduser -u $SUDO_UID -G users -s /bin/sh -D $SUDO_USER
16
+	addgroup $SUDO_USER abuild
17
+	addgroup $SUDO_USER wheel
18 18
 
19 19
 	echo '%wheel ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/wheel
20 20
 
@@ -28,6 +28,6 @@ alpine_run <<-EOF
28 28
 EOF
29 29
 
30 30
 # This key will not be used anywhere, just to make abuild happy...
31
-alpine_run $ALPINE_USER <<-EOF
31
+alpine_run $SUDO_USER <<-EOF
32 32
 	abuild-keygen -ain
33 33
 EOF