Bug 265623 - databases/redis62 has misleading pkg-message
Summary: databases/redis62 has misleading pkg-message
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Yasuhiro Kimura
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-04 08:38 UTC by FiLiS
Modified: 2022-08-07 05:41 UTC (History)
0 users

See Also:
yasu: maintainer-feedback+
yasu: merge-quarterly+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description FiLiS 2022-08-04 08:38:50 UTC
the pkg-message says

          To setup "redis62" you need to edit the configuration file:
          /usr/local/etc/redis62.conf

          To run redis from startup, add redis62_enable="YES"
          in your /etc/rc.conf.

While at least the rc.conf variable stays at redis_enable. Probably true for the redis62.conf as well? 
Maybe there was a little too much search+replace when creating the redis62-port?
Comment 1 commit-hook freebsd_committer freebsd_triage 2022-08-07 05:31:53 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=da202ea08068ed0be6487ea5f2bc368bbfb0d2c2

commit da202ea08068ed0be6487ea5f2bc368bbfb0d2c2
Author:     Yasuhiro Kimura <yasu@FreeBSD.org>
AuthorDate: 2022-08-07 04:31:13 +0000
Commit:     Yasuhiro Kimura <yasu@FreeBSD.org>
CommitDate: 2022-08-07 05:30:30 +0000

    databases/redis{6,62}: Fix problem that pkg-message is misleading

    When installing package of databases/redis62, following pkg-message is
    displayed.

              To setup "redis62" you need to edit the configuration file:
              /usr/local/etc/redis62.conf

              To run redis from startup, add redis62_enable="YES"
              in your /etc/rc.conf.

    But path of configuration file is /usr/local/etc/redis.conf and what
    should really be added to /etc/rc.conf is redis_enable="YES". Same
    problem also happens when installing databases/redis6

    The source of the problem is that the value of ${PORTNAME} is used to
    create pkg-message from file/pkg-message.in. So fix it by changing the
    value of ${PORTNAME} to "redis" and set PKGNAMESUFFIX in Makefile of
    each port.

    While I'm here,

    * Pet portlint and portclippy
    * Tidy up Makefile with portfmt.

    PR:             265623
    Reported by:    FiLiS
    MFH:            2022Q3

 databases/redis6/Makefile                          | 103 ++++++++++-----------
 databases/redis6/files/patch-deps-hiredis-net.c    |   4 +-
 databases/redis62/Makefile                         |   6 +-
 .../files/extra-patch-deps_lua_src_lua__cjson.c    |   4 +-
 .../redis62/files/extra-patch-src-Makefile.lua     |   4 +-
 .../redis62/files/extra-patch-src-Makefile.luajit  |   4 +-
 .../files/extra-patch-src-Makefile.luajit-or       |   4 +-
 databases/redis62/files/patch-deps-Makefile        |   4 +-
 .../redis62/files/patch-deps-hiredis-Makefile      |   4 +-
 databases/redis62/files/patch-deps-hiredis-net.c   |   4 +-
 databases/redis62/files/patch-deps_Makefile        |   4 +-
 databases/redis62/files/patch-redis.conf           |   4 +-
 12 files changed, 72 insertions(+), 77 deletions(-)
Comment 2 commit-hook freebsd_committer freebsd_triage 2022-08-07 05:36:56 UTC
A commit in branch 2022Q3 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3dde5366ac6790568b947b3949019e0a263fd080

commit 3dde5366ac6790568b947b3949019e0a263fd080
Author:     Yasuhiro Kimura <yasu@FreeBSD.org>
AuthorDate: 2022-08-07 04:31:13 +0000
Commit:     Yasuhiro Kimura <yasu@FreeBSD.org>
CommitDate: 2022-08-07 05:36:14 +0000

    databases/redis{6,62}: Fix problem that pkg-message is misleading

    When installing package of databases/redis62, following pkg-message is
    displayed.

              To setup "redis62" you need to edit the configuration file:
              /usr/local/etc/redis62.conf

              To run redis from startup, add redis62_enable="YES"
              in your /etc/rc.conf.

    But path of configuration file is /usr/local/etc/redis.conf and what
    should really be added to /etc/rc.conf is redis_enable="YES". Same
    problem also happens when installing databases/redis6

    The source of the problem is that the value of ${PORTNAME} is used to
    create pkg-message from file/pkg-message.in. So fix it by changing the
    value of ${PORTNAME} to "redis" and set PKGNAMESUFFIX in Makefile of
    each port.

    While I'm here,

    * Pet portlint and portclippy
    * Tidy up Makefile with portfmt.

    PR:             265623
    Reported by:    FiLiS
    MFH:            2022Q3

    (cherry picked from commit da202ea08068ed0be6487ea5f2bc368bbfb0d2c2)

 databases/redis6/Makefile                          | 103 ++++++++++-----------
 databases/redis6/files/patch-deps-hiredis-net.c    |   4 +-
 databases/redis62/Makefile                         |   6 +-
 .../files/extra-patch-deps_lua_src_lua__cjson.c    |   4 +-
 .../redis62/files/extra-patch-src-Makefile.lua     |   4 +-
 .../redis62/files/extra-patch-src-Makefile.luajit  |   4 +-
 .../files/extra-patch-src-Makefile.luajit-or       |   4 +-
 databases/redis62/files/patch-deps-Makefile        |   4 +-
 .../redis62/files/patch-deps-hiredis-Makefile      |   4 +-
 databases/redis62/files/patch-deps-hiredis-net.c   |   4 +-
 databases/redis62/files/patch-deps_Makefile        |   4 +-
 databases/redis62/files/patch-redis.conf           |   4 +-
 12 files changed, 72 insertions(+), 77 deletions(-)
Comment 3 Yasuhiro Kimura freebsd_committer freebsd_triage 2022-08-07 05:41:01 UTC
Thanks for bug report. Fixed with ports da202ea08068 of main and ports 3dde5366ac67 of 2022Q3.