From 62ca782d49337416e7263b90773af4ff4ce1a6b3 Mon Sep 17 00:00:00 2001 From: Ian Silvester Date: Sun, 12 Sep 2021 17:28:35 -0400 Subject: [PATCH] Compatibility with macOS 11 and adding more recent PCRE --- OS X 10.6+ PCRE.pkgproj | 210 +++++++++++++++++- common.sh | 4 +- .../Applications/Privoxy/uninstall.command | 4 +- pkg resources/interface texts/ReadMe64.txt | 8 +- .../single-binary scripts/postinstall | 30 +-- .../single-binary scripts/preinstall | 2 +- 6 files changed, 234 insertions(+), 24 deletions(-) diff --git a/OS X 10.6+ PCRE.pkgproj b/OS X 10.6+ PCRE.pkgproj index 327541d..9a90058 100755 --- a/OS X 10.6+ PCRE.pkgproj +++ b/OS X 10.6+ PCRE.pkgproj @@ -1397,6 +1397,22 @@ UID 0 + + CHILDREN + + GID + 0 + PATH + /Users/steph/code/OSXPackageBuilder/pkg content/usr/local/lib/libpcre.1.dylib + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 3 + UID + 0 + CHILDREN @@ -1445,6 +1461,198 @@ UID 0 + + CHILDREN + + GID + 0 + PATH + /Users/steph/code/OSXPackageBuilder/pkg content/usr/local/lib/libpcre2-8.0.dylib + PATH_TYPE + 0 + PERMISSIONS + 292 + TYPE + 3 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + /Users/steph/code/OSXPackageBuilder/pkg content/usr/local/lib/libpcre2-8.a + PATH_TYPE + 0 + PERMISSIONS + 292 + TYPE + 3 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + /Users/steph/code/OSXPackageBuilder/pkg content/usr/local/lib/libpcre2-8.dylib + PATH_TYPE + 0 + PERMISSIONS + 292 + TYPE + 3 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + /Users/steph/code/OSXPackageBuilder/pkg content/usr/local/lib/libpcre2-16.0.dylib + PATH_TYPE + 0 + PERMISSIONS + 292 + TYPE + 3 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + /Users/steph/code/OSXPackageBuilder/pkg content/usr/local/lib/libpcre2-16.a + PATH_TYPE + 0 + PERMISSIONS + 292 + TYPE + 3 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + /Users/steph/code/OSXPackageBuilder/pkg content/usr/local/lib/libpcre2-16.dylib + PATH_TYPE + 0 + PERMISSIONS + 292 + TYPE + 3 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + /Users/steph/code/OSXPackageBuilder/pkg content/usr/local/lib/libpcre2-32.0.dylib + PATH_TYPE + 0 + PERMISSIONS + 292 + TYPE + 3 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + /Users/steph/code/OSXPackageBuilder/pkg content/usr/local/lib/libpcre2-32.a + PATH_TYPE + 0 + PERMISSIONS + 292 + TYPE + 3 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + /Users/steph/code/OSXPackageBuilder/pkg content/usr/local/lib/libpcre2-32.dylib + PATH_TYPE + 0 + PERMISSIONS + 292 + TYPE + 3 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + /Users/steph/code/OSXPackageBuilder/pkg content/usr/local/lib/libpcre2-posix.3.dylib + PATH_TYPE + 0 + PERMISSIONS + 292 + TYPE + 3 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + /Users/steph/code/OSXPackageBuilder/pkg content/usr/local/lib/libpcre2-posix.a + PATH_TYPE + 0 + PERMISSIONS + 292 + TYPE + 3 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + /Users/steph/code/OSXPackageBuilder/pkg content/usr/local/lib/libpcre2-posix.dylib + PATH_TYPE + 0 + PERMISSIONS + 292 + TYPE + 3 + UID + 0 + CHILDREN @@ -3507,7 +3715,7 @@ This release includes a bundled copy of PCRE 8.21. NAME - Privoxy 3.0.26 64 bit + Privoxy 3.0.32 64 bit PAYLOAD_ONLY TREAT_MISSING_PRESENTATION_DOCUMENTS_AS_WARNING diff --git a/common.sh b/common.sh index c78f749..45444d3 100755 --- a/common.sh +++ b/common.sh @@ -197,7 +197,7 @@ darwin_major_rel_num="`/usr/bin/uname -r | /usr/bin/sed 's/\..*//'`" # case "${darwin_major_rel_num}" in # Mac OS X 10.5 or higher - 9|1*) + 9|1*|2*|3*) GNAME="`/usr/bin/dscl /Local/Default -list /groups | /usr/bin/grep -E '^(_)?privoxy?'`" UNAME="`/usr/bin/dscl /Local/Default -list /users | /usr/bin/grep -E '^(_)?privoxy?'`" SCRIPT="privoxy-create-dscl.sh" @@ -246,4 +246,4 @@ case "${DIRS_FOUND}" in ;; esac cd OSXPackageBuilder -echo "Using ../${SOURCE_DIR} as location of Privoxy source" \ No newline at end of file +echo "Using ../${SOURCE_DIR} as location of Privoxy source" diff --git a/pkg content skeleton/Applications/Privoxy/uninstall.command b/pkg content skeleton/Applications/Privoxy/uninstall.command index a237fe1..6f32080 100755 --- a/pkg content skeleton/Applications/Privoxy/uninstall.command +++ b/pkg content skeleton/Applications/Privoxy/uninstall.command @@ -88,7 +88,7 @@ if [ "$UID" -eq "$root_UID" ]; then case "${darwin_major_rel_num}" in # Mac OS X 10.5 or higher - 9|1*) + 9|1*|2*|3*) # Delete Privoxy LaunchDaemon echo 'Delete Privoxy LaunchDaemon (an error will be thrown regarding "no such process")' /bin/launchctl unload /Library/LaunchDaemons/org.ijbswa.privoxy.plist @@ -140,4 +140,4 @@ else echo fi -exit 0 \ No newline at end of file +exit 0 diff --git a/pkg resources/interface texts/ReadMe64.txt b/pkg resources/interface texts/ReadMe64.txt index ddfe4c1..3bbb170 100755 --- a/pkg resources/interface texts/ReadMe64.txt +++ b/pkg resources/interface texts/ReadMe64.txt @@ -1,12 +1,12 @@ -June 2021, Privoxy 3.0.32 (stable) macOS installer V1.0 released. +September 2021, Privoxy 3.0.32 (stable) macOS installer V1.0 released. Version Support -This installer supports Macs with Intel 64 bit processors running OS X 10.11 or higher. +This installer has been tested on Macs with Intel 64 bit processors running OS X 10.11 and higher. It may work on earlier releases, but is untested. What's New -Privoxy 3.0.32 fixes multiple DoS issues and a couple of other bugs. The issues also affect earlier Privoxy releases. As such is recommended for all users. It also adds +Privoxy 3.0.32 fixes multiple DoS issues and a couple of other bugs. The issues also affect earlier Privoxy releases. As such is recommended for all users. Full ChangeLog @@ -117,4 +117,4 @@ Full ChangeLog - Add a 'Third-party licenses and copyrights' section to the user manual. -Please see the "What's New in this Release" section in the User Manual for details of all new features introduced and bugs fixed in this release. \ No newline at end of file +Please see the "What's New in this Release" section in the User Manual for details of all new features introduced and bugs fixed in this release. diff --git a/pkg resources/single-binary scripts/postinstall b/pkg resources/single-binary scripts/postinstall index c42b973..4469c6d 100755 --- a/pkg resources/single-binary scripts/postinstall +++ b/pkg resources/single-binary scripts/postinstall @@ -35,9 +35,9 @@ # This postinstall script: # # 1. Moves config files into place, respecting any existing user config -# 2. Creates links to documentation in the app folder -# 3. Detects the version of OS X on which we're installing -# 4. Creates the logfile if not found and sets its ownership and persmissions +# 2. Detects the version of OS X on which we're installing +# 3. Creates the logfile if not found and sets its ownership and persmissions +# 4. Creates links to documentation and log file in the app folder # 5. Disables the startup method not necessary for the host's OS X version and start Privoxy # 6. Opens the readme.rtf file for the user to read @@ -78,34 +78,36 @@ done # delete the vanilla config files /bin/rm -rf /usr/local/etc/privoxy/vanilla >> ${logfile} 2>&1 -# 2. Create links to documentation and log file in the app folder -# -ln /usr/local/share/doc/privoxy/AUTHORS /Applications/Privoxy/ -ln /usr/local/share/doc/privoxy/ChangeLog /Applications/Privoxy/ -ln -s /usr/local/share/doc/privoxy/privoxy-index.html /Applications/Privoxy/Privoxy\ Documentation.html -ln /usr/local/share/doc/privoxy/LICENSE /Applications/Privoxy/ -ln -s /var/log/privoxy/logfile.log /Applications/Privoxy/logfile.log - -# 3. Detect the version of OS X on which we're installing +# 2. Detect the version of OS X on which we're installing # darwin_major_rel_num="`/usr/bin/uname -r | /usr/bin/sed 's/\..*//'`" -# 4. Create logfile if not found and set its ownership and persmissions +# 3. Create logfile if not found and set its ownership and persmissions, including an ACL to allow the _privoxy user to create files therein # if [ ! -d /var/log/privoxy ]; then echo 'Creating Privoxy logfile directory' >> ${logfile} /bin/mkdir -m 0755 /var/log/privoxy >> ${logfile} 2>&1 + chmod +a "_privoxy allow list,add_file,search,read,readattr,readextattr,readsecurity" /var/log/privoxy >> ${logfile} 2>&1 fi echo 'Creating Privoxy logfile and setting owner and permissions' >> ${logfile} /usr/bin/touch /var/log/privoxy/logfile.log >> ${logfile} 2>&1 /usr/sbin/chown privoxy:privoxy /var/log/privoxy/logfile.log >> ${logfile} 2>&1 /bin/chmod 0644 /var/log/privoxy/logfile.log >> ${logfile} 2>&1 +# 4. Create links to documentation and log file in the app folder +# +ln /usr/local/share/doc/privoxy/AUTHORS /Applications/Privoxy/ +ln /usr/local/share/doc/privoxy/ChangeLog /Applications/Privoxy/ +ln -s /usr/local/share/doc/privoxy/privoxy-index.html /Applications/Privoxy/Privoxy\ Documentation.html +ln /usr/local/share/doc/privoxy/LICENSE /Applications/Privoxy/ +ln -s /var/log/privoxy/logfile.log /Applications/Privoxy/logfile.log + + # 5. Disable the startup method not necessary for the host's OS X version and start Privoxy # case "${darwin_major_rel_num}" in # Mac OS X 10.5 or higher - 9|1*) + 9|1*|2*|3*) # delete Privoxy StartupItem echo 'Delete the Privoxy StartupItem since it is not required for this OS X version' >> ${logfile} if [ -d /Library/StartupItems/Disabled/Privoxy ]; then diff --git a/pkg resources/single-binary scripts/preinstall b/pkg resources/single-binary scripts/preinstall index f0238ea..bfa068f 100755 --- a/pkg resources/single-binary scripts/preinstall +++ b/pkg resources/single-binary scripts/preinstall @@ -93,7 +93,7 @@ echo 'Darwin major release version is:' ${darwin_major_rel_num} >> ${logfile} # case "${darwin_major_rel_num}" in # Mac OS X 10.5 or higher - 9|1*) + 9|1*|2*|3*) GNAME="`/usr/bin/dscl /Local/Default -list /groups | /usr/bin/grep -E '^(_)?privoxy?'`" UNAME="`/usr/bin/dscl /Local/Default -list /users | /usr/bin/grep -E '^(_)?privoxy?'`" # create group if it does not exist -- 2.39.2