[PATCH] gnu: mysql: Propagate runtime dependencies.

DoneSubmitted by zimoun.
Details
3 participants
  • Maxime Devos
  • Mathieu Othacehe
  • zimoun
Owner
unassigned
Severity
normal
Z
Z
zimoun wrote on 14 Sep 18:10 +0200
(address . guix-patches@gnu.org)(name . zimoun)(address . zimon.toutoune@gmail.com)
20210914161025.2511106-1-zimon.toutoune@gmail.com
Fixes <htpps://bugs.gnu.org/23045>.
* gnu/packages/databases.scm (mysql): Add 'propagated-inputs'.--- gnu/packages/databases.scm | 7 +++++++ 1 file changed, 7 insertions(+)
Toggle diff (36 lines)diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scmindex c75e1421d5..7e07dbc5e4 100644--- a/gnu/packages/databases.scm+++ b/gnu/packages/databases.scm@@ -53,6 +53,7 @@ ;;; Copyright © 2021 Bonface Munyoki Kilyungi <me@bonfacemunyoki.com> ;;; Copyright © 2021 Simon Streit <simon@netpanic.org> ;;; Copyright © 2021 Alexandre Hannud Abdo <abdo@member.fsf.org>+;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;;@@ -90,6 +91,7 @@ #:use-module (gnu packages emacs) #:use-module (gnu packages flex) #:use-module (gnu packages freedesktop)+ #:use-module (gnu packages gawk) #:use-module (gnu packages gcc) #:use-module (gnu packages gettext) #:use-module (gnu packages glib)@@ -708,6 +710,11 @@ auto-completion and syntax highlighting.") ("openssl" ,openssl) ("rpcsvc-proto" ,rpcsvc-proto) ; rpcgen ("zlib" ,zlib)))+ (propagated-inputs+ ;; Required by 'mysql_config'+ `(("awk" ,gawk)+ ("coreutils" ,coreutils) ;ls,cat+ ("sed" ,sed))) (home-page "https://www.mysql.com/") (synopsis "Fast, easy to use, and popular database") (description
base-commit: a72519489f0178051b7049d5793d95d070ebef86-- 2.32.0
M
M
Maxime Devos wrote on 15 Sep 13:43 +0200
c44d166c061d335fa27c91605d48d7ac33e0b81c.camel@telenet.be
zimoun schreef op di 14-09-2021 om 18:10 [+0200]:
Toggle quote (10 lines)> @@ -708,6 +710,11 @@ auto-completion and syntax highlighting.")> ("openssl" ,openssl)> ("rpcsvc-proto" ,rpcsvc-proto) ; rpcgen> ("zlib" ,zlib)))> + (propagated-inputs> + ;; Required by 'mysql_config'> + `(("awk" ,gawk)> + ("coreutils" ,coreutils) ;ls,cat> + ("sed" ,sed)))
If 'wrap-program' is used on mysql_config to set PATH tothe bin directories of awk, coreutils and sed,or 'substitute*' is used to replace 'awk', 'sed' and 'ls'by their absolute paths, then propagation can be avoided.
Greetings,Maxime.
-----BEGIN PGP SIGNATURE-----
iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYUHcUBccbWF4aW1lZGV2b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7sGLAP9gaU/93WscGlZ0QkozQdQI/tZvQJZ9skoTY8RUEKNaBgD/eLhaaMWp6sk0ghoSYiYvzKUhwklhctQjkLwiDlb7sAc==YkZj-----END PGP SIGNATURE-----

Z
Z
zimoun wrote on 15 Sep 16:54 +0200
[PATCH v2] gnu: mysql: Add wrapper around mysql_config.
(address . 50586@debbugs.gnu.org)(name . zimoun)(address . zimon.toutoune@gmail.com)
20210915145442.2599256-1-zimon.toutoune@gmail.com
Fixes https://bugs.gnu.org/23045.
* gnu/packages/databases.scm (mysql): Add phase to wrap 'mysql_config'.--- gnu/packages/databases.scm | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
Toggle diff (58 lines)diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scmindex c75e1421d5..1b4a1b0f12 100644--- a/gnu/packages/databases.scm+++ b/gnu/packages/databases.scm@@ -53,6 +53,7 @@ ;;; Copyright © 2021 Bonface Munyoki Kilyungi <me@bonfacemunyoki.com> ;;; Copyright © 2021 Simon Streit <simon@netpanic.org> ;;; Copyright © 2021 Alexandre Hannud Abdo <abdo@member.fsf.org>+;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;;@@ -90,6 +91,7 @@ #:use-module (gnu packages emacs) #:use-module (gnu packages flex) #:use-module (gnu packages freedesktop)+ #:use-module (gnu packages gawk) #:use-module (gnu packages gcc) #:use-module (gnu packages gettext) #:use-module (gnu packages glib)@@ -695,6 +697,20 @@ auto-completion and syntax highlighting.") (for-each delete-file (find-files (string-append out "/bin") "_embedded$"))+ #t)))+ (add-after+ 'install 'wrap-mysql_config+ (lambda* (#:key inputs outputs #:allow-other-keys)+ (let* ((out (assoc-ref outputs "out"))+ (bin (string-append out "/bin"))+ (awk (assoc-ref inputs "gawk"))+ (coreutils (assoc-ref inputs "coreutils"))+ (sed (assoc-ref inputs "sed")))+ (wrap-program (string-append bin "/mysql_config")+ `("PATH" ":" suffix+ (,(string-append awk "/bin")+ ,(string-append coreutils "/bin")+ ,(string-append sed "/bin")))) #t)))))) (native-inputs `(("bison" ,bison)@@ -702,11 +718,14 @@ auto-completion and syntax highlighting.") ("pkg-config" ,pkg-config))) (inputs `(("boost" ,boost-for-mysql)+ ("coreutils" ,coreutils) ;ls,cat required by mysql_config+ ("gawk" ,gawk) ;required by mysql_config ("libaio" ,libaio) ("libtirpc" ,libtirpc) ("ncurses" ,ncurses) ("openssl" ,openssl) ("rpcsvc-proto" ,rpcsvc-proto) ; rpcgen+ ("sed" ,sed) ;required by mysql_config ("zlib" ,zlib))) (home-page "https://www.mysql.com/") (synopsis "Fast, easy to use, and popular database")-- 2.32.0
Z
Z
zimoun wrote on 15 Sep 16:55 +0200
Re: [bug#50586] [PATCH] gnu: mysql: Propagate runtime dependencies.
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 50586@debbugs.gnu.org)
CAJ3okZ09CQWdK_7V0qDH7U_fk0MgbcqjUKeFZN-kg-pinmefdQ@mail.gmail.com
Hi Maxime,
On Wed, 15 Sept 2021 at 13:43, Maxime Devos <maximedevos@telenet.be> wrote:
Toggle quote (5 lines)> If 'wrap-program' is used on mysql_config to set PATH to> the bin directories of awk, coreutils and sed,> or 'substitute*' is used to replace 'awk', 'sed' and 'ls'> by their absolute paths, then propagation can be avoided.
Indeed. It is better. :-)Done in v2.Thanks for the review.
Cheers,simon
M
M
Mathieu Othacehe wrote on 20 Sep 21:19 +0200
Re: bug#50586: [PATCH] gnu: mysql: Propagate runtime dependencies.
(name . zimoun)(address . zimon.toutoune@gmail.com)(address . 50586@debbugs.gnu.org)
87k0jb837z.fsf_-_@gnu.org
Hello zimoun,
Toggle quote (6 lines)> + (wrap-program (string-append bin "/mysql_config")> + `("PATH" ":" suffix> + (,(string-append awk "/bin")> + ,(string-append coreutils "/bin")> + ,(string-append sed "/bin"))))
It looks like mysqld_safe could use the same kind of wrapping, at leastfor "ps" and "grep" binaries. Could you please have a look?
Thanks,
Mathieu
Z
Z
zimoun wrote on 21 Sep 08:35 +0200
[PATCH v3] gnu: mysql: Add wrapper around mysql_config.
(address . 50586@debbugs.gnu.org)(name . zimoun)(address . zimon.toutoune@gmail.com)
20210921063556.2837579-1-zimon.toutoune@gmail.com
Fixes https://bugs.gnu.org/23045.
* gnu/packages/databases.scm (mysql): Add phase to wrap 'mysql_config'.[inputs]: Add 'coreutils', 'gawk', 'procps' and 'sed'--- gnu/packages/databases.scm | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)
Toggle diff (69 lines)diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scmindex c75e1421d5..58e3d7175b 100644--- a/gnu/packages/databases.scm+++ b/gnu/packages/databases.scm@@ -53,6 +53,7 @@ ;;; Copyright © 2021 Bonface Munyoki Kilyungi <me@bonfacemunyoki.com> ;;; Copyright © 2021 Simon Streit <simon@netpanic.org> ;;; Copyright © 2021 Alexandre Hannud Abdo <abdo@member.fsf.org>+;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;;@@ -90,6 +91,7 @@ #:use-module (gnu packages emacs) #:use-module (gnu packages flex) #:use-module (gnu packages freedesktop)+ #:use-module (gnu packages gawk) #:use-module (gnu packages gcc) #:use-module (gnu packages gettext) #:use-module (gnu packages glib)@@ -695,6 +697,29 @@ auto-completion and syntax highlighting.") (for-each delete-file (find-files (string-append out "/bin") "_embedded$"))+ #t)))+ (add-after+ 'install 'wrap-mysql_helpers+ (lambda* (#:key inputs outputs #:allow-other-keys)+ (let* ((out (assoc-ref outputs "out"))+ (bin (string-append out "/bin"))+ (awk (assoc-ref inputs "gawk"))+ (coreutils (assoc-ref inputs "coreutils"))+ (grep (assoc-ref inputs "grep"))+ (ps (assoc-ref inputs "procps"))+ (sed (assoc-ref inputs "sed")))+ (wrap-program (string-append bin "/mysql_config")+ `("PATH" ":" suffix+ (,(string-append awk "/bin")+ ,(string-append coreutils "/bin")+ ,(string-append sed "/bin"))))+ (wrap-program (string-append bin "/mysqld_safe")+ `("PATH" ":" suffix+ (,(string-append awk "/bin")+ ,(string-append coreutils "/bin")+ ,(string-append grep "/bin")+ ,(string-append ps "/bin")+ ,(string-append sed "/bin")))) #t)))))) (native-inputs `(("bison" ,bison)@@ -702,11 +727,16 @@ auto-completion and syntax highlighting.") ("pkg-config" ,pkg-config))) (inputs `(("boost" ,boost-for-mysql)+ ("coreutils" ,coreutils) ;ls,cat required by mysql_config, mysqld_safe+ ("gawk" ,gawk) ;required by mysql_config, mysqld_safe+ ("grep" ,grep) ;required by mysqld_safe ("libaio" ,libaio) ("libtirpc" ,libtirpc) ("ncurses" ,ncurses) ("openssl" ,openssl)+ ("procps" ,procps) ;required by mysqld_safe ("rpcsvc-proto" ,rpcsvc-proto) ; rpcgen+ ("sed" ,sed) ;required by mysql_config, mysqld_safe ("zlib" ,zlib))) (home-page "https://www.mysql.com/") (synopsis "Fast, easy to use, and popular database")-- 2.32.0
Z
Z
zimoun wrote on 21 Sep 08:26 +0200
Re: bug#50586: [PATCH] gnu: mysql: Propagate runtime dependencies.
(name . Mathieu Othacehe)(address . othacehe@gnu.org)(address . 50586@debbugs.gnu.org)
86lf3q1m27.fsf_-_@gmail.com
Hi,
On lun., 20 sept. 2021 at 19:19, Mathieu Othacehe <othacehe@gnu.org> wrote:
Toggle quote (3 lines)> It looks like mysqld_safe could use the same kind of wrapping, at least> for "ps" and "grep" binaries. Could you please have a look?
Thanks for the catch up. Well, it is fixed in v3. I have checked byhand the 2 bash scripts…
Toggle snippet (7 lines)$ file bin/* | grep -v ELFbin/mysql_config: a /gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/bash script, ASCII text executablebin/mysqld_safe: a /gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/sh script, ASCII text executablebin/mysqld_multi: Perl script text executablebin/mysqldumpslow: Perl script text executable
…and I have no idea about the Perl ones; let assume all is fine sincethere is no bug report about them. ;-)
Note that ’mysqld_safe’ contains absolute path:
Toggle snippet (13 lines) # Restrict to a the list in $malloc_dirs above case "`dirname "$malloc_lib"`" in /usr/lib) ;; /usr/lib64) ;; /usr/lib/i386-linux-gnu) ;; /usr/lib/x86_64-linux-gnu) ;; *) log_error "--malloc-lib must be located in one of the directories: $malloc_dirs" exit 1 ;; esac
Because I am not an user of ’mysqld_safe’ and there is no bug report, Iassume it is not an issue and let it aside.

Cheers,simon
M
M
Mathieu Othacehe wrote on 21 Sep 16:24 +0200
(name . zimoun)(address . zimon.toutoune@gmail.com)(address . 50586-done@debbugs.gnu.org)
871r5i57ma.fsf_-_@gnu.org
Hey,
Toggle quote (2 lines)> + ("sed" ,sed) ;required by mysql_config, mysqld_safe
Thanks for the v3, I edited the commit message and removed the abovecomments before pushing.
Mathieu
Closed
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send email to 50586@debbugs.gnu.org