Hello,
I am still somewhat inexperienced with creating new packages. I would like to integrate PRIVOXY (https://www.privoxy.org) my IPFIRE firewall. To do this, I have successfully set up the build environment:
However, I am having some problems with the lfs file I created.
I get the following message when executing:
./make.sh downloadsrc →
ERROR: Failed to download or verify some packages: privoxy [ FAIL ]
Check /home/xyz_user/ipfire-2.x/log_x86_64/_build.preparation.log for errors if applicable
The log file “_build.preparation.log” then shows:
Feb 24 09:34:50: Building privoxy make: Entering directory ‘/home/xyz_user/ipfire-2.x/lfs’
privoxy:76: *** missing separator. Stop.
What is wrong with my lfs file for Privoxy?
###############################################################################
# #
# IPFire.org - A linux based firewall #
# Copyright (C) 2023 IPFire Team <info@ipfire.org> #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
# #
###############################################################################
###############################################################################
# Definitions
###############################################################################
include Config
SUMMARY = Privacy enhancing proxy
VER = 4.1.0
THISAPP = privoxy-$(VER)
DL_FILE = privoxy-$(VER)-stable-src.tar.gz
DL_FROM = https://www.privoxy.org/sf-download-mirror/Sources/$(VER)%20%28stable%29
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
PROG = privoxy
PAK_VER = 1
DEPS = pcre zlib
SERVICES = privoxy
###############################################################################
# Top-level Rules
###############################################################################
objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_BLAKE2 = a6467b905845285808b5f19386de3ea9bf389190a6bfc7a2b06378f4a49825ed9dbc50b8f2fe1ba0efbeb3fdf5f443b626280fddcdb861bcfb0e5d383a00d5b1
install : $(TARGET)
check : $(patsubst %,$(DIR_CHK)/%,$(objects))
download :$(patsubst %,$(DIR_DL)/%,$(objects))
b2 : $(subst %,%_BLAKE2,$(objects))
dist:
@$(PAK)
###############################################################################
# Downloading, checking, b2sum
###############################################################################
$(patsubst %,$(DIR_CHK)/%,$(objects)) :
@$(CHECK)
$(patsubst %,$(DIR_DL)/%,$(objects)) :
@$(LOAD)
$(subst %,%_BLAKE2,$(objects)) :
@$(B2SUM)
###############################################################################
# Installation Details
###############################################################################
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
groupadd -g 5555 privoxy # GID 5555 ist ein Beispiel; passe an IPFire-Standards an (z. B. check /etc/group)
useradd -u 5555 -g privoxy -s /bin/false -d /var/run/privoxy privoxy # UID 5555; no shell, home in /var/run
cd $(DIR_APP) && ./configure --prefix=/usr --sysconfdir=/etc --enable-compression --enable-zstd --enable-pcre-host-patterns --with-user=privoxy --with-group=privoxy
cd $(DIR_APP) && make $(MAKETUNING)
cd $(DIR_APP) && make install DESTDIR=$(DIR_DEST) USER=privoxy GROUP=privoxy
@rm -rf $(DIR_APP)
@mkdir -p $(DIR_DEST)/etc/init.d $(DIR_DEST)/var/run/privoxy $(DIR_DEST)/var/log/privoxy
@cat << EOF > $(DIR_DEST)/etc/init.d/privoxy
#!/bin/sh
# Init-Skript für Privoxy
case "\$1" in
start)
mkdir -p /var/run/privoxy /var/log/privoxy
chown privoxy:privoxy /var/run/privoxy /var/log/privoxy /etc/privoxy
runuser -u privoxy -g privoxy -- /usr/sbin/privoxy --no-daemon /etc/privoxy/config &
;;
stop) killall privoxy ;;
restart) \$0 stop; \$0 start ;;
esac
EOF
@chmod +x $(DIR_DEST)/etc/init.d/privoxy
@if [ ! -f $(DIR_DEST)/etc/privoxy/config ]; then
cat << EOF > $(DIR_DEST)/etc/privoxy/config
confdir /etc/privoxy
logdir /var/log/privoxy
listen-address 127.0.0.1:8118
toggle 1
enable-remote-toggle 0
enable-remote-http-toggle 0
enable-edit-actions 0
enforce-blocks 0
buffer-limit 4096
forwarded-connect-retries 0
accept-intercepted-requests 0
allow-cgi-request-crunching 0
split-large-forms 0
keep-alive-timeout 5
socket-timeout 300
EOF
fi
chown -R privoxy:privoxy $(DIR_DEST)/etc/privoxy $(DIR_DEST)/var/log/privoxy $(DIR_DEST)/var/run/privoxy
Best regards,
Rico



