Skip to content

Commit 069998f

Browse files
Persist the pear/install-pear-nozlib.phar file
Rather than downloading it as part of the `makedist` script, add the script to the project's version control. The installation instructions are updated to indicate that the needed phar script is always present, and the only thing needed is to become the superuser and run `make install-pear`. The phar is currently marked as binary in the git attributes since it is not entirely text, it is committed as-is from the pear server and can be cleaned up in future commits. This also fixes the installation process when previously the installation would try to fallback to the `fetch.php` helper - it seems that the https stream wrapper is not included in PHP by default. Now that the phar is committed to version control, the `fetch.php` helper script is no longer needed. After this patch, `./configure --with-pear --enable-xml` allows installing pear with `make` without additional manual actions.
1 parent 98b5aa4 commit 069998f

7 files changed

Lines changed: 99877 additions & 106 deletions

File tree

‎.gitattributes‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,6 @@
2626

2727
# The OSS fuzz files are bunary
2828
/ext/date/tests/ossfuzz*.txt binary
29+
30+
# The phar has some binary
31+
/pear/install-pear-nozlib.phar binary

‎.gitignore‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ config.h.in
125125
# ------------------------------------------------------------------------------
126126
/ext/phar/phar.phar
127127
/ext/phar/phar.php
128-
/pear/install-pear-nozlib.phar
129128
/sapi/cgi/php-cgi
130129
/sapi/fpm/php-fpm
131130
/sapi/phpdbg/phpdbg

‎pear/Makefile.frag‎

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,16 @@ peardir=$(PEAR_INSTALLDIR)
33
# Skip all php.ini files altogether
44
PEAR_INSTALL_FLAGS = -n -dshort_open_tag=0 -dopen_basedir= -derror_reporting=1803 -dmemory_limit=-1 -ddetect_unicode=0
55

6-
WGET = `which wget 2>/dev/null`
7-
FETCH = `which fetch 2>/dev/null`
86
PEAR_PREFIX = -dp a${program_prefix}
97
PEAR_SUFFIX = -ds a$(program_suffix)
10-
PEAR_INSTALLER_URL = https://pear.php.net/install-pear-nozlib.phar
118

129
install-pear-installer: $(SAPI_CLI_PATH)
1310
@$(top_builddir)/sapi/cli/php $(PEAR_INSTALL_FLAGS) pear/install-pear-nozlib.phar -d "$(peardir)" -b "$(bindir)" ${PEAR_PREFIX} ${PEAR_SUFFIX}
1411

1512
install-pear:
1613
@echo "Installing PEAR environment: $(INSTALL_ROOT)$(peardir)/"
1714
@if test ! -f $(builddir)/install-pear-nozlib.phar; then \
18-
if test -f $(srcdir)/install-pear-nozlib.phar; then \
19-
cp $(srcdir)/install-pear-nozlib.phar $(builddir)/install-pear-nozlib.phar; \
20-
else \
21-
if test ! -z "$(WGET)" && test -x "$(WGET)"; then \
22-
"$(WGET)" "${PEAR_INSTALLER_URL}" -nd -P $(builddir)/; \
23-
elif test ! -z "$(FETCH)" && test -x "$(FETCH)"; then \
24-
"$(FETCH)" -o $(builddir)/ "${PEAR_INSTALLER_URL}"; \
25-
else \
26-
$(top_builddir)/sapi/cli/php -n $(srcdir)/fetch.php "${PEAR_INSTALLER_URL}" $(builddir)/install-pear-nozlib.phar; \
27-
fi \
28-
fi \
15+
cp $(srcdir)/install-pear-nozlib.phar $(builddir)/install-pear-nozlib.phar; \
2916
fi
3017
@if test -f $(builddir)/install-pear-nozlib.phar && $(mkinstalldirs) $(INSTALL_ROOT)$(peardir); then \
3118
$(MAKE) -s install-pear-installer; \

‎pear/fetch.php‎

Lines changed: 0 additions & 74 deletions
This file was deleted.

0 commit comments

Comments
 (0)