mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2024-11-22 08:04:04 +01:00
Merge branch 'bugfix/KASM-2518-fix-opensuse-cert-dir' into 'master'
Resolve KASM-2518 "Bugfix/ fix opensuse cert dir" Closes KASM-2518 See merge request kasm-technologies/internal/KasmVNC!79
This commit is contained in:
commit
848d45b411
@ -8,23 +8,8 @@ RUN zypper -n install -y \
|
|||||||
vim \
|
vim \
|
||||||
xterm
|
xterm
|
||||||
|
|
||||||
# deps and rpm install
|
# Cache repo updates, so that package changes don't trigger it on every build.
|
||||||
RUN zypper -n install -y \
|
RUN zypper refresh
|
||||||
libglvnd \
|
|
||||||
libgomp1 \
|
|
||||||
libjpeg8 \
|
|
||||||
libpixman-1-0 \
|
|
||||||
libXdmcp6 \
|
|
||||||
libXfont2-2 \
|
|
||||||
libxkbcommon-x11-0 \
|
|
||||||
openssl \
|
|
||||||
perl \
|
|
||||||
x11-tools \
|
|
||||||
xauth \
|
|
||||||
xkbcomp \
|
|
||||||
xkeyboard-config && \
|
|
||||||
mkdir -p /etc/pki/tls/private
|
|
||||||
|
|
||||||
ARG KASMVNC_PACKAGE_DIR
|
ARG KASMVNC_PACKAGE_DIR
|
||||||
COPY $KASMVNC_PACKAGE_DIR/*.rpm /tmp
|
COPY $KASMVNC_PACKAGE_DIR/*.rpm /tmp
|
||||||
RUN zypper install -y --allow-unsigned-rpm /tmp/*.rpm
|
RUN zypper install -y --allow-unsigned-rpm /tmp/*.rpm
|
||||||
|
@ -14,7 +14,10 @@ RUN zypper -n install -y \
|
|||||||
tree \
|
tree \
|
||||||
vim
|
vim
|
||||||
|
|
||||||
|
# Cache repo updates, so that spec changes don't trigger it on every build.
|
||||||
|
RUN zypper refresh
|
||||||
COPY opensuse/*.spec /tmp
|
COPY opensuse/*.spec /tmp
|
||||||
|
|
||||||
RUN zypper -n install $(grep BuildRequires /tmp/*.spec | cut -d' ' -f2 | xargs)
|
RUN zypper -n install $(grep BuildRequires /tmp/*.spec | cut -d' ' -f2 | xargs)
|
||||||
|
|
||||||
RUN useradd -u 1000 -m -d /home/docker docker && \
|
RUN useradd -u 1000 -m -d /home/docker docker && \
|
||||||
|
@ -46,6 +46,7 @@ SRC=$TAR_DATA/usr/local
|
|||||||
SRC_BIN=$SRC/bin
|
SRC_BIN=$SRC/bin
|
||||||
DESTDIR=$RPM_BUILD_ROOT
|
DESTDIR=$RPM_BUILD_ROOT
|
||||||
DST_MAN=$DESTDIR/usr/share/man/man1
|
DST_MAN=$DESTDIR/usr/share/man/man1
|
||||||
|
SSL_CERT_DIR=/usr/share/pki/trust/anchors
|
||||||
|
|
||||||
mkdir -p $DESTDIR/usr/bin $DESTDIR/usr/share/man/man1 \
|
mkdir -p $DESTDIR/usr/bin $DESTDIR/usr/share/man/man1 \
|
||||||
$DESTDIR/usr/share/doc/kasmvncserver $DESTDIR/usr/lib \
|
$DESTDIR/usr/share/doc/kasmvncserver $DESTDIR/usr/lib \
|
||||||
@ -63,9 +64,9 @@ rsync -r --exclude '.git*' --exclude po2js --exclude xgettext-html \
|
|||||||
--exclude www/utils/ --exclude .eslintrc --exclude configure \
|
--exclude www/utils/ --exclude .eslintrc --exclude configure \
|
||||||
$SRC/share/kasmvnc $DESTDIR/usr/share
|
$SRC/share/kasmvnc $DESTDIR/usr/share
|
||||||
|
|
||||||
sed -i -e 's!pem_certificate: .\+$!pem_certificate: /etc/pki/tls/private/kasmvnc.pem!' \
|
sed -i -e 's!pem_certificate: .\+$!pem_certificate: '$SSL_CERT_DIR'/kasmvnc.pem!' \
|
||||||
$DESTDIR/usr/share/kasmvnc/kasmvnc_defaults.yaml
|
$DESTDIR/usr/share/kasmvnc/kasmvnc_defaults.yaml
|
||||||
sed -i -e 's!pem_key: .\+$!pem_key: /etc/pki/tls/private/kasmvnc.pem!' \
|
sed -i -e 's!pem_key: .\+$!pem_key: '$SSL_CERT_DIR'/kasmvnc.pem!' \
|
||||||
$DESTDIR/usr/share/kasmvnc/kasmvnc_defaults.yaml
|
$DESTDIR/usr/share/kasmvnc/kasmvnc_defaults.yaml
|
||||||
sed -e 's/^\([^#]\)/# \1/' $DESTDIR/usr/share/kasmvnc/kasmvnc_defaults.yaml > \
|
sed -e 's/^\([^#]\)/# \1/' $DESTDIR/usr/share/kasmvnc/kasmvnc_defaults.yaml > \
|
||||||
$DESTDIR/etc/kasmvnc/kasmvnc.yaml
|
$DESTDIR/etc/kasmvnc/kasmvnc.yaml
|
||||||
@ -104,7 +105,7 @@ cd $DST_MAN && ln -s vncpasswd.1 kasmvncpasswd.1;
|
|||||||
}
|
}
|
||||||
|
|
||||||
make_self_signed_certificate() {
|
make_self_signed_certificate() {
|
||||||
local cert_file=/etc/pki/tls/private/kasmvnc.pem
|
local cert_file="/usr/share/pki/trust/anchors/kasmvnc.pem"
|
||||||
[ -f "$cert_file" ] && return 0
|
[ -f "$cert_file" ] && return 0
|
||||||
|
|
||||||
openssl req -x509 -nodes -days 3650 -newkey rsa:2048 \
|
openssl req -x509 -nodes -days 3650 -newkey rsa:2048 \
|
||||||
@ -119,4 +120,4 @@ cd $DST_MAN && ln -s vncpasswd.1 kasmvncpasswd.1;
|
|||||||
make_self_signed_certificate
|
make_self_signed_certificate
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
rm -f /etc/pki/tls/private/kasmvnc.pem
|
rm -f /usr/share/pki/trust/anchors/kasmvnc.pem
|
||||||
|
Loading…
Reference in New Issue
Block a user