Merge branch 'master' of i2pgit.org:i2p-hackers/i2p.firefox into EXPERIMENTAL-debian

This commit is contained in:
idk
2021-08-22 17:47:21 -04:00
4 changed files with 53 additions and 5 deletions

10
Dockerfile Normal file
View File

@ -0,0 +1,10 @@
FROM alpine:latest
RUN apk update && apk add firefox make curl musl-locales dbus-x11 font-ubuntu-nerd jq --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing
ADD . /src
WORKDIR /src
RUN make profile.tgz # && \
RUN chown -R 1000:1000 /src/build/profile # && \
RUN chmod -R +w /src/build/profile
RUN ls -lah /src/build/profile
#USER 1000
CMD sh -c 'cd build/profile && ./i2pbrowser.sh'

View File

@ -103,7 +103,7 @@ profile: build/profile/user.js build/profile/prefs.js build/profile/bookmarks.ht
profile.tgz: .version profile
# $(eval PROFILE_VERSION := $(shell cat src/profile/version.txt))
@echo "building profile tarball $(PROFILE_VERSION)"
bash -c 'ls I2P && cp -rv build/I2P build/profile/I2P'; true
sh -c 'ls I2P && cp -rv build/I2P build/profile/I2P'; true
install -m755 src/unix/i2pbrowser.sh build/profile/i2pbrowser.sh
cd build && tar -czf profile-$(PROFILE_VERSION).tgz profile && cp profile-$(PROFILE_VERSION).tgz ../
@ -129,7 +129,7 @@ app-profile: .version build/app-profile/user.js build/app-profile/prefs.js build
app-profile.tgz: app-profile
# $(eval PROFILE_VERSION := $(shell cat src/app-profile/version.txt))
@echo "building app-profile tarball $(PROFILE_VERSION)"
bash -c 'ls I2P && cp -rv build/I2P build/app-profile/I2P'; true
sh -c 'ls I2P && cp -rv build/I2P build/app-profile/I2P'; true
install -m755 src/unix/i2pconfig.sh build/app-profile/i2pconfig.sh
cd build && tar -czf app-profile-$(PROFILE_VERSION).tgz app-profile && cp app-profile-$(PROFILE_VERSION).tgz ../
@ -152,7 +152,9 @@ copy-app-xpi: build/NoScript.xpi build/HTTPSEverywhere.xpi build/i2prhz@eyedeeka
cp build/HTTPSEverywhere.xpi "build/app-profile/extensions/https-everywhere-eff@eff.org.xpi"
cp build/i2prhz@eyedeekay.github.io.xpi build/app-profile/extensions/i2prhz@eyedeekay.github.io.xpi
build/i2prhz@eyedeekay.github.io.xpi:
build-extensions: build/i2prhz@eyedeekay.github.io.xpi build/NoScript.xpi build/HTTPSEverywhere.xpi
build/i2prhz@eyedeekay.github.io.xpi: i2psetproxy.url
curl -L `cat i2psetproxy.url` > build/i2prhz@eyedeekay.github.io.xpi
build/NoScript.xpi: NoScript.url
@ -175,6 +177,8 @@ NoScript.url:
i2psetproxy.url:
@echo "https://addons.mozilla.org/firefox/downloads/file/3784917/"`./amo-version.sh i2pipb-rhizome-variant`"/i2prhz@eyedeekay.github.io" > i2psetproxy.url
#i2ppb@eyedeekay.github.io.xpi
build/profile/extensions: build/profile
mkdir -p build/profile/extensions
@ -254,3 +258,17 @@ $(GOPATH)/src/i2pgit.org/idk/su3-tools/su3-tools:
su3: $(GOPATH)/src/i2pgit.org/idk/su3-tools/su3-tools
$(GOPATH)/src/i2pgit.org/idk/su3-tools/su3-tools -name "I2P-Profile-Installer-$(PROFILE_VERSION)" -signer "$(SIGNER)" -version "$(I2P_VERSION)"
docker:
docker build -t geti2p/i2p.firefox .
xhost:
xhost + local:docker
run: docker xhost
docker run -it --rm \
--net=host \
-e DISPLAY=unix$(DISPLAY) \
-v /tmp/.X11-unix:/tmp/.X11-unix \
geti2p/i2p.firefox firefox --profile /src/build/profile

View File

@ -207,6 +207,25 @@ With that dependency satisfied, you can then run:
to build the signing tool if necessary and then package the installer in a
signed update file.
Docker Support
--------------
You can use a Docker container to install this browser profile as well. In order
to do this, you can run the commands:
xhost + local:docker
docker run -it --rm \
--net=host \
-e DISPLAY=unix$(DISPLAY) \
-v /tmp/.X11-unix:/tmp/.X11-unix \
geti2p/i2p.firefox firefox --profile /src/build/profile
To build and run the container locally, clone this repository and run the
make run
target.
Issues
------

View File

@ -40,4 +40,5 @@ if [ -z $FIREFOX ]; then
exit 1
fi
echo $FIREFOX --profile "$BROWSING_PROFILE" $@
$FIREFOX --profile "$BROWSING_PROFILE" $@