diff mbox series

[bug#70962,01/14] gnu: grpc: Modernize.

Message ID 7cf609dcf83c85b6897c9fb9af46ce8a854a15c8.1715791830.git.maxim.cournoyer@gmail.com
State New
Headers show
Series [bug#70962,01/14] gnu: grpc: Modernize. | expand

Commit Message

Maxim Cournoyer May 15, 2024, 4:51 p.m. UTC
* gnu/packages/rpc.scm (grpc) [arguments]: Use gexps.  Delete trailing #t.
[native-inputs]: Remove labels.
* gnu/packages/rpc.scm (grpc-1.16.1) [arguments]: Use gexps.

Change-Id: I0e89d246cc62a293274a32344108a7249f343257
---

 gnu/packages/rpc.scm | 118 +++++++++++++++++++++----------------------
 1 file changed, 58 insertions(+), 60 deletions(-)


base-commit: 029f2e970d5d14dda2dc89a4a3cc17de573ff90c

Comments

Maxim Cournoyer May 30, 2024, 2:05 a.m. UTC | #1
Hi,

Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

>  This series adds BTF (Berkeley Type Format) support to our kernel, catching up
>  with other main distributions in enabling embedded BPF (Berkeley Packet
>  Filter) programs.
>
>  This was motivated by packaging 'sysdig', a system introspection application
>  that can make use of BTF.  Adding BTF does incur some size increase; with
>  'linux-libre' package going up from 132 MiB to 164 MiB (24%).  This is later
>  somewhat mitigated by using Zstd compressed (at maximum level, 19) kernel
>  modules, which brings the kernel size back down to 144 MiB, which corresponds
>  to a more reasonable 9% increase from before this series.  The BPF kernel
>  variant we were carrying is removed as proper BPF support will now exists in
>  our main kernel.
>
>  That's it!  I hope you enjoy using 'csysdig' to keep track of the syscalls and
>  IO usage of your process/threads.
>  END
>
>
>
> Maxim Cournoyer (14):
>   gnu: grpc: Modernize.
>   gnu: grpc: Propagate abseil-cpp-cxxstd11.
>   gnu: Add valijson.
>   gnu: libbpf: Use gexps.
>   gnu: libbpf: Update to 1.4.1.
>   gnu: Add falcosecurity-libs.
>   gnu: Add sysdig.
>   gnu: Add dwarves.
>   gnu: make-linux-libre*: Set KBUILD_BUILD_VERSION for reproducibility.
>   gnu: make-linux-libre*: Run install targets in parallel.
>   gnu: linux: Turn %default-extra-linux-options into a procedure.
>   gnu: linux-libre: Enable BTF debug info.
>   gnu: linux-libre: Enable Zstd compression of kernel modules.
>   gnu: linux-libre-with-bpf: Deprecate in favor of linux-libre.

I've used this for more than a week, and I haven't noticed any issue.

Merged with 7fd2f2e6fd3725c6dfe7df61a20269e6c7a46733 and the subsequent
commits.
diff mbox series

Patch

diff --git a/gnu/packages/rpc.scm b/gnu/packages/rpc.scm
index a88c79f8b9..d067d978c5 100644
--- a/gnu/packages/rpc.scm
+++ b/gnu/packages/rpc.scm
@@ -5,7 +5,7 @@ 
 ;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
 ;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
 ;;; Copyright © 2021 Tobias Geerinckx-Rice <me@tobias.gr>
-;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2022, 2024 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -65,55 +65,53 @@  (define-public grpc
                 "1fs407hnlnm0b8sncjwys9rc7ia5nb7wxrpx39nq3pzzfs1lv3vq"))))
     (build-system cmake-build-system)
     (arguments
-     `(#:tests? #f ; no test target
-       #:configure-flags
-       (list "-DgRPC_ZLIB_PROVIDER=package"
-             "-DgRPC_ABSL_PROVIDER=package"
-             "-DgRPC_CARES_PROVIDER=package"
-             "-DgRPC_SSL_PROVIDER=package"
-             "-DgRPC_PROTOBUF_PROVIDER=package"
-             "-DgRPC_RE2_PROVIDER=package"
-             (string-append "-DCMAKE_INSTALL_PREFIX="
-                            (assoc-ref %outputs "out"))
-             "-DCMAKE_INSTALL_LIBDIR=lib"
-             (string-append "-DCMAKE_INSTALL_RPATH="
-                            (assoc-ref %outputs "out") "/lib")
-             "-DCMAKE_VERBOSE_MAKEFILE=ON")
-       #:phases
-       (modify-phases %standard-phases
-         (add-before 'configure 'configure-shared
-           (lambda* (#:key (configure-flags '()) #:allow-other-keys)
-             (mkdir "../build-shared")
-             (with-directory-excursion "../build-shared"
-               (apply invoke
-                      "cmake" "../source"
-                      "-DBUILD_SHARED_LIBS=ON"
-                      configure-flags)
-               (apply invoke "make"
-                      `("-j" ,(number->string (parallel-job-count)))))))
-         (add-after 'install 'install-shared-libraries
-           (lambda _
-             (with-directory-excursion "../build-shared"
-               (invoke "make" "install"))))
-         (add-before 'strip 'move-static-libs
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out"))
-                   (static (assoc-ref outputs "static")))
-               (mkdir-p (string-append static "/lib"))
-               (with-directory-excursion
-                 (string-append out "/lib")
-                 (for-each
+     (list
+      #:tests? #f                       ; no test target
+      #:configure-flags
+      #~(list "-DgRPC_ZLIB_PROVIDER=package"
+              "-DgRPC_ABSL_PROVIDER=package"
+              "-DgRPC_CARES_PROVIDER=package"
+              "-DgRPC_SSL_PROVIDER=package"
+              "-DgRPC_PROTOBUF_PROVIDER=package"
+              "-DgRPC_RE2_PROVIDER=package"
+              (string-append "-DCMAKE_INSTALL_PREFIX=" #$output)
+              "-DCMAKE_INSTALL_LIBDIR=lib"
+              (string-append "-DCMAKE_INSTALL_RPATH=" #$output "/lib")
+              "-DCMAKE_VERBOSE_MAKEFILE=ON")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'configure 'configure-shared
+            (lambda* (#:key configure-flags #:allow-other-keys)
+              (mkdir "../build-shared")
+              (with-directory-excursion "../build-shared"
+                (apply invoke "cmake" "../source"
+                       "-DBUILD_SHARED_LIBS=ON"
+                       configure-flags)
+                (apply invoke "make"
+                       (list "-j" (number->string (parallel-job-count)))))))
+          (add-after 'install 'install-shared-libraries
+            (lambda _
+              (with-directory-excursion "../build-shared"
+                (invoke "make" "install"))))
+          (add-before 'strip 'move-static-libs
+            (lambda _
+              (let ((static #$output:static))
+                (mkdir-p (string-append static "/lib"))
+                (with-directory-excursion (string-append #$output "/lib")
+                  (for-each
                    (lambda (file)
-                     (rename-file file
-                                  (string-append static "/lib/" file)))
-                   (find-files "." "\\.a$"))))
-             #t)))))
-    (inputs
-     (list abseil-cpp-cxxstd11 c-ares/cmake openssl re2 zlib))
+                     (rename-file file (string-append static "/lib/" file)))
+                   (find-files "." "\\.a$")))))))))
     (native-inputs
-     `(("pkg-config" ,pkg-config)
-       ("protobuf" ,protobuf)
-       ("python" ,python-wrapper)))
+     (list pkg-config
+           protobuf
+           python-wrapper))
+    (inputs
+     (list abseil-cpp-cxxstd11
+           c-ares/cmake
+           openssl
+           re2
+           zlib))
     (home-page "https://grpc.io")
     (synopsis "High performance universal RPC framework")
     (description "gRPC is a modern high performance @dfn{Remote Procedure Call}
@@ -159,18 +157,18 @@  (define-public grpc-1.16.1
     (arguments
      (substitute-keyword-arguments (package-arguments grpc)
        ((#:phases phases)
-        `(modify-phases ,phases
-           ;; Note: This would be nicer as a snippet, but that creates a tarball
-           ;; instead of a checkout and breaks assumptions made by the builder.
-           (add-after 'unpack 'rename-gettid
-             (lambda _
-               ;; Rename custom gettid() syscall wrapper to avoid conflict
-               ;; with gettid() from glibc 2.30.
-               (substitute* '("src/core/lib/gpr/log_linux.cc"
-                              "src/core/lib/gpr/log_posix.cc"
-                              "src/core/lib/iomgr/ev_epollex_linux.cc")
-                 (("gettid\\(")
-                  "sys_gettid("))))))))
+        #~(modify-phases #$phases
+            ;; Note: This would be nicer as a snippet, but that creates a tarball
+            ;; instead of a checkout and breaks assumptions made by the builder.
+            (add-after 'unpack 'rename-gettid
+              (lambda _
+                ;; Rename custom gettid() syscall wrapper to avoid conflict
+                ;; with gettid() from glibc 2.30.
+                (substitute* '("src/core/lib/gpr/log_linux.cc"
+                               "src/core/lib/gpr/log_posix.cc"
+                               "src/core/lib/iomgr/ev_epollex_linux.cc")
+                  (("gettid\\(")
+                   "sys_gettid("))))))))
     (inputs
      (modify-inputs (package-inputs grpc)
        (replace "abseil-cpp" abseil-cpp-20200923.3)))