#72 fix chowning Release 4.2 (#126)

* making mods for release-4.2 branch

* typo
This commit is contained in:
Ryan Kuba
2019-03-28 15:03:35 +08:00
committed by saarg
parent b6a321aee6
commit c064466ce4
6 changed files with 52 additions and 28 deletions

View File

@@ -1,4 +1,4 @@
FROM lsiobase/alpine:3.8 as buildstage
FROM lsiobase/alpine:3.9 as buildstage
############## build stage ##############
# package versions
@@ -135,7 +135,7 @@ RUN \
sed "s/\(lib\/Ask\/Term.pm';\)/.\/\1/" -i Makefile.PL && \
PERL5LIB=`pwd` && \
echo -e "yes" | perl Makefile.PL PREFIX=/usr/ INSTALLDIRS=vendor && \
make && \
make -j 2 && \
make test && \
make DESTDIR=/tmp/xmltv-build install
@@ -179,7 +179,7 @@ RUN \
--mandir=/usr/share/man \
--prefix=/usr \
--sysconfdir=/config && \
make && \
make -j 2 && \
make DESTDIR=/tmp/tvheadend-build install
RUN \
@@ -197,7 +197,7 @@ RUN \
cd /tmp/argtable && \
./configure \
--prefix=/usr && \
make && \
make -j 2 && \
make check && \
make DESTDIR=/tmp/argtable-build install && \
echo "**** copy to /usr for comskip dependency ****" && \
@@ -211,11 +211,11 @@ RUN \
./configure \
--bindir=/usr/bin \
--sysconfdir=/config/comskip && \
make && \
make -j 2 && \
make DESTDIR=/tmp/comskip-build install
############## runtime stage ##############
FROM lsiobase/alpine:3.8
FROM lsiobase/alpine:3.9
# set version label
ARG BUILD_DATE
@@ -235,11 +235,11 @@ RUN \
ffmpeg \
ffmpeg-libs \
gzip \
libcrypto1.0 \
libcrypto1.1 \
libcurl \
libhdhomerun-libs \
libressl \
libssl1.0 \
libssl1.1 \
libvpx \
libxml2 \
libxslt \

View File

@@ -1,4 +1,4 @@
FROM lsiobase/alpine:arm64v8-3.8 as buildstage
FROM lsiobase/alpine:arm64v8-3.9 as buildstage
############## build stage ##############
# package versions
@@ -135,7 +135,7 @@ RUN \
sed "s/\(lib\/Ask\/Term.pm';\)/.\/\1/" -i Makefile.PL && \
PERL5LIB=`pwd` && \
echo -e "yes" | perl Makefile.PL PREFIX=/usr/ INSTALLDIRS=vendor && \
make && \
make -j 2 && \
make test && \
make DESTDIR=/tmp/xmltv-build install
@@ -179,7 +179,7 @@ RUN \
--mandir=/usr/share/man \
--prefix=/usr \
--sysconfdir=/config && \
make && \
make -j 2 && \
make DESTDIR=/tmp/tvheadend-build install
RUN \
@@ -197,7 +197,7 @@ RUN \
cd /tmp/argtable && \
./configure \
--prefix=/usr && \
make && \
make -j 2 && \
make check && \
make DESTDIR=/tmp/argtable-build install && \
echo "**** copy to /usr for comskip dependency ****" && \
@@ -211,11 +211,11 @@ RUN \
./configure \
--bindir=/usr/bin \
--sysconfdir=/config/comskip && \
make && \
make -j 2 && \
make DESTDIR=/tmp/comskip-build install
############## runtime stage ##############
FROM lsiobase/alpine:arm64v8-3.8
FROM lsiobase/alpine:arm64v8-3.9
# set version label
ARG BUILD_DATE
@@ -235,11 +235,11 @@ RUN \
ffmpeg \
ffmpeg-libs \
gzip \
libcrypto1.0 \
libcrypto1.1 \
libcurl \
libhdhomerun-libs \
libressl \
libssl1.0 \
libssl1.1 \
libvpx \
libxml2 \
libxslt \

View File

@@ -1,4 +1,4 @@
FROM lsiobase/alpine:arm32v7-3.8 as buildstage
FROM lsiobase/alpine:arm32v7-3.9 as buildstage
############## build stage ##############
# package versions
@@ -135,7 +135,7 @@ RUN \
sed "s/\(lib\/Ask\/Term.pm';\)/.\/\1/" -i Makefile.PL && \
PERL5LIB=`pwd` && \
echo -e "yes" | perl Makefile.PL PREFIX=/usr/ INSTALLDIRS=vendor && \
make && \
make -j 2 && \
make test && \
make DESTDIR=/tmp/xmltv-build install
@@ -179,7 +179,7 @@ RUN \
--mandir=/usr/share/man \
--prefix=/usr \
--sysconfdir=/config && \
make && \
make -j 2 && \
make DESTDIR=/tmp/tvheadend-build install
RUN \
@@ -197,7 +197,7 @@ RUN \
cd /tmp/argtable && \
./configure \
--prefix=/usr && \
make && \
make -j 2 && \
make check && \
make DESTDIR=/tmp/argtable-build install && \
echo "**** copy to /usr for comskip dependency ****" && \
@@ -211,11 +211,11 @@ RUN \
./configure \
--bindir=/usr/bin \
--sysconfdir=/config/comskip && \
make && \
make -j 2 && \
make DESTDIR=/tmp/comskip-build install
############## runtime stage ##############
FROM lsiobase/alpine:arm32v7-3.8
FROM lsiobase/alpine:arm32v7-3.9
# set version label
ARG BUILD_DATE
@@ -235,11 +235,11 @@ RUN \
ffmpeg \
ffmpeg-libs \
gzip \
libcrypto1.0 \
libcrypto1.1 \
libcurl \
libhdhomerun-libs \
libressl \
libssl1.0 \
libssl1.1 \
libvpx \
libxml2 \
libxslt \

View File

@@ -245,6 +245,7 @@ Below are the instructions for updating containers:
## Versions
* **27.03.19:** - Rebase to Alpine 3.9, fix init logic to only chown once.
* **23.03.19:** - Switching to new Base images, shift to arm32v7 tag.
* **17.02.19:** - Bump xmltv to 5.70, ensure version tagging works by cloning tvheadend.
* **14.02.19:** - Add picons path to config.

View File

@@ -125,6 +125,7 @@ app_setup_block: |
# changelog
changelogs:
- { date: "27.03.19:", desc: "Rebase to Alpine 3.9, fix init logic to only chown once." }
- { date: "23.03.19:", desc: "Switching to new Base images, shift to arm32v7 tag." }
- { date: "17.02.19:", desc: "Bump xmltv to 5.70, ensure version tagging works by cloning tvheadend." }
- { date: "14.02.19:", desc: "Add picons path to config." }

View File

@@ -13,7 +13,29 @@ mkdir -p \
(cp /defaults/config /config/config)
# permissions
chown -R abc:abc \
/config \
/picons
# function to randomly sample 10 files for their owner and only chown if not abc
chowner () {
files=(${1}/*)
for i in {1..10}; do
user=$(stat -c '%U' $(printf "%s\n" "${files[RANDOM % ${#files[@]}]}"))
if [ "${user}" != "abc" ]; then
chown -R abc:abc ${1}
break
fi
done
}
# permissions
echo "Setting permissions"
abc_dirs=( \
/config \
/picons \
)
for i in "${abc_dirs[@]}"; do
if [ "$(ls -A ${i})" ]; then
chowner ${i}
else
chown -R abc:abc ${i}
fi
done