From e7e454785b7d449376448485643e704e72a20d9e Mon Sep 17 00:00:00 2001
gnu/packages/linux.scm | 78 ++++++++++++++++++++++++++++--------------
1 file changed, 52 insertions(+), 26 deletions(-)
Toggle diff (132 lines)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 6bc3f1e52a..16279e50c3 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
#:use-module (gnu packages acl)
#:use-module (gnu packages admin)
#:use-module (gnu packages algebra)
+ #:use-module (gnu packages attr)
#:use-module (gnu packages audio)
#:use-module (gnu packages autotools)
#:use-module (gnu packages backup)
@@ -5084,15 +5085,15 @@ obviously it can be shared with files outside our set).")
- (uri (string-append "ftp://ftp.suse.com/pub/projects/snapper/snapper-"
+ (url "https://github.com/openSUSE/snapper")
+ (commit (string-append "v" version))))
- "0s73x5h0fdggcxxcmjlf1q7pqlwd1ac4pngwsm6ayg8n4gxk3acy"))))
+ "1rqv1qfxr02qbkix1mpx91s4827irxryxkhby3ii0fdkm3ympsas"))))
(build-system gnu-build-system)
`( ;; TODO: 2 tests are failing:
@@ -5105,7 +5106,12 @@ obviously it can be shared with files outside our set).")
(assoc-ref %build-inputs "libxml2")
+ ;; SUSE package manager stuff
+ ;; Don't use /etc/sysconfig, just /etc.
(modify-phases %standard-phases
(add-before 'build 'make-local-docbook-xml
@@ -5121,11 +5127,14 @@ obviously it can be shared with files outside our set).")
(string-append (assoc-ref inputs "docbook-xsl")
,(package-version docbook-xsl)
- "/manpages/docbook.xsl")))
+ "/manpages/docbook.xsl")))))
(add-before 'build 'patch-makefiles
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
+ (substitute* "client/utils/Makefile.am"
+ ;; I ain't patching ncurses to alias ncurses to ltinfo.
+ ;; Also adds libjson-c, which is missing for some reason.
+ (("-ltinfo") "-lncurses -ljson-c"))
(substitute* "client/Makefile.am"
(("libexecdir = /usr/lib/snapper")
(string-append "libexecdir = " out
@@ -5140,30 +5149,47 @@ obviously it can be shared with files outside our set).")
(("\\$\\(DESTDIR\\)") out))
(substitute* "pam/Makefile.am"
(("(securelibdir = )\\$\\(shell echo /`basename \\$\\(libdir\\)`/security\\)" _ before)
- (string-append before out "/lib/security"))))
- (add-after 'install 'clean-up-systemd-services
- (lambda* (#:key outputs #:allow-other-keys)
- ;; TODO: Maybe we should not remove everything, we need dbus.
- (delete-file-recursively
- (string-append (assoc-ref outputs "out") "/usr"))
+ (string-append before out "/lib/security"))))))
+ (add-after 'install 'fix-paths...again
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (("CMD_SNAPPER=\"/usr/bin/snapper\"")
+ (string-append out "/bin/snapper"))
+ (("CMD_PAM_CONFIG=\"/usr/sbin/pam-config\"")
+ (string-append (assoc-ref inputs "linux-pam") "/sbin/pam-config"))))
+ (find-files (string-append out d) (const #t)))
+ "/share/dbus-1/system-services/"))))))))))
- `(("pkg-config" ,pkg-config)
+ `(("autoconf" ,autoconf)
+ ("docbook-xsl" ,docbook-xsl)
+ ("docbook-xml" ,docbook-xml)
("gettext" ,gettext-minimal) ;for msgfmt
- ("docbook-xsl" ,docbook-xsl)
- ("automake" ,automake)))
+ ("pkg-config" ,pkg-config)))
- `(("libmount" ,util-linux)
("btrfs-progs" ,btrfs-progs)
- ("linux-pam" ,linux-pam)))
+ ("linux-pam" ,linux-pam)
+ ("util-linux" ,util-linux "lib")
+ ("util-linux" ,util-linux)))
(home-page "http://snapper.io/")
(synopsis "Manage BTRFS and LVM snapshots")
(description " Snapper is a tool for Linux filesystem snapshot