radareorg / acr

autoconf replacement
GNU General Public License v2.0
34 stars 10 forks source link

after installation, some placeholders remain #22

Closed rillig closed 4 years ago

rillig commented 4 years ago

After installing avr from pkgsrc, I ran binpkglint (still experimental) over it, and it found these possible issues.

The first few are clear mistakes.

> # @version:  @VERSION@
acr-1.7.2.tar:bin/acr-cat:24:14: placeholder "VERSION"

>       if [ -e "@DATADIR@/acr/modules/${STR2}.acr" ]; then
acr-1.7.2.tar:bin/acr-sh:1899:12: placeholder "DATADIR"

>           FILE="@DATADIR@/acr/modules/${STR2}.acr";
acr-1.7.2.tar:bin/acr-sh:1900:10: placeholder "DATADIR"

The next few are a little more difficult to decide since acr deals with these placeholders itself. I like the code that does echo "@""PKGNAME@" to distinguish the intentional @ from those that should have been replaced during installation. This distinction is not done consistently though.

> VPATH=@VPATH@
acr-1.7.2.tar:bin/acr-sh:3327:7: placeholder "VPATH"

> JAVAC=@JAVAC@
acr-1.7.2.tar:bin/acr-sh:3338:7: placeholder "JAVAC"

> CC=@CC@
acr-1.7.2.tar:bin/acr-sh:3347:4: placeholder "CC"

> CFLAGS=@CFLAGS@
acr-1.7.2.tar:bin/acr-sh:3348:8: placeholder "CFLAGS"

> CPPFLAGS=@CPPFLAGS@
acr-1.7.2.tar:bin/acr-sh:3349:10: placeholder "CPPFLAGS"

> CXX=@CXX@
acr-1.7.2.tar:bin/acr-sh:3354:5: placeholder "CXX"

> CXXFLAGS=@CXXFLAGS@
acr-1.7.2.tar:bin/acr-sh:3355:10: placeholder "CXXFLAGS"

>   echo "VPATH=@VPATH@"
acr-1.7.2.tar:bin/amr:286:14: placeholder "VPATH"

>       echo "CC=@CC@"
acr-1.7.2.tar:bin/amr:288:12: placeholder "CC"

>       echo "CFLAGS=@CFLAGS@"
acr-1.7.2.tar:bin/amr:289:16: placeholder "CFLAGS"

>       echo "LDFLAGS=@LDFLAGS@"
acr-1.7.2.tar:bin/amr:290:17: placeholder "LDFLAGS"

>       echo "BIN=@PKGNAME@"
acr-1.7.2.tar:bin/amr:296:13: placeholder "PKGNAME"

>       echo "VERSION=@VERSION@"
acr-1.7.2.tar:bin/amr:297:17: placeholder "VERSION"
radare commented 4 years ago

1.7.2 is quite old. Also. Is the pkg running ./configure?

On 16 May 2020, at 07:29, Roland Illig notifications@github.com wrote:

 After installing avr from pkgsrc, I ran binpkglint (still experimental) over it, and it found these possible issues.

The first few are clear mistakes.

@version: @VERSION@

acr-1.7.2.tar:bin/acr-cat:24:14: placeholder "VERSION"

    if [ -e "@DATADIR@/acr/modules/${STR2}.acr" ]; then

acr-1.7.2.tar:bin/acr-sh:1899:12: placeholder "DATADIR"

        FILE="@DATADIR@/acr/modules/${STR2}.acr";

acr-1.7.2.tar:bin/acr-sh:1900:10: placeholder "DATADIR" The next few are a little more difficult to decide since acr deals with these placeholders itself. I like the code that does echo "@""PKGNAME@" to distinguish the intentional @ from those that should have been replaced during installation. This distinction is not done consistently though.

VPATH=@VPATH@ acr-1.7.2.tar:bin/acr-sh:3327:7: placeholder "VPATH"

JAVAC=@JAVAC@ acr-1.7.2.tar:bin/acr-sh:3338:7: placeholder "JAVAC"

CC=@CC@ acr-1.7.2.tar:bin/acr-sh:3347:4: placeholder "CC"

CFLAGS=@CFLAGS@ acr-1.7.2.tar:bin/acr-sh:3348:8: placeholder "CFLAGS"

CPPFLAGS=@CPPFLAGS@ acr-1.7.2.tar:bin/acr-sh:3349:10: placeholder "CPPFLAGS"

CXX=@CXX@ acr-1.7.2.tar:bin/acr-sh:3354:5: placeholder "CXX"

CXXFLAGS=@CXXFLAGS@ acr-1.7.2.tar:bin/acr-sh:3355:10: placeholder "CXXFLAGS"

echo "VPATH=@VPATH@"

acr-1.7.2.tar:bin/amr:286:14: placeholder "VPATH"

    echo "CC=@CC@"

acr-1.7.2.tar:bin/amr:288:12: placeholder "CC"

    echo "CFLAGS=@CFLAGS@"

acr-1.7.2.tar:bin/amr:289:16: placeholder "CFLAGS"

    echo "LDFLAGS=@LDFLAGS@"

acr-1.7.2.tar:bin/amr:290:17: placeholder "LDFLAGS"

    echo "BIN=@PKGNAME@"

acr-1.7.2.tar:bin/amr:296:13: placeholder "PKGNAME"

    echo "VERSION=@VERSION@"

acr-1.7.2.tar:bin/amr:297:17: placeholder "VERSION" — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

rillig commented 4 years ago

I just updated to 1.9.0 locally, and it's still the same.

Yes, I'm running ./configure. Here's the complete build log:

=> Bootstrap dependency digest>=20010302: found digest-20190127
=> Checksum SHA1 OK for acr-1.9.0.zip
=> Checksum RMD160 OK for acr-1.9.0.zip
=> Checksum SHA512 OK for acr-1.9.0.zip
work -> /home/rillig/tmp/pkgsrc.work/devel/acr/work
===> Installing dependencies for acr-1.9.0
=> Tool dependency checkperms>=1.1: found checkperms-1.12
=> Build dependency cwrappers>=20150314: found cwrappers-20180325
===> Overriding tools for acr-1.9.0
===> Extracting for acr-1.9.0
===> Patching for acr-1.9.0
===> Creating toolchain wrappers for acr-1.9.0
===> Configuring for acr-1.9.0
=> Substituting "eqeq" in src/acr-sh
--- src/acr-sh  2020-05-03 11:50:14.000000000 +0000
+++ src/acr-sh.subst.sav    2020-05-16 09:34:45.020426074 +0000
@@ -2122,7 +2122,7 @@
        if [ -z "${_CHKFLG_VAR}" ]; then
            _CHKFLG_VAR="${STR}"
        else
-           if [ "${STR}" == ";" ]; then
+           if [ "${STR}" = ";" ]; then
                check_cflags "${_CHKFLG_NAME}"
                _CHKFLG_NAME=""
                _CHKFLG_VAR=""
=> Modifying GNU configure scripts to avoid --recheck
=> Replacing config-guess with pkgsrc versions
=> Replacing config-sub with pkgsrc versions
=> Replacing install-sh with pkgsrc version
=> Checking for portability problems in extracted files
checking build system type... x86_64--netbsd
checking host system type... x86_64--netbsd
checking target system type... amd64-unknown-netbsd
using crosscompilation mode.
checking for working directories... current
using prefix '/home/rillig/pkg'
checking for install... /home/rillig/tmp/pkgsrc.work/devel/acr/work/.tools/bin/install
creating ./Makefile
creating src/vim/install.sh

Final report:
 - SPREFIX = /home/rillig/pkg
 - PREFIX = /home/rillig/pkg
 - INSTALL = /home/rillig/tmp/pkgsrc.work/devel/acr/work/.tools/bin/install
 - VERSION = 1.9.0
 - CONTACT = pancake <pancake@nopcode.org>
=> Substituting "ver" in src/acr-cat src/acr-sh
--- src/acr-cat 2020-05-03 11:50:14.000000000 +0000
+++ src/acr-cat.subst.sav   2020-05-16 09:34:45.293441024 +0000
@@ -21,7 +21,7 @@
 # @license:  GPLv2
 # @author:   pancake <pancake@nopcode.org>
 # @homepage: http://www.nopcode.org/?t=acr
-# @version:  @VERSION@
+# @version:  1.9.0
 #
 # acr-cat:
 #   Recovery utility that allows the user to recover the original configure.acr
--- src/acr-sh  2020-05-16 09:34:45.020426074 +0000
+++ src/acr-sh.subst.sav    2020-05-16 09:34:45.302423266 +0000
@@ -24,7 +24,7 @@
 # @license:  GPLv2
 # @author:   pancake <pancake@nopcode.org>
 # @homepage: http://github.com/radare/acr
-# @version:  @VERSION@
+# @version:  1.9.0
 #
 # acr-sh:
 #   acr configure script generator.
@@ -43,7 +43,7 @@
 #=============================================================================
 #

-ACR_VERSION=@VERSION@
+ACR_VERSION=1.9.0

 CONFIGURE="$2"
 : {CONFIGURE:=./configure}
@@ -2007,8 +2007,8 @@
    if [ "$MODE" = "include" ]; then
        [ "${DEBUG}" = 1 ] && echo "`word` < include $STR2"  >&2

-       if [ -e "@DATADIR@/acr/modules/${STR2}.acr" ]; then
-           FILE="@DATADIR@/acr/modules/${STR2}.acr";
+       if [ -e "/home/rillig/pkg/share/acr/modules/${STR2}.acr" ]; then
+           FILE="/home/rillig/pkg/share/acr/modules/${STR2}.acr";
        else    FILE="$STR2.acr"; fi

        if [ -e "$FILE" ]; then
radare commented 4 years ago

ive fixed the bug in acr-cat, by looking at the last diff i dont see any other issue, or do I?

rillig commented 4 years ago

Yep, that's all for this topic. Replacing == with = in acr-sh is a different topic. The == operator is only supported by some shells. But that has nothing to do with placeholders.

radare commented 4 years ago

fixed this too :)

thanks, anything left?

On 18 May 2020, at 20:46, Roland Illig notifications@github.com wrote:

Yep, that's all for this topic. Replacing == with = in acr-sh is a different topic. The == operator is only supported by some shells. But that has nothing to do with placeholders.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/radare/acr/issues/22#issuecomment-630369516, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAG75FVXKMRZIFXFQPRCMKLRSF663ANCNFSM4NCYMRSA.

rillig commented 4 years ago

No, nothing left. Thank you for fixing these issues.

rillig commented 4 years ago

See the comment at 832ad54a0fca730074b2e659fad673d4ee945a43.

rillig commented 4 years ago

Fixed in 1.9.3.