Bug #3561

wp-cli not built from source (but source code is provided)

GNUtoo - 4 months ago - . Updated 4 months ago.

info needed
% Done:



The pkp-cli recipe consists in the following:

build() {
    cd "$_archive" 
    composer install --no-interaction --prefer-dist --no-scripts
    php -dphar.readonly=0 utils/make-phar.php wp-cli.phar

After installing php-cli I can get the source code in this way:

# cd $(mktemp -d)
# phar extract -f /usr/bin/wp
# find > wp-cli-files.txt

wp-cli-files.txt is attached

I've looked at a random file (usr/bin/wp/vendor/wp-cli/wp-config-transformer/src/WPConfigTransformer.php) and the source code is perfectly readable so it does not look transformed in any way.

It is possible to build wp-cli from source, and there is a tutorial for that here:

Do we need to remove wp-cli because it's not built from source or is the fact that it provide source code sufficient?


wp-cli-files.txt (92.1 KB) wp-cli-files.txt bill-auger, 2023-12-26 06:42 PM



Updated by bill-auger 4 months ago


Updated by bill-auger 4 months ago

  • Status changed from unconfirmed to info needed

if something is not built from source, that would imply some pre-compiled binary files in the source-ball (or downloaded at build time) - ie: the output files would not be interesting to that investigation, only the input files would be

i think you are misunderstanding that build tool - the difference you seem to be highlighting is between `--prefer-dist` and `--prefer-source` - from the information i could find on the web, that tools is designed to download sources automatically - the only difference is that `--prefer-dist` download a source-ball while `--prefer-source` checks-out a VCS - the semantics is more like `--prefer-release-source` vs `--prefer-devel-source`

as the PKGBUILD downloads the source-ball before prepare() runs, the purpose of `--prefer-dist` is merely to indicate that a source-ball is already present - otherwise, `--prefer-source` would attempt to clone the upstream VCS

that was my take on it after only a few minutes - i did not looks at the source-ball, so im not concluding that it is all source form; but at first look this seems to be a misunderstanding

Also available in: Atom PDF