diff options
author | 宋文武 <iyzsong@gmail.com> | 2015-05-23 09:43:12 +0800 |
---|---|---|
committer | 宋文武 <iyzsong@gmail.com> | 2015-05-23 09:43:12 +0800 |
commit | 86a81222cad9841c67e9d9bcd46c567383e9a34f (patch) | |
tree | d976896cba87c5de65d8fdc4bf0be85880c04153 | |
parent | 3e3d47fc5347a5032fd2039831be1dc1d80576ed (diff) | |
parent | 8605321dd6f3c42590046be9d69112a8c8cf7cbf (diff) | |
download | patches-86a81222cad9841c67e9d9bcd46c567383e9a34f.tar patches-86a81222cad9841c67e9d9bcd46c567383e9a34f.tar.gz |
Merge branch 'master' into gtk-rebuild
Conflicts:
gnu/packages/gtk.scm
368 files changed, 27880 insertions, 4292 deletions
diff --git a/.dir-locals.el b/.dir-locals.el index 7aef853625..eb3da94da4 100644 --- a/.dir-locals.el +++ b/.dir-locals.el @@ -14,6 +14,7 @@ ((indent-tabs-mode . nil) (eval . (put 'eval-when 'scheme-indent-function 1)) (eval . (put 'test-assert 'scheme-indent-function 1)) + (eval . (put 'test-assertm 'scheme-indent-function 1)) (eval . (put 'test-equal 'scheme-indent-function 1)) (eval . (put 'test-eq 'scheme-indent-function 1)) (eval . (put 'call-with-input-string 'scheme-indent-function 1)) diff --git a/.gitignore b/.gitignore index 3ec36366e3..47cb39584e 100644 --- a/.gitignore +++ b/.gitignore @@ -96,7 +96,7 @@ stamp-h[0-9] /doc/guix.tp /doc/guix.vr /doc/guix.vrs -/nix/scripts/substitute-binary +/nix/scripts/substitute /doc/images/bootstrap-graph.png /doc/images/bootstrap-graph.eps /guix-register @@ -112,3 +112,5 @@ GTAGS /emacs/guix-helper.scm /emacs/guix-init.el /emacs/guix-profiles.el +/doc/os-config-bare-bones.texi +/doc/os-config-desktop.texi @@ -35,4 +35,6 @@ alphabetical order): David Thompson <dthompson2@worcester.edu> Paul van der Walt <paul@denknerd.org> Mark H. Weaver <mhw@netris.org> + Christopher A. Webber <cwebber@dustycloud.org> + Andy Wingo <wingo@pobox.com> Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> diff --git a/Makefile.am b/Makefile.am index 882ab8e27b..6478aeb8e0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -51,6 +51,7 @@ MODULES = \ guix/build-system/cmake.scm \ guix/build-system/glib-or-gtk.scm \ guix/build-system/gnu.scm \ + guix/build-system/haskell.scm \ guix/build-system/perl.scm \ guix/build-system/python.scm \ guix/build-system/waf.scm \ @@ -74,16 +75,20 @@ MODULES = \ guix/build/python-build-system.scm \ guix/build/ruby-build-system.scm \ guix/build/waf-build-system.scm \ + guix/build/haskell-build-system.scm \ guix/build/store-copy.scm \ guix/build/utils.scm \ guix/build/union.scm \ + guix/build/profiles.scm \ guix/build/pull.scm \ guix/build/rpath.scm \ guix/build/cvs.scm \ guix/build/svn.scm \ guix/build/syscalls.scm \ + guix/build/gremlin.scm \ guix/build/emacs-utils.scm \ guix/build/graft.scm \ + guix/search-paths.scm \ guix/packages.scm \ guix/import/utils.scm \ guix/import/gnu.scm \ @@ -96,7 +101,7 @@ MODULES = \ guix/scripts/gc.scm \ guix/scripts/hash.scm \ guix/scripts/pull.scm \ - guix/scripts/substitute-binary.scm \ + guix/scripts/substitute.scm \ guix/scripts/authenticate.scm \ guix/scripts/refresh.scm \ guix/scripts/system.scm \ @@ -104,6 +109,7 @@ MODULES = \ guix/scripts/import/gnu.scm \ guix/scripts/import/nix.scm \ guix/scripts/environment.scm \ + guix/scripts/publish.scm \ guix.scm \ $(GNU_SYSTEM_MODULES) @@ -129,7 +135,8 @@ KCONFIGS = \ # Templates, examples. EXAMPLES = \ - gnu/system/os-config.tmpl + gnu/system/examples/bare-bones.tmpl \ + gnu/system/examples/desktop.tmpl GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go guix/tests.go @@ -162,7 +169,7 @@ SCM_TESTS = \ tests/pk-crypto.scm \ tests/pki.scm \ tests/sets.scm \ - tests/substitute-binary.scm \ + tests/substitute.scm \ tests/builders.scm \ tests/derivations.scm \ tests/ui.scm \ @@ -178,7 +185,9 @@ SCM_TESTS = \ tests/union.scm \ tests/profiles.scm \ tests/syscalls.scm \ - tests/lint.scm + tests/gremlin.scm \ + tests/lint.scm \ + tests/publish.scm if HAVE_GUILE_JSON @@ -201,6 +210,7 @@ SH_TESTS = \ tests/guix-gc.sh \ tests/guix-hash.sh \ tests/guix-package.sh \ + tests/guix-package-net.sh \ tests/guix-system.sh \ tests/guix-archive.sh \ tests/guix-authenticate.sh \ @@ -235,6 +245,9 @@ tests/guix-gc.log: \ # Public key used to sign substitutes from hydra.gnu.org. dist_pkgdata_DATA = hydra.gnu.org.pub +# Bash completion file. +dist_bashcompletion_DATA = etc/completion/bash/guix + EXTRA_DIST = \ HACKING \ ROADMAP \ @@ -248,6 +261,7 @@ EXTRA_DIST = \ build-aux/check-final-inputs-self-contained.scm \ build-aux/download.scm \ build-aux/list-packages.scm \ + build-aux/make-binary-tarball.scm \ srfi/srfi-37.scm.in \ srfi/srfi-64.scm \ srfi/srfi-64.upstream.scm \ @@ -333,6 +347,13 @@ dist_emacsui_DATA = emacs/guix-main.scm nodist_emacsui_DATA = emacs/guix-helper.scm include emacs.am +# The self-contained tarball. +guix-binary.%.tar.xz: + -GUIX_PACKAGE_PATH= \ + $(top_builddir)/pre-inst-env "$(GUILE)" \ + "$(top_srcdir)/build-aux/make-binary-tarball.scm" "$*" "$@" + + dist-hook: sync-descriptions gen-ChangeLog assert-no-store-file-names distcheck-hook: assert-binaries-available assert-final-inputs-self-contained @@ -10,6 +10,378 @@ Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> Please send Guix bug reports to bug-guix@gnu.org. +* Changes in 0.8.2 (since 0.8.1) + +** Package management + +*** New “binary tarball” installation method is available + +See “Binary Installation” in the manual. + +*** New ‘guix publish’ command, to publish one’s store + +See “Invoking guix publish” in the manual. + +*** ‘guix package’ runs “profile creation hooks” as needed + +It creates X.509 certificate bundles in the profile’s etc/ssl directory, if +needed, generates a package database cache for GHC if the profile includes GHC +(the Haskell compiler), and generates an Info ‘dir’ file (this part was +already done before.) + +*** ‘guix package’ creates an ‘etc/profile’ file in the profile + +See “Invoking guix package” in the manual. + +*** Commands understand version prefixes, such as ‘gcc-5’ for ‘gcc-5.1.0’ + +*** ‘guix package --search’ now sorts packages by name and version + +*** Substitute information is now fetched using HTTP pipelining + +Before that the “substituter” used threads. Using HTTP pipelining means that +resource consumption is reduced on both the client and server sides. As a +side effect, a progress report is displayed as substitute info is downloaded. + +*** ‘guix package’ warns when a $GUIX_PACKAGE_PATH module cannot be loaded + +*** New ‘--sources’ option to ‘guix build’ + +*** New Bash completion file, installed in $sysconfdir/bash_completion.d + +*** New ‘guix import hackage’ command + +See “Invoking guix import” in the manual. + +*** ‘guix lint’ supports FTP for the ‘source’ and ‘home-page’ checkers + +*** ‘guix lint’ has a new ‘derivation’ checker + +*** ‘guix import cpan’ better handles dependencies and licenses + +*** Packages are now build in an environment with a UTF-8 locale + +** Distribution + +*** C library's name service switch (NSS) is now fully configurable + +See “Name Service Switch” in the manual. + +*** New services: wicd, lirc, colord, upower, console-keymap, postgresql + +*** Xorg service supports new drivers, such as Nouveau + +*** lsh service has new options, initializes its seed by default + +*** /etc/ssl symlink is created, for X.509 certificates + +See “X.509 Certificates” in the manual. + +*** ‘guix system’ reports duplicate service identifiers + +*** New /etc/bashrc file that loads Bash completion when available + +*** SLiM service uses sessions from /run/current-system/profile/share/xsessions + +See “X Window” in the manual. + +*** The Linux “YAMA” restricting policy on PTRACE_ATTACH is now disabled + +*** /etc/shells now lists all the user accounts’ shells + +*** /gnu/store is now remounted read-only, to avoid accidental modification + +*** /etc/profile is sources each profile’s ‘etc/profile’ file + +*** 718 new packages + +aalib, aarddict, acpid, agg, aisleriot, alsa-modular-synth, ant, ardour, +ardour, argtable, arpack-ng, aspell-dict-ru, aubio, audacity, avidemux, +avidemux, azr3, bamtools, bash-completion, bedops, bind-utils, bluez, bool, +brdf-explorer, bwa, calf, calibre, catch, ccl, chibi-scheme, chmlib, +clalsadrv, clipper, clisp, clustal-omega, colord, colordiff, cpufrequtils, +crossmap, csound, ctl, cunit, cutadapt, desktop-file-utils, djvulibre, +dnsmasq, dosfstools, double-conversion, dovecot, ecl, efl, elementary, +elogind, emacs-no-x, emotion-generic-players, enca, enlightenment, +evas-generic-loaders, exim, express, extremetuxracer, faad2, fastx-toolkit, +fcitx, fdupes, flexbar, fluidsynth, font-adobe-source-han-sans, +font-wqy-zenhei, freepats, gambit-c, ganv, geda-gaf, geoclue, geocode-glib, +ghc, ghc-case-insensitive, ghc-containers, ghc-fgl, ghc-hashable, ghc-http, +ghc-hunit, ghc-mtl, ghc-network, ghc-network-uri, ghc-parallel, ghc-parsec, +ghc-paths, ghc-primitive, ghc-quickcheck, ghc-random, ghc-split, ghc-stm, +ghc-syb, ghc-text, ghc-tf-random, ghc-unordered-containers, ghc-vector, +ghc-zlib, girara, gitolite, glib-networking, glibc-locales, +glibc-utf8-locales, glibc-utf8-locales, glm, gnome-mines, +gnome-settings-daemon, gnome-terminal, gnucash, gnugo, grit, gst-libav, +guile-minikanren, guile-reader, hdparm, hisat, htseq, htsjdk, hunspell, +hyphen, i2c-tools, ibus, icecast, icedtea6, icedtea7, ilmbase, ir, isync, +ixion, jack2, jalv, jansson, jemalloc, julia, key-mon, ladspa, lash, +leptonica, liba52, libabw, libaio, libass, libavc1394, libbluray, libbs2b, +libcaca, libcap-ng, libcdio-paranoia, libcdr, libdca, libdv, libdvdcss, +libe-book, libedit, libepoxy, libetonyek, libexttextcat, libffcall, +libfreehand, libgnomecanvasmm, libgtextutils, libgweather, libical, +libiec61883, libinput, liblo, libmodplug, libmspack, libmspub, libmtp, +libmwaw, libodfgen, libpagemaker, libqtxdg, libquvi, libquvi-scripts, +libraw1394, librecad, librep, librevenge, libsbsms, libsecret, libshout, +libsoup, libsrtp, libtocc, libungif, libva, libvisio, libwacom, libwebp, +libwpd, libwpg, libwps, libxklavier, libxmp, libyaml, lilv, lilypond, lirc, +livestreamer, ltrace, lv2, lv2-mda-epiano, lv2-mda-piano, lvtk, macs, mariadb, +markdown, mdadm, mdds, mesa-headers, mesa-utils, miredo, miso, moreutils, +mpd-mpc, mpdscribble, mplayer2, mpv, muparser, mythes, ncbi-vdb, ngircd, +ngs-java, ngs-sdk, npth, nss-certs, openblas, openexr, openlibm, openntpd, +openspecfun, openvpn, orc, orcus, p11-kit, patchage, pbtranscript-tofu, pcb, +perl-algorithm-c3, perl-algorithm-diff, perl-aliased, +perl-apache-logformat-compiler, perl-appconfig, perl-b-hooks-endofscope, +perl-base, perl-bit-vector, perl-boolean, perl-cache-cache, +perl-cache-fastmmap, perl-capture-tiny, perl-carp-assert, +perl-carp-assert-more, perl-carp-clan, perl-catalyst-action-renderview, +perl-catalyst-action-rest, perl-catalyst-component-instancepercontext, +perl-catalyst-devel, perl-catalyst-dispatchtype-regex, +perl-catalyst-model-dbic-schema, perl-catalyst-plugin-accesslog, +perl-catalyst-plugin-authentication, perl-catalyst-plugin-captcha, +perl-catalyst-plugin-configloader, perl-catalyst-plugin-session, +perl-catalyst-plugin-session-state-cookie, +perl-catalyst-plugin-session-store-fastmmap, perl-catalyst-plugin-stacktrace, +perl-catalyst-plugin-static-simple, perl-catalyst-runtime, +perl-catalyst-traitfor-request-proxybase, perl-catalyst-view-download, +perl-catalyst-view-json, perl-catalyst-view-tt, +perl-catalystx-component-traits, perl-catalystx-roleapplicator, +perl-catalystx-script-server-starman, perl-cgi-simple, perl-cgi-struct, +perl-class-accessor, perl-class-accessor-chained, perl-class-accessor-grouped, +perl-class-c3, perl-class-c3-adopt-next, perl-class-c3-componentised, +perl-class-data-inheritable, perl-class-date, perl-class-factory-util, +perl-class-inspector, perl-class-load, perl-class-load-xs, +perl-class-method-modifiers, perl-class-methodmaker, perl-class-singleton, +perl-class-tiny, perl-class-unload, perl-class-xsaccessor, perl-common-sense, +perl-compress-raw-bzip2, perl-compress-raw-zlib, perl-config-any, +perl-config-autoconf, perl-config-general, perl-context-preserve, +perl-cpan-meta, perl-cpan-meta-check, perl-cpan-meta-requirements, +perl-cpan-meta-yaml, perl-cpanel-json-xs, perl-crypt-randpasswd, +perl-data-dump, perl-data-dumper-concise, perl-data-optlist, perl-data-page, +perl-data-stream-bulk, perl-data-tumbler, perl-data-visitor, perl-date-calc, +perl-date-calc-xs, perl-datetime, perl-datetime-event-ical, +perl-datetime-event-recurrence, perl-datetime-format-builder, +perl-datetime-format-flexible, perl-datetime-format-http, +perl-datetime-format-ical, perl-datetime-format-natural, +perl-datetime-format-strptime, perl-datetime-locale, perl-datetime-set, +perl-datetime-timezone, perl-datetimex-easy, perl-dbd-pg, perl-dbix-class, +perl-dbix-class-cursor-cached, perl-dbix-class-introspectablem2m, +perl-dbix-class-schema-loader, perl-devel-caller, perl-devel-checkbin, +perl-devel-globaldestruction, perl-devel-lexalias, perl-devel-overloadinfo, +perl-devel-partialdump, perl-devel-stacktrace, perl-devel-stacktrace-ashtml, +perl-devel-symdump, perl-digest-hmac, perl-digest-md5-file, +perl-dist-checkconflicts, perl-email-abstract, perl-email-address, +perl-email-date-format, perl-email-messageid, perl-email-mime, +perl-email-mime-contenttype, perl-email-mime-encodings, perl-email-sender, +perl-email-simple, perl-error, perl-eval-closure, perl-exception-class, +perl-exporter-tiny, perl-extutils-config, perl-extutils-helpers, +perl-extutils-installpaths, perl-file-changenotify, perl-file-copy-recursive, +perl-file-find-rule, perl-file-find-rule-perl, perl-file-homedir, +perl-file-remove, perl-file-sharedir, perl-file-sharedir-install, +perl-file-slurp, perl-file-temp, perl-gd, perl-gd-securityimage, +perl-getopt-long-descriptive, perl-hash-merge, perl-hash-multivalue, +perl-html-form, perl-html-lint, perl-html-tree, perl-http-body, +perl-http-cookiejar, perl-http-parser, perl-http-parser-xs, +perl-http-request-ascgi, perl-http-server-simple, perl-http-tiny, +perl-image-magick, perl-import-into, perl-inc-latest, perl-io-compress, +perl-io-interactive, perl-io-socket-ip, perl-io-stringy, perl-ipc-run, +perl-ipc-sharelite, perl-json, perl-json-any, perl-json-maybexs, perl-json-xs, +perl-lingua-en-findnumber, perl-lingua-en-inflect, +perl-lingua-en-inflect-number, perl-lingua-en-inflect-phrase, +perl-lingua-en-number-isordinal, perl-lingua-en-tagger, +perl-lingua-en-words2nums, perl-lingua-pt-stemmer, perl-lingua-stem, +perl-lingua-stem-fr, perl-lingua-stem-it, perl-lingua-stem-ru, +perl-lingua-stem-snowball-da, perl-list-allutils, perl-list-moreutils, +perl-lwp-protocol-https, perl-lwp-useragent-determined, +perl-memoize-expirelru, perl-mime-types, perl-module-build, +perl-module-build-tiny, perl-module-find, perl-module-implementation, +perl-module-install, perl-module-runtime, perl-module-runtime-conflicts, +perl-module-scandeps, perl-module-util, perl-moo, perl-moose, +perl-moosex-emulate-class-accessor-fast, perl-moosex-getopt, +perl-moosex-markasmethods, perl-moosex-methodattributes, perl-moosex-nonmoose, +perl-moosex-params-validate, perl-moosex-relatedclassroles, +perl-moosex-role-parameterized, perl-moosex-role-withoverloading, +perl-moosex-semiaffordanceaccessor, perl-moosex-strictconstructor, +perl-moosex-traits-pluggable, perl-moosex-types, perl-moosex-types-datetime, +perl-moosex-types-datetime-morecoercions, perl-moosex-types-loadableclass, +perl-moox-types-mooselike, perl-mro-compat, perl-namespace-autoclean, +perl-namespace-clean, perl-net-amazon-s3, perl-net-server, +perl-number-compare, perl-object-signature, perl-package-anon, +perl-package-deprecationmanager, perl-package-stash, perl-package-stash-xs, +perl-padwalker, perl-par-dist, perl-params-util, perl-params-validate, +perl-parent, perl-parse-cpan-meta, perl-path-class, perl-plack, +perl-plack-middleware-fixmissingbodyinredirect, +perl-plack-middleware-methodoverride, +perl-plack-middleware-removeredundantbody, perl-plack-middleware-reverseproxy, +perl-plack-test-externalserver, perl-pod-coverage, +perl-posix-strftime-compiler, perl-readonly, perl-role-tiny, perl-safe-isa, +perl-scalar-list-utils, perl-scope-guard, perl-set-infinite, perl-set-scalar, +perl-snowball-norwegian, perl-snowball-swedish, perl-spiffy, +perl-sql-abstract, perl-sql-splitstatement, perl-sql-tokenizer, +perl-stream-buffered, perl-strictures, perl-string-camelcase, +perl-string-rewriteprefix, perl-string-toidentifier-en, perl-sub-exporter, +perl-sub-exporter-progressive, perl-sub-identify, perl-sub-install, +perl-sub-name, perl-sub-uplevel, perl-svg, perl-sys-hostname-long, +perl-task-weaken, perl-template-timer, perl-template-toolkit, +perl-term-encoding, perl-term-progressbar, perl-term-progressbar-quiet, +perl-term-progressbar-simple, perl-term-readkey, perl-test-base, +perl-test-cleannamespaces, perl-test-differences, perl-test-directory, +perl-test-exception, perl-test-fatal, perl-test-harness, perl-test-leaktrace, +perl-test-longstring, perl-test-mockobject, perl-test-mocktime, +perl-test-most, perl-test-output, perl-test-pod, perl-test-pod-coverage, +perl-test-requires, perl-test-sharedfork, perl-test-tcp, perl-test-trap, +perl-test-utf8, perl-test-warn, perl-test-warnings, perl-test-without-module, +perl-test-writevariants, perl-test-www-mechanize, +perl-test-www-mechanize-catalyst, perl-test-www-mechanize-psgi, +perl-test-yaml, perl-text-aligner, perl-text-balanced, perl-text-csv, +perl-text-diff, perl-text-german, perl-text-glob, perl-text-simpletable, +perl-text-table, perl-text-unidecode, perl-throwable, perl-tie-ixhash, +perl-tie-toobject, perl-time-duration, perl-time-duration-parse, +perl-time-local, perl-time-mock, perl-timedate, perl-tree-simple, +perl-tree-simple-visitorfactory, perl-try-tiny, perl-types-serialiser, +perl-universal-can, perl-universal-isa, perl-uri-find, perl-uri-ws, +perl-variable-magic, perl-www-mechanize, perl-xml-libxml, +perl-xml-namespacesupport, perl-xml-sax, perl-xml-sax-base, perl-yaml, +perl-yaml-tiny, ploticus, polipo, portaudio, pumpa, python-apsw, +python-biopython, python-cssselect, python-dbus, python-decorator, +python-drmaa, python-h5py, python-lxml, python-netifaces, python-networkx, +python-pyxdg, python-pyyaml, python-requests, python-scikit-learn, +python-singledispatch, python-sphinx-rtd-theme, python-sympy, python-testlib, +python-tornado, python-urwid, python-waf, python2-apsw, +python2-backport-ssl-match-hostname, python2-biopython, python2-bx-python, +python2-cssselect, python2-cssutils, python2-dbus, python2-decorator, +python2-drmaa, python2-h5py, python2-lxml, python2-netifaces, +python2-networkx, python2-pbcore, python2-pil, python2-pybedtools, +python2-pycairo, python2-pyxdg, python2-pyyaml, python2-rdflib, python2-rsvg, +python2-scikit-learn, python2-singledispatch, python2-six, +python2-sphinx-rtd-theme, python2-sympy, python2-testlib, python2-tornado, +python2-urwid, python2-waf, python2-xlib, quvi, r, rdesktop, recode, rep-gtk, +rseqc, rsound, rubberband, ruby-hoe, rxvt-unicode, s2tc, sawfish, sbcl, seqan, +serd, serf, sfml, shogun, sloccount, smartmontools, snakemake, soil, solfege, +sord, soundtouch, soxr, sra-tools, sratom, srt2vtt, star, starman, stow, +subread, suil, suitesparse, swt, sysfsutils, sysfsutils, taskwarrior, tbb, +terminology, tesseract-ocr, texlive-bin, texlive-texmf, the-silver-searcher, +tidy, tig, timidity++, tocc, totem-pl-parser, tree, tuxguitar, tvtime, +twolame, txt2man, unqlite, upower, utf8proc, vamp, vapoursynth, vcftools, +vigra, wavpack, webkitgtk, webkitgtk, weex, wicd, wpa-supplicant-light, +wxwidgets, wxwidgets, xbindkeys, xcape, xdg-utils, xf86-input-libinput, +xf86-input-wacom, xf86-video-nouveau, xfce, xmp, xosd, xournal, xvid, zathura, +zathura-cb, zathura-djvu, zathura-pdf-poppler, zathura-ps, zeromq, +zita-alsa-pcmi, zita-convolver + +*** 189 package updates + +acpica-20150410, apl-1.5, apr-1.5.2, arb-2.3.0, at-spi2-atk-2.16.0, +at-spi2-core-2.16.0, atk-2.16.0, autogen-5.18.5, bison-3.0.4, boost-1.57.0, +cairo-1.14.2, ccrtp-2.1.2, check-0.9.14, clang-3.6.0, cmake-3.2.2, +complexity-1.2, cups-filters-1.0.68, curl-7.42.1, dbus-1.8.16, +dbus-glib-0.104, dejagnu-1.5.3, docbook-xml-4.4, docbook-xml-4.5, +e2fsck-static-1.42.12, e2fsprogs-1.42.12, ed-1.11, eigen-3.2.4, +elfutils-0.161, emacs-24.5, emacs-no-x-toolkit-24.5, exo-0.10.3, ffmpeg-2.6.2, +fish-2.1.2, flac-1.3.1, flint-2.4.5, fltk-1.3.3, freetype-2.5.5, garcon-0.4.0, +gcc-5.1.0, gcc-toolchain-5.1.0, gdb-7.9, geiser-0.7, glib-2.44.0, glibc-2.21, +glibc-2.21, glibc-stripped-tarball-2.21, glibmm-2.44.0, global-6.4, +gnome-desktop-3.16.0, gnome-icon-theme-3.12.0, gnome-themes-standard-3.16.0, +gnu-pw-mgr-1.3, gnubik-2.4.2, gnumach-headers-1.5, gnunet-0.10.1, +gnupg-1.4.19, gnupg-2.0.27, gnupg-2.1.4, gnutls-3.4.0, +gobject-introspection-1.44.0, gpgme-1.5.4, gsettings-desktop-schemas-3.16.0, +gst-plugins-base-1.4.5, gst-plugins-good-1.4.5, gstreamer-1.4.5, gtk+-3.16.2, +gtkmm-2.24.4, gtkmm-3.16.0, guile-ssh-0.7.2, guix-0.8.1, guix-0.8.1.fc34dee, +help2man-1.46.6, httpd-2.4.12, hurd-headers-0.6, icecat-31.6.0-gnu1, +icu4c-55.1, imagemagick-6.9.0-4, imlib2-1.4.7, inetutils-1.9.3, inkscape-0.91, +isc-dhcp-4.3.1, itstool-2.0.2, kbd-2.0.2, libgcrypt-1.6.3, libgpg-error-1.18, +libidn-1.30, libltdl-2.4.6, libmicrohttpd-0.9.40, libmikmod-3.3.7, +libotr-4.1.0, libsigc++-2.4.1, libtasn1-4.5, libtool-2.4.6, +libunistring-0.9.5, libuv-1.4.2, libvorbis-1.3.5, libxfce4ui-4.12.0, +libxfce4util-4.12.1, libxfont-1.5.1, lightning-2.1.0, linux-libre-4.0.2, +linux-libre-headers-3.14.37, llvm-3.6.0, lua-5.2.3, man-pages-3.82, +mesa-10.5.4, mig-1.5, minetest-0.4.12, moe-1.7, mpc-1.0.3, mpd-0.19.9, +mu-0.9.12, nano-2.4.1, ncmpcpp-0.6.2, nettle-3.1, nginx-1.8.0, node-0.12.2, +notmuch-0.19, nspr-4.10.8, nss-3.18, ntp-4.2.8p2, ocrad-0.25, octave-3.8.2, +openconnect-7.05, openjpeg-2.0.1, openjpeg-2.1.0, openldap-2.4.40, +openssh-6.8p1, openssl-1.0.2a, pangomm-2.36.0, parallel-20150422, +pari-gp-2.7.3, patch-2.7.5, perf-4.0.2, perl-libwww-6.13, perl-net-http-6.07, +perl-net-ssleay-1.68, perl-test-simple-1.001014, perl-uri-1.67, +pinentry-0.9.0, pius-2.0.11, podofo-0.9.3, poppler-0.32.0, postgresql-9.3.6, +pulseaudio-6.0, python-3.4.3, python-pillow-2.7.0, python-pygobject-3.16.1, +python-setuptools-12.1, python-wrapper-3.4.3, python2-dateutil-2.2, +python2-pillow-2.7.0, python2-pygobject-3.16.1, python2-setuptools-12.1, +qt-5.4.1, ruby-2.2.2, samba-3.6.25, scons-2.3.4, sdl2-2.0.3, sharutils-4.15.1, +sipwitch-1.9.7, slock-1.2, source-highlight-3.1.8, sqlite-3.8.9, +subversion-1.8.13, texinfo-5.2, thunar-1.6.6, thunar-volman-0.8.1, +tor-0.2.5.12, tumbler-0.1.31, tzdata-2015c, ucommon-6.3.1, vala-0.28.0, +valgrind-3.10.1, vlc-2.2.0, vte-0.40.0, wget-1.16.3, wine-1.7.40, +wpa-supplicant-2.4, xboard-4.8.0, xfce4-appfinder-4.12.0, xfce4-panel-4.12.0, +xfce4-session-4.12.0, xfce4-settings-4.12.0, xfconf-4.12.0, xfdesktop-4.12.0, +xfwm4-4.12.0, xorg-server-1.16.4, xterm-317 + +** Programming interfaces + +*** New (guix build gremlin) to parse and validate ELF dynamic link info + +*** (guix build-system gnu) has a new ‘validate-runpath’ phase + +This phase reads the dynamic entries of ELF files and reports libraries listed +as NEEDED that are not found in the RUNPATH. + +*** New (gnu services desktop) module and ‘%desktop-services’ variable + +*** New (guix cvs-download) module, for CVS checkouts + +*** New (guix build-system waf) module, for the Waf build system + +*** New (guix build-system haskell) module, to build Haskell packages + +*** (guix build-system gnu) now supports zip archives + +*** New convenience syntax ‘modify-phases’ added in (guix build utils) + +*** The ‘ld’ wrapper more finely determines whether to use ‘-rpath’ + +*** (guix gexp) exports ‘gexp-input’ to describe input unambiguously + +*** The ‘define-gexp-compiler’ form allows (guix gexp) to be extended + +*** New ‘local-file’ constructor exported by (guix gexp) + +** Noteworthy bug fixes + +*** Profiles created with ‘guix package -p’ as indirect GC roots + +Before that they were made permanent GC roots–i.e., uncollectable. + +*** ‘guix package’ distinguishes downgrades from upgrades + +*** Handle HTTP redirects to relative URI references + (<http://bugs.gnu.org/19840>) + +*** Downloads now honor the ‘http_proxy’ environment variable + (<http://bugs.gnu.org/20402>) + +*** ‘--no-*’ options are now always correctly handled + (<http://lists.gnu.org/archive/html/guix-devel/2015-02/msg00702.html>) + +*** SLiM no longer leaks open file descriptors + +*** Don't compare <pam-service> objects with 'equal?' + (<http://bugs.gnu.org/20037>) + +*** x86_64 and i686 bootstrap binaries updated (<http://bugs.gnu.org/19780>) + +*** ‘find-files’ no longer follows symlinks (<http://bugs.gnu.org/20081>) + +*** libc message catalog (‘libc.mo’) is now installed + +*** libstdc++ has appropriate RUNPATH (<http://bugs.gnu.org/20358>) + +*** ‘dhcp-client-service’ now correctly tracks dhclient’s PID + +** Native language support + +*** New translations: da (Danish) + +*** Updated translations: eo + * Changes in 0.8.1 (since 0.8) ** Package management @@ -20,8 +20,9 @@ Guix is based on the [[http://nixos.org/nix/][Nix]] package manager. GNU Guix currently depends on the following packages: - - [[http://gnu.org/software/guile/][GNU Guile 2.0.x]], version 2.0.5 or later + - [[http://gnu.org/software/guile/][GNU Guile 2.0.x]], version 2.0.7 or later - [[http://gnupg.org/][GNU libgcrypt]] + - [[http://www.gnu.org/software/make/][GNU Make]] - optionally [[http://savannah.nongnu.org/projects/guile-json/][Guile-JSON]], for the 'guix import pypi' command - optionally [[http://www.gnutls.org][GnuTLS]] compiled with guile support enabled, for HTTPS support in the 'guix download' command. Note that 'guix import pypi' requires @@ -29,7 +29,9 @@ infrastructure help: Yutaka Niibe <gniibe@fsij.org> Andrei Osipov <andrspv@gmail.com> Adam Pribyl <pribyl@lowlevel.cz> + Pjotr Prins <pjotr.public12@thebird.nl> rekado <rekado@elephly.net> + Joshua Randall <jcrandall@alum.mit.edu> Bruno Félix Rezende Ribeiro <oitofelix@gnu.org> Cyrill Schenkel <cyrill.schenkel@gmail.com> Benno Schulenberg <coordinator@translationproject.org> diff --git a/build-aux/check-available-binaries.scm b/build-aux/check-available-binaries.scm index bc6207eb2a..04f88b7d0c 100644 --- a/build-aux/check-available-binaries.scm +++ b/build-aux/check-available-binaries.scm @@ -33,7 +33,7 @@ (let* ((native (append-map (lambda (system) (map (cut package-derivation store <> system) (list %bootstrap-tarballs emacs))) - %supported-systems)) + %hydra-supported-systems)) (cross (map (cut package-cross-derivation store %bootstrap-tarballs <>) '("mips64el-linux-gnuabi64"))) diff --git a/build-aux/check-final-inputs-self-contained.scm b/build-aux/check-final-inputs-self-contained.scm index ba85c876d2..9b791f2e2d 100644 --- a/build-aux/check-final-inputs-self-contained.scm +++ b/build-aux/check-final-inputs-self-contained.scm @@ -77,5 +77,5 @@ refer to the bootstrap tools." (set-build-options store #:use-substitutes? #t) (for-each (cut test-final-inputs store <>) - %supported-systems))) + %hydra-supported-systems))) diff --git a/build-aux/hydra/gnu-system.scm b/build-aux/hydra/gnu-system.scm index cfef7dc425..8d9b43c0b0 100644 --- a/build-aux/hydra/gnu-system.scm +++ b/build-aux/hydra/gnu-system.scm @@ -54,6 +54,7 @@ (gnu packages multiprecision) (gnu packages make-bootstrap) (gnu packages commencement) + (gnu packages package-management) (gnu system) (gnu system vm) (gnu system install) @@ -158,9 +159,33 @@ system.") (set-guile-for-build (default-guile)) (system-disk-image installation-os #:disk-image-size - (* 800 MiB)))))) + (* 860 MiB)))))) '())) +(define (tarball-jobs store system) + "Return Hydra jobs to build the self-contained Guix binary tarball." + (define (->alist drv) + `((derivation . ,(derivation-file-name drv)) + (description . "Stand-alone binary Guix tarball") + (long-description . "This is a tarball containing binaries of Guix and +all its dependencies, and ready to be installed on non-GuixSD distributions.") + (license . ,gpl3+) + (home-page . ,%guix-home-page-url) + (maintainers . ("bug-guix@gnu.org")))) + + (define (->job name drv) + (let ((name (symbol-append name (string->symbol ".") + (string->symbol system)))) + `(,name . ,(cut ->alist drv)))) + + ;; XXX: Add a job for the stable Guix? + (list (->job 'binary-tarball + (run-with-store store + (mbegin %store-monad + (set-guile-for-build (default-guile)) + (self-contained-tarball)) + #:system system)))) + (define job-name ;; Return the name of a package's job. (compose string->symbol package-full-name)) @@ -179,8 +204,7 @@ system.") valid." (cond ((member package base-packages) #f) - ((member system - (package-transitive-supported-systems package)) + ((supported-package? package system) (package-job store (job-name package) package system)) (else #f))))) @@ -234,6 +258,7 @@ valid." (cons job result) result))) (append (qemu-jobs store system) + (tarball-jobs store system) (cross-jobs system)))) ((core) ;; Build core packages only. @@ -244,4 +269,4 @@ valid." (cross-jobs system))) (else (error "unknown subset" subset)))) - %supported-systems)) + %hydra-supported-systems)) diff --git a/build-aux/hydra/guix.scm b/build-aux/hydra/guix.scm index 3996a0b422..1035f81b4a 100644 --- a/build-aux/hydra/guix.scm +++ b/build-aux/hydra/guix.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -68,25 +68,10 @@ (home-page . ,(package-home-page package)) (maintainers . ("bug-guix@gnu.org")))) -(define (tarball-package checkout nix-checkout) +(define (tarball-package checkout) "Return a package that does `make distcheck' from CHECKOUT, a directory containing a Git checkout of Guix." - (let ((dist (dist-package guix checkout))) - (package (inherit dist) - (location (source-properties->location (current-source-location))) - (arguments (substitute-keyword-arguments (package-arguments dist) - ((#:phases p) - `(alist-cons-before - 'autoreconf 'set-nix-submodule - (lambda _ - ;; Tell Git to use the Nix checkout that Hydra gave us. - (zero? - (system* "git" "config" "submodule.nix-upstream.url" - ,nix-checkout))) - ,p)))) - (native-inputs `(("git" ,git) - ("graphviz" ,graphviz) - ,@(package-native-inputs dist)))))) + (dist-package guix checkout)) (define (hydra-jobs store arguments) "Return Hydra jobs." @@ -104,13 +89,9 @@ containing a Git checkout of Guix." (define guix-checkout (assq-ref arguments 'guix)) - (define nix-checkout - (assq-ref arguments 'nix)) - - (format (current-error-port) "using checkout ~s (Nix: ~s)~%" - guix-checkout nix-checkout) - (let ((guix (assq-ref guix-checkout 'file-name)) - (nix (assq-ref nix-checkout 'file-name))) + (let ((guix (assq-ref guix-checkout 'file-name))) + (format (current-error-port) "using checkout ~s (~s)~%" + guix-checkout guix) `((tarball . ,(cute package->alist store - (tarball-package guix nix) + (tarball-package guix) (%current-system)))))) diff --git a/build-aux/list-packages.scm b/build-aux/list-packages.scm index f3e4ac2846..c4f445291b 100755 --- a/build-aux/list-packages.scm +++ b/build-aux/list-packages.scm @@ -167,7 +167,11 @@ decreasing, is 1." ,system)) `(div "status: " - ,(list-join (map url (package-transitive-supported-systems package)) + ,(list-join (map url + (lset-intersection + string=? + %hydra-supported-systems + (package-transitive-supported-systems package))) " "))) (define (package-logo name) diff --git a/build-aux/make-binary-tarball.scm b/build-aux/make-binary-tarball.scm new file mode 100644 index 0000000000..e12bec476c --- /dev/null +++ b/build-aux/make-binary-tarball.scm @@ -0,0 +1,47 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + + +;;; +;;; Build a self-contained tarball containing binaries for Guix and its +;;; dependencies. +;;; + +(use-modules (guix) + (guix ui) + (gnu system install) + (ice-9 match)) + +(define copy-file* + (lift2 copy-file %store-monad)) + +(define rename-file* + (lift2 rename-file %store-monad)) + +(match (command-line) + ((_ system file) + (with-store store + (run-with-store store + (mlet %store-monad ((tarball (self-contained-tarball))) + (mbegin %store-monad + (show-what-to-build* (list tarball)) + (built-derivations (list tarball)) + (copy-file* (derivation->output-path tarball) + (string-append file ".part")) + (rename-file* (string-append file ".part") file))) + #:system system)))) diff --git a/config-daemon.ac b/config-daemon.ac index 5f83d45a4c..a6cf29ca42 100644 --- a/config-daemon.ac +++ b/config-daemon.ac @@ -5,9 +5,12 @@ AC_MSG_RESULT([$guix_build_daemon]) dnl C++ environment. This macro must be used unconditionnaly. AC_PROG_CXX +AC_LANG([C++]) if test "x$guix_build_daemon" = "xyes"; then + GUIX_ASSERT_CXX11 + AC_PROG_RANLIB AC_CONFIG_HEADER([nix/config.h]) @@ -133,8 +136,8 @@ if test "x$guix_build_daemon" = "xyes"; then AC_CONFIG_FILES([nix/scripts/list-runtime-roots], [chmod +x nix/scripts/list-runtime-roots]) - AC_CONFIG_FILES([nix/scripts/substitute-binary], - [chmod +x nix/scripts/substitute-binary]) + AC_CONFIG_FILES([nix/scripts/substitute], + [chmod +x nix/scripts/substitute]) AC_CONFIG_FILES([nix/scripts/guix-authenticate], [chmod +x nix/scripts/guix-authenticate]) AC_CONFIG_FILES([nix/scripts/offload], diff --git a/configure.ac b/configure.ac index f2f803a2cd..6979752d16 100644 --- a/configure.ac +++ b/configure.ac @@ -7,7 +7,10 @@ AC_INIT([GNU Guix], [0.8.2], [bug-guix@gnu.org], [guix], AC_CONFIG_AUX_DIR([build-aux]) AM_INIT_AUTOMAKE([1.12 gnu silent-rules subdir-objects \ - color-tests parallel-tests -Woverride]) + color-tests parallel-tests -Woverride -Wno-portability]) + +# Enable silent rules by default. +AM_SILENT_RULES([yes]) AC_CONFIG_SRCDIR([guix.scm]) AC_CONFIG_MACRO_DIR([m4]) @@ -31,6 +34,13 @@ AC_ARG_WITH(store-dir, [storedir="/gnu/store"]) AC_SUBST(storedir) +AC_ARG_WITH([bash-completion-dir], + AC_HELP_STRING([--with-bash-completion-dir=DIR], + [name of the Bash completion directory]), + [bashcompletiondir="$withval"], + [bashcompletiondir='${sysconfdir}/bash_completion.d']) +AC_SUBST([bashcompletiondir]) + dnl Better be verbose. AC_MSG_CHECKING([for the store directory]) AC_MSG_RESULT([$storedir]) @@ -57,7 +67,7 @@ dnl Make sure they are available. m4_pattern_forbid([PKG_CHECK_MODULES]) m4_pattern_forbid([GUILE_MODULE_AVAILABLE]) -PKG_CHECK_MODULES([GUILE], [guile-2.0 >= 2.0.5]) +PKG_CHECK_MODULES([GUILE], [guile-2.0 >= 2.0.7]) AC_PATH_PROG([GUILE], [guile]) AC_PATH_PROG([GUILD], [guild]) if test "x$GUILD" = "x"; then @@ -25,8 +25,8 @@ CLEANFILES += $(BUILT_SOURCES) noinst_LIBRARIES = libformat.a libutil.a libstore.a -# Use '-std=c++0x' for 'std::shared_ptr'. -AM_CXXFLAGS = -Wall -std=c++0x +# Use '-std=c++11' for 'std::shared_ptr', 'auto', lambdas, and more. +AM_CXXFLAGS = -Wall -std=c++11 libformat_a_SOURCES = \ nix/boost/format/free_funcs.cc \ @@ -112,7 +112,8 @@ libstore_a_CPPFLAGS = \ -DNIX_CONF_DIR=\"$(sysconfdir)/guix\" \ -DNIX_LIBEXEC_DIR=\"$(libexecdir)\" \ -DNIX_BIN_DIR=\"$(bindir)\" \ - -DOPENSSL_PATH="\"guix-authenticate\"" + -DOPENSSL_PATH="\"guix-authenticate\"" \ + -DDEFAULT_CHROOT_DIRS="\"\"" libstore_a_CXXFLAGS = $(AM_CXXFLAGS) \ $(SQLITE3_CFLAGS) $(LIBGCRYPT_CFLAGS) @@ -165,7 +166,7 @@ nix/libstore/schema.sql.hh: nix/libstore/schema.sql nodist_pkglibexec_SCRIPTS = \ nix/scripts/list-runtime-roots \ - nix/scripts/substitute-binary + nix/scripts/substitute if BUILD_DAEMON_OFFLOAD @@ -1,5 +1,5 @@ # GNU Guix --- Functional package management for GNU -# Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org> +# Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> # Copyright © 2013 Andreas Enge <andreas@enge.fr> # # This file is part of GNU Guix. @@ -25,12 +25,16 @@ EXTRA_DIST += \ doc/images/bootstrap-graph.eps \ doc/images/bootstrap-graph.pdf +OS_CONFIG_EXAMPLES_TEXI = \ + doc/os-config-bare-bones.texi \ + doc/os-config-desktop.texi + # Bundle this file so that makeinfo finds it in out-of-source-tree builds. -BUILT_SOURCES += doc/os-config.texi -EXTRA_DIST += doc/os-config.texi -MAINTAINERCLEANFILES = doc/os-config.texi +BUILT_SOURCES += $(OS_CONFIG_EXAMPLES_TEXI) +EXTRA_DIST += $(OS_CONFIG_EXAMPLES_TEXI) +MAINTAINERCLEANFILES = $(OS_CONFIG_EXAMPLES_TEXI) -doc/os-config.texi: gnu/system/os-config.tmpl +doc/os-config-%.texi: gnu/system/examples/%.tmpl $(MKDIR_P) "`dirname "$@"`" cp "$<" "$@" diff --git a/doc/guix.texi b/doc/guix.texi index 17365036e8..9bd9c581ce 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -12,7 +12,8 @@ @copying Copyright @copyright{} 2012, 2013, 2014, 2015 Ludovic Courtès@* Copyright @copyright{} 2013, 2014 Andreas Enge@* -Copyright @copyright{} 2013 Nikita Karetnikov +Copyright @copyright{} 2013 Nikita Karetnikov@* +Copyright @copyright{} 2015 Taylan Ulrich Bayırlı/Kammer Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -82,6 +83,7 @@ package management tool written for the GNU system. Installation +* Binary Installation:: Getting Guix running in no time! * Requirements:: Software needed to build and run Guix. * Running the Test Suite:: Testing Guix. * Setting Up the Daemon:: Preparing the build daemon's environment. @@ -121,6 +123,7 @@ Utilities * Invoking guix refresh:: Updating package definitions. * Invoking guix lint:: Finding errors in package definitions. * Invoking guix environment:: Setting up development environments. +* Invoking guix publish:: Sharing substitutes. GNU Distribution @@ -143,6 +146,7 @@ System Configuration * Locales:: Language and cultural convention settings. * Services:: Specifying system services. * Setuid Programs:: Programs running with root privileges. +* X.509 Certificates:: Authenticating HTTPS servers. * Name Service Switch:: Configuring libc's name service switch. * Initial RAM Disk:: Linux-Libre bootstrapping. * GRUB Configuration:: Configuring the boot loader. @@ -154,6 +158,9 @@ Services * Base Services:: Essential system services. * Networking Services:: Network setup, SSH daemon, etc. * X Window:: Graphical display. +* Desktop Services:: D-Bus and desktop services. +* Database Services:: SQL databases. +* Various Services:: Other services. Packaging Guidelines @@ -211,11 +218,11 @@ Guix has a command-line interface, which allows users to build, install, upgrade, and remove packages, as well as a Scheme programming interface. @cindex Guix System Distribution -@cindex GSD +@cindex GuixSD Last but not least, Guix is used to build a distribution of the GNU system, with many GNU and non-GNU free software packages. The Guix -System Distribution, or GNU@tie{}GSD, takes advantage of the core -properties of Guix at the system level. With GNU@tie{}GSD, users +System Distribution, or GNU@tie{}GuixSD, takes advantage of the core +properties of Guix at the system level. With GuixSD, users @emph{declare} all aspects of the operating system configuration, and Guix takes care of instantiating that configuration in a reproducible, stateless fashion. @xref{GNU Distribution}. @@ -234,25 +241,104 @@ manager, which can be done on top of a running GNU/Linux system. If, instead, you want to install the complete GNU operating system, @pxref{System Installation}. -The build procedure for Guix is the same as for other GNU software, and -is not covered here. Please see the files @file{README} and -@file{INSTALL} in the Guix source tree for additional details. - @menu +* Binary Installation:: Getting Guix running in no time! * Requirements:: Software needed to build and run Guix. * Running the Test Suite:: Testing Guix. * Setting Up the Daemon:: Preparing the build daemon's environment. * Invoking guix-daemon:: Running the build daemon. @end menu +@node Binary Installation +@section Binary Installation + +This section describes how to install Guix on an arbitrary system from a +self-contained tarball providing binaries for Guix and for all its +dependencies. This is often quicker than installing from source, which +is described in the next sections. The only requirement is to have +GNU@tie{}tar and Xz. + +Installing goes along these lines: + +@enumerate +@item +Download the binary tarball from +@indicateurl{ftp://alpha.gnu.org/gnu/guix/guix-binary-@value{VERSION}.@var{system}.tar.xz}@footnote{As +usual, make sure to download the associated @file{.sig} file and to +verify the authenticity of the tarball against it!}, where @var{system} +is @code{x86_64-linux} for an @code{x86_64} machine already running the +kernel Linux, and so on. + +@item +As @code{root}, run: + +@example +# cd / +# tar xf guix-binary-@value{VERSION}.@var{system}.tar.xz +@end example + +This creates @file{/gnu/store} (@pxref{The Store}), @file{/var/guix}, +and @file{/root/.guix-profile}. @file{/root/.guix-profile} is a +ready-to-use profile for @code{root} where Guix is installed. + +Do @emph{not} unpack the tarball on a working Guix system since that +would overwrite its own essential files. + +@item +Run the daemon: + +@example +# /root/.guix-profile/bin/guix-daemon --build-users-group=guixbuild +@end example + +@item +Make the @command{guix} command available to other users on the machine, +for instance with: + +@example +# mkdir -p /usr/local/bin +# cd /usr/local/bin +# ln -s /var/guix/profiles/per-user/root/guix-profile/bin/guix +@end example + +@item +To use substitutes from @code{hydra.gnu.org} (@pxref{Substitutes}), +authorize them: + +@example +# guix archive --authorize < /root/.guix-profile/share/guix/hydra.gnu.org.pub +@end example +@end enumerate + +And that's it! + +The @code{guix} package must remain available in @code{root}'s +profile, or it would become subject to garbage collection---in which +case you would find yourself badly handicapped by the lack of the +@command{guix} command. + +The tarball in question can be (re)produced and verified simply by +running the following command in the Guix source tree: + +@example +make guix-binary.@var{system}.tar.xz +@end example + + @node Requirements @section Requirements +This section lists requirements when building Guix from source. The +build procedure for Guix is the same as for other GNU software, and is +not covered here. Please see the files @file{README} and @file{INSTALL} +in the Guix source tree for additional details. + GNU Guix depends on the following packages: @itemize -@item @url{http://gnu.org/software/guile/, GNU Guile}, version 2.0.5 or later; +@item @url{http://gnu.org/software/guile/, GNU Guile}, version 2.0.7 or later; @item @url{http://gnupg.org/, GNU libgcrypt}; +@item @url{http://www.gnu.org/software/make/, GNU Make}. @end itemize The following dependencies are optional: @@ -277,9 +363,10 @@ Unless @code{--disable-daemon} was passed to @command{configure}, the following packages are also needed: @itemize -@item @url{http://sqlite.org, SQLite 3} -@item @url{http://www.bzip.org, libbz2} -@item @url{http://gcc.gnu.org, GCC's g++} +@item @url{http://sqlite.org, SQLite 3}; +@item @url{http://www.bzip.org, libbz2}; +@item @url{http://gcc.gnu.org, GCC's g++}, with support for the +C++11 standard. @end itemize When a working installation of @url{http://nixos.org/nix/, the Nix package @@ -336,7 +423,8 @@ goes through the daemon. For instance, command-line tools such as daemon (@i{via} remote procedure calls) to instruct it what to do. The following sections explain how to prepare the build daemon's -environment. +environment. Also @ref{Substitutes}, for information on how to allow +the daemon to download pre-built binaries. @menu * Build Environment Setup:: Preparing the isolated build environment. @@ -372,36 +460,27 @@ Bash syntax and the @code{shadow} commands): @c See http://lists.gnu.org/archive/html/bug-guix/2013-01/msg00239.html @c for why `-G' is needed. @example -# groupadd guix-builder -# for i in `seq 1 10`; +# groupadd --system guixbuild +# for i in `seq -w 1 10`; do - useradd -g guix-builder -G guix-builder \ - -d /var/empty -s `which nologin` \ - -c "Guix build user $i" --system \ - guix-builder$i; + useradd -g guixbuild -G guixbuild \ + -d /var/empty -s `which nologin` \ + -c "Guix build user $i" --system \ + guixbuilder$i; done @end example -The @file{/gnu/store} directory (or whichever was specified with the -@code{--with-store-dir} option) must have ownership and permissions as -follows: - -@example -# chgrp guix-builder /gnu/store -# chmod 1775 /gnu/store -@end example - @noindent The @code{guix-daemon} program may then be run as @code{root} with: @example -# guix-daemon --build-users-group=guix-builder +# guix-daemon --build-users-group=guixbuild @end example @cindex chroot @noindent This way, the daemon starts build processes in a chroot, under one of -the @code{guix-builder} users. On GNU/Linux, by default, the chroot +the @code{guixbuilder} users. On GNU/Linux, by default, the chroot environment contains nothing but: @c Keep this list in sync with libstore/build.cc! ----------------------- @@ -563,7 +642,7 @@ garbage collector, querying the availability of a build result, etc. It is normally run as @code{root} like this: @example -# guix-daemon --build-users-group=guix-builder +# guix-daemon --build-users-group=guixbuild @end example @noindent @@ -621,7 +700,7 @@ remote procedure call (@pxref{The Store}). @item --substitute-urls=@var{urls} Consider @var{urls} the default whitespace-separated list of substitute -source URLs. When this option is omitted, @code{http://hydra.gnu.org} +source URLs. When this option is omitted, @indicateurl{http://hydra.gnu.org} is used. This means that substitutes may be downloaded from @var{urls}, as long @@ -862,7 +941,7 @@ guix package @var{options} Primarily, @var{options} specifies the operations to be performed during the transaction. Upon completion, a new profile is created, but -previous generations of the profile remain available, should the user +previous @dfn{generations} of the profile remain available, should the user want to roll back. For example, to remove @code{lua} and install @code{guile} and @@ -872,11 +951,26 @@ For example, to remove @code{lua} and install @code{guile} and guix package -r lua -i guile guile-cairo @end example +@command{guix package} also supports a @dfn{declarative approach} +whereby the user specifies the exact set of packages to be available and +passes it @i{via} the @option{--manifest} option +(@pxref{profile-manifest, @option{--manifest}}). + For each user, a symlink to the user's default profile is automatically created in @file{$HOME/.guix-profile}. This symlink always points to the current generation of the user's default profile. Thus, users can add @file{$HOME/.guix-profile/bin} to their @code{PATH} environment variable, and so on. +@cindex search paths +If you are not using the Guix System Distribution, consider adding the +following lines to your @file{~/.bash_profile} (@pxref{Bash Startup +Files,,, bash, The GNU Bash Reference Manual}) so that newly-spawned +shells get all the right environment variable definitions: + +@example +GUIX_PROFILE="$HOME/.guix-profile" \ +source "$HOME/.guix-profile/etc/profile" +@end example In a multi-user setup, user profiles are stored in a place registered as a @dfn{garbage-collector root}, which @file{$HOME/.guix-profile} points @@ -898,7 +992,10 @@ Install the specified @var{package}s. Each @var{package} may specify either a simple package name, such as @code{guile}, or a package name followed by a hyphen and version number, -such as @code{guile-1.8.8}. If no version number is specified, the +such as @code{guile-1.8.8} or simply @code{guile-1.8} (in the latter +case, the newest version prefixed by @code{1.8} is selected.) + +If no version number is specified, the newest available version will be selected. In addition, @var{package} may contain a colon, followed by the name of one of the outputs of the package, as in @code{gcc:doc} or @code{binutils-2.22:lib} @@ -908,8 +1005,12 @@ distribution modules (@pxref{Package Modules}). @cindex propagated inputs Sometimes packages have @dfn{propagated inputs}: these are dependencies -that automatically get installed along with the required package. +that automatically get installed along with the required package +(@pxref{package-propagated-inputs, @code{propagated-inputs} in +@code{package} objects}, for information about propagated inputs in +package definitions). +@anchor{package-cmd-propagated-inputs} An example is the GNU MPC library: its C header files refer to those of the GNU MPFR library, which in turn refer to those of the GMP library. Thus, when installing MPC, the MPFR and GMP libraries also get installed @@ -953,13 +1054,51 @@ and/or output name in addition to the package name. For instance, @itemx -u [@var{regexp} @dots{}] Upgrade all the installed packages. If one or more @var{regexp}s are specified, upgrade only installed packages whose name matches a -@var{regexp}. +@var{regexp}. Also see the @code{--do-not-upgrade} option below. Note that this upgrades package to the latest version of packages found in the distribution currently installed. To update your distribution, you should regularly run @command{guix pull} (@pxref{Invoking guix pull}). +@item --do-not-upgrade[=@var{regexp} @dots{}] +When used together with the @code{--upgrade} option, do @emph{not} +upgrade any packages whose name matches a @var{regexp}. For example, to +upgrade all packages in the current profile except those containing the +substring ``emacs'': + +@example +$ guix package --upgrade . --do-not-upgrade emacs +@end example + +@item @anchor{profile-manifest}--manifest=@var{file} +@itemx -m @var{file} +@cindex profile declaration +@cindex profile manifest +Create a new generation of the profile from the manifest object +returned by the Scheme code in @var{file}. + +This allows you to @emph{declare} the profile's contents rather than +constructing it through a sequence of @code{--install} and similar +commands. The advantage is that @var{file} can be put under version +control, copied to different machines to reproduce the same profile, and +so on. + +@c FIXME: Add reference to (guix profile) documentation when available. +@var{file} must return a @dfn{manifest} object, which is roughly a list +of packages: + +@findex packages->manifest +@example +(use-package-modules guile emacs) + +(packages->manifest + (list emacs + guile-2.0 + ;; Use a specific package output. + (list guile-2.0 "debug"))) +@end example + @item --roll-back Roll back to the previous @dfn{generation} of the profile---i.e., undo the last transaction. @@ -990,7 +1129,7 @@ The difference between @code{--roll-back} and not make a zeroth generation, so if a specified generation does not exist, the current generation will not be changed. -@item --search-paths +@item --search-paths[=@var{kind}] @cindex search paths Report environment variable definitions, in Bash syntax, that may be needed in order to use the set of installed packages. These environment @@ -1005,6 +1144,18 @@ library are installed in the profile, then @code{--search-paths} will suggest setting these variables to @code{@var{profile}/include} and @code{@var{profile}/lib}, respectively. +The typical use case is to define these environment variables in the +shell: + +@example +$ eval `guix package --search-paths` +@end example + +@var{kind} may be one of @code{exact}, @code{prefix}, or @code{suffix}, +meaning that the returned environment variable definitions will either +be exact settings, or prefixes or suffixes of the current value of these +variables. When omitted, @var{kind} defaults to @code{exact}. + @item --profile=@var{profile} @itemx -p @var{profile} Use @var{profile} instead of the user's default profile. @@ -1027,7 +1178,7 @@ availability of packages: @item --search=@var{regexp} @itemx -s @var{regexp} -List the available packages whose synopsis or description matches +List the available packages whose name, synopsis, or description matches @var{regexp}. Print all the meta-data of matching packages in @code{recutils} format (@pxref{Top, GNU recutils databases,, recutils, GNU recutils manual}). @@ -1093,7 +1244,7 @@ the store. @item --list-available[=@var{regexp}] @itemx -A [@var{regexp}] -List packages currently available in the software distribution +List packages currently available in the distribution for this system (@pxref{GNU Distribution}). When @var{regexp} is specified, list only installed packages whose name matches @var{regexp}. @@ -1149,9 +1300,8 @@ When @var{pattern} is specified, delete the matching generations. When specified duration match. For instance, @code{--delete-generations=1m} deletes generations that are more than one month old. -If the current generation matches, it is deleted atomically---i.e., by -switching to the previous available generation. Note that the zeroth -generation is never deleted. +If the current generation matches, it is @emph{not} deleted. Also, the +zeroth generation is never deleted. Note that deleting generations prevents roll-back to them. Consequently, this command must be used with care. @@ -1253,7 +1403,9 @@ determination to subvert the computing infrastructure and exploit its weaknesses. While using @code{hydra.gnu.org} substitutes can be convenient, we encourage users to also build on their own, or even run their own build farm, such that @code{hydra.gnu.org} is less of an -interesting target. +interesting target. One way to help is by publishing the software you +build using @command{guix publish} so that others have one more choice +of server to download substitutes from (@pxref{Invoking guix publish}). Guix has the foundations to maximize build reproducibility (@pxref{Features}). In most cases, independent builds of a given @@ -1322,7 +1474,9 @@ guix package}). @cindex garbage collector Packages that are installed but not used may be @dfn{garbage-collected}. The @command{guix gc} command allows users to explicitly run the garbage -collector to reclaim space from the @file{/gnu/store} directory. +collector to reclaim space from the @file{/gnu/store} directory. It is +the @emph{only} way to remove files from @file{/gnu/store}---removing +files or directories manually may break it beyond repair! The garbage collector has a set of known @dfn{roots}: any file under @file{/gnu/store} reachable from a root is considered @dfn{live} and @@ -1362,6 +1516,17 @@ Attempt to delete all the store files and directories specified as arguments. This fails if some of the files are not in the store, or if they are still live. +@item --optimize +@cindex deduplication +Optimize the store by hard-linking identical files---this is +@dfn{deduplication}. + +The daemon performs deduplication after each successful build or archive +import, unless it was started with @code{--disable-deduplication} +(@pxref{Invoking guix-daemon, @code{--disable-deduplication}}). Thus, +this option is primarily useful when the daemon was running with +@code{--disable-deduplication}. + @item --list-dead Show the list of dead files and directories still present in the store---i.e., files and directories no longer reachable from any root. @@ -1645,7 +1810,8 @@ There are a few points worth noting in the above package definition: @itemize @item -The @code{source} field of the package is an @code{<origin>} object. +The @code{source} field of the package is an @code{<origin>} object +(@pxref{origin Reference}, for the complete reference). Here, the @code{url-fetch} method from @code{(guix download)} is used, meaning that the source is a file to be downloaded over FTP or HTTP. @@ -1693,6 +1859,8 @@ However, any other dependencies need to be specified in the unavailable to the build process, possibly leading to a build failure. @end itemize +@xref{package Reference}, for a full description of possible fields. + Once a package definition is in place, the package may actually be built using the @code{guix build} command-line tool (@pxref{Invoking guix build}). @xref{Packaging Guidelines}, for @@ -1737,6 +1905,194 @@ and operating system, such as @code{"mips64el-linux-gnu"} Configure and Build System}). @end deffn +@menu +* package Reference :: The package data type. +* origin Reference:: The origin data type. +@end menu + + +@node package Reference +@subsection @code{package} Reference + +This section summarizes all the options available in @code{package} +declarations (@pxref{Defining Packages}). + +@deftp {Data Type} package +This is the data type representing a package recipe. + +@table @asis +@item @code{name} +The name of the package, as a string. + +@item @code{version} +The version of the package, as a string. + +@item @code{source} +An origin object telling how the source code for the package should be +acquired (@pxref{origin Reference}). + +@item @code{build-system} +The build system that should be used to build the package (@pxref{Build +Systems}). + +@item @code{arguments} (default: @code{'()}) +The arguments that should be passed to the build system. This is a +list, typically containing sequential keyword-value pairs. + +@item @code{inputs} (default: @code{'()}) +Package or derivation inputs to the build. This is a list of lists, +where each list has the name of the input (a string) as its first +element, a package or derivation object as its second element, and +optionally the name of the output of the package or derivation that +should be used, which defaults to @code{"out"}. + +@item @anchor{package-propagated-inputs}@code{propagated-inputs} (default: @code{'()}) +@cindex propagated inputs +This field is like @code{inputs}, but the specified packages will be +force-installed alongside the package they belong to +(@pxref{package-cmd-propagated-inputs, @command{guix package}}, for +information on how @command{guix package} deals with propagated inputs.) + +For example this is necessary when a library needs headers of another +library to compile, or needs another shared library to be linked +alongside itself when a program wants to link to it. + +@item @code{native-inputs} (default: @code{'()}) +This field is like @code{inputs}, but in case of a cross-compilation it +will be ensured that packages for the architecture of the build machine +are present, such that executables from them can be used during the +build. + +This is typically where you would list tools needed at build time but +not at run time, such as Autoconf, Automake, pkg-config, Gettext, or +Bison. @command{guix lint} can report likely mistakes in this area +(@pxref{Invoking guix lint}). + +@item @code{self-native-input?} (default: @code{#f}) +This is a Boolean field telling whether the package should use itself as +a native input when cross-compiling. + +@item @code{outputs} (default: @code{'("out")}) +The list of output names of the package. @xref{Packages with Multiple +Outputs}, for typical uses of additional outputs. + +@item @code{native-search-paths} (default: @code{'()}) +@itemx @code{search-paths} (default: @code{'()}) +A list of @code{search-path-specification} objects describing +search-path environment variables honored by the package. + +@item @code{replacement} (default: @code{#f}) +This must either @code{#f} or a package object that will be used as a +@dfn{replacement} for this package. @xref{Security Updates, grafts}, +for details. + +@item @code{synopsis} +A one-line description of the package. + +@item @code{description} +A more elaborate description of the package. + +@item @code{license} +The license of the package; a value from @code{(guix licenses)}. + +@item @code{home-page} +The URL to the home-page of the package, as a string. + +@item @code{supported-systems} (default: @var{%supported-systems}) +The list of systems supported by the package, as strings of the form +@code{architecture-kernel}, for example @code{"x86_64-linux"}. + +@item @code{maintainers} (default: @code{'()}) +The list of maintainers of the package, as @code{maintainer} objects. + +@item @code{location} (default: source location of the @code{package} form) +The source location of the package. It's useful to override this when +inheriting from another package, in which case this field is not +automatically corrected. +@end table +@end deftp + + +@node origin Reference +@subsection @code{origin} Reference + +This section summarizes all the options available in @code{origin} +declarations (@pxref{Defining Packages}). + +@deftp {Data Type} origin +This is the data type representing a source code origin. + +@table @asis +@item @code{uri} +An object containing the URI of the source. The object type depends on +the @code{method} (see below). For example, when using the +@var{url-fetch} method of @code{(guix download)}, the valid @code{uri} +values are: a URL represented as a string, or a list thereof. + +@item @code{method} +A procedure that will handle the URI. + +Examples include: + +@table @asis +@item @var{url-fetch} from @code{(guix download)} +download a file the HTTP, HTTPS, or FTP URL specified in the +@code{uri} field; + +@item @var{git-fetch} from @code{(guix git-download)} +clone the Git version control repository, and check out the revision +specified in the @code{uri} field as a @code{git-reference} object; a +@code{git-reference} looks like this: + +@example +(git-reference + (url "git://git.debian.org/git/pkg-shadow/shadow") + (commit "v4.1.5.1")) +@end example +@end table + +@item @code{sha256} +A bytevector containing the SHA-256 hash of the source. Typically the +@code{base32} form is used here to generate the bytevector from a +base-32 string. + +@item @code{file-name} (default: @code{#f}) +The file name under which the source code should be saved. When this is +@code{#f}, a sensible default value will be used in most cases. In case +the source is fetched from a URL, the file name from the URL will be +used. For version control checkouts, it's recommended to provide the +file name explicitly because the default is not very descriptive. + +@item @code{patches} (default: @code{'()}) +A list of file names containing patches to be applied to the source. + +@item @code{snippet} (default: @code{#f}) +A quoted piece of code that will be run in the source directory to make +any modifications, which is sometimes more convenient than a patch. + +@item @code{patch-flags} (default: @code{'("-p1")}) +A list of command-line flags that should be passed to the @code{patch} +command. + +@item @code{patch-inputs} (default: @code{#f}) +Input packages or derivations to the patching process. When this is +@code{#f}, the usual set of inputs necessary for patching are provided, +such as GNU@tie{}Patch. + +@item @code{modules} (default: @code{'()}) +A list of Guile modules that should be loaded during the patching +process and while running the code in the @code{snippet} field. + +@item @code{imported-modules} (default: @code{'()}) +The list of Guile modules to import in the patch derivation, for use by +the @code{snippet}. + +@item @code{patch-guile} (default: @code{#f}) +The Guile package that should be used in the patching process. When +this is @code{#f}, a sensible default is used. +@end table +@end deftp + @node Build Systems @section Build Systems @@ -1961,6 +2317,25 @@ Python package is used to run the script can be specified with the @code{#:python} parameter. @end defvr +@defvr {Scheme Variable} haskell-build-system +This variable is exported by @code{(guix build-system haskell)}. It +implements the Cabal build procedure used by Haskell packages, which +involves running @code{runhaskell Setup.hs configure +--prefix=/gnu/store/@dots{}} and @code{runhaskell Setup.hs build}. +Instead of installing the package by running @code{runhaskell Setup.hs +install}, to avoid trying to register libraries in the read-only +compiler store directory, the build system uses @code{runhaskell +Setup.hs copy}, followed by @code{runhaskell Setup.hs register}. In +addition, the build system generates the package documentation by +running @code{runhaskell Setup.hs haddock}, unless @code{#:haddock? #f} +is passed. Optional Haddock parameters can be passed with the help of +the @code{#:haddock-flags} parameter. If the file @code{Setup.hs} is +not found, the build system looks for @code{Setup.lhs} instead. + +Which Haskell compiler is used can be specified with the @code{#:haskell} +parameter which defaults to @code{ghc}. +@end defvr + Lastly, for packages that do not need anything as sophisticated, a ``trivial'' build system is provided. It is trivial in the sense that it provides basically no support: it does not pull any implicit inputs, @@ -2089,7 +2464,7 @@ a derivation is the @code{derivation} procedure: @var{args} [#:outputs '("out")] [#:hash #f] [#:hash-algo #f] @ [#:recursive? #f] [#:inputs '()] [#:env-vars '()] @ [#:system (%current-system)] [#:references-graphs #f] @ - [#:allowed-references #f] [#:local-build? #f] + [#:allowed-references #f] [#:leaked-env-vars #f] [#:local-build? #f] Build a derivation with the given arguments, and return the resulting @code{<derivation>} object. @@ -2108,6 +2483,13 @@ a simple text format. When @var{allowed-references} is true, it must be a list of store items or outputs that the derivation's output may refer to. +When @var{leaked-env-vars} is true, it must be a list of strings +denoting environment variables that are allowed to ``leak'' from the +daemon's environment to the build environment. This is only applicable +to fixed-output derivations---i.e., when @var{hash} is true. The main +use is to allow variables such as @code{http_proxy} to be passed to +derivations that download files. + When @var{local-build?} is true, declare that the derivation is not a good candidate for offloading and should rather be built locally (@pxref{Daemon Offload Setup}). This is the case for small derivations @@ -2233,28 +2615,41 @@ Consider this ``normal'' procedure: `(symlink ,sh %output)))) @end example -Using @code{(guix monads)}, it may be rewritten as a monadic function: +Using @code{(guix monads)} and @code{(guix gexp)}, it may be rewritten +as a monadic function: -@c FIXME: Find a better example, one that uses 'mlet'. @example (define (sh-symlink) ;; Same, but return a monadic value. - (gexp->derivation "sh" - #~(symlink (string-append #$bash "/bin/bash") #$output))) + (mlet %store-monad ((drv (package->derivation bash))) + (gexp->derivation "sh" + #~(symlink (string-append #$drv "/bin/bash") + #$output)))) @end example -There are two things to note in the second version: the @code{store} -parameter is now implicit, and the monadic value returned by -@code{package-file}---a wrapper around @code{package-derivation} and -@code{derivation->output-path}---is @dfn{bound} using @code{mlet} -instead of plain @code{let}. +There several things to note in the second version: the @code{store} +parameter is now implicit and is ``threaded'' in the calls to the +@code{package->derivation} and @code{gexp->derivation} monadic +procedures, and the monadic value returned by @code{package->derivation} +is @dfn{bound} using @code{mlet} instead of plain @code{let}. + +As it turns out, the call to @code{package->derivation} can even be +omitted since it will take place implicitly, as we will see later +(@pxref{G-Expressions}): + +@example +(define (sh-symlink) + (gexp->derivation "sh" + #~(symlink (string-append #$bash "/bin/bash") + #$output))) +@end example -Calling the monadic @code{profile.sh} has no effect. To get the desired +Calling the monadic @code{sh-symlink} has no effect. To get the desired effect, one must use @code{run-with-store}: @example -(run-with-store (open-connection) (profile.sh)) -@result{} /gnu/store/...-profile.sh +(run-with-store (open-connection) (sh-symlink)) +@result{} /gnu/store/...-sh-symlink @end example Note that the @code{(guix monad-repl)} module extends Guile's REPL with @@ -2489,13 +2884,9 @@ Gexps are meant to be written to a file and run or manipulated by other processes. @item -When a package or derivation is unquoted inside a gexp, the result is as -if its output file name had been introduced. - -Actually this mechanism is not limited to package and derivation -objects; @dfn{compilers} able to ``lower'' other high-level objects to -derivations can be defined, such that these objects can also be inserted -into gexps. +When a high-level object such as a package or derivation is unquoted +inside a gexp, the result is as if its output file name had been +introduced. @item Gexps carry information about the packages or derivations they refer to, @@ -2503,6 +2894,14 @@ and these dependencies are automatically added as inputs to the build processes that use them. @end itemize +Actually this mechanism is not limited to package and derivation +objects; @dfn{compilers} able to ``lower'' other high-level objects to +derivations can be defined, such that these objects can also be inserted +into gexps. Another useful type of high-level object that can be +inserted in a gexp is @dfn{local files}, which allows files from the +local file system to be added to the store and referred to by +derivations and such (see @code{local-file} below.) + To illustrate the idea, here is an example of a gexp: @example @@ -2510,7 +2909,7 @@ To illustrate the idea, here is an example of a gexp: #~(begin (mkdir #$output) (chdir #$output) - (symlink (string-append #$coreutils "/bin/ls") + (symlink (string-append #$coreutils "/bin/ls") "list-files"))) @end example @@ -2562,24 +2961,24 @@ or more of the following forms: @table @code @item #$@var{obj} @itemx (ungexp @var{obj}) -Introduce a reference to @var{obj}. @var{obj} may be a package or a +Introduce a reference to @var{obj}. @var{obj} may have one of the +supported types, for example a package or a derivation, in which case the @code{ungexp} form is replaced by its output file name---e.g., @code{"/gnu/store/@dots{}-coreutils-8.22}. -If @var{obj} is a list, it is traversed and any package or derivation -references are substituted similarly. +If @var{obj} is a list, it is traversed and references to supported +objects are substituted similarly. If @var{obj} is another gexp, its contents are inserted and its dependencies are added to those of the containing gexp. If @var{obj} is another kind of object, it is inserted as is. -@item #$@var{package-or-derivation}:@var{output} -@itemx (ungexp @var{package-or-derivation} @var{output}) +@item #$@var{obj}:@var{output} +@itemx (ungexp @var{obj} @var{output}) This is like the form above, but referring explicitly to the -@var{output} of @var{package-or-derivation}---this is useful when -@var{package-or-derivation} produces multiple outputs (@pxref{Packages -with Multiple Outputs}). +@var{output} of @var{obj}---this is useful when @var{obj} produces +multiple outputs (@pxref{Packages with Multiple Outputs}). @item #+@var{obj} @itemx #+@var{obj}:output @@ -2626,6 +3025,7 @@ information about monads.) [#:recursive? #f] [#:env-vars '()] [#:modules '()] @ [#:module-path @var{%load-path}] @ [#:references-graphs #f] [#:allowed-references #f] @ + [#:leaked-env-vars #f] @ [#:local-build? #f] [#:guile-for-build #f] Return a derivation @var{name} that runs @var{exp} (a gexp) with @var{guile-for-build} (a derivation) on @var{system}. When @var{target} @@ -2664,6 +3064,20 @@ refer to. Any reference to another store item will lead to a build error. The other arguments are as for @code{derivation} (@pxref{Derivations}). @end deffn +@deffn {Scheme Procedure} local-file @var{file} [@var{name}] @ + [#:recursive? #t] +Return an object representing local file @var{file} to add to the store; this +object can be used in a gexp. @var{file} will be added to the store under @var{name}--by +default the base name of @var{file}. + +When @var{recursive?} is true, the contents of @var{file} are added recursively; if @var{file} +designates a flat file and @var{recursive?} is true, its contents are added, and its +permission bits are kept. + +This is the declarative counterpart of the @code{interned-file} monadic +procedure (@pxref{The Store Monad, @code{interned-file}}). +@end deffn + @deffn {Monadic Procedure} gexp->script @var{name} @var{exp} Return an executable script @var{name} that runs @var{exp} using @var{guile} with @var{modules} in its search path. @@ -2701,8 +3115,9 @@ or a subset thereof. @deffn {Monadic Procedure} text-file* @var{name} @var{text} @dots{} Return as a monadic value a derivation that builds a text file containing all of @var{text}. @var{text} may list, in addition to -strings, packages, derivations, and store file names; the resulting -store file holds references to all these. +strings, objects of any type that can be used in a gexp: packages, +derivations, local file objects, etc. The resulting store file holds +references to all these. This variant should be preferred over @code{text-file} anytime the file to create will reference items from the store. This is typically the @@ -2745,6 +3160,7 @@ programming interface of Guix in a convenient way. * Invoking guix refresh:: Updating package definitions. * Invoking guix lint:: Finding errors in package definitions. * Invoking guix environment:: Setting up development environments. +* Invoking guix publish:: Sharing substitutes. @end menu @node Invoking guix build @@ -2806,6 +3222,49 @@ The returned source tarball is the result of applying any patches and code snippets specified in the package's @code{origin} (@pxref{Defining Packages}). +@item --sources +Fetch and return the source of @var{package-or-derivation} and all their +dependencies, recursively. This is a handy way to obtain a local copy +of all the source code needed to build @var{packages}, allowing you to +eventually build them even without network access. It is an extension +of the @code{--source} option and can accept one of the following +optional argument values: + +@table @code +@item package +This value causes the @code{--sources} option to behave in the same way +as the @code{--source} option. + +@item all +Build all packages' source derivations, including any source that might +be listed as @code{inputs}. This is the default value. + +@example +$ guix build --sources tzdata +The following derivations will be built: + /gnu/store/@dots{}-tzdata2015b.tar.gz.drv + /gnu/store/@dots{}-tzcode2015b.tar.gz.drv +@end example + +@item transitive +Build all packages' source derivations, as well as all source +derivations for packages' transitive inputs. This can be used e.g. to +prefetch package source for later offline building. + +@example +$ guix build --sources=transitive tzdata +The following derivations will be built: + /gnu/store/@dots{}-tzcode2015b.tar.gz.drv + /gnu/store/@dots{}-findutils-4.4.2.tar.xz.drv + /gnu/store/@dots{}-grep-2.21.tar.xz.drv + /gnu/store/@dots{}-coreutils-8.23.tar.xz.drv + /gnu/store/@dots{}-make-4.1.tar.xz.drv + /gnu/store/@dots{}-bash-4.3.tar.xz.drv +@dots{} +@end example + +@end table + @item --system=@var{system} @itemx -s @var{system} Attempt to build for @var{system}---e.g., @code{i686-linux}---instead of @@ -3154,6 +3613,37 @@ bound to the @code{libreoffice} top-level attribute): @example guix import nix ~/path/to/nixpkgs libreoffice @end example + +@item hackage +@cindex hackage +Import meta-data from Haskell community's central package archive +@uref{https://hackage.haskell.org/, Hackage}. Information is taken from +Cabal files and includes all the relevant information, including package +dependencies. + +Specific command-line options are: + +@table @code +@item --no-test-dependencies +@itemx -t +Do not include dependencies only required to run the test suite. +@end table + +The command below imports meta-data for the latest version of the +@code{HTTP} Haskell package without including test dependencies: + +@example +guix import hackage -t HTTP +@end example + +A specific package version may optionally be specified by following the +package name by a hyphen and a version number as in the following example: + +@example +guix import hackage mtl-2.1.3.1 +@end example + +Currently only indentation structured Cabal files are supported. @end table The structure of the @command{guix import} code is modular. It would be @@ -3220,7 +3710,7 @@ In addition, @command{guix refresh} can be passed one or more package names, as in this example: @example -guix refresh -u emacs idutils +guix refresh -u emacs idutils gcc-4.8.4 @end example @noindent @@ -3407,12 +3897,74 @@ environment. It also supports all of the common build options that @command{guix build} supports (@pxref{Invoking guix build, common build options}). +@node Invoking guix publish +@section Invoking @command{guix publish} + +The purpose of @command{guix publish} is to enable users to easily share +their store with others, which can then use it as a substitute server +(@pxref{Substitutes}). + +When @command{guix publish} runs, it spawns an HTTP server which allows +anyone with network access to obtain substitutes from it. This means +that any machine running Guix can also act as if it were a build farm, +since the HTTP interface is compatible with Hydra, the software behind +the @code{hydra.gnu.org} build farm. + +For security, each substitute is signed, allowing recipients to check +their authenticity and integrity (@pxref{Substitutes}). Because +@command{guix publish} uses the system's signing key, which is only +readable by the system administrator, it must be started as root; the +@code{--user} option makes it drop root privileges early on. + +The general syntax is: + +@example +guix publish @var{options}@dots{} +@end example + +Running @command{guix publish} without any additional arguments will +spawn an HTTP server on port 8080: + +@example +guix publish +@end example + +Once a publishing server has been authorized (@pxref{Invoking guix +archive}), the daemon may download substitutes from it: + +@example +guix-daemon --substitute-urls=http://example.org:8080 +@end example + +The following options are available: + +@table @code +@item --port=@var{port} +@itemx -p @var{port} +Listen for HTTP requests on @var{port}. + +@item --listen=@var{host} +Listen on the network interface for @var{host}. The default is to +accept connections from any interface. + +@item --user=@var{user} +@itemx -u @var{user} +Change privileges to @var{user} as soon as possible---i.e., once the +server socket is open and the signing key has been read. + +@item --repl[=@var{port}] +@itemx -r [@var{port}] +Spawn a Guile REPL server (@pxref{REPL Servers,,, guile, GNU Guile +Reference Manual}) on @var{port} (37146 by default). This is used +primarily for debugging a running @command{guix publish} server. +@end table + @c ********************************************************************* @node GNU Distribution @chapter GNU Distribution @cindex Guix System Distribution -@cindex GSD +@cindex GuixSD Guix comes with a distribution of the GNU system consisting entirely of free software@footnote{The term ``free'' here refers to the @url{http://www.gnu.org/philosophy/free-sw.html,freedom provided to @@ -3421,7 +3973,7 @@ distribution can be installed on its own (@pxref{System Installation}), but it is also possible to install Guix as a package manager on top of an installed GNU/Linux system (@pxref{Installation}). To distinguish between the two, we refer to the standalone distribution as the Guix -System Distribution, or GNU@tie{}GSD. +System Distribution, or GuixSD. The distribution provides core GNU packages such as GNU libc, GCC, and Binutils, as well as many GNU and non-GNU applications. The complete @@ -3458,7 +4010,7 @@ n32 application binary interface (ABI), and Linux-Libre kernel. @end table -GSD itself is currently only available on @code{i686} and @code{x86_64}. +GuixSD itself is currently only available on @code{i686} and @code{x86_64}. @noindent For information on porting to other architectures or kernels, @@ -3498,13 +4050,13 @@ link that follows: @pxref{Help,,, info, Info: An Introduction}. Hit @subsection Limitations -As of version @value{VERSION}, the Guix System Distribution (GSD) is +As of version @value{VERSION}, the Guix System Distribution (GuixSD) is not production-ready. It may contain bugs and lack important features. Thus, if you are looking for a stable production system that respects your freedom as a computer user, a good solution at this point is to consider @url{http://www.gnu.org/distros/free-distros.html, one of more established GNU/Linux distributions}. We hope you can soon switch -to the GSD without fear, of course. In the meantime, you can +to the GuixSD without fear, of course. In the meantime, you can also keep using your distribution and try out the package manager on top of it (@pxref{Installation}). @@ -3529,7 +4081,7 @@ Few system services are currently supported out-of-the-box (@pxref{Services}). @item -On the order of 1,200 packages are available, which means that you may +On the order of 1,900 packages are available, which means that you may occasionally find that a useful package is missing. @end itemize @@ -3540,7 +4092,7 @@ to report issues (and success stories!), and join us in improving it. @subsection USB Stick Installation An installation image for USB sticks can be downloaded from -@code{ftp://alpha.gnu.org/gnu/guix/gsd-usb-install-@value{VERSION}.@var{system}.xz}, +@indicateurl{ftp://alpha.gnu.org/gnu/guix/guixsd-usb-install-@value{VERSION}.@var{system}.xz}, where @var{system} is one of: @table @code @@ -3562,7 +4114,7 @@ To copy the image to a USB stick, follow these steps: Decompress the image using the @command{xz} command: @example -xz -d gsd-usb-install-@value{VERSION}.@var{system}.xz +xz -d guixsd-usb-install-@value{VERSION}.@var{system}.xz @end example @item @@ -3571,7 +4123,7 @@ its device name. Assuming that USB stick is known as @file{/dev/sdX}, copy the image with: @example -dd if=gsd-usb-install-@value{VERSION}.x86_64 of=/dev/sdX +dd if=guixsd-usb-install-@value{VERSION}.x86_64 of=/dev/sdX @end example Access to @file{/dev/sdX} usually requires root privileges. @@ -3594,9 +4146,9 @@ To install the system, you would: @enumerate @item -Configure the network, by running @command{dhclient eno1} (to get an -automatically assigned IP address from the wired network interface -controller@footnote{ +Configure the network, by running @command{ifconfig eno1 up && dhclient +eno1} (to get an automatically assigned IP address from the wired +network interface controller@footnote{ @c http://cgit.freedesktop.org/systemd/systemd/tree/src/udev/udev-builtin-net_id.c#n20 The name @code{eno1} is for the first on-board Ethernet controller. The interface name for an Ethernet controller that is in the first slot of @@ -3646,20 +4198,14 @@ that end, the installation system comes with two text editors: GNU nano It is better to store that file on the target root file system, say, as @file{/mnt/etc/config.scm}. -A minimal operating system configuration, with just the bare minimum and -only a root account would look like this (on the installation system, -this example is available as @file{/etc/configuration-template.scm}): +@xref{Using the Configuration System}, for examples of operating system +configurations. These examples are available under +@file{/etc/configuration} in the installation image, so you can copy +them and use them as a starting point for your own configuration. -@example -@include os-config.texi -@end example - -@noindent -For more information on @code{operating-system} declarations, -@pxref{Using the Configuration System}. - -Once that is done, the new system must be initialized (remember that the -target root file system is mounted under @file{/mnt}): +Once you are done preparing the configuration file, the new system must +be initialized (remember that the target root file system is mounted +under @file{/mnt}): @example guix system init /mnt/etc/config.scm /mnt @@ -3724,6 +4270,7 @@ instance to support new system services. * Locales:: Language and cultural convention settings. * Services:: Specifying system services. * Setuid Programs:: Programs running with root privileges. +* X.509 Certificates:: Authenticating HTTPS servers. * Name Service Switch:: Configuring libc's name service switch. * Initial RAM Disk:: Linux-Libre bootstrapping. * GRUB Configuration:: Configuring the boot loader. @@ -3742,30 +4289,7 @@ kernel, initial RAM disk, and boot loader looks like this: @findex operating-system @lisp -(use-modules (gnu) ; for 'user-account', '%base-services', etc. - (gnu packages emacs) ; for 'emacs' - (gnu services ssh)) ; for 'lsh-service' - -(operating-system - (host-name "komputilo") - (timezone "Europe/Paris") - (locale "fr_FR.utf8") - (bootloader (grub-configuration - (device "/dev/sda"))) - (file-systems (cons (file-system - (device "/dev/sda1") ; or partition label - (mount-point "/") - (type "ext3")) - %base-file-systems)) - (users (list (user-account - (name "alice") - (group "users") - (comment "Bob's sister") - (home-directory "/home/alice")))) - (packages (cons emacs %base-packages)) - (services (cons (lsh-service #:port 2222 #:root-login? #t - #:initialize? #t) - %base-services))) +@include os-config-bare-bones.texi @end lisp This example should be self-describing. Some of the fields defined @@ -3798,6 +4322,18 @@ generated as needed (@pxref{Defining Services}). @xref{operating-system Reference}, for details about the available @code{operating-system} fields. +The configuration for a typical ``desktop'' usage, with the X11 display +server, a desktop environment, network management, an SSH server, and +more, would look like this: + +@lisp +@include os-config-desktop.texi +@end lisp + +@xref{Desktop Services}, for the exact list of services provided by +@var{%desktop-services}. @xref{X.509 Certificates}, for background +information about the @code{nss-certs} package that is used here. + Assuming the above snippet is stored in the @file{my-system-config.scm} file, the @command{guix system reconfigure my-system-config.scm} command instantiates that configuration, and makes it the default GRUB boot @@ -4025,8 +4561,9 @@ variables. @defvr {Scheme Variable} %base-file-systems These are essential file systems that are required on normal systems, -such as @var{%devtmpfs-file-system} (see below.) Operating system -declarations should always contain at least these. +such as @var{%devtmpfs-file-system} and @var{%immutable-store} (see +below.) Operating system declarations should always contain at least +these. @end defvr @defvr {Scheme Variable} %devtmpfs-file-system @@ -4048,6 +4585,16 @@ memory sharing across processes (@pxref{Memory-mapped I/O, @code{shm_open},, libc, The GNU C Library Reference Manual}). @end defvr +@defvr {Scheme Variable} %immutable-store +This file system performs a read-only ``bind mount'' of +@file{/gnu/store}, making it read-only for all the users including +@code{root}. This prevents against accidental modification by software +running as @code{root} or by system administrators. + +The daemon itself is still able to write to the store: it remounts it +read-write in its own ``name space.'' +@end defvr + @defvr {Scheme Variable} %binary-format-file-system The @code{binfmt_misc} file system, which allows handling of arbitrary executable file types to be delegated to user space. This requires the @@ -4126,7 +4673,9 @@ command, from the same-named package. This relies on the @node User Accounts @subsection User Accounts -User accounts are specified with the @code{user-account} form: +User accounts and groups are entirely managed through the +@code{operating-system} declaration. They are specified with the +@code{user-account} and @code{user-group} forms: @example (user-account @@ -4140,6 +4689,14 @@ User accounts are specified with the @code{user-account} form: (home-directory "/home/alice")) @end example +When booting or upon completion of @command{guix system reconfigure}, +the system ensures that only the user accounts and groups specified in +the @code{operating-system} declaration exist, and with the specified +properties. Thus, account or group creations or modifications made by +directly invoking commands such as @command{useradd} are lost upon +reconfiguration or reboot. This ensures that the system remains exactly +as declared. + @deftp {Data Type} user-account Objects of this type represent user accounts. The following members may be specified: @@ -4179,7 +4736,9 @@ graphical login managers do not list them. @item @code{password} (default: @code{#f}) You would normally leave this field to @code{#f}, initialize user passwords as @code{root} with the @command{passwd} command, and then let -users change it with @command{passwd}. +users change it with @command{passwd}. Passwords set with +@command{passwd} are of course preserved across reboot and +reconfiguration. If you @emph{do} want to have a preset password for an account, then this field must contain the encrypted password, as a string. @@ -4350,6 +4909,9 @@ declaration. * Base Services:: Essential system services. * Networking Services:: Network setup, SSH daemon, etc. * X Window:: Graphical display. +* Desktop Services:: D-Bus and desktop services. +* Database Services:: SQL databases. +* Various Services:: Other services. @end menu @node Base Services @@ -4406,7 +4968,8 @@ the ``message of the day''. Return a service that runs libc's name service cache daemon (nscd) with the given @var{config}---an @code{<nscd-configuration>} object. Optionally, @code{#:name-services} is a list of packages that provide -name service switch (NSS) modules needed by nscd. +name service switch (NSS) modules needed by nscd. @xref{Name Service +Switch}, for an example. @end deffn @defvr {Scheme Variable} %nscd-default-configuration @@ -4487,8 +5050,9 @@ external name servers do not even need to be queried. @end defvr -@deffn {Monadic Procedure} syslog-service -Return a service that runs @code{syslogd} with reasonable default +@deffn {Monadic Procedure} syslog-service [#:config-file #f] +Return a service that runs @code{syslogd}. If configuration file name +@var{config-file} is not specified, use some reasonable default settings. @end deffn @@ -4515,6 +5079,11 @@ passed to @command{guix-daemon}. Run @var{udev}, which populates the @file{/dev} directory dynamically. @end deffn +@deffn {Monadic Procedure} console-keymap-service @var{file} +Return a service to load console keymap from @var{file} using +@command{loadkeys} command. +@end deffn + @node Networking Services @subsubsection Networking Services @@ -4581,7 +5150,7 @@ Furthermore, @code{(gnu services ssh)} provides the following service. [#:allow-empty-passwords? #f] [#:root-login? #f] @ [#:syslog-output? #t] [#:x11-forwarding? #t] @ [#:tcp/ip-forwarding? #t] [#:password-authentication? #t] @ - [#:public-key-authentication? #t] [#:initialize? #f] + [#:public-key-authentication? #t] [#:initialize? #t] Run the @command{lshd} program from @var{lsh} to listen on port @var{port-number}. @var{host-key} must designate a file containing the host key, and readable only by root. @@ -4641,6 +5210,30 @@ This mechanism can prevent programs running locally, such as Web browsers, from accessing Facebook. @end defvr +The @code{(gnu services avahi)} provides the following definition. + +@deffn {Monadic Procedure} avahi-service [#:avahi @var{avahi}] @ + [#:host-name #f] [#:publish? #t] [#:ipv4? #t] @ + [#:ipv6? #t] [#:wide-area? #f] @ + [#:domains-to-browse '()] +Return a service that runs @command{avahi-daemon}, a system-wide +mDNS/DNS-SD responder that allows for service discovery and +"zero-configuration" host name lookups (see @uref{http://avahi.org/}). + +If @var{host-name} is different from @code{#f}, use that as the host name to +publish for this machine; otherwise, use the machine's actual host name. + +When @var{publish?} is true, publishing of host names and services is allowed; +in particular, avahi-daemon will publish the machine's host name and IP +address via mDNS on the local network. + +When @var{wide-area?} is true, DNS-SD over unicast DNS is enabled. + +Boolean values @var{ipv4?} and @var{ipv6?} determine whether to use IPv4/IPv6 +sockets. +@end deffn + + @node X Window @subsubsection X Window @@ -4657,6 +5250,19 @@ Return a service that spawns the SLiM graphical login manager, which in turn starts the X display server with @var{startx}, a command as returned by @code{xorg-start-command}. +@cindex X session + +SLiM automatically looks for session types described by the @file{.desktop} +files in @file{/run/current-system/profile/share/xsessions} and allows users +to choose a session from the log-in screen using @kbd{F1}. Packages such as +@var{xfce}, @var{sawfish}, and @var{ratpoison} provide @file{.desktop} files; +adding them to the system-wide set of packages automatically makes them +available at the log-in screen. + +In addition, @file{~/.xsession} files are honored. When available, +@file{~/.xsession} must be an executable that starts a window manager +and/or other X clients. + When @var{allow-empty-passwords?} is true, allow logins with an empty password. When @var{auto-login?} is true, log in automatically as @var{default-user}. @@ -4673,19 +5279,141 @@ The G-Expression denoting the default SLiM theme and its name. @end defvr @deffn {Monadic Procedure} xorg-start-command [#:guile] @ - [#:drivers '()] [#:resolutions '()] [#:xorg-server @var{xorg-server}] + [#:configuration-file #f] [#:xorg-server @var{xorg-server}] Return a derivation that builds a @var{guile} script to start the X server -from @var{xorg-server}. Usually the X server is started by a login manager. +from @var{xorg-server}. @var{configuration-file} is the server configuration +file or a derivation that builds it; when omitted, the result of +@code{xorg-configuration-file} is used. + +Usually the X server is started by a login manager. +@end deffn + +@deffn {Monadic Procedure} xorg-configuration-file @ + [#:drivers '()] [#:resolutions '()] [#:extra-config '()] +Return a configuration file for the Xorg server containing search paths for +all the common drivers. @var{drivers} must be either the empty list, in which case Xorg chooses a graphics driver automatically, or a list of driver names that will be tried in -this order---e.g., @code{("modesetting" "vesa")}. +this order---e.g., @code{(\"modesetting\" \"vesa\")}. Likewise, when @var{resolutions} is the empty list, Xorg chooses an appropriate screen resolution; otherwise, it must be a list of resolutions---e.g., @code{((1024 768) (640 480))}. + +Last, @var{extra-config} is a list of strings or objects appended to the +@code{text-file*} argument list. It is used to pass extra text to be added +verbatim to the configuration file. +@end deffn + +@node Desktop Services +@subsubsection Desktop Services + +The @code{(gnu services desktop)} module provides services that are +usually useful in the context of a ``desktop'' setup---that is, on a +machine running a graphical display server, possibly with graphical user +interfaces, etc. + +To simplify things, the module defines a variable containing the set of +services that users typically expect on a machine with a graphical +environment and networking: + +@defvr {Scheme Variable} %desktop-services +This is a list of services that builds upon @var{%base-services} and +adds or adjust services for a typical ``desktop'' setup. + +In particular, it adds a graphical login manager (@pxref{X Window, +@code{slim-service}}), a network management tool (@pxref{Networking +Services, @code{wicd-service}}), energy and color management services, +an NTP client and an SSH server (@pxref{Networking Services}), the Avahi +daemon, and has the name service switch service configured to be able to +use @code{nss-mdns} (@pxref{Name Service Switch, mDNS}). +@end defvr + +The @var{%desktop-services} variable can be used as the @code{services} +field of an @code{operating-system} declaration (@pxref{operating-system +Reference, @code{services}}). + +The actual service definitions provided by @code{(gnu services desktop)} +are described below. + +@deffn {Monadic Procedure} dbus-service @var{services} @ + [#:dbus @var{dbus}] +Return a service that runs the ``system bus'', using @var{dbus}, with +support for @var{services}. + +@uref{http://dbus.freedesktop.org/, D-Bus} is an inter-process communication +facility. Its system bus is used to allow system services to communicate +and be notified of system-wide events. + +@var{services} must be a list of packages that provide an +@file{etc/dbus-1/system.d} directory containing additional D-Bus configuration +and policy files. For example, to allow avahi-daemon to use the system bus, +@var{services} must be equal to @code{(list avahi)}. +@end deffn + +@deffn {Monadic Procedure} upower-service [#:upower @var{upower}] @ + [#:watts-up-pro? #f] @ + [#:poll-batteries? #t] @ + [#:ignore-lid? #f] @ + [#:use-percentage-for-policy? #f] @ + [#:percentage-low 10] @ + [#:percentage-critical 3] @ + [#:percentage-action 2] @ + [#:time-low 1200] @ + [#:time-critical 300] @ + [#:time-action 120] @ + [#:critical-power-action 'hybrid-sleep] +Return a service that runs @uref{http://upower.freedesktop.org/, +@command{upowerd}}, a system-wide monitor for power consumption and battery +levels, with the given configuration settings. It implements the +@code{org.freedesktop.UPower} D-Bus interface, and is notably used by +GNOME. +@end deffn + +@deffn {Monadic Procedure} colord-service [#:colord @var{colord}] +Return a service that runs @command{colord}, a system service with a D-Bus +interface to manage the color profiles of input and output devices such as +screens and scanners. It is notably used by the GNOME Color Manager graphical +tool. See @uref{http://www.freedesktop.org/software/colord/, the colord web +site} for more information. +@end deffn + +@node Database Services +@subsubsection Database Services + +The @code{(gnu services databases)} module provides the following service. + +@deffn {Monadic Procedure} postgresql-service [#:postgresql postgresql] @ + [#:config-file] [#:data-directory ``/var/lib/postgresql/data''] +Return a service that runs @var{postgresql}, the PostgreSQL database +server. + +The PostgreSQL daemon loads its runtime configuration from +@var{config-file} and stores the database cluster in +@var{data-directory}. @end deffn +@node Various Services +@subsubsection Various Services + +The @code{(gnu services lirc)} module provides the following service. + +@deffn {Monadic Procedure} lirc-service [#:lirc lirc] @ + [#:device #f] [#:driver #f] [#:config-file #f] @ + [#:extra-options '()] +Return a service that runs @url{http://www.lirc.org,LIRC}, a daemon that +decodes infrared signals from remote controls. + +Optionally, @var{device}, @var{driver} and @var{config-file} +(configuration file name) may be specified. See @command{lircd} manual +for details. + +Finally, @var{extra-options} is a list of additional command-line options +passed to @command{lircd}. +@end deffn + + @node Setuid Programs @subsection Setuid Programs @@ -4732,6 +5460,48 @@ Under the hood, the actual setuid programs are created in the files in this directory refer to the ``real'' binaries, which are in the store. +@node X.509 Certificates +@subsection X.509 Certificates + +@cindex HTTPS, certificates +@cindex X.509 certificates +@cindex TLS +Web servers available over HTTPS (that is, HTTP over the transport-layer +security mechanism, TLS) send client programs an @dfn{X.509 certificate} +that the client can then use to @emph{authenticate} the server. To do +that, clients verify that the server's certificate is signed by a +so-called @dfn{certificate authority} (CA). But to verify the CA's +signature, clients must have first acquired the CA's certificate. + +Web browsers such as GNU@tie{}IceCat include their own set of CA +certificates, such that they are able to verify CA signatures +out-of-the-box. + +However, most other programs that can talk HTTPS---@command{wget}, +@command{git}, @command{w3m}, etc.---need to be told where CA +certificates can be found. + +@cindex @code{nss-certs} +In GuixSD, this is done by adding a package that provides certificates +to the @code{packages} field of the @code{operating-system} declaration +(@pxref{operating-system Reference}). GuixSD includes one such package, +@code{nss-certs}, which is a set of CA certificates provided as part of +Mozilla's Network Security Services. + +Note that it is @emph{not} part of @var{%base-packages}, so you need to +explicitly add it. The @file{/etc/ssl/certs} directory, which is where +most applications and libraries look for certificates by default, points +to the certificates installed globally. + +Unprivileged users can also install their own certificate package in +their profile. A number of environment variables need to be defined so +that applications and libraries know where to find them. Namely, the +OpenSSL library honors the @code{SSL_CERT_DIR} and @code{SSL_CERT_FILE} +variables. Some applications add their own environment variables; for +instance, the Git version control system honors the certificate bundle +pointed to by the @code{GIT_SSL_CAINFO} environment variable. + + @node Name Service Switch @subsection Name Service Switch @@ -4753,9 +5523,12 @@ next method in the list. The NSS configuration is given in the @code{name-service-switch} field of @code{operating-system} declarations (@pxref{operating-system Reference, @code{name-service-switch}}). -@c See <http://0pointer.de/lennart/projects/nss-mdns/>. +@cindex nss-mdns +@cindex .local, host name lookup As an example, the declaration below configures the NSS to use the -@code{nss-mdns} back-end for host name lookups: +@uref{http://0pointer.de/lennart/projects/nss-mdns/, @code{nss-mdns} +back-end}, which supports host name lookups over multicast DNS (mDNS) +for host names ending in @code{.local}: @example (name-service-switch @@ -4781,6 +5554,53 @@ As an example, the declaration below configures the NSS to use the (name "mdns"))))) @end example +Don't worry: the @code{%mdns-host-lookup-nss} variable (see below) +contains this configuration, so you won't have to type it if all you +want is to have @code{.local} host lookup working. + +Note that, in this case, in addition to setting the +@code{name-service-switch} of the @code{operating-system} declaration, +@code{nscd-service} must be told where to find the @code{nss-mdns} +shared library (@pxref{Base Services, @code{nscd-service}}). Since the +@code{nscd} service is part of @var{%base-services}, you may want to +customize it by adding this snippet in the operating system +configuration file: + +@example +(use-modules (guix) (gnu)) + +(define %my-base-services + ;; Replace the default nscd service with one that knows + ;; about nss-mdns. + (map (lambda (mservice) + ;; "Bind" the MSERVICE monadic value to inspect it. + (mlet %store-monad ((service mservice)) + (if (member 'nscd (service-provision service)) + (nscd-service (nscd-configuration) + #:name-services (list nss-mdns)) + mservice))) + %base-services)) +@end example + +@noindent +@dots{} and then refer to @var{%my-base-services} instead of +@var{%base-services} in the @code{operating-system} declaration. +Lastly, this relies on the availability of the Avahi service +(@pxref{Networking Services, @code{avahi-service}}). + +For convenience, the following variables provide typical NSS +configurations. + +@defvr {Scheme Variable} %default-nss +This is the default name service switch configuration, a +@code{name-service-switch} object. +@end defvr + +@defvr {Scheme Variable} %mdns-host-lookup-nss +This is the name service switch configuration with support for host name +lookup over multicast DNS (mDNS) for host names ending in @code{.local}. +@end defvr + The reference for name service switch configuration is given below. It is a direct mapping of the C library's configuration file format, so please refer to the C library manual for more information (@pxref{NSS @@ -4790,11 +5610,6 @@ not only of adding this warm parenthetic feel that we like, but also static checks: you'll know about syntax errors and typos as soon as you run @command{guix system}. -@defvr {Scheme Variable} %default-nss -This is the default name service switch configuration, a -@code{name-service-switch} object. -@end defvr - @deftp {Data Type} name-service-switch This is the data type representation the configuration of libc's name @@ -5044,7 +5859,7 @@ This action does not actually install anything. @item init Populate the given directory with all the files necessary to run the operating system specified in @var{file}. This is useful for first-time -installations of GSD. For instance: +installations of GuixSD. For instance: @example guix system init my-os-config.scm /mnt @@ -5338,10 +6153,16 @@ facility is implemented in the @code{(gnu packages)} module. @cindex customization, of packages @cindex package module search path Users can store package definitions in modules with different -names---e.g., @code{(my-packages emacs)}. These package definitions +names---e.g., @code{(my-packages emacs)}@footnote{Note that the file +name and module name must match. For instance, the @code{(my-packages +emacs)} module must be stored in a @file{my-packages/emacs.scm} file +relative to the load path specified with @option{--load-path} or +@code{GUIX_PACKAGE_PATH}. @xref{Modules and the File System,,, +guile, GNU Guile Reference Manual}, for details.}. These package definitions will not be visible by default. Thus, users can invoke commands such as @command{guix package} and @command{guix build} have to be used with the -@code{-e} option so that they know where to find the package, or use the +@code{-e} option so that they know where to find the package. Better +yet, they can use the @code{-L} option of these commands to make those modules visible (@pxref{Invoking guix build, @code{--load-path}}), or define the @code{GUIX_PACKAGE_PATH} environment variable. This environment diff --git a/etc/completion/bash/guix b/etc/completion/bash/guix new file mode 100644 index 0000000000..e4d9a497b3 --- /dev/null +++ b/etc/completion/bash/guix @@ -0,0 +1,139 @@ +# GNU Guix --- Functional package management for GNU +# Copyright © 2015 Ludovic Courtès <ludo@gnu.org> +# +# This file is part of GNU Guix. +# +# GNU Guix is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or (at +# your option) any later version. +# +# GNU Guix is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +# Bash completion for Guix commands. + +_guix_complete_available_package () +{ + local prefix="$1" + local packages="$(${COMP_WORDS[0]} package -A "^$prefix" | cut -f1)" + COMPREPLY=($(compgen -W "$packages" -- "$prefix")) +} + +_guix_complete_installed_package () +{ + local prefix="$1" + local packages="$(${COMP_WORDS[0]} package -I "^$prefix" | cut -f1)" + COMPREPLY=($(compgen -W "$packages" -- "$prefix")) +} + +_guix_complete_option () +{ + local options="$(${COMP_WORDS[0]} ${COMP_WORDS[1]} --help \ + | grep '^ \+-' \ + | sed -e's/^.*--\([a-zA-Z0-9_-]\+\)\(=\?\).*/--\1\2/g' )" + compopt -o nospace + COMPREPLY=($(compgen -W "$options" -- "${COMP_WORDS[$word_count - 1]}")) +} + +_guix_is_command () +{ + local word + local result="false" + for word in ${COMP_WORDS[*]} + do + if [ "$word" = "$1" ] + then + result=true + break + fi + done + $result +} + +_guix_is_removing () +{ + local word + local result="false" + for word in ${COMP_WORDS[*]} + do + case "$word" in + --remove|--remove=*|-r) + result=true + break + ;; + esac + done + $result +} + +_guix_is_dash_L () +{ + [ "${COMP_WORDS[$COMP_CWORD - 1]}" = "-L" ] \ + || { case "${COMP_WORDS[$COMP_CWORD]}" in + --load-path=*) true;; + *) false;; + esac } +} + +_guix_complete_file () +{ + # Let Readline complete file names. + compopt -o default + COMPREPLY=() +} + +_guix_complete () +{ + local word_count=${#COMP_WORDS[*]} + local word_at_point="${COMP_WORDS[$COMP_CWORD]}" + + if [ "$COMP_CWORD" -gt 1 ] + then + case "$word_at_point" in + -*) + _guix_complete_option "$word_at_point" + return + ;; + esac + fi + + case $COMP_CWORD in + 1) + local subcommands="$(guix --help | grep '^ ' | cut -c 2-)" + COMPREPLY=($(compgen -W "$subcommands" -- "$word_at_point")) + ;; + *) + if _guix_is_command "package" + then + if _guix_is_dash_L + then + _guix_complete_file + elif _guix_is_removing + then + _guix_complete_installed_package "$word_at_point" + else + _guix_complete_available_package "$word_at_point" + fi + elif _guix_is_command "system" + then + _guix_complete_file # TODO: complete sub-commands + elif _guix_is_command "hash" + then + _guix_complete_file + elif _guix_is_command "import" # TODO: complete sub-commands + then + _guix_complete_file + else + _guix_complete_available_package "$word_at_point" + fi + ;; + esac +} + +complete -F _guix_complete guix diff --git a/gnu-system.am b/gnu-system.am index 2bed50fc40..23113bb16c 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -38,6 +38,7 @@ GNU_SYSTEM_MODULES = \ gnu/packages/asciidoc.scm \ gnu/packages/aspell.scm \ gnu/packages/attr.scm \ + gnu/packages/audacity.scm \ gnu/packages/audio.scm \ gnu/packages/autogen.scm \ gnu/packages/autotools.scm \ @@ -92,6 +93,7 @@ GNU_SYSTEM_MODULES = \ gnu/packages/enchant.scm \ gnu/packages/engineering.scm \ gnu/packages/enlightenment.scm \ + gnu/packages/fcitx.scm \ gnu/packages/feh.scm \ gnu/packages/file.scm \ gnu/packages/firmware.scm \ @@ -122,6 +124,7 @@ GNU_SYSTEM_MODULES = \ gnu/packages/gl.scm \ gnu/packages/glib.scm \ gnu/packages/gnome.scm \ + gnu/packages/gnucash.scm \ gnu/packages/gnunet.scm \ gnu/packages/gnupg.scm \ gnu/packages/gnustep.scm \ @@ -146,6 +149,7 @@ GNU_SYSTEM_MODULES = \ gnu/packages/haskell.scm \ gnu/packages/hugs.scm \ gnu/packages/hurd.scm \ + gnu/packages/ibus.scm \ gnu/packages/icu4c.scm \ gnu/packages/idutils.scm \ gnu/packages/image.scm \ @@ -155,11 +159,12 @@ GNU_SYSTEM_MODULES = \ gnu/packages/irssi.scm \ gnu/packages/iso-codes.scm \ gnu/packages/java.scm \ + gnu/packages/jemalloc.scm \ gnu/packages/jrnl.scm \ + gnu/packages/julia.scm \ gnu/packages/kde.scm \ gnu/packages/key-mon.scm \ gnu/packages/language.scm \ - gnu/packages/ld-wrapper.scm \ gnu/packages/less.scm \ gnu/packages/lesstif.scm \ gnu/packages/libcanberra.scm \ @@ -169,8 +174,10 @@ GNU_SYSTEM_MODULES = \ gnu/packages/libffcall.scm \ gnu/packages/libffi.scm \ gnu/packages/libftdi.scm \ + gnu/packages/calendar.scm \ gnu/packages/libidn.scm \ gnu/packages/libphidget.scm \ + gnu/packages/libreoffice.scm \ gnu/packages/libsigsegv.scm \ gnu/packages/libunistring.scm \ gnu/packages/libusb.scm \ @@ -179,6 +186,7 @@ GNU_SYSTEM_MODULES = \ gnu/packages/lightning.scm \ gnu/packages/links.scm \ gnu/packages/linux.scm \ + gnu/packages/lirc.scm \ gnu/packages/lisp.scm \ gnu/packages/llvm.scm \ gnu/packages/lout.scm \ @@ -211,6 +219,7 @@ GNU_SYSTEM_MODULES = \ gnu/packages/ncurses.scm \ gnu/packages/netpbm.scm \ gnu/packages/nettle.scm \ + gnu/packages/networking.scm \ gnu/packages/ninja.scm \ gnu/packages/node.scm \ gnu/packages/noweb.scm \ @@ -218,7 +227,7 @@ GNU_SYSTEM_MODULES = \ gnu/packages/nutrition.scm \ gnu/packages/nvi.scm \ gnu/packages/ocaml.scm \ - gnu/packages/ocrad.scm \ + gnu/packages/ocr.scm \ gnu/packages/onc-rpc.scm \ gnu/packages/openbox.scm \ gnu/packages/openldap.scm \ @@ -267,13 +276,13 @@ GNU_SYSTEM_MODULES = \ gnu/packages/slang.scm \ gnu/packages/slim.scm \ gnu/packages/smalltalk.scm \ - gnu/packages/socat.scm \ gnu/packages/ssh.scm \ gnu/packages/stalonetray.scm \ gnu/packages/statistics.scm \ gnu/packages/swig.scm \ gnu/packages/sxiv.scm \ gnu/packages/synergy.scm \ + gnu/packages/task-management.scm \ gnu/packages/tbb.scm \ gnu/packages/tcl.scm \ gnu/packages/tcsh.scm \ @@ -285,6 +294,7 @@ GNU_SYSTEM_MODULES = \ gnu/packages/tmux.scm \ gnu/packages/tor.scm \ gnu/packages/tre.scm \ + gnu/packages/tv.scm \ gnu/packages/unrtf.scm \ gnu/packages/upnp.scm \ gnu/packages/uucp.scm \ @@ -297,6 +307,7 @@ GNU_SYSTEM_MODULES = \ gnu/packages/w3m.scm \ gnu/packages/wdiff.scm \ gnu/packages/web.scm \ + gnu/packages/webkit.scm \ gnu/packages/weechat.scm \ gnu/packages/wget.scm \ gnu/packages/wicd.scm \ @@ -320,8 +331,10 @@ GNU_SYSTEM_MODULES = \ gnu/services.scm \ gnu/services/avahi.scm \ gnu/services/base.scm \ - gnu/services/dbus.scm \ + gnu/services/databases.scm \ + gnu/services/desktop.scm \ gnu/services/dmd.scm \ + gnu/services/lirc.scm \ gnu/services/networking.scm \ gnu/services/ssh.scm \ gnu/services/xorg.scm \ @@ -365,6 +378,7 @@ dist_patch_DATA = \ gnu/packages/patches/ath9k-htc-firmware-binutils.patch \ gnu/packages/patches/ath9k-htc-firmware-gcc.patch \ gnu/packages/patches/ath9k-htc-firmware-objcopy.patch \ + gnu/packages/patches/audacity-fix-ffmpeg-binding.patch \ gnu/packages/patches/automake-skip-amhello-tests.patch \ gnu/packages/patches/avahi-localstatedir.patch \ gnu/packages/patches/avrdude-fix-libusb.patch \ @@ -373,7 +387,9 @@ dist_patch_DATA = \ gnu/packages/patches/bigloo-gc-shebangs.patch \ gnu/packages/patches/binutils-ld-new-dtags.patch \ gnu/packages/patches/binutils-loongson-workaround.patch \ + gnu/packages/patches/bitlbee-configure-doc-fix.patch \ gnu/packages/patches/calibre-drop-unrar.patch \ + gnu/packages/patches/calibre-no-updates-dialog.patch \ gnu/packages/patches/cdparanoia-fpic.patch \ gnu/packages/patches/chmlib-inttypes.patch \ gnu/packages/patches/clucene-pkgconfig.patch \ @@ -390,7 +406,6 @@ dist_patch_DATA = \ gnu/packages/patches/cssc-gets-undeclared.patch \ gnu/packages/patches/cssc-missing-include.patch \ gnu/packages/patches/clucene-contribs-lib.patch \ - gnu/packages/patches/curl-gss-api-fix.patch \ gnu/packages/patches/cursynth-wave-rand.patch \ gnu/packages/patches/dbus-localstatedir.patch \ gnu/packages/patches/diffutils-gets-undeclared.patch \ @@ -399,12 +414,22 @@ dist_patch_DATA = \ gnu/packages/patches/doxygen-tmake.patch \ gnu/packages/patches/duplicity-piped-password.patch \ gnu/packages/patches/duplicity-test_selection-tmp.patch \ + gnu/packages/patches/elfutils-tests-ptrace.patch \ + gnu/packages/patches/emacs-exec-path.patch \ gnu/packages/patches/eudev-rules-directory.patch \ gnu/packages/patches/findutils-absolute-paths.patch \ gnu/packages/patches/flashrom-use-libftdi1.patch \ gnu/packages/patches/flex-bison-tests.patch \ + gnu/packages/patches/fltk-shared-lib-defines.patch \ + gnu/packages/patches/fuse-CVE-2015-3202.patch \ gnu/packages/patches/gawk-shell.patch \ + gnu/packages/patches/gcc-arm-link-spec-fix.patch \ gnu/packages/patches/gcc-cross-environment-variables.patch \ + gnu/packages/patches/gcc-libvtv-runpath.patch \ + gnu/packages/patches/gcc-5.0-libvtv-runpath.patch \ + gnu/packages/patches/geoclue-config.patch \ + gnu/packages/patches/ghostscript-runpath.patch \ + gnu/packages/patches/gitolite-openssh-6.8-compat.patch \ gnu/packages/patches/glib-tests-desktop.patch \ gnu/packages/patches/glib-tests-homedir.patch \ gnu/packages/patches/glib-tests-prlimit.patch \ @@ -414,22 +439,32 @@ dist_patch_DATA = \ gnu/packages/patches/glibc-ldd-x86_64.patch \ gnu/packages/patches/glibc-locales.patch \ gnu/packages/patches/gmp-arm-asm-nothumb.patch \ + gnu/packages/patches/gnutls-fix-duplicate-manpages.patch \ gnu/packages/patches/gobject-introspection-absolute-shlib-path.patch \ gnu/packages/patches/gobject-introspection-cc.patch \ gnu/packages/patches/gobject-introspection-girepository.patch \ gnu/packages/patches/grep-CVE-2015-1345.patch \ gnu/packages/patches/grub-gets-undeclared.patch \ gnu/packages/patches/grub-freetype.patch \ - gnu/packages/patches/gstreamer-0.10-bison3.patch \ - gnu/packages/patches/gstreamer-0.10-silly-test.patch \ gnu/packages/patches/guile-1.8-cpp-4.5.patch \ gnu/packages/patches/guile-arm-fixes.patch \ gnu/packages/patches/guile-default-utf8.patch \ gnu/packages/patches/guile-linux-syscalls.patch \ gnu/packages/patches/guile-relocatable.patch \ - gnu/packages/patches/guix-test-networking.patch \ gnu/packages/patches/gtkglext-disable-disable-deprecated.patch \ gnu/packages/patches/hop-bigloo-4.0b.patch \ + gnu/packages/patches/hop-linker-flags.patch \ + gnu/packages/patches/icecat-CVE-2015-0797.patch \ + gnu/packages/patches/icecat-CVE-2015-2708-pt1.patch \ + gnu/packages/patches/icecat-CVE-2015-2708-pt2.patch \ + gnu/packages/patches/icecat-CVE-2015-2708-pt3.patch \ + gnu/packages/patches/icecat-CVE-2015-2708-pt4.patch \ + gnu/packages/patches/icecat-CVE-2015-2710-pt1.patch \ + gnu/packages/patches/icecat-CVE-2015-2710-pt2.patch \ + gnu/packages/patches/icecat-CVE-2015-2710-pt3.patch \ + gnu/packages/patches/icecat-CVE-2015-2713-pt1.patch \ + gnu/packages/patches/icecat-CVE-2015-2713-pt2.patch \ + gnu/packages/patches/icecat-CVE-2015-2716.patch \ gnu/packages/patches/irrlicht-mesa-10.patch \ gnu/packages/patches/jbig2dec-ignore-testtest.patch \ gnu/packages/patches/kmod-module-directory.patch \ @@ -442,13 +477,13 @@ dist_patch_DATA = \ gnu/packages/patches/libevent-dns-tests.patch \ gnu/packages/patches/liboop-mips64-deplibs-fix.patch \ gnu/packages/patches/libmad-mips-newgcc.patch \ - gnu/packages/patches/librep-rules.mk.patch \ gnu/packages/patches/libtheora-config-guess.patch \ - gnu/packages/patches/libtool-skip-tests.patch \ + gnu/packages/patches/libtool-skip-tests2.patch \ gnu/packages/patches/libssh-CVE-2014-0017.patch \ gnu/packages/patches/libvpx-fix-armhf-link.patch \ gnu/packages/patches/libvpx-fix-ssse3-quantize.patch \ gnu/packages/patches/libvpx-vp9-out-of-bounds-access.patch \ + gnu/packages/patches/lirc-localstatedir.patch \ gnu/packages/patches/lm-sensors-hwmon-attrs.patch \ gnu/packages/patches/lua51-liblua-so.patch \ gnu/packages/patches/luajit-no_ldconfig.patch \ @@ -461,6 +496,7 @@ dist_patch_DATA = \ gnu/packages/patches/mhash-keygen-test-segfault.patch \ gnu/packages/patches/mit-krb5-init-fix.patch \ gnu/packages/patches/mpc123-initialize-ao.patch \ + gnu/packages/patches/mplayer2-theora-fix.patch \ gnu/packages/patches/module-init-tools-moduledir.patch \ gnu/packages/patches/mupdf-buildsystem-fix.patch \ gnu/packages/patches/mutt-CVE-2014-9116.patch \ @@ -473,58 +509,85 @@ dist_patch_DATA = \ gnu/packages/patches/nvi-dbpagesize-binpower.patch \ gnu/packages/patches/nvi-db4.patch \ gnu/packages/patches/openexr-missing-samples.patch \ + gnu/packages/patches/openssl-runpath.patch \ gnu/packages/patches/orpheus-cast-errors-and-includes.patch \ gnu/packages/patches/ots-no-include-missing-file.patch \ gnu/packages/patches/patchelf-page-size.patch \ gnu/packages/patches/patchelf-rework-for-arm.patch \ gnu/packages/patches/patchutils-xfail-gendiff-tests.patch \ gnu/packages/patches/pavucontrol-sigsegv.patch \ + gnu/packages/patches/perl-gd-options-passthrough-and-fontconfig.patch \ + gnu/packages/patches/perl-module-pluggable-search.patch \ + gnu/packages/patches/perl-net-amazon-s3-moose-warning.patch \ gnu/packages/patches/perl-no-sys-dirs.patch \ gnu/packages/patches/perl-tk-x11-discover.patch \ gnu/packages/patches/petsc-fix-threadcomm.patch \ gnu/packages/patches/pingus-sdl-libs-config.patch \ gnu/packages/patches/plotutils-libpng-jmpbuf.patch \ gnu/packages/patches/polkit-drop-test.patch \ + gnu/packages/patches/portaudio-audacity-compat.patch \ gnu/packages/patches/procps-make-3.82.patch \ gnu/packages/patches/pulseaudio-fix-mult-test.patch \ + gnu/packages/patches/pulseaudio-longer-test-timeout.patch \ + gnu/packages/patches/pycairo-wscript.patch \ gnu/packages/patches/pybugz-encode-error.patch \ gnu/packages/patches/pybugz-stty.patch \ gnu/packages/patches/pyqt-configure.patch \ gnu/packages/patches/python-fix-tests.patch \ gnu/packages/patches/python-libffi-mips-n32-fix.patch \ - gnu/packages/patches/python-sqlite-3.8.4-test-fix.patch \ gnu/packages/patches/python2-rdflib-drop-sparqlwrapper.patch \ gnu/packages/patches/python2-sqlite-3.8.4-test-fix.patch \ gnu/packages/patches/python2-pygobject-2-gi-info-type-error-domain.patch \ + gnu/packages/patches/qemu-CVE-2015-3456.patch \ + gnu/packages/patches/qt4-ldflags.patch \ gnu/packages/patches/qt4-tests.patch \ + gnu/packages/patches/qt5-conflicting-typedefs.patch \ + gnu/packages/patches/qt5-runpath.patch \ + gnu/packages/patches/r-fix-15899.patch \ gnu/packages/patches/ratpoison-shell.patch \ gnu/packages/patches/readline-link-ncurses.patch \ gnu/packages/patches/ripperx-libm.patch \ gnu/packages/patches/scheme48-tests.patch \ gnu/packages/patches/scotch-test-threading.patch \ gnu/packages/patches/sdl-libx11-1.6.patch \ + gnu/packages/patches/serf-comment-style-fix.patch \ + gnu/packages/patches/serf-deflate-buckets-test-fix.patch \ gnu/packages/patches/slim-session.patch \ gnu/packages/patches/slim-config.patch \ gnu/packages/patches/slim-sigusr1.patch \ gnu/packages/patches/soprano-find-clucene.patch \ - gnu/packages/patches/source-highlight-regexrange-test.patch \ + gnu/packages/patches/subversion-sqlite-3.8.9-fix.patch \ gnu/packages/patches/superlu-dist-scotchmetis.patch \ gnu/packages/patches/tcsh-fix-autotest.patch \ gnu/packages/patches/teckit-cstdio.patch \ gnu/packages/patches/texi2html-document-encoding.patch \ gnu/packages/patches/texi2html-i18n.patch \ - gnu/packages/patches/udev-gir-libtool.patch \ + gnu/packages/patches/tvtime-gcc41.patch \ + gnu/packages/patches/tvtime-pngoutput.patch \ + gnu/packages/patches/tvtime-videodev2.patch \ + gnu/packages/patches/tvtime-xmltv.patch \ gnu/packages/patches/unzip-CVE-2014-8139.patch \ gnu/packages/patches/unzip-CVE-2014-8140.patch \ gnu/packages/patches/unzip-CVE-2014-8141.patch \ gnu/packages/patches/util-linux-tests.patch \ + gnu/packages/patches/upower-builddir.patch \ gnu/packages/patches/valgrind-glibc-2.21.patch \ gnu/packages/patches/vpnc-script.patch \ gnu/packages/patches/vtk-mesa-10.patch \ gnu/packages/patches/w3m-fix-compile.patch \ + gnu/packages/patches/webkitgtk-2.4.8-gmutexlocker.patch \ gnu/packages/patches/weex-vacopy.patch \ + gnu/packages/patches/wicd-template-instantiation.patch \ gnu/packages/patches/wicd-urwid-1.3.patch \ gnu/packages/patches/wmctrl-64-fix.patch \ + gnu/packages/patches/wpa-supplicant-CVE-2015-1863.patch \ + gnu/packages/patches/wpa-supplicant-2015-2-fix.patch \ + gnu/packages/patches/wpa-supplicant-2015-3-fix.patch \ + gnu/packages/patches/wpa-supplicant-2015-4-fix-pt1.patch \ + gnu/packages/patches/wpa-supplicant-2015-4-fix-pt2.patch \ + gnu/packages/patches/wpa-supplicant-2015-4-fix-pt3.patch \ + gnu/packages/patches/wpa-supplicant-2015-4-fix-pt4.patch \ + gnu/packages/patches/wpa-supplicant-2015-4-fix-pt5.patch \ gnu/packages/patches/xf86-video-ark-remove-mibstore.patch \ gnu/packages/patches/xf86-video-ast-remove-mibstore.patch \ gnu/packages/patches/xf86-video-geode-glibc-2.20.patch \ @@ -538,6 +601,7 @@ dist_patch_DATA = \ gnu/packages/patches/xf86-video-openchrome-glibc-2.20.patch \ gnu/packages/patches/xf86-video-r128-glibc-2.20.patch \ gnu/packages/patches/xf86-video-siliconmotion-remove-mibstore.patch \ + gnu/packages/patches/xf86-video-sis-fix-exa-crash.patch \ gnu/packages/patches/xf86-video-sis-update-api.patch \ gnu/packages/patches/xf86-video-tdfx-remove-mibstore.patch \ gnu/packages/patches/xf86-video-tga-remove-mibstore.patch \ @@ -547,6 +611,9 @@ dist_patch_DATA = \ gnu/packages/patches/xmodmap-asprintf.patch \ gnu/packages/patches/zathura-plugindir-environment-variable.patch +MISC_DISTRO_FILES = \ + gnu/packages/ld-wrapper.in + bootstrapdir = $(guilemoduledir)/gnu/packages/bootstrap bootstrap_x86_64_linuxdir = $(bootstrapdir)/x86_64-linux bootstrap_i686_linuxdir = $(bootstrapdir)/i686-linux diff --git a/gnu/artwork.scm b/gnu/artwork.scm index c3b1695ba7..94c89143a6 100644 --- a/gnu/artwork.scm +++ b/gnu/artwork.scm @@ -32,9 +32,9 @@ (method git-fetch) (uri (git-reference (url "git://git.savannah.gnu.org/guix/guix-artwork.git") - (commit "61ae7c8"))) + (commit "6998d30"))) (sha256 (base32 - "102fxk2l6b0ibry3n430q8ljhwrnbml9qgalzkz6v09r7sx6a532")))) + "0k7j3pj9s3zqiqmfkapypssvzx3f12yr0cc2rbzxqfii0b4clp1j")))) ;;; artwork.scm ends here diff --git a/gnu/build/activation.scm b/gnu/build/activation.scm index 909e971833..352e736050 100644 --- a/gnu/build/activation.scm +++ b/gnu/build/activation.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> ;;; ;;; This file is part of GNU Guix. @@ -30,6 +30,7 @@ activate-/bin/sh activate-modprobe activate-firmware + activate-ptrace-attach activate-current-system)) ;;; Commentary: @@ -40,6 +41,24 @@ ;;; ;;; Code: +(define (enumerate thunk) + "Return the list of values returned by THUNK until it returned #f." + (let loop ((entry (thunk)) + (result '())) + (if (not entry) + (reverse result) + (loop (thunk) (cons entry result))))) + +(define (current-users) + "Return the passwd entries for all the currently defined user accounts." + (setpw) + (enumerate getpwent)) + +(define (current-groups) + "Return the group entries for all the currently defined user groups." + (setgr) + (enumerate getgrent)) + (define* (add-group name #:key gid password system? (log-port (current-error-port))) "Add NAME as a user group, with the given numeric GID if specified." @@ -59,6 +78,11 @@ (define (dot-or-dot-dot? file) (member file '("." ".."))) +(define (make-file-writable file) + "Make FILE writable for its owner.." + (let ((stat (lstat file))) ;XXX: symlinks + (chmod file (logior #o600 (stat:perms stat))))) + (define* (copy-account-skeletons home #:optional (directory %skeleton-directory)) "Copy the account skeletons from DIRECTORY to HOME." @@ -66,8 +90,21 @@ string<?))) (mkdir-p home) (for-each (lambda (file) - (copy-file (string-append directory "/" file) - (string-append home "/" file))) + (let ((target (string-append home "/" file))) + (copy-file (string-append directory "/" file) target) + (make-file-writable target))) + files))) + +(define* (make-skeletons-writable home + #:optional (directory %skeleton-directory)) + "Make sure that the files that have been copied from DIRECTORY to HOME are +owner-writable in HOME." + (let ((files (scandir directory (negate dot-or-dot-dot?) + string<?))) + (for-each (lambda (file) + (let ((target (string-append home "/" file))) + (when (file-exists? target) + (make-file-writable target)))) files))) (define* (add-user name group @@ -109,7 +146,14 @@ properties. Return #t on success." ,@(if password `("-p" ,password) '()) ,@(if system? '("--system") '()) ,name))) - (zero? (apply system* "useradd" args))))) + (and (zero? (apply system* "useradd" args)) + (begin + ;; Since /etc/skel is a link to a directory in the store where + ;; all files have the writable bit cleared, and since 'useradd' + ;; preserves permissions when it copies them, explicitly make + ;; them writable. + (make-skeletons-writable home) + #t))))) (define* (modify-user name group #:key uid comment home shell password system? @@ -128,6 +172,17 @@ properties. Return #t on success." ,name))) (zero? (apply system* "usermod" args)))) +(define* (delete-user name #:key (log-port (current-error-port))) + "Remove user account NAME. Return #t on success. This may fail if NAME is +logged in." + (format log-port "deleting user '~a'...~%" name) + (zero? (system* "userdel" name))) + +(define* (delete-group name #:key (log-port (current-error-port))) + "Remove group NAME. Return #t on success." + (format log-port "deleting group '~a'...~%" name) + (zero? (system* "groupdel" name))) + (define* (ensure-user name group #:key uid comment home shell password system? (supplementary-groups '()) @@ -186,8 +241,22 @@ numeric gid or #f." #:system? system?)))) groups) - ;; Finally create the other user accounts. - (for-each activate-user users)) + ;; Create the other user accounts. + (for-each activate-user users) + + ;; Finally, delete extra user accounts and groups. + (for-each delete-user + (lset-difference string=? + (map passwd:name (current-users)) + (match users + (((names . _) ...) + names)))) + (for-each delete-group + (lset-difference string=? + (map group:name (current-groups)) + (match groups + (((names . _) ...) + names))))) (define (activate-etc etc) "Install ETC, a directory in the store, as the source of static files for @@ -292,6 +361,20 @@ by itself, without having to resort to a \"user helper\"." (lambda (port) (display directory port)))) +(define (activate-ptrace-attach) + "Allow users to PTRACE_ATTACH their own processes. + +This works around a regression introduced in the default \"security\" policy +found in Linux 3.4 onward that prevents users from attaching to their own +processes--see Yama.txt in the Linux source tree for the rationale. This +sounds like an unacceptable restriction for little or no security +improvement." + (let ((file "/proc/sys/kernel/yama/ptrace_scope")) + (when (file-exists? file) + (call-with-output-file file + (lambda (port) + (display 0 port)))))) + (define %current-system ;; The system that is current (a symlink.) This is not necessarily the same diff --git a/gnu/build/file-systems.scm b/gnu/build/file-systems.scm index 38e4851515..dc99d60d3d 100644 --- a/gnu/build/file-systems.scm +++ b/gnu/build/file-systems.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -55,6 +55,7 @@ (define MS_NOSUID 2) (define MS_NODEV 4) (define MS_NOEXEC 8) +(define MS_REMOUNT 32) (define MS_BIND 4096) (define MS_MOVE 8192) @@ -280,13 +281,21 @@ run a file system check." (match spec ((source title mount-point type (flags ...) options check?) (let ((source (canonicalize-device-spec source title)) - (mount-point (string-append root "/" mount-point))) + (mount-point (string-append root "/" mount-point)) + (flags (mount-flags->bit-mask flags))) (when check? (check-file-system source type)) (mkdir-p mount-point) - (mount source mount-point type (mount-flags->bit-mask flags) + (mount source mount-point type flags (if options (string->pointer options) - %null-pointer)))))) + %null-pointer)) + + ;; For read-only bind mounts, an extra remount is needed, as per + ;; <http://lwn.net/Articles/281157/>, which still applies to Linux 4.0. + (when (and (= MS_BIND (logand flags MS_BIND)) + (= MS_RDONLY (logand flags MS_RDONLY))) + (mount source mount-point type (logior MS_BIND MS_REMOUNT MS_RDONLY) + %null-pointer)))))) ;;; file-systems.scm ends here diff --git a/gnu/build/install.scm b/gnu/build/install.scm index aa901f6971..76536daf49 100644 --- a/gnu/build/install.scm +++ b/gnu/build/install.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -18,12 +18,14 @@ (define-module (gnu build install) #:use-module (guix build utils) + #:use-module (guix build store-copy) #:use-module (srfi srfi-26) #:use-module (ice-9 match) #:export (install-grub populate-root-file-system reset-timestamps - register-closure)) + register-closure + populate-single-profile-directory)) ;;; Commentary: ;;; @@ -118,6 +120,8 @@ STORE." (directory "/bin") (directory "/tmp" 0 0 #o1777) ; sticky bit + (directory "/var/tmp" 0 0 #o1777) + (directory "/var/lock" 0 0 #o1777) (directory "/root" 0 0) ; an exception (directory "/home" 0 0))) @@ -156,4 +160,43 @@ by 'guix-register'. As a side effect, this resets timestamps on store files." (unless (zero? status) (error "failed to register store items" closure)))) +(define* (populate-single-profile-directory directory + #:key profile closure) + "Populate DIRECTORY with a store containing PROFILE, whose closure is given +in the file called CLOSURE (as generated by #:references-graphs.) DIRECTORY +is initialized to contain a single profile under /root pointing to PROFILE. +This is used to create the self-contained Guix tarball." + (define (scope file) + (string-append directory "/" file)) + + (define %root-profile + "/var/guix/profiles/per-user/root") + + (define (mkdir-p* dir) + (mkdir-p (scope dir))) + + (define (symlink* old new) + (symlink old (scope new))) + + ;; Populate the store. + (populate-store (list closure) directory) + (register-closure (canonicalize-path directory) closure) + + ;; XXX: 'guix-register' registers profiles as GC roots but the symlink + ;; target uses $TMPDIR. Fix that. + (delete-file (scope "/var/guix/gcroots/profiles")) + (symlink* "/var/guix/profiles" + "/var/guix/gcroots/profiles") + + ;; Make root's profile, which makes it a GC root. + (mkdir-p* %root-profile) + (symlink* profile + (string-append %root-profile "/guix-profile-1-link")) + (symlink* (string-append %root-profile "/guix-profile-1-link") + (string-append %root-profile "/guix-profile")) + + (mkdir-p* "/root") + (symlink* (string-append %root-profile "/guix-profile") + "/root/.guix-profile")) + ;;; install.scm ends here diff --git a/gnu/packages.scm b/gnu/packages.scm index 57a3e21bd6..9eb4877be8 100644 --- a/gnu/packages.scm +++ b/gnu/packages.scm @@ -35,7 +35,7 @@ #:use-module (srfi srfi-39) #:export (search-patch search-bootstrap-binary - %patch-directory + %patch-path %bootstrap-binaries-path %package-module-path @@ -160,9 +160,15 @@ Optionally, narrow the search to SUB-DIRECTORY." (string-length directory)) (filter-map (lambda (file) - (let ((file (substring file prefix-len))) - (false-if-exception - (resolve-interface (file-name->module-name file))))) + (let* ((file (substring file prefix-len)) + (module (file-name->module-name file))) + (catch #t + (lambda () + (resolve-interface module)) + (lambda args + ;; Report the error, but keep going. + (warn-about-load-error module args) + #f)))) (scheme-files (if sub-directory (string-append directory "/" sub-directory) directory)))) @@ -205,14 +211,18 @@ same package twice." (let ((packages (delay (fold-packages (lambda (p r) (vhash-cons (package-name p) p r)) - vlist-null)))) + vlist-null))) + (version>? (lambda (p1 p2) + (version>? (package-version p1) (package-version p2))))) (lambda* (name #:optional version) "Return the list of packages with the given NAME. If VERSION is not #f, -then only return packages whose version is equal to VERSION." - (let ((matching (vhash-fold* cons '() name (force packages)))) +then only return packages whose version is prefixed by VERSION, sorted in +decreasing version order." + (let ((matching (sort (vhash-fold* cons '() name (force packages)) + version>?))) (if version (filter (lambda (package) - (string=? (package-version package) version)) + (string-prefix? version (package-version package))) matching) matching))))) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 95b0c9f007..a96ce9cdfb 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -55,7 +55,8 @@ #:use-module (gnu packages libftdi) #:use-module (gnu packages image) #:use-module (gnu packages xorg) - #:use-module (gnu packages python)) + #:use-module (gnu packages python) + #:use-module (gnu packages man)) (define-public dmd (package @@ -151,14 +152,14 @@ re-executing them as necessary.") (define-public inetutils (package (name "inetutils") - (version "1.9.2") + (version "1.9.3") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/inetutils/inetutils-" version ".tar.gz")) (sha256 (base32 - "04wrm0v7l4890mmbaawd6wjwdv08bkglgqhpz0q4dkb0l50fl8q4")))) + "06dshajjpyi9sxi7qfki9gnp5r3nxvyvf81r81gx0x2qkqzqcxlj")))) (build-system gnu-build-system) (arguments `(;; FIXME: `tftp.sh' relies on `netstat' from utils-linux, ;; which is currently missing. @@ -687,7 +688,7 @@ commands and their arguments.") (define-public wpa-supplicant-light (package (name "wpa-supplicant-light") - (version "2.3") + (version "2.4") (source (origin (method url-fetch) (uri (string-append @@ -696,7 +697,16 @@ commands and their arguments.") ".tar.gz")) (sha256 (base32 - "0skvkl6c10ls4s48b2wmf47h9j1y40nlzxnzn8hyaw2j0prmpapa")))) + "08li21q1wjn5chrv289w666il9ah1w419y3dkq2rl4wnq0rci385")) + (patches + (map search-patch '("wpa-supplicant-CVE-2015-1863.patch" + "wpa-supplicant-2015-2-fix.patch" + "wpa-supplicant-2015-3-fix.patch" + "wpa-supplicant-2015-4-fix-pt1.patch" + "wpa-supplicant-2015-4-fix-pt2.patch" + "wpa-supplicant-2015-4-fix-pt3.patch" + "wpa-supplicant-2015-4-fix-pt4.patch" + "wpa-supplicant-2015-4-fix-pt5.patch"))))) (build-system gnu-build-system) (arguments '(#:phases (alist-replace @@ -783,7 +793,15 @@ This package provides the 'wpa_supplicant' daemon and the 'wpa_cli' command.") CONFIG_CTRL_IFACE_DBUS_INTRO=y\n" port) (close-port port)) #t) - ,phases)))))) + (alist-cons-after + 'install-man-pages 'install-dbus-conf + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (dir (string-append out "/etc/dbus-1/system.d"))) + (mkdir-p dir) + (copy-file "dbus/dbus-wpa_supplicant.conf" + (string-append dir "/wpa_supplicant.conf")))) + ,phases))))))) (define-public wakelan (package @@ -856,7 +874,7 @@ module slots, and the list of I/O ports (e.g. serial, parallel, USB).") (define-public acpica (package (name "acpica") - (version "20140724") + (version "20150410") (source (origin (method url-fetch) (uri (string-append @@ -864,7 +882,7 @@ module slots, and the list of I/O ports (e.g. serial, parallel, USB).") version ".tar.gz")) (sha256 (base32 - "01vdgrh7dsxrrvg5yd8sxm63cw8210pnsi5qg9g15ac53gn243ac")))) + "0q1fjwkyw9x6gsva6fd0zbn7ly4fx0ha4853f416np9kf2irillw")))) (build-system gnu-build-system) (native-inputs `(("flex" ,flex) ("bison" ,bison))) diff --git a/gnu/packages/apl.scm b/gnu/packages/apl.scm index 7da3b5eb4a..7573870a4c 100644 --- a/gnu/packages/apl.scm +++ b/gnu/packages/apl.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org> -;;; Copyright © 2014 Mark H Weaver <mhw@netris.org> +;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -30,14 +30,14 @@ (define-public apl (package (name "apl") - (version "1.4") + (version "1.5") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/apl/apl-" version ".tar.gz")) (sha256 (base32 - "0fl9l4jb5wpnb54kqkphavi657z1cv15h9qj2rqy2shf33dk3nk9")))) + "0h4diq3wfbdwxp5nm0z4b0p1zq13lwip0y7v28r9v0mbbk8xsfh1")))) (build-system gnu-build-system) (home-page "http://www.gnu.org/software/apl/") (inputs diff --git a/gnu/packages/apr.scm b/gnu/packages/apr.scm index ed9c62819d..8c57ee3ab2 100644 --- a/gnu/packages/apr.scm +++ b/gnu/packages/apr.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com> -;;; Copyright © 2014 Mark H Weaver <mhw@netris.org> +;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -18,25 +18,26 @@ ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. (define-module (gnu packages apr) - #:use-module (guix licenses) + #:use-module ((guix licenses) #:prefix l:) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu) #:use-module (gnu packages) #:use-module (gnu packages perl) + #:use-module (gnu packages xml) #:use-module (gnu packages autotools)) (define-public apr (package (name "apr") - (version "1.5.1") + (version "1.5.2") (source (origin (method url-fetch) (uri (string-append "mirror://apache/apr/apr-" version ".tar.bz2")) (sha256 (base32 - "1b4qw686bwjn19iyb0lg918q23xxd6s2gnyczhjq992d3m1vwjp9")) + "0ypn51xblix5ys9xy7da3ngdydip0qqh9rdq8nz54w9aq8lys0vx")) (patches (list (search-patch "apr-skip-getservbyname-test.patch"))) (patch-flags '("-p0")))) @@ -59,7 +60,7 @@ an API to which software developers may code and be assured of predictable if not identical behaviour regardless of the platform on which their software is built, relieving them of the need to code special-case conditions to work around or take advantage of platform-specific deficiencies or features.") - (license asl2.0))) + (license l:asl2.0))) (define-public apr-util (package @@ -74,19 +75,23 @@ around or take advantage of platform-specific deficiencies or features.") "0bn81pfscy9yjvbmyx442svf43s6dhrdfcsnkpxz43fai5qk5kx6")))) (build-system gnu-build-system) (inputs - `(("apr" ,apr))) + `(("apr" ,apr))) + (propagated-inputs + `(("expat" ,expat))) (arguments '(#:phases (alist-replace 'configure (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (apr (assoc-ref inputs "apr"))) + (let ((out (assoc-ref outputs "out")) + (apr (assoc-ref inputs "apr")) + (expat (assoc-ref inputs "expat"))) (setenv "CONFIG_SHELL" (which "bash")) (zero? (system* "./configure" (string-append "--prefix=" out) - (string-append "--with-apr=" apr))))) + (string-append "--with-apr=" apr) + (string-append "--with-expat=" expat))))) %standard-phases) ;; There are race conditions during 'make check'. Typically, the @@ -98,4 +103,4 @@ around or take advantage of platform-specific deficiencies or features.") (synopsis "One of the Apache Portable Runtime Library companions") (description "APR-util provides a number of helpful abstractions on top of APR.") - (license asl2.0))) + (license l:asl2.0))) diff --git a/gnu/packages/audacity.scm b/gnu/packages/audacity.scm new file mode 100644 index 0000000000..4f7bc686e3 --- /dev/null +++ b/gnu/packages/audacity.scm @@ -0,0 +1,102 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (gnu packages audacity) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix build-system gnu) + #:use-module (gnu packages) + #:use-module (gnu packages audio) + #:use-module (gnu packages base) + #:use-module (gnu packages gtk) + #:use-module (gnu packages linux) + #:use-module (gnu packages mp3) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages pulseaudio) + #:use-module (gnu packages python) + #:use-module (gnu packages xiph) + #:use-module (gnu packages xml) + #:use-module (gnu packages video) + #:use-module (gnu packages wxwidgets)) + +(define-public audacity + (package + (name "audacity") + (version "2.1.0") + (source + (origin + (method url-fetch) + (uri + (string-append + "mirror://sourceforge/audacity/audacity-minsrc-" version ".tar.xz")) + (sha256 + (base32 "1cs2w3fwqylpqmfwkvlgdx5lhclpckfil7pqibl37qlbnf4qvndh")) + (patches (list (search-patch "audacity-fix-ffmpeg-binding.patch"))))) + (build-system gnu-build-system) + (inputs + ;; TODO: Add portSMF and libwidgetextra once they're packaged. In-tree + ;; versions shipping with Audacity are used for now. + `(("wxwidgets" ,wxwidgets-2) + ("gtk" ,gtk+-2) + ("alsa-lib" ,alsa-lib) + ("jack" ,jack-2) + ("expat" ,expat) + ("ffmpeg" ,ffmpeg) + ("lame" ,lame) + ("flac" ,flac) + ("libid3tag" ,libid3tag) + ("libmad" ,libmad) + ("libsbsms" ,libsbsms) + ("libsndfile" ,libsndfile) + ("soundtouch" ,soundtouch) + ("soxr" ,soxr) ;replaces libsamplerate + ("twolame" ,twolame) + ("vamp" ,vamp) + ("libvorbis" ,libvorbis) + ("lv2" ,lv2) + ("lilv" ,lilv) + ("portaudio" ,portaudio))) + (native-inputs + `(("pkg-config" ,pkg-config) + ("python" ,python-2) + ("which" ,which))) + (arguments + '(#:configure-flags + (let ((libid3tag (assoc-ref %build-inputs "libid3tag")) + (libmad (assoc-ref %build-inputs "libmad"))) + (list + ;; Loading FFmpeg dynamically is problematic. + "--disable-dynamic-loading" + ;; libid3tag and libmad provide no .pc files, so pkg-config fails to + ;; find them. Force their inclusion. + (string-append "ID3TAG_CFLAGS=-I" libid3tag "/include") + (string-append "ID3TAG_LIBS=-L" libid3tag "/lib -lid3tag -lz") + (string-append "LIBMAD_CFLAGS=-I" libmad "/include") + (string-append "LIBMAD_LIBS=-L" libmad "/lib -lmad"))) + ;; The test suite is not "well exercised" according to the developers, + ;; and fails with various errors. See + ;; <http://sourceforge.net/p/audacity/mailman/message/33524292/>. + #:tests? #f)) + (home-page "http://audacity.sourceforge.net/") + (synopsis "Software for recording and editing sounds") + (description + "Audacity is a multi-track audio editor designed for recording, playing +and editing digital audio. It features digital effects and spectrum analysis +tools.") + (license license:gpl2+))) diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index dec167f917..e607d1a9a0 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com> +;;; Copyright © 2015 Andreas Enge <andreas@enge.fr> ;;; ;;; This file is part of GNU Guix. ;;; @@ -21,6 +22,7 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) + #:use-module (guix utils) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix build-system gnu) #:use-module (guix build-system waf) @@ -31,10 +33,13 @@ #:use-module (gnu packages autotools) #:use-module (gnu packages boost) #:use-module (gnu packages base) + #:use-module (gnu packages bison) #:use-module (gnu packages compression) #:use-module (gnu packages curl) #:use-module (gnu packages databases) #:use-module (gnu packages file) + #:use-module (gnu packages flex) + #:use-module (gnu packages gettext) #:use-module (gnu packages glib) #:use-module (gnu packages gtk) #:use-module (gnu packages gnome) @@ -125,7 +130,23 @@ attacks, performing pitch detection, tapping the beat and producing MIDI streams from live audio.") (license license:gpl3+))) -(define-public ardour +(define (ardour-rpath-phase major-version) + `(lambda* (#:key outputs #:allow-other-keys) + (let ((libdir (string-append (assoc-ref outputs "out") + "/lib/ardour" ,major-version))) + (substitute* "wscript" + (("linker_flags = \\[\\]") + (string-append "linker_flags = [\"" + "-Wl,-rpath=" + libdir ":" + libdir "/backends" ":" + libdir "/engines" ":" + libdir "/panners" ":" + libdir "/surfaces" ":" + libdir "/vamp" "\"]")))) + #t)) + +(define-public ardour-3 (package (name "ardour") (version "3.5.403") @@ -137,6 +158,9 @@ streams from live audio.") (url "git://git.ardour.org/ardour/ardour.git") (commit version))) (snippet + ;; Ardour expects this file to exist at build time. It can be + ;; created from a git checkout with: + ;; ./waf create_stored_revision '(call-with-output-file "libs/ardour/revision.cc" (lambda (port) @@ -148,7 +172,12 @@ namespace ARDOUR { const char* revision = \"3.5-403-gec2cb31\" ; }")))) (file-name (string-append name "-" version)))) (build-system waf-build-system) (arguments - `(#:tests? #f ; no check target + `(#:phases + (modify-phases %standard-phases + (add-after + 'unpack 'set-rpath-in-LDFLAGS + ,(ardour-rpath-phase (version-prefix version 1)))) + #:tests? #f ; no check target #:python ,python-2)) (inputs `(("alsa-lib" ,alsa-lib) @@ -180,8 +209,6 @@ namespace ARDOUR { const char* revision = \"3.5-403-gec2cb31\" ; }")))) ("sratom" ,sratom) ("suil" ,suil) ("lilv" ,lilv) - ("rasqal" ,rasqal) - ("raptor2" ,raptor2) ("redland" ,redland) ("rubberband" ,rubberband) ("taglib" ,taglib) @@ -197,6 +224,35 @@ record, edit, mix and master audio and MIDI projects. It is targeted at audio engineers, musicians, soundtrack editors and composers.") (license license:gpl2+))) +(define-public ardour + (package (inherit ardour-3) + (name "ardour") + (version "4.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "git://git.ardour.org/ardour/ardour.git") + (commit version))) + (snippet + ;; Ardour expects this file to exist at build time. It can be + ;; created from a git checkout with: + ;; ./waf create_stored_revision + '(call-with-output-file + "libs/ardour/revision.cc" + (lambda (port) + (format port "#include \"ardour/revision.h\" +namespace ARDOUR { const char* revision = \"4.0\" ; }")))) + (sha256 + (base32 + "0a8bydc24xv0cahdqfaxdmi1f43cyr9psiyshxpbrkdqw2c7a4xi")) + (file-name (string-append name "-" version)))) + (arguments + (substitute-keyword-arguments (package-arguments ardour-3) + ((#:phases phases) + `(modify-phases ,phases + (replace 'set-rpath-in-LDFLAGS + ,(ardour-rpath-phase (version-prefix version 1))))))))) + (define-public azr3 (package (name "azr3") @@ -233,6 +289,81 @@ bass section with five drawbars. A standalone JACK application and LV2 plugins are provided.") (license license:gpl2))) +(define-public calf + (package + (name "calf") + (version "0.0.60") + (source (origin + (method url-fetch) + (uri (string-append + "mirror://sourceforge/calf/calf/" + version "/calf-" version ".tar.gz")) + (sha256 + (base32 + "019fwg00jv217a5r767z7szh7vdrarybac0pr2sk26xp81kibrx9")))) + (build-system gnu-build-system) + (inputs + `(("fluidsynth" ,fluidsynth) + ("expat" ,expat) + ("glib" ,glib) + ("gtk" ,gtk+-2) + ("cairo" ,cairo) + ("lash" ,lash) + ("jack" ,jack-1) + ("lv2" ,lv2) + ("ladspa" ,ladspa) + ("fftw" ,fftw))) + (native-inputs + `(("pkg-config" ,pkg-config))) + (native-search-paths + (list (search-path-specification + (variable "LV2_PATH") + (files '("lib/lv2"))))) + (home-page "http://calf.sourceforge.net/") + (synopsis "Audio plug-in pack for LV2 and JACK environments") + (description + "Calf Studio Gear is an audio plug-in pack for LV2 and JACK environments. +The suite contains lots of effects (delay, modulation, signal processing, +filters, equalizers, dynamics, distortion and mastering effects), +instruments (SF2 player, organ simulator and a monophonic synthesizer) and +tools (analyzer, mono/stereo tools, crossovers).") + ;; calfjackhost is released under GPLv2+ + ;; The plugins are released under LGPLv2.1+ + (license (list license:lgpl2.1+ license:gpl2+)))) + +(define-public csound + (package + (name "csound") + (version "6.04") + (source (origin + (method url-fetch) + (uri (string-append + "mirror://sourceforge/csound/csound6/Csound" + version "/Csound" version ".tar.gz")) + (sha256 + (base32 + "1030w38lxdwjz1irr32m9cl0paqmgr02lab2m7f7j1yihwxj1w0g")))) + (build-system cmake-build-system) + (inputs + `(("alsa-lib" ,alsa-lib) + ("boost" ,boost) + ("pulseaudio" ,pulseaudio) + ("libsndfile" ,libsndfile) + ("liblo" ,liblo) + ("ladspa" ,ladspa) + ("jack" ,jack-1) + ("gettext" ,gnu-gettext))) + (native-inputs + `(("bison" ,bison) + ("flex" ,flex) + ("zlib" ,zlib))) + (home-page "http://csound.github.io/") + (synopsis "Sound and music computing system") + (description + "Csound is a user-programmable and user-extensible sound processing +language and software synthesizer.") + (license license:lgpl2.1+))) + (define-public clalsadrv (package (name "clalsadrv") @@ -278,6 +409,45 @@ plugins are provided.") ALSA PCM devices.") (license license:gpl2+))) +(define-public fluidsynth + (package + (name "fluidsynth") + (version "1.1.6") + (source (origin + (method url-fetch) + (uri (string-append + "mirror://sourceforge/fluidsynth/fluidsynth-" + version "/fluidsynth-" version ".tar.gz")) + (sha256 + (base32 + "070pwb7brdcn1mfvplkd56vjc7lbz4iznzkqvfsakvgbv68k71ah")))) + (build-system gnu-build-system) + (arguments + `(#:phases + (alist-cons-after + 'unpack + 'remove-broken-symlinks + (lambda _ (delete-file-recursively "m4") #t) + %standard-phases))) + (inputs + `(("libsndfile" ,libsndfile) + ("alsa-lib" ,alsa-lib) + ("jack" ,jack-1) + ("ladspa" ,ladspa) + ("lash" ,lash) + ("readline" ,readline) + ("glib" ,glib))) + (native-inputs + `(("pkg-config" ,pkg-config))) + (home-page "http://www.fluidsynth.org/") + (synopsis "SoundFont synthesizer") + (description + "FluidSynth is a real-time software synthesizer based on the SoundFont 2 +specifications. FluidSynth reads and handles MIDI events from the MIDI input +device. It is the software analogue of a MIDI synthesizer. FluidSynth can +also play midifiles using a Soundfont.") + (license license:gpl2+))) + (define-public faad2 (package (name "faad2") @@ -349,6 +519,46 @@ patches that can be used with softsynths such as Timidity and WildMidi.") ;; GPLv2+ with exception for compositions using these patches. (license license:gpl2+))) +(define-public ir + (package + (name "ir") + (version "1.3.2") + (source (origin + (method url-fetch) + (uri (string-append + "http://factorial.hu/system/files/ir.lv2-" + version ".tar.gz")) + (sha256 + (base32 + "1jh2z01l9m4ar7yz0n911df07dygc7n4cl59p7qdjbh0nvkm747g")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ;no "check" target + #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))) + #:phases + ;; no configure script + (alist-delete 'configure %standard-phases))) + (inputs + `(("libsndfile" ,libsndfile) + ("libsamplerate" ,libsamplerate) + ("lv2" ,lv2) + ("glib" ,glib) + ("gtk+" ,gtk+-2) + ("zita-convolver" ,zita-convolver))) + (native-inputs + `(("pkg-config" ,pkg-config))) + (native-search-paths + (list (search-path-specification + (variable "LV2_PATH") + (files '("lib/lv2"))))) + (home-page "http://factorial.hu/plugins/lv2/ir") + (synopsis "LV2 convolution reverb") + (description + "IR is a low-latency, real-time, high performance signal convolver +especially for creating reverb effects. It supports impulse responses with 1, +2 or 4 channels, in any soundfile format supported by libsndfile.") + (license license:gpl2+))) + (define-public jack-1 (package (name "jack") @@ -403,7 +613,18 @@ synchronous execution of all clients, and low latency operation.") (arguments `(#:tests? #f ; no check target #:configure-flags '("--dbus" - "--alsa"))) + "--alsa") + #:phases + (modify-phases %standard-phases + (add-before + 'configure 'set-linkflags + (lambda _ + ;; Add $libdir to the RUNPATH of all the binaries. + (substitute* "wscript" + ((".*CFLAGS.*-Wall.*" m) + (string-append m + " conf.env.append_unique('LINKFLAGS'," + "'-Wl,-rpath=" %output "/lib')\n")))))))) (inputs `(("alsa-lib" ,alsa-lib) ("dbus" ,dbus) @@ -585,7 +806,16 @@ implementation of the Open Sound Control (OSC) protocol.") (base32 "0aj2plkx56iar8vzjbq2l7hi7sp0ml99m0h44rgwai2x4vqkk2j2")))) (build-system waf-build-system) - (arguments `(#:tests? #f)) ; no check target + (arguments + `(#:tests? #f ; no check target + #:phases + (modify-phases %standard-phases + (add-before + 'configure 'set-ldflags + (lambda* (#:key outputs #:allow-other-keys) + (setenv "LDFLAGS" + (string-append "-Wl,-rpath=" + (assoc-ref outputs "out") "/lib"))))))) ;; required by lilv-0.pc (propagated-inputs `(("serd" ,serd) @@ -995,6 +1225,97 @@ stretching and pitch scaling of audio. This package contains the library.") ;; containing gpl2. (license license:gpl2))) +(define-public wavpack + (package + (name "wavpack") + (version "4.70.0") + (source (origin + (method url-fetch) + (uri (string-append "http://www.wavpack.com/" + name "-" version ".tar.bz2")) + (sha256 + (base32 + "191h8hv8qk72hfh1crg429i9yq3cminwqb249sy9zadbn1wy7b9c")))) + (build-system gnu-build-system) + (arguments + `(#:configure-flags + ;; wavpack.pc.in lacks path substitution for 'exec_prefix'. + (list (string-append "--libdir=" %output "/lib")))) + (home-page "http://www.wavpack.com/") + (synopsis "Hybrid lossless audio codec") + (description + "WavPack is an audio compression format with lossless, lossy and hybrid +compression modes. This package contains command-line programs and library to +encode and decode wavpack files.") + (license license:bsd-3))) + +(define-public libmodplug + (package + (name "libmodplug") + (version "0.8.8.5") + (source (origin + (method url-fetch) + (uri (string-append + "mirror://sourceforge/project/modplug-xmms/" + name "/" version "/" name "-" version ".tar.gz")) + (sha256 + (base32 + "1bfsladg7h6vnii47dd66f5vh1ir7qv12mfb8n36qiwrxq92sikp")))) + (build-system gnu-build-system) + (home-page "http://modplug-xmms.sourceforge.net/") + (synopsis "Mod file playing library") + (description + "Libmodplug renders mod music files as raw audio data, for playing or +conversion. mod, .s3m, .it, .xm, and a number of lesser-known formats are +supported. Optional features include high-quality resampling, bass expansion, +surround and reverb.") + (license license:public-domain))) + +(define-public libxmp + (package + (name "libxmp") + (version "4.3.8") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/xmp/libxmp/" + name "-" version ".tar.gz")) + (sha256 + (base32 + "0h06091hlpgc6ds4pjmfq8sx4snw7av3nhny180q4pwfyasjb6ny")))) + (build-system gnu-build-system) + (home-page "http://xmp.sourceforge.net/") + (synopsis "Module player library") + (description + "Libxmp is a library that renders module files to PCM data. It supports +over 90 mainstream and obscure module formats including Protracker (MOD), +Scream Tracker 3 (S3M), Fast Tracker II (XM), and Impulse Tracker (IT).") + (license license:lgpl2.1+))) + +(define-public xmp + (package + (name "xmp") + (version "4.0.10") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/xmp/xmp/" + name "-" version ".tar.gz")) + (sha256 + (base32 + "0gjylvvmq7ha0nhcjg56qfp0xxpsrcsj7y5r914svd5x1ppmzm5n")))) + (build-system gnu-build-system) + (native-inputs + `(("pkg-config" ,pkg-config))) + (inputs + `(("libxmp" ,libxmp) + ("pulseaudio" ,pulseaudio))) + (home-page "http://xmp.sourceforge.net/") + (synopsis "Extended module player") + (description + "Xmp is a portable module player that plays over 90 mainstream and +obscure module formats, including Protracker MOD, Fasttracker II XM, Scream +Tracker 3 S3M and Impulse Tracker IT files.") + (license license:gpl2+))) + (define-public soundtouch (package (name "soundtouch") @@ -1088,15 +1409,28 @@ portions of LAME.") (string-map (lambda (c) (if (char=? c #\.) #\_ c)) version) ".tgz")) (sha256 - (base32 "0mwddk4qzybaf85wqfhxqlf0c5im9il8z03rd4n127k8y2jj9q4g")))) + (base32 "0mwddk4qzybaf85wqfhxqlf0c5im9il8z03rd4n127k8y2jj9q4g")) + (patches (list (search-patch "portaudio-audacity-compat.patch"))))) (build-system gnu-build-system) (inputs ;; TODO: Add ASIHPI. `(("alsa-lib" ,alsa-lib) ("jack" ,jack-2))) (native-inputs - `(("pkg-config" ,pkg-config))) - (arguments '(#:tests? #f)) ;no 'check' target + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("libtool" ,libtool) + ("pkg-config" ,pkg-config))) + (arguments + '(#:phases + ;; Autoreconf is necessary because the audacity-compat patch modifies + ;; .in files. + (alist-cons-after + 'unpack 'autoreconf + (lambda _ + (zero? (system* "autoreconf" "-vif"))) + %standard-phases) + #:tests? #f)) ;no 'check' target (home-page "http://www.portaudio.com/") (synopsis "Audio I/O library") (description @@ -1145,6 +1479,48 @@ directly to a different computer on your LAN network. It is an audio daemon with a much different focus than most other audio daemons.") (license license:gpl3+))) +(define-public zita-convolver + (package + (name "zita-convolver") + (version "3.1.0") + (source (origin + (method url-fetch) + (uri (string-append + "http://kokkinizita.linuxaudio.org" + "/linuxaudio/downloads/zita-convolver-" + version ".tar.bz2")) + (sha256 + (base32 + "14qrnczhp5mbwhky64il7kxc4hl1mmh495v60va7i2qnhasr6zmz")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; no "check" target + #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))) + #:phases + (alist-cons-after + 'unpack 'patch-makefile-and-enter-directory + (lambda _ + (substitute* "libs/Makefile" + (("ldconfig") "true") + (("^LIBDIR =.*") "LIBDIR = lib\n")) + (chdir "libs") #t) + (alist-cons-after + 'install + 'install-symlink + (lambda _ + (symlink "libzita-convolver.so" + (string-append (assoc-ref %outputs "out") + "/lib/libzita-convolver.so.3"))) + ;; no configure script + (alist-delete 'configure %standard-phases))))) + (inputs `(("fftwf" ,fftwf))) + (home-page "http://kokkinizita.linuxaudio.org") + (synopsis "Fast, partitioned convolution engine library") + (description + "Zita convolver is a C++ library providing a real-time convolution +engine.") + (license license:gpl3+))) + (define-public zita-alsa-pcmi (package (name "zita-alsa-pcmi") diff --git a/gnu/packages/autogen.scm b/gnu/packages/autogen.scm index c27ea15e70..45b7cb81cc 100644 --- a/gnu/packages/autogen.scm +++ b/gnu/packages/autogen.scm @@ -23,13 +23,14 @@ #:use-module (guix build-system gnu) #:use-module (gnu packages) #:use-module (gnu packages perl) + #:use-module (gnu packages pkg-config) #:use-module (gnu packages base) #:use-module (gnu packages guile)) (define-public autogen (package (name "autogen") - (version "5.18.4") + (version "5.18.5") (source (origin (method url-fetch) @@ -38,9 +39,10 @@ version ".tar.gz")) (sha256 (base32 - "0pbjzwgvmjvi6nl1bcyhfc9kl93s6321dgmvp5dqdip7i8dgin9w")))) + "1flnbnmkbqmbfgammkl8m36wrlk6rhpgnf9pdm6gdfhqalxvggbv")))) (build-system gnu-build-system) - (native-inputs `(("perl" ,perl))) ;for doc generator mdoc + (native-inputs `(("perl" ,perl) ;for doc generator mdoc + ("pkg-config" ,pkg-config))) (inputs `(("which" ,which) ("guile" ,guile-2.0))) (arguments diff --git a/gnu/packages/autotools.scm b/gnu/packages/autotools.scm index 4b5cbb6dfd..24ff90cc5c 100644 --- a/gnu/packages/autotools.scm +++ b/gnu/packages/autotools.scm @@ -248,7 +248,7 @@ Makefile, simplifying the entire process for the developer.") (base32 "0vxj52zm709125gwv9qqlw02silj8bnjnh4y07arrz60r31ai1vw")) (patches - (list (search-patch "libtool-skip-tests.patch"))))) + (list (search-patch "libtool-skip-tests2.patch"))))) (build-system gnu-build-system) (propagated-inputs `(("m4" ,m4))) (native-inputs `(("m4" ,m4) @@ -303,9 +303,7 @@ complexity of working with shared libraries across platforms.") version ".tar.xz")) (sha256 (base32 - "0vxj52zm709125gwv9qqlw02silj8bnjnh4y07arrz60r31ai1vw")) - (patches - (list (search-patch "libtool-skip-tests.patch"))))) + "0vxj52zm709125gwv9qqlw02silj8bnjnh4y07arrz60r31ai1vw")))) (build-system gnu-build-system) (arguments '(#:configure-flags '("--enable-ltdl-install") ;really install it diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index ac059870e2..c6206fdce2 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -34,6 +34,7 @@ #:use-module (gnu packages linux) #:use-module (gnu packages texinfo) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages gettext) #:use-module (guix utils) #:use-module (guix packages) #:use-module (guix download) @@ -151,14 +152,14 @@ standard utility.") (define-public patch (package (name "patch") - (version "2.7.4") + (version "2.7.5") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/patch/patch-" version ".tar.xz")) (sha256 (base32 - "02gikxjvcxysr4l65c8vivgz62xmalp0av5ypzff8vqhrq3vpb0f")))) + "16d2r9kpivaak948mxzc0bai45mqfw73m113wrkmbffnalv1b5gx")))) (build-system gnu-build-system) (native-inputs `(("ed", ed))) (synopsis "Apply differences to originals, with optional backups") @@ -358,6 +359,72 @@ included.") (license gpl3+) (home-page "http://www.gnu.org/software/binutils/"))) +(define* (make-ld-wrapper name #:key binutils + (guile (canonical-package guile-2.0)) + (bash (canonical-package bash)) target + (guile-for-build guile)) + "Return a package called NAME that contains a wrapper for the 'ld' program +of BINUTILS, which adds '-rpath' flags to the actual 'ld' command line. When +TARGET is not #f, make a wrapper for the cross-linker for TARGET, called +'TARGET-ld'. The wrapper uses GUILE and BASH." + (package + (name name) + (version "0") + (source #f) + (build-system trivial-build-system) + (inputs `(("binutils" ,binutils) + ("guile" ,guile) + ("bash" ,bash) + ("wrapper" ,(search-path %load-path + "gnu/packages/ld-wrapper.in")))) + (arguments + `(#:guile ,guile-for-build + #:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils) + (system base compile)) + + (let* ((out (assoc-ref %outputs "out")) + (bin (string-append out "/bin")) + (ld ,(if target + `(string-append bin "/" ,target "-ld") + '(string-append bin "/ld"))) + (go (string-append ld ".go"))) + + (setvbuf (current-output-port) _IOLBF) + (format #t "building ~s/bin/ld wrapper in ~s~%" + (assoc-ref %build-inputs "binutils") + out) + + (mkdir-p bin) + (copy-file (assoc-ref %build-inputs "wrapper") ld) + (substitute* ld + (("@SELF@") + ld) + (("@GUILE@") + (string-append (assoc-ref %build-inputs "guile") + "/bin/guile")) + (("@BASH@") + (string-append (assoc-ref %build-inputs "bash") + "/bin/bash")) + (("@LD@") + (string-append (assoc-ref %build-inputs "binutils") + ,(if target + (string-append "/bin/" + target "-ld") + "/bin/ld")))) + (chmod ld #o555) + (compile-file ld #:output-file go))))) + (synopsis "The linker wrapper") + (description + "The linker wrapper (or 'ld-wrapper') wraps the linker to add any +missing '-rpath' flags, and to detect any misuse of libraries outside of the +store.") + (home-page "http://www.gnu.org/software/guix/") + (license gpl3+))) + +(export make-ld-wrapper) + (define-public glibc (package (name "glibc") @@ -393,6 +460,12 @@ included.") ;; <http://lists.gnu.org/archive/html/guix-devel/2015-02/msg00709.html>. #:parallel-build? #f + ;; The libraries have an empty RUNPATH, but some, such as the versioned + ;; libraries (libdl-2.21.so, etc.) have ld.so marked as NEEDED. Since + ;; these libraries are always going to be found anyway, just skip + ;; RUNPATH checks. + #:validate-runpath? #f + #:configure-flags (list "--enable-add-ons" "--sysconfdir=/etc" @@ -431,7 +504,8 @@ included.") #:tests? #f ; XXX #:phases (alist-cons-before 'configure 'pre-configure - (lambda* (#:key inputs outputs #:allow-other-keys) + (lambda* (#:key inputs native-inputs outputs + #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (bin (string-append out "/bin"))) ;; Use `pwd', not `/bin/pwd'. @@ -455,8 +529,13 @@ included.") ;; Copy a statically-linked Bash in the output, with ;; no references to other store paths. + ;; FIXME: Normally we would look it up only in INPUTS but + ;; cross-base uses it as a native input. (mkdir-p bin) - (copy-file (string-append (assoc-ref inputs "static-bash") + (copy-file (string-append (or (assoc-ref inputs + "static-bash") + (assoc-ref native-inputs + "static-bash")) "/bin/bash") (string-append bin "/bash")) (remove-store-references (string-append bin "/bash")) @@ -490,9 +569,11 @@ included.") (inputs `(("static-bash" ,(static-package bash-light)))) - ;; To build the manual, we need Texinfo and Perl. + ;; To build the manual, we need Texinfo and Perl. Gettext is needed to + ;; install the message catalogs, with 'msgfmt'. (native-inputs `(("texinfo" ,texinfo) - ("perl" ,perl))) + ("perl" ,perl) + ("gettext" ,gnu-gettext))) (native-search-paths ;; Search path for packages that provide locale data. This is useful @@ -611,7 +692,7 @@ command.") (define-public tzdata (package (name "tzdata") - (version "2014j") + (version "2015c") (source (origin (method url-fetch) (uri (string-append @@ -619,7 +700,7 @@ command.") version ".tar.gz")) (sha256 (base32 - "038fvj6zf51k6z9sbbxbj87ajaf69l3whal2vwshbm4l0qr71n52")))) + "0nin48g5dmkfgckp25bngxchn3sw3yyjss5sq7gs5xspbxgsq3w6")))) (build-system gnu-build-system) (arguments '(#:tests? #f @@ -666,7 +747,7 @@ command.") version ".tar.gz")) (sha256 (base32 - "1qpd12imy7q5hb5fhk48mfw65s0xlrkmms0zr2gk0mj88qjn3m3z")))))) + "0bplibiy70dvlrhwqzkzxgmg81j6d2kklvjgi2f1g2zz1nkb3vkz")))))) (home-page "http://www.iana.org/time-zones") (synopsis "Database of current and historical time zones") (description "The Time Zone Database (often called tz or zoneinfo) diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm index 361eb475d6..45676f568b 100644 --- a/gnu/packages/bash.scm +++ b/gnu/packages/bash.scm @@ -23,6 +23,7 @@ #:use-module (gnu packages ncurses) #:use-module (gnu packages readline) #:use-module (gnu packages bison) + #:use-module (gnu packages linux) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix utils) @@ -128,6 +129,26 @@ number/base32-hash tuples, directly usable in the 'patch-series' form." (let ((out (assoc-ref outputs "out"))) (with-directory-excursion (string-append out "/bin") (symlink "bash" "sh"))))) + (install-headers-phase + '(lambda* (#:key outputs #:allow-other-keys) + ;; Install Bash headers so that packages that provide extensions + ;; can use them. We install them in include/bash; that's what + ;; Debian does and what Bash extensions like recutils or + ;; guile-bash expect. + (let ((include (string-append (assoc-ref outputs "include") + "/include/bash")) + (headers "^\\./(builtins/|lib/glob/|lib/tilde/|)[^/]+\\.h$")) + (mkdir-p include) + (for-each (lambda (file) + (when ((@ (ice-9 regex) string-match) headers file) + (let ((directory (string-append include "/" + (dirname file)))) + (mkdir-p directory) + (copy-file file + (string-append directory "/" + (basename file)))))) + (find-files "." "\\.h$")) + #t))) (version "4.3")) (package (name "bash") @@ -148,6 +169,9 @@ number/base32-hash tuples, directly usable in the 'patch-series' form." (version (string-append version "." (number->string (length %patch-series-4.3)))) (build-system gnu-build-system) + + (outputs '("out" + "include")) ;headers used by extensions (native-inputs `(("bison" ,bison))) ;to rebuild the parser (inputs `(("readline" ,readline) ("ncurses" ,ncurses))) ;TODO: add texinfo @@ -169,9 +193,10 @@ number/base32-hash tuples, directly usable in the 'patch-series' form." ;; for now. #:tests? #f - #:phases (alist-cons-after 'install 'post-install - ,post-install-phase - %standard-phases))) + #:phases (modify-phases %standard-phases + (add-after 'install 'post-install ,post-install-phase) + (add-after 'install 'install-headers + ,install-headers-phase)))) (synopsis "The GNU Bourne-Again SHell") (description "Bash is the shell, or command-line interpreter, of the GNU system. It @@ -223,6 +248,29 @@ without modification.") (patches (list (search-patch "bash-completion-directories.patch"))))) (build-system gnu-build-system) + (native-inputs `(("util-linux" ,util-linux))) + (arguments + `(#:phases (alist-cons-after + 'install 'remove-redundant-completions + (lambda* (#:key inputs outputs #:allow-other-keys) + ;; Util-linux comes with a bunch of completion files for + ;; its own commands which are more sophisticated and + ;; up-to-date than those of bash-completion. Remove those + ;; from bash-completion. + (let* ((out (assoc-ref outputs "out")) + (util-linux (assoc-ref inputs "util-linux")) + (completions (string-append out + "/share/bash-completion" + "/completions")) + (already (find-files (string-append util-linux + "/etc/bash_completion.d")))) + (with-directory-excursion completions + (for-each (lambda (file) + (when (file-exists? file) + (delete-file file))) + (map basename already))) + #t)) + %standard-phases))) (synopsis "Bash completions for common commands") (description "This package provides extensions that allow Bash to provide adapted diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 1214a0b708..b29ca67dbd 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -19,23 +19,68 @@ (define-module (gnu packages bioinformatics) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) + #:use-module (guix utils) #:use-module (guix download) + #:use-module (guix git-download) #:use-module (guix build-system gnu) #:use-module (guix build-system cmake) #:use-module (guix build-system python) #:use-module (guix build-system trivial) #:use-module (gnu packages) #:use-module (gnu packages base) + #:use-module (gnu packages boost) #:use-module (gnu packages compression) + #:use-module (gnu packages file) #:use-module (gnu packages java) + #:use-module (gnu packages linux) + #:use-module (gnu packages maths) #:use-module (gnu packages ncurses) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages popt) + #:use-module (gnu packages protobuf) #:use-module (gnu packages python) + #:use-module (gnu packages statistics) + #:use-module (gnu packages swig) #:use-module (gnu packages tbb) + #:use-module (gnu packages textutils) #:use-module (gnu packages vim) + #:use-module (gnu packages xml) #:use-module (gnu packages zip)) +(define-public bamtools + (package + (name "bamtools") + (version "2.3.0") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/pezmaster31/bamtools/archive/v" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1brry29bw2xr2l9pqn240rkqwayg85b8qq78zk2zs6nlspk4d018")))) + (build-system cmake-build-system) + (arguments + `(#:tests? #f ;no "check" target + #:phases + (modify-phases %standard-phases + (add-before + 'configure 'set-ldflags + (lambda* (#:key outputs #:allow-other-keys) + (setenv "LDFLAGS" + (string-append + "-Wl,-rpath=" + (assoc-ref outputs "out") "/lib/bamtools"))))))) + (inputs `(("zlib" ,zlib))) + (home-page "https://github.com/pezmaster31/bamtools") + (synopsis "C++ API and command-line toolkit for working with BAM data") + (description + "BamTools provides both a C++ API and a command-line toolkit for handling +BAM files.") + (license license:expat))) + (define-public bedops (package (name "bedops") @@ -177,6 +222,39 @@ pybedtools extends BEDTools by offering feature-level manipulations from with Python.") (license license:gpl2+))) +(define-public python-biopython + (package + (name "python-biopython") + (version "1.65") + (source (origin + (method url-fetch) + (uri (string-append + "http://biopython.org/DIST/biopython-" + version ".tar.gz")) + (sha256 + (base32 + "13m8s9jkrw40zvdp1rl709n6lmgdh4f52aann7gzr6sfp0fwhg26")))) + (build-system python-build-system) + (inputs + `(("python-numpy" ,python-numpy))) + (native-inputs + `(("python-setuptools" ,python2-setuptools))) + (home-page "http://biopython.org/") + (synopsis "Tools for biological computation in Python") + (description + "Biopython is a set of tools for biological computation including parsers +for bioinformatics files into Python data structures; interfaces to common +bioinformatics programs; a standard sequence class and tools for performing +common operations on them; code to perform data classification; code for +dealing with alignments; code making it easy to split up parallelizable tasks +into separate processes; and more.") + (license (license:non-copyleft "http://www.biopython.org/DIST/LICENSE")))) + +(define-public python2-biopython + (package (inherit (package-with-python2 python-biopython)) + (inputs + `(("python2-numpy" ,python2-numpy))))) + (define-public bowtie (package (name "bowtie") @@ -285,6 +363,41 @@ and more accurate. BWA-MEM also has better performance than BWA-backtrack for 70-100bp Illumina reads.") (license license:gpl3+))) +(define-public python2-bx-python + (package + (name "python2-bx-python") + (version "0.7.2") + (source (origin + (method url-fetch) + (uri (string-append + "https://pypi.python.org/packages/source/b/bx-python/bx-python-" + version ".tar.gz")) + (sha256 + (base32 + "0ld49idhc5zjdvbhvjq1a2qmpjj7h5v58rqr25dzmfq7g34b50xh")) + (modules '((guix build utils))) + (snippet + '(substitute* "setup.py" + ;; remove dependency on outdated "distribute" module + (("^from distribute_setup import use_setuptools") "") + (("^use_setuptools\\(\\)") ""))))) + (build-system python-build-system) + (arguments + `(#:tests? #f ;tests fail because test data are not included + #:python ,python-2)) + (inputs + `(("python-numpy" ,python2-numpy) + ("zlib" ,zlib))) + (native-inputs + `(("python-nose" ,python2-nose) + ("python-setuptools" ,python2-setuptools))) + (home-page "http://bitbucket.org/james_taylor/bx-python/") + (synopsis "Tools for manipulating biological data") + (description + "bx-python provides tools for manipulating biological data, particularly +multiple sequence alignments.") + (license license:expat))) + (define-public clipper (package (name "clipper") @@ -323,6 +436,30 @@ and more accurate. BWA-MEM also has better performance than BWA-backtrack for "CLIPper is a tool to define peaks in CLIP-seq datasets.") (license license:gpl2))) +(define-public clustal-omega + (package + (name "clustal-omega") + (version "1.2.1") + (source (origin + (method url-fetch) + (uri (string-append + "http://www.clustal.org/omega/clustal-omega-" + version ".tar.gz")) + (sha256 + (base32 + "02ibkx0m0iwz8nscg998bh41gg251y56cgh86bvyrii5m8kjgwqf")))) + (build-system gnu-build-system) + (inputs + `(("argtable" ,argtable))) + (home-page "http://www.clustal.org/omega/") + (synopsis "Multiple sequence aligner for protein and DNA/RNA") + (description + "Clustal-Omega is a general purpose multiple sequence alignment (MSA) +program for protein and DNA/RNA. It produces high quality MSAs and is capable +of handling data-sets of hundreds of thousands of sequences in reasonable +time.") + (license license:gpl2+))) + (define-public crossmap (package (name "crossmap") @@ -365,6 +502,123 @@ files between different genome assemblies. It supports most commonly used file formats including SAM/BAM, Wiggle/BigWig, BED, GFF/GTF, VCF.") (license license:gpl2+))) +(define-public cutadapt + (package + (name "cutadapt") + (version "1.8") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/marcelm/cutadapt/archive/v" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "161bp87y6gd6r5bmvjpn2b1k942i3fizfpa139f0jn6jv1wcp5h5")))) + (build-system python-build-system) + (arguments + ;; tests must be run after install + `(#:phases (alist-cons-after + 'install 'check + (lambda* (#:key inputs outputs #:allow-other-keys) + (setenv "PYTHONPATH" + (string-append + (getenv "PYTHONPATH") + ":" (assoc-ref outputs "out") + "/lib/python" + (string-take (string-take-right + (assoc-ref inputs "python") 5) 3) + "/site-packages")) + (zero? (system* "nosetests" "-P" "tests"))) + (alist-delete 'check %standard-phases)))) + (native-inputs + `(("python-cython" ,python-cython) + ("python-nose" ,python-nose) + ("python-setuptools" ,python-setuptools))) + (home-page "https://code.google.com/p/cutadapt/") + (synopsis "Remove adapter sequences from nucleotide sequencing reads") + (description + "Cutadapt finds and removes adapter sequences, primers, poly-A tails and +other types of unwanted sequence from high-throughput sequencing reads.") + (license license:expat))) + +(define-public express + (package + (name "express") + (version "1.5.1") + (source (origin + (method url-fetch) + (uri + (string-append + "http://bio.math.berkeley.edu/eXpress/downloads/express-" + version "/express-" version "-src.tgz")) + (sha256 + (base32 + "03rczxd0gjp2l1jxcmjfmf5j94j77zqyxa6x063zsc585nj40n0c")))) + (build-system cmake-build-system) + (arguments + `(#:tests? #f ;no "check" target + #:phases + (alist-cons-after + 'unpack 'use-shared-boost-libs-and-set-bamtools-paths + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "CMakeLists.txt" + (("set\\(Boost_USE_STATIC_LIBS ON\\)") + "set(Boost_USE_STATIC_LIBS OFF)") + (("\\$\\{CMAKE_CURRENT_SOURCE_DIR\\}/bamtools/include") + (string-append (assoc-ref inputs "bamtools") "/include/bamtools"))) + (substitute* "src/CMakeLists.txt" + (("\\$\\{CMAKE_CURRENT_SOURCE_DIR\\}/\\.\\./bamtools/lib") + (string-append (assoc-ref inputs "bamtools") "/lib/bamtools"))) + #t) + %standard-phases))) + (inputs + `(("boost" ,boost) + ("bamtools" ,bamtools) + ("protobuf" ,protobuf) + ("zlib" ,zlib))) + (home-page "http://bio.math.berkeley.edu/eXpress") + (synopsis "Streaming quantification for high-throughput genomic sequencing") + (description + "eXpress is a streaming tool for quantifying the abundances of a set of +target sequences from sampled subsequences. Example applications include +transcript-level RNA-Seq quantification, allele-specific/haplotype expression +analysis (from RNA-Seq), transcription factor binding quantification in +ChIP-Seq, and analysis of metagenomic data.") + (license license:artistic2.0))) + +(define-public fastx-toolkit + (package + (name "fastx-toolkit") + (version "0.0.14") + (source (origin + (method url-fetch) + (uri + (string-append + "https://github.com/agordon/fastx_toolkit/releases/download/" + version "/fastx_toolkit-" version ".tar.bz2")) + (sha256 + (base32 + "01jqzw386873sr0pjp1wr4rn8fsga2vxs1qfmicvx1pjr72007wy")))) + (build-system gnu-build-system) + (inputs + `(("libgtextutils" ,libgtextutils))) + (native-inputs + `(("pkg-config" ,pkg-config))) + (home-page "http://hannonlab.cshl.edu/fastx_toolkit/") + (synopsis "Tools for FASTA/FASTQ file preprocessing") + (description + "The FASTX-Toolkit is a collection of command line tools for Short-Reads +FASTA/FASTQ files preprocessing. + +Next-Generation sequencing machines usually produce FASTA or FASTQ files, +containing multiple short-reads sequences. The main processing of such +FASTA/FASTQ files is mapping the sequences to reference genomes. However, it +is sometimes more productive to preprocess the files before mapping the +sequences to the genome---manipulating the sequences to produce better mapping +results. The FASTX-Toolkit tools perform some of these preprocessing tasks.") + (license license:agpl3+))) + (define-public flexbar (package (name "flexbar") @@ -379,15 +633,20 @@ file formats including SAM/BAM, Wiggle/BigWig, BED, GFF/GTF, VCF.") "13jaykc3y1x8y5nn9j8ljnb79s5y51kyxz46hdmvvjj6qhyympmf")))) (build-system cmake-build-system) (arguments - `(;; There is no test target, although there is a directory containing - ;; test data and scripts (launched by flexbar_validate.sh). - #:tests? #f - #:configure-flags (list + `(#:configure-flags (list (string-append "-DFLEXBAR_BINARY_DIR=" (assoc-ref %outputs "out") "/bin/")) #:phases - (alist-delete 'install %standard-phases))) + (alist-replace + 'check + (lambda* (#:key outputs #:allow-other-keys) + (setenv "PATH" (string-append + (assoc-ref outputs "out") "/bin:" + (getenv "PATH"))) + (chdir "../flexbar_v2.5_src/test") + (zero? (system* "bash" "flexbar_validate.sh"))) + (alist-delete 'install %standard-phases)))) (inputs `(("tbb" ,tbb) ("zlib" ,zlib))) @@ -405,6 +664,57 @@ supports next-generation sequencing data in fasta/q and csfasta/q format from Illumina, Roche 454, and the SOLiD platform.") (license license:gpl3))) +(define-public grit + (package + (name "grit") + (version "2.0.2") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/nboley/grit/archive/" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "157in84dj70wimbind3x7sy1whs3h57qfgcnj2s6lrd38fbrb7mj")))) + (build-system python-build-system) + (arguments + `(#:python ,python-2 + #:phases + (alist-cons-after + 'unpack 'generate-from-cython-sources + (lambda* (#:key inputs outputs #:allow-other-keys) + ;; Delete these C files to force fresh generation from pyx sources. + (delete-file "grit/sparsify_support_fns.c") + (delete-file "grit/call_peaks_support_fns.c") + (substitute* "setup.py" + (("Cython.Setup") "Cython.Build") + ;; Add numpy include path to fix compilation + (("pyx\", \\]") + (string-append "pyx\", ], include_dirs = ['" + (assoc-ref inputs "python-numpy") + "/lib/python2.7/site-packages/numpy/core/include/" + "']"))) #t) + %standard-phases))) + (inputs + `(("python-scipy" ,python2-scipy) + ("python-numpy" ,python2-numpy) + ("python-pysam" ,python2-pysam) + ("python-networkx" ,python2-networkx))) + (native-inputs + `(("python-cython" ,python2-cython) + ("python-setuptools" ,python2-setuptools))) + (home-page "http://grit-bio.org") + (synopsis "Tool for integrative analysis of RNA-seq type assays") + (description + "GRIT is designed to use RNA-seq, TES, and TSS data to build and quantify +full length transcript models. When none of these data sources are available, +GRIT can be run by providing a candidate set of TES or TSS sites. In +addition, GRIT can merge in reference junctions and gene boundaries. GRIT can +also be run in quantification mode, where it uses a provided GTF file and just +estimates transcript expression.") + (license license:gpl3+))) + (define-public hisat (package (name "hisat") @@ -615,6 +925,172 @@ RNA-Seq, the MISO model uses Bayesian inference to compute the probability that a read originated from a particular isoform.") (license license:gpl2))) +(define-public python2-pbcore + (package + (name "python2-pbcore") + (version "0.9.3") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/PacificBiosciences/pbcore/archive/" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1z46rwjac93jm87cbj2zgjg6qvsgs65140wkbbxsvxps7ai4pm09")))) + (build-system python-build-system) + (arguments `(#:python ,python-2)) ; pbcore requires Python 2.7 + (inputs + `(("python-cython" ,python2-cython) + ("python-numpy" ,python2-numpy) + ("python-pysam" ,python2-pysam) + ("python-h5py" ,python2-h5py))) + (native-inputs + `(("python-setuptools" ,python2-setuptools))) + (home-page "http://pacificbiosciences.github.io/pbcore/") + (synopsis "Library for reading and writing PacBio data files") + (description + "The pbcore package provides Python APIs for interacting with PacBio data +files and writing bioinformatics applications.") + (license license:bsd-3))) + +(define-public pbtranscript-tofu + (let ((commit "c7bbd5472")) + (package + (name "pbtranscript-tofu") + (version (string-append "0.4.1." commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/PacificBiosciences/cDNA_primer.git") + (commit commit))) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "148xkzi689c49g6fdhckp6mnmj2qhjdf1j4wifm6ja7ij95d7fxx")))) + (build-system python-build-system) + (arguments + `(#:python ,python-2 + ;; With standard flags, the install phase attempts to create a zip'd + ;; egg file, and fails with an error: 'ZIP does not support timestamps + ;; before 1980' + #:configure-flags '("--single-version-externally-managed" + "--record=pbtranscript-tofu.txt") + #:phases + (alist-cons-after + 'unpack 'enter-directory-and-clean-up + (lambda _ + (chdir "pbtranscript-tofu/pbtranscript/") + ;; Delete clutter + (delete-file-recursively "dist/") + (delete-file-recursively "build/") + (delete-file-recursively "setuptools_cython-0.2.1-py2.6.egg/") + (delete-file-recursively "pbtools.pbtranscript.egg-info") + (delete-file "Cython-0.20.1.tar.gz") + (delete-file "setuptools_cython-0.2.1-py2.7.egg") + (delete-file "setuptools_cython-0.2.1.tar.gz") + (delete-file "setup.cfg") + (for-each delete-file + (find-files "." "\\.so$")) + ;; files should be writable for install phase + (for-each (lambda (f) (chmod f #o755)) + (find-files "." "\\.py$"))) + %standard-phases))) + (inputs + `(("python-cython" ,python2-cython) + ("python-numpy" ,python2-numpy) + ("python-bx-python" ,python2-bx-python) + ("python-networkx" ,python2-networkx) + ("python-scipy" ,python2-scipy) + ("python-pbcore" ,python2-pbcore))) + (native-inputs + `(("python-nose" ,python2-nose) + ("python-setuptools" ,python2-setuptools))) + (home-page "https://github.com/PacificBiosciences/cDNA_primer") + (synopsis "Analyze transcriptome data generated with the Iso-Seq protocol") + (description + "pbtranscript-tofu contains scripts to analyze transcriptome data +generated using the PacBio Iso-Seq protocol.") + (license license:bsd-3)))) + +(define-public rsem + (package + (name "rsem") + (version "1.2.20") + (source + (origin + (method url-fetch) + (uri + (string-append "http://deweylab.biostat.wisc.edu/rsem/src/rsem-" + version ".tar.gz")) + (sha256 + (base32 "0nzdc0j0hjllhsd5f2xli95dafm3nawskigs140xzvjk67xh0r9q")) + (patches (list (search-patch "rsem-makefile.patch"))) + (modules '((guix build utils))) + (snippet + '(begin + ;; remove bundled copy of boost + (delete-file-recursively "boost") + #t)))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ;no "check" target + #:phases + (modify-phases %standard-phases + ;; No "configure" script. + ;; Do not build bundled samtools library. + (replace 'configure + (lambda _ + (substitute* "Makefile" + (("^all : sam/libbam.a") "all : ")) + #t)) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (string-append (assoc-ref outputs "out"))) + (bin (string-append out "/bin/")) + (perl (string-append out "/lib/perl5/site_perl"))) + (mkdir-p bin) + (mkdir-p perl) + (for-each (lambda (file) + (copy-file file + (string-append bin (basename file)))) + (find-files "." "rsem-.*")) + (copy-file "rsem_perl_utils.pm" + (string-append perl "/rsem_perl_utils.pm"))) + #t)) + (add-after + 'install 'wrap-program + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (for-each (lambda (prog) + (wrap-program (string-append out "/bin/" prog) + `("PERL5LIB" ":" prefix + (,(string-append out "/lib/perl5/site_perl"))))) + '("rsem-plot-transcript-wiggles" + "rsem-calculate-expression" + "rsem-generate-ngvector" + "rsem-run-ebseq" + "rsem-prepare-reference"))) + #t))))) + (inputs + `(("boost" ,boost) + ("ncurses" ,ncurses) + ("r" ,r) + ("perl" ,perl) + ("samtools" ,samtools-0.1) + ("zlib" ,zlib))) + (home-page "http://deweylab.biostat.wisc.edu/rsem/") + (synopsis "Estimate gene expression levels from RNA-Seq data") + (description + "RSEM is a software package for estimating gene and isoform expression +levels from RNA-Seq data. The RSEM package provides a user-friendly +interface, supports threads for parallel computation of the EM algorithm, +single-end and paired-end read data, quality scores, variable-length reads and +RSPD estimation. In addition, it provides posterior mean and 95% credibility +interval estimates for expression levels. For visualization, it can generate +BAM and Wiggle files in both transcript-coordinate and genomic-coordinate.") + (license license:gpl3+))) + (define-public rseqc (package (name "rseqc") @@ -626,7 +1102,7 @@ that a read originated from a particular isoform.") (string-append "mirror://sourceforge/rseqc/" version "/RSeQC-" version ".tar.gz")) (sha256 - (base32 "09rf0x9d6apjja5l01cgprj7vigpw6kiqhy34ibwwlxil0db0ri4")) + (base32 "15ly0254yi032qzkdplg00q144qfdsd986gh62829rl5bkxhj330")) (modules '((guix build utils))) (snippet '(begin @@ -680,32 +1156,31 @@ distribution, coverage uniformity, strand specificity, etc.") ;; systems. #:tests? ,(string=? (or (%current-system) (%current-target-system)) "x86_64-linux") - #:make-flags (list (string-append "prefix=" (assoc-ref %outputs "out"))) + #:make-flags (list "LIBCURSES=-lncurses" + (string-append "prefix=" (assoc-ref %outputs "out"))) #:phases (alist-cons-after 'unpack - 'patch-makefile-curses - (lambda _ - (substitute* "Makefile" - (("-lcurses") "-lncurses"))) + 'patch-tests + (lambda* (#:key inputs #:allow-other-keys) + (let ((bash (assoc-ref inputs "bash"))) + (substitute* "test/test.pl" + ;; The test script calls out to /bin/bash + (("/bin/bash") + (string-append bash "/bin/bash")) + ;; There are two failing tests upstream relating to the "stats" + ;; subcommand in test_usage_subcommand ("did not have Usage" + ;; and "usage did not mention samtools stats"), so we disable + ;; them. + (("(test_usage_subcommand\\(.*\\);)" cmd) + (string-append "unless ($subcommand eq 'stats') {" cmd "};"))))) (alist-cons-after - 'unpack - 'patch-tests - (lambda* (#:key inputs #:allow-other-keys) - (let ((bash (assoc-ref inputs "bash"))) - (substitute* "test/test.pl" - ;; The test script calls out to /bin/bash - (("/bin/bash") - (string-append bash "/bin/bash")) - ;; There are two failing tests upstream relating to the "stats" - ;; subcommand in test_usage_subcommand ("did not have Usage" - ;; and "usage did not mention samtools stats"), so we disable - ;; them. - (("(test_usage_subcommand\\(.*\\);)" cmd) - (string-append "unless ($subcommand eq 'stats') {" cmd "};"))))) - (alist-delete - 'configure - %standard-phases))))) + 'install 'install-library + (lambda* (#:key outputs #:allow-other-keys) + (let ((lib (string-append (assoc-ref outputs "out") "/lib"))) + (mkdir-p lib) + (copy-file "libbam.a" (string-append lib "/libbam.a")))) + (alist-delete 'configure %standard-phases))))) (native-inputs `(("pkg-config" ,pkg-config))) (inputs `(("ncurses" ,ncurses) ("perl" ,perl) @@ -720,6 +1195,296 @@ variant calling (in conjunction with bcftools), and a simple alignment viewer.") (license license:expat))) +(define-public samtools-0.1 + ;; This is the most recent version of the 0.1 line of samtools. The input + ;; and output formats differ greatly from that used and produced by samtools + ;; 1.x and is still used in many bioinformatics pipelines. + (package (inherit samtools) + (version "0.1.19") + (source + (origin + (method url-fetch) + (uri + (string-append "mirror://sourceforge/samtools/" + version "/samtools-" version ".tar.bz2")) + (sha256 + (base32 "1m33xsfwz0s8qi45lylagfllqg7fphf4dr0780rsvw75av9wk06h")))) + (arguments + (substitute-keyword-arguments (package-arguments samtools) + ((#:tests? tests) #f) ;no "check" target + ((#:phases phases) + `(modify-phases ,phases + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((bin (string-append + (assoc-ref outputs "out") "/bin"))) + (mkdir-p bin) + (copy-file "samtools" + (string-append bin "/samtools"))))) + (delete 'patch-tests))))))) + +(define-public ngs-sdk + (package + (name "ngs-sdk") + (version "1.1.0") + (source + (origin + (method url-fetch) + (uri + (string-append "https://github.com/ncbi/ngs/archive/" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "09fakv9w87lfg9g70kwzmnryqdjj1sz2c7kw01i6drjf787gkjhw")))) + (build-system gnu-build-system) + (arguments + `(#:parallel-build? #f ; not supported + #:tests? #f ; no "check" target + #:phases + (alist-replace + 'configure + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + ;; Only replace the version suffix, not the version number in the + ;; directory name; fixed in commit 46d4509fa8 (no release yet). + (substitute* "setup/konfigure.perl" + (((string-append "\\$\\(subst " + "(\\$\\(VERSION[^\\)]*\\))," + "(\\$\\([^\\)]+\\))," + "(\\$\\([^\\)]+\\)|\\$\\@)" + "\\)") + _ pattern replacement target) + (string-append "$(patsubst " + "%" pattern "," + "%" replacement "," + target ")"))) + + ;; The 'configure' script doesn't recognize things like + ;; '--enable-fast-install'. + (zero? (system* "./configure" + (string-append "--build-prefix=" (getcwd) "/build") + (string-append "--prefix=" out))))) + (alist-cons-after + 'unpack 'enter-dir + (lambda _ (chdir "ngs-sdk") #t) + %standard-phases)))) + (native-inputs `(("perl" ,perl))) + (home-page "https://github.com/ncbi/ngs") + (synopsis "API for accessing Next Generation Sequencing data") + (description + "NGS is a domain-specific API for accessing reads, alignments and pileups +produced from Next Generation Sequencing. The API itself is independent from +any particular back-end implementation, and supports use of multiple back-ends +simultaneously.") + (license license:public-domain))) + +(define-public ngs-java + (package (inherit ngs-sdk) + (name "ngs-java") + (arguments + `(,@(substitute-keyword-arguments + `(#:modules ((guix build gnu-build-system) + (guix build utils) + (srfi srfi-1) + (srfi srfi-26)) + ,@(package-arguments ngs-sdk)) + ((#:phases phases) + `(alist-cons-after + 'enter-dir 'fix-java-symlink-installation + (lambda _ + ;; Only replace the version suffix, not the version number in + ;; the directory name. Reported here: + ;; https://github.com/ncbi/ngs/pull/4 + (substitute* "Makefile.java" + (((string-append "\\$\\(subst " + "(\\$\\(VERSION[^\\)]*\\))," + "(\\$\\([^\\)]+\\))," + "(\\$\\([^\\)]+\\)|\\$\\@)" + "\\)") + _ pattern replacement target) + (string-append "$(patsubst " + "%" pattern "," + "%" replacement "," + target ")")))) + (alist-replace + 'enter-dir (lambda _ (chdir "ngs-java") #t) + ,phases)))))) + (inputs + `(("jdk" ,icedtea6 "jdk") + ("ngs-sdk" ,ngs-sdk))) + (synopsis "Java bindings for NGS SDK"))) + +(define-public ncbi-vdb + (package + (name "ncbi-vdb") + (version "2.4.5-5") + (source + (origin + (method url-fetch) + (uri + (string-append "https://github.com/ncbi/ncbi-vdb/archive/" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1cj8nk6if8sqagv20vx36v566fdvhcaadf0x1ycnbgql6chbs6vy")))) + (build-system gnu-build-system) + (arguments + `(#:parallel-build? #f ; not supported + #:tests? #f ; no "check" target + #:phases + (alist-replace + 'configure + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + ;; Only replace the version suffix, not the version number in the + ;; directory name; fixed in commit 4dbba5c6a809 (no release yet). + (substitute* "setup/konfigure.perl" + (((string-append "\\$\\(subst " + "(\\$\\(VERSION[^\\)]*\\))," + "(\\$\\([^\\)]+\\))," + "(\\$\\([^\\)]+\\)|\\$\\@)" + "\\)") + _ pattern replacement target) + (string-append "$(patsubst " + "%" pattern "," + "%" replacement "," + target ")"))) + + ;; Override include path for libmagic + (substitute* "setup/package.prl" + (("name => 'magic', Include => '/usr/include'") + (string-append "name=> 'magic', Include => '" + (assoc-ref inputs "libmagic") + "/include" "'"))) + + ;; Install kdf5 library (needed by sra-tools) + (substitute* "build/Makefile.install" + (("LIBRARIES_TO_INSTALL =") + "LIBRARIES_TO_INSTALL = kdf5.$(VERSION_LIBX) kdf5.$(VERSION_SHLX)")) + + ;; The 'configure' script doesn't recognize things like + ;; '--enable-fast-install'. + (zero? (system* + "./configure" + (string-append "--build-prefix=" (getcwd) "/build") + (string-append "--prefix=" (assoc-ref outputs "out")) + (string-append "--debug") + (string-append "--with-xml2-prefix=" + (assoc-ref inputs "libxml2")) + (string-append "--with-ngs-sdk-prefix=" + (assoc-ref inputs "ngs-sdk")) + (string-append "--with-ngs-java-prefix=" + (assoc-ref inputs "ngs-java")) + (string-append "--with-hdf5-prefix=" + (assoc-ref inputs "hdf5")))))) + (alist-cons-after + 'install 'install-interfaces + (lambda* (#:key system outputs #:allow-other-keys) + ;; Install interface libraries + (mkdir (string-append (assoc-ref outputs "out") "/ilib")) + (copy-recursively (string-append "build/ncbi-vdb/linux/gcc/" + (car (string-split system #\-)) + "/rel/ilib") + (string-append (assoc-ref outputs "out") + "/ilib")) + ;; Install interface headers + (copy-recursively "interfaces" + (string-append (assoc-ref outputs "out") + "/include"))) + %standard-phases)))) + (inputs + `(("libxml2" ,libxml2) + ("ngs-sdk" ,ngs-sdk) + ("ngs-java" ,ngs-java) + ("libmagic" ,file) + ("hdf5" ,hdf5))) + (native-inputs `(("perl" ,perl))) + (home-page "https://github.com/ncbi/ncbi-vdb") + (synopsis "Database engine for genetic information") + (description + "The NCBI-VDB library implements a highly compressed columnar data +warehousing engine that is most often used to store genetic information. +Databases are stored in a portable image within the file system, and can be +accessed/downloaded on demand across HTTP.") + (license license:public-domain))) + +(define-public sra-tools + (package + (name "sra-tools") + (version "2.4.5-5") + (source + (origin + (method url-fetch) + (uri + (string-append "https://github.com/ncbi/sra-tools/archive/" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "11nrnvz7a012f4iryf0wiwrid0h111grsfxbxa9j51h3f2xbvgns")))) + (build-system gnu-build-system) + (arguments + `(#:parallel-build? #f ; not supported + #:tests? #f ; no "check" target + #:phases + (alist-replace + 'configure + (lambda* (#:key inputs outputs #:allow-other-keys) + ;; The build system expects a directory containing the sources and + ;; raw build output of ncbi-vdb, including files that are not + ;; installed. Since we are building against an installed version of + ;; ncbi-vdb, the following modifications are needed. + (substitute* "setup/konfigure.perl" + ;; Make the configure script look for the "ilib" directory of + ;; "ncbi-vdb" without first checking for the existence of a + ;; matching library in its "lib" directory. + (("^ my \\$f = File::Spec->catdir\\(\\$libdir, \\$lib\\);") + "my $f = File::Spec->catdir($ilibdir, $ilib);") + ;; Look for interface libraries in ncbi-vdb's "ilib" directory. + (("my \\$ilibdir = File::Spec->catdir\\(\\$builddir, 'ilib'\\);") + "my $ilibdir = File::Spec->catdir($dir, 'ilib');")) + + ;; The 'configure' script doesn't recognize things like + ;; '--enable-fast-install'. + (zero? (system* + "./configure" + (string-append "--build-prefix=" (getcwd) "/build") + (string-append "--prefix=" (assoc-ref outputs "out")) + (string-append "--debug") + (string-append "--with-fuse-prefix=" + (assoc-ref inputs "fuse")) + (string-append "--with-magic-prefix=" + (assoc-ref inputs "libmagic")) + ;; TODO: building with libxml2 fails with linker errors + ;; (string-append "--with-xml2-prefix=" + ;; (assoc-ref inputs "libxml2")) + (string-append "--with-ncbi-vdb-sources=" + (assoc-ref inputs "ncbi-vdb")) + (string-append "--with-ncbi-vdb-build=" + (assoc-ref inputs "ncbi-vdb")) + (string-append "--with-ngs-sdk-prefix=" + (assoc-ref inputs "ngs-sdk")) + (string-append "--with-hdf5-prefix=" + (assoc-ref inputs "hdf5"))))) + %standard-phases))) + (native-inputs `(("perl" ,perl))) + (inputs + `(("ngs-sdk" ,ngs-sdk) + ("ncbi-vdb" ,ncbi-vdb) + ("libmagic" ,file) + ("fuse" ,fuse) + ("hdf5" ,hdf5) + ("zlib" ,zlib))) + (home-page "http://www.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=software") + (synopsis "Tools and libraries for reading and writing sequencing data") + (description + "The SRA Toolkit from NCBI is a collection of tools and libraries for +reading of sequencing files from the Sequence Read Archive (SRA) database and +writing files into the .sra format.") + (license license:public-domain))) + (define-public seqan (package (name "seqan") @@ -810,3 +1575,188 @@ chimeric (fusion) transcripts, and is also capable of mapping full-length RNA sequences.") ;; STAR is licensed under GPLv3 or later; htslib is MIT-licensed. (license license:gpl3+))) + +(define-public subread + (package + (name "subread") + (version "1.4.6-p2") + (source (origin + (method url-fetch) + (uri (string-append + "mirror://sourceforge/subread/subread-" + version "-source.tar.gz")) + (sha256 + (base32 + "06sv9mpcsdj6p68y15d6gi70lca3lxmzk0dn61hg0kfsa7rxmsr3")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ;no "check" target + #:make-flags '("-f" "Makefile.Linux") + #:phases + (alist-cons-after + 'unpack 'enter-dir + (lambda _ (chdir "src") #t) + (alist-replace + 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((bin (string-append (assoc-ref outputs "out") "/bin/"))) + (mkdir-p bin) + (copy-recursively "../bin" bin))) + ;; no "configure" script + (alist-delete 'configure %standard-phases))))) + (inputs `(("zlib" ,zlib))) + (home-page "http://bioinf.wehi.edu.au/subread-package/") + (synopsis "Tool kit for processing next-gen sequencing data") + (description + "The subread package contains the following tools: subread aligner, a +general-purpose read aligner; subjunc aligner: detecting exon-exon junctions +and mapping RNA-seq reads; featureCounts: counting mapped reads for genomic +features; exactSNP: a SNP caller that discovers SNPs by testing signals +against local background noises.") + (license license:gpl3+))) + +(define-public shogun + (package + (name "shogun") + (version "4.0.0") + (source + (origin + (method url-fetch) + (uri (string-append + "ftp://shogun-toolbox.org/shogun/releases/" + (version-major+minor version) + "/sources/shogun-" version ".tar.bz2")) + (sha256 + (base32 + "159nlijnb7mnrv9za80wnm1shwvy45hgrqzn51hxy7gw4z6d6fdb")))) + (build-system cmake-build-system) + (arguments + '(#:tests? #f ;no check target + #:phases + (alist-cons-after + 'unpack 'delete-broken-symlinks + (lambda _ + (for-each delete-file '("applications/arts/data" + "applications/asp/data" + "applications/easysvm/data" + "applications/msplicer/data" + "applications/ocr/data" + "examples/documented/data" + "examples/documented/matlab_static" + "examples/documented/octave_static" + "examples/undocumented/data" + "examples/undocumented/matlab_static" + "examples/undocumented/octave_static" + "tests/integration/data" + "tests/integration/matlab_static" + "tests/integration/octave_static" + "tests/integration/python_modular/tests")) + #t) + (alist-cons-after + 'unpack 'change-R-target-path + (lambda* (#:key outputs #:allow-other-keys) + (substitute* '("src/interfaces/r_modular/CMakeLists.txt" + "src/interfaces/r_static/CMakeLists.txt" + "examples/undocumented/r_modular/CMakeLists.txt") + (("\\$\\{R_COMPONENT_LIB_PATH\\}") + (string-append (assoc-ref outputs "out") + "/lib/R/library/"))) + #t) + (alist-cons-after + 'unpack 'fix-octave-modules + (lambda* (#:key outputs #:allow-other-keys) + (substitute* '("src/interfaces/octave_modular/CMakeLists.txt" + "src/interfaces/octave_static/CMakeLists.txt") + (("^include_directories\\(\\$\\{OCTAVE_INCLUDE_DIRS\\}") + "include_directories(${OCTAVE_INCLUDE_DIRS} ${OCTAVE_INCLUDE_DIRS}/octave")) + + ;; change target directory + (substitute* "src/interfaces/octave_modular/CMakeLists.txt" + (("\\$\\{OCTAVE_OCT_LOCAL_API_FILE_DIR\\}") + (string-append (assoc-ref outputs "out") + "/share/octave/packages"))) + #t) + (alist-cons-before + 'build 'set-HOME + ;; $HOME needs to be set at some point during the build phase + (lambda _ (setenv "HOME" "/tmp") #t) + %standard-phases)))) + #:configure-flags + (list "-DUSE_SVMLIGHT=OFF" ;disable proprietary SVMLIGHT + ;;"-DJavaModular=ON" ;requires unpackaged jblas + ;;"-DRubyModular=ON" ;requires unpackaged ruby-narray + ;;"-DPerlModular=ON" ;"FindPerlLibs" does not exist + ;;"-DLuaModular=ON" ;fails because lua doesn't build pkgconfig file + "-DOctaveModular=ON" + "-DOctaveStatic=ON" + "-DPythonModular=ON" + "-DPythonStatic=ON" + "-DRModular=ON" + "-DRStatic=ON" + "-DCmdLineStatic=ON"))) + (inputs + `(("python" ,python) + ("numpy" ,python-numpy) + ("r" ,r) + ("octave" ,octave) + ("swig" ,swig) + ("hdf5" ,hdf5) + ("atlas" ,atlas) + ("arpack" ,arpack-ng) + ("lapack" ,lapack) + ("glpk" ,glpk) + ("libxml2" ,libxml2) + ("lzo" ,lzo) + ("zlib" ,zlib))) + (native-inputs + `(("pkg-config" ,pkg-config))) + (home-page "http://shogun-toolbox.org/") + (synopsis "Machine learning toolbox") + (description + "The Shogun Machine learning toolbox provides a wide range of unified and +efficient Machine Learning (ML) methods. The toolbox seamlessly allows to +combine multiple data representations, algorithm classes, and general purpose +tools. This enables both rapid prototyping of data pipelines and extensibility +in terms of new algorithms.") + (license license:gpl3+))) + +(define-public vcftools + (package + (name "vcftools") + (version "0.1.12b") + (source (origin + (method url-fetch) + (uri (string-append + "mirror://sourceforge/vcftools/vcftools_" + version ".tar.gz")) + (sha256 + (base32 + "148al9h7f8g8my2qdnpax51kdd2yjrivlx6frvakf4lz5r8j88wx")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; no "check" target + #:make-flags (list + "CFLAGS=-O2" ; override "-m64" flag + (string-append "PREFIX=" (assoc-ref %outputs "out")) + (string-append "MANDIR=" (assoc-ref %outputs "out") + "/share/man/man1")) + #:phases + (alist-cons-after + 'unpack 'patch-manpage-install + (lambda _ + (substitute* "Makefile" + (("cp \\$\\{PREFIX\\}/cpp/vcftools.1") "cp ./cpp/vcftools.1"))) + (alist-delete 'configure %standard-phases)))) + (inputs + `(("perl" ,perl) + ("zlib" ,zlib))) + (home-page "http://vcftools.sourceforge.net/") + (synopsis "Tools for working with VCF files") + (description + "VCFtools is a program package designed for working with VCF files, such +as those generated by the 1000 Genomes Project. The aim of VCFtools is to +provide easily accessible methods for working with complex genetic variation +data in the form of VCF files.") + ;; The license is declared as LGPLv3 in the README and + ;; at http://vcftools.sourceforge.net/license.html + (license license:lgpl3))) diff --git a/gnu/packages/boost.scm b/gnu/packages/boost.scm index 24fc53d0b8..2bdd8f19f0 100644 --- a/gnu/packages/boost.scm +++ b/gnu/packages/boost.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2014 John Darrington <jmd@gnu.org> ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr> +;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -51,6 +52,11 @@ (arguments (let ((build-flags `("threading=multi" "link=shared" + + ;; Set the RUNPATH to $libdir so that the libs find each other. + (string-append "linkflags=-Wl,-rpath=" + (assoc-ref outputs "out") "/lib") + ;; Boost's 'context' library is not yet supported on mips64, so ;; we disable it. The 'coroutine' library depends on 'context', ;; so we disable that too. @@ -58,7 +64,8 @@ (%current-system))) '("--without-context" "--without-coroutine") '())))) - `(#:phases + `(#:tests? #f + #:phases (alist-replace 'configure (lambda* (#:key outputs #:allow-other-keys) @@ -79,18 +86,14 @@ "--with-toolset=gcc")))) (alist-replace 'build - (lambda _ + (lambda* (#:key outputs #:allow-other-keys) (zero? (system* "./b2" ,@build-flags))) (alist-replace - 'check - (lambda _ #t) - - (alist-replace - 'install - (lambda _ - (zero? (system* "./b2" "install" ,@build-flags))) - %standard-phases))))))) + 'install + (lambda* (#:key outputs #:allow-other-keys) + (zero? (system* "./b2" "install" ,@build-flags))) + %standard-phases)))))) (home-page "http://boost.org") (synopsis "Peer-reviewed portable C++ source libraries") @@ -99,3 +102,25 @@ across a broad spectrum of applications.") (license (license:x11-style "http://www.boost.org/LICENSE_1_0.txt" "Some components have other similar licences.")))) + +(define-public mdds + (package + (name "mdds") + (version "0.12.0") + (source (origin + (method url-fetch) + (uri (string-append + "http://kohei.us/files/mdds/src/mdds_" version ".tar.bz2")) + (sha256 + (base32 + "10ar7r0gkdl2r7916jlkl5c38cynrh7x9s90a5i8d242r8ixw8ia")))) + (build-system gnu-build-system) + (propagated-inputs + `(("boost" ,boost))) ; inclusion of header files + (home-page "https://code.google.com/p/multidimalgorithm/") + (synopsis "Multi-dimensional C++ data structures and indexing algorithms") + (description "Mdds (multi-dimensional data structure) provides a +collection of multi-dimensional data structures and indexing algorithms +for C++. It includes flat segment trees, segment trees, rectangle sets, +point quad trees, multi-type vectors and multi-type matrices.") + (license license:expat))) diff --git a/gnu/packages/bootstrap/i686-linux/bash b/gnu/packages/bootstrap/i686-linux/bash Binary files differindex 9882d4adc7..4b99d7eb4a 100755 --- a/gnu/packages/bootstrap/i686-linux/bash +++ b/gnu/packages/bootstrap/i686-linux/bash diff --git a/gnu/packages/bootstrap/i686-linux/mkdir b/gnu/packages/bootstrap/i686-linux/mkdir Binary files differindex 0ddab232b7..6623a38404 100755 --- a/gnu/packages/bootstrap/i686-linux/mkdir +++ b/gnu/packages/bootstrap/i686-linux/mkdir diff --git a/gnu/packages/bootstrap/i686-linux/tar b/gnu/packages/bootstrap/i686-linux/tar Binary files differindex 6bee702cf5..d33cd391f1 100755 --- a/gnu/packages/bootstrap/i686-linux/tar +++ b/gnu/packages/bootstrap/i686-linux/tar diff --git a/gnu/packages/bootstrap/i686-linux/xz b/gnu/packages/bootstrap/i686-linux/xz Binary files differindex 5a126e4fc5..f94dbde77c 100755 --- a/gnu/packages/bootstrap/i686-linux/xz +++ b/gnu/packages/bootstrap/i686-linux/xz diff --git a/gnu/packages/bootstrap/x86_64-linux/bash b/gnu/packages/bootstrap/x86_64-linux/bash Binary files differindex 3b0227fbb1..b9c410b7cf 100755 --- a/gnu/packages/bootstrap/x86_64-linux/bash +++ b/gnu/packages/bootstrap/x86_64-linux/bash diff --git a/gnu/packages/bootstrap/x86_64-linux/mkdir b/gnu/packages/bootstrap/x86_64-linux/mkdir Binary files differindex 7207ad8a46..f8250ae693 100755 --- a/gnu/packages/bootstrap/x86_64-linux/mkdir +++ b/gnu/packages/bootstrap/x86_64-linux/mkdir diff --git a/gnu/packages/bootstrap/x86_64-linux/tar b/gnu/packages/bootstrap/x86_64-linux/tar Binary files differindex 9104da7b53..90e492f89d 100755 --- a/gnu/packages/bootstrap/x86_64-linux/tar +++ b/gnu/packages/bootstrap/x86_64-linux/tar diff --git a/gnu/packages/bootstrap/x86_64-linux/xz b/gnu/packages/bootstrap/x86_64-linux/xz Binary files differindex 488e319b37..6bfe3c6d96 100755 --- a/gnu/packages/bootstrap/x86_64-linux/xz +++ b/gnu/packages/bootstrap/x86_64-linux/xz diff --git a/gnu/packages/busybox.scm b/gnu/packages/busybox.scm index d200cd7ad5..13630b39dc 100644 --- a/gnu/packages/busybox.scm +++ b/gnu/packages/busybox.scm @@ -53,8 +53,9 @@ ;; There is no /usr/bin or /bin - replace it with /gnu/store (substitute* "testsuite/cpio.tests" - (("/usr/bin") "/gnu/store") - (("usr") "gnu")) + (("/usr/bin") (%store-directory)) + (("usr") (car (filter (negate string-null?) + (string-split (%store-directory) #\/))))) (substitute* "testsuite/date/date-works-1" (("/bin/date") (which "date"))) diff --git a/gnu/packages/calendar.scm b/gnu/packages/calendar.scm new file mode 100644 index 0000000000..7e87fbbfe4 --- /dev/null +++ b/gnu/packages/calendar.scm @@ -0,0 +1,52 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2015 David Thompson <davet@gnu.org> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (gnu packages calendar) + #:use-module (gnu packages) + #:use-module (guix licenses) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system cmake) + #:use-module (gnu packages icu4c) + #:use-module (gnu packages perl)) + +(define-public libical + (package + (name "libical") + (version "1.0.1") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/libical/libical/releases/download/v" + version "/libical-" version ".tar.gz")) + (sha256 + (base32 + "14lmjj63zyx88rf1z71l0v9ms4c2vpdhmixksjjxgywp5p2f7708")))) + (build-system cmake-build-system) + (arguments + '(#:tests? #f)) ; test suite appears broken + (native-inputs + `(("perl" ,perl))) + (inputs + `(("icu4c" ,icu4c))) + (home-page "https://libical.github.io/libical/") + (synopsis "iCalendar protocols and data formats implementation") + (description + "Libical is an implementation of the iCalendar protocols and protocol +data units.") + (license lgpl2.1))) diff --git a/gnu/packages/cdrom.scm b/gnu/packages/cdrom.scm index 9af0ea7b09..8ecc909c79 100644 --- a/gnu/packages/cdrom.scm +++ b/gnu/packages/cdrom.scm @@ -95,7 +95,9 @@ caching facility provided by the library.") for CD-ROM and CD image file access. It allows the developer to add CD access to an application without having to worry about the OS- and device-dependent properties of CD-ROM or the specific details of CD image -formats.") +formats. It includes pycdio, a Python interface to libcdio, and +libcdio-paranoia, a library providing jitter-free and error-free audio +extraction from CDs.") (license gpl3+))) (define-public libcdio-paranoia @@ -122,14 +124,14 @@ libcdio.") (define-public xorriso (package (name "xorriso") - (version "1.3.8") + (version "1.4.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/xorriso/xorriso-" version ".tar.gz")) (sha256 (base32 - "0zhhj9lr9z7hnb2alac54mc28w1l0mbanphhpmy3ylsi8rih84lh")))) + "0mhfxn2idkrw1i65a5y4gnb1fig85zpnszb9ax7w4a2v062y1l8b")))) (build-system gnu-build-system) (inputs `(("acl" ,acl) @@ -159,30 +161,17 @@ files.") (sha256 (base32 "1pv4zrajm46za0f6lv162iqffih57a8ly4pc69f7y0gfyigb8p80")) - (patches (list (search-patch "cdparanoia-fpic.patch"))))) + (patches (list (search-patch "cdparanoia-fpic.patch"))) + (modules '((guix build utils))) + (snippet + ;; Make libraries respect LDFLAGS. + '(substitute* '("paranoia/Makefile.in" "interface/Makefile.in") + (("-Wl,-soname") "$(LDFLAGS) -Wl,-soname"))))) (build-system gnu-build-system) - (inputs - `(("patchelf" ,patchelf))) (arguments `(#:tests? #f ; there is no check target - #:modules ((guix build gnu-build-system) - (guix build utils) - (guix build rpath) - (srfi srfi-26)) - #:imported-modules ((guix build gnu-build-system) - (guix build utils) - (guix build rpath)) - #:phases - (alist-cons-after - 'strip 'add-lib-to-runpath - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (lib (string-append out "/lib"))) - ;; Add LIB to the RUNPATH of all the executables. - (with-directory-excursion out - (for-each (cut augment-rpath <> lib) - (find-files "bin" ".*"))))) - %standard-phases))) + #:configure-flags ; Add $libdir to the RUNPATH of all the executables. + (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")))) (home-page "http://www.xiph.org/paranoia/") (synopsis "Audio CD reading utility") (description "Cdparanoia retrieves audio tracks from CDDA capable CDROM diff --git a/gnu/packages/certs.scm b/gnu/packages/certs.scm index db89466328..947d2b53f1 100644 --- a/gnu/packages/certs.scm +++ b/gnu/packages/certs.scm @@ -85,8 +85,6 @@ (rnrs io ports) (srfi srfi-26) (ice-9 regex)) - #:imported-modules ((guix build gnu-build-system) - (guix build utils)) #:phases (alist-cons-after 'unpack 'install diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index afaf5571e5..5349ede0fa 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -1,6 +1,8 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org> ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org> +;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org> +;;; Copyright © 2015 Andreas Enge <andreas@enge.fr> ;;; ;;; This file is part of GNU Guix. ;;; @@ -23,7 +25,9 @@ #:use-module (guix licenses) #:use-module (guix packages) #:use-module (guix download) - #:use-module (guix build-system gnu)) + #:use-module (guix git-download) + #:use-module (guix build-system gnu) + #:use-module (guix build-system trivial)) (define-public check (package @@ -86,12 +90,18 @@ with a flexible variety of user interfaces.") (version "1.12.1") (source (origin (method url-fetch) - (uri (string-append "mirror://sourceforge/cppunit/" name "/" + (uri (string-append "mirror://sourceforge/cppunit/" name "/" name "-" version ".tar.gz")) (sha256 (base32 "0jm49v5rmc5qw34vqs56gy8xja1dhci73bmh23cig4kcir6a0a5c")))) + ;; Explicitly link with libdl. This is expected to be done by packages + ;; relying on cppunit for their tests. However, not all of them do. + ;; If we added the linker flag to such packages, we would pollute all + ;; binaries, not only those used for testing. + (arguments + `(#:make-flags '("LDFLAGS=-ldl"))) (build-system gnu-build-system) (home-page "http://sourceforge.net/projects/cppunit/") (synopsis "Unit testing framework for C++") @@ -99,3 +109,43 @@ with a flexible variety of user interfaces.") unit testing. Test output is in XML for automatic testing and GUI based for supervised tests.") (license lgpl2.1))) ; no copyright notices. LGPL2.1 is in the tarball + +(define-public catch-framework + (package + (name "catch") + (version "1.0.53") ;Sub-minor is the build number + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/philsquared/Catch") + ;; Semi-arbitrary. Contains mostly documentation fixes + ;; since build 53. + (commit "b9ec8a1"))) + (file-name (string-append name "-" version)) + (sha256 + (base32 + "05iijiwjwcjbza7qamwd32d0jypi0lpywmilmmj2xh280mcl4dbd")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils)) + (let* ((source (assoc-ref %build-inputs "source")) + (output (assoc-ref %outputs "out")) + (incdir (string-append output "/include")) + (docdir (string-append output "/share/doc/catch-" + ,version))) + (begin + (for-each mkdir-p (list incdir docdir)) + (copy-file (string-append source + "/single_include/catch.hpp") + (string-append incdir + "/catch.hpp")) + (copy-recursively (string-append source "/docs") + docdir)))))) + (home-page "http://catch-lib.net/") + (synopsis "Automated test framework for C++ and Objective-C") + (description + "Catch stands for C++ Automated Test Cases in Headers and is a +multi-paradigm automated test framework for C++ and Objective-C.") + (license boost1.0))) diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm index 1fb9241596..6f8b9f67e3 100644 --- a/gnu/packages/cmake.scm +++ b/gnu/packages/cmake.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org> ;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net> +;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -35,7 +36,7 @@ (define-public cmake (package (name "cmake") - (version "3.1.3") + (version "3.2.2") (source (origin (method url-fetch) (uri (string-append @@ -43,11 +44,12 @@ (version-major+minor version) "/cmake-" version ".tar.gz")) (sha256 - (base32 "1l662p9lscbzx9s85y86cynb9fn1rb2alqg4584wqq9gibxd7x25")) + (base32 "0y3w83al0vh9ll7fnqm3nx7l8hsl85k8iv9abxb791q36rp4xsdd")) (patches (list (search-patch "cmake-fix-tests.patch"))))) (build-system gnu-build-system) (arguments `(#:test-target "test" + #:parallel-tests? #f ; 3 test from RunCMake fails #:phases (alist-cons-before 'configure 'patch-bin-sh (lambda _ @@ -66,7 +68,8 @@ "Utilities/cmbzip2/Makefile-libbz2_so" "Utilities/Release/release_cmake.cmake" "Utilities/cmlibarchive/libarchive/archive_write_set_format_shar.c" - "Tests/CMakeLists.txt") + "Tests/CMakeLists.txt" + "Tests/RunCMake/File_Generate/RunCMakeTest.cmake") (("/bin/sh") (which "sh")))) (alist-cons-before 'configure 'set-paths @@ -74,7 +77,9 @@ ;; Help cmake's bootstrap process to find system libraries (begin (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH")) - (setenv "CMAKE_INCLUDE_PATH" (getenv "CPATH")))) + (setenv "CMAKE_INCLUDE_PATH" (getenv "CPATH")) + ;; Get verbose output from failed tests + (setenv "CTEST_OUTPUT_ON_FAILURE" "TRUE"))) (alist-replace 'configure (lambda* (#:key outputs #:allow-other-keys) @@ -83,6 +88,7 @@ "./configure" (string-append "--prefix=" out) "--system-libs" + "--no-system-jsoncpp" ; not packaged yet ;; By default, the man pages and other docs land ;; in PREFIX/man and PREFIX/doc, but we want them ;; in share/{man,doc}. Note that unlike diff --git a/gnu/packages/code.scm b/gnu/packages/code.scm index 7799e38930..9d2bde829d 100644 --- a/gnu/packages/code.scm +++ b/gnu/packages/code.scm @@ -20,9 +20,13 @@ (define-module (gnu packages code) #:use-module (guix packages) #:use-module (guix download) - #:use-module (guix licenses) + #:use-module ((guix licenses) #:prefix license:) #:use-module (guix build-system gnu) + #:use-module (gnu packages compression) + #:use-module (gnu packages databases) #:use-module (gnu packages emacs) + #:use-module (gnu packages pcre) + #:use-module (gnu packages pkg-config) #:use-module (gnu packages perl) #:use-module (gnu packages texinfo) #:use-module (gnu packages autogen) @@ -54,7 +58,7 @@ control flow of the program. It can output the graph in several styles and in either the POSIX format or in an extended GNU format. cflow also includes a major mode for Emacs for examining the flowcharts that it produces.") - (license gpl3+))) + (license license:gpl3+))) (define-public complexity (package @@ -78,26 +82,29 @@ a major mode for Emacs for examining the flowcharts that it produces.") convoluted, overly long or otherwise difficult to understand. This may help in learning or reviewing unfamiliar code or perhaps highlighting your own code that seemed comprehensible when you wrote it.") - (license gpl3+))) + (license license:gpl3+))) (define-public global ; a global variable (package (name "global") - (version "6.3.4") + (version "6.4") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/global/global-" version ".tar.gz")) (sha256 (base32 - "0hcplcayyjf42d8ygzla6142b5dq4ybq4wg3n3cgx3b5yfhvic85")))) + "13i4zwx6gaibc4j79wd0hgxysw8ibxz9c018zxhydnxlyadzcnri")))) (build-system gnu-build-system) (inputs `(("ncurses" ,ncurses) - ("libltdl" ,libltdl))) + ("libltdl" ,libltdl) + ("sqlite" ,sqlite))) (arguments `(#:configure-flags (list (string-append "--with-ncurses=" - (assoc-ref %build-inputs "ncurses"))) + (assoc-ref %build-inputs "ncurses")) + (string-append "--with-sqlite3=" + (assoc-ref %build-inputs "sqlite"))) #:phases (alist-cons-after 'install 'post-install @@ -119,7 +126,7 @@ highlighting your own code that seemed comprehensible when you wrote it.") across a wide array of environments, such as different text editors, shells and web browsers. The resulting tags are useful for quickly moving around in a large, deeply nested project.") - (license gpl3+))) + (license license:gpl3+))) (define-public sloccount (package @@ -135,8 +142,8 @@ a large, deeply nested project.") (build-system gnu-build-system) (arguments '(#:phases (modify-phases %standard-phases - (delete configure) - (add-before build make-dotl-files-older + (delete 'configure) + (add-before 'build 'make-dotl-files-older (lambda _ ;; Make the '.l' files as old as the '.c' ;; files to avoid triggering the rule that @@ -148,7 +155,7 @@ a large, deeply nested project.") (set-file-time file ref)) (find-files "." "\\.[chl]$")) #t)) - (add-before install make-target-directories + (add-before 'install 'make-target-directories (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (mkdir-p (string-append out "/bin")) @@ -156,7 +163,7 @@ a large, deeply nested project.") "/share/man/man1")) (mkdir-p (string-append out "/share/doc"))))) - (replace check + (replace 'check (lambda _ (setenv "HOME" (getcwd)) (setenv "PATH" @@ -175,4 +182,46 @@ code (SLOC) in large software systems. It can automatically identify and measure a wide range of programming languages. It automatically estimates the effort, time, and money it would take to develop the software, using the COCOMO model or user-provided parameters.") - (license gpl2+))) + (license license:gpl2+))) + +(define-public the-silver-searcher + (package + (name "the-silver-searcher") + (version "0.29.1") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/ggreer/the_silver_searcher/archive/" + version ".tar.gz")) + (sha256 + (base32 + "0ah7vcqprl9hhafi68bvzaiywy7dfm28zf7kpw3xrlqzfn0vg7kp")) + (file-name (string-append name "-" version ".tar.gz")))) + (build-system gnu-build-system) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("libtool" ,libtool) + ("pkg-config" ,pkg-config))) + (inputs + `(("pcre" ,pcre) + ("xz" ,xz) + ("zlib" ,zlib))) + (arguments + `(#:phases + ;; There is no configure yet, so let's create it, but let configure and + ;; make do the work in later phases. + (alist-cons-before 'configure 'autoconf + (lambda _ + (substitute* "build.sh" + (("./configure") "true") + (("make -j4") "true")) + (zero? (system* "sh" "build.sh"))) + %standard-phases))) + (home-page "http://geoff.greer.fm/ag/") + (synopsis "Fast code searching tool") + (description + "The silver searcher, or 'ag', is tool for quickly searching through +files, but compared to grep is much faster and respects files like .gitignore, +.hgignore, etc.") + (license license:asl2.0))) diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index f312e1729c..9611ff2620 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2014 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org> -;;; Copyright © 2014 Mark H Weaver <mhw@netris.org> +;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -26,12 +26,12 @@ #:use-module (gnu packages base) #:use-module (gnu packages bash) #:use-module (gnu packages gcc) - #:use-module (gnu packages ed) #:use-module (gnu packages m4) #:use-module (gnu packages file) #:use-module (gnu packages gawk) #:use-module (gnu packages bison) #:use-module (gnu packages guile) + #:use-module (gnu packages gettext) #:use-module (gnu packages multiprecision) #:use-module (gnu packages compression) #:use-module (gnu packages perl) @@ -417,6 +417,40 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" '("gcc" "libc"))) (current-source-location))))) +(define gettext-boot0 + ;; A minimal gettext used during bootstrap. + (let ((gettext-minimal + (package (inherit gnu-gettext) + (name "gettext-boot0") + (inputs '()) ;zero dependencies + (arguments + (substitute-keyword-arguments + `(#:tests? #f + ,@(package-arguments gnu-gettext)) + ((#:phases phases) + `(modify-phases ,phases + ;; Build only the tools. + (add-after 'unpack 'chdir + (lambda _ + (chdir "gettext-tools"))) + + ;; Some test programs require pthreads, which we don't have. + (add-before 'configure 'no-test-programs + (lambda _ + (substitute* "tests/Makefile.in" + (("^PROGRAMS =.*$") + "PROGRAMS =\n")) + #t)) + + ;; Don't try to link against libexpat. + (delete 'link-expat) + (delete 'patch-tests)))))))) + (package-with-bootstrap-guile + (package-with-explicit-inputs gettext-minimal + %boot1-inputs + (current-source-location) + #:guile %bootstrap-guile)))) + (define-public glibc-final ;; The final glibc, which embeds the statically-linked Bash built above. (package (inherit glibc-final-with-bootstrap-bash) @@ -426,6 +460,10 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" "static-bash" (package-inputs glibc-final-with-bootstrap-bash)))) + ;; This time we need 'msgfmt' to install all the libc.mo files. + (native-inputs `(,@(package-native-inputs glibc-final-with-bootstrap-bash) + ("gettext" ,gettext-boot0))) + ;; The final libc only refers to itself, but the 'debug' output contains ;; references to GCC-BOOT0 and to the Linux headers. XXX: Would be great ;; if 'allowed-references' were per-output. @@ -500,6 +538,11 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" #:allowed-references ("out" "lib" ,glibc-final) + ;; Things like libasan.so and libstdc++.so NEED ld.so for some + ;; reason, but it is not in their RUNPATH. This is a false + ;; positive, so turn it off. + #:validate-runpath? #f + ;; Build again GMP & co. within GCC's build process, because it's hard ;; to do outside (because GCC-BOOT0 is a cross-compiler, and thus ;; doesn't honor $LIBRARY_PATH, which breaks `gnu-build-system'.) @@ -540,54 +583,10 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" (define ld-wrapper-boot3 ;; A linker wrapper that uses the bootstrap Guile. - (package - (name "ld-wrapper-boot3") - (version "0") - (source #f) - (build-system trivial-build-system) - (inputs `(("binutils" ,binutils-final) - ("guile" ,%bootstrap-guile) - ("bash" ,@(assoc-ref %boot2-inputs "bash")) - ("wrapper" ,(search-path %load-path - "gnu/packages/ld-wrapper.scm")))) - (arguments - `(#:guile ,%bootstrap-guile - #:modules ((guix build utils)) - #:builder (begin - (use-modules (guix build utils) - (system base compile)) - - (let* ((out (assoc-ref %outputs "out")) - (bin (string-append out "/bin")) - (ld (string-append bin "/ld")) - (go (string-append bin "/ld.go"))) - - (setvbuf (current-output-port) _IOLBF) - (format #t "building ~s/bin/ld wrapper in ~s~%" - (assoc-ref %build-inputs "binutils") - out) - - (mkdir-p bin) - (copy-file (assoc-ref %build-inputs "wrapper") ld) - (substitute* ld - (("@GUILE@") - (string-append (assoc-ref %build-inputs "guile") - "/bin/guile")) - (("@BASH@") - (string-append (assoc-ref %build-inputs "bash") - "/bin/bash")) - (("@LD@") - (string-append (assoc-ref %build-inputs "binutils") - "/bin/ld"))) - (chmod ld #o555) - (compile-file ld #:output-file go))))) - (synopsis "The linker wrapper") - (description - "The linker wrapper (or `ld-wrapper') wraps the linker to add any -missing `-rpath' flags, and to detect any misuse of libraries outside of the -store.") - (home-page #f) - (license gpl3+))) + (make-ld-wrapper "ld-wrapper-boot3" + #:binutils binutils-final + #:guile %bootstrap-guile + #:bash (car (assoc-ref %boot2-inputs "bash")))) (define %boot3-inputs ;; 4th stage inputs. @@ -616,7 +615,7 @@ store.") (current-source-location) #:guile %bootstrap-guile))) -(define glibc-utf8-locales-final +(define-public glibc-utf8-locales-final ;; Now that we have GUILE-FINAL, build the UTF-8 locales. They are needed ;; by the build processes afterwards so their 'scm_to_locale_string' works ;; with the full range of Unicode codepoints (remember @@ -757,16 +756,26 @@ COREUTILS-FINAL vs. COREUTILS, etc." '(#:modules ((guix build union)) #:builder (begin (use-modules (ice-9 match) + (srfi srfi-26) (guix build union)) - (match %build-inputs - (((names . directories) ...) - (union-build (assoc-ref %outputs "out") - directories))) + (let ((out (assoc-ref %outputs "out"))) + + (match %build-inputs + (((names . directories) ...) + (union-build out directories))) - (union-build (assoc-ref %outputs "debug") - (list (assoc-ref %build-inputs - "libc-debug")))))) + ;; Remove the 'sh' and 'bash' binaries that come with + ;; libc to avoid polluting the user's profile (these are + ;; statically-linked binaries with no locale support and + ;; so on.) + (for-each (lambda (file) + (delete-file (string-append out "/bin/" file))) + '("sh" "bash")) + + (union-build (assoc-ref %outputs "debug") + (list (assoc-ref %build-inputs + "libc-debug"))))))) (native-search-paths (package-native-search-paths gcc)) (search-paths (package-search-paths gcc)) @@ -795,4 +804,7 @@ and binaries, plus debugging symbols in the 'debug' output), and Binutils.") (define-public gcc-toolchain-4.9 (gcc-toolchain gcc-4.9)) +(define-public gcc-toolchain-5.1 + (gcc-toolchain gcc-5.1)) + ;;; commencement.scm ends here diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index 8b36766200..b76dd5275a 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com> +;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -24,7 +25,9 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu) - #:use-module (gnu packages base)) + #:use-module (guix build-system perl) + #:use-module (gnu packages base) + #:use-module (gnu packages perl)) (define-public zlib (package @@ -294,7 +297,7 @@ archiving. Lzip is a clean implementation of the LZMA algorithm.") (define-public sharutils (package (name "sharutils") - (version "4.15") + (version "4.15.1") (source (origin (method url-fetch) @@ -302,7 +305,7 @@ archiving. Lzip is a clean implementation of the LZMA algorithm.") version ".tar.xz")) (sha256 (base32 - "19gqb6qbqmpgh6xlpgpj0ayw2nshllxg9d01qb5z8bnkhfcla8ka")))) + "02p7j270wrbwxcb86lcvxrzl29xmr3n5a2m7if46jnprvcvycb5r")))) (build-system gnu-build-system) (inputs `(("which" ,which))) @@ -343,3 +346,80 @@ This package is mostly for compatibility and historical interest.") "The purpose of libmspack is to provide both compression and decompression of some loosely related file formats used by Microsoft.") (license license:lgpl2.1+))) + +(define-public perl-compress-raw-bzip2 + (package + (name "perl-compress-raw-bzip2") + (version "2.068") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/P/PM/PMQS/" + "Compress-Raw-Bzip2-" version ".tar.gz")) + (sha256 + (base32 + "16hl58xppckldz05zdyid1l5gpaykzwvkq682h3rc3nilbhgjqqg")))) + (build-system perl-build-system) + ;; TODO: Use our bzip2 package. + (home-page "http://search.cpan.org/dist/Compress-Raw-Bzip2") + (synopsis "Low-level interface to bzip2 compression library") + (description "This module provides a Perl interface to the bzip2 +compression library.") + (license (package-license perl)))) + +(define-public perl-compress-raw-zlib + (package + (name "perl-compress-raw-zlib") + (version "2.068") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/P/PM/PMQS/" + "Compress-Raw-Zlib-" version ".tar.gz")) + (sha256 + (base32 + "06q7n87g26nn5gv4z2p31ca32f6zk124hqxc25rfgkjd3qi5798i")))) + (build-system perl-build-system) + (inputs + `(("zlib" ,zlib))) + (arguments + `(#:phases (modify-phases %standard-phases + (add-before + 'configure 'configure-zlib + (lambda* (#:key inputs #:allow-other-keys) + (call-with-output-file "config.in" + (lambda (port) + (format port " +BUILD_ZLIB = False +INCLUDE = ~a/include +LIB = ~:*~a/lib +OLD_ZLIB = False +GZIP_OS_CODE = AUTO_DETECT" + (assoc-ref inputs "zlib"))))))))) + (home-page "http://search.cpan.org/dist/Compress-Raw-Zlib") + (synopsis "Low-level interface to zlib compression library") + (description "This module provides a Perl interface to the zlib +compression library.") + (license (package-license perl)))) + +(define-public perl-io-compress + (package + (name "perl-io-compress") + (version "2.068") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/P/PM/PMQS/" + "IO-Compress-" version ".tar.gz")) + (sha256 + (base32 + "0dy0apjp7j9dfkzfjspjd3z9gh26srx5vac72g59bkkz1jf8s1gs")))) + (build-system perl-build-system) + (propagated-inputs + `(("perl-compress-raw-zlib" ,perl-compress-raw-zlib) ; >=2.068 + ("perl-compress-raw-bzip2" ,perl-compress-raw-bzip2))) ; >=2.068 + (home-page "http://search.cpan.org/dist/IO-Compress") + (synopsis "IO Interface to compressed files/buffers") + (description "IO-Compress provides a Perl interface to allow reading and +writing of compressed data created with the zlib and bzip2 libraries.") + (license (package-license perl)))) diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index 5a67d4b6ac..9a459400e8 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -130,12 +130,16 @@ may be either a libc package or #f.)" ,target)) (binutils (string-append (assoc-ref inputs "binutils-cross") - "/bin/" ,target "-"))) + "/bin/" ,target "-")) + (wrapper (string-append + (assoc-ref inputs "ld-wrapper-cross") + "/bin/" ,target "-ld"))) (for-each (lambda (file) (symlink (string-append binutils file) (string-append libexec "/" file))) - '("as" "ld" "nm")) + '("as" "nm")) + (symlink wrapper (string-append libexec "/ld")) #t)) ,phases))) (if libc @@ -196,8 +200,10 @@ GCC that does not target a libc; otherwise, target that libc." target)) (source (origin (inherit (package-source gcc-4.8)) (patches - (cons (search-patch "gcc-cross-environment-variables.patch") - (cross-gcc-patches target))))) + (append + (origin-patches (package-source gcc-4.8)) + (cons (search-patch "gcc-cross-environment-variables.patch") + (cross-gcc-patches target)))))) ;; For simplicity, use a single output. Otherwise libgcc_s & co. are not ;; found by default, etc. @@ -214,7 +220,11 @@ GCC that does not target a libc; otherwise, target that libc." ,@(cross-gcc-arguments target libc))) (native-inputs - `(("binutils-cross" ,xbinutils) + `(("ld-wrapper-cross" ,(make-ld-wrapper + (string-append "ld-wrapper-" target) + #:target target + #:binutils xbinutils)) + ("binutils-cross" ,xbinutils) ;; Call it differently so that the builder can check whether the "libc" ;; input is #f. @@ -298,8 +308,13 @@ XBINUTILS and the cross tool chain." ;; "linux-headers" input to point to the right thing. (propagated-inputs `(("linux-headers" ,xlinux-headers))) + ;; FIXME: 'static-bash' should really be an input, not a native input, but + ;; to do that will require building an intermediate cross libc. + (inputs '()) + (native-inputs `(("cross-gcc" ,xgcc) ("cross-binutils" ,xbinutils) + ,@(package-inputs glibc) ;FIXME: static-bash ,@(package-native-inputs glibc))))) diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm index a74e4097eb..3acf9dfd46 100644 --- a/gnu/packages/cups.scm +++ b/gnu/packages/cups.scm @@ -36,7 +36,7 @@ (define-public cups-filters (package (name "cups-filters") - (version "1.0.61") + (version "1.0.68") (source (origin (method url-fetch) (uri @@ -44,7 +44,7 @@ "cups-filters-" version ".tar.xz")) (sha256 (base32 - "1bq48nnrarlbf6qc93bz1n5wlh6j420gppbck3r45sinwhz5wa7m")) + "0dx4assqzqdi0q4j7z5s7xzzvzxnd5c1njd9139a1h353qrcr5fi")) (modules '((guix build utils))) (snippet ;; install backends, banners and filters to cups-filters output diff --git a/gnu/packages/curl.scm b/gnu/packages/curl.scm index 821a957615..ab22645971 100644 --- a/gnu/packages/curl.scm +++ b/gnu/packages/curl.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> +;;; Copyright © 2015 Tomáš Čech <sleep_walker@suse.cz> ;;; ;;; This file is part of GNU Guix. ;;; @@ -37,15 +38,14 @@ (define-public curl (package (name "curl") - (version "7.40.0") + (version "7.42.1") (source (origin (method url-fetch) (uri (string-append "http://curl.haxx.se/download/curl-" version ".tar.lzma")) (sha256 (base32 - "1a15fdc26b3vwwmchzzpd3l1hfyhx06dn7b6lkikqd7kgwvg5ps7")) - (patches (list (search-patch "curl-gss-api-fix.patch"))))) + "0ircrhi4i9iviq0d9044rq288sdrww19d0ci6vmb4fh8nmm1jv1x")))) (build-system gnu-build-system) (inputs `(("gnutls" ,gnutls) ("gss" ,gss) @@ -68,6 +68,10 @@ (lambda _ (substitute* "tests/runtests.pl" (("/bin/sh") (which "sh"))) + ;; Test #1135 requires extern-scan.pl, which is not part of the + ;; tarball due to a mistake. It has been fixed upstream. We can + ;; simply disable the test as it is specific to VMS and OS/400. + (delete-file "tests/data/test1135") ;; The top-level "make check" does "make -C tests quiet-test", which ;; is too quiet. Use the "test" target instead, which is more diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index 29b7dbba55..27a16477d4 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2014 David Thompson <davet@gnu.org> ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org> +;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -36,13 +37,18 @@ #:use-module (gnu packages curl) #:use-module (gnu packages gnupg) #:use-module (gnu packages python) + #:use-module (gnu packages pcre) + #:use-module (gnu packages xml) + #:use-module (gnu packages bison) + #:use-module (gnu packages jemalloc) #:use-module ((guix licenses) #:select (gpl2 gpl3+ lgpl2.1+ lgpl3+ x11-style non-copyleft - public-domain)) + bsd-2 public-domain)) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu) #:use-module (guix build-system perl) + #:use-module (guix build-system cmake) #:use-module (srfi srfi-26) #:use-module (ice-9 match)) @@ -149,17 +155,85 @@ management system that supports the standardized Structured Query Language.") (license gpl2))) +(define-public mariadb + (package + (name "mariadb") + (version "10.0.18") + (source (origin + (method url-fetch) + (uri (string-append "https://downloads.mariadb.org/f/" + name "-" version "/source/" + name "-" version ".tar.gz")) + (sha256 + (base32 + "1xcs391cm0vnl9bvx1470v8z4d77zqv16n6iaqi12jm0ma8fwvv8")))) + (build-system cmake-build-system) + (arguments + '(#:configure-flags + '("-DBUILD_CONFIG=mysql_release" + "-DDEFAULT_CHARSET=utf8" + "-DDEFAULT_COLLATION=utf8_general_ci" + "-DMYSQL_DATADIR=/var/lib/mysql" + "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock" + "-DINSTALL_INFODIR=share/mysql/docs" + "-DINSTALL_MANDIR=share/man" + "-DINSTALL_PLUGINDIR=lib/mysql/plugin" + "-DINSTALL_SCRIPTDIR=bin" + "-DINSTALL_INCLUDEDIR=include/mysql" + "-DINSTALL_DOCREADMEDIR=share/mysql/docs" + "-DINSTALL_SUPPORTFILESDIR=share/mysql/support-files" + "-DINSTALL_MYSQLSHAREDIR=share/mysql" + "-DINSTALL_DOCDIR=share/mysql/docs" + "-DINSTALL_SHAREDIR=share/mysql") + #:phases + (modify-phases %standard-phases + (add-before + 'configure 'pre-configure + (lambda _ + (setenv "CONFIG_SHELL" (which "sh")) + #t)) + (add-after + 'install 'post-install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (test (assoc-ref outputs "test"))) + (substitute* (string-append out "/bin/mysql_install_db") + (("basedir=\"\"") + (string-append "basedir=\"" out "\""))) + ;; Remove unneeded files for testing. + (with-directory-excursion out + (for-each delete-file-recursively + '("data" "mysql-test" "sql-bench" + "share/man/man1/mysql-test-run.pl.1"))))))))) + (native-inputs + `(("bison" ,bison) + ("perl" ,perl))) + (inputs + `(("jemalloc" ,jemalloc) + ("libaio" ,libaio) + ("libxml2" ,libxml2) + ("ncurses" ,ncurses) + ("openssl" ,openssl) + ("pcre" ,pcre) + ("zlib" ,zlib))) + (home-page "https://mariadb.org/") + (synopsis "SQL database server") + (description + "MariaDB is a multi-user and multi-threaded SQL database server, designed +as a drop-in replacement of MySQL.") + (license gpl2))) + (define-public postgresql (package (name "postgresql") - (version "9.3.5") + (version "9.3.7") (source (origin (method url-fetch) (uri (string-append "http://ftp.postgresql.org/pub/source/v" - version "/postgresql-" version ".tar.gz")) + version "/postgresql-" version ".tar.bz2")) (sha256 (base32 - "08kga00izykgvnx7hn995wc4zjqslspapaa8z63045p1ya14mr4g")))) + "0ggz0i91znv053zx9qas7pjf93s5by3dk84z1jxbjkg8yyrnlx4b")))) (build-system gnu-build-system) (inputs `(("readline" ,readline) @@ -215,7 +289,7 @@ types are supported, as is encryption.") (define-public sqlite (package (name "sqlite") - (version "3.8.8.3") + (version "3.8.9") (source (origin (method url-fetch) ;; TODO: Download from sqlite.org once this bug : @@ -235,12 +309,15 @@ types are supported, as is encryption.") "/sqlite-autoconf-" numeric-version ".tar.gz"))) (sha256 (base32 - "04dl53iv5q0srv4jcgjfzsrdzkq6dg1sgmlmpw9lrd4xrmj6jmvl")))) + "18k90bbfvvgc5204nm1hzw0vsj9ygzv7zbq3z6zrya6j5hwvdsvn")))) (build-system gnu-build-system) (inputs `(("readline" ,readline))) - ;; Add -DSQLITE_SECURE_DELETE. GNU Icecat will refuse to use the system - ;; SQLite unless this option is enabled. - (arguments `(#:configure-flags '("CFLAGS=-O2 -DSQLITE_SECURE_DELETE"))) + (arguments + `(#:configure-flags + ;; Add -DSQLITE_SECURE_DELETE and -DSQLITE_ENABLE_UNLOCK_NOTIFY to + ;; CFLAGS. GNU Icecat will refuse to use the system SQLite unless these + ;; options are enabled. + '("CFLAGS=-O2 -DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_UNLOCK_NOTIFY"))) (home-page "http://www.sqlite.org/") (synopsis "The SQLite database management system") (description @@ -464,6 +541,29 @@ DBIx::Class::Schema by scanning database table definitions and setting up the columns, primary keys, unique constraints and relationships.") (license (package-license perl)))) +(define-public perl-dbd-pg + (package + (name "perl-dbd-pg") + (version "3.5.1") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/T/TU/TURNSTEP/" + "DBD-Pg-" version ".tar.gz")) + (sha256 + (base32 + "0z0kf1kjgbi5f6nr63i2fnrx7629d9lvxg1q8sficwb3zdf1ggzx")))) + (build-system perl-build-system) + (native-inputs + `(("perl-dbi" ,perl-dbi))) + (propagated-inputs + `(("perl-dbi" ,perl-dbi) + ("postgresql" ,postgresql))) + (home-page "http://search.cpan.org/dist/DBD-Pg") + (synopsis "DBI PostgreSQL interface") + (description "") + (license (package-license perl)))) + (define-public perl-dbd-sqlite (package (name "perl-dbd-sqlite") @@ -519,6 +619,52 @@ structures you provide it, so that you don't have to modify your code every time your data changes") (license (package-license perl)))) +(define-public perl-sql-splitstatement + (package + (name "perl-sql-splitstatement") + (version "1.00020") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/E/EM/EMAZEP/" + "SQL-SplitStatement-" version ".tar.gz")) + (sha256 + (base32 + "0bqg45k4c9qkb2ypynlwhpvzsl4ssfagmsalys18s5c79ps30z7p")))) + (build-system perl-build-system) + (native-inputs + `(("perl-test-exception" ,perl-test-exception))) + (propagated-inputs + `(("perl-class-accessor" ,perl-class-accessor) + ("perl-list-moreutils" ,perl-list-moreutils) + ("perl-regexp-common" ,perl-regexp-common) + ("perl-sql-tokenizer" ,perl-sql-tokenizer))) + (home-page "http://search.cpan.org/dist/SQL-SplitStatement") + (synopsis "Split SQL code into atomic statements") + (description "This module tries to split any SQL code, even including +non-standard extensions, into the atomic statements it is composed of.") + (license (package-license perl)))) + +(define-public perl-sql-tokenizer + (package + (name "perl-sql-tokenizer") + (version "0.24") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/I/IZ/IZUT/" + "SQL-Tokenizer-" version ".tar.gz")) + (sha256 + (base32 + "1qa2dfbzdlr5qqdam9yn78z5w3al5r8577x06qan8wv58ay6ka7s")))) + (build-system perl-build-system) + (home-page "http://search.cpan.org/dist/SQL-Tokenizer") + (synopsis "SQL tokenizer") + (description "SQL::Tokenizer is a tokenizer for SQL queries. It does not +claim to be a parser or query verifier. It just creates sane tokens from a +valid SQL query.") + (license (package-license perl)))) + (define-public unixodbc (package (name "unixodbc") @@ -538,3 +684,29 @@ Driver.") (license lgpl2.1+) ;; COPYING contains copy of lgpl2.1 - but copyright notices just say "LGPL" (home-page "http://www.unixodbc.org"))) + +(define-public unqlite + (package + (name "unqlite") + (version "1.1.6") + (source (origin + (method url-fetch) + ;; Contains bug fixes against the official release, and has an + ;; autotooled build system. + (uri (string-append "https://github.com/aidin36/tocc/releases/" + "download/v1.0.0/" + "unqlite-unofficial-" version ".tar.gz")) + (sha256 + (base32 + "1sbpvhg15gadq0mpcy16q7k3rkg4b4dicpnn5xifpkpn02sqik3s")))) + (build-system gnu-build-system) + (arguments `(#:tests? #f)) ;No check target + (home-page "http://www.unqlite.org") + (synopsis "In-memory key/value and document store") + (description + "UnQLite is an in-process software library which implements a +self-contained, serverless, zero-configuration, transactional NoSQL +database engine. UnQLite is a document store database similar to +MongoDB, Redis, CouchDB, etc. as well as a standard Key/Value store +similar to BerkelyDB, LevelDB, etc.") + (license bsd-2))) diff --git a/gnu/packages/dejagnu.scm b/gnu/packages/dejagnu.scm index 203bd6ea2c..60fd2124f0 100644 --- a/gnu/packages/dejagnu.scm +++ b/gnu/packages/dejagnu.scm @@ -26,7 +26,7 @@ (define-public dejagnu (package (name "dejagnu") - (version "1.5.2") + (version "1.5.3") (source (origin (method url-fetch) @@ -34,7 +34,7 @@ version ".tar.gz")) (sha256 (base32 - "18ikblg4x4y5fkw8sg0c2zmqgxdqqycswmws17sxx8m4sz6g7dch")))) + "069z3qrdv35cm2sbnfr5yjzplrqj9f61cchxis7j9mm19hv8x6q9")))) (build-system gnu-build-system) (inputs `(("expect" ,expect))) (arguments diff --git a/gnu/packages/dictionaries.scm b/gnu/packages/dictionaries.scm index b18e02a77e..345d0a26c1 100644 --- a/gnu/packages/dictionaries.scm +++ b/gnu/packages/dictionaries.scm @@ -17,18 +17,14 @@ ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. (define-module (gnu packages dictionaries) - #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix licenses) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system trivial) - #:use-module (guix build-system cmake) #:use-module (gnu packages base) - #:use-module (gnu packages compression) - #:use-module (gnu packages gettext) - #:use-module (gnu packages glib) - #:use-module (gnu packages pkg-config) - #:use-module (gnu packages readline) - #:use-module (gnu packages texinfo)) + #:use-module (gnu packages texinfo) + #:use-module ((gnu packages compression) + #:select (gzip))) (define-public vera (package @@ -79,37 +75,4 @@ (description "V.E.R.A. (Virtual Entity of Relevant Acronyms) is a list of computing acronyms distributed as an info document.") - (license license:fdl1.3+))) - -(define-public sdcv - (package - (name "sdcv") - (version "0.5.0-beta4") - (source - (origin - (method url-fetch) - (uri (string-append "mirror://sourceforge/project/sdcv/sdcv/sdcv-" - version "-Source.tar.bz2")) - (sha256 - (base32 "1b9v91al2c1499q6yx6q8jggid0714444mfj6myqgz3nvqjyrrqr")))) - (build-system cmake-build-system) - (native-inputs - `(("pkg-config" ,pkg-config))) - (inputs - `(("glib" ,glib) - ("gettext" ,gnu-gettext) - ("readline" ,readline) - ("zlib" ,zlib))) - (arguments - `(#:tests? #f ; no tests implemented - #:phases - ;; this is known workaround for missing lang files - (alist-cons-after 'build 'build-lang - (lambda _ (zero? (system* "make" "lang"))) - %standard-phases))) - (home-page "http://sdcv.sourceforge.net/") - (synopsis "Command line variant of StarDict") - (description - "Sdcv is command line dictionary utility, which supports StarDict dictinary -format.") - (license license:gpl2+))) + (license fdl1.3+))) diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm index 6a7fdcfb19..22fdd290a0 100644 --- a/gnu/packages/disk.scm +++ b/gnu/packages/disk.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012, 2013 Nikita Karetnikov <nikita@karetnikov.org> +;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -119,3 +120,30 @@ from one file to another, working to rescue data in case of read errors. The program also includes a tool for manipulating its log files, which are used to recover data more efficiently by only reading the necessary blocks.") (license gpl3+))) + +(define-public dosfstools + (package + (name "dosfstools") + (version "3.0.27") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/" name "/" name + "/releases/download/v" version "/" + name "-" version ".tar.xz")) + (sha256 + (base32 + "1a2qs5g2zqbk1gzaaf4v3fw3yny6jgbzddpgcamkp3fjifn8wxl5")))) + (build-system gnu-build-system) + (arguments + `(#:make-flags (list (string-append "PREFIX=" %output) + "CC=gcc") + #:tests? #f ;no tests + #:phases (modify-phases %standard-phases + (delete 'configure)))) + (home-page "https://github.com/dosfstools/dosfstools") + (synopsis "Utilities for making and checking MS-DOS FAT filesystems") + (description + "The dosfstools package includes the mkfs.fat and fsck.fat utilities, +which respectively make and check MS-DOS FAT filesystems.") + (license gpl3+))) diff --git a/gnu/packages/ebook.scm b/gnu/packages/ebook.scm index 196cbaeea3..f62456fe92 100644 --- a/gnu/packages/ebook.scm +++ b/gnu/packages/ebook.scm @@ -25,7 +25,6 @@ #:use-module (guix build-system python) #:use-module (gnu packages) #:use-module (gnu packages databases) - #:use-module (gnu packages ebook) #:use-module (gnu packages fontutils) #:use-module (gnu packages freedesktop) #:use-module (gnu packages glib) @@ -60,7 +59,7 @@ (define-public calibre (package (name "calibre") - (version "2.21.0") + (version "2.28.0") (source (origin (method url-fetch) @@ -69,7 +68,7 @@ version ".tar.xz")) (sha256 (base32 - "1adig2jxwbmsxcs36jaybhc8zdb8mnkc23kabw0c72izrsg4c5gb")) + "15sb74v0nlj45fhlnw1afll35l90cxw78s15fb2nx3fih7ahv3cf")) ;; Remove non-free or doubtful code, see ;; https://lists.gnu.org/archive/html/guix-devel/2015-02/msg00478.html (modules '((guix build utils))) @@ -77,7 +76,8 @@ '(begin (delete-file-recursively "src/unrar") (delete-file "src/odf/thumbnail.py"))) - (patches (list (search-patch "calibre-drop-unrar.patch"))))) + (patches (list (search-patch "calibre-drop-unrar.patch") + (search-patch "calibre-no-updates-dialog.patch"))))) (build-system python-build-system) (native-inputs `(("pkg-config" ,pkg-config) diff --git a/gnu/packages/ed.scm b/gnu/packages/ed.scm index c2b19292f0..0d2b24cf8d 100644 --- a/gnu/packages/ed.scm +++ b/gnu/packages/ed.scm @@ -27,14 +27,14 @@ (define-public ed (package (name "ed") - (version "1.10") + (version "1.11") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/ed/ed-" version ".tar.lz")) (sha256 (base32 - "16kycdm5fcvpdr41hxb2da8da6jzs9dqznsg5552z6rh28n0jh4m")))) + "0d518yhs3kpdpv9fbpa1rhxk2fbry2yzcknrdaa20pi2bzg6w55x")))) (build-system gnu-build-system) (native-inputs `(("lzip" ,lzip))) (arguments diff --git a/gnu/packages/elf.scm b/gnu/packages/elf.scm index 540478c075..cb456af195 100644 --- a/gnu/packages/elf.scm +++ b/gnu/packages/elf.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr> ;;; @@ -38,7 +38,9 @@ version "/elfutils-" version ".tar.bz2")) (sha256 (base32 - "0w50szymyqvx8g0vkwrvnv17grqxva6x1z9dm9m3i99zg2hr232p")))) + "0w50szymyqvx8g0vkwrvnv17grqxva6x1z9dm9m3i99zg2hr232p")) + (patches + (list (search-patch "elfutils-tests-ptrace.patch"))))) (build-system gnu-build-system) ;; Separate programs because that's usually not what elfutils users want, @@ -46,6 +48,13 @@ (outputs '("out" ; libelf.so, elfutils/*.h, etc. "bin")) ; ld, nm, objdump, etc. + (arguments + ;; Programs don't have libelf.so in their RUNPATH and libraries don't + ;; know where to find each other. + `(#:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath=" + (assoc-ref %outputs "out") + "/lib")))) + (native-inputs `(("m4" ,m4))) (inputs `(("zlib" ,zlib))) (home-page "https://fedorahosted.org/elfutils/") diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 297d174b5e..435ccd1503 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014 Taylan Ulrich Bayirli/Kammer <taylanbayirli@gmail.com> ;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> -;;; Copyright © 2014 Mark H Weaver <mhw@netris.org> +;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2014 Alex Kost <alezost@gmail.com> ;;; ;;; This file is part of GNU Guix. @@ -23,11 +23,14 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix git-download) #:use-module (guix build-system gnu) #:use-module (guix build-system glib-or-gtk) #:use-module (guix build-system trivial) #:use-module (gnu packages) + #:use-module (gnu packages guile) #:use-module (gnu packages gtk) + #:use-module (gnu packages gnome) #:use-module (gnu packages ncurses) #:use-module (gnu packages texinfo) #:use-module (gnu packages gnutls) @@ -56,14 +59,15 @@ (define-public emacs (package (name "emacs") - (version "24.4") + (version "24.5") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/emacs/emacs-" version ".tar.xz")) (sha256 (base32 - "1zflm6ac34s6v166p58ilxrxbxjm0q2wfc25f8y0mjml1lbr3qs7")))) + "0kn3rzm91qiswi0cql89kbv6mqn27rwsyjfb8xmwy9m5s8fxfiyx")) + (patches (list (search-patch "emacs-exec-path.patch"))))) (build-system glib-or-gtk-build-system) (arguments '(#:phases (alist-cons-before @@ -92,6 +96,7 @@ ("libpng" ,libpng) ("zlib" ,zlib) + ("librsvg" ,librsvg) ("libxpm" ,libxpm) ("libxml2" ,libxml2) ("libice" ,libice) @@ -126,7 +131,7 @@ editor (console only)") (inputs (fold alist-delete (package-inputs emacs) '("libx11" "gtk+" "libxft" "libtiff" "giflib" "libjpeg" - "libpng" "libxpm" "libice" "libsm" + "libpng" "librsvg" "libxpm" "libice" "libsm" ;; D-Bus depends on libx11, so remove it as well. "dbus"))))) @@ -143,6 +148,35 @@ editor (without an X toolkit)" ) (arguments (append '(#:configure-flags '("--with-x-toolkit=no")) (package-arguments emacs))))) +(define-public guile-emacs + (package (inherit emacs) + (name "guile-emacs") + (version "20150512.41120e0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "git://git.hcoop.net/git/bpt/emacs.git") + (commit "41120e0f595b16387eebfbf731fff70481de1b4b"))) + (sha256 + (base32 + "0lvcvsz0f4mawj04db35p1dvkffdqkz8pkhc0jzh9j9x2i63kcz6")))) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("guile" ,guile-for-guile-emacs) + ,@(package-native-inputs emacs))) + (arguments + (substitute-keyword-arguments `(;; Build fails if we allow parallel build. + #:parallel-build? #f + ;; Tests aren't passing for now. + #:tests? #f + ,@(package-arguments emacs)) + ((#:phases phases) + `(modify-phases ,phases + (add-after 'unpack 'autogen + (lambda _ + (zero? (system* "sh" "autogen.sh")))))))))) + ;;; ;;; Emacs hacking. @@ -151,13 +185,14 @@ editor (without an X toolkit)" ) (define-public geiser (package (name "geiser") - (version "0.6") + (version "0.7") (source (origin (method url-fetch) (uri (string-append "mirror://savannah/geiser/" version "/geiser-" version ".tar.gz")) (sha256 - (base32 "1mrk0bzqcpfhsw6635qznn47nzfy9ps7wrhkpymswdfpw5mdsry5")))) + (base32 + "0cp7r91ibw45yw9k3fz1s13y7ryfsxjgpk57qv37qsznb9lmqylx")))) (build-system gnu-build-system) (arguments '(#:phases (alist-cons-after @@ -173,20 +208,12 @@ editor (without an X toolkit)" ) (home-page "http://nongnu.org/geiser/") (synopsis "Collection of Emacs modes for Guile and Racket hacking") (description - "Geiser is a collection of Emacs major and minor modes that -conspire with one or more Scheme interpreters to keep the Lisp Machine -Spirit alive. It draws inspiration (and a bit more) from environments -such as Common Lisp’s Slime, Factor’s FUEL, Squeak or Emacs itself, and -does its best to make Scheme hacking inside Emacs (even more) fun. - -Or, to be precise, what i consider fun. Geiser is thus my humble -contribution to the dynamic school of expression, and a reaction against -what i perceive as a derailment, in modern times, of standard Scheme -towards the static camp. Because i prefer growing and healing to poking -at corpses, the continuously running Scheme interpreter takes the center -of the stage in Geiser. A bundle of Elisp shims orchestrates the dialog -between the Scheme interpreter, Emacs and, ultimately, the schemer, -giving her access to live metadata.") + "Geiser is a collection of Emacs major and minor modes that conspire with +one or more Scheme implementations to keep the Lisp Machine Spirit alive. The +continuously running Scheme interpreter takes the center of the stage in +Geiser. A bundle of Elisp shims orchestrates the dialog between the Scheme +implementation, Emacs and, ultimately, the schemer, giving them access to live +metadata.") (license license:bsd-3))) (define-public paredit @@ -234,53 +261,115 @@ for those who may want transient periods of unbalanced parentheses, such as when typing parentheses directly or commenting out code line by line.") (license license:gpl3+))) +(define-public git-modes + (package + (name "git-modes") + (version "1.0.0") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/magit/git-modes/archive/" + version ".tar.gz")) + (sha256 + (base32 + "1biiss75bswx4alk85k3g9p0a3q3sc9i74h4mnrxc2rsk2iwhws0")))) + (build-system gnu-build-system) + (arguments + `(#:modules ((guix build gnu-build-system) + (guix build emacs-utils) + (guix build utils)) + #:imported-modules (,@%gnu-build-system-modules + (guix build emacs-utils)) + + #:make-flags (list (string-append "PREFIX=" + (assoc-ref %outputs "out")) + ;; Don't put .el files in a 'git-modes' + ;; sub-directory. + (string-append "LISPDIR=" + (assoc-ref %outputs "out") + "/share/emacs/site-lisp")) + #:test-target "test" + #:phases (modify-phases %standard-phases + (delete 'configure) + (add-after 'install 'emacs-autoloads + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (lisp (string-append + out "/share/emacs/site-lisp/"))) + (emacs-generate-autoloads ,name lisp))))))) + (native-inputs `(("emacs" ,emacs-no-x))) + (home-page "https://github.com/magit/git-modes") + (synopsis "Emacs major modes for Git configuration files") + (description + "This package provides Emacs major modes for editing various Git +configuration files, such as .gitattributes, .gitignore, and .git/config.") + (license license:gpl3+))) + (define-public magit (package (name "magit") - (version "1.2.1") + (version "1.4.1") (source (origin (method url-fetch) (uri (string-append "https://github.com/magit/magit/releases/download/" version "/" name "-" version ".tar.gz")) (sha256 - (base32 "1in48g5l5xdc9cf2apnpgx73mqlz2njrpi1w52dgql4qxv3kg6gr")))) + (base32 + "0bbvz6cma5vj6qxx9v2m60zqkjwgwjrdf9kp04iacybvrcm8vcg7")))) (build-system gnu-build-system) - (native-inputs `(("texinfo" ,texinfo))) - (inputs `(("emacs" ,emacs-no-x) - ("git" ,git) + (native-inputs `(("texinfo" ,texinfo) + ("emacs" ,emacs-no-x))) + (inputs `(("git" ,git) ("git:gui" ,git "gui"))) + (propagated-inputs `(("git-modes" ,git-modes))) (arguments `(#:modules ((guix build gnu-build-system) (guix build utils) (guix build emacs-utils)) - #:imported-modules ((guix build gnu-build-system) - (guix build utils) + #:imported-modules (,@%gnu-build-system-modules (guix build emacs-utils)) - #:tests? #f ; no check target + + #:test-target "test" + #:tests? #f ;'tests/magit-tests.el' is missing + + #:make-flags (list + ;; Don't put .el files in a sub-directory. + (string-append "lispdir=" (assoc-ref %outputs "out") + "/share/emacs/site-lisp")) + #:phases - (alist-replace - 'configure - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (substitute* "Makefile" - (("/usr/local") out) - (("/etc") (string-append out "/etc"))))) - (alist-cons-before - 'build 'patch-exec-paths - (lambda* (#:key inputs #:allow-other-keys) - (let ((git (assoc-ref inputs "git")) - (git:gui (assoc-ref inputs "git:gui"))) - (emacs-substitute-variables "magit.el" - ("magit-git-executable" (string-append git "/bin/git")) - ("magit-gitk-executable" (string-append git:gui "/bin/gitk"))))) - (alist-cons-after + (modify-phases %standard-phases + (replace + 'configure + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (substitute* "Makefile" + (("/usr/local") out) + (("/etc") (string-append out "/etc")))))) + (add-before + 'build 'patch-exec-paths + (lambda* (#:key inputs #:allow-other-keys) + (let ((git (assoc-ref inputs "git")) + (git:gui (assoc-ref inputs "git:gui"))) + (emacs-substitute-variables "magit.el" + ("magit-git-executable" (string-append git "/bin/git")) + ("magit-gitk-executable" (string-append git:gui + "/bin/gitk")))))) + (add-before + 'build 'augment-load-path + (lambda* (#:key inputs #:allow-other-keys) + ;; Allow git-commit-mode.el & co. to be found. + (let ((git-modes (assoc-ref inputs "git-modes"))) + (setenv "EMACSLOADPATH" + (string-append ":" git-modes "/share/emacs/site-lisp")) + #t))) + (add-after 'install 'post-install (lambda* (#:key outputs #:allow-other-keys) (emacs-generate-autoloads ,name (string-append (assoc-ref outputs "out") - "/share/emacs/site-lisp/"))) - %standard-phases))))) + "/share/emacs/site-lisp/"))))))) (home-page "http://magit.github.io/") (synopsis "Emacs interface for the Git version control system") (description @@ -312,11 +401,10 @@ operations.") ("imagemagick" ,imagemagick) ("emacs" ,emacs-no-x))) (arguments - '(#:modules ((guix build gnu-build-system) + `(#:modules ((guix build gnu-build-system) (guix build utils) (guix build emacs-utils)) - #:imported-modules ((guix build gnu-build-system) - (guix build utils) + #:imported-modules (,@%gnu-build-system-modules (guix build emacs-utils)) #:configure-flags (let ((out (assoc-ref %outputs "out"))) @@ -380,11 +468,10 @@ operations.") (inputs `(("wget" ,wget) ("emacs" ,emacs-no-x))) (arguments - '(#:modules ((guix build gnu-build-system) + `(#:modules ((guix build gnu-build-system) (guix build utils) (guix build emacs-utils)) - #:imported-modules ((guix build gnu-build-system) - (guix build utils) + #:imported-modules (,@%gnu-build-system-modules (guix build emacs-utils)) #:tests? #f ; no check target #:phases @@ -448,11 +535,10 @@ operations.") (string-append "all: " rest " emms-print-metadata\n")))))) (build-system gnu-build-system) (arguments - '(#:modules ((guix build gnu-build-system) + `(#:modules ((guix build gnu-build-system) (guix build utils) (guix build emacs-utils)) - #:imported-modules ((guix build gnu-build-system) - (guix build utils) + #:imported-modules (,@%gnu-build-system-modules (guix build emacs-utils)) #:phases (alist-replace diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index 88b462c232..b0e37f701b 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -35,7 +35,7 @@ #:use-module (gnu packages gnome) #:use-module (gnu packages gtk) #:use-module (gnu packages guile) - #:use-module ((gnu packages linux) #:select (eudev)) ; FIXME: for pcb + #:use-module (gnu packages linux) ;FIXME: for pcb #:use-module (gnu packages maths) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) diff --git a/gnu/packages/enlightenment.scm b/gnu/packages/enlightenment.scm index 4a59e67ed8..c64230097d 100644 --- a/gnu/packages/enlightenment.scm +++ b/gnu/packages/enlightenment.scm @@ -156,15 +156,16 @@ full capabilities of EFL.") (define-public evas-generic-loaders (package (name "evas-generic-loaders") - (version "1.13.0") + (version "1.13.2") (source (origin (method url-fetch) (uri (string-append - "http://download.enlightenment.org/rel/libs/evas_generic_loaders/evas_generic_loaders-" - version ".tar.gz")) + "https://download.enlightenment.org/rel/libs/" + "evas_generic_loaders/evas_generic_loaders-" + version ".tar.xz")) (sha256 - (base32 "16yzjk58bxsd0rlnpzrr8as9fxjjiq01swzhpadsgkmq33abgg63")))) + (base32 "1z5vjabs3psvqs3251mpyl1wgbdv1grn30yf682vamdqc5ckfa69")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config))) diff --git a/gnu/packages/fcitx.scm b/gnu/packages/fcitx.scm new file mode 100644 index 0000000000..925d5ac89b --- /dev/null +++ b/gnu/packages/fcitx.scm @@ -0,0 +1,87 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (gnu packages fcitx) + #:use-module ((guix licenses) #:select (gpl2+)) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system cmake) + #:use-module (gnu packages doxygen) + #:use-module (gnu packages enchant) + #:use-module (gnu packages gettext) + #:use-module (gnu packages glib) + #:use-module (gnu packages gtk) + #:use-module (gnu packages icu4c) + #:use-module (gnu packages iso-codes) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages xml) + #:use-module (gnu packages xorg)) + +(define-public fcitx + (package + (name "fcitx") + (version "4.2.8.6") + (source (origin + (method url-fetch) + (uri (string-append "http://download.fcitx-im.org/fcitx/" + name "-" version "_dict.tar.xz")) + (sha256 + (base32 + "15ymd42kg920ri0f8fymq3i68g8k1kgpmdlnk9jf5fvnz6g4w0wi")))) + (build-system cmake-build-system) + (outputs '("out" "gtk2" "gtk3")) + (arguments + `(#:configure-flags + (list "-DENABLE_TEST=ON" + (string-append "-DXKB_RULES_XML_FILE=" + (assoc-ref %build-inputs "xkeyboard-config") + "/share/X11/xkb/rules/evdev.xml") + "-DENABLE_GTK2_IM_MODULE=ON" + "-DENABLE_GTK3_IM_MODULE=ON" + (string-append "-DGTK2_IM_MODULEDIR=" + (assoc-ref %outputs "gtk2") + "/lib/gtk-2.0/2.10.0/immodules") + (string-append "-DGTK3_IM_MODULEDIR=" + (assoc-ref %outputs "gtk3") + "/lib/gtk-3.0/3.0.0/immodules") + ;; XXX: Enable GObject Introspection and Qt4 support. + "-DENABLE_GIR=OFF" + "-DENABLE_QT=OFF" + "-DENABLE_QT_IM_MODULE=OFF"))) + (native-inputs + `(("doxygen" ,doxygen) + ("glib:bin" ,glib "bin") ; for glib-genmarshal + ("pkg-config" ,pkg-config))) + (inputs + `(("dbus" ,dbus) + ("enchant" ,enchant) + ("gettext" ,gnu-gettext) + ("gtk2" ,gtk+-2) + ("gtk3" ,gtk+) + ("icu4c" ,icu4c) + ("iso-codes" ,iso-codes) + ("libxkbfile" ,libxkbfile) + ("libxml2" ,libxml2) + ("xkeyboard-config" ,xkeyboard-config))) + (home-page "http://fcitx-im.org") + (synopsis "Input method framework") + (description + "Fcitx is an input method framework with extension support. It has +Pinyin, Quwei and some table-based (Wubi, Cangjie, Erbi, etc.) input methods +built-in.") + (license gpl2+))) diff --git a/gnu/packages/feh.scm b/gnu/packages/feh.scm index 84edad419e..ae7c820011 100644 --- a/gnu/packages/feh.scm +++ b/gnu/packages/feh.scm @@ -29,7 +29,7 @@ (define-public feh (package (name "feh") - (version "2.12") + (version "2.13") (home-page "https://feh.finalrewind.org/") (source (origin (method url-fetch) @@ -37,7 +37,7 @@ name "-" version ".tar.bz2")) (sha256 (base32 - "0ckhidmsms2l5jycp0qf71jzmb3bpbhjq3bcgfpvfvszah7pmq30")))) + "06fa9zh1zpi63l90kw3l9a0sfavf424j7ksi396ifg9669gx35gn")))) (build-system gnu-build-system) (arguments '(#:phases (alist-delete 'configure %standard-phases) diff --git a/gnu/packages/fltk.scm b/gnu/packages/fltk.scm index 6aee41d31f..7a41460325 100644 --- a/gnu/packages/fltk.scm +++ b/gnu/packages/fltk.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014 John Darrington <jmd@gnu.org> +;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -17,7 +18,10 @@ ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. (define-module (gnu packages fltk) - #:use-module (guix licenses) + #:use-module ((guix licenses) #:select (lgpl2.0)) + #:use-module (gnu packages) + #:use-module (gnu packages compression) + #:use-module (gnu packages image) #:use-module (gnu packages xorg) #:use-module (gnu packages gl) #:use-module (guix packages) @@ -27,7 +31,7 @@ (define-public fltk (package (name "fltk") - (version "1.3.2") + (version "1.3.3") (source (origin (method url-fetch) @@ -35,21 +39,42 @@ "/fltk-" version "-source.tar.gz")) (sha256 (base32 - "1974brlk723095vf8z72kazq1cbqr9a51kq6b0xda6zkjkgl8q0p")))) + "15qd7lkz5d5ynz70xhxhigpz3wns39v9xcf7ggkl0792syc8sfgq")) + (patches (list (search-patch "fltk-shared-lib-defines.patch"))))) (build-system gnu-build-system) - (inputs - `(("libx11" ,libx11) - ("mesa" ,mesa))) + (inputs + `(("libjpeg" ,libjpeg-8) ;jpeg_read_header argument error in libjpeg-9 + ("libpng" ,libpng) + ("libx11" ,libx11) + ("mesa" ,mesa) + ("zlib" ,zlib))) (arguments `(#:tests? #f ;TODO: compile programs in "test" dir - #:configure-flags '("--enable-shared") + #:configure-flags + (list "--enable-shared" + (string-append "DSOFLAGS=-Wl,-rpath=" %output "/lib")) #:phases (alist-cons-before 'configure 'patch-makeinclude (lambda _ (substitute* "makeinclude.in" (("/bin/sh") (which "sh")))) - %standard-phases))) + (alist-cons-after + 'install 'patch-config + ;; Provide -L flags for image libraries when querying fltk-config to + ;; avoid propagating inputs. + (lambda* (#:key inputs outputs #:allow-other-keys) + (use-modules (srfi srfi-26)) + (let* ((conf (string-append (assoc-ref outputs "out") + "/bin/fltk-config")) + (jpeg (assoc-ref inputs "libjpeg")) + (png (assoc-ref inputs "libpng")) + (zlib (assoc-ref inputs "zlib"))) + (substitute* conf + (("-ljpeg") (string-append "-L" jpeg "/lib -ljpeg")) + (("-lpng") (string-append "-L" png "/lib -lpng")) + (("-lz") (string-append "-L" zlib "/lib -lz"))))) + %standard-phases)))) (home-page "http://www.fltk.org") (synopsis "3D C++ GUI library") (description "FLTK is a C++ GUI toolkit providing modern GUI functionality diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm index 0ee639d20a..c5b55f30a2 100644 --- a/gnu/packages/freedesktop.scm +++ b/gnu/packages/freedesktop.scm @@ -1,5 +1,9 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr> +;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com> +;;; Copyright © 2015 Andy Wingo <wingo@pobox.com> +;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net> ;;; ;;; This file is part of GNU Guix. ;;; @@ -17,10 +21,24 @@ ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. (define-module (gnu packages freedesktop) - #:use-module ((guix licenses) #:select (expat)) + #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) - #:use-module (guix build-system gnu)) + #:use-module (guix git-download) + #:use-module (guix build-system gnu) + #:use-module (guix build-system python) + #:use-module (gnu packages gnome) + #:use-module (gnu packages python) + #:use-module (gnu packages linux) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages autotools) + #:use-module (gnu packages gettext) + #:use-module (gnu packages gperf) + #:use-module (gnu packages xml) + #:use-module (gnu packages docbook) + #:use-module (gnu packages glib) ;intltool + #:use-module (gnu packages xdisorg) + #:use-module (gnu packages xorg)) (define-public xdg-utils (package @@ -43,4 +61,139 @@ (description "The xdg-utils package is a set of simple scripts that provide basic desktop integration functions in the framework of the freedesktop.org project.") - (license expat)))
\ No newline at end of file + (license license:expat))) + +(define-public libinput + (package + (name "libinput") + (version "0.14.1") + (source (origin + (method url-fetch) + (uri (string-append "http://freedesktop.org/software/libinput/" + name "-" version ".tar.xz")) + (sha256 + (base32 + "0r0v5jqbnwgndq6ns3ss3kv1438ny302m7bg1najcl1dpqp21v9b")))) + (build-system gnu-build-system) + (native-inputs + `(("pkg-config" ,pkg-config))) + (propagated-inputs + `(("libudev" ,eudev))) ; required by libinput.pc + (inputs + `(("libevdev" ,libevdev) + ("mtdev" ,mtdev))) + (home-page "http://www.freedesktop.org/wiki/Software/libinput/") + (synopsis "Input devices handling library") + (description + "Libinput is a library to handle input devices for display servers and +other applications that need to directly deal with input devices.") + (license license:x11))) + +(define-public elogind + (let ((commit "14405a9")) + (package + (name "elogind") + (version (string-append "219." commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "http://git.elephly.net/software/elogind.git") + (commit commit))) + (sha256 + (base32 + "1wz5lxj95qg64x2q5hf4zcb35hpxlw3wfswx6sb2srvsg50y3y72")) + (file-name (string-append name "-checkout-" commit)) + (modules '((guix build utils))) + (snippet + '(begin + (use-modules (guix build utils)) + (substitute* "Makefile.am" + ;; Avoid validation against DTD because the DTDs for + ;; both doctype 4.2 and 4.5 are needed. + (("XSLTPROC_FLAGS = ") "XSLTPROC_FLAGS = --novalid")))))) + (build-system gnu-build-system) + (arguments + `(#:configure-flags + (list + ;; pam_elogind fails because of bus-error.c hackery + "--disable-pam" + (string-append "--with-rootprefix=" (assoc-ref %outputs "out"))) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'autogen + (lambda _ + (and (zero? (system* "intltoolize" "--force" "--automake")) + (zero? (system* "autoreconf" "-vif")))))))) + (native-inputs + `(("intltool" ,intltool) + ("gettext" ,gnu-gettext) + ("docbook-xsl" ,docbook-xsl) + ("docbook-xml" ,docbook-xml) + ("xsltproc" ,libxslt) + ("libxml2" ,libxml2) ;for XML_CATALOG_FILES + ("pkg-config", pkg-config) + ("autoconf" ,autoconf) + ("automake" ,automake) + ("libtool" ,libtool) + ("gperf" ,gperf))) + (inputs + `(("linux-pam" ,linux-pam) + ("linux-libre-headers" ,linux-libre-headers) + ("libcap" ,libcap) + ("dbus" ,dbus) + ("eudev" ,eudev))) + (home-page "https://github.com/andywingo/elogind") + (synopsis "User, seat, and session management service") + (description "Elogind is the systemd project's \"logind\" service, +extracted out as a separate project. Elogind integrates with PAM to provide +the org.freedesktop.login1 interface over the system bus, allowing other parts +of a the system to know what users are logged in, and where.") + (license license:lgpl2.1+)))) + +(define-public python-pyxdg + (package + (name "python-pyxdg") + (version "0.25") + (source + (origin + (method url-fetch) + (uri (string-append + "https://pypi.python.org/packages/source/p/pyxdg/pyxdg-" + version ".tar.gz")) + (sha256 + (base32 + "179767h8m634ydlm4v8lnz01ba42gckfp684id764zaip7h87s41")))) + (build-system python-build-system) + (arguments + '(#:phases + (alist-replace + 'check + (lambda* (#:key inputs #:allow-other-keys) + (setenv "XDG_DATA_DIRS" + (string-append (assoc-ref inputs "shared-mime-info") + "/share/")) + (substitute* "test/test-icon.py" + (("/usr/share/icons/hicolor/index.theme") + (string-append (assoc-ref inputs "hicolor-icon-theme") + "/share/icons/hicolor/index.theme"))) + + ;; One test fails with: + ;; AssertionError: 'x-apple-ios-png' != 'png' + (substitute* "test/test-mime.py" + (("self.check_mimetype\\(imgpng, 'image', 'png'\\)") "#")) + (zero? (system* "nosetests" "-v"))) + %standard-phases))) + (native-inputs + `(("shared-mime-info" ,shared-mime-info) ;for tests + ("hicolor-icon-theme" ,hicolor-icon-theme) ;for tests + ("python-nose" ,python-nose) + ("python-setuptools" ,python-setuptools))) + (home-page "http://freedesktop.org/wiki/Software/pyxdg") + (synopsis "Implementations of freedesktop.org standards in Python") + (description + "PyXDG is a collection of implementations of freedesktop.org standards in +Python") + (license license:lgpl2.0))) + +(define-public python2-pyxdg + (package-with-python2 python-pyxdg)) diff --git a/gnu/packages/ftp.scm b/gnu/packages/ftp.scm index 22ea1af965..790ffc66c2 100644 --- a/gnu/packages/ftp.scm +++ b/gnu/packages/ftp.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> ;;; @@ -36,8 +36,10 @@ (version "4.6.1") (source (origin (method url-fetch) - (uri (string-append "http://lftp.yar.ru/ftp/lftp-" - version ".tar.xz")) + (uri (list (string-append "http://lftp.yar.ru/ftp/lftp-" + version ".tar.xz") + (string-append "http://lftp.yar.ru/ftp/old/lftp-" + version ".tar.xz"))) (sha256 (base32 "1grmp8zg7cjgjinz66mrh53whigkqzl90nlxj05hapnhk3ns3vni")) diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm index 0e6a1d5b89..14209f4b7e 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -25,7 +25,19 @@ #:use-module (guix build-system gnu) #:use-module (gnu packages) #:use-module (gnu packages qt) - #:use-module (gnu packages compression)) + #:use-module (gnu packages compression) + #:use-module (gnu packages zip) + #:use-module (gnu packages gl) + #:use-module (gnu packages linux) + #:use-module (gnu packages xorg) + #:use-module (gnu packages fontutils) + #:use-module (gnu packages image) + #:use-module (gnu packages audio) + #:use-module (gnu packages pulseaudio) + #:use-module (gnu packages gnome) + #:use-module (gnu packages gtk) + #:use-module (gnu packages sdl) + #:use-module (gnu packages pkg-config)) (define-public bullet (package @@ -85,3 +97,74 @@ clone.") ;; As noted in 'COPYING', part of it is under GPLv2+, while the rest is ;; under BSD-2. (license license:gpl2+))) + +(define-public sfml + (package + (name "sfml") + (version "2.2") + (source (origin + (method url-fetch) + (uri (string-append "http://mirror0.sfml-dev.org/files/SFML-" + version "-sources.zip")) + (sha256 + (base32 + "1xhkvgyfbhqsjdmfbxvk729kdrzh7kdyagxa3bvpzi6z43mh1frd")))) + (build-system cmake-build-system) + (arguments + '(#:tests? #f)) ; no tests + (native-inputs + `(("unzip" ,unzip))) + (inputs + `(("mesa" ,mesa) + ("glew" ,glew) + ("libx11" ,libx11) + ("libxrandr" ,libxrandr) + ("eudev" ,eudev) + ("freetype" ,freetype) + ("libjpeg" ,libjpeg) + ("libsndfile" ,libsndfile) + ("openal" ,openal))) + (home-page "http://www.sfml-dev.org") + (synopsis "Simple and Fast Multimedia Library") + (description + "SFML provides a simple interface to the various computer components, +to ease the development of games and multimedia applications. It is composed +of five modules: system, window, graphics, audio and network.") + (license license:zlib))) + +(define-public sfxr + (package + (name "sfxr") + (version "1.2.1") + (source (origin + (method url-fetch) + (uri (string-append "http://www.drpetter.se/files/sfxr-sdl-1.2.1.tar.gz")) + (sha256 + (base32 + "0dfqgid6wzzyyhc0ha94prxax59wx79hqr25r6if6by9cj4vx4ya")))) + (build-system gnu-build-system) + (arguments + `(#:phases (modify-phases %standard-phases + (delete 'configure) ; no configure script + (add-before 'build 'patch-makefile + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (substitute* "Makefile" + (("\\$\\(DESTDIR\\)/usr") out)) + (substitute* "main.cpp" + (("/usr/share") + (string-append out "/share"))) + #t)))) + #:tests? #f)) ; no tests + (native-inputs + `(("pkg-config" ,pkg-config) + ("desktop-file-utils" ,desktop-file-utils))) + (inputs + `(("sdl" ,sdl) + ("gtk+" ,gtk+))) + (synopsis "Simple sound effect generator") + (description "Sfxr is a tool for quickly generating simple sound effects. +Originally created for use in video game prototypes, it can generate random +sounds from presets such as \"explosion\" or \"powerup\".") + (home-page "http://www.drpetter.se/project_sfxr.html") + (license license:expat))) diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 192d0db397..8f495f7b32 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -9,6 +9,7 @@ ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com> +;;; Copyright © 2015 Christopher Allan Webber <cwebber@dustycloud.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -42,6 +43,7 @@ #:use-module (gnu packages gtk) #:use-module (gnu packages guile) #:use-module (gnu packages libcanberra) + #:use-module (gnu packages libunwind) #:use-module (gnu packages image) #:use-module (gnu packages ncurses) #:use-module (gnu packages python) @@ -65,6 +67,7 @@ #:use-module (gnu packages lua) #:use-module (gnu packages video) #:use-module (gnu packages xml) + #:use-module (gnu packages tcl) #:use-module (guix build-system trivial) #:use-module (guix build-system gnu) #:use-module (guix build-system cmake) @@ -105,7 +108,7 @@ representation of the playing board.") (define-public gnubik (package (name "gnubik") - (version "2.4.1") + (version "2.4.2") (source (origin (method url-fetch) @@ -113,7 +116,7 @@ representation of the playing board.") version ".tar.gz")) (sha256 (base32 - "0mfpwz341i1qpzi2qgslpc5i7d4fv7i01kv392m11pczqdc7i7m5")))) + "0mhpfnxzbns0wfrsjv5vafqr34770rbvkmdzxk0x0aq67hb3zyl5")))) (build-system gnu-build-system) (inputs `(("gtk+" ,gtk+-2) ("mesa" ,mesa) @@ -745,6 +748,43 @@ some of the restrictions in the venerable Z-machine format. This is the reference interpreter, using Glk API.") (license (license:fsf-free "file://README")))) +(define-public fizmo + (package + (name "fizmo") + (version "0.7.9") + (source (origin + (method url-fetch) + (uri (string-append "https://christoph-ender.de/fizmo/source/" + name "-" version ".tar.gz")) + (sha256 + (base32 + "1w7cgyjrhgkadjrazijzhq7zh0pl5bfc6wl7mdpgh020y4kp46d7")))) + (build-system gnu-build-system) + (arguments + '(#:configure-flags + (let ((libjpeg (assoc-ref %build-inputs "libjpeg")) + (ncurses (assoc-ref %build-inputs "ncurses"))) + (list (string-append "jpeg_CFLAGS=-I" libjpeg "/include") + (string-append "jpeg_LIBS=-ljpeg") + (string-append "ncursesw_CFLAGS=-I" ncurses "/include") + (string-append "ncursesw_LIBS=-lncursesw"))))) + (native-inputs + `(("pkg-config" ,pkg-config))) + (inputs + `(("libjpeg" ,libjpeg) + ("libpng" ,libpng) + ("libsndfile" ,libsndfile) + ("libxml2" ,libxml2) + ("ncurses" ,ncurses) + ("sdl" ,sdl))) + (home-page "https://christoph-ender.de/fizmo/") + (synopsis "Z-machine interpreter") + (description + "Fizmo is a console-based Z-machine interpreter. It is used to play +interactive ficiton, also known as textadventures, which were implemented +either by Infocom or created using the Inform compiler.") + (license license:bsd-3))) + (define-public retroarch (package (name "retroarch") @@ -822,3 +862,91 @@ interfaces or even in Emacs. It supports the standard game storage format Modem Protocol).") (home-page "http://www.gnu.org/software/gnugo/") (license license:gpl3+))) + +(define-public extremetuxracer + (package + (name "extremetuxracer") + (version "0.6.0") + (source (origin + (method url-fetch) + (uri (string-append + "http://downloads.sourceforge.net/project/extremetuxracer/releases/" + version "/etr-" version ".tar.xz")) + (sha256 + (base32 + "0fl9pwkywqnsmgr6plfj9zb05xrdnl5xb2hcmbjk7ap9l4cjfca4")))) + (build-system gnu-build-system) + (native-inputs + `(("pkg-config" ,pkg-config))) + (inputs + `(("freetype" ,freetype) + ("mesa" ,mesa) + ("glu" ,glu) + ("libice" ,libice) + ("libpng" ,libpng) + ("sdl" ,sdl) + ("sdl-mixer" ,sdl-mixer) + ("sdl-image" ,sdl-image) + ("libsm" ,libsm) + ("libunwind" ,libunwind) + ("libx11" ,libx11) + ("libxext" ,libxext) + ("libxi" ,libxi) + ("libxmu" ,libxmu) + ("libxt" ,libxt) + ("tcl" ,tcl) + ("zlib" ,zlib))) + (arguments + '(#:phases + (modify-phases %standard-phases + (add-after 'configure 'patch-makefile + (lambda _ + (substitute* "Makefile" + (("CXXFLAGS =") "CXXFLAGS = ${CFLAGS}"))))))) + (synopsis "High speed arctic racing game based on Tux Racer") + ;; Snarfed straight from Debian + (description "Extreme Tux Racer, or etracer as it is called for short, is +a simple OpenGL racing game featuring Tux, the Linux mascot. The goal of the +game is to slide down a snow- and ice-covered mountain as quickly as possible, +avoiding the trees and rocks that will slow you down. + +Collect herrings and other goodies while sliding down the hill, but avoid fish +bones. + +This game is based on the GPL version of the famous game TuxRacer.") + (home-page "http://sourceforge.net/projects/extremetuxracer/") + (license license:gpl2+))) + +(define-public gnujump + (package + (name "gnujump") + (version "1.0.8") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/gnujump/gnujump-" + version ".tar.gz")) + (sha256 + (base32 + "05syy9mzbyqcfnm0hrswlmhwlwx54f0l6zhcaq8c1c0f8dgzxhqk")))) + (build-system gnu-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (add-before + 'configure 'link-libm + (lambda _ (setenv "LIBS" "-lm")))))) + (inputs + `(("glu" ,glu) + ("mesa", mesa) + ("sdl" ,sdl) + ("sdl-image" ,sdl-image) + ("sdl-mixer" ,sdl-mixer))) + (home-page "http://gnujump.es.gnu.org/") + (synopsis + "Game of jumping to the next floor, trying not to fall") + (description + "GNUjump is a simple, yet addictive game in which you must jump from +platform to platform to avoid falling, while the platforms drop at faster rates +the higher you go. The game features multiplayer, unlimited FPS, smooth floor +falling, themeable graphics and sounds, and replays.") + (license license:gpl3+))) diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 27e40f2f66..b652521bb8 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -28,7 +28,7 @@ #:use-module (gnu packages multiprecision) #:use-module (gnu packages texinfo) #:use-module (gnu packages elf) - #:use-module ((gnu packages perl) #:select (perl)) + #:use-module (gnu packages perl) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu) @@ -85,6 +85,14 @@ where the OS part is overloaded to denote a specific ABI---into GCC '("CC" "CXX" "LD" "AR" "NM" "RANLIB" "STRIP") '("gcc" "g++" "ld" "ar" "nm" "ranlib" "strip")) '())))) + (libdir + (let ((base '(or (assoc-ref outputs "lib") + (assoc-ref outputs "out")))) + (lambda () + ;; Return the directory that contains lib/libgcc_s.so et al. + (if (%current-target-system) + `(string-append ,base "/" ,(%current-target-system)) + base)))) (configure-flags (lambda () ;; This is terrible. Since we have two levels of quasiquotation, @@ -181,12 +189,12 @@ where the OS part is overloaded to denote a specific ABI---into GCC ,(if stripped? "-g0" "-g"))))) #:tests? #f + #:phases (alist-cons-before 'configure 'pre-configure (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((libdir (or (assoc-ref outputs "lib") - (assoc-ref outputs "out"))) + (let ((libdir ,(libdir)) (libc (assoc-ref inputs "libc"))) (when libc ;; The following is not performed for `--without-headers' @@ -240,6 +248,13 @@ where the OS part is overloaded to denote a specific ABI---into GCC (("static char const sed_cmd_z\\[\\] =.*;") "static char const sed_cmd_z[] = \"sed\";")) + ;; Add a RUNPATH to libstdc++.so so that it finds libgcc_s. + ;; See <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32354> + ;; and <http://bugs.gnu.org/20358>. + (substitute* "libstdc++-v3/src/Makefile.in" + (("^OPT_LDFLAGS = ") + "OPT_LDFLAGS = -Wl,-rpath=$(libdir) ")) + ;; Move libstdc++*-gdb.py to the "lib" output to avoid a ;; circularity between "out" and "lib". (Note: ;; --with-python-dir is useless because it imposes $(prefix) as @@ -292,23 +307,45 @@ Go. It also includes runtime support libraries for these languages.") (package (inherit gcc-4.7) (version "4.8.4") (source (origin - (method url-fetch) - (uri (string-append "mirror://gnu/gcc/gcc-" - version "/gcc-" version ".tar.bz2")) - (sha256 - (base32 - "15c6gwm6dzsaagamxkak5smdkf1rdfbqqjs9jdbrp3lbg4ism02a")))))) + (method url-fetch) + (uri (string-append "mirror://gnu/gcc/gcc-" + version "/gcc-" version ".tar.bz2")) + (sha256 + (base32 + "15c6gwm6dzsaagamxkak5smdkf1rdfbqqjs9jdbrp3lbg4ism02a")) + + ;; ARM 'link' spec issue reported at + ;; <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65711> and + ;; <https://gcc.gnu.org/ml/gcc-patches/2015-04/msg01387.html>. + (patches (list (search-patch "gcc-arm-link-spec-fix.patch"))))))) (define-public gcc-4.9 - (package (inherit gcc-4.7) + (package (inherit gcc-4.8) (version "4.9.2") (source (origin - (method url-fetch) - (uri (string-append "mirror://gnu/gcc/gcc-" - version "/gcc-" version ".tar.bz2")) - (sha256 - (base32 - "1pbjp4blk2ycaa6r3jmw4ky5f1s9ji3klbqgv8zs2sl5jn1cj810")))))) + (method url-fetch) + (uri (string-append "mirror://gnu/gcc/gcc-" + version "/gcc-" version ".tar.bz2")) + (sha256 + (base32 + "1pbjp4blk2ycaa6r3jmw4ky5f1s9ji3klbqgv8zs2sl5jn1cj810")) + (patches (map search-patch + '("gcc-arm-link-spec-fix.patch" + "gcc-libvtv-runpath.patch"))))))) + +(define-public gcc-5.1 + (package (inherit gcc-4.9) + (version "5.1.0") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/gcc/gcc-" + version "/gcc-" version ".tar.bz2")) + (sha256 + (base32 + "1bd5vj4px3s8nlakbgrh38ynxq4s654m6nxz7lrj03mvkkwgvnmp")) + (patches (map search-patch + '("gcc-arm-link-spec-fix.patch" + "gcc-5.0-libvtv-runpath.patch"))))))) (define* (custom-gcc gcc name languages #:key (separate-lib-output? #t)) "Return a custom version of GCC that supports LANGUAGES." @@ -378,38 +415,57 @@ Go. It also includes runtime support libraries for these languages.") "--enable-languages=java" ,@(remove (cut string-match "--enable-languages.*" <>) ,flags)))) - ((#:phases phases) - `(alist-cons-after - 'install 'install-javac-and-javap-wrappers - (lambda _ - (let* ((javac (assoc-ref %build-inputs "javac.in")) - (ecj (assoc-ref %build-inputs "ecj-bootstrap")) - (gcj (assoc-ref %outputs "out")) - (gcjbin (string-append gcj "/bin/")) - (jvm (string-append gcj "/lib/jvm/")) - (target (string-append jvm "/bin/javac"))) - - (symlink (string-append gcjbin "jcf-dump") - (string-append jvm "/bin/javap")) - - (copy-file ecj (string-append gcj "/share/java/ecj.jar")) - - ;; Create javac wrapper from the template javac.in by - ;; replacing the @VARIABLES@ with paths. - (copy-file javac target) - (patch-shebang target) - (substitute* target - (("@JAVA@") - (string-append jvm "/bin/java")) - (("@ECJ_JAR@") - (string-append gcj "/share/java/ecj.jar")) - (("@RT_JAR@") - (string-append jvm "/jre/lib/rt.jar")) - (("@TOOLS_JAR@") - (string-append jvm "/lib/tools.jar"))) - (chmod target #o755) - #t)) - ,phases)))))) + ((#:phases phases) + `(modify-phases ,phases + (add-after + 'unpack 'add-lib-output-to-rpath + (lambda _ + (substitute* "libjava/Makefile.in" + (("libgcj_bc_dummy_LINK = .* -shared" line) + (string-append line " -Wl,-rpath=$(libdir)")) + (("libgcj(_bc)?_la_LDFLAGS =" ldflags _) + (string-append ldflags " -Wl,-rpath=$(libdir)"))))) + (add-after + 'install 'install-javac-and-javap-wrappers + (lambda _ + (let* ((javac (assoc-ref %build-inputs "javac.in")) + (ecj (assoc-ref %build-inputs "ecj-bootstrap")) + (gcj (assoc-ref %outputs "out")) + (gcjbin (string-append gcj "/bin/")) + (jvm (string-append gcj "/lib/jvm/")) + (target (string-append jvm "/bin/javac"))) + + (symlink (string-append gcjbin "jcf-dump") + (string-append jvm "/bin/javap")) + + (copy-file ecj (string-append gcj "/share/java/ecj.jar")) + + ;; Create javac wrapper from the template javac.in by + ;; replacing the @VARIABLES@ with paths. + (copy-file javac target) + (patch-shebang target) + (substitute* target + (("@JAVA@") + (string-append jvm "/bin/java")) + (("@ECJ_JAR@") + (string-append gcj "/share/java/ecj.jar")) + (("@RT_JAR@") + (string-append jvm "/jre/lib/rt.jar")) + (("@TOOLS_JAR@") + (string-append jvm "/lib/tools.jar"))) + (chmod target #o755) + #t))) + (add-after + 'install 'remove-broken-or-conflicting-files + (lambda _ + (let ((out (assoc-ref %outputs "out"))) + (for-each + delete-file + (append (find-files (string-append out "/lib/jvm/jre/lib") + "libjawt.so") + (find-files (string-append out "/bin") + ".*(c\\+\\+|cpp|g\\+\\+|gcc.*)")))) + #t)))))))) (define ecj-bootstrap-4.8 (origin diff --git a/gnu/packages/gd.scm b/gnu/packages/gd.scm index e27103778c..725a8e7e9e 100644 --- a/gnu/packages/gd.scm +++ b/gnu/packages/gd.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> +;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,9 +21,12 @@ (define-module (gnu packages gd) #:use-module (guix packages) #:use-module (guix build-system gnu) + #:use-module (guix build-system perl) #:use-module (guix download) #:use-module (gnu packages) + #:use-module (gnu packages perl) #:use-module (gnu packages image) + #:use-module (gnu packages imagemagick) #:use-module (gnu packages fontutils) #:use-module (gnu packages compression) #:use-module (gnu packages pkg-config) @@ -66,3 +70,78 @@ most anything else, on the fly. While not restricted to use on the web, the most common applications of GD involve website development.") (license (non-copyleft "file://COPYING" "See COPYING file in the distribution.")))) + +(define-public perl-gd + (package + (name "perl-gd") + (version "2.56") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/L/LD/LDS/" + "GD-" version ".tar.gz")) + (sha256 + (base32 + "1ya8f9hpiax8j29vwaiwlvvgah0vkyvpzva28r8231nyk0f3s40z")) + (patches + (list + (search-patch "perl-gd-options-passthrough-and-fontconfig.patch"))))) + (build-system perl-build-system) + (native-inputs + `(("perl-module-build" ,perl-module-build))) ;needs Module::Build >= 0.42 + (inputs + `(("gd" ,gd) + ("zlib" ,zlib) + ("png" ,libpng) + ("ft" ,freetype) + ("jpeg" ,libjpeg) + ("fontconfig" ,fontconfig))) + (arguments + ;; We must use Build.PL for building because Makefile.PL fails to build + ;; the XS source. + `(#:module-build-flags (map (lambda (i) + (string-append "--lib_" i "_path=" + (assoc-ref %build-inputs i))) + '("zlib" "png" "ft" "jpeg" "fontconfig")) + #:phases (alist-cons-after + 'configure 'clear-autogenerated-files + (lambda _ + ;; This file is autogenerated by its .PLS script at build + ;; time, but file creation fails because that file already + ;; exists in the distribution with non-writable + ;; permissions, so delete it first. + (delete-file "bdf_scripts/bdf2gdfont.pl")) + %standard-phases))) + (home-page "http://search.cpan.org/dist/GD") + (synopsis "Perl interface to the GD graphics library") + (description "GD.pm is an autoloadable interface module for libgd, a +popular library for creating and manipulating PNG files. With this library +you can create PNG images on the fly or modify existing files.") + (license (package-license perl)))) + +(define-public perl-gd-securityimage + (package + (name "perl-gd-securityimage") + (version "1.73") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/B/BU/BURAK/" + "GD-SecurityImage-" version ".tar.gz")) + (sha256 + (base32 + "1kaxs67rfd4w46lxgcg3pa05a596l0h1k8n4zk2gwrrar4022wpx")))) + (build-system perl-build-system) + (native-inputs + `(("perl-module-build" ,perl-module-build))) + (propagated-inputs + `(("perl-gd" ,perl-gd) + ("perl-image-magick" ,perl-image-magick))) + (home-page "http://search.cpan.org/dist/GD-SecurityImage") + (synopsis "Security image generator.") + (description "This module provides a basic interface to create +security (captcha) images. The final output is the actual graphic data, the +mime type of the graphic, and the created random string. The module also has +some \"styles\" that are used to create the background (or foreground) of the +image.") + (license (package-license perl)))) diff --git a/gnu/packages/gdb.scm b/gnu/packages/gdb.scm index 018f564e67..9c0b3ea307 100644 --- a/gnu/packages/gdb.scm +++ b/gnu/packages/gdb.scm @@ -36,14 +36,14 @@ (define-public gdb (package (name "gdb") - (version "7.9") + (version "7.9.1") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/gdb/gdb-" version ".tar.xz")) (sha256 (base32 - "14l3hhsy7fmpn2dk7ivc67gnbjdhkxlq90kxijpzfa35l58mcccv")))) + "0h5sfg4ndhb8q4fxbq0hdxfjp35n6ih96f6x8yvb418s84x5976d")))) (build-system gnu-build-system) (arguments '(#:tests? #f ; FIXME "make check" fails on single-processor systems. diff --git a/gnu/packages/gettext.scm b/gnu/packages/gettext.scm index 27b5fb5f55..3a96cd613c 100644 --- a/gnu/packages/gettext.scm +++ b/gnu/packages/gettext.scm @@ -70,7 +70,15 @@ (substitute* "gettext-tools/src/project-id" (("/bin/pwd") "pwd"))))) - %standard-phases) + (alist-cons-before + 'configure 'link-expat + (lambda _ + ;; Gettext defaults to opening expat via dlopen on + ;; "Linux". Change to link directly. + (substitute* "gettext-tools/configure" + (("LIBEXPAT=\"-ldl\"") "LIBEXPAT=\"-ldl -lexpat\"") + (("LTLIBEXPAT=\"-ldl\"") "LTLIBEXPAT=\"-ldl -lexpat\""))) + %standard-phases)) ;; When tests fail, we want to know the details. #:make-flags '("VERBOSE=yes"))) diff --git a/gnu/packages/ghostscript.scm b/gnu/packages/ghostscript.scm index c63e0415b4..f9026704da 100644 --- a/gnu/packages/ghostscript.scm +++ b/gnu/packages/ghostscript.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net> +;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -125,8 +126,10 @@ printing, and psresize, for adjusting page sizes.") (method url-fetch) (uri (string-append "mirror://gnu/ghostscript/gnu-ghostscript-" version ".tar.xz")) - (sha256 (base32 - "0q4jj41p0qbr4mgcc9q78f5zs8cm1g57wgryhsm2yq4lfslm3ib1")))) + (sha256 + (base32 + "0q4jj41p0qbr4mgcc9q78f5zs8cm1g57wgryhsm2yq4lfslm3ib1")) + (patches (list (search-patch "ghostscript-runpath.patch"))))) (build-system gnu-build-system) (inputs `(("freetype" ,freetype) ("lcms" ,lcms) @@ -142,20 +145,19 @@ printing, and psresize, for adjusting page sizes.") ("tcl" ,tcl))) (arguments `(#:phases - (alist-cons-after - 'configure 'patch-config-files - (lambda _ - (substitute* "base/all-arch.mak" - (("/bin/sh") (which "bash"))) - (substitute* "base/unixhead.mak" - (("/bin/sh") (which "bash")))) - (alist-cons-after - 'build 'build-so - (lambda _ (system* "make" "so")) - (alist-cons-after - 'install 'install-so - (lambda _ (system* "make" "install-so")) - %standard-phases))))) + (modify-phases %standard-phases + (add-after 'configure 'patch-config-files + (lambda _ + (substitute* "base/all-arch.mak" + (("/bin/sh") (which "bash"))) + (substitute* "base/unixhead.mak" + (("/bin/sh") (which "bash"))))) + (add-after 'build 'build-so + (lambda _ + (zero? (system* "make" "so")))) + (add-after 'install 'install-so + (lambda _ + (zero? (system* "make" "install-so"))))))) (synopsis "PostScript and PDF interpreter") (description "Ghostscript is an interpreter for the PostScript language and the PDF diff --git a/gnu/packages/gimp.scm b/gnu/packages/gimp.scm index 25a41690dd..35c55dc2f9 100644 --- a/gnu/packages/gimp.scm +++ b/gnu/packages/gimp.scm @@ -32,6 +32,7 @@ #:use-module (gnu packages compression) #:use-module (gnu packages xml) #:use-module (gnu packages photo) + #:use-module (gnu packages python) #:use-module (gnu packages xorg) #:use-module (gnu packages imagemagick)) @@ -127,10 +128,6 @@ buffers.") (base32 "0bdj0l7a94jqhjnj40m9rqaf622wj905iximivb55iy98639aanq")))) (build-system gnu-build-system) - (arguments - `(#:configure-flags - ;; We don't have pygtk which seems to be needed for this feature - `("--disable-python"))) (inputs `(("babl" ,babl) ("glib" ,glib) @@ -141,6 +138,8 @@ buffers.") ("exif" ,libexif) ;optional, EXIF + XMP support ("lcms" ,lcms) ;optional, color management ("librsvg" ,librsvg) ;optional, SVG support + ("python" ,python-2) ;optional, Python support + ("python2-pygtk" ,python2-pygtk) ;optional, Python support ("gegl" ,gegl))) (native-inputs `(("pkg-config" ,pkg-config) diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm index e9b2c535a8..2a6437c562 100644 --- a/gnu/packages/gl.scm +++ b/gnu/packages/gl.scm @@ -1,8 +1,8 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013 Andreas Enge <andreas@enge.fr> +;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2013 Joshua Grant <tadni@riseup.net> ;;; Copyright © 2014 David Thompson <davet@gnu.org> -;;; Copyright © 2014 Mark H Weaver <mhw@netris.org> +;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -21,11 +21,13 @@ (define-module (gnu packages gl) #:use-module (ice-9 match) + #:use-module (guix build utils) #:use-module ((guix licenses) #:prefix l:) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu) #:use-module (guix packages) + #:use-module (guix utils) #:use-module (gnu packages autotools) #:use-module (gnu packages bison) #:use-module (gnu packages flex) @@ -37,7 +39,9 @@ #:use-module (gnu packages xml) #:use-module (gnu packages fontutils) #:use-module (gnu packages guile) - #:use-module (gnu packages xdisorg)) + #:use-module (gnu packages video) + #:use-module (gnu packages xdisorg) + #:use-module (gnu packages zip)) (define-public glu (package @@ -50,7 +54,8 @@ (sha256 (base32 "0r72yyhj09x3krn3kn629jqbwyq50ji8w5ri2pn6zwrk35m4g1s3")))) (build-system gnu-build-system) - (inputs `(("mesa" ,mesa))) + (propagated-inputs + `(("mesa" ,mesa))) ; according to glu.pc (home-page "http://www.opengl.org/archives/resources/faq/technical/glu.htm") (synopsis "Mesa OpenGL Utility library") (description @@ -84,7 +89,10 @@ as ASCII text.") ("libxxf86vm" ,libxxf86vm) ("inputproto" ,inputproto) ("xinput" ,xinput))) - (propagated-inputs `(("glu" ,glu))) + (propagated-inputs + ;; Headers from Mesa and GLU are needed. + `(("glu" ,glu) + ("mesa" ,mesa))) (home-page "http://freeglut.sourceforge.net/") (synopsis "Alternative to the OpenGL Utility Toolkit (GLUT)") (description @@ -146,7 +154,7 @@ Polygon meshes, and Extruded polygon meshes") (arguments '(#:phases (modify-phases %standard-phases - (add-after unpack autogen + (add-after 'unpack 'autogen (lambda _ (zero? (system* "sh" "autogen.sh"))))))) (home-page "https://github.com/divVerent/s2tc") @@ -156,18 +164,35 @@ Polygon meshes, and Extruded polygon meshes") also known as DXTn or DXTC) for Mesa.") (license l:expat))) +;;; Mesa needs LibVA headers to build its Gallium-based VA API implementation; +;;; LibVA itself depends on Mesa. We use the following to solve the circular +;;; dependency. +(define libva-without-mesa + ;; Delay to work around circular import problem. + (delay + (package + (inherit libva) + (name "libva-without-mesa") + (inputs (alist-delete "mesa" (package-inputs libva))) + (arguments + (strip-keyword-arguments + '(#:make-flags) + (substitute-keyword-arguments (package-arguments libva) + ((#:configure-flags flags) + '(list "--disable-glx" "--disable-egl")))))))) + (define-public mesa (package (name "mesa") - (version "10.4.0") + (version "10.5.4") (source (origin (method url-fetch) (uri (string-append "ftp://ftp.freedesktop.org/pub/mesa/" - version "/MesaLib-" version ".tar.bz2")) + version "/mesa-" version ".tar.xz")) (sha256 (base32 - "069j4ck51hc70gryhw3z0rkyhhl0bnhbks4xg1wqqw56l7rxz9wq")))) + "00v89jna7m6r2w1yrnx09isc97r2bd1hkn4jib445n1078zp47mm")))) (build-system gnu-build-system) (propagated-inputs `(("glproto" ,glproto) @@ -178,27 +203,25 @@ also known as DXTn or DXTC) for Mesa.") ("libxfixes" ,libxfixes) ("libxshmfence" ,libxshmfence) ("libxxf86vm" ,libxxf86vm))) + ;; TODO: Add vdpau. (inputs `(("udev" ,eudev) ("dri2proto" ,dri2proto) ("dri3proto" ,dri3proto) ("presentproto" ,presentproto) ("expat" ,expat) + ("libva" ,(force libva-without-mesa)) ("libxml2" ,libxml2) - ;; TODO: Add 'libva' ;; TODO: Add 'libxml2-python' for OpenGL ES 1.1 and 2.0 support + ("libxvmc" ,libxvmc) ("makedepend" ,makedepend) ("s2tc" ,s2tc))) (native-inputs - `(("pkg-config" ,pkg-config) - ("gettext" ,gnu-gettext) - ("flex" ,flex) - ("bison" ,bison) - ("python" ,python-2))) ; incompatible with Python 3 (print syntax) + `(("pkg-config" ,pkg-config))) (arguments `(#:configure-flags '(;; drop r300 from default gallium drivers, as it requires llvm - "--with-gallium-drivers=r600,svga,swrast" + "--with-gallium-drivers=r600,svga,swrast,nouveau" ;; Enable various optional features. TODO: opencl requires libclc, ;; omx requires libomxil-bellagio "--with-egl-platforms=x11,drm" @@ -216,51 +239,42 @@ also known as DXTn or DXTC) for Mesa.") (_ '("--with-dri-drivers=nouveau,r200,radeon,swrast")))) #:phases (alist-cons-after - 'unpack 'add-missing-m4-files + 'unpack 'patch-create_test_cases (lambda _ - ;; When these files are missing, make tries to rebuild - ;; several parts of the build system. - (zero? (system* "touch" "--date=@0" - "m4/libtool.m4" "m4/ltoptions.m4" - "m4/ltsugar.m4" "m4/ltversion.m4" - "m4/lt~obsolete.m4"))) - (alist-cons-after - 'unpack 'patch-create_test_cases - (lambda _ - (substitute* "src/glsl/tests/lower_jumps/create_test_cases.py" - (("/usr/bin/env bash") (which "bash")))) - (alist-cons-before - 'build 'fix-dlopen-libnames - (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((s2tc (assoc-ref inputs "s2tc")) - (udev (assoc-ref inputs "udev")) - (out (assoc-ref outputs "out"))) - ;; Remain agnostic to .so.X.Y.Z versions while doing - ;; the substitutions so we're future-safe. - (substitute* - '("src/gallium/auxiliary/util/u_format_s3tc.c" - "src/mesa/main/texcompress_s3tc.c") - (("\"libtxc_dxtn\\.so") - (string-append "\"" s2tc "/lib/libtxc_dxtn.so"))) - (substitute* "src/gallium/targets/egl-static/egl_st.c" - (("\"libglapi\"") - (string-append "\"" out "/lib/libglapi\""))) - (substitute* "src/loader/loader.c" - (("dlopen\\(\"libudev\\.so") - (string-append "dlopen(\"" udev "/lib/libudev.so"))) - (substitute* "src/glx/dri_common.c" - (("dlopen\\(\"libGL\\.so") - (string-append "dlopen(\"" out "/lib/libGL.so"))) - (substitute* "src/egl/drivers/dri2/egl_dri2.c" - (("\"libglapi\\.so") - (string-append "\"" out "/lib/libglapi.so"))) - (substitute* "src/gbm/main/backend.c" - ;; No need to patch the gbm_gallium_drm.so reference; - ;; it's never installed since Mesa removed its - ;; egl_gallium support. - (("\"gbm_dri\\.so") - (string-append "\"" out "/lib/dri/gbm_dri.so"))))) - %standard-phases))))) + (substitute* "src/glsl/tests/lower_jumps/create_test_cases.py" + (("/usr/bin/env bash") (which "bash")))) + (alist-cons-before + 'build 'fix-dlopen-libnames + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((s2tc (assoc-ref inputs "s2tc")) + (udev (assoc-ref inputs "udev")) + (out (assoc-ref outputs "out"))) + ;; Remain agnostic to .so.X.Y.Z versions while doing + ;; the substitutions so we're future-safe. + (substitute* + '("src/gallium/auxiliary/util/u_format_s3tc.c" + "src/mesa/main/texcompress_s3tc.c") + (("\"libtxc_dxtn\\.so") + (string-append "\"" s2tc "/lib/libtxc_dxtn.so"))) + (substitute* "src/gallium/targets/egl-static/egl_st.c" + (("\"libglapi\"") + (string-append "\"" out "/lib/libglapi\""))) + (substitute* "src/loader/loader.c" + (("dlopen\\(\"libudev\\.so") + (string-append "dlopen(\"" udev "/lib/libudev.so"))) + (substitute* "src/glx/dri_common.c" + (("dlopen\\(\"libGL\\.so") + (string-append "dlopen(\"" out "/lib/libGL.so"))) + (substitute* "src/egl/drivers/dri2/egl_dri2.c" + (("\"libglapi\\.so") + (string-append "\"" out "/lib/libglapi.so"))) + (substitute* "src/gbm/main/backend.c" + ;; No need to patch the gbm_gallium_drm.so reference; + ;; it's never installed since Mesa removed its + ;; egl_gallium support. + (("\"gbm_dri\\.so") + (string-append "\"" out "/lib/dri/gbm_dri.so"))))) + %standard-phases)))) (home-page "http://mesa3d.org/") (synopsis "OpenGL implementation") (description "Mesa is a free implementation of the OpenGL specification - @@ -279,10 +293,10 @@ emulation to complete hardware acceleration for modern GPUs.") (arguments '(#:phases (modify-phases %standard-phases - (delete configure) - (delete build) - (delete check) - (replace install + (delete 'configure) + (delete 'build) + (delete 'check) + (replace 'install (lambda* (#:key outputs #:allow-other-keys) (copy-recursively "include" (string-append (assoc-ref outputs "out") @@ -315,7 +329,7 @@ emulation to complete hardware acceleration for modern GPUs.") '(#:phases (modify-phases %standard-phases (replace - install + 'install (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (mkdir-p (string-append out "/bin")) @@ -415,3 +429,102 @@ extension functionality is exposed in a single header file.") "Guile-OpenGL is a library for Guile that provides bindings to the OpenGL graphics API.") (license l:lgpl3+))) + +(define-public libepoxy + (package + (name "libepoxy") + (version "1.2") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/anholt/libepoxy/archive/v" + version + ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1xp8g6b7xlbym2rj4vkbl6xpb7ijq7glpv656mc7k9b01x22ihs2")))) + (arguments + `(#:phases + (alist-cons-after + 'unpack 'autoreconf + (lambda _ + (zero? (system* "autoreconf" "-vif"))) + (alist-cons-before + 'configure 'patch-paths + (lambda* (#:key inputs #:allow-other-keys) + (let ((python (assoc-ref inputs "python")) + (mesa (assoc-ref inputs "mesa"))) + (substitute* "src/gen_dispatch.py" + (("/usr/bin/env python") python)) + (substitute* (find-files "." "\\.[ch]$") + (("libGL.so.1") (string-append mesa "/lib/libGL.so.1")) + (("libEGL.so.1") (string-append mesa "/lib/libEGL.so.1"))) + + ;; XXX On armhf systems, we must add "GLIBC_2.4" to the list of + ;; versions in test/dlwrap.c:dlwrap_real_dlsym. It would be + ;; better to make this a normal patch, but for now we do it here + ;; to prevent rebuilding on other platforms. + ,@(if (string-prefix? "arm" (or (%current-target-system) + (%current-system))) + '((substitute* '"test/dlwrap.c" + (("\"GLIBC_2\\.0\"") "\"GLIBC_2.0\", \"GLIBC_2.4\""))) + '()) + #t)) + %standard-phases)))) + (build-system gnu-build-system) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("libtool" ,libtool) + ("pkg-config" ,pkg-config) + ("python" ,python))) + (inputs + `(("mesa" ,mesa))) + (home-page "http://github.com/anholt/libepoxy/") + (synopsis "A library for handling OpenGL function pointer management") + (description + "A library for handling OpenGL function pointer management.") + (license l:x11))) + +(define-public soil + (package + (name "soil") + (version "1.0.7") + (source (origin + (method url-fetch) + ;; No versioned archive available. + (uri "http://www.lonesock.net/files/soil.zip") + (sha256 + (base32 + "00gpwp9dldzhsdhksjvmbhsd2ialraqbv6v6dpikdmpncj6mnc52")))) + (build-system gnu-build-system) + (arguments + '(#:tests? #f ; no tests + #:phases (modify-phases %standard-phases + (delete 'configure) + (add-before 'build 'init-build + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (setenv "CFLAGS" "-fPIC") ; needed for shared library + ;; Use alternate Makefile + (copy-file "projects/makefile/alternate Makefile.txt" + "src/Makefile") + (chdir "src") + (substitute* '("Makefile") + (("INCLUDEDIR = /usr/include/SOIL") + (string-append "INCLUDEDIR = " out "/include/SOIL")) + (("LIBDIR = /usr/lib") + (string-append "LIBDIR = " out "/lib")) + ;; Remove these flags from 'install' commands. + (("-o root -g root") "")))))))) + (native-inputs + `(("unzip" ,unzip))) + (inputs + `(("mesa" ,mesa))) + (home-page "http://www.lonesock.net/soil.html") + (synopsis "OpenGL texture loading library") + (description + "SOIL is a tiny C library used primarily for uploading textures into +OpenGL.") + (license l:public-domain))) diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 3c68d86c96..1d43895f5c 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org> -;;; Copyright © 2014 Mark H Weaver <mhw@netris.org> +;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -57,7 +57,7 @@ (define dbus (package (name "dbus") - (version "1.8.12") + (version "1.8.16") (source (origin (method url-fetch) (uri @@ -65,7 +65,7 @@ version ".tar.gz")) (sha256 (base32 - "07jhcalg00i2rx5zrgk73rg0vm7lzi5q5z2gscrbl999ipr2h569")) + "01rba8mp8kqvmy6ibdmi806kjr3m14swnskqk02gyhykxxl54ybz")) (patches (list (search-patch "dbus-localstatedir.patch"))))) (build-system gnu-build-system) (arguments @@ -119,7 +119,7 @@ shared NFS home directories.") (define glib (package (name "glib") - (version "2.42.1") + (version "2.44.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" @@ -127,7 +127,7 @@ shared NFS home directories.") name "-" version ".tar.xz")) (sha256 (base32 - "16pqvikrps1fvwwqvk0qi4a13mfg7gw6w5qfhk7bhi8f51jhhgwg")) + "1fgmjv3yzxgbks31h42201x2izpw0sd84h8dfw0si3x00sqn5lzj")) (patches (list (search-patch "glib-tests-homedir.patch") (search-patch "glib-tests-desktop.patch") (search-patch "glib-tests-prlimit.patch") @@ -176,7 +176,7 @@ shared NFS home directories.") ;; Note: `--docdir' and `--htmldir' are not honored, so work around it. #:configure-flags (list (string-append "--with-html-dir=" (assoc-ref %outputs "doc") - "/share/gtk-doc")) + "/share/gtk-doc/html")) ;; In 'gio/tests', 'gdbus-test-codegen-generated.h' is #included in a ;; file that gets compiled possibly before it has been fully generated. @@ -189,7 +189,11 @@ shared NFS home directories.") ;; by 'glib-compile-schemas'. (list (search-path-specification (variable "XDG_DATA_DIRS") - (files '("share"))))) + (files '("share"))) + ;; To load extra gio modules from glib-networking, etc. + (search-path-specification + (variable "GIO_EXTRA_MODULES") + (files '("lib/gio/modules"))))) (search-paths native-search-paths) (synopsis "Thread-safe general utility library; basis of GTK+ and GNOME") @@ -203,14 +207,14 @@ dynamic loading, and an object system.") (define gobject-introspection (package (name "gobject-introspection") - (version "1.42.0") + (version "1.44.0") (source (origin (method url-fetch) - (uri (string-append "http://ftp.gnome.org/pub/GNOME/sources/" + (uri (string-append "mirror://gnome/sources/" "gobject-introspection/" (version-major+minor version) "/gobject-introspection-" version ".tar.xz")) (sha256 - (base32 "1xwm7wmr9r9wp6xljb3bckx3a4siybavaq39w46ly7gpskxfv8iv")) + (base32 "1b972qg2yb51sdavfvb6kc19akwc15c1bwnbg81vadxamql2q33g")) (patches (list (search-patch "gobject-introspection-cc.patch") (search-patch @@ -239,14 +243,7 @@ dynamic loading, and an object system.") (arguments `(;; The patch 'gobject-introspection-absolute-shlib-path.patch' causes ;; some tests to fail. - #:tests? #f - #:phases - (alist-cons-before - 'configure 'patch-paths - (lambda _ - (substitute* "giscanner/sourcescanner.py" - (("GUIX_GCC_PATH") (which "gcc")))) - %standard-phases))) + #:tests? #f)) (home-page "https://wiki.gnome.org/GObjectIntrospection") (synopsis "Generate interface introspection data for GObject libraries") (description @@ -309,14 +306,14 @@ The intltool collection can be used to do these things: (define itstool (package (name "itstool") - (version "1.2.0") + (version "2.0.2") (source (origin (method url-fetch) (uri (string-append "http://files.itstool.org/itstool/itstool-" version ".tar.bz2")) (sha256 (base32 - "1akq75aflihm3y7js8biy7b5mw2g11vl8yq90gydnwlwp0zxdzj6")))) + "0fh34wi52i0qikgvlmrcpf1vx6gc1xqdad4539l4d9hikfsrz45z")))) (build-system gnu-build-system) (propagated-inputs `(("libxml2" ,libxml2) @@ -346,7 +343,7 @@ translated.") (define dbus-glib (package (name "dbus-glib") - (version "0.102") + (version "0.104") (source (origin (method url-fetch) (uri @@ -354,7 +351,7 @@ translated.") version ".tar.gz")) (sha256 (base32 - "177j5p2vrvpmzk2xrrj6akn73kvpbvnmsjvlmca9l55qbdcfsr39")))) + "1xi1v1msz75qs0s4lkyf1psrksdppa3hwkg0mznc6gpw5flg3hdz")))) (build-system gnu-build-system) (inputs `(("dbus" ,dbus) @@ -373,14 +370,15 @@ by GDBus included in Glib.") (define libsigc++ (package (name "libsigc++") - (version "2.3.1") + (version "2.4.1") (source (origin (method url-fetch) - (uri (string-append "mirror://gnome/sources/libsigc++/2.3/libsigc++-" - version ".tar.xz")) + (uri (string-append "mirror://gnome/sources/libsigc++/" + (version-major+minor version) "/" + name "-" version ".tar.xz")) (sha256 (base32 - "14q3sq6d43f6wfcmwhw4v1aal4ba0h5x9v6wkxy2dnqznd95il37")))) + "1v0rvkzglzmf67y9nkcppwjwi68j1cy5yhldvcq7xrv8594l612l")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config) ("m4" ,m4))) @@ -399,7 +397,7 @@ has an ease of use unmatched by other C++ callback libraries.") (define glibmm (package (name "glibmm") - (version "2.42.0") + (version "2.44.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/glibmm/" @@ -407,7 +405,7 @@ has an ease of use unmatched by other C++ callback libraries.") "/glibmm-" version ".tar.xz")) (sha256 (base32 - "15rk3az8jh3rdwlc3lxjljbnh60drj3ka9574zd39lkqfgcq6l4q")))) + "1a1fczy7hcpn24fglyn4i79f4yjc8s50is70q03mb294bm1c02hv")))) (build-system gnu-build-system) (arguments `(#:phases (alist-cons-before @@ -481,8 +479,7 @@ useful for C++.") (define-public python-pygobject (package (name "python-pygobject") - (version "3.12.2") ;last version that works with - ;gobject-introspection 1.38 + (version "3.16.1") (source (origin (method url-fetch) @@ -491,8 +488,7 @@ useful for C++.") "/pygobject-" version ".tar.xz")) (sha256 (base32 - "08m5yad1hjdax4g39w6lgjk4124mcwpa8fc5iyvb8nygk8s3syky")))) - ;; 3.14.0: 0m1d75iwxa6k1xbkn6c6yq5r10pxnf7i5c2a5yvwsnab7ylzz7kp + "1hqyma73w0lnjcgx68kawhnq84aq92xlkdqphrlc2ppia38dm5kx")))) (build-system gnu-build-system) (native-inputs `(("which" ,which) @@ -545,14 +541,6 @@ useful for C++.") (base32 "1symyzbjmxvksn2ifdkk50lafjm2llf2sbmky062gq2pz3cg23cy")))) (build-system gnu-build-system) - (arguments - '(#:phases (alist-cons-before - 'build 'set-cc - (lambda _ - ;; Set $CC so that g-ir-scanner works. - (setenv "CC" "gcc") - #t) - %standard-phases))) (native-inputs `(("glib" ,glib "bin") ; uses glib-mkenums ("pkg-config" ,pkg-config) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 3b70e27816..970df5ef20 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -5,6 +5,8 @@ ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org> ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch> ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com> +;;; Copyright © 2015 Andy Wingo <wingo@igalia.com> +;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -29,28 +31,46 @@ #:use-module (guix build-system gnu) #:use-module (guix build-system glib-or-gtk) #:use-module (gnu packages) + #:use-module (gnu packages autotools) + #:use-module (gnu packages base) #:use-module (gnu packages bison) + #:use-module (gnu packages cups) + #:use-module (gnu packages curl) + #:use-module (gnu packages databases) #:use-module (gnu packages flex) #:use-module (gnu packages docbook) #:use-module (gnu packages glib) #:use-module (gnu packages gnupg) + #:use-module (gnu packages gnuzilla) #:use-module (gnu packages gstreamer) #:use-module (gnu packages gtk) + #:use-module (gnu packages guile) #:use-module (gnu packages pdf) + #:use-module (gnu packages polkit) #:use-module (gnu packages popt) #:use-module (gnu packages ghostscript) + #:use-module (gnu packages gnutls) #:use-module (gnu packages iso-codes) #:use-module (gnu packages libcanberra) + #:use-module (gnu packages linux) + #:use-module (gnu packages libusb) #:use-module (gnu packages image) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages pulseaudio) #:use-module (gnu packages python) + #:use-module (gnu packages scanner) #:use-module (gnu packages xml) #:use-module (gnu packages gl) #:use-module (gnu packages compression) + #:use-module (gnu packages web) #:use-module (gnu packages xorg) #:use-module (gnu packages xdisorg) - #:use-module (gnu packages ncurses)) + #:use-module (gnu packages mail) + #:use-module (gnu packages backup) + #:use-module (gnu packages nettle) + #:use-module (gnu packages ncurses) + #:use-module (srfi srfi-1)) (define-public brasero (package @@ -92,7 +112,7 @@ features to enable users to create their discs easily and quickly.") (define-public gnome-desktop (package (name "gnome-desktop") - (version "3.10.0") + (version "3.16.0") (source (origin (method url-fetch) @@ -101,7 +121,7 @@ features to enable users to create their discs easily and quickly.") name "-" version ".tar.xz")) (sha256 (base32 - "0p5p6wvmy5zvcdnmp5h2biz7rjrcw99chq5kkwcnb68flcmkb1ry")))) + "05lvik5cdh51xqd332qingph09zdhiaa1kqy9k2sk1simz4pvf8m")))) (build-system gnu-build-system) (native-inputs `(("intltool" ,intltool) @@ -232,7 +252,7 @@ and keep up to date translations of documentation.") ("shared-mime-info" ,shared-mime-info) ("dconf" ,dconf) ("libcanberra" ,libcanberra) - + ;; For tests. ("dogtail" ,python2-dogtail))) (native-inputs @@ -252,7 +272,7 @@ on the GNOME Desktop with a single simple application.") (define-public gsettings-desktop-schemas (package (name "gsettings-desktop-schemas") - (version "3.10.0") + (version "3.16.0") (source (origin (method url-fetch) @@ -261,13 +281,14 @@ on the GNOME Desktop with a single simple application.") name "-" version ".tar.xz")) (sha256 (base32 - "1km8qxwrzvravmg8j680qv64bwnwbdgrmy8bqmhs0dgxn2b1as6a")))) + "02dp1hl38k16m9abydfca1n236mdazqdz0p3n92s7haf9mdqsf16")))) (build-system gnu-build-system) (inputs `(("glib" ,glib))) (native-inputs `(("intltool" ,intltool) ("glib" ,glib "bin") ; glib-compile-schemas, etc. + ("gobject-introspection" ,gobject-introspection) ("pkg-config" ,pkg-config))) (home-page "https://launchpad.net/gsettings-desktop-schemas") (synopsis @@ -349,7 +370,7 @@ update-desktop-database: updates the database containing a cache of MIME types (define-public gnome-icon-theme (package (name "gnome-icon-theme") - (version "3.10.0") + (version "3.12.0") (source (origin (method url-fetch) @@ -358,14 +379,13 @@ update-desktop-database: updates the database containing a cache of MIME types name "-" version ".tar.xz")) (sha256 (base32 - "1xinbgkkvlhazj887ajcl13i7kdc1wcca02jwxzvjrvchjsp4m66")))) + "0fjh9qmmgj34zlgxb09231ld7khys562qxbpsjlaplq2j85p57im")))) (build-system gnu-build-system) - (inputs - `(("gtk+" ,gtk+) - ("icon-naming-utils" ,icon-naming-utils))) (native-inputs - `(("intltool" ,intltool) - ("pkg-config" ,pkg-config))) + `(("gtk+" ,gtk+) ; for gtk-update-icon-cache + ("icon-naming-utils" ,icon-naming-utils) + ("intltool" ,intltool) + ("pkg-config" ,pkg-config))) (home-page "http://art.gnome.org/") (synopsis "GNOME icon theme") @@ -483,13 +503,6 @@ some form of information without getting in the user's way.") ("glib:bin" ,glib "bin") ("gobject-introspection" ,gobject-introspection) ("intltool" ,intltool))) - (arguments - `(#:phases - (alist-cons-before - 'build 'pre-build - (lambda* _ - (setenv "CC" "gcc")) - %standard-phases))) (home-page "https://wiki.gnome.org/Libpeas") (synopsis "GObject plugin system") (description @@ -648,22 +661,18 @@ dealing with different structured file formats.") (alist-cons-after 'install 'generate-full-cache (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((loaders-directory + (let ((loaders-directory (string-append (assoc-ref outputs "out") "/lib/gdk-pixbuf-2.0/2.10.0/loaders"))) (zero? - (system - (string-append - "gdk-pixbuf-query-loaders " + (system + (string-append + "gdk-pixbuf-query-loaders " loaders-directory "/libpixbufloader-svg.so " - (string-join (find-files (assoc-ref inputs "gdk-pixbuf") + (string-join (find-files (assoc-ref inputs "gdk-pixbuf") "libpixbufloader-.*\\.so") " ") "> " loaders-directory ".cache"))))) - (alist-cons-before - 'build 'pre-build - (lambda* _ - (setenv "CC" "gcc")) - %standard-phases))))) + %standard-phases)))) (native-inputs `(("pkg-config" ,pkg-config) ("glib" ,glib "bin") ; glib-mkenums, etc. @@ -711,7 +720,7 @@ library.") Definition Language (idl) files, which is a specification for defining portable interfaces. libidl was initially written for orbit (the orb from the GNOME project, and the primary means of libidl distribution). However, the -functionality was designed to be as reusable and portable as possible.") +functionality was designed to be as reusable and portable as possible.") (license license:lgpl2.0+))) @@ -721,7 +730,7 @@ functionality was designed to be as reusable and portable as possible.") (version "2.14.19") (source (origin (method url-fetch) - (uri (let ((upstream-name "ORBit2")) + (uri (let ((upstream-name "ORBit2")) (string-append "mirror://gnome/sources/" upstream-name "/" (version-major+minor version) "/" upstream-name "-" version ".tar.bz2"))) @@ -746,11 +755,11 @@ functionality was designed to be as reusable and portable as possible.") (home-page "https://projects.gnome.org/orbit2/") (synopsis "CORBA 2.4-compliant Object Request Broker") (description "ORBit2 is a CORBA 2.4-compliant Object Request Broker (orb) -featuring mature C, C++ and Python bindings.") +featuring mature C, C++ and Python bindings.") ;; Licence notice is unclear. The Web page simply say "GPL" without giving a version. ;; SOME of the code files have licence notices for GPLv2+ ;; The tarball contains files of the text of GPLv2 and LGPLv2 - (license license:gpl2+))) + (license license:gpl2+))) (define-public libbonobo @@ -793,7 +802,7 @@ featuring mature C, C++ and Python bindings.") (home-page "https://developer.gnome.org/libbonobo/") (synopsis "Framework for creating reusable components for use in GNOME applications") (description "Bonobo is a framework for creating reusable components for -use in GNOME applications, built on top of CORBA.") +use in GNOME applications, built on top of CORBA.") ;; Licence not explicitly stated. Source files contain no licence notices. ;; Tarball contains text of both GPLv2 and LGPLv2 ;; GPLv2 covers both conditions @@ -806,7 +815,7 @@ use in GNOME applications, built on top of CORBA.") (version "3.2.6") (source (origin (method url-fetch) - (uri + (uri (let ((upstream-name "GConf")) (string-append "mirror://gnome/sources/" upstream-name "/" (version-major+minor version) "/" @@ -814,11 +823,11 @@ use in GNOME applications, built on top of CORBA.") (sha256 (base32 "0k3q9nh53yhc9qxf1zaicz4sk8p3kzq4ndjdsgpaa2db0ccbj4hr")))) (build-system gnu-build-system) - (inputs `(("glib" ,glib) - ("dbus" ,dbus) + (inputs `(("dbus" ,dbus) ("dbus-glib" ,dbus-glib) ("libxml2" ,libxml2))) - (propagated-inputs `(("orbit2" ,orbit2))) ; referred to in the .pc file + (propagated-inputs `(("glib" ,glib) ; referred to in the .pc file + ("orbit2" ,orbit2))) (native-inputs `(("intltool" ,intltool) ("glib" ,glib "bin") ; for glib-genmarshal, etc. @@ -827,7 +836,7 @@ use in GNOME applications, built on top of CORBA.") (synopsis "Store application preferences") (description "Gconf is a system for storing application preferences. It is intended for user preferences; not arbitrary data storage.") - (license license:lgpl2.0+))) + (license license:lgpl2.0+))) (define-public gnome-mime-data @@ -864,24 +873,25 @@ designed to be accessed through the MIME functions in GnomeVFS.") (version-major+minor version) "/" name "-" version ".tar.bz2")) (sha256 - (base32 "1ajg8jb8k3snxc7rrgczlh8daxkjidmcv3zr9w809sq4p2sn9pk2")))) + (base32 + "1ajg8jb8k3snxc7rrgczlh8daxkjidmcv3zr9w809sq4p2sn9pk2")))) (build-system gnu-build-system) (arguments - ;; The programmer kindly gives us a hook to turn off deprecation warnings ... - `(#:configure-flags '("DISABLE_DEPRECATED_CFLAGS=-DGLIB_DISABLE_DEPRECATION_WARNINGS") - ;; ... which they then completly ignore !! - #:phases - (alist-cons-before - 'configure 'ignore-deprecations - (lambda _ - (begin - (substitute* "libgnomevfs/Makefile.in" - (("-DG_DISABLE_DEPRECATED") "-DGLIB_DISABLE_DEPRECATION_WARNINGS")) - (substitute* "daemon/Makefile.in" - (("-DG_DISABLE_DEPRECATED") "-DGLIB_DISABLE_DEPRECATION_WARNINGS")))) - %standard-phases))) - (inputs `(("glib" ,glib) - ("libxml2" ,libxml2) + `(#:phases + (alist-cons-before + 'configure 'ignore-deprecations + (lambda _ + (substitute* '("libgnomevfs/Makefile.in" + "daemon/Makefile.in") + (("-DG_DISABLE_DEPRECATED") "-DGLIB_DISABLE_DEPRECATION_WARNINGS")) + #t) + (alist-cons-before + 'configure 'patch-test-async-cancel-to-never-fail + (lambda _ + (substitute* "test/test-async-cancel.c" + (("EXIT_FAILURE") "77"))) + %standard-phases)))) + (inputs `(("libxml2" ,libxml2) ("dbus-glib" ,dbus-glib) ("dbus" ,dbus) ("gconf" ,gconf) @@ -893,9 +903,10 @@ designed to be accessed through the MIME functions in GnomeVFS.") ("pkg-config" ,pkg-config))) (home-page "https://developer.gnome.org/gnome-vfs/") (synopsis "Access files and folders in GNOME applications") - (description "GnomeVFS is the core library used to access files and -folders in GNOME applications. It provides a file system abstraction which -allows applications to access local and remote files with a single consistent API.") + (description + "GnomeVFS is the core library used to access files and folders in GNOME +applications. It provides a file system abstraction which allows applications +to access local and remote files with a single consistent API.") (license license:lgpl2.0+))) @@ -917,7 +928,7 @@ allows applications to access local and remote files with a single consistent AP `(#:phases (alist-cons-before 'configure 'enable-deprecated - (lambda _ + (lambda _ (substitute* "libgnome/Makefile.in" (("-DG_DISABLE_DEPRECATED") "-DGLIB_DISABLE_DEPRECATION_WARNINGS"))) %standard-phases))) @@ -935,8 +946,7 @@ allows applications to access local and remote files with a single consistent AP `(("libcanberra" ,libcanberra) ("libbonobo" ,libbonobo) ("gconf" ,gconf) - ("gnome-vfs" ,gnome-vfs) - ("glib" ,glib))) + ("gnome-vfs" ,gnome-vfs))) (home-page "https://developer.gnome.org/libgnome/") (synopsis "Useful routines for building applications") (description "The libgnome library provides a number of useful routines @@ -963,7 +973,7 @@ files and URIs, and displaying help.") `(("pkg-config" ,pkg-config))) (home-page "https://people.gnome.org/~mathieu/libart") (synopsis "2D drawing library") - (description "Libart is a 2D drawing library intended as a + (description "Libart is a 2D drawing library intended as a high-quality vector-based 2D library with antialiasing and alpha composition.") (license license:lgpl2.0+))) @@ -1135,7 +1145,7 @@ since ca. 2006, when GTK+ itself incorporated printing support.") ("glib" ,glib) ("gnome-icon-theme" ,gnome-icon-theme) ("libgnomecanvas" ,libgnomecanvas) - ("libxml2" ,libxml2))) + ("libxml2" ,libxml2))) (native-inputs `(("intltool" ,intltool) ("pkg-config" ,pkg-config))) @@ -1164,7 +1174,7 @@ since ca. 2006, when GTK+ itself incorporated printing support.") (lambda* (#:key inputs #:allow-other-keys) (let ((xorg-server (assoc-ref inputs "xorg-server")) (disp ":1")) - + (setenv "HOME" (getcwd)) (setenv "DISPLAY" disp) ;; There must be a running X server and make check doesn't start one. @@ -1261,11 +1271,38 @@ Hints specification (EWMH).") (home-page "https://developer.gnome.org/goffice/") (synopsis "Document-centric objects and utilities") (description "A GLib/GTK+ set of document-centric objects and utilities.") - (license + (license ;; Dual licensed under GPLv2 or GPLv3 (both without "or later") ;; Note: NOT LGPL (list license:gpl2 license:gpl3)))) +(define-public goffice-0.8 + (package (inherit goffice) + (version "0.8.17") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnome/sources/" (package-name goffice) "/" + (version-major+minor version) "/" + (package-name goffice) "-" version ".tar.xz")) + (sha256 + (base32 "05fvzbs5bin05bbsr4dp79aiva3lnq0a3a40zq55i13vnsz70l0n")))) + (arguments + `(#:phases + (alist-cons-after + 'unpack 'fix-pcre-check + (lambda _ + ;; Only glib.h can be included directly. See + ;; https://bugzilla.gnome.org/show_bug.cgi?id=670316 + (substitute* "configure" + (("glib/gregex\\.h") "glib.h")) #t) + %standard-phases))) + (propagated-inputs + ;; libgoffice-0.8.pc mentions libgsf-1 + `(("libgsf" ,libgsf))) + (inputs + `(("gtk" ,gtk+-2) + ,@(alist-delete "gtk" (package-inputs goffice)))))) + (define-public gnumeric (package (name "gnumeric") @@ -1282,7 +1319,7 @@ Hints specification (EWMH).") (arguments `(;; The gnumeric developers don't worry much about failing tests. ;; See https://bugzilla.gnome.org/show_bug.cgi?id=732387 - #:tests? #f + #:tests? #f #:phases (alist-cons-before 'configure 'pre-conf @@ -1291,9 +1328,9 @@ Hints specification (EWMH).") ;; I am informed that this only affects the possibility to embed a ;; spreadsheet inside an Abiword document. So presumably when we ;; package Abiword we'll have to refer it to this directory. - (substitute* "configure" + (substitute* "configure" (("^GOFFICE_PLUGINS_DIR=.*") - (string-append "GOFFICE_PLUGINS_DIR=" + (string-append "GOFFICE_PLUGINS_DIR=" (assoc-ref outputs "out") "/goffice/plugins")))) %standard-phases))) (inputs @@ -1328,12 +1365,12 @@ engineering.") (source (origin (method url-fetch) - (uri (string-append "mirror://gnome/sources/" name "/" + (uri (string-append "mirror://gnome/sources/" name "/" (version-major+minor version) "/" name "-" version ".tar.xz")) (sha256 (base32 - "0f2b3ypkfvrdsxcvp14ja9wqj382f1p46yrjvhhxkkjgagy6qb41")))) + "0kyrbfrgl6g6wm6zpllldz36fclvl8vwmn1snwk18kf7f6ncpsac")))) (build-system gnu-build-system) (inputs `(("gtk+" ,gtk+) @@ -1353,8 +1390,8 @@ engineering.") ;; gdk-pixbuf because the latter does not include support for SVG ;; files. (lambda* (#:key inputs #:allow-other-keys) - (setenv "GDK_PIXBUF_MODULE_FILE" - (car (find-files (assoc-ref inputs "librsvg") + (setenv "GDK_PIXBUF_MODULE_FILE" + (car (find-files (assoc-ref inputs "librsvg") "loaders\\.cache")))) %standard-phases))) (home-page "https://launchpad.net/gnome-themes-standard") @@ -1366,7 +1403,7 @@ engineering.") (define-public vala (package (name "vala") - (version "0.26.1") + (version "0.28.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -1374,9 +1411,15 @@ engineering.") name "-" version ".tar.xz")) (sha256 (base32 - "0swyym2papln0f62ah05dpvq3vv6fssap26jq2zqp9dkkaqsn1w4")))) + "0zwpzhkhfk3piya14m7p2hl2vaabahprphppfm46ci91z39kp7hd")))) (build-system gnu-build-system) - (arguments '(#:make-flags '("CC=gcc"))) + (arguments + '(#:phases + (modify-phases %standard-phases + (add-before 'check 'set-cc + (lambda _ + (setenv "CC" "gcc") + #t))))) (native-inputs `(("pkg-config" ,pkg-config) ("flex" ,flex) @@ -1398,7 +1441,7 @@ libraries written in C.") (define-public vte (package (name "vte") - (version "0.38.2") + (version "0.40.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -1406,7 +1449,7 @@ libraries written in C.") name "-" version ".tar.xz")) (sha256 (base32 - "1rbxrigff9yszbgdw0gw4c2saz4d1hbbpz21phzxx14w49wvmnmj")))) + "0lnq0bgkmsixjwmfacb2ch9qfjqjxa8zkk1hiv3l29kgca0n3nal")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config) @@ -1416,14 +1459,8 @@ libraries written in C.") ("glib" ,glib "bin") ; for glib-genmarshal, etc. ("xmllint" ,libxml2))) (propagated-inputs - `(("gtk+" ,gtk+))) ; required by libvte-2.91.pc - (arguments - `(#:phases - (alist-cons-before - 'build 'pre-build - (lambda* _ - (setenv "CC" "gcc")) - %standard-phases))) + `(("gtk+" ,gtk+) ;required by vte-2.91.pc + ("gnutls" ,gnutls))) ;ditto (home-page "http://www.gnome.org/") (synopsis "Virtual Terminal Emulator") (description @@ -1463,7 +1500,7 @@ editors, IDEs, etc.") (source (origin (method url-fetch) (uri (string-append - "mirror://gnome/sources/" name "/" + "mirror://gnome/sources/" name "/" (version-major+minor version) "/" name "-" version ".tar.xz")) (sha256 @@ -1485,7 +1522,7 @@ editors, IDEs, etc.") ; or /etc/machine-id. #:configure-flags ;; Set the correct RUNPATH in binaries. - (list (string-append "LDFLAGS=-Wl,-rpath=" + (list (string-append "LDFLAGS=-Wl,-rpath=" (assoc-ref %outputs "out") "/lib") "--disable-gtk-doc-html") ; FIXME: requires gtk-doc #:phases @@ -1494,12 +1531,12 @@ editors, IDEs, etc.") (lambda* (#:key inputs #:allow-other-keys) (substitute* "docs/Makefile.in" (("http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl") - (string-append (assoc-ref inputs "docbook-xsl") + (string-append (assoc-ref inputs "docbook-xsl") "/xml/xsl/docbook-xsl-" ,(package-version docbook-xsl) "/manpages/docbook.xsl"))) - (setenv "XML_CATALOG_FILES" - (string-append (assoc-ref inputs "docbook-xml") + (setenv "XML_CATALOG_FILES" + (string-append (assoc-ref inputs "docbook-xml") "/xml/dtd/docbook/catalog.xml"))) %standard-phases))) (home-page "https://developer.gnome.org/dconf") @@ -1522,14 +1559,6 @@ configuration storage systems.") (base32 "02k66lpc4cmgygj66n8zcy59bggy7yzm3v4hni9xqplgva9d2yw8")))) (build-system gnu-build-system) - (arguments - '(#:phases (alist-cons-before - 'build 'set-cc - (lambda _ - ;; Set $CC so that g-ir-scanner works. - (setenv "CC" "gcc") - #t) - %standard-phases))) (native-inputs `(("glib" ,glib "bin") ;for glib-mkenums and glib-genmarshal ("gobject-introspection" ,gobject-introspection) @@ -1561,13 +1590,7 @@ JSON, such as arrays and objects.") '(#:configure-flags (list (string-append "--with-xkb-base=" (assoc-ref %build-inputs "xkeyboard-config") - "/share/X11/xkb")) - #:phases - (alist-cons-before - 'build 'set-cc - (lambda _ - (setenv "CC" "gcc")) ; for g-ir-scanner. - %standard-phases))) + "/share/X11/xkb")))) (native-inputs `(("glib:bin" ,glib "bin") ; for glib-mkenums, etc. ("gobject-introspection" ,gobject-introspection) @@ -1621,3 +1644,610 @@ library.") ;; This is the license of the rsvg bindings. The license of each module ;; of gnome-python-desktop is given in 'COPYING'. (license license:lgpl2.1+))) + +(define-public glib-networking + (package + (name "glib-networking") + (version "2.44.0") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnome/sources/glib-networking/" + (version-major+minor version) "/" + name "-" version ".tar.xz")) + (sha256 + (base32 + "0ij33bhvn7y5gagx4sbrw906dsjjjs9dllxn73pzv6x97c6k92lg")))) + (build-system gnu-build-system) + (arguments + `(#:configure-flags + ;; FIXME: ca-certificates.crt is not available in the build environment. + '("--with-ca-certificates=no") + #:phases + (modify-phases %standard-phases + (add-before 'configure 'patch-giomoduledir + ;; Install GIO modules into $out/lib/gio/modules. + (lambda _ + (substitute* "configure" + (("GIO_MODULE_DIR=.*") + (string-append "GIO_MODULE_DIR=" %output + "/lib/gio/modules\n")))))))) + (native-inputs + `(("pkg-config" ,pkg-config) + ("intltool" ,intltool))) + (inputs + `(("glib" ,glib) + ("gnutls" ,gnutls) + ("gsettings-desktop-schemas" ,gsettings-desktop-schemas) + ("p11-kit" ,p11-kit))) + (home-page "http://www.gnome.org") + (synopsis "Network-related GIO modules") + (description + "This package contains various network related extensions for the GIO +library.") + (license license:lgpl2.0+))) + +(define-public libsoup + (package + (name "libsoup") + (version "2.50.0") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnome/sources/libsoup/" + (version-major+minor version) "/" + name "-" version ".tar.xz")) + (sha256 + (base32 + "0yv61y5vfar1rfksa6f53zhfw9wcb39zjix8gqc1ff5gqid3c08y")))) + (build-system gnu-build-system) + (outputs '("out" "doc")) + (arguments + `(#:configure-flags + (list (string-append "--with-html-dir=" + (assoc-ref %outputs "doc") + "/share/gtk-doc/html") + ;; To find GIO modules from glib-networking. + (string-append "GIO_EXTRA_MODULES=" + (assoc-ref %build-inputs "glib-networking") + "/lib/gio/modules")) + #:phases + (modify-phases %standard-phases + (add-before 'configure 'disable-unconnected-socket-test + ;; This test fails due to missing /etc/nsswitch.conf + ;; in the build environment. + (lambda _ + (substitute* "tests/socket-test.c" + ((".*/sockets/unconnected.*") "")) + #t)) + (add-before 'check 'unset-LC_ALL + ;; The 'check-local' target runs 'env LANG=C sort -u', + ;; unset 'LC_ALL' to make 'LANG' working. + (lambda _ + (unsetenv "LC_ALL") + #t))))) + (native-inputs + `(("glib:bin" ,glib "bin") ; for glib-mkenums + ("gobject-introspection" ,gobject-introspection) + ("intltool" ,intltool) + ("pkg-config" ,pkg-config) + ("python" ,python-wrapper) + ;; These are needed for the tests. + ;; FIXME: Add PHP once available. + ("curl" ,curl) + ("httpd" ,httpd))) + (propagated-inputs + ;; libsoup-2.4.pc refers to all these. + `(("glib" ,glib) + ("libxml2" ,libxml2))) + (inputs + `(("glib-networking" ,glib-networking) + ("sqlite" ,sqlite))) + (home-page "https://live.gnome.org/LibSoup/") + (synopsis "GLib-based HTTP Library") + (description + "LibSoup is an HTTP client/server library for GNOME. It uses GObjects +and the GLib main loop, to integrate well with GNOME applications.") + (license license:lgpl2.0+))) + +(define-public libsecret + (package + (name "libsecret") + (version "0.18") + (source (origin + (method url-fetch) + (uri (string-append + "mirror://gnome/sources/libsecret/" version "/" + name "-" version ".tar.xz")) + (sha256 + (base32 + "1qq29c01xxjyx5sl6y5h22w8r0ff4c73bph3gfx3h7mx5mvalwqc")))) + (build-system gnu-build-system) + (outputs '("out" "doc")) + (arguments + `(#:tests? #f ; FIXME: Testing hangs. + #:configure-flags + (list (string-append "--with-html-dir=" + (assoc-ref %outputs "doc") + "/share/gtk-doc/html")))) + (native-inputs + `(("glib:bin" ,glib "bin") ; for gdbus-codegen, etc. + ("gobject-introspection" ,gobject-introspection) + ("intltool" ,intltool) + ("pkg-config" ,pkg-config) + ("vala" ,vala) + ("xsltproc" ,libxslt))) + ;; These are needed for the tests. + ;; FIXME: Add gjs once available. + ;("dbus" ,dbus) + ;("python2" ,python-2) + ;("python2-dbus" ,python2-dbus) + ;("python2-pygobject" ,python2-pygobject) + ;("python2-pygobject-2" ,python2-pygobject-2))) + (propagated-inputs + `(("glib" ,glib))) ; required by libsecret-1.pc + (inputs + `(("docbook-xsl" ,docbook-xsl) + ("libgcrypt" ,libgcrypt) + ("libxml2" ,libxml2))) ; for XML_CATALOG_FILES + (home-page "https://wiki.gnome.org/Projects/Libsecret/") + (synopsis "GObject bindings for \"Secret Service\" API") + (description + "Libsecret is a GObject based library for storing and retrieving passwords +and other secrets. It communicates with the \"Secret Service\" using DBus.") + (license license:lgpl2.1+))) + +(define-public gnome-mines + (package + (name "gnome-mines") + (version "3.16.0") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://gnome/sources/" name "/" + (version-major+minor version) "/" + name "-" version ".tar.xz")) + (sha256 + (base32 + "0wfvqyryc1093l4dr75zv9h0jyn28z6wirdq03lm5w24qf9lvjjx")))) + (build-system glib-or-gtk-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (add-before 'configure 'patch-/bin/true + (lambda _ + (substitute* "configure" + (("/bin/true") (which "true"))))) + (add-after 'install 'wrap-pixbuf + ;; Use librsvg's loaders.cache to support SVG files. + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (prog (string-append out "/bin/gnome-mines")) + (rsvg (assoc-ref inputs "librsvg")) + (pixbuf (find-files rsvg "^loaders\\.cache$"))) + (wrap-program prog + `("GDK_PIXBUF_MODULE_FILE" = ,pixbuf)))))))) + (native-inputs + `(("pkg-config" ,pkg-config) + ("desktop-file-utils" ,desktop-file-utils) + ("intltool" ,intltool) + ("itstool" ,itstool))) + (inputs + `(("gtk+" ,gtk+) + ("librsvg" ,librsvg))) + (home-page "https://wiki.gnome.org/Apps/Mines") + (synopsis "Minesweeper game") + (description + "Mines (previously gnomine) is a puzzle game where you locate mines +floating in an ocean using only your brain and a little bit of luck.") + (license license:gpl2+))) + +(define-public gnome-terminal + (package + (name "gnome-terminal") + (version "3.16.0") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://gnome/sources/" name "/" + (version-major+minor version) "/" + name "-" version ".tar.xz")) + (sha256 + (base32 + "1s3zwqxs4crlqmh6l7s7n87pbmh2nnjdvhxlkalh58pbl0bk0qrd")))) + (build-system glib-or-gtk-build-system) + (arguments + '(#:configure-flags + (list "--disable-migration" "--disable-search-provider" + "--without-nautilus-extension") + #:phases + (modify-phases %standard-phases + (add-before 'configure 'patch-/bin/true + (lambda _ + (substitute* "configure" + (("/bin/true") (which "true")))))))) + (native-inputs + `(("pkg-config" ,pkg-config) + ("desktop-file-utils" ,desktop-file-utils) + ("intltool" ,intltool) + ("itstool" ,itstool))) + (inputs + `(("gtk+" ,gtk+) + ("vte" ,vte) + ("gnutls" ,gnutls) + ("dconf" ,dconf) + ("gsettings-desktop-schemas" ,gsettings-desktop-schemas) + ("util-linux" ,util-linux) + ("vala" ,vala))) + (home-page "https://wiki.gnome.org/Apps/Terminal") + (synopsis "Terminal emulator") + (description + "GNOME Terminal is a terminal emulator application for accessing a +UNIX shell environment which can be used to run programs available on +your system. + +It supports several profiles, multiple tabs and implements several +keyboard shortcuts.") + (license license:gpl3+))) + +(define-public colord + (package + (name "colord") + (version "1.1.8") + (source + (origin + (method url-fetch) + (uri (string-append "http://www.freedesktop.org/software/colord/releases/" + name "-" version ".tar.xz")) + (sha256 + (base32 + "01w97rgzk4qi6fp03scq5jyw0ayx11b479p7dkm2r77k84b9agph")))) + (build-system glib-or-gtk-build-system) + (arguments + '(;; The tests want to run valgrind. Punt for now. + #:tests? #f + #:configure-flags (list "--localstatedir=/var" + ;; GUSB not packaged yet. + "--disable-gusb" + ;; No dep on systemd. + "--disable-systemd-login" + ;; Wants to install to global completion dir; + ;; punt. + "--disable-bash-completion" + ;; colord-gtk not packaged yet. + "--disable-session-example" + "--with-daemon-user=colord" + "--enable-sane" + (string-append "--with-udevrulesdir=" + (assoc-ref %outputs "out") + "/lib/udev/rules.d")) + #:phases + (modify-phases %standard-phases + (add-before 'configure 'patch-/bin/true + (lambda _ + (substitute* "configure" + (("/bin/true") (which "true"))) + (substitute* "src/Makefile.in" + (("if test -w \\$\\(DESTDIR\\)\\$\\(prefix\\)/;") + "if test -w $(DESTDIR)$(localstatedir);"))))))) + (native-inputs + `(("pkg-config" ,pkg-config) + ("gobject-introspection" ,gobject-introspection) + ("libtool" ,libtool) + ("intltool" ,intltool))) + (inputs + `(("eudev" ,eudev) + ("dbus" ,dbus) + ("dbus-glib" ,dbus-glib) + ("libusb" ,libusb) + ("lcms" ,lcms) + ("sqlite" ,sqlite) + ("polkit" ,polkit) + ("sane-backends" ,sane-backends))) + (home-page "http://www.freedesktop.org/software/colord/") + (synopsis "Color management service") + (description "Colord is a system service that makes it easy to manage, +install and generate color profiles to accurately color manage input and +output devices.") + (license license:gpl2+))) + +(define-public geoclue + (package + (name "geoclue") + (version "2.1.10") + (source + (origin + (method url-fetch) + (uri (string-append "http://www.freedesktop.org/software/" name + "/releases/" (version-major+minor version) "/" + name "-" version ".tar.xz")) + (sha256 + (base32 + "0s0ws2bx5g1cbjamxmm448r4n4crha2fwpzm8zbx6cq6qslygmzi")) + (patches (list (search-patch "geoclue-config.patch"))))) + (build-system glib-or-gtk-build-system) + (arguments + '(;; The tests want to run the system bus. + #:tests? #f + #:configure-flags (list ;; Disable bits requiring ModemManager. + "--disable-3g-source" + "--disable-cdma-source" + "--disable-modem-gps-source" + "--with-dbus-service-user=geoclue") + #:phases + (modify-phases %standard-phases + (add-before 'configure 'patch-/bin/true + (lambda _ + (substitute* "configure" + (("/bin/true") (which "true")))))))) + (native-inputs + `(("pkg-config" ,pkg-config) + ("intltool" ,intltool))) + (inputs + `(("glib" ,glib) + ("json-glib" ,json-glib) + ("libsoup" ,libsoup))) + (home-page "http://freedesktop.org/wiki/Software/GeoClue/") + (synopsis "Geolocation service") + (description "Geoclue is a D-Bus service that provides location +information. The primary goal of the Geoclue project is to make creating +location-aware applications as simple as possible, while the secondary goal is +to ensure that no application can access location information without explicit +permission from user. ") + (license license:gpl2+))) + +(define-public geocode-glib + (package + (name "geocode-glib") + (version "3.16.0") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnome/sources/geocode-glib/" + (version-major+minor version) "/" + name "-" version ".tar.xz")) + (sha256 + (base32 + "1cbfv0kds6b6k0cl7q47xpj3x1scwcd7m68zl1rf7i4hmhw4hpqj")))) + (build-system gnu-build-system) + (arguments + `(;; The tests want to write to $HOME/.cache/geocode-glib, which doesn't + ;; work for the builder. Punt. + #:tests? #f + )) + (native-inputs + `(("glib:bin" ,glib "bin") ; for glib-mkenums + ("gobject-introspection" ,gobject-introspection) + ("pkg-config" ,pkg-config) + ("json-glib" ,json-glib))) + (propagated-inputs + ;; geocode-glib-1.0.pc refers to GIO. + `(("glib" ,glib))) + (inputs + `(("libsoup" ,libsoup))) + (home-page "https://github.com/GNOME/geocode-glib/") + (synopsis "Geocoding and reverse-geocoding library") + (description + "geocode-glib is a convenience library for geocoding (finding longitude, +and latitude from an address) and reverse geocoding (finding an address from +coordinates) using the Nominatim service. geocode-glib caches requests for +faster results and to avoid unnecessary server load.") + (license license:lgpl2.0+))) + +(define-public upower + (package + (name "upower") + (version "0.99.2") + (source (origin + (method url-fetch) + (uri (string-append "http://upower.freedesktop.org/releases/" + name "-" version ".tar.xz")) + (sha256 + (base32 + "0vwlh20jmaf01m38kfn8yx2869a3clmkzlycrj99rf4nvwx4bp79")) + (patches (list (search-patch "upower-builddir.patch"))))) + (build-system glib-or-gtk-build-system) + (arguments + '( ;; The tests want to contact the system bus, which can't be done in the + ;; build environment. The integration test can run, but the last of + ;; the up-self-tests doesn't. Disable tests for now. + #:tests? #f + #:configure-flags (list "--localstatedir=/var" + (string-append "--with-udevrulesdir=" + (assoc-ref %outputs "out") + "/lib/udev/rules.d")) + #:phases + (modify-phases %standard-phases + (add-before 'configure 'patch-/bin/true + (lambda _ + (substitute* "configure" + (("/bin/true") (which "true"))))) + (add-before 'configure 'patch-integration-test + (lambda _ + (substitute* "src/linux/integration-test" + (("/usr/bin/python3") (which "python3")))))))) + (native-inputs + `(("pkg-config" ,pkg-config) + ("intltool" ,intltool) + ("python" ,python))) + (inputs + `(("eudev" ,eudev) + ("dbus" ,dbus) + ("dbus-glib" ,dbus-glib) + ("libusb" ,libusb))) + (home-page "http://upower.freedesktop.org/") + (synopsis "System daemon for managing power devices") + (description + "UPower is an abstraction for enumerating power devices, +listening to device events and querying history and statistics. Any +application or service on the system can access the org.freedesktop.UPower +service via the system message bus.") + (license license:gpl2+))) + +(define-public libgweather + (package + (name "libgweather") + (version "3.16.0") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnome/sources/" name "/" + (version-major+minor version) "/" + name "-" version ".tar.xz")) + (sha256 + (base32 + "0x1z6wv7hdw2ivlkifcbd940zyrnvqvc4zh2drgvd2r6jmd7bjza")))) + (build-system gnu-build-system) + (arguments + `(;; The tests want to write to $HOME/.cache/geocode-glib, which doesn't + ;; work for the builder. Punt. + #:tests? #f + #:configure-flags + `(;; No introspection for now, as it wants to install to + ;; gobject-introspection's own directory and I don't know how to easily + ;; override this. + "--enable-introspection=no" + ,(string-append "--with-zoneinfo-dir=" + (assoc-ref %build-inputs "tzdata") + "/share/zoneinfo")))) + (native-inputs + `(("glib:bin" ,glib "bin") ; for glib-mkenums + ("pkg-config" ,pkg-config) + ("intltool" ,intltool))) + (propagated-inputs + ;; gweather-3.0.pc refers to GTK+, GDK-Pixbuf, GLib/GObject, libxml, and + ;; libsoup. + `(("gtk+" ,gtk+) + ("gdk-pixbuf" ,gdk-pixbuf) + ("libxml2" ,libxml2) + ("libsoup" ,libsoup))) + (inputs + `(("tzdata" ,tzdata) + ("geocode-glib" ,geocode-glib))) + (home-page "https://wiki.gnome.org/action/show/Projects/LibGWeather") + (synopsis "Location, time zone, and weather library for GNOME") + (description + "libgweather is a library to access weather information from online +services for numerous locations.") + (license license:gpl2+))) + +(define-public gnome-settings-daemon + (package + (name "gnome-settings-daemon") + (version "3.16.0") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://gnome/sources/" name "/" + (version-major+minor version) "/" + name "-" version ".tar.xz")) + (sha256 + (base32 + "1w29x2izq59125ga5ncmmaklc8kw7x7rdn6swn26bs23mah1r1g3")))) + (build-system glib-or-gtk-build-system) + (arguments + `(;; Network manager not yet packaged. + #:configure-flags '("--disable-network-manager") + ;; Color management test can't reach the colord system service. + #:tests? #f)) + (native-inputs + `(("pkg-config" ,pkg-config) + ("intltool" ,intltool) + ("xsltproc" ,libxslt) + ("libxml2" ,libxml2) ;for XML_CATALOG_FILES + ("docbook-xml" ,docbook-xml-4.2) + ("docbook-xsl" ,docbook-xsl))) + (inputs + `(("colord" ,colord) + ("eudev" ,eudev) + ("upower" ,upower) + ("polkit" ,polkit) + ("pulseaudio" ,pulseaudio) + ("libcanberra" ,libcanberra) + ("libx11" ,libx11) + ("libxtst" ,libxtst) + ("lcms" ,lcms) + ("libnotify" ,libnotify) + ("geoclue" ,geoclue) + ("geocode-glib" ,geocode-glib) + ("libgweather" ,libgweather) + ("gnome-desktop" ,gnome-desktop) + ("nss" ,nss) + ("cups" ,cups) + ("gsettings-desktop-schemas" ,gsettings-desktop-schemas) + ("libwacom" ,libwacom) + ("librsvg" ,librsvg) + ("xf86-input-wacom" ,xf86-input-wacom))) + (home-page "http://www.gnome.org") + (synopsis "GNOME settings daemon") + (description + "This package contains the daemon responsible for setting the various +parameters of a GNOME session and the applications that run under it. It +handles settings such keyboard layout, shortcuts, and accessibility, clipboard +settings, themes, mouse settings, and startup of other daemons.") + (license license:gpl2+))) + +(define-public totem-pl-parser + (package + (name "totem-pl-parser") + (version "3.10.5") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnome/sources/totem-pl-parser/3.10/" + "totem-pl-parser-" version ".tar.xz")) + (sha256 + (base32 + "0dw1kiwmjwdjrighri0j9nagsnj44dllm0mamnfh4y5nc47mhim7")))) + (build-system gnu-build-system) + (arguments + ;; FIXME: Tests require gvfs. + `(#:tests? #f)) + (native-inputs + `(("intltool" ,intltool) + ("glib" ,glib "bin") + ("pkg-config" ,pkg-config))) + (inputs + `(("glib" ,glib) + ("gmime" ,gmime) + ("libarchive" ,libarchive) + ("libgcrypt" ,libgcrypt) + ("nettle" ,nettle) + ("libsoup" ,libsoup) + ("libxml2" ,libxml2))) + (home-page "https://projects.gnome.org/totem") + (synopsis "Library to parse and save media playlists for GNOME") + (description "Totem-pl-parser is a GObjects-based library to parse and save +playlists in a variety of formats.") + (license license:lgpl2.0+))) + +(define-public aisleriot + (package + (name "aisleriot") + (version "3.16.1") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnome/sources/" name "/" + (version-major+minor version) "/" + name "-" version ".tar.xz")) + (sha256 + (base32 + "19k483x9dkq8vjbq8f333pk9qil64clpsfg20q8xk9bgmk38aj8h")))) + (build-system glib-or-gtk-build-system) + (arguments + '(#:configure-flags + '("--with-platform=gtk-only" + "--with-card-theme-formats=svg"))) + (native-inputs + `(("desktop-file-utils" ,desktop-file-utils) + ("glib:bin" ,glib "bin") ; for glib-compile-schemas, etc. + ("intltool" ,intltool) + ("itstool" ,itstool) + ("pkg-config" ,pkg-config) + ("xmllint" ,libxml2))) + (inputs + `(("gtk+" ,gtk+) + ("guile" ,guile-2.0) + ("libcanberra" ,libcanberra) + ("librsvg" ,librsvg))) + (home-page "https://wiki.gnome.org/Apps/Aisleriot") + (synopsis "Solitaire card games") + (description + "Aisleriot (also known as Solitaire or sol) is a collection of card games +which are easy to play with the aid of a mouse.") + (license license:gpl3+))) diff --git a/gnu/packages/gnucash.scm b/gnu/packages/gnucash.scm new file mode 100644 index 0000000000..d254615cf2 --- /dev/null +++ b/gnu/packages/gnucash.scm @@ -0,0 +1,72 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (gnu packages gnucash) + #:use-module (guix licenses) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu) + #:use-module (gnu packages) + #:use-module (gnu packages gnome) + #:use-module (gnu packages glib) + #:use-module (gnu packages gtk) + #:use-module (gnu packages guile) + #:use-module (gnu packages icu4c) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages webkit) + #:use-module (gnu packages xml)) + +(define-public gnucash + (package + (name "gnucash") + (version "2.6.6") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/gnucash/gnucash-" + version ".tar.bz2")) + (sha256 + (base32 + "103ir5qg6k8m2mmg9b99c3gn8myxh1gsqyr0mfhmrhqya68wfdr3")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ;FIXME: failing at /qof/gnc-date/qof print date dmy buff + #:configure-flags '("--disable-dbi"))) + (inputs + `(("guile" ,guile-2.0) + ("icu4c" ,icu4c) + ("glib" ,glib) + ("gtk" ,gtk+-2) + ("goffice" ,goffice-0.8) + ("libgnomecanvas" ,libgnomecanvas) + ("libxml2" ,libxml2) + ("libxslt" ,libxslt) + ("webkitgtk" ,webkitgtk-2.4))) + (native-inputs + `(("glib" ,glib "bin") ; glib-compile-schemas, etc. + ("intltool" ,intltool) + ("pkg-config" ,pkg-config))) + (home-page "https://gnu.org/software/gnucash") + (synopsis "Personal and small business financial accounting software") + (description + "GnuCash is personal and professional financial-accounting software. +It can be used to track bank accounts, stocks, income and expenses, based on +the double-entry accounting practice. It includes support for QIF/OFX/HBCI +import and transaction matching. It also automates several tasks, such as +financial calculations or scheduled transactions.") + (license gpl3+))) diff --git a/gnu/packages/gnunet.scm b/gnu/packages/gnunet.scm index e50de7cc5d..78279b0243 100644 --- a/gnu/packages/gnunet.scm +++ b/gnu/packages/gnunet.scm @@ -112,14 +112,14 @@ tool to extract metadata from a file and print the results.") (define-public libmicrohttpd (package (name "libmicrohttpd") - (version "0.9.39") + (version "0.9.40") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/libmicrohttpd/libmicrohttpd-" version ".tar.gz")) (sha256 (base32 - "0wz3sw62z3wsqivrssh0xb3yn064ix5x5cc6prvdfrn3cmh7p4sg")))) + "19mpqwjb3g4bsh1rzcvmka380kmg7sz5dwfr5cwdh2k9m134sga0")))) (build-system gnu-build-system) (inputs `(("curl" ,curl) diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index 7a16b4161a..3a63b673bb 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -190,14 +190,14 @@ compatible to GNU Pth.") (define-public gnupg (package (name "gnupg") - (version "2.1.2") + (version "2.1.4") (source (origin (method url-fetch) (uri (string-append "mirror://gnupg/gnupg/gnupg-" version ".tar.bz2")) (sha256 (base32 - "14k7c5spai3yppz6izf1ggbnffskl54ln87v1wgy9pwism1mlks0")))) + "1c3c89b7ziknz6h1dnwmfjhgyy28g982rcncrhmhylb8v3npw4k4")))) (build-system gnu-build-system) (inputs `(("bzip2" ,bzip2) @@ -286,7 +286,7 @@ libskba (working with X.509 certificates and CMS data).") (define-public gpgme (package (name "gpgme") - (version "1.5.3") + (version "1.5.4") (source (origin (method url-fetch) @@ -294,13 +294,13 @@ libskba (working with X.509 certificates and CMS data).") ".tar.bz2")) (sha256 (base32 - "1jgwmra6cf0i5x2prj92w77vl7hmj276qmmll3lwysbyn32l1c0d")))) + "0v7azxazsfakvhrxzj5ysvcxma0892c89d27c17fkj8mi3nc0f5v")))) (build-system gnu-build-system) (propagated-inputs ;; Needs to be propagated because gpgme.h includes gpg-error.h. `(("libgpg-error" ,libgpg-error))) (inputs - `(("gnupg" ,gnupg) + `(("gnupg" ,gnupg-2.0) ("libassuan" ,libassuan))) (arguments '(#:make-flags '("GPG=gpg2"))) (home-page "http://www.gnupg.org/related_software/gpgme/") @@ -434,7 +434,7 @@ PGP keysigning parties.") including tools for signing keys, keyring analysis, and party preparation. * caff: CA - Fire and Forget signs and mails a key - + * pgp-clean: removes all non-self signatures from key * pgp-fixkey: removes broken packets from keys diff --git a/gnu/packages/gnutls.scm b/gnu/packages/gnutls.scm index 0ae660bf5d..c549ff3410 100644 --- a/gnu/packages/gnutls.scm +++ b/gnu/packages/gnutls.scm @@ -29,6 +29,7 @@ #:use-module (gnu packages) #:use-module (gnu packages guile) #:use-module (gnu packages libffi) + #:use-module (gnu packages libidn) #:use-module (gnu packages nettle) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) @@ -38,7 +39,7 @@ (define-public libtasn1 (package (name "libtasn1") - (version "4.2") + (version "4.5") (source (origin (method url-fetch) @@ -46,7 +47,7 @@ version ".tar.gz")) (sha256 (base32 - "1fydwh5hlnmprdzmzn4kiqb939br59qv1001k7ah5b626v5l2fv9")))) + "1nhvnznhg2aqfrfjxc8v008hjlzkh5831jsfahqk89qrw7fbbcw9")))) (build-system gnu-build-system) (native-inputs `(("perl" ,perl) @@ -65,7 +66,7 @@ specifications.") (define-public p11-kit (package (name "p11-kit") - (version "0.22.1") + (version "0.23.1") (source (origin (method url-fetch) @@ -73,7 +74,7 @@ specifications.") version ".tar.gz")) (sha256 (base32 - "0p4sadq2c70jdm7b5a5xw8mk2mqy36krpxr3ihnf783arygk6fpg")) + "1i3a1wdpagm0p3y1bwaz5x5rjhcpqbcrnhkcp10p259vkxk72wz5")) (modules '((guix build utils))) ; for substitute* (snippet '(begin @@ -103,7 +104,7 @@ living in the same process.") (define-public gnutls (package (name "gnutls") - (version "3.3.12") + (version "3.4.0") (source (origin (method url-fetch) (uri @@ -114,7 +115,9 @@ living in the same process.") "/gnutls-" version ".tar.xz")) (sha256 (base32 - "16r96bzsfqx1rlqrkggmhhx6zbxj1fmc3mwpp0ik73ylqn93xav7")))) + "0bj7ydvsyvml59b6040wg7694iz37rwnqnv09bic9ddz652588ml")) + (patches + (list (search-patch "gnutls-fix-duplicate-manpages.patch"))))) (build-system gnu-build-system) (arguments '(#:configure-flags @@ -130,7 +133,12 @@ living in the same process.") ;; store is used, so each program has to provide its own ;; fallback, and users have to configure each program ;; independently. This seems suboptimal. - "--with-default-trust-store-dir=/etc/ssl/certs"))) + "--with-default-trust-store-dir=/etc/ssl/certs" + + ;; FIXME: Temporarily disable p11-kit support since it is not + ;; working on mips64el. + "--without-p11-kit"))) + (outputs '("out" "debug")) (native-inputs `(("pkg-config" ,pkg-config) ("which" ,which))) @@ -140,6 +148,7 @@ living in the same process.") (propagated-inputs ;; These are all in the 'Requires.private' field of gnutls.pc. `(("libtasn1" ,libtasn1) + ("libidn" ,libidn) ("nettle" ,nettle) ("zlib" ,zlib))) (home-page "http://www.gnu.org/software/gnutls/") diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 1d450cda64..4410c5bc43 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr> -;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com> ;;; @@ -20,6 +20,7 @@ ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. (define-module (gnu packages gnuzilla) + #:use-module ((srfi srfi-1) #:hide (zip)) #:use-module (gnu packages) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) @@ -102,15 +103,16 @@ in C/C++.") (native-inputs `(("perl", perl))) (arguments - `(#:tests? #f ; no check target - #:configure-flags - `("--enable-64bit") - #:phases - (alist-cons-before - 'configure 'chdir - (lambda _ - (chdir "nspr")) - %standard-phases))) + `(#:tests? #f ; no check target + #:configure-flags (list "--enable-64bit" + (string-append "LDFLAGS=-Wl,-rpath=" + (assoc-ref %outputs "out") + "/lib")) + #:phases (alist-cons-before + 'configure 'chdir + (lambda _ + (chdir "nspr")) + %standard-phases))) (home-page "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSPR") (synopsis "Netscape API for system level and libc-like functions") @@ -122,15 +124,18 @@ in the Mozilla clients.") (define-public nss (package (name "nss") - (version "3.17.4") + (version "3.18") (source (origin (method url-fetch) - (uri (string-append - "ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/" - "releases/NSS_3_17_4_RTM/src/nss-3.17.4.tar.gz")) + (uri (let ((version-with-underscores + (string-join (string-split version #\.) "_"))) + (string-append + "ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/" + "releases/NSS_" version-with-underscores "_RTM/src/" + "nss-" version ".tar.gz"))) (sha256 (base32 - "0ycxzybgn4bq0i6j5zjdjl70n3s8a742yixyik4pw8x4h4cav60x")) + "0h0xy9kvd2s8r438q4dfn25cgvv5dc1hkm9lb4bgrxpr5bxv13b1")) ;; Create nss.pc and nss-config. (patches (list (search-patch "nss-pkgconfig.patch"))))) (build-system gnu-build-system) @@ -153,8 +158,6 @@ in the Mozilla clients.") (ice-9 ftw) (ice-9 match) (srfi srfi-26)) - #:imported-modules ((guix build gnu-build-system) - (guix build utils)) #:phases (alist-replace 'configure @@ -216,15 +219,27 @@ standards.") (define-public icecat (package (name "icecat") - (version "31.5.0") + (version "31.6.0-gnu1") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/gnuzilla/" - version "/" name "-" version ".tar.bz2")) + (first (string-split version #\-)) "/" + name "-" version ".tar.bz2")) (sha256 (base32 - "1rr4axghaypdkrf60i1qp6dz4cd29ya02fs3vyffvp4x9kgcq2dd")))) + "1a4l23msg4cpc4yp59q2z6xv63r6advlbnjy65v4djv6yhgnqf1i")) + (patches (map search-patch '("icecat-CVE-2015-0797.patch" + "icecat-CVE-2015-2708-pt1.patch" + "icecat-CVE-2015-2708-pt2.patch" + "icecat-CVE-2015-2708-pt3.patch" + "icecat-CVE-2015-2708-pt4.patch" + "icecat-CVE-2015-2710-pt1.patch" + "icecat-CVE-2015-2710-pt2.patch" + "icecat-CVE-2015-2710-pt3.patch" + "icecat-CVE-2015-2713-pt1.patch" + "icecat-CVE-2015-2713-pt2.patch" + "icecat-CVE-2015-2716.patch"))))) (build-system gnu-build-system) (inputs `(("alsa-lib" ,alsa-lib) @@ -249,6 +264,7 @@ standards.") ("mesa" ,mesa) ("nspr" ,nspr) ("nss" ,nss) + ("sqlite" ,sqlite) ("unzip" ,unzip) ("yasm" ,yasm) ("zip" ,zip) @@ -262,6 +278,13 @@ standards.") `(#:tests? #f ; no check target #:out-of-source? #t ; must be built outside of the source directory + + ;; XXX: There are RUNPATH issues such as + ;; $prefix/lib/icecat-31.6.0/plugin-container NEEDing libmozalloc.so, + ;; which is not in its RUNPATH, but they appear to be harmless in + ;; practice somehow. See <http://hydra.gnu.org/build/378133>. + #:validate-runpath? #f + #:configure-flags '(;; Building with debugging symbols takes ~5GiB, so ;; disable it. "--disable-debug" @@ -280,11 +303,7 @@ standards.") "--enable-system-pixman" "--enable-system-cairo" "--enable-system-ffi" - - ;; Fails with "configure: error: System - ;; SQLite library is not compiled with - ;; SQLITE_ENABLE_UNLOCK_NOTIFY." - ;; "--enable-system-sqlite" + "--enable-system-sqlite" ;; Fails with "--with-system-png won't work because ;; the system's libpng doesn't have APNG support". diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index c92dd1b354..14badc949c 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2015 Tomáš Čech <sleep_walker@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -180,14 +181,14 @@ output.") (build-system gnu-build-system) (arguments `(#:phases (modify-phases %standard-phases - (replace configure + (replace 'configure (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (chdir "trunk") (zero? (system* "qmake" (string-append "prefix=" out)))))) - (add-after install wrap-program + (add-after 'install 'wrap-program (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (bin (string-append out "/bin")) diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm index 7afb9c4218..24dc41b703 100644 --- a/gnu/packages/gstreamer.scm +++ b/gnu/packages/gstreamer.scm @@ -20,25 +20,30 @@ ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. (define-module (gnu packages gstreamer) - #:use-module ((guix licenses) #:select (lgpl2.0+ bsd-2 bsd-3)) + #:use-module ((guix licenses) #:select (lgpl2.0+ bsd-2 bsd-3 gpl2+)) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu) #:use-module (gnu packages) + #:use-module (gnu packages audio) #:use-module (gnu packages bison) #:use-module (gnu packages cdrom) #:use-module (gnu packages compression) #:use-module (gnu packages flex) #:use-module (gnu packages glib) + #:use-module (gnu packages gnome) #:use-module (gnu packages gtk) #:use-module (gnu packages image) #:use-module (gnu packages linux) + #:use-module (gnu packages mp3) #:use-module (gnu packages perl) #:use-module (gnu packages pulseaudio) + #:use-module (gnu packages video) #:use-module (gnu packages xorg) #:use-module (gnu packages xiph) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) + #:use-module (gnu packages yasm) #:use-module (gnu packages xml)) (define-public orc @@ -88,11 +93,19 @@ arrays of data.") (base32 "1bmhbhak6i5wmmb6w86jyyv8lax4gdq983la4lk4a0krz6kim020")))) (build-system gnu-build-system) + (outputs '("out" "doc")) + (arguments + `(#:make-flags '("CC=gcc") ; for g-ir-scanner. + #:configure-flags + (list (string-append "--with-html-dir=" + (assoc-ref %outputs "doc") + "/share/gtk-doc/html")))) (propagated-inputs `(("glib" ,glib))) ; required by gstreamer-1.0.pc. (native-inputs `(("bison" ,bison) ("flex" ,flex) ("glib" ,glib "bin") + ("gobject-introspection" ,gobject-introspection) ("perl" ,perl) ("pkg-config" ,pkg-config) ("python-wrapper" ,python-wrapper))) @@ -111,32 +124,6 @@ simple plugin with a clean, generic interface. This package provides the core library and elements.") (license lgpl2.0+))) -(define-public gstreamer-0.10 - (package (inherit gstreamer) - (version "0.10.36") - (source - (origin - (method url-fetch) - (uri (string-append "http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-" - version ".tar.xz")) - (sha256 - (base32 - "1nkid1n2l3rrlmq5qrf5yy06grrkwjh3yxl5g0w58w0pih8allci")) - (patches - (list (search-patch "gstreamer-0.10-bison3.patch") - (search-patch "gstreamer-0.10-silly-test.patch"))))) - (propagated-inputs - `(("libxml2" ,libxml2))) - (inputs `(("glib" ,glib))) - (native-inputs - `(("bison" ,bison) - ("flex" ,flex) - ("perl" ,perl) - ("pkg-config" ,pkg-config) - ("glib" ,glib "bin") - ("python" ,python-2))))) - - (define-public gst-plugins-base (package (name "gst-plugins-base") @@ -150,6 +137,9 @@ This package provides the core library and elements.") (base32 "07ampnfa6p41s0lhia62l9h8bdx3c7vxvdz93pbx64m3wycq3gbp")))) (build-system gnu-build-system) + (outputs '("out" "doc")) + (propagated-inputs + `(("gstreamer" ,gstreamer))) ; required by gstreamer-plugins-base-1.0.pc (inputs `(("cdparanoia" ,cdparanoia) ("orc" ,orc) @@ -161,20 +151,30 @@ This package provides the core library and elements.") ("zlib" ,zlib) ("libXext" ,libxext) ("libxv" ,libxv) - ("alsa-lib" ,alsa-lib) - ("gstreamer" ,gstreamer))) + ("alsa-lib" ,alsa-lib))) (native-inputs `(("pkg-config" ,pkg-config) ("glib" ,glib "bin") + ("gobject-introspection" ,gobject-introspection) ("python-wrapper" ,python-wrapper))) (arguments - '(#:phases + `(#:configure-flags + (list (string-append "--with-html-dir=" + (assoc-ref %outputs "doc") + "/share/gtk-doc/html")) + #:phases (alist-cons-before - 'configure 'patch-test-pb-utils + 'configure 'patch (lambda _ (substitute* "tests/check/libs/pbutils.c" - (("/bin/sh") (which "sh")))) + (("/bin/sh") (which "sh"))) + ;; for g-ir-scanner. + (setenv "CC" "gcc")) %standard-phases))) + (native-search-paths + (list (search-path-specification + (variable "GST_PLUGIN_SYSTEM_PATH") + (files '("lib/gstreamer-1.0"))))) (home-page "http://gstreamer.freedesktop.org/") (synopsis "Plugins for the GStreamer multimedia library") @@ -198,30 +198,30 @@ for the GStreamer multimedia library.") "0hg6qzdpib9nwn3hdxv0d4rvivi1c4bmxsq2a9hqmamwyzrvbcbr")))) (build-system gnu-build-system) (inputs - `(("glib" ,glib) + `(("aalib" ,aalib) ("cairo" ,cairo) - ("gdk-pixbuf" ,gdk-pixbuf) ("flac" ,flac) - ("speex" ,speex) - ("libogg" ,libogg) ;; should be a propagated input of the above - ("libx11" ,libx11) - ("zlib" ,zlib) - ("libpng" ,libpng) + ("gdk-pixbuf" ,gdk-pixbuf) + ("gst-plugins-base" ,gst-plugins-base) + ("jack" ,jack-2) + ("libavc1394" ,libavc1394) + ("libcaca" ,libcaca) + ("libdv" ,libdv) + ("libiec61883" ,libiec61883) ("libjpeg" ,libjpeg) - ("libXext" ,libxext) - ("libxv" ,libxv) + ("libpng" ,libpng) + ("libshout" ,libshout) + ("libsoup" ,libsoup) + ("libvpx" ,libvpx) + ("orc" ,orc) ("pulseaudio" ,pulseaudio) - ("gstreamer" ,gstreamer))) + ("speex" ,speex) + ("taglib" ,taglib) + ("wavpack" ,wavpack))) (native-inputs - `(("pkg-config" ,pkg-config) - ("glib" ,glib "bin") - ("gst-plugins-base" ,gst-plugins-base) - ("python-wrapper" ,python-wrapper))) - (arguments - `(#:configure-flags (list "--disable-osx_audio" - "--disable-osx_video" - "--disable-directsound" - "--disable-waveform"))) + `(("glib:bin" ,glib "bin") + ("pkg-config" ,pkg-config) + ("python-wrapper" ,python-wrapper))) (home-page "http://gstreamer.freedesktop.org/") (synopsis "Plugins for the GStreamer multimedia library") @@ -230,22 +230,39 @@ GStreamer multimedia library. This set contains those plug-ins which the developers consider to have good quality code and correct functionality.") (license lgpl2.0+))) -(define-public gst-plugins-base-0.10 - (package (inherit gst-plugins-base) - (version "0.10.36") - (source - (origin - (method url-fetch) - (uri (string-append - "http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-" - version ".tar.xz")) - (sha256 - (base32 - "0jp6hjlra98cnkal4n6bdmr577q8mcyp3c08s3a02c4hjhw5rr0z")))) - (inputs - `(("glib" ,glib) - ("gstreamer" ,gstreamer-0.10))) +(define-public gst-libav + (package + (name "gst-libav") + (version "1.4.5") + (source (origin + (method url-fetch) + (uri (string-append + "http://gstreamer.freedesktop.org/src/" name "/" + name "-" version ".tar.xz")) + (sha256 + (base32 + "1g7vg9amh3cc3nmc415h6g2rqxqi4wgwqi08hxfbpwq48ri64p30")))) + (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--with-system-libav") + #:phases + (modify-phases %standard-phases + (add-before 'configure 'patch-/bin/sh + (lambda _ + (substitute* "gst-libs/ext/libav/configure" + (("#! /bin/sh") + (string-append "#! "(which "sh"))))))))) (native-inputs - `(("pkg-config" ,pkg-config) - ("glib" ,glib "bin") - ("python" ,python-2))))) + `(("pkg-config" ,pkg-config) + ("python" ,python))) + (inputs + `(("gst-plugins-base" ,gst-plugins-base) + ("ffmpeg" ,ffmpeg) + ("orc" ,orc) + ("zlib" ,zlib))) + (home-page "http://gstreamer.freedesktop.org/") + (synopsis "Plugins for the GStreamer multimedia library") + (description + "This GStreamer plugin supports a large number of audio and video +compression formats through the use of the libav library.") + (license gpl2+))) diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index b3688d5ec1..049c63162e 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org> ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch> ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org> +;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -29,11 +30,13 @@ #:use-module (guix build-system gnu) #:use-module (guix build-system python) #:use-module (guix build-system waf) + #:use-module (gnu packages) #:use-module (gnu packages check) #:use-module (gnu packages gettext) #:use-module (gnu packages compression) #:use-module (gnu packages fontutils) #:use-module (gnu packages ghostscript) + #:use-module (gnu packages gl) #:use-module (gnu packages glib) #:use-module (gnu packages gnome) #:use-module (gnu packages icu4c) @@ -51,7 +54,7 @@ (define-public atk (package (name "atk") - (version "2.15.3") + (version "2.16.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -59,9 +62,15 @@ name "-" version ".tar.xz")) (sha256 (base32 - "177a9x6lz2im0mfgxv2crv0l740wy7rg5vlnb8wyyf4fmnh0q19f")))) ; 2.15.3 + "0qp5i91kfk6rhrlam3s8ha0cz88lkyp89vsyn4pb5856c1h9hpq9")))) (build-system gnu-build-system) - (inputs `(("glib" ,glib))) + (outputs '("out" "doc")) + (arguments + `(#:configure-flags + (list (string-append "--with-html-dir=" + (assoc-ref %outputs "doc") + "/share/gtk-doc/html")))) + (propagated-inputs `(("glib" ,glib))) ; required by atk.pc (native-inputs `(("pkg-config" ,pkg-config) ("glib" ,glib "bin") ; glib-mkenums, etc. @@ -77,14 +86,14 @@ tools have full access to view and control running applications.") (define-public cairo (package (name "cairo") - (version "1.12.18") + (version "1.14.2") (source (origin (method url-fetch) (uri (string-append "http://cairographics.org/releases/cairo-" version ".tar.xz")) (sha256 (base32 - "1dpmlxmmigpiyv0jchjsn2l1a29655x24g5073hy8p4lmjvz0nfw")))) + "1sycbq0agbwmg1bj9lhkgsf0glmblaf2jrdy9g6vxfxivncxj6f9")))) (build-system gnu-build-system) (propagated-inputs `(("fontconfig" ,fontconfig) @@ -221,13 +230,21 @@ functions which were removed.") (source (origin (method url-fetch) (uri (string-append "http://download.drobilla.net/ganv-" - version - ".tar.bz2")) + version ".tar.bz2")) (sha256 (base32 "0g7s5mp14qgbfjdql0k1s8464r21g47ssn5dws6jazsnw6njhl0l")))) (build-system waf-build-system) - (arguments `(#:tests? #f)) ; no check target + (arguments + `(#:phases (alist-cons-before + 'configure 'set-ldflags + (lambda* (#:key outputs #:allow-other-keys) + ;; Allow 'bin/ganv_bench' to find libganv-1.so. + (setenv "LDFLAGS" + (string-append "-Wl,-rpath=" + (assoc-ref outputs "out") "/lib"))) + %standard-phases) + #:tests? #f)) ; no check target (inputs `(("gtk" ,gtk+-2) ("gtkmm" ,gtkmm-2))) @@ -332,7 +349,7 @@ in the GNOME project.") (define-public at-spi2-core (package (name "at-spi2-core") - (version "2.10.0") + (version "2.16.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -340,18 +357,31 @@ in the GNOME project.") name "-" version ".tar.xz")) (sha256 (base32 - "1ns44yibdgcwzwri7sr075hfs5rh5lgxkh71247a0822az3mahcn")))) + "1l3l39mw23zyjlcqidvkyqlr4gwbhplzw2hcv3qvn6p8ikxpf2qw")))) (build-system gnu-build-system) - (inputs `(("dbus" ,dbus) - ("glib" ,glib) - ("libxi" ,libxi) - ("libxtst" ,libxtst))) - (native-inputs - `(("intltool" ,intltool) - ("pkg-config" ,pkg-config))) + (outputs '("out" "doc")) (arguments - `(#:tests? #f)) ; FIXME: dbind/dbtest fails; one should disable tests in - ; a more fine-grained way. + '(#:configure-flags + (list (string-append "--with-html-dir=" + (assoc-ref %outputs "doc") + "/share/gtk-doc/html")) + #:phases + (modify-phases %standard-phases + (replace 'check + ;; Run test-suite under a dbus session. + (lambda _ + (zero? (system* "dbus-launch" "make" "check"))))))) + (propagated-inputs + ;; atspi-2.pc refers to all these. + `(("dbus" ,dbus) + ("glib" ,glib))) + (inputs + `(("libxi" ,libxi) + ("libxtst" ,libxtst))) + (native-inputs + `(("gobject-introspection" ,gobject-introspection) + ("intltool" ,intltool) + ("pkg-config" ,pkg-config))) (synopsis "Assistive Technology Service Provider Interface, core components") (description "The Assistive Technology Service Provider Interface, core components, @@ -362,7 +392,7 @@ is part of the GNOME accessibility project.") (define-public at-spi2-atk (package (name "at-spi2-atk") - (version "2.10.0") + (version "2.16.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -370,17 +400,22 @@ is part of the GNOME accessibility project.") name "-" version ".tar.xz")) (sha256 (base32 - "150sqc21difazqd53llwfdaqnwfy73bic9hia41xpfy9kcpzz9yy")))) + "1y9gfz1iz3wpja7s000f0bmyyvc6im5fcdl6bxwbz0v3qdgc9vvq")))) (build-system gnu-build-system) - (inputs `(("atk" ,atk) - ("at-spi2-core" ,at-spi2-core) - ("dbus" ,dbus) - ("glib" ,glib))) - (native-inputs - `(("pkg-config" ,pkg-config))) (arguments - `(#:tests? #f)) ; FIXME: droute/droute-test fails; one should disable - ; tests in a more fine-grained way. + '(#:phases + (modify-phases %standard-phases + (replace 'check + ;; Run test-suite under a dbus session. + (lambda _ + (zero? (system* "dbus-launch" "make" "check"))))))) + (propagated-inputs + `(("at-spi2-core" ,at-spi2-core))) ; required by atk-bridge-2.0.pc + (inputs + `(("atk" ,atk))) + (native-inputs + `(("dbus" ,dbus) ; for testing + ("pkg-config" ,pkg-config))) (synopsis "Assistive Technology Service Provider Interface, ATK bindings") (description "The Assistive Technology Service Provider Interface @@ -391,7 +426,7 @@ is part of the GNOME accessibility project.") (define-public gtk+-2 (package (name "gtk+") - (version "2.24.21") + (version "2.24.27") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -399,20 +434,34 @@ is part of the GNOME accessibility project.") name "-" version ".tar.xz")) (sha256 (base32 - "1qyw73pr9ryqhir2h1kbx3vm70km4dg2fxrgkrdlpv0rvlb94bih")))) + "1x14rnjvqslpa1q19fp1qalz5sxds72amsgjk8m7769rwk511jr0")))) (build-system gnu-build-system) + (outputs '("out" "doc")) (propagated-inputs `(("atk" ,atk) ("gdk-pixbuf" ,gdk-pixbuf) ("pango" ,pango))) + (inputs + `(("cups" ,cups) + ("libxcomposite" ,libxcomposite) + ("libxcursor" ,libxcursor) + ("libxdamage" ,libxdamage) + ("libxi" ,libxi) + ("libxinerama" ,libxinerama) + ("libxrandr" ,libxrandr))) (native-inputs `(("perl" ,perl) + ("gettext" ,gnu-gettext) ("glib" ,glib "bin") ("gobject-introspection" ,gobject-introspection) ("pkg-config" ,pkg-config) ("python-wrapper" ,python-wrapper))) (arguments - `(#:make-flags '("CC=gcc") + `(#:configure-flags + (list "--with-xinput=yes" + (string-append "--with-html-dir=" + (assoc-ref %outputs "doc") + "/share/gtk-doc/html")) #:phases (alist-cons-before 'configure 'disable-tests @@ -433,7 +482,7 @@ application suites.") (define-public gtk+ (package (inherit gtk+-2) (name "gtk+") - (version "3.14.7") + (version "3.16.2") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -441,11 +490,12 @@ application suites.") name "-" version ".tar.xz")) (sha256 (base32 - "0vm40n6nf0w3vv54wqy67jcxddka7hplksi093xim3119yq196gv")))) + "1yhwg2l72l3khfkprydcjlpxjrg11ccqfc80sjl56llz3jk66fd0")))) (propagated-inputs `(("at-spi2-atk" ,at-spi2-atk) ("atk" ,atk) ("gdk-pixbuf" ,gdk-pixbuf) + ("libepoxy" ,libepoxy) ("libxi" ,libxi) ("libxinerama" ,libxinerama) ("libxdamage" ,libxdamage) @@ -456,25 +506,33 @@ application suites.") (native-inputs `(("perl" ,perl) ("glib" ,glib "bin") + ("gettext" ,gnu-gettext) ("pkg-config" ,pkg-config) ("gobject-introspection" ,gobject-introspection) ("python-wrapper" ,python-wrapper) ("xorg-server" ,xorg-server))) (arguments - `(#:phases - (alist-replace - 'configure - (lambda* (#:key inputs #:allow-other-keys #:rest args) - (let ((configure (assoc-ref %standard-phases 'configure))) - ;; Disable most tests, failing in the chroot with the message: - ;; D-Bus library appears to be incorrectly set up; failed to read - ;; machine uuid: Failed to open "/etc/machine-id": No such file or - ;; directory. - ;; See the manual page for dbus-uuidgen to correct this issue. - (substitute* "testsuite/Makefile.in" - (("SUBDIRS = gdk gtk a11y css reftests") - "SUBDIRS = gdk")) - (apply configure args))) + `(;; 47 MiB goes to "out" (24 of which is locale data!), and 26 MiB goes + ;; to "doc". + #:configure-flags (list (string-append "--with-html-dir=" + (assoc-ref %outputs "doc") + "/share/gtk-doc/html")) + #:phases + (alist-cons-before + 'configure 'pre-configure + (lambda _ + ;; Disable most tests, failing in the chroot with the message: + ;; D-Bus library appears to be incorrectly set up; failed to read + ;; machine uuid: Failed to open "/etc/machine-id": No such file or + ;; directory. + ;; See the manual page for dbus-uuidgen to correct this issue. + (substitute* "testsuite/Makefile.in" + (("SUBDIRS = gdk gtk a11y css reftests") + "SUBDIRS = gdk")) + (substitute* '("demos/widget-factory/Makefile.in" + "demos/gtk-demo/Makefile.in") + (("gtk-update-icon-cache") "$(bindir)/gtk-update-icon-cache")) + #t) %standard-phases))))) ;;; @@ -574,7 +632,7 @@ library.") (define-public pangomm (package (name "pangomm") - (version "2.34.0") + (version "2.36.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -582,7 +640,7 @@ library.") name "-" version ".tar.xz")) (sha256 (base32 - "0hcyvv7c5zmivprdam6cp111i6hn2y5jsxzk00m6j9pncbzvp0hf")))) + "1w11d05nkxglzg67rfa81vqghm75xhy6j396xmmp5mq8qx96knd8")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config))) (propagated-inputs @@ -623,7 +681,7 @@ toolkit.") (define-public gtkmm (package (name "gtkmm") - (version "3.14.0") + (version "3.16.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -631,7 +689,7 @@ toolkit.") name "-" version ".tar.xz")) (sha256 (base32 - "12z4g2in82nk92nfjs2hmrdcwbav8v3laz1813x2dhkf5jk2ixfr")))) + "036xn22jkaf3akpid7w23b8vkqa3xxqz93mwacmyar5vw7slm3cv")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config))) (propagated-inputs @@ -655,7 +713,7 @@ extensive documentation, including API reference and a tutorial.") (define-public gtkmm-2 (package (inherit gtkmm) (name "gtkmm") - (version "2.24.2") + (version "2.24.4") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -663,7 +721,7 @@ extensive documentation, including API reference and a tutorial.") name "-" version ".tar.xz")) (sha256 (base32 - "0gcm91sc1a05c56kzh74l370ggj0zz8nmmjvjaaxgmhdq8lpl369")))) + "1vpmjqv0aqb1ds0xi6nigxnhlr0c74090xzi15b92amlzkrjyfj4")))) (propagated-inputs `(("pangomm" ,pangomm) ("cairomm" ,cairomm) @@ -682,29 +740,23 @@ extensive documentation, including API reference and a tutorial.") version ".tar.bz2")) (sha256 (base32 - "1gjkf8x6hyx1skq3hhwcbvwifxvrf9qxis5vx8x5igmmgs70g94s")))) - (build-system python-build-system) + "1gjkf8x6hyx1skq3hhwcbvwifxvrf9qxis5vx8x5igmmgs70g94s")) + (patches (list (search-patch "pycairo-wscript.patch"))))) + (build-system waf-build-system) (native-inputs - `(("pkg-config" ,pkg-config))) + `(("pkg-config" ,pkg-config) + ("python-waf" ,python-waf))) (propagated-inputs ;pycairo.pc references cairo `(("cairo" ,cairo))) (arguments `(#:tests? #f - #:phases (alist-cons-before - 'build 'configure - (lambda* (#:key outputs #:allow-other-keys) - (zero? (system* "./waf" "configure" - (string-append "--prefix=" - (assoc-ref outputs "out"))))) - (alist-replace - 'build - (lambda _ - (zero? (system* "./waf" "build"))) - (alist-replace - 'install - (lambda _ - (zero? (system* "./waf" "install"))) - %standard-phases))))) + #:phases + (modify-phases %standard-phases + (add-before + 'configure 'patch-waf + (lambda* (#:key inputs #:allow-other-keys) + ;; The bundled `waf' doesn't work with python-3.4.x. + (copy-file (assoc-ref %build-inputs "python-waf") "./waf")))))) (home-page "http://cairographics.org/pycairo/") (synopsis "Python bindings for cairo") (description @@ -725,7 +777,11 @@ extensive documentation, including API reference and a tutorial.") "0cblk919wh6w0pgb45zf48xwxykfif16qk264yga7h9fdkq3j16k")))) (arguments `(#:python ,python-2 - ,@(package-arguments python-pycairo))) + ,@(substitute-keyword-arguments (package-arguments python-pycairo) + ((#:phases phases) + `(alist-delete 'patch-waf ,phases)) + ((#:native-inputs native-inputs) + `(alist-delete "python-waf" ,native-inputs))))) ;; Dual-licensed under LGPL 2.1 or Mozilla Public License 1.1 (license (list license:lgpl2.1 license:mpl1.1)))) @@ -788,7 +844,7 @@ write GNOME applications.") (define-public girara (package (name "girara") - (version "0.2.3") + (version "0.2.4") (source (origin (method url-fetch) (uri @@ -796,7 +852,7 @@ write GNOME applications.") version ".tar.gz")) (sha256 (base32 - "1phfmqp8y17zcy9yi6pm2f80x8ldbk60iswpm4bmjz5217jwqzxh")))) + "0pnfdsg435b5vc4x8l9pgm77aj7ram1q0bzrp9g4a3bh1r64xq1f")))) (native-inputs `(("pkg-config" ,pkg-config) ("gettext" ,gnu-gettext))) (inputs `(("gtk+" ,gtk+) diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm index c605533fd2..4446ccf337 100644 --- a/gnu/packages/guile.scm +++ b/gnu/packages/guile.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> +;;; Copyright © 2015 Christopher Allan Webber <cwebber@dustycloud.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -26,6 +27,7 @@ #:use-module (gnu packages gperf) #:use-module (gnu packages libffi) #:use-module (gnu packages autotools) + #:use-module (gnu packages flex) #:use-module (gnu packages libunistring) #:use-module (gnu packages m4) #:use-module (gnu packages multiprecision) @@ -34,9 +36,13 @@ #:use-module (gnu packages ncurses) #:use-module (gnu packages ed) #:use-module (gnu packages base) + #:use-module (gnu packages texinfo) + #:use-module (gnu packages gettext) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix git-download) #:use-module (guix build-system gnu) + #:use-module (guix build-system trivial) #:use-module (guix utils) #:use-module (ice-9 match)) @@ -178,6 +184,42 @@ without requiring the source code to be rewritten.") ;; in the `base' module, and thus changing it entails a full rebuild. guile-2.0) +(define-public guile-for-guile-emacs + (package (inherit guile-2.0) + (name "guile-for-guile-emacs") + (version "20150510.d8d9a8d") + (source (origin + (method git-fetch) + (uri (git-reference + (url "git://git.hcoop.net/git/bpt/guile.git") + (commit "d8d9a8da05ec876acba81a559798eb5eeceb5a17"))) + (sha256 + (base32 + "00sprsshy16y8pxjy126hr2adqcvvzzz96hjyjwgg8swva1qh6b0")))) + (arguments + (substitute-keyword-arguments `(;; Tests aren't passing for now. + ;; Obviously we should re-enable this! + #:tests? #f + ,@(package-arguments guile-2.0)) + ((#:phases phases) + `(modify-phases ,phases + (add-after 'unpack 'autogen + (lambda _ + (zero? (system* "sh" "autogen.sh")))) + (add-before 'autogen 'patch-/bin/sh + (lambda _ + (substitute* "build-aux/git-version-gen" + (("#!/bin/sh") (string-append "#!" (which "sh")))) + #t)))))) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("libtool" ,libtool) + ("flex" ,flex) + ("texinfo" ,texinfo) + ("gettext" ,gnu-gettext) + ,@(package-native-inputs guile-2.0))))) + ;;; ;;; Extensions. @@ -358,4 +400,79 @@ http:://json.org specification. These are the main features: - Allows JSON pretty printing.") (license lgpl3+))) +(define-public guile-minikanren + (package + (name "guile-minikanren") + (version "20150424.e844d85") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ijp/minikanren.git") + (commit "e844d85512f8c055d3f96143ee506007389a25e3"))) + (sha256 + (base32 + "0r50jlpzi940jlmxyy3ddqqwmj5r12gb4bcv0ssini9v8km13xz6")))) + (build-system trivial-build-system) + (arguments + `(#:modules + ((guix build utils) + (ice-9 match)) + #:builder + (begin + (use-modules (guix build utils) + (ice-9 match)) + (let* ((out (assoc-ref %outputs "out")) + (module-dir (string-append out "/share/guile/site/2.0")) + (source (assoc-ref %build-inputs "source")) + (doc (string-append out "/share/doc")) + (scm-files '("minikanren.scm" + "minikanren/mkextraforms.scm" + "minikanren/mkprelude.scm" + "minikanren/mk.scm")) + (guild (string-append (assoc-ref %build-inputs "guile") + "/bin/guild"))) + ;; Make installation directories. + (mkdir-p (string-append module-dir "/minikanren")) + (mkdir-p doc) + + ;; Compile .scm files and install. + (chdir source) + (setenv "GUILE_AUTO_COMPILE" "0") + (for-each (lambda (file) + (let* ((dest-file (string-append module-dir "/" + file ".scm")) + (go-file (match (string-split file #\.) + ((base _) + (string-append module-dir "/" + base ".go"))))) + ;; Install source module. + (copy-file file dest-file) + ;; Install compiled module. + (unless (zero? (system* guild "compile" + "-L" source + "-o" go-file + file)) + (error (format #f "Failed to compile ~s to ~s!" + file go-file))))) + scm-files) + + ;; Also copy over the README. + (copy-file "README.org" (string-append doc "/README.org")) + #t)))) + (inputs + `(("guile" ,guile-2.0))) + (home-page "https://github.com/ijp/minikanren") + (synopsis "miniKanren declarative logic system, packaged for Guile") + (description + "MiniKanren is a relational programming extension to the Scheme +programming Language, written as a smaller version of Kanren suitable for +pedagogical purposes. It is featured in the book, The Reasoned Schemer, +written by Dan Friedman, William Byrd, and Oleg Kiselyov. + +This is Ian Price's r6rs packaged version of miniKranen, which deviates +slightly from miniKanren mainline. + +See http://minikanren.org/ for more on miniKanren generally.") + (license expat))) + ;;; guile.scm ends here diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm index 183d0eb4cb..ac87de540e 100644 --- a/gnu/packages/haskell.scm +++ b/gnu/packages/haskell.scm @@ -18,12 +18,14 @@ (define-module (gnu packages haskell) #:use-module (ice-9 regex) - #:use-module (guix licenses) + #:use-module ((guix licenses) #:select (bsd-3)) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix utils) #:use-module (guix build-system gnu) + #:use-module (guix build-system haskell) #:use-module (gnu packages perl) + #:use-module (gnu packages compression) #:use-module (gnu packages elf) #:use-module (gnu packages bootstrap) #:use-module (gnu packages ghostscript) @@ -33,22 +35,23 @@ #:use-module (gnu packages ncurses) #:use-module (gnu packages python)) -;; We use bootstrap binaries with a fix version which can be used to build -;; more versions of the GHC compiler. -(define ghc-bootstrap-7.8.4 +(define ghc-bootstrap-x86_64-7.8.4 (origin (method url-fetch) - (uri (string-append "https://www.haskell.org/ghc/dist/" - "7.8.4/ghc-7.8.4-" - (if (string-match "x86_64" (%current-system)) - "x86_64" - "i386") - "-unknown-linux-deb7.tar.xz")) + (uri + "https://www.haskell.org/ghc/dist/7.8.4/ghc-7.8.4-x86_64-unknown-linux-deb7.tar.xz") (sha256 (base32 - (if (string-match "x86_64" (%current-system)) - "13azsl53xgj20mi1hj9x0xb32vvcvs6cpmvwx6znxhas7blh0bpn" - "0wj5s435j0zgww70bj1d3f6wvnnpzlxwvwcyh2qv4qjq5z8j64kg"))))) + "13azsl53xgj20mi1hj9x0xb32vvcvs6cpmvwx6znxhas7blh0bpn")))) + +(define ghc-bootstrap-i686-7.8.4 + (origin + (method url-fetch) + (uri + "https://www.haskell.org/ghc/dist/7.8.4/ghc-7.8.4-i386-unknown-linux-deb7.tar.xz") + (sha256 + (base32 + "0wj5s435j0zgww70bj1d3f6wvnnpzlxwvwcyh2qv4qjq5z8j64kg")))) ;; 43 tests out of 3965 fail. ;; @@ -99,19 +102,26 @@ ("ghostscript" ,ghostscript) ; for tests ("patchelf" ,patchelf) ;; GHC is built with GHC. Therefore we need bootstrap binaries. - ("ghc-binary" ,ghc-bootstrap-7.8.4))) + ("ghc-binary" + ,(if (string-match "x86_64" (or (%current-target-system) (%current-system))) + ghc-bootstrap-x86_64-7.8.4 + ghc-bootstrap-i686-7.8.4)))) (arguments `(#:test-target "test" ;; We get a smaller number of test failures by disabling parallel test ;; execution. #:parallel-tests? #f + + ;; The DSOs use $ORIGIN to refer to each other, but (guix build + ;; gremlin) doesn't support it yet, so skip this phase. + #:validate-runpath? #f + #:modules ((guix build gnu-build-system) (guix build utils) (guix build rpath) (srfi srfi-26) (srfi srfi-1)) - #:imported-modules ((guix build gnu-build-system) - (guix build utils) + #:imported-modules (,@%gnu-build-system-modules (guix build rpath)) #:configure-flags (list @@ -221,4 +231,647 @@ interactive environment for the functional language Haskell.") (license bsd-3))) +(define-public ghc-mtl + (package + (name "ghc-mtl") + (version "2.1.3.1") + (outputs '("out" "doc")) + (source + (origin + (method url-fetch) + (uri (string-append + "http://hackage.haskell.org/package/mtl/mtl-" + version + ".tar.gz")) + (sha256 + (base32 + "1xpn2wjmqbh2cg1yssc6749xpgcqlrrg4iilwqgkcjgvaxlpdbvp")))) + (build-system haskell-build-system) + (home-page "http://github.com/ekmett/mtl") + (synopsis + "Monad classes, using functional dependencies") + (description + "Monad classes using functional dependencies, with instances +for various monad transformers, inspired by the paper +'Functional Programming with Overloading and Higher-Order Polymorphism', +by Mark P Jones, in 'Advanced School of Functional Programming', 1995 +http://web.cecs.pdx.edu/~mpj/pubs/springschool.html.") + (license bsd-3))) + +(define-public ghc-paths + (package + (name "ghc-paths") + (version "0.1.0.9") + (outputs '("out" "doc")) + (source + (origin + (method url-fetch) + (uri (string-append + "http://hackage.haskell.org/package/ghc-paths/ghc-paths-" + version + ".tar.gz")) + (sha256 + (base32 + "0ibrr1dxa35xx20cpp8jzgfak1rdmy344dfwq4vlq013c6w8z9mg")))) + (build-system haskell-build-system) + (home-page "https://github.com/simonmar/ghc-paths") + (synopsis + "Knowledge of GHC's installation directories") + (description + "Knowledge of GHC's installation directories.") + (license bsd-3))) + +(define-public ghc-zlib + (package + (name "ghc-zlib") + (version "0.5.4.2") + (outputs '("out" "doc")) + (source + (origin + (method url-fetch) + (uri (string-append + "http://hackage.haskell.org/package/zlib/zlib-" + version + ".tar.gz")) + (sha256 + (base32 + "15hhsk7z3gvm7sz2ic2z1ca5c6rpsln2rr391mdbm1bxlzc1gmkm")))) + (build-system haskell-build-system) + (inputs `(("zlib" ,zlib))) + (home-page "http://hackage.haskell.org/package/zlib") + (synopsis + "Compression and decompression in the gzip and zlib formats") + (description + "This package provides a pure interface for compressing and decompressing +streams of data represented as lazy 'ByteString's. It uses the zlib C library +so it has high performance. It supports the 'zlib', 'gzip' and 'raw' +compression formats. It provides a convenient high level API suitable for +most tasks and for the few cases where more control is needed it provides +access to the full zlib feature set.") + (license bsd-3))) + +(define-public ghc-stm + (package + (name "ghc-stm") + (version "2.4.4") + (outputs '("out" "doc")) + (source + (origin + (method url-fetch) + (uri (string-append + "http://hackage.haskell.org/package/stm/stm-" + version + ".tar.gz")) + (sha256 + (base32 + "0gc8zvdijp3rwmidkpxv76b4i0dc8dw6nbd92rxl4vxl0655iysx")))) + (build-system haskell-build-system) + (home-page "http://hackage.haskell.org/package/stm") + (synopsis "Software Transactional Memory") + (description + "A modular composable concurrency abstraction.") + (license bsd-3))) + +(define-public ghc-parallel + (package + (name "ghc-parallel") + (version "3.2.0.6") + (outputs '("out" "doc")) + (source + (origin + (method url-fetch) + (uri (string-append + "http://hackage.haskell.org/package/parallel/parallel-" + version + ".tar.gz")) + (sha256 + (base32 + "0hp6vf4zxsw6vz6lj505xihmnfhgjp39c9q7nyzlgcmps3xx6a5r")))) + (build-system haskell-build-system) + (home-page "http://hackage.haskell.org/package/parallel") + (synopsis "Parallel programming library") + (description + "This package provides a library for parallel programming.") + (license bsd-3))) + +(define-public ghc-text + (package + (name "ghc-text") + (version "1.2.0.4") + (outputs '("out" "doc")) + (source + (origin + (method url-fetch) + (uri (string-append + "http://hackage.haskell.org/package/text/text-" + version + ".tar.gz")) + (sha256 + (base32 + "004p1c74crs8wmjafwsmw3mmycspq1j8fpm1lvfpq6acha7bnpc6")))) + (build-system haskell-build-system) + (arguments + `(#:tests? #f)) ; FIXME: currently missing libraries used for tests. + (home-page "https://github.com/bos/text") + (synopsis "Efficient packed Unicode text type library") + (description + "An efficient packed, immutable Unicode text type (both strict and +lazy), with a powerful loop fusion optimization framework. + +The 'Text' type represents Unicode character strings, in a time and +space-efficient manner. This package provides text processing +capabilities that are optimized for performance critical use, both +in terms of large data quantities and high speed.") + (license bsd-3))) + +(define-public ghc-hashable + (package + (name "ghc-hashable") + (version "1.2.3.2") + (outputs '("out" "doc")) + (source + (origin + (method url-fetch) + (uri (string-append + "http://hackage.haskell.org/package/hashable/hashable-" + version + ".tar.gz")) + (sha256 + (base32 + "0h9295pv2sgbaqlwpwbx2bap6nngm0jcdhkqham1wpjwyxqgqrlc")))) + (build-system haskell-build-system) + (arguments + `(#:tests? #f)) ; FIXME: currently missing libraries used for tests. + ;; these inputs are necessary to use this library + (propagated-inputs + `(("ghc-text" ,ghc-text))) + (home-page "http://github.com/tibbe/hashable") + (synopsis + "Class for types that can be converted to a hash value") + (description + "This package defines a class, 'Hashable', for types that can be +converted to a hash value. This class exists for the benefit of hashing-based +data structures. The package provides instances for basic types and a way to +combine hash values.") + (license bsd-3))) + +(define-public ghc-hunit + (package + (name "ghc-hunit") + (version "1.2.5.2") + (outputs '("out" "doc")) + (source + (origin + (method url-fetch) + (uri (string-append + "http://hackage.haskell.org/package/HUnit/HUnit-" + version + ".tar.gz")) + (sha256 + (base32 + "0hcs6qh8bqhip1kkjjnw7ccgcsmawdz5yvffjj5y8zd2vcsavx8a")))) + (build-system haskell-build-system) + (home-page "http://hunit.sourceforge.net/") + (synopsis "Unit testing framework for Haskell") + (description + "HUnit is a unit testing framework for Haskell, inspired by the +JUnit tool for Java.") + (license bsd-3))) + +(define-public ghc-random + (package + (name "ghc-random") + (version "1.1") + (outputs '("out" "doc")) + (source + (origin + (method url-fetch) + (uri (string-append + "http://hackage.haskell.org/package/random/random-" + version + ".tar.gz")) + (sha256 + (base32 "0nis3lbkp8vfx8pkr6v7b7kr5m334bzb0fk9vxqklnp2aw8a865p")))) + (build-system haskell-build-system) + (home-page "http://hackage.haskell.org/package/random") + (synopsis "Random number library") + (description "This package provides a basic random number generation +library, including the ability to split random number generators.") + (license bsd-3))) + +(define-public ghc-primitive + (package + (name "ghc-primitive") + (version "0.5.4.0") + (outputs '("out" "doc")) + (source + (origin + (method url-fetch) + (uri (string-append + "http://hackage.haskell.org/package/primitive/primitive-" + version + ".tar.gz")) + (sha256 + (base32 + "05gdgj383xdrdkhxh26imlvs8ji0z28ny38ms9snpvv5i8l2lg10")))) + (build-system haskell-build-system) + (home-page + "https://github.com/haskell/primitive") + (synopsis "Primitive memory-related operations") + (description + "This package provides various primitive memory-related operations.") + (license bsd-3))) + +(define-public ghc-tf-random + (package + (name "ghc-tf-random") + (version "0.5") + (outputs '("out" "doc")) + (source + (origin + (method url-fetch) + (uri (string-append + "http://hackage.haskell.org/package/tf-random/tf-random-" + version + ".tar.gz")) + (sha256 + (base32 "0445r2nns6009fmq0xbfpyv7jpzwv0snccjdg7hwj4xk4z0cwc1f")))) + (build-system haskell-build-system) + ;; these inputs are necessary to use this package + (propagated-inputs + `(("ghc-primitive" ,ghc-primitive) + ("ghc-random" ,ghc-random))) + (home-page "http://hackage.haskell.org/package/tf-random") + (synopsis "High-quality splittable pseudorandom number generator") + (description "This package contains an implementation of a high-quality +splittable pseudorandom number generator. The generator is based on a +cryptographic hash function built on top of the ThreeFish block cipher. See +the paper \"Splittable Pseudorandom Number Generators Using Cryptographic +Hashing\" by Claessen, Pałka for details and the rationale of the design.") + (license bsd-3))) + +(define-public ghc-quickcheck + (package + (name "ghc-quickcheck") + (version "2.8") + (outputs '("out" "doc")) + (source + (origin + (method url-fetch) + (uri (string-append + "http://hackage.haskell.org/package/QuickCheck/QuickCheck-" + version + ".tar.gz")) + (sha256 + (base32 + "04xs6mq22bcnkpi616qrbm7jlivh9csnhmvjgp1ifq52an1wr4rx")))) + (build-system haskell-build-system) + (arguments + `(#:tests? #f ; FIXME: currently missing libraries used for tests. + #:configure-flags '("-f base4"))) + ;; these inputs are necessary to use this package + (propagated-inputs + `(("ghc-tf-random" ,ghc-tf-random))) + (home-page + "https://github.com/nick8325/quickcheck") + (synopsis + "Automatic testing of Haskell programs") + (description + "QuickCheck is a library for random testing of program properties.") + (license bsd-3))) + +(define-public ghc-case-insensitive + (package + (name "ghc-case-insensitive") + (version "1.2.0.4") + (outputs '("out" "doc")) + (source + (origin + (method url-fetch) + (uri (string-append + "http://hackage.haskell.org/package/case-insensitive/case-insensitive-" + version + ".tar.gz")) + (sha256 + (base32 + "07nm40r9yw2p9qsfp3pjbsmyn4dabrxw34p48171zmccdd5hv0v3")))) + (build-system haskell-build-system) + (inputs + `(("ghc-hunit" ,ghc-hunit))) + ;; these inputs are necessary to use this library + (propagated-inputs + `(("ghc-text" ,ghc-text) + ("ghc-hashable" ,ghc-hashable))) + (arguments + `(#:tests? #f)) ; FIXME: currently missing libraries used for tests. + (home-page + "https://github.com/basvandijk/case-insensitive") + (synopsis "Case insensitive string comparison") + (description + "The module 'Data.CaseInsensitive' provides the 'CI' type constructor +which can be parameterised by a string-like type like: 'String', 'ByteString', +'Text', etc.. Comparisons of values of the resulting type will be insensitive +to cases.") + (license bsd-3))) + +(define-public ghc-syb + (package + (name "ghc-syb") + (version "0.4.4") + (outputs '("out" "doc")) + (source + (origin + (method url-fetch) + (uri (string-append + "http://hackage.haskell.org/package/syb/syb-" + version + ".tar.gz")) + (sha256 + (base32 + "11sc9kmfvcn9bfxf227fgmny502z2h9xs3z0m9ak66lk0dw6f406")))) + (build-system haskell-build-system) + (inputs + `(("ghc-hunit" ,ghc-hunit) + ("ghc-mtl" ,ghc-mtl))) + (home-page + "http://www.cs.uu.nl/wiki/GenericProgramming/SYB") + (synopsis "Scrap Your Boilerplate") + (description + "This package contains the generics system described in the +/Scrap Your Boilerplate/ papers (see +<http://www.cs.uu.nl/wiki/GenericProgramming/SYB>). +It defines the 'Data' class of types permitting folding and unfolding +of constructor applications, instances of this class for primitive +types, and a variety of traversals.") + (license bsd-3))) + +(define-public ghc-containers + (package + (name "ghc-containers") + (version "0.5.6.3") + (outputs '("out" "doc")) + (source + (origin + (method url-fetch) + (uri (string-append + "http://hackage.haskell.org/package/containers/containers-" + version + ".tar.gz")) + (sha256 + (base32 + "1kcd55nl0vzi99i8sr8fmc5j25fv7m0a9hd3nihnq1pd64pfciqn")))) + (build-system haskell-build-system) + (inputs + `(("ghc-hunit" ,ghc-hunit) + ("ghc-quickcheck" ,ghc-quickcheck))) + (arguments + `(#:tests? #f)) ; FIXME: currently missing libraries used for tests. + (home-page "http://hackage.haskell.org/package/containers") + (synopsis "Assorted concrete container types") + (description + "This package contains efficient general-purpose implementations of +various basic immutable container types. The declared cost of each operation +is either worst-case or amortized, but remains valid even if structures are +shared.") + (license bsd-3))) + +(define-public ghc-fgl + (package + (name "ghc-fgl") + (version "5.5.1.0") + (outputs '("out" "doc")) + (source + (origin + (method url-fetch) + (uri (string-append + "http://hackage.haskell.org/package/fgl/fgl-" + version + ".tar.gz")) + (sha256 + (base32 + "0rcmz0xlyr1wj490ffja29z1jgl51gz19ka609da6bx39bwx7nga")))) + (build-system haskell-build-system) + (inputs `(("ghc-mtl" ,ghc-mtl))) + (home-page "http://web.engr.oregonstate.edu/~erwig/fgl/haskell") + (synopsis + "Martin Erwig's Functional Graph Library") + (description "The functional graph library, FGL, is a collection of type +and function definitions to address graph problems. The basis of the library +is an inductive definition of graphs in the style of algebraic data types that +encourages inductive, recursive definitions of graph algorithms.") + (license bsd-3))) + +(define-public ghc-unordered-containers + (package + (name "ghc-unordered-containers") + (version "0.2.5.1") + (outputs '("out" "doc")) + (source + (origin + (method url-fetch) + (uri (string-append + "http://hackage.haskell.org/package/unordered-containers/unordered-containers-" + version + ".tar.gz")) + (sha256 + (base32 + "06l1xv7vhpxly75saxdrbc6p2zlgz1az278arfkz4rgawfnphn3f")))) + (build-system haskell-build-system) + (inputs + `(("ghc-hunit" ,ghc-hunit) + ("ghc-quickcheck" ,ghc-quickcheck))) + ;; these inputs are necessary to use this library + (propagated-inputs `(("ghc-hashable" ,ghc-hashable))) + (arguments + `(#:tests? #f)) ; FIXME: currently missing libraries used for tests. + (home-page + "https://github.com/tibbe/unordered-containers") + (synopsis + "Efficient hashing-based container types") + (description + "Efficient hashing-based container types. The containers have been +optimized for performance critical use, both in terms of large data quantities +and high speed.") + (license bsd-3))) + +(define-public ghc-split + (package + (name "ghc-split") + (version "0.2.2") + (outputs '("out" "doc")) + (source + (origin + (method url-fetch) + (uri (string-append + "http://hackage.haskell.org/package/split/split-" + version + ".tar.gz")) + (sha256 + (base32 + "0xa3j0gwr6k5vizxybnzk5fgb3pppgspi6mysnp2gwjp2dbrxkzr")))) + (build-system haskell-build-system) + (inputs + `(("ghc-quickcheck" ,ghc-quickcheck))) + (home-page "http://hackage.haskell.org/package/split") + (synopsis + "Combinator library for splitting lists") + (description "A collection of various methods for splitting lists into +parts, akin to the 'split' function found in several mainstream languages.") + (license bsd-3))) + +(define-public ghc-parsec + (package + (name "ghc-parsec") + (version "3.1.9") + (outputs '("out" "doc")) + (source + (origin + (method url-fetch) + (uri (string-append + "http://hackage.haskell.org/package/parsec/parsec-" + version + ".tar.gz")) + (sha256 + (base32 "1ja20cmj6v336jy87c6h3jzjp00sdbakwbdwp11iln499k913xvi")))) + (build-system haskell-build-system) + (inputs + `(("ghc-hunit" ,ghc-hunit))) + ;; these inputs are necessary to use this library + (propagated-inputs + `(("ghc-text" ,ghc-text) + ("ghc-mtl" ,ghc-mtl))) + (arguments + `(#:tests? #f)) ; FIXME: currently missing libraries used for tests. + (home-page + "https://github.com/aslatter/parsec") + (synopsis "Monadic parser combinators") + (description "Parsec is a parser library. It is simple, safe, well +documented, has extensive libraries, good error messages, and is fast. It is +defined as a monad transformer that can be stacked on arbitrary monads, and it +is also parametric in the input stream type.") + (license bsd-3))) + +(define-public ghc-vector + (package + (name "ghc-vector") + (version "0.10.12.2") + (outputs '("out" "doc")) + (source + (origin + (method url-fetch) + (uri (string-append + "http://hackage.haskell.org/package/vector/vector-" + version + ".tar.gz")) + (sha256 + (base32 + "01hc71k1z9m0g0dv4zsvq5d2dvbgyc5p01hryw5c53792yi2fm25")))) + (build-system haskell-build-system) + (inputs + `(("ghc-quickcheck" ,ghc-quickcheck))) + ;; these inputs are necessary to use this library + (propagated-inputs + `(("ghc-primitive" ,ghc-primitive))) + (arguments + `(#:tests? #f)) ; FIXME: currently missing libraries used for tests. + (home-page "https://github.com/haskell/vector") + (synopsis "Efficient Arrays") + (description "An efficient implementation of Int-indexed arrays (both +mutable and immutable), with a powerful loop optimisation framework.") + (license bsd-3))) + +(define-public ghc-network + (package + (name "ghc-network") + (version "2.6.0.2") + (outputs '("out" "doc")) + (source + (origin + (method url-fetch) + (uri (string-append + "http://hackage.haskell.org/package/network/network-" + version + ".tar.gz")) + (sha256 + (base32 + "12b7saam5ga6l4cplgkad49xa4vkynz2ri9jxidx1cxiqjcl0vc4")))) + (build-system haskell-build-system) + (inputs + `(("ghc-hunit" ,ghc-hunit))) + (arguments + `(#:tests? #f ; FIXME: currently missing libraries used for tests. + #:phases + (modify-phases %standard-phases + (add-before 'configure 'set-sh + (lambda _ (setenv "CONFIG_SHELL" "sh")))))) + (home-page "https://github.com/haskell/network") + (synopsis "Low-level networking interface") + (description + "This package provides a low-level networking interface.") + (license bsd-3))) + +(define-public ghc-network-uri + (package + (name "ghc-network-uri") + (version "2.6.0.1") + (outputs '("out" "doc")) + (source + (origin + (method url-fetch) + (uri (string-append + "http://hackage.haskell.org/package/network-uri/network-uri-" + version + ".tar.gz")) + (sha256 + (base32 + "09ymamb128jgqghpda4nixncr73all8qc6q53976aricm6a27p37")))) + (build-system haskell-build-system) + (inputs + `(("ghc-hunit" ,ghc-hunit) + ("ghc-network" ,ghc-network))) + (arguments + `(#:tests? #f)) ; FIXME: currently missing libraries used for tests. + (propagated-inputs + `(("ghc-parsec" ,ghc-parsec))) + (home-page + "https://github.com/haskell/network-uri") + (synopsis "Labrary for URI manipulation") + (description "This package provides an URI manipulation inteface. In +'network-2.6' the 'Network.URI' module was split off from the 'network' +package into this package.") + (license bsd-3))) + +(define-public ghc-http + (package + (name "ghc-http") + (version "4000.2.19") + (outputs '("out" "doc")) + (source + (origin + (method url-fetch) + (uri (string-append + "http://hackage.haskell.org/package/HTTP/HTTP-" + version + ".tar.gz")) + (sha256 + (base32 + "1yzm8gimh8g0wwbixcbxg60v4l3vgi63w9v55ms0x9qnm6vrgysz")))) + (build-system haskell-build-system) + (inputs + `(("ghc-hunit" ,ghc-hunit))) + (propagated-inputs + `(("ghc-parsec" ,ghc-parsec) + ("ghc-mtl" ,ghc-mtl) + ("ghc-network" ,ghc-network) + ("ghc-network-uri" ,ghc-network-uri))) + (arguments + `(#:tests? #f)) ; FIXME: currently missing libraries used for tests. + (home-page "https://github.com/haskell/HTTP") + (synopsis "Library for client-side HTTP") + (description + "The HTTP package supports client-side web programming in Haskell. It +lets you set up HTTP connections, transmitting requests and processing the +responses coming back.") + (license bsd-3))) + ;;; haskell.scm ends here diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm index 8ac78d3ece..62dc04385f 100644 --- a/gnu/packages/hurd.scm +++ b/gnu/packages/hurd.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014 Manolis Fragkiskos Ragkousis <manolis837@gmail.com> +;;; Copyright © 2014, 2015 Manolis Fragkiskos Ragkousis <manolis837@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -29,7 +29,7 @@ (define-public gnumach-headers (package (name "gnumach-headers") - (version "1.4") + (version "1.5") (source (origin (method url-fetch) @@ -37,7 +37,7 @@ version ".tar.gz")) (sha256 (base32 - "0r371wsm7imx356p0xsls5hifb1gf9y90rm1phr0qkahbmfk9hlv")))) + "0wsf57q4h6xl2jn28d423qx7zplmhpnf9ssm4f1c0sf8513xm81j")))) (build-system gnu-build-system) (arguments `(#:phases (alist-replace @@ -63,7 +63,7 @@ (define-public mig (package (name "mig") - (version "1.4") + (version "1.5") (source (origin (method url-fetch) @@ -71,7 +71,7 @@ version ".tar.gz")) (sha256 (base32 - "1jgzggnbp22sa8z5dilm43zy12vlf1pjxfb3kh13xrfhcay0l97b")))) + "13r1pg8icyc0pl082z7k36i440pr1f3nr7ahig3rrc0r7qndqmk9")))) (build-system gnu-build-system) (inputs `(("gnumach-headers" ,gnumach-headers))) (native-inputs @@ -92,14 +92,14 @@ communication.") (define-public hurd-headers (package (name "hurd-headers") - (version "0.5") + (version "0.6") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/hurd/hurd-" version ".tar.gz")) (sha256 (base32 - "0lvkz3r0ngb4bsn2hzdc9vjpyrfa3ls36jivrvy1n7f7f55zan7q")))) + "059lbspbpcjpcq5jf98f47jw9sm0ngs3x6phxax53m3rwca1fk7y")))) (build-system gnu-build-system) (native-inputs `(;; Autoconf shouldn't be necessary but there seems to be a bug in the diff --git a/gnu/packages/ibus.scm b/gnu/packages/ibus.scm new file mode 100644 index 0000000000..1abe70a1ab --- /dev/null +++ b/gnu/packages/ibus.scm @@ -0,0 +1,92 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net> +;;; Copyright © 2015 Andreas Enge <andreas@enge.fr> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (gnu packages ibus) + #:use-module (guix licenses) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu) + #:use-module (guix build-system glib-or-gtk) + #:use-module (gnu packages) + #:use-module (gnu packages glib) + #:use-module (gnu packages gnome) + #:use-module (gnu packages gtk) + #:use-module (gnu packages iso-codes) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages python)) + +(define-public ibus + (package + (name "ibus") + (version "1.5.5") + (source (origin + (method url-fetch) + (uri (string-append "https://ibus.googlecode.com/files/ibus-" + version ".tar.gz")) + (sha256 + (base32 + "1v4a9xv2k26g6ggk4282ynfvh68j2r5hg1cdpvnryfa8c2pkdaq2")))) + (build-system glib-or-gtk-build-system) + (arguments + `(#:tests? #f ; tests fail because there's no connection to dbus + #:make-flags + (list "CC=gcc" + (string-append "pyoverridesdir=" + (assoc-ref %outputs "out") + "/lib/python2.7/site-packages/gi/overrides/")) + #:phases + (alist-cons-before + 'configure 'disable-dconf-update + (lambda _ + (substitute* "data/dconf/Makefile.in" + (("dconf update") "echo dconf update")) + #t) + (alist-cons-after + 'wrap-program 'wrap-with-additional-paths + (lambda* (#:key outputs #:allow-other-keys) + ;; Make sure 'ibus-setup' runs with the correct PYTHONPATH and + ;; GI_TYPELIB_PATH. + (let ((out (assoc-ref outputs "out"))) + (wrap-program (string-append out "/bin/ibus-setup") + `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))) + `("GI_TYPELIB_PATH" ":" prefix + (,(getenv "GI_TYPELIB_PATH") + ,(string-append out "/lib/girepository-1.0")))))) + %standard-phases)))) + (inputs + `(("dbus" ,dbus) + ("dconf" ,dconf) + ("gconf" ,gconf) + ("gtk2" ,gtk+-2) + ("intltool" ,intltool) + ("libnotify" ,libnotify) + ("iso-codes" ,iso-codes) + ("pygobject2" ,python2-pygobject) + ("python2" ,python-2))) + (native-inputs + `(("glib" ,glib "bin") ; for glib-genmarshal + ("gobject-introspection" ,gobject-introspection) ; for g-ir-compiler + ("pkg-config" ,pkg-config))) + (synopsis "Input method framework") + (description + "IBus is an input framework providing a full-featured and user-friendly +input method user interface. It comes with multilingual input support. It +may also simplify input method development.") + (home-page "http://ibus.googlecode.com/") + (license lgpl2.1+))) diff --git a/gnu/packages/icu4c.scm b/gnu/packages/icu4c.scm index a575e91c8c..a753a22b20 100644 --- a/gnu/packages/icu4c.scm +++ b/gnu/packages/icu4c.scm @@ -28,7 +28,7 @@ (define-public icu4c (package (name "icu4c") - (version "54.1") + (version "55.1") (source (origin (method url-fetch) (uri (string-append "http://download.icu-project.org/files/icu4c/" @@ -37,7 +37,7 @@ (string-map (lambda (x) (if (char=? x #\.) #\_ x)) version) "-src.tgz")) (sha256 - (base32 "1cwapgjmvrcv1n2wjspj3vahidg596gjfp4jn1gcb4baralcjayl")))) + (base32 "0ys5f5spizg45qlaa31j2lhgry0jka2gfha527n4ndfxxz5j4sz1")))) (build-system gnu-build-system) (inputs `(("perl" ,perl))) diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm index 11cb63a895..89590cc5ad 100644 --- a/gnu/packages/image.scm +++ b/gnu/packages/image.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> -;;; Copyright © 2014 Alex Kost <alezost@gmail.com> +;;; Copyright © 2014, 2015 Alex Kost <alezost@gmail.com> ;;; Copyright © 2014 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com> ;;; Copyright © 2014 John Darrington <jmd@gnu.org> @@ -24,11 +24,13 @@ (define-module (gnu packages image) #:use-module (gnu packages) #:use-module (gnu packages algebra) + #:use-module (gnu packages autotools) #:use-module (gnu packages boost) #:use-module (gnu packages compression) #:use-module (gnu packages doxygen) #:use-module (gnu packages fontutils) #:use-module (gnu packages ghostscript) + #:use-module (gnu packages gl) #:use-module (gnu packages maths) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) @@ -163,6 +165,65 @@ the W3C's XML-based Scaleable Vector Graphic (SVG) format.") ;; 'COPYING' is the GPLv2, but file headers say LGPLv2.0+. (license license:lgpl2.0+))) +(define-public leptonica + (package + (name "leptonica") + (version "1.71") + (source + (origin + (method url-fetch) + (uri (string-append "http://www.leptonica.com/source/leptonica-" + version ".tar.gz")) + (sha256 + (base32 "0j5qgrff6im5n9waflbi7w643q1p6mahyf2z35gb4vj9h5p76pfc")) + (modules '((guix build utils))) + ;; zlib and openjpg should be under Libs, not Libs.private. See: + ;; https://code.google.com/p/tesseract-ocr/issues/detail?id=1436 + (snippet + '(substitute* "lept.pc.in" + (("^(Libs\\.private: .*)@ZLIB_LIBS@(.*)" all pre post) + (string-append pre post)) + (("^(Libs\\.private: .*)@JPEG_LIBS@(.*)" all pre post) + (string-append pre post)) + (("^Libs: .*" all) + (string-append all " @ZLIB_LIBS@ @JPEG_LIBS@")))))) + (build-system gnu-build-system) + (native-inputs + `(("gnuplot" ,gnuplot))) ;needed for test suite + (inputs + `(("giflib" ,giflib) + ("libjpeg" ,libjpeg) + ("libpng" ,libpng) + ("libtiff" ,libtiff) + ("libwebp" ,libwebp))) + (propagated-inputs + `(("openjpeg" ,openjpeg) + ("zlib" ,zlib))) + (arguments + '(#:phases + (modify-phases %standard-phases + ;; Prevent make from trying to regenerate config.h.in. + (add-after + 'unpack 'set-config-h-in-file-time + (lambda _ + (set-file-time "config/config.h.in" (stat "configure")))) + (add-after + 'unpack 'patch-reg-wrapper + (lambda _ + (substitute* "prog/reg_wrapper.sh" + ((" /bin/sh ") + (string-append " " (which "sh") " ")))))))) + (home-page "http://www.leptonica.com/") + (synopsis "Library and tools for image processing and analysis") + (description + "Leptonica is a C library and set of command-line tools for efficient +image processing and image analysis operations. It supports rasterop, affine +transformations, binary and grayscale morphology, rank order, and convolution, +seedfill and connected components, image transformations combining changes in +scale and pixel depth, and pixelwise masking, blending, enhancement, and +arithmetic ops.") + (license license:bsd-2))) + (define-public jbig2dec (package (name "jbig2dec") @@ -323,25 +384,16 @@ compose, and analyze GIF images.") (define-public imlib2 (package (name "imlib2") - (version "1.4.6") + (version "1.4.7") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/enlightenment/imlib2-" - version ".tar.gz")) + version ".tar.bz2")) (sha256 (base32 - "0kjggg4gfn6chi8v1xddd5qwk1fbnl7rvd93qiclv5v11s615k0p")))) + "00a7jbwj10x3jcvxa5rplnkvhv35gv9rb400zy636zdd4g737mrm")))) (build-system gnu-build-system) - (arguments - '(;; Will be fixed in the next release: - ;; <http://git.enlightenment.org/legacy/imlib2.git/commit/?id=5dde234b2d3caf067ea827858c53adc5d4c56c13>. - #:phases (alist-cons-before - 'configure 'patch-config - (lambda _ - (substitute* "imlib2-config.in" - (("@my_libs@") ""))) - %standard-phases))) (native-inputs `(("pkgconfig" ,pkg-config))) (inputs @@ -475,3 +527,39 @@ algorithms and data structures. It is particularly strong for multi-dimensional image processing.") (license license:expat) (home-page "https://hci.iwr.uni-heidelberg.de/vigra"))) + +(define-public libwebp + (package + (name "libwebp") + (version "0.4.3") + (source + (origin + (method url-fetch) + (uri (string-append + "http://downloads.webmproject.org/releases/webp/libwebp-" version + ".tar.gz")) + (sha256 + (base32 "1i4hfczjm3b1qj1g4cc9hgb69l47f3nkgf6hk7nz4dm9zmc0vgpg")))) + (build-system gnu-build-system) + (inputs + `(("freeglut" ,freeglut) + ("giflib" ,giflib) + ("libjpeg" ,libjpeg) + ("libpng" ,libpng) + ("libtiff" ,libtiff))) + (arguments + '(#:configure-flags '("--enable-libwebpmux" + "--enable-libwebpdemux" + "--enable-libwebpdecoder"))) + (home-page "https://developers.google.com/speed/webp/") + (synopsis "Lossless and lossy image compression") + (description + "WebP is a new image format that provides lossless and lossy compression +for images. WebP lossless images are 26% smaller in size compared to +PNGs. WebP lossy images are 25-34% smaller in size compared to JPEG images at +equivalent SSIM index. WebP supports lossless transparency (also known as +alpha channel) with just 22% additional bytes. Transparency is also supported +with lossy compression and typically provides 3x smaller file sizes compared +to PNG when lossy compression is acceptable for the red/green/blue color +channels.") + (license license:bsd-3))) diff --git a/gnu/packages/imagemagick.scm b/gnu/packages/imagemagick.scm index 0144212b3e..ab663b5a41 100644 --- a/gnu/packages/imagemagick.scm +++ b/gnu/packages/imagemagick.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -19,6 +20,7 @@ (define-module (gnu packages imagemagick) #:use-module (guix packages) #:use-module (guix build-system gnu) + #:use-module (guix build-system perl) #:use-module (guix download) #:use-module ((guix licenses) #:select (fsf-free)) #:use-module (gnu packages algebra) @@ -90,3 +92,47 @@ and TIFF. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.") (license (fsf-free "http://www.imagemagick.org/script/license.php")))) + +(define-public perl-image-magick + (package + (name "perl-image-magick") + (version "6.89") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/J/JC/JCRISTY/" + "PerlMagick-" version "-1.tar.gz")) + (sha256 + (base32 + "0n9afy1z5bhf9phrbahnkwhgcmijn8jggpbzwrivw1zhliliiy68")))) + (build-system perl-build-system) + (native-inputs `(("pkg-config" ,pkg-config))) + (inputs `(("imagemagick" ,imagemagick))) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before + 'configure 'image-magick-flags + (lambda* (#:key inputs #:allow-other-keys) + (let ((im (assoc-ref inputs "imagemagick"))) + (substitute* "Makefile.PL" + (("my \\$INC_magick = .*") + "my $INC_magick = `pkg-config --cflags ImageMagick`;\n") + (("my \\$LIBS_magick = .*") + "my $LIBS_magick = `pkg-config --libs ImageMagick`;\n"))))) + (add-before + 'check 'skip-mpeg-tests + (lambda _ + ;; TODO: MPEG tests fail even though our imagemagick supports + ;; MPEG. Has been reported elsewhere, + ;; http://www.imagemagick.org/discourse-server/viewtopic.php?f=7&t=25036, + ;; so skip for now. + (delete-file "t/mpeg/read.t")))))) + (home-page "http://search.cpan.org/dist/PerlMagick") + (synopsis "Perl interface to ImageMagick") + (description "This Perl extension allows the reading, manipulation and +writing of a large number of image file formats using the ImageMagick library. +Use it to create, edit, compose, or convert bitmap images from within a Perl +script.") + ;; See Magick.pm + (license (package-license imagemagick)))) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 29f628ca38..ea8de9e2cf 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -20,6 +20,7 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix utils) #:use-module (guix build-system gnu) #:use-module (gnu packages) #:use-module (gnu packages attr) @@ -32,6 +33,7 @@ #:use-module (gnu packages fontutils) #:use-module (gnu packages gawk) #:use-module (gnu packages gcc) + #:use-module (gnu packages gl) #:use-module (gnu packages gnuzilla) ;nss #:use-module (gnu packages ghostscript) ;lcms #:use-module (gnu packages gnome) @@ -45,7 +47,90 @@ #:use-module (gnu packages xml) #:use-module (gnu packages xorg) #:use-module (gnu packages zip) - #:use-module (gnu packages texinfo)) + #:use-module (gnu packages texinfo) + #:use-module ((srfi srfi-1) #:select (fold alist-delete))) + +(define-public swt + (package + (name "swt") + (version "4.4.2") + (source (origin + (method url-fetch) + (uri (string-append + "http://ftp-stud.fht-esslingen.de/pub/Mirrors/" + "eclipse/eclipse/downloads/drops4/R-" version + "-201502041700/swt-" version "-gtk-linux-x86.zip")) + (sha256 + (base32 + "0lzyqr8k2zm5s8fmnrx5kxpslxfs0i73y26fwfms483x45izzwj8")))) + (build-system gnu-build-system) + (arguments + `(#:make-flags '("-f" "make_linux.mak") + #:tests? #f ; no "check" target + #:phases + (alist-replace + 'unpack + (lambda _ + (and (mkdir "swt") + (zero? (system* "unzip" (assoc-ref %build-inputs "source") "-d" "swt")) + (chdir "swt") + (mkdir "src") + (zero? (system* "unzip" "src.zip" "-d" "src")) + (chdir "src"))) + (alist-replace + 'build + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((lib (string-append (assoc-ref outputs "out") "/lib"))) + (setenv "JAVA_HOME" (assoc-ref inputs "icedtea6")) + + ;; Build shared libraries. Users of SWT have to set the system + ;; property swt.library.path to the "lib" directory of this + ;; package output. + (mkdir-p lib) + (setenv "OUTPUT_DIR" lib) + (zero? (system* "bash" "build.sh")) + + ;; build jar + (mkdir "build") + (for-each (lambda (file) + (format #t "Compiling ~s\n" file) + (system* "javac" "-d" "build" file)) + (find-files "." "\\.java")) + (zero? (system* "jar" "cvf" "swt.jar" "-C" "build" ".")))) + (alist-cons-after + 'install 'install-java-files + (lambda* (#:key outputs #:allow-other-keys) + (let ((java (string-append (assoc-ref outputs "out") + "/share/java"))) + (mkdir-p java) + (copy-file "swt.jar" (string-append java "/swt.jar"))) #t) + (alist-delete 'configure %standard-phases)))))) + (inputs + `(("xulrunner" ,icecat) + ("gtk" ,gtk+-2) + ("libxtst" ,libxtst) + ("libxt" ,libxt) + ("mesa" ,mesa) + ("glu" ,glu))) + (native-inputs + `(("pkg-config" ,pkg-config) + ("unzip" ,unzip) + ("icedtea6" ,icedtea6 "jdk"))) + (home-page "https://www.eclipse.org/swt/") + (synopsis "Widget toolkit for Java") + (description + "SWT is a widget toolkit for Java designed to provide efficient, portable +access to the user-interface facilities of the operating systems on which it +is implemented.") + ;; SWT code is licensed under EPL1.0 + ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1 + ;; Cairo bindings contain code under MPL1.1 + ;; XULRunner 1.9 bindings contain code under MPL2.0 + (license (list + license:epl1.0 + license:mpl1.1 + license:mpl2.0 + license:lgpl2.1+)))) (define-public ant (package @@ -102,7 +187,7 @@ build process and its dependencies, whereas Make uses Makefile format.") (define-public icedtea6 (package (name "icedtea6") - (version "1.13.6") + (version "1.13.7") (source (origin (method url-fetch) (uri (string-append @@ -110,7 +195,7 @@ build process and its dependencies, whereas Make uses Makefile format.") version ".tar.xz")) (sha256 (base32 - "16ac3f7kkln5skg202vllagkhjxrwd47h56diwzhfidhwjlz7410")) + "0fqq898h0mk554mya5z4j9p4x6sg2qj0ckqzx65x49zcjjp69jm5")) (modules '((guix build utils))) (snippet '(substitute* "Makefile.in" @@ -160,6 +245,16 @@ build process and its dependencies, whereas Make uses Makefile format.") ;; made no attempts to make a list of failing JDK tests. At least ;; 222 tests are failing of which at least 132 are AWT tests. #:tests? #f + + ;; The DSOs use $ORIGIN to refer to each other, but (guix build + ;; gremlin) doesn't support it yet, so skip this phase. + #:validate-runpath? #f + + #:modules ((guix build utils) + (guix build gnu-build-system) + (ice-9 popen) + (ice-9 rdelim)) + #:configure-flags (let* ((gcjdir (assoc-ref %build-inputs "gcj")) (ecj (string-append gcjdir "/share/java/ecj.jar")) @@ -184,6 +279,7 @@ build process and its dependencies, whereas Make uses Makefile format.") (zero? (system* "tar" "xvjf" (assoc-ref inputs "ant-bootstrap"))) (begin + (patch-shebang "apache-ant-1.9.4/bin/ant") (chdir (string-append ,name "-" ,version)) (mkdir "openjdk") (with-directory-excursion "openjdk" @@ -191,10 +287,8 @@ build process and its dependencies, whereas Make uses Makefile format.") "openjdk6-src.tar.xz") (zero? (system* "tar" "xvf" "openjdk6-src.tar.xz")))))) (alist-cons-after - 'unpack 'patch-paths + 'unpack 'patch-patches (lambda _ - (patch-shebang "../apache-ant-1.9.4/bin/ant") - ;; shebang in patches so that they apply cleanly (substitute* '("patches/jtreg-jrunscript.patch" "patches/hotspot/hs23/drop_unlicensed_test.patch") @@ -205,92 +299,100 @@ build process and its dependencies, whereas Make uses Makefile format.") (("ALSA_INCLUDE=/usr/include/alsa/version.h") (string-append "ALSA_INCLUDE=" (assoc-ref %build-inputs "alsa-lib") - "/include/alsa/version.h"))) + "/include/alsa/version.h")))) + (alist-cons-after + 'unpack 'patch-paths + (lambda _ + ;; buildtree.make generates shell scripts, so we need to replace + ;; the generated shebang + (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make") + (("/bin/sh") (which "bash"))) - ;; buildtree.make generates shell scripts, so we need to replace - ;; the generated shebang - (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make") - (("/bin/sh") (which "bash"))) + (let ((corebin (string-append + (assoc-ref %build-inputs "coreutils") "/bin/")) + (binbin (string-append + (assoc-ref %build-inputs "binutils") "/bin/")) + (grepbin (string-append + (assoc-ref %build-inputs "grep") "/bin/"))) + (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk" + "openjdk/corba/make/common/shared/Defs-linux.gmk") + (("UNIXCOMMAND_PATH = /bin/") + (string-append "UNIXCOMMAND_PATH = " corebin)) + (("USRBIN_PATH = /usr/bin/") + (string-append "USRBIN_PATH = " corebin)) + (("DEVTOOLS_PATH *= */usr/bin/") + (string-append "DEVTOOLS_PATH = " corebin)) + (("COMPILER_PATH *= */usr/bin/") + (string-append "COMPILER_PATH = " + (assoc-ref %build-inputs "gcc") "/bin/")) + (("DEF_OBJCOPY *=.*objcopy") + (string-append "DEF_OBJCOPY = " (which "objcopy")))) - (let ((corebin (string-append - (assoc-ref %build-inputs "coreutils") "/bin/")) - (binbin (string-append - (assoc-ref %build-inputs "binutils") "/bin/")) - (grepbin (string-append - (assoc-ref %build-inputs "grep") "/bin/"))) - (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk" - "openjdk/corba/make/common/shared/Defs-linux.gmk") - (("UNIXCOMMAND_PATH = /bin/") - (string-append "UNIXCOMMAND_PATH = " corebin)) - (("USRBIN_PATH = /usr/bin/") - (string-append "USRBIN_PATH = " corebin)) - (("DEVTOOLS_PATH *= */usr/bin/") - (string-append "DEVTOOLS_PATH = " corebin)) - (("COMPILER_PATH *= */usr/bin/") - (string-append "COMPILER_PATH = " - (assoc-ref %build-inputs "gcc") "/bin/"))) + ;; fix hard-coded utility paths + (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk" + "openjdk/corba/make/common/shared/Defs-utils.gmk") + (("ECHO *=.*echo") + (string-append "ECHO = " (which "echo"))) + (("^GREP *=.*grep") + (string-append "GREP = " (which "grep"))) + (("EGREP *=.*egrep") + (string-append "EGREP = " (which "egrep"))) + (("CPIO *=.*cpio") + (string-append "CPIO = " (which "cpio"))) + (("READELF *=.*readelf") + (string-append "READELF = " (which "readelf"))) + (("^ *AR *=.*ar") + (string-append "AR = " (which "ar"))) + (("^ *TAR *=.*tar") + (string-append "TAR = " (which "tar"))) + (("AS *=.*as") + (string-append "AS = " (which "as"))) + (("LD *=.*ld") + (string-append "LD = " (which "ld"))) + (("STRIP *=.*strip") + (string-append "STRIP = " (which "strip"))) + (("NM *=.*nm") + (string-append "NM = " (which "nm"))) + (("^SH *=.*sh") + (string-append "SH = " (which "bash"))) + (("^FIND *=.*find") + (string-append "FIND = " (which "find"))) + (("LDD *=.*ldd") + (string-append "LDD = " (which "ldd"))) + (("NAWK *=.*(n|g)awk") + (string-append "NAWK = " (which "gawk"))) + (("XARGS *=.*xargs") + (string-append "XARGS = " (which "xargs"))) + (("UNZIP *=.*unzip") + (string-append "UNZIP = " (which "unzip"))) + (("ZIPEXE *=.*zip") + (string-append "ZIPEXE = " (which "zip"))) + (("SED *=.*sed") + (string-append "SED = " (which "sed")))) - ;; fix hard-coded utility paths - (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk" - "openjdk/corba/make/common/shared/Defs-utils.gmk") - (("ECHO *=.*echo") - (string-append "ECHO = " (which "echo"))) - (("^GREP *=.*grep") - (string-append "GREP = " (which "grep"))) - (("EGREP *=.*egrep") - (string-append "EGREP = " (which "egrep"))) - (("CPIO *=.*cpio") - (string-append "CPIO = " (which "cpio"))) - (("READELF *=.*readelf") - (string-append "READELF = " (which "readelf"))) - (("^ *AR *=.*ar") - (string-append "AR = " (which "ar"))) - (("^ *TAR *=.*tar") - (string-append "TAR = " (which "tar"))) - (("AS *=.*as") - (string-append "AS = " (which "as"))) - (("LD *=.*ld") - (string-append "LD = " (which "ld"))) - (("STRIP *=.*strip") - (string-append "STRIP = " (which "strip"))) - (("NM *=.*nm") - (string-append "NM = " (which "nm"))) - (("^SH *=.*sh") - (string-append "SH = " (which "bash"))) - (("^FIND *=.*find") - (string-append "FIND = " (which "find"))) - (("LDD *=.*ldd") - (string-append "LDD = " (which "ldd"))) - (("NAWK *=.*(n|g)awk") - (string-append "NAWK = " (which "gawk"))) - ;; (("NAWK *=.*gawk") - ;; (string-append "NAWK = " (which "gawk"))) - (("XARGS *=.*xargs") - (string-append "XARGS = " (which "xargs"))) - (("UNZIP *=.*unzip") - (string-append "UNZIP = " (which "unzip"))) - (("ZIPEXE *=.*zip") - (string-append "ZIPEXE = " (which "zip"))) - (("SED *=.*sed") - (string-append "SED = " (which "sed")))) - - ;; Some of these timestamps cause problems as they are more than - ;; 10 years ago, failing the build process. - (substitute* - "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties" - (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN") - (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN") - (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON") - (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))) + ;; Some of these timestamps cause problems as they are more than + ;; 10 years ago, failing the build process. + (substitute* + "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties" + (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN") + (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN") + (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON") + (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))) (alist-cons-before - 'configure 'set-paths + 'configure 'set-additional-paths (lambda* (#:key inputs #:allow-other-keys) (let* ((gcjdir (assoc-ref %build-inputs "gcj")) (gcjlib (string-append gcjdir "/lib")) - (antpath (string-append (getcwd) "/../apache-ant-1.9.4"))) - (setenv "CC" (which "gcc")) + (antpath (string-append (getcwd) "/../apache-ant-1.9.4")) + ;; Get target-specific include directory so that + ;; libgcj-config.h is found when compiling hotspot. + (gcjinclude (let* ((port (open-input-pipe "gcj -print-file-name=include")) + (str (read-line port))) + (close-pipe port) + str))) (setenv "CPATH" - (string-append (assoc-ref %build-inputs "libxrender") + (string-append gcjinclude ":" + (assoc-ref %build-inputs "libxrender") "/include/X11/extensions" ":" (assoc-ref %build-inputs "libxtst") "/include/X11/extensions" ":" @@ -306,12 +408,10 @@ build process and its dependencies, whereas Make uses Makefile format.") (setenv "ALT_FREETYPE_LIB_PATH" (string-append (assoc-ref %build-inputs "freetype") "/lib")) - (setenv "LD_LIBRARY_PATH" - (string-append antpath "/lib" ":" gcjlib)) (setenv "PATH" (string-append antpath "/bin:" (getenv "PATH"))))) (alist-cons-before - 'check 'fix-tests + 'check 'fix-test-framework (lambda _ ;; Fix PATH in test environment (substitute* "src/jtreg/com/sun/javatest/regtest/Main.java" @@ -319,109 +419,114 @@ build process and its dependencies, whereas Make uses Makefile format.") (string-append "PATH=" (getenv "PATH")))) (substitute* "src/jtreg/com/sun/javatest/util/SysEnv.java" (("/usr/bin/env") (which "env"))) - - ;; Hotspot tests - (with-directory-excursion "openjdk/hotspot/test/" - (substitute* "jprt.config" - (("PATH=\"\\$\\{path4sdk\\}\"") - (string-append "PATH=" (getenv "PATH"))) - (("make=/usr/bin/make") - (string-append "make=" (which "make")))) - (substitute* '("runtime/6626217/Test6626217.sh" - "runtime/7110720/Test7110720.sh") - (("/bin/rm") (which "rm")) - (("/bin/cp") (which "cp")) - (("/bin/mv") (which "mv")))) - - ;; JDK tests - (with-directory-excursion "openjdk/jdk/test/" - (substitute* "com/sun/jdi/JdbReadTwiceTest.sh" - (("/bin/pwd") (which "pwd"))) - (substitute* "com/sun/jdi/ShellScaffold.sh" - (("/bin/kill") (which "kill"))) - (substitute* "start-Xvfb.sh" - ;(("/usr/bin/X11/Xvfb") (which "Xvfb")) - (("/usr/bin/nohup") (which "nohup"))) - (substitute* "javax/security/auth/Subject/doAs/Test.sh" - (("/bin/rm") (which "rm"))) - (substitute* "tools/launcher/MultipleJRE.sh" - (("echo \"#!/bin/sh\"") - (string-append "echo \"#!" (which "rm") "\"")) - (("/usr/bin/zip") (which "zip"))) - (substitute* "com/sun/jdi/OnThrowTest.java" - (("#!/bin/sh") (string-append "#!" (which "sh")))) - (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java" - (("/usr/bin/uptime") (which "uptime"))) - (substitute* "java/lang/ProcessBuilder/Basic.java" - (("/usr/bin/env") (which "env")) - (("/bin/false") (which "false")) - (("/bin/true") (which "true")) - (("/bin/cp") (which "cp")) - (("/bin/sh") (which "sh"))) - (substitute* "java/lang/ProcessBuilder/FeelingLucky.java" - (("/bin/sh") (which "sh"))) - (substitute* "java/lang/ProcessBuilder/Zombies.java" - (("/usr/bin/perl") (which "perl")) - (("/bin/ps") (which "ps")) - (("/bin/true") (which "true"))) - (substitute* "java/lang/Runtime/exec/ConcurrentRead.java" - (("/usr/bin/tee") (which "tee"))) - (substitute* "java/lang/Runtime/exec/ExecWithDir.java" - (("/bin/true") (which "true"))) - (substitute* "java/lang/Runtime/exec/ExecWithInput.java" - (("/bin/cat") (which "cat"))) - (substitute* "java/lang/Runtime/exec/ExitValue.java" - (("/bin/sh") (which "sh")) - (("/bin/true") (which "true")) - (("/bin/kill") (which "kill"))) - (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java" - (("/usr/bin/echo") (which "echo"))) - (substitute* "java/lang/Runtime/exec/LotsOfOutput.java" - (("/usr/bin/cat") (which "cat"))) - (substitute* "java/lang/Runtime/exec/SleepyCat.java" - (("/bin/cat") (which "cat")) - (("/bin/sleep") (which "sleep")) - (("/bin/sh") (which "sh"))) - (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java" - (("/bin/cat") (which "cat"))) - (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java" - (("/bin/chmod") (which "chmod"))) - (substitute* "java/util/zip/ZipFile/Assortment.java" - (("/bin/sh") (which "sh"))))) - (alist-replace - 'check + #t) + (alist-cons-before + 'check 'fix-hotspot-tests (lambda _ - ;; The "make check-*" targets always return zero, so we need to - ;; check for errors in the associated log files to determine - ;; whether any tests have failed. - (use-modules (ice-9 rdelim)) - (let* ((error-pattern (make-regexp "^(Error|FAILED):.*")) - (checker (lambda (port) - (let loop () - (let ((line (read-line port))) - (cond - ((eof-object? line) #t) - ((regexp-exec error-pattern line) #f) - (else (loop))))))) - (run-test (lambda (test) - (system* "make" test) - (call-with-input-file - (string-append "test/" test ".log") - checker)))) - (or #t ; skip tests - (and (run-test "check-hotspot") - (run-test "check-langtools") - (run-test "check-jdk"))))) - (alist-replace - 'install - (lambda* (#:key outputs #:allow-other-keys) - (let ((doc (string-append (assoc-ref outputs "doc") "/share/doc/" ,name)) - (jre (assoc-ref outputs "out")) - (jdk (assoc-ref outputs "jdk"))) - (copy-recursively "openjdk.build/docs" doc) - (copy-recursively "openjdk.build/j2re-image" jre) - (copy-recursively "openjdk.build/j2sdk-image" jdk))) - %standard-phases)))))))) + (with-directory-excursion "openjdk/hotspot/test/" + (substitute* "jprt.config" + (("PATH=\"\\$\\{path4sdk\\}\"") + (string-append "PATH=" (getenv "PATH"))) + (("make=/usr/bin/make") + (string-append "make=" (which "make")))) + (substitute* '("runtime/6626217/Test6626217.sh" + "runtime/7110720/Test7110720.sh") + (("/bin/rm") (which "rm")) + (("/bin/cp") (which "cp")) + (("/bin/mv") (which "mv")))) + #t) + (alist-cons-before + 'check 'fix-jdk-tests + (lambda _ + (with-directory-excursion "openjdk/jdk/test/" + (substitute* "com/sun/jdi/JdbReadTwiceTest.sh" + (("/bin/pwd") (which "pwd"))) + (substitute* "com/sun/jdi/ShellScaffold.sh" + (("/bin/kill") (which "kill"))) + (substitute* "start-Xvfb.sh" + ;;(("/usr/bin/X11/Xvfb") (which "Xvfb")) + (("/usr/bin/nohup") (which "nohup"))) + (substitute* "javax/security/auth/Subject/doAs/Test.sh" + (("/bin/rm") (which "rm"))) + (substitute* "tools/launcher/MultipleJRE.sh" + (("echo \"#!/bin/sh\"") + (string-append "echo \"#!" (which "rm") "\"")) + (("/usr/bin/zip") (which "zip"))) + (substitute* "com/sun/jdi/OnThrowTest.java" + (("#!/bin/sh") (string-append "#!" (which "sh")))) + (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java" + (("/usr/bin/uptime") (which "uptime"))) + (substitute* "java/lang/ProcessBuilder/Basic.java" + (("/usr/bin/env") (which "env")) + (("/bin/false") (which "false")) + (("/bin/true") (which "true")) + (("/bin/cp") (which "cp")) + (("/bin/sh") (which "sh"))) + (substitute* "java/lang/ProcessBuilder/FeelingLucky.java" + (("/bin/sh") (which "sh"))) + (substitute* "java/lang/ProcessBuilder/Zombies.java" + (("/usr/bin/perl") (which "perl")) + (("/bin/ps") (which "ps")) + (("/bin/true") (which "true"))) + (substitute* "java/lang/Runtime/exec/ConcurrentRead.java" + (("/usr/bin/tee") (which "tee"))) + (substitute* "java/lang/Runtime/exec/ExecWithDir.java" + (("/bin/true") (which "true"))) + (substitute* "java/lang/Runtime/exec/ExecWithInput.java" + (("/bin/cat") (which "cat"))) + (substitute* "java/lang/Runtime/exec/ExitValue.java" + (("/bin/sh") (which "sh")) + (("/bin/true") (which "true")) + (("/bin/kill") (which "kill"))) + (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java" + (("/usr/bin/echo") (which "echo"))) + (substitute* "java/lang/Runtime/exec/LotsOfOutput.java" + (("/usr/bin/cat") (which "cat"))) + (substitute* "java/lang/Runtime/exec/SleepyCat.java" + (("/bin/cat") (which "cat")) + (("/bin/sleep") (which "sleep")) + (("/bin/sh") (which "sh"))) + (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java" + (("/bin/cat") (which "cat"))) + (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java" + (("/bin/chmod") (which "chmod"))) + (substitute* "java/util/zip/ZipFile/Assortment.java" + (("/bin/sh") (which "sh")))) + #t) + (alist-replace + 'check + (lambda _ + ;; The "make check-*" targets always return zero, so we need to + ;; check for errors in the associated log files to determine + ;; whether any tests have failed. + (use-modules (ice-9 rdelim)) + (let* ((error-pattern (make-regexp "^(Error|FAILED):.*")) + (checker (lambda (port) + (let loop () + (let ((line (read-line port))) + (cond + ((eof-object? line) #t) + ((regexp-exec error-pattern line) #f) + (else (loop))))))) + (run-test (lambda (test) + (system* "make" test) + (call-with-input-file + (string-append "test/" test ".log") + checker)))) + (or #t ; skip tests + (and (run-test "check-hotspot") + (run-test "check-langtools") + (run-test "check-jdk"))))) + (alist-replace + 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((doc (string-append (assoc-ref outputs "doc") "/share/doc/" ,name)) + (jre (assoc-ref outputs "out")) + (jdk (assoc-ref outputs "jdk"))) + (copy-recursively "openjdk.build/docs" doc) + (copy-recursively "openjdk.build/j2re-image" jre) + (copy-recursively "openjdk.build/j2sdk-image" jdk))) + %standard-phases))))))))))) (native-inputs `(("ant-bootstrap" ,(origin @@ -464,10 +569,10 @@ build process and its dependencies, whereas Make uses Makefile format.") ("openjdk6-src" ,(origin (method url-fetch) - (uri "https://java.net/downloads/openjdk6/openjdk-6-src-b34-20_jan_2015.tar.xz") + (uri "https://java.net/downloads/openjdk6/openjdk-6-src-b35-14_apr_2015.tar.gz") (sha256 (base32 - "0lafxvi255r22pjljkj9x6liacqdgin8smdmh6nzkdjjw7hv9l8k")))) + "05glw29vy4yw9rkjy9y8wg6ybzi89gjwi19qpnfda978x02r2x5p")))) ("lcms" ,lcms) ("zlib" ,zlib) ("gtk" ,gtk+-2) @@ -481,3 +586,174 @@ build process and its dependencies, whereas Make uses Makefile format.") ;; IcedTea is released under the GPL2 + Classpath exception, which is the ;; same license as both GNU Classpath and OpenJDK. (license license:gpl2+))) + +(define-public icedtea7 + (let* ((version "2.5.5") + (drop (lambda (name hash) + (origin + (method url-fetch) + (uri (string-append + "http://icedtea.classpath.org/download/drops/" + "/icedtea7/" version "/" name ".tar.bz2")) + (sha256 (base32 hash)))))) + (package (inherit icedtea6) + (name "icedtea7") + (version version) + (source (origin + (method url-fetch) + (uri (string-append + "http://icedtea.wildebeest.org/download/source/icedtea-" + version ".tar.xz")) + (sha256 + (base32 + "1irxk2ndwsfk4c1zbzb5h3rpwv2bc9bhfjvz6p4dws5476vsxrq9")) + (modules '((guix build utils))) + (snippet + '(substitute* "Makefile.in" + ;; do not leak information about the build host + (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"") + "DISTRIBUTION_ID=\"\\\"guix\\\"\""))))) + (arguments + `(;; There are many test failures. Some are known to + ;; fail upstream, others relate to not having an X + ;; server running at test time, yet others are a + ;; complete mystery to me. + + ;; hotspot: passed: 241; failed: 45; error: 2 + ;; langtools: passed: 1,934; failed: 26 + ;; jdk: unknown + #:tests? #f + ;; Apparently, the C locale is needed for some of the tests. + #:locale "C" + ,@(substitute-keyword-arguments (package-arguments icedtea6) + ((#:configure-flags flags) + `(let ((jdk (assoc-ref %build-inputs "icedtea6")) + (ant (assoc-ref %build-inputs "ant"))) + `("--disable-bootstrap" + "--without-rhino" + "--enable-nss" + "--enable-system-lcms" + "--disable-downloading" + ,(string-append "--with-ant-home=" ant) + ,(string-append "--with-jdk-home=" jdk)))) + ((#:phases phases) + `(modify-phases ,phases + (replace + 'unpack + (lambda* (#:key source inputs #:allow-other-keys) + (let ((target (string-append "icedtea-" ,version)) + (unpack (lambda (drop dir) + (mkdir dir) + (zero? (system* "tar" "xvjf" + (assoc-ref inputs drop) + "-C" dir + "--strip-components=1"))))) + (and (zero? (system* "tar" "xvf" source)) + (chdir target) + (unpack "openjdk-drop" "openjdk") + (unpack "corba-drop" "openjdk/corba") + (unpack "jdk-drop" "openjdk/jdk") + (unpack "hotspot-drop" "openjdk/hotspot") + + ;; The build framework checks the tarballs, so we + ;; need to keep them around even though we have + ;; already unpacked some of them for patching. + (begin + (copy-file (assoc-ref inputs "openjdk-drop") + "openjdk.tar.bz2") + (copy-file (assoc-ref inputs "corba-drop") + "corba.tar.bz2") + (copy-file (assoc-ref inputs "hotspot-drop") + "hotspot.tar.bz2") + (copy-file (assoc-ref inputs "jaxp-drop") + "jaxp.tar.bz2") + (copy-file (assoc-ref inputs "jaxws-drop") + "jaxws.tar.bz2") + (copy-file (assoc-ref inputs "jdk-drop") + "jdk.tar.bz2") + (copy-file (assoc-ref inputs "langtools-drop") + "langtools.tar.bz2") + #t))))) + (replace + 'set-additional-paths + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk" + (("ALSA_INCLUDE=/usr/include/alsa/version.h") + (string-append "ALSA_INCLUDE=" + (assoc-ref inputs "alsa-lib") + "/include/alsa/version.h"))) + (setenv "CC" "gcc") + (setenv "CPATH" + (string-append (assoc-ref inputs "libxrender") + "/include/X11/extensions" ":" + (assoc-ref inputs "libxtst") + "/include/X11/extensions" ":" + (assoc-ref inputs "libxinerama") + "/include/X11/extensions" ":" + (or (getenv "CPATH") ""))) + (setenv "ALT_OBJCOPY" (which "objcopy")) + (setenv "ALT_CUPS_HEADERS_PATH" + (string-append (assoc-ref inputs "cups") + "/include")) + (setenv "ALT_FREETYPE_HEADERS_PATH" + (string-append (assoc-ref inputs "freetype") + "/include")) + (setenv "ALT_FREETYPE_LIB_PATH" + (string-append (assoc-ref inputs "freetype") + "/lib")))) + (add-after + 'unpack 'fix-x11-extension-include-path + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "openjdk/jdk/make/sun/awt/mawt.gmk" + (((string-append "\\$\\(firstword \\$\\(wildcard " + "\\$\\(OPENWIN_HOME\\)" + "/include/X11/extensions\\).*$")) + (string-append (assoc-ref inputs "libxrender") + "/include/X11/extensions" + " -I" (assoc-ref inputs "libxtst") + "/include/X11/extensions" + " -I" (assoc-ref inputs "libxinerama") + "/include/X11/extensions")) + (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") "")) + #t)) + (replace + 'fix-test-framework + (lambda _ + ;; Fix PATH in test environment + (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java" + (("PATH=/bin:/usr/bin") + (string-append "PATH=" (getenv "PATH")))) + (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java" + (("/usr/bin/env") (which "env"))) + (substitute* "openjdk/hotspot/test/test_env.sh" + (("/bin/rm") (which "rm")) + (("/bin/cp") (which "cp")) + (("/bin/mv") (which "mv"))) + #t)) + (delete 'patch-patches)))))) + (native-inputs + `(("ant" ,ant) + ("icedtea6" ,icedtea6 "jdk") + ("openjdk-drop" + ,(drop "openjdk" + "03gxqn17cxwl1nspnwigacaqd28p02d45f396j5f4kkbzfnbl0ak")) + ("corba-drop" + ,(drop "corba" + "0ldcckknn2f92jv1144cnn0z3wmvxln28wc00rc6xxblnjcnamzh")) + ("jaxp-drop" + ,(drop "jaxp" + "0mnjdziffcnyqlyvf8dw1hrl4kiiwmh8ia0ym417wgvnjpaihci9")) + ("jaxws-drop" + ,(drop "jaxws" + "1gkmypnhygx2mxhca3ngy620k993wi2cc1wysc0np06y1rkx1mkn")) + ("jdk-drop" + ,(drop "jdk" + "10x43mqjfn43jlckic0nyf7apyyjyr910cdmmvy41kvw8ljhvg61")) + ("langtools-drop" + ,(drop "langtools" + "0q5nqc14r6vmhxgikw3wgdcc0r9symp830v13isnv8qdjgm6kcki")) + ("hotspot-drop" + ,(drop "hotspot" + "1yqxfd2jwbm5y41wscyfx8h0fr3h8ny2g2mda5iwd8sikxsaj96p")) + ,@(fold alist-delete (package-native-inputs icedtea6) + '("openjdk6-src" "ant-bootstrap" "gcj"))))))) diff --git a/gnu/packages/jemalloc.scm b/gnu/packages/jemalloc.scm new file mode 100644 index 0000000000..8a25cb08b8 --- /dev/null +++ b/gnu/packages/jemalloc.scm @@ -0,0 +1,43 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (gnu packages jemalloc) + #:use-module ((guix licenses) #:select (bsd-2)) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu)) + +(define-public jemalloc + (package + (name "jemalloc") + (version "3.6.0") + (source (origin + (method url-fetch) + (uri (string-append + "http://www.canonware.com/download/jemalloc/" + name "-" version ".tar.bz2")) + (sha256 + (base32 + "1zl4vxxjvhg72bdl53sl0idz9wp18c6yzjdmqcnwm09wvmcj2v71")))) + (build-system gnu-build-system) + (home-page "http://www.canonware.com/jemalloc/") + (synopsis "General-purpose scalable concurrent malloc implementation") + (description + "This library providing a malloc(3) implementation that emphasizes +fragmentation avoidance and scalable concurrency support.") + (license bsd-2))) diff --git a/gnu/packages/julia.scm b/gnu/packages/julia.scm new file mode 100644 index 0000000000..c9428c4f12 --- /dev/null +++ b/gnu/packages/julia.scm @@ -0,0 +1,193 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (gnu packages julia) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu) + #:use-module (gnu packages) + #:use-module (gnu packages algebra) + #:use-module (gnu packages base) + #:use-module (gnu packages elf) + #:use-module (gnu packages gcc) + #:use-module (gnu packages llvm) + #:use-module (gnu packages libunwind) + #:use-module (gnu packages maths) + #:use-module (gnu packages multiprecision) ; mpfr + #:use-module (gnu packages pcre) + #:use-module (gnu packages perl) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages python) + #:use-module (gnu packages textutils) + #:use-module (gnu packages version-control) + #:use-module (ice-9 match)) + +(define-public julia + (package + (name "julia") + (version "0.3.6") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/JuliaLang/julia/releases/download/v" + version "/julia-" version "_0c24dca65c.tar.gz")) + (sha256 + (base32 + "1hnbc2blzr9bc27m3vsr127fhg0h5imgqlrx00jakf0my0ccw8gr")))) + (build-system gnu-build-system) + (arguments + `(#:test-target "test" + #:modules ((ice-9 match) + (guix build gnu-build-system) + (guix build utils)) + + + ;; The DSOs use $ORIGIN to refer to each other, but (guix build + ;; gremlin) doesn't support it yet, so skip this phase. + #:validate-runpath? #f + + #:phases + (alist-cons-after + 'unpack 'hardcode-soname-map + ;; ./src/ccall.cpp creates a map from library names to paths using the + ;; output of "/sbin/ldconfig -p". Since ldconfig is not used in Guix, + ;; we patch ccall.cpp to contain a static map. + (lambda* (#:key inputs #:allow-other-keys) + (use-modules (ice-9 match)) + (substitute* "src/ccall.cpp" + (("jl_read_sonames.*;") + (string-join + (map (match-lambda + ((input libname soname) + (string-append + "sonameMap[\"" libname "\"] = " + "\"" (assoc-ref inputs input) "/lib/" soname "\";"))) + '(("libc" "libc" "libc.so.6") + ("pcre" "libpcre" "libpcre.so") + ("mpfr" "libmpfr" "libmpfr.so") + ("openblas" "libblas" "libopenblas.so") + ("arpack-ng" "libarpack" "libarpack.so") + ("lapack" "liblapack" "liblapack.so") + ("gmp" "libgmp" "libgmp.so") + ("openlibm" "libopenlibm" "libopenlibm.so") + ("openspecfun" "libopenspecfun" "libopenspecfun.so") + ("fftw" "libfftw3" "libfftw3.so") + ("fftwf" "libfftw3f" "libfftw3f.so"))))))) + (alist-cons-before + 'build 'replace-default-shell + (lambda _ + (substitute* "base/client.jl" + (("/bin/sh") (which "sh")))) + (alist-cons-before + 'build 'patch-include-path + (lambda _ + (substitute* "deps/Makefile" + (("/usr/include/double-conversion") + (string-append (assoc-ref %build-inputs "double-conversion") + "/include/double-conversion")))) + (alist-cons-before + 'check 'disable-broken-test + ;; One test fails because it produces slightly different output. + (lambda _ + (substitute* "test/repl.jl" + (("@test output") "# @test output"))) + ;; no configure script + (alist-delete 'configure %standard-phases))))) + #:make-flags + (list + (string-append "prefix=" (assoc-ref %outputs "out")) + + ;; Passing the MARCH flag is necessary to build binary substitutes for + ;; the supported architectures. + ,(match (or (%current-target-system) + (%current-system)) + ("x86_64-linux" "MARCH=x86-64") + ("i686-linux" "MARCH=pentium4") + ;; Prevent errors when querying this package on unsupported + ;; platforms, e.g. when running "guix package --search=" + (_ "MARCH=UNSUPPORTED")) + + "CONFIG_SHELL=bash" ;needed to build bundled libraries + "USE_SYSTEM_LIBUV=0" ;Julia expects a modified libuv + "USE_SYSTEM_DSFMT=0" ;not packaged for Guix and upstream has no + ;build system for a shared library. + "USE_SYSTEM_RMATH=0" ;Julia uses a bundled version of R's math + ;library, patched to use the DSFMT RNG. + + "USE_SYSTEM_LAPACK=1" + "USE_SYSTEM_BLAS=1" + "USE_BLAS64=0" ;needed when USE_SYSTEM_BLAS=1 + + "USE_SYSTEM_FFTW=1" + "LIBFFTWNAME=libfftw3" + "LIBFFTWFNAME=libfftw3f" + + ;; TODO: Suitesparse does not install shared libraries, so we cannot + ;; use the suitesparse package. + ;; "USE_SYSTEM_SUITESPARSE=1" + ;; (string-append "SUITESPARSE_INC=-I " + ;; (assoc-ref %build-inputs "suitesparse") + ;; "/include") + + "USE_SYSTEM_GRISU=1" ;for double-conversion + "USE_SYSTEM_UTF8PROC=1" + "USE_SYSTEM_LLVM=1" + "USE_SYSTEM_LIBUNWIND=1" + "USE_SYSTEM_PCRE=1" + "USE_SYSTEM_OPENLIBM=1" + "USE_SYSTEM_GMP=1" + "USE_SYSTEM_MPFR=1" + "USE_SYSTEM_ARPACK=1" + "USE_SYSTEM_LIBGIT2=1" + "USE_SYSTEM_OPENSPECFUN=1"))) + (inputs + `(("llvm" ,llvm-3.5) + ("arpack-ng" ,arpack-ng) + ("lapack" ,lapack) + ("openblas" ,openblas) ;Julia does not build with Atlas + ("libunwind" ,libunwind) + ("openlibm" ,openlibm) + ("openspecfun" ,openspecfun) + ("double-conversion" ,double-conversion) + ("fftw" ,fftw) + ("fftwf" ,fftwf) + ("fortran" ,gfortran-4.8) + ("pcre" ,pcre) + ("utf8proc" ,utf8proc) + ("git" ,git) + ("mpfr" ,mpfr) + ("gmp" ,gmp))) + (native-inputs + `(("perl" ,perl) + ("patchelf" ,patchelf) + ("pkg-config" ,pkg-config) + ("python" ,python-2) + ("which" ,which))) + ;; Julia is not officially released for ARM and MIPS. + ;; See https://github.com/JuliaLang/julia/issues/10639 + (supported-systems '("i686-linux" "x86_64-linux")) + (home-page "http://julialang.org/") + (synopsis "High-performance dynamic language for technical computing") + (description + "Julia is a high-level, high-performance dynamic programming language for +technical computing, with syntax that is familiar to users of other technical +computing environments. It provides a sophisticated compiler, distributed +parallel execution, numerical accuracy, and an extensive mathematical function +library.") + (license license:expat))) diff --git a/gnu/packages/kde.scm b/gnu/packages/kde.scm index c6556865c2..1409e7c0b1 100644 --- a/gnu/packages/kde.scm +++ b/gnu/packages/kde.scm @@ -224,6 +224,6 @@ calculation of sha1 for every file crawled (arguments `(#:tests? #f)) ; no test target (home-page "http://www.kde.org/") - (synopsis "oxygen icon theme for the KDE desktop") + (synopsis "Oxygen icon theme for the KDE desktop") (description "KDE desktop environment") (license lgpl3+))) diff --git a/gnu/packages/key-mon.scm b/gnu/packages/key-mon.scm index d29f30258d..c890f85f8d 100644 --- a/gnu/packages/key-mon.scm +++ b/gnu/packages/key-mon.scm @@ -42,7 +42,7 @@ (arguments `(#:python ,python-2 ;uses the Python 2 'print' syntax #:phases (modify-phases %standard-phases - (add-after install wrap + (add-after 'install 'wrap (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (bin (string-append out "/bin")) diff --git a/gnu/packages/ld-wrapper.scm b/gnu/packages/ld-wrapper.in index 4fa2962bb9..db662e7d76 100644 --- a/gnu/packages/ld-wrapper.scm +++ b/gnu/packages/ld-wrapper.in @@ -8,7 +8,7 @@ # .go file (see <http://bugs.gnu.org/12519>). main="(@ (gnu build-support ld-wrapper) ld-wrapper)" -exec @GUILE@ -c "(load-compiled \"$0.go\") (apply $main (cdr (command-line)))" "$@" +exec @GUILE@ -c "(load-compiled \"@SELF@.go\") (apply $main (cdr (command-line)))" "$@" !# ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> @@ -82,27 +82,51 @@ exec @GUILE@ -c "(load-compiled \"$0.go\") (apply $main (cdr (command-line)))" " ;; Whether to emit debugging output. (getenv "GUIX_LD_WRAPPER_DEBUG")) -(define (pure-file-name? file) - ;; Return #t when FILE is the name of a file either within the store - ;; (possibly via a symlink) or within the build directory. +(define %disable-rpath? + ;; Whether to disable automatic '-rpath' addition. + (getenv "GUIX_LD_WRAPPER_DISABLE_RPATH")) + +(define (readlink* file) + ;; Call 'readlink' until the result is not a symlink. (define %max-symlink-depth 50) (let loop ((file file) (depth 0)) + (define (absolute target) + (if (absolute-file-name? target) + target + (string-append (dirname file) "/" target))) + + (if (>= depth %max-symlink-depth) + file + (call-with-values + (lambda () + (catch 'system-error + (lambda () + (values #t (readlink file))) + (lambda args + (let ((errno (system-error-errno args))) + (if (or (= errno EINVAL) (= errno ENOENT)) + (values #f file) + (apply throw args)))))) + (lambda (success? target) + (if success? + (loop (absolute target) (+ depth 1)) + file)))))) + +(define (pure-file-name? file) + ;; Return #t when FILE is the name of a file either within the store + ;; (possibly via a symlink) or within the build directory. + (let ((file (readlink* file))) (or (not (string-prefix? "/" file)) (string-prefix? %store-directory file) (string-prefix? %temporary-directory file) - (if %build-directory - (string-prefix? %build-directory file) - - ;; When used from a user environment, FILE may refer to - ;; ~/.guix-profile/lib/libfoo.so, which is itself a symlink to the - ;; store. Check whether this is the case. - (let ((s (false-if-exception (lstat file)))) - (and s - (eq? 'symlink (stat:type s)) - (< depth %max-symlink-depth) - (loop (readlink file) (+ 1 depth)))))))) + (and %build-directory + (string-prefix? %build-directory file))))) + +(define (store-file-name? file) + ;; Return #t when FILE is a store file, possibly indirectly. + (string-prefix? %store-directory (readlink* file))) (define (shared-library? file) ;; Return #t when FILE denotes a shared library. @@ -116,48 +140,68 @@ exec @GUILE@ -c "(load-compiled \"$0.go\") (apply $main (cdr (command-line)))" " (define (library-files-linked args) ;; Return the file names of shared libraries explicitly linked against via ;; `-l' or with an absolute file name in ARGS. - (define path+files + (define path+files+args (fold (lambda (argument result) (match result - ((library-path . library-files) + ((library-path library-files ("-dynamic-linker" . rest)) + ;; When passed '-dynamic-linker ld.so', ignore 'ld.so'. + ;; See <http://bugs.gnu.org/20102>. + (list library-path + library-files + (cons* argument "-dynamic-linker" rest))) + ((library-path library-files previous-args) (cond ((string-prefix? "-L" argument) ;augment the search path - (cons (append library-path + (list (append library-path (list (string-drop argument 2))) - library-files)) + library-files + (cons argument previous-args))) ((string-prefix? "-l" argument) ;add library (let* ((lib (string-append "lib" (string-drop argument 2) ".so")) (full (search-path library-path lib))) - (if full - (cons library-path - (cons full library-files)) - result))) + (list library-path + (if full + (cons full library-files) + library-files) + (cons argument previous-args)))) ((and (string-prefix? %store-directory argument) (shared-library? argument)) ;add library - (cons library-path - (cons argument library-files))) + (list library-path + (cons argument library-files) + (cons argument previous-args))) (else - result))))) - (cons '() '()) + (list library-path + library-files + (cons argument previous-args))))))) + (list '() '() '()) args)) - (match path+files - ((path . files) + (match path+files+args + ((path files arguments) (reverse files)))) (define (rpath-arguments library-files) ;; Return the `-rpath' argument list for each of LIBRARY-FILES, a list of ;; absolute file names. (fold-right (lambda (file args) - (if (or %allow-impurities? - (pure-file-name? file)) - (cons* "-rpath" (dirname file) args) - (begin - (format (current-error-port) - "ld-wrapper: error: attempt to use impure library ~s~%" - file) - (exit 1)))) + ;; Add '-rpath' if and only if FILE is in the store; we don't + ;; want to add '-rpath' for files under %BUILD-DIRECTORY or + ;; %TEMPORARY-DIRECTORY because that could leak to installed + ;; files. + (cond ((and (not %disable-rpath?) + (store-file-name? file)) + (cons* "-rpath" (dirname file) args)) + ((or %allow-impurities? + (pure-file-name? file)) + args) + (else + (begin + (format (current-error-port) + "ld-wrapper: error: attempt to use \ +impure library ~s~%" + file) + (exit 1))))) '() library-files)) @@ -167,6 +211,8 @@ exec @GUILE@ -c "(load-compiled \"$0.go\") (apply $main (cdr (command-line)))" " (args (append args (rpath-arguments libs)))) (when %debug? (format (current-error-port) + "ld-wrapper: libraries linked: ~s~%" libs) + (format (current-error-port) "ld-wrapper: invoking `~a' with ~s~%" %real-ld args)) (apply execl %real-ld (basename %real-ld) args))) diff --git a/gnu/packages/libedit.scm b/gnu/packages/libedit.scm index fcf5ab4c74..1d7b5b6a5f 100644 --- a/gnu/packages/libedit.scm +++ b/gnu/packages/libedit.scm @@ -42,7 +42,7 @@ (synopsis "NetBSD Editline library") (description "This is an autotool- and libtoolized port of the NetBSD Editline -library (libedit). This Berkeley-style licensed command line editor library +library (libedit). This Berkeley-style licensed command line editor library provides generic line editing, history, and tokenization functions, similar to those found in GNU Readline.") (license bsd-3))) diff --git a/gnu/packages/libidn.scm b/gnu/packages/libidn.scm index 3e55618e53..49dafbeb6d 100644 --- a/gnu/packages/libidn.scm +++ b/gnu/packages/libidn.scm @@ -26,13 +26,13 @@ (define-public libidn (package (name "libidn") - (version "1.29") + (version "1.30") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/libidn/libidn-" version ".tar.gz")) (sha256 (base32 - "0z3w5arlvyiyvzg76msg3n2px3c1glqr6wnj7rq6zczrpdyp90pv")))) + "0lxh5r1z8gsk4jxx3rv8aasjv8p53j4y04kvfn2w30a0syagrf9r")))) (build-system gnu-build-system) ;; FIXME: No Java and C# libraries are currently built. (synopsis "Internationalized string processing library") diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm new file mode 100644 index 0000000000..70f0e8eb79 --- /dev/null +++ b/gnu/packages/libreoffice.scm @@ -0,0 +1,634 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2015 Andreas Enge <andreas@enge.fr> +;;; Copyright © 2014 John Darrington <jmd@gnu.org> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (gnu packages libreoffice) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module ((guix licenses) + #:select (gpl2+ lgpl2.1+ mpl1.1 mpl2.0 non-copyleft)) + #:use-module (guix build-system gnu) + #:use-module (gnu packages boost) + #:use-module (gnu packages check) + #:use-module (gnu packages compression) + #:use-module (gnu packages curl) + #:use-module (gnu packages cyrus-sasl) + #:use-module (gnu packages doxygen) + #:use-module (gnu packages ghostscript) + #:use-module (gnu packages gperf) + #:use-module (gnu packages icu4c) + #:use-module (gnu packages openssl) + #:use-module (gnu packages perl) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages python) + #:use-module (gnu packages xml)) + +(define-public ixion + (package + (name "ixion") + (version "0.9.1") + (source + (origin + (method url-fetch) + (uri (string-append "http://kohei.us/files/ixion/src/libixion-" + version ".tar.xz")) + (sha256 (base32 + "18g3nk29ljiqbyi0ml49j2x3f3xrqckdm9i66sw5fxnj7hb5rqvp")))) + (build-system gnu-build-system) + (native-inputs + `(("pkg-config" ,pkg-config))) + (inputs + `(("mdds" ,mdds) + ("python" ,python-2))) ; looks for python.pc, not python3.pc + (home-page "https://gitlab.com/ixion/ixion") + (synopsis "General purpose formula parser and interpreter") + (description "Ixion is a library for calculating the results of formula +expressions stored in multiple named targets, or \"cells\". The cells can +be referenced from each other, and the library takes care of resolving +their dependencies automatically upon calculation.") + (license mpl2.0))) + +(define-public orcus + (package + (name "orcus") + (version "0.7.1") + (source + (origin + (method url-fetch) + (uri (string-append "http://kohei.us/files/" name "/src/lib" + name "-" version ".tar.xz")) + (sha256 (base32 + "0hva4qalg3dk6n1118ncr5fy8cqnj2f7fwldw7aa04124rj6p104")))) + (build-system gnu-build-system) + (native-inputs + `(("pkg-config" ,pkg-config))) + (inputs + `(("ixion" ,ixion) + ("mdds" ,mdds) + ("zlib" ,zlib))) + (home-page "https://gitlab.com/orcus/orcus") + (synopsis "File import filter library for spreadsheet documents") + (description "Orcus is a library that provides a collection of standalone +file processing filters. It is currently focused on providing filters for +spreadsheet documents. The library includes import filters for +Microsoft Excel 2007 XML, Microsoft Excel 2003 XML, Open Document Spreadsheet, +Plain Text, Gnumeric XML, Generic XML. It also includes low-level parsers for +CSV, CSS and XML.") + (license mpl2.0))) + +(define-public librevenge + (package + (name "librevenge") + (version "0.0.2") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/libwpd/" name "/" name "-" + version ".tar.xz")) + (sha256 (base32 + "03ygxyb0vfjv8raif5q62sl33b54wkr5rzgadb8slijm6k281wpn")))) + (build-system gnu-build-system) + (native-inputs + `(("boost" ,boost) + ("cppunit" ,cppunit) + ("doxygen" ,doxygen) + ("pkg-config" ,pkg-config))) + (inputs + `(("zlib" ,zlib))) + (arguments + ;; avoid triggering configure errors by simple inclusion of boost headers + `(#:configure-flags '("--disable-werror"))) + (home-page "http://sourceforge.net/p/libwpd/wiki/librevenge/") + (synopsis "Document importer for office suites") + (description "Librevenge is a base library for writing document import +filters. It has interfaces for text documents, vector graphics, +spreadsheets and presentations.") + (license (list mpl2.0 lgpl2.1+)))) ;dual licensed + +(define-public libwpd + (package + (name "libwpd") + (version "0.10.0") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/libwpd/" name "/" name "-" + version ".tar.xz")) + (sha256 (base32 + "0b6krzr6kxzm89g6bapn805kdayq70hn16n5b5wfs2lwrf0ag2wx")))) + (build-system gnu-build-system) + (native-inputs + `(("doxygen" ,doxygen) + ("pkg-config" ,pkg-config))) + (propagated-inputs + `(("librevenge" ,librevenge))) ; in Requires field of .pkg + (inputs + `(("zlib" ,zlib))) + (home-page "http://libwpd.sourceforge.net/") + (synopsis "Library for importing WordPerfect documents") + (description "Libwpd is a C++ library designed to help process +WordPerfect documents. It is most commonly used to import such documents +into other word processors.") + (license (list mpl2.0 lgpl2.1+)))) ;dual licensed + +(define-public libe-book + (package + (name "libe-book") + (version "0.1.2") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/libebook/libe-book-" + version "/libe-book-" version ".tar.xz")) + (sha256 + (base32 + "1v48pd32r2pfysr3a3igc4ivcf6vvb26jq4pdkcnq75p70alp2bz")))) + (build-system gnu-build-system) + (native-inputs + `(("cppunit" ,cppunit) + ("gperf" ,gperf) + ("pkg-config" ,pkg-config))) + (propagated-inputs ; in Requires or Requires.private field of .pkg + `(("icu4c" ,icu4c) + ("librevenge" ,librevenge) + ("libxml2" ,libxml2))) + (inputs + `(("boost" ,boost))) + (arguments + ;; avoid triggering configure errors by simple inclusion of boost headers + `(#:configure-flags '("--disable-werror"))) + (home-page "http://libebook.sourceforge.net") + (synopsis "Library for import of reflowable e-book formats") + (description "Libe-book is a library and a set of tools for reading and +converting various reflowable e-book formats. Currently supported are: +Broad Band eBook, eReader .pdb, FictionBook v. 2 (including zipped files), +PalmDoc Ebook, Plucker .pdb, QiOO (mobile format, for java-enabled +cellphones), TCR (simple compressed text format), TealDoc, zTXT, +ZVR (simple compressed text format).") + (license mpl2.0))) + +(define-public libwpg + (package + (name "libwpg") + (version "0.3.0") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/libwpg/" name "/" name "-" + version ".tar.xz")) + (sha256 (base32 + "097jx8a638fwwfrzf6v29r1yhc34rq9526py7wf0ck2z4fcr2w3g")))) + (build-system gnu-build-system) + (native-inputs + `(("doxygen" ,doxygen) + ("pkg-config" ,pkg-config))) + (propagated-inputs + `(("libwpd" ,libwpd))) ; in Requires field of .pkg + (inputs + `(("perl" ,perl) + ("zlib" ,zlib))) + (home-page "http://libwpg.sourceforge.net/") + (synopsis "Library and tools for the WordPerfect Graphics format") + (description "The libwpg project provides a library and tools for +working with graphics in the WPG (WordPerfect Graphics) format.") + (license (list mpl2.0 lgpl2.1+)))) ;dual licensed + +(define-public libcmis + (package + (name "libcmis") + (version "0.5.0") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/" name "/" name "-" + version ".tar.gz")) + (sha256 (base32 + "1dprvk4fibylv24l7gr49gfqbkfgmxynvgssvdcycgpf7n8h4zm8")))) + (build-system gnu-build-system) + (native-inputs + `(("cppunit" ,cppunit) + ("pkg-config" ,pkg-config))) + (propagated-inputs ; in Requires field of .pkg + `(("curl" ,curl) + ("libxml2" ,libxml2))) + (inputs + `(("boost" ,boost) + ("cyrus-sasl" ,cyrus-sasl) + ("openssl" ,openssl))) + (arguments + `(#:configure-flags + (list + ;; FIXME: Man pages generation requires docbook-to-man; reenable + ;; it once this is available. + "--without-man" + ;; avoid triggering configure errors by simple inclusion of + ;; boost headers + "--disable-werror" + ;; During configure, the boost headers are found, but linking + ;; fails without the following flag. + (string-append "--with-boost=" + (assoc-ref %build-inputs "boost"))))) + (home-page "http://sourceforge.net/projects/libcmis/") + (synopsis "CMIS client library") + (description "LibCMIS is a C++ client library for the CMIS interface. It +allows C++ applications to connect to any ECM behaving as a CMIS server such +as Alfresco or Nuxeo.") + (license (list mpl1.1 gpl2+ lgpl2.1+)))) ; triple license + +(define-public libabw + (package + (name "libabw") + (version "0.1.1") + (source + (origin + (method url-fetch) + (uri (string-append "http://dev-www.libreoffice.org/src/" name "/" + name "-" version ".tar.xz")) + (sha256 (base32 + "0zi1zj4fpxgpglbbb5n1kg3dmhqq5rpf46lli89r5daavp19iing")))) + (build-system gnu-build-system) + (native-inputs + `(("doxygen" ,doxygen) + ("gperf" ,gperf) + ("perl" ,perl) + ("pkg-config" ,pkg-config))) + (propagated-inputs ; in Requires or Requires.private field of .pkg + `(("librevenge" ,librevenge) + ("libxml2" ,libxml2))) + (inputs + `(("boost" ,boost))) + (arguments + ;; avoid triggering configure errors by simple inclusion of boost headers + `(#:configure-flags '("--disable-werror"))) + (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libabw") + (synopsis "Library for parsing the AbiWord format") + (description "Libabw is a library that parses the file format of +AbiWord documents.") + (license mpl2.0))) + +(define-public libcdr + (package + (name "libcdr") + (version "0.1.1") + (source + (origin + (method url-fetch) + (uri (string-append "http://dev-www.libreoffice.org/src/" name "/" + name "-" version ".tar.xz")) + (sha256 (base32 + "07yzb1yr5kzv0binzj5swz3zzay2gw3xb0fbkc2zwdssgrkf19nh")))) + (build-system gnu-build-system) + (native-inputs + `(("doxygen" ,doxygen) + ("pkg-config" ,pkg-config))) + (propagated-inputs ; in Requires or Requires.private field of .pkg + `(("icu4c" ,icu4c) + ("lcms" ,lcms) + ("librevenge" ,librevenge) + ("zlib" ,zlib))) + (inputs + `(("boost" ,boost))) + (arguments + ;; avoid triggering a build failure due to warnings + `(#:configure-flags '("--disable-werror"))) + (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libcdr") + (synopsis "Library for parsing the CorelDRAW format") + (description "Libcdr is a library that parses the file format of +CorelDRAW documents of all versions.") + (license mpl2.0))) + +(define-public libetonyek + (package + (name "libetonyek") + (version "0.1.1") + (source + (origin + (method url-fetch) + (uri (string-append "http://dev-www.libreoffice.org/src/" name "/" + name "-" version ".tar.xz")) + (sha256 (base32 + "0gn8v24jb9r9kxppbws6xlc7knpd9mk2n9xjvziccv5f2l7mlslw")))) + (build-system gnu-build-system) + (native-inputs + `(("cppunit" ,cppunit) + ("doxygen" ,doxygen) + ("gperf" ,gperf) + ("pkg-config" ,pkg-config))) + (propagated-inputs ; in Requires or Requires.private field of .pkg + `(("librevenge" ,librevenge) + ("libxml2" ,libxml2))) + (inputs + `(("boost" ,boost))) + (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libetonyek") + (synopsis "Library for parsing the Apple Keynote format") + (description "Libetonyek is a library that parses the file format of +Apple Keynote documents. It currently supports Keynote versions 2 to 5.") + (license mpl2.0))) + +(define-public libexttextcat + (package + (name "libexttextcat") + (version "3.4.4") + (source + (origin + (method url-fetch) + (uri (string-append "http://dev-www.libreoffice.org/src/" name "/" + name "-" version ".tar.xz")) + (sha256 (base32 + "14v2hkygnmf1zgahfm1fha47cr67iikrz2ymiqi28d2jydn0hk7j")))) + (build-system gnu-build-system) + (home-page "http://www.freedesktop.org/wiki/Software/libexttextcat/") + (synopsis "Text Categorization library") + (description "Libexttextcat is an N-Gram-Based Text Categorization +library primarily intended for language guessing.") + (license (non-copyleft "file://LICENSE" + "See LICENSE in the distribution.")))) + +(define-public libfreehand + (package + (name "libfreehand") + (version "0.1.0") + (source + (origin + (method url-fetch) + (uri (string-append "http://dev-www.libreoffice.org/src/" name "/" + name "-" version ".tar.xz")) + (sha256 (base32 + "01j7mxi4lmf72w1mv2r098p8l0csdd94w2gq0ncp93djn34al6ai")))) + (build-system gnu-build-system) + (native-inputs + `(("doxygen" ,doxygen) + ("gperf" ,gperf) + ("perl" ,perl) + ("pkg-config" ,pkg-config))) + (propagated-inputs ; in Requires or Requires.private field of .pkg + `(("librevenge" ,librevenge) + ("zlib" ,zlib))) + (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libfreehand") + (synopsis "Library for parsing the FreeHand format") + (description "Libfreehand is a library that parses the file format of +Aldus/Macromedia/Adobe FreeHand documents.") + (license mpl2.0))) + +(define-public libmspub + (package + (name "libmspub") + (version "0.1.2") + (source + (origin + (method url-fetch) + (uri (string-append "http://dev-www.libreoffice.org/src/" name "/" + name "-" version ".tar.xz")) + (sha256 (base32 + "03sn6lxpr49sdq6j8q7fw7yjybyfahhs03z80388mh105pwapfmh")))) + (build-system gnu-build-system) + (native-inputs + `(("doxygen" ,doxygen) + ("pkg-config" ,pkg-config))) + (propagated-inputs ; in Requires or Requires.private field of .pkg + `(("icu4c" ,icu4c) + ("librevenge" ,librevenge) + ("zlib" ,zlib))) + (inputs + `(("boost" ,boost))) + (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libmspub") + (synopsis "Library for parsing the Microsoft Publisher format") + (description "Libmspub is a library that parses the file format of +Microsoft Publisher documents of all versions.") + (license mpl2.0))) + +(define-public libpagemaker + (package + (name "libpagemaker") + (version "0.0.2") + (source + (origin + (method url-fetch) + (uri (string-append "http://dev-www.libreoffice.org/src/" name "/" + name "-" version ".tar.xz")) + (sha256 (base32 + "05zgj5ngg9z4b7dnrfs59nm0macm99lzyxv4mg53jcvp0mkgigfd")))) + (build-system gnu-build-system) + (native-inputs + `(("doxygen" ,doxygen) + ("pkg-config" ,pkg-config))) + (propagated-inputs ; in Requires field of .pkg + `(("librevenge" ,librevenge))) + (inputs + `(("boost" ,boost) + ("zlib" ,zlib))) + (arguments + ;; avoid triggering a build failure due to warnings + `(#:configure-flags '("--disable-werror"))) + (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libpagemaker") + (synopsis "Library for parsing the PageMaker format") + (description "Libpagemaker is a library that parses the file format of +Aldus/Adobe PageMaker documents. Currently it only understands documents +created by PageMaker version 6.x and 7.") + (license mpl2.0))) + +(define-public libvisio + (package + (name "libvisio") + ;; FIXME: The newer version 0.1.1 fails its tests. + (version "0.1.0") + (source + (origin + (method url-fetch) + (uri (string-append "http://dev-www.libreoffice.org/src/" name "/" + name "-" version ".tar.xz")) + (sha256 (base32 + "0vvd2wyp4rw6s9xnj1dc9vgdpfvm45gnb5b9hhzif0fdnx4iskqf")))) + (build-system gnu-build-system) + (native-inputs + `(("cppunit" ,cppunit) + ("doxygen" ,doxygen) + ("gperf" ,gperf) + ("perl" ,perl) + ("pkg-config" ,pkg-config))) + (propagated-inputs ; in Requires or Requires.private field of .pkg + `(("icu4c" ,icu4c) + ("librevenge" ,librevenge) + ("libxml2" ,libxml2))) + (inputs + `(("boost" ,boost))) + ;; FIXME: Not needed any more for newer version 0.1.1. + (arguments + ;; avoid triggering a build failure due to warnings + `(#:configure-flags '("--disable-werror"))) + (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libvisio") + (synopsis "Library for parsing the Microsoft Visio format") + (description "Libvisio is a library that parses the file format of +Microsoft Visio documents of all versions.") + (license mpl2.0))) + +(define-public libodfgen + (package + (name "libodfgen") + (version "0.1.3") + (source + (origin + (method url-fetch) + (uri (string-append "http://dev-www.libreoffice.org/src/" + name "-" version ".tar.bz2")) + (sha256 (base32 + "074qsav86ixwi9zm1f77g9vxdf1ihm6n930vxjg8q3lwzd8g7lb6")))) + (build-system gnu-build-system) + (native-inputs + `(("doxygen" ,doxygen) + ("pkg-config" ,pkg-config))) + (propagated-inputs ; in Requires field of .pkg + `(("librevenge" ,librevenge))) + (inputs + `(("boost" ,boost) + ("zlib" ,zlib))) + (arguments + ;; avoid triggering configure errors by simple inclusion of boost headers + `(#:configure-flags '("--disable-werror"))) + (home-page "http://sourceforge.net/p/libwpd/wiki/libodfgen/") + (synopsis "ODF (Open Document Format) library") + (description "Libodfgen is a library for generating documents in the +Open Document Format (ODF). It provides generator implementations for all +document interfaces supported by librevenge: +text documents, vector drawings, presentations and spreadsheets.") + (license (list mpl2.0 lgpl2.1+)))) ; dual license + +(define-public libmwaw + (package + (name "libmwaw") + (version "0.3.4") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/" name "/" name "/" + name "-" version ".tar.xz")) + (sha256 (base32 + "1sn95flxrh85qjsg1kk700c1ggxaaccr9j1nnw7x4daw8lky25ac")))) + (build-system gnu-build-system) + (native-inputs + `(("doxygen" ,doxygen) + ("pkg-config" ,pkg-config))) + (propagated-inputs ; in Requires field of .pkg + `(("librevenge" ,librevenge))) + (inputs + `(("boost" ,boost) + ("zlib" ,zlib))) + (arguments + ;; avoid triggering configure errors by simple inclusion of boost headers + `(#:configure-flags '("--disable-werror"))) + (home-page "http://sourceforge.net/p/libmwaw/wiki/Home/") + (synopsis "Import library for some old Macintosh text documents") + (description "Libmwaw contains some import filters for old Macintosh +text documents (MacWrite, ClarisWorks, ... ) and for some graphics and +spreadsheet documents.") + (license (list mpl2.0 lgpl2.1+)))) ; dual license + +(define-public libwps + (package + (name "libwps") + (version "0.3.1") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/" name "/" name "/" + name "-" version ".tar.xz")) + (sha256 (base32 + "14wfhw1ahavhx4hrdzc4hdwxjlffrm939kswf2x1250jnmyjlb5v")))) + (build-system gnu-build-system) + (native-inputs + `(("doxygen" ,doxygen) + ("pkg-config" ,pkg-config))) + (propagated-inputs ; in Requires field of .pkg + `(("librevenge" ,librevenge))) + (inputs + `(("boost" ,boost) + ("zlib" ,zlib))) + (arguments + ;; avoid triggering configure errors by simple inclusion of boost headers + `(#:configure-flags '("--disable-werror"))) + (home-page "http://libwps.sourceforge.net/") + (synopsis "Import library for Microsoft Works text documents") + (description "Libwps is a library for importing files in the Microsoft +Works word processor file format.") + (license (list mpl2.0 lgpl2.1+)))) ; dual license + +(define-public hunspell + (package + (name "hunspell") + (version "1.3.3") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/" name "/" + name "-" version ".tar.gz")) + (sha256 (base32 + "0v14ff9s37vkh45diaddndcrj0hmn67arh8xh8k79q9c1vgc1cm7")))) + (build-system gnu-build-system) + (home-page "http://hunspell.sourceforge.net/") + (synopsis "Spell checker") + (description "Hunspell is a spell checker and morphological analyzer +library and program designed for languages with rich morphology and complex +word compounding or character encoding.") + ;; triple license, including "mpl1.1 or later" + (license (list mpl1.1 gpl2+ lgpl2.1+)))) + +(define-public hyphen + (package + (name "hyphen") + (version "2.8.8") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/hunspell/" + name "-" version ".tar.gz")) + (sha256 (base32 + "01ap9pr6zzzbp4ky0vy7i1983fwyqy27pl0ld55s30fdxka3ciih")))) + (build-system gnu-build-system) + (inputs + `(("perl" ,perl))) + (home-page "http://hunspell.sourceforge.net/") + (synopsis "Hyphenation library") + (description "Hyphen is a hyphenation library using TeX hyphenation +patterns, which are pre-processed by a perl script.") + ;; triple license, including "mpl1.1 or later" + (license (list mpl1.1 mpl2.0 gpl2+ lgpl2.1+)))) + +(define-public mythes + (package + (name "mythes") + (version "1.2.4") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/hunspell/" + name "-" version ".tar.gz")) + (sha256 (base32 + "0prh19wy1c74kmzkkavm9qslk99gz8h8wmjvwzjc6lf8v2az708y")))) + (build-system gnu-build-system) + (native-inputs + `(("pkg-config" ,pkg-config))) + (inputs + `(("hunspell" ,hunspell) + ("perl" ,perl))) + (home-page "http://hunspell.sourceforge.net/") + (synopsis "Thesaurus") + (description "MyThes is a simple thesaurus that uses a structured text +data file and an index file with binary search to look up words and phrases +and to return information on pronunciations, meaningss and synonyms.") + (license (non-copyleft "file://COPYING" + "See COPYING in the distribution.")))) diff --git a/gnu/packages/libusb.scm b/gnu/packages/libusb.scm index 62eb753d24..dd8a2ff23b 100644 --- a/gnu/packages/libusb.scm +++ b/gnu/packages/libusb.scm @@ -24,12 +24,13 @@ #:use-module (guix download) #:use-module (guix build-system gnu) #:use-module (gnu packages gnupg) + #:use-module (gnu packages linux) #:use-module (gnu packages pkg-config)) (define-public libusb (package (name "libusb") - (version "1.0.9") + (version "1.0.19") (source (origin (method url-fetch) @@ -37,8 +38,14 @@ "libusb-" version "/libusb-" version ".tar.bz2")) (sha256 (base32 - "16sz34ix6hw2wwl3kqx6rf26fg210iryr68wc439dc065pffw879")))) + "0h38p9rxfpg9vkrbyb120i1diq57qcln82h5fr7hvy82c20jql3c")))) (build-system gnu-build-system) + + ;; XXX: Enabling udev is now recommended, but eudev indirectly depends on + ;; libusb. + (arguments `(#:configure-flags '("--disable-udev"))) + ;; (inputs `(("eudev" ,eudev))) + (home-page "http://www.libusb.org") (synopsis "User-space USB library") (description diff --git a/gnu/packages/linux-libre-i686.conf b/gnu/packages/linux-libre-i686.conf index 3c82b91614..0b66cc0e7c 100644 --- a/gnu/packages/linux-libre-i686.conf +++ b/gnu/packages/linux-libre-i686.conf @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/x86 3.18.4-gnu Kernel Configuration +# Linux/x86 4.0.0-gnu Kernel Configuration # # CONFIG_64BIT is not set CONFIG_X86_32=y @@ -88,6 +88,7 @@ CONFIG_GENERIC_IRQ_LEGACY_ALLOC_HWIRQ=y CONFIG_GENERIC_PENDING_IRQ=y CONFIG_GENERIC_IRQ_CHIP=y CONFIG_IRQ_DOMAIN=y +CONFIG_GENERIC_MSI_IRQ=y # CONFIG_IRQ_DOMAIN_DEBUG is not set CONFIG_IRQ_FORCED_THREADING=y CONFIG_SPARSE_IRQ=y @@ -127,7 +128,7 @@ CONFIG_TASK_IO_ACCOUNTING=y # RCU Subsystem # CONFIG_TREE_RCU=y -# CONFIG_PREEMPT_RCU is not set +CONFIG_SRCU=y # CONFIG_TASKS_RCU is not set CONFIG_RCU_STALL_COMMON=y CONFIG_RCU_FANOUT=32 @@ -135,6 +136,7 @@ CONFIG_RCU_FANOUT_LEAF=16 # CONFIG_RCU_FANOUT_EXACT is not set CONFIG_RCU_FAST_NO_HZ=y # CONFIG_TREE_RCU_TRACE is not set +CONFIG_RCU_KTHREAD_PRIO=0 # CONFIG_RCU_NOCB_CPU is not set # CONFIG_BUILD_BIN2C is not set # CONFIG_IKCONFIG is not set @@ -148,7 +150,7 @@ CONFIG_CGROUP_DEVICE=y CONFIG_CPUSETS=y CONFIG_PROC_PID_CPUSET=y CONFIG_CGROUP_CPUACCT=y -CONFIG_RESOURCE_COUNTERS=y +CONFIG_PAGE_COUNTER=y CONFIG_MEMCG=y CONFIG_MEMCG_SWAP=y # CONFIG_MEMCG_SWAP_ENABLED is not set @@ -282,6 +284,7 @@ CONFIG_OLD_SIGACTION=y # GCOV-based kernel profiling # # CONFIG_GCOV_KERNEL is not set +CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y CONFIG_HAVE_GENERIC_DMA_COHERENT=y CONFIG_SLABINFO=y CONFIG_RT_MUTEXES=y @@ -357,6 +360,7 @@ CONFIG_INLINE_WRITE_UNLOCK_IRQ=y CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y CONFIG_MUTEX_SPIN_ON_OWNER=y CONFIG_RWSEM_SPIN_ON_OWNER=y +CONFIG_LOCK_SPIN_ON_OWNER=y CONFIG_ARCH_USE_QUEUE_RWLOCK=y CONFIG_QUEUE_RWLOCK=y CONFIG_FREEZER=y @@ -372,7 +376,9 @@ CONFIG_X86_MPPARSE=y CONFIG_X86_EXTENDED_PLATFORM=y # CONFIG_X86_GOLDFISH is not set CONFIG_X86_INTEL_MID=y +# CONFIG_X86_INTEL_QUARK is not set CONFIG_X86_INTEL_LPSS=y +CONFIG_X86_AMD_PLATFORM_DEVICE=y CONFIG_IOSF_MBI=m CONFIG_IOSF_MBI_DEBUG=y # CONFIG_X86_RDC321X is not set @@ -450,6 +456,7 @@ CONFIG_SCHED_MC=y # CONFIG_PREEMPT_NONE is not set CONFIG_PREEMPT_VOLUNTARY=y # CONFIG_PREEMPT is not set +CONFIG_X86_UP_APIC_MSI=y CONFIG_X86_LOCAL_APIC=y CONFIG_X86_IO_APIC=y CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y @@ -531,6 +538,7 @@ CONFIG_ZPOOL=y CONFIG_ZBUD=y CONFIG_ZSMALLOC=y CONFIG_PGTABLE_MAPPING=y +# CONFIG_ZSMALLOC_STAT is not set CONFIG_GENERIC_EARLY_IOREMAP=y CONFIG_HIGHPTE=y CONFIG_X86_CHECK_BIOS_CORRUPTION=y @@ -545,6 +553,7 @@ CONFIG_X86_PAT=y CONFIG_ARCH_USES_PG_UNCACHED=y CONFIG_ARCH_RANDOM=y CONFIG_X86_SMAP=y +# CONFIG_X86_INTEL_MPX is not set CONFIG_EFI=y CONFIG_EFI_STUB=y CONFIG_SECCOMP=y @@ -585,7 +594,6 @@ CONFIG_PM_SLEEP_SMP=y CONFIG_PM_WAKELOCKS=y CONFIG_PM_WAKELOCKS_LIMIT=100 CONFIG_PM_WAKELOCKS_GC=y -CONFIG_PM_RUNTIME=y CONFIG_PM=y CONFIG_PM_DEBUG=y CONFIG_PM_ADVANCED_DEBUG=y @@ -621,6 +629,7 @@ CONFIG_ACPI_PCI_SLOT=y CONFIG_X86_PM_TIMER=y CONFIG_ACPI_CONTAINER=y CONFIG_ACPI_HOTPLUG_MEMORY=y +CONFIG_ACPI_HOTPLUG_IOAPIC=y CONFIG_ACPI_SBS=m CONFIG_ACPI_HED=y # CONFIG_ACPI_CUSTOM_METHOD is not set @@ -634,6 +643,7 @@ CONFIG_ACPI_APEI_PCIEAER=y CONFIG_ACPI_APEI_EINJ=m # CONFIG_ACPI_APEI_ERST_DEBUG is not set CONFIG_ACPI_EXTLOG=m +# CONFIG_PMIC_OPREGION is not set CONFIG_SFI=y CONFIG_X86_APM_BOOT=y CONFIG_APM=m @@ -662,12 +672,13 @@ CONFIG_CPU_FREQ_GOV_ONDEMAND=y CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y # -# x86 CPU frequency scaling drivers +# CPU frequency scaling drivers # CONFIG_X86_INTEL_PSTATE=y CONFIG_X86_PCC_CPUFREQ=y CONFIG_X86_ACPI_CPUFREQ=y CONFIG_X86_ACPI_CPUFREQ_CPB=y +CONFIG_X86_SFI_CPUFREQ=m CONFIG_X86_POWERNOW_K6=m CONFIG_X86_POWERNOW_K7=m CONFIG_X86_POWERNOW_K7_ACPI=y @@ -734,7 +745,6 @@ CONFIG_PCI_ATS=y CONFIG_PCI_IOV=y CONFIG_PCI_PRI=y CONFIG_PCI_PASID=y -CONFIG_PCI_IOAPIC=y CONFIG_PCI_LABEL=y # @@ -856,6 +866,7 @@ CONFIG_SYN_COOKIES=y CONFIG_NET_IPVTI=m CONFIG_NET_UDP_TUNNEL=m CONFIG_NET_FOU=m +CONFIG_NET_FOU_IP_TUNNELS=y CONFIG_GENEVE=m CONFIG_INET_AH=m CONFIG_INET_ESP=m @@ -967,6 +978,7 @@ CONFIG_NF_NAT_FTP=m CONFIG_NF_NAT_IRC=m CONFIG_NF_NAT_SIP=m CONFIG_NF_NAT_TFTP=m +CONFIG_NF_NAT_REDIRECT=m CONFIG_NETFILTER_SYNPROXY=m CONFIG_NF_TABLES=m CONFIG_NF_TABLES_INET=m @@ -979,6 +991,7 @@ CONFIG_NFT_COUNTER=m CONFIG_NFT_LOG=m CONFIG_NFT_LIMIT=m CONFIG_NFT_MASQ=m +CONFIG_NFT_REDIR=m CONFIG_NFT_NAT=m CONFIG_NFT_QUEUE=m CONFIG_NFT_REJECT=m @@ -1147,6 +1160,7 @@ CONFIG_NF_NAT_IPV4=m CONFIG_NFT_CHAIN_NAT_IPV4=m CONFIG_NF_NAT_MASQUERADE_IPV4=m CONFIG_NFT_MASQ_IPV4=m +CONFIG_NFT_REDIR_IPV4=m CONFIG_NF_NAT_SNMP_BASIC=m CONFIG_NF_NAT_PROTO_GRE=m CONFIG_NF_NAT_PPTP=m @@ -1187,6 +1201,7 @@ CONFIG_NF_NAT_IPV6=m CONFIG_NFT_CHAIN_NAT_IPV6=m CONFIG_NF_NAT_MASQUERADE_IPV6=m CONFIG_NFT_MASQ_IPV6=m +CONFIG_NFT_REDIR_IPV6=m CONFIG_IP6_NF_IPTABLES=m CONFIG_IP6_NF_MATCH_AH=m CONFIG_IP6_NF_MATCH_EUI64=m @@ -1264,7 +1279,6 @@ CONFIG_RDS_RDMA=m CONFIG_RDS_TCP=m # CONFIG_RDS_DEBUG is not set CONFIG_TIPC=m -CONFIG_TIPC_PORTS=8191 CONFIG_TIPC_MEDIA_IB=y CONFIG_ATM=m CONFIG_ATM_CLIP=m @@ -1286,6 +1300,7 @@ CONFIG_BRIDGE_IGMP_SNOOPING=y CONFIG_BRIDGE_VLAN_FILTERING=y CONFIG_HAVE_NET_DSA=y CONFIG_NET_DSA=m +CONFIG_NET_DSA_HWMON=y CONFIG_NET_DSA_TAG_BRCM=y CONFIG_NET_DSA_TAG_DSA=y CONFIG_NET_DSA_TAG_EDSA=y @@ -1312,6 +1327,7 @@ CONFIG_LAPB=m CONFIG_PHONET=m CONFIG_6LOWPAN=m CONFIG_IEEE802154=m +CONFIG_IEEE802154_SOCKET=m CONFIG_IEEE802154_6LOWPAN=m CONFIG_MAC802154=m CONFIG_NET_SCHED=y @@ -1381,6 +1397,9 @@ CONFIG_NET_ACT_PEDIT=m CONFIG_NET_ACT_SIMP=m CONFIG_NET_ACT_SKBEDIT=m CONFIG_NET_ACT_CSUM=m +CONFIG_NET_ACT_VLAN=m +CONFIG_NET_ACT_BPF=m +CONFIG_NET_ACT_CONNMARK=m # CONFIG_NET_CLS_IND is not set CONFIG_NET_SCH_FIFO=y CONFIG_DCB=y @@ -1392,15 +1411,16 @@ CONFIG_BATMAN_ADV_NC=y CONFIG_BATMAN_ADV_MCAST=y # CONFIG_BATMAN_ADV_DEBUG is not set CONFIG_OPENVSWITCH=m -CONFIG_OPENVSWITCH_GRE=y -CONFIG_OPENVSWITCH_VXLAN=y -CONFIG_OPENVSWITCH_GENEVE=y +CONFIG_OPENVSWITCH_GRE=m +CONFIG_OPENVSWITCH_VXLAN=m +CONFIG_OPENVSWITCH_GENEVE=m CONFIG_VSOCKETS=m CONFIG_VMWARE_VMCI_VSOCKETS=m CONFIG_NETLINK_MMAP=y CONFIG_NETLINK_DIAG=m CONFIG_NET_MPLS_GSO=m CONFIG_HSR=m +# CONFIG_NET_SWITCHDEV is not set CONFIG_RPS=y CONFIG_RFS_ACCEL=y CONFIG_XPS=y @@ -1549,7 +1569,7 @@ CONFIG_VLSI_FIR=m CONFIG_VIA_FIR=m CONFIG_MCS_FIR=m CONFIG_BT=m -CONFIG_BT_6LOWPAN=m +CONFIG_BT_BREDR=y CONFIG_BT_RFCOMM=m CONFIG_BT_RFCOMM_TTY=y CONFIG_BT_BNEP=m @@ -1557,6 +1577,9 @@ CONFIG_BT_BNEP_MC_FILTER=y CONFIG_BT_BNEP_PROTO_FILTER=y CONFIG_BT_CMTP=m CONFIG_BT_HIDP=m +CONFIG_BT_LE=y +CONFIG_BT_6LOWPAN=m +# CONFIG_BT_SELFTEST is not set # # Bluetooth device drivers @@ -1609,6 +1632,7 @@ CONFIG_MAC80211=m CONFIG_MAC80211_HAS_RC=y CONFIG_MAC80211_RC_MINSTREL=y CONFIG_MAC80211_RC_MINSTREL_HT=y +CONFIG_MAC80211_RC_MINSTREL_VHT=y CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y CONFIG_MAC80211_RC_DEFAULT="minstrel_ht" CONFIG_MAC80211_MESH=y @@ -1660,7 +1684,8 @@ CONFIG_NFC_MRVL=m CONFIG_NFC_MRVL_USB=m CONFIG_NFC_ST21NFCA=m CONFIG_NFC_ST21NFCA_I2C=m -# CONFIG_NFC_ST21NFCB is not set +CONFIG_NFC_ST21NFCB=m +CONFIG_NFC_ST21NFCB_I2C=m # # Device Drivers @@ -1680,7 +1705,9 @@ CONFIG_FIRMWARE_IN_KERNEL=y CONFIG_EXTRA_FIRMWARE="" CONFIG_FW_LOADER_USER_HELPER=y # CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set +CONFIG_WANT_DEV_COREDUMP=y CONFIG_ALLOW_DEV_COREDUMP=y +CONFIG_DEV_COREDUMP=y # CONFIG_DEBUG_DRIVER is not set # CONFIG_DEBUG_DEVRES is not set CONFIG_SYS_HYPERVISOR=y @@ -1689,6 +1716,7 @@ CONFIG_GENERIC_CPU_AUTOPROBE=y CONFIG_REGMAP=y CONFIG_REGMAP_I2C=y CONFIG_REGMAP_SPI=y +CONFIG_REGMAP_SPMI=m CONFIG_REGMAP_MMIO=y CONFIG_REGMAP_IRQ=y CONFIG_DMA_SHARED_BUFFER=y @@ -1820,6 +1848,7 @@ CONFIG_MTD_NAND_CAFE=m CONFIG_MTD_NAND_CS553X=m CONFIG_MTD_NAND_NANDSIM=m CONFIG_MTD_NAND_PLATFORM=m +CONFIG_MTD_NAND_HISI504=m CONFIG_MTD_ONENAND=m CONFIG_MTD_ONENAND_VERIFY_WRITE=y CONFIG_MTD_ONENAND_GENERIC=m @@ -1914,7 +1943,7 @@ CONFIG_BLK_DEV_SX8=m CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=65536 -# CONFIG_BLK_DEV_XIP is not set +CONFIG_BLK_DEV_RAM_DAX=y CONFIG_CDROM_PKTCDVD=m CONFIG_CDROM_PKTCDVD_BUFFERS=8 # CONFIG_CDROM_PKTCDVD_WCACHE is not set @@ -2150,7 +2179,7 @@ CONFIG_SCSI_LPFC=m CONFIG_SCSI_SIM710=m CONFIG_SCSI_SYM53C416=m CONFIG_SCSI_DC395x=m -CONFIG_SCSI_DC390T=m +CONFIG_SCSI_AM53C974=m CONFIG_SCSI_T128=m CONFIG_SCSI_U14_34F=m CONFIG_SCSI_U14_34F_TAGGED_QUEUE=y @@ -2158,6 +2187,7 @@ CONFIG_SCSI_U14_34F_LINKED_COMMANDS=y CONFIG_SCSI_U14_34F_MAX_TAGS=8 CONFIG_SCSI_ULTRASTOR=m CONFIG_SCSI_NSP32=m +CONFIG_SCSI_WD719X=m CONFIG_SCSI_DEBUG=m CONFIG_SCSI_PMCRAID=m CONFIG_SCSI_PM8001=m @@ -2346,16 +2376,6 @@ CONFIG_FIREWIRE_OHCI=m CONFIG_FIREWIRE_SBP2=m CONFIG_FIREWIRE_NET=m CONFIG_FIREWIRE_NOSY=m -CONFIG_I2O=m -CONFIG_I2O_LCT_NOTIFY_ON_CHANGES=y -CONFIG_I2O_EXT_ADAPTEC=y -CONFIG_I2O_EXT_ADAPTEC_DMA64=y -CONFIG_I2O_CONFIG=m -# CONFIG_I2O_CONFIG_OLD_IOCTL is not set -CONFIG_I2O_BUS=m -CONFIG_I2O_BLOCK=m -CONFIG_I2O_SCSI=m -CONFIG_I2O_PROC=m CONFIG_MACINTOSH_DRIVERS=y CONFIG_MAC_EMUMOUSEBTN=m CONFIG_NETDEVICES=y @@ -2374,6 +2394,7 @@ CONFIG_NET_TEAM_MODE_ACTIVEBACKUP=m CONFIG_NET_TEAM_MODE_LOADBALANCE=m CONFIG_MACVLAN=m CONFIG_MACVTAP=m +CONFIG_IPVLAN=m CONFIG_VXLAN=m CONFIG_NETCONSOLE=m CONFIG_NETCONSOLE_DYNAMIC=y @@ -2453,6 +2474,7 @@ CONFIG_NET_DSA_MV88E6XXX_NEED_PPU=y CONFIG_NET_DSA_MV88E6131=m CONFIG_NET_DSA_MV88E6123_61_65=m CONFIG_NET_DSA_MV88E6171=m +CONFIG_NET_DSA_MV88E6352=m CONFIG_NET_DSA_BCM_SF2=m CONFIG_ETHERNET=y CONFIG_MDIO=m @@ -2477,6 +2499,8 @@ CONFIG_LANCE=m CONFIG_PCNET32=m CONFIG_PCMCIA_NMCLAN=m CONFIG_NI65=m +CONFIG_AMD_XGBE=m +CONFIG_AMD_XGBE_DCB=y # CONFIG_NET_XGENE is not set CONFIG_NET_VENDOR_ARC=y CONFIG_NET_VENDOR_ATHEROS=y @@ -2490,6 +2514,7 @@ CONFIG_B44=m CONFIG_B44_PCI_AUTOSELECT=y CONFIG_B44_PCICORE_AUTOSELECT=y CONFIG_B44_PCI=y +CONFIG_BCMGENET=m CONFIG_BNX2=m CONFIG_CNIC=m CONFIG_TIGON3=m @@ -2549,6 +2574,7 @@ CONFIG_IGB_DCA=y CONFIG_IGBVF=m CONFIG_IXGB=m CONFIG_IXGBE=m +CONFIG_IXGBE_VXLAN=y CONFIG_IXGBE_HWMON=y CONFIG_IXGBE_DCA=y CONFIG_IXGBE_DCB=y @@ -2556,7 +2582,7 @@ CONFIG_IXGBEVF=m CONFIG_I40E=m CONFIG_I40E_VXLAN=y CONFIG_I40E_DCB=y -# CONFIG_I40E_FCOE is not set +CONFIG_I40E_FCOE=y CONFIG_I40EVF=m CONFIG_FM10K=m CONFIG_FM10K_VXLAN=y @@ -2628,6 +2654,7 @@ CONFIG_8139TOO_8129=y CONFIG_R8169=m CONFIG_NET_VENDOR_RDC=y CONFIG_R6040=m +CONFIG_NET_VENDOR_ROCKER=y CONFIG_NET_VENDOR_SAMSUNG=y CONFIG_SXGBE_ETH=m CONFIG_NET_VENDOR_SEEQ=y @@ -2649,10 +2676,8 @@ CONFIG_SMSC911X=m CONFIG_SMSC9420=m CONFIG_NET_VENDOR_STMICRO=y CONFIG_STMMAC_ETH=m -CONFIG_STMMAC_PLATFORM=y +CONFIG_STMMAC_PLATFORM=m # CONFIG_STMMAC_PCI is not set -# CONFIG_STMMAC_DEBUG_FS is not set -# CONFIG_STMMAC_DA is not set CONFIG_NET_VENDOR_SUN=y CONFIG_HAPPYMEAL=m CONFIG_SUNGEM=m @@ -2661,6 +2686,7 @@ CONFIG_NIU=m CONFIG_NET_VENDOR_TEHUTI=y CONFIG_TEHUTI=m CONFIG_NET_VENDOR_TI=y +CONFIG_TI_CPSW_ALE=m CONFIG_TLAN=m CONFIG_NET_VENDOR_VIA=y CONFIG_VIA_RHINE=m @@ -2687,6 +2713,7 @@ CONFIG_PHYLIB=y # CONFIG_AT803X_PHY=m CONFIG_AMD_PHY=m +CONFIG_AMD_XGBE_PHY=m CONFIG_MARVELL_PHY=m CONFIG_DAVICOM_PHY=m CONFIG_QSEMI_PHY=m @@ -2807,6 +2834,7 @@ CONFIG_ATH9K_STATION_STATISTICS=y CONFIG_ATH9K_WOW=y CONFIG_ATH9K_RFKILL=y CONFIG_ATH9K_CHANNEL_CONTEXT=y +CONFIG_ATH9K_PCOEM=y CONFIG_ATH9K_HTC=m CONFIG_ATH9K_HTC_DEBUGFS=y CONFIG_CARL9170=m @@ -2893,7 +2921,7 @@ CONFIG_IWLDVM=m CONFIG_IWLMVM=m CONFIG_IWLWIFI_OPMODE_MODULAR=y # CONFIG_IWLWIFI_BCAST_FILTERING is not set -CONFIG_IWLWIFI_UAPSD=y +# CONFIG_IWLWIFI_UAPSD is not set # # Debugging Options @@ -3037,7 +3065,6 @@ CONFIG_X25_ASY=m CONFIG_SBNI=m # CONFIG_SBNI_MULTILINE is not set CONFIG_IEEE802154_DRIVERS=m -# CONFIG_IEEE802154_FAKEHARD is not set CONFIG_IEEE802154_FAKELB=m CONFIG_IEEE802154_AT86RF230=m CONFIG_IEEE802154_MRF24J40=m @@ -3255,10 +3282,14 @@ CONFIG_MOUSE_PS2_TRACKPOINT=y CONFIG_MOUSE_PS2_ELANTECH=y CONFIG_MOUSE_PS2_SENTELIC=y CONFIG_MOUSE_PS2_TOUCHKIT=y +CONFIG_MOUSE_PS2_FOCALTECH=y CONFIG_MOUSE_SERIAL=m CONFIG_MOUSE_APPLETOUCH=m CONFIG_MOUSE_BCM5974=m CONFIG_MOUSE_CYAPA=m +CONFIG_MOUSE_ELAN_I2C=m +CONFIG_MOUSE_ELAN_I2C_I2C=y +CONFIG_MOUSE_ELAN_I2C_SMBUS=y # CONFIG_MOUSE_INPORT is not set CONFIG_MOUSE_LOGIBM=m CONFIG_MOUSE_PC110PAD=m @@ -3327,8 +3358,10 @@ CONFIG_TOUCHSCREEN_DYNAPRO=m CONFIG_TOUCHSCREEN_HAMPSHIRE=m CONFIG_TOUCHSCREEN_EETI=m CONFIG_TOUCHSCREEN_FUJITSU=m +CONFIG_TOUCHSCREEN_GOODIX=m CONFIG_TOUCHSCREEN_ILI210X=m CONFIG_TOUCHSCREEN_GUNZE=m +CONFIG_TOUCHSCREEN_ELAN=m CONFIG_TOUCHSCREEN_ELO=m CONFIG_TOUCHSCREEN_WACOM_W8001=m CONFIG_TOUCHSCREEN_WACOM_I2C=m @@ -3389,6 +3422,7 @@ CONFIG_INPUT_AD714X_I2C=m CONFIG_INPUT_AD714X_SPI=m CONFIG_INPUT_ARIZONA_HAPTICS=m CONFIG_INPUT_BMA150=m +CONFIG_INPUT_E3X0_BUTTON=m CONFIG_INPUT_PCSPKR=m CONFIG_INPUT_MAX77693_HAPTIC=m CONFIG_INPUT_MAX8925_ONKEY=m @@ -3409,7 +3443,10 @@ CONFIG_INPUT_KXTJ9=m CONFIG_INPUT_POWERMATE=m CONFIG_INPUT_YEALINK=m CONFIG_INPUT_CM109=m +CONFIG_INPUT_REGULATOR_HAPTIC=m CONFIG_INPUT_RETU_PWRBUTTON=m +CONFIG_INPUT_TPS65218_PWRBUTTON=m +CONFIG_INPUT_AXP20X_PEK=m CONFIG_INPUT_TWL4030_PWRBUTTON=m CONFIG_INPUT_TWL4030_VIBRA=m CONFIG_INPUT_TWL6040_VIBRA=m @@ -3486,6 +3523,7 @@ CONFIG_N_HDLC=m CONFIG_N_GSM=m CONFIG_TRACE_ROUTER=m CONFIG_TRACE_SINK=m +CONFIG_DEVMEM=y # CONFIG_DEVKMEM is not set # @@ -3520,7 +3558,6 @@ CONFIG_SERIAL_8250_FINTEK=m CONFIG_SERIAL_KGDB_NMI=y CONFIG_SERIAL_MAX3100=m CONFIG_SERIAL_MAX310X=y -CONFIG_SERIAL_MRST_MAX3110=m CONFIG_SERIAL_MFD_HSU=m CONFIG_SERIAL_UARTLITE=m CONFIG_SERIAL_CORE=y @@ -3557,6 +3594,7 @@ CONFIG_IPMI_HANDLER=m CONFIG_IPMI_DEVICE_INTERFACE=m CONFIG_IPMI_SI=m CONFIG_IPMI_SI_PROBE_DEFAULTS=y +CONFIG_IPMI_SSIF=m CONFIG_IPMI_WATCHDOG=m CONFIG_IPMI_POWEROFF=m CONFIG_HW_RANDOM=y @@ -3598,8 +3636,9 @@ CONFIG_TCG_TIS_I2C_NUVOTON=m CONFIG_TCG_NSC=m CONFIG_TCG_ATMEL=m CONFIG_TCG_INFINEON=m -CONFIG_TCG_ST33_I2C=m +CONFIG_TCG_TIS_I2C_ST33=m CONFIG_TCG_XEN=m +CONFIG_TCG_CRB=m CONFIG_TELCLOCK=m CONFIG_DEVPORT=y CONFIG_XILLYBUS=m @@ -3612,7 +3651,7 @@ CONFIG_I2C=y CONFIG_ACPI_I2C_OPREGION=y CONFIG_I2C_BOARDINFO=y CONFIG_I2C_COMPAT=y -CONFIG_I2C_CHARDEV=m +CONFIG_I2C_CHARDEV=y CONFIG_I2C_MUX=m # @@ -3677,6 +3716,7 @@ CONFIG_I2C_XILINX=m # External I2C/SMBus adapter drivers # CONFIG_I2C_DIOLAN_U2C=m +CONFIG_I2C_DLN2=m CONFIG_I2C_PARPORT=m CONFIG_I2C_PARPORT_LIGHT=m CONFIG_I2C_ROBOTFUZZ_OSIF=m @@ -3691,6 +3731,7 @@ CONFIG_I2C_PCA_ISA=m CONFIG_I2C_CROS_EC_TUNNEL=m CONFIG_SCx200_ACB=m CONFIG_I2C_STUB=m +# CONFIG_I2C_SLAVE is not set # CONFIG_I2C_DEBUG_CORE is not set # CONFIG_I2C_DEBUG_ALGO is not set # CONFIG_I2C_DEBUG_BUS is not set @@ -3704,6 +3745,7 @@ CONFIG_SPI_MASTER=y CONFIG_SPI_ALTERA=m CONFIG_SPI_BITBANG=m CONFIG_SPI_BUTTERFLY=m +CONFIG_SPI_DLN2=m CONFIG_SPI_GPIO=m CONFIG_SPI_LM70_LLP=m CONFIG_SPI_OC_TINY=m @@ -3769,8 +3811,12 @@ CONFIG_PINCTRL=y # # Pin controllers # +CONFIG_PINMUX=y +CONFIG_PINCONF=y +CONFIG_GENERIC_PINCONF=y # CONFIG_DEBUG_PINCTRL is not set CONFIG_PINCTRL_BAYTRAIL=y +CONFIG_PINCTRL_CHERRYVIEW=m CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y CONFIG_GPIOLIB=y CONFIG_GPIO_DEVRES=y @@ -3787,7 +3833,6 @@ CONFIG_GPIO_MAX730X=m # Memory mapped GPIO drivers: # CONFIG_GPIO_GENERIC_PLATFORM=m -CONFIG_GPIO_DWAPB=m CONFIG_GPIO_IT8761E=m CONFIG_GPIO_F7188X=m CONFIG_GPIO_SCH311X=m @@ -3859,6 +3904,7 @@ CONFIG_GPIO_MSIC=y # USB GPIO expanders: # CONFIG_GPIO_VIPERBOARD=m +CONFIG_GPIO_DLN2=m CONFIG_W1=m CONFIG_W1_CON=y @@ -3924,6 +3970,7 @@ CONFIG_CHARGER_LP8788=m CONFIG_CHARGER_GPIO=m CONFIG_CHARGER_MANAGER=y CONFIG_CHARGER_MAX14577=m +CONFIG_CHARGER_MAX77693=m CONFIG_CHARGER_MAX8997=m CONFIG_CHARGER_MAX8998=m CONFIG_CHARGER_BQ2415X=m @@ -3931,7 +3978,10 @@ CONFIG_CHARGER_BQ24190=m CONFIG_CHARGER_BQ24735=m CONFIG_CHARGER_SMB347=m CONFIG_CHARGER_TPS65090=m +CONFIG_BATTERY_GAUGE_LTC2941=m +CONFIG_BATTERY_RT5033=m CONFIG_POWER_RESET=y +CONFIG_POWER_RESET_RESTART=y CONFIG_POWER_AVS=y CONFIG_HWMON=y CONFIG_HWMON_VID=m @@ -3984,6 +4034,7 @@ CONFIG_SENSORS_HIH6130=m CONFIG_SENSORS_IBMAEM=m CONFIG_SENSORS_IBMPEX=m CONFIG_SENSORS_IIO_HWMON=m +CONFIG_SENSORS_I5500=m CONFIG_SENSORS_CORETEMP=m CONFIG_SENSORS_IT87=m CONFIG_SENSORS_JC42=m @@ -4030,12 +4081,14 @@ CONFIG_SENSORS_PC87427=m CONFIG_SENSORS_NTC_THERMISTOR=m CONFIG_SENSORS_NCT6683=m CONFIG_SENSORS_NCT6775=m +CONFIG_SENSORS_NCT7802=m CONFIG_SENSORS_PCF8591=m CONFIG_PMBUS=m CONFIG_SENSORS_PMBUS=m CONFIG_SENSORS_ADM1275=m CONFIG_SENSORS_LM25066=m CONFIG_SENSORS_LTC2978=m +CONFIG_SENSORS_LTC2978_REGULATOR=y CONFIG_SENSORS_MAX16064=m CONFIG_SENSORS_MAX34440=m CONFIG_SENSORS_MAX8688=m @@ -4241,6 +4294,8 @@ CONFIG_MFD_DA9052_SPI=y CONFIG_MFD_DA9052_I2C=y CONFIG_MFD_DA9055=y CONFIG_MFD_DA9063=y +CONFIG_MFD_DA9150=m +CONFIG_MFD_DLN2=m CONFIG_MFD_MC13XXX=m CONFIG_MFD_MC13XXX_SPI=m CONFIG_MFD_MC13XXX_I2C=m @@ -4256,7 +4311,6 @@ CONFIG_MFD_88PM800=m CONFIG_MFD_88PM805=m CONFIG_MFD_88PM860X=y CONFIG_MFD_MAX14577=y -CONFIG_MFD_MAX77686=y CONFIG_MFD_MAX77693=y CONFIG_MFD_MAX8907=m CONFIG_MFD_MAX8925=y @@ -4272,6 +4326,7 @@ CONFIG_PCF50633_GPIO=m CONFIG_UCB1400_CORE=m CONFIG_MFD_RDC321X=m CONFIG_MFD_RTSX_PCI=m +CONFIG_MFD_RT5033=m CONFIG_MFD_RTSX_USB=m CONFIG_MFD_RC5T583=y CONFIG_MFD_RN5T618=m @@ -4321,7 +4376,7 @@ CONFIG_MFD_WM831X_I2C=y CONFIG_MFD_WM831X_SPI=y CONFIG_MFD_WM8350=y CONFIG_MFD_WM8350_I2C=y -CONFIG_MFD_WM8994=y +CONFIG_MFD_WM8994=m CONFIG_REGULATOR=y # CONFIG_REGULATOR_DEBUG is not set CONFIG_REGULATOR_FIXED_VOLTAGE=m @@ -4364,9 +4419,7 @@ CONFIG_REGULATOR_MAX8952=m CONFIG_REGULATOR_MAX8973=m CONFIG_REGULATOR_MAX8997=m CONFIG_REGULATOR_MAX8998=m -CONFIG_REGULATOR_MAX77686=m CONFIG_REGULATOR_MAX77693=m -CONFIG_REGULATOR_MAX77802=m CONFIG_REGULATOR_MC13XXX_CORE=m CONFIG_REGULATOR_MC13783=m CONFIG_REGULATOR_MC13892=m @@ -4377,6 +4430,7 @@ CONFIG_REGULATOR_PFUZE100=m CONFIG_REGULATOR_PWM=m CONFIG_REGULATOR_RC5T583=m CONFIG_REGULATOR_RN5T618=m +CONFIG_REGULATOR_RT5033=m CONFIG_REGULATOR_S2MPA01=m CONFIG_REGULATOR_S2MPS11=m CONFIG_REGULATOR_S5M8767=m @@ -4462,16 +4516,9 @@ CONFIG_IR_NUVOTON=m CONFIG_IR_REDRAT3=m CONFIG_IR_STREAMZAP=m CONFIG_IR_WINBOND_CIR=m +CONFIG_IR_IGORPLUGUSB=m CONFIG_IR_IGUANA=m CONFIG_IR_TTUSBIR=m -CONFIG_IR_IMG=m -# CONFIG_IR_IMG_RAW is not set -CONFIG_IR_IMG_HW=y -CONFIG_IR_IMG_NEC=y -CONFIG_IR_IMG_JVC=y -CONFIG_IR_IMG_SONY=y -CONFIG_IR_IMG_SHARP=y -CONFIG_IR_IMG_SANYO=y CONFIG_RC_LOOPBACK=m CONFIG_IR_GPIO_CIR=m CONFIG_MEDIA_USB_SUPPORT=y @@ -4525,6 +4572,7 @@ CONFIG_USB_GSPCA_STV0680=m CONFIG_USB_GSPCA_SUNPLUS=m CONFIG_USB_GSPCA_T613=m CONFIG_USB_GSPCA_TOPRO=m +CONFIG_USB_GSPCA_TOUPTEK=m CONFIG_USB_GSPCA_TV8532=m CONFIG_USB_GSPCA_VC032X=m CONFIG_USB_GSPCA_VICAM=m @@ -4547,7 +4595,6 @@ CONFIG_VIDEO_PVRUSB2_SYSFS=y CONFIG_VIDEO_PVRUSB2_DVB=y # CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set CONFIG_VIDEO_HDPVR=m -CONFIG_VIDEO_TLG2300=m CONFIG_VIDEO_USBVISION=m CONFIG_VIDEO_STK1160_COMMON=m CONFIG_VIDEO_STK1160_AC97=y @@ -4710,6 +4757,7 @@ CONFIG_DVB_MANTIS=m CONFIG_DVB_HOPPER=m CONFIG_DVB_NGENE=m CONFIG_DVB_DDBRIDGE=m +CONFIG_DVB_SMIPCIE=m CONFIG_V4L_PLATFORM_DRIVERS=y CONFIG_VIDEO_CAFE_CCIC=m CONFIG_VIDEO_VIA_CAMERA=m @@ -4721,17 +4769,12 @@ CONFIG_VIDEO_MEM2MEM_DEINTERLACE=m CONFIG_VIDEO_SH_VEU=m CONFIG_V4L_TEST_DRIVERS=y CONFIG_VIDEO_VIVID=m -CONFIG_VIDEO_MEM2MEM_TESTDEV=m +CONFIG_VIDEO_VIM2M=m # # Supported MMC/SDIO adapters # CONFIG_SMS_SDIO_DRV=m -CONFIG_MEDIA_PARPORT_SUPPORT=y -CONFIG_VIDEO_BWQCAM=m -CONFIG_VIDEO_CQCAM=m -CONFIG_VIDEO_PMS=m -CONFIG_VIDEO_W9966=m CONFIG_RADIO_ADAPTERS=y CONFIG_RADIO_TEA575X=m CONFIG_RADIO_SI470X=y @@ -4786,7 +4829,6 @@ CONFIG_MEDIA_COMMON_OPTIONS=y # common driver options # CONFIG_VIDEO_CX2341X=m -CONFIG_VIDEO_BTCX=m CONFIG_VIDEO_TVEEPROM=m CONFIG_CYPRESS_FIRMWARE=m CONFIG_DVB_B2C2_FLEXCOP=m @@ -4933,6 +4975,7 @@ CONFIG_MEDIA_TUNER_TDA18212=m CONFIG_MEDIA_TUNER_E4000=m CONFIG_MEDIA_TUNER_FC2580=m CONFIG_MEDIA_TUNER_M88TS2022=m +CONFIG_MEDIA_TUNER_M88RS6000T=m CONFIG_MEDIA_TUNER_TUA9001=m CONFIG_MEDIA_TUNER_SI2157=m CONFIG_MEDIA_TUNER_IT913X=m @@ -5044,6 +5087,10 @@ CONFIG_DVB_S5H1411=m CONFIG_DVB_S921=m CONFIG_DVB_DIB8000=m CONFIG_DVB_MB86A20S=m + +# +# ISDB-S (satellite) & ISDB-T (terrestrial) frontends +# CONFIG_DVB_TC90522=m # @@ -5063,6 +5110,7 @@ CONFIG_DVB_ISL6405=m CONFIG_DVB_ISL6421=m CONFIG_DVB_ISL6423=m CONFIG_DVB_A8293=m +CONFIG_DVB_SP2=m CONFIG_DVB_LGS8GXX=m CONFIG_DVB_ATBM8830=m CONFIG_DVB_TDA665x=m @@ -5098,6 +5146,7 @@ CONFIG_VGA_SWITCHEROO=y # Direct Rendering Manager # CONFIG_DRM=m +CONFIG_DRM_MIPI_DSI=y CONFIG_DRM_KMS_HELPER=m CONFIG_DRM_KMS_FB_HELPER=y CONFIG_DRM_LOAD_EDID_FIRMWARE=y @@ -5106,10 +5155,10 @@ CONFIG_DRM_TTM=m # # I2C encoder or helper chips # +CONFIG_DRM_I2C_ADV7511=m CONFIG_DRM_I2C_CH7006=m CONFIG_DRM_I2C_SIL164=m CONFIG_DRM_I2C_NXP_TDA998X=m -CONFIG_DRM_PTN3460=m CONFIG_DRM_TDFX=m CONFIG_DRM_R128=m CONFIG_DRM_RADEON=m @@ -5139,6 +5188,11 @@ CONFIG_DRM_AST=m CONFIG_DRM_CIRRUS_QEMU=m CONFIG_DRM_QXL=m # CONFIG_DRM_BOCHS is not set +CONFIG_DRM_PANEL=y + +# +# Display Panels +# # # Frame buffer Devices @@ -5309,6 +5363,8 @@ CONFIG_VGA_CONSOLE=y # CONFIG_VGACON_SOFT_SCROLLBACK is not set CONFIG_MDA_CONSOLE=m CONFIG_DUMMY_CONSOLE=y +CONFIG_DUMMY_CONSOLE_COLUMNS=80 +CONFIG_DUMMY_CONSOLE_ROWS=25 CONFIG_FRAMEBUFFER_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y @@ -5520,10 +5576,15 @@ CONFIG_SND_USB_US122L=m CONFIG_SND_USB_6FIRE=m CONFIG_SND_USB_HIFACE=m CONFIG_SND_BCD2000=m +CONFIG_SND_USB_LINE6=m +CONFIG_SND_USB_POD=m +CONFIG_SND_USB_PODHD=m +CONFIG_SND_USB_TONEPORT=m +CONFIG_SND_USB_VARIAX=m CONFIG_SND_FIREWIRE=y CONFIG_SND_FIREWIRE_LIB=m CONFIG_SND_DICE=m -CONFIG_SND_FIREWIRE_SPEAKERS=m +CONFIG_SND_OXFW=m CONFIG_SND_ISIGHT=m CONFIG_SND_SCS1X=m CONFIG_SND_FIREWORKS=m @@ -5551,6 +5612,9 @@ CONFIG_SND_SOC_FSL_ESAI=m CONFIG_SND_SOC_IMX_AUDMUX=m CONFIG_SND_MFLD_MACHINE=m CONFIG_SND_SST_MFLD_PLATFORM=m +CONFIG_SND_SST_IPC=m +CONFIG_SND_SST_IPC_PCI=m +CONFIG_SND_SST_IPC_ACPI=m CONFIG_SND_SOC_INTEL_SST=m CONFIG_SND_SOC_INTEL_SST_ACPI=m CONFIG_SND_SOC_INTEL_HASWELL=m @@ -5559,6 +5623,10 @@ CONFIG_SND_SOC_INTEL_HASWELL_MACH=m CONFIG_SND_SOC_INTEL_BYT_RT5640_MACH=m CONFIG_SND_SOC_INTEL_BYT_MAX98090_MACH=m CONFIG_SND_SOC_INTEL_BROADWELL_MACH=m +CONFIG_SND_SOC_INTEL_BYTCR_RT5640_MACH=m +CONFIG_SND_SOC_INTEL_CHT_BSW_RT5672_MACH=m +CONFIG_SND_SOC_INTEL_CHT_BSW_RT5645_MACH=m +CONFIG_SND_SOC_XTFPGA_I2S=m CONFIG_SND_SOC_I2C_AND_SPI=m # @@ -5571,12 +5639,16 @@ CONFIG_SND_SOC_AK4642=m CONFIG_SND_SOC_AK5386=m CONFIG_SND_SOC_ALC5623=m CONFIG_SND_SOC_CS35L32=m +CONFIG_SND_SOC_CS42L51=m +CONFIG_SND_SOC_CS42L51_I2C=m CONFIG_SND_SOC_CS42L52=m CONFIG_SND_SOC_CS42L56=m CONFIG_SND_SOC_CS42L73=m CONFIG_SND_SOC_CS4265=m CONFIG_SND_SOC_CS4270=m CONFIG_SND_SOC_CS4271=m +CONFIG_SND_SOC_CS4271_I2C=m +CONFIG_SND_SOC_CS4271_SPI=m CONFIG_SND_SOC_CS42XX8=m CONFIG_SND_SOC_CS42XX8_I2C=m CONFIG_SND_SOC_HDMI_CODEC=m @@ -5589,7 +5661,11 @@ CONFIG_SND_SOC_PCM512x_I2C=m CONFIG_SND_SOC_PCM512x_SPI=m CONFIG_SND_SOC_RL6231=m CONFIG_SND_SOC_RT286=m +CONFIG_SND_SOC_RT5631=m CONFIG_SND_SOC_RT5640=m +CONFIG_SND_SOC_RT5645=m +CONFIG_SND_SOC_RT5670=m +# CONFIG_SND_SOC_RT5677_SPI is not set CONFIG_SND_SOC_SGTL5000=m CONFIG_SND_SOC_SI476X=m CONFIG_SND_SOC_SIGMADSP=m @@ -5601,11 +5677,17 @@ CONFIG_SND_SOC_SSM2602=m CONFIG_SND_SOC_SSM2602_SPI=m CONFIG_SND_SOC_SSM2602_I2C=m CONFIG_SND_SOC_SSM4567=m +CONFIG_SND_SOC_STA32X=m CONFIG_SND_SOC_STA350=m CONFIG_SND_SOC_TAS2552=m CONFIG_SND_SOC_TAS5086=m +CONFIG_SND_SOC_TFA9879=m +CONFIG_SND_SOC_TLV320AIC23=m +CONFIG_SND_SOC_TLV320AIC23_I2C=m +CONFIG_SND_SOC_TLV320AIC23_SPI=m CONFIG_SND_SOC_TLV320AIC31XX=m CONFIG_SND_SOC_TLV320AIC3X=m +CONFIG_SND_SOC_TS3A227E=m CONFIG_SND_SOC_WM8510=m CONFIG_SND_SOC_WM8523=m CONFIG_SND_SOC_WM8580=m @@ -5631,6 +5713,7 @@ CONFIG_AC97_BUS=m # HID support # CONFIG_HID=m +CONFIG_HID_BATTERY_STRENGTH=y CONFIG_HIDRAW=y CONFIG_UHID=m CONFIG_HID_GENERIC=m @@ -5645,6 +5728,7 @@ CONFIG_HID_APPLE=m CONFIG_HID_APPLEIR=m CONFIG_HID_AUREAL=m CONFIG_HID_BELKIN=m +CONFIG_HID_BETOP_FF=m CONFIG_HID_CHERRY=m CONFIG_HID_CHICONY=m CONFIG_HID_PRODIKEYS=m @@ -5672,6 +5756,7 @@ CONFIG_HID_LCPOWER=m CONFIG_HID_LENOVO=m CONFIG_HID_LOGITECH=m CONFIG_HID_LOGITECH_DJ=m +CONFIG_HID_LOGITECH_HIDPP=m CONFIG_LOGITECH_FF=y CONFIG_LOGIRUMBLEPAD2_FF=y CONFIG_LOGIG940_FF=y @@ -5692,6 +5777,7 @@ CONFIG_HID_PICOLCD_BACKLIGHT=y CONFIG_HID_PICOLCD_LCD=y CONFIG_HID_PICOLCD_LEDS=y CONFIG_HID_PICOLCD_CIR=y +CONFIG_HID_PLANTRONICS=m CONFIG_HID_PRIMAX=m CONFIG_HID_ROCCAT=m CONFIG_HID_SAITEK=m @@ -5772,7 +5858,6 @@ CONFIG_USB_EHCI_PCI=y CONFIG_USB_EHCI_HCD_PLATFORM=y CONFIG_USB_OXU210HP_HCD=m CONFIG_USB_ISP116X_HCD=m -CONFIG_USB_ISP1760_HCD=m CONFIG_USB_ISP1362_HCD=m CONFIG_USB_FUSBH200_HCD=m CONFIG_USB_FOTG210_HCD=m @@ -5838,9 +5923,10 @@ CONFIG_USB_MUSB_HDRC=m # CONFIG_USB_MUSB_HOST is not set # CONFIG_USB_MUSB_GADGET is not set CONFIG_USB_MUSB_DUAL_ROLE=y -CONFIG_USB_MUSB_TUSB6010=m -CONFIG_USB_MUSB_UX500=m -# CONFIG_USB_UX500_DMA is not set + +# +# Platform Glue Layer +# CONFIG_MUSB_PIO_ONLY=y CONFIG_USB_DWC3=m # CONFIG_USB_DWC3_HOST is not set @@ -5858,20 +5944,25 @@ CONFIG_USB_DWC3_PCI=m # CONFIG_USB_DWC3_DEBUG is not set CONFIG_DWC3_HOST_USB3_LPM_ENABLE=y CONFIG_USB_DWC2=y -CONFIG_USB_DWC2_HOST=m -CONFIG_USB_DWC2_PLATFORM=y -CONFIG_USB_DWC2_PCI=y +CONFIG_USB_DWC2_HOST=y # -# Gadget mode requires USB Gadget support to be enabled +# Gadget/Dual-role mode requires USB Gadget support to be enabled # -CONFIG_USB_DWC2_PERIPHERAL=m +CONFIG_USB_DWC2_PLATFORM=y +CONFIG_USB_DWC2_PCI=y # CONFIG_USB_DWC2_DEBUG is not set # CONFIG_USB_DWC2_TRACK_MISSED_SOFS is not set CONFIG_USB_CHIPIDEA=m CONFIG_USB_CHIPIDEA_UDC=y CONFIG_USB_CHIPIDEA_HOST=y # CONFIG_USB_CHIPIDEA_DEBUG is not set +CONFIG_USB_ISP1760=m +CONFIG_USB_ISP1760_HCD=y +CONFIG_USB_ISP1761_UDC=y +# CONFIG_USB_ISP1760_HOST_ROLE is not set +# CONFIG_USB_ISP1760_GADGET_ROLE is not set +CONFIG_USB_ISP1760_DUAL_ROLE=y # # USB port drivers @@ -6004,6 +6095,12 @@ CONFIG_USB_PXA27X=m CONFIG_USB_MV_UDC=m CONFIG_USB_MV_U3D=m # CONFIG_USB_M66592 is not set +CONFIG_USB_BDC_UDC=m + +# +# Platform Support +# +CONFIG_USB_BDC_PCI=m CONFIG_USB_AMD5536UDC=m CONFIG_USB_NET2272=m CONFIG_USB_NET2272_DMA=y @@ -6027,7 +6124,10 @@ CONFIG_USB_F_RNDIS=m CONFIG_USB_F_MASS_STORAGE=m CONFIG_USB_F_FS=m CONFIG_USB_F_UAC1=m +CONFIG_USB_F_UAC2=m CONFIG_USB_F_UVC=m +CONFIG_USB_F_MIDI=m +CONFIG_USB_F_HID=m CONFIG_USB_CONFIGFS=m CONFIG_USB_CONFIGFS_SERIAL=y CONFIG_USB_CONFIGFS_ACM=y @@ -6041,6 +6141,11 @@ CONFIG_USB_CONFIGFS_PHONET=y CONFIG_USB_CONFIGFS_MASS_STORAGE=y CONFIG_USB_CONFIGFS_F_LB_SS=y CONFIG_USB_CONFIGFS_F_FS=y +CONFIG_USB_CONFIGFS_F_UAC1=y +CONFIG_USB_CONFIGFS_F_UAC2=y +CONFIG_USB_CONFIGFS_F_MIDI=y +CONFIG_USB_CONFIGFS_F_HID=y +CONFIG_USB_CONFIGFS_F_UVC=y CONFIG_USB_ZERO=m CONFIG_USB_AUDIO=m CONFIG_GADGET_UAC1=y @@ -6093,8 +6198,6 @@ CONFIG_MMC_SDHCI_PCI=m CONFIG_MMC_RICOH_MMC=y CONFIG_MMC_SDHCI_ACPI=m CONFIG_MMC_SDHCI_PLTFM=m -CONFIG_MMC_SDHCI_PXAV3=m -CONFIG_MMC_SDHCI_PXAV2=m CONFIG_MMC_WBSD=m CONFIG_MMC_TIFM_SD=m CONFIG_MMC_SDRICOH_CS=m @@ -6105,6 +6208,7 @@ CONFIG_MMC_USHC=m CONFIG_MMC_USDHI6ROL0=m CONFIG_MMC_REALTEK_PCI=m CONFIG_MMC_REALTEK_USB=m +CONFIG_MMC_TOSHIBA_PCI=m CONFIG_MEMSTICK=m # CONFIG_MEMSTICK_DEBUG is not set @@ -6125,6 +6229,7 @@ CONFIG_MEMSTICK_REALTEK_PCI=m CONFIG_MEMSTICK_REALTEK_USB=m CONFIG_NEW_LEDS=y CONFIG_LEDS_CLASS=y +CONFIG_LEDS_CLASS_FLASH=m # # LED drivers @@ -6145,6 +6250,7 @@ CONFIG_LEDS_LP5523=m CONFIG_LEDS_LP5562=m CONFIG_LEDS_LP8501=m CONFIG_LEDS_LP8788=m +CONFIG_LEDS_LP8860=m CONFIG_LEDS_CLEVO_MAIL=m CONFIG_LEDS_PCA955X=m CONFIG_LEDS_PCA963X=m @@ -6194,6 +6300,7 @@ CONFIG_INFINIBAND=m CONFIG_INFINIBAND_USER_MAD=m CONFIG_INFINIBAND_USER_ACCESS=m CONFIG_INFINIBAND_USER_MEM=y +CONFIG_INFINIBAND_ON_DEMAND_PAGING=y CONFIG_INFINIBAND_ADDR_TRANS=y CONFIG_INFINIBAND_MTHCA=m # CONFIG_INFINIBAND_MTHCA_DEBUG is not set @@ -6221,6 +6328,8 @@ CONFIG_EDAC=y CONFIG_EDAC_DECODE_MCE=m CONFIG_EDAC_MCE_INJ=m CONFIG_EDAC_MM_EDAC=m +CONFIG_EDAC_AMD64=m +# CONFIG_EDAC_AMD64_ERROR_INJECTION is not set CONFIG_EDAC_AMD76X=m CONFIG_EDAC_E7XXX=m CONFIG_EDAC_E752X=m @@ -6258,8 +6367,10 @@ CONFIG_RTC_INTF_DEV=y # CONFIG_RTC_DRV_88PM860X=m CONFIG_RTC_DRV_88PM80X=m +CONFIG_RTC_DRV_ABB5ZES3=m CONFIG_RTC_DRV_DS1307=m CONFIG_RTC_DRV_DS1374=m +CONFIG_RTC_DRV_DS1374_WDT=y CONFIG_RTC_DRV_DS1672=m CONFIG_RTC_DRV_DS3232=m CONFIG_RTC_DRV_LP8788=m @@ -6268,8 +6379,6 @@ CONFIG_RTC_DRV_MAX8907=m CONFIG_RTC_DRV_MAX8925=m CONFIG_RTC_DRV_MAX8998=m CONFIG_RTC_DRV_MAX8997=m -CONFIG_RTC_DRV_MAX77686=m -CONFIG_RTC_DRV_MAX77802=m CONFIG_RTC_DRV_RS5C372=m CONFIG_RTC_DRV_ISL1208=m CONFIG_RTC_DRV_ISL12022=m @@ -6322,6 +6431,14 @@ CONFIG_RTC_DRV_VRTC=m CONFIG_RTC_DRV_DS1286=m CONFIG_RTC_DRV_DS1511=m CONFIG_RTC_DRV_DS1553=m +CONFIG_RTC_DRV_DS1685_FAMILY=m +CONFIG_RTC_DRV_DS1685=y +# CONFIG_RTC_DRV_DS1689 is not set +# CONFIG_RTC_DRV_DS17285 is not set +# CONFIG_RTC_DRV_DS17485 is not set +# CONFIG_RTC_DRV_DS17885 is not set +# CONFIG_RTC_DS1685_PROC_REGS is not set +# CONFIG_RTC_DS1685_SYSFS_REGS is not set CONFIG_RTC_DRV_DS1742=m CONFIG_RTC_DRV_DS2404=m CONFIG_RTC_DRV_DA9052=m @@ -6393,6 +6510,8 @@ CONFIG_VFIO_IOMMU_TYPE1=m CONFIG_VFIO=m CONFIG_VFIO_PCI=m CONFIG_VFIO_PCI_VGA=y +CONFIG_VFIO_PCI_MMAP=y +CONFIG_VFIO_PCI_INTX=y CONFIG_VIRT_DRIVERS=y CONFIG_VIRTIO=y @@ -6400,6 +6519,7 @@ CONFIG_VIRTIO=y # Virtio drivers # CONFIG_VIRTIO_PCI=y +CONFIG_VIRTIO_PCI_LEGACY=y CONFIG_VIRTIO_BALLOON=y CONFIG_VIRTIO_MMIO=y CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y @@ -6417,6 +6537,7 @@ CONFIG_HYPERV_BALLOON=m CONFIG_XEN_BALLOON=y CONFIG_XEN_SELFBALLOONING=y CONFIG_XEN_BALLOON_MEMORY_HOTPLUG=y +CONFIG_XEN_BALLOON_MEMORY_HOTPLUG_LIMIT=4 CONFIG_XEN_SCRUB_PAGES=y CONFIG_XEN_DEV_EVTCHN=m CONFIG_XEN_BACKEND=y @@ -6493,10 +6614,9 @@ CONFIG_COMEDI_PCMMIO=m CONFIG_COMEDI_PCMUIO=m CONFIG_COMEDI_MULTIQ3=m CONFIG_COMEDI_S526=m -CONFIG_COMEDI_PCI_DRIVERS=y +CONFIG_COMEDI_PCI_DRIVERS=m CONFIG_COMEDI_8255_PCI=m CONFIG_COMEDI_ADDI_WATCHDOG=m -CONFIG_COMEDI_ADDI_APCI_035=m CONFIG_COMEDI_ADDI_APCI_1032=m CONFIG_COMEDI_ADDI_APCI_1500=m CONFIG_COMEDI_ADDI_APCI_1516=m @@ -6549,7 +6669,7 @@ CONFIG_COMEDI_RTD520=m CONFIG_COMEDI_S626=m CONFIG_COMEDI_MITE=m CONFIG_COMEDI_NI_TIOCMD=m -CONFIG_COMEDI_PCMCIA_DRIVERS=y +CONFIG_COMEDI_PCMCIA_DRIVERS=m CONFIG_COMEDI_CB_DAS16_CS=m CONFIG_COMEDI_DAS08_CS=m CONFIG_COMEDI_NI_DAQ_700_CS=m @@ -6557,7 +6677,7 @@ CONFIG_COMEDI_NI_DAQ_DIO24_CS=m CONFIG_COMEDI_NI_LABPC_CS=m CONFIG_COMEDI_NI_MIO_CS=m CONFIG_COMEDI_QUATECH_DAQP_CS=m -CONFIG_COMEDI_USB_DRIVERS=y +CONFIG_COMEDI_USB_DRIVERS=m CONFIG_COMEDI_DT9812=m CONFIG_COMEDI_NI_USB6501=m CONFIG_COMEDI_USBDUX=m @@ -6569,6 +6689,7 @@ CONFIG_COMEDI_KCOMEDILIB=m CONFIG_COMEDI_AMPLC_DIO200=m CONFIG_COMEDI_AMPLC_PC236=m CONFIG_COMEDI_DAS08=m +CONFIG_COMEDI_ISADMA=m CONFIG_COMEDI_NI_LABPC=m CONFIG_COMEDI_NI_LABPC_ISADMA=m CONFIG_COMEDI_NI_TIO=m @@ -6589,8 +6710,6 @@ CONFIG_R8723AU=m CONFIG_8723AU_AP_MODE=y CONFIG_8723AU_BT_COEXIST=y CONFIG_RTS5208=m -CONFIG_LINE6_USB=m -# CONFIG_LINE6_USB_IMPULSE_RESPONSE is not set CONFIG_VT6655=m CONFIG_VT6656=m @@ -6691,8 +6810,8 @@ CONFIG_IIO_PERIODIC_RTC_TRIGGER=m CONFIG_IIO_SIMPLE_DUMMY=m # CONFIG_IIO_SIMPLE_DUMMY_EVENTS is not set # CONFIG_IIO_SIMPLE_DUMMY_BUFFER is not set +CONFIG_FB_SM7XX=m CONFIG_FB_XGI=m -CONFIG_BCM_WIMAX=m CONFIG_FT1000=m CONFIG_FT1000_USB=m CONFIG_FT1000_PCMCIA=m @@ -6716,7 +6835,6 @@ CONFIG_SPEAKUP_SYNTH_SOFT=m CONFIG_SPEAKUP_SYNTH_SPKOUT=m CONFIG_SPEAKUP_SYNTH_TXPRT=m CONFIG_SPEAKUP_SYNTH_DUMMY=m -CONFIG_TOUCHSCREEN_CLEARPAD_TM1217=m CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4=m CONFIG_STAGING_MEDIA=y CONFIG_I2C_BCM2048=m @@ -6724,10 +6842,10 @@ CONFIG_DVB_CXD2099=m CONFIG_VIDEO_DT3155=m # CONFIG_DT3155_CCIR is not set CONFIG_DT3155_STREAMING=y -# CONFIG_VIDEO_TCM825X is not set +CONFIG_DVB_MN88472=m +CONFIG_DVB_MN88473=m CONFIG_LIRC_STAGING=y CONFIG_LIRC_BT829=m -CONFIG_LIRC_IGORPLUGUSB=m CONFIG_LIRC_IMON=m CONFIG_LIRC_PARALLEL=m CONFIG_LIRC_SASEM=m @@ -6739,7 +6857,6 @@ CONFIG_LIRC_ZILOG=m # # Android # -# CONFIG_ANDROID is not set CONFIG_USB_WPAN_HCD=m CONFIG_WIMAX_GDM72XX=m CONFIG_WIMAX_GDM72XX_QOS=y @@ -6765,6 +6882,44 @@ CONFIG_LNET_XPRT_IB=m CONFIG_DGNC=m CONFIG_DGAP=m CONFIG_GS_FPGABOOT=m +CONFIG_FB_TFT=m +CONFIG_FB_TFT_AGM1264K_FL=m +CONFIG_FB_TFT_BD663474=m +CONFIG_FB_TFT_HX8340BN=m +CONFIG_FB_TFT_HX8347D=m +CONFIG_FB_TFT_HX8353D=m +CONFIG_FB_TFT_ILI9320=m +CONFIG_FB_TFT_ILI9325=m +CONFIG_FB_TFT_ILI9340=m +CONFIG_FB_TFT_ILI9341=m +CONFIG_FB_TFT_ILI9481=m +CONFIG_FB_TFT_ILI9486=m +CONFIG_FB_TFT_PCD8544=m +CONFIG_FB_TFT_RA8875=m +CONFIG_FB_TFT_S6D02A1=m +CONFIG_FB_TFT_S6D1121=m +CONFIG_FB_TFT_SSD1289=m +CONFIG_FB_TFT_SSD1306=m +CONFIG_FB_TFT_SSD1331=m +CONFIG_FB_TFT_SSD1351=m +CONFIG_FB_TFT_ST7735R=m +CONFIG_FB_TFT_TINYLCD=m +CONFIG_FB_TFT_TLS8204=m +CONFIG_FB_TFT_UC1701=m +CONFIG_FB_TFT_UPD161704=m +CONFIG_FB_TFT_WATTEROTT=m +CONFIG_FB_FLEX=m +CONFIG_FB_TFT_FBTFT_DEVICE=m +CONFIG_I2O=m +CONFIG_I2O_LCT_NOTIFY_ON_CHANGES=y +CONFIG_I2O_EXT_ADAPTEC=y +CONFIG_I2O_EXT_ADAPTEC_DMA64=y +CONFIG_I2O_CONFIG=m +# CONFIG_I2O_CONFIG_OLD_IOCTL is not set +CONFIG_I2O_BUS=m +CONFIG_I2O_BLOCK=m +CONFIG_I2O_SCSI=m +CONFIG_I2O_PROC=m CONFIG_X86_PLATFORM_DEVICES=y CONFIG_ACER_WMI=m CONFIG_ACERHDF=m @@ -6826,11 +6981,6 @@ CONFIG_PVPANIC=m CONFIG_CHROME_PLATFORMS=y CONFIG_CHROMEOS_LAPTOP=m CONFIG_CHROMEOS_PSTORE=m - -# -# SOC (System On Chip) specific Drivers -# -CONFIG_SOC_TI=y CONFIG_CLKDEV_LOOKUP=y CONFIG_HAVE_CLK_PREPARE=y CONFIG_COMMON_CLK=y @@ -6839,14 +6989,12 @@ CONFIG_COMMON_CLK=y # Common Clock Framework # CONFIG_COMMON_CLK_WM831X=m -CONFIG_COMMON_CLK_MAX_GEN=y -CONFIG_COMMON_CLK_MAX77686=m -CONFIG_COMMON_CLK_MAX77802=m CONFIG_COMMON_CLK_SI5351=m CONFIG_COMMON_CLK_S2MPS11=m CONFIG_CLK_TWL6040=m CONFIG_COMMON_CLK_PALMAS=m # CONFIG_COMMON_CLK_PXA is not set +CONFIG_COMMON_CLK_CDCE706=m # # Hardware Spinlock drivers @@ -6866,8 +7014,15 @@ CONFIG_DW_APB_TIMER=y # CONFIG_SH_TIMER_TMU is not set # CONFIG_EM_TIMER_STI is not set CONFIG_MAILBOX=y +CONFIG_PCC=y +CONFIG_ALTERA_MBOX=m CONFIG_IOMMU_API=y CONFIG_IOMMU_SUPPORT=y + +# +# Generic IOMMU Pagetable Support +# +CONFIG_IOMMU_IOVA=y CONFIG_DMAR_TABLE=y CONFIG_INTEL_IOMMU=y # CONFIG_INTEL_IOMMU_DEFAULT_ON is not set @@ -6886,6 +7041,7 @@ CONFIG_STE_MODEM_RPROC=m # # SOC (System On Chip) specific Drivers # +CONFIG_SOC_TI=y CONFIG_PM_DEVFREQ=y # @@ -6899,6 +7055,7 @@ CONFIG_DEVFREQ_GOV_USERSPACE=y # # DEVFREQ Drivers # +CONFIG_PM_DEVFREQ_EVENT=y CONFIG_EXTCON=y # @@ -6934,6 +7091,9 @@ CONFIG_IIO_ST_ACCEL_SPI_3AXIS=m CONFIG_KXSD9=m CONFIG_MMA8452=m CONFIG_KXCJK1013=m +CONFIG_MMA9551_CORE=m +CONFIG_MMA9551=m +CONFIG_MMA9553=m # # Analog to digital converters @@ -6948,6 +7108,8 @@ CONFIG_AD7793=m CONFIG_AD7887=m CONFIG_AD7923=m CONFIG_AD799X=m +CONFIG_AXP288_ADC=m +CONFIG_CC10001_ADC=m CONFIG_LP8788_ADC=m CONFIG_MAX1027=m CONFIG_MAX1363=m @@ -6955,6 +7117,8 @@ CONFIG_MCP320X=m CONFIG_MCP3422=m CONFIG_MEN_Z188_ADC=m CONFIG_NAU7802=m +CONFIG_QCOM_SPMI_IADC=m +CONFIG_QCOM_SPMI_VADC=m CONFIG_TI_ADC081C=m CONFIG_TI_ADC128S052=m CONFIG_TI_AM335X_ADC=m @@ -6972,6 +7136,12 @@ CONFIG_AD8366=m # CONFIG_HID_SENSOR_IIO_COMMON=m CONFIG_HID_SENSOR_IIO_TRIGGER=m + +# +# SSP Sensor Common +# +CONFIG_IIO_SSP_SENSORS_COMMONS=m +CONFIG_IIO_SSP_SENSORHUB=m CONFIG_IIO_ST_SENSORS_I2C=m CONFIG_IIO_ST_SENSORS_SPI=m CONFIG_IIO_ST_SENSORS_CORE=m @@ -7030,12 +7200,14 @@ CONFIG_ITG3200=m # CONFIG_DHT11=m CONFIG_SI7005=m +CONFIG_SI7020=m # # Inertial measurement units # CONFIG_ADIS16400=m CONFIG_ADIS16480=m +CONFIG_KMX61=m CONFIG_INV_MPU6050_IIO=m CONFIG_IIO_ADIS_LIB=m CONFIG_IIO_ADIS_LIB_BUFFER=y @@ -7047,11 +7219,13 @@ CONFIG_ADJD_S311=m CONFIG_AL3320A=m CONFIG_APDS9300=m CONFIG_CM32181=m +CONFIG_CM3232=m CONFIG_CM36651=m CONFIG_GP2AP020A00F=m CONFIG_ISL29125=m CONFIG_HID_SENSOR_ALS=m CONFIG_HID_SENSOR_PROX=m +CONFIG_JSA1212=m CONFIG_SENSORS_LM3533=m CONFIG_LTR501=m CONFIG_TCS3414=m @@ -7086,6 +7260,7 @@ CONFIG_IIO_SYSFS_TRIGGER=m # # Pressure sensors # +CONFIG_BMP280=m CONFIG_HID_SENSOR_PRESS=m CONFIG_MPL115=m CONFIG_MPL3115=m @@ -7100,6 +7275,11 @@ CONFIG_T5403=m CONFIG_AS3935=m # +# Proximity sensors +# +CONFIG_SX9500=m + +# # Temperature sensors # CONFIG_MLX90614=m @@ -7158,6 +7338,11 @@ CONFIG_RAS=y CONFIG_THUNDERBOLT=m # +# Android +# +# CONFIG_ANDROID is not set + +# # Firmware Drivers # CONFIG_EDD=y @@ -7228,6 +7413,7 @@ CONFIG_BTRFS_FS_POSIX_ACL=y # CONFIG_BTRFS_DEBUG is not set # CONFIG_BTRFS_ASSERT is not set CONFIG_NILFS2_FS=m +CONFIG_FS_DAX=y CONFIG_FS_POSIX_ACL=y CONFIG_EXPORTFS=y CONFIG_FILE_LOCKING=y @@ -7298,6 +7484,7 @@ CONFIG_TMPFS_XATTR=y CONFIG_HUGETLBFS=y CONFIG_HUGETLB_PAGE=y CONFIG_CONFIGFS_FS=m +CONFIG_EFIVAR_FS=y CONFIG_MISC_FILESYSTEMS=y CONFIG_ADFS_FS=m # CONFIG_ADFS_FS_RW is not set @@ -7342,6 +7529,7 @@ CONFIG_SQUASHFS_FILE_DIRECT=y CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y CONFIG_SQUASHFS_XATTR=y CONFIG_SQUASHFS_ZLIB=y +# CONFIG_SQUASHFS_LZ4 is not set CONFIG_SQUASHFS_LZO=y CONFIG_SQUASHFS_XZ=y # CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set @@ -7361,6 +7549,7 @@ CONFIG_ROMFS_BACKED_BY_BLOCK=y CONFIG_ROMFS_ON_BLOCK=y CONFIG_PSTORE=y # CONFIG_PSTORE_CONSOLE is not set +# CONFIG_PSTORE_PMSG is not set # CONFIG_PSTORE_FTRACE is not set CONFIG_PSTORE_RAM=m CONFIG_SYSV_FS=m @@ -7375,7 +7564,7 @@ CONFIG_F2FS_FS_XATTR=y CONFIG_F2FS_FS_POSIX_ACL=y CONFIG_F2FS_FS_SECURITY=y # CONFIG_F2FS_CHECK_FS is not set -CONFIG_EFIVAR_FS=y +# CONFIG_F2FS_IO_TRACE is not set CONFIG_ORE=m CONFIG_NETWORK_FILESYSTEMS=y CONFIG_NFS_FS=m @@ -7389,6 +7578,7 @@ CONFIG_NFS_V4_2=y CONFIG_PNFS_FILE_LAYOUT=m CONFIG_PNFS_BLOCK=m CONFIG_PNFS_OBJLAYOUT=m +CONFIG_PNFS_FLEXFILE_LAYOUT=m CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN="kernel.org" CONFIG_NFS_V4_1_MIGRATION=y CONFIG_NFS_V4_SECURITY_LABEL=y @@ -7401,6 +7591,7 @@ CONFIG_NFSD_V2_ACL=y CONFIG_NFSD_V3=y CONFIG_NFSD_V3_ACL=y CONFIG_NFSD_V4=y +CONFIG_NFSD_PNFS=y CONFIG_NFSD_V4_SECURITY_LABEL=y # CONFIG_NFSD_FAULT_INJECTION is not set CONFIG_GRACE_PERIOD=m @@ -7526,6 +7717,7 @@ CONFIG_FRAME_WARN=1024 # CONFIG_STRIP_ASM_SYMS is not set # CONFIG_READABLE_ASM is not set CONFIG_UNUSED_SYMBOLS=y +# CONFIG_PAGE_OWNER is not set CONFIG_DEBUG_FS=y # CONFIG_HEADERS_CHECK is not set # CONFIG_DEBUG_SECTION_MISMATCH is not set @@ -7539,6 +7731,7 @@ CONFIG_DEBUG_KERNEL=y # # Memory Debugging # +# CONFIG_PAGE_EXTENSION is not set # CONFIG_DEBUG_PAGEALLOC is not set # CONFIG_DEBUG_OBJECTS is not set # CONFIG_SLUB_DEBUG_ON is not set @@ -7575,7 +7768,7 @@ CONFIG_PANIC_ON_OOPS_VALUE=0 CONFIG_PANIC_TIMEOUT=0 CONFIG_SCHED_DEBUG=y CONFIG_SCHEDSTATS=y -# CONFIG_SCHED_STACK_END_CHECK is not set +CONFIG_SCHED_STACK_END_CHECK=y CONFIG_TIMER_STATS=y # @@ -7675,6 +7868,7 @@ CONFIG_INTERVAL_TREE_TEST=m CONFIG_PERCPU_TEST=m # CONFIG_ATOMIC64_SELFTEST is not set CONFIG_ASYNC_RAID6_TEST=m +CONFIG_TEST_HEXDUMP=m CONFIG_TEST_STRING_HELPERS=m CONFIG_TEST_KSTRTOX=m # CONFIG_TEST_RHASHTABLE is not set @@ -7692,6 +7886,7 @@ CONFIG_KGDB_SERIAL_CONSOLE=y # CONFIG_KGDB_TESTS is not set CONFIG_KGDB_LOW_LEVEL_TRAP=y CONFIG_KGDB_KDB=y +CONFIG_KDB_DEFAULT_ENABLE=0x1 CONFIG_KDB_KEYBOARD=y CONFIG_KDB_CONTINUE_CATASTROPHIC=0 CONFIG_STRICT_DEVMEM=y @@ -7733,7 +7928,6 @@ CONFIG_PERSISTENT_KEYRINGS=y CONFIG_BIG_KEYS=y CONFIG_TRUSTED_KEYS=y CONFIG_ENCRYPTED_KEYS=y -CONFIG_KEYS_DEBUG_PROC_KEYS=y # CONFIG_SECURITY_DMESG_RESTRICT is not set CONFIG_SECURITY=y CONFIG_SECURITYFS=y @@ -7752,6 +7946,7 @@ CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 # CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set CONFIG_SECURITY_SMACK=y # CONFIG_SECURITY_SMACK_BRINGUP is not set +CONFIG_SECURITY_SMACK_NETFILTER=y CONFIG_SECURITY_TOMOYO=y CONFIG_SECURITY_TOMOYO_MAX_ACCEPT_ENTRY=2048 CONFIG_SECURITY_TOMOYO_MAX_AUDIT_LOG=1024 @@ -7781,6 +7976,7 @@ CONFIG_IMA_DEFAULT_HASH_SHA1=y CONFIG_IMA_DEFAULT_HASH="sha1" CONFIG_IMA_APPRAISE=y CONFIG_IMA_TRUSTED_KEYRING=y +# CONFIG_IMA_LOAD_X509 is not set CONFIG_EVM=y CONFIG_EVM_ATTR_FSUUID=y CONFIG_EVM_EXTRA_SMACK_XATTRS=y @@ -7925,6 +8121,7 @@ CONFIG_CRYPTO_DRBG=m CONFIG_CRYPTO_USER_API=m CONFIG_CRYPTO_USER_API_HASH=m CONFIG_CRYPTO_USER_API_SKCIPHER=m +CONFIG_CRYPTO_USER_API_RNG=m CONFIG_CRYPTO_HASH_INFO=y CONFIG_CRYPTO_HW=y CONFIG_CRYPTO_DEV_PADLOCK=y @@ -7953,6 +8150,7 @@ CONFIG_KVM_ASYNC_PF=y CONFIG_HAVE_KVM_MSI=y CONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT=y CONFIG_KVM_VFIO=y +CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT=y CONFIG_VIRTUALIZATION=y CONFIG_KVM=m CONFIG_KVM_INTEL=m @@ -7967,6 +8165,7 @@ CONFIG_BINARY_PRINTF=y # CONFIG_RAID6_PQ=m CONFIG_BITREVERSE=y +# CONFIG_HAVE_ARCH_BITREVERSE is not set CONFIG_RATIONAL=y CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y diff --git a/gnu/packages/linux-libre-x86_64.conf b/gnu/packages/linux-libre-x86_64.conf index 0b865808ab..04cf66ea72 100644 --- a/gnu/packages/linux-libre-x86_64.conf +++ b/gnu/packages/linux-libre-x86_64.conf @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/x86 3.18.4-gnu Kernel Configuration +# Linux/x86 4.0.0-gnu Kernel Configuration # CONFIG_64BIT=y CONFIG_X86_64=y @@ -89,6 +89,7 @@ CONFIG_GENERIC_IRQ_LEGACY_ALLOC_HWIRQ=y CONFIG_GENERIC_PENDING_IRQ=y CONFIG_GENERIC_IRQ_CHIP=y CONFIG_IRQ_DOMAIN=y +CONFIG_GENERIC_MSI_IRQ=y # CONFIG_IRQ_DOMAIN_DEBUG is not set CONFIG_IRQ_FORCED_THREADING=y CONFIG_SPARSE_IRQ=y @@ -108,19 +109,17 @@ CONFIG_GENERIC_CMOS_UPDATE=y CONFIG_TICK_ONESHOT=y CONFIG_NO_HZ_COMMON=y # CONFIG_HZ_PERIODIC is not set -# CONFIG_NO_HZ_IDLE is not set -CONFIG_NO_HZ_FULL=y -# CONFIG_NO_HZ_FULL_ALL is not set -CONFIG_NO_HZ_FULL_SYSIDLE=y -CONFIG_NO_HZ_FULL_SYSIDLE_SMALL=8 +CONFIG_NO_HZ_IDLE=y +# CONFIG_NO_HZ_FULL is not set CONFIG_NO_HZ=y CONFIG_HIGH_RES_TIMERS=y # # CPU/Task time and stats accounting # -CONFIG_VIRT_CPU_ACCOUNTING=y -CONFIG_VIRT_CPU_ACCOUNTING_GEN=y +CONFIG_TICK_CPU_ACCOUNTING=y +# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set +# CONFIG_IRQ_TIME_ACCOUNTING is not set CONFIG_BSD_PROCESS_ACCT=y CONFIG_BSD_PROCESS_ACCT_V3=y CONFIG_TASKSTATS=y @@ -132,7 +131,7 @@ CONFIG_TASK_IO_ACCOUNTING=y # RCU Subsystem # CONFIG_TREE_RCU=y -# CONFIG_PREEMPT_RCU is not set +CONFIG_SRCU=y # CONFIG_TASKS_RCU is not set CONFIG_RCU_STALL_COMMON=y CONFIG_CONTEXT_TRACKING=y @@ -143,6 +142,7 @@ CONFIG_RCU_FANOUT_LEAF=16 # CONFIG_RCU_FANOUT_EXACT is not set CONFIG_RCU_FAST_NO_HZ=y # CONFIG_TREE_RCU_TRACE is not set +CONFIG_RCU_KTHREAD_PRIO=0 CONFIG_RCU_NOCB_CPU=y # CONFIG_RCU_NOCB_CPU_NONE is not set # CONFIG_RCU_NOCB_CPU_ZERO is not set @@ -154,8 +154,8 @@ CONFIG_LOG_CPU_MAX_BUF_SHIFT=12 CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y CONFIG_ARCH_SUPPORTS_INT128=y -CONFIG_NUMA_BALANCING_DEFAULT_ENABLED=y CONFIG_NUMA_BALANCING=y +CONFIG_NUMA_BALANCING_DEFAULT_ENABLED=y CONFIG_CGROUPS=y # CONFIG_CGROUP_DEBUG is not set CONFIG_CGROUP_FREEZER=y @@ -163,7 +163,7 @@ CONFIG_CGROUP_DEVICE=y CONFIG_CPUSETS=y CONFIG_PROC_PID_CPUSET=y CONFIG_CGROUP_CPUACCT=y -CONFIG_RESOURCE_COUNTERS=y +CONFIG_PAGE_COUNTER=y CONFIG_MEMCG=y CONFIG_MEMCG_SWAP=y # CONFIG_MEMCG_SWAP_ENABLED is not set @@ -301,6 +301,7 @@ CONFIG_COMPAT_OLD_SIGACTION=y # GCOV-based kernel profiling # # CONFIG_GCOV_KERNEL is not set +CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set CONFIG_SLABINFO=y CONFIG_RT_MUTEXES=y @@ -312,11 +313,6 @@ CONFIG_MODULE_UNLOAD=y CONFIG_MODVERSIONS=y CONFIG_MODULE_SRCVERSION_ALL=y # CONFIG_MODULE_SIG is not set -# CONFIG_MODULE_SIG_SHA1 is not set -# CONFIG_MODULE_SIG_SHA224 is not set -# CONFIG_MODULE_SIG_SHA256 is not set -# CONFIG_MODULE_SIG_SHA384 is not set -# CONFIG_MODULE_SIG_SHA512 is not set # CONFIG_MODULE_COMPRESS is not set CONFIG_STOP_MACHINE=y CONFIG_BLOCK=y @@ -381,6 +377,7 @@ CONFIG_INLINE_WRITE_UNLOCK_IRQ=y CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y CONFIG_MUTEX_SPIN_ON_OWNER=y CONFIG_RWSEM_SPIN_ON_OWNER=y +CONFIG_LOCK_SPIN_ON_OWNER=y CONFIG_ARCH_USE_QUEUE_RWLOCK=y CONFIG_QUEUE_RWLOCK=y CONFIG_FREEZER=y @@ -399,6 +396,7 @@ CONFIG_X86_NUMACHIP=y # CONFIG_X86_UV is not set # CONFIG_X86_GOLDFISH is not set CONFIG_X86_INTEL_LPSS=y +CONFIG_X86_AMD_PLATFORM_DEVICE=y CONFIG_IOSF_MBI=m CONFIG_IOSF_MBI_DEBUG=y CONFIG_X86_SUPPORTS_MEMORY_FAILURE=y @@ -451,6 +449,7 @@ CONFIG_SCHED_MC=y # CONFIG_PREEMPT_NONE is not set CONFIG_PREEMPT_VOLUNTARY=y # CONFIG_PREEMPT is not set +CONFIG_X86_UP_APIC_MSI=y CONFIG_X86_LOCAL_APIC=y CONFIG_X86_IO_APIC=y CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y @@ -462,6 +461,7 @@ CONFIG_X86_MCE_INJECT=m CONFIG_X86_THERMAL_VECTOR=y CONFIG_X86_16BIT=y CONFIG_X86_ESPFIX64=y +CONFIG_X86_VSYSCALL_EMULATION=y CONFIG_I8K=m CONFIG_MICROCODE=y CONFIG_MICROCODE_INTEL=y @@ -537,6 +537,7 @@ CONFIG_ZPOOL=y CONFIG_ZBUD=y CONFIG_ZSMALLOC=y CONFIG_PGTABLE_MAPPING=y +# CONFIG_ZSMALLOC_STAT is not set CONFIG_GENERIC_EARLY_IOREMAP=y CONFIG_X86_CHECK_BIOS_CORRUPTION=y CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK=y @@ -549,6 +550,7 @@ CONFIG_X86_PAT=y CONFIG_ARCH_USES_PG_UNCACHED=y CONFIG_ARCH_RANDOM=y CONFIG_X86_SMAP=y +# CONFIG_X86_INTEL_MPX is not set CONFIG_EFI=y CONFIG_EFI_STUB=y CONFIG_EFI_MIXED=y @@ -575,6 +577,8 @@ CONFIG_HOTPLUG_CPU=y # CONFIG_DEBUG_HOTPLUG_CPU0 is not set # CONFIG_COMPAT_VDSO is not set # CONFIG_CMDLINE_BOOL is not set +CONFIG_HAVE_LIVEPATCH=y +CONFIG_LIVEPATCH=y CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y CONFIG_USE_PERCPU_NUMA_NODE_ID=y @@ -594,7 +598,6 @@ CONFIG_PM_SLEEP_SMP=y CONFIG_PM_WAKELOCKS=y CONFIG_PM_WAKELOCKS_LIMIT=100 CONFIG_PM_WAKELOCKS_GC=y -CONFIG_PM_RUNTIME=y CONFIG_PM=y CONFIG_PM_DEBUG=y CONFIG_PM_ADVANCED_DEBUG=y @@ -631,6 +634,7 @@ CONFIG_ACPI_PCI_SLOT=y CONFIG_X86_PM_TIMER=y CONFIG_ACPI_CONTAINER=y CONFIG_ACPI_HOTPLUG_MEMORY=y +CONFIG_ACPI_HOTPLUG_IOAPIC=y CONFIG_ACPI_SBS=m CONFIG_ACPI_HED=y # CONFIG_ACPI_CUSTOM_METHOD is not set @@ -645,6 +649,7 @@ CONFIG_ACPI_APEI_MEMORY_FAILURE=y CONFIG_ACPI_APEI_EINJ=m # CONFIG_ACPI_APEI_ERST_DEBUG is not set CONFIG_ACPI_EXTLOG=m +# CONFIG_PMIC_OPREGION is not set CONFIG_SFI=y # @@ -666,7 +671,7 @@ CONFIG_CPU_FREQ_GOV_ONDEMAND=y CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y # -# x86 CPU frequency scaling drivers +# CPU frequency scaling drivers # CONFIG_X86_INTEL_PSTATE=y CONFIG_X86_PCC_CPUFREQ=y @@ -727,7 +732,6 @@ CONFIG_PCI_ATS=y CONFIG_PCI_IOV=y CONFIG_PCI_PRI=y CONFIG_PCI_PASID=y -CONFIG_PCI_IOAPIC=y CONFIG_PCI_LABEL=y # @@ -840,6 +844,7 @@ CONFIG_SYN_COOKIES=y CONFIG_NET_IPVTI=m CONFIG_NET_UDP_TUNNEL=m CONFIG_NET_FOU=m +CONFIG_NET_FOU_IP_TUNNELS=y CONFIG_GENEVE=m CONFIG_INET_AH=m CONFIG_INET_ESP=m @@ -951,6 +956,7 @@ CONFIG_NF_NAT_FTP=m CONFIG_NF_NAT_IRC=m CONFIG_NF_NAT_SIP=m CONFIG_NF_NAT_TFTP=m +CONFIG_NF_NAT_REDIRECT=m CONFIG_NETFILTER_SYNPROXY=m CONFIG_NF_TABLES=m CONFIG_NF_TABLES_INET=m @@ -963,6 +969,7 @@ CONFIG_NFT_COUNTER=m CONFIG_NFT_LOG=m CONFIG_NFT_LIMIT=m CONFIG_NFT_MASQ=m +CONFIG_NFT_REDIR=m CONFIG_NFT_NAT=m CONFIG_NFT_QUEUE=m CONFIG_NFT_REJECT=m @@ -1131,6 +1138,7 @@ CONFIG_NF_NAT_IPV4=m CONFIG_NFT_CHAIN_NAT_IPV4=m CONFIG_NF_NAT_MASQUERADE_IPV4=m CONFIG_NFT_MASQ_IPV4=m +CONFIG_NFT_REDIR_IPV4=m CONFIG_NF_NAT_SNMP_BASIC=m CONFIG_NF_NAT_PROTO_GRE=m CONFIG_NF_NAT_PPTP=m @@ -1171,6 +1179,7 @@ CONFIG_NF_NAT_IPV6=m CONFIG_NFT_CHAIN_NAT_IPV6=m CONFIG_NF_NAT_MASQUERADE_IPV6=m CONFIG_NFT_MASQ_IPV6=m +CONFIG_NFT_REDIR_IPV6=m CONFIG_IP6_NF_IPTABLES=m CONFIG_IP6_NF_MATCH_AH=m CONFIG_IP6_NF_MATCH_EUI64=m @@ -1248,7 +1257,6 @@ CONFIG_RDS_RDMA=m CONFIG_RDS_TCP=m # CONFIG_RDS_DEBUG is not set CONFIG_TIPC=m -CONFIG_TIPC_PORTS=8191 CONFIG_TIPC_MEDIA_IB=y CONFIG_ATM=m CONFIG_ATM_CLIP=m @@ -1270,6 +1278,7 @@ CONFIG_BRIDGE_IGMP_SNOOPING=y CONFIG_BRIDGE_VLAN_FILTERING=y CONFIG_HAVE_NET_DSA=y CONFIG_NET_DSA=m +CONFIG_NET_DSA_HWMON=y CONFIG_NET_DSA_TAG_BRCM=y CONFIG_NET_DSA_TAG_DSA=y CONFIG_NET_DSA_TAG_EDSA=y @@ -1292,6 +1301,7 @@ CONFIG_LAPB=m CONFIG_PHONET=m CONFIG_6LOWPAN=m CONFIG_IEEE802154=m +CONFIG_IEEE802154_SOCKET=m CONFIG_IEEE802154_6LOWPAN=m CONFIG_MAC802154=m CONFIG_NET_SCHED=y @@ -1361,6 +1371,9 @@ CONFIG_NET_ACT_PEDIT=m CONFIG_NET_ACT_SIMP=m CONFIG_NET_ACT_SKBEDIT=m CONFIG_NET_ACT_CSUM=m +CONFIG_NET_ACT_VLAN=m +CONFIG_NET_ACT_BPF=m +CONFIG_NET_ACT_CONNMARK=m # CONFIG_NET_CLS_IND is not set CONFIG_NET_SCH_FIFO=y CONFIG_DCB=y @@ -1372,15 +1385,16 @@ CONFIG_BATMAN_ADV_NC=y CONFIG_BATMAN_ADV_MCAST=y # CONFIG_BATMAN_ADV_DEBUG is not set CONFIG_OPENVSWITCH=m -CONFIG_OPENVSWITCH_GRE=y -CONFIG_OPENVSWITCH_VXLAN=y -CONFIG_OPENVSWITCH_GENEVE=y +CONFIG_OPENVSWITCH_GRE=m +CONFIG_OPENVSWITCH_VXLAN=m +CONFIG_OPENVSWITCH_GENEVE=m CONFIG_VSOCKETS=m CONFIG_VMWARE_VMCI_VSOCKETS=m CONFIG_NETLINK_MMAP=y CONFIG_NETLINK_DIAG=m CONFIG_NET_MPLS_GSO=m CONFIG_HSR=m +# CONFIG_NET_SWITCHDEV is not set CONFIG_RPS=y CONFIG_RFS_ACCEL=y CONFIG_XPS=y @@ -1523,7 +1537,7 @@ CONFIG_VLSI_FIR=m CONFIG_VIA_FIR=m CONFIG_MCS_FIR=m CONFIG_BT=m -CONFIG_BT_6LOWPAN=m +CONFIG_BT_BREDR=y CONFIG_BT_RFCOMM=m CONFIG_BT_RFCOMM_TTY=y CONFIG_BT_BNEP=m @@ -1531,6 +1545,9 @@ CONFIG_BT_BNEP_MC_FILTER=y CONFIG_BT_BNEP_PROTO_FILTER=y CONFIG_BT_CMTP=m CONFIG_BT_HIDP=m +CONFIG_BT_LE=y +CONFIG_BT_6LOWPAN=m +# CONFIG_BT_SELFTEST is not set # # Bluetooth device drivers @@ -1583,6 +1600,7 @@ CONFIG_MAC80211=m CONFIG_MAC80211_HAS_RC=y CONFIG_MAC80211_RC_MINSTREL=y CONFIG_MAC80211_RC_MINSTREL_HT=y +CONFIG_MAC80211_RC_MINSTREL_VHT=y CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y CONFIG_MAC80211_RC_DEFAULT="minstrel_ht" CONFIG_MAC80211_MESH=y @@ -1634,7 +1652,8 @@ CONFIG_NFC_MRVL=m CONFIG_NFC_MRVL_USB=m CONFIG_NFC_ST21NFCA=m CONFIG_NFC_ST21NFCA_I2C=m -# CONFIG_NFC_ST21NFCB is not set +CONFIG_NFC_ST21NFCB=m +CONFIG_NFC_ST21NFCB_I2C=m CONFIG_HAVE_BPF_JIT=y # @@ -1655,7 +1674,9 @@ CONFIG_FIRMWARE_IN_KERNEL=y CONFIG_EXTRA_FIRMWARE="" CONFIG_FW_LOADER_USER_HELPER=y # CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set +CONFIG_WANT_DEV_COREDUMP=y CONFIG_ALLOW_DEV_COREDUMP=y +CONFIG_DEV_COREDUMP=y # CONFIG_DEBUG_DRIVER is not set # CONFIG_DEBUG_DEVRES is not set CONFIG_SYS_HYPERVISOR=y @@ -1664,6 +1685,7 @@ CONFIG_GENERIC_CPU_AUTOPROBE=y CONFIG_REGMAP=y CONFIG_REGMAP_I2C=y CONFIG_REGMAP_SPI=y +CONFIG_REGMAP_SPMI=m CONFIG_REGMAP_MMIO=y CONFIG_REGMAP_IRQ=y CONFIG_DMA_SHARED_BUFFER=y @@ -1793,6 +1815,7 @@ CONFIG_MTD_NAND_DOCG4=m CONFIG_MTD_NAND_CAFE=m CONFIG_MTD_NAND_NANDSIM=m CONFIG_MTD_NAND_PLATFORM=m +CONFIG_MTD_NAND_HISI504=m CONFIG_MTD_ONENAND=m CONFIG_MTD_ONENAND_VERIFY_WRITE=y CONFIG_MTD_ONENAND_GENERIC=m @@ -1884,7 +1907,7 @@ CONFIG_BLK_DEV_SX8=m CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=65536 -# CONFIG_BLK_DEV_XIP is not set +CONFIG_BLK_DEV_RAM_DAX=y CONFIG_CDROM_PKTCDVD=m CONFIG_CDROM_PKTCDVD_BUFFERS=8 # CONFIG_CDROM_PKTCDVD_WCACHE is not set @@ -2108,7 +2131,8 @@ CONFIG_SCSI_QLA_ISCSI=m CONFIG_SCSI_LPFC=m # CONFIG_SCSI_LPFC_DEBUG_FS is not set CONFIG_SCSI_DC395x=m -CONFIG_SCSI_DC390T=m +CONFIG_SCSI_AM53C974=m +CONFIG_SCSI_WD719X=m CONFIG_SCSI_DEBUG=m CONFIG_SCSI_PMCRAID=m CONFIG_SCSI_PM8001=m @@ -2288,16 +2312,6 @@ CONFIG_FIREWIRE_OHCI=m CONFIG_FIREWIRE_SBP2=m CONFIG_FIREWIRE_NET=m CONFIG_FIREWIRE_NOSY=m -CONFIG_I2O=m -CONFIG_I2O_LCT_NOTIFY_ON_CHANGES=y -CONFIG_I2O_EXT_ADAPTEC=y -CONFIG_I2O_EXT_ADAPTEC_DMA64=y -CONFIG_I2O_CONFIG=m -# CONFIG_I2O_CONFIG_OLD_IOCTL is not set -CONFIG_I2O_BUS=m -CONFIG_I2O_BLOCK=m -CONFIG_I2O_SCSI=m -CONFIG_I2O_PROC=m CONFIG_MACINTOSH_DRIVERS=y CONFIG_MAC_EMUMOUSEBTN=m CONFIG_NETDEVICES=y @@ -2316,6 +2330,7 @@ CONFIG_NET_TEAM_MODE_ACTIVEBACKUP=m CONFIG_NET_TEAM_MODE_LOADBALANCE=m CONFIG_MACVLAN=m CONFIG_MACVTAP=m +CONFIG_IPVLAN=m CONFIG_VXLAN=m CONFIG_NETCONSOLE=m CONFIG_NETCONSOLE_DYNAMIC=y @@ -2394,6 +2409,7 @@ CONFIG_NET_DSA_MV88E6XXX_NEED_PPU=y CONFIG_NET_DSA_MV88E6131=m CONFIG_NET_DSA_MV88E6123_61_65=m CONFIG_NET_DSA_MV88E6171=m +CONFIG_NET_DSA_MV88E6352=m CONFIG_NET_DSA_BCM_SF2=m CONFIG_ETHERNET=y CONFIG_MDIO=m @@ -2414,6 +2430,8 @@ CONFIG_NET_VENDOR_AMD=y CONFIG_AMD8111_ETH=m CONFIG_PCNET32=m CONFIG_PCMCIA_NMCLAN=m +CONFIG_AMD_XGBE=m +CONFIG_AMD_XGBE_DCB=y # CONFIG_NET_XGENE is not set CONFIG_NET_VENDOR_ARC=y CONFIG_NET_VENDOR_ATHEROS=y @@ -2427,6 +2445,7 @@ CONFIG_B44=m CONFIG_B44_PCI_AUTOSELECT=y CONFIG_B44_PCICORE_AUTOSELECT=y CONFIG_B44_PCI=y +CONFIG_BCMGENET=m CONFIG_BNX2=m CONFIG_CNIC=m CONFIG_TIGON3=m @@ -2483,6 +2502,7 @@ CONFIG_IGB_DCA=y CONFIG_IGBVF=m CONFIG_IXGB=m CONFIG_IXGBE=m +CONFIG_IXGBE_VXLAN=y CONFIG_IXGBE_HWMON=y CONFIG_IXGBE_DCA=y CONFIG_IXGBE_DCB=y @@ -2490,7 +2510,7 @@ CONFIG_IXGBEVF=m CONFIG_I40E=m CONFIG_I40E_VXLAN=y CONFIG_I40E_DCB=y -# CONFIG_I40E_FCOE is not set +CONFIG_I40E_FCOE=y CONFIG_I40EVF=m CONFIG_FM10K=m CONFIG_FM10K_VXLAN=y @@ -2558,6 +2578,7 @@ CONFIG_8139TOO_8129=y CONFIG_R8169=m CONFIG_NET_VENDOR_RDC=y CONFIG_R6040=m +CONFIG_NET_VENDOR_ROCKER=y CONFIG_NET_VENDOR_SAMSUNG=y CONFIG_SXGBE_ETH=m CONFIG_NET_VENDOR_SEEQ=y @@ -2578,10 +2599,8 @@ CONFIG_SMSC911X=m CONFIG_SMSC9420=m CONFIG_NET_VENDOR_STMICRO=y CONFIG_STMMAC_ETH=m -CONFIG_STMMAC_PLATFORM=y +CONFIG_STMMAC_PLATFORM=m # CONFIG_STMMAC_PCI is not set -# CONFIG_STMMAC_DEBUG_FS is not set -# CONFIG_STMMAC_DA is not set CONFIG_NET_VENDOR_SUN=y CONFIG_HAPPYMEAL=m CONFIG_SUNGEM=m @@ -2590,6 +2609,7 @@ CONFIG_NIU=m CONFIG_NET_VENDOR_TEHUTI=y CONFIG_TEHUTI=m CONFIG_NET_VENDOR_TI=y +CONFIG_TI_CPSW_ALE=m CONFIG_TLAN=m CONFIG_NET_VENDOR_VIA=y CONFIG_VIA_RHINE=m @@ -2616,6 +2636,7 @@ CONFIG_PHYLIB=y # CONFIG_AT803X_PHY=m CONFIG_AMD_PHY=m +CONFIG_AMD_XGBE_PHY=m CONFIG_MARVELL_PHY=m CONFIG_DAVICOM_PHY=m CONFIG_QSEMI_PHY=m @@ -2736,6 +2757,7 @@ CONFIG_ATH9K_STATION_STATISTICS=y CONFIG_ATH9K_WOW=y CONFIG_ATH9K_RFKILL=y CONFIG_ATH9K_CHANNEL_CONTEXT=y +CONFIG_ATH9K_PCOEM=y CONFIG_ATH9K_HTC=m CONFIG_ATH9K_HTC_DEBUGFS=y CONFIG_CARL9170=m @@ -2822,7 +2844,7 @@ CONFIG_IWLDVM=m CONFIG_IWLMVM=m CONFIG_IWLWIFI_OPMODE_MODULAR=y # CONFIG_IWLWIFI_BCAST_FILTERING is not set -CONFIG_IWLWIFI_UAPSD=y +# CONFIG_IWLWIFI_UAPSD is not set # # Debugging Options @@ -2960,7 +2982,6 @@ CONFIG_X25_ASY=m CONFIG_SBNI=m # CONFIG_SBNI_MULTILINE is not set CONFIG_IEEE802154_DRIVERS=m -# CONFIG_IEEE802154_FAKEHARD is not set CONFIG_IEEE802154_FAKELB=m CONFIG_IEEE802154_AT86RF230=m CONFIG_IEEE802154_MRF24J40=m @@ -3162,10 +3183,14 @@ CONFIG_MOUSE_PS2_TRACKPOINT=y CONFIG_MOUSE_PS2_ELANTECH=y CONFIG_MOUSE_PS2_SENTELIC=y CONFIG_MOUSE_PS2_TOUCHKIT=y +CONFIG_MOUSE_PS2_FOCALTECH=y CONFIG_MOUSE_SERIAL=m CONFIG_MOUSE_APPLETOUCH=m CONFIG_MOUSE_BCM5974=m CONFIG_MOUSE_CYAPA=m +CONFIG_MOUSE_ELAN_I2C=m +CONFIG_MOUSE_ELAN_I2C_I2C=y +CONFIG_MOUSE_ELAN_I2C_SMBUS=y CONFIG_MOUSE_VSXXXAA=m CONFIG_MOUSE_GPIO=m CONFIG_MOUSE_SYNAPTICS_I2C=m @@ -3231,8 +3256,10 @@ CONFIG_TOUCHSCREEN_DYNAPRO=m CONFIG_TOUCHSCREEN_HAMPSHIRE=m CONFIG_TOUCHSCREEN_EETI=m CONFIG_TOUCHSCREEN_FUJITSU=m +CONFIG_TOUCHSCREEN_GOODIX=m CONFIG_TOUCHSCREEN_ILI210X=m CONFIG_TOUCHSCREEN_GUNZE=m +CONFIG_TOUCHSCREEN_ELAN=m CONFIG_TOUCHSCREEN_ELO=m CONFIG_TOUCHSCREEN_WACOM_W8001=m CONFIG_TOUCHSCREEN_WACOM_I2C=m @@ -3291,6 +3318,7 @@ CONFIG_INPUT_AD714X_I2C=m CONFIG_INPUT_AD714X_SPI=m CONFIG_INPUT_ARIZONA_HAPTICS=m CONFIG_INPUT_BMA150=m +CONFIG_INPUT_E3X0_BUTTON=m CONFIG_INPUT_PCSPKR=m CONFIG_INPUT_MAX77693_HAPTIC=m CONFIG_INPUT_MAX8925_ONKEY=m @@ -3310,7 +3338,10 @@ CONFIG_INPUT_KXTJ9=m CONFIG_INPUT_POWERMATE=m CONFIG_INPUT_YEALINK=m CONFIG_INPUT_CM109=m +CONFIG_INPUT_REGULATOR_HAPTIC=m CONFIG_INPUT_RETU_PWRBUTTON=m +CONFIG_INPUT_TPS65218_PWRBUTTON=m +CONFIG_INPUT_AXP20X_PEK=m CONFIG_INPUT_TWL4030_PWRBUTTON=m CONFIG_INPUT_TWL4030_VIBRA=m CONFIG_INPUT_TWL6040_VIBRA=m @@ -3387,6 +3418,7 @@ CONFIG_N_HDLC=m CONFIG_N_GSM=m CONFIG_TRACE_ROUTER=m CONFIG_TRACE_SINK=m +CONFIG_DEVMEM=y # CONFIG_DEVKMEM is not set # @@ -3416,7 +3448,6 @@ CONFIG_SERIAL_8250_FINTEK=m CONFIG_SERIAL_KGDB_NMI=y CONFIG_SERIAL_MAX3100=m CONFIG_SERIAL_MAX310X=y -CONFIG_SERIAL_MRST_MAX3110=m CONFIG_SERIAL_MFD_HSU=m CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y @@ -3450,6 +3481,7 @@ CONFIG_IPMI_HANDLER=m CONFIG_IPMI_DEVICE_INTERFACE=m CONFIG_IPMI_SI=m CONFIG_IPMI_SI_PROBE_DEFAULTS=y +CONFIG_IPMI_SSIF=m CONFIG_IPMI_WATCHDOG=m CONFIG_IPMI_POWEROFF=m CONFIG_HW_RANDOM=y @@ -3485,8 +3517,9 @@ CONFIG_TCG_TIS_I2C_NUVOTON=m CONFIG_TCG_NSC=m CONFIG_TCG_ATMEL=m CONFIG_TCG_INFINEON=m -CONFIG_TCG_ST33_I2C=m +CONFIG_TCG_TIS_I2C_ST33=m CONFIG_TCG_XEN=m +CONFIG_TCG_CRB=m CONFIG_TELCLOCK=m CONFIG_DEVPORT=y CONFIG_XILLYBUS=m @@ -3499,7 +3532,7 @@ CONFIG_I2C=y CONFIG_ACPI_I2C_OPREGION=y CONFIG_I2C_BOARDINFO=y CONFIG_I2C_COMPAT=y -CONFIG_I2C_CHARDEV=m +CONFIG_I2C_CHARDEV=y CONFIG_I2C_MUX=m # @@ -3563,6 +3596,7 @@ CONFIG_I2C_XILINX=m # External I2C/SMBus adapter drivers # CONFIG_I2C_DIOLAN_U2C=m +CONFIG_I2C_DLN2=m CONFIG_I2C_PARPORT=m CONFIG_I2C_PARPORT_LIGHT=m CONFIG_I2C_ROBOTFUZZ_OSIF=m @@ -3575,6 +3609,7 @@ CONFIG_I2C_VIPERBOARD=m # CONFIG_I2C_CROS_EC_TUNNEL=m CONFIG_I2C_STUB=m +# CONFIG_I2C_SLAVE is not set # CONFIG_I2C_DEBUG_CORE is not set # CONFIG_I2C_DEBUG_ALGO is not set # CONFIG_I2C_DEBUG_BUS is not set @@ -3588,6 +3623,7 @@ CONFIG_SPI_MASTER=y CONFIG_SPI_ALTERA=m CONFIG_SPI_BITBANG=m CONFIG_SPI_BUTTERFLY=m +CONFIG_SPI_DLN2=m CONFIG_SPI_GPIO=m CONFIG_SPI_LM70_LLP=m CONFIG_SPI_OC_TINY=m @@ -3651,8 +3687,12 @@ CONFIG_PINCTRL=y # # Pin controllers # +CONFIG_PINMUX=y +CONFIG_PINCONF=y +CONFIG_GENERIC_PINCONF=y # CONFIG_DEBUG_PINCTRL is not set CONFIG_PINCTRL_BAYTRAIL=y +CONFIG_PINCTRL_CHERRYVIEW=m CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y CONFIG_GPIOLIB=y CONFIG_GPIO_DEVRES=y @@ -3669,7 +3709,6 @@ CONFIG_GPIO_MAX730X=m # Memory mapped GPIO drivers: # CONFIG_GPIO_GENERIC_PLATFORM=m -CONFIG_GPIO_DWAPB=m CONFIG_GPIO_IT8761E=m CONFIG_GPIO_F7188X=m CONFIG_GPIO_SCH311X=m @@ -3737,6 +3776,7 @@ CONFIG_GPIO_TPS65910=y # USB GPIO expanders: # CONFIG_GPIO_VIPERBOARD=m +CONFIG_GPIO_DLN2=m CONFIG_W1=m CONFIG_W1_CON=y @@ -3801,6 +3841,7 @@ CONFIG_CHARGER_LP8788=m CONFIG_CHARGER_GPIO=m CONFIG_CHARGER_MANAGER=y CONFIG_CHARGER_MAX14577=m +CONFIG_CHARGER_MAX77693=m CONFIG_CHARGER_MAX8997=m CONFIG_CHARGER_MAX8998=m CONFIG_CHARGER_BQ2415X=m @@ -3808,7 +3849,10 @@ CONFIG_CHARGER_BQ24190=m CONFIG_CHARGER_BQ24735=m CONFIG_CHARGER_SMB347=m CONFIG_CHARGER_TPS65090=m +CONFIG_BATTERY_GAUGE_LTC2941=m +CONFIG_BATTERY_RT5033=m CONFIG_POWER_RESET=y +CONFIG_POWER_RESET_RESTART=y CONFIG_POWER_AVS=y CONFIG_HWMON=y CONFIG_HWMON_VID=m @@ -3861,6 +3905,7 @@ CONFIG_SENSORS_HIH6130=m CONFIG_SENSORS_IBMAEM=m CONFIG_SENSORS_IBMPEX=m CONFIG_SENSORS_IIO_HWMON=m +CONFIG_SENSORS_I5500=m CONFIG_SENSORS_CORETEMP=m CONFIG_SENSORS_IT87=m CONFIG_SENSORS_JC42=m @@ -3907,12 +3952,14 @@ CONFIG_SENSORS_PC87427=m CONFIG_SENSORS_NTC_THERMISTOR=m CONFIG_SENSORS_NCT6683=m CONFIG_SENSORS_NCT6775=m +CONFIG_SENSORS_NCT7802=m CONFIG_SENSORS_PCF8591=m CONFIG_PMBUS=m CONFIG_SENSORS_PMBUS=m CONFIG_SENSORS_ADM1275=m CONFIG_SENSORS_LM25066=m CONFIG_SENSORS_LTC2978=m +CONFIG_SENSORS_LTC2978_REGULATOR=y CONFIG_SENSORS_MAX16064=m CONFIG_SENSORS_MAX34440=m CONFIG_SENSORS_MAX8688=m @@ -4105,6 +4152,8 @@ CONFIG_MFD_DA9052_SPI=y CONFIG_MFD_DA9052_I2C=y CONFIG_MFD_DA9055=y CONFIG_MFD_DA9063=y +CONFIG_MFD_DA9150=m +CONFIG_MFD_DLN2=m CONFIG_MFD_MC13XXX=m CONFIG_MFD_MC13XXX_SPI=m CONFIG_MFD_MC13XXX_I2C=m @@ -4119,7 +4168,6 @@ CONFIG_MFD_88PM800=m CONFIG_MFD_88PM805=m CONFIG_MFD_88PM860X=y CONFIG_MFD_MAX14577=y -CONFIG_MFD_MAX77686=y CONFIG_MFD_MAX77693=y CONFIG_MFD_MAX8907=m CONFIG_MFD_MAX8925=y @@ -4135,6 +4183,7 @@ CONFIG_PCF50633_GPIO=m CONFIG_UCB1400_CORE=m CONFIG_MFD_RDC321X=m CONFIG_MFD_RTSX_PCI=m +CONFIG_MFD_RT5033=m CONFIG_MFD_RTSX_USB=m CONFIG_MFD_RC5T583=y CONFIG_MFD_RN5T618=m @@ -4183,7 +4232,7 @@ CONFIG_MFD_WM831X_I2C=y CONFIG_MFD_WM831X_SPI=y CONFIG_MFD_WM8350=y CONFIG_MFD_WM8350_I2C=y -CONFIG_MFD_WM8994=y +CONFIG_MFD_WM8994=m CONFIG_REGULATOR=y # CONFIG_REGULATOR_DEBUG is not set CONFIG_REGULATOR_FIXED_VOLTAGE=m @@ -4226,9 +4275,7 @@ CONFIG_REGULATOR_MAX8952=m CONFIG_REGULATOR_MAX8973=m CONFIG_REGULATOR_MAX8997=m CONFIG_REGULATOR_MAX8998=m -CONFIG_REGULATOR_MAX77686=m CONFIG_REGULATOR_MAX77693=m -CONFIG_REGULATOR_MAX77802=m CONFIG_REGULATOR_MC13XXX_CORE=m CONFIG_REGULATOR_MC13783=m CONFIG_REGULATOR_MC13892=m @@ -4239,6 +4286,7 @@ CONFIG_REGULATOR_PFUZE100=m CONFIG_REGULATOR_PWM=m CONFIG_REGULATOR_RC5T583=m CONFIG_REGULATOR_RN5T618=m +CONFIG_REGULATOR_RT5033=m CONFIG_REGULATOR_S2MPA01=m CONFIG_REGULATOR_S2MPS11=m CONFIG_REGULATOR_S5M8767=m @@ -4323,16 +4371,9 @@ CONFIG_IR_NUVOTON=m CONFIG_IR_REDRAT3=m CONFIG_IR_STREAMZAP=m CONFIG_IR_WINBOND_CIR=m +CONFIG_IR_IGORPLUGUSB=m CONFIG_IR_IGUANA=m CONFIG_IR_TTUSBIR=m -CONFIG_IR_IMG=m -# CONFIG_IR_IMG_RAW is not set -CONFIG_IR_IMG_HW=y -CONFIG_IR_IMG_NEC=y -CONFIG_IR_IMG_JVC=y -CONFIG_IR_IMG_SONY=y -CONFIG_IR_IMG_SHARP=y -CONFIG_IR_IMG_SANYO=y CONFIG_RC_LOOPBACK=m CONFIG_IR_GPIO_CIR=m CONFIG_MEDIA_USB_SUPPORT=y @@ -4386,6 +4427,7 @@ CONFIG_USB_GSPCA_STV0680=m CONFIG_USB_GSPCA_SUNPLUS=m CONFIG_USB_GSPCA_T613=m CONFIG_USB_GSPCA_TOPRO=m +CONFIG_USB_GSPCA_TOUPTEK=m CONFIG_USB_GSPCA_TV8532=m CONFIG_USB_GSPCA_VC032X=m CONFIG_USB_GSPCA_VICAM=m @@ -4408,7 +4450,6 @@ CONFIG_VIDEO_PVRUSB2_SYSFS=y CONFIG_VIDEO_PVRUSB2_DVB=y # CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set CONFIG_VIDEO_HDPVR=m -CONFIG_VIDEO_TLG2300=m CONFIG_VIDEO_USBVISION=m CONFIG_VIDEO_STK1160_COMMON=m CONFIG_VIDEO_STK1160_AC97=y @@ -4571,6 +4612,7 @@ CONFIG_DVB_MANTIS=m CONFIG_DVB_HOPPER=m CONFIG_DVB_NGENE=m CONFIG_DVB_DDBRIDGE=m +CONFIG_DVB_SMIPCIE=m CONFIG_V4L_PLATFORM_DRIVERS=y CONFIG_VIDEO_CAFE_CCIC=m CONFIG_VIDEO_VIA_CAMERA=m @@ -4581,16 +4623,12 @@ CONFIG_VIDEO_MEM2MEM_DEINTERLACE=m CONFIG_VIDEO_SH_VEU=m CONFIG_V4L_TEST_DRIVERS=y CONFIG_VIDEO_VIVID=m -CONFIG_VIDEO_MEM2MEM_TESTDEV=m +CONFIG_VIDEO_VIM2M=m # # Supported MMC/SDIO adapters # CONFIG_SMS_SDIO_DRV=m -CONFIG_MEDIA_PARPORT_SUPPORT=y -CONFIG_VIDEO_BWQCAM=m -CONFIG_VIDEO_CQCAM=m -CONFIG_VIDEO_W9966=m CONFIG_RADIO_ADAPTERS=y CONFIG_RADIO_TEA575X=m CONFIG_RADIO_SI470X=y @@ -4630,7 +4668,6 @@ CONFIG_MEDIA_COMMON_OPTIONS=y # common driver options # CONFIG_VIDEO_CX2341X=m -CONFIG_VIDEO_BTCX=m CONFIG_VIDEO_TVEEPROM=m CONFIG_CYPRESS_FIRMWARE=m CONFIG_DVB_B2C2_FLEXCOP=m @@ -4776,6 +4813,7 @@ CONFIG_MEDIA_TUNER_TDA18212=m CONFIG_MEDIA_TUNER_E4000=m CONFIG_MEDIA_TUNER_FC2580=m CONFIG_MEDIA_TUNER_M88TS2022=m +CONFIG_MEDIA_TUNER_M88RS6000T=m CONFIG_MEDIA_TUNER_TUA9001=m CONFIG_MEDIA_TUNER_SI2157=m CONFIG_MEDIA_TUNER_IT913X=m @@ -4887,6 +4925,10 @@ CONFIG_DVB_S5H1411=m CONFIG_DVB_S921=m CONFIG_DVB_DIB8000=m CONFIG_DVB_MB86A20S=m + +# +# ISDB-S (satellite) & ISDB-T (terrestrial) frontends +# CONFIG_DVB_TC90522=m # @@ -4906,6 +4948,7 @@ CONFIG_DVB_ISL6405=m CONFIG_DVB_ISL6421=m CONFIG_DVB_ISL6423=m CONFIG_DVB_A8293=m +CONFIG_DVB_SP2=m CONFIG_DVB_LGS8GXX=m CONFIG_DVB_ATBM8830=m CONFIG_DVB_TDA665x=m @@ -4935,6 +4978,7 @@ CONFIG_VGA_SWITCHEROO=y # Direct Rendering Manager # CONFIG_DRM=m +CONFIG_DRM_MIPI_DSI=y CONFIG_DRM_KMS_HELPER=m CONFIG_DRM_KMS_FB_HELPER=y CONFIG_DRM_LOAD_EDID_FIRMWARE=y @@ -4943,10 +4987,10 @@ CONFIG_DRM_TTM=m # # I2C encoder or helper chips # +CONFIG_DRM_I2C_ADV7511=m CONFIG_DRM_I2C_CH7006=m CONFIG_DRM_I2C_SIL164=m CONFIG_DRM_I2C_NXP_TDA998X=m -CONFIG_DRM_PTN3460=m CONFIG_DRM_TDFX=m CONFIG_DRM_R128=m CONFIG_DRM_RADEON=m @@ -4975,6 +5019,12 @@ CONFIG_DRM_AST=m CONFIG_DRM_CIRRUS_QEMU=m CONFIG_DRM_QXL=m # CONFIG_DRM_BOCHS is not set +CONFIG_DRM_PANEL=y + +# +# Display Panels +# +CONFIG_HSA_AMD=m # # Frame buffer Devices @@ -5138,6 +5188,8 @@ CONFIG_HDMI=y CONFIG_VGA_CONSOLE=y # CONFIG_VGACON_SOFT_SCROLLBACK is not set CONFIG_DUMMY_CONSOLE=y +CONFIG_DUMMY_CONSOLE_COLUMNS=80 +CONFIG_DUMMY_CONSOLE_ROWS=25 CONFIG_FRAMEBUFFER_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y @@ -5308,10 +5360,15 @@ CONFIG_SND_USB_US122L=m CONFIG_SND_USB_6FIRE=m CONFIG_SND_USB_HIFACE=m CONFIG_SND_BCD2000=m +CONFIG_SND_USB_LINE6=m +CONFIG_SND_USB_POD=m +CONFIG_SND_USB_PODHD=m +CONFIG_SND_USB_TONEPORT=m +CONFIG_SND_USB_VARIAX=m CONFIG_SND_FIREWIRE=y CONFIG_SND_FIREWIRE_LIB=m CONFIG_SND_DICE=m -CONFIG_SND_FIREWIRE_SPEAKERS=m +CONFIG_SND_OXFW=m CONFIG_SND_ISIGHT=m CONFIG_SND_SCS1X=m CONFIG_SND_FIREWORKS=m @@ -5337,6 +5394,9 @@ CONFIG_SND_SOC_FSL_SSI=m CONFIG_SND_SOC_FSL_SPDIF=m CONFIG_SND_SOC_FSL_ESAI=m CONFIG_SND_SOC_IMX_AUDMUX=m +CONFIG_SND_SST_MFLD_PLATFORM=m +CONFIG_SND_SST_IPC=m +CONFIG_SND_SST_IPC_ACPI=m CONFIG_SND_SOC_INTEL_SST=m CONFIG_SND_SOC_INTEL_SST_ACPI=m CONFIG_SND_SOC_INTEL_HASWELL=m @@ -5345,6 +5405,10 @@ CONFIG_SND_SOC_INTEL_HASWELL_MACH=m CONFIG_SND_SOC_INTEL_BYT_RT5640_MACH=m CONFIG_SND_SOC_INTEL_BYT_MAX98090_MACH=m CONFIG_SND_SOC_INTEL_BROADWELL_MACH=m +CONFIG_SND_SOC_INTEL_BYTCR_RT5640_MACH=m +CONFIG_SND_SOC_INTEL_CHT_BSW_RT5672_MACH=m +CONFIG_SND_SOC_INTEL_CHT_BSW_RT5645_MACH=m +CONFIG_SND_SOC_XTFPGA_I2S=m CONFIG_SND_SOC_I2C_AND_SPI=m # @@ -5357,12 +5421,16 @@ CONFIG_SND_SOC_AK4642=m CONFIG_SND_SOC_AK5386=m CONFIG_SND_SOC_ALC5623=m CONFIG_SND_SOC_CS35L32=m +CONFIG_SND_SOC_CS42L51=m +CONFIG_SND_SOC_CS42L51_I2C=m CONFIG_SND_SOC_CS42L52=m CONFIG_SND_SOC_CS42L56=m CONFIG_SND_SOC_CS42L73=m CONFIG_SND_SOC_CS4265=m CONFIG_SND_SOC_CS4270=m CONFIG_SND_SOC_CS4271=m +CONFIG_SND_SOC_CS4271_I2C=m +CONFIG_SND_SOC_CS4271_SPI=m CONFIG_SND_SOC_CS42XX8=m CONFIG_SND_SOC_CS42XX8_I2C=m CONFIG_SND_SOC_HDMI_CODEC=m @@ -5375,7 +5443,11 @@ CONFIG_SND_SOC_PCM512x_I2C=m CONFIG_SND_SOC_PCM512x_SPI=m CONFIG_SND_SOC_RL6231=m CONFIG_SND_SOC_RT286=m +CONFIG_SND_SOC_RT5631=m CONFIG_SND_SOC_RT5640=m +CONFIG_SND_SOC_RT5645=m +CONFIG_SND_SOC_RT5670=m +# CONFIG_SND_SOC_RT5677_SPI is not set CONFIG_SND_SOC_SGTL5000=m CONFIG_SND_SOC_SI476X=m CONFIG_SND_SOC_SIGMADSP=m @@ -5386,11 +5458,17 @@ CONFIG_SND_SOC_SSM2602=m CONFIG_SND_SOC_SSM2602_SPI=m CONFIG_SND_SOC_SSM2602_I2C=m CONFIG_SND_SOC_SSM4567=m +CONFIG_SND_SOC_STA32X=m CONFIG_SND_SOC_STA350=m CONFIG_SND_SOC_TAS2552=m CONFIG_SND_SOC_TAS5086=m +CONFIG_SND_SOC_TFA9879=m +CONFIG_SND_SOC_TLV320AIC23=m +CONFIG_SND_SOC_TLV320AIC23_I2C=m +CONFIG_SND_SOC_TLV320AIC23_SPI=m CONFIG_SND_SOC_TLV320AIC31XX=m CONFIG_SND_SOC_TLV320AIC3X=m +CONFIG_SND_SOC_TS3A227E=m CONFIG_SND_SOC_WM8510=m CONFIG_SND_SOC_WM8523=m CONFIG_SND_SOC_WM8580=m @@ -5416,6 +5494,7 @@ CONFIG_AC97_BUS=m # HID support # CONFIG_HID=m +CONFIG_HID_BATTERY_STRENGTH=y CONFIG_HIDRAW=y CONFIG_UHID=m CONFIG_HID_GENERIC=m @@ -5430,6 +5509,7 @@ CONFIG_HID_APPLE=m CONFIG_HID_APPLEIR=m CONFIG_HID_AUREAL=m CONFIG_HID_BELKIN=m +CONFIG_HID_BETOP_FF=m CONFIG_HID_CHERRY=m CONFIG_HID_CHICONY=m CONFIG_HID_PRODIKEYS=m @@ -5457,6 +5537,7 @@ CONFIG_HID_LCPOWER=m CONFIG_HID_LENOVO=m CONFIG_HID_LOGITECH=m CONFIG_HID_LOGITECH_DJ=m +CONFIG_HID_LOGITECH_HIDPP=m CONFIG_LOGITECH_FF=y CONFIG_LOGIRUMBLEPAD2_FF=y CONFIG_LOGIG940_FF=y @@ -5477,6 +5558,7 @@ CONFIG_HID_PICOLCD_BACKLIGHT=y CONFIG_HID_PICOLCD_LCD=y CONFIG_HID_PICOLCD_LEDS=y CONFIG_HID_PICOLCD_CIR=y +CONFIG_HID_PLANTRONICS=m CONFIG_HID_PRIMAX=m CONFIG_HID_ROCCAT=m CONFIG_HID_SAITEK=m @@ -5557,7 +5639,6 @@ CONFIG_USB_EHCI_PCI=y CONFIG_USB_EHCI_HCD_PLATFORM=y CONFIG_USB_OXU210HP_HCD=m CONFIG_USB_ISP116X_HCD=m -CONFIG_USB_ISP1760_HCD=m CONFIG_USB_ISP1362_HCD=m CONFIG_USB_FUSBH200_HCD=m CONFIG_USB_FOTG210_HCD=m @@ -5623,9 +5704,10 @@ CONFIG_USB_MUSB_HDRC=m # CONFIG_USB_MUSB_HOST is not set # CONFIG_USB_MUSB_GADGET is not set CONFIG_USB_MUSB_DUAL_ROLE=y -CONFIG_USB_MUSB_TUSB6010=m -CONFIG_USB_MUSB_UX500=m -# CONFIG_USB_UX500_DMA is not set + +# +# Platform Glue Layer +# CONFIG_MUSB_PIO_ONLY=y CONFIG_USB_DWC3=m # CONFIG_USB_DWC3_HOST is not set @@ -5643,20 +5725,25 @@ CONFIG_USB_DWC3_PCI=m # CONFIG_USB_DWC3_DEBUG is not set CONFIG_DWC3_HOST_USB3_LPM_ENABLE=y CONFIG_USB_DWC2=y -CONFIG_USB_DWC2_HOST=m -CONFIG_USB_DWC2_PLATFORM=y -CONFIG_USB_DWC2_PCI=y +CONFIG_USB_DWC2_HOST=y # -# Gadget mode requires USB Gadget support to be enabled +# Gadget/Dual-role mode requires USB Gadget support to be enabled # -CONFIG_USB_DWC2_PERIPHERAL=m +CONFIG_USB_DWC2_PLATFORM=y +CONFIG_USB_DWC2_PCI=y # CONFIG_USB_DWC2_DEBUG is not set # CONFIG_USB_DWC2_TRACK_MISSED_SOFS is not set CONFIG_USB_CHIPIDEA=m CONFIG_USB_CHIPIDEA_UDC=y CONFIG_USB_CHIPIDEA_HOST=y # CONFIG_USB_CHIPIDEA_DEBUG is not set +CONFIG_USB_ISP1760=m +CONFIG_USB_ISP1760_HCD=y +CONFIG_USB_ISP1761_UDC=y +# CONFIG_USB_ISP1760_HOST_ROLE is not set +# CONFIG_USB_ISP1760_GADGET_ROLE is not set +CONFIG_USB_ISP1760_DUAL_ROLE=y # # USB port drivers @@ -5789,6 +5876,12 @@ CONFIG_USB_PXA27X=m CONFIG_USB_MV_UDC=m CONFIG_USB_MV_U3D=m # CONFIG_USB_M66592 is not set +CONFIG_USB_BDC_UDC=m + +# +# Platform Support +# +CONFIG_USB_BDC_PCI=m CONFIG_USB_AMD5536UDC=m CONFIG_USB_NET2272=m CONFIG_USB_NET2272_DMA=y @@ -5812,7 +5905,10 @@ CONFIG_USB_F_RNDIS=m CONFIG_USB_F_MASS_STORAGE=m CONFIG_USB_F_FS=m CONFIG_USB_F_UAC1=m +CONFIG_USB_F_UAC2=m CONFIG_USB_F_UVC=m +CONFIG_USB_F_MIDI=m +CONFIG_USB_F_HID=m CONFIG_USB_CONFIGFS=m CONFIG_USB_CONFIGFS_SERIAL=y CONFIG_USB_CONFIGFS_ACM=y @@ -5826,6 +5922,11 @@ CONFIG_USB_CONFIGFS_PHONET=y CONFIG_USB_CONFIGFS_MASS_STORAGE=y CONFIG_USB_CONFIGFS_F_LB_SS=y CONFIG_USB_CONFIGFS_F_FS=y +CONFIG_USB_CONFIGFS_F_UAC1=y +CONFIG_USB_CONFIGFS_F_UAC2=y +CONFIG_USB_CONFIGFS_F_MIDI=y +CONFIG_USB_CONFIGFS_F_HID=y +CONFIG_USB_CONFIGFS_F_UVC=y CONFIG_USB_ZERO=m CONFIG_USB_AUDIO=m CONFIG_GADGET_UAC1=y @@ -5878,8 +5979,6 @@ CONFIG_MMC_SDHCI_PCI=m CONFIG_MMC_RICOH_MMC=y CONFIG_MMC_SDHCI_ACPI=m CONFIG_MMC_SDHCI_PLTFM=m -CONFIG_MMC_SDHCI_PXAV3=m -CONFIG_MMC_SDHCI_PXAV2=m CONFIG_MMC_WBSD=m CONFIG_MMC_TIFM_SD=m CONFIG_MMC_SPI=m @@ -5891,6 +5990,7 @@ CONFIG_MMC_USHC=m CONFIG_MMC_USDHI6ROL0=m CONFIG_MMC_REALTEK_PCI=m CONFIG_MMC_REALTEK_USB=m +CONFIG_MMC_TOSHIBA_PCI=m CONFIG_MEMSTICK=m # CONFIG_MEMSTICK_DEBUG is not set @@ -5911,6 +6011,7 @@ CONFIG_MEMSTICK_REALTEK_PCI=m CONFIG_MEMSTICK_REALTEK_USB=m CONFIG_NEW_LEDS=y CONFIG_LEDS_CLASS=y +CONFIG_LEDS_CLASS_FLASH=m # # LED drivers @@ -5929,6 +6030,7 @@ CONFIG_LEDS_LP5523=m CONFIG_LEDS_LP5562=m CONFIG_LEDS_LP8501=m CONFIG_LEDS_LP8788=m +CONFIG_LEDS_LP8860=m CONFIG_LEDS_CLEVO_MAIL=m CONFIG_LEDS_PCA955X=m CONFIG_LEDS_PCA963X=m @@ -5977,6 +6079,7 @@ CONFIG_INFINIBAND=m CONFIG_INFINIBAND_USER_MAD=m CONFIG_INFINIBAND_USER_ACCESS=m CONFIG_INFINIBAND_USER_MEM=y +CONFIG_INFINIBAND_ON_DEMAND_PAGING=y CONFIG_INFINIBAND_ADDR_TRANS=y CONFIG_INFINIBAND_MTHCA=m # CONFIG_INFINIBAND_MTHCA_DEBUG is not set @@ -6042,8 +6145,10 @@ CONFIG_RTC_INTF_DEV=y # CONFIG_RTC_DRV_88PM860X=m CONFIG_RTC_DRV_88PM80X=m +CONFIG_RTC_DRV_ABB5ZES3=m CONFIG_RTC_DRV_DS1307=m CONFIG_RTC_DRV_DS1374=m +CONFIG_RTC_DRV_DS1374_WDT=y CONFIG_RTC_DRV_DS1672=m CONFIG_RTC_DRV_DS3232=m CONFIG_RTC_DRV_LP8788=m @@ -6052,8 +6157,6 @@ CONFIG_RTC_DRV_MAX8907=m CONFIG_RTC_DRV_MAX8925=m CONFIG_RTC_DRV_MAX8998=m CONFIG_RTC_DRV_MAX8997=m -CONFIG_RTC_DRV_MAX77686=m -CONFIG_RTC_DRV_MAX77802=m CONFIG_RTC_DRV_RS5C372=m CONFIG_RTC_DRV_ISL1208=m CONFIG_RTC_DRV_ISL12022=m @@ -6105,6 +6208,14 @@ CONFIG_RTC_DRV_CMOS=y CONFIG_RTC_DRV_DS1286=m CONFIG_RTC_DRV_DS1511=m CONFIG_RTC_DRV_DS1553=m +CONFIG_RTC_DRV_DS1685_FAMILY=m +CONFIG_RTC_DRV_DS1685=y +# CONFIG_RTC_DRV_DS1689 is not set +# CONFIG_RTC_DRV_DS17285 is not set +# CONFIG_RTC_DRV_DS17485 is not set +# CONFIG_RTC_DRV_DS17885 is not set +# CONFIG_RTC_DS1685_PROC_REGS is not set +# CONFIG_RTC_DS1685_SYSFS_REGS is not set CONFIG_RTC_DRV_DS1742=m CONFIG_RTC_DRV_DS2404=m CONFIG_RTC_DRV_DA9052=m @@ -6175,6 +6286,8 @@ CONFIG_VFIO_IOMMU_TYPE1=m CONFIG_VFIO=m CONFIG_VFIO_PCI=m CONFIG_VFIO_PCI_VGA=y +CONFIG_VFIO_PCI_MMAP=y +CONFIG_VFIO_PCI_INTX=y CONFIG_VIRT_DRIVERS=y CONFIG_VIRTIO=y @@ -6182,6 +6295,7 @@ CONFIG_VIRTIO=y # Virtio drivers # CONFIG_VIRTIO_PCI=y +CONFIG_VIRTIO_PCI_LEGACY=y CONFIG_VIRTIO_BALLOON=y CONFIG_VIRTIO_MMIO=y CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y @@ -6199,6 +6313,7 @@ CONFIG_HYPERV_BALLOON=m CONFIG_XEN_BALLOON=y CONFIG_XEN_SELFBALLOONING=y CONFIG_XEN_BALLOON_MEMORY_HOTPLUG=y +CONFIG_XEN_BALLOON_MEMORY_HOTPLUG_LIMIT=512 CONFIG_XEN_SCRUB_PAGES=y CONFIG_XEN_DEV_EVTCHN=m CONFIG_XEN_BACKEND=y @@ -6276,10 +6391,9 @@ CONFIG_COMEDI_PCMMIO=m CONFIG_COMEDI_PCMUIO=m CONFIG_COMEDI_MULTIQ3=m CONFIG_COMEDI_S526=m -CONFIG_COMEDI_PCI_DRIVERS=y +CONFIG_COMEDI_PCI_DRIVERS=m CONFIG_COMEDI_8255_PCI=m CONFIG_COMEDI_ADDI_WATCHDOG=m -CONFIG_COMEDI_ADDI_APCI_035=m CONFIG_COMEDI_ADDI_APCI_1032=m CONFIG_COMEDI_ADDI_APCI_1500=m CONFIG_COMEDI_ADDI_APCI_1516=m @@ -6332,7 +6446,7 @@ CONFIG_COMEDI_RTD520=m CONFIG_COMEDI_S626=m CONFIG_COMEDI_MITE=m CONFIG_COMEDI_NI_TIOCMD=m -CONFIG_COMEDI_PCMCIA_DRIVERS=y +CONFIG_COMEDI_PCMCIA_DRIVERS=m CONFIG_COMEDI_CB_DAS16_CS=m CONFIG_COMEDI_DAS08_CS=m CONFIG_COMEDI_NI_DAQ_700_CS=m @@ -6340,7 +6454,7 @@ CONFIG_COMEDI_NI_DAQ_DIO24_CS=m CONFIG_COMEDI_NI_LABPC_CS=m CONFIG_COMEDI_NI_MIO_CS=m CONFIG_COMEDI_QUATECH_DAQP_CS=m -CONFIG_COMEDI_USB_DRIVERS=y +CONFIG_COMEDI_USB_DRIVERS=m CONFIG_COMEDI_DT9812=m CONFIG_COMEDI_NI_USB6501=m CONFIG_COMEDI_USBDUX=m @@ -6352,6 +6466,7 @@ CONFIG_COMEDI_KCOMEDILIB=m CONFIG_COMEDI_AMPLC_DIO200=m CONFIG_COMEDI_AMPLC_PC236=m CONFIG_COMEDI_DAS08=m +CONFIG_COMEDI_ISADMA=m CONFIG_COMEDI_NI_LABPC=m CONFIG_COMEDI_NI_LABPC_ISADMA=m CONFIG_COMEDI_NI_TIO=m @@ -6372,8 +6487,6 @@ CONFIG_R8723AU=m CONFIG_8723AU_AP_MODE=y CONFIG_8723AU_BT_COEXIST=y CONFIG_RTS5208=m -CONFIG_LINE6_USB=m -# CONFIG_LINE6_USB_IMPULSE_RESPONSE is not set CONFIG_VT6655=m CONFIG_VT6656=m @@ -6474,8 +6587,8 @@ CONFIG_IIO_PERIODIC_RTC_TRIGGER=m CONFIG_IIO_SIMPLE_DUMMY=m # CONFIG_IIO_SIMPLE_DUMMY_EVENTS is not set # CONFIG_IIO_SIMPLE_DUMMY_BUFFER is not set +CONFIG_FB_SM7XX=m CONFIG_FB_XGI=m -CONFIG_BCM_WIMAX=m CONFIG_FT1000=m CONFIG_FT1000_USB=m CONFIG_FT1000_PCMCIA=m @@ -6495,7 +6608,6 @@ CONFIG_SPEAKUP_SYNTH_SOFT=m CONFIG_SPEAKUP_SYNTH_SPKOUT=m CONFIG_SPEAKUP_SYNTH_TXPRT=m CONFIG_SPEAKUP_SYNTH_DUMMY=m -CONFIG_TOUCHSCREEN_CLEARPAD_TM1217=m CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4=m CONFIG_STAGING_MEDIA=y CONFIG_I2C_BCM2048=m @@ -6503,10 +6615,10 @@ CONFIG_DVB_CXD2099=m CONFIG_VIDEO_DT3155=m # CONFIG_DT3155_CCIR is not set CONFIG_DT3155_STREAMING=y -# CONFIG_VIDEO_TCM825X is not set +CONFIG_DVB_MN88472=m +CONFIG_DVB_MN88473=m CONFIG_LIRC_STAGING=y CONFIG_LIRC_BT829=m -CONFIG_LIRC_IGORPLUGUSB=m CONFIG_LIRC_IMON=m CONFIG_LIRC_PARALLEL=m CONFIG_LIRC_SASEM=m @@ -6518,7 +6630,6 @@ CONFIG_LIRC_ZILOG=m # # Android # -# CONFIG_ANDROID is not set CONFIG_USB_WPAN_HCD=m CONFIG_WIMAX_GDM72XX=m CONFIG_WIMAX_GDM72XX_QOS=y @@ -6545,15 +6656,51 @@ CONFIG_DGNC=m CONFIG_DGAP=m CONFIG_GS_FPGABOOT=m CONFIG_CRYPTO_SKEIN=y -CONFIG_CRYPTO_THREEFISH=y CONFIG_UNISYSSPAR=y CONFIG_UNISYS_VISORUTIL=m CONFIG_UNISYS_VISORCHANNEL=m CONFIG_UNISYS_VISORCHIPSET=m -CONFIG_UNISYS_CHANNELSTUB=m CONFIG_UNISYS_UISLIB=m CONFIG_UNISYS_VIRTPCI=m CONFIG_UNISYS_VIRTHBA=m +CONFIG_FB_TFT=m +CONFIG_FB_TFT_AGM1264K_FL=m +CONFIG_FB_TFT_BD663474=m +CONFIG_FB_TFT_HX8340BN=m +CONFIG_FB_TFT_HX8347D=m +CONFIG_FB_TFT_HX8353D=m +CONFIG_FB_TFT_ILI9320=m +CONFIG_FB_TFT_ILI9325=m +CONFIG_FB_TFT_ILI9340=m +CONFIG_FB_TFT_ILI9341=m +CONFIG_FB_TFT_ILI9481=m +CONFIG_FB_TFT_ILI9486=m +CONFIG_FB_TFT_PCD8544=m +CONFIG_FB_TFT_RA8875=m +CONFIG_FB_TFT_S6D02A1=m +CONFIG_FB_TFT_S6D1121=m +CONFIG_FB_TFT_SSD1289=m +CONFIG_FB_TFT_SSD1306=m +CONFIG_FB_TFT_SSD1331=m +CONFIG_FB_TFT_SSD1351=m +CONFIG_FB_TFT_ST7735R=m +CONFIG_FB_TFT_TINYLCD=m +CONFIG_FB_TFT_TLS8204=m +CONFIG_FB_TFT_UC1701=m +CONFIG_FB_TFT_UPD161704=m +CONFIG_FB_TFT_WATTEROTT=m +CONFIG_FB_FLEX=m +CONFIG_FB_TFT_FBTFT_DEVICE=m +CONFIG_I2O=m +CONFIG_I2O_LCT_NOTIFY_ON_CHANGES=y +CONFIG_I2O_EXT_ADAPTEC=y +CONFIG_I2O_EXT_ADAPTEC_DMA64=y +CONFIG_I2O_CONFIG=m +# CONFIG_I2O_CONFIG_OLD_IOCTL is not set +CONFIG_I2O_BUS=m +CONFIG_I2O_BLOCK=m +CONFIG_I2O_SCSI=m +CONFIG_I2O_PROC=m CONFIG_X86_PLATFORM_DEVICES=y CONFIG_ACER_WMI=m CONFIG_ACERHDF=m @@ -6609,11 +6756,6 @@ CONFIG_PVPANIC=m CONFIG_CHROME_PLATFORMS=y CONFIG_CHROMEOS_LAPTOP=m CONFIG_CHROMEOS_PSTORE=m - -# -# SOC (System On Chip) specific Drivers -# -CONFIG_SOC_TI=y CONFIG_CLKDEV_LOOKUP=y CONFIG_HAVE_CLK_PREPARE=y CONFIG_COMMON_CLK=y @@ -6622,14 +6764,12 @@ CONFIG_COMMON_CLK=y # Common Clock Framework # CONFIG_COMMON_CLK_WM831X=m -CONFIG_COMMON_CLK_MAX_GEN=y -CONFIG_COMMON_CLK_MAX77686=m -CONFIG_COMMON_CLK_MAX77802=m CONFIG_COMMON_CLK_SI5351=m CONFIG_COMMON_CLK_S2MPS11=m CONFIG_CLK_TWL6040=m CONFIG_COMMON_CLK_PALMAS=m # CONFIG_COMMON_CLK_PXA is not set +CONFIG_COMMON_CLK_CDCE706=m # # Hardware Spinlock drivers @@ -6647,8 +6787,15 @@ CONFIG_CLKBLD_I8253=y # CONFIG_SH_TIMER_TMU is not set # CONFIG_EM_TIMER_STI is not set CONFIG_MAILBOX=y +CONFIG_PCC=y +CONFIG_ALTERA_MBOX=m CONFIG_IOMMU_API=y CONFIG_IOMMU_SUPPORT=y + +# +# Generic IOMMU Pagetable Support +# +CONFIG_IOMMU_IOVA=y CONFIG_AMD_IOMMU=y CONFIG_AMD_IOMMU_STATS=y CONFIG_AMD_IOMMU_V2=m @@ -6671,6 +6818,7 @@ CONFIG_STE_MODEM_RPROC=m # # SOC (System On Chip) specific Drivers # +CONFIG_SOC_TI=y CONFIG_PM_DEVFREQ=y # @@ -6684,6 +6832,7 @@ CONFIG_DEVFREQ_GOV_USERSPACE=y # # DEVFREQ Drivers # +CONFIG_PM_DEVFREQ_EVENT=y CONFIG_EXTCON=y # @@ -6719,6 +6868,9 @@ CONFIG_IIO_ST_ACCEL_SPI_3AXIS=m CONFIG_KXSD9=m CONFIG_MMA8452=m CONFIG_KXCJK1013=m +CONFIG_MMA9551_CORE=m +CONFIG_MMA9551=m +CONFIG_MMA9553=m # # Analog to digital converters @@ -6733,6 +6885,8 @@ CONFIG_AD7793=m CONFIG_AD7887=m CONFIG_AD7923=m CONFIG_AD799X=m +CONFIG_AXP288_ADC=m +CONFIG_CC10001_ADC=m CONFIG_LP8788_ADC=m CONFIG_MAX1027=m CONFIG_MAX1363=m @@ -6740,6 +6894,8 @@ CONFIG_MCP320X=m CONFIG_MCP3422=m CONFIG_MEN_Z188_ADC=m CONFIG_NAU7802=m +CONFIG_QCOM_SPMI_IADC=m +CONFIG_QCOM_SPMI_VADC=m CONFIG_TI_ADC081C=m CONFIG_TI_ADC128S052=m CONFIG_TI_AM335X_ADC=m @@ -6757,6 +6913,12 @@ CONFIG_AD8366=m # CONFIG_HID_SENSOR_IIO_COMMON=m CONFIG_HID_SENSOR_IIO_TRIGGER=m + +# +# SSP Sensor Common +# +CONFIG_IIO_SSP_SENSORS_COMMONS=m +CONFIG_IIO_SSP_SENSORHUB=m CONFIG_IIO_ST_SENSORS_I2C=m CONFIG_IIO_ST_SENSORS_SPI=m CONFIG_IIO_ST_SENSORS_CORE=m @@ -6815,12 +6977,14 @@ CONFIG_ITG3200=m # CONFIG_DHT11=m CONFIG_SI7005=m +CONFIG_SI7020=m # # Inertial measurement units # CONFIG_ADIS16400=m CONFIG_ADIS16480=m +CONFIG_KMX61=m CONFIG_INV_MPU6050_IIO=m CONFIG_IIO_ADIS_LIB=m CONFIG_IIO_ADIS_LIB_BUFFER=y @@ -6832,11 +6996,13 @@ CONFIG_ADJD_S311=m CONFIG_AL3320A=m CONFIG_APDS9300=m CONFIG_CM32181=m +CONFIG_CM3232=m CONFIG_CM36651=m CONFIG_GP2AP020A00F=m CONFIG_ISL29125=m CONFIG_HID_SENSOR_ALS=m CONFIG_HID_SENSOR_PROX=m +CONFIG_JSA1212=m CONFIG_SENSORS_LM3533=m CONFIG_LTR501=m CONFIG_TCS3414=m @@ -6871,6 +7037,7 @@ CONFIG_IIO_SYSFS_TRIGGER=m # # Pressure sensors # +CONFIG_BMP280=m CONFIG_HID_SENSOR_PRESS=m CONFIG_MPL115=m CONFIG_MPL3115=m @@ -6885,6 +7052,11 @@ CONFIG_T5403=m CONFIG_AS3935=m # +# Proximity sensors +# +CONFIG_SX9500=m + +# # Temperature sensors # CONFIG_MLX90614=m @@ -6943,6 +7115,11 @@ CONFIG_RAS=y CONFIG_THUNDERBOLT=m # +# Android +# +# CONFIG_ANDROID is not set + +# # Firmware Drivers # CONFIG_EDD=y @@ -7013,6 +7190,7 @@ CONFIG_BTRFS_FS_POSIX_ACL=y # CONFIG_BTRFS_DEBUG is not set # CONFIG_BTRFS_ASSERT is not set CONFIG_NILFS2_FS=m +CONFIG_FS_DAX=y CONFIG_FS_POSIX_ACL=y CONFIG_EXPORTFS=y CONFIG_FILE_LOCKING=y @@ -7084,6 +7262,7 @@ CONFIG_TMPFS_XATTR=y CONFIG_HUGETLBFS=y CONFIG_HUGETLB_PAGE=y CONFIG_CONFIGFS_FS=m +CONFIG_EFIVAR_FS=y CONFIG_MISC_FILESYSTEMS=y CONFIG_ADFS_FS=m # CONFIG_ADFS_FS_RW is not set @@ -7128,6 +7307,7 @@ CONFIG_SQUASHFS_FILE_DIRECT=y CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y CONFIG_SQUASHFS_XATTR=y CONFIG_SQUASHFS_ZLIB=y +# CONFIG_SQUASHFS_LZ4 is not set CONFIG_SQUASHFS_LZO=y CONFIG_SQUASHFS_XZ=y # CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set @@ -7147,6 +7327,7 @@ CONFIG_ROMFS_BACKED_BY_BLOCK=y CONFIG_ROMFS_ON_BLOCK=y CONFIG_PSTORE=y # CONFIG_PSTORE_CONSOLE is not set +# CONFIG_PSTORE_PMSG is not set # CONFIG_PSTORE_FTRACE is not set CONFIG_PSTORE_RAM=m CONFIG_SYSV_FS=m @@ -7161,7 +7342,7 @@ CONFIG_F2FS_FS_XATTR=y CONFIG_F2FS_FS_POSIX_ACL=y CONFIG_F2FS_FS_SECURITY=y # CONFIG_F2FS_CHECK_FS is not set -CONFIG_EFIVAR_FS=y +# CONFIG_F2FS_IO_TRACE is not set CONFIG_ORE=m CONFIG_NETWORK_FILESYSTEMS=y CONFIG_NFS_FS=m @@ -7175,6 +7356,7 @@ CONFIG_NFS_V4_2=y CONFIG_PNFS_FILE_LAYOUT=m CONFIG_PNFS_BLOCK=m CONFIG_PNFS_OBJLAYOUT=m +CONFIG_PNFS_FLEXFILE_LAYOUT=m CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN="kernel.org" CONFIG_NFS_V4_1_MIGRATION=y CONFIG_NFS_V4_SECURITY_LABEL=y @@ -7187,6 +7369,7 @@ CONFIG_NFSD_V2_ACL=y CONFIG_NFSD_V3=y CONFIG_NFSD_V3_ACL=y CONFIG_NFSD_V4=y +CONFIG_NFSD_PNFS=y CONFIG_NFSD_V4_SECURITY_LABEL=y # CONFIG_NFSD_FAULT_INJECTION is not set CONFIG_GRACE_PERIOD=m @@ -7312,6 +7495,7 @@ CONFIG_FRAME_WARN=1024 # CONFIG_STRIP_ASM_SYMS is not set # CONFIG_READABLE_ASM is not set CONFIG_UNUSED_SYMBOLS=y +# CONFIG_PAGE_OWNER is not set CONFIG_DEBUG_FS=y # CONFIG_HEADERS_CHECK is not set # CONFIG_DEBUG_SECTION_MISMATCH is not set @@ -7325,6 +7509,7 @@ CONFIG_DEBUG_KERNEL=y # # Memory Debugging # +# CONFIG_PAGE_EXTENSION is not set # CONFIG_DEBUG_PAGEALLOC is not set # CONFIG_DEBUG_OBJECTS is not set # CONFIG_SLUB_DEBUG_ON is not set @@ -7340,6 +7525,9 @@ CONFIG_MEMORY_NOTIFIER_ERROR_INJECT=m CONFIG_HAVE_DEBUG_STACKOVERFLOW=y # CONFIG_DEBUG_STACKOVERFLOW is not set CONFIG_HAVE_ARCH_KMEMCHECK=y +CONFIG_HAVE_ARCH_KASAN=y +# CONFIG_KASAN is not set +CONFIG_KASAN_SHADOW_OFFSET=0xdffffc0000000000 # CONFIG_DEBUG_SHIRQ is not set # @@ -7360,7 +7548,7 @@ CONFIG_PANIC_ON_OOPS_VALUE=0 CONFIG_PANIC_TIMEOUT=0 CONFIG_SCHED_DEBUG=y CONFIG_SCHEDSTATS=y -# CONFIG_SCHED_STACK_END_CHECK is not set +CONFIG_SCHED_STACK_END_CHECK=y CONFIG_TIMER_STATS=y # @@ -7461,6 +7649,7 @@ CONFIG_INTERVAL_TREE_TEST=m CONFIG_PERCPU_TEST=m # CONFIG_ATOMIC64_SELFTEST is not set CONFIG_ASYNC_RAID6_TEST=m +CONFIG_TEST_HEXDUMP=m CONFIG_TEST_STRING_HELPERS=m CONFIG_TEST_KSTRTOX=m # CONFIG_TEST_RHASHTABLE is not set @@ -7478,6 +7667,7 @@ CONFIG_KGDB_SERIAL_CONSOLE=y # CONFIG_KGDB_TESTS is not set CONFIG_KGDB_LOW_LEVEL_TRAP=y CONFIG_KGDB_KDB=y +CONFIG_KDB_DEFAULT_ENABLE=0x1 CONFIG_KDB_KEYBOARD=y CONFIG_KDB_CONTINUE_CATASTROPHIC=0 CONFIG_STRICT_DEVMEM=y @@ -7519,7 +7709,6 @@ CONFIG_PERSISTENT_KEYRINGS=y CONFIG_BIG_KEYS=y CONFIG_TRUSTED_KEYS=y CONFIG_ENCRYPTED_KEYS=y -CONFIG_KEYS_DEBUG_PROC_KEYS=y # CONFIG_SECURITY_DMESG_RESTRICT is not set CONFIG_SECURITY=y CONFIG_SECURITYFS=y @@ -7538,6 +7727,7 @@ CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 # CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set CONFIG_SECURITY_SMACK=y # CONFIG_SECURITY_SMACK_BRINGUP is not set +CONFIG_SECURITY_SMACK_NETFILTER=y CONFIG_SECURITY_TOMOYO=y CONFIG_SECURITY_TOMOYO_MAX_ACCEPT_ENTRY=2048 CONFIG_SECURITY_TOMOYO_MAX_AUDIT_LOG=1024 @@ -7567,6 +7757,7 @@ CONFIG_IMA_DEFAULT_HASH_SHA1=y CONFIG_IMA_DEFAULT_HASH="sha1" CONFIG_IMA_APPRAISE=y CONFIG_IMA_TRUSTED_KEYRING=y +# CONFIG_IMA_LOAD_X509 is not set CONFIG_EVM=y CONFIG_EVM_ATTR_FSUUID=y CONFIG_EVM_EXTRA_SMACK_XATTRS=y @@ -7728,6 +7919,7 @@ CONFIG_CRYPTO_DRBG=m CONFIG_CRYPTO_USER_API=m CONFIG_CRYPTO_USER_API_HASH=m CONFIG_CRYPTO_USER_API_SKCIPHER=m +CONFIG_CRYPTO_USER_API_RNG=m CONFIG_CRYPTO_HASH_INFO=y CONFIG_CRYPTO_HW=y CONFIG_CRYPTO_DEV_PADLOCK=y @@ -7755,6 +7947,8 @@ CONFIG_KVM_ASYNC_PF=y CONFIG_HAVE_KVM_MSI=y CONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT=y CONFIG_KVM_VFIO=y +CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT=y +CONFIG_KVM_COMPAT=y CONFIG_VIRTUALIZATION=y CONFIG_KVM=m CONFIG_KVM_INTEL=m @@ -7768,6 +7962,7 @@ CONFIG_BINARY_PRINTF=y # CONFIG_RAID6_PQ=m CONFIG_BITREVERSE=y +# CONFIG_HAVE_ARCH_BITREVERSE is not set CONFIG_RATIONAL=y CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index bd9ae0e08d..26e9aa9000 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -55,6 +55,8 @@ #:use-module (gnu packages gtk) #:use-module (gnu packages docbook) #:use-module (gnu packages asciidoc) + #:use-module (gnu packages readline) + #:use-module (gnu packages calendar) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix utils) @@ -91,7 +93,7 @@ version "-gnu.tar.xz"))) (define-public linux-libre-headers - (let* ((version "3.3.8") + (let* ((version "3.14.37") (build-phase (lambda (arch) `(lambda _ @@ -120,7 +122,7 @@ (uri (linux-libre-urls version)) (sha256 (base32 - "0jkfh0z1s6izvdnc3njm39dhzp1cg8i06jv06izwqz9w9qsprvnl")))) + "1blxr2bsvfqi9khj4cpspv434bmx252zak2wsbi2mgl60zh77gza")))) (build-system gnu-build-system) (native-inputs `(("perl" ,perl))) (arguments @@ -198,7 +200,7 @@ for SYSTEM, or #f if there is no configuration for SYSTEM." #f))) (define-public linux-libre - (let* ((version "3.18.9") + (let* ((version "4.0.4") (build-phase '(lambda* (#:key system inputs #:allow-other-keys #:rest args) ;; Apply the neat patch. @@ -271,7 +273,7 @@ for SYSTEM, or #f if there is no configuration for SYSTEM." (uri (linux-libre-urls version)) (sha256 (base32 - "0n3p9ci8w71hd168df7xlccafxzb3agr8rk3xmvnj7dnbfiddqv6")))) + "1czjhyczzaz1dvhy9lrlxlk6gf45wcw3rnpcmh697dxgf37clmzp")))) (build-system gnu-build-system) (native-inputs `(("perl" ,perl) ("bc" ,bc) @@ -402,8 +404,14 @@ providing the system administrator with some help in common tasks.") (("build_kill=yes") "build_kill=no"))))) (build-system gnu-build-system) (arguments - `(#:configure-flags '("--disable-use-tty-group" - "--enable-ddate") + `(#:configure-flags (list "--disable-use-tty-group" + "--enable-ddate" + + ;; Install completions where our + ;; bash-completion package expects them. + (string-append "--with-bashcompletiondir=" + (assoc-ref %outputs "out") + "/etc/bash_completion.d")) #:phases (alist-cons-before 'check 'pre-check (lambda* (#:key inputs outputs #:allow-other-keys) @@ -569,8 +577,21 @@ slabtop, and skill.") (string-append "#!" (which "sh"))))) (alist-cons-after 'install 'install-libs - (lambda _ - (zero? (system* "make" "install-libs"))) + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib"))) + (and (zero? (system* "make" "install-libs")) + + ;; Make the .a writable so that 'strip' works. + ;; Failing to do that, due to debug symbols, we + ;; retain a reference to the final + ;; linux-libre-headers, which refer to the + ;; bootstrap binaries. + (let ((archives (find-files lib "\\.a$"))) + (for-each (lambda (file) + (chmod file #o666)) + archives) + #t)))) %standard-phases)) ;; FIXME: Tests work by comparing the stdout/stderr of programs, that @@ -787,7 +808,10 @@ MIDI functionality to the Linux-based operating system.") (base32 "0vkg5lzkn4l3i1sm6v3x96zzvnv9g7mi0qgj6279ld383mzcws24")))) (build-system gnu-build-system) - (arguments '(#:tests? #f)) ; no test suite + (arguments + '(#:tests? #f ; no test suite + #:configure-flags ; add $libdir to the RUNPATH of executables + (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")))) (home-page "http://www.netfilter.org/projects/iptables/index.html") (synopsis "Program to configure the Linux IP packet filtering rules") (description @@ -908,10 +932,12 @@ manpages.") ;; Pretend we have everything... (system "yes | make config") - ;; ... except we don't have libdnet, so remove that - ;; definition. + ;; ... except for the things we don't have. + ;; HAVE_AFDECnet requires libdnet, which we don't have. + ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers + ;; that have been removed. (substitute* '("config.make" "config.h") - (("^.*HAVE_AFDECnet.*$") "")))) + (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR)[ =]1.*$") "")))) (alist-cons-after 'install 'remove-redundant-commands (lambda* (#:key outputs #:allow-other-keys) @@ -973,7 +999,15 @@ advanced aspects of IP configuration (iptunnel, ipmaddr).") (base32 "07vjhkznm82p8dm4w6j8mmg7h5c70lp5s9bwwfdmgwpbixfydjp1")))) (build-system gnu-build-system) - (arguments '(#:phases (alist-delete 'configure %standard-phases) + (arguments '(#:phases + (modify-phases %standard-phases + (replace 'configure + ;; Add $libdir to the RUNPATH of executables. + (lambda _ + (substitute* "Make.Rules" + (("LDFLAGS := #-g") + (string-append "LDFLAGS := -Wl,-rpath=" + %output "/lib")))))) #:tests? #f ; no 'check' target #:make-flags (list "lib=lib" (string-append "prefix=" @@ -1010,6 +1044,17 @@ Linux-based operating systems.") '(#:phases (alist-cons-after 'unpack 'bootstrap (lambda _ + ;; Fix "field ‘ip6’ has incomplete type" errors. + (substitute* "libbridge/libbridge.h" + (("#include <linux/if_bridge.h>") + "#include <linux/in6.h>\n#include <linux/if_bridge.h>")) + + ;; Ensure that the entire build fails if one of the + ;; sub-Makefiles fails. + (substitute* "Makefile.in" + (("\\$\\(MAKE\\) \\$\\(MFLAGS\\) -C \\$\\$x ;") + "$(MAKE) $(MFLAGS) -C $$x || exit 1;")) + (zero? (system* "autoreconf" "-vf"))) %standard-phases) #:tests? #f)) ; no 'check' target @@ -1167,7 +1212,8 @@ processes currently causing I/O.") version ".tar.gz")) (sha256 (base32 - "071r6xjgssy8vwdn6m28qq1bqxsd2bphcd2mzhq0grf5ybm87sqb")))) + "071r6xjgssy8vwdn6m28qq1bqxsd2bphcd2mzhq0grf5ybm87sqb")) + (patches (list (search-patch "fuse-CVE-2015-3202.patch"))))) (build-system gnu-build-system) (inputs `(("util-linux" ,util-linux))) (arguments @@ -1367,14 +1413,14 @@ system.") (define-public kbd (package (name "kbd") - (version "2.0.1") + (version "2.0.2") (source (origin (method url-fetch) (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-" - version ".tar.gz")) + version ".tar.xz")) (sha256 (base32 - "0c34b0za2v0934acvgnva0vaqpghmmhz4zh7k0m9jd4mbc91byqm")) + "04mrms12nm5sas0nxs94yrr3hz7gmqhnmfgb9ff34bh1jszxmzcx")) (modules '((guix build utils))) (snippet '(begin @@ -1999,3 +2045,180 @@ also contains the libsysfs library.") information, and set the CPU frequency if supported, using the cpufreq capabilities of the Linux kernel.") (license gpl2))) + +(define-public libraw1394 + (package + (name "libraw1394") + (version "2.1.0") + (source (origin + (method url-fetch) + (uri (string-append + "mirror://kernel.org/linux/libs/ieee1394/" + name "-" version ".tar.xz")) + (sha256 + (base32 + "0kwnf4ha45c04mhc4yla672aqmvqqihxix1gvblns5cd2pc2cc8b")))) + (build-system gnu-build-system) + (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page") + (synopsis "Interface library for the Linux IEEE1394 drivers") + (description + "Libraw1394 is the only supported interface to the kernel side raw1394 of +the Linux IEEE-1394 subsystem, which provides direct access to the connected +1394 buses to user space. Through libraw1394/raw1394, applications can directly +send to and receive from other nodes without requiring a kernel driver for the +protocol in question.") + (license lgpl2.1+))) + +(define-public libavc1394 + (package + (name "libavc1394") + (version "0.5.4") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/libavc1394/" + name "-" version ".tar.gz")) + (sha256 + (base32 + "0lsv46jdqvdx5hx92v0z2cz3yh6212pz9gk0k3513sbaa04zzcbw")))) + (build-system gnu-build-system) + (native-inputs + `(("pkg-config" ,pkg-config))) + (propagated-inputs + `(("libraw1394" ,libraw1394))) ; required by libavc1394.pc + (home-page "http://sourceforge.net/projects/libavc1394/") + (synopsis "AV/C protocol library for IEEE 1394") + (description + "Libavc1394 is a programming interface to the AV/C specification from +the 1394 Trade Assocation. AV/C stands for Audio/Video Control.") + (license lgpl2.1+))) + +(define-public libiec61883 + (package + (name "libiec61883") + (version "1.2.0") + (source (origin + (method url-fetch) + (uri (string-append + "mirror://kernel.org/linux/libs/ieee1394/" + name "-" version ".tar.xz")) + (sha256 + (base32 + "17ph458zya2l8dr2xwqnzy195qd9swrir31g78qkgb3g4xz2rq6i")))) + (build-system gnu-build-system) + (native-inputs + `(("pkg-config" ,pkg-config))) + (propagated-inputs + `(("libraw1394" ,libraw1394))) ; required by libiec61883.pc + (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page") + (synopsis "Isochronous streaming media library for IEEE 1394") + (description + "The libiec61883 library provides a higher level API for streaming DV, +MPEG-2 and audio over Linux IEEE 1394.") + (license lgpl2.1+))) + +(define-public mdadm + (package + (name "mdadm") + (version "3.3.2") + (source (origin + (method url-fetch) + (uri (string-append + "mirror://kernel.org/linux/utils/raid/mdadm/mdadm-" + version ".tar.xz")) + (sha256 + (base32 + "132vdvh3myjgcjn6i9w90ck16ddjxjcszklzkyvr4f5ifqd7wfhg")))) + (build-system gnu-build-system) + (inputs + `(("udev" ,eudev))) + (arguments + `(#:make-flags (let ((out (assoc-ref %outputs "out"))) + (list "INSTALL=install" + "CHECK_RUN_DIR=0" + ;; TODO: tell it where to find 'sendmail' + ;; (string-append "MAILCMD=" <???> "/sbin/sendmail") + (string-append "BINDIR=" out "/sbin") + (string-append "MANDIR=" out "/share/man") + (string-append "UDEVDIR=" out "/lib/udev"))) + #:phases (alist-cons-before + 'build 'patch-program-paths + (lambda* (#:key inputs #:allow-other-keys) + (let ((coreutils (assoc-ref inputs "coreutils"))) + (substitute* "udev-md-raid-arrays.rules" + (("/usr/bin/(readlink|basename)" all program) + (string-append coreutils "/bin/" program))))) + (alist-delete 'configure %standard-phases)) + ;;tests must be done as root + #:tests? #f)) + (home-page "http://neil.brown.name/blog/mdadm") + (synopsis "Tool for managing Linux Software RAID arrays") + (description + "mdadm is a tool for managing Linux Software RAID arrays. It can create, +assemble, report on, and monitor arrays. It can also move spares between raid +arrays when needed.") + (license gpl2+))) + +(define-public libaio + (package + (name "libaio") + (version "0.3.110") + (source (origin + (method url-fetch) + (uri (list + (string-append "mirror://debian/pool/main/liba/libaio/" + name "_" version ".orig.tar.gz") + (string-append "https://fedorahosted.org/releases/l/i/libaio/" + name "-" version ".tar.gz"))) + (sha256 + (base32 + "0zjzfkwd1kdvq6zpawhzisv7qbq1ffs343i5fs9p498pcf7046g0")))) + (build-system gnu-build-system) + (arguments + '(#:make-flags + (list "CC=gcc" (string-append "prefix=" %output)) + #:test-target "partcheck" ; need root for a full 'check' + #:phases + (alist-delete 'configure %standard-phases))) ; no configure script + (home-page "http://lse.sourceforge.net/io/aio.html") + (synopsis "Linux-native asynchronous I/O access library") + (description + "This library enables userspace to use Linux kernel asynchronous I/O +system calls, important for the performance of databases and other advanced +applications.") + (license lgpl2.1+))) + +(define-public bluez + (package + (name "bluez") + (version "5.30") + (source (origin + (method url-fetch) + (uri (string-append + "https://www.kernel.org/pub/linux/bluetooth/bluez-" + version ".tar.xz")) + (sha256 + (base32 + "0b1qbnq1xzcdw5rajg9yyg31bf21jnff0n6gnf1snz89bbdllfhy")))) + (build-system gnu-build-system) + (arguments + '(#:configure-flags + (let ((out (assoc-ref %outputs "out"))) + (list "--disable-systemd" + ;; Install dbus/udev files to the correct location. + (string-append "--with-dbusconfdir=" out "/etc") + (string-append "--with-udevdir=" out "/lib/udev"))))) + (native-inputs + `(("pkg-config" ,pkg-config) + ("gettext" ,gnu-gettext))) + (inputs + `(("glib" ,glib) + ("dbus" ,dbus) + ("eudev" ,eudev) + ("libical" ,libical) + ("readline" ,readline))) + (home-page "http://www.bluez.org/") + (synopsis "Linux Bluetooth protocol stack") + (description + "BlueZ provides support for the core Bluetooth layers and protocols. It +is flexible, efficient and uses a modular implementation.") + (license gpl2+))) diff --git a/gnu/packages/lirc.scm b/gnu/packages/lirc.scm new file mode 100644 index 0000000000..c070e1aaa4 --- /dev/null +++ b/gnu/packages/lirc.scm @@ -0,0 +1,61 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2015 Alex Kost <alezost@gmail.com> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (gnu packages lirc) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (gnu packages) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages linux) + #:use-module (gnu packages xorg) + #:use-module (gnu packages python)) + +(define-public lirc + (package + (name "lirc") + (version "0.9.2a") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/lirc/lirc-" + version ".tar.bz2")) + (sha256 + (base32 + "011nwpxm5d12rsapljg3pjf9pgb0j8ngmc3zg69q4kv61hkx2zim")) + (patches (list (search-patch "lirc-localstatedir.patch"))))) + (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--localstatedir=/var"))) + (native-inputs + `(("pkg-config" ,pkg-config))) + (inputs + `(("libx11" ,libx11) + ("alsa-lib" ,alsa-lib) + ("python" ,python))) + (home-page "http://www.lirc.org/") + (synopsis "Linux Infrared Remote Control") + (description + "LIRC allows computers to send and receive IR signals of many commonly +used remote controls. The most important part of LIRC is the 'lircd' daemon +that decodes IR signals received by the device drivers. The second daemon +program 'lircmd' allows to translate IR signals to mouse movements. The +user space applications allow you to control your computer with a remote +control: you can send X events to applications, start programs and much more +on just one button press.") + (license license:gpl2+))) diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index f0599a95c6..feaa08af38 100644 --- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -309,15 +309,19 @@ statistical profiler, a code coverage tool, and many other extensions.") "ftp://ftp.clozure.com/pub/release/1.10/ccl-" version "-" (match (%current-system) ((or "i686-linux" "x86_64-linux") "linuxx86") - ("armhf-linux" "linuxarm")) + ("armhf-linux" "linuxarm") + ;; Prevent errors when querying this package on unsupported + ;; platforms, e.g. when running "guix package --search=" + (_ "UNSUPPORTED")) ".tar.gz")) (sha256 (base32 (match (%current-system) ((or "i686-linux" "x86_64-linux") "0mr653q5px05lr11z2mk551m5g47b4wq96vbfibpp0qlc9jp58lc") - ("armhf" - "1py02irpmi2qz5rq3h33wfv6impf15z8i2rign6hvhlqn7s99wwh")))))))) + ("armhf-linux" + "1py02irpmi2qz5rq3h33wfv6impf15z8i2rign6hvhlqn7s99wwh") + (_ "")))))))) (native-inputs `(("m4" ,m4) ("subversion" ,subversion))) @@ -339,9 +343,13 @@ statistical profiler, a code coverage tool, and many other extensions.") (chdir (string-append "lisp-kernel/" ,(match (or (%current-target-system) (%current-system)) - ("i686-linux" "linuxx8632") + ("i686-linux" "linuxx8632") ("x86_64-linux" "linuxx8664") - ("armhf-linux" "linuxarm")))) + ("armhf-linux" "linuxarm") + ;; Prevent errors when querying this package + ;; on unsupported platforms, e.g. when running + ;; "guix package --search=" + (_ "UNSUPPORTED")))) (substitute* '("Makefile") (("/bin/rm") "rm")) (setenv "CC" "gcc") @@ -362,9 +370,13 @@ statistical profiler, a code coverage tool, and many other extensions.") (bash (assoc-ref inputs "bash")) (kernel ,(match (or (%current-target-system) (%current-system)) - ("i686-linux" "lx86cl") + ("i686-linux" "lx86cl") ("x86_64-linux" "lx86cl64") - ("armhf-linux" "armcl"))) + ("armhf-linux" "armcl") + ;; Prevent errors when querying this package + ;; on unsupported platforms, e.g. when running + ;; "guix package --search=" + (_ "UNSUPPORTED"))) (heap (string-append kernel ".image"))) (mkdir-p libdir) (mkdir-p bindir) diff --git a/gnu/packages/lsh.scm b/gnu/packages/lsh.scm index a931a111ad..0edf6b4382 100644 --- a/gnu/packages/lsh.scm +++ b/gnu/packages/lsh.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -91,7 +91,7 @@ basis for almost any application.") ("gperf" ,gperf) ("psmisc" ,psmisc))) ; for `killall' (inputs - `(("nettle" ,nettle) + `(("nettle" ,nettle-2) ("linux-pam" ,linux-pam) ;; 'rl.c' uses the 'CPPFunction' type, which is no longer in diff --git a/gnu/packages/lsof.scm b/gnu/packages/lsof.scm index 8062b99d65..da42957fee 100644 --- a/gnu/packages/lsof.scm +++ b/gnu/packages/lsof.scm @@ -35,7 +35,17 @@ (uri (list (string-append %ftp-base "lsof_" version ".tar.bz2") (string-append %ftp-base "OLD/lsof_" - version ".tar.bz2"))) + version ".tar.bz2") + + ;; Add mirrors because the FTP server at purdue.edu + ;; bails out when it cannot do a reverse DNS lookup, as + ;; noted at <http://people.freebsd.org/~abe/>. + (string-append + "ftp://ftp.fu-berlin.de/pub/unix/tools/lsof/lsof_" + version ".tar.bz2") + (string-append + "ftp://sunsite.ualberta.ca/pub/Mirror/lsof/lsof_" + version ".tar.bz2"))) (sha256 (base32 "16y9wm26rg81mihnzcbdg8h8vhxmq8kn62ssxb8cqydp4q79nvzy")))) diff --git a/gnu/packages/m4.scm b/gnu/packages/m4.scm index b3b3a00fde..d1ba928768 100644 --- a/gnu/packages/m4.scm +++ b/gnu/packages/m4.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2012, 2013, 2015 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -36,11 +36,10 @@ "0w0da1chh12mczxa5lnwzjk9czi3dq6gnnndbpa6w4rj76b1yklf")))) (build-system gnu-build-system) (arguments - ;; XXX: Disable tests on those platforms with know issues. - `(#:tests? ,(not (member (%current-system) - '("x86_64-darwin" - "i686-cygwin" - "i686-sunos"))) + `(;; Explicitly disable tests when cross-compiling, otherwise 'make check' + ;; proceeds and fails, unsurprisingly. + #:tests? ,(not (%current-target-system)) + #:phases (alist-cons-before 'check 'pre-check (lambda* (#:key inputs #:allow-other-keys) diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index 6d20b182cd..f9eb5a7453 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -6,6 +6,7 @@ ;;; Copyright © 2014 Julien Lepiller <julien@lepiller.eu> ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com> ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org> +;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -27,6 +28,7 @@ #:use-module (gnu packages autotools) #:use-module (gnu packages base) #:use-module (gnu packages backup) + #:use-module (gnu packages bash) #:use-module (gnu packages curl) #:use-module (gnu packages cyrus-sasl) #:use-module (gnu packages databases) @@ -64,11 +66,13 @@ #:use-module (gnu packages xml) #:use-module (gnu packages xorg) #:use-module ((guix licenses) - #:select (gpl2 gpl2+ gpl3+ lgpl2.1+ lgpl3+ non-copyleft)) + #:select (gpl2 gpl2+ gpl3+ lgpl2.1 lgpl2.1+ lgpl3+ non-copyleft + (expat . license:expat))) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix utils) #:use-module (guix build-system gnu) + #:use-module (guix build-system perl) #:use-module (guix build-system python)) (define-public mailutils @@ -309,7 +313,7 @@ repository and Maildir/IMAP as LOCAL repository.") (define-public mu (package (name "mu") - (version "0.9.11") + (version "0.9.12") (source (origin (method url-fetch) (uri (string-append "https://github.com/djcb/mu/archive/v" @@ -317,7 +321,7 @@ repository and Maildir/IMAP as LOCAL repository.") (file-name (string-append "mu-" version ".tar.gz")) (sha256 (base32 - "01n1lzq4pfsm5pn932p948d1z55yqc7kkm1ifjxjchb3k8lr66fh")))) + "1bxryacmas2llj68m2dv8dr1vwx8f5k2i2azh69jajkpqx7i4wdq")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config) @@ -359,27 +363,37 @@ attachments, create new maildirs, and so on.") (define-public notmuch (package (name "notmuch") - (version "0.18.1") + (version "0.19") (source (origin (method url-fetch) (uri (string-append "http://notmuchmail.org/releases/notmuch-" version ".tar.gz")) (sha256 (base32 - "1pdp9l7yv71d3fjb30qyccva8h03hvg88q4a00yi50v2j70kvmgj")))) + "1szf6c44g209pcjq5nvfhlp3nzcm3lrcwv4spsxmwy13hiaccvrr")))) (build-system gnu-build-system) (arguments '(#:tests? #f ;; FIXME: Test suite hangs and times out. #:phases (alist-replace 'configure (lambda* (#:key outputs #:allow-other-keys) + (setenv "CC" "gcc") (setenv "CONFIG_SHELL" (which "sh")) + + ;; XXX Should python-docutils make a symlink + ;; for "rst2man" and other similar programs? + (substitute* '("configure" "doc/prerst2man.py") + ((" rst2man ") " rst2man.py ")) + (let ((out (assoc-ref outputs "out"))) (zero? (system* "./configure" (string-append "--prefix=" out))))) %standard-phases))) (native-inputs - `(("pkg-config" ,pkg-config))) + `(("pkg-config" ,pkg-config) + ("python" ,python-2) + ("python2-docutils" ,python2-docutils) + ("bash-completion" ,bash-completion))) (inputs `(("emacs" ,emacs) ("glib" ,glib) @@ -626,6 +640,49 @@ deal of flexibility in the way mail can be routed, and there are extensive facilities for checking incoming mail.") (license gpl2+))) +(define-public dovecot + (package + (name "dovecot") + (version "2.2.16") + (source + (origin + (method url-fetch) + (uri (string-append "http://www.dovecot.org/releases/" + (version-major+minor version) "/" + name "-" version ".tar.gz")) + (sha256 (base32 + "1w6gg4h9mxg3i8faqpmgj19imzyy001b0v8ihch8ma3zl63i5kjn")))) + (build-system gnu-build-system) + (native-inputs + `(("pkg-config" ,pkg-config))) + (inputs + `(("openssl" ,openssl) + ("zlib" ,zlib) + ("bzip2" ,bzip2) + ("sqlite" ,sqlite))) + (arguments + `(#:configure-flags '("--sysconfdir=/etc" + "--localstatedir=/var") + #:phases (modify-phases %standard-phases + (add-before + 'configure 'pre-configure + (lambda _ + ;; Simple hack to avoid installing in /etc + (substitute* '("doc/Makefile.in" + "doc/example-config/Makefile.in") + (("pkgsysconfdir = .*") + "pkgsysconfdir = /tmp/etc")) + #t))))) + (home-page "http://www.dovecot.org") + (synopsis "Secure POP3/IMAP server") + (description + "Dovecot is a mail server whose major goals are security and reliability. +It supports mbox/Maildir and its own dbox/mdbox formats.") + ;; Most source files are covered by either lgpl2.1 or expat. The SHA code + ;; is covered by a variant of BSD-3, and UnicodeData.txt is covered by the + ;; Unicode, Inc. License Agreement for Data Files and Software. + (license (list lgpl2.1 license:expat (non-copyleft "file://COPYING"))))) + (define-public isync (package (name "isync") @@ -648,4 +705,206 @@ facilities for checking incoming mail.") mailboxes. Currently Maildir and IMAP are supported types.") (license gpl2+))) +(define-public perl-email-abstract + (package + (name "perl-email-abstract") + (version "3.008") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/" + "Email-Abstract-" version ".tar.gz")) + (sha256 + (base32 + "0h42rhvp769wb421cpbbg6v6xjp8iv86mvz70pqgfgf4nsn6jwgw")))) + (build-system perl-build-system) + (propagated-inputs + `(("perl-email-simple" ,perl-email-simple) + ("perl-mro-compat" ,perl-mro-compat))) + (home-page "http://search.cpan.org/dist/Email-Abstract") + (synopsis "Interface to mail representations") + (description "Email::Abstract provides module writers with the ability to +write simple, representation-independent mail handling code.") + (license (package-license perl)))) + +(define-public perl-email-address + (package + (name "perl-email-address") + (version "1.907") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/" + "Email-Address-" version ".tar.gz")) + (sha256 + (base32 + "1ai4r149pzjv9dc2vddir8zylj0z1pii93rm4g591lx7avim71hx")))) + (build-system perl-build-system) + (home-page "http://search.cpan.org/dist/Email-Address") + (synopsis "Email address parsing and creation") + (description "Email::Address implements a regex-based RFC 2822 parser that +locates email addresses in strings and returns a list of Email::Address +objects found. Alternatively you may construct objects manually.") + (license (package-license perl)))) + +(define-public perl-email-date-format + (package + (name "perl-email-date-format") + (version "1.005") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/" + "Email-Date-Format-" version ".tar.gz")) + (sha256 + (base32 + "012ivfwpnbl3wr50f9c6f4azhdlxnm31pdn72528g79v61z6372p")))) + (build-system perl-build-system) + (home-page "http://search.cpan.org/dist/Email-Date-Format") + (synopsis "Produce RFC 2822 date strings") + (description "Email::Date::Format provides a means for generating an RFC +2822 compliant datetime string.") + (license (package-license perl)))) + +(define-public perl-email-messageid + (package + (name "perl-email-messageid") + (version "1.405") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/" + "Email-MessageID-" version ".tar.gz")) + (sha256 + (base32 + "09216naz21x99ff33wdm3j3zq1zhdbxhrsmx8bvavjrw3gjsvrq3")))) + (build-system perl-build-system) + (home-page "http://search.cpan.org/dist/Email-MessageID") + (synopsis "Generate world unique message-ids") + (description "Email::MessageID generates recommended message-ids to +identify a message uniquely.") + (license (package-license perl)))) + +(define-public perl-email-mime + (package + (name "perl-email-mime") + (version "1.929") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/" + "Email-MIME-" version ".tar.gz")) + (sha256 + (base32 + "1sf7dldg4dvicyw6dl1vx6s1gjq3fcppi0103ikl0vi6v5xjdjdh")))) + (build-system perl-build-system) + (propagated-inputs + `(("perl-email-address" ,perl-email-address) + ("perl-email-messageid" ,perl-email-messageid) + ("perl-email-mime-contenttype" ,perl-email-mime-contenttype) + ("perl-email-mime-encodings" ,perl-email-mime-encodings) + ("perl-email-simple" ,perl-email-simple) + ("perl-mime-types" ,perl-mime-types))) + (home-page "http://search.cpan.org/dist/Email-MIME") + (synopsis "MIME message handling") + (description "Email::MIME is an extension of the Email::Simple module, to +handle MIME encoded messages. It takes a message as a string, splits it up +into its constituent parts, and allows you access to various parts of the +message. Headers are decoded from MIME encoding.") + (license (package-license perl)))) + +(define-public perl-email-mime-contenttype + (package + (name "perl-email-mime-contenttype") + (version "1.017") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/" + "Email-MIME-ContentType-" version ".tar.gz")) + (sha256 + (base32 + "1cl1l97lg690dh7i704hqi7yhxalq1chy7ylld5yc5v38jqa6gcn")))) + (build-system perl-build-system) + (native-inputs + `(("perl-capture-tiny" ,perl-capture-tiny))) + (home-page "http://search.cpan.org/dist/Email-MIME-ContentType") + (synopsis "Parse MIME Content-Type headers") + (description "Email::MIME::ContentType parses a MIME Content-Type +header.") + (license (package-license perl)))) + +(define-public perl-email-mime-encodings + (package + (name "perl-email-mime-encodings") + (version "1.315") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/" + "Email-MIME-Encodings-" version ".tar.gz")) + (sha256 + (base32 + "0p5b8g9gh35m8fqrpx60g4bp98rvwd02n5b0vm9wh7mk0xah8wac")))) + (build-system perl-build-system) + (native-inputs + `(("perl-capture-tiny" ,perl-capture-tiny))) + (home-page "http://search.cpan.org/dist/Email-MIME-Encodings") + (synopsis "Unified interface to MIME encoding and decoding") + (description "This module wraps MIME::Base64 and MIME::QuotedPrint.") + (license (package-license perl)))) + +(define-public perl-email-sender + (package + (name "perl-email-sender") + (version "1.300016") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/" + "Email-Sender-" version ".tar.gz")) + (sha256 + (base32 + "18x26fjh399q3s2g8dajb9r10633c46jrnbvycpnpclgnzhjs100")))) + (build-system perl-build-system) + (native-inputs + `(("perl-capture-tiny" ,perl-capture-tiny))) + (propagated-inputs + `(("perl-email-abstract" ,perl-email-abstract) + ("perl-email-address" ,perl-email-address) + ("perl-email-simple" ,perl-email-simple) + ("perl-list-moreutils" ,perl-list-moreutils) + ("perl-module-runtime" ,perl-module-runtime) + ("perl-moo" ,perl-moo) + ("perl-moox-types-mooselike" ,perl-moox-types-mooselike) + ("perl-sub-exporter" ,perl-sub-exporter) + ("perl-throwable" ,perl-throwable) + ("perl-try-tiny" ,perl-try-tiny))) + (home-page "http://search.cpan.org/dist/Email-Sender") + (synopsis "Perl library for sending email") + (description "Email::Sender replaces the old and sometimes problematic +Email::Send library.") + (license (package-license perl)))) + +(define-public perl-email-simple + (package + (name "perl-email-simple") + (version "2.206") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/" + "Email-Simple-" version ".tar.gz")) + (sha256 + (base32 + "19dpy3j5na2k9qw1jcpc8ia25038068r9j1bn34f9yyrisz7s522")))) + (build-system perl-build-system) + (propagated-inputs + `(("perl-email-date-format" ,perl-email-date-format))) + (home-page "http://search.cpan.org/dist/Email-Simple") + (synopsis "Parsing of RFC 2822 messages") + (description "Email::Simple provides simple parsing of RFC 2822 message +format and headers.") + (license (package-license perl)))) + ;;; mail.scm ends here diff --git a/gnu/packages/man.scm b/gnu/packages/man.scm index f5bd339100..fb43db9de9 100644 --- a/gnu/packages/man.scm +++ b/gnu/packages/man.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2014 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2012, 2014, 2015 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2014 David Thompson <dthompson2@worcester.edu> ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net> ;;; @@ -119,7 +119,7 @@ the traditional flat-text whatis databases.") (define-public man-pages (package (name "man-pages") - (version "3.69") + (version "3.82") (source (origin (method url-fetch) (uri (string-append @@ -127,7 +127,7 @@ the traditional flat-text whatis databases.") version ".tar.xz")) (sha256 (base32 - "18zzmdzjihdnyg4vamk0jp6v6826vrsgal3kqqxvfq9bzyrh8xm2")))) + "1c8q618shf469nfp55qrwjv9630fgq5abfk946xya9hw1bfp6wjl")))) (build-system gnu-build-system) (arguments '(#:phases (alist-delete 'configure %standard-phases) @@ -153,7 +153,7 @@ Linux kernel and C library interfaces employed by user-space programs.") (define-public help2man (package (name "help2man") - (version "1.46.5") + (version "1.46.6") (source (origin (method url-fetch) @@ -161,7 +161,7 @@ Linux kernel and C library interfaces employed by user-space programs.") version ".tar.xz")) (sha256 (base32 - "1gqfqgxq3qgwnldjz3i5mxvzyx2w3j042r3fw1wygic3f6327nha")))) + "1brccgnjf09f2zg70s6gv6gn68mi59kp3zf50wvxp79n72ngapv1")))) (build-system gnu-build-system) (arguments `(;; There's no `check' target. #:tests? #f)) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index b6d3ed3680..89e0a17ab1 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -35,6 +35,7 @@ #:use-module (guix build-system gnu) #:use-module (gnu packages algebra) #:use-module (gnu packages bison) + #:use-module (gnu packages check) #:use-module (gnu packages cmake) #:use-module (gnu packages compression) #:use-module (gnu packages curl) @@ -62,6 +63,7 @@ #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) #:use-module (gnu packages readline) + #:use-module (gnu packages tbb) #:use-module (gnu packages tcsh) #:use-module (gnu packages tcl) #:use-module (gnu packages texinfo) @@ -90,6 +92,32 @@ effectively as a scientific calculator.") (license license:gpl3+) (home-page "http://www.gnu.org/software/units/"))) +(define-public double-conversion + (package + (name "double-conversion") + (version "1.1.5") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/floitsch/double-conversion/archive/v" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0cnr8xhyjfxijay8ymkqcph3672wp2lj23qhdmr3m4kia5kpdf83")))) + (build-system cmake-build-system) + (arguments + '(#:test-target "test" + #:configure-flags '("-DBUILD_SHARED_LIBS=ON" + "-DBUILD_TESTING=ON"))) + (home-page "https://github.com/floitsch/double-conversion") + (synopsis "Conversion routines for IEEE doubles") + (description + "The double-conversion library provides binary-decimal and decimal-binary +routines for IEEE doubles. The library consists of efficient conversion +routines that have been extracted from the V8 JavaScript engine.") + (license license:bsd-3))) + (define-public dionysus (package (name "dionysus") @@ -255,7 +283,6 @@ large scale eigenvalue problems.") "0lk3f97i9imqascnlf6wr5mjpyxqcdj73pgj97dj2mgvyg9z1n4s")))) (build-system cmake-build-system) (home-page "http://www.netlib.org/lapack/") - (native-inputs `(("patchelf" ,patchelf))) ;for augment-rpath (inputs `(("fortran" ,gfortran-4.8) ("python" ,python-2))) (arguments @@ -355,6 +382,9 @@ extremely large and complex data collections.") `(("lapack" ,lapack) ("readline" ,readline) ("glpk" ,glpk) + ("fftw" ,fftw) + ("fftwf" ,fftwf) + ("arpack" ,arpack-ng) ("curl" ,curl) ("pcre" ,pcre) ("fltk" ,fltk) @@ -363,16 +393,18 @@ extremely large and complex data collections.") ("hdf5" ,hdf5) ("libxft" ,libxft) ("mesa" ,mesa) + ("glu" ,glu) ("zlib" ,zlib))) (native-inputs `(("gfortran" ,gfortran-4.8) ("pkg-config" ,pkg-config) ("perl" ,perl) - ;; The following inputs are not actually used in the build process. However, the - ;; ./configure gratuitously tests for their existence and assumes that programs not - ;; present at build time are also not, and can never be, available at run time! - ;; If these inputs are therefore not present, support for them will be built out. - ;; However, Octave will still run without them, albeit without the features they + ;; The following inputs are not actually used in the build process. + ;; However, the ./configure gratuitously tests for their existence and + ;; assumes that programs not present at build time are also not, and + ;; can never be, available at run time! If these inputs are therefore + ;; not present, support for them will be built out. However, Octave + ;; will still run without them, albeit without the features they ;; provide. ("less" ,less) ("texinfo" ,texinfo) @@ -384,11 +416,11 @@ extremely large and complex data collections.") "/bin/sh")))) (home-page "http://www.gnu.org/software/octave/") (synopsis "High-level language for numerical computation") - (description "GNU Octave is a high-level interpreted language that is specialized -for numerical computations. It can be used for both linear and non-linear -applications and it provides great support for visualizing results. Work may -be performed both at the interactive command-line as well as via script -files.") + (description "GNU Octave is a high-level interpreted language that is +specialized for numerical computations. It can be used for both linear and +non-linear applications and it provides great support for visualizing results. +Work may be performed both at the interactive command-line as well as via +script files.") (license license:gpl3+))) (define-public gmsh @@ -407,7 +439,6 @@ files.") ;; Remove non-free METIS code '(delete-file-recursively "contrib/Metis")))) (build-system cmake-build-system) - (native-inputs `(("patchelf" ,patchelf))) ;for augment-rpath (propagated-inputs `(("fltk" ,fltk) ("gfortran" ,gfortran-4.8) @@ -991,6 +1022,50 @@ based on transforming an expression into a bytecode and precalculating constant parts of it.") (license license:expat))) +(define-public openblas + (package + (name "openblas") + (version "0.2.14") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/xianyi/OpenBLAS/tarball/v" + version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0av3pd96j8rx5i65f652xv9wqfkaqn0w4ma1gvbyz73i6j2hi9db")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ;no "check" target + ;; DYNAMIC_ARCH is not supported on MIPS. When it is disabled, + ;; OpenBLAS will tune itself to the build host, so we need to disable + ;; substitutions. + #:substitutable? ,(not (string-prefix? "mips" (%current-system))) + #:make-flags + (list (string-append "PREFIX=" (assoc-ref %outputs "out")) + "SHELL=bash" + "NO_LAPACK=1" + ;; Build the library for all supported CPUs. This allows + ;; switching CPU targets at runtime with the environment variable + ;; OPENBLAS_CORETYPE=<type>, where "type" is a supported CPU type. + ;; Unfortunately, this is not supported on MIPS. + ,@(if (string-prefix? "mips" (%current-system)) + '() + '("DYNAMIC_ARCH=1"))) + ;; no configure script + #:phases (alist-delete 'configure %standard-phases))) + (inputs + `(("fortran" ,gfortran-4.8))) + (native-inputs + `(("cunit" ,cunit) + ("perl" ,perl))) + (home-page "http://www.openblas.net/") + (synopsis "Optimized BLAS library based on GotoBLAS") + (description + "OpenBLAS is a BLAS library forked from the GotoBLAS2-1.13 BSD version.") + (license license:bsd-3))) + (define-public openlibm (package (name "openlibm") @@ -1065,6 +1140,60 @@ Fresnel integrals, and similar related functions as well.") ;; public domain software. (license (list license:expat license:public-domain)))) +(define-public suitesparse + (package + (name "suitesparse") + (version "4.4.3") + (source + (origin + (method url-fetch) + (uri (string-append + "http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-" + version ".tar.gz")) + (sha256 + (base32 + "100hdzr0mf4mzlwnqpmwpfw4pymgsf9n3g0ywb1yps2nk1zbkdy5")))) + (build-system gnu-build-system) + (arguments + '(#:parallel-build? #f ;cholmod build fails otherwise + #:tests? #f ;no "check" target + #:make-flags + (list "CC=gcc" + "BLAS=-lblas" + "TBB=-ltbb" + "CHOLMOD_CONFIG=-DNPARTITION" ;required when METIS is not used + (string-append "INSTALL_LIB=" + (assoc-ref %outputs "out") "/lib") + (string-append "INSTALL_INCLUDE=" + (assoc-ref %outputs "out") "/include")) + #:phases + (alist-cons-before + 'install 'prepare-out + ;; README.txt states that the target directories must exist prior to + ;; running "make install". + (lambda _ + (mkdir-p (string-append (assoc-ref %outputs "out") "/lib")) + (mkdir-p (string-append (assoc-ref %outputs "out") "/include"))) + ;; no configure script + (alist-delete 'configure %standard-phases)))) + (inputs + `(("tbb" ,tbb) + ("lapack" ,lapack))) + (home-page "http://faculty.cse.tamu.edu/davis/suitesparse.html") + (synopsis "Suite of sparse matrix software") + (description + "SuiteSparse is a suite of sparse matrix algorithms, including: UMFPACK, +multifrontal LU factorization; CHOLMOD, supernodal Cholesky; SPQR, +multifrontal QR; KLU and BTF, sparse LU factorization, well-suited for circuit +simulation; ordering methods (AMD, CAMD, COLAMD, and CCOLAMD); CSparse and +CXSparse, a concise sparse Cholesky factorization package; and many other +packages.") + ;; LGPLv2.1+: + ;; AMD, CAMD, BTF, COLAMD, CCOLAMD, CSparse, CXSparse, KLU, LDL + ;; GPLv2+: + ;; GPUQREngine, RBio, SuiteSparse_GPURuntime, SuiteSparseQR, UMFPACK + (license (list license:gpl2+ license:lgpl2.1+)))) + (define-public atlas (package (name "atlas") @@ -1216,3 +1345,72 @@ library with poor performance.") library for graphics software based on the OpenGL Shading Language (GLSL) specifications.") (license license:expat))) + +(define-public lpsolve + (package + (name "lpsolve") + (version "5.5.2.0") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/lpsolve/lpsolve/" version + "/lp_solve_" version "_source.tar.gz")) + (sha256 + (base32 + "176c7f023mb6b8bfmv4rfqnrlw88lsg422ca74zjh19i2h5s69sq")) + (modules '((guix build utils))) + (snippet + '(substitute* (list "lp_solve/ccc" "lpsolve55/ccc") + (("^c=cc") "c=gcc") + ;; Pretend to be on a 64 bit platform to obtain a common directory + ;; name for the build results on all architectures; nothing else + ;; seems to depend on it. + (("^PLATFORM=.*$") "PLATFORM=ux64\n"))))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; no check target + #:phases + (modify-phases %standard-phases + (delete 'configure) + (replace 'build + (lambda _ + (with-directory-excursion "lpsolve55" + (system* "bash" "ccc")) + (with-directory-excursion "lp_solve" + (system* "bash" "ccc")) + #t)) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (lib (string-append out "/lib")) + ;; This is where LibreOffice expects to find the header + ;; files, and where they are installed by Debian. + (include (string-append out "/include/lpsolve"))) + (mkdir-p lib) + (copy-file "lpsolve55/bin/ux64/liblpsolve55.a" + (string-append lib "/liblpsolve55.a")) + (copy-file "lpsolve55/bin/ux64/liblpsolve55.so" + (string-append lib "/liblpsolve55.so")) + (mkdir-p bin) + (copy-file "lp_solve/bin/ux64/lp_solve" + (string-append bin "/lp_solve")) + (mkdir-p include) + ;; Install a subset of the header files as on Debian + ;; (plus lp_bit.h, which matches the regular expression). + (for-each + (lambda (name) + (copy-file name (string-append include "/" name))) + (find-files "." "lp_[HMSa-z].*\\.h$")) + (with-directory-excursion "shared" + (for-each + (lambda (name) + (copy-file name (string-append include "/" name))) + (find-files "." "\\.h$"))) + #t)))))) + (home-page "http://lpsolve.sourceforge.net/") + (synopsis "Mixed integer linear programming (MILP) solver") + (description + "lp_solve is a mixed integer linear programming solver based on the +revised simplex and the branch-and-bound methods.") + (license license:lgpl2.1+))) diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm index 462c500248..99c5bdb0ff 100644 --- a/gnu/packages/messaging.scm +++ b/gnu/packages/messaging.scm @@ -86,20 +86,20 @@ providing: (define-public bitlbee (package (name "bitlbee") - (version "3.2.2") + (version "3.4") (source (origin (method url-fetch) (uri (string-append "http://get.bitlbee.org/src/bitlbee-" version ".tar.gz")) (sha256 - (base32 "13jmcxxgli82wb2n4hs091159xk8rgh7nb02f478lgpjh6996f5s")))) + (base32 "0plx4dryf8i6hz7vghg84z5f6w6rkw1l8ckl4c4wh5zxpd3ddfnf")) + (patches (list (search-patch "bitlbee-configure-doc-fix.patch"))))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config) ("check" ,check))) (inputs `(("glib" ,glib) ("libotr" ,libotr) ("gnutls" ,gnutls) - ("zlib" ,zlib) ; Needed to satisfy "pkg-config --exists gnutls" ("python" ,python-2) ("perl" ,perl))) (arguments @@ -201,7 +201,22 @@ dictionaries. HexChat can be extended with multiple addons.") 'configure 'post-configure (lambda _ (substitute* "src/ngircd/Makefile" - (("/bin/sh") (which "sh")))) + (("/bin/sh") (which "sh"))) + ;; The default getpid.sh does a sloppy grep over 'ps -ax' output, + ;; which fails arbitrarily. + (with-output-to-file "src/testsuite/getpid.sh" + (lambda () + (display + (string-append + "#!" (which "sh") "\n" + "ps -C \"$1\" -o pid=\n")))) + ;; Our variant of getpid.sh does not work for interpreter names if a + ;; shebang script is run directly as "./foo", so patch cases where + ;; the test suite relies on this. + (substitute* "src/testsuite/start-server.sh" + ;; It runs 'getpid.sh sh' to test if it works at all. Run it on + ;; 'make' instead. + (("getpid.sh sh") "getpid.sh make"))) %standard-phases))) (home-page "http://ngircd.barton.de/") (synopsis "Lightweight Internet Relay Chat server for small networks") diff --git a/gnu/packages/moe.scm b/gnu/packages/moe.scm index bd7c2a6d49..675ecb6ce2 100644 --- a/gnu/packages/moe.scm +++ b/gnu/packages/moe.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org> +;;; Copyright © 2014, 2015 Eric Bavier <bavier@member.fsf.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -17,9 +17,9 @@ ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. (define-module (gnu packages moe) - #:use-module (guix licenses) + #:use-module ((guix licenses) #:select (gpl3+)) #:use-module (gnu packages ncurses) - #:use-module ((gnu packages compression) #:select (lzip)) + #:use-module (gnu packages compression) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu)) @@ -27,7 +27,7 @@ (define-public moe (package (name "moe") - (version "1.6") + (version "1.7") (source (origin (method url-fetch) @@ -35,7 +35,7 @@ version ".tar.lz")) (sha256 (base32 - "1cfwi67sdl2qchqbdib4p6wxjpwz2kmn6vxn9hmh1zs0gg4xkbwc")))) + "1fzimk1qpmsm7wzfnjzzrp4dvdn7ipdb5j7969910g1m93wndfik")))) (build-system gnu-build-system) (native-inputs `(("lzip" ,lzip))) (inputs `(("ncurses" ,ncurses))) diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm index c92354248f..5795ecbb0d 100644 --- a/gnu/packages/music.scm +++ b/gnu/packages/music.scm @@ -23,16 +23,24 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix build-system gnu) #:use-module (gnu packages) + #:use-module (gnu packages audio) #:use-module (gnu packages bison) #:use-module (gnu packages docbook) #:use-module (gnu packages flex) #:use-module (gnu packages fonts) #:use-module (gnu packages fontutils) + #:use-module (gnu packages gcc) #:use-module (gnu packages gettext) #:use-module (gnu packages ghostscript) + #:use-module (gnu packages gnome) #:use-module (gnu packages gtk) #:use-module (gnu packages guile) + #:use-module (gnu packages image) #:use-module (gnu packages imagemagick) + #:use-module (gnu packages java) + #:use-module (gnu packages linux) ; for alsa-utils + #:use-module (gnu packages man) + #:use-module (gnu packages mp3) #:use-module (gnu packages netpbm) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) @@ -40,6 +48,8 @@ #:use-module (gnu packages rsync) #:use-module (gnu packages texinfo) #:use-module (gnu packages texlive) + #:use-module (gnu packages xml) + #:use-module (gnu packages xiph) #:use-module (gnu packages zip)) (define-public lilypond @@ -102,3 +112,165 @@ music. Music is input in a text file containing control sequences which are interpreted by LilyPond to produce the final document. It is extendable with Guile.") (license license:gpl3+))) + +(define-public solfege + (package + (name "solfege") + (version "3.22.2") + (source (origin + (method url-fetch) + (uri (string-append + "mirror://gnu/solfege/solfege-" + version ".tar.xz")) + (sha256 + (base32 + "1w25rxdbj907nsx285k9nm480pvy12w3yknfh4n1dfv17cwy072i")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; xmllint attempts to download DTD + #:test-target "test" + #:phases + (alist-cons-after + 'unpack 'fix-configuration + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "default.config" + (("csound=csound") + (string-append "csound=" + (assoc-ref inputs "csound") + "/bin/csound")) + (("/usr/bin/aplay") + (string-append (assoc-ref inputs "aplay") + "/bin/aplay")) + (("/usr/bin/timidity") + (string-append (assoc-ref inputs "timidity") + "/bin/timidity")) + (("/usr/bin/mpg123") + (string-append (assoc-ref inputs "mpg123") + "/bin/mpg123")) + (("/usr/bin/ogg123") + (string-append (assoc-ref inputs "ogg123") + "/bin/ogg123")))) + (alist-cons-before + 'build 'patch-python-shebangs + (lambda _ + ;; Two python scripts begin with a Unicode BOM, so patch-shebang + ;; has no effect. + (substitute* '("solfege/parsetree.py" + "solfege/presetup.py") + (("#!/usr/bin/python") (string-append "#!" (which "python"))))) + (alist-cons-before + 'build 'add-sitedirs + ;; .pth files are not automatically interpreted unless the + ;; directories containing them are added as "sites". The directories + ;; are then added to those in the PYTHONPATH. This is required for + ;; the operation of pygtk and pygobject. + (lambda _ + (substitute* "run-solfege.py" + (("import os") + "import os, site +for path in [path for path in sys.path if 'site-packages' in path]: site.addsitedir(path)"))) + (alist-cons-before + 'build 'adjust-config-file-prefix + (lambda* (#:key outputs #:allow-other-keys) + (substitute* "run-solfege.py" + (("prefix = os.path.*$") + (string-append "prefix = " (assoc-ref outputs "out"))))) + (alist-cons-after + 'install 'wrap-program + (lambda* (#:key inputs outputs #:allow-other-keys) + ;; Make sure 'solfege' runs with the correct PYTHONPATH. We + ;; also need to modify GDK_PIXBUF_MODULE_FILE for SVG support. + (let* ((out (assoc-ref outputs "out")) + (path (getenv "PYTHONPATH")) + (rsvg (assoc-ref inputs "librsvg")) + (pixbuf (find-files rsvg "^loaders\\.cache$"))) + (wrap-program (string-append out "/bin/solfege") + `("PYTHONPATH" ":" prefix (,path)) + `("GDK_PIXBUF_MODULE_FILE" ":" prefix ,pixbuf)))) + %standard-phases))))))) + (inputs + `(("python" ,python-2) + ("pygtk" ,python2-pygtk) + ("gettext" ,gnu-gettext) + ("gtk" ,gtk+) + ;; TODO: Lilypond is optional. Produces errors at build time: + ;; Drawing systems...Error: /undefinedresult in --glyphshow-- + ;; Fontconfig is needed to fix one of the errors, but other similar + ;; errors remain. + ;;("lilypond" ,lilypond) + ("librsvg" ,librsvg) ; needed at runtime for icons + ("libpng" ,libpng) ; needed at runtime for icons + ;; players needed at runtime + ("aplay" ,alsa-utils) + ("csound" ,csound) ; optional, needed for some exercises + ("mpg123" ,mpg123) + ("ogg123" ,vorbis-tools) + ("timidity" ,timidity++))) + (native-inputs + `(("pkg-config" ,pkg-config) + ("txt2man" ,txt2man) + ("libxml2" ,libxml2) ; for tests + ("ghostscript" ,ghostscript) + ;;("fontconfig" ,fontconfig) ; only needed with lilypond + ;;("freetype" ,freetype) ; only needed with lilypond + ("texinfo" ,texinfo))) + (home-page "https://www.gnu.org/software/solfege/") + (synopsis "Ear training") + (description + "GNU Solfege is a program for practicing musical ear-training. With it, +you can practice your recognition of various musical intervals and chords. It +features a statistics overview so you can monitor your progress across several +sessions. Solfege is also designed to be extensible so you can easily write +your own lessons.") + (license license:gpl3+))) + +(define-public tuxguitar + (package + (name "tuxguitar") + (version "1.2") + (source (origin + (method url-fetch) + (uri (string-append + "mirror://sourceforge/tuxguitar/TuxGuitar/TuxGuitar-" + version "/tuxguitar-src-" version ".tar.gz")) + (sha256 + (base32 + "1g1yf2gd06fzdhqb8kb8dmdcmr602s9y24f01kyl4940wimgr944")))) + (build-system gnu-build-system) + (arguments + `(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath=" + (assoc-ref %outputs "out") "/lib") + (string-append "PREFIX=" + (assoc-ref %outputs "out")) + (string-append "SWT_PATH=" + (assoc-ref %build-inputs "swt") + "/share/java/swt.jar")) + #:tests? #f ;no "check" target + #:parallel-build? #f ;not supported + #:phases + (alist-cons-before + 'build 'enter-dir-set-path-and-pass-ldflags + (lambda* (#:key inputs #:allow-other-keys) + (chdir "TuxGuitar") + (substitute* "GNUmakefile" + (("PROPERTIES\\?=") + (string-append "PROPERTIES?= -Dswt.library.path=" + (assoc-ref inputs "swt") "/lib")) + (("\\$\\(GCJ\\) -o") "$(GCJ) $(LDFLAGS) -o")) + #t) + (alist-delete 'configure %standard-phases)))) + (inputs + `(("swt" ,swt))) + (native-inputs + `(("gcj" ,gcj-4.8) + ("pkg-config" ,pkg-config))) + (home-page "http://tuxguitar.com.ar") + (synopsis "Multitrack tablature editor and player") + (description + "TuxGuitar is a guitar tablature editor with player support through midi. +It can display scores and multitrack tabs. TuxGuitar provides various +additional features, including autoscrolling while playing, note duration +management, bend/slide/vibrato/hammer-on/pull-off effects, support for +tuplets, time signature management, tempo management, gp3/gp4/gp5 import and +export.") + (license license:lgpl2.1+))) diff --git a/gnu/packages/nano.scm b/gnu/packages/nano.scm index 1bb6fea889..c5b8f7ebd0 100644 --- a/gnu/packages/nano.scm +++ b/gnu/packages/nano.scm @@ -27,7 +27,7 @@ (define-public nano (package (name "nano") - (version "2.3.6") + (version "2.4.1") (source (origin (method url-fetch) @@ -35,7 +35,7 @@ version ".tar.gz")) (sha256 (base32 - "0d4ml0v9yi37pjs211xs38w9whsj6530wz3kmrvwgh8jigqz6jx7")))) + "1li99ycnva40hiavm9lf34gjny74mj469x6ismrfm6wv3dgfn33a")))) (build-system gnu-build-system) (inputs `(("gettext" ,gnu-gettext) diff --git a/gnu/packages/ncurses.scm b/gnu/packages/ncurses.scm index 0dbc583f79..180cdde19f 100644 --- a/gnu/packages/ncurses.scm +++ b/gnu/packages/ncurses.scm @@ -43,14 +43,6 @@ (string-append "CONFIG_SHELL=" bash) (string-append "--prefix=" out) configure-flags))))) - (cross-pre-install-phase - '(lambda _ - ;; Run the native `tic' program, not the cross-built one. - (substitute* "misc/run_tic.sh" - (("\\{TIC_PATH:=.*\\}") - "{TIC_PATH:=true}") - (("cross_compiling:=no") - "cross_compiling:=yes")))) (post-install-phase '(lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) @@ -116,12 +108,9 @@ `(alist-cons-before ; cross build 'configure 'patch-makefile-SHELL ,patch-makefile-phase - (alist-cons-before - 'install 'pre-install - ,cross-pre-install-phase - (alist-cons-after - 'install 'post-install ,post-install-phase - %standard-phases))) + (alist-cons-after + 'install 'post-install ,post-install-phase + %standard-phases)) `(alist-cons-after ; native build 'install 'post-install ,post-install-phase diff --git a/gnu/packages/netpbm.scm b/gnu/packages/netpbm.scm index e72cf32e3f..475635e7e1 100644 --- a/gnu/packages/netpbm.scm +++ b/gnu/packages/netpbm.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr> +;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -49,7 +50,41 @@ (revision 1832))) (sha256 (base32 - "1mj1pqq18yj0yb6l24zfjls7axhqmiv0pvcaabl5xvc4a0dm543j")))) + "1mj1pqq18yj0yb6l24zfjls7axhqmiv0pvcaabl5xvc4a0dm543j")) + (file-name (string-append name "-" version "-checkout")) + (modules '((guix build utils))) + (snippet + ;; Remove non-FSDG-compliant code. + '(begin + (use-modules (guix build utils)) + + (define-syntax drop + (syntax-rules (in) + ;; Remove PROGRAM from DIRECTORY/Makefile, and remove + ;; DIRECTORY/PROGRAM and DIRECTORY/PROGRAM.c. + ((_ program ... in directory) + (begin + (substitute* (string-append directory "/Makefile") + ((program) "") ...) + + (let* ((subdir (string-append directory "/" program)) + (dot-c (string-append subdir ".c"))) + (when (file-exists? subdir) + (delete-file-recursively subdir)) + (when (file-exists? dot-c) + (delete-file dot-c))) + + ...)))) + + ;; Drop advertisement for non-free program. + (drop "hpcdtoppm" in "converter/ppm") + + ;; Drop programs without a license, see + ;; <http://packages.debian.org/changelogs/pool/main/n/netpbm-free/netpbm-free_10.0-12.2/libnetpbm10.copyright>. + (drop "pbmto4425" "pbmtoln03" "pbmtolps" "pbmtopk" "pktopbm" + in "converter/pbm") + (drop "spottopgm" in "converter/pgm") + (drop "ppmtopjxl" in "converter/ppm"))))) (build-system gnu-build-system) (inputs `(("ghostscript" ,ghostscript) ("libjpeg" ,libjpeg) @@ -75,19 +110,8 @@ (display "TIFFLIB = libtiff.so\n" f) (display "JPEGLIB = libjpeg.so\n" f) (display "ZLIB = libz.so\n" f) - (close-port f) - ;; drop advertisement for non-free program - (substitute* "converter/ppm/Makefile" (("hpcdtoppm") "")) - ;; drop programs without license, see - ;; http://packages.debian.org/changelogs/pool/main/n/netpbm-free/netpbm-free_10.0-12.2/libnetpbm10.copyright - (substitute* "converter/pbm/Makefile" - (("pbmto4425") "") - (("pbmtoln03") "") - (("pbmtolps") "") - (("pbmtopk") "") - (("pktopbm") "")) - (substitute* "converter/pgm/Makefile" (("spottopgm") "")) - (substitute* "converter/ppm/Makefile" (("ppmtopjxl") "")))) + (display (string-append "LDFLAGS += -Wl,-rpath=" %output "/lib") f) + (close-port f))) (alist-cons-before 'check 'setup-check (lambda _ diff --git a/gnu/packages/nettle.scm b/gnu/packages/nettle.scm index 0df8f001bf..ed140d43c0 100644 --- a/gnu/packages/nettle.scm +++ b/gnu/packages/nettle.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -17,6 +17,7 @@ ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. (define-module (gnu packages nettle) + #:use-module (guix utils) #:use-module (guix licenses) #:use-module (guix packages) #:use-module (guix download) @@ -24,7 +25,7 @@ #:use-module (gnu packages multiprecision) #:use-module (gnu packages m4)) -(define-public nettle +(define-public nettle-2 (package (name "nettle") (version "2.7.1") @@ -42,6 +43,7 @@ '(#:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath=" (assoc-ref %outputs "out") "/lib")))) + (outputs '("out" "debug")) (native-inputs `(("m4" ,m4))) (propagated-inputs `(("gmp" ,gmp))) (home-page "http://www.lysator.liu.se/~nisse/nettle/") @@ -53,15 +55,21 @@ cryptographic toolkits for object-oriented languages or in applications themselves.") (license gpl2+))) -(define-public nettle-3 +(define-public nettle ;; This version is not API-compatible with version 2. In particular GnuTLS ;; cannot use it yet. So keep it separate. - (package (inherit nettle) - (version "3.0") + (package (inherit nettle-2) + (version "3.1") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/nettle/nettle-" version ".tar.gz")) (sha256 (base32 - "04yrpjz33vrj6j0zxc153b00f93i8hs41syr1ryp7sr64fyw0lcn")))))) + "1ly9kz5fgc8ilykz07crqwgjsfn4p2s6565gj1aq0w4fr179v1gn")))) + (arguments + (substitute-keyword-arguments (package-arguments nettle-2) + ((#:configure-flags flags) + ;; Build "fat" binaries where the right implementation is chosen at + ;; run time based on CPU features (starting from 3.1.) + `(cons "--enable-fat" ,flags)))))) diff --git a/gnu/packages/socat.scm b/gnu/packages/networking.scm index 7c0bc3d964..dd13e1720b 100644 --- a/gnu/packages/socat.scm +++ b/gnu/packages/networking.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net> ;;; ;;; This file is part of GNU Guix. ;;; @@ -16,14 +17,42 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. -(define-module (gnu packages socat) +(define-module (gnu packages networking) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu) #:use-module (gnu packages openssl)) -;; XXX: Group with other networking tools like tcpdump in a module? +(define-public miredo + (package + (name "miredo") + (version "1.2.6") + (source (origin + (method url-fetch) + (uri (string-append "http://www.remlab.net/files/miredo/miredo-" + version ".tar.xz")) + (sha256 + (base32 + "0j9ilig570snbmj48230hf7ms8kvcwi2wblycqrmhh85lksd49ps")))) + (build-system gnu-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + ;; The checkconf test in src/ requires network access. + (add-before + 'check 'disable-checkconf-test + (lambda _ + (substitute* "src/Makefile" + (("^TESTS = .*") "TESTS = \n"))))))) + (home-page "http://www.remlab.net/miredo/") + (synopsis "Teredo IPv6 tunneling software") + (description + "Miredo is an implementation (client, relay, server) of the Teredo +specification, which provides IPv6 Internet connectivity to IPv6 enabled hosts +residing in IPv4-only networks, even when they are behind a NAT device.") + (license license:gpl2+))) + (define-public socat (package (name "socat") @@ -53,3 +82,26 @@ line, to logically connect serial lines on different computers, or to establish a relatively secure environment (su and chroot) for running client or server shell scripts with network connections. ") (license license:gpl2))) + +(define-public zeromq + (package + (name "zeromq") + (version "4.0.5") + (source (origin + (method url-fetch) + (uri (string-append "http://download.zeromq.org/zeromq-" + version ".tar.gz")) + (sha256 + (base32 + "0arl8fy8d03xd5h0mgda1s5bajwg8iyh1kk4hd1420rpcxgkrj9v")))) + (build-system gnu-build-system) + (home-page "http://zeromq.org") + (synopsis "Library for message-based applications") + (description + "The 0MQ lightweight messaging kernel is a library which extends the +standard socket interfaces with features traditionally provided by specialized +messaging middle-ware products. 0MQ sockets provide an abstraction of +asynchronous message queues, multiple messaging patterns, message +filtering (subscriptions), seamless access to multiple transport protocols and +more.") + (license license:lgpl3+))) diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm index b2a5d033d2..0b65843183 100644 --- a/gnu/packages/node.scm +++ b/gnu/packages/node.scm @@ -29,20 +29,19 @@ #:use-module (guix packages) #:use-module (guix derivations) #:use-module (guix download) - #:use-module (guix build gnu-build-system) #:use-module (guix build-system gnu)) (define-public node (package (name "node") - (version "0.12.0") + (version "0.12.2") (source (origin (method url-fetch) (uri (string-append "http://nodejs.org/dist/v" version "/node-v" version ".tar.gz")) (sha256 (base32 - "0cifd2qhpyrbxx71a4hsagzk24qas8m5zvwcyhx69cz9yhxf404p")))) + "0bbp58p3iwsp35c37brkkh6bmjjhwsw2nlr8srz3wqryx6nphzmc")))) (native-inputs `(("python" ,python-2) ("perl" ,perl) ("gcc" ,gcc-4.9) diff --git a/gnu/packages/ntp.scm b/gnu/packages/ntp.scm index 0fb7fe6c7d..dcc881a4bf 100644 --- a/gnu/packages/ntp.scm +++ b/gnu/packages/ntp.scm @@ -34,7 +34,7 @@ (define-public ntp (package (name "ntp") - (version "4.2.8p1") + (version "4.2.8p2") (source (origin (method url-fetch) (uri (string-append @@ -43,7 +43,7 @@ "/ntp-" version ".tar.gz")) (sha256 (base32 - "124xslljdzv778msr18jn5l9d6fhvzpsmmnfczc05l0yiyw790ll")))) + "0ccv9kh5asxpk7bjn73vwrqimbkbfl743bgx0km47bfajl7bqs8d")))) (native-inputs `(("which" ,which) ("pkg-config" ,pkg-config))) (inputs diff --git a/gnu/packages/ocr.scm b/gnu/packages/ocr.scm new file mode 100644 index 0000000000..0d5fbcdc29 --- /dev/null +++ b/gnu/packages/ocr.scm @@ -0,0 +1,93 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (gnu packages ocr) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu) + #:use-module (gnu packages autotools) + #:use-module (gnu packages compression) + #:use-module (gnu packages image) + #:use-module (gnu packages pkg-config)) + +(define-public ocrad + (package + (name "ocrad") + (version "0.25") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/ocrad/ocrad-" + version ".tar.lz")) + (sha256 + (base32 + "1m2dblgvvjs48rsglfdwq0ib9zk8h9n34xsh67ibrg0g0ffbw477")))) + (build-system gnu-build-system) + (native-inputs `(("lzip" ,lzip))) + (home-page "http://www.gnu.org/software/ocrad/") + (synopsis "Optical character recognition based on feature extraction") + (description + "GNU Ocrad is an optical character recognition program based on a +feature extraction method. It can read images in PBM, PGM or PPM formats and +it produces text in 8-bit or UTF-8 formats.") + (license license:gpl3+))) + +(define-public tesseract-ocr + (package + (name "tesseract-ocr") + (version "3.02.02") + (source + (origin + (method url-fetch) + (uri (string-append + "https://tesseract-ocr.googlecode.com/files/tesseract-ocr-" + version ".tar.gz")) + (sha256 + (base32 "0g81m9y4iydp7kgr56mlkvjdwpp3mb01q385yhdnyvra7z5kkk96")) + (modules '((guix build utils))) + ;; Leptonica added a pkg-config file in the meanwhile. + (snippet + '(substitute* "tesseract.pc.in" + (("^# Requires: lept ## .*") + "Requires: lept\n"))))) + (build-system gnu-build-system) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("libtool" ,libtool))) + (propagated-inputs + `(("leptonica" ,leptonica))) + (arguments + '(#:phases + (modify-phases %standard-phases + (add-after + 'unpack 'autogen + (lambda _ + (zero? (system* "sh" "autogen.sh"))))) + #:configure-flags + (let ((leptonica (assoc-ref %build-inputs "leptonica"))) + (list (string-append "LIBLEPT_HEADERSDIR=" leptonica "/include"))))) + (home-page "https://code.google.com/p/tesseract-ocr/") + (synopsis "Optical character recognition engine") + (description + "Tesseract is an optical character recognition (OCR) engine with very +high accuracy. It supports many languages, output text formatting, hOCR +positional information and page layout analysis. Several image formats are +supported through the Leptonica library. It can also detect whether text is +monospaced or proportional.") + (license license:asl2.0))) diff --git a/gnu/packages/ocrad.scm b/gnu/packages/ocrad.scm deleted file mode 100644 index 8ad4f32670..0000000000 --- a/gnu/packages/ocrad.scm +++ /dev/null @@ -1,46 +0,0 @@ -;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org> -;;; -;;; This file is part of GNU Guix. -;;; -;;; GNU Guix is free software; you can redistribute it and/or modify it -;;; under the terms of the GNU General Public License as published by -;;; the Free Software Foundation; either version 3 of the License, or (at -;;; your option) any later version. -;;; -;;; GNU Guix is distributed in the hope that it will be useful, but -;;; WITHOUT ANY WARRANTY; without even the implied warranty of -;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;; GNU General Public License for more details. -;;; -;;; You should have received a copy of the GNU General Public License -;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. - -(define-module (gnu packages ocrad) - #:use-module (guix licenses) - #:use-module (guix packages) - #:use-module (guix download) - #:use-module (guix build-system gnu) - #:use-module ((gnu packages compression) - #:select (lzip))) - -(define-public ocrad - (package - (name "ocrad") - (version "0.24") - (source (origin - (method url-fetch) - (uri (string-append "mirror://gnu/ocrad/ocrad-" - version ".tar.lz")) - (sha256 - (base32 - "0hhlx072d00bi9qia0nj5izsq4qkscpfz2mpbyfc72msl3hfvslv")))) - (build-system gnu-build-system) - (native-inputs `(("lzip" ,lzip))) - (home-page "http://www.gnu.org/software/ocrad/") - (synopsis "Optical character recognition based on feature extraction") - (description - "GNU Ocrad is an optical character recognition program based on a -feature extraction method. It can read images in PBM, PGM or PPM formats and -it produces text in 8-bit or UTF-8 formats.") - (license gpl3+))) diff --git a/gnu/packages/openldap.scm b/gnu/packages/openldap.scm index a6c4cb0d93..fe7961affb 100644 --- a/gnu/packages/openldap.scm +++ b/gnu/packages/openldap.scm @@ -34,14 +34,14 @@ (define-public openldap (package (name "openldap") - (version "2.4.33") + (version "2.4.40") (source (origin (method url-fetch) (uri (string-append "ftp://sunsite.cnlab-switch.ch/mirror/OpenLDAP/openldap-release/openldap-" version ".tgz")) (sha256 (base32 - "0k51mhrs7pkwph2j38w09x7xl1ii69mcdi7b2mfrm9hp1yifrsc1")))) + "1nyslrgwxwilgv5sixc37svls5rbvhsv9drb7hlrjr2vqaji29ni")))) (build-system gnu-build-system) (inputs `(("bdb" ,bdb) ("openssl" ,openssl) diff --git a/gnu/packages/openssl.scm b/gnu/packages/openssl.scm index 26a1bbb811..1ed7a7a1f2 100644 --- a/gnu/packages/openssl.scm +++ b/gnu/packages/openssl.scm @@ -29,14 +29,15 @@ (define-public openssl (package (name "openssl") - (version "1.0.2") + (version "1.0.2a") (source (origin (method url-fetch) (uri (string-append "ftp://ftp.openssl.org/source/openssl-" version ".tar.gz")) (sha256 (base32 - "1s988w1h1yxh7lhrhh164hv6vil94lkwzh6g2rfm03dypbrvlj4c")))) + "0jijgzf72659pikms2bc5w31h78xrd1h5zp2r01an2h340y3kdhm")) + (patches (list (search-patch "openssl-runpath.patch"))))) (build-system gnu-build-system) (native-inputs `(("perl" ,perl))) (arguments diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index 38bddef975..db05969139 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -26,9 +26,10 @@ #:use-module ((guix licenses) #:select (gpl2+ gpl3+ lgpl2.1+)) #:use-module (gnu packages) #:use-module (gnu packages guile) - #:use-module ((gnu packages compression) #:select (bzip2 gzip)) + #:use-module (gnu packages compression) #:use-module (gnu packages gnupg) #:use-module (gnu packages databases) + #:use-module (gnu packages gnutls) #:use-module (gnu packages graphviz) #:use-module (gnu packages pkg-config) #:use-module (gnu packages autotools) @@ -51,22 +52,25 @@ arch "-linux" "/20131110/guile-2.0.9.tar.xz"))) -(define-public guix-0.8.1 +(define-public guix-0.8.2 (package (name "guix") - (version "0.8.1") + (version "0.8.2") (source (origin (method url-fetch) (uri (string-append "ftp://alpha.gnu.org/gnu/guix/guix-" version ".tar.gz")) (sha256 (base32 - "12h5ldj1yf0za6ladlr8h7nx2gqrv2dxcsiwyqayvrza93lijkf5")))) + "1a5gnkh17w7fgi5zy63ph64iqdvarkdqypkwgw2iifpqa6jq04zz")))) (build-system gnu-build-system) (arguments `(#:configure-flags (list "--localstatedir=/var" "--sysconfdir=/etc" + (string-append "--with-bash-completion-dir=" + (assoc-ref %outputs "out") + "/etc/bash_completion.d") (string-append "--with-libgcrypt-prefix=" (assoc-ref %build-inputs "libgcrypt"))) @@ -127,7 +131,8 @@ (base32 "1mi3brl7l58aww34rawhvja84xc7l1b4hmwdmc36fp9q9mfx0lg5")))))) (propagated-inputs - `(("guile-json" ,guile-json) + `(("gnutls" ,gnutls) ;for 'guix download' & co. + ("guile-json" ,guile-json) ("geiser" ,geiser))) ;for guix.el (home-page "http://www.gnu.org/software/guix") @@ -142,9 +147,12 @@ the Nix package manager.") (define guix-devel ;; Development version of Guix. - (let ((commit "07157e8")) - (package (inherit guix-0.8.1) - (version (string-append "0.8.1." commit)) + ;; + ;; Note: use a short commit id; when using the long one, the limit on socket + ;; file names is exceeded while running the tests. + (let ((commit "c2ee19e")) + (package (inherit guix-0.8.2) + (version (string-append "0.8.2." commit)) (source (origin (method git-fetch) (uri (git-reference @@ -152,9 +160,9 @@ the Nix package manager.") (commit commit))) (sha256 (base32 - "0ksfvkkgzsz58h60a8kypg9x24sabl5007hr3a2ddgh05rjckbci")))) + "1gwc1gypgscxg2m3n2vd0mw4dmxr7vsisqgh3y0lr05q9z5742sj")))) (arguments - (substitute-keyword-arguments (package-arguments guix-0.8.1) + (substitute-keyword-arguments (package-arguments guix-0.8.2) ((#:phases phases) `(alist-cons-after 'unpack 'bootstrap @@ -172,7 +180,7 @@ the Nix package manager.") ("gettext" ,gnu-gettext) ("texinfo" ,texinfo) ("graphviz" ,graphviz) - ,@(package-native-inputs guix-0.8.1)))))) + ,@(package-native-inputs guix-0.8.2)))))) (define-public guix guix-devel) @@ -197,10 +205,10 @@ the Nix package manager.") ("openssl" ,openssl) ("libgc" ,libgc) ("sqlite" ,sqlite) - ("bzip2" ,bzip2) - ("perl-www-curl" ,perl-www-curl) - ("perl-dbi" ,perl-dbi) - ("perl-dbd-sqlite" ,perl-dbd-sqlite))) + ("bzip2" ,bzip2))) + (propagated-inputs `(("perl-www-curl" ,perl-www-curl) + ("perl-dbi" ,perl-dbi) + ("perl-dbd-sqlite" ,perl-dbd-sqlite))) (home-page "http://nixos.org/nix/") (synopsis "The Nix package manager") (description diff --git a/gnu/packages/parallel.scm b/gnu/packages/parallel.scm index 9072adae3c..05d641fc36 100644 --- a/gnu/packages/parallel.scm +++ b/gnu/packages/parallel.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013,2014 Eric Bavier <bavier@member.fsf.org> +;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -27,7 +28,7 @@ (define-public parallel (package (name "parallel") - (version "20150122") + (version "20150422") (source (origin (method url-fetch) @@ -35,7 +36,7 @@ version ".tar.bz2")) (sha256 (base32 - "14g9pka59vln19rg6y8lyvrsc4nb3jk8y26hv3hdrf44rgwpds7d")))) + "1x6lvbw6msjkibadihzr2s0mbbcx2h2wxd723q5bgz6mcnsml346")))) (build-system gnu-build-system) (inputs `(("perl" ,perl))) (home-page "http://www.gnu.org/software/parallel/") diff --git a/gnu/packages/patches/audacity-fix-ffmpeg-binding.patch b/gnu/packages/patches/audacity-fix-ffmpeg-binding.patch new file mode 100644 index 0000000000..d6d65338d9 --- /dev/null +++ b/gnu/packages/patches/audacity-fix-ffmpeg-binding.patch @@ -0,0 +1,32 @@ +This resolves some "declaration of C function conflicts with previous +declaration" errors during compilation. + +--- a/src/FFmpeg.h 2015-02-21 00:33:33.853857529 +0100 ++++ b/src/FFmpeg.h 2015-02-21 00:35:09.626497205 +0100 +@@ -688,7 +688,7 @@ + FFMPEG_FUNCTION_WITH_RETURN( + AVOutputFormat*, + av_oformat_next, +- (AVOutputFormat *f), ++ (const AVOutputFormat *f), + (f) + ); + FFMPEG_FUNCTION_WITH_RETURN( +@@ -755,7 +755,7 @@ + FFMPEG_FUNCTION_WITH_RETURN( + int, + av_fifo_size, +- (AVFifoBuffer *f), ++ (const AVFifoBuffer *f), + (f) + ); + FFMPEG_FUNCTION_WITH_RETURN( +@@ -801,7 +801,7 @@ + FFMPEG_FUNCTION_WITH_RETURN( + AVDictionaryEntry *, + av_dict_get, +- (AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags), ++ (const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags), + (m, key, prev, flags) + ); + FFMPEG_FUNCTION_WITH_RETURN( diff --git a/gnu/packages/patches/bitlbee-configure-doc-fix.patch b/gnu/packages/patches/bitlbee-configure-doc-fix.patch new file mode 100644 index 0000000000..ade0b7f25c --- /dev/null +++ b/gnu/packages/patches/bitlbee-configure-doc-fix.patch @@ -0,0 +1,15 @@ +Fix the check for the prebuilt helpfile when xsltproc is not available. + +--- bitlbee-3.4/configure.orig 2015-03-25 18:09:10.000000000 -0400 ++++ bitlbee-3.4/configure 2015-05-20 14:51:33.627975970 -0400 +@@ -650,8 +650,8 @@ + + if [ "$doc" = "1" ]; then + if [ ! -e doc/user-guide/help.txt ] && \ +- ! type xmlto > /dev/null 2> /dev/null || \ +- ! type xsltproc > /dev/null 2> /dev/null ++ (! type xmlto > /dev/null 2> /dev/null || \ ++ ! type xsltproc > /dev/null 2> /dev/null) + then + echo + echo 'WARNING: Building from an unreleased source tree without prebuilt helpfile.' diff --git a/gnu/packages/patches/calibre-no-updates-dialog.patch b/gnu/packages/patches/calibre-no-updates-dialog.patch new file mode 100644 index 0000000000..1d8d79660e --- /dev/null +++ b/gnu/packages/patches/calibre-no-updates-dialog.patch @@ -0,0 +1,18 @@ +Taken from debian. + +# Description: Disable update check by default. +Index: calibre/src/calibre/gui2/main.py +=================================================================== +--- calibre.orig/src/calibre/gui2/main.py 2014-02-02 10:41:28.470954623 +0100 ++++ calibre/src/calibre/gui2/main.py 2014-02-02 10:41:56.546954247 +0100 +@@ -37,8 +37,8 @@ + help=_('Start minimized to system tray.')) + parser.add_option('-v', '--verbose', default=0, action='count', + help=_('Ignored, do not use. Present only for legacy reasons')) +- parser.add_option('--no-update-check', default=False, action='store_true', +- help=_('Do not check for updates')) ++ parser.add_option('--update-check', dest='no_update_check', default=True, action='store_false', ++ help=_('Check for updates')) + parser.add_option('--ignore-plugins', default=False, action='store_true', + help=_('Ignore custom plugins, useful if you installed a plugin' + ' that is preventing calibre from starting')) diff --git a/gnu/packages/patches/cmake-fix-tests.patch b/gnu/packages/patches/cmake-fix-tests.patch index 5327f3749a..f59e2cd625 100644 --- a/gnu/packages/patches/cmake-fix-tests.patch +++ b/gnu/packages/patches/cmake-fix-tests.patch @@ -1,6 +1,23 @@ ---- a/Tests/CMakeLists.txt 2013-03-20 22:57:13.000000000 +0100 -+++ b/Tests/CMakeLists.txt 2013-03-20 22:58:02.000000000 +0100 -@@ -1706,16 +1706,17 @@ +--- cmake-3.2.2.orig/Tests/CMakeLists.txt 2015-04-14 01:09:00.000000000 +0800 ++++ cmake-3.2.2/Tests/CMakeLists.txt 2015-04-28 15:02:34.913039742 +0800 +@@ -342,10 +342,12 @@ + endif() + + # run test for BundleUtilities on supported platforms/compilers +- if(MSVC OR +- MINGW OR +- CMAKE_SYSTEM_NAME MATCHES "Linux" OR +- CMAKE_SYSTEM_NAME MATCHES "Darwin") ++# if(MSVC OR ++# MINGW OR ++# CMAKE_SYSTEM_NAME MATCHES "Linux" OR ++# CMAKE_SYSTEM_NAME MATCHES "Darwin") ++# This test fails on Guix: skip it. ++ if(FALSE) + if(NOT "${CMAKE_GENERATOR}" STREQUAL "Watcom WMake") + + add_test(BundleUtilities ${CMAKE_CTEST_COMMAND} +@@ -2257,16 +2259,17 @@ PASS_REGULAR_EXPRESSION "Could not find executable" FAIL_REGULAR_EXPRESSION "SegFault") @@ -27,19 +44,4 @@ +# PASS_REGULAR_EXPRESSION "Upload\\.xml") configure_file( - "${CMake_SOURCE_DIR}/Tests/CTestTestConfigFileInBuildDir/test1.cmake.in" ---- a/Utilities/cmcurl/CMakeLists.txt 2013-03-20 22:57:13.000000000 +0100 -+++ b/Utilities/cmcurl/CMakeLists.txt 2013-03-20 23:08:41.000000000 +0100 -@@ -729,8 +729,9 @@ - ADD_EXECUTABLE(LIBCURL Testing/curltest.c) - TARGET_LINK_LIBRARIES(LIBCURL cmcurl ${CMAKE_DL_LIBS}) - --IF(CMAKE_CURL_TEST_URL) -- ADD_TEST(curl LIBCURL ${CMAKE_CURL_TEST_URL}) --ENDIF(CMAKE_CURL_TEST_URL) -+# This test requires network connectivity: skip it. -+#IF(CMAKE_CURL_TEST_URL) -+# ADD_TEST(curl LIBCURL ${CMAKE_CURL_TEST_URL}) -+#ENDIF(CMAKE_CURL_TEST_URL) - - INSTALL(FILES COPYING DESTINATION ${CMake_DOC_DEST}/cmcurl) + "${CMake_SOURCE_DIR}/Tests/CTestCoverageCollectGCOV/test.cmake.in" diff --git a/gnu/packages/patches/curl-gss-api-fix.patch b/gnu/packages/patches/curl-gss-api-fix.patch deleted file mode 100644 index ea838ae8c7..0000000000 --- a/gnu/packages/patches/curl-gss-api-fix.patch +++ /dev/null @@ -1,38 +0,0 @@ -Copied from upstream: -https://github.com/bagder/curl/commit/5c0e66d63214e0306197c5a3f162441e074f3401.patch - -From 5c0e66d63214e0306197c5a3f162441e074f3401 Mon Sep 17 00:00:00 2001 -From: Steve Holme <steve_holme@hotmail.com> -Date: Thu, 8 Jan 2015 19:23:53 +0000 -Subject: [PATCH] sasl_gssapi: Fixed build on NetBSD with built-in GSS-API - -Bug: http://curl.haxx.se/bug/view.cgi?id=1469 -Reported-by: Thomas Klausner ---- - lib/curl_sasl_gssapi.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/lib/curl_sasl_gssapi.c b/lib/curl_sasl_gssapi.c -index 6dda0e9..a50646a 100644 ---- a/lib/curl_sasl_gssapi.c -+++ b/lib/curl_sasl_gssapi.c -@@ -6,6 +6,7 @@ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2014, Steve Holme, <steve_holme@hotmail.com>. -+ * Copyright (C) 2015, Daniel Stenberg, <daniel@haxx.se>, et al. - * - * This software is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms -@@ -126,7 +127,7 @@ CURLcode Curl_sasl_create_gssapi_user_message(struct SessionHandle *data, - - /* Import the SPN */ - gss_major_status = gss_import_name(&gss_minor_status, &spn_token, -- gss_nt_service_name, &krb5->spn); -+ GSS_C_NT_HOSTBASED_SERVICE, &krb5->spn); - if(GSS_ERROR(gss_major_status)) { - Curl_gss_log_error(data, gss_minor_status, "gss_import_name() failed: "); - --- -2.2.1 - diff --git a/gnu/packages/patches/elfutils-tests-ptrace.patch b/gnu/packages/patches/elfutils-tests-ptrace.patch new file mode 100644 index 0000000000..cd46999063 --- /dev/null +++ b/gnu/packages/patches/elfutils-tests-ptrace.patch @@ -0,0 +1,64 @@ +This patch allows us to skip tests that require PTRACE_ATTACH in situations +where PTRACE_ATTACH is only allowed when CAP_SYS_PTRACE is held (i.e., for +root, by default.) + +Reported at <https://bugzilla.redhat.com/show_bug.cgi?id=1210966>. + +--- elfutils-0.161/tests/run-deleted.sh 2015-04-11 16:38:33.028556235 +0200 ++++ elfutils-0.161/tests/run-deleted.sh 2015-04-11 16:46:15.012442185 +0200 +@@ -17,6 +17,15 @@ + + . $srcdir/backtrace-subr.sh + ++# Check whether the Yama policy allows us to use PTRACE_ATTACH. ++if [ -f /proc/sys/kernel/yama/ptrace_scope ] ++then ++ if [ `cat /proc/sys/kernel/yama/ptrace_scope` -ne 0 ] ++ then ++ exit 77 ++ fi ++fi ++ + tempfiles deleted deleted-lib.so + cp -p ${abs_builddir}/deleted ${abs_builddir}/deleted-lib.so . + +--- elfutils-0.161/tests/vdsosyms.c 2015-04-11 16:40:20.633461110 +0200 ++++ elfutils-0.161/tests/vdsosyms.c 2015-04-11 16:45:06.611866677 +0200 +@@ -23,6 +23,8 @@ + #include <stdio.h> + #include <string.h> + #include <sys/types.h> ++#include <sys/stat.h> ++#include <fcntl.h> + #include <unistd.h> + #include ELFUTILS_HEADER(dwfl) + +@@ -68,6 +70,7 @@ module_callback (Dwfl_Module *mod, void + int + main (int argc __attribute__ ((unused)), char **argv __attribute__ ((unused))) + { ++ static const char ptrace_scope_file[] = "/proc/sys/kernel/yama/ptrace_scope"; + static char *debuginfo_path; + static const Dwfl_Callbacks proc_callbacks = + { +@@ -76,6 +79,20 @@ main (int argc __attribute__ ((unused)), + + .find_elf = dwfl_linux_proc_find_elf, + }; ++ ++ /* Check whether the Yama policy allows us to use PTRACE_ATTACH. */ ++ int ptrace_scope = open (ptrace_scope_file, O_RDONLY); ++ if (ptrace_scope >= 0) ++ { ++ char buf[10]; ++ int count = read (ptrace_scope, buf, sizeof buf); ++ assert (count > 0); ++ if (buf[0] != '0') ++ /* We're not allowed, so skip this test. */ ++ return 77; ++ close (ptrace_scope); ++ } ++ + Dwfl *dwfl = dwfl_begin (&proc_callbacks); + if (dwfl == NULL) + error (2, 0, "dwfl_begin: %s", dwfl_errmsg (-1)); diff --git a/gnu/packages/patches/emacs-exec-path.patch b/gnu/packages/patches/emacs-exec-path.patch new file mode 100644 index 0000000000..884fa94a64 --- /dev/null +++ b/gnu/packages/patches/emacs-exec-path.patch @@ -0,0 +1,18 @@ +Do not capture the build-time value of $PATH in the 'emacs' executable +since this can noticeably increase the size of the closure of Emacs +with things like GCC being referenced. + +--- a/lisp/loadup.el ++++ b/lisp/loadup.el +@@ -64,6 +64,11 @@ + (expand-file-name "textmodes" dir) + (expand-file-name "vc" dir))))) + ++;; Reset 'exec-path' so we don't capture the build-time $PATH in the ++;; 'emacs' executable. ++(setq-default exec-path nil) ++(setq exec-path nil) ++ + (if (eq t purify-flag) + ;; Hash consing saved around 11% of pure space in my tests. + (setq purify-flag (make-hash-table :test 'equal :size 70000))) diff --git a/gnu/packages/patches/fltk-shared-lib-defines.patch b/gnu/packages/patches/fltk-shared-lib-defines.patch new file mode 100644 index 0000000000..d36a50ff5e --- /dev/null +++ b/gnu/packages/patches/fltk-shared-lib-defines.patch @@ -0,0 +1,51 @@ +This patch from upstream revision 10588. + +--- fltk-1.3.3/src/Xutf8.h ++++ fltk-1.3.3/src/Xutf8.h +@@ -25,6 +25,7 @@ + #include <X11/Xlib.h> + #include <X11/Xlocale.h> + #include <X11/Xutil.h> ++#include <FL/Fl_Export.H> + + typedef struct { + int nb_font; +@@ -98,8 +99,8 @@ + XUtf8FontStruct *font_set, + unsigned int ucs); + +-int +-XGetUtf8FontAndGlyph( ++FL_EXPORT int ++fl_XGetUtf8FontAndGlyph( + XUtf8FontStruct *font_set, + unsigned int ucs, + XFontStruct **fnt, +--- fltk-1.3.3/src/gl_draw.cxx ++++ fltk-1.3.3/src/gl_draw.cxx +@@ -114,7 +114,7 @@ + for (int i = 0; i < 0x400; i++) { + XFontStruct *font = NULL; + unsigned short id; +- XGetUtf8FontAndGlyph(gl_fontsize->font, ii, &font, &id); ++ fl_XGetUtf8FontAndGlyph(gl_fontsize->font, ii, &font, &id); + if (font) glXUseXFont(font->fid, id, 1, gl_fontsize->listbase+ii); + ii++; + } +--- fltk-1.3.3/src/xutf8/utf8Wrap.c ++++ fltk-1.3.3/src/xutf8/utf8Wrap.c +@@ -816,10 +816,10 @@ + /** get the X font and glyph ID of a UCS char **/ + /*****************************************************************************/ + int +-XGetUtf8FontAndGlyph(XUtf8FontStruct *font_set, +- unsigned int ucs, +- XFontStruct **fnt, +- unsigned short *id) { ++fl_XGetUtf8FontAndGlyph(XUtf8FontStruct *font_set, ++ unsigned int ucs, ++ XFontStruct **fnt, ++ unsigned short *id) { + + /* int x; */ + int *encodings; /* encodings array */ diff --git a/gnu/packages/patches/fuse-CVE-2015-3202.patch b/gnu/packages/patches/fuse-CVE-2015-3202.patch new file mode 100644 index 0000000000..7c64de7683 --- /dev/null +++ b/gnu/packages/patches/fuse-CVE-2015-3202.patch @@ -0,0 +1,65 @@ +The following patch was copied from Debian. + +Description: Fix CVE-2015-3202 + Missing scrubbing of the environment before executing a mount or umount + of a filesystem. +Origin: upstream +Author: Miklos Szeredi <miklos@szeredi.hu> +Last-Update: 2015-05-19 + +--- + lib/mount_util.c | 23 +++++++++++++++++------ + 1 file changed, 17 insertions(+), 6 deletions(-) + +--- a/lib/mount_util.c ++++ b/lib/mount_util.c +@@ -95,10 +95,12 @@ static int add_mount(const char *prognam + goto out_restore; + } + if (res == 0) { ++ char *env = NULL; ++ + sigprocmask(SIG_SETMASK, &oldmask, NULL); + setuid(geteuid()); +- execl("/bin/mount", "/bin/mount", "--no-canonicalize", "-i", +- "-f", "-t", type, "-o", opts, fsname, mnt, NULL); ++ execle("/bin/mount", "/bin/mount", "--no-canonicalize", "-i", ++ "-f", "-t", type, "-o", opts, fsname, mnt, NULL, &env); + fprintf(stderr, "%s: failed to execute /bin/mount: %s\n", + progname, strerror(errno)); + exit(1); +@@ -146,10 +148,17 @@ static int exec_umount(const char *progn + goto out_restore; + } + if (res == 0) { ++ char *env = NULL; ++ + sigprocmask(SIG_SETMASK, &oldmask, NULL); + setuid(geteuid()); +- execl("/bin/umount", "/bin/umount", "-i", rel_mnt, +- lazy ? "-l" : NULL, NULL); ++ if (lazy) { ++ execle("/bin/umount", "/bin/umount", "-i", rel_mnt, ++ "-l", NULL, &env); ++ } else { ++ execle("/bin/umount", "/bin/umount", "-i", rel_mnt, ++ NULL, &env); ++ } + fprintf(stderr, "%s: failed to execute /bin/umount: %s\n", + progname, strerror(errno)); + exit(1); +@@ -205,10 +214,12 @@ static int remove_mount(const char *prog + goto out_restore; + } + if (res == 0) { ++ char *env = NULL; ++ + sigprocmask(SIG_SETMASK, &oldmask, NULL); + setuid(geteuid()); +- execl("/bin/umount", "/bin/umount", "--no-canonicalize", "-i", +- "--fake", mnt, NULL); ++ execle("/bin/umount", "/bin/umount", "--no-canonicalize", "-i", ++ "--fake", mnt, NULL, &env); + fprintf(stderr, "%s: failed to execute /bin/umount: %s\n", + progname, strerror(errno)); + exit(1); diff --git a/gnu/packages/patches/gcc-5.0-libvtv-runpath.patch b/gnu/packages/patches/gcc-5.0-libvtv-runpath.patch new file mode 100644 index 0000000000..9a9bc5ca53 --- /dev/null +++ b/gnu/packages/patches/gcc-5.0-libvtv-runpath.patch @@ -0,0 +1,15 @@ +GCC 4.9 and later have libvtv and, just like libstdc++ (see +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32354), it doesn't +have $libdir in its RUNPATH, but it NEEDs libgcc_s. This patch +fixes that. + +--- gcc-5.1.0/libvtv/Makefile.in 2014-10-30 09:28:58.000000000 +0100 ++++ gcc-5.1.0/libvtv/Makefile.in 2015-04-30 09:51:04.161129705 +0200 +@@ -15,6 +15,7 @@ + + @SET_MAKE@ + ++libvtv_la_LDFLAGS = -Wl,-rpath=$(libdir) + + VPATH = @srcdir@ + pkgdatadir = $(datadir)/@PACKAGE@ diff --git a/gnu/packages/patches/gcc-arm-link-spec-fix.patch b/gnu/packages/patches/gcc-arm-link-spec-fix.patch new file mode 100644 index 0000000000..0ffe8a1810 --- /dev/null +++ b/gnu/packages/patches/gcc-arm-link-spec-fix.patch @@ -0,0 +1,16 @@ +Do not pass -dynamic-linker to linker when !shared. +Fixes <http://bugs.gnu.org/20102>. + +Patch by Ludovic Courtès <ludo@gnu.org>. + +--- gcc-4.8.4/gcc/config/arm/linux-elf.h.orig 2015-04-08 20:31:20.376900478 +0200 ++++ gcc-4.8.4/gcc/config/arm/linux-elf.h 2015-04-08 20:31:36.437014437 +0200 +@@ -65,7 +65,7 @@ + %{symbolic:-Bsymbolic} \ + %{!static: \ + %{rdynamic:-export-dynamic} \ +- -dynamic-linker " GNU_USER_DYNAMIC_LINKER "} \ ++ %{!shared:-dynamic-linker " GNU_USER_DYNAMIC_LINKER "}} \ + -X \ + %{mbig-endian:-EB} %{mlittle-endian:-EL}" \ + SUBTARGET_EXTRA_LINK_SPEC diff --git a/gnu/packages/patches/gcc-libvtv-runpath.patch b/gnu/packages/patches/gcc-libvtv-runpath.patch new file mode 100644 index 0000000000..df74363c83 --- /dev/null +++ b/gnu/packages/patches/gcc-libvtv-runpath.patch @@ -0,0 +1,15 @@ +GCC 4.9 and later have libvtv and, just like libstdc++ (see +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32354), it doesn't +have $libdir in its RUNPATH, but it NEEDs libgcc_s. This patch +fixes that. + +--- gcc-4.9.2/libvtv/Makefile.in 2014-10-30 09:28:58.000000000 +0100 ++++ gcc-4.9.2/libvtv/Makefile.in 2015-04-30 09:51:04.161129705 +0200 +@@ -15,6 +15,7 @@ + + @SET_MAKE@ + ++AM_LDFLAGS = -Wl,-rpath=$(libdir) + + VPATH = @srcdir@ + pkgdatadir = $(datadir)/@PACKAGE@ diff --git a/gnu/packages/patches/geoclue-config.patch b/gnu/packages/patches/geoclue-config.patch new file mode 100644 index 0000000000..dd35b90be5 --- /dev/null +++ b/gnu/packages/patches/geoclue-config.patch @@ -0,0 +1,25 @@ +Allow the configuration file to be specified via an environment variable. + +--- geoclue-2.1.10/src/gclue-config.c 2015-04-07 09:50:07.721074380 +0200 ++++ geoclue-2.1.10/src/gclue-config.c 2015-04-07 10:27:26.613171960 +0200 +@@ -235,6 +235,11 @@ + gclue_config_init (GClueConfig *config) + { + GError *error = NULL; ++ const char *config_file_path; ++ ++ config_file_path = g_getenv ("GEOCLUE_CONFIG_FILE"); ++ if (config_file_path == NULL) ++ config_file_path = CONFIG_FILE_PATH; + + config->priv = + G_TYPE_INSTANCE_GET_PRIVATE (config, +@@ -242,7 +247,7 @@ + GClueConfigPrivate); + config->priv->key_file = g_key_file_new (); + g_key_file_load_from_file (config->priv->key_file, +- CONFIG_FILE_PATH, ++ config_file_path, + 0, + &error); + if (error != NULL) { diff --git a/gnu/packages/patches/ghostscript-runpath.patch b/gnu/packages/patches/ghostscript-runpath.patch new file mode 100644 index 0000000000..c7dcfd4529 --- /dev/null +++ b/gnu/packages/patches/ghostscript-runpath.patch @@ -0,0 +1,17 @@ +This patch adds $(libdir) to the RUNPATH of 'gsc' and 'gsx'. + +--- gnu-ghostscript-9.14.0/base/unix-dll.mak 2015-04-05 15:12:45.386957927 +0200 ++++ gnu-ghostscript-9.14.0/base/unix-dll.mak 2015-04-05 15:12:49.222982359 +0200 +@@ -91,11 +91,11 @@ $(GS_SO_MAJOR): $(GS_SO_MAJOR_MINOR) + # Build the small Ghostscript loaders, with Gtk+ and without + $(GSSOC_XE): $(GS_SO) $(PSSRC)$(SOC_LOADER) + $(GLCC) -g -o $(GSSOC_XE) $(PSSRC)dxmainc.c \ +- -L$(BINDIR) -l$(GS_SO_BASE) ++ -L$(BINDIR) -l$(GS_SO_BASE) -Wl,-rpath=$(libdir) + + $(GSSOX_XE): $(GS_SO) $(PSSRC)$(SOC_LOADER) + $(GLCC) -g $(SOC_CFLAGS) -o $(GSSOX_XE) $(PSSRC)$(SOC_LOADER) \ +- -L$(BINDIR) -l$(GS_SO_BASE) $(SOC_LIBS) ++ -L$(BINDIR) -l$(GS_SO_BASE) $(SOC_LIBS) -Wl,-rpath=$(libdir) + + # ------------------------- Recursive make targets ------------------------- # diff --git a/gnu/packages/patches/gitolite-openssh-6.8-compat.patch b/gnu/packages/patches/gitolite-openssh-6.8-compat.patch new file mode 100644 index 0000000000..d7fc2e6b12 --- /dev/null +++ b/gnu/packages/patches/gitolite-openssh-6.8-compat.patch @@ -0,0 +1,25 @@ +From ed807a40c6683960e357bc995b3acf721ec088b4 Mon Sep 17 00:00:00 2001 +From: Sitaram Chamarty <sitaram@atc.tcs.com> +Date: Thu, 19 Mar 2015 05:17:59 +0530 +Subject: [PATCH] openssh 6.8 compat + +--- + src/triggers/post-compile/ssh-authkeys | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/triggers/post-compile/ssh-authkeys b/src/triggers/post-compile/ssh-authkeys +index 84dda73..d5f5d8b 100755 +--- a/src/triggers/post-compile/ssh-authkeys ++++ b/src/triggers/post-compile/ssh-authkeys +@@ -115,7 +115,7 @@ sub fp_file { + my $f = shift; + my $fp = `ssh-keygen -l -f '$f'`; + chomp($fp); +- _die "fingerprinting failed for '$f'" unless $fp =~ /([0-9a-f][0-9a-f](:[0-9a-f][0-9a-f])+)/; ++ _die "fingerprinting failed for '$f'" unless $fp =~ /([0-9a-f][0-9a-f](:[0-9a-f][0-9a-f])+)/ or $fp =~ m(SHA256:([A-ZA-z0-9+/]+)); + $fp = $1; + return $fp; + } +-- +2.2.1 + diff --git a/gnu/packages/patches/gnutls-fix-duplicate-manpages.patch b/gnu/packages/patches/gnutls-fix-duplicate-manpages.patch new file mode 100644 index 0000000000..95a25560e5 --- /dev/null +++ b/gnu/packages/patches/gnutls-fix-duplicate-manpages.patch @@ -0,0 +1,30 @@ +Remove duplicate manpage entries from Makefile. + +--- gnutls-3.4.0/doc/manpages/Makefile.am.orig 2015-04-06 04:48:30.000000000 -0400 ++++ gnutls-3.4.0/doc/manpages/Makefile.am 2015-04-12 16:52:58.029694525 -0400 +@@ -134,11 +134,8 @@ + APIMANS += gnutls_certificate_get_peers_subkey_id.3 + APIMANS += gnutls_certificate_get_trust_list.3 + APIMANS += gnutls_certificate_get_verify_flags.3 +-APIMANS += gnutls_certificate_get_verify_flags.3 +-APIMANS += gnutls_certificate_get_x509_crt.3 + APIMANS += gnutls_certificate_get_x509_crt.3 + APIMANS += gnutls_certificate_get_x509_key.3 +-APIMANS += gnutls_certificate_get_x509_key.3 + APIMANS += gnutls_certificate_send_x509_rdn_sequence.3 + APIMANS += gnutls_certificate_server_set_request.3 + APIMANS += gnutls_certificate_set_dh_params.3 +--- gnutls-3.4.0/doc/manpages/Makefile.in.orig 2015-04-08 02:08:30.000000000 -0400 ++++ gnutls-3.4.0/doc/manpages/Makefile.in 2015-04-12 16:53:13.319694530 -0400 +@@ -1275,11 +1275,8 @@ + gnutls_certificate_get_peers_subkey_id.3 \ + gnutls_certificate_get_trust_list.3 \ + gnutls_certificate_get_verify_flags.3 \ +- gnutls_certificate_get_verify_flags.3 \ +- gnutls_certificate_get_x509_crt.3 \ + gnutls_certificate_get_x509_crt.3 \ + gnutls_certificate_get_x509_key.3 \ +- gnutls_certificate_get_x509_key.3 \ + gnutls_certificate_send_x509_rdn_sequence.3 \ + gnutls_certificate_server_set_request.3 \ + gnutls_certificate_set_dh_params.3 \ diff --git a/gnu/packages/patches/gobject-introspection-cc.patch b/gnu/packages/patches/gobject-introspection-cc.patch index 38b919a746..d9cacf4ca7 100644 --- a/gnu/packages/patches/gobject-introspection-cc.patch +++ b/gnu/packages/patches/gobject-introspection-cc.patch @@ -1,14 +1,11 @@ ---- a/giscanner/sourcescanner.py 2013-12-15 23:03:54.002937000 +0100 -+++ b/giscanner/sourcescanner.py 2013-12-15 23:04:50.322937000 +0100 -@@ -277,6 +277,11 @@ - defines = ['__GI_SCANNER__'] - undefs = [] - cpp_args = os.environ.get('CC', 'cc').split() # support CC="ccache gcc" -+ if (cpp_args == ['cc'] and -+ not any(map(lambda x: os.access(os.path.join(x, 'cc'), os.X_OK), -+ os.environ.get('PATH').split(':')))): -+ cpp_args = ['GUIX_GCC_PATH'] -+ - if 'cl' in cpp_args: - # The Microsoft compiler/preprocessor (cl) does not accept - # source input from stdin (the '-' flag), so we need +Use gcc as the default C compiler if CC is not set. + + +--- gobject-introspection-1.44.0.orig/giscanner/__init__.py 2014-08-04 22:37:07.000000000 +0800 ++++ gobject-introspection-1.44.0/giscanner/__init__.py 2015-04-20 17:30:26.507697234 +0800 +@@ -22,3 +22,5 @@ + builddir = os.environ.get('UNINSTALLED_INTROSPECTION_BUILDDIR') + if builddir is not None: + __path__.append(os.path.join(builddir, 'giscanner')) ++if not 'CC' in os.environ: ++ os.environ['CC'] = 'gcc' diff --git a/gnu/packages/patches/gstreamer-0.10-bison3.patch b/gnu/packages/patches/gstreamer-0.10-bison3.patch deleted file mode 100644 index f6eb90cb02..0000000000 --- a/gnu/packages/patches/gstreamer-0.10-bison3.patch +++ /dev/null @@ -1,32 +0,0 @@ -See https://bugzilla.gnome.org/show_bug.cgi?id=706462 - -Subject: [PATCH] Make grammar.y work with Bison 3 - -YYLEX_PARAM is no longer supported in Bison 3. ---- - gst/parse/grammar.y | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/gst/parse/grammar.y b/gst/parse/grammar.y -index 8a9019c..f533389 100644 ---- a/gst/parse/grammar.y -+++ b/gst/parse/grammar.y -@@ -26,7 +26,6 @@ - */ - - #define YYERROR_VERBOSE 1 --#define YYLEX_PARAM scanner - - #define YYENABLE_NLS 0 - -@@ -659,6 +658,7 @@ static int yyerror (void *scanner, graph_t *graph, const char *s); - %right '.' - %left '!' '=' - -+%lex-param { void *scanner } - %parse-param { void *scanner } - %parse-param { graph_t *graph } - %pure-parser --- -1.8.3.4 - diff --git a/gnu/packages/patches/gstreamer-0.10-silly-test.patch b/gnu/packages/patches/gstreamer-0.10-silly-test.patch deleted file mode 100644 index 678dd7b122..0000000000 --- a/gnu/packages/patches/gstreamer-0.10-silly-test.patch +++ /dev/null @@ -1,14 +0,0 @@ -See http://lists.freedesktop.org/archives/gstreamer-bugs/2013-January/098461.html - -diff -ru gstreamer-0.10.36.orig/tests/check/Makefile.in gstreamer-0.10.36/tests/check/Makefile.in ---- gstreamer-0.10.36.orig/tests/check/Makefile.in 2012-02-20 23:48:29.000000000 +0100 -+++ gstreamer-0.10.36/tests/check/Makefile.in 2013-10-30 21:55:48.000000000 +0100 -@@ -42,7 +42,7 @@ - gst/gstbus$(EXEEXT) gst/gstcaps$(EXEEXT) $(am__EXEEXT_2) \ - gst/gstdatetime$(EXEEXT) gst/gstinfo$(EXEEXT) \ - gst/gstiterator$(EXEEXT) gst/gstmessage$(EXEEXT) \ -- gst/gstminiobject$(EXEEXT) gst/gstobject$(EXEEXT) \ -+ gst/gstminiobject$(EXEEXT) \ - gst/gstpad$(EXEEXT) gst/gstparamspecs$(EXEEXT) \ - gst/gstpoll$(EXEEXT) gst/gstsegment$(EXEEXT) \ - gst/gstsystemclock$(EXEEXT) gst/gstclock$(EXEEXT) \ diff --git a/gnu/packages/patches/guix-test-networking.patch b/gnu/packages/patches/guix-test-networking.patch deleted file mode 100644 index a8d1f4fd2f..0000000000 --- a/gnu/packages/patches/guix-test-networking.patch +++ /dev/null @@ -1,15 +0,0 @@ -Skip that test when the network is unreachable. - -diff --git a/tests/packages.scm b/tests/packages.scm -index 04e3b0b..6ac215b 100644 ---- a/tests/packages.scm -+++ b/tests/packages.scm -@@ -139,6 +139,8 @@ - (and (direct-store-path? source) - (string-suffix? "utils.scm" source)))) - -+(unless (false-if-exception (getaddrinfo "www.gnu.org" "80" AI_NUMERICSERV)) -+ (test-skip 1)) - (test-equal "package-source-derivation, snippet" - "OK" - (let* ((file (search-bootstrap-binary "guile-2.0.9.tar.xz" diff --git a/gnu/packages/patches/hop-linker-flags.patch b/gnu/packages/patches/hop-linker-flags.patch new file mode 100644 index 0000000000..f1f5dbfbd9 --- /dev/null +++ b/gnu/packages/patches/hop-linker-flags.patch @@ -0,0 +1,60 @@ +Make hop's link rules honor flags set by the --blflags configure argument. + +--- hop-2.4.0/src/Makefile 2015-05-05 19:41:04.800151036 -0500 ++++ hop-2.4.0/src/Makefile 2015-05-05 19:40:40.916150417 -0500 +@@ -69,10 +69,10 @@ + $(MAKE) link.$(LINK) DEST=$@ + + link.dynamic: +- @ $(call link,$(BIGLOO),$(BCFLAGS),$(BCFLAGSDEV),$(OBJECTS),-o,$(DEST)) ++ @ $(call link,$(BIGLOO),$(BCFLAGS) $(BLFLAGS),$(BCFLAGSDEV),$(OBJECTS),-o,$(DEST)) + + link.static: +- @ $(call link,$(BIGLOO),$(BCFLAGS),$(BCFLAGSDEV),-static-all-bigloo $(OBJECTS),-o,$(DEST)) ++ @ $(call link,$(BIGLOO),$(BCFLAGS) $(BLFLAGS),$(BCFLAGSDEV),-static-all-bigloo $(OBJECTS),-o,$(DEST)) + + link.library: + echo "***ERROR: link.library not currently supported!" +--- hop-2.4.0/hopc/Makefile 2013-01-30 07:17:59.000000000 -0600 ++++ hop-2.4.0/hopc/Makefile 2015-05-05 19:45:21.876157699 -0500 +@@ -62,7 +62,7 @@ + mkdir -p $@ + + $(BUILDBINDIR)/$(EXEC): .afile .etags $(OBJECTS) +- @ $(call link,$(BIGLOO),$(BCFLAGS),,$(OBJECTS),-o,$@) ++ @ $(call link,$(BIGLOO),$(BCFLAGS) $(BLFLAGS),$(BCFLAGSDEV),$(OBJECTS),-o,$@) + + $(BUILDBINDIR)/$(EXEC).jar: .afile .etags .jfile $(BGL_CLASSES) META-INF/MANIFEST.MF jvm-stdlibs jvm-share jvm-lib + $(JAR) $@ META-INF/MANIFEST.MF -C o/class_s . +--- hop-2.4.0/hophz/Makefile 2013-01-30 07:17:59.000000000 -0600 ++++ hop-2.4.0/hophz/Makefile 2015-05-05 19:59:42.996180030 -0500 +@@ -16,9 +16,6 @@ + -include ../etc/Makefile.hopconfig + -include ../etc/Makefile.version + +-BLFLAGS = +-BLINKFLAGS = -suffix hop +- + #*---------------------------------------------------------------------*/ + #* Target and Project */ + #*---------------------------------------------------------------------*/ +@@ -72,7 +69,7 @@ + mkdir -p $@ + + $(BUILDBINDIR)/$(EXEC): .afile .etags $(OBJECTS) +- @ $(call link,$(BIGLOO),$(BCFLAGS),$(BLINKFLAGS),$(OBJECTS),-o,$@) ++ @ $(call link,$(BIGLOO),$(BCFLAGS) $(BLFLAGS),$(BCFLAGSDEV),$(OBJECTS),-o,$@) + + $(BUILDBINDIR)/$(EXEC).jar: .afile .etags .jfile $(BGL_CLASSES) META-INF/MANIFEST.MF jvm-stdlibs jvm-share jvm-lib + @ $(JAR) $@ META-INF/MANIFEST.MF -C o/class_s . +--- hop-2.4.0/hopsh/Makefile 2013-01-30 07:17:59.000000000 -0600 ++++ hop-2.4.0/hopsh/Makefile 2015-05-05 19:46:36.060159626 -0500 +@@ -60,7 +60,7 @@ + mkdir -p $@ + + $(BUILDBINDIR)/$(EXEC): .afile .etags $(OBJECTS) +- @ $(call link,$(BIGLOO),$(BCFLAGS),$(BCFLAGSDEV),$(OBJECTS),-o,$@) ++ @ $(call link,$(BIGLOO),$(BCFLAGS) $(BLFLAGS),$(BCFLAGSDEV),$(OBJECTS),-o,$@) + + $(BUILDBINDIR)/$(EXEC).jar: .afile .etags .jfile $(BGL_CLASSES) META-INF/MANIFEST.MF jvm-stdlibs jvm-share jvm-lib + @ $(JAR) $@ META-INF/MANIFEST.MF -C o/class_s . diff --git a/gnu/packages/patches/icecat-CVE-2015-0797.patch b/gnu/packages/patches/icecat-CVE-2015-0797.patch new file mode 100644 index 0000000000..5727ed753c --- /dev/null +++ b/gnu/packages/patches/icecat-CVE-2015-0797.patch @@ -0,0 +1,35 @@ +From 147543038273042f71284fa8487c71670163da5f Mon Sep 17 00:00:00 2001 +From: Ralph Giles <giles@mozilla.com> +Date: Tue, 31 Mar 2015 16:18:22 -0700 +Subject: [PATCH] Bug 1080995 - Don't use the h264parser gstreamer element. + r=kinetik, a=sledru + +--- + content/media/gstreamer/GStreamerFormatHelper.cpp | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/content/media/gstreamer/GStreamerFormatHelper.cpp b/content/media/gstreamer/GStreamerFormatHelper.cpp +index 25095e7..ebd12c2 100644 +--- a/content/media/gstreamer/GStreamerFormatHelper.cpp ++++ b/content/media/gstreamer/GStreamerFormatHelper.cpp +@@ -67,6 +67,7 @@ static char const * const sDefaultCodecCaps[][2] = { + + static char const * const sPluginBlacklist[] = { + "flump3dec", ++ "h264parse", + }; + + GStreamerFormatHelper::GStreamerFormatHelper() +@@ -251,7 +252,8 @@ static gboolean FactoryFilter(GstPluginFeature *aFeature, gpointer) + const gchar *className = + gst_element_factory_get_klass(GST_ELEMENT_FACTORY_CAST(aFeature)); + +- if (!strstr(className, "Decoder") && !strstr(className, "Demux")) { ++ if (!strstr(className, "Decoder") && !strstr(className, "Demux") && ++ !strstr(className, "Parser")) { + return FALSE; + } + +-- +2.2.1 + diff --git a/gnu/packages/patches/icecat-CVE-2015-2708-pt1.patch b/gnu/packages/patches/icecat-CVE-2015-2708-pt1.patch new file mode 100644 index 0000000000..e755d7531a --- /dev/null +++ b/gnu/packages/patches/icecat-CVE-2015-2708-pt1.patch @@ -0,0 +1,240 @@ +From 5f61ae17ec82d288a3fe4892ec999c0e20c486c0 Mon Sep 17 00:00:00 2001 +From: "Byron Campen [:bwc]" <docfaraday@gmail.com> +Date: Mon, 6 Apr 2015 11:52:28 -0700 +Subject: [PATCH] Bug 1151139 - Simplify how we choose which streams to gather + stats from. r=mt, a=abillings + +--- + ...t_peerConnection_offerRequiresReceiveAudio.html | 2 + + ...t_peerConnection_offerRequiresReceiveVideo.html | 2 + + ...rConnection_offerRequiresReceiveVideoAudio.html | 2 + + media/mtransport/nricectx.h | 13 +++++ + media/mtransport/nricemediastream.cpp | 1 + + media/mtransport/nricemediastream.h | 5 +- + .../src/peerconnection/PeerConnectionImpl.cpp | 66 ++++++++++------------ + .../src/peerconnection/PeerConnectionImpl.h | 2 +- + 8 files changed, 54 insertions(+), 39 deletions(-) + +diff --git a/dom/media/tests/mochitest/test_peerConnection_offerRequiresReceiveAudio.html b/dom/media/tests/mochitest/test_peerConnection_offerRequiresReceiveAudio.html +index 69d7e49..d68c078 100644 +--- a/dom/media/tests/mochitest/test_peerConnection_offerRequiresReceiveAudio.html ++++ b/dom/media/tests/mochitest/test_peerConnection_offerRequiresReceiveAudio.html +@@ -17,6 +17,8 @@ + + runTest(function() { + var test = new PeerConnectionTest(); ++ test.chain.remove('PC_LOCAL_CHECK_STATS'); ++ test.chain.remove('PC_REMOTE_CHECK_STATS'); + test.setOfferConstraints({ mandatory: { OfferToReceiveAudio: true } }); + test.run(); + }); +diff --git a/dom/media/tests/mochitest/test_peerConnection_offerRequiresReceiveVideo.html b/dom/media/tests/mochitest/test_peerConnection_offerRequiresReceiveVideo.html +index 5f1d0e5..0ecb0b7 100644 +--- a/dom/media/tests/mochitest/test_peerConnection_offerRequiresReceiveVideo.html ++++ b/dom/media/tests/mochitest/test_peerConnection_offerRequiresReceiveVideo.html +@@ -17,6 +17,8 @@ + + runTest(function() { + var test = new PeerConnectionTest(); ++ test.chain.remove('PC_LOCAL_CHECK_STATS'); ++ test.chain.remove('PC_REMOTE_CHECK_STATS'); + test.setOfferConstraints({ mandatory: { OfferToReceiveVideo: true } }); + test.run(); + }); +diff --git a/dom/media/tests/mochitest/test_peerConnection_offerRequiresReceiveVideoAudio.html b/dom/media/tests/mochitest/test_peerConnection_offerRequiresReceiveVideoAudio.html +index c3dea10..78eb0d4 100644 +--- a/dom/media/tests/mochitest/test_peerConnection_offerRequiresReceiveVideoAudio.html ++++ b/dom/media/tests/mochitest/test_peerConnection_offerRequiresReceiveVideoAudio.html +@@ -17,6 +17,8 @@ + + runTest(function() { + var test = new PeerConnectionTest(); ++ test.chain.remove('PC_LOCAL_CHECK_STATS'); ++ test.chain.remove('PC_REMOTE_CHECK_STATS'); + test.setOfferConstraints({ mandatory: { + OfferToReceiveVideo: true, + OfferToReceiveAudio: true +diff --git a/media/mtransport/nricectx.h b/media/mtransport/nricectx.h +index d1209a7..7350666 100644 +--- a/media/mtransport/nricectx.h ++++ b/media/mtransport/nricectx.h +@@ -196,6 +196,19 @@ class NrIceCtx { + RefPtr<NrIceMediaStream> CreateStream(const std::string& name, + int components); + ++ RefPtr<NrIceMediaStream> GetStream(size_t index) { ++ if (index < streams_.size()) { ++ return streams_[index]; ++ } ++ return nullptr; ++ } ++ ++ // Some might be null ++ size_t GetStreamCount() const ++ { ++ return streams_.size(); ++ } ++ + // The name of the ctx + const std::string& name() const { return name_; } + +diff --git a/media/mtransport/nricemediastream.cpp b/media/mtransport/nricemediastream.cpp +index 9e96cb5..d2b6429 100644 +--- a/media/mtransport/nricemediastream.cpp ++++ b/media/mtransport/nricemediastream.cpp +@@ -209,6 +209,7 @@ nsresult NrIceMediaStream::ParseAttributes(std::vector<std::string>& + return NS_ERROR_FAILURE; + } + ++ has_parsed_attrs_ = true; + return NS_OK; + } + +diff --git a/media/mtransport/nricemediastream.h b/media/mtransport/nricemediastream.h +index aba5fc3..2494ecf 100644 +--- a/media/mtransport/nricemediastream.h ++++ b/media/mtransport/nricemediastream.h +@@ -149,6 +149,7 @@ class NrIceMediaStream { + + // Parse remote attributes + nsresult ParseAttributes(std::vector<std::string>& candidates); ++ bool HasParsedAttributes() const { return has_parsed_attrs_; } + + // Parse trickle ICE candidate + nsresult ParseTrickleCandidate(const std::string& candidate); +@@ -204,7 +205,8 @@ class NrIceMediaStream { + name_(name), + components_(components), + stream_(nullptr), +- opaque_(nullptr) {} ++ opaque_(nullptr), ++ has_parsed_attrs_(false) {} + + DISALLOW_COPY_ASSIGN(NrIceMediaStream); + +@@ -214,6 +216,7 @@ class NrIceMediaStream { + const int components_; + nr_ice_media_stream *stream_; + ScopedDeletePtr<NrIceOpaque> opaque_; ++ bool has_parsed_attrs_; + }; + + +diff --git a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp +index ebcc17d..c70e3e4 100644 +--- a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp ++++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp +@@ -149,7 +149,8 @@ PRLogModuleInfo *signalingLogInfo() { + namespace sipcc { + + #ifdef MOZILLA_INTERNAL_API +-RTCStatsQuery::RTCStatsQuery(bool internal) : internalStats(internal) { ++RTCStatsQuery::RTCStatsQuery(bool internal) : internalStats(internal), ++ grabAllLevels(false) { + } + + RTCStatsQuery::~RTCStatsQuery() { +@@ -2037,32 +2038,8 @@ PeerConnectionImpl::BuildStatsQuery_m( + + query->iceCtx = mMedia->ice_ctx(); + +- // From the list of MediaPipelines, determine the set of NrIceMediaStreams +- // we are interested in. +- std::set<size_t> levelsToGrab; +- if (trackId) { +- for (size_t p = 0; p < query->pipelines.Length(); ++p) { +- size_t level = query->pipelines[p]->level(); +- MOZ_ASSERT(level); +- levelsToGrab.insert(level); +- } +- } else { +- // We want to grab all streams, so ignore the pipelines (this also ends up +- // grabbing DataChannel streams, which is what we want) +- for (size_t s = 0; s < mMedia->num_ice_media_streams(); ++s) { +- levelsToGrab.insert(s + 1); // mIceStreams is 0-indexed +- } +- } +- +- for (auto s = levelsToGrab.begin(); s != levelsToGrab.end(); ++s) { +- // TODO(bcampen@mozilla.com): I may need to revisit this for bundle. +- // (Bug 786234) +- RefPtr<NrIceMediaStream> temp(mMedia->ice_media_stream(*s - 1)); +- RefPtr<TransportFlow> flow(mMedia->GetTransportFlow(*s, false)); +- // flow can be null for unused levels, such as unused DataChannels +- if (temp && flow) { +- query->streams.AppendElement(temp); +- } ++ if (!trackId) { ++ query->grabAllLevels = true; + } + + return rv; +@@ -2103,6 +2080,9 @@ static void RecordIceStats_s( + bool internalStats, + DOMHighResTimeStamp now, + RTCStatsReportInternal* report) { ++ if (!mediaStream.HasParsedAttributes()) { ++ return; ++ } + + NS_ConvertASCIItoUTF16 componentId(mediaStream.name().c_str()); + if (internalStats) { +@@ -2292,20 +2272,32 @@ PeerConnectionImpl::ExecuteStatsQuery_s(RTCStatsQuery *query) { + break; + } + } ++ ++ if (!query->grabAllLevels) { ++ // If we're grabbing all levels, that means we want datachannels too, ++ // which don't have pipelines. ++ if (query->iceCtx->GetStream(p - 1)) { ++ RecordIceStats_s(*query->iceCtx->GetStream(p - 1), ++ query->internalStats, ++ query->now, ++ &(query->report)); ++ } ++ } + } + +- // Gather stats from ICE +- for (size_t s = 0; s != query->streams.Length(); ++s) { +- RecordIceStats_s(*query->streams[s], +- query->internalStats, +- query->now, +- &(query->report)); ++ if (query->grabAllLevels) { ++ for (size_t i = 0; i < query->iceCtx->GetStreamCount(); ++i) { ++ if (query->iceCtx->GetStream(i)) { ++ RecordIceStats_s(*query->iceCtx->GetStream(i), ++ query->internalStats, ++ query->now, ++ &(query->report)); ++ } ++ } + } + +- // NrIceCtx and NrIceMediaStream must be destroyed on STS, so it is not safe +- // to dispatch them back to main. +- // We clear streams first to maintain destruction order +- query->streams.Clear(); ++ // NrIceCtx must be destroyed on STS, so it is not safe ++ // to dispatch it back to main. + query->iceCtx = nullptr; + return NS_OK; + } +diff --git a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h +index 847085c..497230a 100644 +--- a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h ++++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h +@@ -174,7 +174,7 @@ class RTCStatsQuery { + bool internalStats; + nsTArray<mozilla::RefPtr<mozilla::MediaPipeline>> pipelines; + mozilla::RefPtr<NrIceCtx> iceCtx; +- nsTArray<mozilla::RefPtr<NrIceMediaStream>> streams; ++ bool grabAllLevels; + DOMHighResTimeStamp now; + }; + #endif // MOZILLA_INTERNAL_API +-- +2.2.1 + diff --git a/gnu/packages/patches/icecat-CVE-2015-2708-pt2.patch b/gnu/packages/patches/icecat-CVE-2015-2708-pt2.patch new file mode 100644 index 0000000000..9788806557 --- /dev/null +++ b/gnu/packages/patches/icecat-CVE-2015-2708-pt2.patch @@ -0,0 +1,284 @@ +From 272c1ba11fac7a9ceede2f4f737bb27b4bbcad71 Mon Sep 17 00:00:00 2001 +From: Steve Fink <sfink@mozilla.com> +Date: Thu, 19 Mar 2015 20:50:57 -0700 +Subject: [PATCH] Bug 1120655 - Suppress zone/compartment collection while + iterating. r=terrence, a=bkerensa + +--- + js/src/gc/Zone.h | 9 ++++---- + js/src/jsgc.cpp | 57 +++++++++++++++++++++++++++++++++++---------------- + js/src/jsgc.h | 11 +++++++++- + js/src/vm/Runtime.cpp | 1 + + js/src/vm/Runtime.h | 3 +++ + 5 files changed, 58 insertions(+), 23 deletions(-) + +diff --git a/js/src/gc/Zone.h b/js/src/gc/Zone.h +index e7f687a..dd058f0 100644 +--- a/js/src/gc/Zone.h ++++ b/js/src/gc/Zone.h +@@ -353,10 +353,11 @@ enum ZoneSelector { + + class ZonesIter { + private: ++ gc::AutoEnterIteration iterMarker; + JS::Zone **it, **end; + + public: +- ZonesIter(JSRuntime *rt, ZoneSelector selector) { ++ ZonesIter(JSRuntime *rt, ZoneSelector selector) : iterMarker(rt) { + it = rt->zones.begin(); + end = rt->zones.end(); + +@@ -427,13 +428,13 @@ struct CompartmentsInZoneIter + template<class ZonesIterT> + class CompartmentsIterT + { +- private: ++ gc::AutoEnterIteration iterMarker; + ZonesIterT zone; + mozilla::Maybe<CompartmentsInZoneIter> comp; + + public: + explicit CompartmentsIterT(JSRuntime *rt) +- : zone(rt) ++ : iterMarker(rt), zone(rt) + { + if (zone.done()) + comp.construct(); +@@ -442,7 +443,7 @@ class CompartmentsIterT + } + + CompartmentsIterT(JSRuntime *rt, ZoneSelector selector) +- : zone(rt, selector) ++ : iterMarker(rt), zone(rt, selector) + { + if (zone.done()) + comp.construct(); +diff --git a/js/src/jsgc.cpp b/js/src/jsgc.cpp +index 15c86c8..1dfe0ab 100644 +--- a/js/src/jsgc.cpp ++++ b/js/src/jsgc.cpp +@@ -2525,7 +2525,7 @@ ReleaseObservedTypes(JSRuntime* rt) + * arbitrary compartment in the zone. + */ + static void +-SweepCompartments(FreeOp *fop, Zone *zone, bool keepAtleastOne, bool lastGC) ++SweepCompartments(FreeOp *fop, Zone *zone, bool keepAtleastOne, bool destroyingRuntime) + { + JSRuntime *rt = zone->runtimeFromMainThread(); + JSDestroyCompartmentCallback callback = rt->destroyCompartmentCallback; +@@ -2543,7 +2543,7 @@ SweepCompartments(FreeOp *fop, Zone *zone, bool keepAtleastOne, bool lastGC) + * deleted and keepAtleastOne is true. + */ + bool dontDelete = read == end && !foundOne && keepAtleastOne; +- if ((!comp->marked && !dontDelete) || lastGC) { ++ if ((!comp->marked && !dontDelete) || destroyingRuntime) { + if (callback) + callback(fop, comp); + if (comp->principals) +@@ -2559,9 +2559,13 @@ SweepCompartments(FreeOp *fop, Zone *zone, bool keepAtleastOne, bool lastGC) + } + + static void +-SweepZones(FreeOp *fop, bool lastGC) ++SweepZones(FreeOp *fop, bool destroyingRuntime) + { + JSRuntime *rt = fop->runtime(); ++ MOZ_ASSERT_IF(destroyingRuntime, rt->numActiveZoneIters == 0); ++ if (rt->numActiveZoneIters) ++ return; ++ + JSZoneCallback callback = rt->destroyZoneCallback; + + /* Skip the atomsCompartment zone. */ +@@ -2576,17 +2580,17 @@ SweepZones(FreeOp* fop, bool lastGC) + + if (zone->wasGCStarted()) { + if ((zone->allocator.arenas.arenaListsAreEmpty() && !zone->hasMarkedCompartments()) || +- lastGC) ++ destroyingRuntime) + { + zone->allocator.arenas.checkEmptyFreeLists(); + if (callback) + callback(zone); +- SweepCompartments(fop, zone, false, lastGC); ++ SweepCompartments(fop, zone, false, destroyingRuntime); + JS_ASSERT(zone->compartments.empty()); + fop->delete_(zone); + continue; + } +- SweepCompartments(fop, zone, true, lastGC); ++ SweepCompartments(fop, zone, true, destroyingRuntime); + } + *write++ = zone; + } +@@ -3787,7 +3791,7 @@ EndSweepingZoneGroup(JSRuntime *rt) + } + + static void +-BeginSweepPhase(JSRuntime *rt, bool lastGC) ++BeginSweepPhase(JSRuntime *rt, bool destroyingRuntime) + { + /* + * Sweep phase. +@@ -3804,7 +3808,7 @@ BeginSweepPhase(JSRuntime *rt, bool lastGC) + gcstats::AutoPhase ap(rt->gcStats, gcstats::PHASE_SWEEP); + + #ifdef JS_THREADSAFE +- rt->gcSweepOnBackgroundThread = !lastGC && rt->useHelperThreads(); ++ rt->gcSweepOnBackgroundThread = !destroyingRuntime && rt->useHelperThreads(); + #endif + + #ifdef DEBUG +@@ -3903,12 +3907,12 @@ SweepPhase(JSRuntime *rt, SliceBudget &sliceBudget) + } + + static void +-EndSweepPhase(JSRuntime *rt, JSGCInvocationKind gckind, bool lastGC) ++EndSweepPhase(JSRuntime *rt, JSGCInvocationKind gckind, bool destroyingRuntime) + { + gcstats::AutoPhase ap(rt->gcStats, gcstats::PHASE_SWEEP); + FreeOp fop(rt, rt->gcSweepOnBackgroundThread); + +- JS_ASSERT_IF(lastGC, !rt->gcSweepOnBackgroundThread); ++ JS_ASSERT_IF(destroyingRuntime, !rt->gcSweepOnBackgroundThread); + + JS_ASSERT(rt->gcMarker.isDrained()); + rt->gcMarker.stop(); +@@ -3959,8 +3963,8 @@ EndSweepPhase(JSRuntime *rt, JSGCInvocationKind gckind, bool lastGC) + * This removes compartments from rt->compartment, so we do it last to make + * sure we don't miss sweeping any compartments. + */ +- if (!lastGC) +- SweepZones(&fop, lastGC); ++ if (!destroyingRuntime) ++ SweepZones(&fop, destroyingRuntime); + + if (!rt->gcSweepOnBackgroundThread) { + /* +@@ -4001,8 +4005,8 @@ EndSweepPhase(JSRuntime *rt, JSGCInvocationKind gckind, bool lastGC) + rt->freeLifoAlloc.freeAll(); + + /* Ensure the compartments get swept if it's the last GC. */ +- if (lastGC) +- SweepZones(&fop, lastGC); ++ if (destroyingRuntime) ++ SweepZones(&fop, destroyingRuntime); + } + + for (ZonesIter zone(rt, WithAtoms); !zone.done(); zone.next()) { +@@ -4339,7 +4343,7 @@ IncrementalCollectSlice(JSRuntime *rt, + AutoCopyFreeListToArenasForGC copy(rt); + AutoGCSlice slice(rt); + +- bool lastGC = (reason == JS::gcreason::DESTROY_RUNTIME); ++ bool destroyingRuntime = (reason == JS::gcreason::DESTROY_RUNTIME); + + gc::State initialState = rt->gcIncrementalState; + +@@ -4384,7 +4388,7 @@ IncrementalCollectSlice(JSRuntime *rt, + return; + } + +- if (!lastGC) ++ if (!destroyingRuntime) + PushZealSelectedObjects(rt); + + rt->gcIncrementalState = MARK; +@@ -4426,7 +4430,7 @@ IncrementalCollectSlice(JSRuntime *rt, + * This runs to completion, but we don't continue if the budget is + * now exhasted. + */ +- BeginSweepPhase(rt, lastGC); ++ BeginSweepPhase(rt, destroyingRuntime); + if (sliceBudget.isOverBudget()) + break; + +@@ -4445,7 +4449,7 @@ IncrementalCollectSlice(JSRuntime *rt, + if (!finished) + break; + +- EndSweepPhase(rt, gckind, lastGC); ++ EndSweepPhase(rt, gckind, destroyingRuntime); + + if (rt->gcSweepOnBackgroundThread) + rt->gcHelperThread.startBackgroundSweep(gckind == GC_SHRINK); +@@ -5386,3 +5390,20 @@ JS::AutoAssertNoGC::~AutoAssertNoGC() + MOZ_ASSERT(gcNumber == runtime->gcNumber, "GC ran inside an AutoAssertNoGC scope."); + } + #endif ++ ++namespace js { ++namespace gc { ++ ++AutoEnterIteration::AutoEnterIteration(JSRuntime *rt_) : rt(rt_) ++{ ++ ++rt->numActiveZoneIters; ++} ++ ++AutoEnterIteration::~AutoEnterIteration() ++{ ++ MOZ_ASSERT(rt->numActiveZoneIters); ++ --rt->numActiveZoneIters; ++} ++ ++} /* namespace gc */ ++} /* namespace js */ +diff --git a/js/src/jsgc.h b/js/src/jsgc.h +index 825cff5..ca331c0 100644 +--- a/js/src/jsgc.h ++++ b/js/src/jsgc.h +@@ -1077,7 +1077,7 @@ MaybeVerifyBarriers(JSContext* cx, bool always = false) + /* + * Instances of this class set the |JSRuntime::suppressGC| flag for the duration + * that they are live. Use of this class is highly discouraged. Please carefully +- * read the comment in jscntxt.h above |suppressGC| and take all appropriate ++ * read the comment in vm/Runtime.h above |suppressGC| and take all appropriate + * precautions before instantiating this class. + */ + class AutoSuppressGC +@@ -1113,6 +1113,15 @@ class AutoEnterOOMUnsafeRegion + class AutoEnterOOMUnsafeRegion {}; + #endif /* DEBUG */ + ++/* Prevent compartments and zones from being collected during iteration. */ ++class AutoEnterIteration { ++ JSRuntime *rt; ++ ++ public: ++ AutoEnterIteration(JSRuntime *rt_); ++ ~AutoEnterIteration(); ++}; ++ + } /* namespace gc */ + + #ifdef DEBUG +diff --git a/js/src/vm/Runtime.cpp b/js/src/vm/Runtime.cpp +index bb5c8680..0d8c6cd 100644 +--- a/js/src/vm/Runtime.cpp ++++ b/js/src/vm/Runtime.cpp +@@ -195,6 +195,7 @@ JSRuntime::JSRuntime(JSRuntime *parentRuntime, JSUseHelperThreads useHelperThrea + gcShouldCleanUpEverything(false), + gcGrayBitsValid(false), + gcIsNeeded(0), ++ numActiveZoneIters(0), + gcStats(thisFromCtor()), + gcNumber(0), + gcStartNumber(0), +diff --git a/js/src/vm/Runtime.h b/js/src/vm/Runtime.h +index 5aeb924..ba4180e 100644 +--- a/js/src/vm/Runtime.h ++++ b/js/src/vm/Runtime.h +@@ -1061,6 +1061,9 @@ struct JSRuntime : public JS::shadow::Runtime, + */ + volatile uintptr_t gcIsNeeded; + ++ mozilla::Atomic<size_t, mozilla::ReleaseAcquire> numActiveZoneIters; ++ friend class js::gc::AutoEnterIteration; ++ + js::gcstats::Statistics gcStats; + + /* Incremented on every GC slice. */ +-- +2.2.1 + diff --git a/gnu/packages/patches/icecat-CVE-2015-2708-pt3.patch b/gnu/packages/patches/icecat-CVE-2015-2708-pt3.patch new file mode 100644 index 0000000000..f684804d0b --- /dev/null +++ b/gnu/packages/patches/icecat-CVE-2015-2708-pt3.patch @@ -0,0 +1,228 @@ +From 4dcbca8b3c26b451e1376cd1b7c88ab984a45b39 Mon Sep 17 00:00:00 2001 +From: Mats Palmgren <mats@mozilla.com> +Date: Tue, 14 Apr 2015 22:12:39 -0400 +Subject: [PATCH] Bug 1143299 - Make frame insertion methods deal with + aPrevFrame being on an overflow list. r=roc, a=bkerensa + +--- + layout/generic/nsBlockFrame.cpp | 18 ++++++++++++--- + layout/generic/nsBlockFrame.h | 14 ++++++++---- + layout/generic/nsContainerFrame.cpp | 41 +++++++++++++++++++--------------- + layout/tables/nsTableFrame.cpp | 2 ++ + layout/tables/nsTableRowFrame.cpp | 2 ++ + layout/tables/nsTableRowGroupFrame.cpp | 2 ++ + 6 files changed, 54 insertions(+), 25 deletions(-) + +diff --git a/layout/generic/nsBlockFrame.cpp b/layout/generic/nsBlockFrame.cpp +index a011bcf..70d5297 100644 +--- a/layout/generic/nsBlockFrame.cpp ++++ b/layout/generic/nsBlockFrame.cpp +@@ -1049,7 +1049,7 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext, + state.mOverflowTracker = &tracker; + + // Drain & handle pushed floats +- DrainPushedFloats(state); ++ DrainPushedFloats(); + nsOverflowAreas fcBounds; + nsReflowStatus fcStatus = NS_FRAME_COMPLETE; + ReflowPushedFloats(state, fcBounds, fcStatus); +@@ -4438,9 +4438,13 @@ nsBlockFrame::DrainSelfOverflowList() + * might push some of them on). Floats with placeholders in this block + * are reflowed by (nsBlockReflowState/nsLineLayout)::AddFloat, which + * also maintains these invariants. ++ * ++ * DrainSelfPushedFloats moves any pushed floats from this block's own ++ * PushedFloats list back into mFloats. DrainPushedFloats additionally ++ * moves frames from its prev-in-flow's PushedFloats list into mFloats. + */ + void +-nsBlockFrame::DrainPushedFloats(nsBlockReflowState& aState) ++nsBlockFrame::DrainSelfPushedFloats() + { + #ifdef DEBUG + // Between when we drain pushed floats and when we complete reflow, +@@ -4503,12 +4507,18 @@ nsBlockFrame::DrainPushedFloats(nsBlockReflowState& aState) + RemovePushedFloats()->Delete(presContext->PresShell()); + } + } ++} ++ ++void ++nsBlockFrame::DrainPushedFloats() ++{ ++ DrainSelfPushedFloats(); + + // After our prev-in-flow has completed reflow, it may have a pushed + // floats list, containing floats that we need to own. Take these. + nsBlockFrame* prevBlock = static_cast<nsBlockFrame*>(GetPrevInFlow()); + if (prevBlock) { +- AutoFrameListPtr list(presContext, prevBlock->RemovePushedFloats()); ++ AutoFrameListPtr list(PresContext(), prevBlock->RemovePushedFloats()); + if (list && list->NotEmpty()) { + mFloats.InsertFrames(this, nullptr, *list); + } +@@ -4711,6 +4721,7 @@ nsBlockFrame::AppendFrames(ChildListID aListID, + return nsContainerFrame::AppendFrames(aListID, aFrameList); + } + else if (kFloatList == aListID) { ++ DrainSelfPushedFloats(); // ensure the last frame is in mFloats + mFloats.AppendFrames(nullptr, aFrameList); + return NS_OK; + } +@@ -4757,6 +4768,7 @@ nsBlockFrame::InsertFrames(ChildListID aListID, + return nsContainerFrame::InsertFrames(aListID, aPrevFrame, aFrameList); + } + else if (kFloatList == aListID) { ++ DrainSelfPushedFloats(); // ensure aPrevFrame is in mFloats + mFloats.InsertFrames(this, aPrevFrame, aFrameList); + return NS_OK; + } +diff --git a/layout/generic/nsBlockFrame.h b/layout/generic/nsBlockFrame.h +index 1a6bb1e..07f7508 100644 +--- a/layout/generic/nsBlockFrame.h ++++ b/layout/generic/nsBlockFrame.h +@@ -533,10 +533,16 @@ protected: + return GetStateBits() & NS_BLOCK_HAS_OVERFLOW_OUT_OF_FLOWS; + } + +- /** grab pushed floats from this block's prevInFlow, and splice +- * them into this block's mFloats list. +- */ +- void DrainPushedFloats(nsBlockReflowState& aState); ++ /** ++ * Moves frames from our PushedFloats list back into our mFloats list. ++ */ ++ void DrainSelfPushedFloats(); ++ ++ /** ++ * First calls DrainSelfPushedFloats() then grabs pushed floats from this ++ * block's prev-in-flow, and splice them into this block's mFloats list too. ++ */ ++ void DrainPushedFloats(); + + /** Load all our floats into the float manager (without reflowing them). + * Assumes float manager is in our own coordinate system. +diff --git a/layout/generic/nsContainerFrame.cpp b/layout/generic/nsContainerFrame.cpp +index 76f0748..3ffcba7 100644 +--- a/layout/generic/nsContainerFrame.cpp ++++ b/layout/generic/nsContainerFrame.cpp +@@ -102,16 +102,18 @@ nsContainerFrame::AppendFrames(ChildListID aListID, + return NS_ERROR_INVALID_ARG; + } + } +- if (aFrameList.NotEmpty()) { +- mFrames.AppendFrames(this, aFrameList); + +- // Ask the parent frame to reflow me. +- if (aListID == kPrincipalList) +- { +- PresContext()->PresShell()-> +- FrameNeedsReflow(this, nsIPresShell::eTreeChange, +- NS_FRAME_HAS_DIRTY_CHILDREN); +- } ++ if (MOZ_UNLIKELY(aFrameList.IsEmpty())) { ++ return NS_OK; ++ } ++ ++ DrainSelfOverflowList(); // ensure the last frame is in mFrames ++ mFrames.AppendFrames(this, aFrameList); ++ ++ if (aListID != kNoReflowPrincipalList) { ++ PresContext()->PresShell()-> ++ FrameNeedsReflow(this, nsIPresShell::eTreeChange, ++ NS_FRAME_HAS_DIRTY_CHILDREN); + } + return NS_OK; + } +@@ -131,16 +133,19 @@ nsContainerFrame::InsertFrames(ChildListID aListID, + return NS_ERROR_INVALID_ARG; + } + } +- if (aFrameList.NotEmpty()) { +- // Insert frames after aPrevFrame +- mFrames.InsertFrames(this, aPrevFrame, aFrameList); + +- if (aListID == kPrincipalList) +- { +- PresContext()->PresShell()-> +- FrameNeedsReflow(this, nsIPresShell::eTreeChange, +- NS_FRAME_HAS_DIRTY_CHILDREN); +- } ++ if (MOZ_UNLIKELY(aFrameList.IsEmpty())) { ++ return NS_OK; ++ } ++ ++ DrainSelfOverflowList(); // ensure aPrevFrame is in mFrames ++ mFrames.InsertFrames(this, aPrevFrame, aFrameList); ++ ++ if (aListID != kNoReflowPrincipalList) { ++ PresContext()->PresShell()-> ++ FrameNeedsReflow(this, nsIPresShell::eTreeChange, ++ NS_FRAME_HAS_DIRTY_CHILDREN); ++ + } + return NS_OK; + } +diff --git a/layout/tables/nsTableFrame.cpp b/layout/tables/nsTableFrame.cpp +index 60613ba..44088da 100644 +--- a/layout/tables/nsTableFrame.cpp ++++ b/layout/tables/nsTableFrame.cpp +@@ -2232,6 +2232,7 @@ nsTableFrame::AppendFrames(ChildListID aListID, + InsertColGroups(startColIndex, + nsFrameList::Slice(mColGroups, f, f->GetNextSibling())); + } else if (IsRowGroup(display->mDisplay)) { ++ DrainSelfOverflowList(); // ensure the last frame is in mFrames + // Append the new row group frame to the sibling chain + mFrames.AppendFrame(nullptr, f); + +@@ -2404,6 +2405,7 @@ nsTableFrame::HomogenousInsertFrames(ChildListID aListID, + InsertColGroups(startColIndex, newColgroups); + } else if (IsRowGroup(display->mDisplay)) { + NS_ASSERTION(aListID == kPrincipalList, "unexpected child list"); ++ DrainSelfOverflowList(); // ensure aPrevFrame is in mFrames + // Insert the frames in the sibling chain + const nsFrameList::Slice& newRowGroups = + mFrames.InsertFrames(nullptr, aPrevFrame, aFrameList); +diff --git a/layout/tables/nsTableRowFrame.cpp b/layout/tables/nsTableRowFrame.cpp +index d1c493b..2351de3 100644 +--- a/layout/tables/nsTableRowFrame.cpp ++++ b/layout/tables/nsTableRowFrame.cpp +@@ -182,6 +182,7 @@ nsTableRowFrame::AppendFrames(ChildListID aListID, + { + NS_ASSERTION(aListID == kPrincipalList, "unexpected child list"); + ++ DrainSelfOverflowList(); // ensure the last frame is in mFrames + const nsFrameList::Slice& newCells = mFrames.AppendFrames(nullptr, aFrameList); + + // Add the new cell frames to the table +@@ -208,6 +209,7 @@ nsTableRowFrame::InsertFrames(ChildListID aListID, + NS_ASSERTION(aListID == kPrincipalList, "unexpected child list"); + NS_ASSERTION(!aPrevFrame || aPrevFrame->GetParent() == this, + "inserting after sibling frame with different parent"); ++ DrainSelfOverflowList(); // ensure aPrevFrame is in mFrames + //Insert Frames in the frame list + const nsFrameList::Slice& newCells = mFrames.InsertFrames(nullptr, aPrevFrame, aFrameList); + +diff --git a/layout/tables/nsTableRowGroupFrame.cpp b/layout/tables/nsTableRowGroupFrame.cpp +index 34aaf02..40b349b 100644 +--- a/layout/tables/nsTableRowGroupFrame.cpp ++++ b/layout/tables/nsTableRowGroupFrame.cpp +@@ -1389,6 +1389,7 @@ nsTableRowGroupFrame::AppendFrames(ChildListID aListID, + { + NS_ASSERTION(aListID == kPrincipalList, "unexpected child list"); + ++ DrainSelfOverflowList(); // ensure the last frame is in mFrames + ClearRowCursor(); + + // collect the new row frames in an array +@@ -1430,6 +1431,7 @@ nsTableRowGroupFrame::InsertFrames(ChildListID aListID, + NS_ASSERTION(!aPrevFrame || aPrevFrame->GetParent() == this, + "inserting after sibling frame with different parent"); + ++ DrainSelfOverflowList(); // ensure aPrevFrame is in mFrames + ClearRowCursor(); + + // collect the new row frames in an array +-- +2.2.1 + diff --git a/gnu/packages/patches/icecat-CVE-2015-2708-pt4.patch b/gnu/packages/patches/icecat-CVE-2015-2708-pt4.patch new file mode 100644 index 0000000000..eb2295f5ac --- /dev/null +++ b/gnu/packages/patches/icecat-CVE-2015-2708-pt4.patch @@ -0,0 +1,26 @@ +From e6082e031f0fa2a4a7a63ff124c6f22aeb75393d Mon Sep 17 00:00:00 2001 +From: Terrence Cole <terrence@mozilla.com> +Date: Fri, 10 Apr 2015 08:58:26 -0700 +Subject: [PATCH] Bug 1152177 - Make jsid and Value pre barriers symetrical. + r=jonco, a=abillings + +--- + js/src/gc/Barrier.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/js/src/gc/Barrier.h b/js/src/gc/Barrier.h +index 7efd785..9fc6bd0 100644 +--- a/js/src/gc/Barrier.h ++++ b/js/src/gc/Barrier.h +@@ -1062,6 +1062,8 @@ class BarrieredId + JS_ASSERT(obj == JSID_TO_OBJECT(value)); + } + } else if (JSID_IS_STRING(value)) { ++ if (StringIsPermanentAtom(JSID_TO_STRING(value))) ++ return; + JSString *str = JSID_TO_STRING(value); + JS::shadow::Zone *shadowZone = ShadowZoneOfStringFromAnyThread(str); + if (shadowZone->needsBarrier()) { +-- +2.2.1 + diff --git a/gnu/packages/patches/icecat-CVE-2015-2710-pt1.patch b/gnu/packages/patches/icecat-CVE-2015-2710-pt1.patch new file mode 100644 index 0000000000..4f119f6fe9 --- /dev/null +++ b/gnu/packages/patches/icecat-CVE-2015-2710-pt1.patch @@ -0,0 +1,199 @@ +From 0bd8486f4088c0845514986f61861688e0be011d Mon Sep 17 00:00:00 2001 +From: Cameron McCormack <cam@mcc.id.au> +Date: Mon, 6 Apr 2015 09:11:55 -0400 +Subject: [PATCH] Bug 1149542 - Part 1: Return early from SVG text layout if we + discover mPositions is not long enough. r=dholbert, a=sledru + +--- + layout/svg/SVGTextFrame.cpp | 59 +++++++++++++++++++++++++++++++-------------- + layout/svg/SVGTextFrame.h | 23 ++++++++++++------ + 2 files changed, 56 insertions(+), 26 deletions(-) + +diff --git a/layout/svg/SVGTextFrame.cpp b/layout/svg/SVGTextFrame.cpp +index 721e699..45327881 100644 +--- a/layout/svg/SVGTextFrame.cpp ++++ b/layout/svg/SVGTextFrame.cpp +@@ -14,6 +14,7 @@ + #include "gfxTypes.h" + #include "LookAndFeel.h" + #include "mozilla/gfx/2D.h" ++#include "mozilla/Likely.h" + #include "nsAlgorithm.h" + #include "nsBlockFrame.h" + #include "nsCaret.h" +@@ -4316,23 +4317,28 @@ ShouldStartRunAtIndex(const nsTArray<CharPosition>& aPositions, + return false; + } + +-uint32_t +-SVGTextFrame::ResolvePositions(nsIContent* aContent, +- uint32_t aIndex, +- bool aInTextPath, +- bool& aForceStartOfChunk, +- nsTArray<gfxPoint>& aDeltas) ++bool ++SVGTextFrame::ResolvePositionsForNode(nsIContent* aContent, ++ uint32_t& aIndex, ++ bool aInTextPath, ++ bool& aForceStartOfChunk, ++ nsTArray<gfxPoint>& aDeltas) + { + if (aContent->IsNodeOfType(nsINode::eTEXT)) { + // We found a text node. + uint32_t length = static_cast<nsTextNode*>(aContent)->TextLength(); + if (length) { ++ uint32_t end = aIndex + length; ++ if (MOZ_UNLIKELY(end > mPositions.Length())) { ++ MOZ_ASSERT_UNREACHABLE("length of mPositions does not match characters " ++ "found by iterating content"); ++ return false; ++ } + if (aForceStartOfChunk) { + // Note this character as starting a new anchored chunk. + mPositions[aIndex].mStartOfChunk = true; + aForceStartOfChunk = false; + } +- uint32_t end = aIndex + length; + while (aIndex < end) { + // Record whether each of these characters should start a new rendered + // run. That is always the case for characters on a text path. +@@ -4345,18 +4351,23 @@ SVGTextFrame::ResolvePositions(nsIContent* aContent, + aIndex++; + } + } +- return aIndex; ++ return true; + } + + // Skip past elements that aren't text content elements. + if (!IsTextContentElement(aContent)) { +- return aIndex; ++ return true; + } + + if (aContent->Tag() == nsGkAtoms::textPath) { + // <textPath> elements are as if they are specified with x="0" y="0", but + // only if they actually have some text content. + if (HasTextContent(aContent)) { ++ if (MOZ_UNLIKELY(aIndex >= mPositions.Length())) { ++ MOZ_ASSERT_UNREACHABLE("length of mPositions does not match characters " ++ "found by iterating content"); ++ return false; ++ } + mPositions[aIndex].mPosition = gfxPoint(); + mPositions[aIndex].mStartOfChunk = true; + } +@@ -4376,8 +4387,14 @@ SVGTextFrame::ResolvePositions(nsIContent* aContent, + rotate = &animatedRotate->GetAnimValue(); + } + +- uint32_t count = GetTextContentLength(aContent); + bool percentages = false; ++ uint32_t count = GetTextContentLength(aContent); ++ ++ if (MOZ_UNLIKELY(aIndex + count > mPositions.Length())) { ++ MOZ_ASSERT_UNREACHABLE("length of mPositions does not match characters " ++ "found by iterating content"); ++ return false; ++ } + + // New text anchoring chunks start at each character assigned a position + // with x="" or y="", or if we forced one with aForceStartOfChunk due to +@@ -4456,8 +4473,11 @@ SVGTextFrame::ResolvePositions(nsIContent* aContent, + for (nsIContent* child = aContent->GetFirstChild(); + child; + child = child->GetNextSibling()) { +- aIndex = ResolvePositions(child, aIndex, inTextPath, aForceStartOfChunk, +- aDeltas); ++ bool ok = ResolvePositionsForNode(child, aIndex, inTextPath, ++ aForceStartOfChunk, aDeltas); ++ if (!ok) { ++ return false; ++ } + } + + if (aContent->Tag() == nsGkAtoms::textPath) { +@@ -4465,7 +4485,7 @@ SVGTextFrame::ResolvePositions(nsIContent* aContent, + aForceStartOfChunk = true; + } + +- return aIndex; ++ return true; + } + + bool +@@ -4501,8 +4521,10 @@ SVGTextFrame::ResolvePositions(nsTArray<gfxPoint>& aDeltas, + + // Recurse over the content and fill in character positions as we go. + bool forceStartOfChunk = false; +- return ResolvePositions(mContent, 0, aRunPerGlyph, +- forceStartOfChunk, aDeltas) != 0; ++ index = 0; ++ bool ok = ResolvePositionsForNode(mContent, index, aRunPerGlyph, ++ forceStartOfChunk, aDeltas); ++ return ok && index > 0; + } + + void +@@ -4958,9 +4980,10 @@ SVGTextFrame::DoGlyphPositioning() + // Get the x, y, dx, dy, rotate values for the subtree. + nsTArray<gfxPoint> deltas; + if (!ResolvePositions(deltas, adjustingTextLength)) { +- // If ResolvePositions returned false, it means that there were some +- // characters in the DOM but none of them are displayed. Clear out +- // mPositions so that we don't attempt to do any painting later. ++ // If ResolvePositions returned false, it means either there were some ++ // characters in the DOM but none of them are displayed, or there was ++ // an error in processing mPositions. Clear out mPositions so that we don't ++ // attempt to do any painting later. + mPositions.Clear(); + return; + } +diff --git a/layout/svg/SVGTextFrame.h b/layout/svg/SVGTextFrame.h +index 48951f7..912af8b 100644 +--- a/layout/svg/SVGTextFrame.h ++++ b/layout/svg/SVGTextFrame.h +@@ -505,15 +505,18 @@ private: + * Recursive helper for ResolvePositions below. + * + * @param aContent The current node. +- * @param aIndex The current character index. ++ * @param aIndex (in/out) The current character index. + * @param aInTextPath Whether we are currently under a <textPath> element. +- * @param aForceStartOfChunk Whether the next character we find should start a +- * new anchored chunk. +- * @return The character index we got up to. ++ * @param aForceStartOfChunk (in/out) Whether the next character we find ++ * should start a new anchored chunk. ++ * @param aDeltas (in/out) Receives the resolved dx/dy values for each ++ * character. ++ * @return false if we discover that mPositions did not have enough ++ * elements; true otherwise. + */ +- uint32_t ResolvePositions(nsIContent* aContent, uint32_t aIndex, +- bool aInTextPath, bool& aForceStartOfChunk, +- nsTArray<gfxPoint>& aDeltas); ++ bool ResolvePositionsForNode(nsIContent* aContent, uint32_t& aIndex, ++ bool aInTextPath, bool& aForceStartOfChunk, ++ nsTArray<gfxPoint>& aDeltas); + + /** + * Initializes mPositions with character position information based on +@@ -521,9 +524,13 @@ private: + * was not given for that character. Also fills aDeltas with values based on + * dx/dy attributes. + * ++ * @param aDeltas (in/out) Receives the resolved dx/dy values for each ++ * character. + * @param aRunPerGlyph Whether mPositions should record that a new run begins + * at each glyph. +- * @return True if we recorded any positions. ++ * @return false if we did not record any positions (due to having no ++ * displayed characters) or if we discover that mPositions did not have ++ * enough elements; true otherwise. + */ + bool ResolvePositions(nsTArray<gfxPoint>& aDeltas, bool aRunPerGlyph); + +-- +2.2.1 + diff --git a/gnu/packages/patches/icecat-CVE-2015-2710-pt2.patch b/gnu/packages/patches/icecat-CVE-2015-2710-pt2.patch new file mode 100644 index 0000000000..26a10ca2e4 --- /dev/null +++ b/gnu/packages/patches/icecat-CVE-2015-2710-pt2.patch @@ -0,0 +1,64 @@ +From f7c0070831e72735c43beb426ac0c2ce33403f4f Mon Sep 17 00:00:00 2001 +From: Cameron McCormack <cam@mcc.id.au> +Date: Mon, 6 Apr 2015 09:12:06 -0400 +Subject: [PATCH] Bug 1149542 - Part 2: Track undisplayed characters before + empty text frames properly. r=dholbert, a=sledru + +--- + layout/svg/SVGTextFrame.cpp | 29 ++++++++++++++++------------- + 1 file changed, 16 insertions(+), 13 deletions(-) + +diff --git a/layout/svg/SVGTextFrame.cpp b/layout/svg/SVGTextFrame.cpp +index 45327881..9d331b8 100644 +--- a/layout/svg/SVGTextFrame.cpp ++++ b/layout/svg/SVGTextFrame.cpp +@@ -290,22 +290,25 @@ GetNonEmptyTextFrameAndNode(nsIFrame* aFrame, + nsTextNode*& aTextNode) + { + nsTextFrame* text = do_QueryFrame(aFrame); +- if (!text) { +- return false; +- } ++ bool isNonEmptyTextFrame = text && text->GetContentLength() != 0; + +- nsIContent* content = text->GetContent(); +- NS_ASSERTION(content && content->IsNodeOfType(nsINode::eTEXT), +- "unexpected content type for nsTextFrame"); ++ if (isNonEmptyTextFrame) { ++ nsIContent* content = text->GetContent(); ++ NS_ASSERTION(content && content->IsNodeOfType(nsINode::eTEXT), ++ "unexpected content type for nsTextFrame"); + +- nsTextNode* node = static_cast<nsTextNode*>(content); +- if (node->TextLength() == 0) { +- return false; ++ nsTextNode* node = static_cast<nsTextNode*>(content); ++ MOZ_ASSERT(node->TextLength() != 0, ++ "frame's GetContentLength() should be 0 if the text node " ++ "has no content"); ++ ++ aTextFrame = text; ++ aTextNode = node; + } + +- aTextFrame = text; +- aTextNode = node; +- return true; ++ MOZ_ASSERT(IsNonEmptyTextFrame(aFrame) == isNonEmptyTextFrame, ++ "our logic should agree with IsNonEmptyTextFrame"); ++ return isNonEmptyTextFrame; + } + + /** +@@ -1298,7 +1301,7 @@ GetUndisplayedCharactersBeforeFrame(nsTextFrame* aFrame) + /** + * Traverses the nsTextFrames for an SVGTextFrame and records a + * TextNodeCorrespondenceProperty on each for the number of undisplayed DOM +- * characters between each frame. This is done by iterating simultaenously ++ * characters between each frame. This is done by iterating simultaneously + * over the nsTextNodes and nsTextFrames and noting when nsTextNodes (or + * parts of them) are skipped when finding the next nsTextFrame. + */ +-- +2.2.1 + diff --git a/gnu/packages/patches/icecat-CVE-2015-2710-pt3.patch b/gnu/packages/patches/icecat-CVE-2015-2710-pt3.patch new file mode 100644 index 0000000000..6759506213 --- /dev/null +++ b/gnu/packages/patches/icecat-CVE-2015-2710-pt3.patch @@ -0,0 +1,50 @@ +From 2cda46e6158a459b56b392c8e389b055fdf740ca Mon Sep 17 00:00:00 2001 +From: Ryan VanderMeulen <ryanvm@gmail.com> +Date: Mon, 6 Apr 2015 22:59:41 -0400 +Subject: [PATCH] Bug 1149542 - Replace MOZ_ASSERT_UNREACHABLE with MOZ_ASSERT. + r=dholbert, a=bustage + +--- + layout/svg/SVGTextFrame.cpp | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/layout/svg/SVGTextFrame.cpp b/layout/svg/SVGTextFrame.cpp +index 9d331b8..e7b7275 100644 +--- a/layout/svg/SVGTextFrame.cpp ++++ b/layout/svg/SVGTextFrame.cpp +@@ -4333,8 +4333,8 @@ SVGTextFrame::ResolvePositionsForNode(nsIContent* aContent, + if (length) { + uint32_t end = aIndex + length; + if (MOZ_UNLIKELY(end > mPositions.Length())) { +- MOZ_ASSERT_UNREACHABLE("length of mPositions does not match characters " +- "found by iterating content"); ++ MOZ_ASSERT(false, "length of mPositions does not match characters " ++ "found by iterating content"); + return false; + } + if (aForceStartOfChunk) { +@@ -4367,8 +4367,8 @@ SVGTextFrame::ResolvePositionsForNode(nsIContent* aContent, + // only if they actually have some text content. + if (HasTextContent(aContent)) { + if (MOZ_UNLIKELY(aIndex >= mPositions.Length())) { +- MOZ_ASSERT_UNREACHABLE("length of mPositions does not match characters " +- "found by iterating content"); ++ MOZ_ASSERT(false, "length of mPositions does not match characters " ++ "found by iterating content"); + return false; + } + mPositions[aIndex].mPosition = gfxPoint(); +@@ -4394,8 +4394,8 @@ SVGTextFrame::ResolvePositionsForNode(nsIContent* aContent, + uint32_t count = GetTextContentLength(aContent); + + if (MOZ_UNLIKELY(aIndex + count > mPositions.Length())) { +- MOZ_ASSERT_UNREACHABLE("length of mPositions does not match characters " +- "found by iterating content"); ++ MOZ_ASSERT(false, "length of mPositions does not match characters " ++ "found by iterating content"); + return false; + } + +-- +2.2.1 + diff --git a/gnu/packages/patches/icecat-CVE-2015-2713-pt1.patch b/gnu/packages/patches/icecat-CVE-2015-2713-pt1.patch new file mode 100644 index 0000000000..9e52759ae8 --- /dev/null +++ b/gnu/packages/patches/icecat-CVE-2015-2713-pt1.patch @@ -0,0 +1,102 @@ +From 2b1c90da3e849e1c9d7457658290aa8eb01d0fa9 Mon Sep 17 00:00:00 2001 +From: Mats Palmgren <mats@mozilla.com> +Date: Thu, 16 Apr 2015 09:04:19 +0000 +Subject: [PATCH] Bug 1153478 - Part 1: Add nsInlineFrame::StealFrame and make + it deal with being called on the wrong parent for aChild (due to lazy + reparenting). r=roc, a=sledru + +--- + layout/generic/nsContainerFrame.cpp | 7 +++---- + layout/generic/nsInlineFrame.cpp | 39 +++++++++++++++++++++++++++++++++++++ + layout/generic/nsInlineFrame.h | 4 +++- + 3 files changed, 45 insertions(+), 5 deletions(-) + +diff --git a/layout/generic/nsContainerFrame.cpp b/layout/generic/nsContainerFrame.cpp +index 3ffcba7..34878af 100644 +--- a/layout/generic/nsContainerFrame.cpp ++++ b/layout/generic/nsContainerFrame.cpp +@@ -172,13 +172,12 @@ nsContainerFrame::RemoveFrame(ChildListID aListID, + nsIPresShell* shell = PresContext()->PresShell(); + nsContainerFrame* lastParent = nullptr; + while (aOldFrame) { +- //XXXfr probably should use StealFrame here. I'm not sure if we need to +- // check the overflow lists atm, but we'll need a prescontext lookup +- // for overflow containers once we can split abspos elements with +- // inline containing blocks. + nsIFrame* oldFrameNextContinuation = aOldFrame->GetNextContinuation(); + nsContainerFrame* parent = + static_cast<nsContainerFrame*>(aOldFrame->GetParent()); ++ // Please note that 'parent' may not actually be where 'aOldFrame' lives. ++ // We really MUST use StealFrame() and nothing else here. ++ // @see nsInlineFrame::StealFrame for details. + parent->StealFrame(aOldFrame, true); + aOldFrame->Destroy(); + aOldFrame = oldFrameNextContinuation; +diff --git a/layout/generic/nsInlineFrame.cpp b/layout/generic/nsInlineFrame.cpp +index 526041e..a392a15 100644 +--- a/layout/generic/nsInlineFrame.cpp ++++ b/layout/generic/nsInlineFrame.cpp +@@ -172,6 +172,45 @@ nsInlineFrame::PeekOffsetCharacter(bool aForward, int32_t* aOffset, + return CONTINUE; + } + ++nsresult ++nsInlineFrame::StealFrame(nsIFrame* aChild, ++ bool aForceNormal) ++{ ++ if (aChild->HasAnyStateBits(NS_FRAME_IS_OVERFLOW_CONTAINER) && ++ !aForceNormal) { ++ return nsContainerFrame::StealFrame(aChild, aForceNormal); ++ } ++ ++ nsInlineFrame* parent = this; ++ bool removed = false; ++ do { ++ removed = parent->mFrames.StartRemoveFrame(aChild); ++ if (removed) { ++ break; ++ } ++ ++ // We didn't find the child in our principal child list. ++ // Maybe it's on the overflow list? ++ nsFrameList* frameList = parent->GetOverflowFrames(); ++ if (frameList) { ++ removed = frameList->ContinueRemoveFrame(aChild); ++ if (frameList->IsEmpty()) { ++ parent->DestroyOverflowList(); ++ } ++ if (removed) { ++ break; ++ } ++ } ++ ++ // Due to our "lazy reparenting" optimization 'aChild' might not actually ++ // be on any of our child lists, but instead in one of our next-in-flows. ++ parent = static_cast<nsInlineFrame*>(parent->GetNextInFlow()); ++ } while (parent); ++ ++ MOZ_ASSERT(removed, "nsInlineFrame::StealFrame: can't find aChild"); ++ return removed ? NS_OK : NS_ERROR_UNEXPECTED; ++} ++ + void + nsInlineFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, + const nsRect& aDirtyRect, +diff --git a/layout/generic/nsInlineFrame.h b/layout/generic/nsInlineFrame.h +index 1a9899e..3e49241 100644 +--- a/layout/generic/nsInlineFrame.h ++++ b/layout/generic/nsInlineFrame.h +@@ -61,7 +61,9 @@ public: + + virtual FrameSearchResult PeekOffsetCharacter(bool aForward, int32_t* aOffset, + bool aRespectClusters = true) MOZ_OVERRIDE; +- ++ ++ virtual nsresult StealFrame(nsIFrame* aChild, bool aForceNormal) MOZ_OVERRIDE; ++ + // nsIHTMLReflow overrides + virtual void AddInlineMinWidth(nsRenderingContext *aRenderingContext, + InlineMinWidthData *aData) MOZ_OVERRIDE; +-- +2.2.1 + diff --git a/gnu/packages/patches/icecat-CVE-2015-2713-pt2.patch b/gnu/packages/patches/icecat-CVE-2015-2713-pt2.patch new file mode 100644 index 0000000000..b1f2adde47 --- /dev/null +++ b/gnu/packages/patches/icecat-CVE-2015-2713-pt2.patch @@ -0,0 +1,47 @@ +From d84ed2990dd2304fef752213f1908280ff24d77c Mon Sep 17 00:00:00 2001 +From: Mats Palmgren <mats@mozilla.com> +Date: Thu, 16 Apr 2015 09:04:19 +0000 +Subject: [PATCH] Bug 1153478 - Part 2: Remove useless assertions. r=roc, + a=sledru + +--- + layout/generic/nsContainerFrame.cpp | 1 - + layout/generic/nsInlineFrame.cpp | 3 --- + 2 files changed, 4 deletions(-) + +diff --git a/layout/generic/nsContainerFrame.cpp b/layout/generic/nsContainerFrame.cpp +index 34878af..b95bddd 100644 +--- a/layout/generic/nsContainerFrame.cpp ++++ b/layout/generic/nsContainerFrame.cpp +@@ -1516,7 +1516,6 @@ nsContainerFrame::DrainSelfOverflowList() + { + AutoFrameListPtr overflowFrames(PresContext(), StealOverflowFrames()); + if (overflowFrames) { +- NS_ASSERTION(mFrames.NotEmpty(), "overflow list w/o frames"); + mFrames.AppendFrames(nullptr, *overflowFrames); + return true; + } +diff --git a/layout/generic/nsInlineFrame.cpp b/layout/generic/nsInlineFrame.cpp +index a392a15..e0922bb 100644 +--- a/layout/generic/nsInlineFrame.cpp ++++ b/layout/generic/nsInlineFrame.cpp +@@ -449,7 +449,6 @@ nsInlineFrame::DrainSelfOverflowListInternal(DrainFlags aFlags, + { + AutoFrameListPtr overflowFrames(PresContext(), StealOverflowFrames()); + if (overflowFrames) { +- NS_ASSERTION(mFrames.NotEmpty(), "overflow list w/o frames"); + // The frames on our own overflowlist may have been pushed by a + // previous lazilySetParentPointer Reflow so we need to ensure the + // correct parent pointer. This is sometimes skipped by Reflow. +@@ -1157,8 +1156,6 @@ nsFirstLineFrame::DrainSelfOverflowList() + { + AutoFrameListPtr overflowFrames(PresContext(), StealOverflowFrames()); + if (overflowFrames) { +- NS_ASSERTION(mFrames.NotEmpty(), "overflow list w/o frames"); +- + bool result = !overflowFrames->IsEmpty(); + const nsFrameList::Slice& newFrames = + mFrames.AppendFrames(nullptr, *overflowFrames); +-- +2.2.1 + diff --git a/gnu/packages/patches/icecat-CVE-2015-2716.patch b/gnu/packages/patches/icecat-CVE-2015-2716.patch new file mode 100644 index 0000000000..ce036a0921 --- /dev/null +++ b/gnu/packages/patches/icecat-CVE-2015-2716.patch @@ -0,0 +1,62 @@ +From 9dcb4563847cb6e2a8112dca03d2684907f96313 Mon Sep 17 00:00:00 2001 +From: Eric Rahm <erahm@mozilla.com> +Date: Fri, 10 Apr 2015 15:50:23 -0700 +Subject: [PATCH] Bug 1140537 - Sanity check size calculations. r=peterv, + a=abillings + +--- + parser/expat/lib/xmlparse.c | 23 +++++++++++++++++++++-- + 1 file changed, 21 insertions(+), 2 deletions(-) + +diff --git a/parser/expat/lib/xmlparse.c b/parser/expat/lib/xmlparse.c +index 70acf1a..436b735 100644 +--- a/parser/expat/lib/xmlparse.c ++++ b/parser/expat/lib/xmlparse.c +@@ -1651,6 +1651,12 @@ XML_ParseBuffer(XML_Parser parser, int len, int isFinal) + void * XMLCALL + XML_GetBuffer(XML_Parser parser, int len) + { ++/* BEGIN MOZILLA CHANGE (sanity check len) */ ++ if (len < 0) { ++ errorCode = XML_ERROR_NO_MEMORY; ++ return NULL; ++ } ++/* END MOZILLA CHANGE */ + switch (ps_parsing) { + case XML_SUSPENDED: + errorCode = XML_ERROR_SUSPENDED; +@@ -1662,8 +1668,13 @@ XML_GetBuffer(XML_Parser parser, int len) + } + + if (len > bufferLim - bufferEnd) { +- /* FIXME avoid integer overflow */ + int neededSize = len + (int)(bufferEnd - bufferPtr); ++/* BEGIN MOZILLA CHANGE (sanity check neededSize) */ ++ if (neededSize < 0) { ++ errorCode = XML_ERROR_NO_MEMORY; ++ return NULL; ++ } ++/* END MOZILLA CHANGE */ + #ifdef XML_CONTEXT_BYTES + int keep = (int)(bufferPtr - buffer); + +@@ -1692,7 +1703,15 @@ XML_GetBuffer(XML_Parser parser, int len) + bufferSize = INIT_BUFFER_SIZE; + do { + bufferSize *= 2; +- } while (bufferSize < neededSize); ++/* BEGIN MOZILLA CHANGE (prevent infinite loop on overflow) */ ++ } while (bufferSize < neededSize && bufferSize > 0); ++/* END MOZILLA CHANGE */ ++/* BEGIN MOZILLA CHANGE (sanity check bufferSize) */ ++ if (bufferSize <= 0) { ++ errorCode = XML_ERROR_NO_MEMORY; ++ return NULL; ++ } ++/* END MOZILLA CHANGE */ + newBuf = (char *)MALLOC(bufferSize); + if (newBuf == 0) { + errorCode = XML_ERROR_NO_MEMORY; +-- +2.2.1 + diff --git a/gnu/packages/patches/librep-rules.mk.patch b/gnu/packages/patches/librep-rules.mk.patch deleted file mode 100644 index 4ea2a3ae1b..0000000000 --- a/gnu/packages/patches/librep-rules.mk.patch +++ /dev/null @@ -1,30 +0,0 @@ -rules.mk.in: Don't set prefix, datadir, libdir, datarootdir and repdir. -rules.mk.in: Use pkg-config to get the absolute path for repcommonexedir. - -Merged into upstream: <https://github.com/SawfishWM/librep/commit/a1f2db721aa5055e90f6a76fde625946340ed8cf>. - ---- librep_0.92.4.orig/rules.mk.in 2015-01-31 23:21:59.614751496 +0800 -+++ librep_0.92.4/rules.mk.in 2015-02-02 18:56:55.097171657 +0800 -@@ -1,18 +1,10 @@ - # rules.mk - --prefix=@prefix@ --datadir=@datadir@ --libdir=@libdir@ -+repcommonexecdir?=$(shell pkg-config --variable=repcommonexecdir librep) -+rpath_repcommonexecdir:=$(repcommonexecdir) - --# shut up configure --datarootdir=@datarootdir@ -- --repdir=@repdir@ --repcommonexecdir=@repcommonexecdir@ --rpath_repcommonexecdir=@repcommonexecdir@ -- --rep_LIBTOOL=$(repcommonexecdir)/libtool --tag CC --rep_INSTALL_ALIASES=$(repcommonexecdir)/install-aliases -+rep_LIBTOOL:=$(repcommonexecdir)/libtool --tag CC -+rep_INSTALL_ALIASES:=$(repcommonexecdir)/install-aliases - - # use this like: - # foo.la : foo.lo bar.lo diff --git a/gnu/packages/patches/libtool-skip-tests.patch b/gnu/packages/patches/libtool-skip-tests2.patch index 9191d40487..c9d61e3b41 100644 --- a/gnu/packages/patches/libtool-skip-tests.patch +++ b/gnu/packages/patches/libtool-skip-tests2.patch @@ -1,8 +1,4 @@ -Because our GCC 'lib' spec automatically adds '-rpath' for each '-L' -and a couple more '-rpath, there are two test failures: -one in demo.test, and one in destdir.at. Disable these. - -Also skip the nopic test on ARM and MIPS systems. +Skip the nopic test on ARM and MIPS systems. --- libtool-2.4.6/tests/demo.at.orig 2015-01-16 13:52:04.000000000 -0500 +++ libtool-2.4.6/tests/demo.at 2015-02-16 10:48:51.435851966 -0500 @@ -35,21 +31,3 @@ Also skip the nopic test on ARM and MIPS systems. # These hosts cannot use non-PIC shared libs exit 77 ;; *-solaris*|*-sunos*) -@@ -9298,7 +9298,7 @@ - #AT_START_34 - at_fn_group_banner 34 'demo.at:548' \ - "hardcoding library path" " " 4 --at_xfail=no -+at_xfail=yes - test no = "$ACLOCAL" && at_xfail=yes - test no = "$AUTOHEADER" && at_xfail=yes - test no = "$AUTOMAKE" && at_xfail=yes -@@ -27243,7 +27243,7 @@ - #AT_START_98 - at_fn_group_banner 98 'destdir.at:75' \ - "DESTDIR with in-package deplibs" " " 8 --at_xfail=no -+at_xfail=yes - eval `$LIBTOOL --config | $GREP '^fast_install='` - case $fast_install in no) :;; *) false;; esac && at_xfail=yes - ( diff --git a/gnu/packages/patches/lirc-localstatedir.patch b/gnu/packages/patches/lirc-localstatedir.patch new file mode 100644 index 0000000000..43a41a743f --- /dev/null +++ b/gnu/packages/patches/lirc-localstatedir.patch @@ -0,0 +1,13 @@ +Do not try to create $localstatedir as we cannot do this when it is /var. + +--- lirc-0.9.2a/daemons/Makefile.in ++++ lirc-0.9.2a/daemons/Makefile.in +@@ -790,9 +790,6 @@ + uninstall-local uninstall-sbinPROGRAMS + + +-install-exec-local: +- test -d $(DESTDIR)$(varrundir)/$(PACKAGE) \ +- || mkdir -p $(DESTDIR)$(varrundir)/$(PACKAGE) + uninstall-local: + -$(RM) $(DESTDIR)$(varrundir)/$(PACKAGE)/lircd diff --git a/gnu/packages/patches/mplayer2-theora-fix.patch b/gnu/packages/patches/mplayer2-theora-fix.patch new file mode 100644 index 0000000000..982db5f57c --- /dev/null +++ b/gnu/packages/patches/mplayer2-theora-fix.patch @@ -0,0 +1,286 @@ +Fix libtheora linking issue with modern theora versions. + +Adapted from: +http://git.buildroot.net/buildroot/commit/?id=46b71cb0be27c0e6b7c93afb49fc80779bf310e3 + +--- a/libmpcodecs/vd_theora.c ++++ b/libmpcodecs/vd_theora.c +@@ -39,22 +39,23 @@ + + LIBVD_EXTERN(theora) + +-#include <theora/theora.h> ++#include <theora/theoradec.h> + + #define THEORA_NUM_HEADER_PACKETS 3 + + typedef struct theora_struct_st { +- theora_state st; +- theora_comment cc; +- theora_info inf; ++ th_setup_info *tsi; ++ th_dec_ctx *tctx; ++ th_comment tc; ++ th_info ti; + } theora_struct_t; + + /** Convert Theora pixelformat to the corresponding IMGFMT_ */ +-static uint32_t theora_pixelformat2imgfmt(theora_pixelformat fmt){ ++static uint32_t theora_pixelformat2imgfmt(th_pixel_fmt fmt){ + switch(fmt) { +- case OC_PF_420: return IMGFMT_YV12; +- case OC_PF_422: return IMGFMT_422P; +- case OC_PF_444: return IMGFMT_444P; ++ case TH_PF_420: return IMGFMT_YV12; ++ case TH_PF_422: return IMGFMT_422P; ++ case TH_PF_444: return IMGFMT_444P; + } + return 0; + } +@@ -64,7 +65,7 @@ + theora_struct_t *context = sh->context; + switch(cmd) { + case VDCTRL_QUERY_FORMAT: +- if (*(int*)arg == theora_pixelformat2imgfmt(context->inf.pixelformat)) ++ if (*(int*)arg == theora_pixelformat2imgfmt(context->ti.pixel_fmt)) + return CONTROL_TRUE; + return CONTROL_FALSE; + } +@@ -88,8 +89,9 @@ + if (!context) + goto err_out; + +- theora_info_init(&context->inf); +- theora_comment_init(&context->cc); ++ th_info_init(&context->ti); ++ th_comment_init(&context->tc); ++ context->tsi = NULL; + + /* Read all header packets, pass them to theora_decode_header. */ + for (i = 0; i < THEORA_NUM_HEADER_PACKETS; i++) +@@ -109,7 +111,7 @@ + op.b_o_s = 1; + } + +- if ( (errorCode = theora_decode_header (&context->inf, &context->cc, &op)) ) ++ if ( (errorCode = th_decode_headerin (&context->ti, &context->tc, &context->tsi, &op)) < 0) + { + mp_msg(MSGT_DECVIDEO, MSGL_ERR, "Broken Theora header; errorCode=%i!\n", errorCode); + goto err_out; +@@ -117,23 +119,25 @@ + } + + /* now init codec */ +- errorCode = theora_decode_init (&context->st, &context->inf); +- if (errorCode) ++ context->tctx = th_decode_alloc (&context->ti, context->tsi); ++ if (!context->tctx) + { +- mp_msg(MSGT_DECVIDEO,MSGL_ERR,"Theora decode init failed: %i \n", errorCode); ++ mp_msg(MSGT_DECVIDEO,MSGL_ERR,"Theora decode init failed\n"); + goto err_out; + } ++ /* free memory used for decoder setup information */ ++ th_setup_free(context->tsi); + +- if(sh->aspect==0.0 && context->inf.aspect_denominator!=0) ++ if(sh->aspect==0.0 && context->ti.aspect_denominator!=0) + { +- sh->aspect = ((double)context->inf.aspect_numerator * context->inf.width)/ +- ((double)context->inf.aspect_denominator * context->inf.height); ++ sh->aspect = ((double)context->ti.aspect_numerator * context->ti.frame_width)/ ++ ((double)context->ti.aspect_denominator * context->ti.frame_height); + } + + mp_msg(MSGT_DECVIDEO,MSGL_V,"INFO: Theora video init ok!\n"); +- mp_msg(MSGT_DECVIDEO,MSGL_INFO,"Frame: %dx%d, Picture %dx%d, Offset [%d,%d]\n", context->inf.width, context->inf.height, context->inf.frame_width, context->inf.frame_height, context->inf.offset_x, context->inf.offset_y); ++ mp_msg(MSGT_DECVIDEO,MSGL_INFO,"Frame: %dx%d, Picture %dx%d, Offset [%d,%d]\n", context->ti.frame_width, context->ti.frame_height, context->ti.pic_width, context->ti.pic_height, context->ti.pic_x, context->ti.pic_y); + +- return mpcodecs_config_vo (sh,context->inf.width,context->inf.height,theora_pixelformat2imgfmt(context->inf.pixelformat)); ++ return mpcodecs_config_vo (sh,context->ti.frame_width,context->ti.frame_height,theora_pixelformat2imgfmt(context->ti.pixel_fmt)); + + err_out: + free(context); +@@ -150,9 +154,9 @@ + + if (context) + { +- theora_info_clear(&context->inf); +- theora_comment_clear(&context->cc); +- theora_clear (&context->st); ++ th_info_clear(&context->ti); ++ th_comment_clear(&context->tc); ++ th_decode_free (context->tctx); + free (context); + } + } +@@ -165,7 +169,7 @@ + theora_struct_t *context = sh->context; + int errorCode = 0; + ogg_packet op; +- yuv_buffer yuv; ++ th_ycbcr_buffer ycbcrbuf; + mp_image_t* mpi; + + // no delayed frames +@@ -177,31 +181,31 @@ + op.packet = data; + op.granulepos = -1; + +- errorCode = theora_decode_packetin (&context->st, &op); +- if (errorCode) ++ errorCode = th_decode_packetin (context->tctx, &op, NULL); ++ if (errorCode < 0) + { + mp_msg(MSGT_DECVIDEO,MSGL_ERR,"Theora decode packetin failed: %i \n", + errorCode); + return NULL; + } + +- errorCode = theora_decode_YUVout (&context->st, &yuv); +- if (errorCode) ++ errorCode = th_decode_ycbcr_out (context->tctx, ycbcrbuf); ++ if (errorCode < 0) + { + mp_msg(MSGT_DECVIDEO,MSGL_ERR,"Theora decode YUVout failed: %i \n", + errorCode); + return NULL; + } + +- mpi = mpcodecs_get_image(sh, MP_IMGTYPE_EXPORT, 0, yuv.y_width, yuv.y_height); ++ mpi = mpcodecs_get_image(sh, MP_IMGTYPE_EXPORT, 0, ycbcrbuf[0].width, ycbcrbuf[0].height); + if(!mpi) return NULL; + +- mpi->planes[0]=yuv.y; +- mpi->stride[0]=yuv.y_stride; +- mpi->planes[1]=yuv.u; +- mpi->stride[1]=yuv.uv_stride; +- mpi->planes[2]=yuv.v; +- mpi->stride[2]=yuv.uv_stride; ++ mpi->planes[0]=ycbcrbuf[0].data; ++ mpi->stride[0]=ycbcrbuf[0].stride; ++ mpi->planes[1]=ycbcrbuf[1].data; ++ mpi->stride[1]=ycbcrbuf[1].stride; ++ mpi->planes[2]=ycbcrbuf[2].data; ++ mpi->stride[2]=ycbcrbuf[2].stride; + + return mpi; + } +--- a/libmpdemux/demux_ogg.c ++++ b/libmpdemux/demux_ogg.c +@@ -49,21 +49,21 @@ + #endif + + #ifdef CONFIG_OGGTHEORA +-#include <theora/theora.h> +-int _ilog (unsigned int); /* defined in many places in theora/lib/ */ ++#include <theora/theoradec.h> + #endif + + #define BLOCK_SIZE 4096 + + /* Theora decoder context : we won't be able to interpret granule positions +- * without using theora_granule_time with the theora_state of the stream. ++ * without using th_granule_time with the th_dec_ctx of the stream. + * This is duplicated in `vd_theora.c'; put this in a common header? + */ + #ifdef CONFIG_OGGTHEORA + typedef struct theora_struct_st { +- theora_state st; +- theora_comment cc; +- theora_info inf; ++ th_setup_info *tsi; ++ th_dec_ctx *tctx; ++ th_comment tc; ++ th_info ti; + } theora_struct_t; + #endif + +@@ -116,7 +116,7 @@ + float samplerate; /// granulpos 2 time + int64_t lastpos; + int32_t lastsize; +- int keyframe_frequency_force; ++ int keyframe_granule_shift; + + // Logical stream state + ogg_stream_state stream; +@@ -299,11 +299,10 @@ + have theora_state st, until all header packets were passed to the + decoder. */ + if (!pack->bytes || !(*data&0x80)) { +- int keyframe_granule_shift = _ilog(os->keyframe_frequency_force - 1); +- int64_t iframemask = (1 << keyframe_granule_shift) - 1; ++ int64_t iframemask = (1 << os->keyframe_granule_shift) - 1; + + if (pack->granulepos >= 0) { +- os->lastpos = pack->granulepos >> keyframe_granule_shift; ++ os->lastpos = pack->granulepos >> os->keyframe_granule_shift; + os->lastpos += pack->granulepos & iframemask; + *flags = (pack->granulepos & iframemask) == 0; + } else { +@@ -892,14 +891,15 @@ + #ifdef CONFIG_OGGTHEORA + } else if (pack.bytes >= 7 && !strncmp (&pack.packet[1], "theora", 6)) { + int errorCode = 0; +- theora_info inf; +- theora_comment cc; ++ th_info ti; ++ th_comment tc; ++ th_setup_info *tsi = NULL; + +- theora_info_init (&inf); +- theora_comment_init (&cc); ++ th_info_init (&ti); ++ th_comment_init (&tc); + +- errorCode = theora_decode_header (&inf, &cc, &pack); +- if (errorCode) { ++ errorCode = th_decode_headerin(&ti, &tc, &tsi, &pack); ++ if (errorCode < 0) { + mp_msg(MSGT_DEMUX, MSGL_ERR, + "Theora header parsing failed: %i \n", errorCode); + } else { +@@ -908,30 +908,32 @@ + sh_v->bih = calloc(1, sizeof(*sh_v->bih)); + sh_v->bih->biSize = sizeof(*sh_v->bih); + sh_v->bih->biCompression = sh_v->format = FOURCC_THEORA; +- sh_v->fps = ((double)inf.fps_numerator) / (double)inf.fps_denominator; +- sh_v->frametime = ((double)inf.fps_denominator) / (double)inf.fps_numerator; +- sh_v->disp_w = sh_v->bih->biWidth = inf.frame_width; +- sh_v->disp_h = sh_v->bih->biHeight = inf.frame_height; ++ sh_v->fps = ((double)ti.fps_numerator) / (double)ti.fps_denominator; ++ sh_v->frametime = ((double)ti.fps_denominator) / (double)ti.fps_numerator; ++ sh_v->i_bps = ti.target_bitrate / 8; ++ sh_v->disp_w = sh_v->bih->biWidth = ti.frame_width; ++ sh_v->disp_h = sh_v->bih->biHeight = ti.frame_height; + sh_v->bih->biBitCount = 24; + sh_v->bih->biPlanes = 3; + sh_v->bih->biSizeImage = ((sh_v->bih->biBitCount / 8) * sh_v->bih->biWidth * sh_v->bih->biHeight); + ogg_d->subs[ogg_d->num_sub].samplerate = sh_v->fps; + ogg_d->subs[ogg_d->num_sub].theora = 1; +- ogg_d->subs[ogg_d->num_sub].keyframe_frequency_force = inf.keyframe_frequency_force; ++ ogg_d->subs[ogg_d->num_sub].keyframe_granule_shift = ti.keyframe_granule_shift; + ogg_d->subs[ogg_d->num_sub].id = n_video; + n_video++; + mp_msg(MSGT_DEMUX, MSGL_INFO, + "[Ogg] stream %d: video (Theora v%d.%d.%d), -vid %d\n", + ogg_d->num_sub, +- (int)inf.version_major, +- (int)inf.version_minor, +- (int)inf.version_subminor, ++ (int)ti.version_major, ++ (int)ti.version_minor, ++ (int)ti.version_subminor, + n_video - 1); + if (mp_msg_test(MSGT_HEADER, MSGL_V)) + print_video_header(sh_v->bih, MSGL_V); + } +- theora_comment_clear(&cc); +- theora_info_clear(&inf); ++ th_comment_clear(&tc); ++ th_info_clear(&ti); ++ th_setup_free(tsi); + #endif /* CONFIG_OGGTHEORA */ + } else if (pack.bytes >= 4 && !strncmp (&pack.packet[0], "fLaC", 4)) { + sh_a = new_sh_audio_aid(demuxer, ogg_d->num_sub, n_audio, NULL); diff --git a/gnu/packages/patches/openssl-runpath.patch b/gnu/packages/patches/openssl-runpath.patch new file mode 100644 index 0000000000..fa7c0b9962 --- /dev/null +++ b/gnu/packages/patches/openssl-runpath.patch @@ -0,0 +1,15 @@ +This patch makes the build system pass -Wl,-rpath=$out/lib even for +libraries (it already does so for executables, thanks to 'DO_GNU_APP' +in 'Makefile.shared'.) + +--- openssl-1.0.2a/Makefile.shared 2015-04-05 01:07:35.357602454 +0200 ++++ openssl-1.0.2a/Makefile.shared 2015-04-05 01:09:50.474513303 +0200 +@@ -106,7 +106,7 @@ LINK_SO= \ + LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \ + LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \ + LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \ +- $${SHAREDCMD} $${SHAREDFLAGS} \ ++ $${SHAREDCMD} $${SHAREDFLAGS} -Wl,-rpath,$(LIBRPATH) \ + -o $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX \ + $$ALLSYMSFLAGS $$SHOBJECTS $$NOALLSYMSFLAGS $$LIBDEPS \ + ) && $(SYMLINK_SO) diff --git a/gnu/packages/patches/perl-gd-options-passthrough-and-fontconfig.patch b/gnu/packages/patches/perl-gd-options-passthrough-and-fontconfig.patch new file mode 100644 index 0000000000..b2ff43c0d3 --- /dev/null +++ b/gnu/packages/patches/perl-gd-options-passthrough-and-fontconfig.patch @@ -0,0 +1,53 @@ +This patch (adapted from nixpkgs for Build.PL) configures Getopt::Long to pass +options so they will be available at the second GetOptions call. + +Also an option to specify the search path for libfontconfig is added. + +--- GD-2.56/Build.PL 2014-10-27 20:34:54.000000000 -0500 ++++ GD-2.56/Build.PL 2015-02-22 10:08:12.569973657 -0600 +@@ -2,14 +2,14 @@ + + use strict; + use Module::Build; +-use Getopt::Long; ++use Getopt::Long qw(:config pass_through); + use Config; + + # =====> PATHS: CHECK AND ADJUST <===== + my (@INC,@LIBPATH,@LIBS); + my $AUTOCONFIG = 0; # global set by try_to_autoconfigure() below + +-my ($options,$lib_gd_path,$lib_ft_path,$lib_png_path,$lib_jpeg_path,$lib_xpm_path,$lib_zlib_path); ++my ($options,$lib_gd_path,$lib_ft_path,$lib_png_path,$lib_jpeg_path,$lib_xpm_path,$lib_zlib_path,$lib_fontconfig_path); + + unless (try_to_autoconfigure(\$options,\$lib_gd_path,\@INC,\@LIBPATH,\@LIBS)) { + die <<END; +@@ -38,6 +38,7 @@ + "lib_jpeg_path=s" => \$lib_jpeg_path, + "lib_xpm_path=s" => \$lib_xpm_path, + "lib_zlib_path=s" => \$lib_zlib_path, ++ "lib_fontconfig_path=s" => \$lib_fontconfig_path, + ); + unless ($result) { + die <<END; +@@ -53,6 +54,7 @@ + -lib_jpeg_path path path to libjpeg + -lib_xpm_path path path to libxpm + -lib_zlib_path path path to libpng ++ -lib_fontconfig_path path path to fontconfig + -ignore_missing_gd Ignore missing or old libgd installations and try to compile anyway + + If no options are passed on the command line. The program will +@@ -100,6 +102,12 @@ + @INC = ("-I$lib_zlib_path/include", @INC); + @LIBPATH = ("-L$lib_zlib_path/lib", @LIBPATH); + } ++if( defined($lib_fontconfig_path) ) ++{ ++ print "Fontconfig library used from: $lib_fontconfig_path\n"; ++ @INC = ("-I$lib_fontconfig_path/include", @INC); ++ @LIBPATH = ("-L$lib_fontconfig_path/lib", @LIBPATH); ++} + ############################################################################################# + + if ($^O eq 'VMS'){ diff --git a/gnu/packages/patches/perl-module-pluggable-search.patch b/gnu/packages/patches/perl-module-pluggable-search.patch new file mode 100644 index 0000000000..bb2a57f7e5 --- /dev/null +++ b/gnu/packages/patches/perl-module-pluggable-search.patch @@ -0,0 +1,25 @@ +Fix core Perl module Module::Pluggable such that it can find plugins that live +in symlinked directories. + +Patch borrowed/adapted from Nixpkgs. + +--- perl-5.16.1/cpan/Module-Pluggable/lib/Module/Pluggable/Object.pm 2015-04-08 23:28:48.120164135 -0500 ++++ perl-5.16.1/cpan/Module-Pluggable/lib/Module/Pluggable/Object.pm 2015-04-08 23:30:27.032166704 -0500 +@@ -164,7 +164,7 @@ + my $sp = catdir($dir, (split /::/, $searchpath)); + + # if it doesn't exist or it's not a dir then skip it +- next unless ( -e $sp && -d _ ); # Use the cached stat the second time ++ next unless ( -e $sp ); + + my @files = $self->find_files($sp); + +@@ -279,7 +279,7 @@ + (my $path = $File::Find::name) =~ s#^\\./##; + push @files, $path; + } +- }, $search_path ); ++ }, "$search_path/." ); + } + #chdir $cwd; + return @files; diff --git a/gnu/packages/patches/perl-net-amazon-s3-moose-warning.patch b/gnu/packages/patches/perl-net-amazon-s3-moose-warning.patch new file mode 100644 index 0000000000..c6408d5251 --- /dev/null +++ b/gnu/packages/patches/perl-net-amazon-s3-moose-warning.patch @@ -0,0 +1,17 @@ +Patch borrowed from nixpkgs. Works around warning message produced by the +current version of Moose: + +"Passing a list of values to enum is deprecated. Enum values should be wrapped +in an arrayref." + +--- Net-Amazon-S3-0.60/lib/Net/Amazon/S3/Client/Object.pm 2015-04-15 16:18:47.226410022 -0500 ++++ Net-Amazon-S3-0.60/lib/Net/Amazon/S3/Client/Object.pm 2015-04-15 16:19:25.410408425 -0500 +@@ -19,7 +19,7 @@ + [ qw(private public-read public-read-write authenticated-read) ]; + + enum 'StorageClass' => +- qw(standard reduced_redundancy); ++ [ qw(standard reduced_redundancy) ]; + + has 'client' => + ( is => 'ro', isa => 'Net::Amazon::S3::Client', required => 1 ); diff --git a/gnu/packages/patches/portaudio-audacity-compat.patch b/gnu/packages/patches/portaudio-audacity-compat.patch new file mode 100644 index 0000000000..9f239ada35 --- /dev/null +++ b/gnu/packages/patches/portaudio-audacity-compat.patch @@ -0,0 +1,324 @@ +Description: Add features needed to make portmixer work with audacity. +Author: Audacity Team +Last-Update: 2011-12-07 + +See <http://music.columbia.edu/pipermail/portaudio/2015-March/016611.html>. + +--- a/include/pa_win_ds.h ++++ b/include/pa_win_ds.h +@@ -89,6 +89,21 @@ +
+ }PaWinDirectSoundStreamInfo;
+
++/** Retrieve the GUID of the input device.
++
++ @param stream The stream to query.
++
++ @return A pointer to the GUID, or NULL if none.
++*/
++LPGUID PaWinDS_GetStreamInputGUID( PaStream* s );
++
++/** Retrieve the GUID of the output device.
++
++ @param stream The stream to query.
++
++ @return A pointer to the GUID, or NULL if none.
++*/
++LPGUID PaWinDS_GetStreamOutputGUID( PaStream* s );
+
+
+ #ifdef __cplusplus
+--- a/include/portaudio.h ++++ b/include/portaudio.h +@@ -1146,6 +1146,15 @@ + signed long Pa_GetStreamWriteAvailable( PaStream* stream ); + + ++/** Retrieve the host type handling an open stream. ++ ++ @return Returns a non-negative value representing the host API type ++ handling an open stream or, a PaErrorCode (which are always negative) ++ if PortAudio is not initialized or an error is encountered. ++*/ ++PaHostApiTypeId Pa_GetStreamHostApiType( PaStream* stream ); ++ ++ + /* Miscellaneous utilities */ + + +--- /dev/null ++++ b/include/pa_unix_oss.h +@@ -0,0 +1,104 @@ ++#ifndef PA_UNIX_OSS_H ++#define PA_UNIX_OSS_H ++ ++/* ++ * $Id: portaudio.patch,v 1.10 2009-06-30 04:52:59 llucius Exp $ ++ * PortAudio Portable Real-Time Audio Library ++ * OSS-specific extensions ++ * ++ * Copyright (c) 1999-2000 Ross Bencina and Phil Burk ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining ++ * a copy of this software and associated documentation files ++ * (the "Software"), to deal in the Software without restriction, ++ * including without limitation the rights to use, copy, modify, merge, ++ * publish, distribute, sublicense, and/or sell copies of the Software, ++ * and to permit persons to whom the Software is furnished to do so, ++ * subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be ++ * included in all copies or substantial portions of the Software. ++ * ++ * Any person wishing to distribute modifications to the Software is ++ * requested to send the modifications to the original developer so that ++ * they can be incorporated into the canonical version. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. ++ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ++ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF ++ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION ++ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ++ * ++ */ ++ ++/** @file ++ * OSS-specific PortAudio API extension header file. ++ */ ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++const char *PaOSS_GetStreamInputDevice( PaStream *s ); ++ ++const char *PaOSS_GetStreamOutputDevice( PaStream *s ); ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif ++#ifndef PA_UNIX_OSS_H ++#define PA_UNIX_OSS_H ++ ++/* ++ * $Id: portaudio.patch,v 1.10 2009-06-30 04:52:59 llucius Exp $ ++ * PortAudio Portable Real-Time Audio Library ++ * OSS-specific extensions ++ * ++ * Copyright (c) 1999-2000 Ross Bencina and Phil Burk ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining ++ * a copy of this software and associated documentation files ++ * (the "Software"), to deal in the Software without restriction, ++ * including without limitation the rights to use, copy, modify, merge, ++ * publish, distribute, sublicense, and/or sell copies of the Software, ++ * and to permit persons to whom the Software is furnished to do so, ++ * subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be ++ * included in all copies or substantial portions of the Software. ++ * ++ * Any person wishing to distribute modifications to the Software is ++ * requested to send the modifications to the original developer so that ++ * they can be incorporated into the canonical version. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. ++ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ++ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF ++ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION ++ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ++ * ++ */ ++ ++/** @file ++ * OSS-specific PortAudio API extension header file. ++ */ ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++const char *PaOSS_GetStreamInputDevice( PaStream *s ); ++ ++const char *PaOSS_GetStreamOutputDevice( PaStream *s ); ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif +--- a/src/common/pa_front.c ++++ b/src/common/pa_front.c +@@ -1216,8 +1216,10 @@ + hostApiInputParametersPtr, hostApiOutputParametersPtr, + sampleRate, framesPerBuffer, streamFlags, streamCallback, userData ); + +- if( result == paNoError ) ++ if( result == paNoError ) { + AddOpenStream( *stream ); ++ PA_STREAM_REP(*stream)->hostApiType = hostApi->info.type; ++ } + + + PA_LOGAPI(("Pa_OpenStream returned:\n" )); +@@ -1729,6 +1731,32 @@ + return result; + } + ++PaHostApiTypeId Pa_GetStreamHostApiType( PaStream* stream ) ++{ ++ PaError error = PaUtil_ValidateStreamPointer( stream ); ++ PaHostApiTypeId result; ++ ++#ifdef PA_LOG_API_CALLS ++ PaUtil_DebugPrint("Pa_GetStreamHostApiType called:\n" ); ++ PaUtil_DebugPrint("\tPaStream* stream: 0x%p\n", stream ); ++#endif ++ ++ if( error == paNoError ) ++ { ++ result = PA_STREAM_REP(stream)->hostApiType; ++ } ++ else ++ { ++ result = (PaHostApiTypeId) error; ++ } ++ ++#ifdef PA_LOG_API_CALLS ++ PaUtil_DebugPrint("Pa_GetStreamHostApiType returned:\n" ); ++ PaUtil_DebugPrint("\tPaError: %d ( %s )\n\n", result, Pa_GetErrorText( result ) ); ++#endif ++ ++ return result; ++} + + PaError Pa_GetSampleSize( PaSampleFormat format ) + { +--- a/src/common/pa_stream.c ++++ b/src/common/pa_stream.c +@@ -93,6 +93,8 @@ + streamRepresentation->streamInfo.inputLatency = 0.; + streamRepresentation->streamInfo.outputLatency = 0.; + streamRepresentation->streamInfo.sampleRate = 0.; ++ ++ streamRepresentation->hostApiType = 0; + } + + +--- a/src/common/pa_stream.h ++++ b/src/common/pa_stream.h +@@ -152,6 +152,7 @@ + PaStreamFinishedCallback *streamFinishedCallback; + void *userData; + PaStreamInfo streamInfo; ++ PaHostApiTypeId hostApiType; + } PaUtilStreamRepresentation; + + +--- a/src/hostapi/coreaudio/pa_mac_core_blocking.c ++++ b/src/hostapi/coreaudio/pa_mac_core_blocking.c +@@ -66,6 +66,9 @@ + #ifdef MOSX_USE_NON_ATOMIC_FLAG_BITS
+ # define OSAtomicOr32( a, b ) ( (*(b)) |= (a) )
+ # define OSAtomicAnd32( a, b ) ( (*(b)) &= (a) )
++#elif MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_3
++# define OSAtomicOr32( a, b ) BitOrAtomic( a, (UInt32 *) b )
++# define OSAtomicAnd32( a, b ) BitAndAtomic( a, (UInt32 *) b )
+ #else
+ # include <libkern/OSAtomic.h>
+ #endif
+--- a/src/hostapi/alsa/pa_linux_alsa.c ++++ b/src/hostapi/alsa/pa_linux_alsa.c +@@ -611,6 +611,7 @@ + StreamDirection streamDir; + + snd_pcm_channel_area_t *channelAreas; /* Needed for channel adaption */ ++ int card; + } PaAlsaStreamComponent; + + /* Implementation specific stream structure */ +@@ -1806,6 +1807,7 @@ + { + PaError result = paNoError; + PaSampleFormat userSampleFormat = params->sampleFormat, hostSampleFormat = paNoError; ++ snd_pcm_info_t* pcmInfo; + assert( params->channelCount > 0 ); + + /* Make sure things have an initial value */ +@@ -1826,6 +1828,9 @@ + self->device = params->device; + + PA_ENSURE( AlsaOpen( &alsaApi->baseHostApiRep, params, streamDir, &self->pcm ) ); ++ ++ snd_pcm_info_alloca( &pcmInfo ); ++ self->card = snd_pcm_info_get_card( pcmInfo ); + self->nfds = alsa_snd_pcm_poll_descriptors_count( self->pcm ); + + PA_ENSURE( hostSampleFormat = PaUtil_SelectClosestAvailableFormat( GetAvailableFormats( self->pcm ), userSampleFormat ) ); +@@ -4519,9 +4524,7 @@ + /* XXX: More descriptive error? */ + PA_UNLESS( stream->capture.pcm, paDeviceUnavailable ); + +- alsa_snd_pcm_info_alloca( &pcmInfo ); +- PA_ENSURE( alsa_snd_pcm_info( stream->capture.pcm, pcmInfo ) ); +- *card = alsa_snd_pcm_info_get_card( pcmInfo ); ++ *card = stream->capture.card; + + error: + return result; +@@ -4537,9 +4540,7 @@ + /* XXX: More descriptive error? */ + PA_UNLESS( stream->playback.pcm, paDeviceUnavailable ); + +- alsa_snd_pcm_info_alloca( &pcmInfo ); +- PA_ENSURE( alsa_snd_pcm_info( stream->playback.pcm, pcmInfo ) ); +- *card = alsa_snd_pcm_info_get_card( pcmInfo ); ++ *card = stream->playback.card; + + error: + return result; +--- a/src/hostapi/oss/pa_unix_oss.c ++++ b/src/hostapi/oss/pa_unix_oss.c +@@ -2028,3 +2028,26 @@ + #endif + } + ++const char *PaOSS_GetStreamInputDevice( PaStream* s ) ++{ ++ PaOssStream *stream = (PaOssStream*)s; ++ ++ if( stream->capture ) ++ { ++ return stream->capture->devName; ++ } ++ ++ return NULL; ++} ++ ++const char *PaOSS_GetStreamOutputDevice( PaStream* s ) ++{ ++ PaOssStream *stream = (PaOssStream*)s; ++ ++ if( stream->playback ) ++ { ++ return stream->playback->devName; ++ } ++ ++ return NULL; ++} +--- a/configure.in ++++ b/configure.in +@@ -365,6 +365,7 @@ + DLL_LIBS="$DLL_LIBS -lossaudio" + LIBS="$LIBS -lossaudio" + fi ++ INCLUDES="$INCLUDES pa_unix_oss.h" + AC_DEFINE(PA_USE_OSS,1) + fi + diff --git a/gnu/packages/patches/pulseaudio-longer-test-timeout.patch b/gnu/packages/patches/pulseaudio-longer-test-timeout.patch new file mode 100644 index 0000000000..fa81f749d2 --- /dev/null +++ b/gnu/packages/patches/pulseaudio-longer-test-timeout.patch @@ -0,0 +1,13 @@ +Increase the timeout on 'cpu-mix-test' to accommodate slower machines. + +--- pulseaudio-6.0/src/tests/cpu-mix-test.c.ORIG 2015-02-12 09:10:35.000000000 -0500 ++++ pulseaudio-6.0/src/tests/cpu-mix-test.c 2015-03-31 13:45:05.316878322 -0400 +@@ -212,7 +212,7 @@ + #if defined (__arm__) && defined (__linux__) && defined (HAVE_NEON) + tcase_add_test(tc, mix_neon_test); + #endif +- tcase_set_timeout(tc, 120); ++ tcase_set_timeout(tc, 240); + suite_add_tcase(s, tc); + + sr = srunner_create(s); diff --git a/gnu/packages/patches/pycairo-wscript.patch b/gnu/packages/patches/pycairo-wscript.patch new file mode 100644 index 0000000000..c49f0afcb3 --- /dev/null +++ b/gnu/packages/patches/pycairo-wscript.patch @@ -0,0 +1,31 @@ +Update the wscript to work with waf-1.8.8. Based on: +http://cgit.freedesktop.org/pycairo/commit/?id=c57cd129407c904f8c2f752a59d0183df7b01a5e + + +--- pycairo-1.10.0.orig/wscript 2011-04-18 15:42:29.000000000 +0800 ++++ pycairo-1.10.0/wscript 2015-04-20 13:01:45.383756898 +0800 +@@ -13,18 +13,18 @@ + + def options(ctx): + print(' %s/options()' %d) +- ctx.tool_options('gnu_dirs') +- ctx.tool_options('compiler_cc') +- ctx.tool_options('python') # options for disabling pyc or pyo compilation ++ ctx.load('gnu_dirs') ++ ctx.load('compiler_c') ++ ctx.load('python') # options for disabling pyc or pyo compilation + + + def configure(ctx): + print(' %s/configure()' %d) + + env = ctx.env +- ctx.check_tool('gnu_dirs') +- ctx.check_tool('compiler_cc') +- ctx.check_tool('python') ++ ctx.load('gnu_dirs') ++ ctx.load('compiler_c') ++ ctx.load('python') + ctx.check_python_version((3,1,0)) + ctx.check_python_headers() + ctx.check_cfg(package='cairo', atleast_version=cairo_version_required, diff --git a/gnu/packages/patches/python-fix-tests.patch b/gnu/packages/patches/python-fix-tests.patch index 70e4aa05d5..82c19980f9 100644 --- a/gnu/packages/patches/python-fix-tests.patch +++ b/gnu/packages/patches/python-fix-tests.patch @@ -64,8 +64,8 @@ http://bugs.python.org/issue20868 . @unittest.skipUnless(support.is_resource_enabled('network'), 'network is not enabled') def test_idna(self): ---- Lib/test/test_multiprocessing.py 2014-04-06 23:12:27.575235000 +0200 -+++ Lib/test/test_multiprocessing.py 2014-04-06 23:13:04.827235000 +0200 +--- Lib/test/_test_multiprocessing.py 2014-04-06 23:12:27.575235000 +0200 ++++ Lib/test/_test_multiprocessing.py 2014-04-06 23:13:04.827235000 +0200 @@ -1016,6 +1016,7 @@ if pid is not None: os.kill(pid, signal.SIGINT) @@ -112,3 +112,52 @@ http://bugs.python.org/issue20868 . def test_issue_8959_a(self): from ctypes.util import find_library libc_path = find_library("c") +--- Tools/scripts/run_tests.py.orig 2015-04-06 03:52:17.484000000 +0200 ++++ Tools/scripts/run_tests.py 2015-04-06 03:52:25.880000000 +0200 +@@ -47,7 +47,7 @@ + if threading and not any(is_multiprocess_flag(arg) for arg in regrtest_args): + args.extend(['-j', '0']) # Use all CPU cores + if not any(is_resource_use_flag(arg) for arg in regrtest_args): +- args.extend(['-u', 'all,-largefile,-audio,-gui']) ++ args.extend(['-u', 'all,-largefile,-audio,-gui,-network']) + args.extend(regrtest_args) + print(' '.join(args)) + os.execv(sys.executable, args) +--- Lib/distutils/tests/test_archive_util.py.orig 2015-04-06 04:08:49.288000000 +0200 ++++ Lib/distutils/tests/test_archive_util.py 2015-04-06 04:09:34.396000000 +0200 +@@ -282,6 +282,7 @@ + finally: + del ARCHIVE_FORMATS['xxx'] + ++ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix") + def test_make_archive_owner_group(self): + # testing make_archive with owner and group, with various combinations + # this works even if there's not gid/uid support +@@ -310,6 +311,7 @@ + + @unittest.skipUnless(ZLIB_SUPPORT, "Requires zlib") + @unittest.skipUnless(UID_GID_SUPPORT, "Requires grp and pwd support") ++ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix") + def test_tarfile_root_owner(self): + tmpdir, tmpdir2, base_name = self._create_files() + old_dir = os.getcwd() +--- Lib/distutils/tests/test_sdist.py.orig 2015-04-06 04:10:05.264000000 +0200 ++++ Lib/distutils/tests/test_sdist.py 2015-04-06 04:10:21.448000000 +0200 +@@ -435,6 +435,7 @@ + "The tar command is not found") + @unittest.skipIf(find_executable('gzip') is None, + "The gzip command is not found") ++ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix") + def test_make_distribution_owner_group(self): + # now building a sdist + dist, cmd = self.get_cmd() +--- Lib/test/test_resource.py.orig 2015-04-06 21:30:24.708000000 +0200 ++++ Lib/test/test_resource.py 2015-04-06 23:07:27.220000000 +0200 +@@ -146,6 +146,7 @@ + + @unittest.skipUnless(hasattr(resource, 'prlimit'), 'no prlimit') + @support.requires_linux_version(2, 6, 36) ++ @unittest.skipIf(True, "Bug: the PermissionError is not raised") + def test_prlimit(self): + self.assertRaises(TypeError, resource.prlimit) + if os.geteuid() != 0: diff --git a/gnu/packages/patches/python-sqlite-3.8.4-test-fix.patch b/gnu/packages/patches/python-sqlite-3.8.4-test-fix.patch deleted file mode 100644 index 2f8b159870..0000000000 --- a/gnu/packages/patches/python-sqlite-3.8.4-test-fix.patch +++ /dev/null @@ -1,15 +0,0 @@ -From resolution of upstream python issue #20901: http://bugs.python.org/issue20901 - -diff --git a/Lib/sqlite3/test/hooks.py b/Lib/sqlite3/test/hooks.py ---- Lib/sqlite3/test/hooks.py -+++ Lib/sqlite3/test/hooks.py -@@ -162,7 +162,7 @@ class ProgressTests(unittest.TestCase): - create table bar (a, b) - """) - second_count = len(progress_calls) -- self.assertGreater(first_count, second_count) -+ self.assertGreaterEqual(first_count, second_count) - - def CheckCancelOperation(self): - """ - diff --git a/gnu/packages/patches/qemu-CVE-2015-3456.patch b/gnu/packages/patches/qemu-CVE-2015-3456.patch new file mode 100644 index 0000000000..9514f7c3e5 --- /dev/null +++ b/gnu/packages/patches/qemu-CVE-2015-3456.patch @@ -0,0 +1,85 @@ +From e907746266721f305d67bc0718795fedee2e824c Mon Sep 17 00:00:00 2001 +From: Petr Matousek <pmatouse@redhat.com> +Date: Wed, 6 May 2015 09:48:59 +0200 +Subject: [PATCH] fdc: force the fifo access to be in bounds of the allocated + buffer + +During processing of certain commands such as FD_CMD_READ_ID and +FD_CMD_DRIVE_SPECIFICATION_COMMAND the fifo memory access could +get out of bounds leading to memory corruption with values coming +from the guest. + +Fix this by making sure that the index is always bounded by the +allocated memory. + +This is CVE-2015-3456. + +Signed-off-by: Petr Matousek <pmatouse@redhat.com> +Reviewed-by: John Snow <jsnow@redhat.com> +Signed-off-by: John Snow <jsnow@redhat.com> +--- + hw/block/fdc.c | 17 +++++++++++------ + 1 file changed, 11 insertions(+), 6 deletions(-) + +diff --git a/hw/block/fdc.c b/hw/block/fdc.c +index f72a392..d8a8edd 100644 +--- a/hw/block/fdc.c ++++ b/hw/block/fdc.c +@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) + { + FDrive *cur_drv; + uint32_t retval = 0; +- int pos; ++ uint32_t pos; + + cur_drv = get_cur_drv(fdctrl); + fdctrl->dsr &= ~FD_DSR_PWRDOWN; +@@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) + return 0; + } + pos = fdctrl->data_pos; ++ pos %= FD_SECTOR_LEN; + if (fdctrl->msr & FD_MSR_NONDMA) { +- pos %= FD_SECTOR_LEN; + if (pos == 0) { + if (fdctrl->data_pos != 0) + if (!fdctrl_seek_to_next_sect(fdctrl, cur_drv)) { +@@ -1852,10 +1852,13 @@ static void fdctrl_handle_option(FDCtrl *fdctrl, int direction) + static void fdctrl_handle_drive_specification_command(FDCtrl *fdctrl, int direction) + { + FDrive *cur_drv = get_cur_drv(fdctrl); ++ uint32_t pos; + +- if (fdctrl->fifo[fdctrl->data_pos - 1] & 0x80) { ++ pos = fdctrl->data_pos - 1; ++ pos %= FD_SECTOR_LEN; ++ if (fdctrl->fifo[pos] & 0x80) { + /* Command parameters done */ +- if (fdctrl->fifo[fdctrl->data_pos - 1] & 0x40) { ++ if (fdctrl->fifo[pos] & 0x40) { + fdctrl->fifo[0] = fdctrl->fifo[1]; + fdctrl->fifo[2] = 0; + fdctrl->fifo[3] = 0; +@@ -1955,7 +1958,7 @@ static uint8_t command_to_handler[256]; + static void fdctrl_write_data(FDCtrl *fdctrl, uint32_t value) + { + FDrive *cur_drv; +- int pos; ++ uint32_t pos; + + /* Reset mode */ + if (!(fdctrl->dor & FD_DOR_nRESET)) { +@@ -2004,7 +2007,9 @@ static void fdctrl_write_data(FDCtrl *fdctrl, uint32_t value) + } + + FLOPPY_DPRINTF("%s: %02x\n", __func__, value); +- fdctrl->fifo[fdctrl->data_pos++] = value; ++ pos = fdctrl->data_pos++; ++ pos %= FD_SECTOR_LEN; ++ fdctrl->fifo[pos] = value; + if (fdctrl->data_pos == fdctrl->data_len) { + /* We now have all parameters + * and will be able to treat the command +-- +2.2.1 + diff --git a/gnu/packages/patches/qt4-ldflags.patch b/gnu/packages/patches/qt4-ldflags.patch new file mode 100644 index 0000000000..0d6398018a --- /dev/null +++ b/gnu/packages/patches/qt4-ldflags.patch @@ -0,0 +1,18 @@ +Explicitly link against libicui18n so that libQtCore.so always finds it. + +--- qt-everywhere-opensource-src-4.8.6/src/corelib/corelib.pro 2015-04-15 12:01:41.661862663 +0200 ++++ qt-everywhere-opensource-src-4.8.6/src/corelib/corelib.pro 2015-04-15 12:03:57.954586336 +0200 +@@ -19,6 +19,13 @@ include(codecs/codecs.pri) + include(statemachine/statemachine.pri) + include(xml/xml.pri) + ++# Explicitly link with icui18n, which is dlopened by libQtCore.so. ++# We cannot do this by setting LDFLAGS because that then overrides ++# other LDFLAGS: <https://bugreports.qt.io/browse/QTBUG-5471>. ++# XXX: According to the Nixpkgs recipe, this may be necessary for ++# further libraries (cups, gtk-x11-2.0, libgdk-x11-2.0). ++LIBS_PRIVATE += -licui18n ++ + !qpa:mac|darwin:LIBS_PRIVATE += -framework ApplicationServices + qpa:mac { + !ios { diff --git a/gnu/packages/patches/qt5-conflicting-typedefs.patch b/gnu/packages/patches/qt5-conflicting-typedefs.patch new file mode 100644 index 0000000000..751452c2db --- /dev/null +++ b/gnu/packages/patches/qt5-conflicting-typedefs.patch @@ -0,0 +1,70 @@ +See <https://bugreports.qt.io/browse/QTBUG-45205>. + +diff --git a/qtwebengine/src/core/chromium_gpu_helper.cpp b/qtwebengine/src/core/chromium_gpu_helper.cpp +index c7c97e6..ef574ec 100644 +--- a/qtwebengine/src/core/chromium_gpu_helper.cpp ++++ b/qtwebengine/src/core/chromium_gpu_helper.cpp +@@ -40,13 +40,15 @@ + + #include "chromium_gpu_helper.h" + +-#include "content/common/gpu/gpu_channel_manager.h" +-#include "content/common/gpu/sync_point_manager.h" +-#include "content/gpu/gpu_child_thread.h" ++// Including gpu/command_buffer headers before content/gpu headers makes sure that ++// guards are defined to prevent duplicate definition errors with forward declared ++// GL typedefs cascading through content header includes. + #include "gpu/command_buffer/service/mailbox_manager.h" + #include "gpu/command_buffer/service/texture_manager.h" + +-#include <QtGlobal> // We need this for the Q_OS_QNX define. ++#include "content/common/gpu/gpu_channel_manager.h" ++#include "content/common/gpu/sync_point_manager.h" ++#include "content/gpu/gpu_child_thread.h" + + #ifdef Q_OS_QNX + #include "content/common/gpu/stream_texture_qnx.h" +diff --git a/qtwebengine/src/core/gl_surface_qt.cpp b/qtwebengine/src/core/gl_surface_qt.cpp +index 4fe2f21..5a27aa9 100644 +--- a/qtwebengine/src/core/gl_surface_qt.cpp ++++ b/qtwebengine/src/core/gl_surface_qt.cpp +@@ -49,8 +49,6 @@ + #include "base/logging.h" + #include "base/memory/scoped_ptr.h" + #include "content/common/gpu/image_transport_surface.h" +-#include "content/common/gpu/gpu_channel_manager.h" +-#include "content/common/gpu/gpu_command_buffer_stub.h" + #include "ui/gl/egl_util.h" + #include "ui/gl/gl_context.h" + #include "ui/gl/gl_implementation.h" +@@ -544,7 +542,9 @@ GLSurface::CreateViewGLSurface(gfx::AcceleratedWidget window) + } // namespace gfx + + namespace content { +-scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateNativeSurface(GpuChannelManager* manager, GpuCommandBufferStub* stub, const gfx::GLSurfaceHandle& handle) ++class GpuCommandBufferStub; ++class GpuChannelManager; ++scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateNativeSurface(GpuChannelManager*, GpuCommandBufferStub*, const gfx::GLSurfaceHandle&) + { + QT_NOT_USED + return scoped_refptr<gfx::GLSurface>(); +diff --git a/qtwebengine/src/3rdparty/chromium/gpu/command_buffer/common/gles2_cmd_format.h b/qtwebengine/src/3rdparty/chromium/gpu/command_buffer/common/gles2_cmd_format.h +index 04a3dc3..506cf00 100644 +--- a/qtwebengine/src/3rdparty/chromium/gpu/command_buffer/common/gles2_cmd_format.h ++++ b/qtwebengine/src/3rdparty/chromium/gpu/command_buffer/common/gles2_cmd_format.h +@@ -20,6 +20,7 @@ + #include "gpu/command_buffer/common/cmd_buffer_common.h" + #include "gpu/command_buffer/common/gles2_cmd_ids.h" + ++#ifndef GL_VERSION_1_5 + // GL types are forward declared to avoid including the GL headers. The problem + // is determining which GL headers to include from code that is common to the + // client and service sides (GLES2 or one of several GL implementations). +@@ -47,6 +48,7 @@ typedef signed long long int GLsizeiptr; + typedef khronos_intptr_t GLintptr; + typedef khronos_ssize_t GLsizeiptr; + #endif ++#endif + + namespace gpu { + namespace gles2 { diff --git a/gnu/packages/patches/qt5-runpath.patch b/gnu/packages/patches/qt5-runpath.patch new file mode 100644 index 0000000000..a6cbb26ff9 --- /dev/null +++ b/gnu/packages/patches/qt5-runpath.patch @@ -0,0 +1,25 @@ +Allow the use of DT_RUNPATH. This fixes a bug whereby libQt5WebEngineCore.so +ends up having an empty RUNPATH. + +--- qt-everywhere-opensource-src-5.4.1/qtwebengine/src/3rdparty/chromium/build/common.gypi 2015-04-14 10:21:09.330925545 +0200 ++++ qt-everywhere-opensource-src-5.4.1/qtwebengine/src/3rdparty/chromium/build/common.gypi 2015-04-14 10:21:38.735106097 +0200 +@@ -4142,19 +4142,6 @@ + '-B<!(cd <(DEPTH) && pwd -P)/<(binutils_dir)', + ], + }], +- # Some binutils 2.23 releases may or may not have new dtags enabled, +- # but they are all compatible with --disable-new-dtags, +- # because the new dynamic tags are not created by default. +- ['binutils_version>=223', { +- # Newer binutils don't set DT_RPATH unless you disable "new" dtags +- # and the new DT_RUNPATH doesn't work without --no-as-needed flag. +- # FIXME(mithro): Figure out the --as-needed/--no-as-needed flags +- # inside this file to allow usage of --no-as-needed and removal of +- # this flag. +- 'ldflags': [ +- '-Wl,--disable-new-dtags', +- ], +- }] + ], + }, + }], diff --git a/gnu/packages/patches/r-fix-15899.patch b/gnu/packages/patches/r-fix-15899.patch new file mode 100644 index 0000000000..40593d34e6 --- /dev/null +++ b/gnu/packages/patches/r-fix-15899.patch @@ -0,0 +1,17 @@ +Without the "extern" keyword external applications linking against R (such as +Shogun, for example) might not be linkable. + +See https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=15899 for details +about this bug. + +--- a/src/include/Rinterface.h (revision 66251) ++++ b/src/include/Rinterface.h (working copy) +@@ -84,7 +84,7 @@ + void fpu_setup(Rboolean); + + /* in unix/system.c */ +-int R_running_as_main_program; ++extern int R_running_as_main_program; + + #ifdef CSTACK_DEFNS + /* duplicating Defn.h */ diff --git a/gnu/packages/patches/rsem-makefile.patch b/gnu/packages/patches/rsem-makefile.patch new file mode 100644 index 0000000000..5481dc685f --- /dev/null +++ b/gnu/packages/patches/rsem-makefile.patch @@ -0,0 +1,682 @@ +This patch simplifies the Makefile, making it much easier to build rsem +without the bundled version of samtools. It has already been submitted +upstream: https://github.com/bli25wisc/RSEM/pull/11 + +From 161894e91a16c7e15af57e4fcfe8cb613711c7fa Mon Sep 17 00:00:00 2001 +From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> +Date: Wed, 22 Apr 2015 14:51:07 +0200 +Subject: [PATCH 1/7] remove all headers from Makefile + +--- + Makefile | 95 +++++++++++----------------------------------------------------- + 1 file changed, 16 insertions(+), 79 deletions(-) + +diff --git a/Makefile b/Makefile +index 54e2603..3a55ed8 100644 +--- a/Makefile ++++ b/Makefile +@@ -10,133 +10,70 @@ all : $(PROGRAMS) + sam/libbam.a : + cd sam ; ${MAKE} all + +-Transcript.h : utils.h +- +-Transcripts.h : utils.h my_assert.h Transcript.h +- +-rsem-extract-reference-transcripts : utils.h my_assert.h GTFItem.h Transcript.h Transcripts.h extractRef.cpp ++rsem-extract-reference-transcripts : extractRef.cpp + $(CC) -Wall -O3 extractRef.cpp -o rsem-extract-reference-transcripts + +-rsem-synthesis-reference-transcripts : utils.h my_assert.h Transcript.h Transcripts.h synthesisRef.cpp ++rsem-synthesis-reference-transcripts : synthesisRef.cpp + $(CC) -Wall -O3 synthesisRef.cpp -o rsem-synthesis-reference-transcripts + +-BowtieRefSeqPolicy.h : RefSeqPolicy.h +- +-RefSeq.h : utils.h +- +-Refs.h : utils.h RefSeq.h RefSeqPolicy.h PolyARules.h +- +- + rsem-preref : preRef.o + $(CC) preRef.o -o rsem-preref + +-preRef.o : utils.h RefSeq.h Refs.h PolyARules.h RefSeqPolicy.h AlignerRefSeqPolicy.h preRef.cpp ++preRef.o : preRef.cpp + $(CC) $(COFLAGS) preRef.cpp + +- +-SingleRead.h : Read.h +- +-SingleReadQ.h : Read.h +- +-PairedEndRead.h : Read.h SingleRead.h +- +-PairedEndReadQ.h : Read.h SingleReadQ.h +- +- +-PairedEndHit.h : SingleHit.h +- +-HitContainer.h : GroupInfo.h +- +- +-SamParser.h : sam/sam.h sam/bam.h utils.h my_assert.h SingleRead.h SingleReadQ.h PairedEndRead.h PairedEndReadQ.h SingleHit.h PairedEndHit.h Transcripts.h +- +- + rsem-parse-alignments : parseIt.o sam/libbam.a + $(CC) -o rsem-parse-alignments parseIt.o sam/libbam.a -lz -lpthread + +-parseIt.o : utils.h GroupInfo.h Read.h SingleRead.h SingleReadQ.h PairedEndRead.h PairedEndReadQ.h SingleHit.h PairedEndHit.h HitContainer.h SamParser.h Transcripts.h sam/sam.h sam/bam.h parseIt.cpp ++parseIt.o : parseIt.cpp + $(CC) -Wall -O2 -c -I. parseIt.cpp + +- +-rsem-build-read-index : utils.h buildReadIndex.cpp ++rsem-build-read-index : buildReadIndex.cpp + $(CC) -O3 buildReadIndex.cpp -o rsem-build-read-index + +- +-simul.h : boost/random.hpp +- +-ReadReader.h : SingleRead.h SingleReadQ.h PairedEndRead.h PairedEndReadQ.h ReadIndex.h +- +-SingleModel.h : utils.h my_assert.h Orientation.h LenDist.h RSPD.h Profile.h NoiseProfile.h ModelParams.h RefSeq.h Refs.h SingleRead.h SingleHit.h ReadReader.h simul.h +- +-SingleQModel.h : utils.h my_assert.h Orientation.h LenDist.h RSPD.h QualDist.h QProfile.h NoiseQProfile.h ModelParams.h RefSeq.h Refs.h SingleReadQ.h SingleHit.h ReadReader.h simul.h +- +-PairedEndModel.h : utils.h my_assert.h Orientation.h LenDist.h RSPD.h Profile.h NoiseProfile.h ModelParams.h RefSeq.h Refs.h SingleRead.h PairedEndRead.h PairedEndHit.h ReadReader.h simul.h +- +-PairedEndQModel.h : utils.h my_assert.h Orientation.h LenDist.h RSPD.h QualDist.h QProfile.h NoiseQProfile.h ModelParams.h RefSeq.h Refs.h SingleReadQ.h PairedEndReadQ.h PairedEndHit.h ReadReader.h simul.h +- +-HitWrapper.h : HitContainer.h +- +-sam_rsem_aux.h : sam/bam.h +- +-sam_rsem_cvt.h : sam/bam.h Transcript.h Transcripts.h +- +-BamWriter.h : sam/sam.h sam/bam.h sam_rsem_aux.h sam_rsem_cvt.h SingleHit.h PairedEndHit.h HitWrapper.h Transcript.h Transcripts.h +- +-sampling.h : boost/random.hpp +- +-WriteResults.h : utils.h my_assert.h GroupInfo.h Transcript.h Transcripts.h RefSeq.h Refs.h Model.h SingleModel.h SingleQModel.h PairedEndModel.h PairedEndQModel.h +- + rsem-run-em : EM.o sam/libbam.a + $(CC) -o rsem-run-em EM.o sam/libbam.a -lz -lpthread + +-EM.o : utils.h my_assert.h Read.h SingleRead.h SingleReadQ.h PairedEndRead.h PairedEndReadQ.h SingleHit.h PairedEndHit.h Model.h SingleModel.h SingleQModel.h PairedEndModel.h PairedEndQModel.h Refs.h GroupInfo.h HitContainer.h ReadIndex.h ReadReader.h Orientation.h LenDist.h RSPD.h QualDist.h QProfile.h NoiseQProfile.h ModelParams.h RefSeq.h RefSeqPolicy.h PolyARules.h Profile.h NoiseProfile.h Transcript.h Transcripts.h HitWrapper.h BamWriter.h sam/bam.h sam/sam.h simul.h sam_rsem_aux.h sampling.h boost/random.hpp WriteResults.h EM.cpp ++EM.o : EM.cpp + $(CC) $(COFLAGS) EM.cpp + +-bc_aux.h : sam/bam.h +- +-BamConverter.h : utils.h my_assert.h sam/sam.h sam/bam.h sam_rsem_aux.h sam_rsem_cvt.h bc_aux.h Transcript.h Transcripts.h +- +-rsem-tbam2gbam : utils.h Transcripts.h Transcript.h bc_aux.h BamConverter.h sam/sam.h sam/bam.h sam/libbam.a sam_rsem_aux.h sam_rsem_cvt.h tbam2gbam.cpp sam/libbam.a ++rsem-tbam2gbam : tbam2gbam.cpp sam/libbam.a + $(CC) -O3 -Wall tbam2gbam.cpp sam/libbam.a -lz -lpthread -o $@ + +-rsem-bam2wig : utils.h my_assert.h wiggle.h wiggle.o sam/libbam.a bam2wig.cpp ++rsem-bam2wig : wiggle.o sam/libbam.a bam2wig.cpp + $(CC) -O3 -Wall bam2wig.cpp wiggle.o sam/libbam.a -lz -lpthread -o $@ + +-rsem-bam2readdepth : utils.h my_assert.h wiggle.h wiggle.o sam/libbam.a bam2readdepth.cpp ++rsem-bam2readdepth : wiggle.o sam/libbam.a bam2readdepth.cpp + $(CC) -O3 -Wall bam2readdepth.cpp wiggle.o sam/libbam.a -lz -lpthread -o $@ + +-wiggle.o: sam/bam.h sam/sam.h wiggle.cpp wiggle.h ++wiggle.o: wiggle.cpp + $(CC) $(COFLAGS) wiggle.cpp + + rsem-simulate-reads : simulation.o + $(CC) -o rsem-simulate-reads simulation.o + +-simulation.o : utils.h Read.h SingleRead.h SingleReadQ.h PairedEndRead.h PairedEndReadQ.h Model.h SingleModel.h SingleQModel.h PairedEndModel.h PairedEndQModel.h Refs.h RefSeq.h GroupInfo.h Transcript.h Transcripts.h Orientation.h LenDist.h RSPD.h QualDist.h QProfile.h NoiseQProfile.h Profile.h NoiseProfile.h simul.h boost/random.hpp WriteResults.h simulation.cpp ++simulation.o : simulation.cpp + $(CC) $(COFLAGS) simulation.cpp + + rsem-run-gibbs : Gibbs.o + $(CC) -o rsem-run-gibbs Gibbs.o -lpthread + +-#some header files are omitted +-Gibbs.o : utils.h my_assert.h boost/random.hpp sampling.h Model.h SingleModel.h SingleQModel.h PairedEndModel.h PairedEndQModel.h RefSeq.h RefSeqPolicy.h PolyARules.h Refs.h GroupInfo.h WriteResults.h Gibbs.cpp ++Gibbs.o : Gibbs.cpp + $(CC) $(COFLAGS) Gibbs.cpp + +-Buffer.h : my_assert.h +- + rsem-calculate-credibility-intervals : calcCI.o + $(CC) -o rsem-calculate-credibility-intervals calcCI.o -lpthread + +-#some header files are omitted +-calcCI.o : utils.h my_assert.h boost/random.hpp sampling.h Model.h SingleModel.h SingleQModel.h PairedEndModel.h PairedEndQModel.h RefSeq.h RefSeqPolicy.h PolyARules.h Refs.h GroupInfo.h WriteResults.h Buffer.h calcCI.cpp ++calcCI.o : calcCI.cpp + $(CC) $(COFLAGS) calcCI.cpp + +-rsem-get-unique : sam/bam.h sam/sam.h getUnique.cpp sam/libbam.a ++rsem-get-unique : getUnique.cpp sam/libbam.a + $(CC) -O3 -Wall getUnique.cpp sam/libbam.a -lz -lpthread -o $@ + +-rsem-sam-validator : sam/bam.h sam/sam.h my_assert.h samValidator.cpp sam/libbam.a ++rsem-sam-validator : samValidator.cpp sam/libbam.a + $(CC) -O3 -Wall samValidator.cpp sam/libbam.a -lz -lpthread -o $@ + +-rsem-scan-for-paired-end-reads : sam/bam.h sam/sam.h my_assert.h scanForPairedEndReads.cpp sam/libbam.a ++rsem-scan-for-paired-end-reads : scanForPairedEndReads.cpp sam/libbam.a + $(CC) -O3 -Wall scanForPairedEndReads.cpp sam/libbam.a -lz -lpthread -o $@ + + ebseq : + +From ec136638a727632e20abfaeb65c22c46d15ca8c4 Mon Sep 17 00:00:00 2001 +From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> +Date: Wed, 22 Apr 2015 15:06:41 +0200 +Subject: [PATCH 2/7] include current dir, ./sam and ./boost by default + +--- + Makefile | 48 ++++++++++++++++++++++++------------------------ + 1 file changed, 24 insertions(+), 24 deletions(-) + +diff --git a/Makefile b/Makefile +index 3a55ed8..1dd97ca 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,6 +1,6 @@ + CC = g++ +-CFLAGS = -Wall -c -I. +-COFLAGS = -Wall -O3 -ffast-math -c -I. ++CFLAGS = -Wall -I. -I./sam -I./boost ++COFLAGS = -O3 -ffast-math -c + PROGRAMS = rsem-extract-reference-transcripts rsem-synthesis-reference-transcripts rsem-preref rsem-parse-alignments rsem-build-read-index rsem-run-em rsem-tbam2gbam rsem-run-gibbs rsem-calculate-credibility-intervals rsem-simulate-reads rsem-bam2wig rsem-get-unique rsem-bam2readdepth rsem-sam-validator rsem-scan-for-paired-end-reads + + .PHONY : all ebseq clean +@@ -11,70 +11,70 @@ sam/libbam.a : + cd sam ; ${MAKE} all + + rsem-extract-reference-transcripts : extractRef.cpp +- $(CC) -Wall -O3 extractRef.cpp -o rsem-extract-reference-transcripts ++ $(CC) $(CFLAGS) -O3 extractRef.cpp -o rsem-extract-reference-transcripts + + rsem-synthesis-reference-transcripts : synthesisRef.cpp +- $(CC) -Wall -O3 synthesisRef.cpp -o rsem-synthesis-reference-transcripts ++ $(CC) $(CFLAGS) -O3 synthesisRef.cpp -o rsem-synthesis-reference-transcripts + + rsem-preref : preRef.o +- $(CC) preRef.o -o rsem-preref ++ $(CC) $(CFLAGS) preRef.o -o rsem-preref + + preRef.o : preRef.cpp +- $(CC) $(COFLAGS) preRef.cpp ++ $(CC) $(CFLAGS) $(COFLAGS) preRef.cpp + + rsem-parse-alignments : parseIt.o sam/libbam.a +- $(CC) -o rsem-parse-alignments parseIt.o sam/libbam.a -lz -lpthread ++ $(CC) $(CFLAGS) -o rsem-parse-alignments parseIt.o sam/libbam.a -lz -lpthread + + parseIt.o : parseIt.cpp +- $(CC) -Wall -O2 -c -I. parseIt.cpp ++ $(CC) $(CFLAGS) -O2 -c parseIt.cpp + + rsem-build-read-index : buildReadIndex.cpp +- $(CC) -O3 buildReadIndex.cpp -o rsem-build-read-index ++ $(CC) $(CFLAGS) -O3 buildReadIndex.cpp -o rsem-build-read-index + + rsem-run-em : EM.o sam/libbam.a +- $(CC) -o rsem-run-em EM.o sam/libbam.a -lz -lpthread ++ $(CC) $(CFLAGS) -o rsem-run-em EM.o sam/libbam.a -lz -lpthread + + EM.o : EM.cpp +- $(CC) $(COFLAGS) EM.cpp ++ $(CC) $(CFLAGS) $(COFLAGS) EM.cpp + + rsem-tbam2gbam : tbam2gbam.cpp sam/libbam.a +- $(CC) -O3 -Wall tbam2gbam.cpp sam/libbam.a -lz -lpthread -o $@ ++ $(CC) $(CFLAGS) -O3 tbam2gbam.cpp sam/libbam.a -lz -lpthread -o $@ + + rsem-bam2wig : wiggle.o sam/libbam.a bam2wig.cpp +- $(CC) -O3 -Wall bam2wig.cpp wiggle.o sam/libbam.a -lz -lpthread -o $@ ++ $(CC) $(CFLAGS) -O3 bam2wig.cpp wiggle.o sam/libbam.a -lz -lpthread -o $@ + + rsem-bam2readdepth : wiggle.o sam/libbam.a bam2readdepth.cpp +- $(CC) -O3 -Wall bam2readdepth.cpp wiggle.o sam/libbam.a -lz -lpthread -o $@ ++ $(CC) $(CFLAGS) -O3 bam2readdepth.cpp wiggle.o sam/libbam.a -lz -lpthread -o $@ + + wiggle.o: wiggle.cpp +- $(CC) $(COFLAGS) wiggle.cpp ++ $(CC) $(CFLAGS) $(COFLAGS) wiggle.cpp + + rsem-simulate-reads : simulation.o +- $(CC) -o rsem-simulate-reads simulation.o ++ $(CC) $(CFLAGS) -o rsem-simulate-reads simulation.o + + simulation.o : simulation.cpp +- $(CC) $(COFLAGS) simulation.cpp ++ $(CC) $(CFLAGS) $(COFLAGS) simulation.cpp + + rsem-run-gibbs : Gibbs.o +- $(CC) -o rsem-run-gibbs Gibbs.o -lpthread ++ $(CC) $(CFLAGS) -o rsem-run-gibbs Gibbs.o -lpthread + + Gibbs.o : Gibbs.cpp +- $(CC) $(COFLAGS) Gibbs.cpp ++ $(CC) $(CFLAGS) $(COFLAGS) Gibbs.cpp + + rsem-calculate-credibility-intervals : calcCI.o +- $(CC) -o rsem-calculate-credibility-intervals calcCI.o -lpthread ++ $(CC) $(CFLAGS) -o rsem-calculate-credibility-intervals calcCI.o -lpthread + + calcCI.o : calcCI.cpp +- $(CC) $(COFLAGS) calcCI.cpp ++ $(CC) $(CFLAGS) $(COFLAGS) calcCI.cpp + + rsem-get-unique : getUnique.cpp sam/libbam.a +- $(CC) -O3 -Wall getUnique.cpp sam/libbam.a -lz -lpthread -o $@ ++ $(CC) $(CFLAGS) -O3 getUnique.cpp sam/libbam.a -lz -lpthread -o $@ + + rsem-sam-validator : samValidator.cpp sam/libbam.a +- $(CC) -O3 -Wall samValidator.cpp sam/libbam.a -lz -lpthread -o $@ ++ $(CC) $(CFLAGS) -O3 samValidator.cpp sam/libbam.a -lz -lpthread -o $@ + + rsem-scan-for-paired-end-reads : scanForPairedEndReads.cpp sam/libbam.a +- $(CC) -O3 -Wall scanForPairedEndReads.cpp sam/libbam.a -lz -lpthread -o $@ ++ $(CC) $(CFLAGS) -O3 scanForPairedEndReads.cpp sam/libbam.a -lz -lpthread -o $@ + + ebseq : + cd EBSeq ; ${MAKE} all + +From d366614ea50f79fdd93e3c76383ccb6fcdeaa8e0 Mon Sep 17 00:00:00 2001 +From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> +Date: Wed, 22 Apr 2015 15:10:49 +0200 +Subject: [PATCH 3/7] separate object rules from rules for executables + +--- + Makefile | 50 ++++++++++++++++++++++++++------------------------ + 1 file changed, 26 insertions(+), 24 deletions(-) + +diff --git a/Makefile b/Makefile +index 1dd97ca..ae4de3b 100644 +--- a/Makefile ++++ b/Makefile +@@ -10,6 +10,32 @@ all : $(PROGRAMS) + sam/libbam.a : + cd sam ; ${MAKE} all + ++ebseq : ++ cd EBSeq ; ${MAKE} all ++ ++ ++calcCI.o : calcCI.cpp ++ $(CC) $(CFLAGS) $(COFLAGS) calcCI.cpp ++ ++EM.o : EM.cpp ++ $(CC) $(CFLAGS) $(COFLAGS) EM.cpp ++ ++Gibbs.o : Gibbs.cpp ++ $(CC) $(CFLAGS) $(COFLAGS) Gibbs.cpp ++ ++preRef.o : preRef.cpp ++ $(CC) $(CFLAGS) $(COFLAGS) preRef.cpp ++ ++parseIt.o : parseIt.cpp ++ $(CC) $(CFLAGS) -O2 -c parseIt.cpp ++ ++simulation.o : simulation.cpp ++ $(CC) $(CFLAGS) $(COFLAGS) simulation.cpp ++ ++wiggle.o: wiggle.cpp ++ $(CC) $(CFLAGS) $(COFLAGS) wiggle.cpp ++ ++ + rsem-extract-reference-transcripts : extractRef.cpp + $(CC) $(CFLAGS) -O3 extractRef.cpp -o rsem-extract-reference-transcripts + +@@ -19,24 +45,15 @@ rsem-synthesis-reference-transcripts : synthesisRef.cpp + rsem-preref : preRef.o + $(CC) $(CFLAGS) preRef.o -o rsem-preref + +-preRef.o : preRef.cpp +- $(CC) $(CFLAGS) $(COFLAGS) preRef.cpp +- + rsem-parse-alignments : parseIt.o sam/libbam.a + $(CC) $(CFLAGS) -o rsem-parse-alignments parseIt.o sam/libbam.a -lz -lpthread + +-parseIt.o : parseIt.cpp +- $(CC) $(CFLAGS) -O2 -c parseIt.cpp +- + rsem-build-read-index : buildReadIndex.cpp + $(CC) $(CFLAGS) -O3 buildReadIndex.cpp -o rsem-build-read-index + + rsem-run-em : EM.o sam/libbam.a + $(CC) $(CFLAGS) -o rsem-run-em EM.o sam/libbam.a -lz -lpthread + +-EM.o : EM.cpp +- $(CC) $(CFLAGS) $(COFLAGS) EM.cpp +- + rsem-tbam2gbam : tbam2gbam.cpp sam/libbam.a + $(CC) $(CFLAGS) -O3 tbam2gbam.cpp sam/libbam.a -lz -lpthread -o $@ + +@@ -46,27 +63,15 @@ rsem-bam2wig : wiggle.o sam/libbam.a bam2wig.cpp + rsem-bam2readdepth : wiggle.o sam/libbam.a bam2readdepth.cpp + $(CC) $(CFLAGS) -O3 bam2readdepth.cpp wiggle.o sam/libbam.a -lz -lpthread -o $@ + +-wiggle.o: wiggle.cpp +- $(CC) $(CFLAGS) $(COFLAGS) wiggle.cpp +- + rsem-simulate-reads : simulation.o + $(CC) $(CFLAGS) -o rsem-simulate-reads simulation.o + +-simulation.o : simulation.cpp +- $(CC) $(CFLAGS) $(COFLAGS) simulation.cpp +- + rsem-run-gibbs : Gibbs.o + $(CC) $(CFLAGS) -o rsem-run-gibbs Gibbs.o -lpthread + +-Gibbs.o : Gibbs.cpp +- $(CC) $(CFLAGS) $(COFLAGS) Gibbs.cpp +- + rsem-calculate-credibility-intervals : calcCI.o + $(CC) $(CFLAGS) -o rsem-calculate-credibility-intervals calcCI.o -lpthread + +-calcCI.o : calcCI.cpp +- $(CC) $(CFLAGS) $(COFLAGS) calcCI.cpp +- + rsem-get-unique : getUnique.cpp sam/libbam.a + $(CC) $(CFLAGS) -O3 getUnique.cpp sam/libbam.a -lz -lpthread -o $@ + +@@ -76,9 +81,6 @@ rsem-sam-validator : samValidator.cpp sam/libbam.a + rsem-scan-for-paired-end-reads : scanForPairedEndReads.cpp sam/libbam.a + $(CC) $(CFLAGS) -O3 scanForPairedEndReads.cpp sam/libbam.a -lz -lpthread -o $@ + +-ebseq : +- cd EBSeq ; ${MAKE} all +- + clean : + rm -f *.o *~ $(PROGRAMS) + cd sam ; ${MAKE} clean + +From 6ba1c33cccdf7c8e7df7a3189e7db204be3b1e8d Mon Sep 17 00:00:00 2001 +From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> +Date: Wed, 22 Apr 2015 15:28:30 +0200 +Subject: [PATCH 4/7] add ./sam to library directories, link with -lbam + +--- + Makefile | 36 ++++++++++++++++++------------------ + 1 file changed, 18 insertions(+), 18 deletions(-) + +diff --git a/Makefile b/Makefile +index ae4de3b..a87cc4d 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,11 +1,11 @@ + CC = g++ +-CFLAGS = -Wall -I. -I./sam -I./boost ++CFLAGS = -Wall -I. -I./sam -I./boost -L./sam + COFLAGS = -O3 -ffast-math -c + PROGRAMS = rsem-extract-reference-transcripts rsem-synthesis-reference-transcripts rsem-preref rsem-parse-alignments rsem-build-read-index rsem-run-em rsem-tbam2gbam rsem-run-gibbs rsem-calculate-credibility-intervals rsem-simulate-reads rsem-bam2wig rsem-get-unique rsem-bam2readdepth rsem-sam-validator rsem-scan-for-paired-end-reads + + .PHONY : all ebseq clean + +-all : $(PROGRAMS) ++all : sam/libbam.a $(PROGRAMS) + + sam/libbam.a : + cd sam ; ${MAKE} all +@@ -45,23 +45,23 @@ rsem-synthesis-reference-transcripts : synthesisRef.cpp + rsem-preref : preRef.o + $(CC) $(CFLAGS) preRef.o -o rsem-preref + +-rsem-parse-alignments : parseIt.o sam/libbam.a +- $(CC) $(CFLAGS) -o rsem-parse-alignments parseIt.o sam/libbam.a -lz -lpthread ++rsem-parse-alignments : parseIt.o ++ $(CC) $(CFLAGS) -o rsem-parse-alignments parseIt.o -lbam -lz -lpthread + + rsem-build-read-index : buildReadIndex.cpp + $(CC) $(CFLAGS) -O3 buildReadIndex.cpp -o rsem-build-read-index + +-rsem-run-em : EM.o sam/libbam.a +- $(CC) $(CFLAGS) -o rsem-run-em EM.o sam/libbam.a -lz -lpthread ++rsem-run-em : EM.o ++ $(CC) $(CFLAGS) -o rsem-run-em EM.o -lbam -lz -lpthread + +-rsem-tbam2gbam : tbam2gbam.cpp sam/libbam.a +- $(CC) $(CFLAGS) -O3 tbam2gbam.cpp sam/libbam.a -lz -lpthread -o $@ ++rsem-tbam2gbam : tbam2gbam.cpp ++ $(CC) $(CFLAGS) -O3 tbam2gbam.cpp -lbam -lz -lpthread -o $@ + +-rsem-bam2wig : wiggle.o sam/libbam.a bam2wig.cpp +- $(CC) $(CFLAGS) -O3 bam2wig.cpp wiggle.o sam/libbam.a -lz -lpthread -o $@ ++rsem-bam2wig : wiggle.o bam2wig.cpp ++ $(CC) $(CFLAGS) -O3 bam2wig.cpp wiggle.o -lbam -lz -lpthread -o $@ + +-rsem-bam2readdepth : wiggle.o sam/libbam.a bam2readdepth.cpp +- $(CC) $(CFLAGS) -O3 bam2readdepth.cpp wiggle.o sam/libbam.a -lz -lpthread -o $@ ++rsem-bam2readdepth : wiggle.o bam2readdepth.cpp ++ $(CC) $(CFLAGS) -O3 bam2readdepth.cpp wiggle.o -lbam -lz -lpthread -o $@ + + rsem-simulate-reads : simulation.o + $(CC) $(CFLAGS) -o rsem-simulate-reads simulation.o +@@ -72,14 +72,14 @@ rsem-run-gibbs : Gibbs.o + rsem-calculate-credibility-intervals : calcCI.o + $(CC) $(CFLAGS) -o rsem-calculate-credibility-intervals calcCI.o -lpthread + +-rsem-get-unique : getUnique.cpp sam/libbam.a +- $(CC) $(CFLAGS) -O3 getUnique.cpp sam/libbam.a -lz -lpthread -o $@ ++rsem-get-unique : getUnique.cpp ++ $(CC) $(CFLAGS) -O3 getUnique.cpp -lbam -lz -lpthread -o $@ + +-rsem-sam-validator : samValidator.cpp sam/libbam.a +- $(CC) $(CFLAGS) -O3 samValidator.cpp sam/libbam.a -lz -lpthread -o $@ ++rsem-sam-validator : samValidator.cpp ++ $(CC) $(CFLAGS) -O3 samValidator.cpp -lbam -lz -lpthread -o $@ + +-rsem-scan-for-paired-end-reads : scanForPairedEndReads.cpp sam/libbam.a +- $(CC) $(CFLAGS) -O3 scanForPairedEndReads.cpp sam/libbam.a -lz -lpthread -o $@ ++rsem-scan-for-paired-end-reads : scanForPairedEndReads.cpp ++ $(CC) $(CFLAGS) -O3 scanForPairedEndReads.cpp -lbam -lz -lpthread -o $@ + + clean : + rm -f *.o *~ $(PROGRAMS) + +From 5402b88c269df79ee245c1c59e15f3c8282a0220 Mon Sep 17 00:00:00 2001 +From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> +Date: Wed, 22 Apr 2015 15:33:02 +0200 +Subject: [PATCH 5/7] do not repeat target name, use $@ instead + +--- + Makefile | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +diff --git a/Makefile b/Makefile +index a87cc4d..7ec90a3 100644 +--- a/Makefile ++++ b/Makefile +@@ -37,22 +37,22 @@ wiggle.o: wiggle.cpp + + + rsem-extract-reference-transcripts : extractRef.cpp +- $(CC) $(CFLAGS) -O3 extractRef.cpp -o rsem-extract-reference-transcripts ++ $(CC) $(CFLAGS) -O3 extractRef.cpp -o $@ + + rsem-synthesis-reference-transcripts : synthesisRef.cpp +- $(CC) $(CFLAGS) -O3 synthesisRef.cpp -o rsem-synthesis-reference-transcripts ++ $(CC) $(CFLAGS) -O3 synthesisRef.cpp -o $@ + + rsem-preref : preRef.o +- $(CC) $(CFLAGS) preRef.o -o rsem-preref ++ $(CC) $(CFLAGS) preRef.o -o $@ + + rsem-parse-alignments : parseIt.o +- $(CC) $(CFLAGS) -o rsem-parse-alignments parseIt.o -lbam -lz -lpthread ++ $(CC) $(CFLAGS) -o $@ parseIt.o -lbam -lz -lpthread + + rsem-build-read-index : buildReadIndex.cpp +- $(CC) $(CFLAGS) -O3 buildReadIndex.cpp -o rsem-build-read-index ++ $(CC) $(CFLAGS) -O3 buildReadIndex.cpp -o $@ + + rsem-run-em : EM.o +- $(CC) $(CFLAGS) -o rsem-run-em EM.o -lbam -lz -lpthread ++ $(CC) $(CFLAGS) -o $@ EM.o -lbam -lz -lpthread + + rsem-tbam2gbam : tbam2gbam.cpp + $(CC) $(CFLAGS) -O3 tbam2gbam.cpp -lbam -lz -lpthread -o $@ +@@ -64,13 +64,13 @@ rsem-bam2readdepth : wiggle.o bam2readdepth.cpp + $(CC) $(CFLAGS) -O3 bam2readdepth.cpp wiggle.o -lbam -lz -lpthread -o $@ + + rsem-simulate-reads : simulation.o +- $(CC) $(CFLAGS) -o rsem-simulate-reads simulation.o ++ $(CC) $(CFLAGS) -o $@ simulation.o + + rsem-run-gibbs : Gibbs.o +- $(CC) $(CFLAGS) -o rsem-run-gibbs Gibbs.o -lpthread ++ $(CC) $(CFLAGS) -o $@ Gibbs.o -lpthread + + rsem-calculate-credibility-intervals : calcCI.o +- $(CC) $(CFLAGS) -o rsem-calculate-credibility-intervals calcCI.o -lpthread ++ $(CC) $(CFLAGS) -o $@ calcCI.o -lpthread + + rsem-get-unique : getUnique.cpp + $(CC) $(CFLAGS) -O3 getUnique.cpp -lbam -lz -lpthread -o $@ + +From f60784bc7aa303cc825bd87dd3f5d7d26c51bded Mon Sep 17 00:00:00 2001 +From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> +Date: Wed, 22 Apr 2015 15:44:53 +0200 +Subject: [PATCH 6/7] use automatic variables to refer to prerequisites + +--- + Makefile | 44 ++++++++++++++++++++++---------------------- + 1 file changed, 22 insertions(+), 22 deletions(-) + +diff --git a/Makefile b/Makefile +index 7ec90a3..6540d81 100644 +--- a/Makefile ++++ b/Makefile +@@ -15,71 +15,71 @@ ebseq : + + + calcCI.o : calcCI.cpp +- $(CC) $(CFLAGS) $(COFLAGS) calcCI.cpp ++ $(CC) $(CFLAGS) $(COFLAGS) $< + + EM.o : EM.cpp +- $(CC) $(CFLAGS) $(COFLAGS) EM.cpp ++ $(CC) $(CFLAGS) $(COFLAGS) $< + + Gibbs.o : Gibbs.cpp +- $(CC) $(CFLAGS) $(COFLAGS) Gibbs.cpp ++ $(CC) $(CFLAGS) $(COFLAGS) $< + + preRef.o : preRef.cpp +- $(CC) $(CFLAGS) $(COFLAGS) preRef.cpp ++ $(CC) $(CFLAGS) $(COFLAGS) $< + + parseIt.o : parseIt.cpp +- $(CC) $(CFLAGS) -O2 -c parseIt.cpp ++ $(CC) $(CFLAGS) -O2 -c $< + + simulation.o : simulation.cpp +- $(CC) $(CFLAGS) $(COFLAGS) simulation.cpp ++ $(CC) $(CFLAGS) $(COFLAGS) $< + + wiggle.o: wiggle.cpp +- $(CC) $(CFLAGS) $(COFLAGS) wiggle.cpp ++ $(CC) $(CFLAGS) $(COFLAGS) $< + + + rsem-extract-reference-transcripts : extractRef.cpp +- $(CC) $(CFLAGS) -O3 extractRef.cpp -o $@ ++ $(CC) $(CFLAGS) -O3 $< -o $@ + + rsem-synthesis-reference-transcripts : synthesisRef.cpp +- $(CC) $(CFLAGS) -O3 synthesisRef.cpp -o $@ ++ $(CC) $(CFLAGS) -O3 $< -o $@ + + rsem-preref : preRef.o +- $(CC) $(CFLAGS) preRef.o -o $@ ++ $(CC) $(CFLAGS) $< -o $@ + + rsem-parse-alignments : parseIt.o +- $(CC) $(CFLAGS) -o $@ parseIt.o -lbam -lz -lpthread ++ $(CC) $(CFLAGS) -o $@ $< -lbam -lz -lpthread + + rsem-build-read-index : buildReadIndex.cpp +- $(CC) $(CFLAGS) -O3 buildReadIndex.cpp -o $@ ++ $(CC) $(CFLAGS) -O3 $< -o $@ + + rsem-run-em : EM.o +- $(CC) $(CFLAGS) -o $@ EM.o -lbam -lz -lpthread ++ $(CC) $(CFLAGS) -o $@ $< -lbam -lz -lpthread + + rsem-tbam2gbam : tbam2gbam.cpp +- $(CC) $(CFLAGS) -O3 tbam2gbam.cpp -lbam -lz -lpthread -o $@ ++ $(CC) $(CFLAGS) -O3 $< -lbam -lz -lpthread -o $@ + + rsem-bam2wig : wiggle.o bam2wig.cpp +- $(CC) $(CFLAGS) -O3 bam2wig.cpp wiggle.o -lbam -lz -lpthread -o $@ ++ $(CC) $(CFLAGS) -O3 $^ -lbam -lz -lpthread -o $@ + + rsem-bam2readdepth : wiggle.o bam2readdepth.cpp +- $(CC) $(CFLAGS) -O3 bam2readdepth.cpp wiggle.o -lbam -lz -lpthread -o $@ ++ $(CC) $(CFLAGS) -O3 $^ -lbam -lz -lpthread -o $@ + + rsem-simulate-reads : simulation.o +- $(CC) $(CFLAGS) -o $@ simulation.o ++ $(CC) $(CFLAGS) -o $@ $< + + rsem-run-gibbs : Gibbs.o +- $(CC) $(CFLAGS) -o $@ Gibbs.o -lpthread ++ $(CC) $(CFLAGS) -o $@ $< -lpthread + + rsem-calculate-credibility-intervals : calcCI.o +- $(CC) $(CFLAGS) -o $@ calcCI.o -lpthread ++ $(CC) $(CFLAGS) -o $@ $< -lpthread + + rsem-get-unique : getUnique.cpp +- $(CC) $(CFLAGS) -O3 getUnique.cpp -lbam -lz -lpthread -o $@ ++ $(CC) $(CFLAGS) -O3 $< -lbam -lz -lpthread -o $@ + + rsem-sam-validator : samValidator.cpp +- $(CC) $(CFLAGS) -O3 samValidator.cpp -lbam -lz -lpthread -o $@ ++ $(CC) $(CFLAGS) -O3 $< -lbam -lz -lpthread -o $@ + + rsem-scan-for-paired-end-reads : scanForPairedEndReads.cpp +- $(CC) $(CFLAGS) -O3 scanForPairedEndReads.cpp -lbam -lz -lpthread -o $@ ++ $(CC) $(CFLAGS) -O3 $< -lbam -lz -lpthread -o $@ + + clean : + rm -f *.o *~ $(PROGRAMS) + +From 0cf9721077f67fb4ca15fdc59cbfbf24a944debd Mon Sep 17 00:00:00 2001 +From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> +Date: Wed, 22 Apr 2015 15:49:19 +0200 +Subject: [PATCH 7/7] split long line + +--- + Makefile | 17 ++++++++++++++++- + 1 file changed, 16 insertions(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 6540d81..0ab04a5 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,7 +1,22 @@ + CC = g++ + CFLAGS = -Wall -I. -I./sam -I./boost -L./sam + COFLAGS = -O3 -ffast-math -c +-PROGRAMS = rsem-extract-reference-transcripts rsem-synthesis-reference-transcripts rsem-preref rsem-parse-alignments rsem-build-read-index rsem-run-em rsem-tbam2gbam rsem-run-gibbs rsem-calculate-credibility-intervals rsem-simulate-reads rsem-bam2wig rsem-get-unique rsem-bam2readdepth rsem-sam-validator rsem-scan-for-paired-end-reads ++PROGRAMS = \ ++ rsem-extract-reference-transcripts \ ++ rsem-synthesis-reference-transcripts \ ++ rsem-preref \ ++ rsem-parse-alignments \ ++ rsem-build-read-index \ ++ rsem-run-em \ ++ rsem-tbam2gbam \ ++ rsem-run-gibbs \ ++ rsem-calculate-credibility-intervals \ ++ rsem-simulate-reads \ ++ rsem-bam2wig \ ++ rsem-get-unique \ ++ rsem-bam2readdepth \ ++ rsem-sam-validator \ ++ rsem-scan-for-paired-end-reads + + .PHONY : all ebseq clean + diff --git a/gnu/packages/patches/serf-comment-style-fix.patch b/gnu/packages/patches/serf-comment-style-fix.patch new file mode 100644 index 0000000000..5d336fb3c8 --- /dev/null +++ b/gnu/packages/patches/serf-comment-style-fix.patch @@ -0,0 +1,23 @@ +r2443 | andreas.stieger@gmx.de | 2014-10-21 17:42:56 -0400 (Tue, 21 Oct 2014) | 7 lines + +Follow-up to r2419: Correct comment style + +* test/test_buckets.c + (deflate_compress): Correct comment style not supported by strict + compilers, fails on /branches/1.3.x + +Index: test/test_buckets.c +=================================================================== +--- test/test_buckets.c (revision 2442) ++++ test/test_buckets.c (revision 2443) +@@ -1323,9 +1323,9 @@ + + /* The largest buffer we should need is 0.1% larger than the + uncompressed data, + 12 bytes. This info comes from zlib.h. ++ buf_size = orig_len + (orig_len / 1000) + 12; + Note: This isn't sufficient when using Z_NO_FLUSH and extremely compressed + data. Use a buffer bigger than what we need. */ +-// buf_size = orig_len + (orig_len / 1000) + 12; + buf_size = 100000; + + write_buf = apr_palloc(pool, buf_size); diff --git a/gnu/packages/patches/serf-deflate-buckets-test-fix.patch b/gnu/packages/patches/serf-deflate-buckets-test-fix.patch new file mode 100644 index 0000000000..be8be1b1e8 --- /dev/null +++ b/gnu/packages/patches/serf-deflate-buckets-test-fix.patch @@ -0,0 +1,69 @@ +r2445 | chemodax | 2014-10-23 12:15:22 -0400 (Thu, 23 Oct 2014) | 6 lines + +Reduce memory usage by deflate buckets test. + +* test/test_buckets.c + (deflate_buckets): Add POOL argument and use it instead of tb->pool. + (test_deflate_buckets): Use iterpool for deflate_buckets() call. + +Index: test/test_buckets.c +=================================================================== +--- test/test_buckets.c (revision 2444) ++++ test/test_buckets.c (revision 2445) +@@ -1400,12 +1400,12 @@ + expected_len); + } + +-static void deflate_buckets(CuTest *tc, int nr_of_loops) ++static void deflate_buckets(CuTest *tc, int nr_of_loops, apr_pool_t *pool) + { + const char *msg = "12345678901234567890123456789012345678901234567890"; + + test_baton_t *tb = tc->testBaton; +- serf_bucket_alloc_t *alloc = serf_bucket_allocator_create(tb->pool, NULL, ++ serf_bucket_alloc_t *alloc = serf_bucket_allocator_create(pool, NULL, + NULL); + z_stream zdestr; + int i; +@@ -1424,8 +1424,8 @@ + { + serf_config_t *config; + +- serf_context_t *ctx = serf_context_create(tb->pool); +- /* status = */ serf__config_store_get_config(ctx, NULL, &config, tb->pool); ++ serf_context_t *ctx = serf_context_create(pool); ++ /* status = */ serf__config_store_get_config(ctx, NULL, &config, pool); + + serf_bucket_set_config(defbkt, config); + } +@@ -1447,11 +1447,11 @@ + if (i == nr_of_loops - 1) { + CuAssertIntEquals(tc, APR_SUCCESS, + deflate_compress(&data, &len, &zdestr, msg, +- strlen(msg), 1, tb->pool)); ++ strlen(msg), 1, pool)); + } else { + CuAssertIntEquals(tc, APR_SUCCESS, + deflate_compress(&data, &len, &zdestr, msg, +- strlen(msg), 0, tb->pool)); ++ strlen(msg), 0, pool)); + } + + if (len == 0) +@@ -1469,10 +1469,15 @@ + static void test_deflate_buckets(CuTest *tc) + { + int i; ++ apr_pool_t *iterpool; ++ test_baton_t *tb = tc->testBaton; + ++ apr_pool_create(&iterpool, tb->pool); + for (i = 1; i < 1000; i++) { +- deflate_buckets(tc, i); ++ apr_pool_clear(iterpool); ++ deflate_buckets(tc, i, iterpool); + } ++ apr_pool_destroy(iterpool); + } + + static apr_status_t discard_data(serf_bucket_t *bkt, diff --git a/gnu/packages/patches/source-highlight-regexrange-test.patch b/gnu/packages/patches/source-highlight-regexrange-test.patch deleted file mode 100644 index 298c831b35..0000000000 --- a/gnu/packages/patches/source-highlight-regexrange-test.patch +++ /dev/null @@ -1,15 +0,0 @@ -Disable a single check. The failure is discussed at: - - https://savannah.gnu.org/bugs/index.php?41786 - ---- a/lib/tests/test_regexranges_main.cpp 2012-04-14 08:58:25.000000000 -0500 -+++ b/lib/tests/test_regexranges_main.cpp 2014-03-05 23:49:23.520402043 -0600 -@@ -52,7 +52,7 @@ - check_range_regex("simple regex"); - check_range_regex("[[:alpha:]]+"); - // test with a wrong regular expression -- check_range_regex("{notclosed", false); -+ // check_range_regex("{notclosed", false); - - // reset regular expressions - ranges.clear(); diff --git a/gnu/packages/patches/subversion-sqlite-3.8.9-fix.patch b/gnu/packages/patches/subversion-sqlite-3.8.9-fix.patch new file mode 100644 index 0000000000..92d8a85c8f --- /dev/null +++ b/gnu/packages/patches/subversion-sqlite-3.8.9-fix.patch @@ -0,0 +1,59 @@ +This upstream patch (r1672295) is needed to fix a test failure when built +against sqlite 3.8.9. See: + + https://mail-archives.apache.org/mod_mbox/subversion-dev/201504.mbox/%3C5526D197.6020808@gmx.de%3E + + +r1672295 | rhuijben | 2015-04-09 07:31:12 -0400 (Thu, 09 Apr 2015) | 15 lines + +Optimize STMT_SELECT_EXTERNALS_DEFINED when using Sqlite 3.8.9, by +adding two more rows to the sqlite_stat1 table. + +This fixes a test failure in wc-queries-test.c, but actual users most +likely don't notice a difference as a tablescan on an EXTERNALS tables +index is not that expensive, given that most working copies don't have +many externals. + +* subversion/libsvn_wc/wc-metadata.sql + (STMT_INSTALL_SCHEMA_STATISTICS): Add two rows. + +* subversion/tests/libsvn_wc/wc-queries-test.c + (test_schema_statistics): Add a dummy externals row to allow + verifying schema. + +Index: subversion/tests/libsvn_wc/wc-queries-test.c +=================================================================== +--- subversion/tests/libsvn_wc/wc-queries-test.c (revision 1672294) ++++ subversion/tests/libsvn_wc/wc-queries-test.c (revision 1672295) +@@ -927,6 +927,15 @@ + "VALUES (1, '', '')", + NULL, NULL, NULL)); + ++ SQLITE_ERR( ++ sqlite3_exec(sdb, ++ "INSERT INTO EXTERNALS (wc_id, local_relpath," ++ " parent_relpath, repos_id," ++ " presence, kind, def_local_relpath," ++ " def_repos_relpath) " ++ "VALUES (1, 'subdir', '', 1, 'normal', 'dir', '', '')", ++ NULL, NULL, NULL)); ++ + /* These are currently not necessary for query optimization, but it's better + to tell Sqlite how we intend to use this table anyway */ + SQLITE_ERR( +Index: subversion/libsvn_wc/wc-metadata.sql +=================================================================== +--- subversion/libsvn_wc/wc-metadata.sql (revision 1672294) ++++ subversion/libsvn_wc/wc-metadata.sql (revision 1672295) +@@ -619,6 +619,11 @@ + INSERT OR REPLACE INTO sqlite_stat1(tbl, idx, stat) VALUES + ('WC_LOCK', 'sqlite_autoindex_WC_LOCK_1', '100 100 1'); + ++INSERT OR REPLACE INTO sqlite_stat1(tbl, idx, stat) VALUES ++ ('EXTERNALS','sqlite_autoindex_EXTERNALS_1', '100 100 1'); ++INSERT OR REPLACE INTO sqlite_stat1(tbl, idx, stat) VALUES ++ ('EXTERNALS','I_EXTERNALS_DEFINED', '100 100 3 1'); ++ + /* sqlite_autoindex_WORK_QUEUE_1 doesn't exist because WORK_QUEUE is + a INTEGER PRIMARY KEY AUTOINCREMENT table */ + diff --git a/gnu/packages/patches/tvtime-gcc41.patch b/gnu/packages/patches/tvtime-gcc41.patch new file mode 100644 index 0000000000..d6e42721b8 --- /dev/null +++ b/gnu/packages/patches/tvtime-gcc41.patch @@ -0,0 +1,58 @@ +Source: https://projects.archlinux.org/svntogit/community.git/tree/trunk/tvtime-1.0.2-gcc41.patch?h=packages/tvtime + +--- tvtime-1.0.1/plugins/greedyh.asm 2005-08-14 18:16:43.000000000 +0200 ++++ tvtime-1.0.1-gcc41/plugins/greedyh.asm 2005-11-28 17:53:09.210774544 +0100 +@@ -18,7 +18,7 @@ + + #include "x86-64_macros.inc" + +-void DScalerFilterGreedyH::FUNCT_NAME(TDeinterlaceInfo* pInfo) ++void FUNCT_NAME(TDeinterlaceInfo* pInfo) + { + int64_t i; + bool InfoIsOdd = (pInfo->PictureHistory[0]->Flags & PICTURE_INTERLACED_ODD) ? 1 : 0; +diff -Naur tvtime-1.0.1/plugins/tomsmocomp/TomsMoCompAll2.inc tvtime-1.0.1-gcc41/plugins/tomsmocomp/TomsMoCompAll2.inc +--- tvtime-1.0.1/plugins/tomsmocomp/TomsMoCompAll2.inc 2004-10-20 17:31:05.000000000 +0200 ++++ tvtime-1.0.1-gcc41/plugins/tomsmocomp/TomsMoCompAll2.inc 2005-11-28 17:53:33.251119856 +0100 +@@ -5,9 +5,9 @@ + #endif + + #ifdef USE_STRANGE_BOB +-#define SEARCH_EFFORT_FUNC(n) DScalerFilterTomsMoComp::SEFUNC(n##_SB) ++#define SEARCH_EFFORT_FUNC(n) SEFUNC(n##_SB) + #else +-#define SEARCH_EFFORT_FUNC(n) DScalerFilterTomsMoComp::SEFUNC(n) ++#define SEARCH_EFFORT_FUNC(n) SEFUNC(n) + #endif + + int SEARCH_EFFORT_FUNC(0) // we don't try at all ;-) +diff -Naur tvtime-1.0.1/plugins/tomsmocomp.cpp tvtime-1.0.1-gcc41/plugins/tomsmocomp.cpp +--- tvtime-1.0.1/plugins/tomsmocomp.cpp 2004-10-20 19:38:04.000000000 +0200 ++++ tvtime-1.0.1-gcc41/plugins/tomsmocomp.cpp 2005-11-28 17:52:53.862107896 +0100 +@@ -31,7 +31,7 @@ + + #define IS_MMX + #define SSE_TYPE MMX +-#define FUNCT_NAME DScalerFilterTomsMoComp::filterDScaler_MMX ++#define FUNCT_NAME filterDScaler_MMX + #include "tomsmocomp/TomsMoCompAll.inc" + #undef IS_MMX + #undef SSE_TYPE +@@ -39,7 +39,7 @@ + + #define IS_3DNOW + #define SSE_TYPE 3DNOW +-#define FUNCT_NAME DScalerFilterTomsMoComp::filterDScaler_3DNOW ++#define FUNCT_NAME filterDScaler_3DNOW + #include "tomsmocomp/TomsMoCompAll.inc" + #undef IS_3DNOW + #undef SSE_TYPE +@@ -47,7 +47,7 @@ + + #define IS_SSE + #define SSE_TYPE SSE +-#define FUNCT_NAME DScalerFilterTomsMoComp::filterDScaler_SSE ++#define FUNCT_NAME filterDScaler_SSE + #include "tomsmocomp/TomsMoCompAll.inc" + #undef IS_SSE + #undef SSE_TYPE diff --git a/gnu/packages/patches/tvtime-pngoutput.patch b/gnu/packages/patches/tvtime-pngoutput.patch new file mode 100644 index 0000000000..0d14f77ca1 --- /dev/null +++ b/gnu/packages/patches/tvtime-pngoutput.patch @@ -0,0 +1,15 @@ +Source: https://sources.debian.net/src/tvtime/1.0.2-14/debian/patches/libpng.diff + +From: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> +Date: Mon, 14 May 2012 19:01:31 +0900 +Prepares the package for libpng 1.5. Closes: #650582. + +--- tvtime-1.0.2.orig/src/pngoutput.c ++++ tvtime-1.0.2/src/pngoutput.c +@@ -18,5 +18,6 @@ + + #include <stdio.h> + #include <stdlib.h> ++#include <zlib.h> + #include <png.h> + #include "pngoutput.h" diff --git a/gnu/packages/patches/tvtime-videodev2.patch b/gnu/packages/patches/tvtime-videodev2.patch new file mode 100644 index 0000000000..74131f25d0 --- /dev/null +++ b/gnu/packages/patches/tvtime-videodev2.patch @@ -0,0 +1,15 @@ +Fix compilation error: non-existing header file. + +This is an excerpt from the debian patch: +http://http.debian.net/debian/pool/main/t/tvtime/tvtime_1.0.2-14.diff.gz + +--- tvtime-1.0.2.orig/src/videodev2.h ++++ tvtime-1.0.2/src/videodev2.h +@@ -16,7 +16,6 @@ + #ifdef __KERNEL__ + #include <linux/time.h> /* need struct timeval */ + #endif +-#include <linux/compiler.h> /* need __user */ + + /* for kernel versions 2.4.26 and below: */ + #ifndef __user diff --git a/gnu/packages/patches/tvtime-xmltv.patch b/gnu/packages/patches/tvtime-xmltv.patch new file mode 100644 index 0000000000..2f4afc6e5a --- /dev/null +++ b/gnu/packages/patches/tvtime-xmltv.patch @@ -0,0 +1,28 @@ +Fix compilation error: conflicting types for 'locale_t'. + +This is an excerpt from the debian patch ... +http://http.debian.net/debian/pool/main/t/tvtime/tvtime_1.0.2-14.diff.gz + +--- tvtime-1.0.2.orig/src/xmltv.c ++++ tvtime-1.0.2/src/xmltv.c +@@ -118,9 +118,9 @@ + typedef struct { + const char *code; + const char *name; +-} locale_t; ++} tvtime_locale_t; + +-static locale_t locale_table[] = { ++static tvtime_locale_t locale_table[] = { + {"AA", "Afar"}, {"AB", "Abkhazian"}, {"AF", "Afrikaans"}, + {"AM", "Amharic"}, {"AR", "Arabic"}, {"AS", "Assamese"}, + {"AY", "Aymara"}, {"AZ", "Azerbaijani"}, {"BA", "Bashkir"}, +@@ -168,7 +168,7 @@ + {"XH", "Xhosa"}, {"YO", "Yoruba"}, {"ZH", "Chinese"}, + {"ZU", "Zulu"} }; + +-const int num_locales = sizeof( locale_table ) / sizeof( locale_t ); ++const int num_locales = sizeof( locale_table ) / sizeof( tvtime_locale_t ); + + /** + * Timezone parsing code based loosely on the algorithm in diff --git a/gnu/packages/patches/udev-gir-libtool.patch b/gnu/packages/patches/udev-gir-libtool.patch deleted file mode 100644 index 7504f87eb8..0000000000 --- a/gnu/packages/patches/udev-gir-libtool.patch +++ /dev/null @@ -1,17 +0,0 @@ -Without this patch, 'ld' as invoked by 'g-ir-scanner' fails to find -lgudev-1.0 -This is because libtool puts it in $(top_builddir)/.libs. - -This patch forces 'g-ir-scanner' to use libtool, which enables it to find -libgudev-1.0.la. - ---- udev-182/Makefile.in 2014-06-22 14:55:07.000000000 +0200 -+++ udev-182/Makefile.in 2014-06-22 14:55:15.000000000 +0200 -@@ -3622,7 +3622,7 @@ test-sys-distclean: - @ENABLE_GUDEV_TRUE@@ENABLE_INTROSPECTION_TRUE@ --namespace GUdev \ - @ENABLE_GUDEV_TRUE@@ENABLE_INTROSPECTION_TRUE@ --nsversion=1.0 \ - @ENABLE_GUDEV_TRUE@@ENABLE_INTROSPECTION_TRUE@ --include=GObject-2.0 \ --@ENABLE_GUDEV_TRUE@@ENABLE_INTROSPECTION_TRUE@ --library=gudev-1.0 \ -+@ENABLE_GUDEV_TRUE@@ENABLE_INTROSPECTION_TRUE@ --library=gudev-1.0 --libtool=$(top_builddir)/libtool \ - @ENABLE_GUDEV_TRUE@@ENABLE_INTROSPECTION_TRUE@ --library-path=$(top_builddir)/src \ - @ENABLE_GUDEV_TRUE@@ENABLE_INTROSPECTION_TRUE@ --library-path=$(top_builddir)/src/gudev \ - @ENABLE_GUDEV_TRUE@@ENABLE_INTROSPECTION_TRUE@ --output $@ \ diff --git a/gnu/packages/patches/upower-builddir.patch b/gnu/packages/patches/upower-builddir.patch new file mode 100644 index 0000000000..13cef5876a --- /dev/null +++ b/gnu/packages/patches/upower-builddir.patch @@ -0,0 +1,44 @@ +Remove explicit set of UPOWER_CONF_FILE_NAME in up-self-test.c; +instead the harness should set it. In Guix we set it explicitly; the +right thing is to use AM_TEST_ENVIRONMENT and regenerate the +makefiles, but we can't regenerate because current autotools carp on +some things, so we patch the Makefile.in instead. + +Also fix to not try to create /var/lib/upower if /var isn't writable. + +Patch by Andy Wingo <wingo@igalia.com> + +--- upower-0.99.2.orig/src/Makefile.in 2014-12-18 10:32:01.000000000 +0100 ++++ upower-0.99.2/src/Makefile.in 2015-04-04 19:49:28.020843678 +0200 +@@ -780,6 +780,7 @@ + + @UP_BUILD_TESTS_TRUE@up_self_test_CFLAGS = $(AM_CFLAGS) $(WARNINGFLAGS_C) + @UP_BUILD_TESTS_TRUE@TESTS_ENVIRONMENT = $(DBUS_LAUNCH) ++@UP_BUILD_TESTS_TRUE@AM_TESTS_ENVIRONMENT = UPOWER_CONF_FILE_NAME=$(top_srcdir)/etc/UPower.conf + dbusservicedir = $(datadir)/dbus-1/system-services + dbusservice_in_files = org.freedesktop.UPower.service.in + dbusservice_DATA = $(dbusservice_in_files:.service.in=.service) +@@ -1789,7 +1790,7 @@ + @HAVE_SYSTEMDSYSTEMUNITDIR_TRUE@ @sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@ + + install-data-hook: +- if test -w $(DESTDIR)$(prefix)/; then \ ++ if test -w $(DESTDIR)$(localstatedir)/; then \ + mkdir -p $(DESTDIR)$(historydir); \ + fi + +--- upower-0.99.2.orig/src/up-self-test.c 2014-07-17 09:46:15.000000000 +0200 ++++ upower-0.99.2/src/up-self-test.c 2015-04-04 18:43:04.952741927 +0200 +@@ -295,12 +295,6 @@ + #endif + g_test_init (&argc, &argv, NULL); + +- /* make check, vs. make distcheck */ +- if (g_file_test ("../etc/UPower.conf", G_FILE_TEST_EXISTS)) +- g_setenv ("UPOWER_CONF_FILE_NAME", "../etc/UPower.conf", TRUE); +- else +- g_setenv ("UPOWER_CONF_FILE_NAME", "../../etc/UPower.conf", TRUE); +- + /* tests go here */ + g_test_add_func ("/power/backend", up_test_backend_func); + g_test_add_func ("/power/device", up_test_device_func); diff --git a/gnu/packages/patches/webkitgtk-2.4.8-gmutexlocker.patch b/gnu/packages/patches/webkitgtk-2.4.8-gmutexlocker.patch new file mode 100644 index 0000000000..79e12c302f --- /dev/null +++ b/gnu/packages/patches/webkitgtk-2.4.8-gmutexlocker.patch @@ -0,0 +1,289 @@ +Webkit's own WebCore::GMutexLocker conflicts with the GMutexLocker in +glib-2.44.0. + +Patch taken from <http://pkgs.fedoraproject.org/cgit/webkitgtk3.git/ +plain/webkitgtk-2.4.8-gmutexlocker.patch +?id=7433f334cc84866af5ef0b2c25ead931e6e603ea>. + + +diff -up webkitgtk-2.4.8/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp.gmutexlocker webkitgtk-2.4.8/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp +--- webkitgtk-2.4.8/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp.gmutexlocker 2015-02-18 15:40:21.851816374 +0100 ++++ webkitgtk-2.4.8/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp 2015-02-18 15:45:58.560092191 +0100 +@@ -316,7 +316,7 @@ void MediaPlayerPrivateGStreamerBase::mu + #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER_GL) && !USE(COORDINATED_GRAPHICS) + PassRefPtr<BitmapTexture> MediaPlayerPrivateGStreamerBase::updateTexture(TextureMapper* textureMapper) + { +- GMutexLocker lock(m_bufferMutex); ++ WebCore::GMutexLocker lock(m_bufferMutex); + if (!m_buffer) + return nullptr; + +@@ -366,7 +366,7 @@ void MediaPlayerPrivateGStreamerBase::tr + g_return_if_fail(GST_IS_BUFFER(buffer)); + + { +- GMutexLocker lock(m_bufferMutex); ++ WebCore::GMutexLocker lock(m_bufferMutex); + gst_buffer_replace(&m_buffer, buffer); + } + +@@ -398,7 +398,7 @@ void MediaPlayerPrivateGStreamerBase::pa + if (!m_player->visible()) + return; + +- GMutexLocker lock(m_bufferMutex); ++ WebCore::GMutexLocker lock(m_bufferMutex); + if (!m_buffer) + return; + +diff -up webkitgtk-2.4.8/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp.gmutexlocker webkitgtk-2.4.8/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp +diff -up webkitgtk-2.4.8/Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp.gmutexlocker webkitgtk-2.4.8/Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp +--- webkitgtk-2.4.8/Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp.gmutexlocker 2015-02-18 15:16:11.995228731 +0100 ++++ webkitgtk-2.4.8/Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp 2015-02-18 15:45:42.686843477 +0100 +@@ -118,7 +118,7 @@ static gboolean webkitVideoSinkTimeoutCa + WebKitVideoSink* sink = reinterpret_cast<WebKitVideoSink*>(data); + WebKitVideoSinkPrivate* priv = sink->priv; + +- GMutexLocker lock(priv->bufferMutex); ++ WebCore::GMutexLocker lock(priv->bufferMutex); + GstBuffer* buffer = priv->buffer; + priv->buffer = 0; + priv->timeoutId = 0; +@@ -140,7 +140,7 @@ static GstFlowReturn webkitVideoSinkRend + WebKitVideoSink* sink = WEBKIT_VIDEO_SINK(baseSink); + WebKitVideoSinkPrivate* priv = sink->priv; + +- GMutexLocker lock(priv->bufferMutex); ++ WebCore::GMutexLocker lock(priv->bufferMutex); + + if (priv->unlocked) + return GST_FLOW_OK; +@@ -279,7 +279,7 @@ static void webkitVideoSinkGetProperty(G + + static void unlockBufferMutex(WebKitVideoSinkPrivate* priv) + { +- GMutexLocker lock(priv->bufferMutex); ++ WebCore::GMutexLocker lock(priv->bufferMutex); + + if (priv->buffer) { + gst_buffer_unref(priv->buffer); +@@ -305,7 +305,7 @@ static gboolean webkitVideoSinkUnlockSto + WebKitVideoSinkPrivate* priv = WEBKIT_VIDEO_SINK(baseSink)->priv; + + { +- GMutexLocker lock(priv->bufferMutex); ++ WebCore::GMutexLocker lock(priv->bufferMutex); + priv->unlocked = false; + } + +@@ -330,7 +330,7 @@ static gboolean webkitVideoSinkStart(Gst + { + WebKitVideoSinkPrivate* priv = WEBKIT_VIDEO_SINK(baseSink)->priv; + +- GMutexLocker lock(priv->bufferMutex); ++ WebCore::GMutexLocker lock(priv->bufferMutex); + priv->unlocked = false; + return TRUE; + } +diff -up webkitgtk-2.4.8/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp.gmutexlocker webkitgtk-2.4.8/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp +--- webkitgtk-2.4.8/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp.gmutexlocker 2015-02-18 15:16:40.954678407 +0100 ++++ webkitgtk-2.4.8/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp 2015-02-18 15:45:19.567481225 +0100 +@@ -346,7 +346,7 @@ static void webKitWebSrcSetProperty(GObj + + switch (propID) { + case PROP_IRADIO_MODE: { +- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); ++ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); + priv->iradioMode = g_value_get_boolean(value); + break; + } +@@ -364,7 +364,7 @@ static void webKitWebSrcGetProperty(GObj + WebKitWebSrc* src = WEBKIT_WEB_SRC(object); + WebKitWebSrcPrivate* priv = src->priv; + +- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); ++ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); + switch (propID) { + case PROP_IRADIO_MODE: + g_value_set_boolean(value, priv->iradioMode); +@@ -417,7 +417,7 @@ static gboolean webKitWebSrcStop(WebKitW + + ASSERT(isMainThread()); + +- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); ++ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); + + bool seeking = priv->seekID; + +@@ -476,7 +476,7 @@ static gboolean webKitWebSrcStart(WebKit + + ASSERT(isMainThread()); + +- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); ++ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); + + priv->startID = 0; + priv->corsAccessCheck = CORSNoCheck; +@@ -573,7 +573,7 @@ static GstStateChangeReturn webKitWebSrc + return ret; + } + +- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); ++ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); + switch (transition) { + case GST_STATE_CHANGE_READY_TO_PAUSED: + GST_DEBUG_OBJECT(src, "READY->PAUSED"); +@@ -604,7 +604,7 @@ static gboolean webKitWebSrcQueryWithPar + gst_query_parse_duration(query, &format, NULL); + + GST_DEBUG_OBJECT(src, "duration query in format %s", gst_format_get_name(format)); +- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); ++ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); + if (format == GST_FORMAT_BYTES && src->priv->size > 0) { + gst_query_set_duration(query, format, src->priv->size); + result = TRUE; +@@ -612,7 +612,7 @@ static gboolean webKitWebSrcQueryWithPar + break; + } + case GST_QUERY_URI: { +- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); ++ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); + gst_query_set_uri(query, src->priv->uri); + result = TRUE; + break; +@@ -653,7 +653,7 @@ static gchar* webKitWebSrcGetUri(GstURIH + WebKitWebSrc* src = WEBKIT_WEB_SRC(handler); + gchar* ret; + +- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); ++ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); + ret = g_strdup(src->priv->uri); + return ret; + } +@@ -668,7 +668,7 @@ static gboolean webKitWebSrcSetUri(GstUR + return FALSE; + } + +- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); ++ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); + + g_free(priv->uri); + priv->uri = 0; +@@ -704,7 +704,7 @@ static gboolean webKitWebSrcNeedDataMain + + ASSERT(isMainThread()); + +- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); ++ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); + // already stopped + if (!priv->needDataID) + return FALSE; +@@ -725,7 +725,7 @@ static void webKitWebSrcNeedDataCb(GstAp + + GST_DEBUG_OBJECT(src, "Need more data: %u", length); + +- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); ++ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); + if (priv->needDataID || !priv->paused) { + return; + } +@@ -739,7 +739,7 @@ static gboolean webKitWebSrcEnoughDataMa + + ASSERT(isMainThread()); + +- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); ++ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); + // already stopped + if (!priv->enoughDataID) + return FALSE; +@@ -760,7 +760,7 @@ static void webKitWebSrcEnoughDataCb(Gst + + GST_DEBUG_OBJECT(src, "Have enough data"); + +- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); ++ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); + if (priv->enoughDataID || priv->paused) { + return; + } +@@ -774,7 +774,7 @@ static gboolean webKitWebSrcSeekMainCb(W + + ASSERT(isMainThread()); + +- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); ++ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); + // already stopped + if (!priv->seekID) + return FALSE; +@@ -792,7 +792,7 @@ static gboolean webKitWebSrcSeekDataCb(G + WebKitWebSrcPrivate* priv = src->priv; + + GST_DEBUG_OBJECT(src, "Seeking to offset: %" G_GUINT64_FORMAT, offset); +- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); ++ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); + if (offset == priv->offset && priv->requestedOffset == priv->offset) + return TRUE; + +@@ -811,7 +811,7 @@ static gboolean webKitWebSrcSeekDataCb(G + void webKitWebSrcSetMediaPlayer(WebKitWebSrc* src, WebCore::MediaPlayer* player) + { + ASSERT(player); +- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); ++ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); + src->priv->player = player; + } + +@@ -841,7 +841,7 @@ char* StreamingClient::createReadBuffer( + + mapGstBuffer(buffer); + +- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); ++ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); + priv->buffer = adoptGRef(buffer); + locker.unlock(); + +@@ -867,7 +867,7 @@ void StreamingClient::handleResponseRece + return; + } + +- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); ++ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); + + priv->corsAccessCheck = corsAccessCheck; + +@@ -966,7 +966,7 @@ void StreamingClient::handleDataReceived + WebKitWebSrc* src = WEBKIT_WEB_SRC(m_src); + WebKitWebSrcPrivate* priv = src->priv; + +- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); ++ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); + + GST_LOG_OBJECT(src, "Have %lld bytes of data", priv->buffer ? static_cast<long long>(gst_buffer_get_size(priv->buffer.get())) : length); + +@@ -1035,7 +1035,7 @@ void StreamingClient::handleNotifyFinish + + GST_DEBUG_OBJECT(src, "Have EOS"); + +- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); ++ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); + if (!priv->seekID) { + locker.unlock(); + gst_app_src_end_of_stream(priv->appsrc); +@@ -1194,7 +1194,7 @@ void ResourceHandleStreamingClient::wasB + + GST_ERROR_OBJECT(src, "Request was blocked"); + +- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); ++ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); + uri.reset(g_strdup(src->priv->uri)); + locker.unlock(); + +@@ -1208,7 +1208,7 @@ void ResourceHandleStreamingClient::cann + + GST_ERROR_OBJECT(src, "Cannot show URL"); + +- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); ++ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); + uri.reset(g_strdup(src->priv->uri)); + locker.unlock(); + +diff -up webkitgtk-2.4.8/Source/WTF/wtf/gobject/GMutexLocker.h.gmutexlocker webkitgtk-2.4.8/Source/WTF/wtf/gobject/GMutexLocker.h diff --git a/gnu/packages/patches/wicd-template-instantiation.patch b/gnu/packages/patches/wicd-template-instantiation.patch new file mode 100644 index 0000000000..16d8fa6e1d --- /dev/null +++ b/gnu/packages/patches/wicd-template-instantiation.patch @@ -0,0 +1,29 @@ +Wicd 1.7.3 fails to instantiate template lines that have several +variable references. For instance, the line: + + wep_key$_KEY_INDEX=$_KEY + +which is found in in the 'wep-hex' template, expands to these two +lines: + + wep_key0=$_KEY + wep_key0=123456789ab + +This patch fixes that by only emitting the fully substituted line. + +Patch by Ludovic Courtès <ludo@gnu.org>. + +--- a/wicd/misc.py 2012-11-17 00:07:08 +0000 ++++ b/wicd/misc.py 2015-05-09 11:22:37 +0000 +@@ -321,11 +321,11 @@ def ParseEncryption(network): + rep_val = '0' + if rep_val: + line = line.replace("$_%s" % cur_val, str(rep_val)) +- config_file = ''.join([config_file, line]) + else: + print "Ignoring template line: '%s'" % line + else: + print "Weird parsing error occurred" ++ config_file = ''.join([config_file, line]) + else: # Just a regular entry. + config_file = ''.join([config_file, line]) diff --git a/gnu/packages/patches/wpa-supplicant-2015-2-fix.patch b/gnu/packages/patches/wpa-supplicant-2015-2-fix.patch new file mode 100644 index 0000000000..cd097006d2 --- /dev/null +++ b/gnu/packages/patches/wpa-supplicant-2015-2-fix.patch @@ -0,0 +1,51 @@ +Patch copied from http://w1.fi/security/2015-2/ + +From 5acd23f4581da58683f3cf5e36cb71bbe4070bd7 Mon Sep 17 00:00:00 2001 +From: Jouni Malinen <j@w1.fi> +Date: Tue, 28 Apr 2015 17:08:33 +0300 +Subject: [PATCH] WPS: Fix HTTP chunked transfer encoding parser + +strtoul() return value may end up overflowing the int h->chunk_size and +resulting in a negative value to be stored as the chunk_size. This could +result in the following memcpy operation using a very large length +argument which would result in a buffer overflow and segmentation fault. + +This could have been used to cause a denial service by any device that +has been authorized for network access (either wireless or wired). This +would affect both the WPS UPnP functionality in a WPS AP (hostapd with +upnp_iface parameter set in the configuration) and WPS ER +(wpa_supplicant with WPS_ER_START control interface command used). + +Validate the parsed chunk length value to avoid this. In addition to +rejecting negative values, we can also reject chunk size that would be +larger than the maximum configured body length. + +Thanks to Kostya Kortchinsky of Google security team for discovering and +reporting this issue. + +Signed-off-by: Jouni Malinen <j@w1.fi> +--- + src/wps/httpread.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/src/wps/httpread.c b/src/wps/httpread.c +index 2f08f37..d2855e3 100644 +--- a/src/wps/httpread.c ++++ b/src/wps/httpread.c +@@ -533,6 +533,13 @@ static void httpread_read_handler(int sd, void *eloop_ctx, void *sock_ctx) + if (!isxdigit(*cbp)) + goto bad; + h->chunk_size = strtoul(cbp, NULL, 16); ++ if (h->chunk_size < 0 || ++ h->chunk_size > h->max_bytes) { ++ wpa_printf(MSG_DEBUG, ++ "httpread: Invalid chunk size %d", ++ h->chunk_size); ++ goto bad; ++ } + /* throw away chunk header + * so we have only real data + */ +-- +1.9.1 + diff --git a/gnu/packages/patches/wpa-supplicant-2015-3-fix.patch b/gnu/packages/patches/wpa-supplicant-2015-3-fix.patch new file mode 100644 index 0000000000..de042f0c49 --- /dev/null +++ b/gnu/packages/patches/wpa-supplicant-2015-3-fix.patch @@ -0,0 +1,43 @@ +Patch copied from http://w1.fi/security/2015-3/ + +From ef566a4d4f74022e1fdb0a2addfe81e6de9f4aae Mon Sep 17 00:00:00 2001 +From: Jouni Malinen <j@w1.fi> +Date: Wed, 29 Apr 2015 02:21:53 +0300 +Subject: [PATCH] AP WMM: Fix integer underflow in WMM Action frame parser + +The length of the WMM Action frame was not properly validated and the +length of the information elements (int left) could end up being +negative. This would result in reading significantly past the stack +buffer while parsing the IEs in ieee802_11_parse_elems() and while doing +so, resulting in segmentation fault. + +This can result in an invalid frame being used for a denial of service +attack (hostapd process killed) against an AP with a driver that uses +hostapd for management frame processing (e.g., all mac80211-based +drivers). + +Thanks to Kostya Kortchinsky of Google security team for discovering and +reporting this issue. + +Signed-off-by: Jouni Malinen <j@w1.fi> +--- + src/ap/wmm.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/ap/wmm.c b/src/ap/wmm.c +index 6d4177c..314e244 100644 +--- a/src/ap/wmm.c ++++ b/src/ap/wmm.c +@@ -274,6 +274,9 @@ void hostapd_wmm_action(struct hostapd_data *hapd, + return; + } + ++ if (left < 0) ++ return; /* not a valid WMM Action frame */ ++ + /* extract the tspec info element */ + if (ieee802_11_parse_elems(pos, left, &elems, 1) == ParseFailed) { + hostapd_logger(hapd, mgmt->sa, HOSTAPD_MODULE_IEEE80211, +-- +1.9.1 + diff --git a/gnu/packages/patches/wpa-supplicant-2015-4-fix-pt1.patch b/gnu/packages/patches/wpa-supplicant-2015-4-fix-pt1.patch new file mode 100644 index 0000000000..7ebf5f4cc1 --- /dev/null +++ b/gnu/packages/patches/wpa-supplicant-2015-4-fix-pt1.patch @@ -0,0 +1,75 @@ +Patch copied from http://w1.fi/security/2015-4/ + +From dd2f043c9c43d156494e33d7ce22db96e6ef42c7 Mon Sep 17 00:00:00 2001 +From: Jouni Malinen <j@w1.fi> +Date: Fri, 1 May 2015 16:37:45 +0300 +Subject: [PATCH 1/5] EAP-pwd peer: Fix payload length validation for Commit + and Confirm + +The length of the received Commit and Confirm message payloads was not +checked before reading them. This could result in a buffer read +overflow when processing an invalid message. + +Fix this by verifying that the payload is of expected length before +processing it. In addition, enforce correct state transition sequence to +make sure there is no unexpected behavior if receiving a Commit/Confirm +message before the previous exchanges have been completed. + +Thanks to Kostya Kortchinsky of Google security team for discovering and +reporting this issue. + +Signed-off-by: Jouni Malinen <j@w1.fi> +--- + src/eap_peer/eap_pwd.c | 29 +++++++++++++++++++++++++++++ + 1 file changed, 29 insertions(+) + +diff --git a/src/eap_peer/eap_pwd.c b/src/eap_peer/eap_pwd.c +index f2b0926..a629437 100644 +--- a/src/eap_peer/eap_pwd.c ++++ b/src/eap_peer/eap_pwd.c +@@ -355,6 +355,23 @@ eap_pwd_perform_commit_exchange(struct eap_sm *sm, struct eap_pwd_data *data, + BIGNUM *mask = NULL, *x = NULL, *y = NULL, *cofactor = NULL; + u16 offset; + u8 *ptr, *scalar = NULL, *element = NULL; ++ size_t prime_len, order_len; ++ ++ if (data->state != PWD_Commit_Req) { ++ ret->ignore = TRUE; ++ goto fin; ++ } ++ ++ prime_len = BN_num_bytes(data->grp->prime); ++ order_len = BN_num_bytes(data->grp->order); ++ ++ if (payload_len != 2 * prime_len + order_len) { ++ wpa_printf(MSG_INFO, ++ "EAP-pwd: Unexpected Commit payload length %u (expected %u)", ++ (unsigned int) payload_len, ++ (unsigned int) (2 * prime_len + order_len)); ++ goto fin; ++ } + + if (((data->private_value = BN_new()) == NULL) || + ((data->my_element = EC_POINT_new(data->grp->group)) == NULL) || +@@ -554,6 +571,18 @@ eap_pwd_perform_confirm_exchange(struct eap_sm *sm, struct eap_pwd_data *data, + u8 conf[SHA256_MAC_LEN], *cruft = NULL, *ptr; + int offset; + ++ if (data->state != PWD_Confirm_Req) { ++ ret->ignore = TRUE; ++ goto fin; ++ } ++ ++ if (payload_len != SHA256_MAC_LEN) { ++ wpa_printf(MSG_INFO, ++ "EAP-pwd: Unexpected Confirm payload length %u (expected %u)", ++ (unsigned int) payload_len, SHA256_MAC_LEN); ++ goto fin; ++ } ++ + /* + * first build up the ciphersuite which is group | random_function | + * prf +-- +1.9.1 + diff --git a/gnu/packages/patches/wpa-supplicant-2015-4-fix-pt2.patch b/gnu/packages/patches/wpa-supplicant-2015-4-fix-pt2.patch new file mode 100644 index 0000000000..c11e4175d9 --- /dev/null +++ b/gnu/packages/patches/wpa-supplicant-2015-4-fix-pt2.patch @@ -0,0 +1,68 @@ +Patch copied from http://w1.fi/security/2015-4/ + +From e28a58be26184c2a23f80b410e0997ef1bd5d578 Mon Sep 17 00:00:00 2001 +From: Jouni Malinen <j@w1.fi> +Date: Fri, 1 May 2015 16:40:44 +0300 +Subject: [PATCH 2/5] EAP-pwd server: Fix payload length validation for Commit + and Confirm + +The length of the received Commit and Confirm message payloads was not +checked before reading them. This could result in a buffer read +overflow when processing an invalid message. + +Fix this by verifying that the payload is of expected length before +processing it. In addition, enforce correct state transition sequence to +make sure there is no unexpected behavior if receiving a Commit/Confirm +message before the previous exchanges have been completed. + +Thanks to Kostya Kortchinsky of Google security team for discovering and +reporting this issue. + +Signed-off-by: Jouni Malinen <j@w1.fi> +--- + src/eap_server/eap_server_pwd.c | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) + +diff --git a/src/eap_server/eap_server_pwd.c b/src/eap_server/eap_server_pwd.c +index 66bd5d2..3189105 100644 +--- a/src/eap_server/eap_server_pwd.c ++++ b/src/eap_server/eap_server_pwd.c +@@ -656,9 +656,21 @@ eap_pwd_process_commit_resp(struct eap_sm *sm, struct eap_pwd_data *data, + BIGNUM *x = NULL, *y = NULL, *cofactor = NULL; + EC_POINT *K = NULL, *point = NULL; + int res = 0; ++ size_t prime_len, order_len; + + wpa_printf(MSG_DEBUG, "EAP-pwd: Received commit response"); + ++ prime_len = BN_num_bytes(data->grp->prime); ++ order_len = BN_num_bytes(data->grp->order); ++ ++ if (payload_len != 2 * prime_len + order_len) { ++ wpa_printf(MSG_INFO, ++ "EAP-pwd: Unexpected Commit payload length %u (expected %u)", ++ (unsigned int) payload_len, ++ (unsigned int) (2 * prime_len + order_len)); ++ goto fin; ++ } ++ + if (((data->peer_scalar = BN_new()) == NULL) || + ((data->k = BN_new()) == NULL) || + ((cofactor = BN_new()) == NULL) || +@@ -774,6 +786,13 @@ eap_pwd_process_confirm_resp(struct eap_sm *sm, struct eap_pwd_data *data, + u8 conf[SHA256_MAC_LEN], *cruft = NULL, *ptr; + int offset; + ++ if (payload_len != SHA256_MAC_LEN) { ++ wpa_printf(MSG_INFO, ++ "EAP-pwd: Unexpected Confirm payload length %u (expected %u)", ++ (unsigned int) payload_len, SHA256_MAC_LEN); ++ goto fin; ++ } ++ + /* build up the ciphersuite: group | random_function | prf */ + grp = htons(data->group_num); + ptr = (u8 *) &cs; +-- +1.9.1 + diff --git a/gnu/packages/patches/wpa-supplicant-2015-4-fix-pt3.patch b/gnu/packages/patches/wpa-supplicant-2015-4-fix-pt3.patch new file mode 100644 index 0000000000..963dac9270 --- /dev/null +++ b/gnu/packages/patches/wpa-supplicant-2015-4-fix-pt3.patch @@ -0,0 +1,54 @@ +Patch copied from http://w1.fi/security/2015-4/ + +From 477c74395acd0123340457ba6f15ab345d42016e Mon Sep 17 00:00:00 2001 +From: Jouni Malinen <j@w1.fi> +Date: Sat, 2 May 2015 19:23:04 +0300 +Subject: [PATCH 3/5] EAP-pwd peer: Fix Total-Length parsing for fragment + reassembly + +The remaining number of bytes in the message could be smaller than the +Total-Length field size, so the length needs to be explicitly checked +prior to reading the field and decrementing the len variable. This could +have resulted in the remaining length becoming negative and interpreted +as a huge positive integer. + +In addition, check that there is no already started fragment in progress +before allocating a new buffer for reassembling fragments. This avoid a +potential memory leak when processing invalid message. + +Signed-off-by: Jouni Malinen <j@w1.fi> +--- + src/eap_peer/eap_pwd.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/src/eap_peer/eap_pwd.c b/src/eap_peer/eap_pwd.c +index a629437..1d2079b 100644 +--- a/src/eap_peer/eap_pwd.c ++++ b/src/eap_peer/eap_pwd.c +@@ -866,11 +866,23 @@ eap_pwd_process(struct eap_sm *sm, void *priv, struct eap_method_ret *ret, + * if it's the first fragment there'll be a length field + */ + if (EAP_PWD_GET_LENGTH_BIT(lm_exch)) { ++ if (len < 2) { ++ wpa_printf(MSG_DEBUG, ++ "EAP-pwd: Frame too short to contain Total-Length field"); ++ ret->ignore = TRUE; ++ return NULL; ++ } + tot_len = WPA_GET_BE16(pos); + wpa_printf(MSG_DEBUG, "EAP-pwd: Incoming fragments whose " + "total length = %d", tot_len); + if (tot_len > 15000) + return NULL; ++ if (data->inbuf) { ++ wpa_printf(MSG_DEBUG, ++ "EAP-pwd: Unexpected new fragment start when previous fragment is still in use"); ++ ret->ignore = TRUE; ++ return NULL; ++ } + data->inbuf = wpabuf_alloc(tot_len); + if (data->inbuf == NULL) { + wpa_printf(MSG_INFO, "Out of memory to buffer " +-- +1.9.1 + diff --git a/gnu/packages/patches/wpa-supplicant-2015-4-fix-pt4.patch b/gnu/packages/patches/wpa-supplicant-2015-4-fix-pt4.patch new file mode 100644 index 0000000000..3d945382bc --- /dev/null +++ b/gnu/packages/patches/wpa-supplicant-2015-4-fix-pt4.patch @@ -0,0 +1,52 @@ +Patch copied from http://w1.fi/security/2015-4/ + +From 3035cc2894e08319b905bd6561e8bddc8c2db9fa Mon Sep 17 00:00:00 2001 +From: Jouni Malinen <j@w1.fi> +Date: Sat, 2 May 2015 19:26:06 +0300 +Subject: [PATCH 4/5] EAP-pwd server: Fix Total-Length parsing for fragment + reassembly + +The remaining number of bytes in the message could be smaller than the +Total-Length field size, so the length needs to be explicitly checked +prior to reading the field and decrementing the len variable. This could +have resulted in the remaining length becoming negative and interpreted +as a huge positive integer. + +In addition, check that there is no already started fragment in progress +before allocating a new buffer for reassembling fragments. This avoid a +potential memory leak when processing invalid message. + +Signed-off-by: Jouni Malinen <j@w1.fi> +--- + src/eap_server/eap_server_pwd.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/src/eap_server/eap_server_pwd.c b/src/eap_server/eap_server_pwd.c +index 3189105..2bfc3c2 100644 +--- a/src/eap_server/eap_server_pwd.c ++++ b/src/eap_server/eap_server_pwd.c +@@ -942,11 +942,21 @@ static void eap_pwd_process(struct eap_sm *sm, void *priv, + * the first fragment has a total length + */ + if (EAP_PWD_GET_LENGTH_BIT(lm_exch)) { ++ if (len < 2) { ++ wpa_printf(MSG_DEBUG, ++ "EAP-pwd: Frame too short to contain Total-Length field"); ++ return; ++ } + tot_len = WPA_GET_BE16(pos); + wpa_printf(MSG_DEBUG, "EAP-pwd: Incoming fragments, total " + "length = %d", tot_len); + if (tot_len > 15000) + return; ++ if (data->inbuf) { ++ wpa_printf(MSG_DEBUG, ++ "EAP-pwd: Unexpected new fragment start when previous fragment is still in use"); ++ return; ++ } + data->inbuf = wpabuf_alloc(tot_len); + if (data->inbuf == NULL) { + wpa_printf(MSG_INFO, "EAP-pwd: Out of memory to " +-- +1.9.1 + diff --git a/gnu/packages/patches/wpa-supplicant-2015-4-fix-pt5.patch b/gnu/packages/patches/wpa-supplicant-2015-4-fix-pt5.patch new file mode 100644 index 0000000000..30f71974ad --- /dev/null +++ b/gnu/packages/patches/wpa-supplicant-2015-4-fix-pt5.patch @@ -0,0 +1,34 @@ +Patch copied from http://w1.fi/security/2015-4/ + +From 28a069a545b06b99eb55ad53f63f2c99e65a98f6 Mon Sep 17 00:00:00 2001 +From: Jouni Malinen <j@w1.fi> +Date: Sat, 2 May 2015 19:26:28 +0300 +Subject: [PATCH 5/5] EAP-pwd peer: Fix asymmetric fragmentation behavior + +The L (Length) and M (More) flags needs to be cleared before deciding +whether the locally generated response requires fragmentation. This +fixes an issue where these flags from the server could have been invalid +for the following message. In some cases, this could have resulted in +triggering the wpabuf security check that would terminate the process +due to invalid buffer allocation. + +Signed-off-by: Jouni Malinen <j@w1.fi> +--- + src/eap_peer/eap_pwd.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/eap_peer/eap_pwd.c b/src/eap_peer/eap_pwd.c +index 1d2079b..e58b13a 100644 +--- a/src/eap_peer/eap_pwd.c ++++ b/src/eap_peer/eap_pwd.c +@@ -968,6 +968,7 @@ eap_pwd_process(struct eap_sm *sm, void *priv, struct eap_method_ret *ret, + /* + * we have output! Do we need to fragment it? + */ ++ lm_exch = EAP_PWD_GET_EXCHANGE(lm_exch); + len = wpabuf_len(data->outbuf); + if ((len + EAP_PWD_HDR_SIZE) > data->mtu) { + resp = eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_PWD, data->mtu, +-- +1.9.1 + diff --git a/gnu/packages/patches/wpa-supplicant-CVE-2015-1863.patch b/gnu/packages/patches/wpa-supplicant-CVE-2015-1863.patch new file mode 100644 index 0000000000..de1964ca76 --- /dev/null +++ b/gnu/packages/patches/wpa-supplicant-CVE-2015-1863.patch @@ -0,0 +1,42 @@ +From 9ed4eee345f85e3025c33c6e20aa25696e341ccd Mon Sep 17 00:00:00 2001 +From: Jouni Malinen <jouni@qca.qualcomm.com> +Date: Tue, 7 Apr 2015 11:32:11 +0300 +Subject: [PATCH] P2P: Validate SSID element length before copying it + (CVE-2015-1863) + +This fixes a possible memcpy overflow for P2P dev->oper_ssid in +p2p_add_device(). The length provided by the peer device (0..255 bytes) +was used without proper bounds checking and that could have resulted in +arbitrary data of up to 223 bytes being written beyond the end of the +dev->oper_ssid[] array (of which about 150 bytes would be beyond the +heap allocation) when processing a corrupted management frame for P2P +peer discovery purposes. + +This could result in corrupted state in heap, unexpected program +behavior due to corrupted P2P peer device information, denial of service +due to process crash, exposure of memory contents during GO Negotiation, +and potentially arbitrary code execution. + +Thanks to Google security team for reporting this issue and smart +hardware research group of Alibaba security team for discovering it. + +Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> +--- + src/p2p/p2p.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c +index f584fae..a45fe73 100644 +--- a/src/p2p/p2p.c ++++ b/src/p2p/p2p.c +@@ -778,6 +778,7 @@ int p2p_add_device(struct p2p_data *p2p, const u8 *addr, int freq, + if (os_memcmp(addr, p2p_dev_addr, ETH_ALEN) != 0) + os_memcpy(dev->interface_addr, addr, ETH_ALEN); + if (msg.ssid && ++ msg.ssid[1] <= sizeof(dev->oper_ssid) && + (msg.ssid[1] != P2P_WILDCARD_SSID_LEN || + os_memcmp(msg.ssid + 2, P2P_WILDCARD_SSID, P2P_WILDCARD_SSID_LEN) + != 0)) { +-- +1.9.1 + diff --git a/gnu/packages/patches/xf86-video-sis-fix-exa-crash.patch b/gnu/packages/patches/xf86-video-sis-fix-exa-crash.patch new file mode 100644 index 0000000000..f5cd0b9a9e --- /dev/null +++ b/gnu/packages/patches/xf86-video-sis-fix-exa-crash.patch @@ -0,0 +1,45 @@ +Fix X server crash when sis driver is used with EXA acceleration. + +Source: http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/trusty/xserver-xorg-video-sis/trusty/revision/24/debian/patches/fix-exa-crash.diff + +The patch was originally proposed by nihui: +https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-sis/+bug/1066464/comments/13 + +--- a/src/sis310_accel.c ++++ b/src/sis310_accel.c +@@ -1874,7 +1874,7 @@ + { + ScrnInfoPtr pScrn = xf86ScreenToScrn(pDst->drawable.pScreen); + SISPtr pSiS = SISPTR(pScrn); +- unsigned char *dst = pDst->devPrivate.ptr; ++ unsigned char *dst = ((unsigned char *) pSiS->FbBase) + exaGetPixmapOffset(pDst); + int dst_pitch = exaGetPixmapPitch(pDst); + + (pSiS->SyncAccel)(pScrn); +@@ -1882,7 +1882,7 @@ + if(pDst->drawable.bitsPerPixel < 8) + return FALSE; + +- dst += (x * pDst->drawable.bitsPerPixel / 8) + (y * src_pitch); ++ dst += (x * pDst->drawable.bitsPerPixel / 8) + (y * dst_pitch); + while(h--) { + SiSMemCopyToVideoRam(pSiS, dst, (unsigned char *)src, + (w * pDst->drawable.bitsPerPixel / 8)); +@@ -1953,7 +1953,7 @@ + { + ScrnInfoPtr pScrn = xf86ScreenToScrn(pSrc->drawable.pScreen); + SISPtr pSiS = SISPTR(pScrn); +- unsigned char *src = pSrc->devPrivate.ptr; ++ unsigned char *src = ((unsigned char *) pSiS->FbBase) + exaGetPixmapOffset(pSrc); + int src_pitch = exaGetPixmapPitch(pSrc); + int size = src_pitch < dst_pitch ? src_pitch : dst_pitch; + +@@ -1964,7 +1964,7 @@ + + src += (x * pSrc->drawable.bitsPerPixel / 8) + (y * src_pitch); + while(h--) { +- SiSMemCopyFromVideoRam(pSiS, (unsigned char *)dst, src, size); ++ SiSMemCopyFromVideoRam(pSiS, (unsigned char *)dst, src, (w * pSrc->drawable.bitsPerPixel / 8)); + src += src_pitch; + dst += dst_pitch; + } diff --git a/gnu/packages/pcre.scm b/gnu/packages/pcre.scm index 3181ba7592..86d3ca3874 100644 --- a/gnu/packages/pcre.scm +++ b/gnu/packages/pcre.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr> -;;; Copyright © 2014 Mark H Weaver <mhw@netris.org> +;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -28,14 +28,14 @@ (define-public pcre (package (name "pcre") - (version "8.36") + (version "8.37") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/pcre/pcre/" version "/pcre-" version ".tar.bz2")) (sha256 (base32 - "1fs5p1z67m9f4xnyil3s4lhgyld78f7m4d1yawpyhh0cvrbk90zg")))) + "17bqykp604p7376wj3q2nmjdhrb6v1ny8q08zdwi7qvc02l9wrsi")))) (build-system gnu-build-system) (inputs `(("bzip2" ,bzip2) ("readline" ,readline) diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index 21fb39562b..7023b9aa65 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -50,13 +50,13 @@ (define-public poppler (package (name "poppler") - (version "0.28.1") + (version "0.32.0") (source (origin (method url-fetch) (uri (string-append "http://poppler.freedesktop.org/poppler-" version ".tar.xz")) (sha256 (base32 - "01pxjdbhvpxf00ncf8d9wxc8gkcqcxz59lwrpa151ah988inxkrc")))) + "162vfbvbz0frvqyk00ldsbl49h4bj8i8wn0ngfl30xg1lldy6qs9")))) (build-system gnu-build-system) ;; FIXME: more dependencies could be added ;; cairo output: no (requires cairo >= 1.10.0) @@ -282,7 +282,7 @@ by using the poppler rendering engine.") (define-public zathura (package (name "zathura") - (version "0.3.2") + (version "0.3.3") (source (origin (method url-fetch) (uri @@ -290,7 +290,7 @@ by using the poppler rendering engine.") version ".tar.gz")) (sha256 (base32 - "1qk5s7cyqp4l673yhma5igk9g24p5jyqyy81fdk7q7xjqlym19px")) + "1rywx09qn6ap5hb1z31wxby4lzdrqdbldm51pjk1ifflr37xwirk")) (patches (list (search-patch "zathura-plugindir-environment-variable.patch"))))) diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm index 9d41d88d26..3bfe68d96b 100644 --- a/gnu/packages/perl.scm +++ b/gnu/packages/perl.scm @@ -44,7 +44,9 @@ (sha256 (base32 "15qxzba3a50c9nik5ydgyfp62x7h9vxxn12yd1jgl93hb1wj96km")) - (patches (list (search-patch "perl-no-sys-dirs.patch"))))) + (patches (map search-patch + '("perl-no-sys-dirs.patch" + "perl-module-pluggable-search.patch"))))) (build-system gnu-build-system) (arguments '(#:tests? #f @@ -254,6 +256,50 @@ but don't want to go all out and profile your code.") "Benchmark-Timer-" version)) (license gpl2))) +(define-public perl-bit-vector + (package + (name "perl-bit-vector") + (version "7.4") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/S/ST/STBEY/" + "Bit-Vector-" version ".tar.gz")) + (sha256 + (base32 + "09m96p8c0ipgz42li2ywdgy0vxb57mb5nf59j9gw7yzc3xkslv9w")))) + (build-system perl-build-system) + (propagated-inputs + `(("perl-carp-clan" ,perl-carp-clan))) + (home-page "http://search.cpan.org/dist/Bit-Vector") + (synopsis "Bit vector library") + (description "Bit::Vector is an efficient C library which allows you to +handle bit vectors, sets (of integers), \"big integer arithmetic\" and boolean +matrices, all of arbitrary sizes. The package also includes an +object-oriented Perl module for accessing the C library from Perl, and +optionally features overloaded operators for maximum ease of use. The C +library can nevertheless be used stand-alone, without Perl.") + (license (list (package-license perl) lgpl2.0+)))) + +(define-public perl-boolean + (package + (name "perl-boolean") + (version "0.45") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/I/IN/INGY/" + "boolean-" version ".tar.gz")) + (sha256 + (base32 + "18hrgldzwnhs0c0r8hxx6r05qvk9p7gwinjwcybixfs2h0n43ypj")))) + (build-system perl-build-system) + (home-page "http://search.cpan.org/dist/boolean") + (synopsis "Boolean support for Perl") + (description "This module provides basic Boolean support, by defining two +special objects: true and false.") + (license (package-license perl)))) + (define-public perl-cache-cache (package (name "perl-cache-cache") @@ -281,6 +327,27 @@ runs of an application or invocations of a CGI-style script or simply as an easy to use abstraction of the filesystem or shared memory.") (license (package-license perl)))) +(define-public perl-cache-fastmmap + (package + (name "perl-cache-fastmmap") + (version "1.40") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/R/RO/ROBM/" + "Cache-FastMmap-" version ".tar.gz")) + (sha256 + (base32 + "0h3ckr04cdn6dvl40m4m97vl5ybf30v1lwhw3jvkr92kpksvq4hd")))) + (build-system perl-build-system) + (home-page "http://search.cpan.org/dist/Cache-FastMmap") + (synopsis "Shared memory interprocess cache via mmap") + (description "A shared memory cache through an mmap'ed file. It's core is +written in C for performance. It uses fcntl locking to ensure multiple +processes can safely access the cache at the same time. It uses a basic LRU +algorithm to keep the most used entries in the cache.") + (license (package-license perl)))) + (define-public perl-capture-tiny (package (name "perl-capture-tiny") @@ -552,6 +619,24 @@ subclasses and can be overriden.") type for perl.") (license (package-license perl)))) +(define-public perl-class-factory-util + (package + (name "perl-class-factory-util") + (version "1.7") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/D/DR/DROLSKY/" + "Class-Factory-Util-" version ".tar.gz")) + (sha256 + (base32 + "09ifd6v0c94vr20n9yr1dxgcp7hyscqq851szdip7y24bd26nlbc")))) + (build-system perl-build-system) + (home-page "http://search.cpan.org/dist/Class-Factory-Util") + (synopsis "Utility methods for factory classes") + (description "This module exports methods useful for factory classes.") + (license (package-license perl)))) + (define-public perl-class-inspector (package (name "perl-class-inspector") @@ -624,6 +709,26 @@ names, not Class::Name. For that, this module provides \"load_class Class::Load") (license artistic2.0))) +(define-public perl-class-methodmaker + (package + (name "perl-class-methodmaker") + (version "2.24") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/S/SC/SCHWIGON/" + "class-methodmaker/Class-MethodMaker-" + version ".tar.gz")) + (sha256 + (base32 + "0a03i4k3a33qqwhykhz5k437ld5mag2vq52vvsy03gbynb65ivsy")))) + (build-system perl-build-system) + (home-page "http://search.cpan.org/dist/Class-MethodMaker") + (synopsis "Create generic methods for OO Perl") + (description "This module solves the problem of having to continually +write accessor methods for your objects that perform standard tasks.") + (license (package-license perl)))) + (define-public perl-class-method-modifiers (package (name "perl-class-method-modifiers") @@ -649,6 +754,26 @@ place of the original method, with a hook to easily call that original method.") (license (package-license perl)))) +(define-public perl-class-singleton + (package + (name "perl-class-singleton") + (version "1.5") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/S/SH/SHAY/" + "Class-Singleton-" version ".tar.gz")) + (sha256 + (base32 + "0y7ngrjf551bjgmijp5rsidbkq6c8hb5lmy2jcqq0fify020s8iq")))) + (build-system perl-build-system) + (home-page "http://search.cpan.org/dist/Class-Singleton") + (synopsis "Implementation of a singleton class for Perl") + (description "This module implements a Singleton class from which other +classes can be derived. By itself, the Class::Singleton module does very +little other than manage the instantiation of a single object.") + (license (package-license perl)))) + (define-public perl-class-tiny (package (name "perl-class-tiny") @@ -882,6 +1007,30 @@ CPAN::Meta object are present.") versa.") (license (package-license perl)))) +(define-public perl-crypt-randpasswd + (package + (name "perl-crypt-randpasswd") + (version "0.06") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/N/NE/NEILB/" + "Crypt-RandPasswd-" version ".tar.gz")) + (sha256 + (base32 + "0ca8544371wp4vvqsa19lnhl02hczpkbwkgsgm65ziwwim3r1gdi")))) + (build-system perl-build-system) + (home-page "http://search.cpan.org/dist/Crypt-RandPasswd") + (synopsis "Random password generator") + (description "Crypt::RandPasswd provides three functions that can be used +to generate random passwords, constructed from words, letters, or characters. +This code is a Perl implementation of the Automated Password Generator +standard, like the program described in \"A Random Word Generator For +Pronounceable Passwords\". This code is a re-engineering of the program +contained in Appendix A of FIPS Publication 181, \"Standard for Automated +Password Generator\".") + (license (package-license perl)))) + (define-public perl-data-dump (package (name "perl-data-dump") @@ -969,6 +1118,35 @@ on one page. This results in wanting to page through various pages of data. The maths behind this is unfortunately fiddly, hence this module.") (license (package-license perl)))) +(define-public perl-data-stream-bulk + (package + (name "perl-data-stream-bulk") + (version "0.11") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/D/DO/DOY/" + "Data-Stream-Bulk-" version ".tar.gz")) + (sha256 + (base32 + "05q9ygcv7r318j7daxz42rjr5b99j6whjmwjdih0axxrlqr89q06")))) + (build-system perl-build-system) + (native-inputs + `(("perl-test-requires" ,perl-test-requires))) + (propagated-inputs + `(("perl-moose" ,perl-moose) + ("perl-namespace-clean" ,perl-namespace-clean) + ("perl-path-class" ,perl-path-class) + ("perl-sub-exporter" ,perl-sub-exporter))) + (home-page "http://search.cpan.org/dist/Data-Stream-Bulk") + (synopsis "N at a time iteration API") + (description "This module tries to find middle ground between one at a +time and all at once processing of data sets. The purpose of this module is +to avoid the overhead of implementing an iterative api when this isn't +necessary, without breaking forward compatibility in case that becomes +necessary later on.") + (license (package-license perl)))) + (define-public perl-data-tumbler (package (name "perl-data-tumbler") @@ -1023,6 +1201,369 @@ support for per-object behavior, circular structures, visiting tied structures, and all ref types (hashes, arrays, scalars, code, globs).") (license (package-license perl)))) +(define-public perl-date-calc + (package + (name "perl-date-calc") + (version "6.4") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/S/ST/STBEY/" + "Date-Calc-" version ".tar.gz")) + (sha256 + (base32 + "1barz0jgdaan3jm7ciphs5n3ahwkl42imprs3y8c1dwpwyr3gqbw")))) + (build-system perl-build-system) + (propagated-inputs + `(("perl-bit-vector" ,perl-bit-vector) + ("perl-carp-clan" ,perl-carp-clan))) + (home-page "http://search.cpan.org/dist/Date-Calc") + (synopsis "Gregorian calendar date calculations") + (description "This package consists of a Perl module for date calculations +based on the Gregorian calendar, thereby complying with all relevant norms and +standards: ISO/R 2015-1971, DIN 1355 and, to some extent, ISO 8601 (where +applicable).") + (license (package-license perl)))) + +(define-public perl-date-calc-xs + (package + (name "perl-date-calc-xs") + (version "6.4") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/S/ST/STBEY/" + "Date-Calc-XS-" version ".tar.gz")) + (sha256 + (base32 + "1cssi9rmd31cgaafgp4m70jqbm1mgh3aphxsxz1dwdz8h283n6jz")))) + (build-system perl-build-system) + (propagated-inputs + `(("perl-bit-vector" ,perl-bit-vector) + ("perl-carp-clan" ,perl-carp-clan) + ("perl-date-calc" ,perl-date-calc))) + (home-page "http://search.cpan.org/dist/Date-Calc-XS") + (synopsis "XS wrapper for Date::Calc") + (description "Date::Calc::XS is an XS wrapper and C library plug-in for +Date::Calc.") + (license (list (package-license perl) lgpl2.0+)))) + +(define-public perl-datetime + (package + (name "perl-datetime") + (version "1.18") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/D/DR/DROLSKY/" + "DateTime-" version ".tar.gz")) + (sha256 + (base32 + "0fli1ls298qa8nfki15myxqqqfpxvslxk4j5r3vjk577wfgjrnms")))) + (build-system perl-build-system) + (native-inputs + `(("perl-test-fatal" ,perl-test-fatal) + ("perl-test-warnings" ,perl-test-warnings))) + (propagated-inputs + `(("perl-datetime-locale" ,perl-datetime-locale) + ("perl-datetime-timezone" ,perl-datetime-timezone) + ("perl-params-validate" ,perl-params-validate) + ("perl-try-tiny" ,perl-try-tiny))) + (home-page "http://search.cpan.org/dist/DateTime") + (synopsis "Date and time object for Perl") + (description "DateTime is a class for the representation of date/time +combinations. It represents the Gregorian calendar, extended backwards in +time before its creation (in 1582).") + (license artistic2.0))) + +(define-public perl-datetime-set + (package + (name "perl-datetime-set") + (version "0.3400") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/F/FG/FGLOCK/" + "DateTime-Set-" version ".tar.gz")) + (sha256 + (base32 + "1b27699zkj68w5ll9chjhs52vmf39f9via6x5r5844as30qh9zxb")))) + (build-system perl-build-system) + (propagated-inputs + `(("perl-datetime" ,perl-datetime) + ("perl-params-validate" ,perl-params-validate) + ("perl-set-infinite" ,perl-set-infinite))) + (home-page "http://search.cpan.org/dist/DateTime-Set") + (synopsis "DateTime set objects") + (description "The DateTime::Set module provides a date/time sets +implementation. It allows, for example, the generation of groups of dates, +like \"every wednesday\", and then find all the dates matching that pattern, +within a time range.") + (license (package-license perl)))) + +(define-public perl-datetime-event-ical + (package + (name "perl-datetime-event-ical") + (version "0.12") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/F/FG/FGLOCK/" + "DateTime-Event-ICal-" version ".tar.gz")) + (sha256 + (base32 + "1rfrjhczfmasf7aaz8rfd89vhwjj2nkxlnirxxrmy75z10nmrpjk")))) + (build-system perl-build-system) + (propagated-inputs + `(("perl-datetime" ,perl-datetime) + ("perl-datetime-event-recurrence" ,perl-datetime-event-recurrence))) + (home-page "http://search.cpan.org/dist/DateTime-Event-ICal") + (synopsis "DateTime rfc2445 recurrences") + (description "This module provides convenience methods that let you easily +create DateTime::Set objects for RFC 2445 style recurrences.") + (license (package-license perl)))) + +(define-public perl-datetime-event-recurrence + (package + (name "perl-datetime-event-recurrence") + (version "0.16") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/F/FG/FGLOCK/" + "DateTime-Event-Recurrence-" version ".tar.gz")) + (sha256 + (base32 + "02c6ky3k26r0c8r87rcsd8gbn7rd6j2pylryin8pllnrdh9f0wiq")))) + (build-system perl-build-system) + (propagated-inputs + `(("perl-datetime" ,perl-datetime) + ("perl-datetime-set" ,perl-datetime-set))) + (home-page "http://search.cpan.org/dist/DateTime-Event-Recurrence") + (synopsis "DateTime::Set extension for basic recurrences") + (description "This module provides convenience methods that let you easily +create DateTime::Set objects for various recurrences, such as \"once a month\" +or \"every day\". You can also create more complicated recurrences, such as +\"every Monday, Wednesday and Thursday at 10:00 AM and 2:00 PM\".") + (license (package-license perl)))) + +(define-public perl-datetime-format-builder + (package + (name "perl-datetime-format-builder") + (version "0.81") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/D/DR/DROLSKY/" + "DateTime-Format-Builder-" version ".tar.gz")) + (sha256 + (base32 + "1vrkzw7kmxnyy403ykxgbg2kvgs99nggi4n9gi09ixivnn68mmbw")))) + (build-system perl-build-system) + (propagated-inputs + `(("perl-class-factory-util" ,perl-class-factory-util) + ("perl-datetime" ,perl-datetime) + ("perl-datetime-format-strptime" ,perl-datetime-format-strptime) + ("perl-params-validate" ,perl-params-validate))) + (home-page "http://search.cpan.org/dist/DateTime-Format-Builder") + (synopsis "Create DateTime parser classes and objects.") + (description "DateTime::Format::Builder creates DateTime parsers. Many +string formats of dates and times are simple and just require a basic regular +expression to extract the relevant information. Builder provides a simple way +to do this without writing reams of structural code.") + (license artistic2.0))) + +(define-public perl-datetime-format-flexible + (package + (name "perl-datetime-format-flexible") + (version "0.26") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/T/TH/THINC/" + "DateTime-Format-Flexible-" version ".tar.gz")) + (sha256 + (base32 + "0gb9dsn178dpvgbbgwnaf3v2v8zy4xj36i0w5q8qbhvwx32znvj3")))) + (build-system perl-build-system) + (propagated-inputs + `(("perl-datetime" ,perl-datetime) + ("perl-datetime-format-builder" ,perl-datetime-format-builder) + ("perl-datetime-timezone" ,perl-datetime-timezone) + ("perl-list-moreutils" ,perl-list-moreutils) + ("perl-test-mocktime" ,perl-test-mocktime))) + (home-page "http://search.cpan.org/dist/DateTime-Format-Flexible") + (synopsis "Parse data/time strings") + (description "DateTime::Format::Flexible attempts to take any string you +give it and parse it into a DateTime object.") + (license (package-license perl)))) + +(define-public perl-datetime-format-ical + (package + (name "perl-datetime-format-ical") + (version "0.09") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/D/DR/DROLSKY/" + "DateTime-Format-ICal-" version ".tar.gz")) + (sha256 + (base32 + "0cvwk7pigj7czsp81z35h7prxvylkrlk2l0kwvq0v72ykx9zc2cb")))) + (build-system perl-build-system) + (propagated-inputs + `(("perl-datetime" ,perl-datetime) + ("perl-datetime-event-ical" ,perl-datetime-event-ical) + ("perl-datetime-set" ,perl-datetime-set) + ("perl-datetime-timezone" ,perl-datetime-timezone) + ("perl-params-validate" ,perl-params-validate))) + (home-page "http://search.cpan.org/dist/DateTime-Format-ICal") + (synopsis "Parse and format iCal datetime and duration strings") + (description "This module understands the ICal date/time and duration +formats, as defined in RFC 2445. It can be used to parse these formats in +order to create the appropriate objects.") + (license (package-license perl)))) + +(define-public perl-datetime-format-natural + (package + (name "perl-datetime-format-natural") + (version "1.02") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/S/SC/SCHUBIGER/" + "DateTime-Format-Natural-" version ".tar.gz")) + (sha256 + (base32 + "1qq3adq1y08d0jlmwk9059s5d39hb26f3zjag099gjjyvs5c8yal")))) + (build-system perl-build-system) + (native-inputs + `(("perl-module-util" ,perl-module-util) + ("perl-test-mocktime" ,perl-test-mocktime))) + (propagated-inputs + `(("perl-boolean" ,perl-boolean) + ("perl-clone" ,perl-clone) + ("perl-date-calc" ,perl-date-calc) + ("perl-date-calc-xs" ,perl-date-calc-xs) + ("perl-datetime" ,perl-datetime) + ("perl-datetime-timezone" ,perl-datetime-timezone) + ("perl-list-moreutils" ,perl-list-moreutils) + ("perl-params-validate" ,perl-params-validate))) + (home-page "http://search.cpan.org/dist/DateTime-Format-Natural") + (synopsis "Machine-readable date/time with natural parsing") + (description "DateTime::Format::Natural takes a string with a human +readable date/time and creates a machine readable one by applying natural +parsing logic.") + (license (package-license perl)))) + +(define-public perl-datetime-format-strptime + (package + (name "perl-datetime-format-strptime") + (version "1.56") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/D/DR/DROLSKY/" + "DateTime-Format-Strptime-" version ".tar.gz")) + (sha256 + (base32 + "0a4bszmff16rw6fz1yr4v9001q9vxrdxnxkj9sqaln83b87rvxig")))) + (build-system perl-build-system) + (propagated-inputs + `(("perl-datetime" ,perl-datetime) + ("perl-datetime-locale" ,perl-datetime-locale) + ("perl-datetime-timezone" ,perl-datetime-timezone) + ("perl-params-validate" ,perl-params-validate))) + (home-page "http://search.cpan.org/dist/DateTime-Format-Strptime") + (synopsis "Parse and format strp and strf time patterns") + (description "This module implements most of `strptime(3)`, the POSIX +function that is the reverse of `strftime(3)`, for `DateTime`. While +`strftime` takes a `DateTime` and a pattern and returns a string, `strptime` +takes a string and a pattern and returns the `DateTime` object associated.") + (license artistic2.0))) + +(define-public perl-datetime-locale + (package + (name "perl-datetime-locale") + (version "0.45") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/D/DR/DROLSKY/" + "DateTime-Locale-" version ".tar.gz")) + (sha256 + (base32 + "175grkrxiv012n6ch3z1sip4zprcili6m5zqi3njdk5c1gdvi8ca")))) + (build-system perl-build-system) + (propagated-inputs + `(("perl-list-moreutils" ,perl-list-moreutils) + ("perl-params-validate" ,perl-params-validate))) + (home-page "http://search.cpan.org/dist/DateTime-Locale") + (synopsis "Localization support for DateTime.pm") + (description "The DateTime::Locale modules provide localization data for +the DateTime.pm class.") + (license (package-license perl)))) + +(define-public perl-datetime-timezone + (package + (name "perl-datetime-timezone") + (version "1.86") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/D/DR/DROLSKY/" + "DateTime-TimeZone-" version ".tar.gz")) + (sha256 + (base32 + "1aj5liy9as7yci2s9cqv9gqna5wggah8yg2jqrc89dnrin25s26z")))) + (build-system perl-build-system) + (native-inputs + `(("perl-test-fatal" ,perl-test-fatal) + ("perl-test-requires" ,perl-test-requires))) + (propagated-inputs + `(("perl-class-singleton" ,perl-class-singleton) + ("perl-list-allutils" ,perl-list-allutils) + ("perl-module-runtime" ,perl-module-runtime) + ("perl-params-validate" ,perl-params-validate) + ("perl-try-tiny" ,perl-try-tiny))) + (home-page "http://search.cpan.org/dist/DateTime-TimeZone") + (synopsis "Time zone object for Perl") + (description "This class is the base class for all time zone objects. A +time zone is represented internally as a set of observances, each of which +describes the offset from GMT for a given time period. Note that without the +DateTime module, this module does not do much. It's primary interface is +through a DateTime object, and most users will not need to directly use +DateTime::TimeZone methods.") + (license (package-license perl)))) + +(define-public perl-datetimex-easy + (package + (name "perl-datetimex-easy") + (version "0.089") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/R/RO/ROKR/" + "DateTimeX-Easy-" version ".tar.gz")) + (sha256 + (base32 + "0ybs9175h4s39x8a23ap129cgqwmy6w7psa86194jq5cww1d5rhp")))) + (build-system perl-build-system) + (native-inputs + `(("perl-test-most" ,perl-test-most))) + (propagated-inputs + `(("perl-datetime" ,perl-datetime) + ("perl-datetime-format-flexible" ,perl-datetime-format-flexible) + ("perl-datetime-format-ical" ,perl-datetime-format-ical) + ("perl-datetime-format-natural" ,perl-datetime-format-natural) + ("perl-timedate" ,perl-timedate))) + (home-page "http://search.cpan.org/dist/DateTimeX-Easy") + (synopsis "Parse date/time strings") + (description "DateTimeX::Easy uses a variety of DateTime::Format packages +to create DateTime objects, with some custom tweaks to smooth out the rough +edges (mainly concerning timezone detection and selection).") + (license (package-license perl)))) + (define-public perl-devel-caller (package (name "perl-devel-caller") @@ -1200,6 +1741,43 @@ Devel::StackTrace::WithLexicals, you even get to see the lexical variables of each stack frame.") (license (package-license perl)))) +(define-public perl-devel-symdump + (package + (name "perl-devel-symdump") + (version "2.14") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/A/AN/ANDK/" + "Devel-Symdump-" version ".tar.gz")) + (sha256 + (base32 + "1phyyxgxsymgzbjd524zlaavvay6vjw34af5zn9153qffqign54v")))) + (build-system perl-build-system) + (home-page "http://search.cpan.org/dist/Devel-Symdump") + (synopsis "Dump symbol names or the symbol table") + (description "Devel::Symdump provides access to the perl symbol table.") + (license (package-license perl)))) + +(define-public perl-digest-hmac + (package + (name "perl-digest-hmac") + (version "1.03") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/G/GA/GAAS/" + "Digest-HMAC-" version ".tar.gz")) + (sha256 + (base32 + "0naavabbm1c9zgn325ndy66da4insdw9l3mrxwxdfi7i7xnjrirv")))) + (build-system perl-build-system) + (home-page "http://search.cpan.org/dist/Digest-HMAC") + (synopsis "Keyed-Hashing for Message Authentication") + (description "The Digest::HMAC module follows the common Digest:: +interface for the RFC 2104 HMAC mechanism.") + (license (package-license perl)))) + (define-public perl-digest-sha1 (package (name "perl-digest-sha1") @@ -1636,6 +2214,26 @@ files from a distribution. It is a companion module to File::ShareDir, which allows you to locate these files after installation.") (license (package-license perl)))) +(define-public perl-file-slurp + (package + (name "perl-file-slurp") + (version "9999.19") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/U/UR/URI/" + "File-Slurp-" version ".tar.gz")) + (sha256 + (base32 + "0hrn4nipwx40d6ji8ssgr5nw986z9iqq8cn0kdpbszh9jplynaff")))) + (build-system perl-build-system) + (home-page "http://search.cpan.org/dist/File-Slurp") + (synopsis "Reading/Writing/Modifying of complete files") + (description "File::Slurp provides subroutines to read or write entire +files with a simple call. It also has a subroutine for reading the list of +filenames in a directory.") + (license (package-license perl)))) + (define-public perl-file-temp (package (name "perl-file-temp") @@ -1813,6 +2411,26 @@ dependencies for CPAN distributions. These dependencies get bundled into the inc directory within a distribution and are used by Makefile.PL or Build.PL.") (license asl2.0))) +(define-public perl-io-interactive + (package + (name "perl-io-interactive") + (version "0.0.6") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/B/BD/BDFOY/" + "IO-Interactive-" version ".tar.gz")) + (sha256 + (base32 + "1303q6rbcf2cag5z08pq3d1y91wls5q51jrpw4kh0l2bv75idh4w")))) + (build-system perl-build-system) + (home-page "http://search.cpan.org/dist/IO-Interactive") + (synopsis "Utilities for interactive I/O") + (description "This module provides three utility subroutines that make it +easier to develop interactive applications: is_interactive(), interactive(), +and busy()") + (license (package-license perl)))) + (define-public perl-io-stringy (package (name "perl-io-stringy") @@ -1852,6 +2470,37 @@ filehandles; in particular, IO::Scalar, IO::ScalarArray, and IO::Lines.") pseudo ttys.") (license (package-license perl)))) +(define-public perl-ipc-run + (package + (name "perl-ipc-run") + (version "0.94") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/T/TO/TODDR/" + "IPC-Run-" version ".tar.gz")) + (sha256 + (base32 + "0nv0lpw31zaz6vi42q7ihjj3j382j4njicp5k0gsczib3b4kdcrf")))) + (build-system perl-build-system) + (propagated-inputs + `(("perl-io-tty" ,perl-io-tty))) + (arguments + `(#:phases (modify-phases %standard-phases + (add-before + 'check 'disable-w32-test + (lambda _ + ;; This test fails, and we're not really interested in + ;; it, so disable it. + (delete-file "t/win32_compile.t")))))) + (home-page "http://search.cpan.org/dist/IPC-Run") + (synopsis "system() and background procs w/ piping, redirs, ptys") + (description "IPC::Run allows you run and interact with child processes +using files, pipes, and pseudo-ttys. Both system()-style and scripted usages +are supported and may be mixed. Likewise, functional and OO API styles are +both supported and may be mixed.") + (license (package-license perl)))) + (define-public perl-ipc-run3 (package (name "perl-ipc-run3") @@ -1916,6 +2565,35 @@ allowing data to be efficiently communicated between processes.") versa using either JSON::XS or JSON::PP.") (license (package-license perl)))) +(define-public perl-json-any + (package + (name "perl-json-any") + (version "1.38") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/E/ET/ETHER/" + "JSON-Any-" version ".tar.gz")) + (sha256 + (base32 + "0mk6shg82i7y852bvj5d0qqma1d9k0jh10k4mg62hbgr800gb2m4")))) + (build-system perl-build-system) + (native-inputs + `(("perl-test-fatal" ,perl-test-fatal) + ("perl-test-requires", perl-test-requires) + ("perl-test-warnings", perl-test-warnings) + ("perl-test-without-module", perl-test-without-module))) + (propagated-inputs + `(("perl-namespace-clean" ,perl-namespace-clean))) + (home-page "http://search.cpan.org/dist/JSON-Any") + (synopsis "Wrapper for Perl JSON classes") + (description + "This module tries to provide a coherent API to bring together the +various JSON modules currently on CPAN. This module will allow you to code to +any JSON API and have it work regardless of which JSON module is actually +installed.") + (license (package-license perl)))) + (define-public perl-json-maybexs (package (name "perl-json-maybexs") @@ -1963,6 +2641,30 @@ either uses the first module it finds or throws an error.") versa.") (license (package-license perl)))) +(define-public perl-list-allutils + (package + (name "perl-list-allutils") + (version "0.09") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/D/DR/DROLSKY/" + "List-AllUtils-" version ".tar.gz")) + (sha256 + (base32 + "1qmfpmly0pghc94k6ifnd1vwzlv8nks27qkqs6h4p7vcricn7zjc")))) + (build-system perl-build-system) + (native-inputs + `(("perl-test-warnings" ,perl-test-warnings))) + (propagated-inputs + `(("perl-list-moreutils" ,perl-list-moreutils) + ("perl-scalar-list-utils" ,perl-scalar-list-utils))) + (home-page "http://search.cpan.org/dist/List-AllUtils") + (synopsis "Combination of List::Util and List::MoreUtils") + (description "This module exports all of the functions that either +List::Util or List::MoreUtils defines, with preference to List::Util.") + (license (package-license perl)))) + (define-public perl-list-moreutils (package (name "perl-list-moreutils") @@ -2008,6 +2710,26 @@ follows LRU semantics, that is, the last n results, where n is specified as the argument to the CACHESIZE parameter, will be cached.") (license (package-license perl)))) +(define-public perl-mime-types + (package + (name "perl-mime-types") + (version "2.09") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/" + "MIME-Types-" version ".tar.gz")) + (sha256 + (base32 + "0s7s2z9xc1nc2l59rk80iaa04r36k0y95231212kz5p3ln7szk1c")))) + (build-system perl-build-system) + (home-page "http://search.cpan.org/dist/MIME-Types") + (synopsis "Definition of MIME types") + (description "This module provides a list of known mime-types, combined +from various sources. For instance, it contains all IANA types and the +knowledge of Apache.") + (license (package-license perl)))) + (define-public perl-module-build-tiny (package (name "perl-module-build-tiny") @@ -2191,6 +2913,29 @@ from Moose::Conflicts and moose-outdated.") programs for dependencies.") (license (package-license perl)))) +(define-public perl-module-util + (package + (name "perl-module-util") + (version "1.09") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/M/MA/MATTLAW/" + "Module-Util-" version ".tar.gz")) + (sha256 + (base32 + "1ip2yg3x517gg8c48crhd52ba864vmyimvm0ibn4ci068mmcpyvc")))) + (build-system perl-build-system) + (native-inputs + `(("perl-module-build" ,perl-module-build))) ; >= 0.40 + (home-page "http://search.cpan.org/dist/Module-Util") + (synopsis "Module name tools and transformations") + (description "This module provides a few useful functions for manipulating +module names. Its main aim is to centralise some of the functions commonly +used by modules that manipulate other modules in some way, like converting +module names to relative paths.") + (license (package-license perl)))) + (define-public perl-moo (package (name "perl-moo") @@ -2469,6 +3214,28 @@ BUILD methods are called. It tries to be as non-intrusive as possible.") validation to Moose.") (license (package-license perl)))) +(define-public perl-moosex-relatedclassroles + (package + (name "perl-moosex-relatedclassroles") + (version "0.004") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/H/HD/HDP/" + "MooseX-RelatedClassRoles-" version ".tar.gz")) + (sha256 + (base32 + "17vynkf6m5d039qkr4in1c9lflr8hnwp1fgzdwhj4q6jglipmnrh")))) + (build-system perl-build-system) + (propagated-inputs + `(("perl-moose" ,perl-moose) + ("perl-moosex-role-parameterized" ,perl-moosex-role-parameterized))) + (home-page "http://search.cpan.org/dist/MooseX-RelatedClassRoles") + (synopsis "Apply roles to a related Perl class") + (description "This module applies roles to make a subclass instead of +manually setting up a subclass.") + (license (package-license perl)))) + (define-public perl-moosex-role-parameterized (package (name "perl-moosex-role-parameterized") @@ -2548,6 +3315,32 @@ separated into get and set methods. The get methods have the same name as the accessor, while set methods are prefixed with \"_set_\".") (license artistic2.0))) +(define-public perl-moosex-strictconstructor + (package + (name "perl-moosex-strictconstructor") + (version "0.19") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/D/DR/DROLSKY/" + "MooseX-StrictConstructor-" version ".tar.gz")) + (sha256 + (base32 + "0ccawja1kabgglrkdw5v82m1pbw189a0mnd33l43rs01d70p6ra8")))) + (build-system perl-build-system) + (native-inputs + `(("perl-moose" ,perl-moose) + ("perl-test-fatal" ,perl-test-fatal))) + (propagated-inputs + `(("perl-moose" ,perl-moose) + ("perl-namespace-autoclean" ,perl-namespace-autoclean))) + (home-page "http://search.cpan.org/dist/MooseX-StrictConstructor") + (synopsis "Strict object constructors for Moose") + (description "Simply loading this module makes your constructors +\"strict\". If your constructor is called with an attribute init argument that +your class does not declare, then it calls Moose->throw_error(). ") + (license artistic2.0))) + (define-public perl-moosex-traits-pluggable (package (name "perl-moosex-traits-pluggable") @@ -2603,6 +3396,71 @@ behind the scenes it namespaces all your type declarations, effectively prevent name clashes between packages.") (license (package-license perl)))) +(define-public perl-moosex-types-datetime + (package + (name "perl-moosex-types-datetime") + (version "0.10") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/E/ET/ETHER/" + "MooseX-Types-DateTime-" version ".tar.gz")) + (sha256 + (base32 + "03p66rx0qj2p23n2i2rj7c7x41621jzzaxscrpg95mb3mqmravc0")))) + (build-system perl-build-system) + (native-inputs + `(("perl-module-build-tiny" ,perl-module-build-tiny) + ("perl-moose" ,perl-moose) + ("perl-test-fatal" ,perl-test-fatal) + ("perl-test-simple" ,perl-test-simple))) + (propagated-inputs + `(("perl-datetime" ,perl-datetime) + ("perl-datetime-locale" ,perl-datetime-locale) + ("perl-datetime-timezone" ,perl-datetime-timezone) + ("perl-moose" ,perl-moose) + ("perl-moosex-types" ,perl-moosex-types) + ("perl-namespace-clean" ,perl-namespace-clean))) + (home-page "http://search.cpan.org/dist/MooseX-Types-DateTime") + (synopsis "DateTime related constraints and coercions for Moose") + (description "This module packages several Moose::Util::TypeConstraints +with coercions, designed to work with the DateTime suite of objects.") + (license (package-license perl)))) + +(define-public perl-moosex-types-datetime-morecoercions + (package + (name "perl-moosex-types-datetime-morecoercions") + (version "0.14") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/E/ET/ETHER/" + "MooseX-Types-DateTime-MoreCoercions-" + version ".tar.gz")) + (sha256 + (base32 + "0888ns6fmvpcj5vh86n8mra9anq8jak7gf0b1z5hvww4birki6dn")))) + (build-system perl-build-system) + (native-inputs + `(("perl-module-build-tiny" ,perl-module-build-tiny) + ("perl-test-fatal" ,perl-test-fatal) + ("perl-test-simple" ,perl-test-simple))) + (propagated-inputs + `(("perl-datetime" ,perl-datetime) + ("perl-datetimex-easy" ,perl-datetimex-easy) + ("perl-moose" ,perl-moose) + ("perl-moosex-types" ,perl-moosex-types) + ("perl-moosex-types-datetime" ,perl-moosex-types-datetime) + ("perl-namespace-clean" ,perl-namespace-clean) + ("perl-time-duration-parse" ,perl-time-duration-parse))) + (home-page + "http://search.cpan.org/dist/MooseX-Types-DateTime-MoreCoercions") + (synopsis "Extensions to MooseX::Types::DateTime") + (description "This module builds on MooseX::Types::DateTime to add +additional custom types and coercions. Since it builds on an existing type, +all coercions and constraints are inherited.") + (license (package-license perl)))) + (define-public perl-moosex-types-loadableclass (package (name "perl-moosex-types-loadableclass") @@ -2632,6 +3490,32 @@ prevent name clashes between packages.") constraint with coercion to load the class.") (license (package-license perl)))) +(define-public perl-moox-types-mooselike + (package + (name "perl-moox-types-mooselike") + (version "0.28") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/M/MA/MATEU/" + "MooX-Types-MooseLike-" version ".tar.gz")) + (sha256 + (base32 + "15af2xmpari4vwjwxn1m9yzjfffkr2aiisqqfij31gxcdk15fpk3")))) + (build-system perl-build-system) + (native-inputs + `(("perl-moo" ,perl-moo) + ("perl-test-fatal" ,perl-test-fatal))) + (propagated-inputs + `(("perl-module-runtime" ,perl-module-runtime) + ("perl-strictures" ,perl-strictures))) + (home-page "http://search.cpan.org/dist/MooX-Types-MooseLike") + (synopsis "Moosish types and type builder") + (description "MooX::Types::MooseLike provides a possibility to build your +own set of Moose-like types. These custom types can then be used to describe +fields in Moo-based classes.") + (license (package-license perl)))) + (define-public perl-mro-compat (package (name "perl-mro-compat") @@ -2974,6 +3858,27 @@ up inheritance from those modules at the same time.") directory specifications in a cross-platform manner.") (license (package-license perl)))) +(define-public perl-pod-coverage + (package + (name "perl-pod-coverage") + (version "0.23") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/R/RC/RCLAMP/" + "Pod-Coverage-" version ".tar.gz")) + (sha256 + (base32 + "01xifj83dv492lxixijmg6va02rf3ydlxly0a9slmx22r6qa1drh")))) + (build-system perl-build-system) + (propagated-inputs + `(("perl-devel-symdump" ,perl-devel-symdump))) + (home-page "http://search.cpan.org/dist/Pod-Coverage") + (synopsis "Check for comprehensive documentation of a module") + (description "This module provides a mechanism for determining if the pod +for a given module is comprehensive.") + (license (package-license perl)))) + (define-public perl-posix-strftime-compiler (package (name "perl-posix-strftime-compiler") @@ -3017,6 +3922,27 @@ Module::Build project, but has been externalized here for general use.") "Probe-Perl-" version)) (license (package-license perl)))) +(define-public perl-readonly + (package + (name "perl-readonly") + (version "2.00") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/S/SA/SANKO/" + "Readonly-" version ".tar.gz")) + (sha256 + (base32 + "165zcf9lpijdpkx82za0g9rx8ckjnhipmcivdkyzshl8jmp1bl4v")))) + (build-system perl-build-system) + (home-page "http://search.cpan.org/dist/Readonly") + (synopsis "Create read-only scalars, arrays, hashes") + (description "This module provides a facility for creating non-modifiable +variables in Perl. This is useful for configuration files, headers, etc. It +can also be useful as a development and debugging tool for catching updates to +variables that should not be changed.") + (license (package-license perl)))) + (define-public perl-regexp-common (package (name "perl-regexp-common") @@ -3108,6 +4034,68 @@ of execution is aborted prematurely. This effectively allows lexically-scoped collector.") (license (package-license perl)))) +(define-public perl-set-infinite + (package + (name "perl-set-infinite") + (version "0.65") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/F/FG/FGLOCK/" + "Set-Infinite-" version ".tar.gz")) + (sha256 + (base32 + "07vyp0jpndcxkbyjk432nillxxk22wrmm2rs985y8ba96h3qig07")))) + (build-system perl-build-system) + (home-page "http://search.cpan.org/dist/Set-Infinite") + (synopsis "Infinite sets") + (description "Set::Infinite is a set theory module for infinite sets.") + (license (package-license perl)))) + +(define-public perl-set-scalar + (package + (name "perl-set-scalar") + (version "1.29") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/D/DA/DAVIDO/" + "Set-Scalar-" version ".tar.gz")) + (sha256 + (base32 + "07aiqkyi1p22drpcyrrmv7f8qq6fhrxh007achy2vryxyck1bp53")))) + (build-system perl-build-system) + (home-page "http://search.cpan.org/dist/Set-Scalar") + (synopsis "Set operations for Perl") + (description "The first priority of Set::Scalar is to be a convenient +interface to sets (as in: unordered colletions of Perl scalars.) While not +designed to be slow or big, neither has it been designed to be fast or +compact.") + (license (package-license perl)))) + +(define-public perl-spiffy + (package + (name "perl-spiffy") + (version "0.46") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/I/IN/INGY/" + "Spiffy-" version ".tar.gz")) + (sha256 + (base32 + "18qxshrjh0ibpzjm2314157mxlibh3smyg64nr4mq990hh564n4g")))) + (build-system perl-build-system) + (home-page "http://search.cpan.org/dist/Spiffy") + (synopsis "Spiffy Perl Interface Framework For You") + (description "Spiffy is a framework and methodology for doing object +oriented (OO) programming in Perl. Spiffy combines the best parts of +Exporter.pm, base.pm, mixin.pm and SUPER.pm into one magic foundation class. +It attempts to fix all the nits and warts of traditional Perl OO, in a clean, +straightforward and (perhaps someday) standard way. Spiffy borrows ideas from +other OO languages like Python, Ruby, Java and Perl 6.") + (license (package-license perl)))) + (define-public perl-stream-buffered (package (name "perl-stream-buffered") @@ -3362,6 +4350,26 @@ clock speed.") "Sys-CPU-" version)) (license (package-license perl)))) +(define-public perl-sys-hostname-long + (package + (name "perl-sys-hostname-long") + (version "1.5") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/S/SC/SCOTT/" + "Sys-Hostname-Long-" version ".tar.gz")) + (sha256 + (base32 + "1jv5n8jv48c1p8svjsigyxndv1ygsq8wgwj9c7ypx1vaf3rns679")))) + (build-system perl-build-system) + (arguments `(#:tests? #f)) ;no `hostname' during build + (home-page "http://search.cpan.org/dist/Sys-Hostname-Long") + (synopsis "Get full hostname in Perl") + (description "Sys::Hostname::Long tries very hard to get the full hostname +of a system.") + (license (package-license perl)))) + (define-public perl-task-weaken (package (name "perl-task-weaken") @@ -3410,6 +4418,166 @@ it can be used equally well for processing any other kind of text based documents: HTML, XML, POD, PostScript, LaTeX, and so on.") (license (package-license perl)))) +(define-public perl-template-timer + (package + (name "perl-template-timer") + (version "1.00") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/P/PE/PETDANCE/" + "Template-Timer-" version ".tar.gz")) + (sha256 + (base32 + "1d3pbcx1kz73ncg8s8lx3ifwphz838qy0m40gdar7790cnrlqcdp")))) + (build-system perl-build-system) + (propagated-inputs + `(("perl-template-toolkit" ,perl-template-toolkit))) + (home-page "http://search.cpan.org/dist/Template-Timer") + (synopsis "Profiling for Template Toolkit") + (description "Template::Timer provides inline profiling of the template +processing in Perl code.") + (license (list gpl3 artistic2.0)))) + +(define-public perl-term-encoding + (package + (name "perl-term-encoding") + (version "0.02") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/M/MI/MIYAGAWA/" + "Term-Encoding-" version ".tar.gz")) + (sha256 + (base32 + "1k6g4q7snxggv5fdqnzw29al4mwbwg0hl0skzfnczh508qiyfx7j")))) + (build-system perl-build-system) + (home-page "http://search.cpan.org/dist/Term-Encoding") + (synopsis "Detect encoding of the current terminal") + (description "Term::Encoding is a simple module to detect the encoding of +the current terminal expects in various ways.") + (license (package-license perl)))) + +(define-public perl-term-progressbar + (package + (name "perl-term-progressbar") + (version "2.17") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/S/SZ/SZABGAB/" + "Term-ProgressBar-" version ".tar.gz")) + (sha256 + (base32 + "15pn42zf793dplpfnmawh7v7xc4qm38s1jhvn1agx4cafcn61q61")))) + (build-system perl-build-system) + (native-inputs + `(("perl-capture-tiny" ,perl-capture-tiny) + ("perl-test-exception" ,perl-test-exception))) + (propagated-inputs + `(("perl-class-methodmaker" ,perl-class-methodmaker) + ("perl-term-readkey" ,perl-term-readkey))) + (home-page "http://search.cpan.org/dist/Term-ProgressBar") + (synopsis "Progress meter on a standard terminal") + (description "Term::ProgressBar provides a simple progress bar on the +terminal, to let the user know that something is happening, roughly how much +stuff has been done, and maybe an estimate at how long remains.") + (license (package-license perl)))) + +(define-public perl-term-progressbar-quiet + (package + (name "perl-term-progressbar-quiet") + (version "0.31") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/L/LB/LBROCARD/" + "Term-ProgressBar-Quiet-" version ".tar.gz")) + (sha256 + (base32 + "19l4476iinwz19vh360k3rss38m9gmkg633i5v9jkg48yn954rr5")))) + (build-system perl-build-system) + (propagated-inputs + `(("perl-io-interactive" ,perl-io-interactive) + ("perl-term-progressbar" ,perl-term-progressbar) + ("perl-test-mockobject" ,perl-test-mockobject))) + (home-page "http://search.cpan.org/dist/Term-ProgressBar-Quiet") + (synopsis "Progress meter if run interactively") + (description "Term::ProgressBar is a wonderful module for showing progress +bars on the terminal. This module acts very much like that module when it is +run interactively. However, when it is not run interactively (for example, as +a cron job) then it does not show the progress bar.") + (license (package-license perl)))) + +(define-public perl-term-progressbar-simple + (package + (name "perl-term-progressbar-simple") + (version "0.03") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/E/EV/EVDB/" + "Term-ProgressBar-Simple-" version ".tar.gz")) + (sha256 + (base32 + "19kr6l2aflwv9yph5xishkpag038qb8wd4mkzb0x1psvgp3b63d2")))) + (build-system perl-build-system) + (propagated-inputs + `(("perl-term-progressbar-quiet" ,perl-term-progressbar-quiet))) + (home-page "http://search.cpan.org/dist/Term-ProgressBar-Simple") + (synopsis "Simple progress bars") + (description "Term::ProgressBar::Simple tells you how much work has been +done, how much is left to do, and estimate how long it will take.") + (license (package-license perl)))) + +(define-public perl-term-readkey + (package + (name "perl-term-readkey") + (version "2.32") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/J/JS/JSTOWE/" + "TermReadKey-" version ".tar.gz")) + (sha256 + (base32 + "1y79w5cj98w0a1nqxjhmaw01p2hfhzfw340m2qxd11p6124hxfaq")))) + (build-system perl-build-system) + (home-page "http://search.cpan.org/dist/TermReadKey") + (synopsis "Simple terminal control") + (description "This module, ReadKey, provides ioctl control for terminals +so the input modes can be changed (thus allowing reads of a single character +at a time), and also provides non-blocking reads of stdin, as well as several +other terminal related features, including retrieval/modification of the +screen size, and retrieval/modification of the control characters.") + (license (package-license perl)))) + +(define-public perl-test-base + (package + (name "perl-test-base") + (version "0.88") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/I/IN/INGY/" + "Test-Base-" version ".tar.gz")) + (sha256 + (base32 + "0fch1cvivnszbnwhpfmwv1rin04j5xkj1n1ylfmlxg6bm72qqdjj")))) + (build-system perl-build-system) + (native-inputs + `(("perl-algorithm-diff" ,perl-algorithm-diff) + ("perl-text-diff" ,perl-text-diff))) + (propagated-inputs + `(("perl-spiffy" ,perl-spiffy) + ("perl-test-deep" ,perl-test-deep))) + (home-page "http://search.cpan.org/dist/Test-Base") + (synopsis "Data-driven testing framework for Perl") + (description "Test::Base gives a way to trivially write your own test +framework base class. It concentrates on offering reusable data driven +patterns, so that you can write tests with a minimum of code.") + (license (package-license perl)))) + (define-public perl-test-cleannamespaces (package (name "perl-test-cleannamespaces") @@ -3630,6 +4798,34 @@ string comparison functions of Test::More, but which are more suitable when you test against long strings.") (license (package-license perl)))) +(define-public perl-test-mockobject + (package + (name "perl-test-mockobject") + (version "1.20140408") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/C/CH/CHROMATIC/" + "Test-MockObject-" version ".tar.gz")) + (sha256 + (base32 + "1anpf9l2wdriwaxw6pf76ghxkh4zm25n3wnhfqy1b439xqnhvzg5")))) + (build-system perl-build-system) + (native-inputs + `(("perl-test-exception" ,perl-test-exception) + ("perl-test-warn" ,perl-test-warn))) + (propagated-inputs + `(("perl-test-exception" ,perl-test-exception) + ("perl-test-warn" ,perl-test-warn) + ("perl-universal-can" ,perl-universal-can) + ("perl-universal-isa" ,perl-universal-isa))) + (home-page "http://search.cpan.org/dist/Test-MockObject") + (synopsis "Emulate troublesome interfaces in Perl") + (description "Test::MockObject allows you to create objects that conform +to particular interfaces with very little code. You don't have to reimplement +the behavior, just the input and the output.") + (license (package-license perl)))) + (define-public perl-test-mocktime (package (name "perl-test-mocktime") @@ -3746,6 +4942,27 @@ as flexible as possible to the tester.") Pod::Simple to do the heavy lifting.") (license (package-license perl)))) +(define-public perl-test-pod-coverage + (package + (name "perl-test-pod-coverage") + (version "1.10") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/N/NE/NEILB/" + "Test-Pod-Coverage-" version ".tar.gz")) + (sha256 + (base32 + "1m203mhgfilz7iqc8mxaw4lw02fz391mni3n25sfx7nryylwrja8")))) + (build-system perl-build-system) + (propagated-inputs + `(("perl-pod-coverage" ,perl-pod-coverage))) + (home-page "http://search.cpan.org/dist/Test-Pod-Coverage") + (synopsis "Check for pod coverage") + (description "This module adds a test to your Perl distribution which +checks for pod coverage of all appropriate files.") + (license artistic2.0))) + (define-public perl-test-requires (package (name "perl-test-requires") @@ -3874,6 +5091,27 @@ STDOUT, STDERR, warnings, exceptions, would-be exit codes, and return values from boxed blocks of test code.") (license (package-license perl)))) +(define-public perl-test-utf8 + (package + (name "perl-test-utf8") + (version "1.01") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/M/MA/MARKF/" + "Test-utf8-" version ".tar.gz")) + (sha256 + (base32 + "0yhvf735v334qqvp9zg7i66qyk6r4cbk5s2psv93d3fdd4bindzg")))) + (build-system perl-build-system) + (home-page "http://search.cpan.org/dist/Test-utf8") + (synopsis "UTF-8 testing in Perl") + (description "This module is a collection of tests useful for dealing with +UTF-8 strings in Perl. This module has two types of tests: The validity tests +check if a string is valid and not corrupt, whereas the characteristics tests +will check that string has a given set of characteristics.") + (license (package-license perl)))) + (define-public perl-test-warn (package (name "perl-test-warn") @@ -3963,6 +5201,46 @@ installed.") generation of tests in nested combinations of contexts.") (license (package-license perl)))) ;See LICENSE +(define-public perl-test-yaml + (package + (name "perl-test-yaml") + (version "1.05") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/I/IN/INGY/" + "Test-YAML-" version ".tar.gz")) + (sha256 + (base32 + "079nayc0fp2fwjv8s2yr069bdffln699j6z3lqr5dpx1v2qg82ck")))) + (build-system perl-build-system) + (propagated-inputs + `(("perl-test-base" ,perl-test-base))) + (home-page "http://search.cpan.org/dist/Test-YAML") + (synopsis "Testing module for YAML implementations") + (description "Test::YAML is a subclass of Test::Base with YAML specific +support.") + (license (package-license perl)))) + +(define-public perl-text-aligner + (package + (name "perl-text-aligner") + (version "0.12") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/" + "Text-Aligner-" version ".tar.gz")) + (sha256 + (base32 + "0a6zkchc0apvzkch6z18cx6h97xfiv50r7n4xhg90x8dvk75qzcs")))) + (build-system perl-build-system) + (home-page "http://search.cpan.org/dist/Text-Aligner") + (synopsis "Align text") + (description "Text::Aligner exports a single function, align(), which is +used to justify strings to various alignment styles.") + (license x11))) + (define-public perl-text-balanced (package (name "perl-text-balanced") @@ -3982,6 +5260,26 @@ generation of tests in nested combinations of contexts.") text sequences from strings.") (license (package-license perl)))) +(define-public perl-text-csv + (package + (name "perl-text-csv") + (version "1.33") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/M/MA/MAKAMAKA/" + "Text-CSV-" version ".tar.gz")) + (sha256 + (base32 + "05a1nayxv04n0hx7y3m8327ijm34k9nhngrbxl18zmgzpawqynww")))) + (build-system perl-build-system) + (home-page "http://search.cpan.org/dist/Text-CSV") + (synopsis "Manipulate comma-separated values") + (description "Text::CSV provides facilities for the composition and +decomposition of comma-separated values. An instance of the Text::CSV class +can combine fields into a CSV string and parse a CSV string into fields.") + (license (package-license perl)))) + (define-public perl-text-diff (package (name "perl-text-diff") @@ -4044,6 +5342,26 @@ you want to do full file globbing use the File::Glob module instead.") (description "Text::SimpleTable draws simple ASCII tables.") (license artistic2.0))) +(define-public perl-text-table + (package + (name "perl-text-table") + (version "1.130") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/" + "Text-Table-" version ".tar.gz")) + (sha256 + (base32 + "02c8v38k639r23dgxwgvsy4myjjzvgdb238kpiffsiz25ab3xp5j")))) + (build-system perl-build-system) + (propagated-inputs + `(("perl-text-aligner" ,perl-text-aligner))) + (home-page "http://search.cpan.org/dist/Text-Table") + (synopsis "Organize Data in Tables") + (description "Text::Table renders plaintext tables.") + (license x11))) + (define-public perl-text-unidecode (package (name "perl-text-unidecode") @@ -4067,6 +5385,31 @@ letters, the pronunciation expressed by the text in some other writing system.") (license (package-license perl)))) +(define-public perl-throwable + (package + (name "perl-throwable") + (version "0.200012") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/" + "Throwable-" version ".tar.gz")) + (sha256 + (base32 + "0cy8kza9pd9y5m7k5385asf4xqm54vdqnqm0am10z6j2mrxwr527")))) + (build-system perl-build-system) + (native-inputs + `(("perl-devel-stacktrace" ,perl-devel-stacktrace))) + (propagated-inputs + `(("perl-devel-stacktrace" ,perl-devel-stacktrace) + ("perl-module-runtime" ,perl-module-runtime) + ("perl-moo" ,perl-moo))) + (home-page "http://search.cpan.org/dist/Throwable") + (synopsis "Role for classes that can be thrown") + (description "Throwable is a role for classes that are meant to be thrown +as exceptions to standard program flow.") + (license (package-license perl)))) + (define-public perl-tie-ixhash (package (name "perl-tie-ixhash") @@ -4111,6 +5454,51 @@ object it was given as it's first argument. This way side effects of calling $object->TIEHASH are avoided.") (license (package-license perl)))) +(define-public perl-time-duration + (package + (name "perl-time-duration") + (version "1.1") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/A/AV/AVIF/" + "Time-Duration-" version ".tar.gz")) + (sha256 + (base32 + "0klg33yzb7pr9ra76s6gj5k7nravqnw2lbh022x1xwlj92f43756")))) + (build-system perl-build-system) + (native-inputs + `(("perl-test-pod" ,perl-test-pod) + ("perl-test-pod-coverage" ,perl-test-pod-coverage))) + (home-page "http://search.cpan.org/dist/Time-Duration") + (synopsis "English expression of durations") + (description "This module provides functions for expressing durations in +rounded or exact terms.") + (license (package-license perl)))) + +(define-public perl-time-duration-parse + (package + (name "perl-time-duration-parse") + (version "0.11") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/N/NE/NEILB/" + "Time-Duration-Parse-" version ".tar.gz")) + (sha256 + (base32 + "1yk4cqkldwzkfy9y9ngqrj7p7sbsrsfa26mrm8f70z5n5m8q31x0")))) + (build-system perl-build-system) + (native-inputs + `(("perl-time-duration" ,perl-time-duration))) + (propagated-inputs + `(("perl-exporter-lite" ,perl-exporter-lite))) + (home-page "http://search.cpan.org/dist/Time-Duration-Parse") + (synopsis "Parse time duration strings") + (description "Time::Duration::Parse is a module to parse human readable +duration strings like \"2 minutes\" and \"3 seconds\" to seconds.") + (license (package-license perl)))) + (define-public perl-time-local (package (name "perl-time-local") @@ -4261,6 +5649,46 @@ else.") common serialisation formats such as JSON or CBOR.") (license (package-license perl)))) +(define-public perl-universal-can + (package + (name "perl-universal-can") + (version "1.20140328") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/C/CH/CHROMATIC/" + "UNIVERSAL-can-" version ".tar.gz")) + (sha256 + (base32 + "03wr25zznbfn1g8zmmq3g6a6288xr30priwvm75y4vvqfkrajbaj")))) + (build-system perl-build-system) + (home-page "http://search.cpan.org/dist/UNIVERSAL-can") + (synopsis "UNIVERSAL::can() reimplementation") + (description "This module attempts to work around people calling +UNIVERSAL::can() as a function, which it is not.") + (license (package-license perl)))) + +(define-public perl-universal-isa + (package + (name "perl-universal-isa") + (version "1.20140927") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/E/ET/ETHER/" + "UNIVERSAL-isa-" version ".tar.gz")) + (sha256 + (base32 + "0ryqk58nkzhdq26si7mh49h8wand1wlmyf4m78qgiyn8ib6989bb")))) + (build-system perl-build-system) + (native-inputs + `(("perl-module-build-tiny" ,perl-module-build-tiny))) + (home-page "http://search.cpan.org/dist/UNIVERSAL-isa") + (synopsis "UNIVERSAL::isa() reimplementation") + (description "This module attempts to recover from people calling +UNIVERSAL::isa as a function") + (license (package-license perl)))) + (define-public perl-variable-magic (package (name "perl-variable-magic") @@ -4283,6 +5711,27 @@ it. With this module, you can add your own magic to any variable without having to write a single line of XS.") (license (package-license perl)))) +(define-public perl-yaml + (package + (name "perl-yaml") + (version "1.14") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/I/IN/INGY/" + "YAML-" version ".tar.gz")) + (sha256 + (base32 + "0sswbkyisgny7ksw34n7zdaxrhsbbn7dgjb9gjybpzhcnml476kc")))) + (build-system perl-build-system) + (native-inputs + `(("perl-test-yaml" ,perl-test-yaml))) + (home-page "http://search.cpan.org/dist/YAML") + (synopsis "YAML for Perl") + (description "The YAML.pm module implements a YAML Loader and Dumper based +on the YAML 1.0 specification.") + (license (package-license perl)))) + (define-public perl-yaml-tiny (package (name "perl-yaml-tiny") diff --git a/gnu/packages/photo.scm b/gnu/packages/photo.scm index 164f6e27ea..bf3c76c51e 100644 --- a/gnu/packages/photo.scm +++ b/gnu/packages/photo.scm @@ -28,7 +28,7 @@ #:use-module (gnu packages readline) #:use-module (gnu packages popt) #:use-module (gnu packages perl) - #:use-module ((gnu packages base) #:select (tzdata))) + #:use-module (gnu packages base)) (define-public libexif (package diff --git a/gnu/packages/plotutils.scm b/gnu/packages/plotutils.scm index 245dfe9c67..6166226dce 100644 --- a/gnu/packages/plotutils.scm +++ b/gnu/packages/plotutils.scm @@ -118,13 +118,13 @@ using the Cairo drawing library.") '(#:tests? #f #:phases (modify-phases %standard-phases - (replace configure (lambda _ (chdir "src"))) - (add-before install make-target-directories + (replace 'configure (lambda _ (chdir "src"))) + (add-before 'install 'make-target-directories (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (mkdir-p (string-append out "/bin")) #t))) - (add-after install install-prefabs + (add-after 'install 'install-prefabs (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (dir (string-append out diff --git a/gnu/packages/polkit.scm b/gnu/packages/polkit.scm index 572d52404b..be7302ed49 100644 --- a/gnu/packages/polkit.scm +++ b/gnu/packages/polkit.scm @@ -86,7 +86,12 @@ for unprivileged applications.") (native-inputs `(("pkg-config", pkg-config))) (arguments - `(#:tests? #f)) ; there is a test subdirectory, but no test target + `(#:configure-flags (list (string-append "-DCMAKE_INSTALL_RPATH=" + (assoc-ref %outputs "out") + "/lib:" + (assoc-ref %outputs "out") + "/lib64")) + #:tests? #f)) ; there is a test subdirectory, but no test target (home-page "http://api.kde.org/kdesupport-api/polkit-qt-1-apidocs/") (synopsis "Qt frontend to the polkit library") (description "Polkit-qt is a library that lets developers use the diff --git a/gnu/packages/popt.scm b/gnu/packages/popt.scm index 9ccca5c8b5..7739c7a276 100644 --- a/gnu/packages/popt.scm +++ b/gnu/packages/popt.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net> ;;; ;;; This file is part of GNU Guix. ;;; @@ -22,6 +23,34 @@ #:use-module (guix build-system gnu) #:use-module (guix licenses)) +(define-public argtable + (package + (name "argtable") + (version "2.13") + (source (origin + (method url-fetch) + (uri (string-append + "mirror://sourceforge/argtable/argtable" + (string-join (string-split version #\.) "-") + ".tar.gz")) + (sha256 + (base32 + "1gyxf4bh9jp5gb3l6g5qy90zzcf3vcpk0irgwbv1lc6mrskyhxwg")))) + (build-system gnu-build-system) + (home-page "http://argtable.sourceforge.net/") + (synopsis "Command line option parsing library") + (description + "Argtable is an ANSI C library for parsing GNU style command line +options. It enables a program's command line syntax to be defined in the +source code as an array of argtable structs. The command line is then parsed +according to that specification and the resulting values are returned in those +same structs where they are accessible to the main program. Both tagged (-v, +--verbose, --foo=bar) and untagged arguments are supported, as are multiple +instances of each argument. Syntax error handling is automatic and the library +also provides the means for generating a textual description of the command +line syntax.") + (license lgpl2.0+))) + (define-public popt (package (name "popt") diff --git a/gnu/packages/pretty-print.scm b/gnu/packages/pretty-print.scm index 1576c3dfea..81b6537f15 100644 --- a/gnu/packages/pretty-print.scm +++ b/gnu/packages/pretty-print.scm @@ -144,7 +144,7 @@ different programming languages.") (define-public source-highlight (package (name "source-highlight") - (version "3.1.7") + (version "3.1.8") (source (origin (method url-fetch) @@ -152,11 +152,7 @@ different programming languages.") version ".tar.gz")) (sha256 (base32 - "1s49ld8cnpzhhwq0r7s0sfm3cg3nhhm0wla27lwraifrrl3y1cp1")) - (patches - (list (search-patch - ;; Patch submitted as Savannah item #41786 - "source-highlight-regexrange-test.patch"))))) + "18xdalxg7yzrxc1njzgw7aryq2jdm7zq2yqz41sc7k6il5z6lcq1")))) (build-system gnu-build-system) ;; The ctags that comes with emacs does not support the --excmd options, ;; so can't be used diff --git a/gnu/packages/pulseaudio.scm b/gnu/packages/pulseaudio.scm index d76f74b775..c7c5611eb5 100644 --- a/gnu/packages/pulseaudio.scm +++ b/gnu/packages/pulseaudio.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> -;;; Copyright © 2014 Mark H Weaver <mhw@netris.org> +;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -24,7 +24,7 @@ #:use-module (guix build-system gnu) #:use-module (gnu packages) #:use-module (gnu packages algebra) - #:use-module ((gnu packages autotools) #:select (libltdl)) + #:use-module (gnu packages autotools) #:use-module (gnu packages avahi) #:use-module (gnu packages check) #:use-module (gnu packages gdbm) @@ -128,7 +128,9 @@ rates. ") '(substitute* "src/daemon/default.pa.in" (("load-module module-console-kit" all) (string-append "#" all "\n")))) - (patches (list (search-patch "pulseaudio-fix-mult-test.patch"))))) + (patches + (list (search-patch "pulseaudio-fix-mult-test.patch") + (search-patch "pulseaudio-longer-test-timeout.patch"))))) (build-system gnu-build-system) (arguments `(#:configure-flags (list "--localstatedir=/var" ;"--sysconfdir=/etc" diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 2fcdbcc211..9da91111f6 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -26,14 +26,13 @@ (define-module (gnu packages python) #:use-module ((guix licenses) - #:select (asl2.0 bsd-3 bsd-2 non-copyleft cc0 x11 x11-style + #:select (asl2.0 bsd-4 bsd-3 bsd-2 non-copyleft cc0 x11 x11-style gpl2 gpl2+ gpl3+ lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3+ psfl public-domain x11-style)) #:use-module ((guix licenses) #:select (expat zlib) #:prefix license:) #:use-module (gnu packages) #:use-module (gnu packages compression) #:use-module (gnu packages databases) - #:use-module (gnu packages elf) #:use-module (gnu packages fontutils) #:use-module (gnu packages gdbm) #:use-module (gnu packages gcc) @@ -46,6 +45,7 @@ #:use-module (gnu packages libffi) #:use-module (gnu packages maths) #:use-module (gnu packages multiprecision) + #:use-module (gnu packages networking) #:use-module (gnu packages ncurses) #:use-module (gnu packages openssl) #:use-module (gnu packages perl) @@ -134,7 +134,8 @@ (sqlite (assoc-ref %build-inputs "sqlite")) (openssl (assoc-ref %build-inputs "openssl")) (readline (assoc-ref %build-inputs "readline")) - (zlib (assoc-ref %build-inputs "zlib"))) + (zlib (assoc-ref %build-inputs "zlib")) + (out (assoc-ref %outputs "out"))) (list "--enable-shared" ; allow embedding "--with-system-ffi" ; build ctypes (string-append "CPPFLAGS=" @@ -151,43 +152,27 @@ "-L" sqlite "/lib " "-L" openssl "/lib " "-L" readline "/lib " - "-L" zlib "/lib"))) - - #:modules ((guix build gnu-build-system) - (guix build utils) - (guix build rpath) - (srfi srfi-26)) - #:imported-modules ((guix build gnu-build-system) - (guix build utils) - (guix build rpath)) + "-L" zlib "/lib " + "-Wl,-rpath=" out "/lib"))) #:phases - (alist-cons-after - 'strip 'add-lib-to-runpath - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (lib (string-append out "/lib"))) - ;; Add LIB to the RUNPATH of all the executables. - (with-directory-excursion out - (for-each (cut augment-rpath <> lib) - (find-files "bin" ".*"))))) + (alist-cons-before + 'configure 'patch-lib-shells + (lambda _ + ;; Filter for existing files, since some may not exist in all + ;; versions of python that are built with this recipe. + (substitute* (filter file-exists? + '("Lib/subprocess.py" + "Lib/popen2.py" + "Lib/distutils/tests/test_spawn.py" + "Lib/test/test_subprocess.py")) + (("/bin/sh") (which "sh")))) (alist-cons-before - 'configure 'patch-lib-shells + 'check 'pre-check (lambda _ - ;; Filter for existing files, since some may not exist in all - ;; versions of python that are built with this recipe. - (substitute* (filter file-exists? - '("Lib/subprocess.py" - "Lib/popen2.py" - "Lib/distutils/tests/test_spawn.py" - "Lib/test/test_subprocess.py")) - (("/bin/sh") (which "sh")))) - (alist-cons-before - 'check 'pre-check - (lambda _ - ;; 'Lib/test/test_site.py' needs a valid $HOME - (setenv "HOME" (getcwd))) - %standard-phases))))) + ;; 'Lib/test/test_site.py' needs a valid $HOME + (setenv "HOME" (getcwd))) + %standard-phases)))) (inputs `(("bzip2" ,bzip2) ("gdbm" ,gdbm) @@ -195,8 +180,7 @@ ("sqlite" ,sqlite) ; for sqlite extension ("openssl" ,openssl) ("readline" ,readline) - ("zlib" ,zlib) - ("patchelf" ,patchelf))) ; for (guix build rpath) + ("zlib" ,zlib))) (native-inputs `(("pkg-config" ,pkg-config))) (native-search-paths @@ -218,30 +202,24 @@ data types.") (define-public python (package (inherit python-2) - (version "3.3.5") + (version "3.4.3") (source (origin (method url-fetch) (uri (string-append "https://www.python.org/ftp/python/" version "/Python-" version ".tar.xz")) - (patches (list (search-patch "python-fix-tests.patch") - (search-patch "python-sqlite-3.8.4-test-fix.patch") - (search-patch "python-libffi-mips-n32-fix.patch"))) + (patches (list (search-patch "python-fix-tests.patch"))) (patch-flags '("-p0")) (sha256 (base32 - "1rdncc7g8g6f3lfdg33rli1yffbiq8z283xy4f5ksl1l8i49psdb")))) - (arguments - (let ((args `(#:modules ((guix build gnu-build-system) - (guix build utils) - (srfi srfi-1) - (srfi srfi-26)) - ,@(package-arguments python-2)))) - (substitute-keyword-arguments args - ((#:tests? _) #t)))) + "1f4nm4z08sy0kqwisvv95l02crv6dyysdmx44p1mz3bn6csrdcxm")))) + (arguments (substitute-keyword-arguments (package-arguments python-2) + ((#:tests? _) #t))) (native-search-paths (list (search-path-specification (variable "PYTHONPATH") - (files '("lib/python3.3/site-packages"))))))) + (files (list (string-append "lib/python" + (version-major+minor version) + "/site-packages")))))))) (define-public python-wrapper (package (inherit python) @@ -324,6 +302,72 @@ etc. ") (define-public python2-babel (package-with-python2 python-babel)) +(define-public python2-backport-ssl-match-hostname + (package + (name "python2-backport-ssl-match-hostname") + (version "3.4.0.2") + (source + (origin + (method url-fetch) + (uri (string-append + "https://pypi.python.org/packages/source/b/" + "backports.ssl_match_hostname/backports.ssl_match_hostname-" + version ".tar.gz")) + (sha256 + (base32 + "1bnn47ipvhy49n0m50v27lp4xj6sqdkdw676ypd7pawsn1zhwh87")))) + (build-system python-build-system) + (arguments `(#:python ,python-2)) + (inputs + `(("python2-setuptools" ,python2-setuptools))) + (home-page "https://pypi.python.org/pypi/backports.ssl_match_hostname") + (synopsis "Backport of ssl.match_hostname() function from Python 3.4") + (description + "This backport brings the ssl.match_hostname() function to users of +earlier versions of Python. The function checks the hostname in the +certificate returned by the server to which a connection has been established, +and verifies that it matches the intended target hostname.") + (license psfl))) + +(define-public python-h5py + (package + (name "python-h5py") + (version "2.4.0") + (source + (origin + (method url-fetch) + (uri (string-append "https://pypi.python.org/packages/source/h/h5py/h5py-" + version ".tar.gz")) + (sha256 + (base32 + "0q4f9l8grf6pwp64xbv8bmyxx416s7h4522nnxac056ap3savbps")))) + (build-system python-build-system) + (inputs + `(("python-cython" ,python-cython) + ("python-numpy" ,python-numpy) + ("hdf5" ,hdf5))) + (native-inputs + `(("python-setuptools" ,python-setuptools))) + (arguments `(#:tests? #f)) ; no test target + (home-page "http://www.h5py.org/") + (synopsis "Read and write HDF5 files from Python") + (description + "The h5py package provides both a high- and low-level interface to the +HDF5 library from Python. The low-level interface is intended to be a +complete wrapping of the HDF5 API, while the high-level component supports +access to HDF5 files, datasets and groups using established Python and NumPy +concepts.") + (license bsd-3))) + +(define-public python2-h5py + (let ((h5py (package-with-python2 python-h5py))) + (package (inherit h5py) + (inputs + `(("python2-numpy" ,python2-numpy) + ,@(alist-delete + "python-numpy" + (package-inputs h5py))))))) + (define-public python-lockfile (package (name "python-lockfile") @@ -585,6 +629,44 @@ datetime module, available in Python 2.3+.") "Parse human-readable date/time text") (license asl2.0))) +(define-public python-pandas + (package + (name "python-pandas") + (version "0.16.0") + (source + (origin + (method url-fetch) + (uri (string-append "https://pypi.python.org/packages/source/p/" + "pandas/pandas-" version ".tar.gz")) + (sha256 + (base32 "1wfrp8dx1zcsry6f09ndza6qm1yr7f163211f4l9vjlnhxpxw4s0")))) + (build-system python-build-system) + (arguments + `(;; Three tests fail: + ;; - test_read_google + ;; - test_read_yahoo + ;; - test_month_range_union_tz_dateutil + #:tests? #f)) + (propagated-inputs + `(("python-numpy" ,python-numpy) + ("python-pytz" ,python-pytz) + ("python-dateutil" ,python-dateutil-2))) + (native-inputs + `(("python-nose" ,python-nose) + ("python-setuptools" ,python-setuptools))) + (home-page "http://pandas.pydata.org") + (synopsis "Data structures for data analysis, time series, and statistics") + (description + "Pandas is a Python package providing fast, flexible, and expressive data +structures designed to make working with structured (tabular, +multidimensional, potentially heterogeneous) and time series data both easy +and intuitive. It aims to be the fundamental high-level building block for +doing practical, real world data analysis in Python.") + (license bsd-3))) + +(define-public python2-pandas + (package-with-python2 python-pandas)) + (define-public python-tzlocal (package (name "python-tzlocal") @@ -980,14 +1062,14 @@ syntax.") (define-public scons (package (name "scons") - (version "2.1.0") + (version "2.3.4") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/scons/scons-" version ".tar.gz")) (sha256 (base32 - "07cjn4afb2cljjrd3cr7xf062qq58z8q96f58z6yplhdyqafsfa1")))) + "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb")))) (build-system python-build-system) (arguments ;; With Python 3.x, fails to build with a syntax error. @@ -1555,9 +1637,36 @@ is used by the Requests library to verify HTTPS requests.") (define-public python2-certifi (package-with-python2 python-certifi)) -(define-public python2-requests +(define-public python-click + (package + (name "python-click") + (version "4.0") + (source + (origin + (method url-fetch) + (uri (string-append + "https://pypi.python.org/packages/source/c/click/click-" + version ".tar.gz")) + (sha256 + (base32 "0294x9g28w6zgswl0rsygkwi0wf6n480gf7fiiw5f9az3xhh77pl")))) + (build-system python-build-system) + (native-inputs + `(("python-setuptools" ,python-setuptools))) + (home-page "http://click.pocoo.org") + (synopsis "Command line library for Python") + (description + "Click is a Python package for creating command line interfaces in a +composable way with as little code as necessary. Its name stands for +\"Command Line Interface Creation Kit\". It's highly configurable but comes +with sensible defaults out of the box.") + (license bsd-3))) + +(define-public python2-click + (package-with-python2 python-click)) + +(define-public python-requests (package - (name "python2-requests") + (name "python-requests") (version "2.4.0") (source (origin (method url-fetch) @@ -1572,8 +1681,7 @@ is used by the Requests library to verify HTTPS requests.") (inputs `(("python-setuptools" ,python-setuptools) ("python-certifi" ,python-certifi))) - (arguments `(#:tests? #f ; no tests - #:python ,python-2)) + (arguments `(#:tests? #f)) ; no tests (home-page "http://python-requests.org/") (synopsis "Python HTTP library") (description @@ -1581,6 +1689,9 @@ is used by the Requests library to verify HTTPS requests.") than Python’s urllib2 library.") (license asl2.0))) +(define-public python2-requests + (package-with-python2 python-requests)) + (define-public python-jsonschema (package (name "python-jsonschema") @@ -2020,6 +2131,101 @@ mining and data analysis.") (alist-delete "python-scipy" (package-propagated-inputs scikit)))))))) +(define-public python-scikit-image + (package + (name "python-scikit-image") + (version "0.11.3") + (source + (origin + (method url-fetch) + (uri (string-append + "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-" + version ".tar.gz")) + (sha256 + (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn")))) + (build-system python-build-system) + (propagated-inputs + `(("python-matplotlib" ,python-matplotlib) + ("python-networkx" ,python-networkx) + ("python-numpy" ,python-numpy) + ("python-scipy" ,python-scipy) + ("python-six" ,python-six) + ("python-pillow" ,python-pillow))) + (native-inputs + `(("python-cython" ,python-cython) + ("python-setuptools" ,python-setuptools))) + (home-page "http://scikit-image.org/") + (synopsis "Image processing in Python") + (description + "scikit-image is a collection of algorithms for image processing.") + (license bsd-3))) + +(define-public python2-scikit-image + (let ((scikit-image (package-with-python2 python-scikit-image))) + (package (inherit scikit-image) + (native-inputs + `(("python2-mock" ,python2-mock) + ,@(package-native-inputs scikit-image))) + (propagated-inputs + `(("python2-pytz" ,python2-pytz) + ,@(package-propagated-inputs scikit-image)))))) + +(define-public python-redis + (package + (name "python-redis") + (version "2.10.3") + (source + (origin + (method url-fetch) + (uri (string-append + "https://pypi.python.org/packages/source/r/redis/redis-" + version ".tar.gz")) + (sha256 + (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4")))) + (build-system python-build-system) + ;; Tests require a running Redis server + (arguments '(#:tests? #f)) + (native-inputs + `(("python-setuptools" ,python-setuptools) + ("python-pytest" ,python-pytest))) + (home-page "https://github.com/andymccurdy/redis-py") + (synopsis "Redis Python client") + (description + "This package provides a Python interface to the Redis key-value store.") + (license license:expat))) + +(define-public python2-redis + (package-with-python2 python-redis)) + +(define-public python-rq + (package + (name "python-rq") + (version "0.5.2") + (source + (origin + (method url-fetch) + (uri (string-append + "https://pypi.python.org/packages/source/r/rq/rq-" + version ".tar.gz")) + (sha256 + (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix")))) + (build-system python-build-system) + (propagated-inputs + `(("python-click" ,python-click) + ("python-redis" ,python-redis))) + (native-inputs + `(("python-setuptools" ,python-setuptools))) + (home-page "http://python-rq.org/") + (synopsis "Simple job queues for Python") + (description + "RQ (Redis Queue) is a simple Python library for queueing jobs and +processing them in the background with workers. It is backed by Redis and it +is designed to have a low barrier to entry.") + (license bsd-2))) + +(define-public python2-rq + (package-with-python2 python-rq)) + (define-public python-cython (package (name "python-cython") @@ -2821,6 +3027,65 @@ PNG, PostScript, PDF, and SVG file output.") (define-public python2-cairocffi (package-with-python2 python-cairocffi)) +(define-public python-decorator + (package + (name "python-decorator") + (version "3.4.2") + (source + (origin + (method url-fetch) + (uri (string-append + "https://pypi.python.org/packages/source/d/decorator/decorator-" + version ".tar.gz")) + (sha256 + (base32 "0i2bnlkh0p9gs76hb28mafandcrig2fmv56w9ai6mshxwqn0083k")))) + (build-system python-build-system) + (arguments '(#:tests? #f)) ; no test target + (native-inputs + `(("python-setuptools" ,python-setuptools))) + (home-page "http://pypi.python.org/pypi/decorator/") + (synopsis "Python module to simplify usage of decorators") + (description + "The aim of the decorator module is to simplify the usage of decorators +for the average programmer, and to popularize decorators usage giving examples +of useful decorators, such as memoize, tracing, redirecting_stdout, locked, +etc. The core of this module is a decorator factory.") + (license license:expat))) + +(define-public python2-decorator + (package-with-python2 python-decorator)) + +(define-public python-drmaa + (package + (name "python-drmaa") + (version "0.7.6") + (source + (origin + (method url-fetch) + (uri (string-append + "https://pypi.python.org/packages/source/d/drmaa/drmaa-" + version ".tar.gz")) + (sha256 + (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh")))) + (build-system python-build-system) + ;; The test suite requires libdrmaa which is provided by the cluster + ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH + ;; should be set to the path of the libdrmaa library. + (arguments '(#:tests? #f)) + (native-inputs + `(("python-nose" ,python-nose) + ("python-setuptools" ,python-setuptools))) + (home-page "https://pypi.python.org/pypi/drmaa") + (synopsis "Python bindings for the DRMAA library") + (description + "A Python package for Distributed Resource Management (DRM) job +submission and control. This package is an implementation of the DRMAA 1.0 +Python language binding specification.") + (license bsd-3))) + +(define-public python2-drmaa + (package-with-python2 python-drmaa)) + (define-public python-ipython (package (name "python-ipython") @@ -3291,6 +3556,35 @@ interfaces in an easy and portable manner.") (define-public python2-netifaces (package-with-python2 python-netifaces)) +(define-public python-networkx + (package + (name "python-networkx") + (version "1.9.1") + (source + (origin + (method url-fetch) + (uri (string-append + "https://pypi.python.org/packages/source/n/networkx/networkx-" + version ".tar.gz")) + (sha256 + (base32 "0n8wy0yq1kmdq4wh68mlhwhkndvwzx48lg41a1z0sxxms0wfp033")))) + (build-system python-build-system) + ;; python-decorator is needed at runtime + (propagated-inputs + `(("python-decorator" ,python-decorator))) + (native-inputs + `(("python-setuptools" ,python-setuptools) + ("python-nose" ,python-nose))) + (home-page "http://networkx.github.io/") + (synopsis "Python module for creating and manipulating graphs and networks") + (description + "NetworkX is a Python package for the creation, manipulation, and study +of the structure, dynamics, and functions of complex networks.") + (license bsd-3))) + +(define-public python2-networkx + (package-with-python2 python-networkx)) + (define-public snakemake (package (name "snakemake") @@ -3313,6 +3607,67 @@ providing a clean and modern domain specific specification language (DSL) in Python style, together with a fast and comfortable execution environment.") (license license:expat))) +(define-public python-seaborn + (package + (name "python-seaborn") + (version "0.5.1") + (source + (origin + (method url-fetch) + (uri (string-append + "https://pypi.python.org/packages/source/s/seaborn/seaborn-" + version ".tar.gz")) + (sha256 + (base32 "1236abw18ijjglmv60q85ckqrvgf5qyy4zlq7nz5aqfg6q87z3wc")))) + (build-system python-build-system) + (propagated-inputs + `(("python-pandas" ,python-pandas) + ("python-matplotlib" ,python-matplotlib) + ("python-scipy" ,python-scipy))) + (native-inputs + `(("python-setuptools" ,python-setuptools))) + (home-page "http://stanford.edu/~mwaskom/software/seaborn/") + (synopsis "Statistical data visualization") + (description + "Seaborn is a library for making attractive and informative statistical +graphics in Python. It is built on top of matplotlib and tightly integrated +with the PyData stack, including support for numpy and pandas data structures +and statistical routines from scipy and statsmodels.") + (license bsd-3))) + +(define-public python2-seaborn + (let ((seaborn (package-with-python2 python-seaborn))) + (package (inherit seaborn) + (propagated-inputs + `(("python2-pytz" ,python2-pytz) + ,@(package-propagated-inputs seaborn)))))) + +(define-public python-sympy + (package + (name "python-sympy") + (version "0.7.6") + (source + (origin + (method url-fetch) + (uri (string-append + "https://github.com/sympy/sympy/releases/download/sympy-" + version "/sympy-" version ".tar.gz")) + (sha256 + (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz")))) + (build-system python-build-system) + (native-inputs + `(("python-setuptools" ,python-setuptools))) + (home-page "http://www.sympy.org/") + (synopsis "Python library for symbolic mathematics") + (description + "SymPy is a Python library for symbolic mathematics. It aims to become a +full-featured computer algebra system (CAS) while keeping the code as simple +as possible in order to be comprehensible and easily extensible.") + (license bsd-3))) + +(define-public python2-sympy + (package-with-python2 python-sympy)) + (define-public python-testlib (package (name "python-testlib") @@ -3373,3 +3728,137 @@ Python style, together with a fast and comfortable execution environment.") library for Python programs. It is useful to implement low-level X clients. It is written entirely in Python.") (license gpl2+))) + +(define-public python-singledispatch + (package + (name "python-singledispatch") + (version "3.4.0.3") + (source + (origin + (method url-fetch) + (uri (string-append + "https://pypi.python.org/packages/source/s/singledispatch/" + "singledispatch-" version ".tar.gz")) + (sha256 + (base32 + "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv")))) + (build-system python-build-system) + (native-inputs + `(("python-setuptools" ,python-setuptools))) + (propagated-inputs + `(("python-six" ,python-six))) + (home-page + "http://docs.python.org/3/library/functools.html#functools.singledispatch") + (synopsis "Backport of singledispatch feature from Python 3.4") + (description + "This library brings functools.singledispatch from Python 3.4 to Python +2.6-3.3.") + (license license:expat))) + +(define-public python2-singledispatch + (package-with-python2 python-singledispatch)) + +(define-public python-tornado + (package + (name "python-tornado") + (version "4.1") + (source + (origin + (method url-fetch) + (uri (string-append + "https://pypi.python.org/packages/source/t/tornado/" + "tornado-" version ".tar.gz")) + (sha256 + (base32 "0a12f00h277zbifibnj46wf14801f573irvf6hwkgja5vspd7awr")))) + (build-system python-build-system) + (inputs + `(("python-certifi" ,python-certifi))) + (native-inputs + `(("python-setuptools" ,python-setuptools))) + (home-page "https://pypi.python.org/pypi/tornado/4.1") + (synopsis "Python web framework and asynchronous networking library") + (description + "Tornado is a Python web framework and asynchronous networking library, +originally developed at FriendFeed. By using non-blocking network I/O, +Tornado can scale to tens of thousands of open connections, making it ideal +for long polling, WebSockets, and other applications that require a long-lived +connection to each user.") + (license asl2.0))) + +(define-public python2-tornado + (let ((tornado (package-with-python2 python-tornado))) + (package (inherit tornado) + (inputs + `(("python2-backport-ssl-match-hostname" + ,python2-backport-ssl-match-hostname) + ,@(package-inputs tornado)))))) + +(define-public python-waf + (package + (name "python-waf") + (version "1.8.8") + (source (origin + (method url-fetch) + (uri (string-append "https://waf.io/" + "waf-" version ".tar.bz2")) + (sha256 + (base32 + "0b5q307fgn6a5d8yjia2d1l4bk1q3ilvc0w8k4isfrrx2gbcw8wn")))) + (build-system python-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (replace 'build + (lambda _ + (zero? (begin + (system* "python" "waf-light" "configure") + (system* "python" "waf-light" "build"))))) + (replace 'check + (lambda _ + (zero? (system* "python" "waf" "--version")))) + (replace 'install + (lambda _ + (copy-file "waf" %output)))))) + (home-page "https://waf.io/") + (synopsis "Python-based build system") + (description + "Waf is a Python-based framework for configuring, compiling and installing +applications.") + (license bsd-3))) + +(define-public python2-waf + (package-with-python2 python-waf)) + +(define-public python-pyzmq + (package + (name "python-pyzmq") + (version "14.6.0") + (source + (origin + (method url-fetch) + (uri (string-append + "https://pypi.python.org/packages/source/p/pyzmq/pyzmq-" + version ".tar.gz")) + (sha256 + (base32 "1frmbjykvhmdg64g7sn20c9fpamrsfxwci1nhhg8q7jgz5pq0ikp")))) + (build-system python-build-system) + (arguments + `(#:configure-flags + (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq"))) + ;; FIXME: You must build pyzmq with 'python setup.py build_ext + ;; --inplace' for 'python setup.py test' to work. + #:tests? #f)) + (inputs + `(("zeromq" ,zeromq))) + (native-inputs + `(("pkg-config" ,pkg-config) + ("python-nose" ,python-nose) + ("python-setuptools" ,python-setuptools))) + (home-page "http://github.com/zeromq/pyzmq") + (synopsis "Python bindings for 0MQ") + (description + "PyZMQ is the official Python binding for the ZeroMQ messaging library.") + (license bsd-4))) + +(define-public python2-pyzmq + (package-with-python2 python-pyzmq)) diff --git a/gnu/packages/qemu.scm b/gnu/packages/qemu.scm index 77aeecf40c..717310209e 100644 --- a/gnu/packages/qemu.scm +++ b/gnu/packages/qemu.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -33,6 +34,7 @@ #:use-module (gnu packages image) #:use-module (gnu packages attr) #:use-module (gnu packages linux) + #:use-module (gnu packages libusb) #:use-module (gnu packages xdisorg) #:use-module (gnu packages gl) #:use-module (gnu packages sdl) @@ -42,14 +44,15 @@ ;; This is QEMU without GUI support. (package (name "qemu-headless") - (version "2.2.0") + (version "2.3.0") (source (origin (method url-fetch) (uri (string-append "http://wiki.qemu-project.org/download/qemu-" version ".tar.bz2")) (sha256 (base32 - "1703c3scl5n07gmpilg7g2xzyxnr7jczxgx6nn4m8kv9gin9p35n")))) + "120m53c3p28qxmfzllicjzr8syjv6v4d9rsyrgkp7gnmcgvvgfmn")) + (patches (list (search-patch "qemu-CVE-2015-3456.patch"))))) (build-system gnu-build-system) (arguments '(#:phases (alist-replace @@ -137,4 +140,5 @@ server and embedded PowerPC, and S390 guests.") (synopsis "Machine emulator and virtualizer") (inputs `(("sdl" ,sdl) ("mesa" ,mesa) + ("libusb" ,libusb) ;USB pass-through support ,@(package-inputs qemu-headless))))) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 4c750416e5..3bc3145e8d 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com> +;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -103,6 +104,8 @@ X11 (yet).") (sha256 (base32 "0q6qzakq8xihw91xv310qi3vyylq7x2bzdkjgy8sqxii2lgbjzhv")) + (patches (list (search-patch "qt5-conflicting-typedefs.patch") + (search-patch "qt5-runpath.patch"))) (snippet '(begin ;; Remove broken symlinks. @@ -229,30 +232,36 @@ developers using C++ or QML, a CSS & JavaScript like language.") (sha256 (base32 "0b036iqgmbbv37dgwwfihw3mihjbnw3kb5kaisdy0qi8nn8xs54b")) - (patches (list (search-patch "qt4-tests.patch"))))) + (patches (map search-patch + '("qt4-ldflags.patch" "qt4-tests.patch"))))) (inputs `(,@(alist-delete "libjpeg" (package-inputs qt)) ("libjepg" ,libjpeg-8) ("libsm" ,libsm))) + + ;; Note: there are 37 MiB of examples and a '-exampledir' configure flags, + ;; but we can't make them a separate output because "out" and "examples" + ;; would refer to each other. + (outputs '("out" ;112MiB core + 37MiB examples + "doc")) ;280MiB of HTML + code (arguments `(#:phases (alist-replace 'configure (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) + (let ((out (assoc-ref outputs "out")) + (doc (assoc-ref outputs "doc"))) (substitute* '("configure") - (("/bin/pwd") (which "pwd"))) - ;; Explicitly link with icui18n, which is dlopened by - ;; QtCore.so. The LDFLAGS are in fact added to other flags - ;; determined by the configure phase. - ;; According to the nix recipe, this may be necessary for - ;; further libraries (cups, gtk-x11-2.0, libgdk-x11-2.0). - (setenv "LDFLAGS" "-licui18n") - ;; do not pass "--enable-fast-install", which makes the - ;; configure process fail + (("/bin/pwd") (which "pwd"))) + (zero? (system* "./configure" "-verbose" "-prefix" out + "-docdir" (string-append doc "/share/doc/qt-" ,version) + "-demosdir" (string-append out "/share/qt-" ,version + "/demos") + "-examplesdir" (string-append out "/share/qt-" ,version + "/examples") "-opensource" "-confirm-license" ;; explicitly link with dbus instead of dlopening it diff --git a/gnu/packages/rdf.scm b/gnu/packages/rdf.scm index 96a52fd93a..cee7f42398 100644 --- a/gnu/packages/rdf.scm +++ b/gnu/packages/rdf.scm @@ -221,9 +221,10 @@ Turtle/N3 and read them in SPARQL XML, RDF/XML and Turtle/N3.") (native-inputs `(("perl" ,perl) ; needed for installation ("pkg-config" ,pkg-config))) + (propagated-inputs + `(("rasqal" ,rasqal))) ; in Requires.private field of .pc (inputs - `(("bdb" ,bdb) - ("rasqal" ,rasqal))) + `(("bdb" ,bdb))) (home-page "http://librdf.org/") (synopsis "RDF library") (description "The Redland RDF Library (librdf) provides the RDF API @@ -243,7 +244,16 @@ and triple stores.") (base32 "1gxbzqsm212wmn8qkdd3lbl6wbv7fwmaf9qh2nxa4yxjbr7mylb4")))) (build-system waf-build-system) - (arguments `(#:tests? #f)) ; no check target + (arguments + `(#:tests? #f ; no check target + #:phases + (modify-phases %standard-phases + (add-before + 'configure 'set-ldflags + (lambda* (#:key outputs #:allow-other-keys) + (setenv "LDFLAGS" + (string-append "-Wl,-rpath=" + (assoc-ref outputs "out") "/lib"))))))) (home-page "http://drobilla.net/software/serd/") (synopsis "Library for RDF syntax supporting Turtle and NTriples") (description @@ -268,7 +278,16 @@ ideal (e.g. in LV2 implementations or embedded applications).") (base32 "0rq7vafdv4vsxi6xk9zf5shr59w3kppdhqbj78185rz5gp9kh1dx")))) (build-system waf-build-system) - (arguments `(#:tests? #f)) ; no check target + (arguments + `(#:tests? #f ; no check target + #:phases + (modify-phases %standard-phases + (add-before + 'configure 'set-ldflags + (lambda* (#:key outputs #:allow-other-keys) + (setenv "LDFLAGS" + (string-append "-Wl,-rpath=" + (assoc-ref outputs "out") "/lib"))))))) (inputs `(("serd" ,serd))) (native-inputs @@ -299,7 +318,6 @@ ideal (e.g. in LV2 implementations or embedded applications).") (inputs `(("clucene" ,clucene) ("qt" ,qt-4) - ("rasqal" ,rasqal) ("redland" ,redland))) (home-page "http://soprano.sourceforge.net/") (synopsis "RDF data library for Qt") diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index feb4ec191d..42fcc93017 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -38,7 +38,7 @@ (define-public ruby (package (name "ruby") - (version "2.2.1") + (version "2.2.2") (source (origin (method url-fetch) @@ -47,7 +47,7 @@ "/ruby-" version ".tar.xz")) (sha256 (base32 - "1h16lrahp1m57la6sllsad0n3d72g9ccg62n5fxd04nwgz054a1v")))) + "0qj48a8ji8qj1sllsrhb6y65frwr77bvr08xikj86w5mib8baczh")))) (build-system gnu-build-system) (arguments `(#:test-target "test" diff --git a/gnu/packages/samba.scm b/gnu/packages/samba.scm index c147abcaab..8e53debcb3 100644 --- a/gnu/packages/samba.scm +++ b/gnu/packages/samba.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2015 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> ;;; ;;; This file is part of GNU Guix. @@ -105,7 +105,7 @@ anywhere.") "0l9pz2m67vf398q3c2dwn8jwdxsjb20igncf4byhv6yq5dzqlb4g")))) (build-system gnu-build-system) (arguments - '(#:phases (alist-cons-before + `(#:phases (alist-cons-before 'configure 'chdir (lambda _ (chdir "source3")) @@ -127,8 +127,7 @@ anywhere.") (guix build utils) (guix build rpath) (srfi srfi-26)) - #:imported-modules ((guix build gnu-build-system) - (guix build utils) + #:imported-modules (,@%gnu-build-system-modules (guix build rpath)) ;; This flag is required to allow for "make test". diff --git a/gnu/packages/sawfish.scm b/gnu/packages/sawfish.scm index f50632885f..e2cb62c62c 100644 --- a/gnu/packages/sawfish.scm +++ b/gnu/packages/sawfish.scm @@ -36,15 +36,14 @@ (define-public librep (package (name "librep") - (version "0.92.4") + (version "0.92.5") (source (origin (method url-fetch) (uri (string-append "http://download.tuxfamily.org/" name "/" name "_" version ".tar.xz")) (sha256 (base32 - "0297m24p2y8j3wavf8qqyriic7ls2392cmfn96y0pi83r5qckc25")) - (patches (list (search-patch "librep-rules.mk.patch"))))) + "0zsy5gi8kvz5vq41y5rzm6lfi3dpiwbg4diwb6d30qfi72mrpni2")))) (build-system gnu-build-system) (native-inputs `(("makeinfo" ,texinfo) diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm index 70eceecd80..bce1ab5d53 100644 --- a/gnu/packages/scheme.scm +++ b/gnu/packages/scheme.scm @@ -29,7 +29,6 @@ #:use-module (gnu packages databases) #:use-module (gnu packages emacs) #:use-module (gnu packages texinfo) - #:use-module (gnu packages elf) #:use-module (gnu packages base) #:use-module (gnu packages pkg-config) #:use-module (gnu packages avahi) @@ -39,6 +38,7 @@ #:use-module (gnu packages libffi) #:use-module (gnu packages fontutils) #:use-module (gnu packages image) + #:use-module (gnu packages xorg) #:use-module (ice-9 match)) (define (mit-scheme-source-directory system version) @@ -91,6 +91,7 @@ ;; ("texlive-core" ,texlive-core) ("texinfo" ,texinfo) ("m4" ,m4) + ("libx11" ,libx11) ("source" @@ -188,7 +189,10 @@ features an integrated Emacs-like editor and a large runtime library.") ;; <http://article.gmane.org/gmane.lisp.scheme.bigloo/6126>. ;; "--customgc=no" ; use our libgc (string-append"--mv=" (which "mv")) - (string-append "--rm=" (which "rm")))))) + (string-append "--rm=" (which "rm")) + (string-append "--ldflags=-Wl,-rpath=" + (assoc-ref outputs "out") + "/lib/bigloo/" ,version))))) (alist-cons-after 'install 'install-emacs-modes (lambda* (#:key outputs #:allow-other-keys) @@ -199,7 +203,7 @@ features an integrated Emacs-like editor and a large runtime library.") (string-append "EMACSDIR=" dir))))) %standard-phases)))) (inputs - `(("emacs" ,emacs-no-x) + `(("emacs" ,emacs) ;UDE needs the X version of Emacs ;; Optional APIs for which Bigloo has bindings. ("avahi" ,avahi) @@ -232,55 +236,27 @@ Scheme and C programs and between Scheme and Java programs.") (sha256 (base32 "1v2r4ga58kk1sx0frn8qa8ccmjpic9csqzpk499wc95y9c4b1wy3")) - (patches (list (search-patch "hop-bigloo-4.0b.patch"))))) + (patches (list (search-patch "hop-bigloo-4.0b.patch") + (search-patch "hop-linker-flags.patch"))))) (build-system gnu-build-system) (arguments - '(#:phases + `(#:phases (alist-replace 'configure - (lambda* (#:key inputs outputs #:allow-other-keys) + (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (zero? (system* "./configure" - (string-append "--prefix=" out))))) - (alist-cons-after - 'strip 'patch-rpath - (lambda* (#:key outputs #:allow-other-keys) - ;; Patch the RPATH of every installed library to point to $out/lib - ;; instead of $TMPDIR. Note that "patchelf --set-rpath" produces - ;; invalid binaries when used before stripping. - (let ((out (assoc-ref outputs "out")) - (tmpdir (getcwd))) - (every (lambda (lib) - (let* ((in (open-pipe* OPEN_READ "patchelf" - "--print-rpath" lib)) - (rpath (read-line in))) - (and (zero? (close-pipe in)) - (let ((rpath* (regexp-substitute/global - #f (regexp-quote tmpdir) rpath - 'pre out 'post))) - (or (equal? rpath rpath*) - (begin - (format #t "~a: changing RPATH from `~a' to `~a'~%" - lib rpath rpath*) - (zero? - (system* "patchelf" "--set-rpath" - rpath* lib)))))))) - (append (find-files (string-append out "/bin") - ".*") - (find-files (string-append out "/lib") - "\\.so$"))))) - %standard-phases)) - #:tests? #f ; no test suite - #:modules ((guix build gnu-build-system) - (guix build utils) - (ice-9 popen) - (ice-9 regex) - (ice-9 rdelim) - (srfi srfi-1)))) + (string-append "--prefix=" out) + (string-append "--blflags=" + ;; user flags completely override useful + ;; default flags, so repeat them here. + "-copt \\$(CPICFLAGS) -L\\$(BUILDLIBDIR) " + "-ldopt -Wl,-rpath," out "/lib"))))) + %standard-phases) + #:tests? #f)) ; no test suite (inputs `(("bigloo" ,bigloo) - ("which" ,which) - ("patchelf" ,patchelf))) + ("which" ,which))) (home-page "http://hop.inria.fr/") (synopsis "Multi-tier programming language for the Web 2.0") (description diff --git a/gnu/packages/sdl.scm b/gnu/packages/sdl.scm index 03aa56d118..4e9ebfb034 100644 --- a/gnu/packages/sdl.scm +++ b/gnu/packages/sdl.scm @@ -20,12 +20,12 @@ (define-module (gnu packages sdl) #:use-module (gnu packages) - #:use-module (guix licenses) + #:use-module ((guix licenses) #:hide (freetype)) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu) #:use-module (guix build-system trivial) - #:use-module ((gnu packages fontutils) #:prefix font:) + #:use-module (gnu packages fontutils) #:use-module (gnu packages guile) #:use-module (gnu packages image) #:use-module (gnu packages linux) @@ -60,8 +60,15 @@ (build-system gnu-build-system) (arguments '(;; Explicitly link against shared libraries instead of dlopening them. - ;; For X11, ALSA, PulseAudio, etc. - #:configure-flags '("--disable-sdl-dlopen") + ;; For X11, ALSA, and PulseAudio. + ;; OpenGL library is still dlopened at runtime. + #:configure-flags '("--disable-alsa-shared" + "--disable-pulseaudio-shared" + "--disable-x11-shared" + ;; Explicitly link with mesa. + ;; This add mesa to libsdl's RUNPATH, to make dlopen + ;; finding the libGL from mesa at runtime. + "LDFLAGS=-lGL") #:tests? #f)) ; no check target (propagated-inputs @@ -71,6 +78,7 @@ (native-inputs `(("pkg-config" ,pkg-config))) (inputs `(("libxrandr" ,libxrandr) ("mesa" ,mesa) + ("glu" ,glu) ("alsa-lib" ,alsa-lib) ("pulseaudio" ,pulseaudio))) (synopsis "Cross platform game development library") @@ -252,7 +260,7 @@ SDL.") "1dydxd4f5kb1288i5n5568kdk2q7f8mqjr7i7sd33nplxjaxhk3j")))) (build-system gnu-build-system) (propagated-inputs `(("sdl" ,sdl))) - (inputs `(("freetype" ,font:freetype) + (inputs `(("freetype" ,freetype) ("mesa" ,mesa))) (native-inputs `(("pkg-config" ,pkg-config))) (synopsis "SDL TrueType font library") diff --git a/gnu/packages/search.scm b/gnu/packages/search.scm index f56a85e005..e7f8aae881 100644 --- a/gnu/packages/search.scm +++ b/gnu/packages/search.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org> +;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -18,11 +19,13 @@ (define-module (gnu packages search) #:use-module ((guix licenses) - #:select (gpl2+ bsd-3 x11)) + #:select (gpl2+ gpl3+ bsd-3 x11)) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu) #:use-module (gnu packages compression) + #:use-module (gnu packages check) + #:use-module (gnu packages databases) #:use-module (gnu packages linux) #:export (xapian)) @@ -55,4 +58,95 @@ rich set of boolean query operators.") (home-page "http://xapian.org/") (license (list gpl2+ bsd-3 x11)))) +(define-public libtocc + (package + (name "libtocc") + (version "1.0.1") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/aidin36/tocc/releases/download/" + "v" version "/tocc-" version ".tar.gz")) + (sha256 + (base32 + "1kd2jd74m8ksc8s7hh0haz0q0c3n0mr39bbky262kk4l58f1g068")))) + (build-system gnu-build-system) + (native-inputs `(("catch" ,catch-framework))) + (inputs `(("unqlite" ,unqlite))) + (arguments + `(#:phases (modify-phases %standard-phases + (add-before + 'configure 'chdir-source + (lambda _ (chdir "libtocc/src"))) + (replace + 'check + (lambda _ + (with-directory-excursion "../tests" + (and (zero? (system* "./configure" + (string-append "CONFIG_SHELL=" + (which "sh")) + (string-append "SHELL=" + (which "sh")) + "CPPFLAGS=-I../src" + (string-append + "LDFLAGS=-L../src/.libs " + "-Wl,-rpath=../src/.libs"))) + (zero? (system* "make")) + (zero? (system* "./libtocctests"))))))))) + (home-page "http://t-o-c-c.com/") + (synopsis "Tool for Obsessive Compulsive Classifiers") + (description + "libtocc is the engine of the Tocc project, a tag-based file management +system. The goal of Tocc is to provide a better system for classifying files +that is more flexible than classic file systems that are based on a tree of +files and directories.") + (license gpl3+))) + +(define-public tocc + (package + (name "tocc") + (version (package-version libtocc)) + (source (package-source libtocc)) + (build-system gnu-build-system) + (inputs + `(("libtocc" ,libtocc) + ("unqlite" ,unqlite))) + (arguments + `(#:tests? #f ;No tests + #:phases (modify-phases %standard-phases + (add-after + 'unpack 'chdir-source + (lambda _ (chdir "cli/src")))))) + (home-page "http://t-o-c-c.com/") + (synopsis "Command-line interface to libtocc") + (description + "Tocc is a tag-based file management system. This package contains the +command line tool for interacting with libtocc.") + (license gpl3+))) + +(define-public bool + (package + (name "bool") + (version "0.2.2") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://gnu/bool/bool-" + version ".tar.xz")) + (sha256 + (base32 + "1frdmgrmb509fxbdpsxxw3lvvwv7xm1pavqrqgm4jg698iix6xfw")))) + (build-system gnu-build-system) + (home-page "https://www.gnu.org/software/bool") + (synopsis "Finding text and HTML files that match boolean expressions") + (description + "GNU Bool is a utility to perform text searches on files using Boolean +expressions. For example, a search for \"hello AND world\" would return a +file containing the phrase \"Hello, world!\". It supports both AND and OR +statements, as well as the NEAR statement to search for the occurrence of +words in close proximity to each other. It handles context gracefully, +accounting for new lines and paragraph changes. It also has robust support +for parsing HTML files.") + (license gpl3+))) + ;;; search.scm ends here diff --git a/gnu/packages/ssh.scm b/gnu/packages/ssh.scm index 0148b25a16..29251291dc 100644 --- a/gnu/packages/ssh.scm +++ b/gnu/packages/ssh.scm @@ -72,7 +72,6 @@ ;; fields of 'gcry_thread_cbs' that are now private: ;; src/threads.c:72:26: error: 'struct gcry_thread_cbs' has no member named 'mutex_init' ("libgcrypt", libgcrypt-1.5))) - (native-inputs `(("patchelf" ,patchelf))) (synopsis "SSH client library") (description "libssh is a C library implementing the SSHv2 and SSHv1 protocol for @@ -123,7 +122,7 @@ a server that supports the SSH-2 protocol.") (define-public openssh (package (name "openssh") - (version "6.7p1") + (version "6.8p1") (source (origin (method url-fetch) (uri (let ((tail (string-append name "-" version ".tar.gz"))) @@ -132,7 +131,7 @@ a server that supports the SSH-2 protocol.") (string-append "ftp://ftp2.fr.openbsd.org/pub/OpenBSD/OpenSSH/portable/" tail)))) (sha256 (base32 - "01smf9pvn2sk5qs80gkmc9acj07ckawi1b3xxyysp3c5mr73ky5j")))) + "03hnrqvjq6ghg1mp3gkarfxh6g3x1n1vjrzpbc5lh9717vklrxiz")))) (build-system gnu-build-system) (inputs `(("groff" ,groff) ("openssl" ,openssl) @@ -150,9 +149,10 @@ a server that supports the SSH-2 protocol.") (alist-cons-before 'check 'patch-tests (lambda _ - ;; remove tests that require the user sshd + ;; remove 't-exec' regress target which requires user 'sshd' (substitute* "regress/Makefile" - (("t10 t-exec") "t10"))) + (("^(REGRESS_TARGETS=.*) t-exec(.*)" all pre post) + (string-append pre post)))) (alist-replace 'install (lambda* (#:key (make-flags '()) #:allow-other-keys) diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm index 5fae6d7a3c..9408705d5e 100644 --- a/gnu/packages/statistics.scm +++ b/gnu/packages/statistics.scm @@ -42,7 +42,7 @@ (define-public r (package (name "r") - (version "3.1.2") + (version "3.2.0") (source (origin (method url-fetch) (uri (string-append "mirror://cran/src/base/R-" @@ -50,10 +50,15 @@ version ".tar.gz")) (sha256 (base32 - "0ypsm11c7n49pgh2ricyhhpfhas3famscdazzdp2zq70rapm1ldw")))) + "0dagyqgvi8i3nw158qi2zpwm04s4ffzvnmk5niaksvxs30zrbbpm")) + (patches (list (search-patch "r-fix-15899.patch"))))) (build-system gnu-build-system) (arguments - `(#:phases + `(#:make-flags + (list (string-append "LDFLAGS=-Wl,-rpath=" + (assoc-ref %outputs "out") + "/lib/R/lib")) + #:phases (alist-cons-before 'check 'set-timezone ;; Some tests require the timezone to be set. diff --git a/gnu/packages/task-management.scm b/gnu/packages/task-management.scm new file mode 100644 index 0000000000..e77aecb957 --- /dev/null +++ b/gnu/packages/task-management.scm @@ -0,0 +1,61 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2015 Tomáš Čech <sleep_walker@suse.cz> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (gnu packages task-management) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) + #:use-module (gnu packages gnutls) + #:use-module (gnu packages linux) + #:use-module (gnu packages lua) + #:use-module (guix download) + #:use-module (guix build-system cmake)) + +(define-public taskwarrior + (package + (name "taskwarrior") + (version "2.4.3") + (source + (origin + (method url-fetch) + (uri (string-append + "http://taskwarrior.org/download/task-" version ".tar.gz")) + (sha256 (base32 + "1lkbw2fhshynbl7hppar1viapyrs712s14xhd8p3l8gyhvxbh0mv")))) + (build-system cmake-build-system) + (inputs + `(("gnutls" ,gnutls) + ("lua" ,lua) + ("util-linux" ,util-linux))) + (arguments + `(#:tests? #f ; No tests implemented. + #:phases + (modify-phases %standard-phases + (add-before + 'patch-source-shebangs 'remove-broken-symlinks + (lambda _ + ;; These files are broken symlinks - delete them. + (delete-file "src/cal") + (delete-file "src/calendar") + (delete-file "src/tw")))))) + (home-page "http://taskwarrior.org") + (synopsis "Command line task manager") + (description + "Taskwarrior is a command-line task manager following the Getting Things +Done time management method. It supports network synchronization, filtering +and querying data, exposing task data in multiple formats to other tools.") + (license license:expat))) diff --git a/gnu/packages/tbb.scm b/gnu/packages/tbb.scm index 42670d77c0..0e9db720aa 100644 --- a/gnu/packages/tbb.scm +++ b/gnu/packages/tbb.scm @@ -46,8 +46,15 @@ (build-system gnu-build-system) (arguments `(#:test-target "test" - #:phases (alist-delete + #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath=" + (assoc-ref %outputs "out") "/lib")) + #:phases (alist-replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + (substitute* "build/linux.gcc.inc" + (("LIB_LINK_FLAGS =") + (string-append "LIB_LINK_FLAGS = -Wl,-rpath=" + (assoc-ref outputs "out") "/lib")))) (alist-replace 'install (lambda* (#:key outputs #:allow-other-keys) diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm index b9e38c33d0..61bd1d3c83 100644 --- a/gnu/packages/telephony.scm +++ b/gnu/packages/telephony.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014 John Darrington <jmd@gnu.org> ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr> +;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,6 +21,7 @@ (define-module (gnu packages telephony) #:use-module (gnu packages) #:use-module (gnu packages gnupg) + #:use-module (gnu packages linux) #:use-module (gnu packages pkg-config) #:use-module (guix licenses) #:use-module (guix packages) @@ -57,13 +59,13 @@ reimplementation.") (define-public ucommon (package (name "ucommon") - (version "6.3.0") + (version "6.3.1") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/commoncpp/" name "-" version ".tar.gz")) (sha256 (base32 - "0l3s3vf8x3mhz85v23caf3p1xh0lirhl1xvbragapfcl1y4klmgv")))) + "1marbwbqnllhm9nh22lvyfjy802pgy1wx7j7kkpkasbm9r0sb6mm")))) (build-system gnu-build-system) (synopsis "Common C++ framework for threaded applications") (description "GNU uCommon C++ is meant as a very light-weight C++ library @@ -76,13 +78,13 @@ support.") (define-public ccrtp (package (name "ccrtp") - (version "2.1.1") + (version "2.1.2") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/ccrtp/ccrtp-" version ".tar.gz")) (sha256 (base32 - "1p1pk2m7v75rdrh05rizpqcd5p08g3n541rw0kssyfzd805fb90d")))) + "17ili8l7zqbbkzr1rcy4hlnazkf50mds41wg6n7bfdsx3c7cldgh")))) (build-system gnu-build-system) (inputs `(("ucommon" ,ucommon) ("libgcrypt" ,libgcrypt))) @@ -143,13 +145,13 @@ multiplayer games.") (define-public sipwitch (package (name "sipwitch") - (version "1.9.6") + (version "1.9.7") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/sipwitch/sipwitch-" version ".tar.gz")) (sha256 (base32 - "04kfzcg12zn47y70gc5w5yi6jwgj1z2xyma2ljzz48lg1236qiqq")))) + "07a069cx35pndl96c9v3vsyjcmrrr97xnv37k74m21q31isc458c")))) (build-system gnu-build-system) ;; The configure.ac uses pkg-config but in a kludgy way which breaks when ;; cross-compiling. Among other issues there the program name "pkg-config" @@ -183,3 +185,25 @@ internet.") (license gpl3+) (home-page "http://www.gnu.org/software/sipwitch"))) +(define-public libsrtp + (package + (name "libsrtp") + (version "1.5.2") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/cisco/libsrtp/archive/v" + version ".tar.gz")) + (sha256 + (base32 + "1njf62f6sazz2q7qc4j495v1pga385whkmxxyr8hfz1ragiyzqc6")))) + (native-inputs + `(("procps" ,procps))) + (build-system gnu-build-system) + (arguments + `(#:test-target "runtest")) + (synopsis "Secure RTP (SRTP) Reference Implementation") + (description "This package provides an implementation of the Secure +Real-time Transport Protocol (SRTP), the Universal Security Transform (UST), +and a supporting cryptographic kernel.") + (home-page "https://github.com/cisco/libsrtp") + (license bsd-3))) diff --git a/gnu/packages/texlive.scm b/gnu/packages/texlive.scm index 56149ab58e..14ee9c37ad 100644 --- a/gnu/packages/texlive.scm +++ b/gnu/packages/texlive.scm @@ -176,8 +176,6 @@ This package contains the binaries.") `(#:modules ((guix build gnu-build-system) (guix build utils) (srfi srfi-26)) - #:imported-modules ((guix build gnu-build-system) - (guix build utils)) #:phases (alist-cons-before 'texmf-config 'install diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm index 5a8f9f09ea..325386d234 100644 --- a/gnu/packages/textutils.scm +++ b/gnu/packages/textutils.scm @@ -1,5 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com> +;;; Copyright © 2015 Mathieu Lirzin <mthl@openmailbox.org> +;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net> ;;; ;;; This file is part of GNU Guix. ;;; @@ -22,7 +24,11 @@ #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix build-system gnu) - #:use-module (gnu packages python)) + #:use-module (guix build-system trivial) + #:use-module (gnu packages autotools) + #:use-module (gnu packages perl) + #:use-module (gnu packages python) + #:use-module (gnu packages zip)) (define-public recode (package @@ -43,11 +49,13 @@ (arguments '(#:phases (alist-cons-before - 'check 'fix-setup-py + 'check 'pre-check (lambda _ (substitute* "tests/setup.py" (("([[:space:]]*)include_dirs=.*" all space) - (string-append all space "library_dirs=['../src/.libs'],\n")))) + (string-append all space "library_dirs=['../src/.libs'],\n"))) + ;; The test extension 'Recode.so' lacks RUNPATH for 'librecode.so'. + (setenv "LD_LIBRARY_PATH" (string-append (getcwd) "/src/.libs"))) %standard-phases))) (home-page "https://github.com/pinard/Recode") (synopsis "Text encoding converter") @@ -83,3 +91,115 @@ handy front-end to the library.") an encoding detection library, and enca, a command line frontend, integrating libenca and several charset conversion libraries and tools.") (license license:gpl2))) + +(define-public utf8proc + (package + (name "utf8proc") + (version "1.1.6") + (source + (origin + (method url-fetch) + (uri (string-append + "https://github.com/JuliaLang/utf8proc/archive/v" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "0wmsi672knii0q70wh6a3ll0gv7qk33c50zbpzasrs3b16bqy659")))) + (build-system gnu-build-system) + (arguments + '(#:tests? #f ;no "check" target + #:make-flags '("CC=gcc") + #:phases + (alist-replace + 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((lib (string-append (assoc-ref outputs "out") "/lib/")) + (include (string-append (assoc-ref outputs "out") "/include/"))) + (mkdir-p lib) + (mkdir-p include) + (copy-file "utf8proc.h" (string-append include "utf8proc.h")) + (for-each (lambda (file) + (copy-file file (string-append lib (basename file)))) + '("libutf8proc.a" "libutf8proc.so")))) + ;; no configure script + (alist-delete 'configure %standard-phases)))) + (home-page "http://julialang.org/utf8proc/") + (synopsis "C library for processing UTF-8 Unicode data") + (description "utf8proc is a small C library that provides Unicode +normalization, case-folding, and other operations for data in the UTF-8 +encoding, supporting Unicode version 7.0.") + (license license:expat))) + +(define-public libgtextutils + (package + (name "libgtextutils") + (version "0.7") + (source + (origin + (method url-fetch) + (uri (string-append + "https://github.com/agordon/libgtextutils/releases/download/" + version "/libgtextutils-" version ".tar.gz")) + (sha256 + (base32 "0jiybkb2z58wa2msvllnphr4js2hvjvh988pavb3mzkgr6ihwbkr")))) + (build-system gnu-build-system) + (arguments + '(#:phases + (alist-cons-after + 'unpack 'autoreconf + (lambda _ (zero? (system* "autoreconf" "-vif"))) + %standard-phases))) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("libtool" ,libtool))) + (home-page "https://github.com/agordon/libgtextutils") + (synopsis "Gordon's text utils library") + (description + "libgtextutils is a text utilities library used by the fastx toolkit from +the Hannon Lab.") + (license license:agpl3+))) + +(define-public markdown + (package + (name "markdown") + (version "1.0.1") + (source + (origin + (method url-fetch) + (uri (string-append + "http://daringfireball.net/projects/downloads/" + (string-capitalize name) "_" version ".zip")) + (sha256 + (base32 "0dq1pj91pvlwkv0jwcgdfpv6gvnxzrk3s8mnh7imamcclnvfj835")))) + (build-system trivial-build-system) + (arguments + '(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (let ((source (assoc-ref %build-inputs "source")) + (out (assoc-ref %outputs "out")) + (perlbd (string-append (assoc-ref %build-inputs "perl") "/bin")) + (unzip (string-append (assoc-ref %build-inputs "unzip") + "/bin/unzip"))) + (mkdir-p out) + (with-directory-excursion out + (system* unzip source) + (mkdir "bin") + (mkdir-p "share/doc") + (rename-file "Markdown_1.0.1/Markdown.pl" "bin/markdown") + (rename-file "Markdown_1.0.1/Markdown Readme.text" + "share/doc/README") + (patch-shebang "bin/markdown" (list perlbd)) + (delete-file-recursively "Markdown_1.0.1")))))) + (native-inputs `(("unzip" ,unzip))) + (inputs `(("perl" ,perl))) + (home-page "http://daringfireball.net/projects/markdown") + (synopsis "Text-to-HTML conversion tool") + (description + "Markdown is a text-to-HTML conversion tool for web writers. It allows +you to write using an easy-to-read, easy-to-write plain text format, then +convert it to structurally valid XHTML (or HTML).") + (license (license:non-copyleft "file://License.text" + "See License.text in the distribution.")))) diff --git a/gnu/packages/tor.scm b/gnu/packages/tor.scm index 73becbba92..0f19d9f2a4 100644 --- a/gnu/packages/tor.scm +++ b/gnu/packages/tor.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> ;;; ;;; This file is part of GNU Guix. @@ -32,14 +32,14 @@ (define-public tor (package (name "tor") - (version "0.2.5.10") + (version "0.2.5.12") (source (origin (method url-fetch) (uri (string-append "https://www.torproject.org/dist/tor-" version ".tar.gz")) (sha256 (base32 - "0fx8qnwh2f8ykfx0np4hyznjfi4xfy96z59pk96y3zyjvjjh5pdk")))) + "0j9byw3i2b7ji88vsqwmsxxg2nlxwkk45k5qbc1y7hdlzvzxl3sm")))) (build-system gnu-build-system) (inputs `(("zlib" ,zlib) diff --git a/gnu/packages/tv.scm b/gnu/packages/tv.scm new file mode 100644 index 0000000000..0a229e149a --- /dev/null +++ b/gnu/packages/tv.scm @@ -0,0 +1,64 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2015 Alex Kost <alezost@gmail.com> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (gnu packages tv) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (gnu packages) + #:use-module (gnu packages xorg) + #:use-module (gnu packages image) + #:use-module (gnu packages compression) + #:use-module (gnu packages xml) + #:use-module (gnu packages fontutils)) + +(define-public tvtime + (package + (name "tvtime") + (version "1.0.2") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/tvtime/tvtime-" + version ".tar.gz")) + (sha256 + (base32 + "08q5gzbyz0lxb730rz6d6amkzimlc7nanv6n50j2bpw4n2xa9wmf")) + (patches (list (search-patch "tvtime-videodev2.patch") + (search-patch "tvtime-pngoutput.patch") + (search-patch "tvtime-xmltv.patch") + (search-patch "tvtime-gcc41.patch"))))) + (build-system gnu-build-system) + (inputs + `(("libx11" ,libx11) + ("libxext" ,libxext) + ("libxt" ,libxt) + ("libxtst" ,libxtst) + ("libxinerama" ,libxinerama) + ("libxv" ,libxv) + ("libxxf86vm" ,libxxf86vm) + ("libpng" ,libpng) + ("libxml2" ,libxml2) + ("freetype" ,freetype) + ("zlib" ,zlib))) + (home-page "http://tvtime.sourceforge.net") + (synopsis "Television viewer") + (description + "Tvtime processes the input from your video capture card and +displays it on a monitor. It focuses on a high visual quality.") + (license license:gpl2+))) diff --git a/gnu/packages/upnp.scm b/gnu/packages/upnp.scm index a1a18d272c..c46e905c42 100644 --- a/gnu/packages/upnp.scm +++ b/gnu/packages/upnp.scm @@ -48,7 +48,11 @@ (string-append "SH=" (assoc-ref %build-inputs "bash") "/bin/sh") (string-append "INSTALLPREFIX=" (assoc-ref %outputs "out")) - "CC=gcc") + "CC=gcc" + + ;; Allow executables to find libminiupnpc.so. + (string-append "LDFLAGS=-Wl,-rpath=" + (assoc-ref %outputs "out") "/lib")) #:phases (alist-delete 'configure %standard-phases))) (home-page "http://miniupnp.free.fr/") diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index 48e16a14be..0d153fa92d 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -3,7 +3,7 @@ ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com> ;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr> -;;; Copyright © 2014 Mark H Weaver <mhw@netris.org> +;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org> ;;; ;;; This file is part of GNU Guix. @@ -48,6 +48,8 @@ #:use-module (gnu packages nano) #:use-module (gnu packages ncurses) #:use-module (gnu packages openssl) + #:use-module (gnu packages ssh) + #:use-module (gnu packages web) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) @@ -401,6 +403,65 @@ linear. It will test every change between two points in the DAG. It will also walk each side of a merge and test those changes individually.") (license (x11-style "file://LICENSE"))))) +(define-public gitolite + (package + (name "gitolite") + (version "3.6.2") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/sitaramc/gitolite/archive/v" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + ;; Commit ed807a4 upstream + (patches + (list (search-patch "gitolite-openssh-6.8-compat.patch"))) + (sha256 + (base32 + "1gsgzi9ayb4rablki3mqr11b0h8db4xg43df660marfpacmkfb01")))) + (build-system gnu-build-system) + (arguments + '(#:tests? #f ; no tests + #:phases (modify-phases %standard-phases + (delete 'configure) + (delete 'build) + (add-before 'install 'patch-scripts + (lambda* (#:key inputs #:allow-other-keys) + (let ((perl (string-append (assoc-ref inputs "perl") + "/bin/perl"))) + ;; This seems to take care of every shell script that + ;; invokes Perl. + (substitute* (find-files "." ".*") + ((" perl -") + (string-append " " perl " -")))))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((output (assoc-ref outputs "out")) + (sharedir (string-append output "/share/gitolite")) + (bindir (string-append output "/bin"))) + (mkdir-p sharedir) + (mkdir-p bindir) + (system* "./install" "-to" sharedir) + ;; Create symlinks for executable scripts in /bin. + (for-each (lambda (script) + (symlink (string-append sharedir "/" script) + (string-append bindir "/" script))) + '("gitolite" "gitolite-shell")) + #t)))))) + (inputs + `(("perl" ,perl))) + ;; git and openssh are propagated because trying to patch the source via + ;; regexp matching is too brittle and prone to false positives. + (propagated-inputs + `(("git" ,git) + ("openssh" ,openssh))) + (home-page "http://gitolite.com") + (synopsis "Git access control layer") + (description + "Gitolite is an access control layer on top of Git, providing fine access +control to Git repositories.") + (license gpl2))) + (define-public mercurial (package (name "mercurial") @@ -476,29 +537,20 @@ WebDAV metadata support, wrappers for PROPFIND and PROPPATCH to simplify property manipulation.") (license gpl2+))) ; for documentation and tests; source under lgpl2.0+ -(define-public neon-0.29.6 - (package (inherit neon) - (name "neon") - (version "0.29.6") - (source (origin - (method url-fetch) - (uri (string-append "http://www.webdav.org/neon/neon-" - version ".tar.gz")) - (sha256 - (base32 - "0hzbjqdx1z8zw0vmbknf159wjsxbcq8ii0wgwkqhxj3dimr0nr4w")))))) - (define-public subversion (package (name "subversion") - (version "1.7.18") + (version "1.8.13") (source (origin (method url-fetch) (uri (string-append "http://archive.apache.org/dist/subversion/" "subversion-" version ".tar.bz2")) (sha256 (base32 - "06nrqnn3qq1hhskkcdbm0ilk2xv6ay2gyf2c7qvxp6xncb782wzn")))) + "0ybmc0yq83jhblp42wdqvn2cryra3sypx8mkxn5b8lq7hilcr68h")) + (patches + (list (search-patch "subversion-sqlite-3.8.9-fix.patch"))) + (patch-flags '("-p0")))) (build-system gnu-build-system) (arguments '(#:phases (alist-cons-after @@ -514,7 +566,7 @@ property manipulation.") (substitute* "libtool" (("\\\\`ls") (string-append "\\`" coreutils "/bin/ls"))))) (alist-cons-after - 'install 'instal-perl-bindings + 'install 'install-perl-bindings (lambda* (#:key outputs #:allow-other-keys) ;; Follow the instructions from ;; 'subversion/bindings/swig/INSTALL'. @@ -531,7 +583,10 @@ property manipulation.") (system* "perl" "Makefile.PL" (string-append "PREFIX=" out))) (zero? - (system* "make" "install"))))))) + (system* "make" "install" + (string-append "OTHERLDFLAGS=" + "-Wl,-rpath=" + out "/lib")))))))) %standard-phases)))) (native-inputs `(("pkg-config" ,pkg-config) @@ -540,7 +595,7 @@ property manipulation.") (inputs `(("apr" ,apr) ("apr-util" ,apr-util) - ("neon" ,neon-0.29.6) + ("serf" ,serf) ("perl" ,perl) ("python" ,python-2) ; incompatible with Python 3 (print syntax) ("sqlite" ,sqlite) diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index ce26812aec..b9f80b252d 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -21,19 +21,21 @@ (define-module (gnu packages video) #:use-module (ice-9 match) - #:use-module ((guix licenses) - #:select (gpl2 gpl2+ gpl3+ lgpl2.1+ bsd-3 public-domain - fsf-free isc)) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix utils) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix git-download) #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) #:use-module (guix build-system python) + #:use-module (guix build-system waf) #:use-module (gnu packages) #:use-module (gnu packages algebra) #:use-module (gnu packages audio) #:use-module (gnu packages autotools) #:use-module (gnu packages avahi) + #:use-module (gnu packages base) #:use-module (gnu packages cdrom) #:use-module (gnu packages compression) #:use-module (gnu packages databases) @@ -42,6 +44,7 @@ #:use-module (gnu packages fontutils) #:use-module (gnu packages fribidi) #:use-module (gnu packages gettext) + #:use-module (gnu packages ghostscript) #:use-module (gnu packages gl) #:use-module (gnu packages glib) #:use-module (gnu packages guile) @@ -53,24 +56,66 @@ #:use-module (gnu packages lua) #:use-module (gnu packages mp3) #:use-module (gnu packages ncurses) + #:use-module (gnu packages ocr) #:use-module (gnu packages openssl) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages pulseaudio) #:use-module (gnu packages python) #:use-module (gnu packages qt) + #:use-module (gnu packages samba) #:use-module (gnu packages sdl) #:use-module (gnu packages ssh) + #:use-module (gnu packages texinfo) #:use-module (gnu packages texlive) #:use-module (gnu packages textutils) #:use-module (gnu packages version-control) #:use-module (gnu packages web) + #:use-module (gnu packages xdisorg) #:use-module (gnu packages xiph) #:use-module (gnu packages xml) #:use-module (gnu packages xorg) #:use-module (gnu packages yasm) #:use-module (gnu packages zip)) +(define-public aalib + (package + (name "aalib") + (version "1.4rc5") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/aa-project/" + name "-" version ".tar.gz")) + (sha256 + (base32 + "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv")))) + (build-system gnu-build-system) + (native-inputs + `(("makeinfo" ,texinfo))) + (inputs + `(("ncurses" ,ncurses))) + (arguments + '(#:phases + (modify-phases %standard-phases + (replace 'configure + (lambda* (#:key inputs outputs #:allow-other-keys) + ;; This old `configure' script doesn't support + ;; variables passed as arguments. + (let ((out (assoc-ref outputs "out")) + (ncurses (assoc-ref inputs "ncurses"))) + (setenv "CONFIG_SHELL" (which "bash")) + (zero? (system* "./configure" + (string-append "--prefix=" out) + (string-append "--with-ncurses=" + ncurses))))))))) + (home-page "http://aa-project.sourceforge.net/aalib/") + (synopsis "ASCII-art library") + (description + "AA-lib is a low level gfx library which does not require graphics device. +In fact, there is no graphical output possible. AA-lib replaces those +old-fashioned output methods with powerful ascii-art renderer.") + (license license:lgpl2.0+))) + (define-public liba52 (package (name "liba52") @@ -86,12 +131,19 @@ (base32 "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2")))) (build-system gnu-build-system) + (arguments `(#:configure-flags + '(;; FIXME: liba52-0.7.4's config.guess fails on mips64el. + ,@(if (%current-target-system) + '() + (let ((triplet + (nix-system->gnu-triplet (%current-system)))) + (list (string-append "--build=" triplet))))))) (home-page "http://liba52.sourceforge.net/") (synopsis "ATSC A/52 stream decoder") (description "liba52 is a library for decoding ATSC A/52 streams. The A/52 standard is used in a variety of applications, including digital television and DVD. It is also known as AC-3.") - (license gpl2+))) + (license license:gpl2+))) (define-public libass (package @@ -119,7 +171,7 @@ television and DVD. It is also known as AC-3.") (synopsis "Subtitle rendering library for the ASS/SSA format") (description "libass is a subtitle rendering library for the ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.") - (license isc))) + (license license:isc))) (define-public libcaca (package @@ -147,7 +199,7 @@ ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.") pixels, so that it can work on older video cards or text terminals. It supports Unicode, 2048 colors, dithering of color images, and advanced text canvas operations.") - (license (fsf-free "file://COPYING")))) ;WTFPL version 2 + (license (license:fsf-free "file://COPYING")))) ;WTFPL version 2 (define-public libdca (package @@ -166,7 +218,7 @@ canvas operations.") (synopsis "DTS Coherent Acoustics decoder") (description "libdca is a library for decoding DTS Coherent Acoustics streams.") - (license gpl2+))) + (license license:gpl2+))) (define-public libdv (package @@ -189,19 +241,69 @@ video, the encoding format used by most digital camcorders, typically those that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was developed according to the official standards for DV video: IEC 61834 and SMPTE 314M.") - (license lgpl2.1+))) + (license license:lgpl2.1+))) + +(define-public libva + (package + (name "libva") + (version "1.5.1") + (source + (origin + (method url-fetch) + (uri (string-append + "http://www.freedesktop.org/software/vaapi/releases/libva/libva-" + version".tar.bz2")) + (sha256 + (base32 "01d01mm9fgpwzqycmjjcj3in3vvzcibi3f64icsw2sksmmgb4495")))) + (build-system gnu-build-system) + (native-inputs + `(("pkg-config" ,pkg-config))) + (inputs + `(("libdrm" ,libdrm) + ("libx11" ,libx11) + ("libxext" ,libxext) + ("libxfixes" ,libxfixes) + ("mesa" ,mesa))) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before + 'build 'fix-dlopen-paths + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (substitute* "va/drm/va_drm_auth_x11.c" + (("\"libva-x11\\.so\\.%d\"") + (string-append "\"" out "/lib/libva-x11.so.%d\""))))))) + ;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be + ;; overridden at run-time via LIBVA_DRIVERS_PATH.) + #:configure-flags + (list (string-append "--with-drivers-path=" + (assoc-ref %build-inputs "mesa") "/lib/dri")) + ;; However, we can't write to mesa's store directory, so override the + ;; following make variable to install the dummy driver to libva's + ;; $prefix/lib/dri directory. + #:make-flags + (list (string-append "dummy_drv_video_ladir=" + (assoc-ref %outputs "out") "/lib/dri")))) + (home-page "http://www.freedesktop.org/wiki/Software/vaapi/") + (synopsis "Video acceleration library") + (description "The main motivation for VA-API (Video Acceleration API) is +to enable hardware accelerated video decode/encode at various +entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding +standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).") + (license license:expat))) (define-public ffmpeg (package (name "ffmpeg") - (version "2.6") + (version "2.6.2") (source (origin (method url-fetch) (uri (string-append "http://www.ffmpeg.org/releases/ffmpeg-" version ".tar.bz2")) (sha256 (base32 - "14a7zp8pa1rvw6nr9l2rf57xr004n5kwkhn5lglybjnn1p68xhr3")))) + "1fi93zy98wmls7x3jpr2yvckk2ia6a1yyygwrfaxq95pd6h3m7l8")))) (build-system gnu-build-system) (inputs `(("fontconfig" ,fontconfig) @@ -218,7 +320,6 @@ SMPTE 314M.") ("libvorbis" ,libvorbis) ("libvpx" ,libvpx) ("openal" ,openal) - ("patchelf" ,patchelf) ("pulseaudio" ,pulseaudio) ("soxr" ,soxr) ("speex" ,speex) @@ -235,15 +336,9 @@ SMPTE 314M.") ("yasm" ,yasm))) (arguments `(#:test-target "fate" - #:modules ((guix build gnu-build-system) - (guix build utils) - (guix build rpath) - (srfi srfi-26)) - #:imported-modules ((guix build gnu-build-system) - (guix build utils) - (guix build rpath)) #:phases - (alist-replace + (modify-phases %standard-phases + (replace 'configure ;; configure does not work followed by "SHELL=..." and ;; "CONFIG_SHELL=..."; set environment variables instead @@ -253,51 +348,51 @@ SMPTE 314M.") (("#! /bin/sh") (string-append "#!" (which "bash")))) (setenv "SHELL" (which "bash")) (setenv "CONFIG_SHELL" (which "bash")) - ;; FIXME: only needed for ffmpeg-2.2.13, but easier to add - ;; globally; drop as soon as ffmpeg-2.2.13 is dropped - (setenv "LDFLAGS" "-ldl") -;; possible additional inputs: -;; --enable-avisynth enable reading of AviSynth script files [no] -;; --enable-frei0r enable frei0r video filtering -;; --enable-libaacplus enable AAC+ encoding via libaacplus [no] -;; --enable-libcelt enable CELT decoding via libcelt [no] -;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394 -;; and libraw1394 [no] -;; --enable-libfaac enable AAC encoding via libfaac [no] -;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no] -;; --enable-libflite enable flite (voice synthesis) support via libflite [no] -;; --enable-libgme enable Game Music Emu via libgme [no] -;; --enable-libgsm enable GSM de/encoding via libgsm [no] -;; --enable-libiec61883 enable iec61883 via libiec61883 [no] -;; --enable-libilbc enable iLBC de/encoding via libilbc [no] -;; --enable-libmodplug enable ModPlug via libmodplug [no] -;; --enable-libnut enable NUT (de)muxing via libnut, -;; native (de)muxer exists [no] -;; --enable-libopencore-amrnb enable AMR-NB de/encoding via libopencore-amrnb [no] -;; --enable-libopencore-amrwb enable AMR-WB decoding via libopencore-amrwb [no] -;; --enable-libopencv enable video filtering via libopencv [no] -;; --enable-libopenjpeg enable JPEG 2000 de/encoding via OpenJPEG [no] -;; --enable-librtmp enable RTMP[E] support via librtmp [no] -;; --enable-libschroedinger enable Dirac de/encoding via libschroedinger [no] -;; --enable-libshine enable fixed-point MP3 encoding via libshine [no] -;; --enable-libssh enable SFTP protocol via libssh [no] -;; (libssh2 does not work) -;; --enable-libstagefright-h264 enable H.264 decoding via libstagefright [no] -;; --enable-libutvideo enable Ut Video encoding and decoding via libutvideo [no] -;; --enable-libv4l2 enable libv4l2/v4l-utils [no] -;; --enable-libvidstab enable video stabilization using vid.stab [no] -;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no] -;; --enable-libvo-amrwbenc enable AMR-WB encoding via libvo-amrwbenc [no] -;; --enable-libwavpack enable wavpack encoding via libwavpack [no] -;; --enable-libx264 enable H.264 encoding via x264 [no] -;; --enable-libxavs enable AVS encoding via xavs [no] -;; --enable-libzmq enable message passing via libzmq [no] -;; --enable-libzvbi enable teletext support via libzvbi [no] -;; --enable-opencl enable OpenCL code -;; --enable-x11grab enable X11 grabbing [no] + ;; possible additional inputs: + ;; --enable-avisynth enable reading of AviSynth script files [no] + ;; --enable-frei0r enable frei0r video filtering + ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no] + ;; --enable-libcelt enable CELT decoding via libcelt [no] + ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394 + ;; and libraw1394 [no] + ;; --enable-libfaac enable AAC encoding via libfaac [no] + ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no] + ;; --enable-libflite enable flite (voice synthesis) support via libflite [no] + ;; --enable-libgme enable Game Music Emu via libgme [no] + ;; --enable-libgsm enable GSM de/encoding via libgsm [no] + ;; --enable-libiec61883 enable iec61883 via libiec61883 [no] + ;; --enable-libilbc enable iLBC de/encoding via libilbc [no] + ;; --enable-libmodplug enable ModPlug via libmodplug [no] + ;; --enable-libnut enable NUT (de)muxing via libnut, + ;; native (de)muxer exists [no] + ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via libopencore-amrnb [no] + ;; --enable-libopencore-amrwb enable AMR-WB decoding via libopencore-amrwb [no] + ;; --enable-libopencv enable video filtering via libopencv [no] + ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via OpenJPEG [no] + ;; --enable-librtmp enable RTMP[E] support via librtmp [no] + ;; --enable-libschroedinger enable Dirac de/encoding via libschroedinger [no] + ;; --enable-libshine enable fixed-point MP3 encoding via libshine [no] + ;; --enable-libssh enable SFTP protocol via libssh [no] + ;; (libssh2 does not work) + ;; --enable-libstagefright-h264 enable H.264 decoding via libstagefright [no] + ;; --enable-libutvideo enable Ut Video encoding and decoding via libutvideo [no] + ;; --enable-libv4l2 enable libv4l2/v4l-utils [no] + ;; --enable-libvidstab enable video stabilization using vid.stab [no] + ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no] + ;; --enable-libvo-amrwbenc enable AMR-WB encoding via libvo-amrwbenc [no] + ;; --enable-libwavpack enable wavpack encoding via libwavpack [no] + ;; --enable-libx264 enable H.264 encoding via x264 [no] + ;; --enable-libxavs enable AVS encoding via xavs [no] + ;; --enable-libzmq enable message passing via libzmq [no] + ;; --enable-libzvbi enable teletext support via libzvbi [no] + ;; --enable-opencl enable OpenCL code + ;; --enable-x11grab enable X11 grabbing [no] (zero? (system* "./configure" (string-append "--prefix=" out) + ;; Add $libdir to the RUNPATH of all the binaries. + (string-append "--extra-ldflags=-Wl,-rpath=" + %output "/lib") "--enable-avresample" "--enable-gpl" ; enable optional gpl licensed parts "--enable-shared" @@ -329,41 +424,28 @@ SMPTE 314M.") "--disable-mips32r2" "--disable-mipsdspr1" "--disable-mipsdspr2" - "--disable-mipsfpu")))) - (alist-cons-after - 'strip 'add-lib-to-runpath - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (lib (string-append out "/lib"))) - ;; Add LIB to the RUNPATH of all the executables and libraries. - (with-directory-excursion out - (for-each (cut augment-rpath <> lib) - (append (find-files "bin" ".*") - (find-files "lib" "\\.so\\..*\\.")))))) - %standard-phases)))) + "--disable-mipsfpu"))))) + (add-before + 'check 'set-ld-library-path + (lambda _ + ;; Allow $(top_builddir)/ffmpeg to find its dependencies when + ;; running tests. + (let* ((dso (find-files "." "\\.so$")) + (path (string-join (map dirname dso) ":"))) + (format #t "setting LD_LIBRARY_PATH to ~s~%" path) + (setenv "LD_LIBRARY_PATH" path) + #t)))))) (home-page "http://www.ffmpeg.org/") (synopsis "Audio and video framework") (description "FFmpeg is a complete, cross-platform solution to record, convert and stream audio and video. It includes the libavcodec audio/video codec library.") - (license gpl2+))) - -;; We need this older ffmpeg because vlc-2.1.5 doesn't work with ffmpeg-2.4. -(define-public ffmpeg-2.2 - (package (inherit ffmpeg) - (version "2.2.13") - (source (origin - (method url-fetch) - (uri (string-append "http://www.ffmpeg.org/releases/ffmpeg-" - version ".tar.bz2")) - (sha256 - (base32 - "1vva8ffwxi3rg44byy09qlbiqrrd1h4rmsl5b1mbmvzvwl1lq1l0")))))) + (license license:gpl2+))) (define-public vlc (package (name "vlc") - (version "2.1.5") + (version "2.2.0") (source (origin (method url-fetch) (uri (string-append @@ -371,7 +453,7 @@ audio/video codec library.") version "/vlc-" version ".tar.xz")) (sha256 (base32 - "0whzbn7ahn5maarcwl1yhk9lq10b0q0y9w5pjl9kh3frdjmncrbg")))) + "05smn9hqdp7iscc1dj4cxp1mrlad7b50lhlnlqisfzf493i2f2jy")))) (build-system gnu-build-system) (native-inputs `(("git" ,git) ; needed for a test @@ -382,7 +464,7 @@ audio/video codec library.") ("avahi" ,avahi) ("dbus" ,dbus) ("flac" ,flac) - ("ffmpeg" ,ffmpeg-2.2) ; FIXME: vlc-2.1.5 won't work with ffmpeg-2.4 + ("ffmpeg" ,ffmpeg) ("fontconfig" ,fontconfig) ("freetype" ,freetype) ("gnutls" ,gnutls) @@ -422,7 +504,7 @@ audio/video codec library.") (description "VLC is a cross-platform multimedia player and framework that plays most multimedia files as well as DVD, Audio CD, VCD, and various treaming protocols.") - (license gpl2+))) + (license license:gpl2+))) (define-public mplayer (package @@ -495,13 +577,13 @@ treaming protocols.") '("--enable-runtime-cpudetection" "--target=i686-linux")) ("mips64el-linux" - '("--target=mips3-linux"))) - "--disable-armv5te" - "--disable-armv6" - "--disable-armv6t2" - "--disable-armvfp" + '("--target=mips3-linux")) + (_ (list (string-append + "--target=" + (or (%current-target-system) + (nix-system->gnu-triplet + (%current-system))))))) "--disable-neon" - "--disable-thumb" "--disable-iwmmxt")))) %standard-phases))) (home-page "http://www.mplayerhq.hu/design7/news.html") @@ -510,7 +592,212 @@ treaming protocols.") Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT, NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD, SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.") - (license gpl2))) + (license license:gpl2))) + +;;; This is not version 2; it's a fork literally named "mplayer2". +(define-public mplayer2 + (package + (name "mplayer2") + ;; There are no tarballs. The 2.0 git tag, which is actually the first + ;; release is from 2011. The latest commit is from 2013 October, so we + ;; use that commit. + (version "201310") + (source (origin + (method git-fetch) + (uri (git-reference + ;; XXX Change this if mplayer2.org goes up again. + (url "http://repo.or.cz/mplayer2.git") + (commit "2c378c71a4d9b1df382db9aa787b646628b4e3f9"))) + (sha256 + (base32 + "0s8554sanj6cvnf0h148nsmjgy5v0568nmcza7grpv6fnmddpfam")) + (file-name (string-append name "-" version "-checkout")) + ;; Warning: after using this patch, one must pass the -ltheora + ;; linker flag manually to configure; see below. + (patches (list (search-patch "mplayer2-theora-fix.patch"))))) + (build-system gnu-build-system) + (native-inputs + `(("pkg-config" ,pkg-config) + ("perl" ,perl) + ("python" ,python) + ("python-2" ,python-2) + ("python-docutils" ,python-docutils) + ;; ./configure uses which(1) to find rst2man.py. + ("which" ,which))) + ;; Missing features: DirectFB, Xss screensaver extensions, VDPAU, MNG, + ;; libnut, DirectShow TV interface, Radio interfaces of all kinds, vstream + ;; client, XMSS inputplugin support, joystick, lirc/lircc, and openal. + ;; OpenAL support is experimental and causes compilation to fail with + ;; linker errors. + (inputs + `(("alsa-lib" ,alsa-lib) + ("faad2" ,faad2) + ("ffmpeg" ,ffmpeg) + ("gettext" ,gnu-gettext) + ("jack" ,jack-2) + ("ladspa" ,ladspa) + ("lcms" ,lcms) + ("liba52" ,liba52) + ("libass" ,libass) + ("libbluray" ,libbluray) + ("libbs2b" ,libbs2b) + ("libcaca" ,libcaca) + ("libcdio-paranoia" ,libcdio-paranoia) + ("libdca" ,libdca) + ("libdv" ,libdv) + ("libdvdread" ,libdvdread) + ("libdvdnav" ,libdvdnav-4) + ("libjpeg" ,libjpeg) + ("libmad" ,libmad) + ("libpng" ,libpng) + ("libquvi" ,libquvi) + ("libtheora" ,libtheora) + ("libungif" ,libungif) + ("libvorbis" ,libvorbis) + ("libx11" ,libx11) + ("libxinerama" ,libxinerama) + ("libxv" ,libxv) + ("mesa" ,mesa) + ("mpg123" ,mpg123) + ("ncurses" ,ncurses) + ("portaudio" ,portaudio) + ("pulseaudio" ,pulseaudio) + ("rsound" ,rsound) + ("samba" ,samba) + ("sdl" ,sdl) + ("speex" ,speex) + ("xvid" ,xvid))) + (arguments + '(#:phases + (alist-replace + 'configure + ;; ./configure does not work followed by "SHELL=..." and + ;; "CONFIG_SHELL=..."; set environment variables instead. + (lambda* (#:key inputs outputs #:allow-other-keys) + (setenv "SHELL" (which "bash")) + (setenv "CONFIG_SHELL" (which "bash")) + (substitute* "configure" + (("/usr/X11") (assoc-ref inputs "libx11"))) + (zero? + (system* "./configure" + (string-append "--prefix=" (assoc-ref outputs "out")) + "--enable-translation" + "--enable-runtime-cpudetection" + ;; This is needed in accordance with the theora patch. + "--extra-libs=-ltheoradec"))) + (alist-cons-before + 'build 'fix-TOOLS-shebangs + (lambda _ + (substitute* (find-files "TOOLS" "\\.(sh|pl|py)$") + (("/usr/bin/env") (which "env")) + (("/usr/bin/perl") (which "perl")) + (("/usr/bin/python3") (which "python3")) + (("/usr/bin/python") (which "python")))) + (alist-cons-before + 'build 'fix-input-buffer-padding-size + (lambda _ + (substitute* "libmpdemux/demuxer.h" + ;; This has to match with FFmpeg's FF_INPUT_BUFFER_PADDING_SIZE, + ;; which has changed at some point. + (("(#define MP_INPUT_BUFFER_PADDING_SIZE )[0-9]*" all) + (string-append all "32")))) + %standard-phases))) + ;; No 'check' target. + #:tests? #f)) + ;; XXX Change this if mplayer2.org goes up again. + (home-page "http://repo.or.cz/w/mplayer2.git") + (synopsis "Audio and video player") + (description "mplayer2 is a general-purpose audio and video player. It's +a fork of the original MPlayer project, and contains further development in +several areas.") + ;; See file Copyright. Most files are gpl2+ or compatible, but talloc.c + ;; is under lgpl3+, thus the whole project becomes gpl3+. + (license license:gpl3+))) + +(define-public mpv + (package + (name "mpv") + (version "0.9.0") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/mpv-player/mpv/archive/v" version + ".tar.gz")) + (sha256 + (base32 + "08nx0g6ji2d90f5w62g327szhkb7id7jzwgf3x069rc5id1x3bx7")) + (file-name (string-append name "-" version ".tar.gz")))) + (build-system waf-build-system) + (native-inputs + `(("perl" ,perl) + ("pkg-config" ,pkg-config) + ("python-docutils" ,python-docutils))) + ;; Missing features: libguess, Wayland, VDPAU, V4L2 + (inputs + `(("alsa-lib" ,alsa-lib) + ("enca" ,enca) + ("ffmpeg" ,ffmpeg) + ("jack" ,jack-2) + ("ladspa" ,ladspa) + ("lcms" ,lcms) + ("libass" ,libass) + ("libbluray" ,libbluray) + ("libcaca" ,libcaca) + ("libbs2b" ,libbs2b) + ("libcdio-paranoia" ,libcdio-paranoia) + ("libdvdread" ,libdvdread) + ("libdvdnav" ,libdvdnav) + ("libjpeg" ,libjpeg) + ("libva" ,libva) + ("libx11" ,libx11) + ("libxext" ,libxext) + ("libxinerama" ,libxinerama) + ("libxrandr" ,libxrandr) + ("libxscrnsaver" ,libxscrnsaver) + ("libxv" ,libxv) + ("lua" ,lua) + ("mesa" ,mesa) + ("mpg123" ,mpg123) + ("pulseaudio" ,pulseaudio) + ("rsound" ,rsound) + ("samba" ,samba) + ("vapoursynth" ,vapoursynth) + ("waf" ,(origin + (method url-fetch) + ;; Keep this in sync with the version in the bootstrap.py + ;; script of the source tarball. + (uri "http://www.freehackers.org/~tnagy/release/waf-1.8.4") + (sha256 + (base32 + "1a7skwgpl91adhcwlmdr76xzdpidh91hvcmj34zz6548bpx3a87h")))) + ("youtube-dl" ,youtube-dl) + ("zlib" ,zlib))) + (arguments + '(#:phases + (modify-phases %standard-phases + (add-before + 'configure 'setup-waf + (lambda* (#:key inputs #:allow-other-keys) + (copy-file (assoc-ref inputs "waf") "waf") + (setenv "CC" "gcc"))) + (add-before + 'configure 'patch-wscript + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "wscript" + ;; XXX Remove this when our Samba package provides a .pc file. + (("check_pkg_config\\('smbclient'\\)") + "check_cc(lib='smbclient')") + ;; XXX Remove this when our Lua package provides a .pc file. + (("check_lua") + "check_cc(lib='lua')"))))) + ;; No check function defined. + #:tests? #f)) + (home-page "http://mpv.io/") + (synopsis "Audio and video player") + (description "mpv is a general-purpose audio and video player. It is a +fork of mplayer2 and MPlayer. It shares some features with the former +projects while introducing many more.") + (license license:gpl2+))) (define-public libvpx (package @@ -534,6 +821,8 @@ SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.") (lambda* (#:key outputs #:allow-other-keys) (setenv "CONFIG_SHELL" (which "bash")) (let ((out (assoc-ref outputs "out"))) + (setenv "LDFLAGS" + (string-append "-Wl,-rpath=" out "/lib")) (zero? (system* "./configure" "--enable-shared" "--as=yasm" @@ -562,13 +851,13 @@ SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.") ("yasm" ,yasm))) (synopsis "VP8/VP9 video codec") (description "libvpx is a codec for the VP8/VP9 video compression format.") - (license bsd-3) + (license license:bsd-3) (home-page "http://www.webmproject.org/"))) (define-public youtube-dl (package (name "youtube-dl") - (version "2015.01.23.4") + (version "2015.05.20") (source (origin (method url-fetch) (uri (string-append "http://youtube-dl.org/downloads/" @@ -576,7 +865,7 @@ SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.") version ".tar.gz")) (sha256 (base32 - "0pvvab9dk1righ3fa79000iz8fzdlcxakscx5sd31730c37j3kj2")))) + "1crfada7vq3d24062wr06sfam66cf14j06wnhg7w5ljzrbynvpll")))) (build-system python-build-system) (inputs `(("setuptools" ,python-setuptools))) (home-page "http://youtube-dl.org") @@ -584,7 +873,7 @@ SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.") (description "youtube-dl is a small command-line program to download videos from YouTube.com and a few more sites.") - (license public-domain))) + (license license:public-domain))) (define-public libbluray (package @@ -612,7 +901,7 @@ YouTube.com and a few more sites.") (description "libbluray is a library designed for Blu-Ray Disc playback for media players, like VLC or MPlayer.") - (license lgpl2.1+))) + (license license:lgpl2.1+))) (define-public libdvdread (package @@ -635,7 +924,7 @@ disks. It provides the functionality that is required to access many DVDs. It parses IFO files, reads NAV-blocks, and performs CSS authentication and descrambling (if an external libdvdcss library is installed).") - (license gpl2+))) + (license license:gpl2+))) (define-public libdvdnav (package @@ -667,7 +956,7 @@ a loop regularly calling a function to get the next block, surrounded by additional calls to tell the library of user interaction. The whole DVD virtual machine and internal playback states are completely encapsulated.") - (license gpl2+))) + (license license:gpl2+))) (define-public libdvdnav-4 (package @@ -713,7 +1002,7 @@ encapsulated.") (description "libdvdcss is a simple library designed for accessing DVDs like a block device without having to bother about the decryption.") - (license gpl2+))) + (license license:gpl2+))) (define-public srt2vtt (package @@ -734,7 +1023,7 @@ device without having to bother about the decryption.") (description "srt2vtt converts SubRip formatted subtitles to WebVTT format for use with HTML5 video.") (home-page "http://dthompson.us/pages/software/srt2vtt") - (license gpl3+))) + (license license:gpl3+))) (define-public avidemux (package @@ -849,7 +1138,7 @@ DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks can be automated using projects, job queue and powerful scripting capabilities.") ;; Software with various licenses is included, see License.txt. - (license gpl2+))) + (license license:gpl2+))) (define-public avidemux-2.5 (package (inherit avidemux) @@ -941,6 +1230,47 @@ capabilities.") (alist-delete 'install %standard-phases))))))))) +(define-public vapoursynth + (package + (name "vapoursynth") + (version "26") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/vapoursynth/vapoursynth/archive/R" + version ".tar.gz")) + (sha256 + (base32 + "1qbg5kg0kgrxldd0ckn1s7vy7vx2ig8nqzv6djp38fxccpzw3x9k")))) + (build-system gnu-build-system) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("cython" ,python-cython) + ("libtool" ,libtool) + ("pkg-config" ,pkg-config) + ("python" ,python) + ("yasm" ,yasm))) + (inputs + `(("ffmpeg" ,ffmpeg) + ("libass" ,libass) + ("tesseract-ocr" ,tesseract-ocr))) + (arguments + '(#:phases + (modify-phases %standard-phases + (add-after + 'unpack 'autogen + (lambda _ + (zero? (system* "sh" "autogen.sh"))))))) + (home-page "http://www.vapoursynth.com/") + (synopsis "Video processing framework") + (description "VapourSynth is a C++ library and Python module for video +manipulation. It aims to be a modern rewrite of Avisynth, supporting +multithreading, generalized colorspaces, per frame properties, and videos with +format changes.") + ;; As seen from the source files. + (license license:lgpl2.1+))) + (define-public xvid (package (name "xvid") @@ -972,4 +1302,31 @@ capabilities.") codec library. It uses ASP features such as b-frames, global and quarter pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG and custom quantization matrices.") - (license gpl2+))) + (license license:gpl2+))) + +(define-public livestreamer + (package + (name "livestreamer") + (version "1.12.1") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/chrippa/livestreamer/archive/v" + version ".tar.gz")) + (file-name (string-append "livestreamer-" version ".tar.gz")) + (sha256 + (base32 + "1dhgk8v8q1h3km4g5jc0cmjsxdaa2d456fvdb2wk7hmxmmwbqm9j")))) + (build-system python-build-system) + (arguments + '(#:tests? #f)) ; tests rely on external web servers + (native-inputs + `(("python-setuptools" ,python-setuptools))) + (propagated-inputs + `(("python-requests" ,python-requests) + ("python-singledispatch" ,python-singledispatch))) + (synopsis "Internet video stream viewer") + (description "Livestreamer is a command-line utility that extracts streams +from various services and pipes them into a video playing application.") + (home-page "http://livestreamer.io/") + (license license:bsd-2))) diff --git a/gnu/packages/vpn.scm b/gnu/packages/vpn.scm index 5883f99505..62036d9ef7 100644 --- a/gnu/packages/vpn.scm +++ b/gnu/packages/vpn.scm @@ -28,6 +28,7 @@ #:use-module (gnu packages gettext) #:use-module (gnu packages gnupg) #:use-module (gnu packages gnutls) + #:use-module (gnu packages linux) #:use-module (gnu packages openssl) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) @@ -125,3 +126,33 @@ supported by the ASA5500 Series, by IOS 12.4(9)T or later on Cisco SR500, and probably others.") (license license:lgpl2.1) (home-page "http://www.infradead.org/openconnect/"))) + +(define-public openvpn + (package + (name "openvpn") + (version "2.3.6") + (source (origin + (method url-fetch) + (uri (string-append + "https://swupdate.openvpn.org/community/releases/openvpn-" + version ".tar.xz")) + (sha256 + (base32 + "1v8h2nshxnvn2zyr08vzkfby1kc7ma6bi0s6hix389cj9krjxbmd")))) + (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--enable-iproute2=yes"))) + (native-inputs + `(("iproute2" ,iproute))) + (inputs + `(("lzo" ,lzo) + ("openssl" ,openssl) + ("linux-pam" ,linux-pam))) + (home-page "https://openvpn.net/") + (synopsis "Virtual private network daemon") + (description "OpenVPN implements virtual private network (VPN) techniques +for creating secure point-to-point or site-to-site connections in routed or +bridged configurations and remote access facilities. It uses a custom +security protocol that utilizes SSL/TLS for key exchange. It is capable of +traversing network address translators (NATs) and firewalls. ") + (license license:gpl2))) diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index cbf3cb3465..e77bad76d6 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -32,6 +32,7 @@ #:use-module (guix build-system gnu) #:use-module (guix build-system perl) #:use-module (guix build-system cmake) + #:use-module (gnu packages) #:use-module (gnu packages apr) #:use-module (gnu packages asciidoc) #:use-module (gnu packages docbook) @@ -40,10 +41,12 @@ #:use-module (gnu packages cyrus-sasl) #:use-module (gnu packages databases) #:use-module (gnu packages openssl) + #:use-module (gnu packages gd) #:use-module (gnu packages gettext) #:use-module (gnu packages icu4c) #:use-module (gnu packages lua) #:use-module (gnu packages base) + #:use-module (gnu packages python) #:use-module (gnu packages pcre) #:use-module (gnu packages pkg-config) #:use-module (gnu packages xml) @@ -92,14 +95,14 @@ and its related documentation.") (define-public nginx (package (name "nginx") - (version "1.6.2") + (version "1.8.0") (source (origin (method url-fetch) (uri (string-append "http://nginx.org/download/nginx-" version ".tar.gz")) (sha256 (base32 - "060s77qxhkn02fjkcndsr0xppj2bppjzkj0gn84svrykb4lqqq5m")))) + "1mgkkmmwkhmpn68sdvbd73ssv6lpqhh864fsyvc1ij4hk4is3k13")))) (build-system gnu-build-system) (inputs `(("pcre" ,pcre) ("openssl" ,openssl) @@ -107,38 +110,56 @@ and its related documentation.") (arguments `(#:tests? #f ; no test target #:phases - (alist-cons-before - 'configure 'patch-/bin/sh - (lambda _ - (substitute* "auto/feature" - (("/bin/sh") (which "bash")))) - (alist-replace - 'configure - (lambda* (#:key outputs #:allow-other-keys) - (let ((flags - (list (string-append "--prefix=" (assoc-ref outputs "out")) - "--with-http_ssl_module" - "--with-pcre-jit" - "--with-ipv6" - "--with-debug" - ;; Even when not cross-building, we pass the - ;; --crossbuild option to avoid customizing for the - ;; kernel version on the build machine. - ,(let ((system "Linux") ; uname -s - (release "2.6.32") ; uname -r - ;; uname -m - (machine (match (or (%current-target-system) - (%current-system)) - ("x86_64-linux" "x86_64") - ("i686-linux" "i686") - ("mips64el-linux" "mips64")))) - (string-append "--crossbuild=" - system ":" release ":" machine))))) - (setenv "CC" "gcc") - (format #t "environment variable `CC' set to `gcc'~%") - (format #t "configure flags: ~s~%" flags) - (zero? (apply system* "./configure" flags)))) - %standard-phases)))) + (modify-phases %standard-phases + (add-before 'configure 'patch-/bin/sh + (lambda _ + (substitute* "auto/feature" + (("/bin/sh") (which "bash"))))) + (replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + (let ((flags + (list (string-append "--prefix=" (assoc-ref outputs "out")) + "--with-http_ssl_module" + "--with-pcre-jit" + "--with-ipv6" + "--with-debug" + ;; Even when not cross-building, we pass the + ;; --crossbuild option to avoid customizing for the + ;; kernel version on the build machine. + ,(let ((system "Linux") ; uname -s + (release "2.6.32") ; uname -r + ;; uname -m + (machine (match (or (%current-target-system) + (%current-system)) + ("x86_64-linux" "x86_64") + ("i686-linux" "i686") + ("mips64el-linux" "mips64") + ;; Prevent errors when querying + ;; this package on unsupported + ;; platforms, e.g. when running + ;; "guix package --search=" + (_ "UNSUPPORTED")))) + (string-append "--crossbuild=" + system ":" release ":" machine))))) + (setenv "CC" "gcc") + (format #t "environment variable `CC' set to `gcc'~%") + (format #t "configure flags: ~s~%" flags) + (zero? (apply system* "./configure" flags))))) + (add-after 'install 'fix-root-dirs + (lambda* (#:key outputs #:allow-other-keys) + ;; 'make install' puts things in strange places, so we need to + ;; clean it up ourselves. + (let* ((out (assoc-ref outputs "out")) + (share (string-append out "/share/nginx"))) + ;; This directory is empty, so get rid of it. + (rmdir (string-append out "/logs")) + ;; Example configuration and HTML files belong in + ;; /share. + (mkdir-p share) + (rename-file (string-append out "/conf") + (string-append share "/conf")) + (rename-file (string-append out "/html") + (string-append share "/html")))))))) (home-page "http://nginx.org") (synopsis "HTTP and reverse proxy server") (description @@ -152,6 +173,38 @@ and as a proxy to reduce the load on back-end HTTP or mail servers.") ;; except for two source files which are bsd-4 licensed. (license (list l:bsd-2 l:expat l:bsd-3 l:bsd-4)))) +(define-public starman + (package + (name "starman") + (version "0.4011") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/M/MI/MIYAGAWA/" + "Starman-" version ".tar.gz")) + (sha256 + (base32 + "1337zhi6v1sg4gd9rs3giybc7g1ysw8ak2da0vy098k4dacxyb57")))) + (build-system perl-build-system) + (native-inputs + `(("perl-libwww" ,perl-libwww) + ("perl-module-build-tiny" ,perl-module-build-tiny) + ("perl-test-requires" ,perl-test-requires))) + (propagated-inputs + `(("perl-data-dump" ,perl-data-dump) + ("perl-http-date" ,perl-http-date) + ("perl-http-message" ,perl-http-message) + ("perl-http-parser-xs" ,perl-http-parser-xs) + ("perl-net-server" ,perl-net-server) + ("perl-plack" ,perl-plack) + ("perl-test-tcp" ,perl-test-tcp))) + (home-page "http://search.cpan.org/dist/Starman") + (synopsis "PSGI/Plack web server") + (description "Starman is a PSGI perl web server that has unique features +such as high performance, preforking, signal support, superdaemon awareness, +and UNIX socket support.") + (license (package-license perl)))) + (define-public jansson (package (name "jansson") @@ -496,6 +549,75 @@ URLs and extracting their actual media files.") from streaming URLs. It is a command-line wrapper for the libquvi library.") (license l:lgpl2.1+))) +(define-public serf + (package + (name "serf") + (version "1.3.8") + (source + (origin + (method url-fetch) + (uri (string-append "http://serf.googlecode.com/svn/src_releases/serf-" + version ".tar.bz2")) + (sha256 + (base32 "14155g48gamcv5s0828bzij6vr14nqmbndwq8j8f9g6vcph0nl70")) + (patches (map search-patch '("serf-comment-style-fix.patch" + "serf-deflate-buckets-test-fix.patch"))) + (patch-flags '("-p0")))) + (build-system gnu-build-system) + (native-inputs + `(("scons" ,scons) + ("python" ,python-2))) + (propagated-inputs + `(("apr" ,apr) + ("apr-util" ,apr-util) + ("openssl" ,openssl))) + (inputs + `(;; TODO: Fix build with gss. + ;;("gss" ,gss) + ("zlib" ,zlib))) + (arguments + `(#:phases + ;; TODO: Add scons-build-system and use it here. + (modify-phases %standard-phases + (delete 'configure) + (add-after 'unpack 'scons-propagate-environment + (lambda _ + ;; By design, SCons does not, by default, propagate + ;; environment variables to subprocesses. See: + ;; <http://comments.gmane.org/gmane.linux.distributions.nixos/4969> + ;; Here, we modify the SConstruct file to arrange for + ;; environment variables to be propagated. + (substitute* "SConstruct" + (("^env = Environment\\(") + "env = Environment(ENV=os.environ, ")))) + (replace 'build + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (apr (assoc-ref inputs "apr")) + (apr-util (assoc-ref inputs "apr-util")) + (openssl (assoc-ref inputs "openssl")) + ;;(gss (assoc-ref inputs "gss")) + (zlib (assoc-ref inputs "zlib"))) + (zero? (system* "scons" + (string-append "APR=" apr) + (string-append "APU=" apr-util) + (string-append "OPENSSL=" openssl) + ;;(string-append "GSSAPI=" gss) + (string-append "ZLIB=" zlib) + (string-append "PREFIX=" out)))))) + (replace 'check (lambda _ (zero? (system* "scons" "check")))) + (replace 'install (lambda _ (zero? (system* "scons" "install"))))))) + (home-page "https://code.google.com/p/serf/") + (synopsis "High-performance asynchronous HTTP client library") + (description + "serf is a C-based HTTP client library built upon the Apache Portable +Runtime (APR) library. It multiplexes connections, running the read/write +communication asynchronously. Memory copies and transformations are kept to a +minimum to provide high performance operation.") + ;; Most of the code is covered by the Apache License, Version 2.0, but the + ;; bundled CuTest framework uses a different non-copyleft license. + (license (list l:asl2.0 (l:non-copyleft "file://test/CuTest-README.txt"))))) + (define-public perl-apache-logformat-compiler (package @@ -648,6 +770,36 @@ extension for Catalyst; and requirements for a variety of development-related modules.") (license (package-license perl)))) +(define-public perl-catalyst-dispatchtype-regex + (package + (name "perl-catalyst-dispatchtype-regex") + (version "5.90035") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/M/MG/MGRIMES/" + "Catalyst-DispatchType-Regex-" version ".tar.gz")) + (sha256 + (base32 + "06jq1lmpq88rmp9zik5gqczg234xac0hiyc3l698iif7zsgcyb80")))) + (build-system perl-build-system) + (native-inputs + `(("perl-module-build" ,perl-module-build) ;needs Module::Build >= 0.4004 + ("perl-namespace-autoclean" ,perl-namespace-autoclean) + ("perl-catalyst-runtime" ,perl-catalyst-runtime))) + (propagated-inputs + `(("perl-moose" ,perl-moose) + ("perl-text-simpletable" ,perl-text-simpletable))) + (home-page "http://search.cpan.org/dist/Catalyst-DispatchType-Regex") + (synopsis "Regex DispatchType for Catalyst") + (description "Dispatch type managing path-matching behaviour using +regexes. Regex dispatch types have been deprecated and removed from Catalyst +core. It is recommend that you use Chained methods or other techniques +instead. As part of the refactoring, the dispatch priority of Regex vs Regexp +vs LocalRegex vs LocalRegexp may have changed. Priority is now influenced by +when the dispatch type is first seen in your application.") + (license (package-license perl)))) + (define-public perl-catalyst-model-dbic-schema (package (name "perl-catalyst-model-dbic-schema") @@ -693,6 +845,32 @@ modules.") Models.") (license (package-license perl)))) +(define-public perl-catalyst-plugin-accesslog + (package + (name "perl-catalyst-plugin-accesslog") + (version "1.05") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/A/AR/ARODLAND/" + "Catalyst-Plugin-AccessLog-" version ".tar.gz")) + (sha256 + (base32 + "0hqvckaw91q5yc25a33bp0d4qqxlgkp7rxlvi8n8svxd1406r55s")))) + (build-system perl-build-system) + (propagated-inputs + `(("perl-catalyst-runtime" ,perl-catalyst-runtime) + ("perl-datetime" ,perl-datetime) + ("perl-moose" ,perl-moose) + ("perl-namespace-autoclean" ,perl-namespace-autoclean))) + (arguments `(#:tests? #f)) ;Unexpected http responses + (home-page "http://search.cpan.org/dist/Catalyst-Plugin-AccessLog") + (synopsis "Request logging from within Catalyst") + (description "This Catalyst plugin enables you to create \"access logs\" +from within a Catalyst application instead of requiring a webserver to do it +for you. It will work even with Catalyst debug logging turned off.") + (license (package-license perl)))) + (define-public perl-catalyst-plugin-authentication (package (name "perl-catalyst-plugin-authentication") @@ -727,6 +905,30 @@ who they claim to be), and authorization (allowing the user to do what the system authorises them to do).") (license (package-license perl)))) +(define-public perl-catalyst-plugin-captcha + (package + (name "perl-catalyst-plugin-captcha") + (version "0.04") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/D/DI/DIEGOK/" + "Catalyst-Plugin-Captcha-" version ".tar.gz")) + (sha256 + (base32 + "0llyj3v5nx9cx46jdbbvxf1lc9s9cxq5ml22xmx3wkb201r5qgaa")))) + (build-system perl-build-system) + (propagated-inputs + `(("perl-catalyst-plugin-session" ,perl-catalyst-plugin-session) + ("perl-catalyst-runtime" ,perl-catalyst-runtime) + ("perl-gd-securityimage" ,perl-gd-securityimage) + ("perl-http-date" ,perl-http-date))) + (home-page "http://search.cpan.org/dist/Catalyst-Plugin-Captcha") + (synopsis "Captchas for Catalyst") + (description "This plugin creates and validates Captcha images for +Catalyst.") + (license (package-license perl)))) + (define-public perl-catalyst-plugin-configloader (package (name "perl-catalyst-plugin-configloader") @@ -785,6 +987,90 @@ formats.") management in web applications together: the state, and the store.") (license (package-license perl)))) +(define-public perl-catalyst-plugin-session-state-cookie + (package + (name "perl-catalyst-plugin-session-state-cookie") + (version "0.17") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/M/MS/MSTROUT/" + "Catalyst-Plugin-Session-State-Cookie-" + version ".tar.gz")) + (sha256 + (base32 + "1rvxbfnpf9x2pc2zgpazlcgdlr2dijmxgmcs0m5nazs0w6xikssb")))) + (build-system perl-build-system) + (propagated-inputs + `(("perl-catalyst-plugin-session" ,perl-catalyst-plugin-session) + ("perl-catalyst-runtime" ,perl-catalyst-runtime) + ("perl-moose" ,perl-moose) + ("perl-mro-compat" ,perl-mro-compat) + ("perl-namespace-autoclean" ,perl-namespace-autoclean))) + (home-page + "http://search.cpan.org/dist/Catalyst-Plugin-Session-State-Cookie") + (synopsis "Maintain session IDs using cookies") + (description "In order for Catalyst::Plugin::Session to work, the session +ID needs to be stored on the client, and the session data needs to be stored +on the server. This plugin stores the session ID on the client using the +cookie mechanism.") + (license (package-license perl)))) + +(define-public perl-catalyst-plugin-session-store-fastmmap + (package + (name "perl-catalyst-plugin-session-store-fastmmap") + (version "0.16") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/B/BO/BOBTFISH/" + "Catalyst-Plugin-Session-Store-FastMmap-" + version ".tar.gz")) + (sha256 + (base32 + "0x3j6zv3wr41jlwr6yb2jpmcx019ibyn11y8653ffnwhpzbpzsxs")))) + (build-system perl-build-system) + (propagated-inputs + `(("perl-cache-fastmmap" ,perl-cache-fastmmap) + ("perl-catalyst-plugin-session" ,perl-catalyst-plugin-session) + ("perl-catalyst-runtime" ,perl-catalyst-runtime) + ("perl-moosex-emulate-class-accessor-fast" + ,perl-moosex-emulate-class-accessor-fast) + ("perl-mro-compat" ,perl-mro-compat) + ("perl-path-class" ,perl-path-class))) + (home-page + "http://search.cpan.org/dist/Catalyst-Plugin-Session-Store-FastMmap") + (synopsis "FastMmap session storage backend.") + (description "Catalyst::Plugin::Session::Store::FastMmap is a fast session +storage plugin for Catalyst that uses an mmap'ed file to act as a shared +memory interprocess cache. It is based on Cache::FastMmap.") + (license (package-license perl)))) + +(define-public perl-catalyst-plugin-stacktrace + (package + (name "perl-catalyst-plugin-stacktrace") + (version "0.12") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/B/BO/BOBTFISH/" + "Catalyst-Plugin-StackTrace-" version ".tar.gz")) + (sha256 + (base32 + "1b2ksz74cpigxqzf63rddar3vfmnbpwpdcbs11v0ml89pb8ar79j")))) + (build-system perl-build-system) + (propagated-inputs + `(("perl-catalyst-runtime" ,perl-catalyst-runtime) + ("perl-devel-stacktrace" ,perl-devel-stacktrace) + ("perl-mro-compat" ,perl-mro-compat))) + (home-page "http://search.cpan.org/dist/Catalyst-Plugin-StackTrace") + (synopsis "Stack trace on the Catalyst debug screen") + (description "This plugin enhances the standard Catalyst debug screen by +including a stack trace of your appliation up to the point where the error +occurred. Each stack frame is displayed along with the package name, line +number, file name, and code context surrounding the line number.") + (license (package-license perl)))) + (define-public perl-catalyst-plugin-static-simple (package (name "perl-catalyst-plugin-static-simple") @@ -879,6 +1165,114 @@ run an application on the web, either by doing them itself, or by letting you \"plug in\" existing Perl modules that do what you need.") (license (package-license perl)))) +(define-public perl-catalyst-traitfor-request-proxybase + (package + (name "perl-catalyst-traitfor-request-proxybase") + (version "0.000005") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/B/BO/BOBTFISH/" + "Catalyst-TraitFor-Request-ProxyBase-" + version ".tar.gz")) + (sha256 + (base32 + "02kir63d5cs2ipj3fn1qlmmx3gqi1xqzrxfr4pv5vjhjgsm0zgx7")))) + (build-system perl-build-system) + (native-inputs + `(("perl-catalyst-runtime" ,perl-catalyst-runtime) + ("perl-catalystx-roleapplicator" ,perl-catalystx-roleapplicator) + ("perl-http-message" ,perl-http-message))) + (propagated-inputs + `(("perl-moose" ,perl-moose) + ("perl-namespace-autoclean" ,perl-namespace-autoclean) + ("perl-uri" ,perl-uri))) + (home-page + "http://search.cpan.org/dist/Catalyst-TraitFor-Request-ProxyBase") + (synopsis "Replace request base with value passed by HTTP proxy") + (description "This module is a Moose::Role which allows you more +flexibility in your application's deployment configurations when deployed +behind a proxy. Using this module, the request base ($c->req->base) is +replaced with the contents of the X-Request-Base header.") + (license (package-license perl)))) + +(define-public perl-catalyst-view-download + (package + (name "perl-catalyst-view-download") + (version "0.09") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/G/GA/GAUDEON/" + "Catalyst-View-Download-" version ".tar.gz")) + (sha256 + (base32 + "1qgq6y9iwfbhbkbgpw9czang2ami6z8jk1zlagrzdisy4igqzkvs")))) + (build-system perl-build-system) + (native-inputs + `(("perl-catalyst-runtime" ,perl-catalyst-runtime) + ("perl-test-simple" ,perl-test-simple) + ("perl-test-www-mechanize-catalyst" ,perl-test-www-mechanize-catalyst) + ("perl-text-csv" ,perl-text-csv) + ("perl-xml-simple" ,perl-xml-simple))) + (home-page "http://search.cpan.org/dist/Catalyst-View-Download") + (synopsis "Download data in many formats") + (description "The purpose of this module is to provide a method for +downloading data into many supportable formats. For example, downloading a +table based report in a variety of formats (CSV, HTML, etc.). ") + (license (package-license perl)))) + +(define-public perl-catalyst-view-json + (package + (name "perl-catalyst-view-json") + (version "0.35") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/J/JJ/JJNAPIORK/" + "Catalyst-View-JSON-" version ".tar.gz")) + (sha256 + (base32 + "184pyghlrkl7p387bnyvswi2d9myvdg4v3lax6xrd59shskvpmkm")))) + (build-system perl-build-system) + (native-inputs + `(("perl-yaml" ,perl-yaml))) + (inputs + `(("perl-catalyst-runtime" ,perl-catalyst-runtime) + ("perl-json-maybexs" ,perl-json-maybexs) + ("perl-mro-compat" ,perl-mro-compat))) + (home-page "http://search.cpan.org/dist/Catalyst-View-JSON") + (synopsis "Catalyst JSON view") + (description "Catalyst::View::JSON is a Catalyst View handler that returns +stash data in JSON format.") + (license (package-license perl)))) + +(define-public perl-catalyst-view-tt + (package + (name "perl-catalyst-view-tt") + (version "0.42") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/J/JJ/JJNAPIORK/" + "Catalyst-View-TT-" version ".tar.gz")) + (sha256 + (base32 + "18ciik9fqaqjfasa9wicbjrsl3gjhjc15xzaj3rif57an25cl178")))) + (build-system perl-build-system) + (propagated-inputs + `(("perl-catalyst-runtime" ,perl-catalyst-runtime) + ("perl-class-accessor" ,perl-class-accessor) + ("perl-mro-compat" ,perl-mro-compat) + ("perl-path-class" ,perl-path-class) + ("perl-template-timer" ,perl-template-timer) + ("perl-template-toolkit" ,perl-template-toolkit))) + (home-page "http://search.cpan.org/dist/Catalyst-View-TT") + (synopsis "Template View Class") + (description "This module is a Catalyst view class for the Template +Toolkit.") + (license (package-license perl)))) + (define-public perl-catalystx-component-traits (package (name "perl-catalystx-component-traits") @@ -912,6 +1306,56 @@ those traits using \"new_with_traits\" in MooseX::Traits from MooseX::Traits::Pluggable.") (license (package-license perl)))) +(define-public perl-catalystx-roleapplicator + (package + (name "perl-catalystx-roleapplicator") + (version "0.005") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/H/HD/HDP/" + "CatalystX-RoleApplicator-" version ".tar.gz")) + (sha256 + (base32 + "0vwaapxn8g5hs2xp63c4dwv9jmapmji4272fakssvgc9frklg3p2")))) + (build-system perl-build-system) + (propagated-inputs + `(("perl-catalyst-runtime" ,perl-catalyst-runtime) + ("perl-moose" ,perl-moose) + ("perl-moosex-relatedclassroles" ,perl-moosex-relatedclassroles))) + (home-page "http://search.cpan.org/dist/CatalystX-RoleApplicator") + (synopsis "Apply roles to Catalyst classes") + (description "CatalystX::RoleApplicator applies roles to Catalyst +application classes.") + (license (package-license perl)))) + +(define-public perl-catalystx-script-server-starman + (package + (name "perl-catalystx-script-server-starman") + (version "0.02") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/A/AB/ABRAXXA/" + "CatalystX-Script-Server-Starman-" + version ".tar.gz")) + (sha256 + (base32 + "0h02mpkc4cmi3jpvcd7iw7xyzx55bqvvl1qkf967gqkvpklm0qx5")))) + (build-system perl-build-system) + (native-inputs + `(("perl-test-www-mechanize-catalyst" ,perl-test-www-mechanize-catalyst))) + (propagated-inputs + `(("perl-catalyst-runtime" ,perl-catalyst-runtime) + ("perl-moose" ,perl-moose) + ("perl-namespace-autoclean" ,perl-namespace-autoclean) + ("starman" ,starman))) + (home-page "http://search.cpan.org/dist/CatalystX-Script-Server-Starman") + (synopsis "Catalyst development server with Starman") + (description "This module provides a Catalyst extension to replace the +development server with Starman.") + (license (package-license perl)))) + (define-public perl-cgi-simple (package (name "perl-cgi-simple") @@ -955,6 +1399,49 @@ parameter parsing, file upload, cookie handling and header generation.") inputs, in a manner reminiscent of how PHP does.") (license l:bsd-2))) +(define-public perl-datetime-format-http + (package + (name "perl-datetime-format-http") + (version "0.42") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/C/CK/CKRAS/" + "DateTime-Format-HTTP-" version ".tar.gz")) + (sha256 + (base32 + "0h6qqdg1yzqkdxp7hqlp0qa7d1y64nilgimxs79dys2ryjfpcknh")))) + (build-system perl-build-system) + (propagated-inputs + `(("perl-datetime" ,perl-datetime) + ("perl-http-date" ,perl-http-date))) + (home-page "http://search.cpan.org/dist/DateTime-Format-HTTP") + (synopsis "Date conversion routines") + (description "This module provides functions that deal with the date +formats used by the HTTP protocol.") + (license (package-license perl)))) + +(define-public perl-digest-md5-file + (package + (name "perl-digest-md5-file") + (version "0.08") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/D/DM/DMUEY/" + "Digest-MD5-File-" version ".tar.gz")) + (sha256 + (base32 + "060jzf45dlwysw5wsm7av1wvpl06xgk415kwwpvv89r6wda3md5d")))) + (build-system perl-build-system) + (propagated-inputs + `(("perl-libwww" ,perl-libwww))) + (home-page "http://search.cpan.org/dist/Digest-MD5-File") + (synopsis "MD5 sums for files and urls") + (description "Digest::MD5::File is a Perl extension for getting MD5 sums +for files and urls.") + (license (package-license perl)))) + (define-public perl-encode-locale (package (name "perl-encode-locale") @@ -1288,6 +1775,49 @@ of the negotiable variants and the value of the various Accept* header fields in the request.") (home-page "http://search.cpan.org/~gaas/HTTP-Negotiate/"))) +(define-public perl-http-parser + (package + (name "perl-http-parser") + (version "0.06") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/E/ED/EDECA/" + "HTTP-Parser-" version ".tar.gz")) + (sha256 + (base32 + "0idwq3jk595xil65lmxz128ha7s3r2n5zknisddpgwnqrghs3igq")))) + (build-system perl-build-system) + (propagated-inputs + `(("perl-http-message" ,perl-http-message) + ("perl-uri" ,perl-uri))) + (home-page "http://search.cpan.org/dist/HTTP-Parser") + (synopsis "Parse HTTP/1.1 requests") + (description "This is an HTTP request parser. It takes chunks of text as +received and returns a 'hint' as to what is required, or returns the +HTTP::Request when a complete request has been read. HTTP/1.1 chunking is +supported.") + (license (package-license perl)))) + +(define-public perl-http-parser-xs + (package + (name "perl-http-parser-xs") + (version "0.17") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/K/KA/KAZUHO/" + "HTTP-Parser-XS-" version ".tar.gz")) + (sha256 + (base32 + "02d84xq1mm53c7jl33qyb7v5w4372vydp74z6qj0vc96wcrnhkkr")))) + (build-system perl-build-system) + (home-page "http://search.cpan.org/dist/HTTP-Parser-XS") + (synopsis "Fast HTTP request parser") + (description "HTTP::Parser::XS is a fast, primitive HTTP request/response +parser.") + (license (package-license perl)))) + (define-public perl-http-request-ascgi (package (name "perl-http-request-ascgi") @@ -1425,15 +1955,15 @@ select or poll.") (define-public perl-libwww (package (name "perl-libwww") - (version "6.05") + (version "6.13") (source (origin (method url-fetch) (uri (string-append - "mirror://cpan/authors/id/G/GA/GAAS/libwww-perl-" + "mirror://cpan/authors/id/E/ET/ETHER/libwww-perl-" version ".tar.gz")) (sha256 (base32 - "08wgwyz7748pv5cyngxia0xl6nragfnhrp4p9s78xhgfyygpj9bv")))) + "1cpqjl59viw50bnbdyn8xzrwzg7g54b2rszw0fifacqrppp17gaz")))) (build-system perl-build-system) (propagated-inputs `(("perl-encode-locale" ,perl-encode-locale) @@ -1453,7 +1983,7 @@ World-Wide Web. The main focus of the library is to provide classes and functions that allow you to write WWW clients. The library also contains modules that are of more general use and even classes that help you implement simple HTTP servers.") - (home-page "http://search.cpan.org/~gaas/libwww-perl/"))) + (home-page "http://search.cpan.org/dist/libwww-perl/"))) (define-public perl-lwp-mediatypes (package @@ -1477,39 +2007,113 @@ media types is defined by the media.types file. If the ~/.media.types file exists it is used instead.") (home-page "http://search.cpan.org/~gaas/LWP-MediaTypes/"))) -(define-public perl-mime-types +(define-public perl-lwp-protocol-https + (package + (name "perl-lwp-protocol-https") + (version "6.06") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/M/MS/MSCHILLI/" + "LWP-Protocol-https-" version ".tar.gz")) + (sha256 + (base32 + "1vxdjqj4bwq56m9h1bqqwkk3c6jr76f2zqzvwa26yjng3p686v5q")))) + (build-system perl-build-system) + (propagated-inputs + `(("perl-io-socket-ssl" ,perl-io-socket-ssl) + ("perl-libwww" ,perl-libwww) + ;; Users should instead make sure SSL_ca_path is set properly. + ;; ("perl-mozilla-ca" ,perl-mozilla-ca) + ("perl-net-http" ,perl-net-http))) + (home-page "http://search.cpan.org/dist/LWP-Protocol-https") + (synopsis "HTTPS support for LWP::UserAgent") + (description "The LWP::Protocol::https module provides support for using +https schemed URLs with LWP.") + (license (package-license perl)))) + +(define-public perl-lwp-useragent-determined (package - (name "perl-mime-types") - (version "2.09") + (name "perl-lwp-useragent-determined") + (version "1.07") (source (origin (method url-fetch) - (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/" - "MIME-Types-" version ".tar.gz")) + (uri (string-append "mirror://cpan/authors/id/A/AL/ALEXMV/" + "LWP-UserAgent-Determined-" version ".tar.gz")) (sha256 (base32 - "0s7s2z9xc1nc2l59rk80iaa04r36k0y95231212kz5p3ln7szk1c")))) + "0lyvbpjng7yfvyha9rp2y2c6liz5hhplmd2grc8jlsfkih7dbn06")))) (build-system perl-build-system) - (home-page "http://search.cpan.org/dist/MIME-Types") - (synopsis "Definition of MIME types") - (description "This module provides a list of known mime-types, combined -from various sources. For instance, it contains all IANA types and the -knowledge of Apache.") + (propagated-inputs + `(("perl-libwww" ,perl-libwww))) + (home-page "http://search.cpan.org/dist/LWP-UserAgent-Determined") + (synopsis "Virtual browser that retries errors") + (description "LWP::UserAgent::Determined works just like LWP::UserAgent, +except that when you use it to get a web page but run into a +possibly-temporary error (like a DNS lookup timeout), it'll wait a few seconds +and retry a few times.") + (license (package-license perl)))) + +(define-public perl-net-amazon-s3 + (package + (name "perl-net-amazon-s3") + (version "0.60") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/P/PF/PFIG/" + "Net-Amazon-S3-" version ".tar.gz")) + (sha256 + (base32 + "10dcsq4s2kc9cb1vccx17r187c81drirc3s1hbxh3rb8489kg2b2")) + (patches (list + (search-patch "perl-net-amazon-s3-moose-warning.patch"))))) + (build-system perl-build-system) + (native-inputs + `(("perl-libwww" ,perl-libwww) + ("perl-test-exception" ,perl-test-exception))) + (propagated-inputs + `(("perl-data-stream-bulk" ,perl-data-stream-bulk) + ("perl-datetime-format-http" ,perl-datetime-format-http) + ("perl-digest-hmac" ,perl-digest-hmac) + ("perl-digest-md5-file" ,perl-digest-md5-file) + ("perl-file-find-rule" ,perl-file-find-rule) + ("perl-http-date" ,perl-http-date) + ("perl-http-message" ,perl-http-message) + ("perl-lwp-useragent-determined" ,perl-lwp-useragent-determined) + ("perl-mime-types" ,perl-mime-types) + ("perl-moose" ,perl-moose) + ("perl-moosex-strictconstructor" ,perl-moosex-strictconstructor) + ("perl-moosex-types-datetime-morecoercions" + ,perl-moosex-types-datetime-morecoercions) + ("perl-path-class" ,perl-path-class) + ("perl-regexp-common" ,perl-regexp-common) + ("perl-term-encoding" ,perl-term-encoding) + ("perl-term-progressbar-simple" ,perl-term-progressbar-simple) + ("perl-uri" ,perl-uri) + ("perl-xml-libxml" ,perl-xml-libxml))) + (home-page "http://search.cpan.org/dist/Net-Amazon-S3") + (synopsis "Perl interface to Amazon S3") + (description "This module provides a Perlish interface to Amazon S3.") (license (package-license perl)))) (define-public perl-net-http (package (name "perl-net-http") - (version "6.06") + (version "6.07") (source (origin (method url-fetch) (uri (string-append - "mirror://cpan/authors/id/G/GA/GAAS/Net-HTTP-" + "mirror://cpan/authors/id/M/MS/MSCHILLI/Net-HTTP-" version ".tar.gz")) (sha256 (base32 - "1m1rvniffadq99gsy25298ia3lixwymr6kan64jd3ylyi7nkqkhx")))) + "0r034hhci0yqbrkrh1gv6vi5g3i0kpd1k84z62nk02asb8rf0ccz")))) (build-system perl-build-system) + (propagated-inputs + `(("perl-io-socket-ssl" ,perl-io-socket-ssl) + ("perl-uri" ,perl-uri))) (license (package-license perl)) (synopsis "Perl low-level HTTP connection (client)") (description @@ -1517,7 +2121,34 @@ knowledge of Apache.") Net::HTTP class represents a connection to an HTTP server. The HTTP protocol is described in RFC 2616. The Net::HTTP class supports HTTP/1.0 and HTTP/1.1.") - (home-page "http://search.cpan.org/~gaas/Net-HTTP/"))) + (home-page "http://search.cpan.org/dist/Net-HTTP"))) + +(define-public perl-net-server + (package + (name "perl-net-server") + (version "2.008") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/R/RH/RHANDOM/" + "Net-Server-" version ".tar.gz")) + (sha256 + (base32 + "182gfikn7r40kmm3d35m2qc6r8g0y1j8gxbn9ffaawf8xmm0a889")))) + (build-system perl-build-system) + (home-page "http://search.cpan.org/dist/Net-Server") + (synopsis "Extensible Perl server engine") + (description "Net::Server is an extensible, generic Perl server engine. +It attempts to be a generic server as in Net::Daemon and NetServer::Generic. +It includes with it the ability to run as an inetd +process (Net::Server::INET), a single connection server (Net::Server or +Net::Server::Single), a forking server (Net::Server::Fork), a preforking +server which maintains a constant number of preforked +children (Net::Server::PreForkSimple), or as a managed preforking server which +maintains the number of children based on server load (Net::Server::PreFork). +In all but the inetd type, the server provides the ability to connect to one +or to multiple server ports.") + (license (package-license perl)))) (define-public perl-plack (package @@ -1725,6 +2356,41 @@ either mocked HTTP or a locally spawned server.") WWW::Mechanize that incorporates features for web application testing.") (license l:artistic2.0))) +(define-public perl-test-www-mechanize-catalyst + (package + (name "perl-test-www-mechanize-catalyst") + (version "0.60") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/J/JJ/JJNAPIORK/" + "Test-WWW-Mechanize-Catalyst-" version ".tar.gz")) + (sha256 + (base32 + "0nhhfrrai3ndziz873vpa1j0vljjnib4wqafd6yyvkf58ad7v0lv")))) + (build-system perl-build-system) + (native-inputs + `(("perl-catalyst-plugin-session" ,perl-catalyst-plugin-session) + ("perl-catalyst-plugin-session-state-cookie" + ,perl-catalyst-plugin-session-state-cookie) + ("perl-test-exception" ,perl-test-exception) + ("perl-test-pod" ,perl-test-pod) + ("perl-test-utf8" ,perl-test-utf8))) + (propagated-inputs + `(("perl-catalyst-runtime" ,perl-catalyst-runtime) + ("perl-class-load" ,perl-class-load) + ("perl-libwww" ,perl-libwww) + ("perl-moose" ,perl-moose) + ("perl-namespace-clean" ,perl-namespace-clean) + ("perl-test-www-mechanize" ,perl-test-www-mechanize) + ("perl-www-mechanize" ,perl-www-mechanize))) + (home-page "http://search.cpan.org/dist/Test-WWW-Mechanize-Catalyst") + (synopsis "Test::WWW::Mechanize for Catalyst") + (description "The Test::WWW::Mechanize::Catalyst module meshes the +Test::WWW:Mechanize module and the Catalyst web application framework to allow +testing of Catalyst applications without needing to start up a web server.") + (license (package-license perl)))) + (define-public perl-test-www-mechanize-psgi (package (name "perl-test-www-mechanize-psgi") diff --git a/gnu/packages/webkit.scm b/gnu/packages/webkit.scm new file mode 100644 index 0000000000..b091c88601 --- /dev/null +++ b/gnu/packages/webkit.scm @@ -0,0 +1,142 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com> +;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com> +;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (gnu packages webkit) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system cmake) + #:use-module (guix build-system gnu) + #:use-module (gnu packages) + #:use-module (gnu packages base) + #:use-module (gnu packages bison) + #:use-module (gnu packages databases) + #:use-module (gnu packages enchant) + #:use-module (gnu packages flex) + #:use-module (gnu packages gettext) + #:use-module (gnu packages gl) + #:use-module (gnu packages glib) + #:use-module (gnu packages gnome) + #:use-module (gnu packages gnutls) + #:use-module (gnu packages gperf) + #:use-module (gnu packages gstreamer) + #:use-module (gnu packages gtk) + #:use-module (gnu packages icu4c) + #:use-module (gnu packages image) + #:use-module (gnu packages perl) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages python) + #:use-module (gnu packages ruby) + #:use-module (gnu packages video) + #:use-module (gnu packages xml) + #:use-module (gnu packages xorg)) + +(define-public webkitgtk + (package + (name "webkitgtk") + (version "2.8.1") + (source (origin + (method url-fetch) + (uri (string-append "http://www.webkitgtk.org/releases/" + name "-" version ".tar.xz")) + (sha256 + (base32 + "1zv030ryfwwp57yzlpr9bgpxcmc64izsxk2vsyd4kjhns9cl88bx")))) + (build-system cmake-build-system) + (arguments + '(#:tests? #f ; no tests + #:build-type "Release" ; turn off debugging symbols to save space + #:configure-flags (list + "-DPORT=GTK" + (string-append ; uses lib64 by default + "-DLIB_INSTALL_DIR=" + (assoc-ref %outputs "out") "/lib")))) + (native-inputs + `(("bison" ,bison) + ("gettext" ,gnu-gettext) + ("glib:bin" ,glib "bin") ; for glib-mkenums, etc. + ("gobject-introspection" ,gobject-introspection) + ("gperf" ,gperf) + ("perl" ,perl) + ("pkg-config" ,pkg-config) + ("python" ,python-2) ; incompatible with Python 3 (print syntax) + ("ruby" ,ruby))) + (propagated-inputs + `(("gtk+" ,gtk+) + ("libsoup" ,libsoup))) + (inputs + `(("at-spi2-core" ,at-spi2-core) + ("enchant" ,enchant) + ("geoclue" ,geoclue) + ("gnutls" ,gnutls) + ("gst-plugins-base" ,gst-plugins-base) + ("gtk+-2" ,gtk+-2) + ("harfbuzz" ,harfbuzz) + ("icu4c" ,icu4c) + ("libjpeg" ,libjpeg) + ("libnotify" ,libnotify) + ("libpng" ,libpng) + ("libsecret" ,libsecret) + ("libwebp" ,libwebp) + ("libxcomposite" ,libxcomposite) + ("libxml2" ,libxml2) + ("libxslt" ,libxslt) + ("libxt" ,libxt) + ("mesa" ,mesa) + ("sqlite" ,sqlite))) + (home-page "http://www.webkitgtk.org/") + (synopsis "Web content engine for GTK+") + (description + "WebKitGTK+ is a full-featured port of the WebKit rendering engine, +suitable for projects requiring any kind of web integration, from hybrid +HTML/CSS applications to full-fledged web browsers.") + ;; WebKit's JavaScriptCore and WebCore components are available under + ;; the GNU LGPL, while the rest is available under a BSD-style license. + (license (list license:lgpl2.0 + license:lgpl2.1+ + license:bsd-2 + license:bsd-3)))) + +(define-public webkitgtk-2.4 + ;; Latest release of the stable 2.4 series. + (package (inherit webkitgtk) + (name "webkitgtk") + (version "2.4.8") + (source (origin + (method url-fetch) + (uri (string-append "http://www.webkitgtk.org/releases/" + name "-" version ".tar.xz")) + (sha256 + (base32 + "08xxqsxpa63nzgbsz63vrdxdxgpysyiy7jdcjb57k1hprdcibwb8")) + (patches (list (search-patch "webkitgtk-2.4.8-gmutexlocker.patch"))))) + (build-system gnu-build-system) + (arguments + '(#:tests? #f ; no tests + #:phases (modify-phases %standard-phases + (add-after + 'unpack 'set-gcc + (lambda _ (setenv "CC" "gcc") #t))) + #:configure-flags '("--enable-webkit2=no" + "--with-gtk=2.0"))) + (inputs + `(("flex" ,flex) + ("which" ,which) + ,@(package-inputs webkitgtk))))) diff --git a/gnu/packages/wicd.scm b/gnu/packages/wicd.scm index 1953a56b6c..779ec84e3c 100644 --- a/gnu/packages/wicd.scm +++ b/gnu/packages/wicd.scm @@ -44,7 +44,9 @@ "/+download/wicd-" version ".tar.gz")) (sha256 (base32 "00c4rq753bhg64rv1v9yl834ssq7igyy7cz3swp287b5n5bqiqwi")) - (patches (list (search-patch "wicd-urwid-1.3.patch"))))) + (patches (map search-patch + '("wicd-urwid-1.3.patch" + "wicd-template-instantiation.patch"))))) (build-system python-build-system) (native-inputs `(("gettext" ,gnu-gettext))) (inputs `(("dbus" ,dbus) diff --git a/gnu/packages/wine.scm b/gnu/packages/wine.scm index bdf153054e..5b0758c6b2 100644 --- a/gnu/packages/wine.scm +++ b/gnu/packages/wine.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014 Sou Bunnbu <iyzsong@gmail.com> +;;; Copyright © 2014, 2015 Sou Bunnbu <iyzsong@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -48,14 +48,14 @@ (define-public wine (package (name "wine") - (version "1.7.31") + (version "1.7.40") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/wine/" name "-" version ".tar.bz2")) (sha256 (base32 - "14747ihmyanxvv8mnrafbj3l6807h7zf1gcwidgm1f7s7g5n4viw")) + "1dnasmw1rnlz7wk1bn0x1zmy3r78hgrn9y53z4vm8xjkllwyd0hd")) (modules '((guix build utils))) (snippet '(substitute* "Make.vars.in" @@ -108,6 +108,9 @@ ;; pass. #:tests? #f + #:configure-flags + (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")) + #:phases (alist-cons-after 'configure 'patch-dlopen-paths diff --git a/gnu/packages/wxwidgets.scm b/gnu/packages/wxwidgets.scm index 1f80130198..b49fb2fe84 100644 --- a/gnu/packages/wxwidgets.scm +++ b/gnu/packages/wxwidgets.scm @@ -62,6 +62,9 @@ (arguments '(#:configure-flags '("--with-regex=sys" "--with-libmspack" "--with-sdl") + #:make-flags + (list (string-append "LDFLAGS=-Wl,-rpath=" + (assoc-ref %outputs "out") "/lib")) ;; No 'check' target. #:tests? #f)) (home-page "https://www.wxwidgets.org/") @@ -93,5 +96,8 @@ and many other languages.") (arguments `(#:configure-flags '("--enable-unicode" "--with-regex=sys" "--with-sdl") + #:make-flags + (list (string-append "LDFLAGS=-Wl,-rpath=" + (assoc-ref %outputs "out") "/lib")) ;; No 'check' target. #:tests? #f)))) diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm index 99e2fce926..f928aa1f58 100644 --- a/gnu/packages/xdisorg.scm +++ b/gnu/packages/xdisorg.scm @@ -1,11 +1,12 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr> -;;; Copyright © 2014 Mark H Weaver <mhw@netris.org> +;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org> ;;; Copyright © 2014, 2015 Alex Kost <alezost@gmail.com> ;;; Copyright © 2013, 2015 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2015 Mathieu Lirzin <mthl@openmailbox.org> ;;; Copyright © 2015 Alexander I.Grafov <grafov@gmail.com> +;;; Copyright © 2015 Andy Wingo <wingo@igalia.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -26,7 +27,9 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix utils) #:use-module (guix build-system gnu) + #:use-module (guix build-system glib-or-gtk) #:use-module (gnu packages) #:use-module (gnu packages compression) #:use-module (gnu packages image) @@ -35,6 +38,8 @@ #:use-module (gnu packages perl) #:use-module (gnu packages linux) #:use-module (gnu packages guile) + #:use-module (gnu packages xml) + #:use-module (gnu packages gtk) #:use-module (gnu packages xorg)) ;; packages outside the x.org system proper @@ -442,6 +447,13 @@ transparent text on your screen.") (inputs `(("libx11" ,libx11) ("guile" ,guile-2.0))) + (arguments `(#:configure-flags + '(;; FIXME: xbindkeys-1.8.6's config.guess fails on mips64el. + ,@(if (%current-target-system) + '() + (let ((triplet + (nix-system->gnu-triplet (%current-system)))) + (list (string-append "--build=" triplet))))))) (home-page "http://www.nongnu.org/xbindkeys/") (synopsis "Associate a combination of keys with a shell command") (description @@ -519,3 +531,68 @@ within a single process.") pressed and released on its own. The default behaviour is to generate the Escape key when Left Control is pressed and released on its own.") (license license:gpl3+))) + +(define-public libwacom + (package + (name "libwacom") + (version "0.12") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/linuxwacom/libwacom/" + name "-" version ".tar.bz2")) + (sha256 + (base32 + "022d0097dk2glgb6772zpcsqm1w42sbsbr3i72pdhzq6naqawys8")))) + (build-system glib-or-gtk-build-system) + (native-inputs + `(("pkg-config" ,pkg-config))) + (inputs + `(("glib" ,glib) + ("gtk+" ,gtk+) + ("eudev" ,eudev) + ("libxml2" ,libxml2))) + (home-page "http://linuxwacom.sourceforge.net/") + (synopsis "Helper library for Wacom tablet settings") + (description + "Libwacom is a library to help implement Wacom tablet settings. It +is intended to be used by client-programs that need model identification. It +is already being used by the gnome-settings-daemon and the GNOME 3.4 Control +Center Wacom tablet applet. In the future, the xf86-input-wacom driver may +use it as well.") + (license license:x11))) + +(define-public xf86-input-wacom + (package + (name "xf86-input-wacom") + (version "0.29.0") + (source (origin + (method url-fetch) + (uri (string-append + "mirror://sourceforge/linuxwacom/xf86-input-wacom/" + name "-" version ".tar.bz2")) + (sha256 + (base32 + "15lbzjkaf690i69qy0n0ibwczbclqq1nx0418c6a567by5v7wl48")))) + (arguments + `(#:configure-flags + (list (string-append "--with-sdkdir=" + (assoc-ref %outputs "out") + "/include/xorg") + (string-append "--with-xorg-conf-dir=" + (assoc-ref %outputs "out") + "/share/X11/xorg.conf.d")))) + (build-system gnu-build-system) + (native-inputs + `(("pkg-config" ,pkg-config))) + (inputs + `(("xorg-server" ,xorg-server) + ("libxrandr" ,libxrandr) + ("libxinerama" ,libxinerama) + ("libxi" ,libxi) + ("eudev" ,eudev))) + (home-page "http://linuxwacom.sourceforge.net/") + (synopsis "Wacom input driver for X") + (description + "The xf86-input-wacom driver is the wacom-specific X11 input driver for +the X.Org X Server version 1.7 and later (X11R7.5 or later).") + (license license:x11))) diff --git a/gnu/packages/xfce.scm b/gnu/packages/xfce.scm index a08f004119..818941892f 100644 --- a/gnu/packages/xfce.scm +++ b/gnu/packages/xfce.scm @@ -318,6 +318,37 @@ applications menu, workspace switcher and more.") ;; to read the battery state via ACPI or APM are covered by lgpl2.0+. (license (list gpl2+ lgpl2.0+)))) +(define-public xfce4-clipman-plugin + (package + (name "xfce4-clipman-plugin") + (version "1.2.6") + (source (origin + (method url-fetch) + (uri (string-append "http://archive.xfce.org/src/panel-plugins/" + name "/" (version-major+minor version) "/" + name "-" version ".tar.bz2")) + (sha256 + (base32 + "19a8gwcqc0r5qqi8w28dc8arqip34m8yxdb87lgps9g5qfcky113")))) + (build-system gnu-build-system) + (native-inputs + `(("intltool" ,intltool) + ("pkg-config" ,pkg-config))) + (inputs + `(("exo" ,exo) + ("libxfce4ui" ,libxfce4ui) + ("libxtst" ,libxtst) + ("xfce4-panel" ,xfce4-panel))) + (home-page + "http://goodies.xfce.org/projects/panel-plugins/xfce4-clipman-plugin") + (synopsis "Clipboard manager for Xfce") + (description + "Clipman is a clipboard manager for Xfce. It keeps the clipboard contents +around while it is usually lost when you close an application. It is able to +handle text and images, and has a feature to execute actions on specific text by +matching them against regular expressions.") + (license (list gpl2+)))) + (define-public xfce4-appfinder (package (name "xfce4-appfinder") @@ -397,8 +428,11 @@ allows you to shutdown the computer from Xfce.") ("libnotify" ,libnotify) ("libxcursor", libxcursor) ("libxi" ,libxi) + ("libxklavier" ,libxklavier) ("libxrandr" ,libxrandr) - ("libxfce4ui" ,libxfce4ui))) + ("libxfce4ui" ,libxfce4ui) + ("upower" ,upower) + ("xf86-input-libinput" ,xf86-input-libinput))) (home-page "http://www.xfce.org/") (synopsis "Xfce settings manager") (description @@ -569,9 +603,6 @@ on your desktop.") (guix build glib-or-gtk-build-system) (guix build utils) (srfi srfi-26)) - #:imported-modules ((guix build gnu-build-system) - (guix build glib-or-gtk-build-system) - (guix build utils)) #:phases (alist-replace 'install @@ -601,6 +632,7 @@ on your desktop.") ("tumlber" ,tumbler) ("xfce4-appfinder" ,xfce4-appfinder) ("xfce4-battery-plugin" ,xfce4-battery-plugin) + ("xfce4-clipman-plugin" ,xfce4-clipman-plugin) ("xfce4-panel" ,xfce4-panel) ("xfce4-session" ,xfce4-session) ("xfce4-settings" ,xfce4-settings) diff --git a/gnu/packages/xiph.scm b/gnu/packages/xiph.scm index f182270aea..dff76cacf5 100644 --- a/gnu/packages/xiph.scm +++ b/gnu/packages/xiph.scm @@ -27,10 +27,12 @@ #:use-module (gnu packages curl) #:use-module (gnu packages doxygen) #:use-module (gnu packages image) + #:use-module (gnu packages openssl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) #:use-module (gnu packages linux) #:use-module (gnu packages pulseaudio) + #:use-module (gnu packages xml) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) @@ -338,3 +340,63 @@ Opus-tools provide command line utilities for creating, inspecting and decoding .opus files") (license license:bsd-3) (home-page "http://www.opus-codec.org"))) + +(define-public icecast + (package + (name "icecast") + (version "2.4.1") + (source (origin + (method url-fetch) + (uri (string-append + "http://downloads.xiph.org/releases/icecast/icecast-" + version ".tar.gz")) + (sha256 + (base32 + "0js5lylrgklhvvaksx46zc8lc975qb1bns8h1ms545nv071rxy23")))) + (build-system gnu-build-system) + (native-inputs + `(("pkg-config" ,pkg-config))) + (inputs + `(("libxslt" ,libxslt) + ("libxml2" ,libxml2) + ("openssl" ,openssl) + ("curl" ,curl) + ("libogg" ,libogg) + ("libvorbis" ,libvorbis) + ("libtheora" ,libtheora) + ("speex" ,speex))) + (synopsis "Streaming media server") + (description "Icecast is a streaming media server which currently supports +Ogg (Vorbis and Theora), Opus, WebM and MP3 audio streams. It can be used to +create an Internet radio station or a privately running jukebox and many +things in between.") + (home-page "http://icecast.org/") + (license license:gpl2))) + +(define-public libshout + (package + (name "libshout") + (version "2.3.1") + (source (origin + (method url-fetch) + (uri (string-append + "http://downloads.xiph.org/releases/libshout/" + name "-" version ".tar.gz")) + (sha256 + (base32 + "0vlj4dxfxg06xhvv0z2zjjlrjh5di2m28w7v16zcygsy99mmyg6g")))) + (build-system gnu-build-system) + (native-inputs + `(("pkg-config" ,pkg-config))) + (propagated-inputs + ;; shout.pc refers to all these. + `(("libtheora" ,libtheora) + ("libvorbis" ,libvorbis) + ("speex" ,speex))) + (home-page "http://www.icecast.org/") + (synopsis "Audio streaming library for icecast encoders") + (description + "Libshout is a library for communicating with and sending data to an +icecast server. It handles the socket connection, the timing of the data, +and prevents bad data from getting to the icecast server.") + (license license:gpl2+))) diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm index 173435d2a5..d30c40ce1a 100644 --- a/gnu/packages/xml.scm +++ b/gnu/packages/xml.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr> +;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -178,6 +179,109 @@ given at XML::Parser creation time.") module.") (home-page "http://search.cpan.org/~kmacleod/libxml-perl/lib/XML/Parser/PerlSAX.pm"))) +(define-public perl-xml-libxml + (package + (name "perl-xml-libxml") + (version "2.0118") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/" + "XML-LibXML-" version ".tar.gz")) + (sha256 + (base32 + "170c8dbk4p6jw9is0cria73021yp3hpmhb19p9j0zg2yxwkawr6c")))) + (build-system perl-build-system) + (propagated-inputs + `(("perl-xml-namespacesupport" ,perl-xml-namespacesupport) + ("perl-xml-sax" ,perl-xml-sax))) + (inputs + `(("libxml2" ,libxml2))) + (home-page "http://search.cpan.org/dist/XML-LibXML") + (synopsis "Perl interface to libxml2") + (description "This module implements a Perl interface to the libxml2 +library which provides interfaces for parsing and manipulating XML files. This +module allows Perl programmers to make use of the highly capable validating +XML parser and the high performance DOM implementation.") + (license (package-license perl)))) + +(define-public perl-xml-namespacesupport + (package + (name "perl-xml-namespacesupport") + (version "1.11") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/P/PE/PERIGRIN/" + "XML-NamespaceSupport-" version ".tar.gz")) + (sha256 + (base32 + "1sklgcldl3w6gn706vx1cgz6pm4y5lfgsjxnfqyk20pilgq530bd")))) + (build-system perl-build-system) + (home-page "http://search.cpan.org/dist/XML-NamespaceSupport") + (synopsis "XML namespace support class") + (description "This module offers a simple to process namespaced XML +names (unames) from within any application that may need them. It also helps +maintain a prefix to namespace URI map, and provides a number of basic +checks.") + (license (package-license perl)))) + +(define-public perl-xml-sax + (package + (name "perl-xml-sax") + (version "0.99") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/G/GR/GRANTM/" + "XML-SAX-" version ".tar.gz")) + (sha256 + (base32 + "115dypb50w1l94y3iwihv5nkixbsv1cxiqkd93y4rk5n6s74pc1j")))) + (build-system perl-build-system) + (propagated-inputs + `(("perl-xml-namespacesupport" ,perl-xml-namespacesupport) + ("perl-xml-sax-base" ,perl-xml-sax-base))) + (arguments + `(#:phases (modify-phases %standard-phases + (add-before + 'install 'augment-path + ;; The install target tries to load the newly-installed + ;; XML::SAX module, but can't find it, so we need to tell + ;; perl where to look. + (lambda* (#:key outputs #:allow-other-keys) + (setenv "PERL5LIB" + (string-append (getenv "PERL5LIB") ":" + (assoc-ref outputs "out") + "/lib/perl5/site_perl"))))))) + (home-page "http://search.cpan.org/dist/XML-SAX") + (synopsis "Perl API for XML") + (description "XML::SAX consists of several framework classes for using and +building Perl SAX2 XML parsers, filters, and drivers.") + (license (package-license perl)))) + +(define-public perl-xml-sax-base + (package + (name "perl-xml-sax-base") + (version "1.08") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://cpan/authors/id/G/GR/GRANTM/" + "XML-SAX-Base-" version ".tar.gz")) + (sha256 + (base32 + "17i161rq1ngjlk0c8vdkrkkc56y1pf51k1g54y28py0micqp0qk6")))) + (build-system perl-build-system) + (home-page "http://search.cpan.org/dist/XML-SAX-Base") + (synopsis "Base class for SAX Drivers and Filters") + (description "This module has a very simple task - to be a base class for +PerlSAX drivers and filters. It's default behaviour is to pass the input +directly to the output unchanged. It can be useful to use this module as a +base class so you don't have to, for example, implement the characters() +callback.") + (license (package-license perl)))) + (define-public perl-xml-simple (package (name "perl-xml-simple") diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm index 776c858c16..dc04bee20a 100644 --- a/gnu/packages/xorg.scm +++ b/gnu/packages/xorg.scm @@ -45,7 +45,8 @@ #:use-module (gnu packages python) #:use-module (gnu packages xml) #:use-module (gnu packages ncurses) - #:use-module (gnu packages xdisorg)) + #:use-module (gnu packages xdisorg) + #:use-module (gnu packages freedesktop)) @@ -2220,6 +2221,35 @@ devices, thus making direct access unnecessary.") (description "X.org provides an implementation of the X Window System") (license license:x11))) +(define-public xf86-input-libinput + (package + (name "xf86-input-libinput") + (version "0.8.0") + (source (origin + (method url-fetch) + (uri (string-append + "mirror://xorg/individual/driver/" + name "-" version ".tar.bz2")) + (sha256 + (base32 + "0fm4vrkw7azipbnwvc2l18g65z77pllsznaajd8q3zpg9ycb0li1")))) + (build-system gnu-build-system) + (arguments + '(#:configure-flags + (list (string-append "--with-sdkdir=" + %output "/include/xorg")))) + (native-inputs + `(("pkg-config" ,pkg-config))) + (inputs + `(("libinput" ,libinput) + ("xorg-server" ,xorg-server))) + (home-page "http://www.x.org/wiki/") + (synopsis "Xorg input driver") + (description + "This is an Xorg input driver based on libinput. It therefore supports +all input devices that libinput can handle, including most mice, keyboards, +tablets and touchscreens.") + (license license:x11))) (define-public xf86-input-joystick (package @@ -2932,7 +2962,8 @@ graphics cards.") (sha256 (base32 "1l0w84x39gq4y9j81dny9r6rma1xkqvxpsavpkd8h7h8panbcbmy")) - (patches (list (search-patch "xf86-video-sis-update-api.patch"))))) + (patches (list (search-patch "xf86-video-sis-update-api.patch") + (search-patch "xf86-video-sis-fix-exa-crash.patch"))))) (build-system gnu-build-system) (inputs `(("mesa" ,mesa) ("xf86dgaproto" ,xf86dgaproto) @@ -4270,7 +4301,7 @@ graphics cards.") (define-public libxfont (package (name "libxfont") - (version "1.5.0") + (version "1.5.1") (source (origin (method url-fetch) @@ -4280,7 +4311,7 @@ graphics cards.") ".tar.bz2")) (sha256 (base32 - "0py2c498lrq6wrj9al6nj57v2ypid9cz0zzhc0hjndgrmp254g1s")))) + "1630v3sfvwwlimb2ja10c84ql6v1mw9bdfhvan7pbybkgi99h25p")))) (build-system gnu-build-system) (propagated-inputs `(("fontsproto" ,fontsproto) @@ -4884,14 +4915,14 @@ user-friendly mechanism to start the X server.") (define-public xterm (package (name "xterm") - (version "315") + (version "317") (source (origin (method url-fetch) (uri (string-append "ftp://ftp.invisible-island.net/xterm/" "xterm-" version ".tgz")) (sha256 (base32 - "00kxg36hzp011x98ib6x503pbhj1ldh6hb82l5x3a68s554h1rpy")))) + "0v9mirqws1vb8wxbdgn1w166ln7xmapg1913c7kzjs3mwkdv1rfj")))) (build-system gnu-build-system) (arguments '(#:configure-flags '("--enable-wide-chars" "--enable-256-color" diff --git a/gnu/services/avahi.scm b/gnu/services/avahi.scm index 89478cb997..a3ca5ab6fb 100644 --- a/gnu/services/avahi.scm +++ b/gnu/services/avahi.scm @@ -20,6 +20,7 @@ #:use-module (gnu services) #:use-module (gnu system shadow) #:use-module (gnu packages avahi) + #:use-module (gnu packages admin) #:use-module (guix monads) #:use-module (guix store) #:use-module (guix gexp) @@ -62,7 +63,7 @@ (domains-to-browse '())) "Return a service that runs @command{avahi-daemon}, a system-wide mDNS/DNS-SD responder that allows for service discovery and -\"zero-configuration\" host name lookups. +\"zero-configuration\" host name lookups (see @uref{http://avahi.org/}). If @var{host-name} is different from @code{#f}, use that as the host name to publish for this machine; otherwise, use the machine's actual host name. @@ -106,6 +107,6 @@ sockets." (comment "Avahi daemon user") (home-directory "/var/empty") (shell - "/run/current-system/profile/sbin/nologin")))))))) + #~(string-append #$shadow "/sbin/nologin"))))))))) ;;; avahi.scm ends here diff --git a/gnu/services/base.scm b/gnu/services/base.scm index a9126032bb..d5744204d9 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2015 Alex Kost <alezost@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -46,6 +47,7 @@ swap-service user-processes-service host-name-service + console-keymap-service console-font-service udev-service mingetty-service @@ -131,7 +133,9 @@ names such as device-mapping services." (requirement `(root-file-system ,@requirements)) (documentation "Check, mount, and unmount the given file system.") (start #~(lambda args - (let ((device (canonicalize-device-spec #$device '#$title))) + ;; FIXME: Use or factorize with 'mount-file-system'. + (let ((device (canonicalize-device-spec #$device '#$title)) + (flags #$(mount-flags->bit-mask flags))) #$(if create-mount-point? #~(mkdir-p #$target) #~#t) @@ -145,9 +149,16 @@ names such as device-mapping services." (getenv "PATH"))) (check-file-system device #$type)) #~#t) - (mount device #$target #$type - #$(mount-flags->bit-mask flags) - #$options)) + + (mount device #$target #$type flags #$options) + + ;; For read-only bind mounts, an extra remount is needed, + ;; as per <http://lwn.net/Articles/281157/>, which still + ;; applies to Linux 4.0. + (when (and (= MS_BIND (logand flags MS_BIND)) + (= MS_RDONLY (logand flags MS_RDONLY))) + (mount device #$target #$type + (logior MS_BIND MS_REMOUNT MS_RDONLY)))) #t)) (stop #~(lambda args ;; Normally there are no processes left at this point, so @@ -304,6 +315,19 @@ stopped before 'kill' is called." (else (zero? (cdr (waitpid pid)))))))) +(define (console-keymap-service file) + "Return a service to load console keymap from @var{file}." + (with-monad %store-monad + (return + (service + (documentation + (string-append "Load console keymap (loadkeys).")) + (provision '(console-keymap)) + (start #~(lambda _ + (zero? (system* (string-append #$kbd "/bin/loadkeys") + #$file)))) + (respawn? #f))))) + (define* (console-font-service tty #:optional (font "LatGrkCyr-8x16")) "Return a service that sets up Unicode support in @var{tty} and loads @var{font} for that tty (fonts are per virtual console in Linux.)" @@ -499,7 +523,7 @@ the ``message of the day''." "Return a service that runs libc's name service cache daemon (nscd) with the given @var{config}---an @code{<nscd-configuration>} object. Optionally, @code{#:name-services} is a list of packages that provide name service switch - (NSS) modules needed by nscd." + (NSS) modules needed by nscd. @xref{Name Service Switch}, for an example." (mlet %store-monad ((nscd.conf (nscd.conf-file config))) (return (service (documentation "Run libc's name service cache daemon (nscd).") @@ -526,8 +550,10 @@ given @var{config}---an @code{<nscd-configuration>} object. Optionally, (respawn? #f))))) -(define (syslog-service) - "Return a service that runs @code{syslogd} with reasonable default settings." +(define* (syslog-service #:key config-file) + "Return a service that runs @code{syslogd}. +If configuration file name @var{config-file} is not specified, use some +reasonable default settings." ;; Snippet adapted from the GNU inetutils manual. (define contents " @@ -561,7 +587,7 @@ given @var{config}---an @code{<nscd-configuration>} object. Optionally, (start #~(make-forkexec-constructor (list (string-append #$inetutils "/libexec/syslogd") - "--no-detach" "--rcfile" #$syslog.conf))) + "--no-detach" "--rcfile" #$(or config-file syslog.conf)))) (stop #~(make-kill-destructor)))))) (define* (guix-build-accounts count #:key @@ -640,6 +666,7 @@ passed to @command{guix-daemon}." (with-monad %store-monad (return (service + (documentation "Run the Guix daemon.") (provision '(guix-daemon)) (requirement '(user-processes)) (start @@ -824,10 +851,10 @@ gexp, to open it, and evaluate @var{close} to close it." (requirement `(udev ,@requirement)) (documentation "Enable the given swap device.") (start #~(lambda () - (swapon #$device) + (restart-on-EINTR (swapon #$device)) #t)) (stop #~(lambda _ - (swapoff #$device) + (restart-on-EINTR (swapoff #$device)) #f)) (respawn? #f))))) diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm new file mode 100644 index 0000000000..18f41e74da --- /dev/null +++ b/gnu/services/databases.scm @@ -0,0 +1,121 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2015 David Thompson <davet@gnu.org> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (gnu services databases) + #:use-module (gnu services) + #:use-module (gnu system shadow) + #:use-module (gnu packages admin) + #:use-module (gnu packages databases) + #:use-module (guix records) + #:use-module (guix monads) + #:use-module (guix store) + #:use-module (guix gexp) + #:export (postgresql-service)) + +;;; Commentary: +;;; +;;; Database services. +;;; +;;; Code: + +(define %default-postgres-hba + (text-file "pg_hba.conf" + " +local all all trust +host all all 127.0.0.1/32 trust +host all all ::1/128 trust")) + +(define %default-postgres-ident + (text-file "pg_ident.conf" + "# MAPNAME SYSTEM-USERNAME PG-USERNAME")) + +(define %default-postgres-config + (mlet %store-monad ((hba %default-postgres-hba) + (ident %default-postgres-ident)) + (text-file* "postgresql.conf" + ;; The daemon will not start without these. + "hba_file = '" hba "'\n" + "ident_file = '" ident "'\n"))) + +(define* (postgresql-service #:key (postgresql postgresql) + (config-file %default-postgres-config) + (data-directory "/var/lib/postgresql/data")) + "Return a service that runs @var{postgresql}, the PostgreSQL database server. + +The PostgreSQL daemon loads its runtime configuration from @var{config-file} +and stores the database cluster in @var{data-directory}." + ;; Wrapper script that switches to the 'postgres' user before launching + ;; daemon. + (define start-script + (mlet %store-monad ((config-file config-file)) + (gexp->script "start-postgres" + #~(let ((user (getpwnam "postgres")) + (postgres (string-append #$postgresql + "/bin/postgres"))) + (setgid (passwd:gid user)) + (setuid (passwd:uid user)) + (system* postgres + (string-append "--config-file=" #$config-file) + "-D" #$data-directory))))) + + (define activate + #~(begin + (use-modules (guix build utils) + (ice-9 match)) + + (let ((user (getpwnam "postgres")) + (initdb (string-append #$postgresql "/bin/initdb"))) + ;; Create db state directory. + (mkdir-p #$data-directory) + (chown #$data-directory (passwd:uid user) (passwd:gid user)) + + ;; Drop privileges and init state directory in a new + ;; process. Wait for it to finish before proceeding. + (match (primitive-fork) + (0 + ;; Exit with a non-zero status code if an exception is thrown. + (dynamic-wind + (const #t) + (lambda () + (setgid (passwd:gid user)) + (setuid (passwd:uid user)) + (primitive-exit (system* initdb "-D" #$data-directory))) + (lambda () + (primitive-exit 1)))) + (pid (waitpid pid)))))) + + (mlet %store-monad ((start-script start-script)) + (return + (service + (provision '(postgres)) + (documentation "Run the PostgreSQL daemon.") + (requirement '(user-processes loopback)) + (start #~(make-forkexec-constructor #$start-script)) + (stop #~(make-kill-destructor)) + (activate activate) + (user-groups (list (user-group + (name "postgres") + (system? #t)))) + (user-accounts (list (user-account + (name "postgres") + (group "postgres") + (system? #t) + (comment "PostgreSQL server user") + (home-directory "/var/empty") + (shell + #~(string-append #$shadow "/sbin/nologin"))))))))) diff --git a/gnu/services/dbus.scm b/gnu/services/dbus.scm deleted file mode 100644 index 671dafa194..0000000000 --- a/gnu/services/dbus.scm +++ /dev/null @@ -1,126 +0,0 @@ -;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org> -;;; -;;; This file is part of GNU Guix. -;;; -;;; GNU Guix is free software; you can redistribute it and/or modify it -;;; under the terms of the GNU General Public License as published by -;;; the Free Software Foundation; either version 3 of the License, or (at -;;; your option) any later version. -;;; -;;; GNU Guix is distributed in the hope that it will be useful, but -;;; WITHOUT ANY WARRANTY; without even the implied warranty of -;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;; GNU General Public License for more details. -;;; -;;; You should have received a copy of the GNU General Public License -;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. - -(define-module (gnu services dbus) - #:use-module (gnu services) - #:use-module (gnu system shadow) - #:use-module (gnu packages glib) - #:use-module (guix monads) - #:use-module (guix store) - #:use-module (guix gexp) - #:export (dbus-service)) - -;;; Commentary: -;;; -;;; This module supports the configuration of the D-Bus message bus -;;; (http://dbus.freedesktop.org/). D-Bus is an inter-process communication -;;; facility. Its "system bus" is used to allow system services to -;;; communicate and be notified of system-wide events. -;;; -;;; Code: - -(define (dbus-configuration-directory dbus services) - "Return a configuration directory for @var{dbus} that includes the -@code{etc/dbus-1/system.d} directories of each package listed in -@var{services}." - (define build - #~(begin - (use-modules (sxml simple) - (srfi srfi-1)) - - (define (services->sxml services) - ;; Return the SXML 'includedir' clauses for DIRS. - `(busconfig - ,@(append-map (lambda (dir) - `((includedir - ,(string-append dir "/etc/dbus-1/system.d")) - (servicedir ;for '.service' files - ,(string-append dir "/share/dbus-1/services")))) - services))) - - (mkdir #$output) - (copy-file (string-append #$dbus "/etc/dbus-1/system.conf") - (string-append #$output "/system.conf")) - - ;; The default 'system.conf' has an <includedir> clause for - ;; 'system.d', so create it. - (mkdir (string-append #$output "/system.d")) - - ;; 'system-local.conf' is automatically included by the default - ;; 'system.conf', so this is where we stuff our own things. - (call-with-output-file (string-append #$output "/system-local.conf") - (lambda (port) - (sxml->xml (services->sxml (list #$@services)) - port))))) - - (gexp->derivation "dbus-configuration" build)) - -(define* (dbus-service services #:key (dbus dbus)) - "Return a service that runs the system bus, using @var{dbus}, with support -for @var{services}. - -@var{services} must be a list of packages that provide an -@file{etc/dbus-1/system.d} directory containing additional D-Bus configuration -and policy files. For example, to allow avahi-daemon to use the system bus, -@var{services} must be equal to @code{(list avahi)}." - (mlet %store-monad ((conf (dbus-configuration-directory dbus services))) - (return - (service - (documentation "Run the D-Bus system daemon.") - (provision '(dbus-system)) - (requirement '(user-processes)) - (start #~(make-forkexec-constructor - (list (string-append #$dbus "/bin/dbus-daemon") - "--nofork" - (string-append "--config-file=" #$conf "/system.conf")))) - (stop #~(make-kill-destructor)) - (user-groups (list (user-group - (name "messagebus") - (system? #t)))) - (user-accounts (list (user-account - (name "messagebus") - (group "messagebus") - (system? #t) - (comment "D-Bus system bus user") - (home-directory "/var/run/dbus") - (shell - "/run/current-system/profile/sbin/nologin")))) - (activate #~(begin - (use-modules (guix build utils)) - - (mkdir-p "/var/run/dbus") - - (let ((user (getpwnam "messagebus"))) - (chown "/var/run/dbus" - (passwd:uid user) (passwd:gid user))) - - (unless (file-exists? "/etc/machine-id") - (format #t "creating /etc/machine-id...~%") - (let ((prog (string-append #$dbus "/bin/dbus-uuidgen"))) - ;; XXX: We can't use 'system' because the initrd's - ;; guile system(3) only works when 'sh' is in $PATH. - (let ((pid (primitive-fork))) - (if (zero? pid) - (call-with-output-file "/etc/machine-id" - (lambda (port) - (close-fdes 1) - (dup2 (port->fdes port) 1) - (execl prog))) - (waitpid pid))))))))))) - -;;; dbus.scm ends here diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm new file mode 100644 index 0000000000..910dc1f9e0 --- /dev/null +++ b/gnu/services/desktop.scm @@ -0,0 +1,300 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2015 Andy Wingo <wingo@igalia.com> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (gnu services desktop) + #:use-module (gnu services) + #:use-module (gnu services base) + #:use-module (gnu services avahi) + #:use-module (gnu services xorg) + #:use-module (gnu services networking) + #:use-module (gnu services ssh) + #:use-module (gnu system shadow) + #:use-module (gnu packages glib) + #:use-module (gnu packages admin) + #:use-module (gnu packages gnome) + #:use-module (gnu packages avahi) + #:use-module (gnu packages wicd) + #:use-module (guix monads) + #:use-module (guix store) + #:use-module (guix gexp) + #:use-module (ice-9 match) + #:export (dbus-service + upower-service + colord-service + %desktop-services)) + +;;; Commentary: +;;; +;;; This module contains service definitions for a "desktop" environment. +;;; +;;; Code: + + +;;; +;;; D-Bus. +;;; + +(define (dbus-configuration-directory dbus services) + "Return a configuration directory for @var{dbus} that includes the +@code{etc/dbus-1/system.d} directories of each package listed in +@var{services}." + (define build + #~(begin + (use-modules (sxml simple) + (srfi srfi-1)) + + (define (services->sxml services) + ;; Return the SXML 'includedir' clauses for DIRS. + `(busconfig + ,@(append-map (lambda (dir) + `((includedir + ,(string-append dir "/etc/dbus-1/system.d")) + (servicedir ;for '.service' files + ,(string-append dir "/share/dbus-1/services")))) + services))) + + (mkdir #$output) + (copy-file (string-append #$dbus "/etc/dbus-1/system.conf") + (string-append #$output "/system.conf")) + + ;; The default 'system.conf' has an <includedir> clause for + ;; 'system.d', so create it. + (mkdir (string-append #$output "/system.d")) + + ;; 'system-local.conf' is automatically included by the default + ;; 'system.conf', so this is where we stuff our own things. + (call-with-output-file (string-append #$output "/system-local.conf") + (lambda (port) + (sxml->xml (services->sxml (list #$@services)) + port))))) + + (gexp->derivation "dbus-configuration" build)) + +(define* (dbus-service services #:key (dbus dbus)) + "Return a service that runs the \"system bus\", using @var{dbus}, with +support for @var{services}. + +@uref{http://dbus.freedesktop.org/, D-Bus} is an inter-process communication +facility. Its system bus is used to allow system services to communicate and +be notified of system-wide events. + +@var{services} must be a list of packages that provide an +@file{etc/dbus-1/system.d} directory containing additional D-Bus configuration +and policy files. For example, to allow avahi-daemon to use the system bus, +@var{services} must be equal to @code{(list avahi)}." + (mlet %store-monad ((conf (dbus-configuration-directory dbus services))) + (return + (service + (documentation "Run the D-Bus system daemon.") + (provision '(dbus-system)) + (requirement '(user-processes)) + (start #~(make-forkexec-constructor + (list (string-append #$dbus "/bin/dbus-daemon") + "--nofork" + (string-append "--config-file=" #$conf "/system.conf")))) + (stop #~(make-kill-destructor)) + (user-groups (list (user-group + (name "messagebus") + (system? #t)))) + (user-accounts (list (user-account + (name "messagebus") + (group "messagebus") + (system? #t) + (comment "D-Bus system bus user") + (home-directory "/var/run/dbus") + (shell + #~(string-append #$shadow "/sbin/nologin"))))) + (activate #~(begin + (use-modules (guix build utils)) + + (mkdir-p "/var/run/dbus") + + (let ((user (getpwnam "messagebus"))) + (chown "/var/run/dbus" + (passwd:uid user) (passwd:gid user))) + + (unless (file-exists? "/etc/machine-id") + (format #t "creating /etc/machine-id...~%") + (let ((prog (string-append #$dbus "/bin/dbus-uuidgen"))) + ;; XXX: We can't use 'system' because the initrd's + ;; guile system(3) only works when 'sh' is in $PATH. + (let ((pid (primitive-fork))) + (if (zero? pid) + (call-with-output-file "/etc/machine-id" + (lambda (port) + (close-fdes 1) + (dup2 (port->fdes port) 1) + (execl prog))) + (waitpid pid))))))))))) + + +;;; +;;; Upower D-Bus service. +;;; + +(define* (upower-configuration-file #:key watts-up-pro? poll-batteries? + ignore-lid? use-percentage-for-policy? + percentage-low percentage-critical + percentage-action time-low + time-critical time-action + critical-power-action) + "Return an upower-daemon configuration file." + (define (bool value) + (if value "true\n" "false\n")) + + (text-file "UPower.conf" + (string-append + "[UPower]\n" + "EnableWattsUpPro=" (bool watts-up-pro?) + "NoPollBatteries=" (bool (not poll-batteries?)) + "IgnoreLid=" (bool ignore-lid?) + "UsePercentageForPolicy=" (bool use-percentage-for-policy?) + "PercentageLow=" (number->string percentage-low) "\n" + "PercentageCritical=" (number->string percentage-critical) "\n" + "PercentageAction=" (number->string percentage-action) "\n" + "TimeLow=" (number->string time-low) "\n" + "TimeCritical=" (number->string time-critical) "\n" + "TimeAction=" (number->string time-action) "\n" + "CriticalPowerAction=" (match critical-power-action + ('hybrid-sleep "HybridSleep") + ('hibernate "Hibernate") + ('power-off "PowerOff")) + "\n"))) + +(define* (upower-service #:key (upower upower) + (watts-up-pro? #f) + (poll-batteries? #t) + (ignore-lid? #f) + (use-percentage-for-policy? #f) + (percentage-low 10) + (percentage-critical 3) + (percentage-action 2) + (time-low 1200) + (time-critical 300) + (time-action 120) + (critical-power-action 'hybrid-sleep)) + "Return a service that runs @uref{http://upower.freedesktop.org/, +@command{upowerd}}, a system-wide monitor for power consumption and battery +levels, with the given configuration settings. It implements the +@code{org.freedesktop.UPower} D-Bus interface, and is notably used by GNOME." + (mlet %store-monad ((config (upower-configuration-file + #:watts-up-pro? watts-up-pro? + #:poll-batteries? poll-batteries? + #:ignore-lid? ignore-lid? + #:use-percentage-for-policy? use-percentage-for-policy? + #:percentage-low percentage-low + #:percentage-critical percentage-critical + #:percentage-action percentage-action + #:time-low time-low + #:time-critical time-critical + #:time-action time-action + #:critical-power-action critical-power-action))) + (return + (service + (documentation "Run the UPower power and battery monitor.") + (provision '(upower-daemon)) + (requirement '(dbus-system udev)) + + (start #~(make-forkexec-constructor + (list (string-append #$upower "/libexec/upowerd")) + #:environment-variables + (list (string-append "UPOWER_CONF_FILE_NAME=" #$config)))) + (stop #~(make-kill-destructor)) + (activate #~(begin + (use-modules (guix build utils)) + (mkdir-p "/var/lib/upower") + (let ((user (getpwnam "upower"))) + (chown "/var/lib/upower" + (passwd:uid user) (passwd:gid user))))) + + (user-groups (list (user-group + (name "upower") + (system? #t)))) + (user-accounts (list (user-account + (name "upower") + (group "upower") + (system? #t) + (comment "UPower daemon user") + (home-directory "/var/empty") + (shell + #~(string-append #$shadow "/sbin/nologin"))))))))) + + +;;; +;;; Colord D-Bus service. +;;; + +(define* (colord-service #:key (colord colord)) + "Return a service that runs @command{colord}, a system service with a D-Bus +interface to manage the color profiles of input and output devices such as +screens and scanners. It is notably used by the GNOME Color Manager graphical +tool. See @uref{http://www.freedesktop.org/software/colord/, the colord web +site} for more information." + (with-monad %store-monad + (return + (service + (documentation "Run the colord color management service.") + (provision '(colord-daemon)) + (requirement '(dbus-system udev)) + + (start #~(make-forkexec-constructor + (list (string-append #$colord "/libexec/colord")))) + (stop #~(make-kill-destructor)) + (activate #~(begin + (use-modules (guix build utils)) + (mkdir-p "/var/lib/colord") + (let ((user (getpwnam "colord"))) + (chown "/var/lib/colord" + (passwd:uid user) (passwd:gid user))))) + + (user-groups (list (user-group + (name "colord") + (system? #t)))) + (user-accounts (list (user-account + (name "colord") + (group "colord") + (system? #t) + (comment "colord daemon user") + (home-directory "/var/empty") + (shell + #~(string-append #$shadow "/sbin/nologin"))))))))) + +(define %desktop-services + ;; List of services typically useful for a "desktop" use case. + (cons* (slim-service) + + (avahi-service) + (wicd-service) + (upower-service) + (colord-service) + (dbus-service (list avahi wicd upower colord)) + + (ntp-service) + (lsh-service) + + (map (lambda (mservice) + ;; Provide an nscd ready to use nss-mdns. + (mlet %store-monad ((service mservice)) + (if (memq 'nscd (service-provision service)) + (nscd-service (nscd-configuration) + #:name-services (list nss-mdns)) + mservice))) + %base-services))) + +;;; desktop.scm ends here diff --git a/gnu/services/lirc.scm b/gnu/services/lirc.scm new file mode 100644 index 0000000000..857f362db7 --- /dev/null +++ b/gnu/services/lirc.scm @@ -0,0 +1,68 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2015 Alex Kost <alezost@gmail.com> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (gnu services lirc) + #:use-module (gnu services) + #:use-module (gnu packages lirc) + #:use-module (guix monads) + #:use-module (guix store) + #:use-module (guix gexp) + #:export (lirc-service)) + +;;; Commentary: +;;; +;;; LIRC services. +;;; +;;; Code: + +(define* (lirc-service #:key (lirc lirc) + device driver config-file + (extra-options '())) + "Return a service that runs @url{http://www.lirc.org,LIRC}, a daemon that +decodes infrared signals from remote controls. + +The daemon will use specified @var{device}, @var{driver} and +@var{config-file} (configuration file name). + +Finally, @var{extra-options} is a list of additional command-line options +passed to @command{lircd}." + (with-monad %store-monad + (return + (service + (provision '(lircd)) + (documentation "Run the LIRC daemon.") + (requirement '(user-processes)) + (start #~(make-forkexec-constructor + (list (string-append #$lirc "/sbin/lircd") + "--nodaemon" + #$@(if device + #~("--device" #$device) + #~()) + #$@(if driver + #~("--driver" #$driver) + #~()) + #$@(if config-file + #~(#$config-file) + #~()) + #$@extra-options))) + (stop #~(make-kill-destructor)) + (activate #~(begin + (use-modules (guix build utils)) + (mkdir-p "/var/run/lirc"))))))) + +;;; lirc.scm ends here diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index af8dd43bd6..102202c853 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -170,15 +170,33 @@ Protocol (DHCP) client, on all the non-loopback network interfaces." ;; up*. However, the relevant interfaces are ;; typically down at this point. Thus we perform our ;; own interface discovery here. - (let* ((valid? (negate loopback-network-interface?)) - (ifaces (filter valid? - (all-network-interfaces))) - (pid (fork+exec-command - (cons* #$dhclient "-nw" - "-pf" #$pid-file - ifaces)))) + (define valid? + (negate loopback-network-interface?)) + (define ifaces + (filter valid? (all-network-interfaces))) + + ;; XXX: Make sure the interfaces are up so that + ;; 'dhclient' can actually send/receive over them. + (for-each set-network-interface-up ifaces) + + (false-if-exception (delete-file #$pid-file)) + (let ((pid (fork+exec-command + (cons* #$dhclient "-nw" + "-pf" #$pid-file ifaces)))) (and (zero? (cdr (waitpid pid))) - (call-with-input-file #$pid-file read))))) + (let loop () + (catch 'system-error + (lambda () + (call-with-input-file #$pid-file read)) + (lambda args + ;; 'dhclient' returned before PID-FILE + ;; was created, so try again. + (let ((errno (system-error-errno args))) + (if (= ENOENT errno) + (begin + (sleep 1) + (loop)) + (apply throw args)))))))))) (stop #~(make-kill-destructor)))))) (define %ntp-servers @@ -227,7 +245,7 @@ restrict -6 ::1\n")) (comment "NTP daemon user") (home-directory "/var/empty") (shell - "/run/current-system/profile/sbin/nologin")))))))) + #~(string-append #$shadow "/sbin/nologin"))))))))) (define* (tor-service #:key (tor tor)) "Return a service to run the @uref{https://torproject.org,Tor} daemon. @@ -257,7 +275,7 @@ policy) as the @code{tor} unprivileged user." (comment "Tor daemon user") (home-directory "/var/empty") (shell - "/run/current-system/profile/sbin/nologin")))) + #~(string-append #$shadow "/sbin/nologin"))))) (documentation "Run the Tor anonymous network overlay."))))) diff --git a/gnu/services/ssh.scm b/gnu/services/ssh.scm index 9537958df7..e2f85421e9 100644 --- a/gnu/services/ssh.scm +++ b/gnu/services/ssh.scm @@ -86,7 +86,7 @@ (tcp/ip-forwarding? #t) (password-authentication? #t) (public-key-authentication? #t) - initialize?) + (initialize? #t)) "Run the @command{lshd} program from @var{lsh} to listen on port @var{port-number}. @var{host-key} must designate a file containing the host key, and readable only by root. diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm index c687b46bc2..9ee88170e4 100644 --- a/gnu/services/xorg.scm +++ b/gnu/services/xorg.scm @@ -37,7 +37,8 @@ #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) #:use-module (ice-9 match) - #:export (xorg-start-command + #:export (xorg-configuration-file + xorg-start-command %default-slim-theme %default-slim-theme-name slim-service)) @@ -48,12 +49,10 @@ ;;; ;;; Code: -(define* (xorg-start-command #:key - (guile (canonical-package guile-2.0)) - (xorg-server xorg-server) - (drivers '()) (resolutions '())) - "Return a derivation that builds a @var{guile} script to start the X server -from @var{xorg-server}. Usually the X server is started by a login manager. +(define* (xorg-configuration-file #:key (drivers '()) (resolutions '()) + (extra-config '())) + "Return a configuration file for the Xorg server containing search paths for +all the common drivers. @var{drivers} must be either the empty list, in which case Xorg chooses a graphics driver automatically, or a list of driver names that will be tried in @@ -61,8 +60,11 @@ this order---e.g., @code{(\"modesetting\" \"vesa\")}. Likewise, when @var{resolutions} is the empty list, Xorg chooses an appropriate screen resolution; otherwise, it must be a list of -resolutions---e.g., @code{((1024 768) (640 480))}." +resolutions---e.g., @code{((1024 768) (640 480))}. +Last, @var{extra-config} is a list of strings or objects appended to the +@code{text-file*} argument list. It is used to pass extra text to be added +verbatim to the configuration file." (define (device-section driver) (string-append " Section \"Device\" @@ -78,15 +80,14 @@ Section \"Screen\" SubSection \"Display\" Modes " (string-join (map (match-lambda - ((x y) - (string-append "\"" (number->string x) - "x" (number->string y) "\""))) + ((x y) + (string-append "\"" (number->string x) + "x" (number->string y) "\""))) resolutions)) " EndSubSection EndSection")) - (define (xserver.conf) - (text-file* "xserver.conf" " + (apply text-file* "xserver.conf" " Section \"Files\" FontPath \"" font-adobe75dpi "/share/fonts/X11/75dpi\" ModulePath \"" xf86-video-vesa "/lib/xorg/modules/drivers\" @@ -98,6 +99,12 @@ Section \"Files\" ModulePath \"" xf86-video-nouveau "/lib/xorg/modules/drivers\" ModulePath \"" xf86-video-nv "/lib/xorg/modules/drivers\" ModulePath \"" xf86-video-sis "/lib/xorg/modules/drivers\" + + # Libinput is the new thing and is recommended over evdev/synaptics + # by those who know: + # <http://who-t.blogspot.fr/2015/01/xf86-input-libinput-compatibility-with.html>. + ModulePath \"" xf86-input-libinput "/lib/xorg/modules/input\" + ModulePath \"" xf86-input-evdev "/lib/xorg/modules/input\" ModulePath \"" xf86-input-keyboard "/lib/xorg/modules/input\" ModulePath \"" xf86-input-mouse "/lib/xorg/modules/input\" @@ -111,12 +118,27 @@ Section \"ServerFlags\" Option \"AllowMouseOpenFail\" \"on\" EndSection " - (string-join (map device-section drivers) "\n") + (string-join (map device-section drivers) "\n") "\n" (string-join (map (cut screen-section <> resolutions) drivers) - "\n"))) + "\n") + + "\n" + extra-config)) - (mlet %store-monad ((config (xserver.conf))) +(define* (xorg-start-command #:key + (guile (canonical-package guile-2.0)) + configuration-file + (xorg-server xorg-server)) + "Return a derivation that builds a @var{guile} script to start the X server +from @var{xorg-server}. @var{configuration-file} is the server configuration +file or a derivation that builds it; when omitted, the result of +@code{xorg-configuration-file} is used. + +Usually the X server is started by a login manager." + (mlet %store-monad ((config (if configuration-file + (return configuration-file) + (xorg-configuration-file)))) (define script ;; Write a small wrapper around the X server. #~(begin @@ -192,7 +214,7 @@ which should be passed to this script as the first argument. If not, the (define %default-slim-theme-name ;; This must be the name of the sub-directory in %DEFAULT-SLIM-THEME that ;; contains the actual theme files. - "0.8") + "0.x") (define* (slim-service #:key (slim slim) (allow-empty-passwords? #t) auto-login? @@ -207,6 +229,19 @@ which should be passed to this script as the first argument. If not, the turn starts the X display server with @var{startx}, a command as returned by @code{xorg-start-command}. +@cindex X session + +SLiM automatically looks for session types described by the @file{.desktop} +files in @file{/run/current-system/profile/share/xsessions} and allows users +to choose a session from the log-in screen using @kbd{F1}. Packages such as +@var{xfce}, @var{sawfish}, and @var{ratpoison} provide @file{.desktop} files; +adding them to the system-wide set of packages automatically makes them +available at the log-in screen. + +In addition, @file{~/.xsession} files are honored. When available, +@file{~/.xsession} must be an executable that starts a window manager +and/or other X clients. + When @var{allow-empty-passwords?} is true, allow logins with an empty password. When @var{auto-login?} is true, log in automatically as @var{default-user} with @var{auto-login-session}. @@ -217,7 +252,9 @@ theme to use. In that case, @var{theme-name} specifies the name of the theme." (define (slim.cfg) - (mlet %store-monad ((startx (or startx (xorg-start-command))) + (mlet %store-monad ((startx (if startx + (return startx) + (xorg-start-command))) (xinitrc (xinitrc #:fallback-session auto-login-session))) (text-file* "slim.cfg" " diff --git a/gnu/system.scm b/gnu/system.scm index 0d510b623b..b8d0e62f60 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -404,30 +405,47 @@ settings for 'guix.el' to work out-of-the-box." (chdir #$output) (symlink #$file "site-start.el"))))) +(define (user-shells os) + "Return the list of all the shells used by the accounts of OS. These may be +gexps or strings." + (mlet %store-monad ((accounts (operating-system-accounts os))) + (return (map user-account-shell accounts)))) + +(define (shells-file shells) + "Return a derivation that builds a shell list for use as /etc/shells based +on SHELLS. /etc/shells is used by xterm, polkit, and other programs." + (gexp->derivation "shells" + #~(begin + (use-modules (srfi srfi-1)) + + (define shells + (delete-duplicates (list #$@shells))) + + (call-with-output-file #$output + (lambda (port) + (display "\ +/bin/sh +/run/current-system/profile/bin/sh +/run/current-system/profile/bin/bash\n" port) + (for-each (lambda (shell) + (display shell port) + (newline port)) + shells)))))) + (define* (etc-directory #:key (locale "C") (timezone "Europe/Paris") (issue "Hello!\n") (skeletons '()) (pam-services '()) (profile "/run/current-system/profile") - hosts-file nss + hosts-file nss (shells '()) (sudoers "")) "Return a derivation that builds the static part of the /etc directory." (mlet* %store-monad ((pam.d (pam-services->directory pam-services)) (sudoers (text-file "sudoers" sudoers)) (login.defs (text-file "login.defs" "# Empty for now.\n")) - - ;; /etc/shells is used by xterm and other programs. We don't check - ;; whether these shells are installed, should be OK. - (shells (text-file "shells" - "\ -/bin/sh -/run/current-system/profile/bin/sh -/run/current-system/profile/bin/bash -/run/current-system/profile/bin/fish -/run/current-system/profile/bin/tcsh -/run/current-system/profile/bin/zsh\n")) + (shells (shells-file shells)) (emacs (emacs-site-directory)) (issue (text-file "issue" issue)) (nsswitch (text-file "nsswitch.conf" @@ -443,14 +461,40 @@ export TZDIR=\"" tzdata "/share/zoneinfo\" # Tell 'modprobe' & co. where to look for modules. export LINUX_MODULE_DIRECTORY=/run/booted-system/kernel/lib/modules -export PATH=$HOME/.guix-profile/bin:/run/current-system/profile/bin -export PATH=/run/setuid-programs:/run/current-system/profile/sbin:$PATH +# These variables are honored by OpenSSL (libssl) and Git. +export SSL_CERT_DIR=/etc/ssl/certs +export SSL_CERT_FILE=\"$SSL_CERT_DIR/ca-certificates.crt\" +export GIT_SSL_CAINFO=\"$SSL_CERT_FILE\" + +# Crucial variables that could be missing the the profiles' 'etc/profile' +# because they would require combining both profiles. +# FIXME: See <http://bugs.gnu.org/20255>. export MANPATH=$HOME/.guix-profile/share/man:/run/current-system/profile/share/man export INFOPATH=$HOME/.guix-profile/share/info:/run/current-system/profile/share/info - export XDG_DATA_DIRS=$HOME/.guix-profile/share:/run/current-system/profile/share export XDG_CONFIG_DIRS=$HOME/.guix-profile/etc/xdg:/run/current-system/profile/etc/xdg +# Ignore the default value of 'PATH'. +unset PATH + +# Load the system profile's settings. +GUIX_PROFILE=/run/current-system/profile \\ +. /run/current-system/profile/etc/profile + +# Prepend setuid programs. +export PATH=/run/setuid-programs:$PATH + +if [ -f \"$HOME/.guix-profile/etc/profile\" ] +then + # Load the user profile's settings. + GUIX_PROFILE=\"$HOME/.guix-profile\" \\ + . \"$HOME/.guix-profile/etc/profile\" +else + # At least define this one so that basic things just work + # when the user installs their first package. + export PATH=\"$HOME/.guix-profile/bin:$PATH\" +fi + # Append the directory of 'site-start.el' to the search path. export EMACSLOADPATH=:/etc/emacs @@ -458,18 +502,13 @@ export EMACSLOADPATH=:/etc/emacs # when /etc/machine-id is missing. Make sure these warnings are non-fatal. export DBUS_FATAL_WARNINGS=0 -# These variables are honored by OpenSSL (libssl) and Git. -export SSL_CERT_DIR=/etc/ssl/certs -export SSL_CERT_FILE=\"$SSL_CERT_DIR/ca-certificates.crt\" -export GIT_SSL_CAINFO=\"$SSL_CERT_FILE\" - # Allow Aspell to find dictionaries installed in the user profile. export ASPELL_CONF=\"dict-dir $HOME/.guix-profile/lib/aspell\" if [ -n \"$BASH_VERSION\" -a -f /etc/bashrc ] then # Load Bash-specific initialization code. - source /etc/bashrc + . /etc/bashrc fi ")) @@ -542,7 +581,8 @@ fi\n")) (profile-drv (operating-system-profile os)) (skeletons (operating-system-skeletons os)) (/etc/hosts (or (operating-system-hosts-file os) - (default-/etc/hosts (operating-system-host-name os))))) + (default-/etc/hosts (operating-system-host-name os)))) + (shells (user-shells os))) (etc-directory #:pam-services pam-services #:skeletons skeletons #:issue (operating-system-issue os) @@ -550,6 +590,7 @@ fi\n")) #:nss (operating-system-name-service-switch os) #:timezone (operating-system-timezone os) #:hosts-file /etc/hosts + #:shells shells #:sudoers (operating-system-sudoers os) #:profile profile-drv))) @@ -680,6 +721,9 @@ etc." (activate-firmware (string-append #$firmware "/lib/firmware")) + ;; Let users debug their own processes! + (activate-ptrace-attach) + ;; Run the services' activation snippets. ;; TODO: Use 'load-compiled'. (for-each primitive-load '#$actions) @@ -695,6 +739,20 @@ we're running in the final root." (dmd-conf (dmd-configuration-file services))) (gexp->file "boot" #~(begin + (use-modules (guix build utils)) + + ;; Clean out /tmp and /var/run. + ;; + ;; XXX This needs to happen before service activations, so + ;; it has to be here, but this also implicitly assumes + ;; that /tmp and /var/run are on the root partition. + (false-if-exception (delete-file-recursively "/tmp")) + (false-if-exception (delete-file-recursively "/var/run")) + (false-if-exception (mkdir "/tmp")) + (false-if-exception (chmod "/tmp" #o1777)) + (false-if-exception (mkdir "/var/run")) + (false-if-exception (chmod "/var/run" #o755)) + ;; Activate the system. ;; TODO: Use 'load-compiled'. (primitive-load #$activate) @@ -737,6 +795,7 @@ we're running in the final root." (operating-system-initrd os)) (mlet %store-monad ((initrd (make-initrd boot-file-systems + #:linux (operating-system-kernel os) #:mapped-devices mapped-devices))) (return #~(string-append #$initrd "/initrd")))) diff --git a/gnu/system/os-config.tmpl b/gnu/system/examples/bare-bones.tmpl index e14c95733a..8f4faca2d3 100644 --- a/gnu/system/os-config.tmpl +++ b/gnu/system/examples/bare-bones.tmpl @@ -1,12 +1,13 @@ -;; This is an operating system configuration template. +;; This is an operating system configuration template +;; for a "bare bones" setup, with no X11 display server. (use-modules (gnu)) -(use-service-modules xorg networking dbus avahi) -(use-package-modules xorg avahi) +(use-service-modules networking ssh) +(use-package-modules admin) (operating-system - (host-name "antelope") - (timezone "Europe/Paris") + (host-name "komputilo") + (timezone "Europe/Berlin") (locale "en_US.UTF-8") ;; Assuming /dev/sdX is the target hard disk, and "root" is @@ -36,12 +37,10 @@ (home-directory "/home/alice")))) ;; Globally-installed packages. - (packages (cons xterm %base-packages)) + (packages (cons tcpdump %base-packages)) - ;; Add services to the baseline: the SLiM log-in manager - ;; for Xorg sessions, a DHCP client, Avahi, and D-Bus. - (services (cons* (slim-service) - (dhcp-client-service) - (avahi-service) - (dbus-service (list avahi)) + ;; Add services to the baseline: a DHCP client and + ;; an SSH server. + (services (cons* (dhcp-client-service) + (lsh-service #:port-number 2222) %base-services))) diff --git a/gnu/system/examples/desktop.tmpl b/gnu/system/examples/desktop.tmpl new file mode 100644 index 0000000000..c78188eb61 --- /dev/null +++ b/gnu/system/examples/desktop.tmpl @@ -0,0 +1,43 @@ +;; This is an operating system configuration template +;; for a "desktop" setup with X11. + +(use-modules (gnu) (gnu system nss)) +(use-service-modules desktop) +(use-package-modules xfce ratpoison wicd avahi xorg certs) + +(operating-system + (host-name "antelope") + (timezone "Europe/Paris") + (locale "en_US.UTF-8") + + ;; Assuming /dev/sdX is the target hard disk, and "root" is + ;; the label of the target root file system. + (bootloader (grub-configuration (device "/dev/sdX"))) + (file-systems (cons (file-system + (device "root") + (title 'label) + (mount-point "/") + (type "ext4")) + %base-file-systems)) + + (users (list (user-account + (name "bob") + (comment "Alice's brother") + (group "users") + (supplementary-groups '("wheel" "netdev" + "audio" "video")) + (home-directory "/home/bob")))) + + ;; Add Xfce and Ratpoison; that allows us to choose + ;; sessions using either of these at the log-in screen. + (packages (cons* xfce ratpoison ;desktop environments + xterm wicd avahi ;useful tools + nss-certs ;for HTTPS access + %base-packages)) + + ;; Use the "desktop" services, which include the X11 + ;; log-in service, networking with Wicd, and more. + (services %desktop-services) + + ;; Allow resolution of '.local' host names with mDNS. + (name-service-switch %mdns-host-lookup-nss)) diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm index 4760821840..db861baed2 100644 --- a/gnu/system/file-systems.scm +++ b/gnu/system/file-systems.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -19,6 +19,7 @@ (define-module (gnu system file-systems) #:use-module (guix gexp) #:use-module (guix records) + #:use-module (guix store) #:export (<file-system> file-system file-system? @@ -37,6 +38,7 @@ %shared-memory-file-system %pseudo-terminal-file-system %devtmpfs-file-system + %immutable-store %base-file-systems @@ -139,12 +141,24 @@ file system." (options "size=50%") ;TODO: make size configurable (create-mount-point? #t))) +(define %immutable-store + ;; Read-only store to avoid users or daemons accidentally modifying it. + ;; 'guix-daemon' has provisions to remount it read-write in its own name + ;; space. + (file-system + (device (%store-prefix)) + (mount-point (%store-prefix)) + (type "none") + (check? #f) + (flags '(read-only bind-mount)))) + (define %base-file-systems ;; List of basic file systems to be mounted. Note that /proc and /sys are ;; currently mounted by the initrd. (list %devtmpfs-file-system %pseudo-terminal-file-system - %shared-memory-file-system)) + %shared-memory-file-system + %immutable-store)) diff --git a/gnu/system/grub.scm b/gnu/system/grub.scm index 17b08aa9b7..e49b6dbe54 100644 --- a/gnu/system/grub.scm +++ b/gnu/system/grub.scm @@ -80,7 +80,8 @@ (define %background-image (grub-image (aspect-ratio 4/3) - (file #~(string-append #$%artwork-repository "/grub/GuixSD-4-3.svg")))) + (file #~(string-append #$%artwork-repository + "/grub/GuixSD-fully-black-4-3.svg")))) (define %default-theme ;; Default theme contributed by Felipe López. diff --git a/gnu/system/install.scm b/gnu/system/install.scm index 2e7e4eafad..007bd25ae6 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -22,7 +23,9 @@ #:use-module (guix store) #:use-module (guix monads) #:use-module ((guix store) #:select (%store-prefix)) + #:use-module (guix profiles) #:use-module (gnu packages admin) + #:use-module (gnu packages bash) #:use-module (gnu packages linux) #:use-module (gnu packages cryptsetup) #:use-module (gnu packages package-management) @@ -30,7 +33,10 @@ #:use-module (gnu packages grub) #:use-module (gnu packages texinfo) #:use-module (gnu packages compression) - #:export (installation-os)) + #:use-module (ice-9 match) + #:use-module (srfi srfi-26) + #:export (self-contained-tarball + installation-os)) ;;; Commentary: ;;; @@ -39,6 +45,49 @@ ;;; ;;; Code: + +(define* (self-contained-tarball #:key (guix guix)) + "Return a self-contained tarball containing a store initialized with the +closure of GUIX. The tarball contains /gnu/store, /var/guix, and a profile +under /root/.guix-profile where GUIX is installed." + (mlet %store-monad ((profile (profile-derivation + (manifest + (list (package->manifest-entry guix)))))) + (define build + #~(begin + (use-modules (guix build utils) + (gnu build install)) + + (define %root "root") + + (setenv "PATH" + (string-append #$guix "/sbin:" #$tar "/bin:" #$xz "/bin")) + + (populate-single-profile-directory %root + #:profile #$profile + #:closure "profile") + + ;; Create the tarball. Use GNU format so there's no file name + ;; length limitation. + (with-directory-excursion %root + (zero? (system* "tar" "--xz" "--format=gnu" + "--owner=root:0" "--group=root:0" + "-cvf" #$output + ;; Avoid adding /, /var, or /root to the tarball, + ;; so that the ownership and permissions of those + ;; directories will not be overwritten when + ;; extracting the archive. + "./root/.guix-profile" + "./var/guix" + "./gnu"))))) + + (gexp->derivation "guix-tarball.tar.xz" build + #:references-graphs `(("profile" ,profile)) + #:modules '((guix build utils) + (guix build store-copy) + (gnu build install))))) + + (define (log-to-info) "Return a script that spawns the Info reader on the right section of the manual." @@ -134,12 +183,17 @@ the given target.") "Return a dummy service whose purpose is to install an operating system configuration template file in the installation system." - (define local-template - "/etc/configuration-template.scm") - (define template - (search-path %load-path "gnu/system/os-config.tmpl")) + (define search + (cut search-path %load-path <>)) + (define templates + (map (match-lambda + ((file '-> target) + (list (local-file (search file)) + (string-append "/etc/configuration/" target)))) + '(("gnu/system/examples/bare-bones.tmpl" -> "bare-bones.scm") + ("gnu/system/examples/desktop.tmpl" -> "desktop.scm")))) - (mlet %store-monad ((template (interned-file template))) + (with-monad %store-monad (return (service (requirement '(root-file-system)) (provision '(os-config-template)) @@ -148,8 +202,16 @@ configuration template file in the installation system." (start #~(const #t)) (stop #~(const #f)) (activate - #~(unless (file-exists? #$local-template) - (copy-file #$template #$local-template))))))) + #~(begin + (use-modules (ice-9 match) + (guix build utils)) + + (mkdir-p "/etc/configuration") + (for-each (match-lambda + ((file target) + (unless (file-exists? target) + (copy-file file target)))) + '#$templates))))))) (define %nscd-minimal-caches ;; Minimal in-memory caching policy for nscd. @@ -279,6 +341,7 @@ Use Alt-F2 for documentation. ;; 2.0.0a, that pulls Guile 1.8, which takes unreasonable ;; space; furthermore util-linux's fdisk is already ;; available here, so we keep that. + bash-completion %base-packages)))) ;; Return it here so 'guix system' can consume it directly. diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm index 9feb8f73e6..83685adcbc 100644 --- a/gnu/system/linux-initrd.scm +++ b/gnu/system/linux-initrd.scm @@ -143,20 +143,22 @@ initrd code." (define* (base-initrd file-systems #:key + (linux linux-libre) (mapped-devices '()) qemu-networking? - virtio? + (virtio? #t) volatile-root? (extra-modules '())) - "Return a monadic derivation that builds a generic initrd. FILE-SYSTEMS is -a list of file-systems to be mounted by the initrd, possibly in addition to -the root file system specified on the kernel command line via '--root'. -MAPPED-DEVICES is a list of device mappings to realize before FILE-SYSTEMS are -mounted. + "Return a monadic derivation that builds a generic initrd, with kernel +modules taken from LINUX. FILE-SYSTEMS is a list of file-systems to be +mounted by the initrd, possibly in addition to the root file system specified +on the kernel command line via '--root'. MAPPED-DEVICES is a list of device +mappings to realize before FILE-SYSTEMS are mounted. When QEMU-NETWORKING? is true, set up networking with the standard QEMU parameters. When VIRTIO? is true, load additional modules so the initrd can -be used as a QEMU guest with para-virtualized I/O drivers. +be used as a QEMU guest with the root file system on a para-virtualized block +device. When VOLATILE-ROOT? is true, the root file system is writable but any changes to it are lost. @@ -224,7 +226,7 @@ loaded at boot time in the order in which they appear." (open source target))) mapped-devices)) - (mlet %store-monad ((kodir (flat-linux-module-directory linux-libre + (mlet %store-monad ((kodir (flat-linux-module-directory linux linux-modules))) (expression->initrd #~(begin diff --git a/gnu/system/nss.scm b/gnu/system/nss.scm index ec2d2517e7..f4d2855289 100644 --- a/gnu/system/nss.scm +++ b/gnu/system/nss.scm @@ -29,6 +29,8 @@ lookup-specification %default-nss + %mdns-host-lookup-nss + %files %compat %dns @@ -148,6 +150,27 @@ ;; Default NSS configuration. (name-service-switch)) +(define %mdns-host-lookup-nss + (name-service-switch + (hosts (list %files ;first, check /etc/hosts + + ;; If the above did not succeed, try with 'mdns_minimal'. + (name-service + (name "mdns_minimal") + + ;; 'mdns_minimal' is authoritative for '.local'. When it + ;; returns "not found", no need to try the next methods. + (reaction (lookup-specification + (not-found => return)))) + + ;; Then fall back to DNS. + (name-service + (name "dns")) + + ;; Finally, try with the "full" 'mdns'. + (name-service + (name "mdns")))))) + ;;; ;;; Serialization. diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index c93e26d65f..e194ed6cf1 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -149,6 +149,7 @@ made available under the /xchg CIFS share." (initrd (if initrd ; use the default initrd? (return initrd) (base-initrd %linux-vm-file-systems + #:linux linux #:virtio? #t #:qemu-networking? #t)))) diff --git a/guix/build-system/cmake.scm b/guix/build-system/cmake.scm index 0425e9fb39..25ac262d5d 100644 --- a/guix/build-system/cmake.scm +++ b/guix/build-system/cmake.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com> ;;; ;;; This file is part of GNU Guix. @@ -21,11 +21,13 @@ #:use-module (guix store) #:use-module (guix utils) #:use-module (guix derivations) + #:use-module (guix search-paths) #:use-module (guix build-system) #:use-module (guix build-system gnu) #:use-module (guix packages) #:use-module (ice-9 match) - #:export (cmake-build + #:export (%cmake-build-system-modules + cmake-build cmake-build-system)) ;; Commentary: @@ -35,6 +37,11 @@ ;; ;; Code: +(define %cmake-build-system-modules + ;; Build-side modules imported by default. + `((guix build cmake-build-system) + ,@%gnu-build-system-modules)) + (define (default-cmake) "Return the default CMake package." @@ -78,6 +85,7 @@ (tests? #t) (test-target "test") (parallel-build? #t) (parallel-tests? #f) + (validate-runpath? #t) (patch-shebangs? #t) (strip-binaries? #t) (strip-flags ''("--strip-debug")) @@ -86,9 +94,7 @@ (phases '(@ (guix build cmake-build-system) %standard-phases)) (system (%current-system)) - (imported-modules '((guix build cmake-build-system) - (guix build gnu-build-system) - (guix build utils))) + (imported-modules %cmake-build-system-modules) (modules '((guix build cmake-build-system) (guix build utils)))) "Build SOURCE using CMAKE, and with INPUTS. This assumes that SOURCE @@ -117,6 +123,7 @@ provides a 'CMakeLists.txt' file as its build system." #:test-target ,test-target #:parallel-build? ,parallel-build? #:parallel-tests? ,parallel-tests? + #:validate-runpath? ,validate-runpath? #:patch-shebangs? ,patch-shebangs? #:strip-binaries? ,strip-binaries? #:strip-flags ,strip-flags diff --git a/guix/build-system/glib-or-gtk.scm b/guix/build-system/glib-or-gtk.scm index 7a90587136..a1f0a9b8a4 100644 --- a/guix/build-system/glib-or-gtk.scm +++ b/guix/build-system/glib-or-gtk.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com> ;;; Copyright © 2014 Federico Beffa <beffa@fbengineering.ch> ;;; @@ -22,11 +22,13 @@ #:use-module (guix store) #:use-module (guix utils) #:use-module (guix derivations) + #:use-module (guix search-paths) #:use-module (guix build-system) #:use-module (guix build-system gnu) #:use-module (guix packages) #:use-module (ice-9 match) - #:export (glib-or-gtk-build + #:export (%glib-or-gtk-build-system-modules + glib-or-gtk-build glib-or-gtk-build-system)) ;; Commentary: @@ -67,11 +69,10 @@ '((guix build glib-or-gtk-build-system) (guix build utils))) -(define %default-imported-modules +(define %glib-or-gtk-build-system-modules ;; Build-side modules imported and used by default. - '((guix build gnu-build-system) - (guix build glib-or-gtk-build-system) - (guix build utils))) + `((guix build glib-or-gtk-build-system) + ,@%gnu-build-system-modules)) (define (default-glib) "Return the default glib package from which we use @@ -127,6 +128,7 @@ (test-target "check") (parallel-build? #t) (parallel-tests? #t) + (validate-runpath? #t) (patch-shebangs? #t) (strip-binaries? #t) (strip-flags ''("--strip-debug")) @@ -136,7 +138,7 @@ %standard-phases)) (glib-or-gtk-wrap-excluded-outputs ''()) (system (%current-system)) - (imported-modules %default-imported-modules) + (imported-modules %glib-or-gtk-build-system-modules) (modules %default-modules) allowed-references) "Build SOURCE with INPUTS. See GNU-BUILD for more details." @@ -175,6 +177,7 @@ #:test-target ,test-target #:parallel-build? ,parallel-build? #:parallel-tests? ,parallel-tests? + #:validate-runpath? ,validate-runpath? #:patch-shebangs? ,patch-shebangs? #:strip-binaries? ,strip-binaries? #:strip-flags ,strip-flags diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm index c91ad2ee0c..da664e5422 100644 --- a/guix/build-system/gnu.scm +++ b/guix/build-system/gnu.scm @@ -20,11 +20,13 @@ #:use-module (guix store) #:use-module (guix utils) #:use-module (guix derivations) + #:use-module (guix search-paths) #:use-module (guix build-system) #:use-module (guix packages) #:use-module (srfi srfi-1) #:use-module (ice-9 match) - #:export (gnu-build + #:export (%gnu-build-system-modules + gnu-build gnu-build-system standard-packages package-with-explicit-inputs @@ -41,9 +43,16 @@ ;; ;; Code: -(define %default-modules +(define %gnu-build-system-modules ;; Build-side modules imported and used by default. '((guix build gnu-build-system) + (guix build utils) + (guix build gremlin) + (guix elf))) + +(define %default-modules + ;; Modules in scope in the build-side environment. + '((guix build gnu-build-system) (guix build utils))) (define* (package-with-explicit-inputs p inputs @@ -182,7 +191,7 @@ runs `make distcheck' and whose result is one or more source tarballs." (let* ((args (default-keyword-arguments (package-arguments p) `(#:phases #f #:modules ,%default-modules - #:imported-modules ,%default-modules)))) + #:imported-modules ,%gnu-build-system-modules)))) (substitute-keyword-arguments args ((#:modules modules) `((guix build gnu-dist) @@ -196,9 +205,10 @@ runs `make distcheck' and whose result is one or more source tarballs." ;; Add autotools & co. as inputs. (let ((ref (lambda (module var) (module-ref (resolve-interface module) var)))) - `(("autoconf" ,(ref '(gnu packages autotools) 'autoconf)) + `(,@(package-native-inputs p) + ("autoconf" ,(ref '(gnu packages autotools) 'autoconf)) ("automake" ,(ref '(gnu packages autotools) 'automake)) - ("libtool" ,(ref '(gnu packages autotools) 'libtool) "bin") + ("libtool" ,(ref '(gnu packages autotools) 'libtool)) ("gettext" ,(ref '(gnu packages gettext) 'gnu-gettext)) ("texinfo" ,(ref '(gnu packages texinfo) 'texinfo)))))))) @@ -277,10 +287,11 @@ standard packages used as implicit inputs of the GNU build system." (strip-flags ''("--strip-debug")) (strip-directories ''("lib" "lib64" "libexec" "bin" "sbin")) + (validate-runpath? #t) (phases '%standard-phases) (locale "en_US.UTF-8") (system (%current-system)) - (imported-modules %default-modules) + (imported-modules %gnu-build-system-modules) (modules %default-modules) (substitutable? #t) allowed-references) @@ -339,6 +350,7 @@ are allowed to refer to." #:parallel-tests? ,parallel-tests? #:patch-shebangs? ,patch-shebangs? #:strip-binaries? ,strip-binaries? + #:validate-runpath? ,validate-runpath? #:strip-flags ,strip-flags #:strip-directories ,strip-directories))) @@ -411,13 +423,12 @@ is one of `host' or `target'." (strip-flags ''("--strip-debug")) (strip-directories ''("lib" "lib64" "libexec" "bin" "sbin")) + (validate-runpath? #t) (phases '%standard-phases) (locale "en_US.UTF-8") (system (%current-system)) - (imported-modules '((guix build gnu-build-system) - (guix build utils))) - (modules '((guix build gnu-build-system) - (guix build utils))) + (imported-modules %gnu-build-system-modules) + (modules %default-modules) (substitutable? #t) allowed-references) "Cross-build NAME for TARGET, where TARGET is a GNU triplet. INPUTS are @@ -486,6 +497,7 @@ platform." #:parallel-tests? ,parallel-tests? #:patch-shebangs? ,patch-shebangs? #:strip-binaries? ,strip-binaries? + #:validate-runpath? ,validate-runpath? #:strip-flags ,strip-flags #:strip-directories ,strip-directories)))) diff --git a/guix/build-system/haskell.scm b/guix/build-system/haskell.scm new file mode 100644 index 0000000000..1cb734631c --- /dev/null +++ b/guix/build-system/haskell.scm @@ -0,0 +1,140 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (guix build-system haskell) + #:use-module (guix store) + #:use-module (guix utils) + #:use-module (guix packages) + #:use-module (guix derivations) + #:use-module (guix search-paths) + #:use-module (guix build-system) + #:use-module (guix build-system gnu) + #:use-module (ice-9 match) + #:use-module (srfi srfi-26) + #:export (%haskell-build-system-modules + haskell-build + haskell-build-system)) + +;; Commentary: +;; +;; Standard build procedure for Haskell packages using 'Setup.hs'. This is +;; implemented as an extension of 'gnu-build-system'. +;; +;; Code: + +(define %haskell-build-system-modules + ;; Build-side modules imported by default. + `((guix build haskell-build-system) + ,@%gnu-build-system-modules)) + +(define (default-haskell) + "Return the default Haskell package." + ;; Lazily resolve the binding to avoid a circular dependency. + (let ((haskell (resolve-interface '(gnu packages haskell)))) + (module-ref haskell 'ghc))) + +(define* (lower name + #:key source inputs native-inputs outputs system target + (haskell (default-haskell)) + #:allow-other-keys + #:rest arguments) + "Return a bag for NAME." + (define private-keywords + '(#:target #:haskell #:inputs #:native-inputs)) + + (and (not target) ;XXX: no cross-compilation + (bag + (name name) + (system system) + (host-inputs `(,@(if source + `(("source" ,source)) + '()) + ,@inputs + + ;; Keep the standard inputs of 'gnu-build-system'. + ,@(standard-packages))) + (build-inputs `(("haskell" ,haskell) + ,@native-inputs)) + (outputs outputs) + (build haskell-build) + (arguments (strip-keyword-arguments private-keywords arguments))))) + +(define* (haskell-build store name inputs + #:key source + (haddock? #t) + (haddock-flags ''()) + (tests? #t) + (test-target "test") + (configure-flags ''()) + (phases '(@ (guix build haskell-build-system) + %standard-phases)) + (outputs '("out")) + (search-paths '()) + (system (%current-system)) + (guile #f) + (imported-modules %haskell-build-system-modules) + (modules '((guix build haskell-build-system) + (guix build utils)))) + "Build SOURCE using HASKELL, and with INPUTS. This assumes that SOURCE +provides a 'Setup.hs' file as its build system." + (define builder + `(begin + (use-modules ,@modules) + (haskell-build #:name ,name + #:source ,(match (assoc-ref inputs "source") + (((? derivation? source)) + (derivation->output-path source)) + ((source) + source) + (source + source)) + #:configure-flags ,configure-flags + #:haddock-flags ,haddock-flags + #:system ,system + #:test-target ,test-target + #:tests? ,tests? + #:haddock? ,haddock? + #:phases ,phases + #:outputs %outputs + #:search-paths ',(map search-path-specification->sexp + search-paths) + #:inputs %build-inputs))) + + (define guile-for-build + (match guile + ((? package?) + (package-derivation store guile system #:graft? #f)) + (#f ; the default + (let* ((distro (resolve-interface '(gnu packages commencement))) + (guile (module-ref distro 'guile-final))) + (package-derivation store guile system #:graft? #f))))) + + (build-expression->derivation store name builder + #:inputs inputs + #:system system + #:modules imported-modules + #:outputs outputs + #:guile-for-build guile-for-build)) + +(define haskell-build-system + (build-system + (name 'haskell) + (description "The standard Haskell build system") + (lower lower))) + +;;; haskell.scm ends here diff --git a/guix/build-system/perl.scm b/guix/build-system/perl.scm index e0f86438a8..06af1dd20e 100644 --- a/guix/build-system/perl.scm +++ b/guix/build-system/perl.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,11 +20,13 @@ #:use-module (guix store) #:use-module (guix utils) #:use-module (guix derivations) + #:use-module (guix search-paths) #:use-module (guix build-system) #:use-module (guix build-system gnu) #:use-module (guix packages) #:use-module (ice-9 match) - #:export (perl-build + #:export (%perl-build-system-modules + perl-build perl-build-system)) ;; Commentary: @@ -35,6 +37,11 @@ ;; ;; Code: +(define %perl-build-system-modules + ;; Build-side modules imported by default. + `((guix build perl-build-system) + ,@%gnu-build-system-modules)) + (define (default-perl) "Return the default Perl package." @@ -83,9 +90,7 @@ (outputs '("out")) (system (%current-system)) (guile #f) - (imported-modules '((guix build perl-build-system) - (guix build gnu-build-system) - (guix build utils))) + (imported-modules %perl-build-system-modules) (modules '((guix build perl-build-system) (guix build utils)))) "Build SOURCE using PERL, and with INPUTS. This assumes that SOURCE diff --git a/guix/build-system/python.scm b/guix/build-system/python.scm index 37108650d0..e9fffcc62f 100644 --- a/guix/build-system/python.scm +++ b/guix/build-system/python.scm @@ -23,11 +23,13 @@ #:use-module (guix utils) #:use-module (guix packages) #:use-module (guix derivations) + #:use-module (guix search-paths) #:use-module (guix build-system) #:use-module (guix build-system gnu) #:use-module (ice-9 match) #:use-module (srfi srfi-26) - #:export (package-with-python2 + #:export (%python-build-system-modules + package-with-python2 python-build python-build-system)) @@ -38,6 +40,11 @@ ;; ;; Code: +(define %python-build-system-modules + ;; Build-side modules imported by default. + `((guix build python-build-system) + ,@%gnu-build-system-modules)) + (define (default-python) "Return the default Python package." ;; Lazily resolve the binding to avoid a circular dependency. @@ -132,9 +139,7 @@ prepended to the name." (search-paths '()) (system (%current-system)) (guile #f) - (imported-modules '((guix build python-build-system) - (guix build gnu-build-system) - (guix build utils))) + (imported-modules %python-build-system-modules) (modules '((guix build python-build-system) (guix build utils)))) "Build SOURCE using PYTHON, and with INPUTS. This assumes that SOURCE diff --git a/guix/build-system/ruby.scm b/guix/build-system/ruby.scm index 08301ec609..e4fda30cf3 100644 --- a/guix/build-system/ruby.scm +++ b/guix/build-system/ruby.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014 David Thompson <davet@gnu.org> -;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -22,12 +22,19 @@ #:use-module (guix utils) #:use-module (guix packages) #:use-module (guix derivations) + #:use-module (guix search-paths) #:use-module (guix build-system) #:use-module (guix build-system gnu) #:use-module (ice-9 match) - #:export (ruby-build + #:export (%ruby-build-system-modules + ruby-build ruby-build-system)) +(define %ruby-build-system-modules + ;; Build-side modules imported by default. + `((guix build ruby-build-system) + ,@%gnu-build-system-modules)) + (define (default-ruby) "Return the default Ruby package." ;; Lazily resolve the binding to avoid a circular dependency. @@ -72,9 +79,7 @@ (search-paths '()) (system (%current-system)) (guile #f) - (imported-modules '((guix build ruby-build-system) - (guix build gnu-build-system) - (guix build utils))) + (imported-modules %ruby-build-system-modules) (modules '((guix build ruby-build-system) (guix build utils)))) "Build SOURCE using RUBY and INPUTS." diff --git a/guix/build-system/waf.scm b/guix/build-system/waf.scm index 494cb957ac..044d2a0829 100644 --- a/guix/build-system/waf.scm +++ b/guix/build-system/waf.scm @@ -21,13 +21,15 @@ #:use-module (guix utils) #:use-module (guix packages) #:use-module (guix derivations) + #:use-module (guix search-paths) #:use-module (guix build-system) #:use-module (guix build-system gnu) #:use-module ((guix build-system python) #:select (default-python default-python2)) #:use-module (ice-9 match) #:use-module (srfi srfi-26) - #:export (waf-build + #:export (%waf-build-system-modules + waf-build waf-build-system)) ;; Commentary: @@ -38,6 +40,11 @@ ;; ;; Code: +(define %waf-build-system-modules + ;; Build-side modules imported by default. + `((guix build waf-build-system) + ,@%gnu-build-system-modules)) + (define* (lower name #:key source inputs native-inputs outputs system target (python (default-python)) @@ -75,9 +82,7 @@ (search-paths '()) (system (%current-system)) (guile #f) - (imported-modules '((guix build waf-build-system) - (guix build gnu-build-system) - (guix build utils))) + (imported-modules %waf-build-system-modules) (modules '((guix build waf-build-system) (guix build utils)))) "Build SOURCE with INPUTS. This assumes that SOURCE provides a 'waf' file diff --git a/guix/build/cmake-build-system.scm b/guix/build/cmake-build-system.scm index d8d437c653..f57622e0f4 100644 --- a/guix/build/cmake-build-system.scm +++ b/guix/build/cmake-build-system.scm @@ -73,8 +73,8 @@ ;; Everything is as with the GNU Build System except for the `configure' ;; and 'check' phases. (modify-phases gnu:%standard-phases - (replace check check) - (replace configure configure))) + (replace 'check check) + (replace 'configure configure))) (define* (cmake-build #:key inputs (phases %standard-phases) #:allow-other-keys #:rest args) diff --git a/guix/build/download.scm b/guix/build/download.scm index a3105ad41d..65d18eb839 100644 --- a/guix/build/download.scm +++ b/guix/build/download.scm @@ -19,7 +19,7 @@ (define-module (guix build download) #:use-module (web uri) - #:use-module (web client) + #:use-module ((web client) #:hide (open-socket-for-uri)) #:use-module (web response) #:use-module (guix ftp-client) #:use-module (guix build utils) @@ -30,7 +30,8 @@ #:use-module (srfi srfi-26) #:use-module (ice-9 match) #:use-module (ice-9 format) - #:export (open-connection-for-uri + #:export (open-socket-for-uri + open-connection-for-uri resolve-uri-reference maybe-expand-mirrors url-fetch @@ -195,47 +196,54 @@ host name without trailing dot." (add-weak-reference record port) record))) +(define (open-socket-for-uri uri) + "Return an open port for URI. This variant works around +<http://bugs.gnu.org/15368> which affects Guile's 'open-socket-for-uri' up to +2.0.11 included." + (define rmem-max + ;; The maximum size for a receive buffer on Linux, see socket(7). + "/proc/sys/net/core/rmem_max") + + (define buffer-size + (if (file-exists? rmem-max) + (call-with-input-file rmem-max read) + 126976)) ;the default for Linux, per 'rmem_default' + + (let ((s ((@ (web client) open-socket-for-uri) uri))) + ;; Work around <http://bugs.gnu.org/15368> by restoring a decent + ;; buffer size. + (setsockopt s SOL_SOCKET SO_RCVBUF buffer-size) + s)) + (define (open-connection-for-uri uri) - "Return an open input/output port for a connection to URI. - -This is the same as Guile's `open-socket-for-uri', except that we always -use a numeric port argument, to avoid the need to go through libc's NSS, -which is not available during bootstrap." - (define addresses - (let ((port (or (uri-port uri) - (case (uri-scheme uri) - ((http) 80) ; /etc/services, not for me! - ((https) 443) - (else - (error "unsupported URI scheme" uri)))))) - (delete-duplicates (getaddrinfo (uri-host uri) - (number->string port) - AI_NUMERICSERV) - (lambda (ai1 ai2) - (equal? (addrinfo:addr ai1) - (addrinfo:addr ai2)))))) - - (let loop ((addresses addresses)) - (let* ((ai (car addresses)) - (s (with-fluids ((%default-port-encoding #f)) - ;; Restrict ourselves to TCP. - (socket (addrinfo:fam ai) SOCK_STREAM IPPROTO_IP)))) - (catch 'system-error - (lambda () - (connect s (addrinfo:addr ai)) - - ;; Buffer input and output on this port. - (setvbuf s _IOFBF %http-receive-buffer-size) - - (if (eq? 'https (uri-scheme uri)) - (tls-wrap s (uri-host uri)) - s)) - (lambda args - ;; Connection failed, so try one of the other addresses. - (close s) - (if (null? (cdr addresses)) - (apply throw args) - (loop (cdr addresses)))))))) + "Like 'open-socket-for-uri', but also handle HTTPS connections." + (define https? + (eq? 'https (uri-scheme uri))) + + (let-syntax ((with-https-proxy + (syntax-rules () + ((_ exp) + ;; For HTTPS URIs, honor 'https_proxy', not 'http_proxy'. + ;; FIXME: Proxying is not supported for https. + (let ((thunk (lambda () exp))) + (if (and https? + (module-variable + (resolve-interface '(web client)) + 'current-http-proxy)) + (parameterize ((current-http-proxy #f)) + (when (getenv "https_proxy") + (format (current-error-port) + "warning: 'https_proxy' is ignored~%")) + (thunk)) + (thunk))))))) + (with-https-proxy + (let ((s (open-socket-for-uri uri))) + ;; Buffer input and output on this port. + (setvbuf s _IOFBF %http-receive-buffer-size) + + (if https? + (tls-wrap s (uri-host uri)) + s))))) ;; XXX: This is an awful hack to make sure the (set-port-encoding! p ;; "ISO-8859-1") call in `read-response' passes, even during bootstrap diff --git a/guix/build/glib-or-gtk-build-system.scm b/guix/build/glib-or-gtk-build-system.scm index c57bc3e731..15d7de2236 100644 --- a/guix/build/glib-or-gtk-build-system.scm +++ b/guix/build/glib-or-gtk-build-system.scm @@ -140,7 +140,9 @@ add a dependency of that output on GLib and GTK+." ((output . directory) (unless (member output glib-or-gtk-wrap-excluded-outputs) (let* ((bindir (string-append directory "/bin")) - (bin-list (find-files bindir ".*")) + (libexecdir (string-append directory "/libexec")) + (bin-list (append (find-files bindir ".*") + (find-files libexecdir ".*"))) (datadirs (data-directories (alist-cons output directory inputs))) (gtk-mod-dirs (gtk-module-directories @@ -240,9 +242,9 @@ needed." (define %standard-phases (modify-phases gnu:%standard-phases - (add-after install glib-or-gtk-compile-schemas compile-glib-schemas) - (add-after install glib-or-gtk-icon-cache generate-icon-cache) - (add-after install glib-or-gtk-wrap wrap-all-programs))) + (add-after 'install 'glib-or-gtk-compile-schemas compile-glib-schemas) + (add-after 'install 'glib-or-gtk-icon-cache generate-icon-cache) + (add-after 'install 'glib-or-gtk-wrap wrap-all-programs))) (define* (glib-or-gtk-build #:key inputs (phases %standard-phases) #:allow-other-keys #:rest args) diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm index 5ae537150f..5062479360 100644 --- a/guix/build/gnu-build-system.scm +++ b/guix/build/gnu-build-system.scm @@ -18,12 +18,15 @@ (define-module (guix build gnu-build-system) #:use-module (guix build utils) + #:use-module (guix build gremlin) + #:use-module (guix elf) #:use-module (ice-9 ftw) #:use-module (ice-9 match) #:use-module (ice-9 regex) #:use-module (ice-9 format) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) + #:use-module (rnrs io ports) #:export (%standard-phases gnu-build)) @@ -161,7 +164,10 @@ files such as `.in' templates. Most scripts honor $SHELL and $CONFIG_SHELL, but some don't, such as `mkinstalldirs' or Automake's `missing' script." (for-each patch-shebang - (remove file-is-directory? (find-files "." ".*")))) + (remove (lambda (file) + (or (not (file-exists? file)) ;dangling symlink + (file-is-directory? file))) + (find-files ".")))) (define (patch-generated-file-shebangs . rest) "Patch shebangs in generated files, including `SHELL' variables in @@ -170,9 +176,10 @@ makefiles." ;; `configure'. (for-each patch-shebang (filter (lambda (file) - (and (executable-file? file) + (and (file-exists? file) + (executable-file? file) (not (file-is-directory? file)))) - (find-files "." ".*"))) + (find-files "."))) ;; Patch `SHELL' in generated makefiles. (for-each patch-makefile-SHELL (find-files "." "^(GNU)?[mM]akefile$"))) @@ -398,6 +405,64 @@ makefiles." strip-directories))) outputs)))) +(define (every* pred lst) + "This is like 'every', but process all the elements of LST instead of +stopping as soon as PRED returns false. This is useful when PRED has side +effects, such as displaying warnings or error messages." + (let loop ((lst lst) + (result #t)) + (match lst + (() + result) + ((head . tail) + (loop tail (and (pred head) result)))))) + +(define* (validate-runpath #:key + (validate-runpath? #t) + (elf-directories '("lib" "lib64" "libexec" + "bin" "sbin")) + outputs #:allow-other-keys) + "When VALIDATE-RUNPATH? is true, validate that all the ELF files in +ELF-DIRECTORIES have their dependencies found in their 'RUNPATH'. + +Since the ELF parser needs to have a copy of files in memory, better run this +phase after stripping." + (define (sub-directory parent) + (lambda (directory) + (let ((directory (string-append parent "/" directory))) + (and (directory-exists? directory) directory)))) + + (define (validate directory) + (define (file=? file1 file2) + (let ((st1 (stat file1)) + (st2 (stat file2))) + (= (stat:ino st1) (stat:ino st2)))) + + ;; There are always symlinks from '.so' to '.so.1' and so on, so delete + ;; duplicates. + (let ((files (delete-duplicates (find-files directory (lambda (file stat) + (elf-file? file))) + file=?))) + (format (current-error-port) + "validating RUNPATH of ~a binaries in ~s...~%" + (length files) directory) + (every* validate-needed-in-runpath files))) + + (if validate-runpath? + (let ((dirs (append-map (match-lambda + (("debug" . _) + ;; The "debug" output is full of ELF files + ;; that are not worth checking. + '()) + ((name . output) + (filter-map (sub-directory output) + elf-directories))) + outputs))) + (every* validate dirs)) + (begin + (format (current-error-port) "skipping RUNPATH validation~%") + #t))) + (define* (validate-documentation-location #:key outputs #:allow-other-keys) "Documentation should go to 'share/info' and 'share/man', not just 'info/' @@ -477,6 +542,16 @@ DOCUMENTATION-COMPRESSOR-FLAGS." (format #t "not compressing documentation~%") #t))) +(define* (delete-info-dir-file #:key outputs #:allow-other-keys) + "Delete any 'share/info/dir' file from OUTPUTS." + (for-each (match-lambda + ((output . directory) + (let ((info-dir-file (string-append directory "/share/info/dir"))) + (when (file-exists? info-dir-file) + (delete-file info-dir-file))))) + outputs) + #t) + (define %standard-phases ;; Standard build phases, as a list of symbol/procedure pairs. (let-syntax ((phases (syntax-rules () @@ -486,7 +561,9 @@ DOCUMENTATION-COMPRESSOR-FLAGS." patch-source-shebangs configure patch-generated-file-shebangs build check install patch-shebangs strip + validate-runpath validate-documentation-location + delete-info-dir-file compress-documentation))) diff --git a/guix/build/gnu-dist.scm b/guix/build/gnu-dist.scm index 887b5e94e9..ad69c6cf16 100644 --- a/guix/build/gnu-dist.scm +++ b/guix/build/gnu-dist.scm @@ -83,10 +83,10 @@ (define %dist-phases ;; Phases for building a source tarball. (modify-phases %standard-phases - (delete strip) - (replace install install-dist) - (replace build build) - (add-before configure autoreconf autoreconf) - (replace unpack copy-source))) + (delete 'strip) + (replace 'install install-dist) + (replace 'build build) + (add-before 'configure 'autoreconf autoreconf) + (replace 'unpack copy-source))) ;;; gnu-dist.scm ends here diff --git a/guix/build/gremlin.scm b/guix/build/gremlin.scm new file mode 100644 index 0000000000..fed529b193 --- /dev/null +++ b/guix/build/gremlin.scm @@ -0,0 +1,309 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (guix build gremlin) + #:use-module (guix elf) + #:use-module ((guix build utils) #:select (store-file-name?)) + #:use-module (ice-9 match) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-9) + #:use-module (srfi srfi-26) + #:use-module (srfi srfi-34) + #:use-module (srfi srfi-35) + #:use-module (system foreign) + #:use-module (rnrs bytevectors) + #:use-module (rnrs io ports) + #:export (elf-error? + elf-error-elf + invalid-segment-size? + invalid-segment-size-segment + + elf-dynamic-info + elf-dynamic-info? + elf-dynamic-info-sopath + elf-dynamic-info-needed + elf-dynamic-info-rpath + elf-dynamic-info-runpath + expand-origin + + validate-needed-in-runpath)) + +;;; Commentary: +;;; +;;; A gremlin is sort-of like an elf, you know, and this module provides tools +;;; to deal with dynamic-link information from ELF files. +;;; +;;; Code: + +(define-condition-type &elf-error &error + elf-error? + (elf elf-error-elf)) + +(define-condition-type &invalid-segment-size &elf-error + invalid-segment-size? + (segment invalid-segment-size-segment)) + + +(define (dynamic-link-segment elf) + "Return the 'PT_DYNAMIC' segment of ELF--i.e., the segment that contains +dynamic linking information." + (let ((size (bytevector-length (elf-bytes elf)))) + (find (lambda (segment) + (unless (<= (+ (elf-segment-offset segment) + (elf-segment-filesz segment)) + size) + ;; This happens on separate debug output files created by + ;; 'strip --only-keep-debug' (Binutils 2.25.) + (raise (condition (&invalid-segment-size + (elf elf) + (segment segment))))) + + (= (elf-segment-type segment) PT_DYNAMIC)) + (elf-segments elf)))) + +(define (word-reader size byte-order) + "Return a procedure to read a word of SIZE bytes according to BYTE-ORDER." + (case size + ((8) + (lambda (bv index) + (bytevector-u64-ref bv index byte-order))) + ((4) + (lambda (bv index) + (bytevector-u32-ref bv index byte-order))))) + + +;; Dynamic entry: +;; +;; typedef struct +;; { +;; Elf64_Sxword d_tag; /* Dynamic entry type */ +;; union +;; { +;; Elf64_Xword d_val; /* Integer value */ +;; Elf64_Addr d_ptr; /* Address value */ +;; } d_un; +;; } Elf64_Dyn; + +(define (raw-dynamic-entries elf segment) + "Return as a list of type/value pairs all the dynamic entries found in +SEGMENT, the 'PT_DYNAMIC' segment of ELF. In the result, each car is a DT_ +value, and the interpretation of the cdr depends on the type." + (define start + (elf-segment-offset segment)) + (define bytes + (elf-bytes elf)) + (define word-size + (elf-word-size elf)) + (define byte-order + (elf-byte-order elf)) + (define read-word + (word-reader word-size byte-order)) + + (let loop ((offset 0) + (result '())) + (if (>= offset (elf-segment-memsz segment)) + (reverse result) + (let ((type (read-word bytes (+ start offset))) + (value (read-word bytes (+ start offset word-size)))) + (if (= type DT_NULL) ;finished? + (reverse result) + (loop (+ offset (* 2 word-size)) + (alist-cons type value result))))))) + +(define (vma->offset elf vma) + "Convert VMA, a virtual memory address, to an offset within ELF. + +Do that by looking at the loadable program segment (PT_LOAD) of ELF that +contains VMA and by taking into account that segment's virtual address and +offset." + ;; See 'offset_from_vma' in Binutils. + (define loads + (filter (lambda (segment) + (= (elf-segment-type segment) PT_LOAD)) + (elf-segments elf))) + + (let ((load (find (lambda (segment) + (let ((vaddr (elf-segment-vaddr segment))) + (and (>= vma vaddr) + (< vma (+ (elf-segment-memsz segment) + vaddr))))) + loads))) + (+ (- vma (elf-segment-vaddr load)) + (elf-segment-offset load)))) + +(define (dynamic-entries elf segment) + "Return all the dynamic entries found in SEGMENT, the 'PT_DYNAMIC' segment +of ELF, as a list of type/value pairs. The type is a DT_ value, and the value +may be a string or an integer depending on the entry type (for instance, the +value of DT_NEEDED entries is a string.)" + (define entries + (raw-dynamic-entries elf segment)) + + (define string-table-offset + (any (match-lambda + ((type . value) + (and (= type DT_STRTAB) value)) + (_ #f)) + entries)) + + (define (interpret-dynamic-entry type value) + (cond ((memv type (list DT_NEEDED DT_SONAME DT_RPATH DT_RUNPATH)) + (if string-table-offset + (pointer->string + (bytevector->pointer (elf-bytes elf) + (vma->offset + elf + (+ string-table-offset value)))) + value)) + (else + value))) + + (map (match-lambda + ((type . value) + (cons type (interpret-dynamic-entry type value)))) + entries)) + + +;;; +;;; High-level interface. +;;; + +(define-record-type <elf-dynamic-info> + (%elf-dynamic-info soname needed rpath runpath) + elf-dynamic-info? + (soname elf-dynamic-info-soname) + (needed elf-dynamic-info-needed) + (rpath elf-dynamic-info-rpath) + (runpath elf-dynamic-info-runpath)) + +(define search-path->list + (let ((not-colon (char-set-complement (char-set #\:)))) + (lambda (str) + "Split STR on ':' characters." + (string-tokenize str not-colon)))) + +(define (elf-dynamic-info elf) + "Return dynamic-link information for ELF as an <elf-dynamic-info> object, or +#f if ELF lacks dynamic-link information." + (match (dynamic-link-segment elf) + (#f #f) + ((? elf-segment? dynamic) + (let ((entries (dynamic-entries elf dynamic))) + (%elf-dynamic-info (assv-ref entries DT_SONAME) + (filter-map (match-lambda + ((type . value) + (and (= type DT_NEEDED) value)) + (_ #f)) + entries) + (or (and=> (assv-ref entries DT_RPATH) + search-path->list) + '()) + (or (and=> (assv-ref entries DT_RUNPATH) + search-path->list) + '())))))) + +(define %libc-libraries + ;; List of libraries as of glibc 2.21 (there are more but those are + ;; typically mean to be LD_PRELOADed and thus do not appear as NEEDED.) + '("libanl.so" + "libcrypt.so" + "libc.so" + "libdl.so" + "libm.so" + "libnsl.so" ;NEEDED by nscd + "libpthread.so" + "libresolv.so" + "librt.so" + "libutil.so")) + +(define (libc-library? lib) + "Return #t if LIB is one of the libraries shipped with the GNU C Library." + (find (lambda (libc-lib) + (string-prefix? libc-lib lib)) + %libc-libraries)) + +(define (expand-variable str variable value) + "Replace occurrences of '$VARIABLE' or '${VARIABLE}' in STR with VALUE." + (define variables + (list (string-append "$" variable) + (string-append "${" variable "}"))) + + (let loop ((thing variables) + (str str)) + (match thing + (() + str) + ((head tail ...) + (let ((index (string-contains str head)) + (len (string-length head))) + (loop (if index variables tail) + (if index + (string-replace str value + index (+ index len)) + str))))))) + +(define (expand-origin str directory) + "Replace occurrences of '$ORIGIN' in STR with DIRECTORY." + (expand-variable str "ORIGIN" directory)) + +(define* (validate-needed-in-runpath file + #:key (always-found? libc-library?)) + "Return #t if all the libraries listed as FILE's 'DT_NEEDED' entries are +present in its RUNPATH, or if FILE lacks dynamic-link information. Return #f +otherwise. Libraries whose name matches ALWAYS-FOUND? are considered to be +always available." + (guard (c ((invalid-segment-size? c) + (let ((segment (invalid-segment-size-segment c))) + (format (current-error-port) + "~a: error: offset + size of segment ~a (type ~a) \ +exceeds total size~%" + file + (elf-segment-index segment) + (elf-segment-type segment)) + #f))) + + (let* ((elf (call-with-input-file file + (compose parse-elf get-bytevector-all))) + (expand (cute expand-origin <> (dirname file))) + (dyninfo (elf-dynamic-info elf))) + (when dyninfo + ;; XXX: In theory we should also expand $PLATFORM and $LIB, but these + ;; appear to be really unused. + (let* ((expanded (map expand (elf-dynamic-info-runpath dyninfo))) + (runpath (filter store-file-name? expanded)) + (bogus (remove store-file-name? expanded)) + (needed (remove always-found? + (elf-dynamic-info-needed dyninfo))) + (not-found (remove (cut search-path runpath <>) + needed))) + (unless (null? bogus) + (format (current-error-port) + "~a: warning: RUNPATH contains bogus entries: ~s~%" + file bogus)) + + (for-each (lambda (lib) + (format (current-error-port) + "~a: error: depends on '~a', which cannot \ +be found in RUNPATH ~s~%" + file lib runpath)) + not-found) + ;; (when (null? not-found) + ;; (format (current-error-port) "~a is OK~%" file)) + (null? not-found)))))) + +;;; gremlin.scm ends here diff --git a/guix/build/haskell-build-system.scm b/guix/build/haskell-build-system.scm new file mode 100644 index 0000000000..d382ee403d --- /dev/null +++ b/guix/build/haskell-build-system.scm @@ -0,0 +1,214 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (guix build haskell-build-system) + #:use-module ((guix build gnu-build-system) #:prefix gnu:) + #:use-module (guix build utils) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26) + #:use-module (ice-9 rdelim) + #:use-module (ice-9 regex) + #:use-module (ice-9 match) + #:export (%standard-phases + haskell-build)) + +;; Commentary: +;; +;; Builder-side code of the standard Haskell package build procedure. +;; +;; The Haskell compiler, to find libraries, relies on a library database with +;; a binary cache. For GHC the cache has to be named 'package.cache'. If every +;; library would generate the cache at build time, then they would clash in +;; profiles. For this reason we do not generate the cache when we generate +;; libraries substitutes. Instead: +;; +;; - At build time we use the 'setup-compiler' phase to generate a temporary +;; library database and its cache. +;; +;; - We generate the cache when a profile is created. +;; +;; Code: + +;; Directory where we create the temporary libraries database with its cache +;; as required by the compiler. +(define %tmp-db-dir + (string-append (or (getenv "TMP") "/tmp") + "/package.conf.d")) + +(define (run-setuphs command params) + (let ((setup-file (cond + ((file-exists? "Setup.hs") + "Setup.hs") + ((file-exists? "Setup.lhs") + "Setup.lhs") + (else + #f)))) + (if setup-file + (begin + (format #t "running \"runhaskell Setup.hs\" with command ~s \ +and parameters ~s~%" + command params) + (zero? (apply system* "runhaskell" setup-file command params))) + (error "no Setup.hs nor Setup.lhs found")))) + +(define* (configure #:key outputs inputs tests? (configure-flags '()) + #:allow-other-keys) + "Configure a given Haskell package." + (let* ((out (assoc-ref outputs "out")) + (doc (assoc-ref outputs "doc")) + (lib (assoc-ref outputs "lib")) + (bin (assoc-ref outputs "bin")) + (input-dirs (match inputs + (((_ . dir) ...) + dir) + (_ '()))) + (params (append `(,(string-append "--prefix=" out)) + `(,(string-append "--libdir=" (or lib out) "/lib")) + `(,(string-append "--bindir=" (or bin out) "/bin")) + `(,(string-append + "--docdir=" (or doc out) + "/share/doc/" (package-name-version out))) + '("--libsubdir=$compiler/$pkg-$version") + `(,(string-append "--package-db=" %tmp-db-dir)) + '("--global") + `(,@(map + (cut string-append "--extra-include-dirs=" <>) + (search-path-as-list '("include") input-dirs))) + `(,@(map + (cut string-append "--extra-lib-dirs=" <>) + (search-path-as-list '("lib") input-dirs))) + (if tests? + '("--enable-tests") + '()) + configure-flags))) + (run-setuphs "configure" params))) + +(define* (build #:rest empty) + "Build a given Haskell package." + (run-setuphs "build" '())) + +(define* (install #:rest empty) + "Install a given Haskell package." + (run-setuphs "copy" '())) + +(define (package-name-version store-dir) + "Given a store directory STORE-DIR return 'name-version' of the package." + (let* ((base (basename store-dir))) + (string-drop base + (+ 1 (string-index base #\-))))) + +(define (grep rx port) + "Given a regular-expression RX including a group, read from PORT until the +first match and return the content of the group." + (let ((line (read-line port))) + (if (eof-object? line) + #f + (let ((rx-result (regexp-exec rx line))) + (if rx-result + (match:substring rx-result 1) + (grep rx port)))))) + +(define* (setup-compiler #:key system inputs outputs #:allow-other-keys) + "Setup the compiler environment." + (let* ((haskell (assoc-ref inputs "haskell")) + (name-version (package-name-version haskell))) + (cond + ((string-match "ghc" name-version) + (make-ghc-package-database system inputs outputs)) + (else + (format #t + "Compiler ~a not supported~%" name-version))))) + +(define (make-ghc-package-database system inputs outputs) + "Generate the GHC package database." + (let* ((haskell (assoc-ref inputs "haskell")) + (input-dirs (match inputs + (((_ . dir) ...) + dir) + (_ '()))) + (conf-dirs (search-path-as-list + `(,(string-append "lib/" + (package-name-version haskell) + "/package.conf.d")) + input-dirs)) + (conf-files (append-map (cut find-files <> "\\.conf$") conf-dirs))) + (mkdir-p %tmp-db-dir) + (for-each (lambda (file) + (copy-file file + (string-append %tmp-db-dir "/" (basename file)))) + conf-files) + (zero? (system* "ghc-pkg" + (string-append "--package-db=" %tmp-db-dir) + "recache")))) + +(define* (register #:key name system inputs outputs #:allow-other-keys) + "Generate the compiler registration file for a given Haskell package. Don't +generate the cache as it would clash in user profiles." + (let* ((out (assoc-ref outputs "out")) + (haskell (assoc-ref inputs "haskell")) + (lib (string-append out "/lib")) + (config-dir (string-append lib "/" + (package-name-version haskell) + "/package.conf.d")) + (id-rx (make-regexp "^id: *(.*)$")) + (lib-rx (make-regexp "lib.*\\.(a|so)")) + (config-file (string-append config-dir "/" name ".conf")) + (params + (list (string-append "--gen-pkg-config=" config-file)))) + (unless (null? (find-files lib lib-rx)) + (mkdir-p config-dir) + (run-setuphs "register" params) + (let ((config-file-name+id + (call-with-ascii-input-file config-file (cut grep id-rx <>)))) + (rename-file config-file + (string-append config-dir "/" config-file-name+id + ".conf")))) + #t)) + +(define* (check #:key tests? test-target #:allow-other-keys) + "Run the test suite of a given Haskell package." + (if tests? + (run-setuphs test-target '()) + (begin + (format #t "test suite not run~%") + #t))) + +(define* (haddock #:key outputs haddock? haddock-flags #:allow-other-keys) + "Run the test suite of a given Haskell package." + (if haddock? + (run-setuphs "haddock" haddock-flags) + #t)) + +(define %standard-phases + (modify-phases gnu:%standard-phases + (add-before 'configure 'setup-compiler setup-compiler) + (add-before 'install 'haddock haddock) + (add-after 'install 'register register) + (replace 'install install) + (replace 'check check) + (replace 'build build) + (replace 'configure configure))) + +(define* (haskell-build #:key inputs (phases %standard-phases) + #:allow-other-keys #:rest args) + "Build the given Haskell package, applying all of PHASES in order." + (apply gnu:gnu-build + #:inputs inputs #:phases phases + args)) + +;;; haskell-build-system.scm ends here diff --git a/guix/build/perl-build-system.scm b/guix/build/perl-build-system.scm index 9ca5353bb9..8f480eae16 100644 --- a/guix/build/perl-build-system.scm +++ b/guix/build/perl-build-system.scm @@ -72,10 +72,10 @@ ;; Everything is as with the GNU Build System except for the `configure', ;; `build', `check', and `install' phases. (modify-phases gnu:%standard-phases - (replace install install) - (replace check check) - (replace build build) - (replace configure configure))) + (replace 'install install) + (replace 'check check) + (replace 'build build) + (replace 'configure configure))) (define* (perl-build #:key inputs (phases %standard-phases) #:allow-other-keys #:rest args) diff --git a/guix/build/profiles.scm b/guix/build/profiles.scm new file mode 100644 index 0000000000..2becc6b9af --- /dev/null +++ b/guix/build/profiles.scm @@ -0,0 +1,148 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (guix build profiles) + #:use-module (guix build union) + #:use-module (guix build utils) + #:use-module (guix search-paths) + #:use-module (srfi srfi-26) + #:use-module (ice-9 ftw) + #:use-module (ice-9 match) + #:use-module (ice-9 pretty-print) + #:export (build-profile)) + +;;; Commentary: +;;; +;;; Build a user profile (essentially the union of all the installed packages) +;;; with its associated meta-data. +;;; +;;; Code: + +(define (abstract-profile profile) + "Return a procedure that replaces PROFILE in VALUE with a reference to the +'GUIX_PROFILE' environment variable. This allows users to specify what the +user-friendly name of the profile is, for instance ~/.guix-profile rather than +/gnu/store/...-profile." + (let ((replacement (string-append "${GUIX_PROFILE:-" profile "}"))) + (match-lambda + ((search-path . value) + (let* ((separator (search-path-specification-separator search-path)) + (items (string-tokenize* value separator)) + (crop (cute string-drop <> (string-length profile)))) + (cons search-path + (string-join (map (lambda (str) + (string-append replacement (crop str))) + items) + separator))))))) + +(define (write-environment-variable-definition port) + "Write the given environment variable definition to PORT." + (match-lambda + ((search-path . value) + (display (search-path-definition search-path value #:kind 'prefix) + port) + (newline port)))) + +(define (build-etc/profile output search-paths) + "Build the 'OUTPUT/etc/profile' shell file containing environment variable +definitions for all the SEARCH-PATHS." + (mkdir-p (string-append output "/etc")) + (call-with-output-file (string-append output "/etc/profile") + (lambda (port) + ;; The use of $GUIX_PROFILE described below is not great. Another + ;; option would have been to use "$1" and have users run: + ;; + ;; source ~/.guix-profile/etc/profile ~/.guix-profile + ;; + ;; However, when 'source' is used with no arguments, $1 refers to the + ;; first positional parameter of the calling scripts, so we can rely on + ;; it. + (display "\ +# Source this file to define all the relevant environment variables in Bash +# for this profile. You may want to define the 'GUIX_PROFILE' environment +# variable to point to the \"visible\" name of the profile, like this: +# +# GUIX_PROFILE=/path/to/profile +# source /path/to/profile/etc/profile +# +# When GUIX_PROFILE is undefined, the various environment variables refer +# to this specific profile generation. +\n" port) + (let ((variables (evaluate-search-paths (cons $PATH search-paths) + (list output)))) + (for-each (write-environment-variable-definition port) + (map (abstract-profile output) variables)))))) + +(define (ensure-writable-directory directory) + "Ensure DIRECTORY exists and is writable. If DIRECTORY is currently a +symlink (to a read-only directory in the store), then delete the symlink and +instead make DIRECTORY a \"real\" directory containing symlinks." + (define (unsymlink link) + (let* ((target (readlink link)) + ;; TARGET might itself be a symlink, so append "/" to make sure + ;; 'scandir' enters it. + (files (scandir (string-append target "/") + (negate (cut member <> '("." "..")))))) + (delete-file link) + (mkdir link) + (for-each (lambda (file) + (symlink (string-append target "/" file) + (string-append link "/" file))) + files))) + + (catch 'system-error + (lambda () + (mkdir directory)) + (lambda args + (let ((errno (system-error-errno args))) + (if (= errno EEXIST) + (let ((stat (lstat directory))) + (case (stat:type stat) + ((symlink) + ;; "Unsymlink" DIRECTORY so that it is writable. + (unsymlink directory)) + ((directory) + #t) + (else + (error "cannot mkdir because a same-named file exists" + directory)))) + (apply throw args)))))) + +(define* (build-profile output inputs + #:key manifest search-paths) + "Build a user profile from INPUTS in directory OUTPUT. Write MANIFEST, an +sexp, to OUTPUT/manifest. Create OUTPUT/etc/profile with Bash definitions for +-all the variables listed in SEARCH-PATHS." + ;; Make the symlinks. + (union-build output inputs + #:log-port (%make-void-port "w")) + + ;; Store meta-data. + (call-with-output-file (string-append output "/manifest") + (lambda (p) + (pretty-print manifest p))) + + ;; Make sure we can write to 'OUTPUT/etc'. 'union-build' above could have + ;; made 'etc' a symlink to a read-only sub-directory in the store so we need + ;; to work around that. + (ensure-writable-directory (string-append output "/etc")) + + ;; Write 'OUTPUT/etc/profile'. + (build-etc/profile output search-paths)) + +;;; profile.scm ends here diff --git a/guix/build/python-build-system.scm b/guix/build/python-build-system.scm index 9f853134bd..26a7254db9 100644 --- a/guix/build/python-build-system.scm +++ b/guix/build/python-build-system.scm @@ -123,12 +123,12 @@ installed with setuptools." ;; 'configure' and 'build' phases are not needed. Everything is done during ;; 'install'. (modify-phases gnu:%standard-phases - (delete configure) - (replace install install) - (replace check check) - (replace build build) - (add-after install wrap wrap) - (add-before strip rename-pth-file rename-pth-file))) + (delete 'configure) + (replace 'install install) + (replace 'check check) + (replace 'build build) + (add-after 'install 'wrap wrap) + (add-before 'strip 'rename-pth-file rename-pth-file))) (define* (python-build #:key inputs (phases %standard-phases) #:allow-other-keys #:rest args) diff --git a/guix/build/ruby-build-system.scm b/guix/build/ruby-build-system.scm index a143df467f..531cf382ae 100644 --- a/guix/build/ruby-build-system.scm +++ b/guix/build/ruby-build-system.scm @@ -72,11 +72,11 @@ directory." (define %standard-phases (modify-phases gnu:%standard-phases - (delete configure) - (add-after unpack gitify gitify) - (replace build build) - (replace install install) - (replace check check))) + (delete 'configure) + (add-after 'unpack 'gitify gitify) + (replace 'build build) + (replace 'install install) + (replace 'check check))) (define* (ruby-build #:key inputs (phases %standard-phases) #:allow-other-keys #:rest args) diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm index b62a8cce64..3585bf27a8 100644 --- a/guix/build/syscalls.scm +++ b/guix/build/syscalls.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -29,6 +29,7 @@ MS_REMOUNT MS_BIND MS_MOVE + restart-on-EINTR mount umount mount-points @@ -46,6 +47,7 @@ network-interface-address set-network-interface-flags set-network-interface-address + set-network-interface-up configure-network-interface)) ;;; Commentary: @@ -88,6 +90,19 @@ (ref bv)))) (lambda () 0))) +(define (call-with-restart-on-EINTR thunk) + (let loop () + (catch 'system-error + thunk + (lambda args + (if (= (system-error-errno args) EINTR) + (loop) + (apply throw args)))))) + +(define-syntax-rule (restart-on-EINTR expr) + "Evaluate EXPR and restart upon EINTR. Return the value of EXPR." + (call-with-restart-on-EINTR (lambda () expr))) + (define (augment-mtab source target type options) "Augment /etc/mtab with information about the given mount point." (let ((port (open-file "/etc/mtab" "a"))) @@ -203,7 +218,7 @@ constants from <sys/mount.h>." (let ((ret (proc (string->pointer device))) (err (errno))) (unless (zero? ret) - (throw 'system-error "swapff" "~S: ~A" + (throw 'system-error "swapoff" "~S: ~A" (list device (strerror err)) (list err))))))) @@ -552,4 +567,17 @@ the same type as that returned by 'make-socket-address'." (lambda () (close-port sock))))) +(define* (set-network-interface-up name + #:key (family AF_INET)) + "Turn up the interface NAME." + (let ((sock (socket family SOCK_STREAM 0))) + (dynamic-wind + (const #t) + (lambda () + (let ((flags (network-interface-flags sock name))) + (set-network-interface-flags sock name + (logior flags IFF_UP)))) + (lambda () + (close-port sock))))) + ;;; syscalls.scm ends here diff --git a/guix/build/utils.scm b/guix/build/utils.scm index a5a6167a8c..676a0120e3 100644 --- a/guix/build/utils.scm +++ b/guix/build/utils.scm @@ -32,6 +32,7 @@ #:re-export (alist-cons alist-delete) #:export (%store-directory + store-file-name? parallel-job-count directory-exists? @@ -44,6 +45,7 @@ mkdir-p copy-recursively delete-file-recursively + file-name-predicate find-files search-path-as-list @@ -80,6 +82,10 @@ (or (getenv "NIX_STORE") "/gnu/store")) +(define (store-file-name? file) + "Return true if FILE is in the store." + (string-prefix? (%store-directory) file)) + (define parallel-job-count ;; Number of processes to be passed next to GNU Make's `-j' argument. (make-parameter @@ -263,33 +269,46 @@ errors." ;; Don't follow symlinks. lstat))) -(define (find-files dir regexp) - "Return the lexicographically sorted list of files under DIR whose basename -matches REGEXP." - (define file-rx - (if (regexp? regexp) - regexp - (make-regexp regexp))) - - ;; Sort the result to get deterministic results. - (sort (file-system-fold (const #t) - (lambda (file stat result) ; leaf - (if (regexp-exec file-rx (basename file)) - (cons file result) - result)) - (lambda (dir stat result) ; down - result) - (lambda (dir stat result) ; up - result) - (lambda (file stat result) ; skip - result) - (lambda (file stat errno result) - (format (current-error-port) "find-files: ~a: ~a~%" - file (strerror errno)) - result) - '() - dir) - string<?)) +(define (file-name-predicate regexp) + "Return a predicate that returns true when passed a file name whose base +name matches REGEXP." + (let ((file-rx (if (regexp? regexp) + regexp + (make-regexp regexp)))) + (lambda (file stat) + (regexp-exec file-rx (basename file))))) + +(define* (find-files dir #:optional (pred (const #t)) + #:key (stat lstat)) + "Return the lexicographically sorted list of files under DIR for which PRED +returns true. PRED is passed two arguments: the absolute file name, and its +stat buffer; the default predicate always returns true. PRED can also be a +regular expression, in which case it is equivalent to (file-name-predicate +PRED). STAT is used to obtain file information; using 'lstat' means that +symlinks are not followed." + (let ((pred (if (procedure? pred) + pred + (file-name-predicate pred)))) + ;; Sort the result to get deterministic results. + (sort (file-system-fold (const #t) + (lambda (file stat result) ; leaf + (if (pred file stat) + (cons file result) + result)) + (lambda (dir stat result) ; down + result) + (lambda (dir stat result) ; up + result) + (lambda (file stat result) ; skip + result) + (lambda (file stat errno result) + (format (current-error-port) "find-files: ~a: ~a~%" + file (strerror errno)) + result) + '() + dir + stat) + string<?))) ;;; @@ -446,13 +465,13 @@ an expression evaluating to a procedure." (define-syntax %modify-phases (syntax-rules (delete replace add-before add-after) ((_ phases (delete old-phase-name)) - (alist-delete 'old-phase-name phases)) + (alist-delete old-phase-name phases)) ((_ phases (replace old-phase-name new-phase)) - (alist-replace 'old-phase-name new-phase phases)) + (alist-replace old-phase-name new-phase phases)) ((_ phases (add-before old-phase-name new-phase-name new-phase)) - (alist-cons-before 'old-phase-name 'new-phase-name new-phase phases)) + (alist-cons-before old-phase-name new-phase-name new-phase phases)) ((_ phases (add-after old-phase-name new-phase-name new-phase)) - (alist-cons-after 'old-phase-name 'new-phase-name new-phase phases)))) + (alist-cons-after old-phase-name new-phase-name new-phase phases)))) ;;; diff --git a/guix/build/waf-build-system.scm b/guix/build/waf-build-system.scm index d172c5a836..85f0abcfd6 100644 --- a/guix/build/waf-build-system.scm +++ b/guix/build/waf-build-system.scm @@ -70,10 +70,10 @@ (define %standard-phases (modify-phases gnu:%standard-phases - (replace configure configure) - (replace build build) - (replace check check) - (replace install install))) + (replace 'configure configure) + (replace 'build build) + (replace 'check check) + (replace 'install install))) (define* (waf-build #:key inputs (phases %standard-phases) #:allow-other-keys #:rest args) diff --git a/guix/cvs-download.scm b/guix/cvs-download.scm index 8a0d479fa4..72478dd2c2 100644 --- a/guix/cvs-download.scm +++ b/guix/cvs-download.scm @@ -66,7 +66,7 @@ HASH-ALGO (a symbol). Use NAME as the file name, or a generic name if #f." '#$(cvs-reference-module ref) '#$(cvs-reference-revision ref) #$output - #:cvs-command (string-append #$cvs "/bin/cvs")))) + #:cvs-command (string-append #+cvs "/bin/cvs")))) (mlet %store-monad ((guile (package->derivation guile system))) (gexp->derivation (or name "cvs-checkout") build diff --git a/guix/derivations.scm b/guix/derivations.scm index 4b0048b54b..1056caa70a 100644 --- a/guix/derivations.scm +++ b/guix/derivations.scm @@ -60,6 +60,7 @@ derivation-input-path derivation-input-sub-derivations derivation-input-output-paths + valid-derivation-input? &derivation-error derivation-error? @@ -187,12 +188,25 @@ download with a fixed hash (aka. `fetchurl')." (map (cut derivation-path->output-path path <>) sub-drvs)))) -(define (derivation-prerequisites drv) - "Return the list of derivation-inputs required to build DRV, recursively." +(define (valid-derivation-input? store input) + "Return true if INPUT is valid--i.e., if all the outputs it requests are in +the store." + (every (cut valid-path? store <>) + (derivation-input-output-paths input))) + +(define* (derivation-prerequisites drv #:optional (cut? (const #f))) + "Return the list of derivation-inputs required to build DRV, recursively. + +CUT? is a predicate that is passed a derivation-input and returns true to +eliminate the given input and its dependencies from the search. An example of +search a predicate is 'valid-derivation-input?'; when it is used as CUT?, the +result is the set of prerequisites of DRV not already in valid." (let loop ((drv drv) (result '()) (input-set (set))) - (let ((inputs (remove (cut set-contains? input-set <>) + (let ((inputs (remove (lambda (input) + (or (set-contains? input-set input) + (cut? input))) (derivation-inputs drv)))) (fold2 loop (append inputs result) @@ -225,22 +239,36 @@ download with a fixed hash (aka. `fetchurl')." (define* (substitution-oracle store drv) "Return a one-argument procedure that, when passed a store file name, returns #t if it's substitutable and #f otherwise. The returned procedure -knows about all substitutes for all the derivations listed in DRV and their -prerequisites. +knows about all substitutes for all the derivations listed in DRV; it also +knows about their prerequisites, unless they are themselves substitutable. Creating a single oracle (thus making a single 'substitutable-paths' call) and reusing it is much more efficient than calling 'has-substitutes?' or similar repeatedly, because it avoids the costs associated with launching the substituter many times." + (define valid? + (cut valid-path? store <>)) + + (define valid-input? + (cut valid-derivation-input? store <>)) + + (define (dependencies drv) + ;; Skip prerequisite sub-trees of DRV whose root is valid. This allows us + ;; to ask the substituter for just as much as needed, instead of asking it + ;; for the whole world, which can be significantly faster when substitute + ;; info is not already in cache. + (append-map derivation-input-output-paths + (derivation-prerequisites drv valid-input?))) + (let* ((paths (delete-duplicates (fold (lambda (drv result) (let ((self (match (derivation->output-paths drv) (((names . paths) ...) - paths))) - (deps (append-map derivation-input-output-paths - (derivation-prerequisites - drv)))) - (append self deps result))) + paths)))) + (if (every valid? self) + result + (append (append self (dependencies drv)) + result)))) '() drv))) (subst (list->set (substitutable-paths store paths)))) @@ -664,7 +692,7 @@ HASH-ALGO, of the derivation NAME. RECURSIVE? has the same meaning as for (inputs '()) (outputs '("out")) hash hash-algo recursive? references-graphs allowed-references - local-build?) + leaked-env-vars local-build?) "Build a derivation with the given arguments, and return the resulting <derivation> object. When HASH and HASH-ALGO are given, a fixed-output derivation is created---i.e., one whose result is known in @@ -679,6 +707,12 @@ the build environment in the corresponding file, in a simple text format. When ALLOWED-REFERENCES is true, it must be a list of store items or outputs that the derivation's output may refer to. +When LEAKED-ENV-VARS is true, it must be a list of strings denoting +environment variables that are allowed to \"leak\" from the daemon's +environment to the build environment. This is only applicable to fixed-output +derivations--i.e., when HASH is true. The main use is to allow variables such +as \"http_proxy\" to be passed to derivations that download files. + When LOCAL-BUILD? is true, declare that the derivation is not a good candidate for offloading and should rather be built locally. This is the case for small derivations where the costs of data transfers would outweigh the benefits." @@ -723,6 +757,10 @@ derivations where the costs of data transfers would outweigh the benefits." `(("allowedReferences" . ,(string-join allowed-references))) '()) + ,@(if leaked-env-vars + `(("impureEnvVars" + . ,(string-join leaked-env-vars))) + '()) ,@env-vars))) (match references-graphs (((file . path) ...) diff --git a/guix/download.scm b/guix/download.scm index d87d02e2af..6b0349402a 100644 --- a/guix/download.scm +++ b/guix/download.scm @@ -241,12 +241,12 @@ in the store." (define builder #~(begin - #$(if need-gnutls? + #+(if need-gnutls? ;; Add GnuTLS to the inputs and to the load path. #~(eval-when (load expand eval) (set! %load-path - (cons (string-append #$(gnutls-package) + (cons (string-append #+(gnutls-package) "/share/guile/site/" (effective-version)) %load-path))) @@ -271,6 +271,9 @@ in the store." (guix build utils) (guix ftp-client)) + ;; Honor the user's proxy settings. + #:leaked-env-vars '("http_proxy" "https_proxy") + ;; In general, offloading downloads is not a good idea. ;;#:local-build? #t ;; FIXME: The above would also disable use of diff --git a/guix/elf.scm b/guix/elf.scm index a4b0e819a5..4283dbd2e4 100644 --- a/guix/elf.scm +++ b/guix/elf.scm @@ -1,6 +1,6 @@ ;;; Guile ELF reader and writer -;; Copyright (C) 2011, 2012, 2013, 2014 Free Software Foundation, Inc. +;; Copyright (C) 2011, 2012, 2013, 2014, 2015 Free Software Foundation, Inc. ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public @@ -571,6 +571,7 @@ ((4) parse-elf32-program-header) ((8) parse-elf64-program-header) (else (error "unhandled pointer size"))) + n (elf-bytes elf) (+ (elf-phoff elf) (* n (elf-phentsize elf))) (elf-byte-order elf))) diff --git a/guix/ftp-client.scm b/guix/ftp-client.scm index ab72405df0..37feb895a5 100644 --- a/guix/ftp-client.scm +++ b/guix/ftp-client.scm @@ -109,11 +109,8 @@ or a TCP port number), and return it." (%ftp-login "anonymous" "guix@example.com" s) (%make-ftp-connection s ai)) (begin - (format (current-error-port) - "FTP to `~a' failed: ~A: ~A~%" - host code message) (close s) - #f)))) + (throw 'ftp-error s "log-in" code message))))) (lambda args ;; Connection failed, so try one of the other addresses. diff --git a/guix/gexp.scm b/guix/gexp.scm index f8646a081c..b08a361232 100644 --- a/guix/gexp.scm +++ b/guix/gexp.scm @@ -31,6 +31,8 @@ gexp-input gexp-input? + local-file + local-file? gexp->derivation gexp->file @@ -127,6 +129,43 @@ cross-compiling.)" body ...))) (register-compiler! name))) +(define-gexp-compiler (derivation-compiler (drv derivation?) system target) + ;; Derivations are the lowest-level representation, so this is the identity + ;; compiler. + (with-monad %store-monad + (return drv))) + + +;;; +;;; Local files. +;;; + +(define-record-type <local-file> + (%local-file file name recursive?) + local-file? + (file local-file-file) ;string + (name local-file-name) ;string + (recursive? local-file-recursive?)) ;Boolean + +(define* (local-file file #:optional (name (basename file)) + #:key (recursive? #t)) + "Return an object representing local file FILE to add to the store; this +object can be used in a gexp. FILE will be added to the store under NAME--by +default the base name of FILE. + +When RECURSIVE? is true, the contents of FILE are added recursively; if FILE +designates a flat file and RECURSIVE? is true, its contents are added, and its +permission bits are kept. + +This is the declarative counterpart of the 'interned-file' monadic procedure." + (%local-file file name recursive?)) + +(define-gexp-compiler (local-file-compiler (file local-file?) system target) + ;; "Compile" FILE by adding it to the store. + (match file + (($ <local-file> file name recursive?) + (interned-file file name #:recursive? recursive?)))) + ;;; ;;; Inputs & outputs. @@ -140,6 +179,15 @@ cross-compiling.)" (output gexp-input-output) ;string (native? gexp-input-native?)) ;Boolean +(define (write-gexp-input input port) + (match input + (($ <gexp-input> thing output #f) + (format port "#<gexp-input ~s:~a>" thing output)) + (($ <gexp-input> thing output #t) + (format port "#<gexp-input native ~s:~a>" thing output)))) + +(set-record-type-printer! <gexp-input> write-gexp-input) + (define* (gexp-input thing ;convenience procedure #:optional (output "out") #:key native?) @@ -154,6 +202,13 @@ whether this should be considered a \"native\" input or not." gexp-output? (name gexp-output-name)) +(define (write-gexp-output output port) + (match output + (($ <gexp-output> name) + (format port "#<gexp-output ~a>" name)))) + +(set-record-type-printer! <gexp-output> write-gexp-output) + (define raw-derivation (store-lift derivation)) @@ -165,14 +220,12 @@ the cross-compilation target triplet." (with-monad %store-monad (sequence %store-monad (map (match-lambda - ((and ((? derivation?) sub-drv ...) input) - (return input)) - ((and ((? struct? thing) sub-drv ...) input) - (mlet* %store-monad ((lower -> (lookup-compiler thing)) - (drv (lower thing system target))) - (return `(,drv ,@sub-drv)))) - (input - (return input))) + (((? struct? thing) sub-drv ...) + (mlet* %store-monad ((lower -> (lookup-compiler thing)) + (drv (lower thing system target))) + (return `(,drv ,@sub-drv)))) + (input + (return input))) inputs)))) (define* (lower-reference-graphs graphs #:key system target) @@ -197,6 +250,11 @@ names and file names suitable for the #:allowed-references argument to (match-lambda ((? string? output) (return output)) + (($ <gexp-input> thing output native?) + (mlet* %store-monad ((lower -> (lookup-compiler thing)) + (drv (lower thing system + (if native? #f target)))) + (return (derivation->output-path drv output)))) (thing (mlet* %store-monad ((lower -> (lookup-compiler thing)) (drv (lower thing system target))) @@ -224,6 +282,7 @@ names and file names suitable for the #:allowed-references argument to (graft? (%graft?)) references-graphs allowed-references + leaked-env-vars local-build?) "Return a derivation NAME that runs EXP (a gexp) with GUILE-FOR-BUILD (a derivation) on SYSTEM. When TARGET is true, it is used as the @@ -262,6 +321,7 @@ The other arguments are as for 'derivation'." (define (graphs-file-names graphs) ;; Return a list of (FILE-NAME . STORE-PATH) pairs made from GRAPHS. (map (match-lambda + ;; TODO: Remove 'derivation?' special cases. ((file-name (? derivation? drv)) (cons file-name (derivation->output-path drv))) ((file-name (? derivation? drv) sub-drv) @@ -341,17 +401,26 @@ The other arguments are as for 'derivation'." #:hash hash #:hash-algo hash-algo #:recursive? recursive? #:references-graphs (and=> graphs graphs-file-names) #:allowed-references allowed + #:leaked-env-vars leaked-env-vars #:local-build? local-build?)))) -(define* (gexp-inputs exp #:optional (references gexp-references)) - "Return the input list for EXP, using REFERENCES to get its list of -references." +(define* (gexp-inputs exp #:key native?) + "Return the input list for EXP. When NATIVE? is true, return only native +references; otherwise, return only non-native references." (define (add-reference-inputs ref result) (match ref - (($ <gexp-input> (? derivation? drv) output) - (cons `(,drv ,output) result)) - (($ <gexp-input> (? gexp? exp)) - (append (gexp-inputs exp references) result)) + (($ <gexp-input> (? gexp? exp) _ #t) + (if native? + (append (gexp-inputs exp) + (gexp-inputs exp #:native? #t) + result) + result)) + (($ <gexp-input> (? gexp? exp) _ #f) + (if native? + (append (gexp-inputs exp #:native? #t) + result) + (append (gexp-inputs exp) + result))) (($ <gexp-input> (? string? str)) (if (direct-store-path? str) (cons `(,str) result) @@ -361,13 +430,13 @@ references." ;; THING is a derivation, or a package, or an origin, etc. (cons `(,thing ,output) result) result)) - (($ <gexp-input> (lst ...) output native?) + (($ <gexp-input> (lst ...) output n?) (fold-right add-reference-inputs result ;; XXX: For now, automatically convert LST to a list of ;; gexp-inputs. (map (match-lambda ((? gexp-input? x) x) - (x (%gexp-input x "out" native?))) + (x (%gexp-input x "out" (or n? native?)))) lst))) (_ ;; Ignore references to other kinds of objects. @@ -375,10 +444,12 @@ references." (fold-right add-reference-inputs '() - (references exp))) + (if native? + (gexp-native-references exp) + (gexp-references exp)))) (define gexp-native-inputs - (cut gexp-inputs <> gexp-native-references)) + (cut gexp-inputs <> #:native? #t)) (define (gexp-outputs exp) "Return the outputs referred to by EXP as a list of strings." @@ -411,8 +482,6 @@ and in the current monad setting (system type, etc.)" (define* (reference->sexp ref #:optional native?) (with-monad %store-monad (match ref - (($ <gexp-input> (? derivation? drv) output) - (return (derivation->output-path drv output))) (($ <gexp-output> output) ;; Output file names are not known in advance but the daemon defines ;; an environment variable for each of them at build time, so use @@ -435,8 +504,13 @@ and in the current monad setting (system type, etc.)" (($ <gexp-input> (? struct? thing) output n?) (let ((lower (lookup-compiler thing)) (target (if (or n? native?) #f target))) - (mlet %store-monad ((drv (lower thing system target))) - (return (derivation->output-path drv output))))) + (mlet %store-monad ((obj (lower thing system target))) + ;; OBJ must be either a derivation or a store file name. + (return (match obj + ((? derivation? drv) + (derivation->output-path drv output)) + ((? string? file) + file)))))) (($ <gexp-input> x) (return x)) (x @@ -468,13 +542,20 @@ and in the current monad setting (system type, etc.)" ;; Return all the 'ungexp' present in EXP. (let loop ((exp exp) (result '())) - (syntax-case exp (ungexp ungexp-splicing) + (syntax-case exp (ungexp + ungexp-splicing + ungexp-native + ungexp-native-splicing) ((ungexp _) (cons exp result)) ((ungexp _ _) (cons exp result)) ((ungexp-splicing _ ...) (cons exp result)) + ((ungexp-native _ ...) + result) + ((ungexp-native-splicing _ ...) + result) ((exp0 exp ...) (let ((result (loop #'exp0 result))) (fold loop result #'(exp ...)))) @@ -485,13 +566,20 @@ and in the current monad setting (system type, etc.)" ;; Return all the 'ungexp-native' forms present in EXP. (let loop ((exp exp) (result '())) - (syntax-case exp (ungexp-native ungexp-native-splicing) + (syntax-case exp (ungexp + ungexp-splicing + ungexp-native + ungexp-native-splicing) ((ungexp-native _) (cons exp result)) ((ungexp-native _ _) (cons exp result)) ((ungexp-native-splicing _ ...) (cons exp result)) + ((ungexp _ ...) + result) + ((ungexp-splicing _ ...) + result) ((exp0 exp ...) (let ((result (loop #'exp0 result))) (fold loop result #'(exp ...)))) @@ -777,8 +865,9 @@ its search path." (define* (text-file* name #:rest text) "Return as a monadic value a derivation that builds a text file containing -all of TEXT. TEXT may list, in addition to strings, packages, derivations, -and store file names; the resulting store file holds references to all these." +all of TEXT. TEXT may list, in addition to strings, objects of any type that +can be used in a gexp: packages, derivations, local file objects, etc. The +resulting store file holds references to all these." (define builder (gexp (call-with-output-file (ungexp output "out") (lambda (port) diff --git a/guix/git-download.scm b/guix/git-download.scm index 94a1245480..f4b48d7a6b 100644 --- a/guix/git-download.scm +++ b/guix/git-download.scm @@ -76,7 +76,7 @@ HASH-ALGO (a symbol). Use NAME as the file name, or a generic name if #f." ;; The 'git submodule' commands expects Coreutils, sed, ;; grep, etc. to be in $PATH. (set-path-environment-variable "PATH" '("bin") - (match '#$inputs + (match '#+inputs (((names dirs) ...) dirs))) @@ -84,7 +84,7 @@ HASH-ALGO (a symbol). Use NAME as the file name, or a generic name if #f." '#$(git-reference-commit ref) #$output #:recursive? '#$(git-reference-recursive? ref) - #:git-command (string-append #$git "/bin/git")))) + #:git-command (string-append #+git "/bin/git")))) (mlet %store-monad ((guile (package->derivation guile system))) (gexp->derivation (or name "git-checkout") build diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm index 0528e9f253..5cdda28bc7 100644 --- a/guix/gnu-maintenance.scm +++ b/guix/gnu-maintenance.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2010, 2011, 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2010, 2011, 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2012, 2013 Nikita Karetnikov <nikita@karetnikov.org> ;;; ;;; This file is part of GNU Guix. @@ -179,9 +179,18 @@ network to check in GNU's database." (define (mirror-type url) (let ((uri (string->uri url))) (and (eq? (uri-scheme uri) 'mirror) - (if (member (uri-host uri) '("gnu" "gnupg" "gcc")) - 'gnu - 'non-gnu)))) + (cond + ((member (uri-host uri) + '("gnu" "gnupg" "gcc" "gnome")) + ;; Definitely GNU. + 'gnu) + ((equal? (uri-host uri) "cran") + ;; Possibly GNU: mirror://cran could be either GNU R itself + ;; or a non-GNU package. + #f) + (else + ;; Definitely non-GNU. + 'non-gnu))))) (let ((url (and=> (package-source package) origin-uri)) (name (package-name package))) diff --git a/guix/http-client.scm b/guix/http-client.scm index 051fceecb5..dc8d3298fc 100644 --- a/guix/http-client.scm +++ b/guix/http-client.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2012, 2015 Free Software Foundation, Inc. ;;; @@ -21,7 +21,7 @@ (define-module (guix http-client) #:use-module (guix utils) #:use-module (web uri) - #:use-module (web client) + #:use-module ((web client) #:hide (open-socket-for-uri)) #:use-module (web response) #:use-module (srfi srfi-11) #:use-module (srfi srfi-34) @@ -30,14 +30,15 @@ #:use-module (rnrs bytevectors) #:use-module (guix ui) #:use-module (guix utils) - #:use-module ((guix build download) #:select (resolve-uri-reference)) + #:use-module ((guix build download) + #:select (open-socket-for-uri resolve-uri-reference)) + #:re-export (open-socket-for-uri) #:export (&http-get-error http-get-error? http-get-error-uri http-get-error-code http-get-error-reason - open-socket-for-uri http-fetch)) ;;; Commentary: @@ -135,57 +136,52 @@ closed it will also close PORT, unless the KEEP-ALIVE? is true." (when (module-variable %web-http 'read-chunk-body) (module-set! %web-http 'make-chunked-input-port make-chunked-input-port)) - (define (read-response-body* r) - "Reads the response body from @var{r}, as a bytevector. Returns - @code{#f} if there was no response body." - (define bad-response - (@@ (web response) bad-response)) - - (if (member '(chunked) (response-transfer-encoding r)) - (let ((chunk-port (make-chunked-input-port (response-port r) - #:keep-alive? #t))) - (get-bytevector-all chunk-port)) - (let ((nbytes (response-content-length r))) - ;; Backport of Guile commit 84dfde82ae8f6ec247c1c147c1e2ae50b207bad9 - ;; ("fix response-body-port for responses without content-length"). - (if nbytes - (let ((bv (get-bytevector-n (response-port r) nbytes))) - (if (= (bytevector-length bv) nbytes) - bv - (bad-response "EOF while reading response body: ~a bytes of ~a" - (bytevector-length bv) nbytes))) - (get-bytevector-all (response-port r)))))) - - ;; Install this patch only on Guile 2.0.5. - (unless (guile-version>? "2.0.5") + (define (make-delimited-input-port port len keep-alive?) + "Return an input port that reads from PORT, and makes sure that +exactly LEN bytes are available from PORT. Closing the returned port +closes PORT, unless KEEP-ALIVE? is true." + (define bytes-read 0) + + (define (fail) + ((@@ (web response) bad-response) + "EOF while reading response body: ~a bytes of ~a" + bytes-read len)) + + (define (read! bv start count) + ;; Read at most LEN bytes in total. HTTP/1.1 doesn't say what to do + ;; when a server provides more than the Content-Length, but it seems + ;; wise to just stop reading at LEN. + (let ((count (min count (- len bytes-read)))) + (let loop ((ret (get-bytevector-n! port bv start count))) + (cond ((eof-object? ret) + (if (= bytes-read len) + 0 ; EOF + (fail))) + ((and (zero? ret) (> count 0)) + ;; Do not return zero since zero means EOF, so try again. + (loop (get-bytevector-n! port bv start count))) + (else + (set! bytes-read (+ bytes-read ret)) + ret))))) + + (define close + (and (not keep-alive?) + (lambda () + (close port)))) + + (make-custom-binary-input-port "delimited input port" read! #f #f close)) + + (unless (guile-version>? "2.0.9") + ;; Guile <= 2.0.9 had a bug whereby 'response-body-port' would read more + ;; than what 'content-length' says. See Guile commit 802a25b. (module-set! (resolve-module '(web response)) - 'read-response-body read-response-body*))) + 'make-delimited-input-port make-delimited-input-port))) ;; XXX: Work around <http://bugs.gnu.org/13095>, present in Guile ;; up to 2.0.7. (module-define! (resolve-module '(web client)) 'shutdown (const #f)) -(define* (open-socket-for-uri uri #:key (buffered? #t)) - "Return an open port for URI. When BUFFERED? is false, the returned port is -unbuffered." - (define rmem-max - ;; The maximum size for a receive buffer on Linux, see socket(7). - "/proc/sys/net/core/rmem_max") - - (define buffer-size - (if (file-exists? rmem-max) - (call-with-input-file rmem-max read) - 126976)) ; the default for Linux, per 'rmem_default' - - (let ((s ((@ (web client) open-socket-for-uri) uri))) - ;; Work around <http://bugs.gnu.org/15368> by restoring a decent - ;; buffer size. - (setsockopt s SOL_SOCKET SO_RCVBUF buffer-size) - (unless buffered? - (setvbuf s _IONBF)) - s)) - (define* (http-fetch uri #:key port (text? #f) (buffered? #t)) "Return an input port containing the data at URI, and the expected number of bytes available or #f. If TEXT? is true, the data at URI is considered to be @@ -194,44 +190,20 @@ unbuffered port, suitable for use in `filtered-port'. Raise an '&http-get-error' condition if downloading fails." (let loop ((uri uri)) - (let ((port (or port - (open-socket-for-uri uri - #:buffered? buffered?)))) + (let ((port (or port (open-socket-for-uri uri)))) + (unless buffered? + (setvbuf port _IONBF)) (let*-values (((resp data) ;; Try hard to use the API du jour to get an input port. - ;; On Guile 2.0.5 and before, we can only get a string or - ;; bytevector, and not an input port. Work around that. (if (guile-version>? "2.0.7") (http-get uri #:streaming? #t #:port port) ; 2.0.9+ - (if (defined? 'http-get*) - (http-get* uri #:decode-body? text? - #:port port) ; 2.0.7 - (http-get uri #:decode-body? text? - #:port port)))) ; 2.0.5- + (http-get* uri #:decode-body? text? ; 2.0.7 + #:port port))) ((code) (response-code resp))) (case code ((200) - (let ((len (response-content-length resp))) - (cond ((not data) - (begin - ;; Guile 2.0.5 and earlier did not support chunked - ;; transfer encoding, which is required for instance when - ;; fetching %PACKAGE-LIST-URL (see - ;; <http://lists.gnu.org/archive/html/guile-devel/2011-09/msg00089.html>). - ;; Normally the `when-guile<=2.0.5' block above fixes - ;; that, but who knows what could happen. - (warning (_ "using Guile ~a, which does not support ~s encoding~%") - (version) - (response-transfer-encoding resp)) - (leave (_ "download failed; use a newer Guile~%") - uri resp))) - ((string? data) ; `http-get' from 2.0.5- - (values (open-input-string data) len)) - ((bytevector? data) ; likewise - (values (open-bytevector-input-port data) len)) - (else ; input port - (values data len))))) + (values data (response-content-length resp))) ((301 ; moved permanently 302) ; found (redirection) (let ((uri (resolve-uri-reference (response-location resp) uri))) diff --git a/guix/import/cpan.scm b/guix/import/cpan.scm index 37dd3b162c..c80d568101 100644 --- a/guix/import/cpan.scm +++ b/guix/import/cpan.scm @@ -49,8 +49,8 @@ ("agpl_3" 'agpl3) ;; apache_1_1 ("apache_2_0" 'asl2.0) - ;; artistic_1_0 - ("artistic_2_0" 'artistic2.0) + ;; artistic_1 + ("artistic_2" 'artistic2.0) ("bsd" 'bsd-3) ("freebsd" 'bsd-2) ;; gfdl_1_2 diff --git a/guix/import/hackage.scm b/guix/import/hackage.scm new file mode 100644 index 0000000000..1b27803dba --- /dev/null +++ b/guix/import/hackage.scm @@ -0,0 +1,767 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (guix import hackage) + #:use-module (ice-9 match) + #:use-module (ice-9 regex) + #:use-module (ice-9 rdelim) + #:use-module (ice-9 receive) + #:use-module (ice-9 pretty-print) + #:use-module (srfi srfi-26) + #:use-module (srfi srfi-34) + #:use-module (srfi srfi-35) + #:use-module (srfi srfi-11) + #:use-module (srfi srfi-1) + #:use-module ((guix download) #:select (download-to-store)) + #:use-module ((guix utils) #:select (package-name->name+version)) + #:use-module (guix import utils) + #:use-module (guix store) + #:use-module (guix hash) + #:use-module (guix base32) + #:use-module ((guix utils) #:select (call-with-temporary-output-file)) + #:export (hackage->guix-package)) + +;; Part 1: +;; +;; Functions used to read a Cabal file. + +(define ghc-standard-libraries + ;; List of libraries distributed with ghc (7.8.4). We include GHC itself as + ;; some packages list it. + '("ghc" + "haskell98" + "hoopl" + "base" + "transformers" + "deepseq" + "array" + "binary" + "bytestring" + "containers" + "time" + "cabal" + "bin-package-db" + "ghc-prim" + "integer-gmp" + "integer-simple" + "win32" + "template-haskell" + "process" + "haskeline" + "terminfo" + "directory" + "filepath" + "old-locale" + "unix" + "old-time" + "pretty" + "xhtml" + "hpc")) + +(define package-name-prefix "ghc-") + +(define key-value-rx + ;; Regular expression matching "key: value" + (make-regexp "([a-zA-Z0-9-]+):[ \t]*(\\w?.*)$")) + +(define sections-rx + ;; Regular expression matching a section "head sub-head ..." + (make-regexp "([a-zA-Z0-9\\(\\)-]+)")) + +(define comment-rx + ;; Regexp matching Cabal comment lines. + (make-regexp "^ *--")) + +(define (has-key? line) + "Check if LINE includes a key." + (regexp-exec key-value-rx line)) + +(define (comment-line? line) + "Check if LINE is a comment line." + (regexp-exec comment-rx line)) + +(define (line-indentation+rest line) + "Returns two results: The number of indentation spaces and the rest of the +line (without indentation)." + (let loop ((line-lst (string->list line)) + (count 0)) + ;; Sometimes values are spread over multiple lines and new lines start + ;; with a comma ',' with the wrong indentation. See e.g. haddock-api. + (if (or (null? line-lst) + (not (or + (eqv? (first line-lst) #\space) + (eqv? (first line-lst) #\,) ; see, e.g., haddock-api.cabal + (eqv? (first line-lst) #\tab)))) + (values count (list->string line-lst)) + (loop (cdr line-lst) (+ count 1))))) + +(define (multi-line-value lines seed) + "Function to read a value split across multiple lines. LINES are the +remaining input lines to be read. SEED is the value read on the same line as +the key. Return two values: A list with values and the remaining lines to be +processed." + (define (multi-line-value-with-min-indent lines seed min-indent) + (if (null? lines) + (values '() '()) + (let-values (((current-indent value) (line-indentation+rest (first lines))) + ((next-line-indent next-line-value) + (if (null? (cdr lines)) + (values #f "") + (line-indentation+rest (second lines))))) + (if (or (not next-line-indent) (< next-line-indent min-indent) + (regexp-exec condition-rx next-line-value)) + (values (reverse (cons value seed)) (cdr lines)) + (multi-line-value-with-min-indent (cdr lines) (cons value seed) + min-indent))))) + + (let-values (((current-indent value) (line-indentation+rest (first lines)))) + (multi-line-value-with-min-indent lines seed current-indent))) + +(define (read-cabal port) + "Parses a Cabal file from PORT. Return a list of list pairs: + +(((head1 sub-head1 ... key1) (value)) + ((head2 sub-head2 ... key2) (value2)) + ...). + +We try do deduce the Cabal format from the following document: +https://www.haskell.org/cabal/users-guide/developing-packages.html + +Keys are case-insensitive. We therefore lowercase them. Values are +case-sensitive. Currently only indentation-structured files are parsed. +Braces structured files are not handled." ;" <- make emacs happy. + (define (read-and-trim-line port) + (let ((line (read-line port))) + (if (string? line) + (string-trim-both line #\return) + line))) + + (define (strip-insignificant-lines port) + (let loop ((line (read-and-trim-line port)) + (result '())) + (cond + ((eof-object? line) + (reverse result)) + ((or (string-null? line) (comment-line? line)) + (loop (read-and-trim-line port) result)) + (else + (loop (read-and-trim-line port) (cons line result)))))) + + (let loop + ((lines (strip-insignificant-lines port)) + (indents '()) ; only includes indents at start of section heads. + (sections '()) + (result '())) + (let-values + (((current-indent line) + (if (null? lines) + (values 0 "") + (line-indentation+rest (first lines)))) + ((next-line-indent next-line) + (if (or (null? lines) (null? (cdr lines))) + (values 0 "") + (line-indentation+rest (second lines))))) + (if (null? lines) + (reverse result) + (let ((rx-result (has-key? line))) + (cond + (rx-result + (let ((key (string-downcase (match:substring rx-result 1))) + (value (match:substring rx-result 2))) + (cond + ;; Simple single line "key: value". + ((= next-line-indent current-indent) + (loop (cdr lines) indents sections + (cons + (list (reverse (cons key sections)) (list value)) + result))) + ;; Multi line "key: value\n value cont...". + ((> next-line-indent current-indent) + (let*-values (((value-lst lines) + (multi-line-value (cdr lines) + (if (string-null? value) + '() + `(,value))))) + ;; multi-line-value returns to the first line after the + ;; multi-value. + (loop lines indents sections + (cons + (list (reverse (cons key sections)) value-lst) + result)))) + ;; Section ended. + (else + ;; Indentation is reduced. Check by how many levels. + (let* ((idx (and=> (list-index + (lambda (x) (= next-line-indent x)) + indents) + (cut + <> + (if (has-key? next-line) 1 0)))) + (sec + (if idx + (drop sections idx) + (raise + (condition + (&message + (message "unable to parse Cabal file")))))) + (ind (drop indents idx))) + (loop (cdr lines) ind sec + (cons + (list (reverse (cons key sections)) (list value)) + result))))))) + ;; Start of a new section. + ((or (null? indents) + (> current-indent (first indents))) + (loop (cdr lines) (cons current-indent indents) + (cons (string-downcase line) sections) result)) + (else + (loop (cdr lines) indents + (cons (string-downcase line) (cdr sections)) + result)))))))) + +(define condition-rx + ;; Regexp for conditionals. + (make-regexp "^if +(.*)$")) + +(define (split-section section) + "Split SECTION in individual words with exception for the predicate of an +'if' conditional." + (let ((rx-result (regexp-exec condition-rx section))) + (if rx-result + `("if" ,(match:substring rx-result 1)) + (map match:substring (list-matches sections-rx section))))) + +(define (join-sections sec1 sec2) + (fold-right cons sec2 sec1)) + +(define (pre-process-keys key) + (match key + (() '()) + ((sec1 rest ...) + (join-sections (split-section sec1) (pre-process-keys rest))))) + +(define (pre-process-entry-keys entry) + (match entry + ((key value) + (list (pre-process-keys key) value)) + (() '()))) + +(define (pre-process-entries-keys entries) + "ENTRIES is a list of list pairs, a keys list and a valules list, as +produced by 'read-cabal'. Split each element of the keys list into individual +words. This pre-processing is used to read flags." + (match entries + ((entry rest ...) + (cons (pre-process-entry-keys entry) + (pre-process-entries-keys rest))) + (() + '()))) + +(define (get-flags pre-processed-entries) + "PRE-PROCESSED-ENTRIES is a list of list pairs, a keys list and a values +list, as produced by 'read-cabal' and pre-processed by +'pre-process-entries-keys'. Return a list of pairs with the name of flags and +their default value (one of \"False\" or \"True\") as specified in the Cabal file: + +((\"flag1-name\" . \"False-or-True\") ...)." ;" <- make emacs happy + (match pre-processed-entries + (() '()) + (((("flag" flag-name "default") (flag-val)) rest ...) + (cons (cons flag-name flag-val) + (get-flags rest))) + ((entry rest ... ) + (get-flags rest)) + (_ #f))) + +;; Part 2: +;; +;; Functions to read information from the Cabal object created by 'read-cabal' +;; and convert Cabal format dependencies conditionals into equivalent +;; S-expressions. + +(define tests-rx + ;; Cabal test keywords + (make-regexp "(os|arch|flag|impl) *\\(([ a-zA-Z0-9_.<>=-]+)\\)")) + +(define parens-rx + ;; Parentheses within conditions + (make-regexp "\\((.+)\\)")) + +(define or-rx + ;; OR operator in conditions + (make-regexp " +\\|\\| +")) + +(define and-rx + ;; AND operator in conditions + (make-regexp " +&& +")) + +(define not-rx + ;; NOT operator in conditions + (make-regexp "^!.+")) + +(define (bi-op-args str match-lst) + "Return a list with the arguments of (logic) bianry operators. MATCH-LST +is the result of 'list-match' against a binary operator regexp on STR." + (let ((operators (length match-lst))) + (map (lambda (from to) + (substring str from to)) + (cons 0 (map match:end match-lst)) + (append (map match:start match-lst) (list (string-length str)))))) + +(define (bi-op->sexp-like bi-op args) + "BI-OP is a string with the name of a Scheme operator which in a Cabal file +is represented by a binary operator. ARGS are the arguments of said operator. +Return a string representing an S-expression of the operator applied to its +arguments." + (if (= (length args) 1) + (first args) + (string-append "(" bi-op + (fold (lambda (arg seed) (string-append seed " " arg)) + "" args) ")"))) + +(define (not->sexp-like arg) + "If the string ARG is prefixed by a Cabal negation operator, convert it to +an equivalent Scheme S-expression string." + (if (regexp-exec not-rx arg) + (string-append "(not " + (substring arg 1 (string-length arg)) + ")") + arg)) + +(define (parens-less-cond->sexp-like conditional) + "Convert a Cabal CONDITIONAL string into a string with equivalent Scheme +syntax. This procedure accepts only simple conditionals without parentheses." + ;; The outher operation is the one with the lowest priority: OR + (bi-op->sexp-like + "or" + ;; each OR argument may be an AND operation + (map (lambda (or-arg) + (let ((m-lst (list-matches and-rx or-arg))) + ;; is there an AND operation? + (if (> (length m-lst) 0) + (bi-op->sexp-like + "and" + ;; expand NOT operators when there are ANDs + (map not->sexp-like (bi-op-args or-arg m-lst))) + ;; ... and when there aren't. + (not->sexp-like or-arg)))) + ;; list of OR arguments + (bi-op-args conditional (list-matches or-rx conditional))))) + +(define test-keyword-ornament "__") + +(define (conditional->sexp-like conditional) + "Convert a Cabal CONDITIONAL string into a string with equivalent Scheme +syntax." + ;; First we substitute TEST-KEYWORD-ORNAMENT for parentheses around tests + ;; keywords so that parentheses are only used to set precedences. This + ;; substantially simplify parsing. + (let ((conditional + (regexp-substitute/global #f tests-rx conditional + 'pre 1 test-keyword-ornament 2 + test-keyword-ornament 'post))) + (let loop ((sub-cond conditional)) + (let ((rx-result (regexp-exec parens-rx sub-cond))) + (cond + (rx-result + (parens-less-cond->sexp-like + (string-append + (match:prefix rx-result) + (loop (match:substring rx-result 1)) + (match:suffix rx-result)))) + (else + (parens-less-cond->sexp-like sub-cond))))))) + +(define (eval-flags sexp-like-cond flags) + "SEXP-LIKE-COND is a string representing an S-expression conditional. FLAGS +is a list of flag name and value pairs as produced by 'get-flags'. Substitute +\"#t\" or \"#f\" according to the value of flags. (Default to \"True\")." + (fold-right + (lambda (flag sexp) + (match flag + ((name . value) + (let ((rx (make-regexp + (string-append "flag" test-keyword-ornament name + test-keyword-ornament)))) + (regexp-substitute/global + #f rx sexp + 'pre (if (string-ci= value "False") "#f" "#t") 'post))) + (_ sexp))) + sexp-like-cond + (cons '("[a-zA-Z0-9_-]+" . "True") flags))) + +(define (eval-tests->sexp sexp-like-cond) + "In the string SEXP-LIKE-COND substitute test keywords \"os(...)\" and +\"arch(...)\" with equivalent Scheme checks. Retrun an S-expression." + (with-input-from-string + (fold-right + (lambda (test sexp) + (match test + ((type pre-match post-match) + (let ((rx (make-regexp + (string-append type test-keyword-ornament "(\\w+)" + test-keyword-ornament)))) + (regexp-substitute/global + #f rx sexp + 'pre pre-match 2 post-match 'post))) + (_ sexp))) + sexp-like-cond + ;; (%current-system) returns, e.g., "x86_64-linux" or "i686-linux". + '(("(os|arch)" "(string-match \"" "\" (%current-system))"))) + read)) + +(define (eval-impl sexp-like-cond) + "Check for the Cabal test \"impl(...)\" in the string SEXP-LIKE-COND. +Assume the module declaring the generated package includes a local variable +called \"haskell-implementation\" with a string value of the form NAME-VERSION +against which we compare." + (with-output-to-string + (lambda () + (write + (with-input-from-string + (fold-right + (lambda (test sexp) + (match test + ((pre-match post-match) + (let ((rx-with-version + (make-regexp + (string-append + "impl" test-keyword-ornament + "([a-zA-Z0-9_-]+) *([<>=]+) *([0-9.]+) *" + test-keyword-ornament))) + (rx-without-version + (make-regexp + (string-append "impl" test-keyword-ornament "(\\w+)" + test-keyword-ornament)))) + (if (regexp-exec rx-with-version sexp) + (regexp-substitute/global + #f rx-with-version sexp + 'pre pre-match 2 " " post-match " \"" 1 "-" 3 "\")" 'post) + (regexp-substitute/global + #f rx-without-version sexp + 'pre pre-match "-match \"" 1 "\" " post-match ")" 'post)))) + (_ sexp))) + sexp-like-cond + '(("(string" "haskell-implementation"))) + read))))) + +(define (eval-cabal-keywords sexp-like-cond flags) + ((compose eval-tests->sexp eval-impl (cut eval-flags <> flags)) + sexp-like-cond)) + +(define (key->values meta key) + "META is the representation of a Cabal file as produced by 'read-cabal'. +Return the list of values associated with a specific KEY (a string)." + (match meta + (() '()) + (((((? (lambda(x) (equal? x key)))) v) r ...) + v) + (((k v) r ...) + (key->values (cdr meta) key)) + (_ "key Not fount"))) + +(define (key-start-end->entries meta key-start-rx key-end-rx) + "META is the representation of a Cabal file as produced by 'read-cabal'. +Return all entries whose keys list starts with KEY-START and ends with +KEY-END." + (let ((pred + (lambda (x) + (and (regexp-exec key-start-rx (first x)) + (regexp-exec key-end-rx (last x)))))) + ;; (equal? (list key-start key-end) (list (first x) (last x)))))) + (match meta + (() '()) + ((((? pred k) v) r ...) + (cons `(,k ,v) + (key-start-end->entries (cdr meta) key-start-rx key-end-rx))) + (((k v) r ...) + (key-start-end->entries (cdr meta) key-start-rx key-end-rx)) + (_ "key Not fount")))) + +(define else-rx + (make-regexp "^else$")) + +(define (count-if-else rx-result-ls) + (apply + (map (lambda (m) (if m 1 0)) rx-result-ls))) + +(define (analyze-entry-cond entry) + (let* ((keys (first entry)) + (vals (second entry)) + (rx-cond-result + (map (cut regexp-exec condition-rx <>) keys)) + (rx-else-result + (map (cut regexp-exec else-rx <>) keys)) + (cond-no (count-if-else rx-cond-result)) + (else-no (count-if-else rx-else-result)) + (cond-idx (list-index (lambda (rx) (if rx #t #f)) rx-cond-result)) + (else-idx (list-index (lambda (rx) (if rx #t #f)) rx-else-result)) + (key-cond + (cond + ((or (and cond-idx else-idx (< cond-idx else-idx)) + (and cond-idx (not else-idx))) + (match:substring + (receive (head tail) + (split-at rx-cond-result cond-idx) (first tail)))) + ((or (and cond-idx else-idx (> cond-idx else-idx)) + (and (not cond-idx) else-idx)) + (match:substring + (receive (head tail) + (split-at rx-else-result else-idx) (first tail)))) + (else + "")))) + (values keys vals rx-cond-result + rx-else-result cond-no else-no key-cond))) + +(define (remove-cond entry cond) + (match entry + ((k v) + (list (cdr (member cond k)) v)))) + +(define (group-and-reduce-level entries group group-cond) + (let loop + ((true-group group) + (false-group '()) + (entries entries)) + (if (null? entries) + (values (reverse true-group) (reverse false-group) entries) + (let*-values (((entry) (first entries)) + ((keys vals rx-cond-result rx-else-result + cond-no else-no key-cond) + (analyze-entry-cond entry))) + (cond + ((and (>= (+ cond-no else-no) 1) (string= group-cond key-cond)) + (loop (cons (remove-cond entry group-cond) true-group) false-group + (cdr entries))) + ((and (>= (+ cond-no else-no) 1) (string= key-cond "else")) + (loop true-group (cons (remove-cond entry "else") false-group) + (cdr entries))) + (else + (values (reverse true-group) (reverse false-group) entries))))))) + +(define dependencies-rx + (make-regexp "([a-zA-Z0-9_-]+) *[^,]*,?")) + +(define (hackage-name->package-name name) + (if (string-prefix? package-name-prefix name) + (string-downcase name) + (string-append package-name-prefix (string-downcase name)))) + +(define (split-and-filter-dependencies ls names-to-filter) + "Split the comma separated list of dependencies LS coming from the Cabal +file, filter packages included in NAMES-TO-FILTER and return a list with +inputs suitable for the Guix package. Currently the version information is +discarded." + (define (split-at-comma-and-filter d) + (fold + (lambda (m seed) + (let* ((name (string-downcase (match:substring m 1))) + (pkg-name (hackage-name->package-name name))) + (if (member name names-to-filter) + seed + (cons (list pkg-name (list 'unquote (string->symbol pkg-name))) + seed)))) + '() + (list-matches dependencies-rx d))) + + (fold (lambda (d p) (append (split-at-comma-and-filter d) p)) '() ls)) + +(define* (dependencies-cond->sexp meta #:key (include-test-dependencies? #t)) + "META is the representation of a Cabal file as produced by 'read-cabal'. +Return an S-expression containing the list of dependencies as expected by the +'inputs' field of a package. The generated S-expressions may include +conditionals as defined in the cabal file. During this process we discard the +version information of the packages." + (define (take-dependencies meta) + (let ((key-start-exe (make-regexp "executable")) + (key-start-lib (make-regexp "library")) + (key-start-tests (make-regexp "test-suite")) + (key-end (make-regexp "build-depends"))) + (append + (key-start-end->entries meta key-start-exe key-end) + (key-start-end->entries meta key-start-lib key-end) + (if include-test-dependencies? + (key-start-end->entries meta key-start-tests key-end) + '())))) + + (let ((flags (get-flags (pre-process-entries-keys meta))) + (augmented-ghc-std-libs (append (key->values meta "name") + ghc-standard-libraries))) + (delete-duplicates + (let loop ((entries (take-dependencies meta)) + (result '())) + (if (null? entries) + (reverse result) + (let*-values (((entry) (first entries)) + ((keys vals rx-cond-result rx-else-result + cond-no else-no key-cond) + (analyze-entry-cond entry))) + (cond + ((= (+ cond-no else-no) 0) + (loop (cdr entries) + (append + (split-and-filter-dependencies vals + augmented-ghc-std-libs) + result))) + (else + (let-values (((true-group false-group entries) + (group-and-reduce-level entries '() + key-cond)) + ((cond-final) (eval-cabal-keywords + (conditional->sexp-like + (last (split-section key-cond))) + flags))) + (loop entries + (cond + ((or (eq? cond-final #t) (equal? cond-final '(not #f))) + (append (loop true-group '()) result)) + ((or (eq? cond-final #f) (equal? cond-final '(not #t))) + (append (loop false-group '()) result)) + (else + (let ((true-group-result (loop true-group '())) + (false-group-result (loop false-group '()))) + (cond + ((and (null? true-group-result) + (null? false-group-result)) + result) + ((null? false-group-result) + (cons `(unquote-splicing + (when ,cond-final ,true-group-result)) + result)) + ((null? true-group-result) + (cons `(unquote-splicing + (unless ,cond-final ,false-group-result)) + result)) + (else + (cons `(unquote-splicing + (if ,cond-final + ,true-group-result + ,false-group-result)) + result)))))))))))))))) + +;; Part 3: +;; +;; Retrive the desired package and its Cabal file from +;; http://hackage.haskell.org and construct the Guix package S-expression. + +(define (hackage-fetch name-version) + "Return the Cabal file for the package NAME-VERSION, or #f on failure. If +the version part is omitted from the package name, then return the latest +version." + (let*-values (((name version) (package-name->name+version name-version)) + ((url) + (if version + (string-append "http://hackage.haskell.org/package/" + name "-" version "/" name ".cabal") + (string-append "http://hackage.haskell.org/package/" + name "/" name ".cabal")))) + (call-with-temporary-output-file + (lambda (temp port) + (and (url-fetch url temp) + (call-with-input-file temp read-cabal)))))) + +(define string->license + ;; List of valid values from + ;; https://www.haskell.org + ;; /cabal/release/cabal-latest/doc/API/Cabal/Distribution-License.html. + (match-lambda + ("GPL-2" 'gpl2) + ("GPL-3" 'gpl3) + ("GPL" "'gpl??") + ("AGPL-3" 'agpl3) + ("AGPL" "'agpl??") + ("LGPL-2.1" 'lgpl2.1) + ("LGPL-3" 'lgpl3) + ("LGPL" "'lgpl??") + ("BSD2" 'bsd-2) + ("BSD3" 'bsd-3) + ("MIT" 'expat) + ("ISC" 'isc) + ("MPL" 'mpl2.0) + ("Apache-2.0" 'asl2.0) + ((x) (string->license x)) + ((lst ...) `(list ,@(map string->license lst))) + (_ #f))) + +(define* (hackage-module->sexp meta #:key (include-test-dependencies? #t)) + "Return the `package' S-expression for a Cabal package. META is the +representation of a Cabal file as produced by 'read-cabal'." + + (define name + (first (key->values meta "name"))) + + (define version + (first (key->values meta "version"))) + + (define description + (let*-values (((description) (key->values meta "description")) + ((lines last) + (split-at description (- (length description) 1)))) + (fold-right (lambda (line seed) (string-append line "\n" seed)) + (first last) lines))) + + (define source-url + (string-append "http://hackage.haskell.org/package/" name + "/" name "-" version ".tar.gz")) + + ;; Several packages do not have an official home-page other than on Hackage. + (define home-page + (let ((home-page-entry (key->values meta "homepage"))) + (if (null? home-page-entry) + (string-append "http://hackage.haskell.org/package/" name) + (first home-page-entry)))) + + (define (maybe-inputs input-type inputs) + (match inputs + (() + '()) + ((inputs ...) + (list (list input-type + (list 'quasiquote inputs)))))) + + (let ((tarball (with-store store + (download-to-store store source-url)))) + `(package + (name ,(hackage-name->package-name name)) + (version ,version) + (source (origin + (method url-fetch) + (uri (string-append ,@(factorize-uri source-url version))) + (sha256 + (base32 + ,(if tarball + (bytevector->nix-base32-string (file-sha256 tarball)) + "failed to download tar archive"))))) + (build-system haskell-build-system) + ,@(maybe-inputs 'inputs + (dependencies-cond->sexp meta + #:include-test-dependencies? + include-test-dependencies?)) + (home-page ,home-page) + (synopsis ,@(key->values meta "synopsis")) + (description ,description) + (license ,(string->license (key->values meta "license")))))) + +(define* (hackage->guix-package module-name + #:key (include-test-dependencies? #t)) + "Fetch the Cabal file for PACKAGE-NAME from hackage.haskell.org, and return +the `package' S-expression corresponding to that package, or #f on failure." + (let ((module-meta (hackage-fetch module-name))) + (and=> module-meta (cut hackage-module->sexp <> + #:include-test-dependencies? + include-test-dependencies?)))) + +;;; cabal.scm ends here diff --git a/guix/monads.scm b/guix/monads.scm index 5bb860aadd..f693e99a59 100644 --- a/guix/monads.scm +++ b/guix/monads.scm @@ -250,11 +250,23 @@ to happen in that order." lst))) (return (reverse result)))) -(define-inlinable (sequence monad lst) +(define-syntax-rule (sequence monad lst) "Turn the list of monadic values LST into a monadic list of values, by evaluating each item of LST in sequence." + ;; XXX: Making it a macro is a bit brutal as it leads to a lot of code + ;; duplication. However, it allows >>= and return to be open-coded, which + ;; avoids struct-ref's to MONAD and a few closure allocations when using + ;; %STATE-MONAD. (with-monad monad - (mapm monad return lst))) + (let seq ((lstx lst) + (result '())) + (match lstx + (() + (return (reverse result))) + ((head . tail) + (>>= head + (lambda (item) + (seq tail (cons item result))))))))) (define (anym monad proc lst) "Apply PROC to the list of monadic values LST; return the first value, diff --git a/guix/packages.scm b/guix/packages.scm index ec0e79d08b..c955b35155 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -26,6 +26,8 @@ #:use-module (guix base32) #:use-module (guix derivations) #:use-module (guix build-system) + #:use-module (guix search-paths) + #:use-module (guix gexp) #:use-module (ice-9 match) #:use-module (ice-9 vlist) #:use-module (srfi srfi-1) @@ -35,7 +37,8 @@ #:use-module (srfi srfi-34) #:use-module (srfi srfi-35) #:re-export (%current-system - %current-target-system) + %current-target-system + search-path-specification) ;for convenience #:export (origin origin? origin-uri @@ -51,11 +54,6 @@ origin-imported-modules base32 - <search-path-specification> - search-path-specification - search-path-specification? - search-path-specification->sexp - package package? package-name @@ -81,6 +79,8 @@ package-location package-field-location + package-direct-sources + package-transitive-sources package-direct-inputs package-transitive-inputs package-transitive-target-inputs @@ -94,6 +94,8 @@ package-grafts %supported-systems + %hydra-supported-systems + supported-package? &package-error package-error? @@ -106,6 +108,7 @@ package->bag bag->derivation + bag-direct-inputs bag-transitive-inputs bag-transitive-host-inputs bag-transitive-build-inputs @@ -182,30 +185,15 @@ representation." ((_ str) #'(nix-base32-string->bytevector str))))) -;; The specification of a search path. -(define-record-type* <search-path-specification> - search-path-specification make-search-path-specification - search-path-specification? - (variable search-path-specification-variable) ;string - (files search-path-specification-files) ;list of strings - (separator search-path-specification-separator ;string - (default ":")) - (file-type search-path-specification-file-type ;symbol - (default 'directory)) - (file-pattern search-path-specification-file-pattern ;#f | string - (default #f))) - -(define (search-path-specification->sexp spec) - "Return an sexp representing SPEC, a <search-path-specification>. The sexp -corresponds to the arguments expected by `set-path-environment-variable'." - (match spec - (($ <search-path-specification> variable files separator type pattern) - `(,variable ,files ,separator ,type ,pattern)))) - (define %supported-systems ;; This is the list of system types that are supported. By default, we ;; expect all packages to build successfully here. - '("x86_64-linux" "i686-linux" "mips64el-linux")) + '("x86_64-linux" "i686-linux" "armhf-linux" "mips64el-linux")) + +(define %hydra-supported-systems + ;; This is the list of system types for which build slaves are available. + (delete "armhf-linux" %supported-systems)) + ;; A package. (define-record-type* <package> @@ -334,8 +322,10 @@ corresponds to the arguments expected by `set-path-environment-variable'." ("bzip2" ,(ref '(gnu packages compression) 'bzip2)) ("gzip" ,(ref '(gnu packages compression) 'gzip)) ("lzip" ,(ref '(gnu packages compression) 'lzip)) + ("unzip" ,(ref '(gnu packages zip) 'unzip)) ("patch" ,(ref '(gnu packages base) 'patch)) - ("locales" ,(ref '(gnu packages base) 'glibc-utf8-locales))))) + ("locales" ,(ref '(gnu packages commencement) + 'glibc-utf8-locales-final))))) (define (default-guile) "Return the default Guile package used to run the build code of @@ -349,10 +339,9 @@ the build code of derivation." (package->derivation (default-guile) system #:graft? #f)) -;; TODO: Rewrite using %STORE-MONAD and gexps. -(define* (patch-and-repack store source patches +(define* (patch-and-repack source patches #:key - (inputs '()) + inputs (snippet #f) (flags '("-p1")) (modules '()) @@ -370,10 +359,20 @@ IMPORTED-MODULES specify modules to use/import for use by SNIPPET." (derivation->output-path source) source)) + (define lookup-input + ;; The default value of the 'patch-inputs' field, and thus INPUTS is #f, + ;; so deal with that. + (let ((inputs (or inputs (%standard-patch-inputs)))) + (lambda (name) + (match (assoc-ref inputs name) + ((package) package) + (#f #f))))) + (define decompression-type (cond ((string-suffix? "gz" source-file-name) "gzip") ((string-suffix? "bz2" source-file-name) "bzip2") ((string-suffix? "lz" source-file-name) "lzip") + ((string-suffix? "zip" source-file-name) "unzip") (else "xz"))) (define original-file-name @@ -398,115 +397,95 @@ IMPORTED-MODULES specify modules to use/import for use by SNIPPET." ".xz" ".tar.xz")))) - (define patch-inputs - (map (lambda (number patch) - (list (string-append "patch" (number->string number)) - (match patch - ((? string?) - (add-to-store store (basename patch) #t - "sha256" patch)) - ((? origin?) - (package-source-derivation store patch system))))) - (iota (length patches)) - - patches)) - - (define builder - `(begin - (use-modules (ice-9 ftw) - (srfi srfi-1) - (guix build utils)) - - ;; Encoding/decoding errors shouldn't be silent. - (fluid-set! %default-port-conversion-strategy 'error) - - (let ((locales (assoc-ref %build-inputs "locales")) - (out (assoc-ref %outputs "out")) - (xz (assoc-ref %build-inputs "xz")) - (decomp (assoc-ref %build-inputs ,decompression-type)) - (source (assoc-ref %build-inputs "source")) - (tar (string-append (assoc-ref %build-inputs "tar") - "/bin/tar")) - (patch (string-append (assoc-ref %build-inputs "patch") - "/bin/patch"))) - (define (apply-patch input) - (let ((patch* (assoc-ref %build-inputs input))) - (format (current-error-port) "applying '~a'...~%" patch*) - - ;; Use '--force' so that patches that do not apply perfectly are - ;; rejected. - (zero? (system* patch "--force" ,@flags "--input" patch*)))) - - (define (first-file directory) - ;; Return the name of the first file in DIRECTORY. - (car (scandir directory - (lambda (name) - (not (member name '("." ".."))))))) - - (when locales - ;; First of all, install a UTF-8 locale so that UTF-8 file names - ;; are correctly interpreted. During bootstrap, LOCALES is #f. - (setenv "LOCPATH" (string-append locales "/lib/locale")) - (setlocale LC_ALL "en_US.UTF-8")) - - (setenv "PATH" (string-append xz "/bin" ":" - decomp "/bin")) - - ;; SOURCE may be either a directory or a tarball. - (and (if (file-is-directory? source) - (let* ((store (or (getenv "NIX_STORE") "/gnu/store")) - (len (+ 1 (string-length store))) - (base (string-drop source len)) - (dash (string-index base #\-)) - (directory (string-drop base (+ 1 dash)))) - (mkdir directory) - (copy-recursively source directory) - #t) - (zero? (system* tar "xvf" source))) - (let ((directory (first-file "."))) - (format (current-error-port) - "source is under '~a'~%" directory) - (chdir directory) - - (and (every apply-patch ',(map car patch-inputs)) - - ,@(if snippet - `((let ((module (make-fresh-user-module))) - (module-use-interfaces! module - (map resolve-interface - ',modules)) - (module-define! module '%build-inputs - %build-inputs) - (module-define! module '%outputs %outputs) - ((@ (system base compile) compile) - ',snippet - #:to 'value - #:opts %auto-compilation-options - #:env module))) - '()) - - (begin (chdir "..") #t) - (zero? (system* tar "cvfa" out directory)))))))) - - - (let ((name (tarxz-name original-file-name)) - (inputs (filter-map (match-lambda - ((name (? package? p)) - (and (member name (cons decompression-type - '("tar" "xz" "patch"))) - (list name - (package-derivation store p system - #:graft? #f))))) - (or inputs (%standard-patch-inputs)))) - (modules (delete-duplicates (cons '(guix build utils) modules)))) - - (build-expression->derivation store name builder - #:inputs `(("source" ,source) - ,@inputs - ,@patch-inputs) - #:system system - #:modules modules - #:guile-for-build guile-for-build))) + (define instantiate-patch + (match-lambda + ((? string? patch) + (interned-file patch #:recursive? #t)) + ((? origin? patch) + (origin->derivation patch system)))) + + (mlet %store-monad ((tar -> (lookup-input "tar")) + (xz -> (lookup-input "xz")) + (patch -> (lookup-input "patch")) + (locales -> (lookup-input "locales")) + (decomp -> (lookup-input decompression-type)) + (patches (sequence %store-monad + (map instantiate-patch patches)))) + (define build + #~(begin + (use-modules (ice-9 ftw) + (srfi srfi-1) + (guix build utils)) + + (define (apply-patch patch) + (format (current-error-port) "applying '~a'...~%" patch) + + ;; Use '--force' so that patches that do not apply perfectly are + ;; rejected. + (zero? (system* (string-append #+patch "/bin/patch") + "--force" #+@flags "--input" patch))) + + (define (first-file directory) + ;; Return the name of the first file in DIRECTORY. + (car (scandir directory + (lambda (name) + (not (member name '("." ".."))))))) + + ;; Encoding/decoding errors shouldn't be silent. + (fluid-set! %default-port-conversion-strategy 'error) + + (when #+locales + ;; First of all, install a UTF-8 locale so that UTF-8 file names + ;; are correctly interpreted. During bootstrap, LOCALES is #f. + (setenv "LOCPATH" (string-append #+locales "/lib/locale")) + (setlocale LC_ALL "en_US.UTF-8")) + + (setenv "PATH" (string-append #+xz "/bin" ":" + #+decomp "/bin")) + + ;; SOURCE may be either a directory or a tarball. + (and (if (file-is-directory? #+source) + (let* ((store (or (getenv "NIX_STORE") "/gnu/store")) + (len (+ 1 (string-length store))) + (base (string-drop #+source len)) + (dash (string-index base #\-)) + (directory (string-drop base (+ 1 dash)))) + (mkdir directory) + (copy-recursively #+source directory) + #t) + #+(if (string=? decompression-type "unzip") + #~(zero? (system* "unzip" #+source)) + #~(zero? (system* (string-append #+tar "/bin/tar") + "xvf" #+source)))) + (let ((directory (first-file "."))) + (format (current-error-port) + "source is under '~a'~%" directory) + (chdir directory) + + (and (every apply-patch '#+patches) + #+@(if snippet + #~((let ((module (make-fresh-user-module))) + (module-use-interfaces! module + (map resolve-interface + '#+modules)) + ((@ (system base compile) compile) + '#+snippet + #:to 'value + #:opts %auto-compilation-options + #:env module))) + #~()) + + (begin (chdir "..") #t) + (zero? (system* (string-append #+tar "/bin/tar") + "cvfa" #$output directory))))))) + + (let ((name (tarxz-name original-file-name)) + (modules (delete-duplicates (cons '(guix build utils) modules)))) + (gexp->derivation name build + #:graft? #f + #:system system + #:modules modules + #:guile-for-build guile-for-build)))) (define (transitive-inputs inputs) (let loop ((inputs inputs) @@ -525,6 +504,28 @@ IMPORTED-MODULES specify modules to use/import for use by SNIPPET." ((input rest ...) (loop rest (cons input result)))))) +(define (package-direct-sources package) + "Return all source origins associated with PACKAGE; including origins in +PACKAGE's inputs." + `(,@(or (and=> (package-source package) list) '()) + ,@(filter-map (match-lambda + ((_ (? origin? orig) _ ...) + orig) + (_ #f)) + (package-direct-inputs package)))) + +(define (package-transitive-sources package) + "Return PACKAGE's direct sources, and their direct sources, recursively." + (delete-duplicates + (concatenate (filter-map (match-lambda + ((_ (? origin? orig) _ ...) + (list orig)) + ((_ (? package? p) _ ...) + (package-direct-sources p)) + (_ #f)) + (bag-transitive-inputs + (package->bag package)))))) + (define (package-direct-inputs package) "Return all the direct inputs of PACKAGE---i.e, its direct inputs along with their propagated inputs." @@ -586,13 +587,22 @@ supported by its dependencies." (_ systems))) (package-supported-systems package) - (package-direct-inputs package))) + (bag-direct-inputs (package->bag package)))) + +(define* (supported-package? package #:optional (system (%current-system))) + "Return true if PACKAGE is supported on SYSTEM--i.e., if PACKAGE and all its +dependencies are known to build on SYSTEM." + (member system (package-transitive-supported-systems package))) + +(define (bag-direct-inputs bag) + "Same as 'package-direct-inputs', but applied to a bag." + (append (bag-build-inputs bag) + (bag-host-inputs bag) + (bag-target-inputs bag))) (define (bag-transitive-inputs bag) "Same as 'package-transitive-inputs', but applied to a bag." - (transitive-inputs (append (bag-build-inputs bag) - (bag-host-inputs bag) - (bag-target-inputs bag)))) + (transitive-inputs (bag-direct-inputs bag))) (define (bag-transitive-build-inputs bag) "Same as 'package-transitive-native-inputs', but applied to a bag." @@ -954,9 +964,6 @@ cross-compilation target triplet." (package->cross-derivation package target system) (package->derivation package system))) -(define patch-and-repack* - (store-lift patch-and-repack)) - (define* (origin->derivation source #:optional (system (%current-system))) "When SOURCE is an <origin> object, return its derivation for SYSTEM. When @@ -976,14 +983,14 @@ outside of the store) or SOURCE itself (if SOURCE is already a store item.)" (default-guile)) system #:graft? #f))) - (patch-and-repack* source patches - #:inputs inputs - #:snippet snippet - #:flags flags - #:system system - #:modules modules - #:imported-modules modules - #:guile-for-build guile))) + (patch-and-repack source patches + #:inputs inputs + #:snippet snippet + #:flags flags + #:system system + #:modules modules + #:imported-modules modules + #:guile-for-build guile))) ((and (? string?) (? direct-store-path?) file) (with-monad %store-monad (return file))) diff --git a/guix/profiles.scm b/guix/profiles.scm index 465aaf9477..9cb226eda7 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -22,8 +22,9 @@ (define-module (guix profiles) #:use-module (guix utils) #:use-module (guix records) - #:use-module (guix derivations) #:use-module (guix packages) + #:use-module (guix derivations) + #:use-module (guix search-paths) #:use-module (guix gexp) #:use-module (guix monads) #:use-module (guix store) @@ -59,6 +60,7 @@ manifest-entry-output manifest-entry-item manifest-entry-dependencies + manifest-entry-search-paths manifest-pattern manifest-pattern? @@ -78,6 +80,8 @@ profile-manifest package->manifest-entry + packages->manifest + %default-profile-hooks profile-derivation generation-number generation-numbers @@ -132,6 +136,8 @@ (default "out")) (item manifest-entry-item) ; package | store path (dependencies manifest-entry-dependencies ; (store path | package)* + (default '())) + (search-paths manifest-entry-search-paths ; search-path-specification* (default '()))) (define-record-type* <manifest-pattern> manifest-pattern @@ -164,25 +170,72 @@ omitted or #f, use the first output of PACKAGE." (version (package-version package)) (output (or output (car (package-outputs package)))) (item package) - (dependencies (delete-duplicates deps))))) + (dependencies (delete-duplicates deps)) + (search-paths (package-native-search-paths package))))) + +(define (packages->manifest packages) + "Return a list of manifest entries, one for each item listed in PACKAGES. +Elements of PACKAGES can be either package objects or package/string tuples +denoting a specific output of a package." + (manifest + (map (match-lambda + ((package output) + (package->manifest-entry package output)) + (package + (package->manifest-entry package))) + packages))) (define (manifest->gexp manifest) "Return a representation of MANIFEST as a gexp." (define (entry->gexp entry) (match entry - (($ <manifest-entry> name version output (? string? path) (deps ...)) - #~(#$name #$version #$output #$path #$deps)) - (($ <manifest-entry> name version output (? package? package) (deps ...)) + (($ <manifest-entry> name version output (? string? path) + (deps ...) (search-paths ...)) + #~(#$name #$version #$output #$path + (propagated-inputs #$deps) + (search-paths #$(map search-path-specification->sexp + search-paths)))) + (($ <manifest-entry> name version output (? package? package) + (deps ...) (search-paths ...)) #~(#$name #$version #$output - (ungexp package (or output "out")) #$deps)))) + (ungexp package (or output "out")) + (propagated-inputs #$deps) + (search-paths #$(map search-path-specification->sexp + search-paths)))))) (match manifest (($ <manifest> (entries ...)) - #~(manifest (version 1) + #~(manifest (version 2) (packages #$(map entry->gexp entries)))))) +(define (find-package name version) + "Return a package from the distro matching NAME and possibly VERSION. This +procedure is here for backward-compatibility and will eventually vanish." + (define find-best-packages-by-name ;break abstractions + (module-ref (resolve-interface '(gnu packages)) + 'find-best-packages-by-name)) + + ;; Use 'find-best-packages-by-name' and not 'find-packages-by-name'; the + ;; former traverses the module tree only once and then allows for efficient + ;; access via a vhash. + (match (find-best-packages-by-name name version) + ((p _ ...) p) + (_ + (match (find-best-packages-by-name name #f) + ((p _ ...) p) + (_ #f))))) + (define (sexp->manifest sexp) "Parse SEXP as a manifest." + (define (infer-search-paths name version) + ;; Infer the search path specifications for NAME-VERSION by looking up a + ;; same-named package in the distro. Useful for the old manifest formats + ;; that did not store search path info. + (let ((package (find-package name version))) + (if package + (package-native-search-paths package) + '()))) + (match sexp (('manifest ('version 0) ('packages ((name version output path) ...))) @@ -192,7 +245,8 @@ omitted or #f, use the first output of PACKAGE." (name name) (version version) (output output) - (item path))) + (item path) + (search-paths (infer-search-paths name version)))) name version output path))) ;; Version 1 adds a list of propagated inputs to the @@ -214,11 +268,31 @@ omitted or #f, use the first output of PACKAGE." (version version) (output output) (item path) - (dependencies deps)))) + (dependencies deps) + (search-paths (infer-search-paths name version))))) name version output path deps))) + ;; Version 2 adds search paths and is slightly more verbose. + (('manifest ('version 2 minor-version ...) + ('packages ((name version output path + ('propagated-inputs deps) + ('search-paths search-paths) + extra-stuff ...) + ...))) + (manifest + (map (lambda (name version output path deps search-paths) + (manifest-entry + (name name) + (version version) + (output output) + (item path) + (dependencies deps) + (search-paths (map sexp->search-path-specification + search-paths)))) + name version output path deps search-paths))) (_ - (error "unsupported manifest format" manifest)))) + (raise (condition + (&message (message "unsupported manifest format"))))))) (define (read-manifest port) "Return the packages listed in MANIFEST." @@ -398,11 +472,56 @@ MANIFEST." (append-map info-files '#$(manifest-inputs manifest))))) - ;; Don't depend on Texinfo when there's nothing to do. - (if (null? (manifest-entries manifest)) - (gexp->derivation "info-dir" #~(mkdir #$output)) - (gexp->derivation "info-dir" build - #:modules '((guix build utils))))) + (gexp->derivation "info-dir" build + #:modules '((guix build utils)))) + +(define (ghc-package-cache-file manifest) + "Return a derivation that builds the GHC 'package.cache' file for all the +entries of MANIFEST, or #f if MANIFEST does not have any GHC packages." + (define ghc ;lazy reference + (module-ref (resolve-interface '(gnu packages haskell)) 'ghc)) + + (define build + #~(begin + (use-modules (guix build utils) + (srfi srfi-1) (srfi srfi-26) + (ice-9 ftw)) + + (define ghc-name-version + (let* ((base (basename #+ghc))) + (string-drop base + (+ 1 (string-index base #\-))))) + + (define db-subdir + (string-append "lib/" ghc-name-version "/package.conf.d")) + + (define db-dir + (string-append #$output "/" db-subdir)) + + (define (conf-files top) + (find-files (string-append top "/" db-subdir) "\\.conf$")) + + (define (copy-conf-file conf) + (let ((base (basename conf))) + (copy-file conf (string-append db-dir "/" base)))) + + (system* (string-append #+ghc "/bin/ghc-pkg") "init" db-dir) + (for-each copy-conf-file + (append-map conf-files + '#$(manifest-inputs manifest))) + (let ((success + (zero? + (system* (string-append #+ghc "/bin/ghc-pkg") "recache" + (string-append "--package-db=" db-dir))))) + (for-each delete-file (find-files db-dir "\\.conf$")) + success))) + + ;; Don't depend on GHC when there's nothing to do. + (and (any (cut string-prefix? "ghc" <>) + (map manifest-entry-name (manifest-entries manifest))) + (gexp->derivation "ghc-package-cache" build + #:modules '((guix build utils)) + #:local-build? #t))) (define (ca-certificate-bundle manifest) "Return a derivation that builds a single-file bundle containing the CA @@ -420,7 +539,8 @@ MANIFEST. Single-file bundles are required by programs such as Git and Lynx." (rnrs io ports) (srfi srfi-1) (srfi srfi-26) - (ice-9 ftw)) + (ice-9 ftw) + (ice-9 match)) (define (pem-file? file) (string-suffix? ".pem" file)) @@ -446,61 +566,75 @@ MANIFEST. Single-file bundles are required by programs such as Git and Lynx." (setenv "LOCPATH" (string-append #+glibc-utf8-locales "/lib/locale")) (setlocale LC_ALL "en_US.UTF-8") - (let ((ca-files (append-map ca-files - '#$(manifest-inputs manifest))) - (result (string-append #$output "/etc/ssl/certs"))) - (mkdir-p result) - (concatenate-files ca-files - (string-append result - "/ca-certificates.crt"))))) - - ;; Don't depend on 'glibc-utf8-locales' and its dependencies when there's - ;; nothing to do. - (if (null? (manifest-entries manifest)) - (gexp->derivation "ca-certificate-bundle" #~(mkdir #$output)) - (gexp->derivation "ca-certificate-bundle" build - #:modules '((guix build utils)) - #:local-build? #t))) + (match (append-map ca-files '#$(manifest-inputs manifest)) + (() + ;; Since there are no CA files, just create an empty directory. Do + ;; not create the etc/ssl/certs sub-directory, since that would + ;; wrongfully lead to a message about 'SSL_CERT_DIR' needing to be + ;; defined. + (mkdir #$output) + #t) + ((ca-files ...) + (let ((result (string-append #$output "/etc/ssl/certs"))) + (mkdir-p result) + (concatenate-files ca-files + (string-append result + "/ca-certificates.crt")) + #t))))) + + (gexp->derivation "ca-certificate-bundle" build + #:modules '((guix build utils)) + #:local-build? #t)) + +(define %default-profile-hooks + ;; This is the list of derivation-returning procedures that are called by + ;; default when making a non-empty profile. + (list info-dir-file + ghc-package-cache-file + ca-certificate-bundle)) (define* (profile-derivation manifest #:key - (info-dir? #t) - (ca-certificate-bundle? #t)) + (hooks %default-profile-hooks)) "Return a derivation that builds a profile (aka. 'user environment') with -the given MANIFEST. The profile includes a top-level Info 'dir' file unless -INFO-DIR? is #f, and a single-file CA certificate bundle unless -CA-CERTIFICATE-BUNDLE? is #f." - (mlet %store-monad ((info-dir (if info-dir? - (info-dir-file manifest) - (return #f))) - (ca-cert-bundle (if ca-certificate-bundle? - (ca-certificate-bundle manifest) - (return #f)))) +the given MANIFEST. The profile includes additional derivations returned by +the monadic procedures listed in HOOKS--such as an Info 'dir' file, etc." + (mlet %store-monad ((extras (if (null? (manifest-entries manifest)) + (return '()) + (sequence %store-monad + (filter-map (lambda (hook) + (hook manifest)) + hooks))))) (define inputs - (append (if info-dir - (list (gexp-input info-dir)) - '()) - (if ca-cert-bundle - (list (gexp-input ca-cert-bundle)) - '()) + (append (map gexp-input extras) (manifest-inputs manifest))) (define builder #~(begin - (use-modules (ice-9 pretty-print) - (guix build union)) + (use-modules (guix build profiles) + (guix search-paths)) (setvbuf (current-output-port) _IOLBF) (setvbuf (current-error-port) _IOLBF) - (union-build #$output '#$inputs - #:log-port (%make-void-port "w")) - (call-with-output-file (string-append #$output "/manifest") - (lambda (p) - (pretty-print '#$(manifest->gexp manifest) p))))) + (define search-paths + ;; Search paths of MANIFEST's packages, converted back to their + ;; record form. + (map sexp->search-path-specification + '#$(map search-path-specification->sexp + (append-map manifest-entry-search-paths + (manifest-entries manifest))))) + + (build-profile #$output '#$inputs + #:manifest '#$(manifest->gexp manifest) + #:search-paths search-paths))) (gexp->derivation "profile" builder - #:modules '((guix build union)) + #:modules '((guix build profiles) + (guix build union) + (guix build utils) + (guix search-paths) + (guix records)) #:local-build? #t))) (define (profile-regexp profile) diff --git a/guix/records.scm b/guix/records.scm index fd17e135e1..db59a99052 100644 --- a/guix/records.scm +++ b/guix/records.scm @@ -42,102 +42,106 @@ (format #f fmt args ...) form)))) -(define* (make-syntactic-constructor type name ctor fields - #:key (thunked '()) (defaults '()) - (delayed '())) - "Make the syntactic constructor NAME for TYPE, that calls CTOR, and expects +(eval-when (expand load eval) + ;; This procedure is a syntactic helper used by 'define-record-type*', hence + ;; 'eval-when'. + + (define* (make-syntactic-constructor type name ctor fields + #:key (thunked '()) (defaults '()) + (delayed '())) + "Make the syntactic constructor NAME for TYPE, that calls CTOR, and expects all of FIELDS to be initialized. DEFAULTS is the list of FIELD/DEFAULT-VALUE tuples, THUNKED is the list of identifiers of thunked fields, and DELAYED is the list of identifiers of delayed fields." - (with-syntax ((type type) - (name name) - (ctor ctor) - (expected fields) - (defaults defaults)) - #`(define-syntax name - (lambda (s) - (define (record-inheritance orig-record field+value) - ;; Produce code that returns a record identical to ORIG-RECORD, - ;; except that values for the FIELD+VALUE alist prevail. - (define (field-inherited-value f) - (and=> (find (lambda (x) - (eq? f (car (syntax->datum x)))) - field+value) - car)) - - ;; Make sure there are no unknown field names. - (let* ((fields (map (compose car syntax->datum) field+value)) - (unexpected (lset-difference eq? fields 'expected))) - (when (pair? unexpected) - (record-error 'name s "extraneous field initializers ~a" - unexpected))) - - #`(make-struct type 0 - #,@(map (lambda (field index) - (or (field-inherited-value field) - #`(struct-ref #,orig-record - #,index))) - 'expected - (iota (length 'expected))))) - - (define (thunked-field? f) - (memq (syntax->datum f) '#,thunked)) - - (define (delayed-field? f) - (memq (syntax->datum f) '#,delayed)) - - (define (wrap-field-value f value) - (cond ((thunked-field? f) - #`(lambda () #,value)) - ((delayed-field? f) - #`(delay #,value)) - (else value))) - - (define (field-bindings field+value) - ;; Return field to value bindings, for use in 'let*' below. - (map (lambda (field+value) - (syntax-case field+value () - ((field value) - #`(field - #,(wrap-field-value #'field #'value))))) - field+value)) - - (syntax-case s (inherit #,@fields) - ((_ (inherit orig-record) (field value) (... ...)) - #`(let* #,(field-bindings #'((field value) (... ...))) - #,(record-inheritance #'orig-record - #'((field value) (... ...))))) - ((_ (field value) (... ...)) - (let ((fields (map syntax->datum #'(field (... ...)))) - (dflt (map (match-lambda - ((f v) - (list (syntax->datum f) v))) - #'defaults))) - - (define (field-value f) - (or (and=> (find (lambda (x) - (eq? f (car (syntax->datum x)))) - #'((field value) (... ...))) - car) - (let ((value - (car (assoc-ref dflt (syntax->datum f))))) - (wrap-field-value f value)))) - - (let ((fields (append fields (map car dflt)))) - (cond ((lset= eq? fields 'expected) - #`(let* #,(field-bindings - #'((field value) (... ...))) - (ctor #,@(map field-value 'expected)))) - ((pair? (lset-difference eq? fields 'expected)) - (record-error 'name s - "extraneous field initializers ~a" - (lset-difference eq? fields - 'expected))) - (else - (record-error 'name s - "missing field initializers ~a" - (lset-difference eq? 'expected - fields)))))))))))) + (with-syntax ((type type) + (name name) + (ctor ctor) + (expected fields) + (defaults defaults)) + #`(define-syntax name + (lambda (s) + (define (record-inheritance orig-record field+value) + ;; Produce code that returns a record identical to ORIG-RECORD, + ;; except that values for the FIELD+VALUE alist prevail. + (define (field-inherited-value f) + (and=> (find (lambda (x) + (eq? f (car (syntax->datum x)))) + field+value) + car)) + + ;; Make sure there are no unknown field names. + (let* ((fields (map (compose car syntax->datum) field+value)) + (unexpected (lset-difference eq? fields 'expected))) + (when (pair? unexpected) + (record-error 'name s "extraneous field initializers ~a" + unexpected))) + + #`(make-struct type 0 + #,@(map (lambda (field index) + (or (field-inherited-value field) + #`(struct-ref #,orig-record + #,index))) + 'expected + (iota (length 'expected))))) + + (define (thunked-field? f) + (memq (syntax->datum f) '#,thunked)) + + (define (delayed-field? f) + (memq (syntax->datum f) '#,delayed)) + + (define (wrap-field-value f value) + (cond ((thunked-field? f) + #`(lambda () #,value)) + ((delayed-field? f) + #`(delay #,value)) + (else value))) + + (define (field-bindings field+value) + ;; Return field to value bindings, for use in 'let*' below. + (map (lambda (field+value) + (syntax-case field+value () + ((field value) + #`(field + #,(wrap-field-value #'field #'value))))) + field+value)) + + (syntax-case s (inherit #,@fields) + ((_ (inherit orig-record) (field value) (... ...)) + #`(let* #,(field-bindings #'((field value) (... ...))) + #,(record-inheritance #'orig-record + #'((field value) (... ...))))) + ((_ (field value) (... ...)) + (let ((fields (map syntax->datum #'(field (... ...)))) + (dflt (map (match-lambda + ((f v) + (list (syntax->datum f) v))) + #'defaults))) + + (define (field-value f) + (or (and=> (find (lambda (x) + (eq? f (car (syntax->datum x)))) + #'((field value) (... ...))) + car) + (let ((value + (car (assoc-ref dflt (syntax->datum f))))) + (wrap-field-value f value)))) + + (let ((fields (append fields (map car dflt)))) + (cond ((lset= eq? fields 'expected) + #`(let* #,(field-bindings + #'((field value) (... ...))) + (ctor #,@(map field-value 'expected)))) + ((pair? (lset-difference eq? fields 'expected)) + (record-error 'name s + "extraneous field initializers ~a" + (lset-difference eq? fields + 'expected))) + (else + (record-error 'name s + "missing field initializers ~a" + (lset-difference eq? 'expected + fields))))))))))))) (define-syntax define-record-type* (lambda (s) diff --git a/guix/scripts/authenticate.scm b/guix/scripts/authenticate.scm index e9900689fa..eedebb4bac 100644 --- a/guix/scripts/authenticate.scm +++ b/guix/scripts/authenticate.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -82,12 +82,6 @@ to stdout upon success." (leave (_ "error: corrupt signature data: ~a~%") (canonical-sexp->string signature))))) -(define %default-port-conversion-strategy - ;; This fluid is in Guile > 2.0.5. - (if (defined? '%default-port-conversion-strategy) - (@ (guile) %default-port-conversion-strategy) - (make-fluid #f))) - ;;; ;;; Entry point with 'openssl'-compatible interface. We support this diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm index 370c2a37ff..2307f76b42 100644 --- a/guix/scripts/build.scm +++ b/guix/scripts/build.scm @@ -37,6 +37,7 @@ #:autoload (guix download) (download-to-store) #:export (%standard-build-options set-build-options-from-command-line + set-build-options-from-command-line* show-build-options-help guix-build)) @@ -139,6 +140,9 @@ options handled by 'set-build-options-from-command-line', and listed in #:print-build-trace (assoc-ref opts 'print-build-trace?) #:verbosity (assoc-ref opts 'verbosity))) +(define set-build-options-from-command-line* + (store-lift set-build-options-from-command-line)) + (define %standard-build-options ;; List of standard command-line options for tools that build something. (list (option '(#\L "load-path") #t #f @@ -228,6 +232,9 @@ Build the given PACKAGE-OR-DERIVATION and return their output paths.\n")) (display (_ " -S, --source build the packages' source derivations")) (display (_ " + --sources[=TYPE] build source derivations; TYPE may optionally be one + of \"package\", \"all\" (default), or \"transitive\"")) + (display (_ " -s, --system=SYSTEM attempt to build for SYSTEM--e.g., \"i686-linux\"")) (display (_ " --target=TRIPLET cross-build for TRIPLET--e.g., \"armel-linux-gnu\"")) @@ -262,10 +269,22 @@ Build the given PACKAGE-OR-DERIVATION and return their output paths.\n")) (option '(#\V "version") #f #f (lambda args (show-version-and-exit "guix build"))) - (option '(#\S "source") #f #f (lambda (opt name arg result) - (alist-cons 'source? #t result))) + (alist-cons 'source #t result))) + (option '("sources") #f #t + (lambda (opt name arg result) + (match arg + ("package" + (alist-cons 'source #t result)) + ((or "all" #f) + (alist-cons 'source package-direct-sources result)) + ("transitive" + (alist-cons 'source package-transitive-sources result)) + (else + (leave (_ "invalid argument: '~a' option argument: ~a, ~ +must be one of 'package', 'all', or 'transitive'~%") + name arg))))) (option '(#\s "system") #t #f (lambda (opt name arg result) (alist-cons 'system arg @@ -308,28 +327,34 @@ build." (triplet (cut package-cross-derivation <> <> triplet <>)))) - (define src? (assoc-ref opts 'source?)) + (define src (assoc-ref opts 'source)) (define sys (assoc-ref opts 'system)) (define graft? (assoc-ref opts 'graft?)) (parameterize ((%graft? graft?)) (let ((opts (options/with-source store (options/resolve-packages store opts)))) - (filter-map (match-lambda - (('argument . (? package? p)) - (if src? + (concatenate + (filter-map (match-lambda + (('argument . (? package? p)) + (match src + (#f + (list (package->derivation store p sys))) + (#t (let ((s (package-source p))) - (package-source-derivation store s)) - (package->derivation store p sys))) - (('argument . (? derivation? drv)) - drv) - (('argument . (? derivation-path? drv)) - (call-with-input-file drv read-derivation)) - (('argument . (? store-path?)) - ;; Nothing to do; maybe for --log-file. - #f) - (_ #f)) - opts)))) + (list (package-source-derivation store s)))) + (proc + (map (cut package-source-derivation store <>) + (proc p))))) + (('argument . (? derivation? drv)) + (list drv)) + (('argument . (? derivation-path? drv)) + (list (call-with-input-file drv read-derivation))) + (('argument . (? store-path?)) + ;; Nothing to do; maybe for --log-file. + #f) + (_ #f)) + opts))))) (define (options/resolve-packages store opts) "Return OPTS with package specification strings replaced by actual diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm index 80ae924410..d053daf02e 100644 --- a/guix/scripts/environment.scm +++ b/guix/scripts/environment.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014 David Thompson <davet@gnu.org> +;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -22,9 +23,9 @@ #:use-module (guix derivations) #:use-module (guix packages) #:use-module (guix profiles) + #:use-module (guix search-paths) #:use-module (guix utils) #:use-module (guix monads) - #:use-module (guix build utils) #:use-module (guix scripts build) #:use-module (gnu packages) #:use-module (ice-9 format) @@ -35,32 +36,20 @@ #:use-module (srfi srfi-98) #:export (guix-environment)) -(define (for-each-search-path proc inputs derivations pure?) - "Apply PROC for each native search path in INPUTS in addition to 'PATH'. -Use the output paths of DERIVATIONS to build each search path. When PURE? is -#t, the existing search path value is ignored. Otherwise, the existing search -path value is appended." - (let ((paths (append-map (lambda (drv) - (map (match-lambda - ((_ . output) - (derivation-output-path output))) - (derivation-outputs drv))) - derivations))) - (for-each (match-lambda - (($ <search-path-specification> - variable directories separator) - (let* ((current (getenv variable)) - (path (search-path-as-list directories paths)) - (value (list->search-path-as-string path separator))) - (proc variable - (if (and current (not pure?)) - (string-append value separator current) - value))))) - (cons* (search-path-specification - (variable "PATH") - (files '("bin" "sbin"))) - (delete-duplicates - (append-map package-native-search-paths inputs)))))) +(define (evaluate-input-search-paths inputs derivations) + "Evaluate the native search paths of INPUTS, a list of packages, of the +outputs of DERIVATIONS, and return a list of search-path/value pairs." + (let ((directories (append-map (lambda (drv) + (map (match-lambda + ((_ . output) + (derivation-output-path output))) + (derivation-outputs drv))) + derivations)) + (paths (cons $PATH + (delete-duplicates + (append-map package-native-search-paths + inputs))))) + (evaluate-search-paths paths directories))) ;; Protect some env vars from purification. Borrowed from nix-shell. (define %precious-variables @@ -80,15 +69,26 @@ as 'HOME' and 'USER' are left untouched." PURE? is #t, unset the variables in the current environment. Otherwise, augment existing enviroment variables with additional search paths." (when pure? (purify-environment)) - (for-each-search-path setenv inputs derivations pure?)) + (for-each (match-lambda + ((($ <search-path-specification> variable _ separator) . value) + (let ((current (getenv variable))) + (setenv variable + (if (and current (not pure?)) + (string-append value separator current) + value))))) + (evaluate-input-search-paths inputs derivations))) (define (show-search-paths inputs derivations pure?) "Display the needed search paths to build an environment that contains the packages within INPUTS. When PURE? is #t, do not augment existing environment variables with additional search paths." - (for-each-search-path (lambda (variable value) - (format #t "export ~a=\"~a\"~%" variable value)) - inputs derivations pure?)) + (for-each (match-lambda + ((search-path . value) + (display + (search-path-definition search-path value + #:kind (if pure? 'exact 'prefix))) + (newline))) + (evaluate-input-search-paths inputs derivations))) (define (show-help) (display (_ "Usage: guix environment [OPTION]... PACKAGE... @@ -191,13 +191,6 @@ packages." (delete-duplicates (append-map transitive-inputs packages))) -;; TODO: Deduplicate these. -(define show-what-to-build* - (store-lift show-what-to-build)) - -(define set-build-options-from-command-line* - (store-lift set-build-options-from-command-line)) - (define (build-inputs inputs opts) "Build the packages in INPUTS using the build options in OPTS." (let ((substitutes? (assoc-ref opts 'substitutes?)) diff --git a/guix/scripts/gc.scm b/guix/scripts/gc.scm index ed16cab8f9..4bae65a1ec 100644 --- a/guix/scripts/gc.scm +++ b/guix/scripts/gc.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2012, 2013, 2015 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -44,6 +44,8 @@ Invoke the garbage collector.\n")) (display (_ " -d, --delete attempt to delete PATHS")) (display (_ " + --optimize optimize the store by deduplicating identical files")) + (display (_ " --list-dead list dead paths")) (display (_ " --list-live list live paths")) @@ -88,6 +90,10 @@ Invoke the garbage collector.\n")) (lambda (opt name arg result) (alist-cons 'action 'delete (alist-delete 'action result)))) + (option '("optimize") #f #f + (lambda (opt name arg result) + (alist-cons 'action 'optimize + (alist-delete 'action result)))) (option '("list-dead") #f #f (lambda (opt name arg result) (alist-cons 'action 'list-dead @@ -169,6 +175,8 @@ Invoke the garbage collector.\n")) (list-relatives requisites)) ((list-referrers) (list-relatives referrers)) + ((optimize) + (optimize-store store)) ((list-dead) (for-each (cut simple-format #t "~a~%" <>) (dead-paths store))) diff --git a/guix/scripts/import.scm b/guix/scripts/import.scm index 7e75c10b3e..06b4c17573 100644 --- a/guix/scripts/import.scm +++ b/guix/scripts/import.scm @@ -73,7 +73,7 @@ rather than \\n." ;;; Entry point. ;;; -(define importers '("gnu" "nix" "pypi" "cpan")) +(define importers '("gnu" "nix" "pypi" "cpan" "hackage")) (define (resolve-importer name) (let ((module (resolve-interface diff --git a/guix/scripts/import/hackage.scm b/guix/scripts/import/hackage.scm new file mode 100644 index 0000000000..f7c18cd3bf --- /dev/null +++ b/guix/scripts/import/hackage.scm @@ -0,0 +1,106 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (guix scripts import hackage) + #:use-module (guix ui) + #:use-module (guix utils) + #:use-module (guix import hackage) + #:use-module (guix scripts import) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-11) + #:use-module (srfi srfi-37) + #:use-module (ice-9 match) + #:use-module (ice-9 format) + #:export (guix-import-hackage)) + + +;;; +;;; Command-line options. +;;; + +(define %default-options + '((include-test-dependencies? . #t))) + +(define (show-help) + (display (_ "Usage: guix import hackage PACKAGE-NAME +Import and convert the Hackage package for PACKAGE-NAME. If PACKAGE-NAME +includes a suffix constituted by a dash followed by a numerical version (as +used with Guix packages), then a definition for the specified version of the +package will be generated. If no version suffix is pecified, then the +generated package definition will correspond to the latest available +version.\n")) + (display (_ " + -h, --help display this help and exit")) + (display (_ " + -t, --no-test-dependencies don't include test only dependencies")) + (display (_ " + -V, --version display version information and exit")) + (newline) + (show-bug-report-information)) + +(define %options + ;; Specification of the command-line options. + (cons* (option '(#\h "help") #f #f + (lambda args + (show-help) + (exit 0))) + (option '(#\V "version") #f #f + (lambda args + (show-version-and-exit "guix import hackage"))) + (option '(#\t "no-test-dependencies") #f #f + (lambda (opt name arg result) + (alist-cons 'include-test-dependencies? #f + (alist-delete 'include-test-dependencies? + result)))) + %standard-import-options)) + + +;;; +;;; Entry point. +;;; + +(define (guix-import-hackage . args) + (define (parse-options) + ;; Return the alist of option values. + (args-fold* args %options + (lambda (opt name arg result) + (leave (_ "~A: unrecognized option~%") name)) + (lambda (arg result) + (alist-cons 'argument arg result)) + %default-options)) + + (let* ((opts (parse-options)) + (args (filter-map (match-lambda + (('argument . value) + value) + (_ #f)) + (reverse opts)))) + (match args + ((package-name) + (let ((sexp (hackage->guix-package + package-name + #:include-test-dependencies? + (assoc-ref opts 'include-test-dependencies?)))) + (unless sexp + (leave (_ "failed to download cabal file for package '~a'~%") + package-name)) + sexp)) + (() + (leave (_ "too few arguments~%"))) + ((many ...) + (leave (_ "too many arguments~%")))))) diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm index c40d76b558..cced1bda66 100644 --- a/guix/scripts/lint.scm +++ b/guix/scripts/lint.scm @@ -19,6 +19,7 @@ ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. (define-module (guix scripts lint) + #:use-module (guix store) #:use-module (guix base32) #:use-module (guix download) #:use-module (guix ftp-client) @@ -32,6 +33,8 @@ #:use-module (ice-9 regex) #:use-module (ice-9 format) #:use-module (web uri) + #:use-module (srfi srfi-34) + #:use-module (srfi srfi-35) #:use-module ((guix build download) #:select (maybe-expand-mirrors open-connection-for-uri)) @@ -41,12 +44,15 @@ #:use-module (srfi srfi-9) #:use-module (srfi srfi-11) #:use-module (srfi srfi-26) + #:use-module (srfi srfi-34) + #:use-module (srfi srfi-35) #:use-module (srfi srfi-37) #:export (guix-lint check-description-style check-inputs-should-be-native - check-patches + check-patch-file-names check-synopsis-style + check-derivation check-home-page check-source)) @@ -348,26 +354,30 @@ warning for PACKAGE mentionning the FIELD." (package-home-page package)) 'home-page))))) -(define (check-patches package) - ;; Emit a warning if the patches requires by PACKAGE are badly named. - (let ((patches (and=> (package-source package) origin-patches)) - (name (package-name package)) - (full-name (package-full-name package))) - (when (and patches - (any (match-lambda - ((? string? patch) - (let ((filename (basename patch))) - (not (or (eq? (string-contains filename name) 0) - (eq? (string-contains filename full-name) - 0))))) - (_ - ;; This must be an <origin> or something like that. - #f)) - patches)) - (emit-warning package - (_ "file names of patches should start with \ +(define (check-patch-file-names package) + "Emit a warning if the patches requires by PACKAGE are badly named or if the +patch could not be found." + (guard (c ((message-condition? c) ;raised by 'search-patch' + (emit-warning package (condition-message c) + 'patch-file-names))) + (let ((patches (and=> (package-source package) origin-patches)) + (name (package-name package)) + (full-name (package-full-name package))) + (when (and patches + (any (match-lambda + ((? string? patch) + (let ((file (basename patch))) + (not (or (eq? (string-contains file name) 0) + (eq? (string-contains file full-name) + 0))))) + (_ + ;; This must be an <origin> or something like that. + #f)) + patches)) + (emit-warning package + (_ "file names of patches should start with \ the package name") - 'patches)))) + 'patch-file-names))))) (define (escape-quotes str) "Replace any quote character in STR by an escaped quote character." @@ -434,6 +444,25 @@ descriptions maintained upstream." (append-map (cut maybe-expand-mirrors <> %mirrors) uris)))))) +(define (check-derivation package) + "Emit a warning if we fail to compile PACKAGE to a derivation." + (catch #t + (lambda () + (guard (c ((nix-protocol-error? c) + (emit-warning package + (format #f (_ "failed to create derivation: ~a") + (nix-protocol-error-message c)))) + ((message-condition? c) + (emit-warning package + (format #f (_ "failed to create derivation: ~a") + (condition-message c))))) + (with-store store + (package-derivation store package)))) + (lambda args + (emit-warning package + (format #f (_ "failed to create derivation: ~s~%") + args))))) + ;;; @@ -455,9 +484,9 @@ descriptions maintained upstream." (description "Identify inputs that should be native inputs") (check check-inputs-should-be-native)) (lint-checker - (name 'patch-filenames) - (description "Validate file names of patches") - (check check-patches)) + (name 'patch-file-names) + (description "Validate file names and availability of patches") + (check check-patch-file-names)) (lint-checker (name 'home-page) (description "Validate home-page URLs") @@ -467,6 +496,10 @@ descriptions maintained upstream." (description "Validate source URLs") (check check-source)) (lint-checker + (name 'derivation) + (description "Report failure to compile a package to a derivation") + (check check-derivation)) + (lint-checker (name 'synopsis) (description "Validate package synopses") (check check-synopsis-style)))) diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index 3cc7ae760f..06ee441799 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org> -;;; Copyright © 2013 Mark H Weaver <mhw@netris.org> +;;; Copyright © 2013, 2015 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2014 Alex Kost <alezost@gmail.com> ;;; ;;; This file is part of GNU Guix. @@ -25,6 +25,7 @@ #:use-module (guix derivations) #:use-module (guix packages) #:use-module (guix profiles) + #:use-module (guix search-paths) #:use-module (guix monads) #:use-module (guix utils) #:use-module (guix config) @@ -89,6 +90,15 @@ return PROFILE unchanged. The goal is to treat '-p ~/.guix-profile' as if %current-profile profile)) +(define (user-friendly-profile profile) + "Return either ~/.guix-profile if that's what PROFILE refers to, directly or +indirectly, or PROFILE." + (if (and %user-profile-directory + (false-if-exception + (string=? (readlink %user-profile-directory) profile))) + %user-profile-directory + profile)) + (define (link-to-empty-profile store generation) "Link GENERATION, a string, to the empty profile." (let* ((drv (run-with-store store @@ -232,6 +242,41 @@ DURATION-RELATION with the current time." filter-by-duration) (else #f))) +(define (delete-matching-generations store profile pattern) + "Delete from PROFILE all the generations matching PATTERN. PATTERN must be +a string denoting a set of generations: the empty list means \"all generations +but the current one\", a number designates a generation, and other patterns +denote ranges as interpreted by 'matching-derivations'." + (let ((current (generation-number profile))) + (cond ((not (file-exists? profile)) ; XXX: race condition + (raise (condition (&profile-not-found-error + (profile profile))))) + ((string-null? pattern) + (delete-generations (%store) profile + (delv current (profile-generations profile)))) + ;; Do not delete the zeroth generation. + ((equal? 0 (string->number pattern)) + #t) + + ;; If PATTERN is a duration, match generations that are + ;; older than the specified duration. + ((matching-generations pattern profile + #:duration-relation >) + => + (lambda (numbers) + (when (memv current numbers) + (warning (_ "not removing generation ~a, which is current~%") + current)) + + ;; Make sure we don't inadvertently remove the current + ;; generation. + (let ((numbers (delv current numbers))) + (when (null-list? numbers) + (leave (_ "no matching generation~%"))) + (delete-generations (%store) profile numbers)))) + (else + (leave (_ "invalid syntax: ~a~%") pattern))))) + ;;; ;;; Package specifications. @@ -330,77 +375,35 @@ an output path different than CURRENT-PATH." ;;; Search paths. ;;; -(define-syntax-rule (with-null-error-port exp) - "Evaluate EXP with the error port pointing to the bit bucket." - (with-error-to-port (%make-void-port "w") - (lambda () exp))) - (define* (search-path-environment-variables entries profile - #:optional (getenv getenv)) + #:optional (getenv getenv) + #:key (kind 'exact)) "Return environment variable definitions that may be needed for the use of ENTRIES, a list of manifest entries, in PROFILE. Use GETENV to determine the -current settings and report only settings not already effective." - - ;; Prefer ~/.guix-profile to the real profile directory name. - (let ((profile (if (and %user-profile-directory - (false-if-exception - (string=? (readlink %user-profile-directory) - profile))) - %user-profile-directory - profile))) - - ;; The search path info is not stored in the manifest. Thus, we infer the - ;; search paths from same-named packages found in the distro. - - (define manifest-entry->package - (match-lambda - (($ <manifest-entry> name version) - ;; Use 'find-best-packages-by-name' and not 'find-packages-by-name'; - ;; the former traverses the module tree only once and then allows for - ;; efficient access via a vhash. - (match (find-best-packages-by-name name version) - ((p _ ...) p) - (_ - (match (find-best-packages-by-name name #f) - ((p _ ...) p) - (_ #f))))))) - - (define search-path-definition - (match-lambda - (($ <search-path-specification> variable files separator - type pattern) - (let* ((values (or (and=> (getenv variable) - (cut string-tokenize* <> separator)) - '())) - ;; Add a trailing slash to force symlinks to be treated as - ;; directories when 'find-files' traverses them. - (files (if pattern - (map (cut string-append <> "/") files) - files)) - - ;; XXX: Silence 'find-files' when it stumbles upon non-existent - ;; directories (see - ;; <http://lists.gnu.org/archive/html/guix-devel/2015-01/msg00269.html>.) - (path (with-null-error-port - (search-path-as-list files (list profile) - #:type type - #:pattern pattern)))) - (if (every (cut member <> values) path) - #f - (format #f "export ~a=\"~a\"" - variable - (string-join path separator))))))) - - (let* ((packages (filter-map manifest-entry->package entries)) - (search-paths (delete-duplicates - (append-map package-native-search-paths - packages)))) - (filter-map search-path-definition search-paths)))) - -(define (display-search-paths entries profile) +current settings and report only settings not already effective. KIND +must be one of 'exact, 'prefix, or 'suffix, depending on the kind of search +path definition to be returned." + (let ((search-paths (delete-duplicates + (cons $PATH + (append-map manifest-entry-search-paths + entries))))) + (filter-map (match-lambda + ((spec . value) + (let ((variable (search-path-specification-variable spec)) + (sep (search-path-specification-separator spec))) + (environment-variable-definition variable value + #:separator sep + #:kind kind)))) + (evaluate-search-paths search-paths (list profile) + getenv)))) + +(define* (display-search-paths entries profile + #:key (kind 'exact)) "Display the search path environment variables that may need to be set for ENTRIES, a list of manifest entries, in the context of PROFILE." - (let ((settings (search-path-environment-variables entries profile))) + (let* ((profile (user-friendly-profile profile)) + (settings (search-path-environment-variables entries profile + #:kind kind))) (unless (null? settings) (format #t (_ "The following environment variable definitions may be needed:~%")) (format #t "~{ ~a~%~}" settings)))) @@ -430,9 +433,15 @@ Install, remove, or upgrade PACKAGES in a single transaction.\n")) (display (_ " -u, --upgrade[=REGEXP] upgrade all the installed packages matching REGEXP")) (display (_ " + -m, --manifest=FILE create a new profile generation with the manifest + from FILE")) + (display (_ " + --do-not-upgrade[=REGEXP] do not upgrade any packages matching REGEXP")) + (display (_ " --roll-back roll back to the previous generation")) (display (_ " - --search-paths display needed environment variable definitions")) + --search-paths[=KIND] + display needed environment variable definitions")) (display (_ " -l, --list-generations[=PATTERN] list generations matching PATTERN")) @@ -508,10 +517,21 @@ Install, remove, or upgrade PACKAGES in a single transaction.\n")) ;; would upgrade everything. (delete '(upgrade . #f) result)) arg-handler)))) + (option '("do-not-upgrade") #f #t + (lambda (opt name arg result arg-handler) + (let arg-handler ((arg arg) (result result)) + (values (if arg + (alist-cons 'do-not-upgrade arg result) + result) + arg-handler)))) (option '("roll-back") #f #f (lambda (opt name arg result arg-handler) (values (alist-cons 'roll-back? #t result) #f))) + (option '(#\m "manifest") #t #f + (lambda (opt name arg result arg-handler) + (values (alist-cons 'manifest arg result) + arg-handler))) (option '(#\l "list-generations") #f #t (lambda (opt name arg result arg-handler) (values (cons `(query list-generations ,(or arg "")) @@ -526,10 +546,20 @@ Install, remove, or upgrade PACKAGES in a single transaction.\n")) (lambda (opt name arg result arg-handler) (values (alist-cons 'switch-generation arg result) #f))) - (option '("search-paths") #f #f + (option '("search-paths") #f #t (lambda (opt name arg result arg-handler) - (values (cons `(query search-paths) result) - #f))) + (let ((kind (match arg + ((or "exact" "prefix" "suffix") + (string->symbol arg)) + (#f + 'exact) + (x + (leave (_ "~a: unsupported \ +kind of search path~%") + x))))) + (values (cons `(query search-paths ,kind) + result) + #f)))) (option '(#\p "profile") #t #f (lambda (opt name arg result arg-handler) (values (alist-cons 'profile (canonicalize-profile arg) @@ -586,6 +616,13 @@ return the new list of manifest entries." (_ #f)) opts)) + (define do-not-upgrade-regexps + (filter-map (match-lambda + (('do-not-upgrade . regexp) + (make-regexp regexp)) + (_ #f)) + opts)) + (define packages-to-upgrade (match upgrade-regexps (() @@ -595,6 +632,8 @@ return the new list of manifest entries." (($ <manifest-entry> name version output path _) (and (any (cut regexp-exec <> name) upgrade-regexps) + (not (any (cut regexp-exec <> name) + do-not-upgrade-regexps)) (upgradeable? name version path) (let ((output (or output "out"))) (call-with-values @@ -677,13 +716,31 @@ doesn't need it." (define (readlink* file) "Call 'readlink' until the result is not a symlink." - (catch 'system-error - (lambda () - (readlink* (readlink file))) - (lambda args - (if (= EINVAL (system-error-errno args)) - file - (apply throw args))))) + (define %max-symlink-depth 50) + + (let loop ((file file) + (depth 0)) + (define (absolute target) + (if (absolute-file-name? target) + target + (string-append (dirname file) "/" target))) + + (if (>= depth %max-symlink-depth) + file + (call-with-values + (lambda () + (catch 'system-error + (lambda () + (values #t (readlink file))) + (lambda args + (let ((errno (system-error-errno args))) + (if (or (= errno EINVAL)) + (values #f file) + (apply throw args)))))) + (lambda (success? target) + (if success? + (loop (absolute target) (+ depth 1)) + file)))))) ;;; @@ -751,8 +808,49 @@ more information.~%")) (define dry-run? (assoc-ref opts 'dry-run?)) (define profile (assoc-ref opts 'profile)) - (define current-generation-number - (generation-number profile)) + (define (build-and-use-profile manifest) + (let* ((bootstrap? (assoc-ref opts 'bootstrap?))) + + (when (equal? profile %current-profile) + (ensure-default-profile)) + + (let* ((prof-drv (run-with-store (%store) + (profile-derivation + manifest + #:hooks (if bootstrap? + '() + %default-profile-hooks)))) + (prof (derivation->output-path prof-drv))) + (show-what-to-build (%store) (list prof-drv) + #:use-substitutes? + (assoc-ref opts 'substitutes?) + #:dry-run? dry-run?) + + (cond + (dry-run? #t) + ((and (file-exists? profile) + (and=> (readlink* profile) (cut string=? prof <>))) + (format (current-error-port) (_ "nothing to be done~%"))) + (else + (let* ((number (generation-number profile)) + + ;; Always use NUMBER + 1 for the new profile, + ;; possibly overwriting a "previous future + ;; generation". + (name (generation-file-name profile + (+ 1 number)))) + (and (build-derivations (%store) (list prof-drv)) + (let* ((entries (manifest-entries manifest)) + (count (length entries))) + (switch-symlinks name prof) + (switch-symlinks profile name) + (unless (string=? profile %current-profile) + (register-gc-root (%store) name)) + (format #t (N_ "~a package in profile~%" + "~a packages in profile~%" + count) + count) + (display-search-paths entries profile))))))))) ;; First roll back if asked to. (cond ((and (assoc-ref opts 'roll-back?) @@ -782,88 +880,34 @@ more information.~%")) (for-each (match-lambda (('delete-generations . pattern) - (cond ((not (file-exists? profile)) ; XXX: race condition - (raise (condition (&profile-not-found-error - (profile profile))))) - ((string-null? pattern) - (delete-generations - (%store) profile - (delete current-generation-number - (profile-generations profile)))) - ;; Do not delete the zeroth generation. - ((equal? 0 (string->number pattern)) - (exit 0)) - - ;; If PATTERN is a duration, match generations that are - ;; older than the specified duration. - ((matching-generations pattern profile - #:duration-relation >) - => - (lambda (numbers) - (if (null-list? numbers) - (exit 1) - (delete-generations (%store) profile numbers)))) - (else - (leave (_ "invalid syntax: ~a~%") - pattern))) + (delete-matching-generations (%store) profile pattern) (process-actions (alist-delete 'delete-generations opts))) (_ #f)) opts)) + ((and (assoc-ref opts 'manifest) + (not dry-run?)) + (let* ((file-name (assoc-ref opts 'manifest)) + (user-module (make-user-module '((guix profiles) + (gnu)))) + (manifest (load* file-name user-module))) + (format #t (_ "installing new manifest from ~a with ~d entries.~%") + file-name (length (manifest-entries manifest))) + (build-and-use-profile manifest))) (else (let* ((manifest (profile-manifest profile)) (install (options->installable opts manifest)) (remove (options->removable opts manifest)) - (bootstrap? (assoc-ref opts 'bootstrap?)) (transaction (manifest-transaction (install install) (remove remove))) (new (manifest-perform-transaction manifest transaction))) - (when (equal? profile %current-profile) - (ensure-default-profile)) - (unless (and (null? install) (null? remove)) - (let* ((prof-drv (run-with-store (%store) - (profile-derivation - new - #:info-dir? (not bootstrap?) - #:ca-certificate-bundle? (not bootstrap?)))) - (prof (derivation->output-path prof-drv))) - (show-manifest-transaction (%store) manifest transaction - #:dry-run? dry-run?) - (show-what-to-build (%store) (list prof-drv) - #:use-substitutes? - (assoc-ref opts 'substitutes?) - #:dry-run? dry-run?) - - (cond - (dry-run? #t) - ((and (file-exists? profile) - (and=> (readlink* profile) (cut string=? prof <>))) - (format (current-error-port) (_ "nothing to be done~%"))) - (else - (let* ((number (generation-number profile)) - - ;; Always use NUMBER + 1 for the new profile, - ;; possibly overwriting a "previous future - ;; generation". - (name (generation-file-name profile - (+ 1 number)))) - (and (build-derivations (%store) (list prof-drv)) - (let* ((entries (manifest-entries new)) - (count (length entries))) - (switch-symlinks name prof) - (switch-symlinks profile name) - (unless (string=? profile %current-profile) - (register-gc-root (%store) name)) - (format #t (N_ "~a package in profile~%" - "~a packages in profile~%" - count) - count) - (display-search-paths entries - profile)))))))))))) + (show-manifest-transaction (%store) manifest transaction + #:dry-run? dry-run?) + (build-and-use-profile new)))))) (define (process-query opts) ;; Process any query specified by OPTS. Return #t when a query was @@ -932,11 +976,13 @@ more information.~%")) (available (fold-packages (lambda (p r) (let ((n (package-name p))) - (if regexp - (if (regexp-exec regexp n) - (cons p r) - r) - (cons p r)))) + (if (supported-package? p) + (if regexp + (if (regexp-exec regexp n) + (cons p r) + r) + (cons p r)) + r))) '()))) (leave-on-EPIPE (for-each (lambda (p) @@ -966,11 +1012,13 @@ more information.~%")) (find-packages-by-name name version))) #t)) - (('search-paths) + (('search-paths kind) (let* ((manifest (profile-manifest profile)) (entries (manifest-entries manifest)) + (profile (user-friendly-profile profile)) (settings (search-path-environment-variables entries profile - (const #f)))) + (const #f) + #:kind kind))) (format #t "~{~a~%~}" settings) #t)) diff --git a/guix/scripts/publish.scm b/guix/scripts/publish.scm new file mode 100644 index 0000000000..7bad2619b9 --- /dev/null +++ b/guix/scripts/publish.scm @@ -0,0 +1,314 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2015 David Thompson <davet@gnu.org> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (guix scripts publish) + #:use-module ((system repl server) #:prefix repl:) + #:use-module (ice-9 binary-ports) + #:use-module (ice-9 format) + #:use-module (ice-9 match) + #:use-module (ice-9 regex) + #:use-module (rnrs io ports) + #:use-module (rnrs bytevectors) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-2) + #:use-module (srfi srfi-26) + #:use-module (srfi srfi-37) + #:use-module (web http) + #:use-module (web request) + #:use-module (web response) + #:use-module (web server) + #:use-module (web uri) + #:use-module (guix base32) + #:use-module (guix base64) + #:use-module (guix config) + #:use-module (guix derivations) + #:use-module (guix hash) + #:use-module (guix pki) + #:use-module (guix pk-crypto) + #:use-module (guix store) + #:use-module (guix serialization) + #:use-module (guix ui) + #:export (guix-publish)) + +(define (show-help) + (format #t (_ "Usage: guix publish [OPTION]... +Publish ~a over HTTP.\n") %store-directory) + (display (_ " + -p, --port=PORT listen on PORT")) + (display (_ " + --listen=HOST listen on the network interface for HOST")) + (display (_ " + -u, --user=USER change privileges to USER as soon as possible")) + (display (_ " + -r, --repl[=PORT] spawn REPL server on PORT")) + (newline) + (display (_ " + -h, --help display this help and exit")) + (display (_ " + -V, --version display version information and exit")) + (newline) + (show-bug-report-information)) + +(define (getaddrinfo* host) + "Like 'getaddrinfo', but properly report errors." + (catch 'getaddrinfo-error + (lambda () + (getaddrinfo host)) + (lambda (key error) + (leave (_ "lookup of host '~a' failed: ~a~%") + host (gai-strerror error))))) + +(define %options + (list (option '(#\h "help") #f #f + (lambda _ + (show-help) + (exit 0))) + (option '(#\V "version") #f #f + (lambda _ + (show-version-and-exit "guix publish"))) + (option '(#\u "user") #t #f + (lambda (opt name arg result) + (alist-cons 'user arg result))) + (option '(#\p "port") #t #f + (lambda (opt name arg result) + (alist-cons 'port (string->number* arg) result))) + (option '("listen") #t #f + (lambda (opt name arg result) + (match (getaddrinfo* arg) + ((info _ ...) + (alist-cons 'address (addrinfo:addr info) + result)) + (() + (leave (_ "lookup of host '~a' returned nothing") + name))))) + (option '(#\r "repl") #f #t + (lambda (opt name arg result) + ;; If port unspecified, use default Guile REPL port. + (let ((port (and arg (string->number* arg)))) + (alist-cons 'repl (or port 37146) result)))))) + +(define %default-options + `((port . 8080) + (address . ,(make-socket-address AF_INET INADDR_ANY 0)) + (repl . #f))) + +(define (lazy-read-file-sexp file) + "Return a promise to read the canonical sexp from FILE." + (delay + (call-with-input-file file + (compose string->canonical-sexp + get-string-all)))) + +(define %private-key + (lazy-read-file-sexp %private-key-file)) + +(define %public-key + (lazy-read-file-sexp %public-key-file)) + +(define %nix-cache-info + `(("StoreDir" . ,%store-directory) + ("WantMassQuery" . 0) + ("Priority" . 100))) + +(define (load-derivation file) + "Read the derivation from FILE." + (call-with-input-file file read-derivation)) + +(define (signed-string s) + "Sign the hash of the string S with the daemon's key." + (let* ((public-key (force %public-key)) + (hash (bytevector->hash-data (sha256 (string->utf8 s)) + #:key-type (key-type public-key)))) + (signature-sexp hash (force %private-key) public-key))) + +(define base64-encode-string + (compose base64-encode string->utf8)) + +(define (narinfo-string store-path path-info key) + "Generate a narinfo key/value string for STORE-PATH using the details in +PATH-INFO. The narinfo is signed with KEY." + (let* ((url (string-append "nar/" (basename store-path))) + (hash (bytevector->base32-string + (path-info-hash path-info))) + (size (path-info-nar-size path-info)) + (references (string-join + (map basename (path-info-references path-info)) + " ")) + (deriver (path-info-deriver path-info)) + (base-info (format #f + "StorePath: ~a +URL: ~a +Compression: none +NarHash: sha256:~a +NarSize: ~d +References: ~a~%" + store-path url hash size references)) + ;; Do not render a "Deriver" or "System" line if we are rendering + ;; info for a derivation. + (info (if (string-null? deriver) + base-info + (let ((drv (load-derivation deriver))) + (format #f "~aSystem: ~a~%Deriver: ~a~%" + base-info (derivation-system drv) + (basename deriver))))) + (signature (base64-encode-string + (canonical-sexp->string (signed-string info))))) + (format #f "~aSignature: 1;~a;~a~%" info (gethostname) signature))) + +(define (not-found request) + "Render 404 response for REQUEST." + (values (build-response #:code 404) + (string-append "Resource not found: " + (uri-path (request-uri request))))) + +(define (render-nix-cache-info) + "Render server information." + (values '((content-type . (text/plain))) + (lambda (port) + (for-each (match-lambda + ((key . value) + (format port "~a: ~a~%" key value))) + %nix-cache-info)))) + +(define (render-narinfo store request hash) + "Render metadata for the store path corresponding to HASH." + (let* ((store-path (hash-part->path store hash)) + (path-info (and (not (string-null? store-path)) + (query-path-info store store-path)))) + (if path-info + (values '((content-type . (application/x-nix-narinfo))) + (cut display + (narinfo-string store-path path-info (force %private-key)) + <>)) + (not-found request)))) + +(define (render-nar request store-item) + "Render archive of the store path corresponding to STORE-ITEM." + (let ((store-path (string-append %store-directory "/" store-item))) + ;; The ISO-8859-1 charset *must* be used otherwise HTTP clients will + ;; interpret the byte stream as UTF-8 and arbitrarily change invalid byte + ;; sequences. + (if (file-exists? store-path) + (values '((content-type . (application/x-nix-archive + (charset . "ISO-8859-1")))) + (lambda (port) + (write-file store-path port))) + (not-found request)))) + +(define extract-narinfo-hash + (let ((regexp (make-regexp "^([a-df-np-sv-z0-9]{32}).narinfo$"))) + (lambda (str) + "Return the hash within the narinfo resource string STR, or false if STR +is invalid." + (and=> (regexp-exec regexp str) + (cut match:substring <> 1))))) + +(define (get-request? request) + "Return #t if REQUEST uses the GET method." + (eq? (request-method request) 'GET)) + +(define (request-path-components request) + "Split the URI path of REQUEST into a list of component strings. For +example: \"/foo/bar\" yields '(\"foo\" \"bar\")." + (split-and-decode-uri-path (uri-path (request-uri request)))) + +(define (make-request-handler store) + (lambda (request body) + (format #t "~a ~a~%" + (request-method request) + (uri-path (request-uri request))) + (if (get-request? request) ; reject POST, PUT, etc. + (match (request-path-components request) + ;; /nix-cache-info + (("nix-cache-info") + (render-nix-cache-info)) + ;; /<hash>.narinfo + (((= extract-narinfo-hash (? string? hash))) + (render-narinfo store request hash)) + ;; /nar/<store-item> + (("nar" store-item) + (render-nar request store-item)) + (_ (not-found request))) + (not-found request)))) + +(define (run-publish-server socket store) + (run-server (make-request-handler store) + 'http + `(#:socket ,socket))) + +(define (open-server-socket address) + "Return a TCP socket bound to ADDRESS, a socket address." + (let ((sock (socket (sockaddr:fam address) SOCK_STREAM 0))) + (setsockopt sock SOL_SOCKET SO_REUSEADDR 1) + (bind sock address) + sock)) + +(define (gather-user-privileges user) + "Switch to the identity of USER, a user name." + (catch 'misc-error + (lambda () + (let ((user (getpw user))) + (setgroups #()) + (setgid (passwd:gid user)) + (setuid (passwd:uid user)))) + (lambda (key proc message args . rest) + (leave (_ "user '~a' not found: ~a~%") + user (apply format #f message args))))) + + +;;; +;;; Entry point. +;;; + +(define (guix-publish . args) + (with-error-handling + (let* ((opts (args-fold* args %options + (lambda (opt name arg result) + (leave (_ "~A: unrecognized option~%") name)) + (lambda (arg result) + (leave (_ "~A: extraneuous argument~%") arg)) + %default-options)) + (user (assoc-ref opts 'user)) + (port (assoc-ref opts 'port)) + (address (let ((addr (assoc-ref opts 'address))) + (make-socket-address (sockaddr:fam addr) + (sockaddr:addr addr) + port))) + (socket (open-server-socket address)) + (repl-port (assoc-ref opts 'repl))) + ;; Read the key right away so that (1) we fail early on if we can't + ;; access them, and (2) we can then drop privileges. + (force %private-key) + (force %public-key) + + (when user + ;; Now that we've read the key material and opened the socket, we can + ;; drop privileges. + (gather-user-privileges user)) + + (when (zero? (getuid)) + (warning (_ "server running as root; \ +consider using the '--user' option!~%"))) + (format #t (_ "publishing ~a on ~a, port ~d~%") + %store-directory + (inet-ntop (sockaddr:fam address) (sockaddr:addr address)) + (sockaddr:port address)) + (when repl-port + (repl:spawn-server (repl:make-tcp-server-socket #:port repl-port))) + (with-store store + (run-publish-server socket store))))) diff --git a/guix/scripts/refresh.scm b/guix/scripts/refresh.scm index 04886499a2..28519d78e2 100644 --- a/guix/scripts/refresh.scm +++ b/guix/scripts/refresh.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org> ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org> ;;; @@ -207,16 +207,13 @@ update would trigger a complete rebuild." (list-dependent? (assoc-ref opts 'list-dependent?)) (key-download (assoc-ref opts 'key-download)) (packages - (match (concatenate - (filter-map (match-lambda - (('argument . value) - (let ((p (find-packages-by-name value))) - (when (null? p) - (leave (_ "~a: no package by that name~%") - value)) - p)) + (match (filter-map (match-lambda + (('argument . spec) + ;; Take either the specified version or the + ;; latest one. + (specification->package spec)) (_ #f)) - opts)) + opts) (() ; default to all packages (let ((select? (match (assoc-ref opts 'select) ('core core-package?) diff --git a/guix/scripts/substitute-binary.scm b/guix/scripts/substitute.scm index a4d153d4a0..8b4fa36d2a 100755 --- a/guix/scripts/substitute-binary.scm +++ b/guix/scripts/substitute.scm @@ -17,7 +17,7 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. -(define-module (guix scripts substitute-binary) +(define-module (guix scripts substitute) #:use-module (guix ui) #:use-module (guix store) #:use-module (guix utils) @@ -28,13 +28,12 @@ #:use-module (guix base64) #:use-module (guix pk-crypto) #:use-module (guix pki) - #:use-module ((guix build utils) #:select (mkdir-p)) + #:use-module ((guix build utils) #:select (mkdir-p dump-port)) #:use-module ((guix build download) #:select (progress-proc uri-abbreviation)) #:use-module (ice-9 rdelim) #:use-module (ice-9 regex) #:use-module (ice-9 match) - #:use-module (ice-9 threads) #:use-module (ice-9 format) #:use-module (ice-9 ftw) #:use-module (ice-9 binary-ports) @@ -48,11 +47,13 @@ #:use-module (srfi srfi-34) #:use-module (srfi srfi-35) #:use-module (web uri) + #:use-module (web request) + #:use-module (web response) #:use-module (guix http-client) #:export (narinfo-signature->canonical-sexp read-narinfo write-narinfo - guix-substitute-binary)) + guix-substitute)) ;;; Comment: ;;; @@ -68,8 +69,8 @@ (define %narinfo-cache-directory ;; A local cache of narinfos, to avoid going to the network. (or (and=> (getenv "XDG_CACHE_HOME") - (cut string-append <> "/guix/substitute-binary")) - (string-append %state-directory "/substitute-binary/cache"))) + (cut string-append <> "/guix/substitute")) + (string-append %state-directory "/substitute/cache"))) (define %allow-unauthenticated-substitutes? ;; Whether to allow unchecked substitutes. This is useful for testing @@ -83,8 +84,10 @@ disabled!~%")) (define %narinfo-ttl ;; Number of seconds during which cached narinfo lookups are considered - ;; valid. - (* 24 3600)) + ;; valid. This is a reasonable default value (corresponds to the TTL for + ;; nginx's .nar cache on hydra.gnu.org) but we'd rather want publishers to + ;; state what their TTL is in /nix-cache-info. (XXX) + (* 36 3600)) (define %narinfo-negative-ttl ;; Likewise, but for negative lookups---i.e., cached lookup failures. @@ -94,15 +97,6 @@ disabled!~%")) ;; How often we want to remove files corresponding to expired cache entries. (* 7 24 3600)) -;; In Guile 2.0.9, `regexp-exec' is thread-unsafe, so work around it. -;; See <http://bugs.gnu.org/14404>. -(set! regexp-exec - (let ((real regexp-exec) - (lock (make-mutex))) - (lambda (rx str . rest) - (with-mutex lock - (apply real rx str rest))))) - (define fields->alist ;; The narinfo format is really just like recutils. recutils->alist) @@ -163,15 +157,12 @@ to the caller without emitting an error message." (leave (_ "download from '~a' failed: ~a, ~s~%") (uri->string (http-get-error-uri c)) code (http-get-error-reason c)))))) - ;; On Guile 2.0.5, `http-fetch' fetches the whole thing at once. So - ;; honor TIMEOUT? to disable the timeout when fetching a nar. - ;; ;; Test this with: ;; sudo tc qdisc add dev eth0 root netem delay 1500ms ;; and then cancel with: ;; sudo tc qdisc del dev eth0 root (let ((port #f)) - (with-timeout (if (or timeout? (guile-version>? "2.0.5")) + (with-timeout (if timeout? %fetch-timeout 0) (begin @@ -188,7 +179,9 @@ to the caller without emitting an error message." (close-port port)))) (begin (when (or (not port) (port-closed? port)) - (set! port (open-socket-for-uri uri #:buffered? buffered?))) + (set! port (open-socket-for-uri uri)) + (unless buffered? + (setvbuf port _IONBF))) (http-fetch uri #:text? #f #:port port)))))))) (define-record-type <cache> @@ -218,7 +211,7 @@ failure." gonna have to wait." (delay (begin (format (current-error-port) - (_ "updating list of substitutes from '~a'...~%") + (_ "updating list of substitutes from '~a'...\r") url) (open-cache url)))) @@ -309,12 +302,16 @@ NARINFO, doesn't match HASH, a bytevector containing the hash of NARINFO." (corrupt-signature (leave (_ "signature on '~a' is corrupt~%") uri))))) -(define* (read-narinfo port #:optional url) +(define* (read-narinfo port #:optional url + #:key size) "Read a narinfo from PORT. If URL is true, it must be a string used to -build full URIs from relative URIs found while reading PORT. +build full URIs from relative URIs found while reading PORT. When SIZE is +true, read at most SIZE bytes from PORT; otherwise, read as much as possible. No authentication and authorization checks are performed here!" - (let ((str (utf8->string (get-bytevector-all port)))) + (let ((str (utf8->string (if size + (get-bytevector-n port size) + (get-bytevector-all port))))) (alist->record (call-with-input-string str fields->alist) (narinfo-maker str url) '("StorePath" "URL" "Compression" @@ -376,40 +373,56 @@ or is signed by an unauthorized key." the cache STR originates form." (call-with-input-string str (cut read-narinfo <> cache-uri))) -(define (fetch-narinfo cache path) - "Return the <narinfo> record for PATH, or #f if CACHE does not hold PATH." - (define (download url) - ;; Download the .narinfo from URL, and return its contents as a list of - ;; key/value pairs. Don't emit an error message upon 404. - (false-if-exception (fetch (string->uri url) - #:quiet-404? #t))) - - (and (string=? (cache-store-directory cache) (%store-prefix)) - (and=> (download (string-append (cache-url cache) "/" - (store-path-hash-part path) - ".narinfo")) - (cute read-narinfo <> (cache-url cache))))) - (define (obsolete? date now ttl) "Return #t if DATE is obsolete compared to NOW + TTL seconds." (time>? (subtract-duration now (make-time time-duration 0 ttl)) (make-time time-monotonic 0 date))) -(define %lookup-threads - ;; Number of threads spawned to perform lookup operations. This means we - ;; can have this many simultaneous HTTP GET requests to the server, which - ;; limits the impact of connection latency. - 20) -(define (lookup-narinfo cache path) - "Check locally if we have valid info about PATH, otherwise go to CACHE and -check what it has." +(define (narinfo-cache-file path) + "Return the name of the local file that contains an entry for PATH." + (string-append %narinfo-cache-directory "/" + (store-path-hash-part path))) + +(define (cached-narinfo path) + "Check locally if we have valid info about PATH. Return two values: a +Boolean indicating whether we have valid cached info, and that info, which may +be either #f (when PATH is unavailable) or the narinfo for PATH." (define now (current-time time-monotonic)) (define cache-file - (string-append %narinfo-cache-directory "/" - (store-path-hash-part path))) + (narinfo-cache-file path)) + + (catch 'system-error + (lambda () + (call-with-input-file cache-file + (lambda (p) + (match (read p) + (('narinfo ('version 1) + ('cache-uri cache-uri) + ('date date) ('value #f)) + ;; A cached negative lookup. + (if (obsolete? date now %narinfo-negative-ttl) + (values #f #f) + (values #t #f))) + (('narinfo ('version 1) + ('cache-uri cache-uri) + ('date date) ('value value)) + ;; A cached positive lookup + (if (obsolete? date now %narinfo-ttl) + (values #f #f) + (values #t (string->narinfo value cache-uri)))) + (('narinfo ('version v) _ ...) + (values #f #f)))))) + (lambda _ + (values #f #f)))) + +(define (cache-narinfo! cache path narinfo) + "Cache locally NARNIFO for PATH, which originates from CACHE. NARINFO may +be #f, in which case it indicates that PATH is unavailable at CACHE." + (define now + (current-time time-monotonic)) (define (cache-entry cache-uri narinfo) `(narinfo (version 1) @@ -417,43 +430,154 @@ check what it has." (date ,(time-second now)) (value ,(and=> narinfo narinfo->string)))) - (let*-values (((valid? cached) - (catch 'system-error - (lambda () - (call-with-input-file cache-file - (lambda (p) - (match (read p) - (('narinfo ('version 1) - ('cache-uri cache-uri) - ('date date) ('value #f)) - ;; A cached negative lookup. - (if (obsolete? date now %narinfo-negative-ttl) - (values #f #f) - (values #t #f))) - (('narinfo ('version 1) - ('cache-uri cache-uri) - ('date date) ('value value)) - ;; A cached positive lookup - (if (obsolete? date now %narinfo-ttl) - (values #f #f) - (values #t (string->narinfo value - cache-uri)))) - (('narinfo ('version v) _ ...) - (values #f #f)))))) - (lambda _ - (values #f #f))))) - (if valid? - cached ; including negative caches + (with-atomic-file-output (narinfo-cache-file path) + (lambda (out) + (write (cache-entry (cache-url cache) narinfo) out))) + narinfo) + +(define (narinfo-request cache-url path) + "Return an HTTP request for the narinfo of PATH at CACHE-URL." + (let ((url (string-append cache-url "/" (store-path-hash-part path) + ".narinfo"))) + (build-request (string->uri url) #:method 'GET))) + +(define (http-multiple-get base-url requests proc) + "Send all of REQUESTS to the server at BASE-URL. Call PROC for each +response, passing it the request object, the response, and a port from which +to read the response body. Return the list of results." + (let connect ((requests requests) + (result '())) + ;; (format (current-error-port) "connecting (~a requests left)..." + ;; (length requests)) + (let ((p (open-socket-for-uri base-url))) + ;; Send all of REQUESTS in a row. + (setvbuf p _IOFBF (expt 2 16)) + (for-each (cut write-request <> p) requests) + (force-output p) + + ;; Now start processing responses. + (let loop ((requests requests) + (result result)) + (match requests + (() + (reverse result)) + ((head tail ...) + (let* ((resp (read-response p)) + (body (response-body-port resp))) + ;; The server can choose to stop responding at any time, in which + ;; case we have to try again. Check whether that is the case. + (match (assq 'connection (response-headers resp)) + (('connection 'close) + (close-port p) + (connect requests result)) ;try again + (_ + (loop tail ;keep going + (cons (proc head resp body) result))))))))))) + +(define (read-to-eof port) + "Read from PORT until EOF is reached. The data are discarded." + (dump-port port (%make-void-port "w"))) + +(define (narinfo-from-file file url) + "Attempt to read a narinfo from FILE, using URL as the cache URL. Return #f +if file doesn't exist, and the narinfo otherwise." + (catch 'system-error + (lambda () + (call-with-input-file file + (cut read-narinfo <> url))) + (lambda args + (if (= ENOENT (system-error-errno args)) + #f + (apply throw args))))) + +(define (fetch-narinfos cache paths) + "Retrieve all the narinfos for PATHS from CACHE and return them." + (define url + (cache-url cache)) + + (define update-progress! + (let ((done 0)) + (lambda () + (display #\cr (current-error-port)) + (force-output (current-error-port)) + (format (current-error-port) + (_ "updating list of substitutes from '~a'... ~5,1f%") + url (* 100. (/ done (length paths)))) + (set! done (+ 1 done))))) + + (define (handle-narinfo-response request response port) + (let ((len (response-content-length response))) + ;; Make sure to read no more than LEN bytes since subsequent bytes may + ;; belong to the next response. + (case (response-code response) + ((200) ; hit + (let ((narinfo (read-narinfo port url #:size len))) + (cache-narinfo! cache (narinfo-path narinfo) narinfo) + (update-progress!) + narinfo)) + ((404) ; failure + (let* ((path (uri-path (request-uri request))) + (hash-part (string-drop-right path 8))) ; drop ".narinfo" + (if len + (get-bytevector-n port len) + (read-to-eof port)) + (cache-narinfo! cache + (find (cut string-contains <> hash-part) paths) + #f) + (update-progress!)) + #f) + (else ; transient failure + (if len + (get-bytevector-n port len) + (read-to-eof port)) + #f)))) + + (and (string=? (cache-store-directory cache) (%store-prefix)) + (let ((uri (string->uri url))) + (case (and=> uri uri-scheme) + ((http) + (let ((requests (map (cut narinfo-request url <>) paths))) + (update-progress!) + (let ((result (http-multiple-get url requests + handle-narinfo-response))) + (newline (current-error-port)) + result))) + ((file #f) + (let* ((base (string-append (uri-path uri) "/")) + (files (map (compose (cut string-append base <> ".narinfo") + store-path-hash-part) + paths))) + (filter-map (cut narinfo-from-file <> url) files))) + (else + (leave (_ "~s: unsupported server URI scheme~%") + (if uri (uri-scheme uri) url))))))) + +(define (lookup-narinfos cache paths) + "Return the narinfos for PATHS, invoking the server at CACHE when no +information is available locally." + (let-values (((cached missing) + (fold2 (lambda (path cached missing) + (let-values (((valid? value) + (cached-narinfo path))) + (if valid? + (values (cons value cached) missing) + (values cached (cons path missing))))) + '() + '() + paths))) + (if (null? missing) + cached (let* ((cache (force cache)) - (narinfo (and cache (fetch-narinfo cache path)))) - ;; Cache NARINFO only when CACHE was actually accessible. This - ;; avoids caching negative hits when in fact we just lacked network - ;; access. - (when cache - (with-atomic-file-output cache-file - (lambda (out) - (write (cache-entry (cache-url cache) narinfo) out)))) - narinfo)))) + (missing (if cache + (fetch-narinfos cache missing) + '()))) + (append cached missing))))) + +(define (lookup-narinfo cache path) + "Return the narinfo for PATH in CACHE, or #f when no substitute for PATH was +found." + (match (lookup-narinfos cache (list path)) + ((answer) answer))) (define (remove-expired-cached-narinfos) "Remove expired narinfo entries from the cache. The sole purpose of this @@ -522,17 +646,9 @@ PORT. REPORT-PROGRESS is a two-argument procedure such as that returned by ;; XXX: We're not in control, so we always return anyway. n)) - ;; Since `http-fetch' in Guile 2.0.5 returns all the data once it's done, - ;; don't pretend to report any progress in that case. - (if (guile-version>? "2.0.5") - (make-custom-binary-input-port "progress-port-proc" - read! #f #f - (cut close-port port)) - (begin - (format (current-error-port) (_ "Downloading, please wait...~%")) - (format (current-error-port) - (_ "(Please consider upgrading Guile to get proper progress report.)~%")) - port))) + (make-custom-binary-input-port "progress-port-proc" + read! #f #f + (cut close-port port))) (define-syntax with-networking (syntax-rules () @@ -553,7 +669,7 @@ PORT. REPORT-PROGRESS is a two-argument procedure such as that returned by ;;; (define (show-help) - (display (_ "Usage: guix substitute-binary [OPTION]... + (display (_ "Usage: guix substitute [OPTION]... Internal tool to substitute a pre-built binary to a local build.\n")) (display (_ " --query report on the availability of substitutes for the @@ -576,16 +692,6 @@ Internal tool to substitute a pre-built binary to a local build.\n")) ;;; Entry point. ;;; -(define n-par-map* - ;; We want the ability to run many threads in parallel, regardless of the - ;; number of cores. However, Guile 2.0.5 has a bug whereby 'n-par-map' ends - ;; up consuming a lot of memory, possibly leading to death. Thus, resort to - ;; 'par-map' on 2.0.5. - (if (guile-version>? "2.0.5") - n-par-map - (lambda (n proc lst) - (par-map proc lst)))) - (define (check-acl-initialized) "Warn if the ACL is uninitialized." (define (singleton? acl) @@ -649,7 +755,7 @@ found." ;; daemon. "http://hydra.gnu.org"))) -(define (guix-substitute-binary . args) +(define (guix-substitute . args) "Implement the build daemon's substituter protocol." (mkdir-p %narinfo-cache-directory) (maybe-remove-expired-cached-narinfo) @@ -694,9 +800,7 @@ substituter disabled~%") ;; Return the subset of PATHS available in CACHE. (let ((substitutable (if cache - (n-par-map* %lookup-threads - (cut lookup-narinfo cache <>) - paths) + (lookup-narinfos cache paths) '()))) (for-each (lambda (narinfo) (format #t "~a~%" (narinfo-path narinfo))) @@ -706,9 +810,7 @@ substituter disabled~%") ;; Reply info about PATHS if it's in CACHE. (let ((substitutable (if cache - (n-par-map* %lookup-threads - (cut lookup-narinfo cache <>) - paths) + (lookup-narinfos cache paths) '()))) (for-each (lambda (narinfo) (format #t "~a\n~a\n~a\n" @@ -774,7 +876,7 @@ substituter disabled~%") (every (compose zero? cdr waitpid) pids)))) (("--version") - (show-version-and-exit "guix substitute-binary")) + (show-version-and-exit "guix substitute")) (("--help") (show-help)) (opts @@ -785,4 +887,4 @@ substituter disabled~%") ;;; eval: (put 'with-timeout 'scheme-indent-function 1) ;;; End: -;;; substitute-binary.scm ends here +;;; substitute.scm ends here diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index 1b64e6fb92..8d5fbe5a78 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -48,42 +48,14 @@ (define %user-module ;; Module in which the machine description file is loaded. - (let ((module (make-fresh-user-module))) - (for-each (lambda (iface) - (module-use! module (resolve-interface iface))) - '((gnu system) - (gnu services) - (gnu system shadow))) - module)) + (make-user-module '((gnu system) + (gnu services) + (gnu system shadow)))) (define (read-operating-system file) "Read the operating-system declaration from FILE and return it." - ;; TODO: Factorize. - (catch #t - (lambda () - ;; Avoid ABI incompatibility with the <operating-system> record. - (set! %fresh-auto-compile #t) + (load* file %user-module)) - (save-module-excursion - (lambda () - (set-current-module %user-module) - (primitive-load file)))) - (lambda args - (match args - (('system-error . _) - (let ((err (system-error-errno args))) - (leave (_ "failed to open operating system file '~a': ~a~%") - file (strerror err)))) - (('syntax-error proc message properties form . rest) - (let ((loc (source-properties->location properties))) - (format (current-error-port) (_ "~a: error: ~a~%") - (location->string loc) message) - (exit 1))) - ((error args ...) - (report-error (_ "failed to load operating system file '~a':~%") - file) - (apply display-error #f (current-error-port) args) - (exit 1)))))) ;;; @@ -95,8 +67,6 @@ (store-lift references)) (define topologically-sorted* (store-lift topologically-sorted)) -(define show-what-to-build* - (store-lift show-what-to-build)) (define* (copy-item item target diff --git a/guix/search-paths.scm b/guix/search-paths.scm new file mode 100644 index 0000000000..7fd15d440c --- /dev/null +++ b/guix/search-paths.scm @@ -0,0 +1,193 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (guix search-paths) + #:use-module (guix records) + #:use-module (guix build utils) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26) + #:use-module (ice-9 match) + #:export (<search-path-specification> + search-path-specification + search-path-specification? + search-path-specification-variable + search-path-specification-files + search-path-specification-separator + search-path-specification-file-type + search-path-specification-file-pattern + + $PATH + + search-path-specification->sexp + sexp->search-path-specification + string-tokenize* + evaluate-search-paths + environment-variable-definition + search-path-definition)) + +;;; Commentary: +;;; +;;; This module defines "search path specifications", which allow packages to +;;; declare environment variables that they use to define search paths. For +;;; instance, GCC has the 'CPATH' variable, Guile has the 'GUILE_LOAD_PATH' +;;; variable, etc. +;;; +;;; Code: + +;; The specification of a search path. +(define-record-type* <search-path-specification> + search-path-specification make-search-path-specification + search-path-specification? + (variable search-path-specification-variable) ;string + (files search-path-specification-files) ;list of strings + (separator search-path-specification-separator ;string + (default ":")) + (file-type search-path-specification-file-type ;symbol + (default 'directory)) + (file-pattern search-path-specification-file-pattern ;#f | string + (default #f))) + +(define $PATH + ;; The 'PATH' variable. This variable is a bit special: it is not attached + ;; to any package in particular. + (search-path-specification + (variable "PATH") + (files '("bin" "sbin")))) + +(define (search-path-specification->sexp spec) + "Return an sexp representing SPEC, a <search-path-specification>. The sexp +corresponds to the arguments expected by `set-path-environment-variable'." + ;; Note that this sexp format is used both by build systems and in + ;; (guix profiles), so think twice before you change it. + (match spec + (($ <search-path-specification> variable files separator type pattern) + `(,variable ,files ,separator ,type ,pattern)))) + +(define (sexp->search-path-specification sexp) + "Convert SEXP, which is as returned by 'search-path-specification->sexp', to +a <search-path-specification> object." + (match sexp + ((variable files separator type pattern) + (search-path-specification + (variable variable) + (files files) + (separator separator) + (file-type type) + (file-pattern pattern))))) + +(define-syntax-rule (with-null-error-port exp) + "Evaluate EXP with the error port pointing to the bit bucket." + (with-error-to-port (%make-void-port "w") + (lambda () exp))) + +;; XXX: This procedure used to be in (guix utils) but since we want to be able +;; to use (guix search-paths) on the build side, we want to avoid the +;; dependency on (guix utils), and so this procedure is back here for now. +(define (string-tokenize* string separator) + "Return the list of substrings of STRING separated by SEPARATOR. This is +like `string-tokenize', but SEPARATOR is a string." + (define (index string what) + (let loop ((string string) + (offset 0)) + (cond ((string-null? string) + #f) + ((string-prefix? what string) + offset) + (else + (loop (string-drop string 1) (+ 1 offset)))))) + + (define len + (string-length separator)) + + (let loop ((string string) + (result '())) + (cond ((index string separator) + => + (lambda (offset) + (loop (string-drop string (+ offset len)) + (cons (substring string 0 offset) + result)))) + (else + (reverse (cons string result)))))) + +(define* (evaluate-search-paths search-paths directories + #:optional (getenv (const #f))) + "Evaluate SEARCH-PATHS, a list of search-path specifications, for +DIRECTORIES, a list of directory names, and return a list of +specification/value pairs. Use GETENV to determine the current settings and +report only settings not already effective." + (define search-path-definition + (match-lambda + ((and spec + ($ <search-path-specification> variable files separator + type pattern)) + (let* ((values (or (and=> (getenv variable) + (cut string-tokenize* <> separator)) + '())) + ;; Add a trailing slash to force symlinks to be treated as + ;; directories when 'find-files' traverses them. + (files (if pattern + (map (cut string-append <> "/") files) + files)) + + ;; XXX: Silence 'find-files' when it stumbles upon non-existent + ;; directories (see + ;; <http://lists.gnu.org/archive/html/guix-devel/2015-01/msg00269.html>.) + (path (with-null-error-port + (search-path-as-list files directories + #:type type + #:pattern pattern)))) + (if (every (cut member <> values) path) + #f ;VARIABLE is already set appropriately + (cons spec (string-join path separator))))))) + + (filter-map search-path-definition search-paths)) + +(define* (environment-variable-definition variable value + #:key + (kind 'exact) + (separator ":")) + "Return a the definition of VARIABLE to VALUE in Bash syntax. + +KIND can be either 'exact (return the definition of VARIABLE=VALUE), +'prefix (return the definition where VALUE is added as a prefix to VARIABLE's +current value), or 'suffix (return the definition where VALUE is added as a +suffix to VARIABLE's current value.) In the case of 'prefix and 'suffix, +SEPARATOR is used as the separator between VARIABLE's current value and its +prefix/suffix." + (match kind + ('exact + (format #f "export ~a=\"~a\"" variable value)) + ('prefix + (format #f "export ~a=\"~a${~a:+~a}$~a\"" + variable value variable separator variable)) + ('suffix + (format #f "export ~a=\"$~a${~a:+~a}~a\"" + variable variable variable separator value)))) + +(define* (search-path-definition search-path value + #:key (kind 'exact)) + "Similar to 'environment-variable-definition', but applied to a +<search-path-specification>." + (match search-path + (($ <search-path-specification> variable _ separator) + (environment-variable-definition variable value + #:kind kind + #:separator separator)))) + +;;; search-paths.scm ends here diff --git a/guix/serialization.scm b/guix/serialization.scm index a99f53ee0b..7a3defc03d 100644 --- a/guix/serialization.scm +++ b/guix/serialization.scm @@ -140,10 +140,9 @@ substitute invalid byte sequences with question marks. This is a ;; not very efficient. Eventually Guile may provide a lightweight ;; permissive UTF-8 decoder. (let* ((bv (read-byte-string p)) - (port (with-fluids ((%default-port-encoding "UTF-8") - (%default-port-conversion-strategy - 'substitute)) - (open-bytevector-input-port bv)))) + (port (open-bytevector-input-port bv))) + (set-port-encoding! port "UTF-8") + (set-port-conversion-strategy! port 'substitute) (get-string-all port))) (define (write-string-list l p) @@ -280,17 +279,11 @@ sub-directories of FILE as needed." (write-string "type" p) (write-string "directory" p) (let ((entries - ;; NOTE: Guile 2.0.5's 'scandir' returns all subdirectories - ;; unconditionally, including "." and "..", regardless of the - ;; 'select?' predicate passed to it, so we have to filter - ;; those out externally. - (filter (negate (cut member <> '("." ".."))) - ;; 'scandir' defaults to 'string-locale<?' to sort - ;; files, but this happens to be case-insensitive (at - ;; least in 'en_US' locale on libc 2.18.) Conversely, - ;; we want files to be sorted in a case-sensitive - ;; fashion. - (scandir f (const #t) string<?)))) + ;; 'scandir' defaults to 'string-locale<?' to sort files, but + ;; this happens to be case-insensitive (at least in 'en_US' + ;; locale on libc 2.18.) Conversely, we want files to be + ;; sorted in a case-sensitive fashion. + (scandir f (negate (cut member <> '("." ".."))) string<?))) (for-each (lambda (e) (let ((f (string-append f "/" e))) (write-string "entry" p) diff --git a/guix/store.scm b/guix/store.scm index 45c555b12c..fc2f8d92ca 100644 --- a/guix/store.scm +++ b/guix/store.scm @@ -60,6 +60,7 @@ valid-path? query-path-hash hash-part->path + query-path-info add-text-to-store add-to-store build-things @@ -79,9 +80,17 @@ substitutable-paths substitutable-path-info + path-info? + path-info-deriver + path-info-hash + path-info-references + path-info-registration-time + path-info-nar-size + references requisites referrers + optimize-store topologically-sorted valid-derivers query-derivation-outputs @@ -163,7 +172,8 @@ (query-substitutable-path-infos 30) (query-valid-paths 31) (query-substitutable-paths 32) - (query-valid-derivers 33)) + (query-valid-derivers 33) + (optimize-store 34)) (define-enumerate-type hash-algo ;; hash.hh @@ -212,6 +222,24 @@ (cons (substitutable path deriver refs dl-size nar-size) result)))))) +;; Information about a store path. +(define-record-type <path-info> + (path-info deriver hash references registration-time nar-size) + path-info? + (deriver path-info-deriver) + (hash path-info-hash) + (references path-info-references) + (registration-time path-info-registration-time) + (nar-size path-info-nar-size)) + +(define (read-path-info p) + (let ((deriver (read-store-path p)) + (hash (base16-string->bytevector (read-string p))) + (refs (read-store-path-list p)) + (registration-time (read-int p)) + (nar-size (read-long-long p))) + (path-info deriver hash refs registration-time nar-size))) + (define-syntax write-arg (syntax-rules (integer boolean file string string-list string-pairs store-path store-path-list base16) @@ -236,7 +264,7 @@ (define-syntax read-arg (syntax-rules (integer boolean string store-path store-path-list - substitutable-path-list base16) + substitutable-path-list path-info base16) ((_ integer p) (read-int p)) ((_ boolean p) @@ -249,6 +277,8 @@ (read-store-path-list p)) ((_ substitutable-path-list p) (read-substitutable-path-list p)) + ((_ path-info p) + (read-path-info p)) ((_ base16 p) (base16-string->bytevector (read-string p))))) @@ -447,6 +477,10 @@ encoding conversion errors." (message "invalid error code") (status k)))))))) +(define %default-substitute-urls + ;; Default list of substituters. + '("http://hydra.gnu.org")) + (define* (set-build-options server #:key keep-failed? keep-going? fallback? (verbosity 0) @@ -459,7 +493,12 @@ encoding conversion errors." (print-build-trace #t) (build-cores (current-processor-count)) (use-substitutes? #t) - (substitute-urls '())) ; client "untrusted" cache URLs + + ;; Client-provided substitute URLs. For + ;; unprivileged clients, these are considered + ;; "untrusted"; for root, they override the + ;; daemon's settings. + (substitute-urls %default-substitute-urls)) ;; Must be called after `open-connection'. (define socket @@ -532,6 +571,10 @@ string). Raise an error if no such path exists." ;; /HASH.narinfo. (query-path-from-hash-part server hash-part)))) +(define-operation (query-path-info (store-path path)) + "Return the info (hash, references, etc.) for PATH." + path-info) + (define add-text-to-store ;; A memoizing version of `add-to-store', to avoid repeated RPCs with ;; the very same arguments during a given session. @@ -719,6 +762,12 @@ substitutable. For each substitutable path, a `substitutable?' object is returned." substitutable-path-list)) +(define-operation (optimize-store) + "Optimize the store by hard-linking identical files (\"deduplication\".) +Return #t on success." + ;; Note: the daemon in Guix <= 0.8.2 does not implement this RPC. + boolean) + (define (run-gc server action to-delete min-freed) "Perform the garbage-collector operation ACTION, one of the `gc-action' values. When ACTION is `delete-specific', the TO-DELETE is diff --git a/guix/svn-download.scm b/guix/svn-download.scm index 92b03d13f3..d6853ca861 100644 --- a/guix/svn-download.scm +++ b/guix/svn-download.scm @@ -62,7 +62,7 @@ HASH-ALGO (a symbol). Use NAME as the file name, or a generic name if #f." (svn-fetch '#$(svn-reference-url ref) '#$(svn-reference-revision ref) #$output - #:svn-command (string-append #$svn "/bin/svn")))) + #:svn-command (string-append #+svn "/bin/svn")))) (mlet %store-monad ((guile (package->derivation guile system))) (gexp->derivation (or name "svn-checkout") build diff --git a/guix/tests.scm b/guix/tests.scm index 0896e842da..87e6cc2830 100644 --- a/guix/tests.scm +++ b/guix/tests.scm @@ -37,7 +37,8 @@ %substitute-directory with-derivation-narinfo with-derivation-substitute - dummy-package)) + dummy-package + dummy-origin)) ;;; Commentary: ;;; @@ -126,7 +127,7 @@ Deriver: ~a~%" (define* (call-with-derivation-narinfo drv thunk #:key (sha256 (make-bytevector 32 0))) "Call THUNK in a context where fake substituter data, as read by 'guix -substitute-binary', has been installed for DRV. SHA256 is the hash of the +substitute', has been installed for DRV. SHA256 is the hash of the expected output of DRV." (let* ((output (derivation->output-path drv)) (dir (%substitute-directory)) @@ -178,7 +179,7 @@ CONTENTS." (lambda () (let ((hash (call-with-input-file (string-append dir "/example.nar") port-sha256))) - ;; Create fake substituter data, to be read by `substitute-binary'. + ;; Create fake substituter data, to be read by 'guix substitute'. (call-with-derivation-narinfo drv thunk #:sha256 (or sha256 hash)))) @@ -219,6 +220,13 @@ initialized with default values, and with EXTRA-FIELDS set as specified." (synopsis #f) (description #f) (home-page #f) (license #f))) +(define-syntax-rule (dummy-origin extra-fields ...) + "Return a \"dummy\" origin, with all its compulsory fields initialized with +default values, and with EXTRA-FIELDS set as specified." + (origin extra-fields ... + (method #f) (uri "http://www.example.com") + (sha256 (base32 (make-string 52 #\x))))) + ;; Local Variables: ;; eval: (put 'call-with-derivation-narinfo 'scheme-indent-function 1) ;; eval: (put 'call-with-derivation-substitute 'scheme-indent-function 2) diff --git a/guix/ui.scm b/guix/ui.scm index ae37c8e6ca..9bab7c51dd 100644 --- a/guix/ui.scm +++ b/guix/ui.scm @@ -42,16 +42,22 @@ #:use-module (ice-9 match) #:use-module (ice-9 format) #:use-module (ice-9 regex) + #:replace (symlink) #:export (_ N_ P_ report-error leave + make-user-module + load* + report-load-error + warn-about-load-error show-version-and-exit show-bug-report-information string->number* size->number show-what-to-build + show-what-to-build* show-manifest-transaction call-with-error-handling with-error-handling @@ -130,6 +136,60 @@ messages." (report-error args ...) (exit 1))) +(define (make-user-module modules) + "Return a new user module with the additional MODULES loaded." + ;; Module in which the machine description file is loaded. + (let ((module (make-fresh-user-module))) + (for-each (lambda (iface) + (module-use! module (resolve-interface iface))) + modules) + module)) + +(define (load* file user-module) + "Load the user provided Scheme source code FILE." + (catch #t + (lambda () + (set! %fresh-auto-compile #t) + + (save-module-excursion + (lambda () + (set-current-module user-module) + (primitive-load file)))) + (lambda args + (report-load-error file args)))) + +(define (report-load-error file args) + "Report the failure to load FILE, a user-provided Scheme file, and exit. +ARGS is the list of arguments received by the 'throw' handler." + (match args + (('system-error . _) + (let ((err (system-error-errno args))) + (leave (_ "failed to load '~a': ~a~%") file (strerror err)))) + (('syntax-error proc message properties form . rest) + (let ((loc (source-properties->location properties))) + (format (current-error-port) (_ "~a: error: ~a~%") + (location->string loc) message) + (exit 1))) + ((error args ...) + (report-error (_ "failed to load '~a':~%") file) + (apply display-error #f (current-error-port) args) + (exit 1)))) + +(define (warn-about-load-error file args) ;FIXME: factorize with ↑ + "Report the failure to load FILE, a user-provided Scheme file, without +exiting. ARGS is the list of arguments received by the 'throw' handler." + (match args + (('system-error . _) + (let ((err (system-error-errno args))) + (warning (_ "failed to load '~a': ~a~%") file (strerror err)))) + (('syntax-error proc message properties form . rest) + (let ((loc (source-properties->location properties))) + (format (current-error-port) (_ "~a: warning: ~a~%") + (location->string loc) message))) + ((error args ...) + (warning (_ "failed to load '~a':~%") file) + (apply display-error #f (current-error-port) args)))) + (define (install-locale) "Install the current locale settings." (catch 'system-error @@ -171,6 +231,21 @@ Report bugs to: ~a.") %guix-bug-report-address) General help using GNU software: <http://www.gnu.org/gethelp/>")) (newline)) +(define symlink + (let ((real-symlink (@ (guile) symlink))) + (lambda (target link) + "This is a 'symlink' replacement that provides proper error reporting." + (catch 'system-error + (lambda () + (real-symlink target link)) + (lambda (key proc fmt args errno) + ;; Augment the FMT and ARGS with information about LINK (this + ;; information is missing as of Guile 2.0.11, making the exception + ;; uninformative.) + (apply throw key proc "~A: ~S" + (append args (list link)) + errno)))))) + (define (string->number* str) "Like `string->number', but error out with an error message on failure." (or (string->number str) @@ -379,6 +454,9 @@ available for download." (null? download) download))) (pair? build))) +(define show-what-to-build* + (store-lift show-what-to-build)) + (define (right-arrow port) "Return either a string containing the 'RIGHT ARROW' character, or an ASCII replacement if PORT is not Unicode-capable." @@ -619,6 +697,8 @@ WIDTH columns." ;; Note: Don't i18n field names so that people can post-process it. (format port "name: ~a~%" (package-name p)) (format port "version: ~a~%" (package-version p)) + (format port "systems: ~a~%" + (string-join (package-transitive-supported-systems p))) (format port "dependencies: ~a~%" (match (package-direct-inputs p) (((labels inputs . _) ...) @@ -800,11 +880,8 @@ parameter of 'args-fold'." (define dot-scm? (cut string-suffix? ".scm" <>)) - ;; In Guile 2.0.5 `scandir' would return "." and ".." regardless even though - ;; they don't match `dot-scm?'. Work around it by doing additional - ;; filtering. (if directory - (filter dot-scm? (scandir directory dot-scm?)) + (scandir directory dot-scm?) '())) (define (commands) @@ -815,7 +892,7 @@ parameter of 'args-fold'." (define (show-guix-help) (define (internal? command) - (member command '("substitute-binary" "authenticate" "offload"))) + (member command '("substitute" "authenticate" "offload"))) (format #t (_ "Usage: guix COMMAND ARGS... Run COMMAND with ARGS.\n")) @@ -868,6 +945,8 @@ found." (format (current-error-port) (_ "guix: unrecognized option '~a'~%") o) (show-guix-usage)) + (("help" args ...) + (show-guix-help)) ((command args ...) (apply run-guix-command (string->symbol command) diff --git a/guix/utils.scm b/guix/utils.scm index 3d38ba1223..a2ade2bf97 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -72,7 +72,6 @@ version-major+minor guile-version>? package-name->name+version - string-tokenize* string-replace-substring arguments-from-environment-variable file-extension @@ -606,33 +605,6 @@ introduce the version part." (substring file 0 dot) file))) -(define (string-tokenize* string separator) - "Return the list of substrings of STRING separated by SEPARATOR. This is -like `string-tokenize', but SEPARATOR is a string." - (define (index string what) - (let loop ((string string) - (offset 0)) - (cond ((string-null? string) - #f) - ((string-prefix? what string) - offset) - (else - (loop (string-drop string 1) (+ 1 offset)))))) - - (define len - (string-length separator)) - - (let loop ((string string) - (result '())) - (cond ((index string separator) - => - (lambda (offset) - (loop (string-drop string (+ offset len)) - (cons (substring string 0 offset) - result)))) - (else - (reverse (cons string result)))))) - (define* (string-replace-substring str substr replacement #:optional (start 0) diff --git a/m4/guix.m4 b/m4/guix.m4 index 445ce857dd..fa5a4023ba 100644 --- a/m4/guix.m4 +++ b/m4/guix.m4 @@ -218,3 +218,42 @@ AC_DEFUN([GUIX_CHECK_FILE_NAME_LIMITS], [ AC_MSG_ERROR([store directory '$storedir' would lead to overly long hash-bang lines]) fi ]) + +dnl GUIX_CHECK_CXX11 +dnl +dnl Check whether the C++ compiler can compile a typical C++11 program. +AC_DEFUN([GUIX_CHECK_CXX11], [ + AC_REQUIRE([AC_PROG_CXX]) + AC_CACHE_CHECK([whether $CXX supports C++11], + [ac_cv_guix_cxx11_support], + [save_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="-std=c++11 $CXXFLAGS" + AC_COMPILE_IFELSE([ + AC_LANG_SOURCE([ + #include <functional> + + std::function<int(int)> + return_plus_lambda (int x) + { + auto result = [[&]](int y) { + return x + y; + }; + + return result; + } + ])], + [ac_cv_guix_cxx11_support=yes], + [ac_cv_guix_cxx11_support=no]) + CXXFLAGS="$save_CXXFLAGS" + ]) +]) + +dnl GUIX_ASSERT_CXX11 +dnl +dnl Error out if the C++ compiler cannot compile C++11 code. +AC_DEFUN([GUIX_ASSERT_CXX11], [ + GUIX_CHECK_CXX11 + if test "x$ac_cv_guix_cxx11_support" != "xyes"; then + AC_MSG_ERROR([C++ compiler '$CXX' does not support the C++11 standard]) + fi +]) diff --git a/nix/libstore/build.cc b/nix/libstore/build.cc index f38cd29940..009fcb2c0c 100644 --- a/nix/libstore/build.cc +++ b/nix/libstore/build.cc @@ -57,9 +57,8 @@ #include <netinet/ip.h> #endif -#if HAVE_SYS_PERSONALITY_H +#if __linux__ #include <sys/personality.h> -#define CAN_DO_LINUX32_BUILDS #endif #if HAVE_STATVFS @@ -85,8 +84,12 @@ class Goal; typedef std::shared_ptr<Goal> GoalPtr; typedef std::weak_ptr<Goal> WeakGoalPtr; +struct CompareGoalPtrs { + bool operator() (const GoalPtr & a, const GoalPtr & b); +}; + /* Set of goals. */ -typedef set<GoalPtr> Goals; +typedef set<GoalPtr, CompareGoalPtrs> Goals; typedef list<WeakGoalPtr> WeakGoals; /* A map of paths to goals (and the other way around). */ @@ -173,11 +176,20 @@ public: (important!), etc. */ virtual void cancel(bool timeout) = 0; + virtual string key() = 0; + protected: void amDone(ExitCode result); }; +bool CompareGoalPtrs::operator() (const GoalPtr & a, const GoalPtr & b) { + string s1 = a->key(); + string s2 = b->key(); + return s1 < s2; +} + + /* A mapping used to remember for each child process to what goal it belongs, and file descriptors for receiving log data and output path creation commands. */ @@ -238,6 +250,9 @@ public: failure). */ bool permanentFailure; + /* Set if at least one derivation had a timeout. */ + bool timedOut; + LocalStore & store; std::shared_ptr<HookInstance> hook; @@ -301,6 +316,7 @@ public: void addToWeakGoals(WeakGoals & goals, GoalPtr p) { // FIXME: necessary? + // FIXME: O(n) foreach (WeakGoals::iterator, i, goals) if (i->lock() == p) return; goals.push_back(p); @@ -374,8 +390,6 @@ void Goal::trace(const format & f) /* Common initialisation performed in child processes. */ static void commonChildInit(Pipe & logPipe) { - restoreAffinity(); - /* Put the child in a separate session (and thus a separate process group) so that it has no controlling terminal (meaning that e.g. ssh cannot open /dev/tty) and it doesn't receive @@ -590,7 +604,9 @@ HookInstance::HookInstance() { debug("starting build hook"); - Path buildHook = absPath(getEnv("NIX_BUILD_HOOK")); + Path buildHook = getEnv("NIX_BUILD_HOOK"); + if (string(buildHook, 0, 1) != "/") buildHook = settings.nixLibexecDir + "/nix/" + buildHook; + buildHook = canonPath(buildHook); /* Create a pipe to get the output of the child. */ fromHook.create(); @@ -602,44 +618,30 @@ HookInstance::HookInstance() builderOut.create(); /* Fork the hook. */ - pid = maybeVfork(); - switch (pid) { - - case -1: - throw SysError("unable to fork"); + pid = startProcess([&]() { - case 0: - try { /* child */ + commonChildInit(fromHook); - commonChildInit(fromHook); + if (chdir("/") == -1) throw SysError("changing into `/"); - if (chdir("/") == -1) throw SysError("changing into `/"); + /* Dup the communication pipes. */ + if (dup2(toHook.readSide, STDIN_FILENO) == -1) + throw SysError("dupping to-hook read side"); - /* Dup the communication pipes. */ - if (dup2(toHook.readSide, STDIN_FILENO) == -1) - throw SysError("dupping to-hook read side"); + /* Use fd 4 for the builder's stdout/stderr. */ + if (dup2(builderOut.writeSide, 4) == -1) + throw SysError("dupping builder's stdout/stderr"); - /* Use fd 4 for the builder's stdout/stderr. */ - if (dup2(builderOut.writeSide, 4) == -1) - throw SysError("dupping builder's stdout/stderr"); + execl(buildHook.c_str(), buildHook.c_str(), settings.thisSystem.c_str(), + (format("%1%") % settings.maxSilentTime).str().c_str(), + (format("%1%") % settings.printBuildTrace).str().c_str(), + (format("%1%") % settings.buildTimeout).str().c_str(), + NULL); - execl(buildHook.c_str(), buildHook.c_str(), settings.thisSystem.c_str(), - (format("%1%") % settings.maxSilentTime).str().c_str(), - (format("%1%") % settings.printBuildTrace).str().c_str(), - (format("%1%") % settings.buildTimeout).str().c_str(), - NULL); + throw SysError(format("executing `%1%'") % buildHook); + }); - throw SysError(format("executing `%1%'") % buildHook); - - } catch (std::exception & e) { - writeToStderr("build hook error: " + string(e.what()) + "\n"); - } - _exit(1); - } - - /* parent */ pid.setSeparatePG(true); - pid.setKillSignal(SIGTERM); fromHook.writeSide.close(); toHook.readSide.close(); } @@ -648,7 +650,8 @@ HookInstance::HookInstance() HookInstance::~HookInstance() { try { - pid.kill(); + toHook.writeSide.close(); + pid.kill(true); } catch (...) { ignoreException(); } @@ -784,17 +787,21 @@ private: outputs to allow hard links between outputs. */ InodesSeen inodesSeen; - /* Magic exit code denoting that setting up the child environment - failed. (It's possible that the child actually returns the - exit code, but ah well.) */ - const static int childSetupFailed = 189; - public: DerivationGoal(const Path & drvPath, const StringSet & wantedOutputs, Worker & worker, BuildMode buildMode = bmNormal); ~DerivationGoal(); void cancel(bool timeout); + string key() + { + /* Ensure that derivations get built in order of their name, + i.e. a derivation named "aardvark" always comes before + "baboon". And substitution goals always happen before + derivation goals (due to "b$"). */ + return "b$" + storePathToName(drvPath) + "$" + drvPath; + } + void work(); Path getDrvPath() @@ -879,13 +886,9 @@ DerivationGoal::~DerivationGoal() { /* Careful: we should never ever throw an exception from a destructor. */ - try { - killChild(); - deleteTmpDir(false); - closeLogFile(); - } catch (...) { - ignoreException(); - } + try { killChild(); } catch (...) { ignoreException(); } + try { deleteTmpDir(false); } catch (...) { ignoreException(); } + try { closeLogFile(); } catch (...) { ignoreException(); } } @@ -956,6 +959,11 @@ void DerivationGoal::init() /* The first thing to do is to make sure that the derivation exists. If it doesn't, it may be created through a substitute. */ + if (buildMode == bmNormal && worker.store.isValidPath(drvPath)) { + haveDerivation(); + return; + } + addWaitee(worker.makeSubstitutionGoal(drvPath)); state = &DerivationGoal::haveDerivation; @@ -1209,7 +1217,7 @@ static string get(const StringPairs & map, const string & key) static bool canBuildLocally(const string & platform) { return platform == settings.thisSystem -#ifdef CAN_DO_LINUX32_BUILDS +#if __linux__ || (platform == "i686-linux" && settings.thisSystem == "x86_64-linux") #endif ; @@ -1433,9 +1441,6 @@ void DerivationGoal::buildDone() if (pathExists(chrootRootDir + *i)) rename((chrootRootDir + *i).c_str(), i->c_str()); - if (WIFEXITED(status) && WEXITSTATUS(status) == childSetupFailed) - throw Error(format("failed to set up the build environment for `%1%'") % drvPath); - if (diskFull) printMsg(lvlError, "note: build failure may have been caused by lack of free disk space"); @@ -1469,37 +1474,41 @@ void DerivationGoal::buildDone() outputLocks.unlock(); } catch (BuildError & e) { - printMsg(lvlError, e.msg()); + if (!hook) + printMsg(lvlError, e.msg()); outputLocks.unlock(); buildUser.release(); - /* When using a build hook, the hook will return a remote - build failure using exit code 100. Anything else is a hook - problem. */ - bool hookError = hook && - (!WIFEXITED(status) || WEXITSTATUS(status) != 100); + if (hook && WIFEXITED(status) && WEXITSTATUS(status) == 101) { + if (settings.printBuildTrace) + printMsg(lvlError, format("@ build-failed %1% - timeout") % drvPath); + worker.timedOut = true; + } - if (settings.printBuildTrace) { - if (hook && hookError) + else if (hook && (!WIFEXITED(status) || WEXITSTATUS(status) != 100)) { + if (settings.printBuildTrace) printMsg(lvlError, format("@ hook-failed %1% - %2% %3%") % drvPath % status % e.msg()); - else + } + + else { + if (settings.printBuildTrace) printMsg(lvlError, format("@ build-failed %1% - %2% %3%") % drvPath % 1 % e.msg()); + worker.permanentFailure = !fixedOutput && !diskFull; + + /* Register the outputs of this build as "failed" so we + won't try to build them again (negative caching). + However, don't do this for fixed-output derivations, + since they're likely to fail for transient reasons + (e.g., fetchurl not being able to access the network). + Hook errors (like communication problems with the + remote machine) shouldn't be cached either. */ + if (settings.cacheFailure && !fixedOutput && !diskFull) + foreach (DerivationOutputs::iterator, i, drv.outputs) + worker.store.registerFailedPath(i->second.path); } - /* Register the outputs of this build as "failed" so we won't - try to build them again (negative caching). However, don't - do this for fixed-output derivations, since they're likely - to fail for transient reasons (e.g., fetchurl not being - able to access the network). Hook errors (like - communication problems with the remote machine) shouldn't - be cached either. */ - if (settings.cacheFailure && !hookError && !fixedOutput) - foreach (DerivationOutputs::iterator, i, drv.outputs) - worker.store.registerFailedPath(i->second.path); - - worker.permanentFailure = !hookError && !fixedOutput && !diskFull; amDone(ecFailed); return; } @@ -1825,12 +1834,15 @@ void DerivationGoal::startBuilder() /* Bind-mount a user-configurable set of directories from the host file system. */ - foreach (StringSet::iterator, i, settings.dirsInChroot) { - size_t p = i->find('='); + PathSet dirs = tokenizeString<StringSet>(settings.get("build-chroot-dirs", string(DEFAULT_CHROOT_DIRS))); + PathSet dirs2 = tokenizeString<StringSet>(settings.get("build-extra-chroot-dirs", string(""))); + dirs.insert(dirs2.begin(), dirs2.end()); + for (auto & i : dirs) { + size_t p = i.find('='); if (p == string::npos) - dirsInChroot[*i] = *i; + dirsInChroot[i] = i; else - dirsInChroot[string(*i, 0, p)] = string(*i, p + 1); + dirsInChroot[string(i, 0, p)] = string(i, p + 1); } dirsInChroot[tmpDir] = tmpDir; @@ -1969,10 +1981,15 @@ void DerivationGoal::startBuilder() worker.childStarted(shared_from_this(), pid, singleton<set<int> >(builderOut.readSide), true, true); + /* Check if setting up the build environment failed. */ + string msg = readLine(builderOut.readSide); + if (!msg.empty()) throw Error(msg); + if (settings.printBuildTrace) { printMsg(lvlError, format("@ build-started %1% - %2% %3%") % drvPath % drv.platform % logFile); } + } @@ -1981,10 +1998,14 @@ void DerivationGoal::initChild() /* Warning: in the child we should absolutely not make any SQLite calls! */ - bool inSetup = true; - try { /* child */ + _writeToStderr = 0; + + restoreAffinity(); + + commonChildInit(builderOut); + #if CHROOT_ENABLED if (useChroot) { /* Initialise the loopback interface. */ @@ -2088,9 +2109,9 @@ void DerivationGoal::initChild() throw SysError("mounting /dev/pts"); createSymlink("/dev/pts/ptmx", chrootRootDir + "/dev/ptmx"); - /* Make sure /dev/pts/ptmx is world-writable. With some - Linux versions, it is created with permissions 0. */ - chmod_(chrootRootDir + "/dev/pts/ptmx", 0666); + /* Make sure /dev/pts/ptmx is world-writable. With some + Linux versions, it is created with permissions 0. */ + chmod_(chrootRootDir + "/dev/pts/ptmx", 0666); } /* Do the chroot(). Below we do a chdir() to the @@ -2103,15 +2124,13 @@ void DerivationGoal::initChild() } #endif - commonChildInit(builderOut); - if (chdir(tmpDir.c_str()) == -1) throw SysError(format("changing into `%1%'") % tmpDir); /* Close all other file descriptors. */ closeMostFDs(set<int>()); -#ifdef CAN_DO_LINUX32_BUILDS +#if __linux__ /* Change the personality to 32-bit if we're doing an i686-linux build on an x86_64-linux machine. */ struct utsname utsbuf; @@ -2119,7 +2138,7 @@ void DerivationGoal::initChild() if (drv.platform == "i686-linux" && (settings.thisSystem == "x86_64-linux" || (!strcmp(utsbuf.sysname, "Linux") && !strcmp(utsbuf.machine, "x86_64")))) { - if (personality(0x0008 | 0x8000000 /* == PER_LINUX32_3GB */) == -1) + if (personality(PER_LINUX32) == -1) throw SysError("cannot set i686-linux personality"); } @@ -2129,6 +2148,11 @@ void DerivationGoal::initChild() int cur = personality(0xffffffff); if (cur != -1) personality(cur | 0x0020000 /* == UNAME26 */); } + + /* Disable address space randomization for improved + determinism. */ + int cur = personality(0xffffffff); + if (cur != -1) personality(cur | ADDR_NO_RANDOMIZE); #endif /* Fill in the environment. */ @@ -2167,21 +2191,28 @@ void DerivationGoal::initChild() /* Fill in the arguments. */ string builderBasename = baseNameOf(drv.builder); args.push_back(builderBasename.c_str()); - foreach (Strings::iterator, i, drv.args) - args.push_back(rewriteHashes(*i, rewritesToTmp).c_str()); + foreach (Strings::iterator, i, drv.args) { + auto re = rewriteHashes(*i, rewritesToTmp); + auto cstr = new char[re.length()+1]; + std::strcpy(cstr, re.c_str()); + + args.push_back(cstr); + } args.push_back(0); restoreSIGPIPE(); + /* Indicate that we managed to set up the build environment. */ + writeToStderr("\n"); + /* Execute the program. This should not return. */ - inSetup = false; execve(program.c_str(), (char * *) &args[0], (char * *) envArr); throw SysError(format("executing `%1%'") % drv.builder); } catch (std::exception & e) { - writeToStderr("build error: " + string(e.what()) + "\n"); - _exit(inSetup ? childSetupFailed : 1); + writeToStderr("while setting up the build environment: " + string(e.what()) + "\n"); + _exit(1); } abort(); /* never reached */ @@ -2333,7 +2364,7 @@ void DerivationGoal::registerOutputs() if (buildMode == bmCheck) { ValidPathInfo info = worker.store.queryPathInfo(path); if (hash.first != info.hash) - throw Error(format("derivation `%2%' may not be deterministic: hash mismatch in output `%1%'") % drvPath % path); + throw Error(format("derivation `%1%' may not be deterministic: hash mismatch in output `%2%'") % drvPath % path); continue; } @@ -2347,16 +2378,36 @@ void DerivationGoal::registerOutputs() debug(format("referenced input: `%1%'") % *i); } - /* If the derivation specifies an `allowedReferences' - attribute (containing a list of paths that the output may - refer to), check that all references are in that list. !!! - allowedReferences should really be per-output. */ - if (drv.env.find("allowedReferences") != drv.env.end()) { - PathSet allowed = parseReferenceSpecifiers(drv, get(drv.env, "allowedReferences")); - foreach (PathSet::iterator, i, references) - if (allowed.find(*i) == allowed.end()) - throw BuildError(format("output is not allowed to refer to path `%1%'") % *i); - } + /* Enforce `allowedReferences' and friends. */ + auto checkRefs = [&](const string & attrName, bool allowed, bool recursive) { + if (drv.env.find(attrName) == drv.env.end()) return; + + PathSet spec = parseReferenceSpecifiers(drv, get(drv.env, attrName)); + + PathSet used; + if (recursive) { + /* Our requisites are the union of the closures of our references. */ + for (auto & i : references) + /* Don't call computeFSClosure on ourselves. */ + if (actualPath != i) + computeFSClosure(worker.store, i, used); + } else + used = references; + + for (auto & i : used) + if (allowed) { + if (spec.find(i) == spec.end()) + throw BuildError(format("output (`%1%') is not allowed to refer to path `%2%'") % actualPath % i); + } else { + if (spec.find(i) != spec.end()) + throw BuildError(format("output (`%1%') is not allowed to refer to path `%2%'") % actualPath % i); + } + }; + + checkRefs("allowedReferences", true, false); + checkRefs("allowedRequisites", true, true); + checkRefs("disallowedReferences", false, false); + checkRefs("disallowedRequisites", false, true); worker.store.optimisePath(path); // FIXME: combine with scanForReferences() @@ -2586,6 +2637,13 @@ public: void cancel(bool timeout); + string key() + { + /* "a$" ensures substitution goals happen before derivation + goals. */ + return "a$" + storePathToName(storePath) + "$" + storePath; + } + void work(); /* The states. */ @@ -2781,32 +2839,18 @@ void SubstitutionGoal::tryToRun() const char * * argArr = strings2CharPtrs(args); /* Fork the substitute program. */ - pid = maybeVfork(); - - switch (pid) { + pid = startProcess([&]() { - case -1: - throw SysError("unable to fork"); + commonChildInit(logPipe); - case 0: - try { /* child */ + if (dup2(outPipe.writeSide, STDOUT_FILENO) == -1) + throw SysError("cannot dup output pipe into stdout"); - commonChildInit(logPipe); + execv(sub.c_str(), (char * *) argArr); - if (dup2(outPipe.writeSide, STDOUT_FILENO) == -1) - throw SysError("cannot dup output pipe into stdout"); + throw SysError(format("executing `%1%'") % sub); + }); - execv(sub.c_str(), (char * *) argArr); - - throw SysError(format("executing `%1%'") % sub); - - } catch (std::exception & e) { - writeToStderr("substitute error: " + string(e.what()) + "\n"); - } - _exit(1); - } - - /* parent */ pid.setSeparatePG(true); pid.setKillSignal(SIGTERM); outPipe.writeSide.close(); @@ -2944,6 +2988,7 @@ Worker::Worker(LocalStore & store) nrLocalBuilds = 0; lastWokenUp = 0; permanentFailure = false; + timedOut = false; } @@ -3109,15 +3154,19 @@ void Worker::run(const Goals & _topGoals) checkInterrupt(); - /* Call every wake goal. */ + /* Call every wake goal (in the ordering established by + CompareGoalPtrs). */ while (!awake.empty() && !topGoals.empty()) { - WeakGoals awake2(awake); + Goals awake2; + for (auto & i : awake) { + GoalPtr goal = i.lock(); + if (goal) awake2.insert(goal); + } awake.clear(); - foreach (WeakGoals::iterator, i, awake2) { + for (auto & goal : awake2) { checkInterrupt(); - GoalPtr goal = i->lock(); - if (goal) goal->work(); - if (topGoals.empty()) break; + goal->work(); + if (topGoals.empty()) break; // stuff may have been cancelled } } @@ -3255,6 +3304,7 @@ void Worker::waitForInput() format("%1% timed out after %2% seconds of silence") % goal->getName() % settings.maxSilentTime); goal->cancel(true); + timedOut = true; } else if (goal->getExitCode() == Goal::ecBusy && @@ -3266,6 +3316,7 @@ void Worker::waitForInput() format("%1% timed out after %2% seconds") % goal->getName() % settings.buildTimeout); goal->cancel(true); + timedOut = true; } } @@ -3282,7 +3333,7 @@ void Worker::waitForInput() unsigned int Worker::exitStatus() { - return permanentFailure ? 100 : 1; + return timedOut ? 101 : (permanentFailure ? 100 : 1); } diff --git a/nix/libstore/gc.cc b/nix/libstore/gc.cc index f90edac1cd..f98e02c1e2 100644 --- a/nix/libstore/gc.cc +++ b/nix/libstore/gc.cc @@ -115,7 +115,10 @@ Path addPermRoot(StoreAPI & store, const Path & _storePath, % gcRoot % rootsDir); } - makeSymlink(gcRoot, storePath); + if (baseNameOf(gcRoot) == baseNameOf(storePath)) + writeFile(gcRoot, ""); + else + makeSymlink(gcRoot, storePath); } /* Check that the root can be found by the garbage collector. @@ -142,11 +145,6 @@ Path addPermRoot(StoreAPI & store, const Path & _storePath, } -/* The file to which we write our temporary roots. */ -static Path fnTempRoots; -static AutoCloseFD fdTempRoots; - - void LocalStore::addTempRoot(const Path & path) { /* Create the temporary roots file for this process. */ @@ -201,27 +199,6 @@ void LocalStore::addTempRoot(const Path & path) } -void removeTempRoots() -{ - if (fdTempRoots != -1) { - fdTempRoots.close(); - unlink(fnTempRoots.c_str()); - } -} - - -/* Automatically clean up the temporary roots file when we exit. */ -struct RemoveTempRoots -{ - ~RemoveTempRoots() - { - removeTempRoots(); - } -}; - -static RemoveTempRoots autoRemoveTempRoots __attribute__((unused)); - - typedef std::shared_ptr<AutoCloseFD> FDPtr; typedef list<FDPtr> FDs; @@ -230,11 +207,11 @@ static void readTempRoots(PathSet & tempRoots, FDs & fds) { /* Read the `temproots' directory for per-process temporary root files. */ - Strings tempRootFiles = readDirectory( + DirEntries tempRootFiles = readDirectory( (format("%1%/%2%") % settings.nixStateDir % tempRootsDir).str()); - foreach (Strings::iterator, i, tempRootFiles) { - Path path = (format("%1%/%2%/%3%") % settings.nixStateDir % tempRootsDir % *i).str(); + for (auto & i : tempRootFiles) { + Path path = (format("%1%/%2%/%3%") % settings.nixStateDir % tempRootsDir % i.name).str(); debug(format("reading temporary root file `%1%'") % path); FDPtr fd(new AutoCloseFD(open(path.c_str(), O_RDWR, 0666))); @@ -294,19 +271,19 @@ static void foundRoot(StoreAPI & store, } -static void findRoots(StoreAPI & store, const Path & path, Roots & roots) +static void findRoots(StoreAPI & store, const Path & path, unsigned char type, Roots & roots) { try { - struct stat st = lstat(path); + if (type == DT_UNKNOWN) + type = getFileType(path); - if (S_ISDIR(st.st_mode)) { - Strings names = readDirectory(path); - foreach (Strings::iterator, i, names) - findRoots(store, path + "/" + *i, roots); + if (type == DT_DIR) { + for (auto & i : readDirectory(path)) + findRoots(store, path + "/" + i.name, i.type, roots); } - else if (S_ISLNK(st.st_mode)) { + else if (type == DT_LNK) { Path target = readLink(path); if (isInStore(target)) foundRoot(store, path, target, roots); @@ -328,6 +305,12 @@ static void findRoots(StoreAPI & store, const Path & path, Roots & roots) } } + else if (type == DT_REG) { + Path storePath = settings.nixStore + "/" + baseNameOf(path); + if (store.isValidPath(storePath)) + roots[path] = storePath; + } + } catch (SysError & e) { @@ -345,9 +328,10 @@ Roots LocalStore::findRoots() Roots roots; /* Process direct roots in {gcroots,manifests,profiles}. */ - nix::findRoots(*this, settings.nixStateDir + "/" + gcRootsDir, roots); - nix::findRoots(*this, settings.nixStateDir + "/manifests", roots); - nix::findRoots(*this, settings.nixStateDir + "/profiles", roots); + nix::findRoots(*this, settings.nixStateDir + "/" + gcRootsDir, DT_UNKNOWN, roots); + if (pathExists(settings.nixStateDir + "/manifests")) + nix::findRoots(*this, settings.nixStateDir + "/manifests", DT_UNKNOWN, roots); + nix::findRoots(*this, settings.nixStateDir + "/profiles", DT_UNKNOWN, roots); return roots; } @@ -449,7 +433,6 @@ void LocalStore::deletePathRecursive(GCState & state, const Path & path) // if the path was not valid, need to determine the actual // size. state.bytesInvalidated += size; - // Mac OS X cannot rename directories if they are read-only. if (chmod(path.c_str(), st.st_mode | S_IWUSR) == -1) throw SysError(format("making `%1%' writable") % path); Path tmp = state.trashDir + "/" + baseNameOf(path); @@ -649,7 +632,7 @@ void LocalStore::collectGarbage(const GCOptions & options, GCResults & results) /* After this point the set of roots or temporary roots cannot increase, since we hold locks on everything. So everything - that is not reachable from `roots'. */ + that is not reachable from `roots' is garbage. */ if (state.shouldDelete) { if (pathExists(state.trashDir)) deleteGarbage(state, state.trashDir); @@ -741,7 +724,7 @@ void LocalStore::collectGarbage(const GCOptions & options, GCResults & results) } /* While we're at it, vacuum the database. */ - if (options.action == GCOptions::gcDeleteDead) vacuumDB(); + //if (options.action == GCOptions::gcDeleteDead) vacuumDB(); } diff --git a/nix/libstore/globals.cc b/nix/libstore/globals.cc index 86fa56739c..bb08a7d0b0 100644 --- a/nix/libstore/globals.cc +++ b/nix/libstore/globals.cc @@ -2,6 +2,7 @@ #include "globals.hh" #include "util.hh" +#include "archive.hh" #include <map> #include <algorithm> @@ -55,6 +56,7 @@ Settings::Settings() envKeepDerivations = false; lockCPU = getEnv("NIX_AFFINITY_HACK", "1") == "1"; showTrace = false; + enableImportNative = false; } @@ -112,35 +114,61 @@ void Settings::set(const string & name, const string & value) } +string Settings::get(const string & name, const string & def) +{ + auto i = settings.find(name); + if (i == settings.end()) return def; + return i->second; +} + + +Strings Settings::get(const string & name, const Strings & def) +{ + auto i = settings.find(name); + if (i == settings.end()) return def; + return tokenizeString<Strings>(i->second); +} + + +bool Settings::get(const string & name, bool def) +{ + bool res = def; + _get(res, name); + return res; +} + + void Settings::update() { - get(tryFallback, "build-fallback"); - get(maxBuildJobs, "build-max-jobs"); - get(buildCores, "build-cores"); - get(thisSystem, "system"); - get(maxSilentTime, "build-max-silent-time"); - get(buildTimeout, "build-timeout"); - get(reservedSize, "gc-reserved-space"); - get(fsyncMetadata, "fsync-metadata"); - get(useSQLiteWAL, "use-sqlite-wal"); - get(syncBeforeRegistering, "sync-before-registering"); - get(useSubstitutes, "build-use-substitutes"); - get(buildUsersGroup, "build-users-group"); - get(useChroot, "build-use-chroot"); - get(dirsInChroot, "build-chroot-dirs"); - get(impersonateLinux26, "build-impersonate-linux-26"); - get(keepLog, "build-keep-log"); - get(compressLog, "build-compress-log"); - get(maxLogSize, "build-max-log-size"); - get(cacheFailure, "build-cache-failure"); - get(pollInterval, "build-poll-interval"); - get(checkRootReachability, "gc-check-reachability"); - get(gcKeepOutputs, "gc-keep-outputs"); - get(gcKeepDerivations, "gc-keep-derivations"); - get(autoOptimiseStore, "auto-optimise-store"); - get(envKeepDerivations, "env-keep-derivations"); - get(sshSubstituterHosts, "ssh-substituter-hosts"); - get(useSshSubstituter, "use-ssh-substituter"); + _get(tryFallback, "build-fallback"); + _get(maxBuildJobs, "build-max-jobs"); + _get(buildCores, "build-cores"); + _get(thisSystem, "system"); + _get(maxSilentTime, "build-max-silent-time"); + _get(buildTimeout, "build-timeout"); + _get(reservedSize, "gc-reserved-space"); + _get(fsyncMetadata, "fsync-metadata"); + _get(useSQLiteWAL, "use-sqlite-wal"); + _get(syncBeforeRegistering, "sync-before-registering"); + _get(useSubstitutes, "build-use-substitutes"); + _get(buildUsersGroup, "build-users-group"); + _get(useChroot, "build-use-chroot"); + _get(impersonateLinux26, "build-impersonate-linux-26"); + _get(keepLog, "build-keep-log"); + _get(compressLog, "build-compress-log"); + _get(maxLogSize, "build-max-log-size"); + _get(cacheFailure, "build-cache-failure"); + _get(pollInterval, "build-poll-interval"); + _get(checkRootReachability, "gc-check-reachability"); + _get(gcKeepOutputs, "gc-keep-outputs"); + _get(gcKeepDerivations, "gc-keep-derivations"); + _get(autoOptimiseStore, "auto-optimise-store"); + _get(envKeepDerivations, "env-keep-derivations"); + _get(sshSubstituterHosts, "ssh-substituter-hosts"); + _get(useSshSubstituter, "use-ssh-substituter"); + _get(logServers, "log-servers"); + _get(enableImportNative, "allow-unsafe-native-code-during-evaluation"); + _get(useCaseHack, "use-case-hack"); string subs = getEnv("NIX_SUBSTITUTERS", "default"); if (subs == "default") { @@ -158,7 +186,7 @@ void Settings::update() } -void Settings::get(string & res, const string & name) +void Settings::_get(string & res, const string & name) { SettingsMap::iterator i = settings.find(name); if (i == settings.end()) return; @@ -166,7 +194,7 @@ void Settings::get(string & res, const string & name) } -void Settings::get(bool & res, const string & name) +void Settings::_get(bool & res, const string & name) { SettingsMap::iterator i = settings.find(name); if (i == settings.end()) return; @@ -177,7 +205,7 @@ void Settings::get(bool & res, const string & name) } -void Settings::get(StringSet & res, const string & name) +void Settings::_get(StringSet & res, const string & name) { SettingsMap::iterator i = settings.find(name); if (i == settings.end()) return; @@ -186,7 +214,7 @@ void Settings::get(StringSet & res, const string & name) res.insert(ss.begin(), ss.end()); } -void Settings::get(Strings & res, const string & name) +void Settings::_get(Strings & res, const string & name) { SettingsMap::iterator i = settings.find(name); if (i == settings.end()) return; @@ -194,7 +222,7 @@ void Settings::get(Strings & res, const string & name) } -template<class N> void Settings::get(N & res, const string & name) +template<class N> void Settings::_get(N & res, const string & name) { SettingsMap::iterator i = settings.find(name); if (i == settings.end()) return; diff --git a/nix/libstore/globals.hh b/nix/libstore/globals.hh index 711c365294..c17e10d7c3 100644 --- a/nix/libstore/globals.hh +++ b/nix/libstore/globals.hh @@ -21,6 +21,12 @@ struct Settings { void set(const string & name, const string & value); + string get(const string & name, const string & def); + + Strings get(const string & name, const Strings & def); + + bool get(const string & name, bool def); + void update(); string pack(); @@ -142,10 +148,6 @@ struct Settings { /* Whether to build in chroot. */ bool useChroot; - /* The directories from the host filesystem to be included in the - chroot. */ - StringSet dirsInChroot; - /* Set of ssh connection strings for the ssh substituter */ Strings sshSubstituterHosts; @@ -197,14 +199,20 @@ struct Settings { /* Whether to show a stack trace if Nix evaluation fails. */ bool showTrace; + /* A list of URL prefixes that can return Nix build logs. */ + Strings logServers; + + /* Whether the importNative primop should be enabled */ + bool enableImportNative; + private: SettingsMap settings, overrides; - void get(string & res, const string & name); - void get(bool & res, const string & name); - void get(StringSet & res, const string & name); - void get(Strings & res, const string & name); - template<class N> void get(N & res, const string & name); + void _get(string & res, const string & name); + void _get(bool & res, const string & name); + void _get(StringSet & res, const string & name); + void _get(Strings & res, const string & name); + template<class N> void _get(N & res, const string & name); }; diff --git a/nix/libstore/local-store.cc b/nix/libstore/local-store.cc index 2c3d65215c..a115f65847 100644 --- a/nix/libstore/local-store.cc +++ b/nix/libstore/local-store.cc @@ -358,7 +358,17 @@ LocalStore::~LocalStore() i->second.to.close(); i->second.from.close(); i->second.error.close(); - i->second.pid.wait(true); + if (i->second.pid != -1) + i->second.pid.wait(true); + } + } catch (...) { + ignoreException(); + } + + try { + if (fdTempRoots != -1) { + fdTempRoots.close(); + unlink(fnTempRoots.c_str()); } } catch (...) { ignoreException(); @@ -551,9 +561,9 @@ static void canonicalisePathMetaData_(const Path & path, uid_t fromUid, InodesSe if (lstat(path.c_str(), &st)) throw SysError(format("getting attributes of path `%1%'") % path); - /* Really make sure that the path is of a supported type. This - has already been checked in dumpPath(). */ - assert(S_ISREG(st.st_mode) || S_ISDIR(st.st_mode) || S_ISLNK(st.st_mode)); + /* Really make sure that the path is of a supported type. */ + if (!(S_ISREG(st.st_mode) || S_ISDIR(st.st_mode) || S_ISLNK(st.st_mode))) + throw Error(format("file ‘%1%’ has an unsupported type") % path); /* Fail if the file is not owned by the build user. This prevents us from messing up the ownership/permissions of files @@ -593,9 +603,9 @@ static void canonicalisePathMetaData_(const Path & path, uid_t fromUid, InodesSe } if (S_ISDIR(st.st_mode)) { - Strings names = readDirectory(path); - foreach (Strings::iterator, i, names) - canonicalisePathMetaData_(path + "/" + *i, fromUid, inodesSeen); + DirEntries entries = readDirectory(path); + for (auto & i : entries) + canonicalisePathMetaData_(path + "/" + i.name, fromUid, inodesSeen); } } @@ -1083,31 +1093,16 @@ void LocalStore::startSubstituter(const Path & substituter, RunningSubstituter & setSubstituterEnv(); - run.pid = maybeVfork(); - - switch (run.pid) { - - case -1: - throw SysError("unable to fork"); - - case 0: /* child */ - try { - restoreAffinity(); - if (dup2(toPipe.readSide, STDIN_FILENO) == -1) - throw SysError("dupping stdin"); - if (dup2(fromPipe.writeSide, STDOUT_FILENO) == -1) - throw SysError("dupping stdout"); - if (dup2(errorPipe.writeSide, STDERR_FILENO) == -1) - throw SysError("dupping stderr"); - execl(substituter.c_str(), substituter.c_str(), "--query", NULL); - throw SysError(format("executing `%1%'") % substituter); - } catch (std::exception & e) { - std::cerr << "error: " << e.what() << std::endl; - } - _exit(1); - } - - /* Parent. */ + run.pid = startProcess([&]() { + if (dup2(toPipe.readSide, STDIN_FILENO) == -1) + throw SysError("dupping stdin"); + if (dup2(fromPipe.writeSide, STDOUT_FILENO) == -1) + throw SysError("dupping stdout"); + if (dup2(errorPipe.writeSide, STDERR_FILENO) == -1) + throw SysError("dupping stderr"); + execl(substituter.c_str(), substituter.c_str(), "--query", NULL); + throw SysError(format("executing `%1%'") % substituter); + }); run.program = baseNameOf(substituter); run.to = toPipe.writeSide.borrow(); @@ -1171,7 +1166,7 @@ string LocalStore::getLineFromSubstituter(RunningSubstituter & run) while (((p = err.find('\n')) != string::npos) || ((p = err.find('\r')) != string::npos)) { string thing(err, 0, p + 1); - writeToStderr(run.program + ": " + thing); + writeToStderr(run.program + ": " + thing); err = string(err, p + 1); } } @@ -1503,7 +1498,8 @@ void LocalStore::exportPath(const Path & path, bool sign, { assertStorePath(path); - addTempRoot(path); + printMsg(lvlInfo, format("exporting path `%1%'") % path); + if (!isValidPath(path)) throw Error(format("path `%1%' is not valid") % path); @@ -1613,8 +1609,6 @@ Path LocalStore::importPath(bool requireSignature, Source & source) Path dstPath = readStorePath(hashAndReadSource); - printMsg(lvlInfo, format("importing path `%1%'") % dstPath); - PathSet references = readStorePaths<PathSet>(hashAndReadSource); Path deriver = readString(hashAndReadSource); @@ -1747,8 +1741,8 @@ bool LocalStore::verifyStore(bool checkContents, bool repair) /* Acquire the global GC lock to prevent a garbage collection. */ AutoCloseFD fdGCLock = openGCLock(ltWrite); - Paths entries = readDirectory(settings.nixStore); - PathSet store(entries.begin(), entries.end()); + PathSet store; + for (auto & i : readDirectory(settings.nixStore)) store.insert(i.name); /* Check whether all valid paths actually exist. */ printMsg(lvlInfo, "checking path existence..."); @@ -1898,9 +1892,8 @@ void LocalStore::markContentsGood(const Path & path) PathSet LocalStore::queryValidPathsOld() { PathSet paths; - Strings entries = readDirectory(settings.nixDBPath + "/info"); - foreach (Strings::iterator, i, entries) - if (i->at(0) != '.') paths.insert(settings.nixStore + "/" + *i); + for (auto & i : readDirectory(settings.nixDBPath + "/info")) + if (i.name.at(0) != '.') paths.insert(settings.nixStore + "/" + i.name); return paths; } @@ -1987,9 +1980,8 @@ static void makeMutable(const Path & path) if (!S_ISDIR(st.st_mode) && !S_ISREG(st.st_mode)) return; if (S_ISDIR(st.st_mode)) { - Strings names = readDirectory(path); - foreach (Strings::iterator, i, names) - makeMutable(path + "/" + *i); + for (auto & i : readDirectory(path)) + makeMutable(path + "/" + i.name); } /* The O_NOFOLLOW is important to prevent us from changing the diff --git a/nix/libstore/local-store.hh b/nix/libstore/local-store.hh index 54331e448a..e0aabdba42 100644 --- a/nix/libstore/local-store.hh +++ b/nix/libstore/local-store.hh @@ -1,16 +1,12 @@ #pragma once #include <string> +#include <unordered_set> #include "store-api.hh" #include "util.hh" #include "pathlocks.hh" -#if HAVE_TR1_UNORDERED_SET -#include <tr1/unordered_set> -#endif - - class sqlite3; class sqlite3_stmt; @@ -171,6 +167,9 @@ public: files with the same contents. */ void optimiseStore(OptimiseStats & stats); + /* Generic variant of the above method. */ + void optimiseStore(); + /* Optimise a single store path. */ void optimisePath(const Path & path); @@ -245,6 +244,10 @@ private: bool didSetSubstituterEnv; + /* The file to which we write our temporary roots. */ + Path fnTempRoots; + AutoCloseFD fdTempRoots; + int getSchema(); void openDB(bool create); @@ -306,11 +309,7 @@ private: void checkDerivationOutputs(const Path & drvPath, const Derivation & drv); -#if HAVE_TR1_UNORDERED_SET - typedef std::tr1::unordered_set<ino_t> InodeHash; -#else - typedef std::set<ino_t> InodeHash; -#endif + typedef std::unordered_set<ino_t> InodeHash; InodeHash loadInodeHash(); Strings readDirectoryIgnoringInodes(const Path & path, const InodeHash & inodeHash); diff --git a/nix/libstore/optimise-store.cc b/nix/libstore/optimise-store.cc index 67ee94a4bd..8ba9d1a263 100644 --- a/nix/libstore/optimise-store.cc +++ b/nix/libstore/optimise-store.cc @@ -225,6 +225,22 @@ void LocalStore::optimiseStore(OptimiseStats & stats) } } +static string showBytes(unsigned long long bytes) +{ + return (format("%.2f MiB") % (bytes / (1024.0 * 1024.0))).str(); +} + +void LocalStore::optimiseStore() +{ + OptimiseStats stats; + + optimiseStore(stats); + + printMsg(lvlError, + format("%1% freed by hard-linking %2% files") + % showBytes(stats.bytesFreed) + % stats.filesLinked); +} void LocalStore::optimisePath(const Path & path) { diff --git a/nix/libstore/remote-store.cc b/nix/libstore/remote-store.cc index 4619206932..448d9b6bc1 100644 --- a/nix/libstore/remote-store.cc +++ b/nix/libstore/remote-store.cc @@ -87,8 +87,7 @@ void RemoteStore::openConnection(bool reserveSpace) processStderr(); } catch (Error & e) { - throw Error(format("cannot start worker (%1%)") - % e.msg()); + throw Error(format("cannot start daemon worker: %1%") % e.msg()); } setOptions(); @@ -133,8 +132,6 @@ RemoteStore::~RemoteStore() try { to.flush(); fdSocket.close(); - if (child != -1) - child.wait(true); } catch (...) { ignoreException(); } @@ -402,8 +399,23 @@ Path RemoteStore::addToStore(const Path & _srcPath, writeInt((hashAlgo == htSHA256 && recursive) ? 0 : 1, to); writeInt(recursive ? 1 : 0, to); writeString(printHashType(hashAlgo), to); - dumpPath(srcPath, to, filter); - processStderr(); + + try { + to.written = 0; + to.warn = true; + dumpPath(srcPath, to, filter); + to.warn = false; + processStderr(); + } catch (SysError & e) { + /* Daemon closed while we were sending the path. Probably OOM + or I/O error. */ + if (e.errNo == EPIPE) + try { + processStderr(); + } catch (EndOfFile & e) { } + throw; + } + return readStorePath(from); } @@ -564,6 +576,13 @@ void RemoteStore::clearFailedPaths(const PathSet & paths) readInt(from); } +void RemoteStore::optimiseStore() +{ + openConnection(); + writeInt(wopOptimiseStore, to); + processStderr(); + readInt(from); +} void RemoteStore::processStderr(Sink * sink, Source * source) { diff --git a/nix/libstore/remote-store.hh b/nix/libstore/remote-store.hh index 04b60fce4b..98774c10b3 100644 --- a/nix/libstore/remote-store.hh +++ b/nix/libstore/remote-store.hh @@ -82,12 +82,13 @@ public: PathSet queryFailedPaths(); void clearFailedPaths(const PathSet & paths); - + + void optimiseStore(); + private: AutoCloseFD fdSocket; FdSink to; FdSource from; - Pid child; unsigned int daemonVersion; bool initialised; diff --git a/nix/libstore/store-api.hh b/nix/libstore/store-api.hh index b635fee2cf..3109f100ef 100644 --- a/nix/libstore/store-api.hh +++ b/nix/libstore/store-api.hh @@ -250,6 +250,10 @@ public: `nix-store --register-validity'. */ string makeValidityRegistration(const PathSet & paths, bool showDerivers, bool showHash); + + /* Optimise the disk space usage of the Nix store by hard-linking files + with the same contents. */ + virtual void optimiseStore() = 0; }; diff --git a/nix/libstore/worker-protocol.hh b/nix/libstore/worker-protocol.hh index 9317f89c37..4b040b77ce 100644 --- a/nix/libstore/worker-protocol.hh +++ b/nix/libstore/worker-protocol.hh @@ -12,7 +12,6 @@ namespace nix { typedef enum { - wopQuit = 0, wopIsValidPath = 1, wopHasSubstitutes = 3, wopQueryPathHash = 4, @@ -43,6 +42,7 @@ typedef enum { wopQueryValidPaths = 31, wopQuerySubstitutablePaths = 32, wopQueryValidDerivers = 33, + wopOptimiseStore = 34 } WorkerOp; diff --git a/nix/libutil/archive.cc b/nix/libutil/archive.cc index 70a1c580dd..6856ea0f28 100644 --- a/nix/libutil/archive.cc +++ b/nix/libutil/archive.cc @@ -1,10 +1,14 @@ +#define _XOPEN_SOURCE 600 + #include "config.h" #include <cerrno> #include <algorithm> #include <vector> +#include <map> + +#include <strings.h> // for strcasecmp -#define _XOPEN_SOURCE 600 #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> @@ -18,39 +22,21 @@ namespace nix { +bool useCaseHack = +#if __APPLE__ + true; +#else + false; +#endif + static string archiveVersion1 = "nix-archive-1"; +static string caseHackSuffix = "~nix~case~hack~"; PathFilter defaultPathFilter; -static void dump(const string & path, Sink & sink, PathFilter & filter); - - -static void dumpEntries(const Path & path, Sink & sink, PathFilter & filter) -{ - Strings names = readDirectory(path); - vector<string> names2(names.begin(), names.end()); - sort(names2.begin(), names2.end()); - - for (vector<string>::iterator i = names2.begin(); - i != names2.end(); ++i) - { - Path entry = path + "/" + *i; - if (filter(entry)) { - writeString("entry", sink); - writeString("(", sink); - writeString("name", sink); - writeString(*i, sink); - writeString("node", sink); - dump(entry, sink, filter); - writeString(")", sink); - } - } -} - - -static void dumpContents(const Path & path, size_t size, +static void dumpContents(const Path & path, size_t size, Sink & sink) { writeString("contents", sink); @@ -58,7 +44,7 @@ static void dumpContents(const Path & path, size_t size, AutoCloseFD fd = open(path.c_str(), O_RDONLY); if (fd == -1) throw SysError(format("opening file `%1%'") % path); - + unsigned char buf[65536]; size_t left = size; @@ -89,12 +75,40 @@ static void dump(const Path & path, Sink & sink, PathFilter & filter) writeString("", sink); } dumpContents(path, (size_t) st.st_size, sink); - } + } else if (S_ISDIR(st.st_mode)) { writeString("type", sink); writeString("directory", sink); - dumpEntries(path, sink, filter); + + /* If we're on a case-insensitive system like Mac OS X, undo + the case hack applied by restorePath(). */ + std::map<string, string> unhacked; + for (auto & i : readDirectory(path)) + if (useCaseHack) { + string name(i.name); + size_t pos = i.name.find(caseHackSuffix); + if (pos != string::npos) { + printMsg(lvlDebug, format("removing case hack suffix from `%1%'") % (path + "/" + i.name)); + name.erase(pos); + } + if (unhacked.find(name) != unhacked.end()) + throw Error(format("file name collision in between `%1%' and `%2%'") + % (path + "/" + unhacked[name]) % (path + "/" + i.name)); + unhacked[name] = i.name; + } else + unhacked[i.name] = i.name; + + for (auto & i : unhacked) + if (filter(path + "/" + i.first)) { + writeString("entry", sink); + writeString("(", sink); + writeString("name", sink); + writeString(i.first, sink); + writeString("node", sink); + dump(path + "/" + i.second, sink, filter); + writeString(")", sink); + } } else if (S_ISLNK(st.st_mode)) { @@ -123,6 +137,7 @@ static SerialisationError badArchive(string s) } +#if 0 static void skipGeneric(Source & source) { if (readString(source) == "(") { @@ -130,43 +145,13 @@ static void skipGeneric(Source & source) skipGeneric(source); } } - - -static void parse(ParseSink & sink, Source & source, const Path & path); - - - -static void parseEntry(ParseSink & sink, Source & source, const Path & path) -{ - string s, name; - - s = readString(source); - if (s != "(") throw badArchive("expected open tag"); - - while (1) { - checkInterrupt(); - - s = readString(source); - - if (s == ")") { - break; - } else if (s == "name") { - name = readString(source); - } else if (s == "node") { - if (s == "") throw badArchive("entry name missing"); - parse(sink, source, path + "/" + name); - } else { - throw badArchive("unknown field " + s); - skipGeneric(source); - } - } -} +#endif static void parseContents(ParseSink & sink, Source & source, const Path & path) { unsigned long long size = readLongLong(source); - + sink.preallocateContents(size); unsigned long long left = size; @@ -185,6 +170,15 @@ static void parseContents(ParseSink & sink, Source & source, const Path & path) } +struct CaseInsensitiveCompare +{ + bool operator() (const string & a, const string & b) const + { + return strcasecmp(a.c_str(), b.c_str()) < 0; + } +}; + + static void parse(ParseSink & sink, Source & source, const Path & path) { string s; @@ -194,6 +188,8 @@ static void parse(ParseSink & sink, Source & source, const Path & path) enum { tpUnknown, tpRegular, tpDirectory, tpSymlink } type = tpUnknown; + std::map<Path, int, CaseInsensitiveCompare> names; + while (1) { checkInterrupt(); @@ -221,9 +217,9 @@ static void parse(ParseSink & sink, Source & source, const Path & path) else if (t == "symlink") { type = tpSymlink; } - + else throw badArchive("unknown file type " + t); - + } else if (s == "contents" && type == tpRegular) { @@ -236,7 +232,40 @@ static void parse(ParseSink & sink, Source & source, const Path & path) } else if (s == "entry" && type == tpDirectory) { - parseEntry(sink, source, path); + string name, prevName; + + s = readString(source); + if (s != "(") throw badArchive("expected open tag"); + + while (1) { + checkInterrupt(); + + s = readString(source); + + if (s == ")") { + break; + } else if (s == "name") { + name = readString(source); + if (name.empty() || name == "." || name == ".." || name.find('/') != string::npos || name.find((char) 0) != string::npos) + throw Error(format("NAR contains invalid file name `%1%'") % name); + if (name <= prevName) + throw Error("NAR directory is not sorted"); + prevName = name; + if (useCaseHack) { + auto i = names.find(name); + if (i != names.end()) { + printMsg(lvlDebug, format("case collision between `%1%' and `%2%'") % i->first % name); + name += caseHackSuffix; + name += int2String(++i->second); + } else + names[name] = 0; + } + } else if (s == "node") { + if (s.empty()) throw badArchive("entry name missing"); + parse(sink, source, path + "/" + name); + } else + throw badArchive("unknown field " + s); + } } else if (s == "target" && type == tpSymlink) { @@ -244,17 +273,15 @@ static void parse(ParseSink & sink, Source & source, const Path & path) sink.createSymlink(path, target); } - else { + else throw badArchive("unknown field " + s); - skipGeneric(source); - } } } void parseDump(ParseSink & sink, Source & source) { - string version; + string version; try { version = readString(source); } catch (SerialisationError & e) { @@ -323,7 +350,7 @@ struct RestoreSink : ParseSink } }; - + void restorePath(const Path & path, Source & source) { RestoreSink sink; @@ -331,5 +358,5 @@ void restorePath(const Path & path, Source & source) parseDump(sink, source); } - + } diff --git a/nix/libutil/archive.hh b/nix/libutil/archive.hh index ccac92074d..c216e9768f 100644 --- a/nix/libutil/archive.hh +++ b/nix/libutil/archive.hh @@ -28,7 +28,7 @@ namespace nix { where: - attrs(as) = concat(map(attr, as)) + encN(0) + attrs(as) = concat(map(attr, as)) + encN(0) attrs((a, b)) = encS(a) + encS(b) encS(s) = encN(len(s)) + s + (padding until next 64-bit boundary) @@ -58,7 +58,7 @@ void dumpPath(const Path & path, Sink & sink, struct ParseSink { virtual void createDirectory(const Path & path) { }; - + virtual void createRegularFile(const Path & path) { }; virtual void isExecutable() { }; virtual void preallocateContents(unsigned long long size) { }; @@ -66,10 +66,14 @@ struct ParseSink virtual void createSymlink(const Path & path, const string & target) { }; }; - + void parseDump(ParseSink & sink, Source & source); void restorePath(const Path & path, Source & source); - + +// FIXME: global variables are bad m'kay. +extern bool useCaseHack; + + } diff --git a/nix/libutil/serialise.cc b/nix/libutil/serialise.cc index 6b71f52c15..9241750750 100644 --- a/nix/libutil/serialise.cc +++ b/nix/libutil/serialise.cc @@ -54,8 +54,24 @@ FdSink::~FdSink() } +size_t threshold = 256 * 1024 * 1024; + +static void warnLargeDump() +{ + printMsg(lvlError, "warning: dumping very large path (> 256 MiB); this may run out of memory"); +} + + void FdSink::write(const unsigned char * data, size_t len) { + static bool warned = false; + if (warn && !warned) { + written += len; + if (written > threshold) { + warnLargeDump(); + warned = true; + } + } writeFull(fd, data, len); } @@ -256,4 +272,15 @@ template Paths readStrings(Source & source); template PathSet readStrings(Source & source); +void StringSink::operator () (const unsigned char * data, size_t len) +{ + static bool warned = false; + if (!warned && s.size() > threshold) { + warnLargeDump(); + warned = true; + } + s.append((const char *) data, len); +} + + } diff --git a/nix/libutil/serialise.hh b/nix/libutil/serialise.hh index e5a9df1d05..6a6f028aa6 100644 --- a/nix/libutil/serialise.hh +++ b/nix/libutil/serialise.hh @@ -72,9 +72,11 @@ struct BufferedSource : Source struct FdSink : BufferedSink { int fd; + bool warn; + size_t written; - FdSink() : fd(-1) { } - FdSink(int fd) : fd(fd) { } + FdSink() : fd(-1), warn(false), written(0) { } + FdSink(int fd) : fd(fd), warn(false), written(0) { } ~FdSink(); void write(const unsigned char * data, size_t len); @@ -95,10 +97,7 @@ struct FdSource : BufferedSource struct StringSink : Sink { string s; - void operator () (const unsigned char * data, size_t len) - { - s.append((const char *) data, len); - } + void operator () (const unsigned char * data, size_t len); }; diff --git a/nix/libutil/types.hh b/nix/libutil/types.hh index 4b5ce9a78c..160884ee1a 100644 --- a/nix/libutil/types.hh +++ b/nix/libutil/types.hh @@ -8,6 +8,15 @@ #include <boost/format.hpp> +/* Before 4.7, gcc's std::exception uses empty throw() specifiers for + * its (virtual) destructor and what() in c++11 mode, in violation of spec + */ +#ifdef __GNUC__ +#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) +#define EXCEPTION_NEEDS_THROW_SPEC +#endif +#endif + namespace nix { @@ -39,10 +48,14 @@ protected: public: unsigned int status; // exit status BaseError(const FormatOrString & fs, unsigned int status = 1); +#ifdef EXCEPTION_NEEDS_THROW_SPEC ~BaseError() throw () { }; const char * what() const throw () { return err.c_str(); } - const string & msg() const throw () { return err; } - const string & prefix() const throw () { return prefix_; } +#else + const char * what() const noexcept { return err.c_str(); } +#endif + const string & msg() const { return err; } + const string & prefix() const { return prefix_; } BaseError & addPrefix(const FormatOrString & fs); }; diff --git a/nix/libutil/util.cc b/nix/libutil/util.cc index 846674a29d..a4a1ddb12a 100644 --- a/nix/libutil/util.cc +++ b/nix/libutil/util.cc @@ -1,5 +1,8 @@ #include "config.h" +#include "util.hh" +#include "affinity.hh" + #include <iostream> #include <cerrno> #include <cstdio> @@ -16,8 +19,6 @@ #include <sys/syscall.h> #endif -#include "util.hh" - extern char * * environ; @@ -125,7 +126,6 @@ Path canonPath(const Path & path, bool resolveSymlinks) i = temp.begin(); /* restart */ end = temp.end(); s = ""; - /* !!! potential for infinite loop */ } } } @@ -202,9 +202,10 @@ bool isLink(const Path & path) } -Strings readDirectory(const Path & path) +DirEntries readDirectory(const Path & path) { - Strings names; + DirEntries entries; + entries.reserve(64); AutoCloseDir dir = opendir(path.c_str()); if (!dir) throw SysError(format("opening directory `%1%'") % path); @@ -214,11 +215,21 @@ Strings readDirectory(const Path & path) checkInterrupt(); string name = dirent->d_name; if (name == "." || name == "..") continue; - names.push_back(name); + entries.emplace_back(name, dirent->d_ino, dirent->d_type); } if (errno) throw SysError(format("reading directory `%1%'") % path); - return names; + return entries; +} + + +unsigned char getFileType(const Path & path) +{ + struct stat st = lstat(path); + if (S_ISDIR(st.st_mode)) return DT_DIR; + if (S_ISLNK(st.st_mode)) return DT_LNK; + if (S_ISREG(st.st_mode)) return DT_REG; + return DT_UNKNOWN; } @@ -293,16 +304,14 @@ static void _deletePath(const Path & path, unsigned long long & bytesFreed) bytesFreed += st.st_blocks * 512; if (S_ISDIR(st.st_mode)) { - Strings names = readDirectory(path); - /* Make the directory writable. */ if (!(st.st_mode & S_IWUSR)) { if (chmod(path.c_str(), st.st_mode | S_IWUSR) == -1) throw SysError(format("making `%1%' writable") % path); } - for (Strings::iterator i = names.begin(); i != names.end(); ++i) - _deletePath(path + "/" + *i, bytesFreed); + for (auto & i : readDirectory(path)) + _deletePath(path + "/" + i.name, bytesFreed); } if (remove(path.c_str()) == -1) @@ -380,6 +389,9 @@ Paths createDirs(const Path & path) created.push_back(path); } + if (S_ISLNK(st.st_mode) && stat(path.c_str(), &st) == -1) + throw SysError(format("statting symlink `%1%'") % path); + if (!S_ISDIR(st.st_mode)) throw Error(format("`%1%' is not a directory") % path); return created; @@ -466,10 +478,18 @@ void warnOnce(bool & haveWarned, const FormatOrString & fs) } +static void defaultWriteToStderr(const unsigned char * buf, size_t count) +{ + writeFull(STDERR_FILENO, buf, count); +} + + void writeToStderr(const string & s) { try { - _writeToStderr((const unsigned char *) s.data(), s.size()); + auto p = _writeToStderr; + if (!p) p = defaultWriteToStderr; + p((const unsigned char *) s.data(), s.size()); } catch (SysError & e) { /* Ignore failing writes to stderr if we're in an exception handler, otherwise throw an exception. We need to ignore @@ -481,12 +501,6 @@ void writeToStderr(const string & s) } -static void defaultWriteToStderr(const unsigned char * buf, size_t count) -{ - writeFull(STDERR_FILENO, buf, count); -} - - void (*_writeToStderr) (const unsigned char * buf, size_t count) = defaultWriteToStderr; @@ -707,10 +721,14 @@ void AutoCloseDir::close() Pid::Pid() + : pid(-1), separatePG(false), killSignal(SIGKILL) +{ +} + + +Pid::Pid(pid_t pid) + : pid(pid), separatePG(false), killSignal(SIGKILL) { - pid = -1; - separatePG = false; - killSignal = SIGKILL; } @@ -734,11 +752,12 @@ Pid::operator pid_t() } -void Pid::kill() +void Pid::kill(bool quiet) { if (pid == -1 || pid == 0) return; - printMsg(lvlError, format("killing process %1%") % pid); + if (!quiet) + printMsg(lvlError, format("killing process %1%") % pid); /* Send the requested signal to the child. If it has its own process group, send the signal to every process in the child @@ -801,43 +820,30 @@ void killUser(uid_t uid) users to which the current process can send signals. So we fork a process, switch to uid, and send a mass kill. */ - Pid pid; - pid = fork(); - switch (pid) { + Pid pid = startProcess([&]() { - case -1: - throw SysError("unable to fork"); + if (setuid(uid) == -1) + throw SysError("setting uid"); - case 0: - try { /* child */ - - if (setuid(uid) == -1) - throw SysError("setting uid"); - - while (true) { + while (true) { #ifdef __APPLE__ - /* OSX's kill syscall takes a third parameter that, among other - things, determines if kill(-1, signo) affects the calling - process. In the OSX libc, it's set to true, which means - "follow POSIX", which we don't want here + /* OSX's kill syscall takes a third parameter that, among + other things, determines if kill(-1, signo) affects the + calling process. In the OSX libc, it's set to true, + which means "follow POSIX", which we don't want here */ - if (syscall(SYS_kill, -1, SIGKILL, false) == 0) break; + if (syscall(SYS_kill, -1, SIGKILL, false) == 0) break; #else - if (kill(-1, SIGKILL) == 0) break; + if (kill(-1, SIGKILL) == 0) break; #endif - if (errno == ESRCH) break; /* no more processes */ - if (errno != EINTR) - throw SysError(format("cannot kill processes for uid `%1%'") % uid); - } - - } catch (std::exception & e) { - writeToStderr((format("killing processes belonging to uid `%1%': %2%\n") % uid % e.what()).str()); - _exit(1); + if (errno == ESRCH) break; /* no more processes */ + if (errno != EINTR) + throw SysError(format("cannot kill processes for uid `%1%'") % uid); } + _exit(0); - } + }); - /* parent */ int status = pid.wait(true); if (status != 0) throw Error(format("cannot kill processes for uid `%1%': %2%") % uid % statusToString(status)); @@ -852,6 +858,32 @@ void killUser(uid_t uid) ////////////////////////////////////////////////////////////////////// +pid_t startProcess(std::function<void()> fun, + bool dieWithParent, const string & errorPrefix, bool runExitHandlers) +{ + pid_t pid = fork(); + if (pid == -1) throw SysError("unable to fork"); + + if (pid == 0) { + _writeToStderr = 0; + try { + restoreAffinity(); + fun(); + } catch (std::exception & e) { + try { + std::cerr << errorPrefix << e.what() << "\n"; + } catch (...) { } + } catch (...) { } + if (runExitHandlers) + exit(1); + else + _exit(1); + } + + return pid; +} + + string runProgram(Path program, bool searchPath, const Strings & args) { checkInterrupt(); @@ -867,32 +899,17 @@ string runProgram(Path program, bool searchPath, const Strings & args) pipe.create(); /* Fork. */ - Pid pid; - pid = maybeVfork(); - - switch (pid) { - - case -1: - throw SysError("unable to fork"); + Pid pid = startProcess([&]() { + if (dup2(pipe.writeSide, STDOUT_FILENO) == -1) + throw SysError("dupping stdout"); - case 0: /* child */ - try { - if (dup2(pipe.writeSide, STDOUT_FILENO) == -1) - throw SysError("dupping stdout"); - - if (searchPath) - execvp(program.c_str(), (char * *) &cargs[0]); - else - execv(program.c_str(), (char * *) &cargs[0]); - throw SysError(format("executing `%1%'") % program); - - } catch (std::exception & e) { - writeToStderr("error: " + string(e.what()) + "\n"); - } - _exit(1); - } + if (searchPath) + execvp(program.c_str(), (char * *) &cargs[0]); + else + execv(program.c_str(), (char * *) &cargs[0]); - /* Parent. */ + throw SysError(format("executing `%1%'") % program); + }); pipe.writeSide.close(); @@ -901,7 +918,7 @@ string runProgram(Path program, bool searchPath, const Strings & args) /* Wait for the child to finish. */ int status = pid.wait(true); if (!statusOk(status)) - throw Error(format("program `%1%' %2%") + throw ExecError(format("program `%1%' %2%") % program % statusToString(status)); return result; @@ -928,13 +945,6 @@ void closeOnExec(int fd) } -#if HAVE_VFORK -pid_t (*maybeVfork)() = vfork; -#else -pid_t (*maybeVfork)() = fork; -#endif - - ////////////////////////////////////////////////////////////////////// diff --git a/nix/libutil/util.hh b/nix/libutil/util.hh index ce2d77c19a..0ad0026711 100644 --- a/nix/libutil/util.hh +++ b/nix/libutil/util.hh @@ -7,6 +7,7 @@ #include <dirent.h> #include <unistd.h> #include <signal.h> +#include <functional> #include <cstdio> @@ -63,7 +64,20 @@ bool isLink(const Path & path); /* Read the contents of a directory. The entries `.' and `..' are removed. */ -Strings readDirectory(const Path & path); +struct DirEntry +{ + string name; + ino_t ino; + unsigned char type; // one of DT_* + DirEntry(const string & name, ino_t ino, unsigned char type) + : name(name), ino(ino), type(type) { } +}; + +typedef vector<DirEntry> DirEntries; + +DirEntries readDirectory(const Path & path); + +unsigned char getFileType(const Path & path); /* Read the contents of a file into a string. */ string readFile(int fd); @@ -237,10 +251,11 @@ class Pid int killSignal; public: Pid(); + Pid(pid_t pid); ~Pid(); void operator =(pid_t pid); operator pid_t(); - void kill(); + void kill(bool quiet = false); int wait(bool block); void setSeparatePG(bool separatePG); void setKillSignal(int signal); @@ -252,11 +267,19 @@ public: void killUser(uid_t uid); +/* Fork a process that runs the given function, and return the child + pid to the caller. */ +pid_t startProcess(std::function<void()> fun, bool dieWithParent = true, + const string & errorPrefix = "error: ", bool runExitHandlers = false); + + /* Run a program and return its stdout in a string (i.e., like the shell backtick operator). */ string runProgram(Path program, bool searchPath = false, const Strings & args = Strings()); +MakeError(ExecError, Error) + /* Close all file descriptors except stdin, stdout, stderr, and those listed in the given set. Good practice in child processes. */ void closeMostFDs(const set<int> & exceptions); @@ -264,9 +287,6 @@ void closeMostFDs(const set<int> & exceptions); /* Set the close-on-exec flag for the given file descriptor. */ void closeOnExec(int fd); -/* Call vfork() if available, otherwise fork(). */ -extern pid_t (*maybeVfork)(); - /* User interruption. */ diff --git a/nix/nix-daemon/guix-daemon.cc b/nix/nix-daemon/guix-daemon.cc index ca39c2f497..315744394f 100644 --- a/nix/nix-daemon/guix-daemon.cc +++ b/nix/nix-daemon/guix-daemon.cc @@ -154,8 +154,18 @@ parse_opt (int key, char *arg, struct argp_state *state) settings.useChroot = false; break; case GUIX_OPT_CHROOT_DIR: - settings.dirsInChroot.insert (arg); - break; + { + std::string chroot_dirs; + + chroot_dirs = settings.get ("build-extra-chroot-dirs", + (std::string) ""); + if (chroot_dirs == "") + chroot_dirs = arg; + else + chroot_dirs = chroot_dirs + " " + arg; + settings.set("build-extra-chroot-dirs", chroot_dirs); + break; + } case GUIX_OPT_DISABLE_LOG_COMPRESSION: settings.compressLog = false; break; @@ -310,7 +320,7 @@ main (int argc, char *argv[]) if (subs == "default") { string subst = - settings.nixLibexecDir + "/guix/substitute-binary"; + settings.nixLibexecDir + "/guix/substitute"; setenv ("NIX_SUBSTITUTERS", subst.c_str (), 1); } } @@ -328,11 +338,12 @@ main (int argc, char *argv[]) if (settings.useChroot) { - foreach (PathSet::iterator, i, settings.dirsInChroot) - { - printMsg (lvlDebug, - format ("directory `%1%' added to the chroot") % *i); - } + std::string chroot_dirs; + + chroot_dirs = settings.get ("build-extra-chroot-dirs", + (std::string) ""); + printMsg (lvlDebug, + format ("extra chroot directories: '%1%'") % chroot_dirs); } printMsg (lvlDebug, diff --git a/nix/nix-daemon/nix-daemon.cc b/nix/nix-daemon/nix-daemon.cc index 8814fe3155..e42d602a3a 100644 --- a/nix/nix-daemon/nix-daemon.cc +++ b/nix/nix-daemon/nix-daemon.cc @@ -7,6 +7,8 @@ #include "affinity.hh" #include "globals.hh" +#include <algorithm> + #include <cstring> #include <unistd.h> #include <signal.h> @@ -17,6 +19,8 @@ #include <sys/un.h> #include <fcntl.h> #include <errno.h> +#include <pwd.h> +#include <grp.h> using namespace nix; @@ -44,7 +48,6 @@ static FdSource from(STDIN_FILENO); static FdSink to(STDOUT_FILENO); bool canSendStderr; -pid_t myPid; @@ -54,11 +57,7 @@ pid_t myPid; socket. */ static void tunnelStderr(const unsigned char * buf, size_t count) { - /* Don't send the message to the client if we're a child of the - process handling the connection. Otherwise we could screw up - the protocol. It's up to the parent to redirect stderr and - send it to the client somehow (e.g., as in build.cc). */ - if (canSendStderr && myPid == getpid()) { + if (canSendStderr) { try { writeInt(STDERR_NEXT, to); writeString(buf, count, to); @@ -284,15 +283,6 @@ static void performOp(bool trusted, unsigned int clientVersion, { switch (op) { -#if 0 - case wopQuit: { - /* Close the database. */ - store.reset((StoreAPI *) 0); - writeInt(1, to); - break; - } -#endif - case wopIsValidPath: { /* 'readStorePath' could raise an error leading to the connection being closed. To be able to recover from an invalid path error, @@ -450,7 +440,7 @@ static void performOp(bool trusted, unsigned int clientVersion, case wopImportPaths: { startWork(); TunnelSource source(from); - Paths paths = store->importPaths(true, source); + Paths paths = store->importPaths(!trusted, source); stopWork(); writeStrings(paths, to); break; @@ -650,6 +640,13 @@ static void performOp(bool trusted, unsigned int clientVersion, break; } + case wopOptimiseStore: + startWork(); + store->optimiseStore(); + stopWork(); + writeInt(1, to); + break; + default: throw Error(format("invalid operation %1%") % op); } @@ -659,7 +656,6 @@ static void performOp(bool trusted, unsigned int clientVersion, static void processConnection(bool trusted) { canSendStderr = false; - myPid = getpid(); _writeToStderr = tunnelStderr; #ifdef HAVE_HUP_NOTIFICATION @@ -708,7 +704,7 @@ static void processConnection(bool trusted) to.flush(); } catch (Error & e) { - stopWork(false, e.msg()); + stopWork(false, e.msg(), GET_PROTOCOL_MINOR(clientVersion) >= 8 ? 1 : 0); to.flush(); return; } @@ -735,12 +731,10 @@ static void processConnection(bool trusted) during addTextToStore() / importPath(). If that happens, just send the error message and exit. */ bool errorAllowed = canSendStderr; - if (!errorAllowed) printMsg(lvlError, format("error processing client input: %1%") % e.msg()); stopWork(false, e.msg(), GET_PROTOCOL_MINOR(clientVersion) >= 8 ? e.status : 0); - if (!errorAllowed) break; + if (!errorAllowed) throw; } catch (std::bad_alloc & e) { - if (canSendStderr) - stopWork(false, "Nix daemon out of memory", GET_PROTOCOL_MINOR(clientVersion) >= 8 ? 1 : 0); + stopWork(false, "Nix daemon out of memory", GET_PROTOCOL_MINOR(clientVersion) >= 8 ? 1 : 0); throw; } @@ -749,7 +743,7 @@ static void processConnection(bool trusted) assert(!canSendStderr); }; - printMsg(lvlError, format("%1% operations") % opCount); + printMsg(lvlDebug, format("%1% operations") % opCount); } @@ -771,6 +765,27 @@ static void setSigChldAction(bool autoReap) } +bool matchUser(const string & user, const string & group, const Strings & users) +{ + if (find(users.begin(), users.end(), "*") != users.end()) + return true; + + if (find(users.begin(), users.end(), user) != users.end()) + return true; + + for (auto & i : users) + if (string(i, 0, 1) == "@") { + if (group == string(i, 1)) return true; + struct group * gr = getgrnam(i.c_str() + 1); + if (!gr) continue; + for (char * * mem = gr->gr_mem; *mem; mem++) + if (user == string(*mem)) return true; + } + + return false; +} + + #define SD_LISTEN_FDS_START 3 @@ -856,58 +871,61 @@ static void daemonLoop() closeOnExec(remote); - /* Get the identity of the caller, if possible. */ - uid_t clientUid = -1; - pid_t clientPid = -1; bool trusted = false; + pid_t clientPid = -1; #if defined(SO_PEERCRED) + /* Get the identity of the caller, if possible. */ ucred cred; socklen_t credLen = sizeof(cred); - if (getsockopt(remote, SOL_SOCKET, SO_PEERCRED, &cred, &credLen) != -1) { - clientPid = cred.pid; - clientUid = cred.uid; - if (clientUid == 0) trusted = true; - } -#endif + if (getsockopt(remote, SOL_SOCKET, SO_PEERCRED, &cred, &credLen) == -1) + throw SysError("getting peer credentials"); - printMsg(lvlInfo, format("accepted connection from pid %1%, uid %2%") % clientPid % clientUid); + clientPid = cred.pid; - /* Fork a child to handle the connection. */ - pid_t child; - child = fork(); + struct passwd * pw = getpwuid(cred.uid); + string user = pw ? pw->pw_name : int2String(cred.uid); - switch (child) { + struct group * gr = getgrgid(cred.gid); + string group = gr ? gr->gr_name : int2String(cred.gid); - case -1: - throw SysError("unable to fork"); + Strings trustedUsers = settings.get("trusted-users", Strings({"root"})); + Strings allowedUsers = settings.get("allowed-users", Strings({"*"})); - case 0: - try { /* child */ + if (matchUser(user, group, trustedUsers)) + trusted = true; - /* Background the daemon. */ - if (setsid() == -1) - throw SysError(format("creating a new session")); + if (!trusted && !matchUser(user, group, allowedUsers)) + throw Error(format("user `%1%' is not allowed to connect to the Nix daemon") % user); - /* Restore normal handling of SIGCHLD. */ - setSigChldAction(false); + printMsg(lvlInfo, format((string) "accepted connection from pid %1%, user %2%" + + (trusted ? " (trusted)" : "")) % clientPid % user); +#endif + + /* Fork a child to handle the connection. */ + startProcess([&]() { + fdSocket.close(); - /* For debugging, stuff the pid into argv[1]. */ - if (clientPid != -1 && argvSaved[1]) { - string processName = int2String(clientPid); - strncpy(argvSaved[1], processName.c_str(), strlen(argvSaved[1])); - } + /* Background the daemon. */ + if (setsid() == -1) + throw SysError(format("creating a new session")); - /* Handle the connection. */ - from.fd = remote; - to.fd = remote; - processConnection(trusted); + /* Restore normal handling of SIGCHLD. */ + setSigChldAction(false); - } catch (std::exception & e) { - writeToStderr("unexpected Nix daemon error: " + string(e.what()) + "\n"); + /* For debugging, stuff the pid into argv[1]. */ + if (clientPid != -1 && argvSaved[1]) { + string processName = int2String(clientPid); + strncpy(argvSaved[1], processName.c_str(), strlen(argvSaved[1])); } + + /* Handle the connection. */ + from.fd = remote; + to.fd = remote; + processConnection(trusted); + exit(0); - } + }, false, "unexpected Nix daemon error: ", true); } catch (Interrupted & e) { throw; diff --git a/nix/scripts/substitute-binary.in b/nix/scripts/substitute-binary.in deleted file mode 100644 index 48d7bb8ff1..0000000000 --- a/nix/scripts/substitute-binary.in +++ /dev/null @@ -1,11 +0,0 @@ -#!@SHELL@ -# A shorthand for "guix substitute-binary", for use by the daemon. - -if test "x$GUIX_UNINSTALLED" = "x" -then - prefix="@prefix@" - exec_prefix="@exec_prefix@" - exec "@bindir@/guix" substitute-binary "$@" -else - exec guix substitute-binary "$@" -fi diff --git a/nix/scripts/substitute.in b/nix/scripts/substitute.in new file mode 100644 index 0000000000..5a2eeb7259 --- /dev/null +++ b/nix/scripts/substitute.in @@ -0,0 +1,11 @@ +#!@SHELL@ +# A shorthand for "guix substitute", for use by the daemon. + +if test "x$GUIX_UNINSTALLED" = "x" +then + prefix="@prefix@" + exec_prefix="@exec_prefix@" + exec "@bindir@/guix" substitute "$@" +else + exec guix substitute "$@" +fi diff --git a/po/guix/LINGUAS b/po/guix/LINGUAS index 8052ce9d3e..b271fd3ad5 100644 --- a/po/guix/LINGUAS +++ b/po/guix/LINGUAS @@ -1,6 +1,7 @@ # Set of available languages. cs +da de en@boldquot en@quot diff --git a/po/guix/POTFILES.in b/po/guix/POTFILES.in index 619f6f99fc..30ce28b712 100644 --- a/po/guix/POTFILES.in +++ b/po/guix/POTFILES.in @@ -8,11 +8,13 @@ guix/scripts/download.scm guix/scripts/package.scm guix/scripts/gc.scm guix/scripts/hash.scm +guix/scripts/import.scm guix/scripts/pull.scm -guix/scripts/substitute-binary.scm +guix/scripts/substitute.scm guix/scripts/authenticate.scm guix/scripts/system.scm guix/scripts/lint.scm +guix/scripts/publish.scm guix/gnu-maintenance.scm guix/ui.scm guix/http-client.scm diff --git a/po/guix/da.po b/po/guix/da.po new file mode 100644 index 0000000000..2274ebff57 --- /dev/null +++ b/po/guix/da.po @@ -0,0 +1,1667 @@ +# Danish translation guix. +# Copyright (C) 2015 Free Software Foundation, Inc. +# This file is distributed under the same license as the guix package. +# Joe Hansen <joedalton2@yahoo.dk>, 2015. +# +# garbage -> affald (spild, bedre forslag?) +# +msgid "" +msgstr "" +"Project-Id-Version: guix 0.8.2\n" +"Report-Msgid-Bugs-To: ludo@gnu.org\n" +"POT-Creation-Date: 2015-05-10 14:02+0200\n" +"PO-Revision-Date: 2015-05-14 19:30+01:00\n" +"Last-Translator: Joe Hansen <joedalton2@yahoo.dk>\n" +"Language-Team: Danish <dansk@dansk-gruppen.dk>\n" +"Language: da\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: gnu/packages.scm:78 +#, scheme-format +msgid "~a: patch not found" +msgstr "~a: rettelse blev ikke fundet" + +#: gnu/packages.scm:89 +#, scheme-format +msgid "could not find bootstrap binary '~a' for system '~a'" +msgstr "kunne ikke finde bootstraps binære »~a« for system »~a«" + +#: gnu/packages.scm:141 +#, scheme-format +msgid "cannot access `~a': ~a~%" +msgstr "kan ikke tilgå »~a«: ~a~%" + +#: gnu/packages.scm:382 +#, scheme-format +msgid "looking for the latest release of GNU ~a..." +msgstr "kigger efter den seneste udgivelse af GNU ~a..." + +#: gnu/packages.scm:389 +#, scheme-format +msgid "~a: note: using ~a but ~a is available upstream~%" +msgstr "~a: bemærk: bruger ~a men ~a er tilgængelig opstrøm~%" + +#: gnu/packages.scm:411 guix/scripts/package.scm:350 +#, scheme-format +msgid "ambiguous package specification `~a'~%" +msgstr "tvetydig pakkespecifikation »~a«~%" + +#: gnu/packages.scm:412 guix/scripts/package.scm:352 +#, scheme-format +msgid "choosing ~a from ~a~%" +msgstr "vælger ~a fra ~a~%" + +#: gnu/packages.scm:418 +#, scheme-format +msgid "~A: package not found for version ~a~%" +msgstr "~A: pakke ikke fundet for version ~a~%" + +#: gnu/packages.scm:420 +#, scheme-format +msgid "~A: unknown package~%" +msgstr "~A: ukendt pakke~%" + +#: gnu/system.scm:811 +msgid "system locale lacks a definition" +msgstr "systemsprog mangler en definition" + +#: gnu/services/dmd.scm:51 +#, scheme-format +msgid "service '~a' provided more than once" +msgstr "tjeneste »~a« tilbudt mere end en gang" + +#: guix/scripts/build.scm:65 +#, scheme-format +msgid "failed to create GC root `~a': ~a~%" +msgstr "kunne ikke oprette GC-root »~a«: ~a~%" + +#: guix/scripts/build.scm:102 +msgid "" +"\n" +" -L, --load-path=DIR prepend DIR to the package module search path" +msgstr "" +"\n" +" -L, --load-path=MAPPE foranstil MAPPE til pakkemodulets søgesti" + +#: guix/scripts/build.scm:104 +msgid "" +"\n" +" -K, --keep-failed keep build tree of failed builds" +msgstr "" +"\n" +" -K, --keep-failed bevar byggetræ for mislykkede bygninger" + +#: guix/scripts/build.scm:106 +msgid "" +"\n" +" -n, --dry-run do not build the derivations" +msgstr "" +"\n" +" -n, --dry-run byg ikke derivationerne" + +#: guix/scripts/build.scm:108 +msgid "" +"\n" +" --fallback fall back to building when the substituter fails" +msgstr "" +"\n" +" --fallback fald tilbage til bygning når erstatningen fejler" + +#: guix/scripts/build.scm:110 +msgid "" +"\n" +" --no-substitutes build instead of resorting to pre-built substitutes" +msgstr "" +"\n" +" --no-substitutes byg i stedet for en ny sortering af præbyggede substitutter" + +#: guix/scripts/build.scm:112 +msgid "" +"\n" +" --no-build-hook do not attempt to offload builds via the build hook" +msgstr "" +"\n" +" --no-build-hook forsøg ikke at aflaste bygninger via byggekrogen" + +#: guix/scripts/build.scm:114 +msgid "" +"\n" +" --max-silent-time=SECONDS\n" +" mark the build as failed after SECONDS of silence" +msgstr "" +"\n" +" --max-silent-time=SEKUNDER\n" +" marker bygningen som mislykket efter SEKUNDER af stilhed" + +#: guix/scripts/build.scm:117 +msgid "" +"\n" +" --timeout=SECONDS mark the build as failed after SECONDS of activity" +msgstr "" +"\n" +" --timeout=SEKUNDER marker bygningen som mislykket efter SEKUNDER af aktivitet" + +#: guix/scripts/build.scm:119 +msgid "" +"\n" +" --verbosity=LEVEL use the given verbosity LEVEL" +msgstr "" +"\n" +" --verbosity=NIVEAU brug det angivne uddybnings-NIVEAU" + +#: guix/scripts/build.scm:121 +msgid "" +"\n" +" -c, --cores=N allow the use of up to N CPU cores for the build" +msgstr "" +"\n" +" -c, --cores=N tillad brugen af op til N CPU-kerner til bygningen" + +#: guix/scripts/build.scm:123 +msgid "" +"\n" +" -M, --max-jobs=N allow at most N build jobs" +msgstr "" +"\n" +" -M, --max-jobs=N tillad højest N-byggejob" + +#: guix/scripts/build.scm:198 guix/scripts/build.scm:205 +#, scheme-format +msgid "not a number: '~a' option argument: ~a~%" +msgstr "ikke et nummer: »~a« tilvalgsparameter: ~a~%" + +#: guix/scripts/build.scm:224 +msgid "" +"Usage: guix build [OPTION]... PACKAGE-OR-DERIVATION...\n" +"Build the given PACKAGE-OR-DERIVATION and return their output paths.\n" +msgstr "" +"Brug: guix build [TILVALG]... PAKKE-ELLER-AFLEDNING...\n" +"Byg den angivne PAKKE-ELLER-AFLEDNING og returner deres uddatastier.\n" + +#: guix/scripts/build.scm:226 +msgid "" +"\n" +" -e, --expression=EXPR build the package or derivation EXPR evaluates to" +msgstr "" +"\n" +" -e, --expression=UDTRYK\n" +" byg pakken eller derivationen UDTRYK evaluerer til" + +#: guix/scripts/build.scm:228 +msgid "" +"\n" +" -S, --source build the packages' source derivations" +msgstr "" +"\n" +" -S, --source byg pakkernes kildederivationer" + +#: guix/scripts/build.scm:230 +msgid "" +"\n" +" --sources[=TYPE] build source derivations; TYPE may optionally be one\n" +" of \"package\", \"all\" (default), or \"transitive\"" +msgstr "" +"\n" +" --sources[=TYPE] bygningskildeafledninger; TYPE kan valgfrit være\n" +" »package«, »all« (standard) eller »transitive«" + +#: guix/scripts/build.scm:233 +msgid "" +"\n" +" -s, --system=SYSTEM attempt to build for SYSTEM--e.g., \"i686-linux\"" +msgstr "" +"\n" +" -s, --system=SYSTEM forsøger at bygge for SYSTEM--f.eks., »i686-linux«" + +#: guix/scripts/build.scm:235 +msgid "" +"\n" +" --target=TRIPLET cross-build for TRIPLET--e.g., \"armel-linux-gnu\"" +msgstr "" +"\n" +" --target=TRIPLET krydsbyg for TRIPLET--f.eks., »armel-linux-gnu«" + +#: guix/scripts/build.scm:237 +msgid "" +"\n" +" --with-source=SOURCE\n" +" use SOURCE when building the corresponding package" +msgstr "" +"\n" +" --with-source=KILDE\n" +" brug KILDE når den tilsvarende pakke bygges" + +#: guix/scripts/build.scm:240 +msgid "" +"\n" +" --no-grafts do not graft packages" +msgstr "" +"\n" +" --no-grafts pod ikke pakker" + +#: guix/scripts/build.scm:242 +msgid "" +"\n" +" -d, --derivations return the derivation paths of the given packages" +msgstr "" +"\n" +" -d, --derivations returner de afledte stier for de givne pakker" + +#: guix/scripts/build.scm:244 +msgid "" +"\n" +" -r, --root=FILE make FILE a symlink to the result, and register it\n" +" as a garbage collector root" +msgstr "" +"\n" +" -r, --root=FIL gør FIL til en symbolsk henvisning for resultatet, og\n" +" registrer den som en affaldsindsamlerroot" + +#: guix/scripts/build.scm:247 +msgid "" +"\n" +" --log-file return the log file names for the given derivations" +msgstr "" +"\n" +" --log-file returner logfilnavnen for de givne afledninger" + +#: guix/scripts/build.scm:252 guix/scripts/download.scm:53 +#: guix/scripts/package.scm:464 guix/scripts/gc.scm:58 +#: guix/scripts/hash.scm:55 guix/scripts/import.scm:90 +#: guix/scripts/pull.scm:81 guix/scripts/substitute.scm:682 +#: guix/scripts/system.scm:400 guix/scripts/lint.scm:534 +#: guix/scripts/publish.scm:56 +msgid "" +"\n" +" -h, --help display this help and exit" +msgstr "" +"\n" +" -h, --help vis denne hjælpetekst og afslut" + +#: guix/scripts/build.scm:254 guix/scripts/download.scm:55 +#: guix/scripts/package.scm:466 guix/scripts/gc.scm:60 +#: guix/scripts/hash.scm:57 guix/scripts/import.scm:92 +#: guix/scripts/pull.scm:83 guix/scripts/substitute.scm:684 +#: guix/scripts/system.scm:402 guix/scripts/lint.scm:538 +#: guix/scripts/publish.scm:58 +msgid "" +"\n" +" -V, --version display version information and exit" +msgstr "" +"\n" +" -V, --version vis versioninformation og afslut" + +#: guix/scripts/build.scm:281 +#, scheme-format +msgid "" +"invalid argument: '~a' option argument: ~a, ~\n" +"must be one of 'package', 'all', or 'transitive'~%" +msgstr "" +"ugyldigt argument: »~a« tilvalgsargumentet: ~a, ~\n" +"skal være »package«, »all« eller »transitive«~%" + +#: guix/scripts/build.scm:404 +#, scheme-format +msgid "sources do not match any package:~{ ~a~}~%" +msgstr "kilder matcher ikke nogen pakke:~{ ~a~}~%" + +#: guix/scripts/build.scm:453 +#, scheme-format +msgid "no build log for '~a'~%" +msgstr "ingen byggelog for »~a«~%" + +#: guix/scripts/download.scm:44 +msgid "" +"Usage: guix download [OPTION] URL\n" +"Download the file at URL, add it to the store, and print its store path\n" +"and the hash of its contents.\n" +"\n" +"Supported formats: 'nix-base32' (default), 'base32', and 'base16'\n" +"('hex' and 'hexadecimal' can be used as well).\n" +msgstr "" +"Brug: guix download [TILVALG] ADRESSE\n" +"hent filen på ADRESSE, tilføj den til lageret, og udskriv dens lagersti\n" +"og hashen for dens indhold.\n" +"\n" +"Understøttede formater: »nix-base32« (standard), »base32«, og »base16«\n" +"(»hex« og »hexadecimal« kan også bruges).\n" + +#: guix/scripts/download.scm:50 guix/scripts/hash.scm:50 +msgid "" +"\n" +" -f, --format=FMT write the hash in the given format" +msgstr "" +"\n" +" -f, --format=FMT skriv hashen i det givne format" + +#: guix/scripts/download.scm:73 guix/scripts/hash.scm:75 +#, scheme-format +msgid "unsupported hash format: ~a~%" +msgstr "ikke understøttet hash-format: ~a~%" + +#: guix/scripts/download.scm:96 guix/scripts/gc.scm:122 +#: guix/scripts/pull.scm:217 guix/scripts/lint.scm:585 +#: guix/scripts/publish.scm:233 guix/ui.scm:829 +#, scheme-format +msgid "~A: unrecognized option~%" +msgstr "~A: ikke genkendt tilvalg~%" + +#: guix/scripts/download.scm:106 +#, scheme-format +msgid "~a: failed to parse URI~%" +msgstr "~a: kunne ikke fortolke URI~%" + +#: guix/scripts/download.scm:117 +#, scheme-format +msgid "~a: download failed~%" +msgstr "~a: overførsel mislykkede~%" + +#: guix/scripts/package.scm:108 +#, scheme-format +msgid "failed to build the empty profile~%" +msgstr "kunne ikke bygge den tomme profil~%" + +#: guix/scripts/package.scm:124 +#, scheme-format +msgid "switching from generation ~a to ~a~%" +msgstr "skifter fra generation ~a til ~a~%" + +#: guix/scripts/package.scm:143 +#, scheme-format +msgid "nothing to do: already at the empty profile~%" +msgstr "intet at udføre: allerede en tom profil~%" + +#: guix/scripts/package.scm:155 +#, scheme-format +msgid "deleting ~a~%" +msgstr "sletter ~a~%" + +#: guix/scripts/package.scm:268 +#, scheme-format +msgid "not removing generation ~a, which is current~%" +msgstr "fjerner ikke generation ~a, som er nuværende~%" + +#: guix/scripts/package.scm:275 +#, scheme-format +msgid "no matching generation~%" +msgstr "ingen matchende generation~%" + +#: guix/scripts/package.scm:278 guix/scripts/package.scm:917 +#, scheme-format +msgid "invalid syntax: ~a~%" +msgstr "ugyldig syntaks: ~a~%" + +#: guix/scripts/package.scm:340 +#, scheme-format +msgid "package `~a' lacks output `~a'~%" +msgstr "pakke »~a« mangler uddata »~a«~%" + +#: guix/scripts/package.scm:357 +#, scheme-format +msgid "~a: package not found~%" +msgstr "~a: pakken blev ikke fundet~%" + +#: guix/scripts/package.scm:401 +#, scheme-format +msgid "The following environment variable definitions may be needed:~%" +msgstr "De følgende miljøvariabeldefinitioner kan være krævet:~%" + +#: guix/scripts/package.scm:417 +msgid "" +"Usage: guix package [OPTION]... PACKAGES...\n" +"Install, remove, or upgrade PACKAGES in a single transaction.\n" +msgstr "" +"Brug: guix-pakke [TILVALG]... PAKKER...\n" +"Installer, fjern eller opgrader PAKKER i en enkel transaktion.\n" + +#: guix/scripts/package.scm:419 +msgid "" +"\n" +" -i, --install=PACKAGE install PACKAGE" +msgstr "" +"\n" +" -i, --install=PAKKE installer PAKKE" + +#: guix/scripts/package.scm:421 +msgid "" +"\n" +" -e, --install-from-expression=EXP\n" +" install the package EXP evaluates to" +msgstr "" +"\n" +" -e, --install-from-expression=UDTRYK\n" +" installer pakken UDTRYK evaluerer til" + +#: guix/scripts/package.scm:424 +msgid "" +"\n" +" -r, --remove=PACKAGE remove PACKAGE" +msgstr "" +"\n" +" -r, --remove=PAKKE fjern PAKKE" + +#: guix/scripts/package.scm:426 +msgid "" +"\n" +" -u, --upgrade[=REGEXP] upgrade all the installed packages matching REGEXP" +msgstr "" +"\n" +" -u, --upgrade[=REGUDTRYK]\n" +" opgrader alle de installerede pakker der matcher\n" +" REGUDTRYK" + +#: guix/scripts/package.scm:428 +msgid "" +"\n" +" --do-not-upgrade[=REGEXP] do not upgrade any packages matching REGEXP" +msgstr "" +"\n" +" --do-not--upgrade[=REGUDTRYK] opgrader ikke pakker der matcher REGUDTRYK" + +#: guix/scripts/package.scm:430 +msgid "" +"\n" +" --roll-back roll back to the previous generation" +msgstr "" +"\n" +" --roll-back rul tilbage til den forrige generation" + +#: guix/scripts/package.scm:432 +msgid "" +"\n" +" --search-paths display needed environment variable definitions" +msgstr "" +"\n" +" --search-paths vis krævede miljøvariabeldefinitioner" + +#: guix/scripts/package.scm:434 +msgid "" +"\n" +" -l, --list-generations[=PATTERN]\n" +" list generations matching PATTERN" +msgstr "" +"\n" +" -l, --list-generations[=MØNSTER]\n" +" vis generationer der matcher MØNSTER" + +#: guix/scripts/package.scm:437 +msgid "" +"\n" +" -d, --delete-generations[=PATTERN]\n" +" delete generations matching PATTERN" +msgstr "" +"\n" +" -d, --delete-generations[=MØNSTER]\n" +" slet generationer der matcher MØNSTER" + +#: guix/scripts/package.scm:440 +msgid "" +"\n" +" -S, --switch-generation=PATTERN\n" +" switch to a generation matching PATTERN" +msgstr "" +"\n" +" -S, --switch-generation=MØNSTER\n" +" skift til et generationsmatchende MØNSTER" + +#: guix/scripts/package.scm:443 +msgid "" +"\n" +" -p, --profile=PROFILE use PROFILE instead of the user's default profile" +msgstr "" +"\n" +" -p, --profile=PROFIL brug PROFIL i stedet for brugerens standardprofil" + +#: guix/scripts/package.scm:446 +msgid "" +"\n" +" --bootstrap use the bootstrap Guile to build the profile" +msgstr "" +"\n" +" --bootstrap brug bootstrap Guile til at bygge profilen" + +#: guix/scripts/package.scm:448 guix/scripts/pull.scm:74 +msgid "" +"\n" +" --verbose produce verbose output" +msgstr "" +"\n" +" --verbose lav uddybende uddata" + +#: guix/scripts/package.scm:451 +msgid "" +"\n" +" -s, --search=REGEXP search in synopsis and description using REGEXP" +msgstr "" +"\n" +" -s, --search=REGUDTRYK søg i synopsis og beskrivelse via REGUDTRYK" + +#: guix/scripts/package.scm:453 +msgid "" +"\n" +" -I, --list-installed[=REGEXP]\n" +" list installed packages matching REGEXP" +msgstr "" +"\n" +" -I, --list-installed[=REGUDTRYK]\n" +" vis installerede pakker der matcher REGUDTRYK" + +#: guix/scripts/package.scm:456 +msgid "" +"\n" +" -A, --list-available[=REGEXP]\n" +" list available packages matching REGEXP" +msgstr "" +"\n" +" -A, --list-available[=REGUDTRYK]\n" +" vis tilgængelige pakker der matcher REGUDTRYK" + +#: guix/scripts/package.scm:459 +msgid "" +"\n" +" --show=PACKAGE show details about PACKAGE" +msgstr "" +"\n" +" --show=PACKAGE vis detaljer om PAKKE" + +#: guix/scripts/package.scm:730 +#, scheme-format +msgid "~A: extraneous argument~%" +msgstr "~A: uvedkommende argument~%" + +#: guix/scripts/package.scm:738 +#, scheme-format +msgid "Try \"info '(guix) Invoking guix package'\" for more information.~%" +msgstr "Prøv »info '(guix) Invoking guix package« for yderligere information.~%" + +#: guix/scripts/package.scm:760 +#, scheme-format +msgid "error: while creating directory `~a': ~a~%" +msgstr "fejl: under oprettelse af mappe »~a«: ~a~%" + +#: guix/scripts/package.scm:764 +#, scheme-format +msgid "Please create the `~a' directory, with you as the owner.~%" +msgstr "Opret venligst mappen »~a«, med dig som ejer.~%" + +#: guix/scripts/package.scm:771 +#, scheme-format +msgid "error: directory `~a' is not owned by you~%" +msgstr "fejl: mappen »~a« er ikke ejet af dig~%" + +#: guix/scripts/package.scm:774 +#, scheme-format +msgid "Please change the owner of `~a' to user ~s.~%" +msgstr "Ændr venligst ejeren af »~a« til brugeren ~s.~%" + +#: guix/scripts/package.scm:804 +#, scheme-format +msgid "cannot switch to generation '~a'~%" +msgstr "kan ikke skifte til generation »~a«~%" + +#: guix/scripts/package.scm:852 +#, scheme-format +msgid "nothing to be done~%" +msgstr "intet at udføre~%" + +#: guix/scripts/package.scm:868 +#, scheme-format +msgid "~a package in profile~%" +msgid_plural "~a packages in profile~%" +msgstr[0] "~a pakke i profil~%" +msgstr[1] "~a pakker i profil~%" + +#: guix/scripts/package.scm:883 +#, scheme-format +msgid "Generation ~a\t~a" +msgstr "Generation ~a\t~a" + +#: guix/scripts/package.scm:890 +#, scheme-format +msgid "~a\t(current)~%" +msgstr "~a\t(nuværende)~%" + +#: guix/scripts/gc.scm:39 +msgid "" +"Usage: guix gc [OPTION]... PATHS...\n" +"Invoke the garbage collector.\n" +msgstr "" +"Brug: guix gc [TILVALG]... STIER...\n" +"Start affaldsindsamleren.\n" + +#: guix/scripts/gc.scm:41 +msgid "" +"\n" +" -C, --collect-garbage[=MIN]\n" +" collect at least MIN bytes of garbage" +msgstr "" +"\n" +" -C, --collect-garbage[=MIN]\n" +" saml mindst MIN byte affald" + +#: guix/scripts/gc.scm:44 +msgid "" +"\n" +" -d, --delete attempt to delete PATHS" +msgstr "" +"\n" +" -d, --delete forsøg at slette STIER" + +#: guix/scripts/gc.scm:46 +msgid "" +"\n" +" --list-dead list dead paths" +msgstr "" +"\n" +" --list-dead vis døde stier" + +#: guix/scripts/gc.scm:48 +msgid "" +"\n" +" --list-live list live paths" +msgstr "" +"\n" +" --list-live vis live stier" + +#: guix/scripts/gc.scm:51 +msgid "" +"\n" +" --references list the references of PATHS" +msgstr "" +"\n" +" --references vis referencerne for STIER" + +#: guix/scripts/gc.scm:53 +msgid "" +"\n" +" -R, --requisites list the requisites of PATHS" +msgstr "" +"\n" +" -R, --requisites vis rekvisitter for STIER" + +#: guix/scripts/gc.scm:55 +msgid "" +"\n" +" --referrers list the referrers of PATHS" +msgstr "" +"\n" +" --referrers vis henvisninger for STIER" + +#: guix/scripts/gc.scm:84 +#, scheme-format +msgid "invalid amount of storage: ~a~%" +msgstr "ugyldig lagermængde: ~a~%" + +#: guix/scripts/hash.scm:45 +msgid "" +"Usage: guix hash [OPTION] FILE\n" +"Return the cryptographic hash of FILE.\n" +"\n" +"Supported formats: 'nix-base32' (default), 'base32', and 'base16' ('hex'\n" +"and 'hexadecimal' can be used as well).\n" +msgstr "" +"Brug: guix hash [TILVALG] FIL\n" +"Returner den kryptografiske hash for FIL.\n" +"\n" +"Understøttede formater: »nix-base32« (standard), »base32« og »base16« (»hex«\n" +"og »hexadecimal« kan også bruges).\n" + +#: guix/scripts/hash.scm:52 +msgid "" +"\n" +" -r, --recursive compute the hash on FILE recursively" +msgstr "" +"\n" +" -r, --recursive beregn hashen på FIL rekursivt" + +#: guix/scripts/hash.scm:103 +#, scheme-format +msgid "unrecognized option: ~a~%" +msgstr "tilvalg blev ikke genkendt: ~a~%" + +#: guix/scripts/hash.scm:134 guix/ui.scm:318 +#, scheme-format +msgid "~a~%" +msgstr "~a~%" + +#: guix/scripts/hash.scm:137 +#, scheme-format +msgid "wrong number of arguments~%" +msgstr "forkert antal argumenter~%" + +#: guix/scripts/import.scm:85 +msgid "" +"Usage: guix import IMPORTER ARGS ...\n" +"Run IMPORTER with ARGS.\n" +msgstr "" +"Brug: guix import IMPORTER ARG ...\n" +"Kør IMPORTER med ARG.\n" + +#: guix/scripts/import.scm:88 +msgid "IMPORTER must be one of the importers listed below:\n" +msgstr "IMPORTER skal være en af importørerne vist nedenfor:\n" + +#: guix/scripts/import.scm:101 +#, scheme-format +msgid "guix import: missing importer name~%" +msgstr "guix import: mangler importørnavn~%" + +#: guix/scripts/import.scm:112 +#, scheme-format +msgid "guix import: invalid importer~%" +msgstr "guix import: ugyldig importør~%" + +#: guix/scripts/pull.scm:72 +msgid "" +"Usage: guix pull [OPTION]...\n" +"Download and deploy the latest version of Guix.\n" +msgstr "" +"Brug: guix pull [TILVALG]...\n" +"Hent og udrul den seneste version af Guix.\n" + +#: guix/scripts/pull.scm:76 +msgid "" +"\n" +" --url=URL download the Guix tarball from URL" +msgstr "" +"\n" +" --url=URL hent Guix-tarball'en fra ADRESSE" + +#: guix/scripts/pull.scm:78 +msgid "" +"\n" +" --bootstrap use the bootstrap Guile to build the new Guix" +msgstr "" +"\n" +" --bootstrap brug bootstrap Guile til at bygge den nye Guix" + +#: guix/scripts/pull.scm:132 +msgid "tarball did not produce a single source directory" +msgstr "tarball fremstillede ikke en enkel kildemappe" + +#: guix/scripts/pull.scm:150 +#, scheme-format +msgid "unpacking '~a'...~%" +msgstr "udpakker »~a«...~%" + +#: guix/scripts/pull.scm:159 +msgid "failed to unpack source code" +msgstr "kunne ikke udpakke kildekode" + +#: guix/scripts/pull.scm:202 +msgid "Guix already up to date\n" +msgstr "Guix er allerede opdateret\n" + +#: guix/scripts/pull.scm:207 +#, scheme-format +msgid "updated ~a successfully deployed under `~a'~%" +msgstr "opdaterede ~a der med succes blev udrullet undet »~a«~%" + +#: guix/scripts/pull.scm:210 +#, scheme-format +msgid "failed to update Guix, check the build log~%" +msgstr "kunne ikke opdatere Guix, kontroller byggeloggen~%" + +#: guix/scripts/pull.scm:219 +#, scheme-format +msgid "~A: unexpected argument~%" +msgstr "~A: uventet argument~%" + +#: guix/scripts/pull.scm:228 +msgid "failed to download up-to-date source, exiting\n" +msgstr "kunne ikke hente opdateret kilde, afslutter\n" + +#: guix/scripts/substitute.scm:81 +#, scheme-format +msgid "authentication and authorization of substitutes disabled!~%" +msgstr "godkendelse og autorisation af substitutter er deaktiveret!~%" + +#: guix/scripts/substitute.scm:157 +#, scheme-format +msgid "download from '~a' failed: ~a, ~s~%" +msgstr "hent fra »~a« mislykkedes: ~a, ~s~%" + +#: guix/scripts/substitute.scm:169 +#, scheme-format +msgid "while fetching ~a: server is somewhat slow~%" +msgstr "under overførsel af ~a: server er noget langsom~%" + +#: guix/scripts/substitute.scm:171 +#, scheme-format +msgid "try `--no-substitutes' if the problem persists~%" +msgstr "prøv »--no-substitutes« hvis problemet fortsætter~%" + +#: guix/scripts/substitute.scm:214 +#, scheme-format +msgid "updating list of substitutes from '~a'...\r" +msgstr "opdaterer liste af substitutter fra »~a«...\r" + +#: guix/scripts/substitute.scm:246 +#, scheme-format +msgid "signature version must be a number: ~s~%" +msgstr "signaturversion skal være et nummer: ~s~%" + +#: guix/scripts/substitute.scm:250 +#, scheme-format +msgid "unsupported signature version: ~a~%" +msgstr "signaturversion er ikke understøttet: ~a~%" + +#: guix/scripts/substitute.scm:258 +#, scheme-format +msgid "signature is not a valid s-expression: ~s~%" +msgstr "signatur er ikke et gyldigt s-udtryk: ~s~%" + +#: guix/scripts/substitute.scm:262 +#, scheme-format +msgid "invalid format of the signature field: ~a~%" +msgstr "ugyldigt format for signaturfeltet: ~a~%" + +#: guix/scripts/substitute.scm:297 +#, scheme-format +msgid "invalid signature for '~a'~%" +msgstr "ugyldig signatur for »~a«~%" + +#: guix/scripts/substitute.scm:299 +#, scheme-format +msgid "hash mismatch for '~a'~%" +msgstr "hash mismatch for »~a«~%" + +#: guix/scripts/substitute.scm:301 +#, scheme-format +msgid "'~a' is signed with an unauthorized key~%" +msgstr "»~a« er underskrevet med en uautoriseret nøgle~%" + +#: guix/scripts/substitute.scm:303 +#, scheme-format +msgid "signature on '~a' is corrupt~%" +msgstr "signatur på »~a« er ødelagt~%" + +#: guix/scripts/substitute.scm:341 +#, scheme-format +msgid "substitute at '~a' lacks a signature~%" +msgstr "substitut på »~a« mangler en signatur~%" + +#: guix/scripts/substitute.scm:504 +#, scheme-format +msgid "updating list of substitutes from '~a'... ~5,1f%" +msgstr "opdaterer liste af substitutter fra »~a«... ~5,1f%" + +#: guix/scripts/substitute.scm:552 +#, scheme-format +msgid "~s: unsupported server URI scheme~%" +msgstr "~s: ikke understøttet server-URI-skema~%" + +#: guix/scripts/substitute.scm:663 +#, scheme-format +msgid "host name lookup error: ~a~%" +msgstr "opslagsfejl for værtsnavn: ~a~%" + +#: guix/scripts/substitute.scm:672 +msgid "" +"Usage: guix substitute [OPTION]...\n" +"Internal tool to substitute a pre-built binary to a local build.\n" +msgstr "" +"Brug: guix substitute [TILVALG] ...\n" +"Internt værktøj til at erstatte en præbygget binær fil med en lokal bygning.\n" + +#: guix/scripts/substitute.scm:674 +msgid "" +"\n" +" --query report on the availability of substitutes for the\n" +" store file names passed on the standard input" +msgstr "" +"\n" +" --query rapport om tilgængeligheden for substitutter for\n" +" lagerfilnavnene sendt til standardind" + +#: guix/scripts/substitute.scm:677 +msgid "" +"\n" +" --substitute STORE-FILE DESTINATION\n" +" download STORE-FILE and store it as a Nar in file\n" +" DESTINATION" +msgstr "" +"\n" +" --substitute LAGER-FIL DESTINATION\n" +" hent LAGER-FIL og lagr den som en Nar i filen\n" +" DESTINATION" + +#: guix/scripts/substitute.scm:712 +msgid "ACL for archive imports seems to be uninitialized, substitutes may be unavailable\n" +msgstr "ACL for arkivimporter ser ikke ud til at være initialiseret, substitutter kan være utilgængelige\n" + +#: guix/scripts/substitute.scm:750 +#, scheme-format +msgid "these substitute URLs will not be used:~{ ~a~}~%" +msgstr "disse substitutadresser vil ikke blive brugt:~{ ~a~}~%" + +#: guix/scripts/substitute.scm:776 +#, scheme-format +msgid "failed to look up host '~a' (~a), substituter disabled~%" +msgstr "kunne ikke slå vært op »~a« (~a), substitutter deaktiveret~%" + +#: guix/scripts/substitute.scm:883 +#, scheme-format +msgid "~a: unrecognized options~%" +msgstr "~a: ikke genkendte tilvalg~%" + +#: guix/scripts/authenticate.scm:58 +#, scheme-format +msgid "cannot find public key for secret key '~a'~%" +msgstr "kan ikke finde offentlig nøgle for hemmelig nøgle »~a«~%" + +#: guix/scripts/authenticate.scm:78 +#, scheme-format +msgid "error: invalid signature: ~a~%" +msgstr "fejl: ugyldig signatur: ~a~%" + +#: guix/scripts/authenticate.scm:80 +#, scheme-format +msgid "error: unauthorized public key: ~a~%" +msgstr "fejl: ikke autoriseret offentlig nøgle: ~a~%" + +#: guix/scripts/authenticate.scm:82 +#, scheme-format +msgid "error: corrupt signature data: ~a~%" +msgstr "fejl: ødelagt signaturdata: ~a~%" + +#: guix/scripts/authenticate.scm:120 +msgid "" +"Usage: guix authenticate OPTION...\n" +"Sign or verify the signature on the given file. This tool is meant to\n" +"be used internally by 'guix-daemon'.\n" +msgstr "" +"Brug: guix authenticate TILVALG...\n" +"Underskriv eller verificer signaturen på den givne fil. Dette værktøj skal\n" +"bruges internt af »guix-daemon«.\n" + +#: guix/scripts/authenticate.scm:126 +msgid "wrong arguments" +msgstr "forkerte argumenter" + +#: guix/scripts/system.scm:106 +#, scheme-format +msgid "failed to register '~a' under '~a'~%" +msgstr "kunne ikke registrere »~a« under »~a«~%" + +#: guix/scripts/system.scm:138 +#, scheme-format +msgid "failed to install GRUB on device '~a'~%" +msgstr "kunne ikke installere GRUB på enhed »~a«~%" + +#: guix/scripts/system.scm:155 +#, scheme-format +msgid "initializing the current root file system~%" +msgstr "initialiserer det nuværende root-filsystem~%" + +#: guix/scripts/system.scm:209 +#, scheme-format +msgid "activating system...~%" +msgstr "aktiverer system ...~%" + +#: guix/scripts/system.scm:259 +#, scheme-format +msgid "unrecognized boot parameters for '~a'~%" +msgstr "ikke genkendte opstartsparametre for »~a«~%" + +#: guix/scripts/system.scm:355 +#, scheme-format +msgid "initializing operating system under '~a'...~%" +msgstr "initialiserer operativsystem under »~a«...~%" + +#: guix/scripts/system.scm:371 +msgid "" +"Usage: guix system [OPTION] ACTION FILE\n" +"Build the operating system declared in FILE according to ACTION.\n" +msgstr "" +"Brug: guix system [TILVALG] HANDLING FIL\n" +"Byg operativsystemet deklæret i FIL jævnfør HANDLING.\n" + +#: guix/scripts/system.scm:374 +msgid "The valid values for ACTION are:\n" +msgstr "De gyldige værdier for HANDLING er:\n" + +#: guix/scripts/system.scm:375 +msgid " - 'reconfigure', switch to a new operating system configuration\n" +msgstr " - »reconfigure«, skift til en ny operativsystemkonfiguration\n" + +#: guix/scripts/system.scm:377 +msgid " - 'build', build the operating system without installing anything\n" +msgstr " - »build«, byg operativsystemet uden at installere noget\n" + +#: guix/scripts/system.scm:379 +msgid " - 'vm', build a virtual machine image that shares the host's store\n" +msgstr " - »vm«, byg et virtuelt maskinaftryk som deler værtens lager\n" + +#: guix/scripts/system.scm:381 +msgid " - 'vm-image', build a freestanding virtual machine image\n" +msgstr " - »vm-image«, byg et fritstående virtuelt maskinaftryk\n" + +#: guix/scripts/system.scm:383 +msgid " - 'disk-image', build a disk image, suitable for a USB stick\n" +msgstr " - »disk-image«, byg et diskaftryk, egnet for et USB-drev\n" + +#: guix/scripts/system.scm:385 +msgid " - 'init', initialize a root file system to run GNU.\n" +msgstr " - »init«, initialiser et rootfilsystem til at køre GNU.\n" + +#: guix/scripts/system.scm:389 +msgid "" +"\n" +" --image-size=SIZE for 'vm-image', produce an image of SIZE" +msgstr "" +"\n" +" --image-size=STR for »vm-image«, lav et aftryk af STR" + +#: guix/scripts/system.scm:391 +msgid "" +"\n" +" --no-grub for 'init', do not install GRUB" +msgstr "" +"\n" +" --no-grub for »init«, installer ikke GRUB" + +#: guix/scripts/system.scm:393 +msgid "" +"\n" +" --share=SPEC for 'vm', share host file system according to SPEC" +msgstr "" +"\n" +" --share=SPEC for »vm«, del værtsfilsystem jævnfør SPEC" + +#: guix/scripts/system.scm:395 +msgid "" +"\n" +" --expose=SPEC for 'vm', expose host file system according to SPEC" +msgstr "" +"\n" +" --expose=SPEC for »vm«, fremvis værtsfilsystem jævnfør SPEC" + +#: guix/scripts/system.scm:397 +msgid "" +"\n" +" --full-boot for 'vm', make a full boot sequence" +msgstr "" +"\n" +" --full-boot for »vm«, lav en fuld opstartssekvens" + +#: guix/scripts/system.scm:484 +#, scheme-format +msgid "~a: unknown action~%" +msgstr "~a: ukendt handling~%" + +#: guix/scripts/system.scm:499 +#, scheme-format +msgid "wrong number of arguments for action '~a'~%" +msgstr "forkert antal argumenter for handling »~a«~%" + +#: guix/scripts/system.scm:522 +#, scheme-format +msgid "no configuration file specified~%" +msgstr "ingen konfigurationsfil angivet~%" + +#: guix/scripts/lint.scm:90 +#, scheme-format +msgid "Available checkers:~%" +msgstr "Tilgængelige kontrolprogrammer:~%" + +#: guix/scripts/lint.scm:110 +msgid "description should not be empty" +msgstr "beskrivelse skal være udfyldt" + +#: guix/scripts/lint.scm:117 +msgid "description should start with an upper-case letter or digit" +msgstr "beskrivelse skal starte med et stort bogstav eller et tal" + +# arg, hvad foregår der her +#: guix/scripts/lint.scm:133 +#, scheme-format +msgid "" +"sentences in description should be followed ~\n" +"by two spaces; possible infraction~p at ~{~a~^, ~}" +msgstr "" +"sætninger i beskrivelsen skal efterfølges ~\n" +"af to mellemrum; mulig infraction~p ved ~{~a~^, ~}" + +#: guix/scripts/lint.scm:154 +msgid "pkg-config should probably be a native input" +msgstr "pkg-config skal sandsynligvis være standarddata" + +#: guix/scripts/lint.scm:169 +msgid "synopsis should not be empty" +msgstr "synopsis skal være udfyldt" + +#: guix/scripts/lint.scm:177 +msgid "no period allowed at the end of the synopsis" +msgstr "ingen periode er tilladt i slutningen af synopsen" + +#: guix/scripts/lint.scm:189 +msgid "no article allowed at the beginning of the synopsis" +msgstr "ingen artikel er tilladt i begyndelsen af synopsen" + +#: guix/scripts/lint.scm:196 +msgid "synopsis should be less than 80 characters long" +msgstr "synopsis skal være mindre end 80 tegn lang" + +#: guix/scripts/lint.scm:202 +msgid "synopsis should start with an upper-case letter or digit" +msgstr "synopsis skal starte med et stort bogstav eller et tal" + +#: guix/scripts/lint.scm:209 +msgid "synopsis should not start with the package name" +msgstr "synopsis skal ikke starte med pakkenavnet" + +#: guix/scripts/lint.scm:299 guix/scripts/lint.scm:310 +#, scheme-format +msgid "URI ~a not reachable: ~a (~s)" +msgstr "URI ~a kan ikke nås: ~a (~s)" + +#: guix/scripts/lint.scm:316 +#, scheme-format +msgid "URI ~a domain not found: ~a" +msgstr "URI ~a domæne blev ikke fundet: ~a" + +#: guix/scripts/lint.scm:324 +#, scheme-format +msgid "URI ~a unreachable: ~a" +msgstr "URI ~a kan ikke nås: ~a" + +#: guix/scripts/lint.scm:350 +msgid "invalid value for home page" +msgstr "ugyldig værdi for hjemmeside" + +#: guix/scripts/lint.scm:353 +#, scheme-format +msgid "invalid home page URL: ~s" +msgstr "ugyldig hjemmesideadresse: ~s" + +#: guix/scripts/lint.scm:378 +msgid "file names of patches should start with the package name" +msgstr "filnavn for rettelser skal starte med pakkenavnet" + +#: guix/scripts/lint.scm:416 +#, scheme-format +msgid "~a: ~a: proposed synopsis: ~s~%" +msgstr "~a: ~a: foreslået synopsis: ~s~%" + +#: guix/scripts/lint.scm:428 +#, scheme-format +msgid "~a: ~a: proposed description:~% \"~a\"~%" +msgstr "~a: ~a: foreslået beskrivelse:~% »~a«~%" + +#: guix/scripts/lint.scm:453 guix/scripts/lint.scm:457 +#, scheme-format +msgid "failed to create derivation: ~a" +msgstr "kunne ikke oprette afledning: ~a" + +#: guix/scripts/lint.scm:463 +#, scheme-format +msgid "failed to create derivation: ~s~%" +msgstr "kunne ikke oprette afledning: ~s~%" + +#: guix/scripts/lint.scm:476 +msgid "Validate package descriptions" +msgstr "Valider pakkebeskrivelser" + +#: guix/scripts/lint.scm:480 +msgid "Validate synopsis & description of GNU packages" +msgstr "Valider synopsis og beskrivelse for GNU-pakker" + +#: guix/scripts/lint.scm:484 +msgid "Identify inputs that should be native inputs" +msgstr "Identificer inddata som skal være standarddata" + +#: guix/scripts/lint.scm:488 +msgid "Validate file names and availability of patches" +msgstr "Valider filnavne og tilgængelighed for rettelser" + +#: guix/scripts/lint.scm:492 +msgid "Validate home-page URLs" +msgstr "Valider hjemmesiders adresser" + +#: guix/scripts/lint.scm:496 +msgid "Validate source URLs" +msgstr "Valider kildeadresser" + +#: guix/scripts/lint.scm:500 +msgid "Report failure to compile a package to a derivation" +msgstr "Rapporter mislykket kompilering af en pakke til en afledning" + +#: guix/scripts/lint.scm:504 +msgid "Validate package synopses" +msgstr "Valider pakkesynopser" + +#: guix/scripts/lint.scm:529 +msgid "" +"Usage: guix lint [OPTION]... [PACKAGE]...\n" +"Run a set of checkers on the specified package; if none is specified, run the checkers on all packages.\n" +msgstr "" +"Brug: guix lint [TILVALG]... [PAKKE]...\n" +"Kør et sæt af kontroller på den specificerede pakke; hvis ingen er specificeret, så kør kontrollerne på alle pakker.\n" + +#: guix/scripts/lint.scm:531 +msgid "" +"\n" +" -c, --checkers=CHECKER1,CHECKER2...\n" +" only run the specificed checkers" +msgstr "" +"\n" +" -c, --checkers=KONTROL1,KONTROL2...\n" +" kør kun de specificerede kontroller" + +#: guix/scripts/lint.scm:536 +msgid "" +"\n" +" -l, --list-checkers display the list of available lint checkers" +msgstr "" +"\n" +" -l, --list-checkers vis listen med tilgængelige lint-kontroller" + +#: guix/scripts/lint.scm:556 +#, scheme-format +msgid "~a: invalid checker~%" +msgstr "~a: ugyldig kontrol~%" + +#: guix/scripts/publish.scm:49 +#, scheme-format +msgid "" +"Usage: guix publish [OPTION]...\n" +"Publish ~a over HTTP.\n" +msgstr "" +"Brug: guix publish [TILVALG] ...\n" +"Udgiv ~a over HTTP.\n" + +#: guix/scripts/publish.scm:51 +msgid "" +"\n" +" -p, --port=PORT listen on PORT" +msgstr "" +"\n" +" -p, --port=PORT lyt på PORT" + +#: guix/scripts/publish.scm:53 +msgid "" +"\n" +" -r, --repl[=PORT] spawn REPL server on PORT" +msgstr "" +"\n" +" -r, --repl[=PORT] udsend REPL-server on PORT" + +#: guix/scripts/publish.scm:235 +#, scheme-format +msgid "~A: extraneuous argument~%" +msgstr "~A: uvedkommende argument~%" + +#: guix/scripts/publish.scm:239 +#, scheme-format +msgid "publishing ~a on port ~d~%" +msgstr "udgiver ~a på port ~d~%" + +#: guix/gnu-maintenance.scm:447 +#, scheme-format +msgid "signature verification failed for `~a'~%" +msgstr "signaturverifikation mislykkedes for »~a«~%" + +#: guix/gnu-maintenance.scm:449 +#, scheme-format +msgid "(could be because the public key is not in your keyring)~%" +msgstr "(kunne være fordi den offentlige nøgle ikke er i din nøglering)~%" + +#: guix/gnu-maintenance.scm:524 +#, scheme-format +msgid "~a: could not locate source file" +msgstr "~a: kunne ikke lokalisere kildefil" + +#: guix/gnu-maintenance.scm:529 +#, scheme-format +msgid "~a: ~a: no `version' field in source; skipping~%" +msgstr "~a: ~a: intet »versionsfelt« i kilde; udelader~%" + +#: guix/ui.scm:142 guix/ui.scm:159 +#, scheme-format +msgid "failed to load '~a': ~a~%" +msgstr "kunne ikke indlæse »~a«: ~a~%" + +#: guix/ui.scm:145 +#, scheme-format +msgid "~a: error: ~a~%" +msgstr "~a: fejl: ~a~%" + +#: guix/ui.scm:149 guix/ui.scm:165 +#, scheme-format +msgid "failed to load '~a':~%" +msgstr "kunne ikke indlæse »~a«:~%" + +#: guix/ui.scm:162 +#, scheme-format +msgid "~a: warning: ~a~%" +msgstr "~a: advarsel: ~a~%" + +#: guix/ui.scm:174 +#, scheme-format +msgid "failed to install locale: ~a~%" +msgstr "kunne ikke installere sprog: ~a~%" + +#: guix/ui.scm:193 +msgid "" +"Copyright (C) 2015 the Guix authors\n" +"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +msgstr "" +"Ophavsret 2015 Guix-forfatterne\n" +"Licens GPLv3+: GNU GPL version 3 eller senere <http://gnu.org/licenses/gpl.html>\n" +"Dette er et frit program; du kan frit ændre og videredistribuere programmet.\n" +"Der er INGEN GARANTI, inden for lovens rammer.\n" + +#: guix/ui.scm:201 +#, scheme-format +msgid "" +"\n" +"Report bugs to: ~a." +msgstr "" +"\n" +"Rapporter fejl til: ~a." + +#: guix/ui.scm:203 +#, scheme-format +msgid "" +"\n" +"~a home page: <~a>" +msgstr "" +"\n" +"~a hjemmeside: <~a>" + +#: guix/ui.scm:205 +msgid "" +"\n" +"General help using GNU software: <http://www.gnu.org/gethelp/>" +msgstr "" +"\n" +"Generel hjælp til brugen af GNU-programmer: <http://www.gnu.org/gethelp/>" + +#: guix/ui.scm:227 +#, scheme-format +msgid "~a: invalid number~%" +msgstr "~a: ugyldigt nummer~%" + +#: guix/ui.scm:244 +#, scheme-format +msgid "invalid number: ~a~%" +msgstr "ugyldigt nummer: ~a~%" + +#: guix/ui.scm:267 +#, scheme-format +msgid "unknown unit: ~a~%" +msgstr "ukendt enhed: ~a~%" + +#: guix/ui.scm:278 +#, scheme-format +msgid "~a:~a:~a: package `~a' has an invalid input: ~s~%" +msgstr "~a:~a:~a: pakken »~a« har ugyldige inddata: ~s~%" + +#: guix/ui.scm:285 +#, scheme-format +msgid "~a: ~a: build system `~a' does not support cross builds~%" +msgstr "~a: ~a: byggesystem »~a« understøtter ikke krydsbygninger~%" + +#: guix/ui.scm:290 +#, scheme-format +msgid "profile '~a' does not exist~%" +msgstr "profilen »~a« findes ikke~%" + +#: guix/ui.scm:293 +#, scheme-format +msgid "generation ~a of profile '~a' does not exist~%" +msgstr "oprettelse ~a af profilen »~a« findes ikke~%" + +#: guix/ui.scm:300 +#, scheme-format +msgid "corrupt input while restoring '~a' from ~s~%" +msgstr "ødelagte inddata under gendannelse af »~a« fra ~s~%" + +#: guix/ui.scm:302 +#, scheme-format +msgid "corrupt input while restoring archive from ~s~%" +msgstr "ødelagte inddata under gendannelse af arkiv fra ~s~%" + +#: guix/ui.scm:305 +#, scheme-format +msgid "failed to connect to `~a': ~a~%" +msgstr "kunne ikke forbinde til »~a«: ~a~%" + +#: guix/ui.scm:310 +#, scheme-format +msgid "build failed: ~a~%" +msgstr "bygning mislykkedes: ~a~%" + +#: guix/ui.scm:313 +#, scheme-format +msgid "reference to invalid output '~a' of derivation '~a'~%" +msgstr "reference til ugyldige uddata »~a« for afledning »~a«~%" + +#: guix/ui.scm:324 +#, scheme-format +msgid "~a: ~a~%" +msgstr "~a: ~a~%" + +#: guix/ui.scm:343 +#, scheme-format +msgid "failed to read expression ~s: ~s~%" +msgstr "kunne ikke læse udtryk ~s: ~s~%" + +#: guix/ui.scm:349 +#, scheme-format +msgid "failed to evaluate expression `~a': ~s~%" +msgstr "kunne ikke evaluere udtryk »~a«: ~s~%" + +#: guix/ui.scm:358 +#, scheme-format +msgid "expression ~s does not evaluate to a package~%" +msgstr "udtryk ~s evaluerer ikke til en pakke~%" + +#: guix/ui.scm:410 +#, scheme-format +msgid "~:[The following derivation would be built:~%~{ ~a~%~}~;~]" +msgid_plural "~:[The following derivations would be built:~%~{ ~a~%~}~;~]" +msgstr[0] "~:[Den følgende afledning ville blive bygget:~%~{ ~a~%~}~;~]" +msgstr[1] "~:[De følgende afledninger ville blive bygget:~%~{ ~a~%~}~;~]" + +#: guix/ui.scm:415 +#, scheme-format +msgid "~:[The following file would be downloaded:~%~{ ~a~%~}~;~]" +msgid_plural "~:[The following files would be downloaded:~%~{ ~a~%~}~;~]" +msgstr[0] "~:[Den følgende fil ville blive hentet:~%~{ ~a~%~}~;~]" +msgstr[1] "~:[De følgende filer ville blive hentet:~%~{ ~a~%~}~;~]" + +#: guix/ui.scm:421 +#, scheme-format +msgid "~:[The following derivation will be built:~%~{ ~a~%~}~;~]" +msgid_plural "~:[The following derivations will be built:~%~{ ~a~%~}~;~]" +msgstr[0] "~:[Den følgende afledning vil blive bygget:~%~{ ~a~%~}~;~]" +msgstr[1] "~:[De følgende afledninger vil blive bygget:~%~{ ~a~%~}~;~]" + +#: guix/ui.scm:426 +#, scheme-format +msgid "~:[The following file will be downloaded:~%~{ ~a~%~}~;~]" +msgid_plural "~:[The following files will be downloaded:~%~{ ~a~%~}~;~]" +msgstr[0] "~:[Den følgende fil vil blive hentet:~%~{ ~a~%~}~;~]" +msgstr[1] "~:[De følgende filer vil blive hentet:~%~{ ~a~%~}~;~]" + +#: guix/ui.scm:478 +#, scheme-format +msgid "The following package would be removed:~%~{~a~%~}~%" +msgid_plural "The following packages would be removed:~%~{~a~%~}~%" +msgstr[0] "Den følgende pakke ville blive fjernet:~%~{~a~%~}~%" +msgstr[1] "De følgende pakker ville blive fjernet:~%~{~a~%~}~%" + +#: guix/ui.scm:483 +#, scheme-format +msgid "The following package will be removed:~%~{~a~%~}~%" +msgid_plural "The following packages will be removed:~%~{~a~%~}~%" +msgstr[0] "Den følgende pakke vil blive fjernet:~%~{~a~%~}~%" +msgstr[1] "De følgende pakker vil blive fjernet:~%~{~a~%~}~%" + +#: guix/ui.scm:496 +#, scheme-format +msgid "The following package would be downgraded:~%~{~a~%~}~%" +msgid_plural "The following packages would be downgraded:~%~{~a~%~}~%" +msgstr[0] "Den følgende pakke ville blive nedgraderet:~%~{~a~%~}~%" +msgstr[1] "De følgende pakker ville blive nedgraderet:~%~{~a~%~}~%" + +#: guix/ui.scm:501 +#, scheme-format +msgid "The following package will be downgraded:~%~{~a~%~}~%" +msgid_plural "The following packages will be downgraded:~%~{~a~%~}~%" +msgstr[0] "Den følgende pakke vil blive nedgraderet:~%~{~a~%~}~%" +msgstr[1] "De følgende pakker vil blive nedgraderet:~%~{~a~%~}~%" + +#: guix/ui.scm:514 +#, scheme-format +msgid "The following package would be upgraded:~%~{~a~%~}~%" +msgid_plural "The following packages would be upgraded:~%~{~a~%~}~%" +msgstr[0] "Den følgende pakke ville blive opgraderet:~%~{~a~%~}~%" +msgstr[1] "De følgende pakker ville blive opgraderet:~%~{~a~%~}~%" + +#: guix/ui.scm:519 +#, scheme-format +msgid "The following package will be upgraded:~%~{~a~%~}~%" +msgid_plural "The following packages will be upgraded:~%~{~a~%~}~%" +msgstr[0] "Den følgende pakke vil blive opgraderet:~%~{~a~%~}~%" +msgstr[1] "De følgende pakker vil blive opgraderet:~%~{~a~%~}~%" + +#: guix/ui.scm:530 +#, scheme-format +msgid "The following package would be installed:~%~{~a~%~}~%" +msgid_plural "The following packages would be installed:~%~{~a~%~}~%" +msgstr[0] "Den følgende pakke ville blive installeret:~%~{~a~%~}~%" +msgstr[1] "De følgende pakker ville blive installeret:~%~{~a~%~}~%" + +#: guix/ui.scm:535 +#, scheme-format +msgid "The following package will be installed:~%~{~a~%~}~%" +msgid_plural "The following packages will be installed:~%~{~a~%~}~%" +msgstr[0] "Den følgende pakke vil blive installeret:~%~{~a~%~}~%" +msgstr[1] "De følgende pakker vil blive installeret:~%~{~a~%~}~%" + +#: guix/ui.scm:552 +msgid "<unknown location>" +msgstr "<ukendt sted>" + +#: guix/ui.scm:578 +#, scheme-format +msgid "failed to create configuration directory `~a': ~a~%" +msgstr "kunne ikke oprette konfiguratinsmappe »~a«: ~a~%" + +#: guix/ui.scm:680 guix/ui.scm:694 +msgid "unknown" +msgstr "ukendt" + +#: guix/ui.scm:803 +#, scheme-format +msgid "invalid argument: ~a~%" +msgstr "ugyldigt argument: ~a~%" + +#: guix/ui.scm:842 +#, scheme-format +msgid "Try `guix --help' for more information.~%" +msgstr "Prøv »guix --help« for yderligere information.~%" + +#: guix/ui.scm:869 +msgid "" +"Usage: guix COMMAND ARGS...\n" +"Run COMMAND with ARGS.\n" +msgstr "" +"Brug: guix KOMMANDO ARG...\n" +"Kør KOMMANDO med ARG.\n" + +#: guix/ui.scm:872 +msgid "COMMAND must be one of the sub-commands listed below:\n" +msgstr "KOMMANDO skal være en af underkommandoerne vist nedenfor:\n" + +#: guix/ui.scm:892 +#, scheme-format +msgid "guix: ~a: command not found~%" +msgstr "guix: ~a: kommando blev ikke fundet~%" + +#: guix/ui.scm:910 +#, scheme-format +msgid "guix: missing command name~%" +msgstr "guix: mangler kommandonavn~%" + +#: guix/ui.scm:918 +#, scheme-format +msgid "guix: unrecognized option '~a'~%" +msgstr "guix: ikke genkendt tilvalg »~a«~%" + +#: guix/http-client.scm:211 +#, scheme-format +msgid "following redirection to `~a'...~%" +msgstr "følger omdirigering til »~a«...~%" + +#: guix/http-client.scm:220 +msgid "download failed" +msgstr "overførsel mislykkedes" + +#: guix/nar.scm:155 +msgid "signature is not a valid s-expression" +msgstr "signatur er ikke et gyldigt s-udtryk" + +#: guix/nar.scm:164 +msgid "invalid signature" +msgstr "ugyldig signatur" + +#: guix/nar.scm:168 +msgid "invalid hash" +msgstr "ugyldig hash" + +#: guix/nar.scm:176 +msgid "unauthorized public key" +msgstr "uautoriseret offentlig nøgle" + +#: guix/nar.scm:181 +msgid "corrupt signature data" +msgstr "ødelagt signaturdata" + +#: guix/nar.scm:201 +msgid "corrupt file set archive" +msgstr "ødelagt filsætarkiv" + +#: guix/nar.scm:211 +#, scheme-format +msgid "importing file or directory '~a'...~%" +msgstr "importerer fil eller mappe »~a«...~%" + +#: guix/nar.scm:222 +#, scheme-format +msgid "found valid signature for '~a'~%" +msgstr "fandt gyldig signatur for »~a«~%" + +#: guix/nar.scm:229 +msgid "imported file lacks a signature" +msgstr "importeret fil mangler en signatur" + +#: guix/nar.scm:268 +msgid "invalid inter-file archive mark" +msgstr "ugyldig arkivmærke for mellemfil" + +#~ msgid "Downloading, please wait...~%" +#~ msgstr "Henter, vent venligst ...~%" + +#~ msgid "(Please consider upgrading Guile to get proper progress report.)~%" +#~ msgstr "(Overvej venligst at opgradere Guile for at få korrekt statusrapport.)~%" + +#~ msgid "failed to open operating system file '~a': ~a~%" +#~ msgstr "kunne ikke åbne operativsystemfil »~a«: ~a~%" + +#~ msgid "failed to load operating system file '~a':~%" +#~ msgstr "kunne ikke indlæse operativsystemfil »~a«:~%" + +#~ msgid "using Guile ~a, which does not support ~s encoding~%" +#~ msgstr "bruger Guile ~a, som ikke understøtter ~s-kodning~%" + +#~ msgid "download failed; use a newer Guile~%" +#~ msgstr "overførsel mislykkedes; brug en nyere Guile~%" diff --git a/po/packages/POTFILES.in b/po/packages/POTFILES.in index 0e7bc4c0d3..b1da6d2023 100644 --- a/po/packages/POTFILES.in +++ b/po/packages/POTFILES.in @@ -6,24 +6,52 @@ gnu/packages/aspell.scm gnu/packages/backup.scm gnu/packages/base.scm gnu/packages/bittorrent.scm +gnu/packages/certs.scm +gnu/packages/compression.scm gnu/packages/databases.scm +gnu/packages/debug.scm +gnu/packages/dejagnu.scm +gnu/packages/feh.scm gnu/packages/games.scm gnu/packages/gcc.scm +gnu/packages/geeqie.scm gnu/packages/gettext.scm gnu/packages/gnuzilla.scm gnu/packages/gtk.scm gnu/packages/guile.scm -gnu/packages/image.scm gnu/packages/imagemagick.scm +gnu/packages/image.scm gnu/packages/inkscape.scm +gnu/packages/jemalloc.scm +gnu/packages/key-mon.scm +gnu/packages/less.scm +gnu/packages/lesstif.scm gnu/packages/linux.scm gnu/packages/lout.scm +gnu/packages/messaging.scm gnu/packages/mpd.scm +gnu/packages/netpbm.scm +gnu/packages/nettle.scm +gnu/packages/networking.scm gnu/packages/pdf.scm +gnu/packages/pem.scm +gnu/packages/perl.scm gnu/packages/photo.scm +gnu/packages/qemu.scm gnu/packages/ratpoison.scm +gnu/packages/readline.scm gnu/packages/scanner.scm gnu/packages/scheme.scm +gnu/packages/search.scm +gnu/packages/serveez.scm +gnu/packages/telephony.scm +gnu/packages/texinfo.scm +gnu/packages/texlive.scm +gnu/packages/textutils.scm +gnu/packages/version-control.scm +gnu/packages/webkit.scm +gnu/packages/web.scm +gnu/packages/weechat.scm gnu/packages/wordnet.scm gnu/packages/xiph.scm gnu/packages/zip.scm diff --git a/pre-inst-env.in b/pre-inst-env.in index ef9a3ce3c3..fe56da6944 100644 --- a/pre-inst-env.in +++ b/pre-inst-env.in @@ -44,7 +44,7 @@ export PATH # Daemon helpers. NIX_ROOT_FINDER="$abs_top_builddir/nix/scripts/list-runtime-roots" -NIX_SUBSTITUTERS="$abs_top_builddir/nix/scripts/substitute-binary" +NIX_SUBSTITUTERS="$abs_top_builddir/nix/scripts/substitute" NIX_BUILD_HOOK="$abs_top_builddir/nix/scripts/offload" NIX_LIBEXEC_DIR="@abs_top_builddir@/nix/scripts" # for 'guix-authenticate' diff --git a/tests/derivations.scm b/tests/derivations.scm index 72d253c465..a8cccac34a 100644 --- a/tests/derivations.scm +++ b/tests/derivations.scm @@ -499,6 +499,20 @@ (string=? path (derivation-file-name (%guile-for-build))))) (derivation-prerequisites drv)))) +(test-assert "derivation-prerequisites and derivation-input-is-valid?" + (let* ((a (build-expression->derivation %store "a" '(mkdir %output))) + (b (build-expression->derivation %store "b" `(list ,(random-text)))) + (c (build-expression->derivation %store "c" `(mkdir %output) + #:inputs `(("a" ,a) ("b" ,b))))) + (build-derivations %store (list a)) + (match (derivation-prerequisites c + (cut valid-derivation-input? %store + <>)) + ((($ <derivation-input> file ("out"))) + (string=? file (derivation-file-name b))) + (x + (pk 'fail x #f))))) + (test-assert "build-expression->derivation without inputs" (let* ((builder '(begin (mkdir %output) diff --git a/tests/gexp.scm b/tests/gexp.scm index 4c31e22f15..f81ef39860 100644 --- a/tests/gexp.scm +++ b/tests/gexp.scm @@ -97,6 +97,18 @@ %store (package-source coreutils)))) (gexp->sexp* exp))))) +(test-assert "one local file" + (let* ((file (search-path %load-path "guix.scm")) + (local (local-file file)) + (exp (gexp (display (ungexp local)))) + (intd (add-to-store %store (basename file) #t + "sha256" file))) + (and (gexp? exp) + (match (gexp-inputs exp) + (((x "out")) + (eq? x local))) + (equal? `(display ,intd) (gexp->sexp* exp))))) + (test-assert "same input twice" (let ((exp (gexp (begin (display (ungexp coreutils)) @@ -160,6 +172,12 @@ (equal? `(list ,guile ,cu ,libc ,bu) (gexp->sexp* exp target))))) +(test-equal "ungexp + ungexp-native, nested" + (list `((,%bootstrap-guile "out")) '<> `((,coreutils "out"))) + (let* ((exp (gexp (list (ungexp-native (gexp (ungexp coreutils))) + (ungexp %bootstrap-guile))))) + (list (gexp-inputs exp) '<> (gexp-native-inputs exp)))) + (test-assert "input list" (let ((exp (gexp (display '(ungexp (list %bootstrap-guile coreutils))))) @@ -330,6 +348,20 @@ (mlet %store-monad ((drv mdrv)) (return (string=? system (derivation-system drv)))))) +(test-assertm "gexp->derivation, local-file" + (mlet* %store-monad ((file -> (search-path %load-path "guix.scm")) + (intd (interned-file file)) + (local -> (local-file file)) + (exp -> (gexp (begin + (stat (ungexp local)) + (symlink (ungexp local) + (ungexp output))))) + (drv (gexp->derivation "local-file" exp))) + (mbegin %store-monad + (built-derivations (list drv)) + (return (string=? (readlink (derivation->output-path drv)) + intd))))) + (test-assertm "gexp->derivation, cross-compilation" (mlet* %store-monad ((target -> "mips64el-linux") (exp -> (gexp (list (ungexp coreutils) @@ -497,6 +529,23 @@ (list "out" %bootstrap-guile)))) (built-derivations (list drv)))) +(test-assertm "gexp->derivation #:allowed-references, specific output" + (mlet* %store-monad ((in (gexp->derivation "thing" + #~(begin + (mkdir #$output:ok) + (mkdir #$output:not-ok)))) + (drv (gexp->derivation "allowed-refs" + #~(begin + (pk #$in:not-ok) + (mkdir #$output) + (chdir #$output) + (symlink #$output "self") + (symlink #$in:ok "ok")) + #:allowed-references + (list "out" + (gexp-input in "ok"))))) + (built-derivations (list drv)))) + (test-assert "gexp->derivation #:allowed-references, disallowed" (let ((drv (run-with-store %store (gexp->derivation "allowed-refs" diff --git a/tests/gremlin.scm b/tests/gremlin.scm new file mode 100644 index 0000000000..dc9f78c21a --- /dev/null +++ b/tests/gremlin.scm @@ -0,0 +1,69 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (test-gremlin) + #:use-module (guix elf) + #:use-module (guix build utils) + #:use-module (guix build gremlin) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26) + #:use-module (srfi srfi-64) + #:use-module (rnrs io ports) + #:use-module (ice-9 match)) + +(define %guile-executable + (match (command-line) + ((program . _) + (and (file-exists? program) (elf-file? program) + program)) + (_ + #f))) + +(define read-elf + (compose parse-elf get-bytevector-all)) + + +(test-begin "gremlin") + +(unless %guile-executable (test-skip 1)) +(test-assert "elf-dynamic-info-needed, executable" + (let* ((elf (call-with-input-file %guile-executable read-elf)) + (dyninfo (elf-dynamic-info elf))) + (or (not dyninfo) ;static executable + (lset<= string=? + (list (string-append "libguile-" (effective-version)) + "libgc" "libunistring" "libffi") + (map (lambda (lib) + (string-take lib (string-contains lib ".so"))) + (elf-dynamic-info-needed dyninfo)))))) + +(test-equal "expand-origin" + '("OOO/../lib" + "OOO" + "../OOO/bar/OOO/baz" + "ORIGIN/foo") + (map (cut expand-origin <> "OOO") + '("$ORIGIN/../lib" + "${ORIGIN}" + "../${ORIGIN}/bar/$ORIGIN/baz" + "ORIGIN/foo"))) + +(test-end "gremlin") + + +(exit (= (test-runner-fail-count (test-runner-current)) 0)) diff --git a/tests/guix-archive.sh b/tests/guix-archive.sh index d4259b8677..8eacf89338 100644 --- a/tests/guix-archive.sh +++ b/tests/guix-archive.sh @@ -1,5 +1,5 @@ # GNU Guix --- Functional package management for GNU -# Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org> +# Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> # # This file is part of GNU Guix. # @@ -41,7 +41,6 @@ cmp "$archive" "$archive_alt" # Check the exit value and stderr upon import. guix archive --import < "$archive" -guix archive --import < "$archive" 2>&1 | grep "import.*guile-bootstrap" if guix archive something-that-does-not-exist then false; else true; fi diff --git a/tests/guix-build.sh b/tests/guix-build.sh index 836c45e776..a72ce0911d 100644 --- a/tests/guix-build.sh +++ b/tests/guix-build.sh @@ -36,6 +36,88 @@ guix build -e '(@@ (gnu packages bootstrap) %bootstrap-guile)' | \ guix build hello -d | \ grep -e '-hello-[0-9\.]\+\.drv$' +# Check --sources option with its arguments +module_dir="t-guix-build-$$" +mkdir "$module_dir" +trap "rm -rf $module_dir" EXIT + +cat > "$module_dir/foo.scm"<<EOF +(define-module (foo) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system trivial)) + +(define-public foo + (package + (name "foo") + (version "42") + (source (origin + (method url-fetch) + (uri "http://www.example.com/foo.tar.gz") + (sha256 + (base32 + "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")))) + (build-system trivial-build-system) + (inputs + (quasiquote (("bar" ,bar)))) + (home-page "www.example.com") + (synopsis "Dummy package") + (description "foo is a dummy package for testing.") + (license #f))) + +(define-public bar + (package + (name "bar") + (version "9001") + (source (origin + (method url-fetch) + (uri "http://www.example.com/bar.tar.gz") + (sha256 + (base32 + "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy")))) + (build-system trivial-build-system) + (inputs + (quasiquote + (("data" ,(origin + (method url-fetch) + (uri "http://www.example.com/bar.dat") + (sha256 + (base32 + "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"))))))) + (home-page "www.example.com") + (synopsis "Dummy package") + (description "bar is a dummy package for testing.") + (license #f))) +EOF + +GUIX_PACKAGE_PATH="$module_dir" +export GUIX_PACKAGE_PATH + +# foo.tar.gz +guix build -d -S foo +guix build -d -S foo | grep -e 'foo\.tar\.gz' + +guix build -d --sources=package foo +guix build -d --sources=package foo | grep -e 'foo\.tar\.gz' + +# bar.tar.gz and bar.dat +guix build -d --sources bar +test `guix build -d --sources bar \ + | grep -e 'bar\.tar\.gz' -e 'bar\.dat' \ + | wc -l` -eq 2 + +# bar.tar.gz and bar.dat +guix build -d --sources=all bar +test `guix build -d --sources bar \ + | grep -e 'bar\.tar\.gz' -e 'bar\.dat' \ + | wc -l` -eq 2 + +# Should include foo.tar.gz, bar.tar.gz, and bar.dat +guix build -d --sources=transitive foo +test `guix build -d --sources=transitive foo \ + | grep -e 'foo\.tar\.gz' -e 'bar\.tar\.gz' -e 'bar\.dat' \ + | wc -l` -eq 3 + # Should all return valid log files. drv="`guix build -d -e '(@@ (gnu packages bootstrap) %bootstrap-guile)'`" out="`guix build -e '(@@ (gnu packages bootstrap) %bootstrap-guile)'`" diff --git a/tests/guix-daemon.sh b/tests/guix-daemon.sh index a73c9e22e3..87f17def12 100644 --- a/tests/guix-daemon.sh +++ b/tests/guix-daemon.sh @@ -17,7 +17,7 @@ # along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. # -# Test the daemon and its interaction with 'guix substitute-binary'. +# Test the daemon and its interaction with 'guix substitute'. # set -e @@ -51,7 +51,7 @@ Deriver: $drv EOF # Remove the cached narinfo. -rm -f "$XDG_CACHE_HOME/guix/substitute-binary/$hash_part" +rm -f "$XDG_CACHE_HOME/guix/substitute/$hash_part" # Make sure we see the substitute. guile -c ' diff --git a/tests/guix-package-net.sh b/tests/guix-package-net.sh new file mode 100644 index 0000000000..14222cfd25 --- /dev/null +++ b/tests/guix-package-net.sh @@ -0,0 +1,178 @@ +# GNU Guix --- Functional package management for GNU +# Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> +# Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org> +# +# This file is part of GNU Guix. +# +# GNU Guix is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or (at +# your option) any later version. +# +# GNU Guix is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +# +# Test the `guix package' command-line utility. This test requires network +# access and is skipped when that is lacking. +# + +guix package --version + +readlink_base () +{ + basename `readlink "$1"` +} + +# Return true if a typical shebang in the store would exceed Linux's default +# static limit. +shebang_too_long () +{ + test `echo $NIX_STORE_DIR/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-bootstrap-binaries-0/bin/bash | wc -c` \ + -ge 128 +} + +if ! guile -c '(getaddrinfo "www.gnu.org" "80" AI_NUMERICSERV)' 2> /dev/null \ + || shebang_too_long +then + # Skipping. + exit 77 +fi + + +profile="t-profile-$$" +rm -f "$profile" + +trap 'rm -f "$profile" "$profile-"[0-9]* ; rm -rf t-home-'"$$" EXIT + + +guix package --bootstrap -p "$profile" -i guile-bootstrap +test -L "$profile" && test -L "$profile-1-link" +! test -f "$profile-2-link" +test -f "$profile/bin/guile" + +boot_make="(@@ (gnu packages commencement) gnu-make-boot0)" +boot_make_drv="`guix build -e "$boot_make" | grep -v -e -debug`" +guix package --bootstrap -p "$profile" -i "$boot_make_drv" +test -L "$profile-2-link" +test -f "$profile/bin/make" && test -f "$profile/bin/guile" + +# Check whether `--list-installed' works. +# XXX: Change the tests when `--install' properly extracts the package +# name and version string. +installed="`guix package -p "$profile" --list-installed | cut -f1 | xargs echo | sort`" +case "x$installed" in + "guile-bootstrap make-boot0") + true;; + "make-boot0 guile-bootstrap") + true;; + "*") + false;; +esac + +test "`guix package -p "$profile" -I 'g.*e' | cut -f1`" = "guile-bootstrap" + +# List generations. +test "`guix package -p "$profile" -l | cut -f1 | grep guile | head -n1`" \ + = " guile-bootstrap" + +# Exit with 1 when a generation does not exist. +if guix package -p "$profile" --list-generations=42; +then false; else true; fi +if guix package -p "$profile" --switch-generation=99; +then false; else true; fi + +# Remove a package. +guix package --bootstrap -p "$profile" -r "guile-bootstrap" +test -L "$profile-3-link" +test -f "$profile/bin/make" && ! test -f "$profile/bin/guile" + +# Roll back. +guix package --roll-back -p "$profile" +test "`readlink_base "$profile"`" = "$profile-2-link" +test -x "$profile/bin/guile" && test -x "$profile/bin/make" +guix package --roll-back -p "$profile" +test "`readlink_base "$profile"`" = "$profile-1-link" +test -x "$profile/bin/guile" && ! test -x "$profile/bin/make" + +# Switch to the rolled generation and switch back. +guix package -p "$profile" --switch-generation=2 +test "`readlink_base "$profile"`" = "$profile-2-link" +guix package -p "$profile" --switch-generation=-1 +test "`readlink_base "$profile"`" = "$profile-1-link" + +# Move to the empty profile. +for i in `seq 1 3` +do + guix package --bootstrap --roll-back -p "$profile" + ! test -f "$profile/bin" + ! test -f "$profile/lib" + test "`readlink_base "$profile"`" = "$profile-0-link" +done + +# Test that '--list-generations' does not output the zeroth generation. +test -z "`guix package -p "$profile" -l 0`" + +# Reinstall after roll-back to the empty profile. +guix package --bootstrap -p "$profile" -e "$boot_make" +test "`readlink_base "$profile"`" = "$profile-1-link" +test -x "$profile/bin/guile" && ! test -x "$profile/bin/make" + +# Check that the first generation is the current one. +test "`guix package -p "$profile" -l 1 | cut -f3 | head -n1`" = "(current)" + +# Roll-back to generation 0, and install---all at once. +guix package --bootstrap -p "$profile" --roll-back -i guile-bootstrap +test "`readlink_base "$profile"`" = "$profile-1-link" +test -x "$profile/bin/guile" && ! test -x "$profile/bin/make" + +# Install Make. +guix package --bootstrap -p "$profile" -e "$boot_make" +test "`readlink_base "$profile"`" = "$profile-2-link" +test -x "$profile/bin/guile" && test -x "$profile/bin/make" +grep "`guix build -e "$boot_make"`" "$profile/manifest" + +# Make a "hole" in the list of generations, and make sure we can +# roll back and switch "over" it. +rm "$profile-1-link" +guix package --bootstrap -p "$profile" --roll-back +test "`readlink_base "$profile"`" = "$profile-0-link" +guix package -p "$profile" --switch-generation=+1 +test "`readlink_base "$profile"`" = "$profile-2-link" + +# Make sure LIBRARY_PATH gets listed by `--search-paths'. +guix package --bootstrap -p "$profile" -i guile-bootstrap -i gcc-bootstrap +guix package -p "$profile" --search-paths | grep LIBRARY_PATH + +# Roll back so we can delete #3 below. +guix package -p "$profile" --switch-generation=2 + +# Delete the third generation and check that it was actually deleted. +guix package -p "$profile" --delete-generations=3 +test -z "`guix package -p "$profile" -l 3`" + + +# +# Try with the default profile. +# + +XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}" +export XDG_CACHE_HOME +HOME="$PWD/t-home-$$" +export HOME + +mkdir -p "$HOME" + +# Get the canonical directory name so that 'guix package' recognizes it. +HOME="`cd $HOME; pwd -P`" + +guix package --bootstrap -e "$boot_make" +test -f "$HOME/.guix-profile/bin/make" + +guix package --bootstrap --roll-back +! test -f "$HOME/.guix-profile/bin/make" diff --git a/tests/guix-package.sh b/tests/guix-package.sh index 94cf927420..26a5e9d1a2 100644 --- a/tests/guix-package.sh +++ b/tests/guix-package.sh @@ -28,14 +28,6 @@ readlink_base () basename `readlink "$1"` } -# Return true if a typical shebang in the store would not exceed Linux's -# default static limit. -shebang_not_too_long () -{ - test `echo $NIX_STORE_DIR/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-bootstrap-binaries-0/bin/bash | wc -c` \ - -lt 128 -} - module_dir="t-guix-package-$$" profile="t-profile-$$" rm -f "$profile" @@ -60,118 +52,20 @@ test -L "$profile" && test -L "$profile-1-link" test -f "$profile/bin/guile" # No search path env. var. here. -guix package --search-paths -p "$profile" -test "`guix package --search-paths -p "$profile" | wc -l`" = 0 - -# Check whether we have network access and an acceptable shebang length. -if guile -c '(getaddrinfo "www.gnu.org" "80" AI_NUMERICSERV)' 2> /dev/null \ - && shebang_not_too_long -then - boot_make="(@@ (gnu packages commencement) gnu-make-boot0)" - boot_make_drv="`guix build -e "$boot_make" | grep -v -e -debug`" - guix package --bootstrap -p "$profile" -i "$boot_make_drv" - test -L "$profile-2-link" - test -f "$profile/bin/make" && test -f "$profile/bin/guile" - - - # Check whether `--list-installed' works. - # XXX: Change the tests when `--install' properly extracts the package - # name and version string. - installed="`guix package -p "$profile" --list-installed | cut -f1 | xargs echo | sort`" - case "x$installed" in - "guile-bootstrap make-boot0") - true;; - "make-boot0 guile-bootstrap") - true;; - "*") - false;; - esac - - test "`guix package -p "$profile" -I 'g.*e' | cut -f1`" = "guile-bootstrap" - - # List generations. - test "`guix package -p "$profile" -l | cut -f1 | grep guile | head -n1`" \ - = " guile-bootstrap" - - # Exit with 1 when a generation does not exist. - if guix package -p "$profile" --list-generations=42; - then false; else true; fi - if guix package -p "$profile" --switch-generation=99; - then false; else true; fi - - # Remove a package. - guix package --bootstrap -p "$profile" -r "guile-bootstrap" - test -L "$profile-3-link" - test -f "$profile/bin/make" && ! test -f "$profile/bin/guile" - - # Roll back. - guix package --roll-back -p "$profile" - test "`readlink_base "$profile"`" = "$profile-2-link" - test -x "$profile/bin/guile" && test -x "$profile/bin/make" - guix package --roll-back -p "$profile" - test "`readlink_base "$profile"`" = "$profile-1-link" - test -x "$profile/bin/guile" && ! test -x "$profile/bin/make" - - # Switch to the rolled generation and switch back. - guix package -p "$profile" --switch-generation=2 - test "`readlink_base "$profile"`" = "$profile-2-link" - guix package -p "$profile" --switch-generation=-1 - test "`readlink_base "$profile"`" = "$profile-1-link" - - # Move to the empty profile. - for i in `seq 1 3` - do - guix package --bootstrap --roll-back -p "$profile" - ! test -f "$profile/bin" - ! test -f "$profile/lib" - test "`readlink_base "$profile"`" = "$profile-0-link" - done - - # Test that '--list-generations' does not output the zeroth generation. - test -z "`guix package -p "$profile" -l 0`" - - # Reinstall after roll-back to the empty profile. - guix package --bootstrap -p "$profile" -e "$boot_make" - test "`readlink_base "$profile"`" = "$profile-1-link" - test -x "$profile/bin/guile" && ! test -x "$profile/bin/make" - - # Check that the first generation is the current one. - test "`guix package -p "$profile" -l 1 | cut -f3 | head -n1`" = "(current)" - - # Roll-back to generation 0, and install---all at once. - guix package --bootstrap -p "$profile" --roll-back -i guile-bootstrap - test "`readlink_base "$profile"`" = "$profile-1-link" - test -x "$profile/bin/guile" && ! test -x "$profile/bin/make" - - # Install Make. - guix package --bootstrap -p "$profile" -e "$boot_make" - test "`readlink_base "$profile"`" = "$profile-2-link" - test -x "$profile/bin/guile" && test -x "$profile/bin/make" - grep "`guix build -e "$boot_make"`" "$profile/manifest" - - # Make a "hole" in the list of generations, and make sure we can - # roll back and switch "over" it. - rm "$profile-1-link" - guix package --bootstrap -p "$profile" --roll-back - test "`readlink_base "$profile"`" = "$profile-0-link" - guix package -p "$profile" --switch-generation=+1 - test "`readlink_base "$profile"`" = "$profile-2-link" - - # Make sure LIBRARY_PATH gets listed by `--search-paths'. - guix package --bootstrap -p "$profile" -i guile-bootstrap -i gcc-bootstrap - guix package --search-paths -p "$profile" | grep LIBRARY_PATH - - # Delete the third generation and check that it was actually deleted. - guix package -p "$profile" --delete-generations=3 - test -z "`guix package -p "$profile" -l 3`" - - # Exit with 1 when a generation does not exist. - if guix package -p "$profile" --delete-generations=42; - then false; else true; fi - - # Exit with 0 when trying to delete the zeroth generation. - guix package -p "$profile" --delete-generations=0 -fi +guix package -p "$profile" --search-paths +guix package -p "$profile" --search-paths | grep '^export PATH=' +test "`guix package -p "$profile" --search-paths | wc -l`" = 1 # $PATH +( set -e; set -x; \ + eval `guix package --search-paths=prefix -p "$PWD/$profile"`; \ + test "`type -P guile`" = "$PWD/$profile/bin/guile" ; \ + type -P rm ) + +# Exit with 1 when a generation does not exist. +if guix package -p "$profile" --delete-generations=42; +then false; else true; fi + +# Exit with 0 when trying to delete the zeroth generation. +guix package -p "$profile" --delete-generations=0 # Make sure multiple arguments to -i works. guix package --bootstrap -i guile gcc -p "$profile" -n @@ -212,6 +106,14 @@ if guix package -p "$profile" --delete-generations=12m; then false; else true; fi test "`readlink_base "$profile"`" = "$generation" +# The following command should not delete the current generation, even though +# it matches the given pattern (see <http://bugs.gnu.org/19978>.) And since +# there's nothing else to delete, it should just fail. +guix package --list-generations -p "$profile" +if guix package --bootstrap -p "$profile" --delete-generations=1.. +then false; else true; fi +test "`readlink_base "$profile"`" = "$generation" + # Make sure $profile is a GC root at this point. real_profile="`readlink -f "$profile"`" if guix gc -d "$real_profile" @@ -242,18 +144,6 @@ guix package --bootstrap -i guile-bootstrap test -L "$HOME/.guix-profile" test -f "$HOME/.guix-profile/bin/guile" -if guile -c '(getaddrinfo "www.gnu.org" "80" AI_NUMERICSERV)' 2> /dev/null -then - guix package --bootstrap -e "$boot_make" - test -f "$HOME/.guix-profile/bin/make" - first_environment="`cd $HOME/.guix-profile ; pwd`" - - guix package --bootstrap --roll-back - test -f "$HOME/.guix-profile/bin/guile" - ! test -f "$HOME/.guix-profile/bin/make" - test "`cd $HOME/.guix-profile ; pwd`" = "$first_environment" -fi - # Move to the empty profile. default_profile="`readlink "$HOME/.guix-profile"`" for i in `seq 1 3` @@ -327,9 +217,19 @@ cat > "$module_dir/foo.scm"<<EOF (patches (list (search-patch "emacs.patch"))))) (name "emacs-foo-bar-patched") (version "42"))) + +(define-public y + (package (inherit emacs) + (name "super-non-portable-emacs") + (supported-systems '("foobar64-hurd")))) EOF guix package -i emacs-foo-bar-patched -n +# This one should not show up in searches since it's no supported on the +# current system. +test "`guix package -A super-non-portable-emacs`" = "" +test "`guix package -s super-non-portable-emacs | grep ^systems:`" = "systems: " + unset GUIX_PACKAGE_PATH # Using 'GUIX_BUILD_OPTIONS'. @@ -342,3 +242,15 @@ export GUIX_BUILD_OPTIONS available2="`guix package -A | sort`" test "$available2" = "$available" guix package -I + +unset GUIX_BUILD_OPTIONS + +# Applying a manifest file +cat > "$module_dir/manifest.scm"<<EOF +(use-package-modules bootstrap) + +(packages->manifest (list %bootstrap-guile)) +EOF +guix package --bootstrap -m "$module_dir/manifest.scm" +guix package -I | grep guile +test `guix package -I | wc -l` -eq 1 diff --git a/tests/guix-system.sh b/tests/guix-system.sh index 76e722fbc1..1b77d1a0db 100644 --- a/tests/guix-system.sh +++ b/tests/guix-system.sh @@ -17,7 +17,7 @@ # along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. # -# Test the daemon and its interaction with 'guix substitute-binary'. +# Test the daemon and its interaction with 'guix substitute'. # set -e diff --git a/tests/hackage.scm b/tests/hackage.scm new file mode 100644 index 0000000000..23b854caa4 --- /dev/null +++ b/tests/hackage.scm @@ -0,0 +1,134 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (test-hackage) + #:use-module (guix import hackage) + #:use-module (guix tests) + #:use-module (srfi srfi-64) + #:use-module (ice-9 match)) + +(define test-cabal-1 + "name: foo +version: 1.0.0 +homepage: http://test.org +synopsis: synopsis +description: description +license: BSD3 +executable cabal + build-depends: + HTTP >= 4000.2.5 && < 4000.3, + mtl >= 2.0 && < 3 +") + +;; Use TABs to indent lines and to separate keys from value. +(define test-cabal-2 + "name: foo +version: 1.0.0 +homepage: http://test.org +synopsis: synopsis +description: description +license: BSD3 +executable cabal + build-depends: HTTP >= 4000.2.5 && < 4000.3, + mtl >= 2.0 && < 3 +") + +;; Use indentation with comma as found, e.g., in 'haddock-api'. +(define test-cabal-3 + "name: foo +version: 1.0.0 +homepage: http://test.org +synopsis: synopsis +description: description +license: BSD3 +executable cabal + build-depends: + HTTP >= 4000.2.5 && < 4000.3 + , mtl >= 2.0 && < 3 +") + +(define test-cond-1 + "(os(darwin) || !(flag(debug))) && flag(cips)") + +(define read-cabal + (@@ (guix import hackage) read-cabal)) + +(define eval-cabal-keywords + (@@ (guix import hackage) eval-cabal-keywords)) + +(define conditional->sexp-like + (@@ (guix import hackage) conditional->sexp-like)) + +(test-begin "hackage") + +(define (eval-test-with-cabal test-cabal) + (mock + ((guix import hackage) hackage-fetch + (lambda (name-version) + (call-with-input-string test-cabal + read-cabal))) + (match (hackage->guix-package "foo") + (('package + ('name "ghc-foo") + ('version "1.0.0") + ('source + ('origin + ('method 'url-fetch) + ('uri ('string-append + "http://hackage.haskell.org/package/foo/foo-" + 'version + ".tar.gz")) + ('sha256 + ('base32 + (? string? hash))))) + ('build-system 'haskell-build-system) + ('inputs + ('quasiquote + (("ghc-http" ('unquote 'ghc-http)) + ("ghc-mtl" ('unquote 'ghc-mtl))))) + ('home-page "http://test.org") + ('synopsis (? string?)) + ('description (? string?)) + ('license 'bsd-3)) + #t) + (x + (pk 'fail x #f))))) + +(test-assert "hackage->guix-package test 1" + (eval-test-with-cabal test-cabal-1)) + +(test-assert "hackage->guix-package test 2" + (eval-test-with-cabal test-cabal-2)) + +(test-assert "hackage->guix-package test 3" + (eval-test-with-cabal test-cabal-3)) + +(test-assert "conditional->sexp-like" + (match + (eval-cabal-keywords + (conditional->sexp-like test-cond-1) + '(("debug" . "False"))) + (('and ('or ('string-match "darwin" ('%current-system)) ('not '#f)) '#t) + #t) + (x + (pk 'fail x #f)))) + +(test-end "hackage") + + +(exit (= (test-runner-fail-count (test-runner-current)) 0)) diff --git a/tests/lint.scm b/tests/lint.scm index c0599224b7..2807eba1cc 100644 --- a/tests/lint.scm +++ b/tests/lint.scm @@ -18,8 +18,7 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. - -(define-module (test-packages) +(define-module (test-lint) #:use-module (guix tests) #:use-module (guix download) #:use-module (guix build-system gnu) @@ -302,9 +301,34 @@ requests." (uri "someurl") (sha256 "somesha") (patches (list "/path/to/y.patch"))))))) - (check-patches pkg))) + (check-patch-file-names pkg))) "file names of patches should start with the package name"))) +(test-assert "patches: not found" + (->bool + (string-contains + (with-warnings + (let ((pkg (dummy-package "x" + (source + (origin + (method url-fetch) + (uri "someurl") + (sha256 "somesha") + (patches + (list (search-patch "this-patch-does-not-exist!")))))))) + (check-patch-file-names pkg))) + "patch not found"))) + +(test-assert "derivation: invalid arguments" + (->bool + (string-contains + (with-warnings + (let ((pkg (dummy-package "x" + (arguments + '(#:imported-modules (invalid-module)))))) + (check-derivation pkg))) + "failed to create derivation"))) + (test-assert "home-page: wrong home-page" (->bool (string-contains diff --git a/tests/packages.scm b/tests/packages.scm index c9dd5d859a..511ad78b6c 100644 --- a/tests/packages.scm +++ b/tests/packages.scm @@ -128,21 +128,82 @@ ("y") ;c ("y") ;d ("y")) ;e - (let* ((a (dummy-package "a" (supported-systems '("x" "y" "z")))) - (b (dummy-package "b" (supported-systems '("x" "y")) - (inputs `(("a" ,a))))) - (c (dummy-package "c" (supported-systems '("y" "z")) - (inputs `(("b" ,b))))) - (d (dummy-package "d" (supported-systems '("x" "y" "z")) - (inputs `(("b" ,b) ("c" ,c))))) - (e (dummy-package "e" (supported-systems '("x" "y" "z")) - (inputs `(("d" ,d)))))) + ;; Use TRIVIAL-BUILD-SYSTEM because it doesn't add implicit inputs and thus + ;; doesn't restrict the set of supported systems. + (let* ((a (dummy-package "a" + (build-system trivial-build-system) + (supported-systems '("x" "y" "z")))) + (b (dummy-package "b" + (build-system trivial-build-system) + (supported-systems '("x" "y")) + (inputs `(("a" ,a))))) + (c (dummy-package "c" + (build-system trivial-build-system) + (supported-systems '("y" "z")) + (inputs `(("b" ,b))))) + (d (dummy-package "d" + (build-system trivial-build-system) + (supported-systems '("x" "y" "z")) + (inputs `(("b" ,b) ("c" ,c))))) + (e (dummy-package "e" + (build-system trivial-build-system) + (supported-systems '("x" "y" "z")) + (inputs `(("d" ,d)))))) (list (package-transitive-supported-systems a) (package-transitive-supported-systems b) (package-transitive-supported-systems c) (package-transitive-supported-systems d) (package-transitive-supported-systems e)))) +(let* ((o (dummy-origin)) + (u (dummy-origin)) + (i (dummy-origin)) + (a (dummy-package "a")) + (b (dummy-package "b" + (inputs `(("a" ,a) ("i" ,i))))) + (c (package (inherit b) (source o))) + (d (dummy-package "d" + (build-system trivial-build-system) + (source u) (inputs `(("c" ,c)))))) + (test-assert "package-direct-sources, no source" + (null? (package-direct-sources a))) + (test-equal "package-direct-sources, #f source" + (list i) + (package-direct-sources b)) + (test-equal "package-direct-sources, not input source" + (list u) + (package-direct-sources d)) + (test-assert "package-direct-sources" + (let ((s (package-direct-sources c))) + (and (= (length (pk 's-sources s)) 2) + (member o s) + (member i s)))) + (test-assert "package-transitive-sources" + (let ((s (package-transitive-sources d))) + (and (= (length (pk 'd-sources s)) 3) + (member o s) + (member i s) + (member u s))))) + +(test-equal "package-transitive-supported-systems, implicit inputs" + %supported-systems + + ;; Here GNU-BUILD-SYSTEM adds implicit inputs that build only on + ;; %SUPPORTED-SYSTEMS. Thus the others must be ignored. + (let ((p (dummy-package "foo" + (build-system gnu-build-system) + (supported-systems + `("does-not-exist" "foobar" ,@%supported-systems))))) + (package-transitive-supported-systems p))) + +(test-assert "supported-package?" + (let ((p (dummy-package "foo" + (build-system gnu-build-system) + (supported-systems '("x86_64-linux" "does-not-exist"))))) + (and (supported-package? p "x86_64-linux") + (not (supported-package? p "does-not-exist")) + (not (supported-package? p "i686-linux"))))) + (test-skip (if (not %store) 8 0)) (test-assert "package-source-derivation, file" @@ -179,7 +240,11 @@ (unless (network-reachable?) (test-skip 1)) (test-equal "package-source-derivation, snippet" "OK" - (let* ((file (search-bootstrap-binary "guile-2.0.9.tar.xz" + (let* ((file (search-bootstrap-binary (match (%current-system) + ("armhf-linux" + "guile-2.0.11.tar.xz") + (_ + "guile-2.0.9.tar.xz")) (%current-system))) (sha256 (call-with-input-file file port-sha256)) (fetch (lambda* (url hash-algo hash @@ -205,10 +270,7 @@ (chmod "." #o777) (symlink "guile" "guile-rocks") (copy-recursively "../share/guile/2.0/scripts" - "scripts") - - ;; These variables must exist. - (pk %build-inputs %outputs)))))) + "scripts")))))) (package (package (inherit (dummy-package "with-snippet")) (source source) (build-system trivial-build-system) @@ -599,8 +661,7 @@ (profile-derivation (manifest (map package->manifest-entry (list p1 p2))) - #:info-dir? #f - #:ca-certificate-bundle? #f) + #:hooks '()) #:guile-for-build (%guile-for-build)))) (build-derivations %store (list prof)) (string-match (format #f "^export XML_CATALOG_FILES=\"~a/xml/+bar/baz/catalog\\.xml\"\n" diff --git a/tests/profiles.scm b/tests/profiles.scm index 7b942e35b0..cc9a822cee 100644 --- a/tests/profiles.scm +++ b/tests/profiles.scm @@ -24,10 +24,14 @@ #:use-module (guix monads) #:use-module (guix packages) #:use-module (guix derivations) + #:use-module (guix build-system trivial) #:use-module (gnu packages bootstrap) #:use-module ((gnu packages base) #:prefix packages:) + #:use-module ((gnu packages guile) #:prefix packages:) #:use-module (ice-9 match) #:use-module (ice-9 regex) + #:use-module (ice-9 popen) + #:use-module (rnrs io ports) #:use-module (srfi srfi-11) #:use-module (srfi srfi-64)) @@ -183,8 +187,7 @@ ((entry -> (package->manifest-entry %bootstrap-guile)) (guile (package->derivation %bootstrap-guile)) (drv (profile-derivation (manifest (list entry)) - #:info-dir? #f - #:ca-certificate-bundle? #f)) + #:hooks '())) (profile -> (derivation->output-path drv)) (bindir -> (string-append profile "/bin")) (_ (built-derivations (list drv)))) @@ -196,10 +199,112 @@ (mlet* %store-monad ((entry -> (package->manifest-entry packages:glibc "debug")) (drv (profile-derivation (manifest (list entry)) - #:info-dir? #f - #:ca-certificate-bundle? #f))) + #:hooks '()))) (return (derivation-inputs drv)))) +(test-assertm "profile-manifest, search-paths" + (mlet* %store-monad + ((guile -> (package + (inherit %bootstrap-guile) + (native-search-paths + (package-native-search-paths packages:guile-2.0)))) + (entry -> (package->manifest-entry guile)) + (drv (profile-derivation (manifest (list entry)) + #:hooks '())) + (profile -> (derivation->output-path drv))) + (mbegin %store-monad + (built-derivations (list drv)) + + ;; Read the manifest back and make sure search paths are preserved. + (let ((manifest (profile-manifest profile))) + (match (manifest-entries manifest) + ((result) + (return (equal? (manifest-entry-search-paths result) + (manifest-entry-search-paths entry) + (package-native-search-paths + packages:guile-2.0))))))))) + +(test-assertm "etc/profile" + ;; Make sure we get an 'etc/profile' file that at least defines $PATH. + (mlet* %store-monad + ((guile -> (package + (inherit %bootstrap-guile) + (native-search-paths + (package-native-search-paths packages:guile-2.0)))) + (entry -> (package->manifest-entry guile)) + (drv (profile-derivation (manifest (list entry)) + #:hooks '())) + (profile -> (derivation->output-path drv))) + (mbegin %store-monad + (built-derivations (list drv)) + (let* ((pipe (open-input-pipe + (string-append "unset GUIX_PROFILE; " + ;; 'source' is a Bashism; use '.' (dot). + ". " profile "/etc/profile; " + ;; Don't try to parse set(1) output because + ;; it differs among shells; just use echo. + "echo $PATH"))) + (path (get-string-all pipe))) + (return + (and (zero? (close-pipe pipe)) + (string-contains path (string-append profile "/bin")))))))) + +(test-assertm "etc/profile when etc/ already exists" + ;; Here 'union-build' makes the profile's etc/ a symlink to the package's + ;; etc/ directory, which makes it read-only. Make sure the profile build + ;; handles that. + (mlet* %store-monad + ((thing -> (dummy-package "dummy" + (build-system trivial-build-system) + (arguments + `(#:guile ,%bootstrap-guile + #:builder + (let ((out (assoc-ref %outputs "out"))) + (mkdir out) + (mkdir (string-append out "/etc")) + (call-with-output-file (string-append out "/etc/foo") + (lambda (port) + (display "foo!" port)))))))) + (entry -> (package->manifest-entry thing)) + (drv (profile-derivation (manifest (list entry)) + #:hooks '())) + (profile -> (derivation->output-path drv))) + (mbegin %store-monad + (built-derivations (list drv)) + (return (and (file-exists? (string-append profile "/etc/profile")) + (string=? (call-with-input-file + (string-append profile "/etc/foo") + get-string-all) + "foo!")))))) + +(test-assertm "etc/profile when etc/ is a symlink" + ;; When etc/ is a symlink, the unsymlink code in 0.8.2 would fail + ;; gracelessly because 'scandir' would return #f. + (mlet* %store-monad + ((thing -> (dummy-package "dummy" + (build-system trivial-build-system) + (arguments + `(#:guile ,%bootstrap-guile + #:builder + (let ((out (assoc-ref %outputs "out"))) + (mkdir out) + (mkdir (string-append out "/foo")) + (symlink "foo" (string-append out "/etc")) + (call-with-output-file (string-append out "/etc/bar") + (lambda (port) + (display "foo!" port)))))))) + (entry -> (package->manifest-entry thing)) + (drv (profile-derivation (manifest (list entry)) + #:hooks '())) + (profile -> (derivation->output-path drv))) + (mbegin %store-monad + (built-derivations (list drv)) + (return (and (file-exists? (string-append profile "/etc/profile")) + (string=? (call-with-input-file + (string-append profile "/etc/bar") + get-string-all) + "foo!")))))) + (test-end "profiles") diff --git a/tests/publish.scm b/tests/publish.scm new file mode 100644 index 0000000000..60f57a8ddb --- /dev/null +++ b/tests/publish.scm @@ -0,0 +1,114 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2015 David Thompson <davet@gnu.org> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (test-publish) + #:use-module (guix scripts publish) + #:use-module (guix tests) + #:use-module (guix config) + #:use-module (guix utils) + #:use-module (guix hash) + #:use-module (guix store) + #:use-module (guix base32) + #:use-module (guix base64) + #:use-module ((guix serialization) #:select (restore-file)) + #:use-module (guix pk-crypto) + #:use-module (web client) + #:use-module (web response) + #:use-module (rnrs bytevectors) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26) + #:use-module (srfi srfi-64) + #:use-module (ice-9 match) + #:use-module (ice-9 rdelim)) + +(define %store + (open-connection-for-tests)) + +(define %reference (add-text-to-store %store "ref" "foo")) + +(define %item (add-text-to-store %store "item" "bar" (list %reference))) + +(define (http-get-body uri) + (call-with-values (lambda () (http-get uri)) + (lambda (response body) body))) + +(define (publish-uri route) + (string-append "http://localhost:6789" route)) + +;; Run a local publishing server in a separate thread. +(call-with-new-thread + (lambda () + (guix-publish "--port=6789"))) ; attempt to avoid port collision + +;; Wait until the server is accepting connections. +(let ((conn (socket PF_INET SOCK_STREAM 0))) + (let loop () + (unless (false-if-exception + (connect conn AF_INET (inet-pton AF_INET "127.0.0.1") 6789)) + (loop)))) + +(test-begin "publish") + +(test-equal "/nix-cache-info" + (format #f "StoreDir: ~a\nWantMassQuery: 0\nPriority: 100\n" + %store-directory) + (http-get-body (publish-uri "/nix-cache-info"))) + +(test-equal "/*.narinfo" + (let* ((info (query-path-info %store %item)) + (unsigned-info + (format #f + "StorePath: ~a +URL: nar/~a +Compression: none +NarHash: sha256:~a +NarSize: ~d +References: ~a~%" + %item + (basename %item) + (bytevector->base32-string + (path-info-hash info)) + (path-info-nar-size info) + (basename (first (path-info-references info))))) + (signature (base64-encode + (string->utf8 + (canonical-sexp->string + ((@@ (guix scripts publish) signed-string) + unsigned-info)))))) + (format #f "~aSignature: 1;~a;~a~%" + unsigned-info (gethostname) signature)) + (utf8->string + (http-get-body + (publish-uri + (string-append "/" (store-path-hash-part %item) ".narinfo"))))) + +(test-equal "/nar/*" + "bar" + (call-with-temporary-output-file + (lambda (temp port) + (let ((nar (utf8->string + (http-get-body + (publish-uri + (string-append "/nar/" (basename %item))))))) + (call-with-input-string nar (cut restore-file <> temp))) + (call-with-input-file temp read-string)))) + +(test-end "publish") + + +(exit (= (test-runner-fail-count (test-runner-current)) 0)) diff --git a/tests/store.scm b/tests/store.scm index 9ed78be085..eeceed45c1 100644 --- a/tests/store.scm +++ b/tests/store.scm @@ -367,15 +367,15 @@ (with-store s (let* ((d (package-derivation s %bootstrap-guile (%current-system))) (o (derivation->output-path d))) - ;; Create fake substituter data, to be read by `substitute-binary'. + ;; Create fake substituter data, to be read by 'guix substitute'. (with-derivation-narinfo d ;; Remove entry from the local cache. (false-if-exception (delete-file (string-append (getenv "XDG_CACHE_HOME") - "/guix/substitute-binary/" + "/guix/substitute/" (store-path-hash-part o)))) - ;; Make sure `substitute-binary' correctly communicates the above + ;; Make sure 'guix substitute' correctly communicates the above ;; data. (set-build-options s #:use-substitutes? #t) (and (has-substitutes? s o) @@ -439,7 +439,7 @@ (with-derivation-substitute d c (sha256 => (make-bytevector 32 0)) ;select a hash that doesn't match C - ;; Make sure we use `substitute-binary'. + ;; Make sure we use 'guix substitute'. (set-build-options s #:use-substitutes? #t #:fallback? #f) @@ -464,9 +464,9 @@ #:guile-for-build (package-derivation s %bootstrap-guile (%current-system)))) (o (derivation->output-path d))) - ;; Create fake substituter data, to be read by `substitute-binary'. + ;; Create fake substituter data, to be read by 'guix substitute'. (with-derivation-narinfo d - ;; Make sure we use `substitute-binary'. + ;; Make sure we use 'guix substitute'. (set-build-options s #:use-substitutes? #t) (and (has-substitutes? s o) (guard (c ((nix-protocol-error? c) @@ -606,6 +606,16 @@ (file (add %store "foo" "Lowered."))) (call-with-input-file file get-string-all))) +(test-assert "query-path-info" + (let* ((ref (add-text-to-store %store "ref" "foo")) + (item (add-text-to-store %store "item" "bar" (list ref))) + (info (query-path-info %store item))) + (and (equal? (path-info-references info) (list ref)) + (equal? (path-info-hash info) + (sha256 + (string->utf8 + (call-with-output-string (cut write-file item <>)))))))) + (test-end "store") diff --git a/tests/substitute-binary.scm b/tests/substitute.scm index 7c1204c1ab..85698127fa 100644 --- a/tests/substitute-binary.scm +++ b/tests/substitute.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014 Nikita Karetnikov <nikita@karetnikov.org> -;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -17,8 +17,8 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. -(define-module (test-substitute-binary) - #:use-module (guix scripts substitute-binary) +(define-module (test-substitute) + #:use-module (guix scripts substitute) #:use-module (guix base64) #:use-module (guix hash) #:use-module (guix serialization) @@ -95,7 +95,7 @@ version identifier.." -(test-begin "substitute-binary") +(test-begin "substitute") (test-quit "not a number" "signature version" @@ -132,7 +132,7 @@ a file for NARINFO." "GUIX_BINARY_SUBSTITUTE_URL")) uri-path)) (cache-directory (string-append (getenv "XDG_CACHE_HOME") - "/guix/substitute-binary/"))) + "/guix/substitute/"))) (dynamic-wind (lambda () (when (file-exists? cache-directory) @@ -156,7 +156,7 @@ a file for NARINFO." (cute write-file (string-append narinfo-directory "/example.out") <>)) - (set! (@@ (guix scripts substitute-binary) + (set! (@@ (guix scripts substitute) %allow-unauthenticated-substitutes?) #f)) thunk @@ -166,8 +166,8 @@ a file for NARINFO." (define-syntax-rule (with-narinfo narinfo body ...) (call-with-narinfo narinfo (lambda () body ...))) -;; Transmit these options to 'guix substitute-binary'. -(set! (@@ (guix scripts substitute-binary) %cache-url) +;; Transmit these options to 'guix substitute'. +(set! (@@ (guix scripts substitute) %cache-url) (getenv "GUIX_BINARY_SUBSTITUTE_URL")) (test-equal "query narinfo without signature" @@ -180,7 +180,7 @@ a file for NARINFO." (with-input-from-string (string-append "have " (%store-prefix) "/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo") (lambda () - (guix-substitute-binary "--query")))))))) + (guix-substitute "--query")))))))) (test-equal "query narinfo with invalid hash" ;; The hash in the signature differs from the hash of %NARINFO. @@ -195,7 +195,7 @@ a file for NARINFO." (with-input-from-string (string-append "have " (%store-prefix) "/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo") (lambda () - (guix-substitute-binary "--query")))))))) + (guix-substitute "--query")))))))) (test-equal "query narinfo signed with authorized key" (string-append (%store-prefix) "/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo") @@ -209,7 +209,7 @@ a file for NARINFO." (with-input-from-string (string-append "have " (%store-prefix) "/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo") (lambda () - (guix-substitute-binary "--query")))))))) + (guix-substitute "--query")))))))) (test-equal "query narinfo signed with unauthorized key" "" ; not substitutable @@ -225,15 +225,15 @@ a file for NARINFO." (with-input-from-string (string-append "have " (%store-prefix) "/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo") (lambda () - (guix-substitute-binary "--query")))))))) + (guix-substitute "--query")))))))) (test-quit "substitute, no signature" "lacks a signature" (with-narinfo %narinfo - (guix-substitute-binary "--substitute" - (string-append (%store-prefix) - "/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo") - "foo"))) + (guix-substitute "--substitute" + (string-append (%store-prefix) + "/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo") + "foo"))) (test-quit "substitute, invalid hash" "hash" @@ -241,10 +241,10 @@ a file for NARINFO." (with-narinfo (string-append %narinfo "Signature: " (signature-field "different body") "\n") - (guix-substitute-binary "--substitute" - (string-append (%store-prefix) - "/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo") - "foo"))) + (guix-substitute "--substitute" + (string-append (%store-prefix) + "/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo") + "foo"))) (test-quit "substitute, unauthorized key" "unauthorized" @@ -253,10 +253,10 @@ a file for NARINFO." %narinfo #:public-key %wrong-public-key) "\n") - (guix-substitute-binary "--substitute" - (string-append (%store-prefix) - "/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo") - "foo"))) + (guix-substitute "--substitute" + (string-append (%store-prefix) + "/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo") + "foo"))) (test-equal "substitute, authorized key" "Substitutable data." @@ -265,15 +265,15 @@ a file for NARINFO." (dynamic-wind (const #t) (lambda () - (guix-substitute-binary "--substitute" - (string-append (%store-prefix) - "/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo") - "substitute-retrieved") + (guix-substitute "--substitute" + (string-append (%store-prefix) + "/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo") + "substitute-retrieved") (call-with-input-file "substitute-retrieved" get-string-all)) (lambda () (false-if-exception (delete-file "substitute-retrieved")))))) -(test-end "substitute-binary") +(test-end "substitute") (exit (= (test-runner-fail-count (test-runner-current)) 0)) diff --git a/tests/syscalls.scm b/tests/syscalls.scm index f26331e164..706f3dff44 100644 --- a/tests/syscalls.scm +++ b/tests/syscalls.scm @@ -19,6 +19,7 @@ (define-module (test-syscalls) #:use-module (guix build syscalls) #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26) #:use-module (srfi srfi-64) #:use-module (ice-9 match)) @@ -45,7 +46,10 @@ (memv (system-error-errno args) (list EPERM ENOENT))))) (test-assert "mount-points" - (member "/" (mount-points))) + ;; Reportedly "/" is not always listed as a mount point, so check a few + ;; others (see <http://bugs.gnu.org/20261>.) + (any (cute member <> (mount-points)) + '("/" "/proc" "/sys" "/dev"))) (test-assert "swapon, ENOENT/EPERM" (catch 'system-error diff --git a/tests/utils.scm b/tests/utils.scm index a662c9a8d3..115868c857 100644 --- a/tests/utils.scm +++ b/tests/utils.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org> ;;; ;;; This file is part of GNU Guix. @@ -21,6 +21,7 @@ #:use-module ((guix config) #:select (%gzip)) #:use-module (guix utils) #:use-module ((guix store) #:select (%store-prefix store-path-package-name)) + #:use-module ((guix search-paths) #:select (string-tokenize*)) #:use-module (srfi srfi-1) #:use-module (srfi srfi-11) #:use-module (srfi srfi-64) |