diff --git a/Dockerfile b/Dockerfile index 2a9901e..46d0163 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,41 +20,14 @@ ARG DOCKER_IMAGE_VERSION= # Define software versions. ARG FIREFOX_VERSION=109.0.1-r0 -ARG JSONLZ4_VERSION=c4305b8 -ARG LZ4_VERSION=1.8.1.2 #ARG PROFILE_CLEANER_VERSION=2.36 # Define software download URLs. -ARG JSONLZ4_URL=https://github.com/avih/dejsonlz4/archive/${JSONLZ4_VERSION}.tar.gz -ARG LZ4_URL=https://github.com/lz4/lz4/archive/v${LZ4_VERSION}.tar.gz #ARG PROFILE_CLEANER_URL=https://github.com/graysky2/profile-cleaner/raw/v${PROFILE_CLEANER_VERSION}/common/profile-cleaner.in # Define working directory. WORKDIR /tmp -# Install JSONLZ4 tools. -RUN \ - add-pkg --virtual build-dependencies \ - curl \ - build-base \ - && \ - mkdir jsonlz4 && \ - mkdir lz4 && \ - curl -# -L {$JSONLZ4_URL} | tar xz --strip 1 -C jsonlz4 && \ - curl -# -L {$LZ4_URL} | tar xz --strip 1 -C lz4 && \ - mv jsonlz4/src/ref_compress/*.c jsonlz4/src/ && \ - cp lz4/lib/lz4.* jsonlz4/src/ && \ - cd jsonlz4 && \ - gcc -static -Wall -o dejsonlz4 src/dejsonlz4.c src/lz4.c && \ - gcc -static -Wall -o jsonlz4 src/jsonlz4.c src/lz4.c && \ - strip dejsonlz4 jsonlz4 && \ - cp -v dejsonlz4 /usr/bin/ && \ - cp -v jsonlz4 /usr/bin/ && \ - cd .. && \ - # Cleanup. - del-pkg build-dependencies && \ - rm -rf /tmp/* /tmp/.[!.]* - # Install Firefox. RUN \ # add-pkg --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ diff --git a/rootfs/etc/cont-init.d/55-firefox.sh b/rootfs/etc/cont-init.d/55-firefox.sh index 936b21c..ddaf322 100755 --- a/rootfs/etc/cont-init.d/55-firefox.sh +++ b/rootfs/etc/cont-init.d/55-firefox.sh @@ -23,29 +23,6 @@ fi # env HOME=/config /usr/bin/profile-cleaner f #fi -# Fix window display size is session stores. -if [ -n "$(ls /config/profile/sessionstore-backups/*.jsonlz4 2>/dev/null)" ]; then - for FILE in /config/profile/sessionstore-backups/*.jsonlz4; do - WORKDIR="$(mktemp -d)" - - dejsonlz4 "$FILE" "$WORKDIR"/json - cp "$WORKDIR"/json "$WORKDIR"/json.orig - - sed -i 's/"width":[0-9]\+/"width":'$DISPLAY_WIDTH'/' "$WORKDIR"/json - sed -i 's/"height":[0-9]\+/"height":'$DISPLAY_HEIGHT'/' "$WORKDIR"/json - sed -i 's/"screenX":[0-9]\+/"screenX":0/' "$WORKDIR"/json - sed -i 's/"screenY":[0-9]\+/"screenY":0/' "$WORKDIR"/json - - if ! diff "$WORKDIR"/json "$WORKDIR"/json.orig >/dev/null; then - jsonlz4 "$WORKDIR"/json "$WORKDIR"/jsonlz4 - mv "$WORKDIR"/jsonlz4 "$FILE" - echo "fixed display size in $FILE." - fi - - rm -r "$WORKDIR" - done -fi - # Initialize log files. for LOG_FILE in /config/log/firefox/output.log /config/log/firefox/error.log do