Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX error when doing sed on non existing privoxy config file #64

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pubkey
Copy link

@pubkey pubkey commented Apr 23, 2021

When doing a full build from the Dockerfile in the repo, I got this error because the RUN command tries to run sed on a file that does not exist.
error

This commit ensures that the privoxy config file exists, before working with it.

@skobkin
Copy link

skobkin commented Dec 20, 2021

Are you sure that this is a fix?

Because you'll get an empty config for privoxy this way. It fixes the build itself, but breaks the behavior of the original image.

@pubkey
Copy link
Author

pubkey commented Dec 20, 2021

It works for me at least.
I mean, without the fix it does not even start up.
With the fix, it creates the file, and it still runs the following sed commands to fill it.

@skobkin
Copy link

skobkin commented Dec 20, 2021

With the fix, it creates the file, and it still runs the following sed commands to fill it.

They're not filling the file. Did you check it's content after the build?

/ # du -sh /etc/privoxy/config
0       /etc/privoxy/config
/ # cat /etc/privoxy/config | wc -m
0

Copy link

@skobkin skobkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can probably bring the old /etc/privoxy/config to the repository and add it using COPY. But you'll need to check that it works well first.

Currently the image will built successfully, but only Tor part of it will be working as intended. So there is no point in such changes, you can just use image which only contains Tor itself.

file='/etc/privoxy/config' && \
touch $file && \
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This command just creates an empty file.

The following sed commands are doing nothing after that. So after this fix privoxy will not function as intended by the maintainer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants