From 9e9a730b4b6fd64b048961f0066893e6d029b45a Mon Sep 17 00:00:00 2001 From: Jerome Sagnole Date: Tue, 29 Aug 2017 23:08:14 +0200 Subject: [PATCH] move some files and disable on client file kh_shard & .ref --- .../builder/{ => common}/squish-limit.patch | 0 .../builder/debian/jessie/i686/Dockerfile | 2 +- .../builder/debian/jessie/i686/build.sh | 6 ++--- .../builder/debian/jessie/x86_64/Dockerfile | 2 +- .../jessie/x86_64/build-under-docker.sh | 2 +- .../builder/debian/jessie/x86_64/build.sh | 6 ++--- .../server/debian/{ => common}/init-basic.sh | 0 .../server/debian/{ => common}/init-khanat.sh | 25 +++++++++---------- .../server/debian/jessie/x86_64/Dockerfile | 9 +------ .../debian/jessie/x86_64/Dockerfile.khanat | 2 +- .../server/debian/jessie/x86_64/server.sh | 14 ++++++++--- 11 files changed, 34 insertions(+), 34 deletions(-) rename dist/docker/builder/{ => common}/squish-limit.patch (100%) rename dist/docker/server/debian/{ => common}/init-basic.sh (100%) rename dist/docker/server/debian/{ => common}/init-khanat.sh (97%) diff --git a/dist/docker/builder/squish-limit.patch b/dist/docker/builder/common/squish-limit.patch similarity index 100% rename from dist/docker/builder/squish-limit.patch rename to dist/docker/builder/common/squish-limit.patch diff --git a/dist/docker/builder/debian/jessie/i686/Dockerfile b/dist/docker/builder/debian/jessie/i686/Dockerfile index f8f05c33f..89a6bfb2c 100644 --- a/dist/docker/builder/debian/jessie/i686/Dockerfile +++ b/dist/docker/builder/debian/jessie/i686/Dockerfile @@ -42,7 +42,7 @@ RUN apt-get install -y wget RUN mkdir -p /opt/src RUN cd /opt/src; wget -c https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/libsquish/squish-1.11.zip RUN cd /opt/src; unzip squish-1.11.zip -COPY dist/docker/builder/squish-limit.patch /opt/squish-limit.patch +COPY dist/docker/builder/common/squish-limit.patch /opt/squish-limit.patch RUN cd /opt/src/squish-1.11; patch -i /opt/squish-limit.patch RUN cd /opt/src/squish-1.11; make RUN cd /opt/src/squish-1.11; make install diff --git a/dist/docker/builder/debian/jessie/i686/build.sh b/dist/docker/builder/debian/jessie/i686/build.sh index 4f3ee8fa3..e5414a9e2 100755 --- a/dist/docker/builder/debian/jessie/i686/build.sh +++ b/dist/docker/builder/debian/jessie/i686/build.sh @@ -17,8 +17,8 @@ declare DOCKEROPTS="" declare DIRBUILD="" declare CLEANDOCKER=0 -declare IMAGEDOCKER="builder_khanat_jessie_i686" -declare LOCALBUILDDIR="build_linux32" +declare IMAGEDOCKER="builder_khanat_debian_jessie_i686" +declare LOCALBUILDDIR="build/$IMAGEDOCKER" declare LOCALSRC="debian/jessie/i686" @@ -211,7 +211,7 @@ then -v $rootdir/code:/opt/code \ ${DOCKEROPTS} \ ${IMAGEDOCKER} \ - /opt/dist/docker/builder/${LOCALSRC}/build-under-docker.sh "/opt/code/${LOCALBUILDDIR}/" || exit 2 + /opt/dist/docker/builder/${LOCALSRC}/build-under-docker.sh "/opt/code/${LOCALBUILDDIR}" || exit 2 fi if [[ $CLEANDOCKER -ne 0 ]] diff --git a/dist/docker/builder/debian/jessie/x86_64/Dockerfile b/dist/docker/builder/debian/jessie/x86_64/Dockerfile index 9682c21d7..9aa8cf14e 100644 --- a/dist/docker/builder/debian/jessie/x86_64/Dockerfile +++ b/dist/docker/builder/debian/jessie/x86_64/Dockerfile @@ -42,7 +42,7 @@ RUN cd /opt/src/cpptest && ./autogen.sh && ./configure && make && make install RUN mkdir -p /opt/src RUN cd /opt/src; wget -c https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/libsquish/squish-1.11.zip RUN cd /opt/src; unzip squish-1.11.zip -COPY dist/docker/builder/squish-limit.patch /opt/squish-limit.patch +COPY dist/docker/builder/common/squish-limit.patch /opt/squish-limit.patch RUN cd /opt/src/squish-1.11; patch -i /opt/squish-limit.patch RUN cd /opt/src/squish-1.11; make RUN cd /opt/src/squish-1.11; make install diff --git a/dist/docker/builder/debian/jessie/x86_64/build-under-docker.sh b/dist/docker/builder/debian/jessie/x86_64/build-under-docker.sh index 9a9a32ad5..0f175a6a3 100755 --- a/dist/docker/builder/debian/jessie/x86_64/build-under-docker.sh +++ b/dist/docker/builder/debian/jessie/x86_64/build-under-docker.sh @@ -30,7 +30,7 @@ fi echo "$(date "+%Y/%m/%d %H:%M:%S") BUILD START" >> $LOGFILE -cd ${DIRBUILD}; cmake -DWITH_NEL=ON -DWITH_STATIC=ON -DWITH_STATIC_DRIVERS=ON ${CMAKEOPTS} .. 1>>$LOGFILE 2>&1 || exit 2 +cd ${DIRBUILD}; cmake -DWITH_NEL=ON -DWITH_STATIC=ON -DWITH_STATIC_DRIVERS=ON ${CMAKEOPTS} ../.. 1>>$LOGFILE 2>&1 || exit 2 cd ${DIRBUILD}; make $MAKEOPTS 1>>$LOGFILE 2>&1 || exit 2 diff --git a/dist/docker/builder/debian/jessie/x86_64/build.sh b/dist/docker/builder/debian/jessie/x86_64/build.sh index 5fe9b35f3..83b77a7c7 100755 --- a/dist/docker/builder/debian/jessie/x86_64/build.sh +++ b/dist/docker/builder/debian/jessie/x86_64/build.sh @@ -17,8 +17,8 @@ declare DOCKEROPTS="" declare DIRBUILD="" declare CLEANDOCKER=0 -declare IMAGEDOCKER="builder_khanat_jessie_x86_64" -declare LOCALBUILDDIR="build_linux64" +declare IMAGEDOCKER="builder_khanat_debian_jessie_x86_64" +declare LOCALBUILDDIR="build/$IMAGEDOCKER" declare LOCALSRC="debian/jessie/x86_64" @@ -217,7 +217,7 @@ then -v $rootdir/code:/opt/code \ ${DOCKEROPTS} \ ${IMAGEDOCKER} \ - /opt/dist/docker/builder/${LOCALSRC}/build-under-docker.sh "/opt/code/${LOCALBUILDDIR}/" || exit 2 + /opt/dist/docker/builder/${LOCALSRC}/build-under-docker.sh "/opt/code/${LOCALBUILDDIR}" || exit 2 fi if [[ $CLEANDOCKER -ne 0 ]] diff --git a/dist/docker/server/debian/init-basic.sh b/dist/docker/server/debian/common/init-basic.sh similarity index 100% rename from dist/docker/server/debian/init-basic.sh rename to dist/docker/server/debian/common/init-basic.sh diff --git a/dist/docker/server/debian/init-khanat.sh b/dist/docker/server/debian/common/init-khanat.sh similarity index 97% rename from dist/docker/server/debian/init-khanat.sh rename to dist/docker/server/debian/common/init-khanat.sh index c7899ceff..8d86827f6 100755 --- a/dist/docker/server/debian/init-khanat.sh +++ b/dist/docker/server/debian/common/init-khanat.sh @@ -384,10 +384,10 @@ do cd $dir/..; bnp_make -p $(basename $dir) || exit 2 done -for dir in $PATCH_HOME/patch_service/dataserver/data/kh_shard/* -do - cd $dir/..; bnp_make -p $(basename $dir) || exit 2 -done +#for dir in $PATCH_HOME/patch_service/dataserver/data/kh_shard/* +#do +# cd $dir/..; bnp_make -p $(basename $dir) || exit 2 +#done for dir in $PATCH_HOME/patch_service/dataserver/data/ryz/* do @@ -420,10 +420,10 @@ do mv "$file" $PATCH_CLIENT_SYSTEM/patch_game/bnp/ || exit 2 done -for file in $PATCH_HOME/patch_service/dataserver/data/kh_shard/*.bnp -do - mv "$file" $PATCH_CLIENT_SYSTEM/patch_game/bnp/ || exit 2 -done +#for file in $PATCH_HOME/patch_service/dataserver/data/kh_shard/*.bnp +#do +# mv "$file" $PATCH_CLIENT_SYSTEM/patch_game/bnp/ || exit 2 +#done for file in $PATCH_HOME/patch_service/dataserver/data/ryz/*.bnp do @@ -449,11 +449,10 @@ sed -i -r 's/_NextVersionFile type="STRING" value=""/_NextVersionFile type="STRI # search all ref files ADDREF="" -for file in /home/gameserver/patch_service/patch_game/bnp/*.ref -do - ADDREF="$ADDREF"'<_Files type=\"STRING\" value=\"'$(basename $file)'\"/>' -done -#echo $ADDREF +#for file in /home/gameserver/patch_service/patch_game/bnp/*.ref +#do +# ADDREF="$ADDREF"'<_Files type=\"STRING\" value=\"'$(basename $file)'\"/>' +#done # Remove other _Category (keep 1st) and add ref file cp patch_game/ryzom.xml patch_game/ryzom.xml.ref || exit 2 diff --git a/dist/docker/server/debian/jessie/x86_64/Dockerfile b/dist/docker/server/debian/jessie/x86_64/Dockerfile index ca1cffc5a..f7fdf8cab 100644 --- a/dist/docker/server/debian/jessie/x86_64/Dockerfile +++ b/dist/docker/server/debian/jessie/x86_64/Dockerfile @@ -23,16 +23,9 @@ RUN useradd -G sudo,www-data -c /home -d /home/gameserver -c "Khanat account GAM RUN useradd -G sudo,www-data -c /home -d /home/compil -c "Khanat account" -m -p '$6$nxHX/3u.$azS0.eldpfKqxqOLDjgZj8.hPOLC64arXDTUVX0fs7RZvRBX/pNqPzDR89ccP5XkEE/daOyaD3wVtDGDUND5b/' -s /bin/bash -U compil - -COPY dist/docker/server/debian/init-basic.sh /opt/ - -#COPY code/build_linux64/ryzomcore*.tar.gz /opt/. -#COPY code/build_linux64/ryzom-ressources.tar.gz /opt/. -#COPY khanat-ressources.tar.gz /opt/ -#COPY dist/docker/server/debian/init-khanat.sh /opt/ +COPY dist/docker/server/debian/common/init-basic.sh /opt/ RUN /opt/init-basic.sh -#RUN /opt/init-khanat.sh diff --git a/dist/docker/server/debian/jessie/x86_64/Dockerfile.khanat b/dist/docker/server/debian/jessie/x86_64/Dockerfile.khanat index 96024fea3..a52a925ab 100644 --- a/dist/docker/server/debian/jessie/x86_64/Dockerfile.khanat +++ b/dist/docker/server/debian/jessie/x86_64/Dockerfile.khanat @@ -12,7 +12,7 @@ MAINTAINER AleaJactaEst ENV HOSTNAME khanat_server COPY todelete.sh /opt/khanat_config.sh -COPY dist/docker/server/debian/init-khanat.sh /opt/ +COPY dist/docker/server/debian/common/init-khanat.sh /opt/ COPY ryzomcore.tar.gz /opt/ COPY ryzom-ressources.tar.gz /opt/ COPY khanat-ressources.tar.gz /opt/ diff --git a/dist/docker/server/debian/jessie/x86_64/server.sh b/dist/docker/server/debian/jessie/x86_64/server.sh index 3c5a8cc4b..0648f40fc 100755 --- a/dist/docker/server/debian/jessie/x86_64/server.sh +++ b/dist/docker/server/debian/jessie/x86_64/server.sh @@ -23,7 +23,7 @@ declare -i KHANAT_CLIENT_VERSION=1 declare IMAGEGENERICSERVER="server_generic_debian_jessie_x86_64" declare IMAGEKHANATSERVER="server_khanat_debian_jessie_x86_64" -declare LOCALBUILDDIR="build_linux64" +declare LOCALBUILDDIR="build/builder_khanat_debian_jessie_x86_64" usage() { @@ -82,6 +82,8 @@ function msg_error() # MAIN # +msg_info "START" + calldir="$(dirname $0)" basedir=$(cd $calldir; pwd) rootdir="$(dirname $(dirname $(dirname $(dirname $(dirname $(dirname ${basedir}))))))" @@ -214,8 +216,14 @@ then KHANATSERVER=1 fi - sumsrc=$(md5sum ${rootdir}/code/${LOCALBUILDDIR}/ryzomcore-0.12.0..tar.gz | awk '{print $1}') - sumdst=$(md5sum ${rootdir}/ryzomcore.tar.gz | awk '{print $1}') + if [[ -f ${rootdir}/ryzomcore.tar.gz ]] + then + sumsrc=$(md5sum ${rootdir}/code/${LOCALBUILDDIR}/ryzomcore-0.12.0..tar.gz | awk '{print $1}') + sumdst=$(md5sum ${rootdir}/ryzomcore.tar.gz | awk '{print $1}') + else + sumsrc=1 + sumdsr=2 + fi msg_debug "ryzomcore checksum src:$sumsrc dst:$sumdst" if [[ "$sumsrc" != "$sumdst" ]] then