* gnu-build-system not handling pkg-config properly in package definition @ 2020-12-24 5:33 Nathan Dehnel 2020-12-24 12:59 ` Danny Milosavljevic 2020-12-24 14:19 ` Tobias Geerinckx-Rice 0 siblings, 2 replies; 5+ messages in thread From: Nathan Dehnel @ 2020-12-24 5:33 UTC (permalink / raw) To: guix-devel https://www.mail-archive.com/bug-guix@gnu.org/msg00180.html According to this, if you use gnu-build-system, all packages added to inputs get added to PKG_CONFIG_PATH, but for some reason it's not happening for util-linux, which causes a build error. During the build PKG_CONFIG_PATH ends up not containing any of the util-linux packages. Does anyone know how to fix this? Package below: (define-module (gooby-channel packages bcache-tools) #:use-module (guix licenses) #:use-module (guix packages) #:use-module (gnu packages) #:use-module (guix build-system gnu) #:use-module (guix git-download) #:use-module (gnu packages linux) #:use-module (gnu packages pkg-config)) (define-public bcache-tools (package (name "bcache-tools") (version "1.1") (source (origin (method git-fetch) (uri (git-reference (url (string-append "https://git.kernel.org/pub/scm/linux/kernel/git/colyli/" name ".git")) (commit (string-append name "-" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1vfqm3asx7h1sjwyq45dki4wk7lkipqrx2pw2hnqm4xir85qf67h")) (patches (search-patches "bcache-tools-noprobe.patch")))) (build-system gnu-build-system) (arguments `(;;#:tests? #f ; no "check" target #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))) #:phases (modify-phases %standard-phases (delete 'configure)))) (inputs `(("util-linux" ,util-linux))) (native-inputs `(("pkg-config" ,pkg-config))) (home-page "https://bcache.evilpiepirate.org/") (synopsis "These are the userspace tools required for bcache.") (description "Bcache patches for the Linux kernel allow one to use SSDs to cache other block devices. It's analogous to L2Arc for ZFS, but Bcache also does writeback caching (besides just write through caching), and it's filesystem agnostic. ") (license gpl2))) ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gnu-build-system not handling pkg-config properly in package definition 2020-12-24 5:33 gnu-build-system not handling pkg-config properly in package definition Nathan Dehnel @ 2020-12-24 12:59 ` Danny Milosavljevic 2020-12-24 14:19 ` Tobias Geerinckx-Rice 1 sibling, 0 replies; 5+ messages in thread From: Danny Milosavljevic @ 2020-12-24 12:59 UTC (permalink / raw) To: Nathan Dehnel; +Cc: guix-devel [-- Attachment #1: Type: text/plain, Size: 242 bytes --] Hi, try util-linux's "lib" output: (inputs `(("util-linux" ,util-linux "lib"))) After that, you need (string-append "CC=" ,(cc-for-target)) in make-flags, and then add a phase before install that creates $output/sbin . [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gnu-build-system not handling pkg-config properly in package definition 2020-12-24 5:33 gnu-build-system not handling pkg-config properly in package definition Nathan Dehnel 2020-12-24 12:59 ` Danny Milosavljevic @ 2020-12-24 14:19 ` Tobias Geerinckx-Rice 2020-12-24 15:30 ` Tobias Geerinckx-Rice 2020-12-27 5:27 ` Nathan Dehnel 1 sibling, 2 replies; 5+ messages in thread From: Tobias Geerinckx-Rice @ 2020-12-24 14:19 UTC (permalink / raw) To: Nathan Dehnel; +Cc: guix-devel [-- Attachment #1.1: Type: text/plain, Size: 1516 bytes --] Nathan, Nathan Dehnel 写道: > (define-public bcache-tools So... if you want to learn how to write and submit packages to Guix -- please do! And don't let me distract you. Your patch looks good, if incomplete :-) However, if you need/want a working Guix bcache-tools package ASAP, I have to admit I've been sitting on the attached patch for so long I that forgot it wasn't upstream yet. > (patches (search-patches "bcache-tools-noprobe.patch")) Sounds useful. What does this patch do? Is it related to Guix (perhaps our blkid)? > (synopsis "These are the userspace tools required for > bcache.") > (description "Bcache patches for the Linux kernel allow one > to use >SSDs to cache other block devices. It's analogous to L2Arc for >ZFS, >but Bcache also does writeback caching (besides just write >through >caching), and it's filesystem agnostic. ") I think The GNU Way is ‘user space’, ‘file system’, ‘write-back’ etc. Be sure to double-space prose sentences; ‘guix lint bcache-tools’ will warn you about this and other possible surface issues. This description sounds out of date (it's been upstream since the 3.x days) and the ZFS comparison is presumably meaningful only to a small minority of ZSF-on-Linux-Libre users. IMO try to describe packages in first-class terms so users don't get sent on a rabbit chase. Feel free to snarf my description but don't feel obligated either. Kind regards, T G-R [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1.2: 0001-gnu-Add-bcache-tools.patch --] [-- Type: text/x-patch, Size: 3834 bytes --] From 283f3d774fcad015d41973304714c30150bf2f2f Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice <me@tobias.gr> Date: Thu, 19 Nov 2020 19:01:25 +0100 Subject: [PATCH] gnu: Add bcache-tools. * gnu/packages/disk.scm (bcache-tools): New public variable. --- gnu/packages/disk.scm | 67 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm index c4f128d14a..c9ea1cea0b 100644 --- a/gnu/packages/disk.scm +++ b/gnu/packages/disk.scm @@ -89,6 +89,73 @@ #:use-module (guix packages) #:use-module (guix utils)) +(define-public bcache-tools + ;; The 1.1 release is a year old and missing new features & documentation. + (let ((commit "096d205a9f1be8540cbc5a468c0da8203023de70") + (revision "0")) + (package + (name "bcache-tools") + (version (git-version "1.1" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url (string-append "https://git.kernel.org/pub/scm/" + "linux/kernel/git/colyli/bcache-tools.git")) + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0r0vwg4vacz5zgsafk360xn7gi2scy01c79mkmjrdyxjfij5z3iy")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; no test suite + #:make-flags + (list (string-append "PREFIX=" (assoc-ref %outputs "out")) + (string-append "UDEVLIBDIR=" (assoc-ref %outputs "out") + "/lib/udev") + (string-append "DRACUTLIBDIR=" (assoc-ref %outputs "out") + "/lib/dracut") + (string-append "CC=" ,(cc-for-target))) + #:phases + (modify-phases %standard-phases + (delete 'configure) ; no configure script + (add-before 'install 'fix-hard-coded-file-names + (lambda _ + ;; Some rules still hard-code /usr. + (substitute* "Makefile" + (("/usr") "${PREFIX}")) + #t)) + (add-before 'install 'create-target-directories + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out"))) + (for-each (lambda (dir) + (mkdir-p (string-append out dir))) + (list "/lib/udev/rules.d" + "/sbin" + "/share/man/man8")) + #t)))))) + (native-inputs + `(("pkg-config" ,pkg-config))) + (inputs + `(("util-linux:lib" ,util-linux "lib"))) ; libblkid + (home-page "https://bcache.evilpiepirate.org") + (synopsis "Tools for the Linux kernel block layer cache") + (description + "This package contains user-space utilities to create and inspect bcache +partitions. It's rather minimal as bcache is designed to work well without +configuration on any system. + +Linux's @acronym{bcache, block layer cache} lets one or more fast block devices, +such as flash-based @acronym{SSDs, solid state drives}, to act as a cache for +one or more slower (and inexpensive) devices, such as hard disk drives or +redundant storage arrays. In fact, bcache intends to be a superior alternative +to battery-backed RAID controllers. + +Bcache is designed around the performance characteristics of SSDs and tries to +minimize write inflation. It's file-system agnostic and does both write-through +and write-back caching.") + (license license:gpl2+)))) + (define-public udevil (package (name "udevil") -- 2.29.2 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 247 bytes --] ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: gnu-build-system not handling pkg-config properly in package definition 2020-12-24 14:19 ` Tobias Geerinckx-Rice @ 2020-12-24 15:30 ` Tobias Geerinckx-Rice 2020-12-27 5:27 ` Nathan Dehnel 1 sibling, 0 replies; 5+ messages in thread From: Tobias Geerinckx-Rice @ 2020-12-24 15:30 UTC (permalink / raw) Cc: Nathan Dehnel, guix-devel [-- Attachment #1: Type: text/plain, Size: 161 bytes --] Tobias Geerinckx-Rice 写道: > + (license license:gpl2+)))) Thanks for correctly identifying it as GPL2-only, by the way. Kind regards, T G-R [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 247 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gnu-build-system not handling pkg-config properly in package definition 2020-12-24 14:19 ` Tobias Geerinckx-Rice 2020-12-24 15:30 ` Tobias Geerinckx-Rice @ 2020-12-27 5:27 ` Nathan Dehnel 1 sibling, 0 replies; 5+ messages in thread From: Nathan Dehnel @ 2020-12-27 5:27 UTC (permalink / raw) To: Tobias Geerinckx-Rice; +Cc: guix-devel >However, if you need/want a working Guix bcache-tools package ASAP, I have to admit I've been sitting on the attached patch for so long I that forgot it wasn't upstream yet. Thanks, I will try it out. >Sounds useful. What does this patch do? Is it related to Guix (perhaps our blkid)? I don't actually know. It was taken from gentoo. I was trying to see if it would fix the build error. https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-fs/bcache-tools/files/1.0.8_p20140220 https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-fs/bcache-tools/files/1.1 On Thu, Dec 24, 2020 at 8:19 AM Tobias Geerinckx-Rice <me@tobias.gr> wrote: > > Nathan, > > Nathan Dehnel 写道: > > (define-public bcache-tools > > So... if you want to learn how to write and submit packages to > Guix -- please do! And don't let me distract you. Your patch > looks good, if incomplete :-) > > However, if you need/want a working Guix bcache-tools package > ASAP, I have to admit I've been sitting on the attached patch for > so long I that forgot it wasn't upstream yet. > > > (patches (search-patches "bcache-tools-noprobe.patch")) > > Sounds useful. What does this patch do? Is it related to Guix > (perhaps our blkid)? > > > (synopsis "These are the userspace tools required for > > bcache.") > > (description "Bcache patches for the Linux kernel allow one > > to use > >SSDs to cache other block devices. It's analogous to L2Arc for > >ZFS, > >but Bcache also does writeback caching (besides just write > >through > >caching), and it's filesystem agnostic. ") > > I think The GNU Way is ‘user space’, ‘file system’, ‘write-back’ > etc. Be sure to double-space prose sentences; ‘guix lint > bcache-tools’ will warn you about this and other possible surface > issues. > > This description sounds out of date (it's been upstream since the > 3.x days) and the ZFS comparison is presumably meaningful only to > a small minority of ZSF-on-Linux-Libre users. IMO try to describe > packages in first-class terms so users don't get sent on a rabbit > chase. > > Feel free to snarf my description but don't feel obligated either. > > Kind regards, > > T G-R > ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-12-27 5:28 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2020-12-24 5:33 gnu-build-system not handling pkg-config properly in package definition Nathan Dehnel 2020-12-24 12:59 ` Danny Milosavljevic 2020-12-24 14:19 ` Tobias Geerinckx-Rice 2020-12-24 15:30 ` Tobias Geerinckx-Rice 2020-12-27 5:27 ` Nathan Dehnel
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/guix.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.